Live data from Hacker News

The Verse Programming Language [pdf]

simon.peytonjones.org

231–240 of 387 posts

Re: The Verse Programming Language [pdf]

#231

Some of this reminds of me a combination Icon and Mozart. (And happened to just come across my old Icon book a few days ago.) Maybe the backtracking concepts are "too built in?" - e.g., (1|2) is not a first-class/reified "amb" object, right? - so if I want to introduce a different search than depth-first backtracking (breadth, dependency-directed), etc., I couldn't directly. Seems like there could be some confusion b…

I was wondering if they are planning to use some datalog-style compilation strategy, where all choices are dumped into b-trees and nesting is replaced by indexed tables which are joined.

But I think mixing this with unification vars is sort of an open research problem?

Plus Haskell had a `data-parallel` mode which used a similar compilation strategy. It was dropped for being very complex and having virtually no users. Plus using too much broadcasting and compiling higher order functions into vectorized code had a serious performance tax.

Re: The Verse Programming Language [pdf]

#232

Earlier quoted context omitted.

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

Correct, but "non-determinism" is a misnomer used in programming language theory to refer to generators and pervasive backtracking. Prolog, Icon, jq, etc. -- all fully deterministic, but known as non-deterministic owing to the pervasive generators and backtracking.

It is not a misnomer. You can use generators and backtracking to simulate non determinism. That means the simulator plus non deterministic algorithm are deterministic but the algorithm is not.

Re: The Verse Programming Language [pdf]

#233
Very intriguing! Is there an explanation anywhere of how this is different from Prolog? It seems like almost the same thing. That is not a criticism BTW, I love Prolog. From what I can tell the main difference is it has functions with return values. It also looks like it has different semantics for the choice points, letting you nest alternatives in arguments and other expressions. I do like how choice points are seen as a more natural building block in the language vs. the 'magical' bagof in Prolog. For games, having real indexable arrays will be nice as well.

   % Verse:
 x:=(1|7|2); x+1
   % Prolog:
 foo(X, Y) :- (X = 1 ; X = 7 ; X = 2), Y is X + 1.
I think it might be nice to implement this language using Prolog. For example I think you could do the type definitions like this (let's ignore how :/2 is usually for module qualification):

  X:int :- freeze(X, integer(X)).
Kind of off-topic but I've always been curious why variable attributes aren't generally used for type-checking like this in Prolog.

Anyway, very cool. I'll be keeping an eye on it. Is Epic Games hiring logic programmers? :)

Re: The Verse Programming Language [pdf]

#234

Earlier quoted context omitted.

It's just because SPJ likes it. He uses it for presentations a lot.

> This is a very funny question, "Why use Comic Sans?" So, all my talks use Comic Sans and I frequently see remarks like 'Simon Peyton-Jones, great talk about Haskell but why did he use Comic Sans?' but nobody's ever been able to tell me what is wrong with it. It's a nice legible font, I like it. So until somebody explains to me ... Ah, I understand that it's meant to be a bit naff, but I don't care about naff stuff,…

He is asking for reasoning when he doesn't provide any, so his use of it is just idiosyncratic and stubborn. It is a noisy language that is hard to read in bulk and takes up a lot of space. It was invented for what was basically a computer game for kids, so why does he insist on using it for presenting technical material? Using fonts beyond their originally designed purpose with no reason is asinine and actually fashion, despite him thinking otherwise.

Re: The Verse Programming Language [pdf]

#235
post #26

This looks incredibly ambitious: - There are no booleans in the language! Conditionals can still succeed or fail, but failure is defined as returning zero values and success is defined as returning one or more values. - Verse uses a so-called 'lenient' evaluation strategy which is neither strict nor lazy, but somewhere in-between ("Everything is eventually evaluated, but only when it is ready") - an expression does n…

There's really not much new here. All these ideas have been used in other languages previously, but perhaps not in exactly this cocktail. I'm decidedly in the not convinced camp.

I am not convinced because far more pressing aspects have been ignored. One million programmers means program structure is more important than the syntax used to write the algorithms.

Does the language address common pain points like modifying data structures? Does it make it easy to extend existing code even without having the ability to change it?

Re: The Verse Programming Language [pdf]

#236
post #224
post #217

Earlier quoted context omitted.

> I honestly fail to see what properties of the language has anything to do with the metaverse, or millions of devs, etc... They're pushing transactions straight from the beginning, which I think is the sanest way for multiple actors to all try to interact with the same world. And for the compiler to stay sane in dealing with transactions, it's necessary to mark effects, which is also in the slides. The inclusion of…

What are transactions in this context? Message passing?

And entity updates, I presume.

Re: The Verse Programming Language [pdf]

#237
post #45
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'll be the first to hate on C++, but the only reason C++ might be considered a "don't learn it as a first language" language, is because it's huge. It's got 40 years worth of baggage, and it's "standard" libraries are an absolute mess. Javascript has a super simple syntax, and it's standard libraries though sometimes a bit idiosyncratic are comparatively clean and pragmatic. If you just removed like 90% of C++'s use…

I mean, C++ was my first language and I turned out fine (I think).

Re: The Verse Programming Language [pdf]

#238

Earlier quoted context omitted.

> - There are no booleans in the language! Conditionals can still succeed or fail, but failure is defined as returning zero values and success is defined as returning one or more values. This is similar to how Icon works: https://en.m.wikipedia.org/wiki/Icon_(programming_language)

Yes, I noticed that, too. I used Icon to process a big pile of code at Apple in the late 80s and found it pleasant to work with.

I wish I could upvote comments more than once on HN :-)

Re: The Verse Programming Language [pdf]

#239
post #152

Earlier quoted context omitted.

> 90% of C++'s useless standard library, The Python library is even larger and doesn't seem to be a barrier. If you know `std::vector`, ` > C++ would also not have been deprecated by Rust. That's an overstatement, to say the least.

I don't think it is an overstatement to say that that imaginary world C++ would have been deprecated by Rust. C++ complexity is also its strength. Highly backward compatible, even with C, and multiparadigm. It has classes, but you don't have to use them, it has exceptions, but you don't have to use them, it has templates, lambdas, smart pointers,... and again, you don't have to use them, but they are here if you need…

I read the exact opposite. He's implying that real C++ has been depreciated by Rust, but that wouldn't be the case with imaginary-world C++.

(Rust has not replaced C++ in the real world. Not even close.)

Re: The Verse Programming Language [pdf]

#240
post #215

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…

> Boolean values are inherently a sign of an insufficient data model. Booleans carry no inherent meaning. Would you say the same about Ints or Strings?

They're saying you should be able to define your own

The domain of int/str is infinite so there's less sense in redefining a number system for every property you want to model

For small finite domains it makes sense to define your own in terms of the problem domain

In this sense all two-valued types are bools

Post reply on HN