Live data from Hacker News

The Verse Programming Language [pdf]

simon.peytonjones.org

301–310 of 387 posts

Re: The Verse Programming Language [pdf]

#301
post #294

Earlier quoted context omitted.

> These slides need a lot of work. I'll read the paper later, but the slides really lack context and motivation. SPJ is an exceptional public speaker, but that involves a lot of talking, a lot of context, audience participation, and a lot of wild gesticulating at slides. I'm not sure if this talk was recorded, but I am sure if it was the recording will be much better than the slides, the slides are not really designe…

Looks like it just went online: https://youtu.be/832JF1o7Ck8

Thanks for the heads up. Just watched it, and the talk gives no additional details to the metaverse context or purpose of the language. Also, he uses a ton of filler words, and I find it pretty hard to listen to at times.

Re: The Verse Programming Language [pdf]

#302
post #225

Earlier quoted context omitted.

I know supposedly "harder to learn" languages (i.e., functional languages), but my god does that example and C++ look impenetrable.

That is not idiomatic C++. The author is showing off esoterica.

It's not? This is literally the function that I found I should use when I wanted to fold over a list I had. What would you recommend I use?

Re: The Verse Programming Language [pdf]

#303
post #218

These slides need a lot of work. I'll read the paper later, but the slides really lack context and motivation. * I'm a little disheartened to see "Objectively: no. All languages are Turing-complete" in the context of the question of needing another language. It's a throw away comment and largely irrelevant when considering the actual use of programming languages. If one has to state this platitude, it is more accurat…

`fst` and `snd` possess a symmetry which `first` / `second` lack

Personally I've got used to them like in no time

Re: The Verse Programming Language [pdf]

#304
post #302

Earlier quoted context omitted.

That is not idiomatic C++. The author is showing off esoterica.

It's not? This is literally the function that I found I should use when I wanted to fold over a list I had. What would you recommend I use?

The library function is fine, although the long name is unfortunate. The apparatus around applying it, in the example, is aggressively weird.

Re: The Verse Programming Language [pdf]

#305
post #282

Earlier quoted context omitted.

If you rename `fst` to `first`, then `snd` becomes `second`, which is much much (much!) longer.

Why does that matter though? No writer does this. Why are programmers obsessed with word length to such a degree?

Writers do something different from programmers. What programmers do is often more akin to mathematics, especially the type of stuff language creators do. And mathematical notation likes to be short.

Re: The Verse Programming Language [pdf]

#306

Earlier quoted context omitted.

Boolean values are inherently a sign of an insufficient data model. Booleans carry no inherent meaning. They don't tell you where they came from or provide any context about what operations or data they are guarding. If your language lets you declare your own algebraic data types, there's no need to lean on a built-in Boolean type. You can create types that actually carry all the information you need so that pattern…

Pattern matching is just syntatic sugar over using booleans and extracting values from data types. This is an exaggerated problem with a cherry picked solution. See what happens when the condition is if a number > 100. Are you expected to convert the integer into a church encoded integer and then write 100 S types? Are you expected to adopt a language with refined or dependent types? Adding a ton of abstractions to f…

Why do you care if a number is greater than 100? That has to actually mean something to you. What does it actually mean? Is it a validation error? Is it a warning trigger? Why not have a data type that actually expresses that meaning?

Wait, are you hung up on implementation nonsense? Sure, there's a low-level operation that returns a 0 or 1 that you convert into your actually-meaningful data type. But that doesn't need to have a surface language boolean type that's privileged by the language design. And that's what's important here - language design. People write programs in a language, not compiled code. The model the language provides is of critical importance. It's how the users of the language think and how they communicate with each other.

And this isn't abstraction. Boolean is the abstraction. It throws away all but a single bit of information. This is creating data types with semantics that carry far more than that single bit. It's making your code less abstract.

Re: The Verse Programming Language [pdf]

#307
post #302

Earlier quoted context omitted.

It's not? This is literally the function that I found I should use when I wanted to fold over a list I had. What would you recommend I use?

The library function is fine, although the long name is unfortunate. The apparatus around applying it, in the example, is aggressively weird.

I agree that the example is crazy. But the function is not fine, it's a testament to how unhinged the C++ standards committee is. Its existence is proof that the problems of C++ are not just with its history, but that it is an ongoing snowball of incompetence and bad decisions.

Re: The Verse Programming Language [pdf]

#308
Its always amazing to see Tim Sweeney's name attached to things. The first game I played of his was ZZT around ~1992. It was a basic but super cool game that featured a basic level editor!! The idea of creating levels for a game was still very novel and very exciting for 8 year old me. I would draw out levels at school and try to create them at home (with mixed success).

It's 2022 and he's still very very relevant in the gaming world. He still runs Epic, he's still publishing papers on gaming. I don't think any of the other folks from that early era of PC gaming are still relevant in the field (Carmack moved on to VR and now AGI).

Re: The Verse Programming Language [pdf]

#309
post #218

These slides need a lot of work. I'll read the paper later, but the slides really lack context and motivation. * I'm a little disheartened to see "Objectively: no. All languages are Turing-complete" in the context of the question of needing another language. It's a throw away comment and largely irrelevant when considering the actual use of programming languages. If one has to state this platitude, it is more accurat…

`fst` and `snd` possess a symmetry which `first` / `second` lack Personally I've got used to them like in no time

I still hate them after 5 years of professional PureScript.

Re: The Verse Programming Language [pdf]

#310

Earlier quoted context omitted.

You can think of the choice ( | ) as a generator function. X generates 1 then 2. Y generates 7 then 8. For x in [1,2]: For y in [7,8]: yield (x, y)

You could also write the example as a list comprehension, which essentially mimics set-builder notation in math, i.e. "The set of all pairs such that ..." [(x, y) for x in [1, 2] for y in [7, 8]] // Python (list comprehension) {(x, y) | x \in {1, 2}, y \in {7, 8}} // math (set-builder notation)

See, the Python code has some hints as to what's going on. If you know that x is a variable, 'for x in' spells it out to some degree. Maybe you don't nail the exact functionality just from looking, but it feels more accessible.
Post reply on HN