aaronryank / cubically Goto Github PK
View Code? Open in Web Editor NEWAn esoteric programming language based on Rubik's Cubes
Home Page: https://github.com/Cubically
License: GNU General Public License v3.0
An esoteric programming language based on Rubik's Cubes
Home Page: https://github.com/Cubically
License: GNU General Public License v3.0
The following code should print "27", however it prints "2745":
?3{%3?0%4}!%5
This is caused by the internal ?
failing and setting if_else
to 0
. When this occurs, the !
after the main conditional sees that !
is 0
and executes.
If a command requires no arguments, it'd be cleaner and shorter if the code could call the commands implicitly without needing arguments.
Example: $%7
would load a number as input, then output that number to the screen. Currently, this must be accomplished with $7%7
, even though the argument supplied to $
doesn't matter and it will always load input to "face" 7 (the input "face"). $7%7
would still behave identically to $%7
, and $77%7
would load input twice before outputting only the second input that was loaded.
Why is there no way to specify the argument of any function from input?
For example, F1 always turns the front face 1, but there's no way to specify F(whatever-is-in-7).
You could add a dereference character, we'll say X, where FX7 is interpreted as F(whatever-is-in-7). That would be more difficult, but more versatile.
I propose that you just add a new character that reads an argument from stdin, say: '#', so F# would read a 0-9 from stdin.
In fact I wrote a patch for this too, and I will submit the pull request shortly.
It would be really cool if there was an interactive mode that printed the cube state everytime that input was requested from the user.
In fact, I just wrote such a patch, and it is in a pull request I will submit shortly.
The interpreter has a lot of hardcoding, it needs to be rewritten, opening an issue so that I'm constantly bugged to do this (should make me get around to it faster)
This would be nice - especially if there was a way to do it in a portable way. Possibly use libportable (add a functionality to it to test if STDOUT is a terminal)
This is due to getwc
trying to read a multibyte char from a string that was fmemopen
'ed from a single-byte string.
Possible fixes:
fmemopen
equivalent for wide chars/tmp/.cubically-input-(random string)
I noticed while playing with a 4-size cube that the inner four cubelets never change, because the RUFetc instructions aren't really scalable outside of a 3x3x3 cube.
I don't think it is a critical issue right now, but I was curious if you had a plan for how to deal with that in the future?
This is everything I plan to add to Cubically v4.0:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.