Live data from Hacker News

The Verse Programming Language [pdf]

simon.peytonjones.org

161–170 of 387 posts

Re: The Verse Programming Language [pdf]

#161
post #73

Earlier quoted context omitted.

I get that to some degree, but that code doesn't look like something most people are exposed to, whereas 'x = 10' or something that says 'foreach' seems like it'd make sense with a minimum of explanation to a lot of people. x:=(1|2); y:=(7|8); (x,y) Doesn't look like any math I'm familiar with.

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)

[deleted]

Re: The Verse Programming Language [pdf]

#163
post #73

Earlier quoted context omitted.

I get that to some degree, but that code doesn't look like something most people are exposed to, whereas 'x = 10' or something that says 'foreach' seems like it'd make sense with a minimum of explanation to a lot of people. x:=(1|2); y:=(7|8); (x,y) Doesn't look like any math I'm familiar with.

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)

Re: The Verse Programming Language [pdf]

#164

Earlier quoted context omitted.

ugh, so many downvotes and not a single person to explain why this is "a language for the metaverse" as opposed to being just "a new language"

They are designing and creating Verse to be the scripting language for the Unreal engine, and the game Fortnight. So it is purpose built to drive 3d multiplayer worlds. It will be fun to see how it works out. I think it is cool to see a functional language around a game engine.

> So it is purpose built to drive 3d multiplayer worlds

How ? I can't see anything in here that makes these worlds any easier to drive.

Re: The Verse Programming Language [pdf]

#165
post #159

Earlier quoted context omitted.

Python as a language is smaller even if the library is larger. You can do many many things in Python without needing to know much other than working with dictionaries. In C++, doing a sort or a string search is an ordeal. So much of common programming requires so much cognitive overload. C++ is not an easy language. Not by a long shot.

I absolutely agree, but this comment referred to the library size as a major burden.

Ah fair. Though I do think the issue they meant is perhaps the C++‘s STL is not fleshed out enough to be as ergonomic and useful as Python.

Python’s standard library is not without its faults but I’m always so frustrated that the C++ STL stops just short of providing many things, and when it does, it requires writing out so much verbiage.

Re: The Verse Programming Language [pdf]

#166
post #43

Earlier quoted context omitted.

ugh, so many downvotes and not a single person to explain why this is "a language for the metaverse" as opposed to being just "a new language"

The short answer is Innate parallelism at a far higher degree than most languages. The longer answer is pure functions applied to immutable objects (or objects held in a transition) can be applied in parallel. The language is designed in a way to give you that, in a way where it is by default rather than in special cases. The second part is, it being at a mid point between lazy and not - things will be evaluated as t…

> pure functions applied to immutable objects (or objects held in a transition) can be applied in parallel

I have been writing code like this every day using Scala for years.

With frameworks like ZIO (zio.dev) making this trivial to do.

None of which is faster than if I had wrote that code imperatively using say Java. It is definitely easier and safer to write. But performance is about far more than just optimised threading constructs on top of immutable data structures.

Re: The Verse Programming Language [pdf]

#167
post #55

Every time someone gives a programming language a name that needs disambiguation terms for a decent google search, a puppy dies.

Python

Java, Go, Rust, Perl, Scheme, Swift, Ruby, Lisp, Basic...

But just because they all did it (and most before web searched existed) doesn't mean future languages should.

Re: The Verse Programming Language [pdf]

#169

Off topic but wow cannot believe someone used comic sans.

Semi-hard to read fonts like comic sans has been proven to improve retention in studies.

It’s one of the reasons I like him, zero ego but still a genius. It’s the opposite of McKinsley (zero substance but looks great).

Re: The Verse Programming Language [pdf]

#170
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.

Has it got currying? Partially applied functions passed around in folds and traverses are horribly difficult to read for beginners. Example: an Advent of Code solution posted in r/haskell for Day 10 this year, tell me how long it takes you to understand the function cycleStrengths.

   signalStrength cycle x = cycle \* x

   cycleGaps = [19, 40, 40, 40, 40, 40]

   cycleStrengths = foldr a (const []) cycleGaps . (\x -> (1, x))
     where
       a n r (i, xs) = signalStrength m y : r (m, ys)
         where
           m = i + n
           ys@(y : _) = drop n xs
From: https://www.reddit.com/r/haskell/comments/zhjg8m/advent_of_c...

Personally I love this headscratching stuff, but I would not ever dream of subjecting it upon a beginner programmer.

Post reply on HN