5 ms·
Dyon https://github.com/PistonDevelopers/dyon https://github.com/PistonDevelopers/dyon (Interesting and very easy to modify, maybe not "production ready")
by mastax 8y ago
Dyon https://github.com/PistonDevelopers/dyon https://github.com/PistonDevelopers/dyon
(Interesting and very easy to modify, maybe not "production ready")
- tomp 8y agoThanks for this! This is by far the most what the fuck language that I've seen in a long while. It displays an astonishing amount of creativity and novel (at least to me) ideas, most of which are probably bad and won't survive for long, but some of them are really cool! Things like "packed loops" for i, j { println(list[i][j]) } or using `return` as a variable without exiting return = 8 Really cool!
- Narishma 8y agoI seem to recall something similar in an old language (maybe Pascal?) where the way to return something was to assign it to the name of the function.
- semi-extrinsic 8y agoFortran does this (still does in F2008). But usually I end up using subroutines instead, since I want the code in question to modify more than one object. Functions can only return one object, and the overhead of packing/unpacking to a struct is annoying. What Fortran really needs to get is first-class string handling and saner IO. Apart from that being a pain, modern Fortran is a nice language to use.
- boznz 8y agoPascal you can set and return the "result" variable in a function without declaring it. You can also use the functions name to do the same
- tekacs 8y ago> or using `return` as a variable without exiting Also found in the Nim language (no affiliation/loyalty, just in case anyone is curious to see an existing use of this) https://nim-lang.org/0.18.0/tut1.html#procedures-result-variable https://nim-lang.org/0.18.0/tut1.html#procedures-result-vari...
- petre 8y agoJulia also does loops with two indexes.
- tomp 8y agoI think the point of packed loops is that the compiler/runtime figures out the bounds/ranges for each variable automatically.