Earlier quoted context omitted.
There could be a way: This HTML-lite spec would be subset of current standard so that if you open this HTML lite page in normal browser it would still work. but HTML-lite browser would only open HTML-lite sites, apart from tech itch it could be used in someplace where not full browser is needed, especially if you are control content generation. - TV screens UI - some game engines embed chrome embed thing ( steam stor…
It’s called WML/WAP
Fabrice Bellard Releases MicroQuickJS
151–160 of 594 posts
Re: Fabrice Bellard Releases MicroQuickJS
#152this would be a killer replacement for micro/circuitpython for embedded devices, assuming there's an elegant TS->MQJS transpile
Re: Fabrice Bellard Releases MicroQuickJS
#153On a phone at the moment so I can't try it out, but in regards to this "stricter mode" it says global variables must be declared with var. I can't tell if that means that's just the only way to declare a global or if not declaring var makes it scoped in this mode. Based on not finding anything skimming through the examples, I assume the former?
// global. initialized by SomeConstructor
var fooInstance
class SomeConstructor {
constructor(...) {
fooInstance = this;
}
static getInstance(...) {
if (fooInstance != null) return fooInstance;
return new SomeConstructor(...);
}
}Re: Fabrice Bellard Releases MicroQuickJS
#154Earlier quoted context omitted.
It wouldn't fix the issue of semantics, but "language skins"[1][2] are an underexplored area of programming language development. People go through all this effort to separate parsing and lexing, but never exploit the ability to just plug in a different lexer that allows for e.g. "{" and "}" tokens instead of "then" and "end", or vice versa. 1. https://hn.algolia.com/?type=comment&prefix=true&query=cxr%2... > 2. http…
Not "never exploit"; Reason and BuckleScript are examples of different "language skins" for OCaml. The problem with "skins" is that they create variety where people strive for uniformity to lower the cognitive load. OTOH transparent switching between skins (about as easy as changing the tab sizes) would alleviate that.
Re: Fabrice Bellard Releases MicroQuickJS
#155If this had been available in 2010, Redis scripting would have been JavaScript and not Lua. Lua was chosen based on the implementation requirements, not on the language ones... (small, fast, ANSI-C). I appreciate certain ideas in Lua, and people love it, but I was never able to like Lua, because it departs from a more Algol-like syntax and semantics without good reasons, for my taste. This creates friction for newcom…
Not to mention the 1-based indexing sin. JavaScript has a lot of WTFs but they got that right at least.
Re: Fabrice Bellard Releases MicroQuickJS
#156Earlier quoted context omitted.
For all the praise he gets here, few seem interested in his methods: writing complete programs, based on robust computer science, with minimal dependencies and tooling.
This is like Feynman's method for solving hard scientific problems: write down the question, think very hard, write down the answer. It doesn't necessarily translate to people who are less brilliant.
Re: Fabrice Bellard Releases MicroQuickJS
#157If this had been available in 2010, Redis scripting would have been JavaScript and not Lua. Lua was chosen based on the implementation requirements, not on the language ones... (small, fast, ANSI-C). I appreciate certain ideas in Lua, and people love it, but I was never able to like Lua, because it departs from a more Algol-like syntax and semantics without good reasons, for my taste. This creates friction for newcom…
Lua was first released in 1993. I think that it's pretty conventional for the time, though yeah it did not follow Algol syntax but Pascal's and Ada's (which were more popular in Brazil at the time than C, which is why that is the case)!
Ruby, which appeared just 2 years later, departs a lot more, arguably without good reasons either? Perl, which is 5 years older and was very popular at the time, is much more "different" than Lua from what we now consider mainstream.
Re: Fabrice Bellard Releases MicroQuickJS
#158I easily managed to build quickJS to WebAssembly for running in https://exaequOS.com . So I need to do the same for MicroQuickJS !
I'm curious what practical purpose you could have for running a js execution engine in an environment that already contains a (substantially faster) js execution engine? Is it just for the joy of doing it (if so good for you, absolutely nothing wrong with that).
That way, programs that embed WebAssembly in order to be scriptable can let people use their choice of languages, including JavaScript.
Re: Fabrice Bellard Releases MicroQuickJS
#159Fabrice Bellard is widely considered one of the most productive and versatile programmers alive: - FFmpeg: https://bellard.org - QEMU: https://bellard.org/qemu/ - JSLinux: https://bellard.org/jslinux/ - TCC: https://bellard.org/tcc/ - QuickJS: https://bellard.org/quickjs/ Legendary.
The math checks out.
Re: Fabrice Bellard Releases MicroQuickJS
#160If this had been available in 2010, Redis scripting would have been JavaScript and not Lua. Lua was chosen based on the implementation requirements, not on the language ones... (small, fast, ANSI-C). I appreciate certain ideas in Lua, and people love it, but I was never able to like Lua, because it departs from a more Algol-like syntax and semantics without good reasons, for my taste. This creates friction for newcom…
Not to mention the 1-based indexing sin. JavaScript has a lot of WTFs but they got that right at least.