Live data from Hacker News

The Verse Programming Language [pdf]

simon.peytonjones.org

171–180 of 387 posts

Re: The Verse Programming Language [pdf]

#172
post #91

Earlier quoted context omitted.

+1 to this I remember struggling to understand the x = 7 syntax for storing a value in x. My young self was like “so if x is equal to 7, how come we can write x is equal to 8 later? That doesn’t make sense”

A cool thing about this in Erlang (which I think is the same in Prolog) is that the = operator works almost exactly how you would have expected: it binds the value but then it asserts the binding’s equality. So once you’ve established x = 7, x = 8 is actually an error! Because you’re right, it doesn’t make sense that at one point x = 7 and later the same x = 8!

That's what I did in my own language[1], no shadowing allowed.

[1]: https://github.com/mimoo/noname

Re: The Verse Programming Language [pdf]

#173

Earlier quoted context omitted.

But it's very much not non-deterministic. It's a deterministic choice. You can give it an exact semantics.

How? The slide deck calls it a "lenient" evaluation order, and doesn't really say how to make an explicit choice of what cases should be tried first. So it seems to have all the same problems as naïve Prolog.

exact semantics are given here: https://simon.peytonjones.org/assets/pdfs/verse-conf.pdf. runtime efficiency isn't specifically addressed afaict

Re: The Verse Programming Language [pdf]

#174
I like it. The structure of the code you write looks much more similar to what you would write on a piece of paper than Haskell (for instance, getting rid of in, the pulling into scope at the top). Not to mention the primitive version of the language also resembles how you would write in math much better than lambda calculus (which I acknowledge probably was never a goal of lambda calculus).

This doesn't present any examples of something that would be useful in the real world. But come-on, this was presented at a Haskell conference it looks like.

For anybody with an interest in the "mathish" flavor of functional languages, this certainly has a lot of promise as a foundation to build on.

Re: The Verse Programming Language [pdf]

#175
I am a fan of Simon PJ and an avid Haskeller, but very underwhelmed with this presentation. This is a simple rehash of logic programming with some stuff about the metaverse thrown in. I expect more. This is the haskell equivalent of crypto-bro hype.

I am equally surprised by the novelty that some people seem to have when encountering this language. As far as I can tell, nothing of real novelty was added to the corpus of PL knowledge. It's really a straightforwards logic language. These are notoriously hard to program in for one person, especially when things get interesting (i.e. cuts). I can only imagine how awful such a thing will be if multiple people were doing this.

Re: The Verse Programming Language [pdf]

#176

Switching to a new programming language is very time-expensive, so I would really like to know the advantages of this language over C#, Java, Python etc. What is the motivation. Why not use something that exists, maybe Lisp?

Programming can be a hobby and hence time-expensive doesn't mean much. A language doesn't necessarily have to be more productive than other languages from the very start.

Re: The Verse Programming Language [pdf]

#177

Switching to a new programming language is very time-expensive, so I would really like to know the advantages of this language over C#, Java, Python etc. What is the motivation. Why not use something that exists, maybe Lisp?

Tracking of effects would be a big one; compare the number of sandbox escapes in Java to JavaScript to WebAssembly. It's much easier to secure a language without effects, and then slowly add the effects you can sandbox or control than to start with a large effectful language and try and slice bits of it off.

Re: The Verse Programming Language [pdf]

#178

Earlier quoted context omitted.

It can't be either of those, because any given outcome is forcing a single value of y (or any variable in general).

Edit: Ah... I see now. By that logic, how is either (7,7) or (8,8) allowed?

"x:=(y|2); y:=(7|8); (x|y)"

translates (roughly) to:

(x|y) is a cartesian product--the set of all ordered pairs (X,Y) such that X is in x and Y is in Y, in order.

x has 2 elements: X=y and X=2.

y has 2 elements: Y=7 and Y=8.

So the set of all ordered pairs is (X=Y, Y=7), (X=Y, Y=8), (X=2, Y=7), (X=2,Y=8).

Since X=Y in the first two pairs, replace it with the value of Y from that pair: (X=7,Y=7), (X=8,Y=8).

Re: The Verse Programming Language [pdf]

#179
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 might be totally off, as I don't know any vercel. But the declarations look like "x can be 1 or 2, y can be 7 or 8, and let's declare a superposed tuple of these which could be any combination of the values". I don't see the point, but that's what I understand by reading raw syntax.
Post reply on HN