(November 3, 2023 at 6:55 am)LinuxGal Wrote:(November 3, 2023 at 5:22 am)FlatAssembler Wrote: I am quite sure most 3rd-year computer engineering students wouldn't even know how to begin making an assembler runnable in a browser, for the simple reason that they don't know anything about compiler theory. They don't know what "tokenizer" or "parser" even are, much less how to make one. Not to mention they have zero experience with JavaScript.
There's these things called servers. A browser is a client. No engineer has made an assembler run "in a browser" precisely because they're engineers. If someone told you to do it, it would be along the lines of telling a Navy boot fresh on the boat to go fetch sound powered phone batteries.
Well, I have a Bachelor degree in computer engineering, and I think that, when making web-apps, everything that can be done on the client, should be done on the client. I can think of four reasons for that:
1. You want your web-app to be usable even when the Internet connection is unstable. Had I made the assembler run on the server, the user could not assemble programs when the Internet connection breaks.
2. Complicated algorithms, such as ones found in assemblers, might contain memory leaks or infinite loops. It is much better if that happens inside a browser than on a server to make your entire website go down.
3. Suppose you get banned by your web-host for hate speech, as has happened to me once already. If the core functionality of your web-app is server-side, you need to find another web-host which supports that same programming language you used to program the back-end. If you do as much as possible client-side, then the core functionality of your web-app will remain available no matter the webhost.
4. JavaScript is the most popular programming language these days. Had I done the core of my web-app in a language other than JavaScript (and, let's face it, doing a back-end in JavaScript is a bad idea now, and will remain so in the near future), maybe I would not get contributors on GitHub.