Threads for caente

  1. 1

    Taking the risk of jinxing myself: I am continue to explore an idea I had yesterday. I am making a story that will be told inside a “game”, using some of the same feedback mechanisms as role playing games, such as health bars, perhaps a minimap, etc, but it won’t be a game, it will be a actual story that I am writing at the moment. my long term plan is to actually make a little game in unity, and “act” the script I am writing inside of it, but the “game” itself won’t be meant to be released. hopefully this won’t become yet another paper weight inside my computer…

    1. 1

      You’ve made me very curious. How do draw the line between a game and an interactive story? Or do you mean that the final output won’t be interactive, you’re making a machinima-like thing, but with a custom game and presenting game-like visual elements to the viewer? Either way, it sounds like a fun project and I hope we get to see the result!

      1. 1

        indeed the current goal is that the output be just a regular video, although I can conceive that the next phase to still not be interactive, but the story could be witnessed inside the “game”.

        I also hope that I will see a result!

      2. 1

        Hey, you might wanna check out Nicky Case’s games. Sounds quite like what you have in mind.

      1. 10

        I was expecting a technical rant, and I was curious about python specific issues with pattern matching, but it ended up being a rant about ergonomics and intuition. And as someone who codes in Scala, pattern matching is obviously obvious, and it is also obvious that you won’t want to replace every if/else with it. This person seems to be just annoyed about a new syntax construct. Perhaps they are lacking the intuition to think in terms of pattern matching.

        1. 17

          Rust has some nice quality-of-life improvements that make up for the toil of memory management. Even when I don’t strictly need a systems programming language, I still use Rust, because I like sum types, pattern matching, foolproof resource cleanup, and everything-is-an-expression so much.

          So for glue code in GUI apps or CRUD webapps I’d love some Rustified TypeScript, Rustscript on the Golang runtime, or a Rust/Swift hybrid.

          1. 10

            Pretty much all of the ‘quality-of-life improvements’ you mention came to rust by way of ocaml, and are also present in other functional languages like haskell and scala. For webapps, try purescript or possibly elm.

            1. 5

              ocaml won’t be a “higher level rust” until multicore ocaml has matured.

              1. 3

                To any other readers: I wouldn’t ignore the language based solely on this, especially since multicore parallelism wasn’t one of the criteria in the top comment. Lwt and async give you concurrency if you want it.

              2. 5

                Pedantic nitpicking: resource cleanup (RAII) is a big one, and it‘s from C++. Everything else is indeed from ML.

                1. 4

                  And traits are from haskell, and single ownership is from cyclone.

                  But a large part of rust was directly inspired by ocaml.

                  1. 5

                    I was specifically referring to the list in the top comment. For fuller list, I would consult the reference.

                    Cyclone doesn’t have single ownership/affine types. It has first-class support for arena-based memory management, which is a weaker form of rust‘s lifetimes, and is a different feature.

                    See http://venge.net/graydon/talks/rust-2012.pdf for list of influences for both ownership and borrowing parts.

                      1. 2

                        I stand corrected, thanks a lot!

                2. 1

                  Or reasonml since it is a front end for ocaml. Or bucklescript since it is ocaml that targets Javascript.

                  Disclaimer: never used them myself.

                3. 3

                  Rustified TypeScript

                  I write a lot of TypeScript but have only written a few hundred lines of Rust. I’m curious, which features of Rust do you miss when using TypeScript? The obvious one is traits, but I’m curious if there’s anything else.

                  1. 5

                    Not the person you replied to, but true sum types, especially Option. It’s much cleaner than undefined, even with all of the nice chaining operators. And not having to worry about exceptions thanks to Result.

                    1. 3

                      Ah, I see your point. TypeScript discriminated unions are used frequently to overcome this limitation, but I agree it would be preferable to have proper sum types with pattern-matching.

                      type Square {
                          type: "square";
                          width: number;
                          height: number;
                      }
                      
                      type Circle {
                          type: "circle";
                          radius: number;
                      }
                      
                      type Shape = Square | Circle;
                      
                      1. 2

                        Oh god I miss TypeScript’s sum types so much when I’m writing Rust. When I context switch back to Rust after writing some TypeScript I with I could do

                        type Foo = Bar | Baz;
                        

                        Eventually I get over it but I find TypeScript so much nicer for describing the types of my programs.

                        1. 3

                          Oh yes. I wish TypeScript had more Rust, but I also wish Rust had row-level polymorphism.

                          1. 2

                            Maybe someday https://github.com/tc39/proposal-pattern-matching will happen. That will be a great day.

                          2. 1

                            same here, but on the other hand, those cool union types without pattern matching makes the call site uglier, and almost removes the nicety of the union type declaration

                            1. 1

                              Yes, you can relax a function that returns Foo | undefined to return Foo only, but in most “maybe” systems you can’t return a naked Foo without the Maybe<Foo> box

                        2. 1

                          In that Rust/Swift hybrid, what parts of Rust would you want added to Swift to make the hybrid? I read this article thinking Swift wouldn’t be a bad start.

                          1. 6

                            In Swift I miss “everything is an expression”. I have mixed feelings about Swift’s special-casing of nullability and exceptions. Terser syntax is nice, but OTOH it’s more magical and less flexible/generalizable than Rust’s enums. Swift inherited from ObjC multiple different ways of handling errors (boolean, **NSError, exceptions) — that’d be an obvious candidate for unification if it could start from scratch.

                            And if it was a “smaller Swift”, then I’d prefer a mark-and-sweep GC. With memory management Swift is neither here nor there: you need to be careful about reference cycles and understand lifetimes for bridging with FFI, but it doesn’t have a borrow checker to help.

                        1. 12

                          I find the whole Zig / Zen thing super annoying. Zig is MIT licensed meaning closed source forks entirely part of the social contract. There was an apparently a disruptive community member who was banned and that former community member started a fork.

                          THIS IS HOW IT’S SUPPOSED TO WORK!

                          If you want derivative works to be open source then you can chose a license that requires that. If you don’t want any derivative works at all then you can make your project source available with a license that restricts forks, but that’s not open source definitely not free software.

                          I wish Andrew would celebrate the fact that his creation is successful enough to inspire forks rather than obsess about them.

                          1. 26

                            Reading the statement implies that there is no problem with Zen being closed-source code. Seems the foundation Is concerned with false statements used to advocate Zen. Maybe I’m missing more context.

                            1. 3

                              This is exactly how I read it. They address the fork from their side.

                            2. 23

                              https://news.ycombinator.com/item?id=24483162

                              As a Japanese-speaking software engineer

                              Many of my friends didn’t actually know until this statement was made that Zen is a fork of Zig

                              And there you have it. Did you want me to celebrate the fact that people were being tricked?

                              Also check out the license section of Zig’s readme. The law is a blunt weapon and not always the most appropriate tool for the job.

                              1. 19

                                I think the point being made is more that these kind of issues are largely solved by the GPL, which I wholeheartedly agree with - not to say that you deserve the trickery and abuse that’s going on here, which you clearly don’t.

                                However, GPL having fallen by the wayside in recent years for new projects does make things like this kind of inevitable for those projects that use permissive licenses.

                                1. 14

                                  GPL being suppressed coincided with the adoption (usurption) of Open Source by corporations. Greed leads to FUD.

                                2. 4

                                  The law is a blunt weapon and not always the most appropriate tool for the job.

                                  What a great way to put it. I need to save this quote somewhere.

                                  It’s also a weapon that seems extremely difficult to wield. As a regular person open source developer, how would you even start an international lawsuit against a license violator?! How much are all the fees? How do these even work? What if the countries are not friendly? What would you even achieve with the lawsuit other than lots of stress for everyone involved?

                                  I know there are non-commercial foundations that help with copyleft enforcement, but they probably aren’t going to help every small project ever.

                                  1. 3

                                    The law is a blunt weapon and not always the most appropriate tool for the job.

                                    It is, but it’s also worth highlighting that there’s a big discrepancy between what we expect open source to be, and what the Open Source licenses actually require.

                                    1. 4

                                      That’s why I’ve stopped contributing to open source.

                                    2. 3

                                      This may be off topic, but I feel like it’s the only appropriate thing to add to this conversation: Thanks for your work on Zig, it’s super neat!

                                      1. 4

                                        If you think it’s important for users of your code to know your name and/or the name you chose for the software you should choose a license that embodies that value. The original BSD license is a popular example. The BSD copyright owners chose to change the license to remove that requirement and now people who fork their code don’t mention them at all. Many macOS users have no idea that much of the system they’re using is derived from BSD Unix. Maybe that’s good, maybe that’s bad, but it’s the intended behavior.

                                        1. 8

                                          If you think it’s important for users of your code to know your name and/or the name you chose for the software you should choose a license that embodies that value.

                                          Not at all. This presupposes that you’re comfortable using the legal system to enforce what you think is important. I can think it’s important not to plagiarize work (for example) while simultaneously putting my code into the public domain, which legally allows plagiarism simply because I don’t think the legal system is the right way to solve those kinds of problems. Laws != Ethics.

                                          1. 4

                                            Yeah, but you can’t enforce ethics.

                                            So when someone comes across a project that is licensed like this, and (rightfully) essentially does whatever they want with it, They have the legal high ground.

                                            So the best you can do at that point is public shame them. It just sounds like people want their cake and eat it too. You wanna use a permissive license to get that sweet wide adoption? Great, but accept the risks, or start with copyleft.

                                            1. 14

                                              So the best you can do at that point is public shame them

                                              bruh

                                              1. 7

                                                I feel like you read my comment, ignored it, and just decided to say, “use laws or STFU and stop complaining.” That’s a lame response.

                                                So the best you can do at that point is public shame them.

                                                Yeah that is one method. What do you think is happening here?

                                                1. 1

                                                  nothing is happening here… I doubt Zen feels shamed

                                                  1. 6

                                                    Zen feeling shamed is not necessary for ostracization tactics to be effective.

                                              2. 3

                                                It’s not plagiarism to fork a MIT licensed project. It’s not unethical to take a work whose authors have explicitly asked not to be credited, make changes and not credit them. MIT licensed its software like this so that proprietary Unix vendors could take X11 and fork it. When you start a project and choose a license like this you’re making a clear statement about what your expectations are.

                                                1. 8

                                                  Plagiarism is the representation of another author’s language, thoughts, ideas, or expressions as one’s own original work. This is absolutely plagiarism. It may be legal (I’m not convinced; it’s probably illegal in Europe), but it’s definitely unethical.

                                                  Being on the right side of the law but the wrong side of your friends sounds like something only a real loser would celebrate.

                                                  1. 3

                                                    Okay, then you’re making the argument that Laws == Ethics. Why not just come out and say it?

                                                    It’s not unethical to take a work whose authors have explicitly asked not to be credited, make changes and not credit them.

                                                    This is disingenuous because that’s not the argument I’m making. A license is about what’s lawful. So the only thing a public domain (for example) declaration says is that “I will not use the legal system against you if you do bad things like plagiarize.” That is nowhere near saying “I’ve explicitly asked not to be given credit.”

                                            2. 7

                                              The license, sure, but the issue here is more ethics than legal. The article didn’t even once mention legality, but was focused on the ethics of what is going on, and rightfully warning other developers so they don’t get caught the same way others have.

                                            1. 2

                                              I will finally dare to change the strings of my guitar for the first time in my life…

                                              Also will keep pushing forward my little project for diffs inside Scala.

                                              Keep digging in TAOCP (we have a meetup and everything! https://www.meetup.com/theartofcomputerprogramming )

                                              And of course, play and play with my 4 yo

                                              1. 1

                                                Non tech (guitar):

                                                I’ll work on the CAGED system, also more and more exercises with the pick, I just got too used to use my fingers for strumming.

                                                On the tech side:

                                                I’ll keep working on my side project for a reasonable way of making diffs on tree-like data structures, notably instances of classes in Scala. The goal is a diff that is also a tree-like structure, so it is easier to manipulate. At work we are currently using the regular diff from unix, but I wasn’t able to make it work for data structures, only text. Which is important too for our use case, but not enough.

                                                1. 1

                                                  oh this is LIVE! thank you