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)
The Verse Programming Language [pdf]
161–170 of 387 posts
Re: The Verse Programming Language [pdf]
#162I know people will throw stones, but dynamic-oop-folks likely remember https://en.wikipedia.org/wiki/Croquet_OS
Re: The Verse Programming Language [pdf]
#163Earlier 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)
[(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]
#164Earlier 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.
How ? I can't see anything in here that makes these worlds any easier to drive.
Re: The Verse Programming Language [pdf]
#165Earlier 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.
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]
#166Earlier 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…
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]
#167Every time someone gives a programming language a name that needs disambiguation terms for a decent google search, a puppy dies.
Python
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]
#168Re: The Verse Programming Language [pdf]
#169Off topic but wow cannot believe someone used comic sans.
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]
#170I'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.
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.