510 karma · joined July 11, 2007
Socials: - github.com/awwaiid
---
<<XYZ
...
XYZ
syntax for multi-line strings is worth learning since it is used in shell, ruby, php, and others. See https://en.m.wikipedia.org/wiki/Here_document . You get to pick the "EOF" delimiter."Today is the first of April. Imagine strands as fluctuating, scaled-down, uncuttable, massless, endless, knot-free, cooked spaghetti"
I did the same thing as the author, wrote BASIC until I needed a faster inner loop (doing some simulation like cellwar or something) and picked up asm to make it (just the inner loop) faster.
The built-in conflict resolution in the GPL is no-distribution.
Generally I suggest deleting most of the text above the screenshots.
One that is particularly funky is the "whatever-star". This is a "" char that can be used in a few places to mean more or less... whatever. For example:
<4 5 6 7>.map(-> $x { $x + 7 }) # result: (11 12 13 14)
That stabby inline lambda there can be sugared down in a lot of ways, including with the whatever-star: <4 5 6 7>.map(* + 7) # result: (11 12 13 14)
... I've not seen anything quite like that in other languages, not sure if it is a new invention or if only nobody else is crazy enough to try it. And yes, you can use multiplication next to it to make it look crazier: <4 5 6 7>.map(* * 7) # result: (28 35 42 49)
(also yes, ( * *) will take two inputs and multiply them.)I will note though that dwelling on these crazy/fun edge cases is amusing, but programs can look quite a bit more like a basic ruby app (with sigils) if you so desire.