based or cringe?

https://harelang.org

  1. 4 weeks ago
    Anonymous

    Based, but Ponylang is better

  2. 4 weeks ago
    Anonymous

    cringe, I'd much rather just use C.

  3. 4 weeks ago
    Anonymous

    Makes some nice design decisions, but there's no real benefit to it and it makes just enough bad decisions that it's not really worth learning

    • 4 weeks ago
      Anonymous

      Based an actually new C lang that has man pages(Looking at you zig.), isn't complete bloat, (looking at you zig and glibc)
      Still needs mans for its standard lib though

      What's the worst one ?

      • 4 weeks ago
        Anonymous

        >What's the worst one ?
        Mandatory 8-wide tabs

        • 4 weeks ago
          Anonymous

          like Zig but tab?

        • 4 weeks ago
          Anonymous

          it's not enforced by the compiler. it's only a suggestion.

          • 4 weeks ago
            Anonymous

            [log in to view media]

            >it's only a suggestion
            Tabs are a mandatory part of the language style guide (MUST). The compiler may ignore it, but it's still a violation to use spaces instead of tabs. The 8-column-width is technically optional at least.

      • 4 weeks ago
        Anonymous

        >What's the worst one ?
        Definitely the retarded inheritance implementation. In Hare all structs are subtypes of their first field. This inadvertently takes the worst ideas from OOP and then makes them implicit, arbitrary and compulsory.

        • 4 weeks ago
          Anonymous

          [log in to view media]

          >In Hare all structs are subtypes of their first field
          Based, BTFOs all anti-OOP luddites
          >"Just use composition!"
          >"Just use composition!"
          >"Muh composition!"
          >use composition
          >it works like inheritance anyway
          >"NOOOOOOOOOOO YOOOOOOOU CAAAAAAAN'T DOOOOOO THAAAAAAAAAT NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"

          • 4 weeks ago
            Anonymous

            >Based, BTFOs all anti-OOP luddites
            Pretty sure that group includes the language's creator, which makes it even funnier

            • 4 weeks ago
              Anonymous

              [log in to view media]

              >In Hare all structs are subtypes of their first field
              Based, BTFOs all anti-OOP luddites
              >"Just use composition!"
              >"Just use composition!"
              >"Muh composition!"
              >use composition
              >it works like inheritance anyway
              >"NOOOOOOOOOOO YOOOOOOOU CAAAAAAAN'T DOOOOOO THAAAAAAAAAT NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"

              >What's the worst one ?
              Definitely the retarded inheritance implementation. In Hare all structs are subtypes of their first field. This inadvertently takes the worst ideas from OOP and then makes them implicit, arbitrary and compulsory.

              Retards. Aggregates are inherently polymorphic with their leading fields even at a machine code level. This is the case in almost all languages: the aggregate's binary layout is simply the concatenation of those of its fields in declaration order, joined with typless don't-care-valued interjections at varying widths to ensure optimal alignment per field. Therefore, unless you pointlessly pad the beginning of the struct just to be contrarian, the address of the struct is always, unavoidably, equal to the address of its leading field, and reinterpreting the struct as the type of its leading field will yield the leading field itself. You can forbid access to this intrinsic polymorphism, sure. Most languages do so. But why? It's stupid. You're introducing extra complexity to the compiler to achieve a targeted *loss* of language functionality. "I don't like that functionality" is no justification for this, no matter how right you may be not to like it.

              • 4 weeks ago
                Anonymous

                Awful take. Just because it's easy to implement does not make it a good feature. This mentality is responsible for some of the worst design decisions ever made.

              • 4 weeks ago
                Anonymous

                >artificial constraints GOOD
                enjoy your bloat

              • 4 weeks ago
                Anonymous

                I bet you're a big fan of null references and array decay

              • 4 weeks ago
                Anonymous

                [log in to view media]

                why yes how could you tell

              • 4 weeks ago
                Anonymous

                Not all languages always lay out their fields in declaration order. Rust for example will reorder them to pack them more efficiently, unless you annotate the struct to request the C ABI.

                >artificial constraints GOOD
                enjoy your bloat

                Artificial constraints can leave room for other features and optimizations. Including in this case.
                It's good to be able to opt in to this stuff, but it doesn't have to be the default. Most structs aren't going to pull this trick.

              • 4 weeks ago
                Anonymous

                This sounds like the rationale for allowing null pointers.

              • 4 weeks ago
                Anonymous

                On the contrary, null pointers were designed on purpose and did not have to be the way they are.
                It actually slightly *adds* complexity, at an operating system level, to implement null pointers, than not to implement them.
                Address 0 is reserved unmapped space in the process VAS. This is so that dereferencing null will always crash.
                This is desirable on the theory that if a pointer is uninitialized, it will usually, albeit not always, tend to be 0 -- and, furthermore, we can simply make it always 0 by initializing to 0 by convention -- so if we make sure dereferencing 0 always crashes, we can make use-before-allocate errors a little more tractable.
                There's no intrinsic hardware reason that address 0 has to be reserved in the VAS in this way. It's done specifically to allow the null pointer idiom to exist and work.

              • 4 weeks ago
                Anonymous

                Virtual addresses =/= physical addresses, in general.

                On some machines, physical address 0 can be meaningfully used in programs.

              • 4 weeks ago
                Anonymous

                Yes this is true.
                I am a little surprised you bring it up as it doesn't seem relevant
                But it's certainly true

              • 4 weeks ago
                Anonymous

                This is an exceptionally bad rationale for this decision. This is an intentionally leaky abstraction whose only basis is how record types are often implemented under the hood.

                When programming in a high level language providing you with these constructs, you shouldn't have to think about such underlying details unless you're trying to squeeze out the most performance possible (even then, reordering fields to optimize padding is something that is very easy for compilers to do).

              • 4 weeks ago
                Anonymous

                You don't need a subtype relationship to use pointers to the first member interchangeably. C does it just fine without it (in fact, this is a very common technique to parse network packets in Linux, you just move the pointer past the header and cast it to the payload type).

                Introducing a subtype relationship is a poor idea since it now forces every aggregate to be able to be treated exactly like its first member, which often makes no sense.

                I find it unbelievable how we have, for the millionth time, someone who attempts to design a language intended to replace C without a proper understanding of its purpose, its strengths and its weaknesses. Hare looks more like a mere middle finger to C++ and Rust than a project with a clear, well defined scope (and no, I have never personally used Rust, I don't even know how to write Hello World with it).

          • 4 weeks ago
            Anonymous

            It's not true inheritance if you can't actually change the subtype's behavior
            A real OOP fan would know this

            • 4 weeks ago
              Anonymous

              >if you can't actually change the subtype's behavior
              You can.
              Just write functions ("methods") that accept the first field (base "class") as a leading argument ("receiver"), and overloads that accept the whole struct (derived "class") as a leading argument.
              This approach only gives you static override resolution (yes, override resolution, not overload resolution, although in this case it does also happen to be that). For dynamic override resolution, you would need a vtable field. And frankly thank god we don't fucking have that bloated garbage, fuck your dynamic override resolution if that's what it takes.

              • 4 weeks ago
                Anonymous

                >overloads
                No such thing.
                I've come across three kinds of polymorphism in Hare.
                Tagged unions: https://harelang.org/tutorials/introduction/#tagged-unions-in-depth
                Compiler builtins: https://harelang.org/tutorials/introduction/#growable-slices
                Manual vtables: https://docs.harelang.org/io#stream

              • 4 weeks ago
                Anonymous

                [log in to view media]

                >No such thing.
                dropped

              • 4 weeks ago
                Anonymous

                >For dynamic override resolution, you would need a vtable field.
                If you need dynamic dispatch, you need a vtable equivalent or something worse.

        • 4 weeks ago
          Anonymous

          >In Hare all structs are subtypes of their first field.
          For real? This seems like an exceptionally stupid idea, I fail to see what problem this would solve.

  4. 4 weeks ago
    Anonymous

    [log in to view media]

    >intentionally doesn't support threading

  5. 4 weeks ago
    Anonymous

    >Muh generics
    I am beginning to take interest

  6. 4 weeks ago
    Anonymous

    Going strictly off the hello world:
    >language in current year
    >can't iterate over an array without a manual for-loop
    Mega cringe.

  7. 4 weeks ago
    Anonymous

    This must be a pretty close to the metal language then, huh?

    Why not just write to asembly?

    • 4 weeks ago
      Anonymous

      "Assembly" isn't portable.

  8. 4 weeks ago
    Anonymous

    So if I was going to make something like a graphics engine or other low level tasks like memory management Hare is worth considering?

    Python is too slow
    C++ is bulky to write
    Hare is supposed to be clean and easy but lacks safty nets and as of right now, support.

    • 4 weeks ago
      Anonymous

      Hare's compiler doesn't perform many optimizations and it doesn't have multithreading. (You could hack it in, but much of the standard library isn't threadsafe.) Hare's goal is less to be fast and more to be simple. And simple means that everything works straightforwardly, not necessarily that it's simple to use.
      It's also unfinished.
      If you're doing it purely for fun then you could consider Hare. I know there's a raytracer written in it, and I think I saw SDL bindings.
      If you want something production-ready and C++ won't do then I guess it's C or Rust. Zig if you're adventurous.

      • 4 weeks ago
        Anonymous

        >but much of the standard library isn't threadsafe.
        Then issue a pull request, ma'am.

        • 4 weeks ago
          Anonymous

          It's on purpose, Drew DeVault (PBUH) thinks userspace multithreading is difficult and unnecessary for good performance.
          Fixing it requires less ergonomic APIs. Or maybe thread locals, but I don't know a lot about those.

          • 4 weeks ago
            Anonymous

            >Drew DeVault (PBUH) thinks userspace multithreading is difficult and unnecessary for good performance.
            Strawman
            He thinks that it's wrong for people to ship garbage that's ten times slower than it needs to be, but eats ten cores to make up for it. It's about creating and maintaining a good ecosystem/reputation for the language.
            Look at what happened to C++ and then rust.

          • 4 weeks ago
            Anonymous

            [log in to view media]

            I guess I should post an example.

            >Drew DeVault (PBUH) thinks userspace multithreading is difficult and unnecessary for good performance.
            Strawman
            He thinks that it's wrong for people to ship garbage that's ten times slower than it needs to be, but eats ten cores to make up for it. It's about creating and maintaining a good ecosystem/reputation for the language.
            Look at what happened to C++ and then rust.

            He said that. Maybe not word for word, and there was justification to go along with it, but I remember that was what it boiled down to.
            He distinguished between userspace multithreading (hard to get right) versus process-level parallelism (reasonable) and kernel multithreading (necessary). He talked about getting his calculator OS to boot instantly and how that proved you don't need multithreading for fast software.
            Maybe his real opinion is more nuanced and he expressed that somewhere else. But that's the version I got.
            >It's about creating and maintaining a good ecosystem/reputation for the language.
            The logical reference point for Hare would be C, not C++ or Rust. How did C's multithreading play out?
            I don't think it led to sluggish over-parallelized C software. At least not to the point that's a stereotype for C.
            It did lead to a lot of bugs, which is a good justification for not having it.
            I'm not even saying he's wrong. I think it makes sense for the kind of software he wants to write.

            • 4 weeks ago
              Anonymous

              No, the logical reference is C++ and Rust.
              Languages who just say yes to every new feature unquestioningly
              Add "good" multithreading, and low and behold we find again and again that adding all encompassing features to a language makes the programs that come out the other end worse.

            • 4 weeks ago
              Anonymous

              >How did C's multithreading play out?
              Up to, and including C99 (which is still a very popular standard), C did not include any form of multithreading in the standard, it was always left to the implementation. Even in C11 and newer, the majority of projects still use pthreads or some other specific implementation.

              What many people don't realize is that multithreading, just like networking, has historically been a strictly platform-specific feature, which programming languages did not standardize for portability reasons.

              Introducing a standardized threading model in the language itself is risky because it enforces a particular behavior onto the underlying implementation.

              • 4 weeks ago
                Anonymous

                True, but it's possible to accommodate threading without committing to a particular model and Hare chose not to do that. You can call pthread_create() but if you then want to call strconv you better add a global lock or limit it to a single thread because you can't give it your own buffer.

              • 4 weeks ago
                Anonymous

                >Introducing a standardized threading model in the language itself is risky because it enforces a particular behavior onto the underlying implementation.
                It's complicated because there are some very different platforms out there, especially once you move away from the "happy zone" of desktops and laptops. When you're dealing with an embedded RTOS, stuff can get pretty weird by comparison to what you're used to.

    • 4 weeks ago
      Anonymous

      If you have to ask, you're not going to undertake this project anyway.

  9. 4 weeks ago
    Anonymous

    Wow another C clone
    >b-b-but one thing is slightly different!!!!
    C is dogshit and everyone who has used any other language for more than 5 minuses know this.

    All these cringe C clones are still worse than Ada (1983) all these years later.

    • 4 weeks ago
      Anonymous

      I started on Haskell and I can tell you C is miles better.

  10. 4 weeks ago
    Anonymous

    Drew is on the verge on suicide. Won't be surprised if he 41%'s himself before he finishes the language.
    https://drewdevault.com/2022/05/30/bleh.html

    • 4 weeks ago
      Anonymous

      OMG it's that drew LOLOLOLOLOLOL guess go is stuffing out the competition ROFLMAOLMAOLMAO

      • 4 weeks ago
        Anonymous

        snuffing* OLOLOL

    • 4 weeks ago
      Anonymous

      >It’s irresponsible, if not immoral, to design a language without a borrow checker in 2022.
      yes, that is the only flaw in your meme lang, drew
      the only flaw

    • 4 weeks ago
      Anonymous

      lmao was gonna post this too

    • 4 weeks ago
      Anonymous

      I have never understood what the fuck people have against Drew. He's contributed more to free software than 99.9% of dumbfucks on LULZ or any other platform where people hate on him ever will. And I've never seen any constructive criticism. It's always either lying or straight up hate. The fuck is wrong with you all?

      • 4 weeks ago
        Anonymous

        He's loud, stupid and arrogant

        • 4 weeks ago
          Anonymous

          I'd also be loud and arrogant if people kept being complete and utter retards when it comes to commenting on everything I do. I saw people shitting on Drew for supporting Wayland, claiming that it couldn't take screenshots, when the compositor that he made himself could take screenshots perfectly fine.

      • 4 weeks ago
        Anonymous

        >He's contributed more to free software than 99.9% of dumbfucks on LULZ
        kek he's done fuck all

      • 4 weeks ago
        Anonymous

        >He's contributed more to free software than 99.9% of dumbfucks on LULZ
        He's made a shitty memelang that makes other memelangs seem relevant, and a mediocre i3 clone for Wayland. Whoopee.
        The 102 IQ framework mashers in /wdg/ have probably made more useful shit.

        • 4 weeks ago
          Anonymous

          >He's made a shitty memelang that makes other memelangs seem relevant, and a mediocre i3 clone for Wayland
          infinitely more useful than anything LULZ can make just by virtue of being anything at all
          >The 102 IQ framework mashers in /wdg/
          webdev is not technology

      • 4 weeks ago
        Anonymous

        meh. People who knows that they will never be good or successful takes joy in bringing everyone else down.
        It's a very common social dynamic, people simply don't want to accept that not everyone is a failure like them

        • 4 weeks ago
          Anonymous

          [log in to view media]

          Welcome to the internet. A bunch of webdevs thinking they're geniuses kek

      • 4 weeks ago
        Anonymous

        1. he's tired of this anti-wayland horseshit
        2. he has rust-phobia, that is enough for HN people to turn against him

      • 4 weeks ago
        Anonymous

        t. Drew

  11. 4 weeks ago
    Anonymous

    Cringe. garden gnome Dehomosexual is also on suicide watch: https://drewdevault.com/2022/05/30/bleh.html

  12. 4 weeks ago
    Anonymous

    Yet another C clone, who gives a fuck.

Your email address will not be published.