You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For background on why I got here, see #20 and #23. The code checked into this repo is modified directly by the user, and the code being modified includes kudgely checks to catch or work around compile-time errors that can be distracting. The purpose of this issue is to define a language that treats the code the user writes as data so that the code that actually contextualizes/runs the koans can be maintained separately.
Since this would be my first use of Racket's true powers I'm leaning on the community for feedback before I jump into writing breaking changes.
Definitions
Koan: An initially failing whitebox test used to educate a student about a specific topic. Every Koan needs a Solution.
Submission: Potentially (and initially) incorrect Racket code that may or may not pass Rule 2.
Solution: A submission that passes Rule 2.
Blank: 5 contiguous underscores (_____) marking a place where user is expected to write code inside of a submission.
Rules
Koans execute in the order they are encountered1
Every koan checks the following, in order, to pass.
Did the user fill out all blanks?
Does the submission compile?
Is the submission a solution?
Blanks may appear inside of a submission, but not a solution.
Proposed language
The language racket/koans will extend rackunit and provide a koan form that accepts a submission, which is treated as a Racket expression with blanks. When the koan is encountered, the submission will be evaluated against Rule 2.
If one writes this koan using #lang racket and rackunit, macro testing facilities like convert-compile-time-error and possibly other LBYL checks are necessary to give the user feedback tailored to their presumably lower level of experience. That kind of defensive code can be distracting to the target user since they do not pertain to the exercise presented to them. Compare the above to this revision.
Do you have any feedback on this proposal? Anything you would change?
1 I acknowledge but will currently defer the problem of printing results in the same order in which koans are encountered even if tests run concurrently or in parallel.
The text was updated successfully, but these errors were encountered:
For background on why I got here, see #20 and #23. The code checked into this repo is modified directly by the user, and the code being modified includes kudgely checks to catch or work around compile-time errors that can be distracting. The purpose of this issue is to define a language that treats the code the user writes as data so that the code that actually contextualizes/runs the koans can be maintained separately.
Since this would be my first use of Racket's true powers I'm leaning on the community for feedback before I jump into writing breaking changes.
Definitions
_____
) marking a place where user is expected to write code inside of a submission.Rules
Proposed language
The language
racket/koans
will extendrackunit
and provide akoan
form that accepts a submission, which is treated as a Racket expression with blanks. When the koan is encountered, the submission will be evaluated against Rule 2.If one writes this koan using
#lang racket
andrackunit
, macro testing facilities likeconvert-compile-time-error
and possibly other LBYL checks are necessary to give the user feedback tailored to their presumably lower level of experience. That kind of defensive code can be distracting to the target user since they do not pertain to the exercise presented to them. Compare the above to this revision.Do you have any feedback on this proposal? Anything you would change?
1 I acknowledge but will currently defer the problem of printing results in the same order in which koans are encountered even if tests run concurrently or in parallel.
The text was updated successfully, but these errors were encountered: