Skip Navigation
Why is Go syntax so messy
  • To do quick and simple explanations:

    var test int = 0
    

    assign an int, var = let in rust land

    := 
    

    This is basically an inferred assignment e.g.

    a := "hello world"
    

    The compiler will know this is a string without me explicitly saying

    func (u User) hi() {}
    

    To return to rust land this is a function that implements User. In OOP land we would say that this function belongs to the user class. In Go, just like in rust we don't say if a function returns void so this function is for User objects and doesn't return anything:

    func (u User) hi(s string) string {}
    

    If it took in a string and returned a string it would look like this.

    map[string] int {}
    

    I will give you that this syntax is a bit odd but this is just a hashmap/dictionary where the key is a string and the value is an int

  • Google Messages rolling out 15-minute RCS editing
  • I'm not sure this is a fair comparison, since this is only coming to RCS and not SMS my (completely unsubstantiated) guess would be that this is a message protocol issue.

    On the other hand Signal is an encrypted internet messaging service and editing internet messages has been easy for everyone not named twitter for years.

  • evil-helix: A super fast modal editor with Vim keybindings
  • I feel like helium works as well as helix. When I search Helix I don't get the editor but if I search Helix Editor I will get what I'm looking for.

    When I search Helium editor I don't get any exact matches, but of course SEO is a dark and mystical art so your mileage may vary.

  • “ARE YOU ALL SEEING THIS”
  • I like how at the start of the line it explicitly says "out of memory" but we're just pretending this is some satanic bullshit.

    She obviously read the error to find "kill process" and "sacrifice child" but still ignored the memory error

  • Google Fit dev APIs shutdown set for June 2025
  • I'm not sure this should be added to the "killed by google" list. Reading the article it looks like Google is replacing Google Fit with Health Connect. Now, it's an app that's still in beta, so it probably doesn't have feature parity yet but this looks more like a deprecation instead of a service shutdown to me.

  • STOP DOING DEPENDENCY INJECTION
  • At work we have a lot of old monolithic OOP PHP code. Dependency injection has been the new way to do things since before I started and it's basically never used anywhere.

    I assume most people just find it easier to create a new class instance where it's needed.

    I've never really seen a case where I think, "dependency injection would be amazing here" I assume there is a case otherwise it wouldn't exist.

  • Announcing py2wasm: A Python to Wasm compiler
  • It looks like it's 3x faster than the previous cpython wasm compilation. Recall that most of the performance improvements in python have been done in the last ~2 releases.

    My distro is debian based so it's still on 3.10 which I would guess this new wasm implementation is much closer to in performance.

    Compiling to wasm also means that you can distribute a binary rather than needing people to have python installed.

  • Pretty critical PR for rust-msi is getting held up because the maintainer understands the intent but not why this works
  • What mantra? I think this maintainer is doing the right thing here by trying to understand why this fix works.

    You should always attempt to address the root cause of an issue instead of slapping band aid patches onto everything.

    To me it looks like the maintainer is trying to find out what exactly is wrong. "this doesn't happen in our C implementation" implies that there's something wrong with the rust code specifically.

  • Java 23: The New Features are Officially Announced
  • From the way I'm reading it, it sounds like a super() call in a constructor must be the first thing you do or something you don't do? I never knew that was a thing... Looking at my old java code, I haven't written Java since I graduated, this does seem to line up?

  • PEP 744 – JIT Compilation
  • In the article it's said that the JiT has similar performance to the latest stable interpreter but that it's also very unoptimised. So I would assume it's inferior to the pypy implementation right now.

  • Introducing .NET Smart Components - AI-powered UI controls - .NET Blog
  • I really don't get it, I suppose the setting to auto fill common patterns on a form could be useful. But why do I care about an autocompleting textbox? Do you think I've never used a search engine in my life?

  • C++ creator rebuts White House warning
  • I remember watching a video of someone writing C code and making the same thing in unsafe rust. While the C code worked just fine the rust code had UB in it and was compiled to a different set of instructions.

    Unsafe rust expects you to uphold the same guarantees that normal rust does and so the compiler will make all the same optimisations it would if the code wasn't unsafe and this caused UB in the example rust code when optimised for performance. It worked just fine on the debug build, but that's UB for you.

  • As someone not in tech, I have no idea how to refer to my tech friends' jobs
  • I don't know where "software engineer" started but in Australia engineers have to study for years and then do a minimum amount of study every year to keep their license. Which we don't have to do. I've always been weirded out by Software Engineer even though it seems to be becoming more common.

  • 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/)SO
    Solemarc @lemmy.world
    Posts 0
    Comments 74