Live data from Hacker News

Should JavaScript be split into two languages?

devclass.com

271–280 of 324 posts

Re: Should JavaScript be split into two languages?

#271
post #258

Earlier quoted context omitted.

What percentage of programmers on Hacker News haven't? Flaunting your ignorant anti-intellectualism isn't a good look. You do know this is 2024, you have Internet access, and you can just look shit up or ask ChatGPT to learn new things, instead of cultivating ignorance and pointlessly criticising programmers trying to raise awareness, share their experiences, and educate themselves and other people. In case you've be…

My point is that if someone says something is arcane, “it’s not, it’s just [something that you’ve potentially never heard of and almost definitely don’t understand even if you have heard of it]” doesn’t help your case. They could look it up, but the fact that they would have to do so proves the commenter’s point - relatively few programmers understand Lisp syntax, i.e. it is arcane. If you’re trying to raise awarenes…

Exactly.

I, like most devs, know what Lisp is.

I, like most devs, just don't care.

Re: Should JavaScript be split into two languages?

#272

"ECMA TC39", not "Emca TC39". Also, looks like a bad markup link for TC39. Also note that it's either "co-authored by Mozilla, Apple, Moddable and Sony" or "authored by Guo along with others from Mozilla, Apple, Moddable and Sony", but directly related to that statement, that makes this "not a Google proposal" but clearly an "industry proposal" if it has Mozilla and Apple buy-in. Also, "the proposed solution is not t…

> ECMA not Ecma Incorrect: https://ecma-international.org/about-ecma/history/

Cool: my comment is about them spelling it wrong, writing it as "emca".

Re: Should JavaScript be split into two languages?

#273
post #262

Earlier quoted context omitted.

Its web targeted version is still not accessible, even though they promised that they will actually render to HTML elements as much as possible. A single canvas element is not that.

If you're not going to read the documentation, read a blog post: https://medium.com/flutter/accessibility-in-flutter-on-the-w...

From your own article:

> The Flutter team would like to eventually turn the semantics on by default in Flutter Web. However, at the moment, this would lead to noticeable performance costs in a significant number of cases, and requires some optimization before the default can be changed

Re: Should JavaScript be split into two languages?

#274
post #273

Earlier quoted context omitted.

If you're not going to read the documentation, read a blog post: https://medium.com/flutter/accessibility-in-flutter-on-the-w...

From your own article: > The Flutter team would like to eventually turn the semantics on by default in Flutter Web. However, at the moment, this would lead to noticeable performance costs in a significant number of cases, and requires some optimization before the default can be changed

Ah, so you admit it does indeed include accessibility but now what you're complaining about is performance. Not that you've actually tried it of course.

But good. That's a kind of progress.

Re: Should JavaScript be split into two languages?

#275
post #271
post #258

Earlier quoted context omitted.

My point is that if someone says something is arcane, “it’s not, it’s just [something that you’ve potentially never heard of and almost definitely don’t understand even if you have heard of it]” doesn’t help your case. They could look it up, but the fact that they would have to do so proves the commenter’s point - relatively few programmers understand Lisp syntax, i.e. it is arcane. If you’re trying to raise awarenes…

Exactly. I, like most devs, know what Lisp is. I, like most devs, just don't care.

[flagged]

Re: Should JavaScript be split into two languages?

#276
post #200

Earlier quoted context omitted.

> Thanks for your simple concrete examples and explanations! I'm glad someone liked it :-) > I love his description of Forth as "a weird backwards lisp with no parentheses" I've been interested in that duality between Forth and Lisp before, but my progression always seems to following this path: - Since Forth is just Lisp done backwards and without parens, and since it's not hard to write an sexpr parser, I might as…

PostScript is kind of like a cross between Forth and Lisp, but a lot more like Lisp actually. And its data structures, which also represent its code, are essentially s-expressions or JSON (polymorphic dicts, arrays, numbers, booleans, nulls, strings, names (interned strings), operators (internal primitives), etc.) https://donhopkins.medium.com/the-shape-of-psiber-space-octo... Not coincidentally, James Gosling design…

Yeah, I've never used Postscript except as a document format created by LaTeX :-)

There was a language called "V" a while back, different than a more recent language called V. It was basically a Forth where quoting was done with square brackets. This replaced the colon-semi notation for defining words, and it was also nice for nested data structures. This language seems to have fallen off the web though.

You mentioned FExprs. I never looked at Mock Lisp, and it sounds like Gosling doesn't think I should! However, I'm sure you're aware of Kernel. I think of Scheme as the "prettiest programming language I don't want to use", and I think the vau stuff in Kernel makes it even prettier. (But I still don't want to use it.)

For homoiconicity, I've also considered something like Tcl or Rebol/Red. The latter two blur the lines between lexer and parser in a way that I'd like to learn more about.

