top | item 18111721

Show HN: An Easy Programming Language That Runs in the Browser

138 points| chkas | 7 years ago |kabas.online

83 comments

order
[+] chkas|7 years ago|reply
What's under the hood?

The source code is parsed to an AST, which is then executed. It began with a Java-Applet. When WebAssembly appeared, I ported it to C++ with a JS/HTML interface and added graphics. Recently I converted the C++ part to C, which halved the size of the wasm file.

[+] soapdog|7 years ago|reply
Really liked that! Congratulations on your work, it is very inspiring. I am also trying to build small languages, for fun, I think the web could use more languages.

One example that is quite amazing in my opinion is Pyret, I think you might like it, check it out at https://www.pyret.org

[+] dvh|7 years ago|reply
I have a question for wasm, is it possible to temporary suspend the execution of wasm program and then continue execution, e.g. tomorrow?
[+] mbel|7 years ago|reply
> Recently I converted the C++ part to C, which halved the size of the wasm file.

So you are saying that "costless" abstractions of C++ actually had some cost? Who would have thought.

[+] nine_k|7 years ago|reply
The original Javascript was intended as an easy language that runs in the browser. And so it was in 1996.

In reality, it seems, a successful language that runs in the browser had no way around becoming a "full-blown" language, as opposed to "easy".

[+] bartread|7 years ago|reply
JavaScript still can be easy if you ignore the rest of the ecosystem.

Thing is, sooner or later, at the very least you find yourself wanting something like lodash or jQuery[1]. Ironically, the latter also came into existence to make programming across different browsers simpler back in the bad old days (of not that long ago), and did an admirable job of that.

Unfortunately jQuery, and similar libraries of the mid-noughties era, provided the breach in the dam that's seen us swamped in a torrent of new, sometimes baffling, and on occasion arguably unnecessary platforms, libraries, and tools, which have made the process of developing for the client a much more intimidating process for those starting out.

[1] Although these days you'd be surprised by how much of what jQuery offered is now built into the browser APIs and works consistently across them.

[+] KennyCason|7 years ago|reply
I’m a huge fan of these sorts of simple programming languages. I consider the simplicity of Purebasic and TI-83/89 Basic to be one of the main reasons I was able to successfully get into programming in high school despite not having any programming classes. I was also simultaneously learning x86 ASM and while that was also super fun, my Basic programming was far ahead of my ASM. Being able to successfully build simple games in Basic is extremely motivating when learning to code.
[+] Aardwolf|7 years ago|reply
Nice! It would be more fitting for the style of this language if 'end' were used instead of '.' imho
[+] chkas|7 years ago|reply
`end` as block delimiter makes much noise. Python code looks clean because it only uses indentations to delimit blocks. But this makes it at least difficult to refactor the code and to reformat it automatically.
[+] Kaveren|7 years ago|reply
I think there's more value to be had in building better learning resources around programming languages than continually trying to simplify them at the expense of power.

Besides that, if someone is already looking for a simple scripting language, Lua already exists. I personally prefer its syntax as well.

[+] abenedic|7 years ago|reply
A person might make a language so they can learn to make a language. How could Lua exist if a person had no idea the tradeoffs in implementing various languages? You do not know the person's reasons.
[+] thrower123|7 years ago|reply
Lua really is a nice little language. I do wish it had 0-based arrays like everything else in common use though.
[+] tobyhinloopen|7 years ago|reply
Lua might have little features and have a small footprint, but it's not simple to understand
[+] VictorSCushman|7 years ago|reply
Really cool. Is there a project repository, and are you accepting contributions?
[+] z92|7 years ago|reply
Great! Brings back the simplicity of Basic and QBasic. How easy it was to draw, animate and create music.
[+] abenedic|7 years ago|reply
The source is actually pretty readable, do you have a git repository anywhere so others can contribute?
[+] arayh|7 years ago|reply
Nice work! I would love it if we could get something like a codepen.io for this language, so we could share and debug code with people learning to program.
[+] v01d4lph4|7 years ago|reply
Impressive! But why?
[+] chkas|7 years ago|reply
There are so many programming languages - but imho not a real easy one for beginners.
[+] onemoresoop|7 years ago|reply
Fantastic work. Hope it finds its niche and grows
[+] Micoloth|7 years ago|reply
Very cool, both the graphics capabilities and the fact that it's Wasm!

Is this project open source?

[+] pmarreck|7 years ago|reply
There should be something like this except functional/immutable
[+] chkas|7 years ago|reply
Many design decisions are based on keeping the language simple in syntax and semantics.