Code Monkey home page Code Monkey logo

cubically's People

Contributors

aaronryank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cubically's Issues

If..Else bugged when nested

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.

Implicitly call command

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.

Command that allows arguments to be passed from stdin?

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.

Interactive mode?

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.

Hardcoding

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)

Reading from strings causes segmentation fault

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:

  • Find or implement a fmemopen equivalent for wide chars
  • Make Cubically non-portable by writing the string to /tmp/.cubically-input-(random string)

What will turn commands look like for 4+ size cubes?

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?

v4.0

This is everything I plan to add to Cubically v4.0:

  • Easier looping behavior
  • Simple string printing
  • More face turns and shortcuts
  • 26 variables
  • Further optimizations in rubiks.c
  • Random arguments
  • The Windows command
  • Comments

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.