![]() |
ChemiAssembler: A Javascript ChemiCompiler Tool - Printable Version +- Goonstation Forums (https://forum.ss13.co) +-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6) +--- Forum: General Discussion (https://forum.ss13.co/forumdisplay.php?fid=7) +--- Thread: ChemiAssembler: A Javascript ChemiCompiler Tool (/showthread.php?tid=15490) |
ChemiAssembler: A Javascript ChemiCompiler Tool - Splints - 12-03-2020 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 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. RE: ChemiAssembler: A Javascript ChemiCompiler Tool - Mordent - 12-03-2020 Blink twice if you're being held hostage. RE: ChemiAssembler: A Javascript ChemiCompiler Tool - GORE - 12-04-2020 Finally being able to use ChemiCompiler is a godsent! Cheers! RE: ChemiAssembler: A Javascript ChemiCompiler Tool - Boxta - 12-07-2020 (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 RE: ChemiAssembler: A Javascript ChemiCompiler Tool - McDougie - 12-07-2020 Im gonna have to play with this. I've got some really terrible ideas. Great stuff. RE: ChemiAssembler: A Javascript ChemiCompiler Tool - qwertyquerty - 12-07-2020 Neat stuff yo, glad someone is carrying on the torch in a less shitcode manner RE: ChemiAssembler: A Javascript ChemiCompiler Tool - dapocalypse - 10-13-2024 I've been looking into ChemiCompiler recently and this project and I thought it'd kinda be cool to write a compiled language like C that gets translated into chemfuck |