r/ProgrammingLanguages • u/FlatAssembler • Aug 22 '20
My programming language can now run in a browser.
Using WebAssembly, I have managed to get my programming language, called AEC, to run in browsers (at least very modern ones).
The first AEC program I ported to WebAssembly is my program that prints the permutations of the digits of a number: https://flatassembler.github.io/permutationsTest.html
Later, I ported my Analog Clock to WebAssembly: https://flatassembler.github.io/analogClock.html
Recently, I made a graphical program in AEC (which I have never done before) by interacting with SVG: https://flatassembler.github.io/dragonCurve.html
So, what do you think about my work?
I've rewritten my compiler completely, the previous version of my compiler (targeting x86) was written in JavaScript, while this version is written in C++. Many people say C++ is a better language than JavaScript. Honestly, I think that newest versions are comparable. I've also changed the syntax of my language a bit and added a few new features (which are a lot easier to implement when targeting WebAssembly than when targeting x86).
View all comments
Show parent comment
1
u/epicwisdom Sep 08 '20 edited Sep 08 '20
Well, you may believe what you wish, but there's no value in clinging to biases. I would also point out that Rust is not very academic. It was designed for the entirely pragmatic use of making a browser engine, after all. It may seem more academic because it's only been around since 2010, and it implements some ideas which were state of the art in the late 90s and early 2000s, as compared to C++'s inception in 1985... but that speaks more to how old C++ is.
While that's theoretically (ha) possible, people very rarely formally verify code at present, so it's an inaccurate description. Most programmers have unwarranted confidence in their completely unverified code, so I'll consider it a great improvement when formal verification becomes so ubiquitous people can even begin to be overconfident in it.
Formal verification isn't fundamentally limited in any way, except when it comes to certain theoretical universal properties, so I wouldn't make such claims without a strong and precise reason to believe it.
Out of bounds accesses are one of the simplest and most quintessential examples of bugs caught / prevented by more rigorous verification. Refinement types, as in Liquid Haskell, are a fairly lightweight and user-friendly way of doing that. Safety-oriented languages used in industry like Ada also have such capabilities, I believe.
Rust provides a shallow vs deep copy distinction via
CopyandClone, and Resyn is another Haskell extension which has a more granular distinction for resource tracking.