But really, I always come back to wanting static typing. Both for compile time error checking, and to give the compiler a leg up in runtime performance. Instead of using separate declarations like you see in Typed Racket and some others, I wonder if a Lisp with the addition of one "colon operator" to build typed-pairs would do it. Just one step down the slippery slope of infix syntax sugar. In the context of WebAssembly, something like this:

    (import (foo a:i32 b:f64):())
    (export (bar x:i64 y:f32):(i32 i32)
        (code goes here)
    )
Using colons to specify the types of the parameters and return result(s). It'd also be nice to have colon pairs like this for key:value in hash tables, or as cond:code in switch/conditional constructs.

Re: Should JavaScript be split into two languages?

#277
post #191

Earlier quoted context omitted.

Are there debuggers that can single step over the transpiled bits so that it feels like the methods are implemented natively? Otherwise, it becomes a mess.

I’m not sure if it exists, but it definitely seems doable (a regular debugger has to map instructions to lines of code). If the browser starts treating JS as assembly, then there would probably be a greater onus for features like this.

That would be nice. Was stepping through some modern react code, and the amount of cruft you see is terrible in the transpiled result.

Re: Should JavaScript be split into two languages?

#278
post #258

Earlier quoted context omitted.

What percentage of programmers on Hacker News haven't? Flaunting your ignorant anti-intellectualism isn't a good look. You do know this is 2024, you have Internet access, and you can just look shit up or ask ChatGPT to learn new things, instead of cultivating ignorance and pointlessly criticising programmers trying to raise awareness, share their experiences, and educate themselves and other people. In case you've be…

My point is that if someone says something is arcane, “it’s not, it’s just [something that you’ve potentially never heard of and almost definitely don’t understand even if you have heard of it]” doesn’t help your case. They could look it up, but the fact that they would have to do so proves the commenter’s point - relatively few programmers understand Lisp syntax, i.e. it is arcane. If you’re trying to raise awarenes…

There's nothing "arcane" about WebAssembly Text format. The fact that you don't recognize it just means you don't know much about WebAssembly, which is fine, but you're whining, lashing out, and attacking people who are trying to explain it, and trying to police and derail discussions between other people who are more knowledgeable and interested in it, which makes you a rude anti-intellectual asshole.

Why don't you just go away and let other people have their interesting discussions without you, instead of bitterly complaining about things you purposefully know nothing about and refuse to learn? How does it hurt your delicate feelings to just shut up and not bitch and whine about discussions you're not interested in?

Re: Should JavaScript be split into two languages?

#279
post #270

Earlier quoted context omitted.

What percentage of programmers on Hacker News haven't? Flaunting your ignorant anti-intellectualism isn't a good look. You do know this is 2024, you have Internet access, and you can just look shit up or ask ChatGPT to learn new things, instead of cultivating ignorance and pointlessly criticising programmers trying to raise awareness, share their experiences, and educate themselves and other people. In case you've be…

Most devs do know what Lisp'ish languages are because you just can't forget how weird a bunch of nested parenthesis look. They just don't care enough to invest time in it because it is niche. And proponents tend to tirelessly spam about it from their ivory towers like it's flawless and everyone who didn't learn it is somehow inferior, somehow justifying personal attacks like yours. Classy as usual.

[flagged]

Re: Should JavaScript be split into two languages?

#280
post #238

Earlier quoted context omitted.

I think I can summarize your point of view as, "any use of floats should be treated as undefined behavior, so you get what you deserve." And that says nothing about whether implicit conversions are a good idea or not.

The specific type of conversion is one I don't see as a big issue. The programmer deliberately decided to use an imprecise data type for the calculation. But more importantly, I'm saying that the problematic rounding can occur even if your tower does not have both bigint and float. It can happen even if every layer can completely represent every value of the layer above it. Do you have any complaints that are unique…

From a distance, I kind of like Scheme, so I went and re-read the R5RS section on the topic. To me, the numeric tower (generalized) says:

   N 
That's a nice statement about idealized sets of numeric values. So `integer?` implies `rational?` implies `real?` implies `complex?` implies `number?` in Scheme predicates and type conversions.

But no programming language can have "Reals" (they aren't computable), so floats are a common/useful approximation. And in actuality `bigint?` doesn't imply `floating?`, and `floating?` doesn't imply `bigint?`. Neither is a strict subset of the other, and because of this you can easily find examples where implicit conversion does something "questionable". You've made it about rounding errors, but I'm trying to criticize something about pretending they are subtypes/subsets. Claiming it's a tower and hand waving about exact/inexact doesn't make it a tower, and so I think implicit conversion for these is a poor choice.

You can have little subset relations for implicit conversions:

    float32?   implies  float64?
    float64?   implies  complex64?
    float32?   implies  complex32?
    complex32? implies  complex64?

    fixint?    implies  bigint?
    fixint?    implies  rational?
    bigint?    implies  rational?
Since this is supposedly in a discussion about JavaScript, maybe even:

    fixint?    implies  float64?
All of those relate true subsets for the collection of values they can represent, but it's not much of a tower. It's more a collection of DAGs.
Post reply on HN