• 0 Posts
  • 81 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle


  • I definitely agree on the last point. Personally I like languages where I can get the compiler to check a lot more of my reasoning, but I still want to be able to use all the memory management techniques that people use in C.

    I remember Jonathan Blow did a fairly rambling stream of consciousness talk on his criticisms of Rust, and it was largely written off as “old man yells at clouds”, but I tried to make sense of what he was saying and eventually realised he had a lot of good points.

    I think it was this one: https://m.youtube.com/watch?v=4t1K66dMhWk


  • That’s what std::move does, and you’re right that it’s quite an ugly hack to deal with C++ legacy mistakes that C doesn’t have.

    I say move semantics to refer to the broader concept, which exists to make manual memory management safer and easier to get right. It’s also a core feature of Rust.

    Also I’m talking about parametric polymorphism, not subtype polymorphism. So I mean things like lists, queues and maps which can be specialised for the element type. That’s what I can’t imagine living without.


  • The only conceivable way to avoid pointers in C is by using indices into arrays, which have the exact same set of problems that pointers do because array indexing and pointer dereferencing are the same thing. If anything array indexing is slightly worse, because the index doesn’t carry a type.

    Also you’re ignoring a whole host of other problems in C. Most notably unions.

    People say that “you only need to learn pointers”, but that’s not a real thing you can do. It’s like saying it’s easy to write correct brainfuck because the language spec is so small. The exact opposite is true.


  • I’m not a fan of C++, but move semantics seem very clearly like a solution to a problem that C invented.

    Though to be honest I could live with manual memory management. What I really don’t understand is how anyone can bear to use C after rewriting the same monomorphic collection type for the 20th time.




  • Out of the ones you listed I’d suggest Julia or Clojure. They are simple and have interactive modes you can use to experiment easily.

    Experienced programmers often undersell the value of interactive prompts because they don’t need them as much. They already have a detailed mental model of how most languages behave.

    Another thing: although Julia and Clojure are simple, they are also quite obscure and have very experimental designs. Python might be a better choice. From a beginner’s perspective it’s very similar to Julia, but it’s vastly more popular and lots of people learn it as their first language.

    Based on the languages you found, I’m guessing you were looking for something simple and elegant. I think Python fits this description too.




  • They are not stupid at all. Their interests are in conflict with the interests of tech workers and they are winning effortlessly, over and over again.

    The big tech companies are all owned by the same people. If these layoffs cause google to lose market share to another company, it’s fine because they own that company too.

    What matters is coordinating regular layoffs across the whole industry to reduce labour costs. It’s the same principle as a strike: if the whole industry does layoffs, workers gradually have to accept lower salaries. In other words, the employers are unionised and the employees are not.

    This process will probably continue for the next 20 years, until tech workers have low salaries and no job security. It has happened to countless industries before, and I doubt we are special.

    I’m sure the next big industries will be technology-focused, but that’s not the same as “tech”. They won’t involve people being paid $200k to write websites in ruby.



  • “As we’ve said, we’re responsibly investing in our company’s biggest priorities and the significant opportunities ahead,” said Google spokesperson Alex García-Kummert. “To best position us for these opportunities, throughout the second half of 2023 and into 2024, a number of our teams made changes to become more efficient and work better, remove layers, and align their resources to their biggest product priorities. Through this, we’re simplifying our structures to give employees more opportunity to work on our most innovative and important advances and our biggest company priorities, while reducing bureaucracy and layers”

    There was this incredible management consultant in france in the 18th century. Name eludes me, but if he was still around Google could hire him and start finding some far more convincing efficiencies.

    The guy was especially good at aligning resources to remove layers


  • I greatly fear refactoring in Rust. Making a single conceptual change can require a huge number of code changes in practice, especially if it’s a change to ownership.

    Refactoring in languages like Java and C# is effortless in comparison, and not error prone at all in a modern codebase.

    You can use RC and clone everywhere, but now your code is unreadable, slow, and might even have memory leaks.

    You can use slotmaps everywhere, but now you’re embedding a different memory model with verbose syntax that doesn’t even have first-class references.

    I don’t even dislike Rust; I recently chose it for another project. I just think it has clear weaknesses and this is one of them.


  • Damn, this is a really good write-up.

    I came to most of the same conclusions. I really like Rust, I’m glad it exists, I’m amazed by the people who designed it. It is not very good for creative work at all.

    Honestly the “rewrite it in rust” meme is actually the use case where it shines: when all the requirements are 100% clear up front, and you just need to make a new version of some software that is much faster and more reliable. That is not what game development is like.


  • porgamrer@programming.devtoProgramming@programming.dev...
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 months ago

    I believe Mercury is intended to be comparable to languages like Java, C# and Ocaml, in terms of the performance profile and generality. I don’t know what it’s like in practice though.

    I view it more as a fascinating proof of concept than a language I’d actually like to use. Really I just want new projects to steal ideas from it.


  • Datalog is sometimes used as an alternative to SQL. Prolog is used by researchers experimenting with rule systems (e.g. type systems, theorem provers, etc).

    Mercury has been used to write regular desktop software, with a couple of notable successes.

    One way to think about Mercury is that it’s like Haskell, except it’s so declarative that the functions can run backwards, generating arguments from return values! Obviously that comes with some pretty big caveats, but in many cases it works great and is extremely useful.


  • Prolog, Mercury, Datalog. Very of intrigued by Verse now that I know it has some logic programming features.

    Mercury is, roughly, a fusion of Haskell and Prolog. Bizarre and fascinating.

    Prolog and Datalog are great but not aimed at general purpose programming.

    Really I just want to see more people trying to adapt ideas from logic programming for general purpose use. Logic programming feels truly magic at times, in a way that other paradigms do not (to me at least).