Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)C
Posts
0
Comments
522
Joined
3 yr. ago

  • LLVM

    Jump
  • There is no reference counting if the count is always one.

    The defining feature of reference counting is that its a runtime check. Which in turn results in a runtime performance.

    If there is no in memory counter at runtime, nobody calls that reference counting.

  • "good code is better than mediocre code" definitely one of the statements of all time.

  • It's more than 10 years old. It has stable syntax, big standard library, big library ecosystem, plenty of rust programs already in production.

    If by "evolving" you mean "changing", I don't think that is an issue at all. At most, they add features. They don't change or remove. And with the editions system, it should be no issue.

    If by "evolving" you mean "improving", then I don't see how that could ever be an issue.

  • I don't give a fuck about your bible.

  • No.

    A stack overflow is a symptom, not the illness. A fork bomb is an illness.

    Software coming from the mathematical point of view, assummes it has infinite resources. However, a real computer has many resources that are finite.

    CPU time is finite. Memory amount is finite. There is a finite number of network ports. And so on.

    A stack overflow just means: "you have run out of this resource called 'the stack'". The stack is a region of the memory. Each thread of each process has 1 stack, and it is not infinite in size. This program will cause a stack overflow because it is infinitely recursive, and each function call will consume a bit of the stack.

    A forkbomb is not the end of a finite resource. A fork bomb is a program that uses "forking" to rapidly consume system resources. A fork bomb might cause a stack overflow. Or an out of memory issue. Slow the computer a lot. Or if the OS has a hard limit for process amount, it might reach that limit.

  • Deleted

    Permanently Deleted

    Jump
  • "in 20 years" doesn't get as much hype as "in 3 months"

    Maybe if they said "in 3 months" instead we would've actually have had it in 20 years. Seeing how much ai attracts money with these obviously unbelievable promises.

  • Deleted

    Permanently Deleted

    Jump
  • From the makers of "fusion energy in 20 years", "full self driving next year" and "AI will take your job in 3 months" cones "all code will be AI in 6 months".

    Trust me, it's for real this time. The new healthcare system is 2 weeks away.

    EDIT: how could I forget "graphene is going to come out of the lab soon and we'll have transparent flexible screens that consume 0 electricity" and "researches find new battery technology that has twice the capacity as lithium"

  • It was years ago. So I don't remember what exactly the problem was.

    I believe ocaml has a shell interpreter and a compiler right? I managed to get the shell interpreter to work, but I couldn't get one of these to work:

    • Compiler
    • LSP

    The reason I prefer windows is because things just work. But it was a frustration with ocaml. Meanwhile rust was a single command for the compiler, and a single extension install for the LSP.

  • Rust is not fully functional. But I am legally obligated to recommend it any time I can.

    Jokes aside, this doesn't apply to you, since you seem to actively learn functional programming. But for people that are scared of it, rust looks like "normal" languages, but has tons of features that can be attributed to functional programming. Even more so if you avoid using references. You can easily "mutate" objects the functional way, by passing the object to the function, and the function creates a new object with just some value changed.

    It has algebraic data types. Function pointers. Iterators. Pattern-based match statements. Don't have class inheritance. Inmutable by default. Recursion. Monads. And probably other FP features that I'm missing.

    It has basically every functional feature while having familiar syntax.

    It's also extremely easy to install. Which I didn't use to appreciate, but then I tried to learn OCaml and had to give up because I couldn't set up a proper dev environment on windows.

    1. Why vs code web and not desktop vscode?
    2. At least on the desktop version, there's a "><" (with the ">" being higher) looking icon in the lower left corner. Click that to open remote sessions.

    I don't know if vs code web can do remote sessions. So the button might not be there

  • Well, the closure has a type. Just you cannot declare it. That's why you do "impl Fn" instead. Because you know that whatever type the close is, it implements the "Fn" trait.

  • I do enjoy cleaning code a lot.

    When I work on shitty code I'm always thinking about how shitty it is and thinking on how a different design would make it much easier.

    When you clean the code, you're implementing that perfect design you were thinking of all that time. And you know from that point on you'll be thinking less about how shitty the code is.

    If your only task is to clean code and you're not gonna work on that codebase afterwards, it's not as rewarding though.

  • The "drop the array and slice syntax" is just nuts. With 0 justification.

  • It also needs like 30 minutes to load a single comment of a PR.

    If I wasn't forced by my job. I would stay as far away as possible from bitbycket.

  • If it has three letter variables, chances are it was also written by someone that doesn't want to code either

  • I haven't done the experiment, I'm curious to know if you can take a random binary compiled for Linux 10 years ago run on the latest version of popular distros. See in which ones it runs.

  • Rust

    Jump
  • Rust doesn't have "safe" and "unsafe" modes in the sense your comment alludes to.

    You can just do the little unsafe thing in a function that guarantees its safety, and then the rest of the code is safe.

    For example, using C functions from rust is unsafe, but most of the time a simple wrapper can be made safe.

    Example C function:

     
        
    int arraysum(const int *array, int length) {
        int sum = 0;
        while (length > 0) {
            sum += *array;
            array++;
            length--;
       }
    }
    
      

    In rust, you can call that function safely by just wrapping it with a function that makes sure that length is always the size of array. Such as:

     
        
    fn rust_arraysum(array: Vec<i32>) -> i32 {
        unsafe{ arraysum(array.as_ptr(), array.len() as i32)}
    }
    
    
      

    Even though unsafe is used, it is perfectly safe to do so. And now we can call rust_arraysum without entering "unsafe mode"

    You could do similar wrappers if you want to write your embedded code. Where only a fraction of the code is potentially unsafe.

    And even in unsafe blocks, you don't disable all of the rust checks.

  • Non profits do have corporate leeches too. The executives at Mozilla have executive salaries. That is, hundreds of thousands, or millions.

    They don't work out of the goodness of their hearts. And Mozilla has to find a way to earn the income to pay their bloated salaries.

  • And that's why lunch should be paid if it's inside the workday.