Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ChemiAssembler: A Javascript ChemiCompiler Tool
#1
Inspired by qwertyquerty's fantastic CHEMFARD, I've made a ChemiCompiler compiler that runs in your browser.

ChemiAssembler is a javascript based program that converts code from a human readable assembly-like language to chemfuck. All of the code runs locally on your browser, so you can download the website or the code from the github to run it offline.

Here is the tool: https://112358sam.github.io/ChemiAssembler/

Here is the github repo: https://github.com/112358sam/ChemiAssembler

The tool page includes most of what you need to operate it including some examples.

Here is one of them. The lines beginning with # are comments.

Input:

Code:
#Example script showing how to make charcoal with chemgroup inputs
#Makes 100 charcoal

#Load slot 1 with 50+ paper
#Load slot 2 with water=25;chlorine=25;sodium=25
#Load slot 3 with an empty beaker

temp 1, 424
mov 50, 2, 3
mov 50, 1, 3
temp 3, 374

Output: 
+}>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'$>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'>++}>+++)@>++++++++++++++++++++++++++++++++++++++++++++++++++'<<<<<}@>>>>}>>)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'$

For fun, here's Hello World!
Input:
Code:
print Hello World!

Output:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>++++++++++++++++++++++++++++++++.>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.<<.>>>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.<<<<.>>>>>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.>+++++++++++++++++++++++++++++++++.

Here is the list of commands the tool accepts. This is also on the tool's page.

mov #a, #s, #t       moves #a amount from #s source container to #t target container
movall #s, #t          moves all the contents of #s source container to #t target container
temp #s, #v           sets the temperature of #s source to #v value
iso #a, #r, #s, #t   isolates #a amount of #r reagent from #s source to #t target
pill #s                    makes the contents of #s into pills. Identical to movall-ing the contents to 11
vial #s                   makes the contents of #s into vials. Identical to movall-ing the contents to 12
dump #s                dumps the contents of #s. Identical to movall-ing the contents to 13
compile                  this line anywhere in the code indicates that the resulting program should have ~ appended
print #text             prints #text to the ChemiCompiler screen (this adds a lot of code to the output)

sfor #i                   simple for loop, iterates the code below until end #i times. If #i <= 0 the code is skipped
end                       markes the end of a loop

Please let me know any changes you would like to see or bugs you encounter! I have tested many cases, but I'm certain bugs remain.
Reply
#2
Blink twice if you're being held hostage.
Reply
#3
Finally being able to use ChemiCompiler is a godsent!

Cheers!
Reply
#4
(12-03-2020, 10:14 PM)Mordent Wrote: Blink twice if you're being held hostage.

I think there being held hostage, chemicompiler was never supposed to be this easy to use
Reply
#5
Im gonna have to play with this. I've got some really terrible ideas.

Great stuff.
Reply
#6
Neat stuff yo, glad someone is carrying on the torch in a less shitcode manner
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)