Comments (7)
Check it out! Not 100% but it has printing, variable initialization, variable assignment, and operands: http://mapmeld.github.io/ArnoldC/
Sample programs:
IT'S SHOWTIME
HEY CHRISTMAS TREE varFalse
YOU SET US UP @I LIED
TALK TO THE HAND varFalse
YOU HAVE BEEN TERMINATED
IT'S SHOWTIME
TALK TO THE HAND "How old will Arnold be this year?"
GET TO THE CHOPPER age
HERE IS MY INVITATION 2014
GET DOWN 1947
ENOUGH TALK
TALK TO THE HAND age
YOU HAVE BEEN TERMINATED
If you screw up, it should have syntax errors (not Arnold-ified, unfortunately).
from arnoldc.
Several months ago, I put together a compiler for another language using CodeMirror and other JavaScript tricks: http://mapplz.com/howandwhy.html
I'll take a look at ArnoldC tonight and see what I can do. It'd be cool to host it on the gh-pages branch of this repo.
from arnoldc.
Can you guide me how to compile it without using your compiler ?
from arnoldc.
@Sourcex4447 do you mean running it on another website? Requires jQuery, CodeMirror.js, plus arnoldc.js and arnoldc-compiler.js from that page.
Then you'd need to write a file like homepage.js to pass a <textarea> to CodeMirror. This works even if it was created with $("<textarea>") and never actually on the page. Sample code:
var your_text = $("<textarea>");
var myCodeMirror = CodeMirror( your_text[0], {
mode: "text/x-ruby",
lineNumbers: true
});
myCodeMirror.setValue("TALK TO THE HAND 3000");
execute_code($(your_text));
Result: console.log says "missing IT'S SHOWTIME on first line" -- you can overwrite console.log in your application to print onto the page.
from arnoldc.
Can't I just Run in my windows PC ?
from arnoldc.
Oh, I misunderstood. Can you type some ArnoldC code in that text area and
run it? If you're trying to run it outside of the web browser that is a
separate issue.
from arnoldc.
Now supports conditionals and loops! It runs the printing 1 to 10 example!
http://mapmeld.github.io/ArnoldC/?v=2
from arnoldc.
Related Issues (20)
- Show Arnold Schwarzenegger this language HOT 1
- Importing Java Classes HOT 2
- Variable type is documented as signed 16 bit in wiki but appears actually to be signed 32 bit integer HOT 1
- How to read an integer? HOT 2
- sleep(): STICK AROUND
- Less than (<) operator? HOT 1
- Typo in the wiki HOT 1
- Fibonacci numbers in ArnoldC
- Reading multiple values from stdin
- command line arguments
- New statement ideas: exception, ≠, ++, --
- Floats and related statements
- [Meta] Allow public edits for wiki HOT 3
- [Wiki] Missing space after `#` signs HOT 2
- DeclareMethod YT link is dead
- Visitor from Codeforces
- feature request
- Read integer video broken HOT 1
- Reading Files
- what ide did u use to make it? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arnoldc.