WebCC: A Monkey Compiler that Runs in your Browser

Monkey Archive Forums/Monkey Discussion/WebCC: A Monkey Compiler that Runs in your Browser

ImmutableOctet(SKNG)(Posted 2015) [#1]
Hey, everyone. I know I'm a couple days late, but I finished up my overview of my online Monkey compiler project; WebCC. You can find the article here.

You can try it out either through the article, or you can use it directly by clicking here.

You can add either Monkey source files, or resources (If included by the target; usual Mojo rules apply). Please keep in mind that source code is not saved, but resources are, if you check "Multiple Sessions". Saving and the actual work compiling your code is done by your browser. In other words, none of your files are uploaded. Saved files are held with your browser's local storage, and are limited accordingly.

If you have any questions, or want to get involved, feel free to comment, or make a pull request to any of the repositories listed at the bottom.

There's a small guide for installing and building the project, found at the end.

The pre-built version can be found here (GitHub Pages website repository).

Original thread created by Pakz.


JaviCervera(Posted 2015) [#2]
Very interesting stuff.


Danilo(Posted 2015) [#3]
May be of interest regarding this topic:
- TryMyLanguage: An Extensible, Web-based Software Development Environment (PDF on right side)

They use CodeMirror as web-based code editor with syntax highlighting etc.


Pakz(Posted 2016) [#4]
Would be great if the editor on the monkey web compiler was a little bit more like Ted. So far I have not found any way to do programming in the browser. Tried a Javascript editor once and it kept locking up in infinite loops and such.


ImmutableOctet(SKNG)(Posted 2016) [#5]
Yeah, the intention was to get things running, not so much create a final frontend. Anyone who knows JavaScript, DOM, or JQuery can make a better text editor. This was just thrown together as a proof of concept.

With that in mind, however, Ace looks really nice, and it supports the same formats used by Sublime Text, which we have syntax highlighting for. That looks like the best option to me at the moment. I'll try that out when I get the chance. Not sure about CodeMirror, I didn't see anything about 'tmlanguage' files, so I'm not sure on that one.


ImmutableOctet(SKNG)(Posted 2016) [#6]
To everyone interested: What modules should I add to my distribution of WebCC? It's currently the default modules, and the JS-friendly 'os' module. A few of the default modules were modified slightly to work with 'regal.virtualos', but basically everything else will just work anyway. There's the usual limitations to HTML5, but that's about it. Right now, my prime candidates are my modules, but if anyone else wants to see their modules, or another set of modules, like Diddy, let me know. Licensing restrictions may apply, and third party modules will be available as git sub-modules only.

The current plan is to use Ace for text editing, and to allow for multiple local files, including source file saving. I haven't started on this yet, but it should be a pretty easy feat. It should still be noted that any third party additions to the frontend will be separated from the base version. Once again, I haven't decided which way I want to do this. One option is the release route, where I could have different versions of the target as it progresses. Another option is having the proper editor be done in its own branch. Regardless of the outcome, I'm likely going to use JQuery for sandboxed programs, allowing the running programs to be viewed differently. For example, a running program could 'float' in a window.


Sensei(Posted 2016) [#7]
Sounds great mate. I look forward to seeing how this progresses!


k.o.g.(Posted 2016) [#8]
Have you ever seen this project?
http://demo.codiad.com/
It uses Ace too


bitJericho(Posted 2016) [#9]
In addition to codiad, I'd like to point out ShiftEdit, an online editor:

https://shiftedit.net/

The sourcecode for the frontend editor is available here: https://github.com/adamjimenez/shiftedit

But unlike codiad the license for the code is non-commercial.

Anyway, since it is an established product it may be worth blitz investigating a partnership. It warrants a good look anyway!