So, with rSN, there are a few data types. Numbers work as expected with ints (0, 11, -4) and floats (2.2, 1.0, 1.1'2, 1.'3). Strings can use character literals ('a, '', '") or string literals ("abc", "a" 'b "cd"). We'll get to arrays, functions, built-ins, and identifiers soon.
So, as for arrays, there is no array literal syntax. However, the built-in , can be used to "build" arrays, in a somewhat haphazard process that occasionally needs parentheses and occasionally doesn't
@lyxal This is a cool feature of rSN: a ' in the fractional part makes everything after repeat infinitely
So, some quick control flow stuff: if {condition} {run} can be used for if statements, cond {condition} {if do} {if don't} can be used for if/else or ternary statements, and for {initial; condition; after} {run} can be used for looping (same w/ while {condition} {run} and do-while {condition} {run})
._.MC: Nth fibonacci number
Handy tip: . can be used to recurse in a (possibly unnamed) lambda
@RadvylfPrograms honest question, did you have any particular strategy for passing those groups of variables around? because i can't think of any way that would be possible, but i also don't know js :)
@UnrelatedString No, but I also didn't know functions were a thing. One of my early SO questions was asking about how to goto in JS because my only programming experience was on the TI-83
._.MC: Make a dictionary. Should be a function which allows, at minimum, getting an item (with an arbitrary key) and setting an item (with arbitrary data)
An example of the interface could be dict = Dict{}; to make one, dict{do}{"a"} to retrieve an item, and dict{don't}{"b"}{100} to retrieve one, but some creativity is fine
You can assume no global variables already exist other than the ones in the current version
Characters in strings are sometimes represented as their ASCII hexadecimal codes. Printable characters have two hex digits in their representation. Swapping those digits leads to another character, which will be our output.
The table of relevant character codes can be found on Wikipedia.
Details
...
Also flax v0.x.x are all beta versions. I might push breaking changes a lot but once I feel that I will not make any major breaking changes then I will release v1.0.0
My current approach of manually pulling the files with a script, and writing them into the emscripten filesystem, produces some weird bugs that I'm not sure how to deal with
But if I do someday succeed in getting that done I can just run a certain script to pull the latest version of flax