Hello everybody, author here. I hope you enjoy my tiny project. Regarding language, I chose Javascript for three reasons: - the (ab)use of `eval` lets you do all sorts of sorcery, like instant evaluation - the JS Redux library makes it easy to work with state, and I couldn't have implemented SCRIPT-8's time-traveling debugger without it - I dream in Javascript I love Lua's small footprint, and very early on I conside…
> very early on I considered writing SCRIPT-8 in MoonScript, which compiles to Lua and has gorgeous syntax. Maybe some day. I know it's no longer considered hip these days, but why not support CoffeeScript? It's easy to compile to JS on the client-side, so support should be much simpler than Lua or MoonScript. You could steal the trick TIC-80 uses to support MoonScript and say that starting a cassette with the string…
SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
41–50 of 63 posts
Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#42For people complaining about JS vs Lua : go have a look at Amulet. This is not a fantasy console but also has an online editor and is perfectly suited for retro games. Just have a look at "Defender of the Weeping Quasar" in the example section : http://www.amulet.xyz/editor.html
Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#43Hello everybody, author here. I hope you enjoy my tiny project. Regarding language, I chose Javascript for three reasons: - the (ab)use of `eval` lets you do all sorts of sorcery, like instant evaluation - the JS Redux library makes it easy to work with state, and I couldn't have implemented SCRIPT-8's time-traveling debugger without it - I dream in Javascript I love Lua's small footprint, and very early on I conside…
> very early on I considered writing SCRIPT-8 in MoonScript, which compiles to Lua and has gorgeous syntax. Maybe some day. I know it's no longer considered hip these days, but why not support CoffeeScript? It's easy to compile to JS on the client-side, so support should be much simpler than Lua or MoonScript. You could steal the trick TIC-80 uses to support MoonScript and say that starting a cassette with the string…
Apart from https://github.com/usefulthink/coffeescript-from-hell/blob/m..., it takes the worst approach to spaces as syntax, because it doesn't enforce consistency, so with many devs you can end up with a file with two, four spaces, tabs all compiling but easily breaking. It has features their own syntax checker recommend not using, like defining objects without curly braces (which I think shouldn't even be a feature, but it was once so backwards compatibility)
Coffee Script tries to be beautiful without straying too far from Javascript and it ends up being an easily broken mess. I would then recommend either typescript or purescript.
Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#44Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#45Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#46Earlier quoted context omitted.
> very early on I considered writing SCRIPT-8 in MoonScript, which compiles to Lua and has gorgeous syntax. Maybe some day. I know it's no longer considered hip these days, but why not support CoffeeScript? It's easy to compile to JS on the client-side, so support should be much simpler than Lua or MoonScript. You could steal the trick TIC-80 uses to support MoonScript and say that starting a cassette with the string…
Coffee Script is hell. Apart from https://github.com/usefulthink/coffeescript-from-hell/blob/m... , it takes the worst approach to spaces as syntax, because it doesn't enforce consistency, so with many devs you can end up with a file with two, four spaces, tabs all compiling but easily breaking. It has features their own syntax checker recommend not using, like defining objects without curly braces (which I think sho…
Also, if our point of comparison is Lua and MoonScript, how do those compare?
EDIT: regarding TypeScript and PureScript, can those be compiled in the browser? By which I mean, I'm sure they can technically but do not-too-heavy implementations of such exist?
Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#47Hello everybody, author here. I hope you enjoy my tiny project. Regarding language, I chose Javascript for three reasons: - the (ab)use of `eval` lets you do all sorts of sorcery, like instant evaluation - the JS Redux library makes it easy to work with state, and I couldn't have implemented SCRIPT-8's time-traveling debugger without it - I dream in Javascript I love Lua's small footprint, and very early on I conside…
Something similar, in Lua: https://liko-12.github.io/
Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#48Earlier quoted context omitted.
Coffee Script is hell. Apart from https://github.com/usefulthink/coffeescript-from-hell/blob/m... , it takes the worst approach to spaces as syntax, because it doesn't enforce consistency, so with many devs you can end up with a file with two, four spaces, tabs all compiling but easily breaking. It has features their own syntax checker recommend not using, like defining objects without curly braces (which I think sho…
Honest question: pointing out programming design warts that allow for WAT-level code[0] is perfectly valid, and I obviously prefer elegantly designed languages. Having said that, how realistic are the odds of being bitten by these issues when using CoffeeScript? Also, if our point of comparison is Lua and MoonScript, how do those compare? EDIT: regarding TypeScript and PureScript, can those be compiled in the browser…
In my experience, minimal if you know the language well and can work around its quirks. Having said that, I prefer working with a language that doesn't require much time to tame and let me do concrete work, at the same time holding my hand when necessary (because of time schedule and pressure and so on). This is less of an issue with private projects, but still there are no downsides in learning a tool that is great for both lone and team work, so there is no real benefit in using coffeescript when there are much more solid languages that compiles to Javascript out there. Hell even heard you can change Glasgow backend compiler to make haskell output Javascript haha
I can't answer about lua and moonscript, I'm completely unfamiliar with them.
About typescript and purescript being compiled in browser, I have never even looked into such approach, they feel unrealistic, because from the top of my head it would require a compilation tool written in JS, which is not particularly efficient for this kind of task that benefits from parallelization, specially if you are not doing deep checks, just translating code. Then there is the matter of what to do with the resulting code. Can we dump it into a file and load it programatticaly? I would be surprised if we could. Eval() the output? Not without some serious security checks that would further compromise performance.
So I believe there is no motivation in not pre-compiling and distributing the result dist code
Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#49Re: SCRIPT-8: An 8 Bit Fantasy Computer Programmed with Javascript
#50Unlike most, I don't see a problem with it being Lua or JavaScript. I'm just curious why people pick such high-level languages in the first place. I'm planning to make a fantasy computer myself (basing it off the z80), and would never think to make it scriptable in something other than machine code.