Live data from Hacker News

Fabrice Bellard Releases MicroQuickJS

github.com

251–260 of 594 posts

Re: Fabrice Bellard Releases MicroQuickJS

#251

Earlier quoted context omitted.

He already has a JS engine which doesn’t make these restrictions

Yeah QuickJS is great. I bet MQJS will also be very popular. Quite impressive that bro is going to have two JS engines to brag about in addition to a lot of other very useful things!

> Quite impressive...

Yes, quite! Monsieur Bellard is a legend of computer programming. It would be hard to think of another programmer whose body of public work is more impressive than FB.

Unfortunate that he doesn't seem to write publicly about how he thinks about software. I've never seen him as a guest on any podcast either.

I have long wondered who the "Charlie Gordon" who seems to collaborate with him on everything is. Googling the name brings up a young ballet dancer from England, but I doubt that's the person in question.

Re: Fabrice Bellard Releases MicroQuickJS

#252
post #52
post #21

Earlier quoted context omitted.

Between ffmpeg and qemu, I always think of https://xkcd.com/2347/ when I see Fabrice's work. Especially since ffmpeg provides the backbone of almost all video streaming systems today.

Except that ffmpeg and qemu are not maintained by Fabrice. He's one of the greatest programmers but he's not maintaining the internet.

I suppose that if he were to maintain any of these projects, we would never see the new frontiers he has been conquering.

Re: Fabrice Bellard Releases MicroQuickJS

#253

If 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…

Redis' author also made jimtcl, so I don't think the lack of a small engine was the gap

Re: Fabrice Bellard Releases MicroQuickJS

#254

> It compiles and runs Javascript programs with as low as 10 kB of RAM. Just in time for RAM to become super expensive. How easy would it be to shove this into Chromium and Electron?

Hard because of web compatibility.

The good news is that it would probably not matter much for chromium's memory footprint anyway...

Re: Fabrice Bellard Releases MicroQuickJS

#255

If 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…

Redis' author also made jimtcl, so I don't think the lack of a small engine was the gap

You're replying to Redis' author.

Re: Fabrice Bellard Releases MicroQuickJS

#256
post #157

If 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…

> it feels like it departs from what people know without good reasons. 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 i…

Pascal and Ada are Algol syntaxed relative to most languages.

Re: Fabrice Bellard Releases MicroQuickJS

#257
post #136

Earlier quoted context omitted.

Offtopic but I went to your website and saw that you created hackernews-mute and recently I was commenting about how one must have created such an extension and ranted about it. So kudos for you to have created it earlier on. Maybe we HN users have minds in sync :) https://news.ycombinator.com/item?id=46359396#46359695 Have a nice day! Awesome stuff, would keep an eye on your blog, Does your blog/website use mataroa…

I have something like that but as a userscript and with a toggle, it works pretty well for my needs. Maybe someone finds it useful: https://paste.ubuntu.com/p/rD6Dz7hN2V/

Awesome stuff :D

Thanks for sharing it.

Re: Fabrice Bellard Releases MicroQuickJS

#258
post #168

Earlier quoted context omitted.

Out of interest, was Tcl considered? It's the original embeddable language.

Wasn't the original Redis prototype written in Tcl?

Yes, previously: https://news.ycombinator.com/item?id=35989909

The Redis test suite is still written in Tcl: https://news.ycombinator.com/item?id=9963162 (although more recently antirez said somewhere he wished he'd written it in C for speed)

Re: Fabrice Bellard Releases MicroQuickJS

#259
post #197

Earlier quoted context omitted.

Not to mention the 1-based indexing sin. JavaScript has a lot of WTFs but they got that right at least.

This indeed is not Algol (or rather C) heritage, but Fortran heritage, not memory offsets but indices in mathematical formulae. This is why R and Julia also have 1-based indexing.

Pascal. Modula-2. BASIC. Hell, Logo.

Lately, yes, Julia and R.

Lots of systems I grew up with were 1-indexed and there's nothing wrong with it. In the context of history, C is the anomaly.

I learned the Wirth languages first (and then later did a lot of programming in MOO, a prototype OO 1-indexed scripting language). Because of that early experience I still slip up and make off by 1 errors occasionally w/ 0 indexed languages.

(Actually both Modula-2 and Ada aren't strictly 1 indexed since you can redefine the indexing range.)

It's funny how orthodoxies grow.

Re: Fabrice Bellard Releases MicroQuickJS

#260

Earlier quoted context omitted.

Huh. I always thought that JS objects supported string and number keys separately, like lua. Nope! [Documents]$ cat test.js let testArray = []; testArray[0] = "foo"; testArray["0"] = "bar"; console.log(testArray[0]); console.log(testArray["0"]); [Documents]$ jsc test.js bar bar [Documents]$

They do, but strings that are numbers will be reinterpreted as numbers. [edit] let testArray = []; testArray[0] = "foo"; testArray["0"] = "bar"; testArray["00"] = "baz"; console.log(testArray[0]); console.log(testArray["0"]); console.log(testArray["00"]);

That example only shows the opposite of what it sounds like you’re saying, although you could be getting at a few different true things. Anyway:

- Every property access in JavaScript is semantically coerced to a string (or a symbol, as of ES6). All property keys are semantically either strings or symbols.

- Property names that are the ToString() of a 31-bit unsigned integer are considered indexes for the purposes of the following two behaviours:

- For arrays, indexes are the elements of the array. They’re the properties that can affect its `length` and are acted on by array methods.

- Indexes are ordered in numeric order before other properties. Other properties are in creation order. (In some even nicher cases, property order is implementation-defined.)

  { let a = {}; a['1'] = 5; a['0'] = 6; Object.keys(a) }
  // ['0', '1']

  { let a = {}; a['1'] = 5; a['00'] = 6; Object.keys(a) }
  // ['1', '00']
Post reply on HN