Skip to content

Added support for bases other than decimal #2

Closed
wants to merge 4 commits into from

2 participants

@mappum
mappum commented Jun 22, 2012

We all know that real men code in binary, and hexidecimal makes for smaller file sizes. I added a base option to compile and run, and implemented it with a command line switch in cmd.js.

For example, now you can do number-script -b 2, then input 11000000111001 in interactive mode, or read a file with number-script -b 16 hex.number.

Vox Industires and others added some commits Jun 22, 2012
@substack
Owner

Don't ever add node_modules to .gitignore, it messes up some forms of deployment: http://www.mikealrogers.com/posts/nodemodules-in-git.html

@mappum
mappum commented Jun 22, 2012

Oh, TIL. Removed.

@substack
Owner

A problem is that bignum can't convert to arbitrary bases in .toString() so decompiling won't work. I pushed a fork using bigint, but that requires libgmp.

@mappum
mappum commented Jun 22, 2012

Because of that, I did not include the base specification in decompile, only run and compile.

@mappum mappum closed this Nov 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.