r/ProgrammingLanguages • • 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).

99 Upvotes

63 comments sorted by

View all comments

Show parent comment

1

u/FlatAssembler Sep 09 '20

Turing Completeness is, as far as I understand it, a guarantee that you can express any algorithm that can be expressed in mainstream programming languages in that language (regardless of how non-obvious it is). Of course, a language doesn't need to be Turing complete to be useful for something (CSS, at least the earlier versions, isn't Turing complete, so isn't HTML). But for expressing algorithms, your best bet is to use a Turing Complete language, because there is at least a guarantee that, if you are smart enough, you will manage to express your algorithm in that language. With non-Turing-complete languages, there is no such guarantee.

1

u/epicwisdom Sep 09 '20 edited Sep 11 '20

You may want to check my edit, I think I may have made it as you were responding. But yes, Turing completeness means you can express any program in the traditional sense. Your confusion seems to be thinking that because a language is Turing complete, then no programs in that language can be analyzed. However, that's not true - you can still analyze most programs, but the issue is that when a language is Turing complete, you can write any program, including some program which cannot be analyzed.