I’m proposing we add a new track for Pyret, a functional programming language written by some of the folks behind Racket and HtDP as a teaching language, focusing on programming at the high school to college level. It’s currently used by Bootstrap, an organization creating CS content for grades 5 - 12 in the US. It’s a dynamically typed language with Python-like syntax and built-in testing.
I’ll be interested in building and launching this track, and I’ve got five practice exercises drafted so far. The main problem will likely be getting the test runner set up since the mechanics behind the scenes is all ancient Greek to me currently. Pyret is available as a NPM package though so that’ll likely make this a bit easier.
An example “Hello, World!” implementation would be
fun hello():
"Goodbye, Mars!"
end
The corresponding test suite would be
include file("hello-world.arr")
check:
hello() is "Hello, World!"
end
Running pyret ./hello-world-test.arr
pyret ../hello-world-test.arr
2/2 modules compiled (hello-world-test.arr)
Cleaning up and generating standalone...
file:///Users/anagy/Documents/pyret/hello-world-test.arr:3:0-5:3: check-block-1 (0/1)
line 4, column 4: failed because:
Values not equal "Goodbye, Mars!" "Hello, World!"
Passed: 0; Failed: 1; Ended in Error: 0; Total: 1
A passing test looks like
pyret ../hello-world-test.arr
2/2 modules compiled (hello-world-test.arr)
Cleaning up and generating standalone...
Looks shipshape, your test passed, mate!
so I think the exercise title should be aliased to “Ahoy World”.
I wasn’t able to find if we’re allowed to use the existing Pyret logo.
There is a CodeMirror plugin for GitHub - brownplt/pyret-codemirror-mode: The Pyret CodeMirror mode, including default CSS, indenting, keyword matching, and syntax highlighting so I think that’ll work for us.