Live data from Hacker News

The Verse Programming Language [pdf]

simon.peytonjones.org

351–360 of 387 posts

Re: The Verse Programming Language [pdf]

#352
post #336
post #288

Earlier quoted context omitted.

As far as I can tell, from an admittedly short amount of searching and research, is that type classes in Haskell were influenced by Standard ML: https://people.csail.mit.edu/dnj/teaching/6898/papers/wadler... > This paper presents type classes, a new approach to ad-hoc polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the "eqtype variables" of Standard ML. Ty…

Phil Wadler, the first author of the paper you cite, was literally a principal designer of Haskell. SML does not have type classes; your quote points out a deficiency in SML that motivates type classes. My understanding is that "trait" is an unfortunately overloaded term. Traits in Rust are much more closely related to Haskell's type classes than to traits in the OOP sense.

> Phil Wadler, the first author of the paper you cite, was literally a principal designer of Haskell.

Yes, I know that. That's the point.

> SML does not have type classes; your quote points out a deficiency in SML that motivates type classes.

Again, that's the point. It's what "have an influence" means in that it was SML that influenced or inspired Haskell's type classes. And it's part of my overall point of SML being rather influential, although quietly.

> Traits in Rust are much more closely related to Haskell's type classes than to traits in the OOP sense.

I'm not so sure about that from what I have read. But I don't have enough information other than to just point to things I have read.

https://stackoverflow.com/questions/28123453/what-is-the-dif...

While I can't find any concrete information, I would be quite surprised if Rust's traits were influenced by type classes rather than the more OOP interpretation of traits (in the design space of traits vs mixins vs interfaces).

https://doc.rust-lang.org/book/ch17-01-what-is-oo.html

Re: The Verse Programming Language [pdf]

#353

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…

It has always been interesting to me that Carmack gets all the intention because he likes talking about himself so much, while Sweeney rather quietly toils away and is a multi-billionaire. Just reading more about him now, I'm happy to see that he is also a major conservationist.

Re: The Verse Programming Language [pdf]

#354

Earlier quoted context omitted.

Confusion between '=' and '==' is a typical pain point that beginners have when learning to program. Plus it is super at odds with the notation we all learn in math. ':=' is didactically better because it shows that assignment has an direction. It also leaves '=' for actual equality.

Big fan of <- for assignment for this reason.

F#!

Re: The Verse Programming Language [pdf]

#355
post #283

Earlier quoted context omitted.

https://nitter.lacontrevoie.fr/pic/orig/media%2FEpeZMhDUwAAY... The screenshot says "BoxFight.verse". Either Unreal has two separate new programming languages both called Verse, or you're plain wrong.

I don't know why I bother, but: The screenshot you linked to shows boolean variables being defined ("bool") while the new SPJ language being discussed here very conspicuously lacks a boolean type. That fact alone is enough to convince me that there is an "old", less cool, less ambitious Verse language, with different syntax etc. which is about to be replaced by (or as Tim says in tweet, get "converged with") the new…

https://twitter.com/TimSweeneyEpic/status/160218212070891520...

> We're more than a year away from an open source implementation that's converged with what's in Fortnite. In 2023 we'll be giving lots of talks and likely releasing some of the research pieces.

Re: The Verse Programming Language [pdf]

#356
post #307

Earlier quoted context omitted.

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.

It is hard to know what you are talking about. It applies linear operators to an input sequence, defaulting to + and x, or whatever you specify. It is like inner_product, but sequence order is not specified. There is a "range" version in C++20 that in use looks more like in other languages. (It is technically C++23, but appears in libraries shipped with C++20.)

It seems like a small thing, but everything about it is just slightly wrong. That it's called `transform_reduce` and not just `reduce`. The fact that it was in C++17 alongside a function called `reduce` that's basically useless. Why was it not in C++14? Why was it not in C++11? Why was it not in C++03?

That in 2017 the C++ standard committee was still introducing misdesigned cruft like std::reduce to the language says everything you need to be about C++, it's a clusterfuck.

Re: The Verse Programming Language [pdf]

#357
post #8

I'm not sure about the "learn it as a first language" bit. x:=(1|2); y:=(7|8); (x,y) This stuff just doesn't seem intuitive to me. It's not verbose enough to be obvious to someone who doesn't know what's going on. Looks interesting though; that's a really bright group of people. Be curious to see where their project ends up.

I'm not sure about the "learn it as a first language" bit.

My university taught Haskell as its intro language to math and science students, and the people who had the most problems where those who already knew a bit of programming. People for whom Haskell genuinely was their first introduction to a programming language on the whole had no problem getting it. I imagine this might be the same.

The main downside with the approach was that when these people who had just learnt Haskell moved on to the next programming course, that was taught using Java, they had a really hard time understanding what was going on.

Re: The Verse Programming Language [pdf]

#358
post #280

Earlier quoted context omitted.

It's definitely the most influential of the statically typed functional languages. All other statically typed functional languages or libraries inherit a lot from Haskell implementations, type system and type class concepts.

What modern language in use today was influenced by Haskell other than maybe Idris? (To be clear, I am mot necessarily down on Haskell or what part it has played. It’s just that many languages seem to be stealing ideas from the languages I’ve listed more than Haskell, which was the criteria I had in mind.)

I'm pretty sure Haskell is the reason why True and False are capitalized in Python.

Re: The Verse Programming Language [pdf]

#359
post #313

Earlier quoted context omitted.

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

Why is symmetry in word length needed?

Alignment.

    x = fst(some complex expression)
    y = snd(some complex expression)

Re: The Verse Programming Language [pdf]

#360

Earlier quoted context omitted.

Python's standard library includes many modules for specialised applications and yet it's surprisingly lacking in fundamental data structures and algorithms. Personally I think that's the wrong way round. Simple things like building dicts from different data structures or working with optional values that can be something or None just aren't there and you always seem to end up with some kind of utils.py full of hand-…

That example is not how C++ is used. It would not pass code review.

Why is code that wouldn't pass code review part of the language documentation?
Post reply on HN