Skip Navigation
Buttons Buttons @programming.dev
Posts 10
Comments 347
Python Overtakes JavaScript as Most Popular Language on GitHub
  • Deno looks interesting.

    But Bun choosing Zig makes me think their priorities are not my priorities. As of now, you choose Zig (a not-yet-stable language) because you want to learn Zig and make a neat side-project. Those are not my priorities. Zig offers no unique advantages other than neat new syntax.

    Deno chose Rust, which, like Zig, is new, but Rust has reached 1.0 and offers a unique advantage with its safety features. I'm not saying anything about the greatness of Rust here, only that Rust does offer unique advantages, and Rust could be chosen because of general priorities.

    Bun chose Zig and then worked backwards and formed their priorities around Zig. Deno formed their priorities and their priorities lead them to Rust.

    That's how I feel anyway.

  • Python Overtakes JavaScript as Most Popular Language on GitHub
  • Were just waiting on WASM to be able to access the DOM APIs directly, and then all languages will be first class citizens on the web, and then RIP JavaScript.

  • The empire of C++ strikes back with Safe C++ proposal
  • Fortran is still a good language for some purposes I think.

    And I feel the same way, C++ tries to solve the problem of having too many features by adding more features.

  • What are some mind blowing Rust tricks?
  • What if I specify the wrong type? let retrieved = storage.get::<SomeOtherType>();?

    Is it a runtime error or a compile time error?

  • Machine vision moment
  • I'd rather believe it's a bunny than acknowledge snails that large exist.

  • What are your favorite statically typed, compiled, memory safe programming languages?
  • I wouldn't consider Julia statically-typed; am I wrong?

  • What are your favorite statically typed, compiled, memory safe programming languages?
  • The question mine as well be "what is your favorite compiled language?". There is a lot of overlap between the possible answers.

  • Godot staff are facing a huge reactionary backlash on Xitter for being "woke"
  • I hear you. It's no good to just cede ownership of a word and allow others to define it however suits them. But... it's Twitter, getting into a good faith philosophical discussion about the definitions of words ain't going to happen, so in many cases it's better to just not bring up the controversial words at all. Guess there's pros and cons to each.

  • Godot staff are facing a huge reactionary backlash on Xitter for being "woke"
  • I agree. That's why I suggest (or more like implied) that when we know we have different definitions of a word, we avoid using that word. It's a good thing to at least try if two people really care about understanding.

  • Godot staff are facing a huge reactionary backlash on Xitter for being "woke"
  • "Woke" is a problem because people have different definitions, and no matter what Webster or any other authority says the definition is, people will continue to have differing definitions.

    How can we reach understanding when we don't even agree on the definition of words?

    This is way to nuanced to deal with on fucking Twitter. If you use the word "woke" on Twitter, expect a lot of misunderstanding, talking past each other, and bad faith arguments to follow.

  • Godot staff are facing a huge reactionary backlash on Xitter for being "woke"
  • I did not suggest banning any words.

    To understand why I'm opposed to the word "woke", you must first acknowledge this fact:

    Sometimes people have different definitions of the same word.

    If you're willing to accept that, then it logically follows that using a word that people have different definitions of will cause more confusion than understanding. If our goal in speaking is to convey understanding, then that is best accomplished by avoiding words where people have conflicting definitions.

    We've all learned that there are facts and opinions, but there is a third category: definitions.

    If you watch for it, you will see that many disagreements boil down to nothing more than disagreeing about the definition of a single word. If we temporarily avoid using that word, suddenly we find ourselves in agreement, or at least having a better understanding of each other.

  • Godot staff are facing a huge reactionary backlash on Xitter for being "woke"
  • Finally a place I can share my cold takes. (I'm not on Twitter, I won't discuss this on Reddit either.)

    1. The community manager had a meltdown and blocking everyone was a power trip and was wrong.

    2. Godot's tweet was wrong, because it used the word "woke" which immediately drives any conversation into the gutter. Doesn't matter if you're on the right or left, as soon as you say the word "woke" you have ruined the conversation.

    3. It is good that Godot explicitly supports LGBT+ people. They should be welcome. The community CoC should make this explicit, and it does. A tweet to reaffirm this is fine, a cringe joke born from the dredges of Twitter is less fine.

    4. Godot's "revenge forks" are amusing and will not go anywhere. Someone might collect some donations before grifting into the night though.

    5. None of this has any effect on Godot's technical suitability for creating a game.

  • "Would U.S. tech workers join a union?" survey average: 67% likely
  • How would you force someone to take time off?

    If I was their boss I would say something like "you're job is to stay home and do anything besides work for the next week, you will still be paid for this time". Easy.

    As for the on-call stuff. Yes, that's the point. It should be unsustainable for a company to continually rely on their daytime programmers for frequent on-call alert handling.

    If off-hours issues happen often, the company can hire an additional team to handle off-hours issues. If off-hours issues are rare, then you can depend on your daytime programmers to handle the rare off-hours issue, and know that they will be fairly compensated for being woken up in the middle of the night.

    I've been at too many companies where an off-hours alert wakes up a developer in the middle of the night and the next day the consensus is "that's not good, but we'll have to fix the underlying issue after we finish implementing the new UI the design team is excited about". It's not right for a developer to get woken up in the middle of the night, and then the company puts fixing that on the backburner.

    I'll say it again. It's about aligning incentives. When things that are painful for the worker are also painful for the company, that is alignment. Unfortunately, most companies have the opposite of alignment, if a developer gets woken in the middle of the night the end result for the company is that they got some additional free labor, that's pain for the worker, reward for the company; that's wrong.

  • "Would U.S. tech workers join a union?" survey average: 67% likely
  • When I think of a tech worker union my thoughts first go to standardizing everyone's pay and limiting what I can earn myself. I've probably fallen to anti-union propaganda.

    A tech worker union that says nothing about pay could still do so much.

    A union could ensure that the company's incentives are aligned with worker's incentives around things like on-call.

    I'd love a union that forced a company to give all on-call workers compensation. Something like:

    1. If you're woken up in the middle of the night, you automatically get 8 hours comp time (time off), plus 2x the time you spend on-call during off hours.
    2. Accrued comp time over 20 hours must be payed at 10x normal pay if the employee leaves the company for any reason. The idea here isn't for employees to accrue comp time, but to give the company a strong incentive to ensure employees use their comp time.

    Basically, if a company is having lots of on-call alerts, or the company is preventing employees from using their comp time, you want this to be directly painful to the company. Incentives should be aligned, what is painful for the worker should be painful for the company.

    Or, regarding "unlimited PTO". I'd love to see a union force companies to:

    1. "Unlimited PTO" policies are fine, but they must have a guaranteed minimum amount of PTO specified in writing. So none of this "yeah, we heave 'unlimited PTO'; oh, we're really busy this quarter, so can you wait to take PTO until next quarter?".

    Tech workers have it good compared to a lot of workers, but there are still plenty of abuses a union could help with, even if the union never even mentions pay.

  • I make games and this literally happened to me this morning
  • What is the game? It's not being a shill to answer questions.

  • Paralyzed Jockey Loses Ability to Walk After Manufacturer Refuses to Fix Battery For His $100,000 Exoskeleton
  • Like anything medically related in the US, it's our time to crack open our wallets and do our patriotic duty of paying half the nation.

    Like, if I want to talk to a doctor for 5 minutes, then it's my time to pay the all the insurance industry workers, and I have to pay my part of those 3 minutes long drug commercials you see on TV every ad break and before every YouTube video, and I have to pay all those people locking down the medical devices so that the users can't use their own data. This is my time to shine, I got to pay for all this because I talked to the doctor for 5 minutes. Also, hopefully in the end I have a few cents left over to give to the doctor.

    Fucking rent seekers...

  • Ubisofts stock tanked this morning ahead of the markets opening
  • Look at the entire history.

    In 2018 their stock price was about 24, now it's 2.

  • Error message
  • I haven't written any Java since Java 6. This makes me so happy to hear.

    What about XML, and XML based configs? Is the Java ecosystem still obsessed with XML?

    I remember I was once trying to learn Hibernate. After finding what I thought looked like the best tutorial, I skimmed through it and there was literally no Java code in the tutorial about a Java library! It was all XML! I never could understand it, but this was early in my career, maybe I could handle it now, maybe not.

  • Can I remove a git repo without resorting to rm -rf ?

    Git repos have lots of write protected files in the .git directory, sometimes hundreds, and the default rm my_project_managed_by_git will prompt before deleting each write protected file. So, to actually delete my project I have to do rm -rf my_project_managed_by_git.

    Using rm -rf scares me. Is there a reasonable way to delete git repos without it?

    45

    At least we looked up from our own cellphones long enough to do something

    55

    Can anyone relate?

    4

    Possible bug: I can't reply to a specific comment?

    I cannot reply to the following comment. I have tried a dozen times over the last couple hours. Anyone else able to?

    https://programming.dev/comment/185004

    6

    py-spy, one of the tools I miss most when working in other languages

    github.com GitHub - benfred/py-spy: Sampling profiler for Python programs

    Sampling profiler for Python programs. Contribute to benfred/py-spy development by creating an account on GitHub.

    GitHub - benfred/py-spy: Sampling profiler for Python programs
    3

    Godot looks great, but I want to separate game logic and display.

    I like most things I see about Godot, and I'm going to try making some games with it.

    Whenever I imagine programming a game though, I imagine the game logic and simulation being separate from the display. For instance, if I was to make a game like FTL, I would plan to simulate all the ship interactions and the movement of the characters purely in code, and then write a separate module to render that simulation. The simulation could be rendered with graphics, or with text, or whatever (of course, a text render wouldn't be human friendly, but could act as a dedicated server for some games, or I could use it for machine learning, etc).

    I'm not an expert at Godot, but it seems this mindset is not going to fit well into Godot. Is this correct? It seems like the same object that is responsible for tracking the players health is going to also be responsible for drawing that player on the screen and tracking their location on the screen, etc. Will my player class have to end up being a subclass of some complicated Godot class? (Also, I'm a fan of functional programming and don't always use a lot of classes if given the choice.)

    What are your thoughts about this. Would you recommend another engine? No other engine seem to be in the same sweet spot that Godot is currently in.

    15

    Does Lemmy really benefit from Rust? Is code execution speed the bottleneck?

    My first experience with Lemmy was thinking that the UI was beautiful, and lemmy.ml (the first instance I looked at) was asking people not to join because they already had 1500 users and were struggling to scale.

    1500 users just doesn't seem like much, it seems like the type of load you could handle with a Raspberry Pi in a dusty corner.

    Are the Lemmy servers struggling to scale because of the federation process / protocols?

    Maybe I underestimate how much compute goes into hosting user generated content? Users generate very little text, but uploading pictures takes more space. Users are generating millions of bytes of content and it's overloading computers that can handle billions of bytes with ease, what happened? Am I missing something here?

    Or maybe the code is just inefficient?

    Which brings me to the title's question: Does Lemmy benefit from using Rust? None of the problems I can imagine are related to code execution speed.

    If the federation process and protocols are inefficient, then everything is being built on sand. Popular protocols are hard to change. How often does the HTTP protocol change? Never. The language used for the code doesn't matter in this case.

    If the code is just inefficient, well, inefficient Rust is probably slower than efficient Python or JavaScript. Could the complexity of Rust have pushed the devs towards a simpler but less efficient solution that ends up being slower than garbage collected languages? I'm sure this has happened before, but I don't know anything about the Lemmy code.

    Or, again, maybe I'm just underestimating the amount of compute required to support 1500 users sharing a little bit of text and a few images?

    150

    Effective Rust: 35 Specific Ways to Improve Your Rust Code

    www.lurklurk.org Effective Rust

    A collection of specific ways to improve your use of Rust

    0
    www.joelonsoftware.com The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)

    Ever wonder about that mysterious Content-Type tag? You know, the one you’re supposed to put in HTML and you never quite know what it should be? Did you ever get an email from your friends in…

    The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
    10

    I can't write "if let x" in Rust without this song popping into my head

    0