49 ms·
The Verse Programming Language [pdf]
- WillPostForFood 4y agoText from the "10,000 Foot View" slide: -- Verse is a functional logic language (like Curry or Mercury). Verse is a declarative language: a variable names a single value, not a cell whose value changes over time. Verse is lenient but not strict: Like strict:, everything gets evaluated in the end Like lazy: functions can be called before the argument has a value Verse has an unusual static type system: types are firstclass values. Verse has an effect system, rather than using monads.
- mncharity 4y agoI'll add text from the "Take-aways" slide: -- Verse is extremely ambitious Kick functional logic programming out the lab and into the mainstream Stretches from end users to professional developers Transactional memory at scale Very strong stability guarantees A radical new approach to types [me: predicate functions] Verse is open Open spec, open-source compiler, published papers (I hope!) Before long: a conversation to which you can contribute
- deleted 4y ago[deleted]
- baby 4y ago> Types are firstclass values That sounds interesting to me. Part of why I don’t like GADTs in OCaml is that it feels like you’re trying to fit a programming language within the syntax of the type system.
- cryptonector 4y ago> Like strict:, everything gets evaluated in the end > Like lazy: functions can be called before the argument has a value FYI, jq is just like that. In jq in `def f(g): ...;` `g` is a function value that will be applied to some input of `f`'s choice, and `g` is not evaluated unless `f` invokes it. The actual argument to `f` will be an expression which is wrapped in a closure named `g` while `f` is executing. Lazy evaluation really is just hidden closures. Lazy evaluation raises questions like: How obvious shall the syntax make it that you will be passing a closure instead of a value? Closures of dynamic or indefinite extent? Can you choose which? How intrusive in the syntax is that choice? Does the use of lazy vs. strict infect callees? I.e., if I define a function `f` of one argument of type `T`, must it be able to take an argument that is a closure that produces values of type `T`, or must that be declared separately? If the latter, does that mean I end up with two `f`s, one which takes a value of type `T` and one which takes a closure that produces (a) value(s) of type `T`? If so, does that happen automatically or must I request it? If the latter, what is the default, and what happens if some library I want to use one option doesn't provide it? Finding a happy medium with some flavor of lazy evaluation but also which doesn't make it hard to understand the performance considerations of it is just very hard.
- AstixAndBelix 4y agoThe metaverse is a collection of 3D environments just like web2 is collection of documents. A webserver serves document while a metaverse server is basically a multiplayer videogame host. Your browser opens a metaverse site by downloading a game engine and running it through JS and fetches the resources from the server to load the 3D environments. All this to say: what has this functional programming language actually to do with the metaverse?
- AstixAndBelix 4y agough, 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"
- eddsh1994 4y agoI don’t believe the metaverse will be a browser app; even Decentraland now pushes to a download because it has to do so many real-time operations. That said, I’ve worked with a few of the Haskell OG team (not directly SPJ though) and if you bring in a functional language designer to work on a project you can bet it’ll start with a new language (I’ve worked on two domain specific languages due to this). Some of the constraints right now with this sort of program are CPU/GPU bound, so if we they’re building a new I suspect it’s going to focus on concurrency across threads/GPUs to support the high rendering requirements etc and make it easier to work with networking and C/C++ FFI GPU drivers. This is speculation on my part though :)
- WillPostForFood 4y agoThey 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.
- threeseed 4y ago> 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.
- crotho 4y ago
- xwx 4y agoThese look like they might be the slides from SPJ's talk at Haskell eXchange this year. I'm hoping they'll upload a video soon, which'll probably be a lot more fun than slides. They've only got the recording up for one of this year's talks so far. https://skillsmatter.com/conferences/13688-haskell-exchange-2022-online https://skillsmatter.com/conferences/13688-haskell-exchange-...
- smcl 4y agoYeah Simon Peyton-Jones is quite good at talking, these slides are interesting but I think the full video will turn out to be much easier to digest
- 8f2ab37a-ed6c 4y agoIt's riveting to follow the evolution of Tim Sweeney's dream of a more Haskell-like programming language for games since his 2005 talk: https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/sweeny.pdf https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced...
- bibanez 4y agoVery interesting slides. As someone not very acquainted with game programming it helped me better understand the logic behind it. As a sidenote, I found funny his predictions for 2009, because they're not far off from what we currently are aiming for: - 20+ cores - 80+ hardware threads - GPU's with general computing capabilities
- ruuda 4y agoWow, I didn't know he had these ideas for such a long time, thanks for sharing! Now SPJ joining makes a lot more sense to me. Also they both seem to have a preference for using Comic Sans on slides ...
- felixyz 4y agoWhen did the L in FLP enter into the vision? I heard SPJ talk about the project a couple of times in interviews, but don't recall him mentioning anything about Curry or logic programming. I'm thrilled they seem to be taking that path!
- Smaug123 4y agoThis language is cyuuuute! The multi-valuedness making "if (x | y) then…" work is so neat, and having `x : int` be a thing of exactly the same nature as `x = 3` is cool to see; even in a fully dependently-typed language, those things are not of the same kind. This looks super mind-expanding to try out! (My first reaction is some slight aversion to what the "flexible" and "rigid" stuff is doing in the conditional scrutinee body, but maybe that'll feel natural after playing with the formal specification a bit.)
- davidw 4y agoI'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.
- tinco 4y agoI'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 useless standard library, and restricted the syntax to purely what's in Strousup's "Tour of C++" book, then I'm pretty sure that would be a pretty acceptable "learn it as a first language" language. Of course in that imaginary world C++ would also not have been deprecated by Rust.
- sicp-enjoyer 4y ago> 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`, `<<`, and `std::sort` it seems you're set to contribute to most code bases. > C++ would also not have been deprecated by Rust. That's an overstatement, to say the least.
- tinco 4y agoIn Python the standard library is fairly easily traversed and understood and if there's a better way of doing something it's usually linked I think. In C++ we have.. this.. https://en.cppreference.com/w/cpp/algorithm/transform_reduce https://en.cppreference.com/w/cpp/algorithm/transform_reduce
- Silhouette 4y agoPython'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-written functions to do these things that everyone writes again every time when they would have been either built into the syntax or a one-liner using the standard library in some other languages. I agree that the C++ example is (one reason) why modern C++ has jumped the shark.
- phtrivier 4y agoI honestly fail to see what properties of the language has anything to do with the metaverse, or millions of devs, etc... At first I though the "choice" construct would be a way to distribute code execution among multiple computers (using the fact that in a grandiose metaverse, everything would be a connected computer with lots of compute time to spare ?) but there is not much detail. Also it's not obvious from the slide if there is already a compiler / exécution env at the moment, or how far they are from it. Now, the names behind this aren't exactly bozos, so I suppose we'll get to know soon. Wait and see, I guess ?
- Avshalom 4y agoI mean logic languages have a history of... trying to be distributed but it's never really worked out.
- qayxc 4y agoMy guess would be that it's the usual case of trying to solve a non-technical issue by throwing new technology at it. I honestly cannot wrap my head around how a programming language of all things should solve the "millions of programmers working on a thing"-issue.
- WillPostForFood 4y agoAlso it's not obvious from the slide if there is already a compiler / exécution env at the moment, or how far they are from it. It is expected to release in January as part of Fortnight Creative (delayed from this month).
- pizza 4y agoI guess I sort of see where it's coming from - the context is that hundreds of devs have to write code that has to preemptively cooperate with other code. So I think the lenient evaluation might be key for this. Suppose you wander into a new environment, it contains some object x, and it has some capability f(x). Suppose your avatar or whatever has some code that already integrates with this f(x). You could just call f(x) in advance, and once you enter that environment, it lazily executes f(x). Or maybe I'm way off base here.
- leetrout 4y agoOff topic but wow cannot believe someone used comic sans.
- dan-robertson 4y agoHe has used that PowerPoint style for years if not decades.
- kryptiskt 4y agoHe used it in the "Tackling the Awkward Squad" talk from 2001[0], so it's been a long time. [0] https://www.microsoft.com/en-us/research/publication/tackling-awkward-squad-monadic-inputoutput-concurrency-exceptions-foreign-language-calls-haskell/ https://www.microsoft.com/en-us/research/publication/tacklin...
- Smaug123 4y agoIt's just because SPJ likes it. He uses it for presentations a lot.
- tokamak-teapot 4y agoI like it. It's easy to read.
- chombier 4y ago> 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, I care about being able to read it. So if you have got a sort of ... some rational reasons why I should not then I'll listen to them. But just being unfashionable? I don't care. source: https://graphicdesign.stackexchange.com/questions/38226/what-is-wrong-with-comic-sans https://graphicdesign.stackexchange.com/questions/38226/what...
- mncharity 4y agoThe TFA slides live on [1], along with the paper[2]. [1] https://simon.peytonjones.org/verse-calculus/ https://simon.peytonjones.org/verse-calculus/ [2] https://simon.peytonjones.org/assets/pdfs/verse-conf.pdf https://simon.peytonjones.org/assets/pdfs/verse-conf.pdf
- benji-york 4y agoI'm sure they know a lot more about language design than I do, but the use of what is essentially SQL's NULL for boolean false doesn't feel like a good idea at first blush.
- qayxc 4y agoI didn't understand "false?" as a NULL value but more of a "Nothing"/"None" in the context of a Maybe monad. Since the language doesn't even have a Boolean equivalent, it makes sense to introduce a value for a failed condition or zero values. The problem with SQL's NULL are its properties (comparison and arithmetic in particular), which doesn't seem to apply here (e.g. "42 + false? === false?, just as with monadic function composition and Maybe monads).
- benji-york 4y agoI don't quite follow the second paragraph. You say > The problem with SQL's NULL are its properties (comparison and arithmetic in particular) [...] Which I follow, then you say that those unfortunate properties don't apply and give a counterexample (I think it is intended as a counterexample) of > 42 + false? === false? But that seems to be the same as SQL's NULL: benji=# \pset null NULL Null display is "NULL". benji=# select 1 + NULL; ?column? ---------- NULL (1 row) Which leaves me confused.
- qayxc 4y agoThe problem with SQL is that this behaviour is inconsistent when it comes to NULL values. Consider a column with values (10, 20, NULL, 30). In SQL the AVG() function would return 20, i.e. ignoring the NULL value entirely. COUNT(*) on a table, however, would happily include NULL values, whereas COUNT(col_name) wouldn't. The behaviour is all over the place, especially when different dialects and settings are considered.
- benji-york 4y agoThanks for taking the time to respond. I appreciate it.
- gliptic 4y agoThis looks a lot like a functional version of Icon https://en.wikipedia.org/wiki/Icon_(programming_language) https://en.wikipedia.org/wiki/Icon_(programming_language)
- dan-robertson 4y agoThe metaverse angle doesn’t make much sense to me but whatever. The big idea I see is that prolog-style backtracking logic becomes a first class notion in the language – every expression denotes a sequence of values reached through backtracking-like behaviour – which allows mixing logic-programming with a more familiar kind of functional programming. Though perhaps there are other ideas too. I think it will be interesting to see where this goes. Perhaps this will be another Fortress but SPJ is well regarded, has written a bunch of interesting papers, and has a bunch of experience managing a programming language project from haskell which will hopefully carry over.
- travisjungroth 4y agoSee slides 2 and 4. He has an idea of what a metaverse would look like and the technical challenges that will bring up. The language is meant to help solve them.
- dan-robertson 4y agoThanks. I re-read them but the metaverse angle still doesn’t make much sense to me. I don’t think that’s super relevant to the PLT stuff though.
- travisjungroth 4y agoI think it makes more sense if you don't think of it as an angle but a motivation. We've all been attacked with stuff like "shopping lists but on the blockchain!" for so long. This isn't like that. It's that they're foreseeing a technical problem of a shitload of concurrency and extra pain of API changes (metaverse) and this is meant to help.
- dan-robertson 4y agoI didn’t find the metaverse stuff to be a compelling motivation for the programming language features described. It felt to me more like ‘I had some ideas about programming languages after 20+ years of Haskell and research. Here’s my plan to unify logic programming with more normal functional programming (also we’re getting rid of monads). By the way my boss cares about the metaverse.’ But maybe that is too cynical. The metaverse things used to motivate this language don’t seem new to me either. Aren’t they basically ‘works well with concurrency’ and ‘somehow the language that finally makes it easy for different programs written by different people to talk to each other’ which don’t seem to be new goals in programming language design as far as I’m aware. But maybe I’m being uncharitable in my interpretation. I’ve not looked at the associated paper or tried to understand what the metaverse is so maybe things are better discussed there. Or maybe they are glossed over because the presentation was for PLT people rather than metaverse people and I think many of the former would be turned off by a talk about the metaverse. This doesn’t strike me as a very serious attempt to predict the future and design a programming language based on that prediction (though few such attempts exist for the design of most things in tech, and they needn’t correspond to success). It seems more like taking a punt and exploring a new point in the programming language design space that may be relevant. I think it is interesting to look at what happened with Fortress for comparison: - Well known PLT person (Guy Steele of scheme, CL, Java fame) in a reasonably funded industrial research lab - they started with ideas about where computers were going around 20 years ago. So high core counts, big memory vs cpu frequency divergence, NUMA/HPC architectures. And an increasingly difficult amount of legacy Fortran code - developed an idea for a language that would be easier to write parallel scientific programs in - eg functional, map-reduce paradigm - added in some known features like typeclasses (monads for map reduce) - some other random features/ideas - wrote a bunch of papers - not that much actually came of it, I think Maybe they weren’t good at executing on making a language people wanted, or maybe that was never the goal. Or maybe they were too early – a lot of the ideas became more important with gpu compute but most people still write those programs at a much lower level.
- smcl 4y ago> Like the metaverse vision, Verse itself is open Aren't these companies pursuing a "metaverse" product because they can lock it down, control it and make money on it? Otherwise rather than FB and Epic etc making their own, you'd have something developers could work with and use right now I wonder if maybe Simon Peyton-Jones has to play along with the whole metaverse fad just to do something he wants to do.
- charcircuit 4y agoThe strategy is more about getting a first mover's advantage. Companies believe the metaverse is inevitable and they believe that it will become a big part of the everyday person's life. These companies want to be key players in this space. Look at the open ecosystem of the web and think about how much money ICANN and Verisign make from their DNS. Anyone can make their own independent DNS (see projects like namecoin), but ICANN's has a big first mover's advantage that makes it hard to compete with them.
- alpos 4y agoThe first mover advantage also means that, as a matter of everyday experience for most people, the internet is not an open and free place, it is a highly structured and controlled place. Most people can only do stuff on the internet if a company has made a web hosted app that allows them to do that thing. That goes all the way down to DNS and connecting a server to the internet in the first place. ICANN and IANA allow you to have a name and IP address, but you pay a middleman extra (in many cases a whole lot extra) for those because ICANN and IANA don't want to deal with you directly so you do it they way they want you to. Amazon/Microsoft/Google allow you to have server time and hard drive space, you buy from them because servers are super expensive...because they bought up all the servers and continue to do so. Also you can't run a server at home anyway because the company that bought the rights to lay network cable in your town/county/city doesn't allow you to. You might be able to run a server anyway if you buy or rent an office in one of the locations they serve business internet to, but you'll run it they way they allow, for the uses they allow, at the speeds they allow, and you'll pay a lot for it. If you want to self publish, even with a basic site you probably use Wordpress or something similar because the existence of design platforms has raised the public's expectations for what a site should look like and be able to do. So you design your site the way the design companies allow you to. If all that's too much and you're just looking to write stuff for people to read on the internet, you most likely use Medium or Substack or something similar. And to do so you agree to their terms of service and end up discovering what gets attention and what gets ignored on that platform. So instead of writing what you want per se, you write what they allow you to. If you want to share video content, you do it the way YouTube wants people to, right down to reminding people to like and subscribe and hit the bell, in every damn video. If you want to share your love of crafts, you use Etsy. If you want to sell stuff generally, Amazon again. In both cases, you follow their encyclopedic sets of rules about what and how to sell as well as their convoluted, ever changing, unpublished rules around what shows up where on the listings and searches. If you want to connect with people, you connect how and to whom Facebook or Tiktok allow you to. If all this pisses you off and you want to rage at random people, you rage about the things Twitter allows you to. In theory anyone can do any of those things without the platforms, of course, but in practice they don't and always for a slew of reasons that basically amount to someone got here first and built a moat. In the most basic cases, anyone trying to do something on their own will at least need to advertise...on the platforms, the way Google, Facebook, and TikTok allow you to. Good luck.
- AndrewPGameDev 4y agoAs a programming language - I mean it seems cool but it doesn't seem like much of an innovation when things like Granule, Idris, Unison, Erlang, and more already exist. I want to take a moment to look at the Metaverse angle. If there is going to be a unique programming language for the metaverse, I think it's not going to be textual but instead is going to primarily be a 3D language. This poses a big challenge for a VR language because text is great[1]. The point of making it 3D would be that you are somehow capable of transmitting more information via the higher-bandwidth channel of the human visual cortex than you are through text. If you aren't making a 3D programming language, well then it might be a cool programming language but I don't know what it has to do with the metaverse. [1] https://graydon2.dreamwidth.org/193447.html https://graydon2.dreamwidth.org/193447.html
- rileyphone 4y agoJaron Lanier developed a language in VR in the 80s much like you describe (apparently). Unfortunately, there is little evidence of it beyond some of his later testimony.
- mlajtos 4y agoWe developed 2D text in a 3D world. There isn't really a precedence for 3D text really. We will greatly enhance writing and reading with eye-tracking on the VR/AR headsets, but I don't think we will march into 3D world of text. We might do 2.5D though (or something more of dynamic nature) – https://www.reddit.com/r/badUIbattles/comments/wsk2jz/debugging_deeply_nested_code_be_like/ https://www.reddit.com/r/badUIbattles/comments/wsk2jz/debugg...
- tankorsmash 4y agoTo me, this doesn't seem like it has much to do with Unison at all beyond being a new FPL, could you elaborate a bit?
- AndrewPGameDev 4y agoThat's exactly what I meant, that Verse is just a functional programming language, and that the ideas in a language like Unison seem to be just as interesting or promising.
- rkrzr 4y agoThis 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 not evaluate to a value (like in Haskell), but instead to a sequence of zero or more values - tries to bring functional logic programming into the mainstream - Verse uses an effect system for I/O instead of monads - A type in Verse is "simply a function". E.g. int is the identity function on integers, and fails otherwise This all looks very mind-bending to me (in a good way). Perhaps Verse will one day be as influential for PL design as Haskell has been.
- stefano_c 4y ago> - 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) https://en.m.wikipedia.org/wiki/Icon_(programming_language)
- davedx 4y agoI mean it's either genius, madness, or both. Most programming languages I can least understand the general gist, the core motivation, whatever. I have a lot of respect for Epic Games so I read through most of it but I have to say I'm still non the wiser. If forced to summarize I'd say.. it's some kind of Haskell-ish language where the types themselves are defined by ... runtime functions? With some attempt at also being a prolog-ish logic language? But why?
- lambdatronics 4y agoYeah. Super interesting concepts I hadn't come across before, but it's hard to see the motivation for the design choices, in light of the stated goal (which is itself a bit 'out there'). OTOH, it's in general a hard problem to predict the emergent characteristics of the ecosystem of a programming language just from the underlying design choices.
- frozenlettuce 4y agoMy guess would be to store game logic as data, as process it in a distributed way. An entity could have multiple rows for it's attributes and "methods", and the runtime just processes it
- cottenio 4y agoWhich would be hella cool, especially if you abstract up a level and store and execute platform data (an MMO game vs. VR meeting place) in a distributed way.
- TuringTest 4y agoMy take, in short: imperative programming is too fragile for the use case of the metaverse, and functional programming is too mathematical. In a context where you want to have software built by different independent developer teams working on the same persistent world objects, you can't expect them to collaborate on programming style and coordinated libraries, as is done in industry software. Any unexpected side effect or variable aliasing in another library may ruin your runtime execution. Pure functional programming avoid this by forbidding side effects, but forces a programming style where all state updates need to be declared and carefully handled by the developer. Functional reactive programming (spreadsheet-like updates) is being used a lot in the web to ease that problem (all popular frameworks have a version of it), but it is best suited to processing client/server updates, not full world simulations. Verse approach seems to bring new expressive capacities suited for dataflow programming, allowing data transform logic to be built with functional expressions and separating these from the techniques needed to link one component to another.
- thelazydogsback 4y agoSome 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 between multiple, backtracked values and actual sequences -- this often leads to sub-optimal/confusing Prolog code as well, deciding when you have an explicit control structure vs. backtrack, when to "harden" results using setOf/bagOf/findAll, etc.
- mncharity 4y agoCan anyone speak to this for Icon? For context, Prolog had a culture of "the built-in search is less than wonderful... but good for crafting a problem-appropriate search". II(fuzzily)RC, Mozart/Oz decoupled nondeterministic code (explicit amb, spelled "dis") specification from search, and allowed managing search over nested spaces of unification constraints and threads. With (very fuzzy) less use of backtrack-driven implicit sequences than in Prolog? I so don't remember Icon. Curiously, https://www2.cs.arizona.edu/icon/books.htm https://www2.cs.arizona.edu/icon/books.htm includes a "newish" (2010) book, "Icon Programming for Humanists".
- cryptonector 4y agoIn Icon a function ("procedure") can: fail, return a value, or "suspend" (yield) a value (and then again and again). The difference between returning and suspending being that a generator that returns cannot be resumed again. That difference was needed (IIRC) because the alternative would be to end the generator with failure, which could be confused with failure in a boolean sense. jq gets this better by saying that a function can produce zero, one, or more values (just like Verse), but unlike Verse, jq does have booleans. I prefer the jq approach to the Icon approach, which I think means I am suspicious of this aspect of Verse :) Also, boolean values are inherently useful, and while checking that an expression is empty or not is a boolean predicate, it should be a predicate that produces a boolean value. Otherwise if we have no boolean values then we shouldn't have integer values either and just go back to the Lambda Calculus!
- mncharity 4y agoVerse reminds me of Mozart/Oz[1][2]. I really liked Oz, and thought it had a lot of potential. But its documentation was a big adoption barrier (scattered mess plus expensive textbook), and Oz failed to escape being a turn-of-the-century European research and intro-CS language. The intro-CS role perhaps lends plausibility to Verse's "a first language" objective, despite the off-mainstream computation model. Explicit `amb` though. [1] https://en.wikipedia.org/wiki/Oz_(programming_language) https://en.wikipedia.org/wiki/Oz_(programming_language) [2] http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html
- laurentoget 4y agoI am happy to see i am not the only one who remembers Oz and i wonder if there are any connection between those projects.
- charcircuit 4y ago>Kick functional logic programming out the lab and into the mainstream Yet this presentation did none of that. There were no montivating examples on practical usage. The language does not map cleanly to webassembly, it instead reduces to a prolog like graph based execution model. In order to go mainstream you need to be solving more problems that existing languages have than you are creating by having someone use your new language.
- myrryr 4y agoIt is already being used in fortnite, so it works, scales and does what it needs to do.
- charcircuit 4y agoIf you throw enough compute at any language it will work for scripting games. Is there any evidence that this will actually scale better than a language that better maps to the host processor.
- giveexamples 4y agoI dunno about slide 39 - where calling f(x) may or may not give x a value. From a code readability standpoint, a reader of the codebase needs to be wary of every function. I see the issue is that iff you explicitly marked it as inout, it would limit the code from a logic unification point of view. I guess this is already explored in prolog, which I have little experience with - but it feels like it would inherently limit the ability to scale a codebase to huge sizes. Maybe a combination of convention and naming would solve the problem.
- JonChesterfield 4y agoIt reads very like passing uninitialised variables to a function which may initialise them for you. That's one of the worst parts of imperative programming. The distinction between bringing variables into scope and assigning them values is a strange one for a functional language, but in fairness the talk is titled beyond functional programming.
- ogogmad 4y agoThe choice stuff might make vector and GPU programming more natural, assuming it can be made efficient enough. The syntax it provides is certainly convenient for that. Might even be an advance over array programming in some ways, by being more flexible and opening up more forms of expression. Has this been considered?
- moonchild 4y ago> Might even be an advance over array programming in some ways, by being more flexible and opening up more forms of expression In what respect is it an advance? It seems to me strictly less expressive. (Which is not meant as a denigration; this design seems well suited to the problems it is trying to solve.)
- st3fan 4y agoThis looks like a language designed for language designers and not for language users.
- typon 4y agoThis is sadly the problem with most new languages.
- ParetoOptimal 4y agoWouldn't a language designed for current language users not bring much new to the table and mostly focus on familiarity and interop with existing la.guages?
- charcircuit 4y agoWhen you want to make a mainstream language you will have better luck by focusing on bringing value to the users of the language over focusing on creating something novel.
- ParetoOptimal 4y agoBut isn't the point here that the largest value is in a novel space requiring novel solutions?
- dhdgrygev 4y agoWhat an amazing summary. Puts to words what I was thinking but couldn't quite describe...
- julik 4y agoI know people will throw stones, but dynamic-oop-folks likely remember https://en.wikipedia.org/wiki/Croquet_OS https://en.wikipedia.org/wiki/Croquet_OS
- abecedarius 4y agoAnd before that, E. https://www.crockford.com/ec/ https://www.crockford.com/ec/
- mlajtos 4y agobtw Croquet is still alive at https://www.croquet.io https://www.croquet.io The bit-identical virtual machine is pretty nice idea. I hope to see some demos for WebXR soon.
- pastrami_panda 4y agoReading half of it I'm struggling to see why they chose the semantic 'false?'. How do you read it? It sounds like a question, why not just 'false'?
- u320 4y agoAFAICT: Just "false" would be a regular boolean value. The question mark turns it into a logic value so it can be used in conditionals.
- pastrami_panda 4y agoBut there are no bools in Verse so seems the keyword isn't taken and could have just been syntactic sugar for 0 from what I can tell?
- u320 4y agoThere are no bools in Verse conditionals. That doesn't mean that there are no bools in the language at all.
- sweetsocks21 4y agoIt's cool to finally get some more details on this language. They showed some slides of it being used in Fortnite last year: https://mobile.twitter.com/saji8k/status/1339709691564179464?s=20 https://mobile.twitter.com/saji8k/status/1339709691564179464... I believe it has roots in (but quite different from) Skookumscript https://skookumscript.com/about/look/ https://skookumscript.com/about/look/
- vcxuhyij 4y agoThe code shown in those images is not in the programming language that is being introduced/created now by SPJ. It is clearly a separate (and not functional) scripting project.
- bmn__ 4y agohttps://nitter.lacontrevoie.fr/pic/orig/media%2FEpeZMhDUwAAYBWJ.jpg 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.
- tgbrtjds 4y agoI 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 SPJ Verse. They apparently like the name/branding so much that they want to keep using it, even though the fundamental principles of the language are going to be different. That does seem potentially confusing but it's their business. After all, the old verse never got released to the public. So it seems totally clear to me that a previous, less complex and ambitious, scripting language called "verse", which has been around for a while and never really gone anywhere, is going to be replaced by the new SPJ functional language "verse".
- tinco 4y agoFor those wondering if there's actually something relevant to the Epic's approach to the metaverse: there's not beyond slide 3. Everything after slide 3 is a description of the semantics of a novel functional logic programming language, the sort of which you'd expect you'd get if you paid the world's premier Haskell core contributor a large sum to design a new language. Of course its intended audience is Haskell academics, so perhaps it would be weird to expect anything else. Slide 61 and 63 hint at things that might actually be of consequence to real programmers making real software for a potentially real metaverse, such as the effect system for I/O, transactional memory and code organisation through classes and inheritance, but it gives no detail. If you're interested how elegantly functions like head, tail, cons, snoc, append and map might be implemented, this presentation is for you. If you're more interested in how you might unpack a message from bytestring, model a state machine or coordinate a group of actors in a distributed system, then I guess you'll have to wait for the next presentation.
- yazzku 4y agoSimon my boy. The "View from 100,000 feet" slide does highlight the kind of experience SPJ would have in identifying where Haskell lacks a bit in pragmatism as a basis for a new, but not super different language. Hopefully the tooling is much better though.
- helsontaveras18 4y agoI was expecting an entire section devoted to how this language would deliver on its promise on powering the metaverse. This was a nice post about a new language, but I was ready for a bitcoin paper.
- tome 4y ago> its intended audience is Haskell academics It was presented at Haskell eXchange so the audience is more like Haskell users in industry and those who would like to be.
- wayeq 4y agoEvery time someone gives a programming language a name that needs disambiguation terms for a decent google search, a puppy dies.
- fulltimeloser 4y agoI guess someone will refrain using Verse
- yzsh 4y agoThis looks like Erlang for game design. I’ve done some game programming software and a large number of their decisions make sense in that environment. In particular, expression evaluation and a lack of booleans.
- chrisbaker98 4y agoI have no experience with game programming. Why would you not want booleans when developing games?
- frozenlettuce 4y agoNot a game dev, but I suspect that it might be to avoid branching (which slows down processing)
- charcircuit 4y agoBranching is not a bottleneck in games.
- jasonhansel 4y agoNo offense, but: does this actually relate the metaverse, or was that part added in so Epic Games would fund it? I don't see any first-class features that would be specific to that use case.
- dhdgrygev 4y agoIt doesn't. This presentation contains absolutely nothing of value for a real programmer trying to actually make stuff. Hopefully we'll get more useful info soon, once it can be used in Fortnite.
- eyelidlessness 4y ago> This presentation contains absolutely nothing of value for a real programmer trying to actually make stuff. Speak for yourself! I got a lot from it that feels immediately practical for my current projects as well as others I want to take on, and it makes logic programming concepts and benefits much more accessible to me than any amount of Prolog literature has so far (granted I came in wanting to be compelled).
- dhdgrygev 4y agoDo you have some examples of things in here that you think will help you solve current problems? I'm approaching it from the angle that I don't see how functional programming is at all useful for the kind of gameplay programming that would be done in a "metaverse" or is done in Unreal Engine today. So "it can do functional programming stuff" by itself doesn't cause any excitement. Rather the opposite. There are zero code examples of using it for anything besides abstract math. It executing code out of order seems to serve no purpose besides letting people create undecipherable monstrosities with it. I'd maybe sum up this presentation as "we took functional programming and tried to make it less unusable by letting you actually mutate state" but I'm still lacking the original motivation of why I'd want to use that in the first place.
- eyelidlessness 4y ago
- hakanderyal 4y agoThat's a wise move from Epic. If we somehow happen to have a few competing metaverses, the one with the biggest developer mind share will likely come out ahead. Just reading the PDF energized me about the possibilities.
- threatofrain 4y agoDoes anyone know when this language will be ready to play with?
- simlevesque 4y agoEpic already uses it, so I guess not too long: https://mobile.twitter.com/saji8k/status/1339709691564179464?s=20 https://mobile.twitter.com/saji8k/status/1339709691564179464...
- vcxuhyij 4y agoNo, the language shown in the images in that tweet is definitely not this one. It is not a functional language and is obviously quite cheesy in comparison (see someone's comment, in this thread, about it being derived from something called skoomumscript). SPJ's language is not ready yet.
- deleted 4y ago[deleted]
- hughw 4y agoI don't want to program in any new language. I only want to describe the program to GPT and have it write it for me.
- troutpanda 4y agoReally exciting stuff. Couldn't give a damm about the metaverse but these are some cool language features. I'm really curious about how verse will be used in the wild. Also, I appreciate how a bunch of new languages are getting Effect Systems (Unison, saw that one here too)
- sedatk 4y ago> a variable names a single value, not a cell whose value changes over time. So, not a variable? :)
- adjav 4y agoWell, a variable in usual Math usage, just not the traditional imperative sense.
- hartator 4y agoI still don’t get why people would want to type ‘:=‘ instead of just ‘=‘, but okay.
- 62951413 4y agoTurbo Pascal FTW!
- cardanome 4y agoConfusion 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.
- pharmakom 4y agoBig fan of <- for assignment for this reason.
- bmitc 4y agoF#!
- garethrowlands 4y agoTurns out, a few slides later, that ':=' doesn't have direction; it's merely a contraction of declaration, ':', and equality, '='. So 'x := 3' means the same as 'x:int; x=3'. Perhaps more surprisingly, so does, 'x=3; x:int'.
- skitter 4y agoI guess it's not strictly necessary to require a ':', but it tells people that a new variable is getting defined, instead of an existing one getting narrowed.
- cmrdporcupine 4y agoContrary to what others are saying... From my time spent in MUDs/MOOs 30ish years ago and the languages we were playing with then, I can see plenty here that actually does relate to the problem of programming in a large scale shared-state world aka "multiverse" (hate the world) Transactionality. Check. ACID type semantics are absolutely key to handling the concurrency issues created by a world with thousands of authors/programmers and concurrent actions. This is not the place for locks. Declarative. Essential. This is going to be the only way to manage the complexity of interactions on a large scale. Though perhaps I don't jibe with the particular form described here and would instead encourage a more relational/datalog type approach, but that's my bias. And management of mutable state / side-effects, through functional type approaches also seems key. Not just for expressing problems elegantly, but also for security / visibility management. Some of the interesting things in here (approach to truth values etc) have a vibe similar to the approaches behind evaluation in a Datalog but also look similar in spirit to some of what's behind my employer's (RelationalAI) knowledge management programming language, Rel: https://docs.relational.ai/rel/primer/overview https://docs.relational.ai/rel/primer/overview Finally, people saying it looks difficult to learn, I think that for many people working in this kind of environment... it could be their first programming language. So they don't come with the same baggage & expectations about what programming languages are. Back in the 80s and 90s there were all sorts of "game builder" (esp for interactive fiction) type languages that often had what we'd now see as "odd" semantics. But this was part of the advantage. Heterodox approaches often bloom in domain specific locales. Going to spend some more digging into this after dinner. Neat stuff.
- Terretta 4y ago> Finally, people saying it looks difficult to learn… “To answer "what does this program do, or what does it mean?“ just apply the rewrite rules.” Whenever a senior engineer* uses the word "just" you're about to have a bad time. * Or an expert in anything, really…
- cottenio 4y agoHi, fellow MUD/MMO person here with an additional background in blockchain. Can you walk us through where you think a language like Verse really shines with transactionality versus the current server authoritative models we see implemented in [language here] using [framework/pattern] here (like C++ and ECS)? I've done my fair share of FP (got into Haskell years ago) so I see value here, but I'm not sure I'm grokking your level of excitement and would like to understand better.
- lbj 4y agoSeems like a very small win for a lot of work.
- Ono-Sendai 4y agoI have also built a functional language, Winter (https://github.com/glaretechnologies/winter https://github.com/glaretechnologies/winter) that is used in our metaverse (https://substrata.info/ https://substrata.info/). A functional language has some advantages - because Winter programs can be bounded in space and time, we can efficiently execute untrusted scripts from users safely. The scope of Winter programs is reasonably narrow - mostly pretty simple scripts setting a transformation as a function of time. But for that it works well.
- charcircuit 4y agoYour links didn't explain how you are bounding time and space. Giving programs a fixed time and memory budget doesn't require a language to be functional.
- IndigoIncognito 4y agoTim doesn't like bread, that is all I need to know
- Yahivin 4y agoThis feels doomed to me.
- fercircularbuf 4y agoI'm confused by the Nested choices and funky order slide. How does x:=(y|2); y:=(7|8); (x|y) Give only (7,7), (8,8), (2,7), (2,8)? What about (7,8) or (8,7)?
- zozbot234 4y agoIt can't be either of those, because any given outcome is forcing a single value of y (or any variable in general).
- fercircularbuf 4y agoEdit: Ah... I see now. By that logic, how is either (7,7) or (8,8) allowed?
- sidlls 4y ago"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).
- Kab1r 4y agoI was confused by this too.
- krcz 4y agoThese are not possible, as x can be 7 only if y is 7, and likewise for 8. Semantics isn't based on sets, but on non-deterministic assignments to variables: y is either 7 or 8 and x is either y or 2.
- msk-lywenn 4y agoIt's an exclusive or. So if x is y that is 7, then it can't be 8.
- 4y ago
- SturgeonsLaw 4y agoFunctional programming as an introductory language? Maybe it's just me, but functional programming is a steep hill to climb, it has always felt more akin to mathematics than, say, scripting. To this day I have still never really "got it". From what I can see, the people who love it really do love it, maybe one day I'll give learning it another shot.
- cies 4y agoI dont remember which paper, but there was once a FP vs OO for learning paper that showed that there was not much difference in speed of learning: but that was on total beginners. Since most langs are OO/imperative, the FP-style is simply less common, thus a steeper learning curve than the next OOish/imperative language.
- elihu 4y agoI suppose this is a relatively minor thing, but being able to have conditionals like "if (0 < x < 20)" has been on my "things I wish just worked" list for awhile.
- ink 4y agoI believe you can do this in Python
- ducharmdev 4y agoYup, you can. Also in Clojure, like this: (< 1 2 3 4 5 6) => true
- anselm 4y agoThis essay opens with comments about utility for the metaverse but then switches to a description of a grammar without strongly connecting back to why it is so valuable for programmers to learn a new language to better build the metaverse. It may be helpful but is it that much more helpful? I understand this is a pet project for these folks but I think that a metaverse grammar should not fe functional but procedural - it should be extremely simple and accessible to novices. We want these tools to be accessible to everybody I think - unless we as programmers want to be responsible for building all interactions for all users. But I mostly think a grammar today isn’t just about the literal parser - instead it is more about the parser and surrounding tooling. Rust for example is surrounded by tooling that helps - cargo/crates are a nice helpful way to make rust developers effective. If I was going to devote significant energy to this topic I’d solve other problems. Any code that users write needs to be late binding - allow software agents to be pushed to the cloud and participate in already running simulations or models. Code should allows users to define granular security around libraries and components to prevent them from doing bad things. Code should be highly portable; able to run across many devices at speed - not something new that has low cross platform support. I think a better way of thinking about this isn’t the grammar itself but the kind of “computational sandbox” one is offering - the grammar container or app runner. WASM is a good example of thinking in a better way - portable, secure, performant. It’s more like a metaverse tool than the above grammar. What’s especially curious to me is that Tim’s project Unreal is almost the anti-metaverse. It is utterly fixated on and built around an extremely heavy high fidelity renderer - that is not portable - that does not run across many devices. Unreal uses an old school compilation philosophy that requires behaviors to be precompiled - so if you want to add a single feature you have to tear down all the instances, recompile them, recompile the server too, distribute a new build to all participants and restart the sim. It’s a tool designed for a different era and a different ecosystem… in a sense AAA games are the opposite of a participatory constantly evolving online shares consensual world. So maybe he should fix that first.
- maccard 4y ago> It is utterly fixated on and built around an extremely heavy high fidelity renderer This is doing unreal engine a significant disservice. Unreal is significantly more than a high fidelity renderer; Unreal's replication system is excellent, as is the gameplay ability system. (To my knowledge, neither of those systems exist in any of the other major engines that are readily available). There's a laundry list of things it does pretty well,distilling it down to a renderer only is very dismissive. > that is not portable - that does not run across many devices. Renderers by definition aren't going to be portable, they're pretty intrinsically tied to the hardware (and OS) they're running on. Also it's silly to say it doest run on many devices - it runs in every games console for the last decade, an enormous amount of mobile devices on both android and iOS, and on all major desktop platforms natively. What more do you want? > Unreal uses an old school compilation philosophy... So maybe he should fix that first. Unreal definitely has some dated design decisions that are showing their age, but that's to be expected for a codebase that's 25 years old. And if you've been paying attention to what epic are doing over the past few years you would see they are working on that. (Disclaimer: I worked for epic until recently on exactly the things you're talking about in this comment)
- quickthrower2 4y agoSwitching 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?
- valenterry 4y agoProgramming 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.
- remexre 4y agoTracking 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.
- dillab2 4y agoI 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.
- anon291 4y agoI 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.
- laurentoget 4y agoFunctional logic programming was all the rage when i started my career 30 years or so ago, but besides some obscure use cases it did not have a lot of success - i wonder if this will be the killer app.
- oxff 4y agoSeems like a bonkers meme language.
- beders 4y agoI must be getting old. Neither the prospect of spending time in the "metaverse" for "social interactions" nor a language design that requires you to keep in your head not just simple bindings to names but sequences of values, is just not very appealing. What are younger folks thinking how they will be interacting with the metaverse? Less clunky VR glasses you can wear for more than an hour?
- deterministic 4y agoThe metaverse is already a failure. So no it is not because you are getting old. Most people don’t want to strap a bulky helmet on their head to work or play. Maybe one day, if you just have to wear comfortable light weight glasses, this might change. But until then it will be a niche thing.
- tomphoolery 4y agocomic sans lmao
- yewenjie 4y agoIs the choice operator somehow analogous to OR? If not, why not just choose any other syntax than `|`?
- bodhiandphysics 4y agoIt is or... i.e x := (3 | 4) means x is either 3 or 4. The ; seems to be basically be an and. The evaluation finds an assignment of the values such that the world is true. For instance x:= (3 |4); (x % 2 = 1); x evaluates to 4. Type checking and evaluation seem to be the same thing... so x:= (int | string) x = ("hello" | 4.3); x might evaluate to "hello"
- phorkyas82 4y agoSo.. the metaverse shall be written in Verse? - Would Shakespeare approve or die in disambiguity?
- lukeschwartz 4y agoTim's great. Why is his face on the slide though? :)
- harriet1 4y ago[dead]
- nielsbot 4y ago(meta) Interesting to go with what looks like Comic Sans in this day and age. Deliberate trolling?
- shadowofneptune 4y agoUsing it as slide text isn't so bad. Placing parts of code, like as[i] in it, is pretty silly though. My personal preference for a typeface that gives off the feeling of handwriting is an italic one. Palatino's italic bold is quite nice for that.
- bmitc 4y ago> Deliberate trolling? Pretty much. Simon Peyton Jones has used for years, and if I recall correctly, he said that he just likes it, for whatever reason.
- mro_name 4y agothey lost me at metaverse.
- daniel-grigg 4y agoI’m sure there were many discussions that led to concluding some of the languages design decisions and how they’d be impactful for ‘coding in the meta verse’, would love to see slides on that too.
- bmitc 4y agoThese slides need a lot of work. I'll read the paper later, but the slides really lack context and motivation. * I'm a little disheartened to see "Objectively: no. All languages are Turing-complete" in the context of the question of needing another language. It's a throw away comment and largely irrelevant when considering the actual use of programming languages. If one has to state this platitude, it is more accurate to say "theoretically" rather than "objectively", as I think the latter is actually debatable. * The utility of the choice syntax over comprehension syntax is not clear at all. The choice thing seems neat, but I don't understand why comprehension semantics weren't just extended. Every example of choice seems to refer to sequences and comprehensions anyway to make the meaning clear. Will have to see more examples. Right now, the syntax seems a bit quirky, especially with `false?` thrown in. * Why is `fst` not named `first`?! The shortening is maddening to me. It saves two characters (negligible savings), decreases readability, and first is probably just as fast to type. * I'm still not sure why they're creating this language, what problems it solves, and what any of it has to do with a metaverse. These are professors and language experts, so I'm a bit surprised by the presentation. Also, the idea that this language will be learnable as a first language is ambitious, if not naive.
- TuringTest 4y agoI see using the choice syntax as PROLOG-esque, rather than Python-esque. When you are building simple structures to iterate upon, it makes sense to use the more readable comprehension syntax, where you define a list or set of items and their desired properties. Yet this terse syntax makes more sense for logic programming, where a lot of the domain logic is built upon generate-and-test patterns; you define a combinatoric search space which is the enumeration of all base value in pairs (or tuples), and check which ones are kept for the next processing steps. When using this pattern, it's clearer to be able to express the space with the shortest syntax rather than the verbose one. As for the adequacy and need for the language, I have my own ideas on what's needed for the stated use case, and I do agree with the authors that this kind of language will really be easier to learn for people without a programming background; it looks much more like mathematics than the traditional von-Neumann-architecture, continuation-based languages, and its declarative nature may make it easier to approach without having a full understanding of runtime behavior.
- anentropic 4y agoNaive question: Why does the metaverse have to have an economy?
- anentropic 4y agoAlso... sad to see the 'fst' abbreviation persisting into a new language designed from scratch The sequence and narrowing stuff looks super interesting though!
- zubairq 4y agoIs the paper just describing Clojure like Software transactional memory?
- grose 4y agoVery 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? :)
- pbazant 4y agoI was thinking the same! I love Prolog, but maybe Verse will turn out to be an actually better, cleaned-up Prolog? Implementing Verse in Prolog would be so much fun and very natural.
- gergo_barany 4y agoThis definitely isn't Prolog, but in some ways it seems to be closer to Prolog than some other things. One thing you can do in Prolog is build partial data structures: `X = tree(Left, Right)` builds a tree node with two "holes" `Left` and `Right` that you can fill in later -- or, crucially, might choose not to fill in. You can pass this "partial" data structure around, and other parts of the program may or may not instantiate it further. This allows some nice programming tricks. It allows proper tail calls in cases where functional programming doesn't allow tail calls, or only with heroic help from the compiler. It allows you to decompose your program in different ways from languages where you must always build data structures "inside out". In contrast, Mercury is a syntactically Prolog-like language that doesn't allow this: (AFAIK) when you pass a term to a predicate, it must either be ground, i.e., without any leftover "holes", or a variable, i.e., completely uninstantiated. This throws away much of the power and convenience of Prolog. And any language that takes a pure "Prolog's logic variables are just sequence generators" approach must also fall into this category. Verse seems to be more lenient in the "it's all just sequences" department. You can pass uninstantiated stuff into functions and have it further instantiated in there. It's not clear to me to what extent this works, there are no examples with data structures in the slides and I haven't gone through the paper yet. I can well imagine this being closer to Prolog than to Mercury. But the "Everything is eventually evaluated" is definitely not fully Prolog-like; Prolog doesn't care about everything eventually being ground. There is no need for that. On a related note, even though it's popular to say that Prolog can "run code backwards", that is in fact not the case at all. Prolog always runs your code forwards. If your code is designed accordingly, you can often treat an argument `X` as an input and an argument `Y` as an output, and also have a use case of the same code where `Y` is an input and `X` is an output. But the code itself always runs in a well-defined top-to-bottom, left-to-right way. This is notably different in Mercury, where the compiler will explicitly compile different versions of your code for different use cases, reordering things so that sometimes you are actually running bottom-to-top when compared with the source code order. Evaluation order in Verse is... all over the place. I suspect this will be problematic in practice. If you understand how Prolog evaluates your code, you can work with it to write performant code. Verse seems to be too flexible in this regard, so that it will be difficult to impossible to understand what is actually going on in what order. If you treat all your values as generators that can start enumerating stuff at any point, it will be very easy to have cases of combinatorial explosion by choosing wrong orderings. I see that there are some notes on this in the paper, but not much more than "some things are obviously not what we want, but we don't know what exactly we want". So let's see what happens, but for now this doesn't seem to want to be close to Prolog. Final syntactic notes: Mercury has the Prolog-like predicate syntax that as noted can run "backwards". It also has a functional syntax where (AFAIK) it's not possible to run "backwards". This seems to be the right choice to me. You can mix and match predicates and functions to build what you want and retain clarity. Using a function syntax for things that can run "backwards" will be cute but confusing. Relations should be written as relations IMHO. As for micro-syntax, others have complained about `fst` and `snd`, and I also tend to think that we can afford a few more bytes. But my main complaint is with `false?`. If in the slides introducing your syntax you feel compelled to call something "quirky", that's a clear indication that it should change. It's such a weird name. Why the question mark? Why does the name evoke booleans if the language has no booleans and discourages boolean thinking? If I'm supposed to think in terms of sequences, a better way for a sequence that contains nothing would be `none`. If I'm supposed to think in terms of logic variables, a better name for a logic variable that is bound to no value is... also `none`. The name `false` is just such a surprisingly bad fit. This is something to watch, it's an interesting point in the design space. It might end up as something that (finally) is better than Prolog. It won't end up as being "almost the same thing" though, I don't think.
- asimpletune 4y agoI was looking at something and wasn't sure if I understood it. There's this part of verse: x:int; y:int; if (x=0) then y=1 else y=2; x=7; y Ok, so here, y=2. And then it goes on to say that the equal operator within a "conditional scrutinee" is "rigid" and can only be read, not unified. Does that mean if we take out the "x=7;" line, and then evaluate "y", that "y=(2|7)"? Or how exactly does that evaluate?
- TuringTest 4y agoI would expect "y" to remain unbound, as in "not enough information". When evaluated, the "if" expression is added to the "knowledge store", so that it will be evaluated when "x" is bound elsewhere, giving "y" the corresponding value (just "1" or just "2", never "(1|2)") only after that. P.S. See the definition of the "amb" operator in typical logic programming languages: https://rosettacode.org/wiki/Amb https://rosettacode.org/wiki/Amb
- fedeb95 4y agoif the goal is to use a language for a metaverse, with lots of actors, why not use Erlang which is great for dealing with multiple actors, plus it already exists? I don't use it because I don't need it for my usual programming, but once you get some of its quirks (coming from a functional world they're even less), it's a great language. It seems to me that the objective is not finding a good language for a metaverse, but using the idea of a metaverse to justify this new language. More realistically, an open metaverse (if it will see existence, I'm not yet convinced of its utility) will support multiple languages. Even more realistically, the internet is a metaverse already.
- cottenio 4y agoI think mathematicians are going to love Verse. I'm concerned about hoping "millions" of Metaverse devs will use Verse when, right now, the biggest problems with Metaverse are more about frameworks/netcode than the underlying language. An open framework for handling interpolation, client & server space simulation (w/ physics), forecasting/prediction for events, and handling at least 30 ticks/s for a connection target with <150ms latency, <10% packet loss, while being able to handle thousands of connections + tens of thousands of entities PER instance (and also seamlessly mirror data across instances to enable large maps without zoning): that's a huge need for large-scale MMORPG-style Metaverse design. I'm not at all certain we need a new language to do that. I know it's hard to compare the usage percentage of various programming paradigms because many languages are multi-paradigm, but FP represents a much smaller piece of the pie (especially in games/networking) and, honestly, we have several generations of existing engineers who don't do FP. Still, it's nice to see that Sweeney hasn't given up on making FP more useful to the mainstream! =)
- TinkersW 4y agoSweeney commented on twitter "The aim is a transactional programming model with no visible networking or multithreading: you write normal code, and the system distributes the simulation across cores, servers, and servers by running updates speculatively, then committing or aborting them" Seems vaguely similiar to how Unreal networking already works, but I guess more automatic. Some parts of the game will perhaps have to run outside verse so they can be interpolated/smoothed, unless they have some magic to handle that also.
- cottenio 4y agoThere comes a point in any massively scaling networking project, and here I speak with some experience, when you realize that your goal, while admirable, has no bearing on the lessons learned over the last few decades of MMO development. I fear this is a handwave. What I mean by that is that its addressing the wrong problem for the Metaverse. Being able to implement an ECS model, for instance, where different platforms have common system requirements but because they're both built on Verse they can easily glom/reduce/map components and functions so entities in one ruleset can interact in the other... that's neat, but not a technology problem. It's a combinatoric problem. And a game design problem. By the time Verse is built up enough and has enough market penetration to try to take on this sort of role as a bedrock foundation layer for the Metaverse I think we're going to see two major shifts that make it obsolete: 1. The rise of AI-aided design and programming (think ChatGPT on steroids) that makes it pointless to worry about having One Great Solution when the AIs can just interop/translate and all the platforms (even competing corporate interests) can be "Metaversy" with their entities/players. 2. Either the combinatoric problem gets solved or it doesn't. Game designers have strong opinions on NFTs, for instance. The majority recognize them as incapable of solving the item portability problem (or as Raph Koster says, is it even desired?). Either novel ways emerge to do so and it's solvable, or they don't. I suspect either way the heavy lifting is not a programming technology problem, but a contractual/API one.
- epolanski 4y agoIs there any git repo I can read about discussions and see some toy implementations of the language?
- Stolpe 4y agoI, for one, find it very cool that two out of the five people named as authors are from my old university Chalmers University of Technology, in Gothenburg, Sweden. Chalmers have been very strong on functional programming for quite a while, being (or have been) home to many influential people. Apart from those named in this paper, I can name John Hughes (Haskell/QuickCheck), Thierry Coquand (Coq) and Ulf Norell (Agda) just from the top of my head.
- anentropic 4y agoA bit of a shame for this person: https://github.com/verse-lang/verse https://github.com/verse-lang/verse (I'm pretty sure that's not what is discussed in these slides...)
- casey2 4y agoBased Comic Sans chad makes hackers seeth. More at 11.
- abeppu 4y agoI looked at the slides and the start of the paper. I'm mainly confused about two points: - What's the advantage of introducing a new lambda calculus extension? What will we understand about Verse in virtue of the existence of VC that we don't understand about e.g. minikanren? - How does the rewriting based execution compare with the search procedures of existing logic programming systems, and how does that impact how one would use Verse? For example, it sounds like they both want Verse to be purely declarative and performant enough to support the metaverse. But: - The way the slides expand out the choice of two variables makes it look like it's working in DFS order. The paper makes a big point of rewriting expanding out values "spatially" rather than in time. And I guess it's relatively clear how the rewriting system would produce DFS-like behavior ... but that's a problem isn't it? - E.g. minikanren as one of its key design points chose its interleaved search so that search could give comprehensive results on problems where DFS would (naively) never return, because it would go down some infinite rabbit hole. And minikanren, wanting to be more declarative, doesn't rely on "extra-relational" operators like "cut" which are important for prolog. This was supposed to have the impact that users don't need to worry about imperatively controlling the search, but this is only half-true in that users must pick the order in which variables are introduced extremely carefully. So if one says "x, y, z are all nats in (0, 1, ...) and x * x + y * y == z * z", it seems that, as with DFS, the rewrite system would include a path which tries to expand out and then check all of the (0, 0, z) possibilities to the left of any of all of the (0, 1, z) possibilities, etc. So even if under lenient evaluation there's _some_ tree that finds (3, 4, 5), and this may be reached in chronologically finite time, there's an infinite pile of work to be evaluated _to its left_. So can one never take the "first" element from this sequence, since it seems this means "left-most"? Or does this whole thing need to implicitly be restricted to searches over finite domains? It seems like either one must loosen assurances of ordering within sequences, or one must include "extra-logical" means to control the rewrite process.
- zactato 4y agoIts 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 the gaming world. He still runs Epic, he's still publishing papers on gaming. I don't think any of the other folks from that early era of PC gaming are still relevant in the field (Carmack moved on to VR and now AGI).
- bmitc 4y agoIt 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.
- haliq 4y agoAfter reading the paper and watching the lecture, I think I know what it means that Types are first class values. In verse `=` is unification and not assignment or comparison. Meaning its a constraint on the lhs and rhs. Unification is also an expression meaning it can be normalized to a value e.g. `x=3` normalizes to `3` Expressions can be sequenced with `;` but note this is nothing like imperative programming due to unification. These sequences normalize to the last expression in the sequence but the unifications in all subexpressions apply to the whole sequence. Thus `=` appearing in subexpressions in any order does not change the resulting value (since the compiler uses normalization) Now functions can be seen as lambdas or anonymous functions to these sequences of expressions where the arguments are also constraints! These functions themselves are values. Thus functions are first class. Another key aspect of unification is that functions can run backwards. Thus `swap<1,2>` will return `<2,1>. But so will `swap(p) = <1,2>` constrain `p` to `<2,1>. Thus the meaning of function is no longer just a procedure. But more of a specification or constraint. And this is exactly what types are in Verse. Types are functions thus first class. When we say `i : Int` it is akin to saying `Int(i)` constraining the variable `i` based on the constraint `Int`. Thus if you have a function that succeeds when given an even number, that function can be seen as a type of even numbers.
- deterministic 4y agoIt is nothing new. See Dependent Types. Used by most formal proof assistants (Coq/LEAN/…) and languages like Agda and Idris. I highly recommend the book “Type Driven Development” if you want a great introduction to the power of DT.
- haliq 4y agoOh this is new because our notion of expressions; thus functions, are different. Sure you can have terms in types in dependent types; thus functions in types is nothing new. But again, we have a much different notion of function here. And if anything I would say types in Verse are much closer to refinement types because of its ability to apply constraints. But they are still not the same thing.
- mark_l_watson 4y agoI might as well start with: I was disappointed to get near the end and see that ShipVerse would not be available until sometime in 2023. Other than that I like a galactic scale transactional memory and trying to make Haskell simpler for the masses while still supporting professional programmers. I worked hard to understand the slides (BTW, I am an enthusiastic but not skilled Haskell programmer) and in 6 months or so when they drop ShipVerse I wonder how much I will remember.
- deterministic 4y agoI must admit that I am a bit disappointed. Verse doesn’t seem to bring anything new to the table that will make developers more productive. Perhaps it would be better for the team to work on a runtime environment (think JVM or similar) optimized for the metaverse. With compilers for a number of languages compiling to it.
- herrington_d 4y agoVerse is really a disciplined cue-lang on steroid. https://cuelang.org/ https://cuelang.org/
- herrington_d 4y agoOne thing I really like Verse is it makes prolog/datalog cute.
- kybernetikos 4y agoI feel a bit sorry for https://github.com/verse-lang/verse https://github.com/verse-lang/verse whose just-for-fun toy language has been name stomped by epic and SPJ.