Live data from Hacker News

Fabrice Bellard Releases MicroQuickJS

github.com

441–450 of 594 posts

Re: Fabrice Bellard Releases MicroQuickJS

#443
post #315

Earlier quoted context omitted.

The only thing I dislike about Lua is the 1-indexing. I know they had reasons for it but it always caused issues.

I'm torn on this. Initially I agreed, just because so many other languages do it that way. But if you ignore that and clean slate it, IMO, 1 based makes more sense. I feel like 0 based mainly gained foothold because of C's bastardization of arrays vs pointers and associated tricks. But most other languages don't even support that. You can only see :len(x)-1 so many times before you realize how ridiculous it is.

Python got this right. Zero-based indexing combined with half-open slice notation means as a practical matter you don't see too many -1s in the code. Certainly far fewer than when I wrote a game in Löve for a gamejam, where screen co-ordinates are naturally zero-indexed, which has implications for everything onscreen (tile indices, sprites, ...)

Re: Fabrice Bellard Releases MicroQuickJS

#444
post #149

Earlier quoted context omitted.

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.

> transparent switching between skins (about as easy as changing the tab sizes) One of my pet "not today but some day" project ideas. In my case, I wanted to give Python/Gdscript syntax to any & all the curly languages (a potential boon to all users of non-Anglo keyboard layouts), one by one, via VSCode extension that implements a virtual filesystem over the real one which translates back & forth the syntaxes during…

I want to do the opposite: Give curly braces to all the indentation based languages. Explicit is better than implicit, auto format is better than guessing why some block of code was executed outside my if statement.

Re: Fabrice Bellard Releases MicroQuickJS

#445

Earlier quoted context omitted.

I don't write modern C for daily use, so I can't really say. But I've been re-learning and writing C99 more these days, not professionally but personal use - and I appreciate the smallness of the language. Might even say C peaked at C99. I mean, I'd be crazy to say that C-like languages after C99, like Java, PHP, etc., are all misguided for how unnecessarily big and complex they are. It might be that I'm becoming mor…

C11 adds a couple of nice things like static asserts which I use sometimes to document assumptions I make. They did add some optional sections like bounds checking that seem to have flopped, partly for being optional, partly for being half-baked. Having optional sections in general seems like a bad idea.

The big new thing in C11 was atomics and threading.

Re: Fabrice Bellard Releases MicroQuickJS

#446

Fabrice 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.

And that’s just his open source work.

Re: Fabrice Bellard Releases MicroQuickJS

#447

Earlier quoted context omitted.

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

He totally deserves this ACM award which still waits to be awarded.

Re: Fabrice Bellard Releases MicroQuickJS

#448

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.

There's nothing wrong with 1-based indexing. The only reason it seems wrong to you is because you're familiar with 0-based, not because it's inherently worse.

That's simply untrue. 1-based indexing is inherently worse because it leads to code that is less elegant and harder to understand. And slightly less efficient but that's a minor factor.

Re: Fabrice Bellard Releases MicroQuickJS

#449
post #419
post #263

Earlier quoted context omitted.

> Ruby, which appeared just 2 years later, departs a lot more, arguably without good reasons either? I doubt we ever would have heard about Ruby without it's syntax decisions. From my understanding it's entire raison d'être was readability.

It's essentially Perl for people who don't like punctuation marks.

More like if Smalltalk and Perl had a prettier baby.

Re: Fabrice Bellard Releases MicroQuickJS

#450
post #397

Earlier quoted context omitted.

IDK about C11; but C99 doesn't change a lot compared to ANSI C. You can read The C Programming Language 2nd edition and pick up C99 in a week. It adds boleans, some float/complex math ops, an optional floating point definition and a few more goodies: https://en.wikipedia.org/wiki/C99 C++ by comparison it's a behemoth. If C++ died and, for instance, the FLTK guys rebased their libraries into C (and Boost for instance)…

C++ is a katamari ball of programming trends and half baked ideas. I get why google built golang, as they were already pretty strict about what parts of the c++ sediments you were allowed to use.

Not Google actually, but the same people from C, AWK and Unix (and 9front, which is "Unix 2.0" and it has a simpler C (no POSIX bloat there) and the compilers are basically the philosophy of Golang (cross compile from any to any arch, CSP concurrency...)

Also, the Limbo language it's basically pre-Go.

Post reply on HN