Live data from Hacker News

Fabrice Bellard Releases MicroQuickJS

github.com

451–460 of 594 posts

Re: Fabrice Bellard Releases MicroQuickJS

#451

Earlier quoted context omitted.

Thank you for sharing. A lot of HN people got cut by AI in one way or another, so they seem to have personal beefs with AI. I am talking about not only job shortages but also general humbling of the bloated egos.

I'm constanly encountering this "bloated ego" argument every time the narrative is being steered away to prevent monetary losses for AI companies. Especially so when it concerns AI theft of human music and visual art. "Those pompous artists, who do they think they are? We'll rob them of their egos ". The problem is that these ego-accusations don't quite come from egoless entities.

It is not about artists per ce, it is about manipulative entities. For any manipulation to succeed, one has to create a fog, disorientation, muddy waters.

AI brings clarity. This results in a lot of pain for those who tried to hijack the game in one way or another.

From the psychological point of view, AI is a mirror of one's personality. Depending on who you are, you see different reflections: someone sees a threat, others see the enlightenment.

Re: Fabrice Bellard Releases MicroQuickJS

#452
post #67
post #17

Clarification added later : One of my key interests at the moment is finding ways to run untrusted code from users (or generated by LLMs) in a robust sandbox from a Python application. MicroQuickJS looked like a very strong contender on that front, so I fired up Claude Code to try that out and build some prototypes. I had Claude Code for web figure out how to run this in a bunch of different ways this morning - I hav…

Down to -4. Is this generic LLM-dislike, or a reaction to perceived over-self-promotion, or something else? No matter how much you hate LLM stuff I think it's useful to know that there's a working proof of concept of this library compiled to WASM and working as a Python library. I didn't plan to share this on HN but then MicroQuickJS showed up on the homepage so I figured people might find it useful. (If I hadn't dis…

I appreciated it. I have no idea why someone would downvote it other than spite

Re: Fabrice Bellard Releases MicroQuickJS

#453

>> Arrays cannot have holes. Writing an element after the end is not allowed: a = [] a[0] = 1; // OK to extend the array length a[10] = 2; // TypeError If you need an array like object with holes, use a normal object instead Guess I'm a bit fuzzy on this, I wouldn't use numeric keys to populate a "sparse array", but why would it be a problem to just treat it as an iterable with missing values undefined? Something to…

Guidance towards correct usage: eg. If you allow `a[10] = 2` and just make the Array dense, the user might not even realise the difference and will assume it's sparse. Next they perform `a[2636173747] = 3` and clog up the entire VM memory or just plain crash it from OOM. Since it's likely that the small indexes appear in testing and the large indexes appear in production, it is better to make the misunderstanding an explicit error and move it "leftwards" in time, so that it doesn't crash production at an inopportune moment.

Re: Fabrice Bellard Releases MicroQuickJS

#454
As a fellow (but way junior) JavaScript engine developer I'm really happy to see the stricter mode, and especially Arrays being dense while Objects don't treat indexed properties specially at all: it is my opinion that this is where we should drive JavaScript towards, slow and careful though it may be.

In my engine Arrays are always dense from a memory perspective and Objects don't special case indexes, so we're on the same page in that sense. I haven't gotten around to creating the "no holes" version of Array semantics yet, and now that we have an existing version of it I believe I'll fully copy out Bellard's semantics: I personally mildly disagree with throwing errors on over-indexing since it doesn't align with TypedArrays, but I'd rather copy an existing semantic than make a nearly identical but slightly different semantic of my own.

Re: Fabrice Bellard Releases MicroQuickJS

#455

Earlier quoted context omitted.

I was hoping you experimented with this! I am right there with you, hoping for an easier wasm sandbox for LLMs. (Keep posting please. Downvotes due to mentioning LLMs will be perceived as a quaint historic artifact in the not so distant future…)

On the contrary, it's pretty possible that LLMs themselves will be perceied as a quaint historic artefact and join the ranks of mechanical turks, zeppelins, segways, google glasses and blockchains.

That is extremely unlikely.

Re: Fabrice Bellard Releases MicroQuickJS

#457
post #393

Earlier quoted context omitted.

I think he’s saying it’s a fundamentally improved language at this point?

Not OP, but the case can be made that it's still the same very ugly language of 10 years ago, with few layers of sugar coating on top. The ugly hasn't gone anywhere. You still have to deal with it and suffer the cognitive burden.

> Not OP, but the case can be made that it's still the same very ugly language of 10 years ago, with few layers of sugar coating on top.

Let's talk specifics. As it seems you have strong opinions, in your opinion what is the single worst aspect of JavaScript that justifies the use of the word "ugly"?

Re: Fabrice Bellard Releases MicroQuickJS

#459

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…

I’m always surprised people pick Lua when Pawn exists. I think I’d even still choose it over MicroQuickJS

https://www.compuphase.com/pawn/pawn.htm

Re: Fabrice Bellard Releases MicroQuickJS

#460
post #317

Earlier quoted context omitted.

GP is the creator of Redis. I would imagine he knows Lua well given that Redis has embedded it for around a decade.

In that case, my point about Garry not liking Lua despite choosing it for Garrysmod, for seemingly the same reason as antirez is very appropriate. I haven't read antirez'/redis' opinions about Lua, so I'm just going off of his post. In contrast I do know more about what Garry's opinion on Lua is as I've read his thoughts on it over many years. It ultimately boils down to what antirez said. He just doesn't like it, it…

If I am remembering correctly, there was a moment where Garry was seriously considering using Squirrel instead of Lua. I think he experimented with JavaScript too.

I’m not sure it’s still the case but he modified Lua to be zero indexed and some other tweaks because they annoyed him so much, so it’s possible if you learned GMod Lua you learned Garry’s Lua.

Of course his heart has been with C# for many years now.

Post reply on HN