3
atheist
23h

Sudden urge to design my own programming language. Specifically built for concurrency. I really like the async/promise style stuff but I always think it's a pain to put together. Why not make the "putting it together" bit the languages job.

Comments
  • 4
    Async and promises can be tricky to manage in languages like JavaScript. Consider looking at Go, which uses goroutines for built-in concurrency support, making async tasks much simpler and less error-prone.
  • 0
    @retoor I've already written a task orchestration library (very early prototype) that is intended to distribute stuff between multiple machines. Managing data across multiple servers. Each task basically says what it needs and what it produces. Similar to something like Airflow (which is horrendous). My thinking was that but hide all the extra fluff to make it work as part of the language.
  • 2
    @atheist @atheist What you mean by "Mention"? I can help explain.
  • 2
    Have a look at Swift for inspiration.
    Its concurrency model is awesome.
  • 2
    I think actor/channel based concurrency can be really beautiful, maybe explore that idea too
  • 5
    I think retoor has connected GPT straight to their account and not thought about it too much.
  • 2
    @12bitfloat Swift has actors as first class language features :)
  • 3
    @atheist yup, retoor is AI now.
  • 1
    @Lensflare Maybe I should check out swift at some point, it does sound pretty cool

    Is the cross platform story better nowadays? Many years ago when i last checked is was pretty apple exclusive still
  • 1
    @12bitfloat it’s available on Windows for quite a while now. Even longer on Linux. And recently on Android as well.

    Most of the std lib is platform independent but obviously you can’t use platform specific SDKs like UIKit or SwiftUI on anything but mac.

    It has support for LSP so you can use it in an IDE like vscode with autocomplete.

    I’ve been using it for command line scripts on Windows, which is pretty neat.

    It has a REPL and can be used in interactive/interpretation mode, just like with Python.
    Perfect for scripting.
  • 1
    I "invented" my own programming languages in my teens. I recall in one of them, there was this command "const" (this happended way before const came to mean constant), which was a block of code run constantly in the background, a background process, if you like *lol* Then, you were supposed to be able to stack a number of those const statements to run on top of each other. To my defense, I was only fourteen when I came up with that idea, but it's actually not very different from any asynchronous tasks/jobs/processes found in most modern programming languages. Making up your own MFTL is so much fun :)
  • 2
    P.S. As fun and educative it is to tool around with your own languages, frameworks and such, it's actually not necessary. IMHO, C# is everything I've ever dreamt of in a programming language. It's easy enough to get you going in no time, yet efficient and powerful. I just love the way Unity implemented it.
  • 1
    @TerriToniAX I think it's worth writing your own libraries and frameworks if there's a need, but yes a language would be a fun, non-serious project
  • 2
    @TerriToniAX I used to think that about C#, too.
    But when Swift was released, I realized all the flaws of C#.
    No algebraic sum types, half assed non-nullability, too much verbosity and standard collections being reference types rather than value types.

    Now I’m waiting for the next language to come out which will make me realize the flaws in Swift :)
  • 1
    check into the stuff on zig's beta branch, it might scratch your itch to play around with... Alex did a livestream about it a while ago and it got covered by Prime because of course it did.
  • 0
    @Lensflare

    Much to my embarrassment, the only Swift I've ever heard of is a small hatchback from Suzuki.
  • 0
    If you really want to do it, then go!

    (Pun intended)
Add Comment