• 9 Posts
  • 43 Comments
Joined 9 months ago
cake
Cake day: December 28th, 2023

help-circle



  • renzev@lemmy.worldOPtoProgrammer Humor@lemmy.mlAI's take on XML
    link
    fedilink
    English
    arrow-up
    17
    ·
    10 days ago

    Please don’t. If you need something like json but with comments, then use YAML or TOML. Those formats are designed to be human-readable by default, json is better suited for interchanging information between different pieces of software. And if you really need comments inside JSON, then find a parser that supports // or /* */ syntax.










  • For a while I had a low-power server for my personal things that stayed on all the time, and a more powerful computer that hosted a minecraft server. As the player count dwindled, I decided to make the minecraft server automatically shut down at midnight, and wake up at 8 in the morning using rtcwake. And eventually I disabled the rtcwake thing entirely, and made the smaller server run a webui that could wake up the minecraft server using wake-on-lan. So if anyone wanted to play, they would first have to remotely turn on the server through a web page. This was all password-protected ofcourse.

    Also, no, I don’t use a UPS. I’ve never seen anyone use a UPS in the country where I live, and I don’t think I’ve experienced a power outtage in like 4 years. Whether or not you need a UPS seems to be largely dependent on where you live.





  • Jokes aside, LLMs are actually pretty nice, since they lower the barrier to entry for programming. A guy I know has been doing all of his data processing with obscure Excel hacks his entire life. But recently he had to parse a file with like a million or so lines, which would take forever in excel, so now he’s hacking together a python script using ChatGPT and meta ai. And in the process, he’s actually picking up a bit of python knowledge himself. He now knows what lists are, how loops and if statements work, and he even understands “intermediate” features like list comprehension and regex. They said llms would replace programmers, but in reality they’re making more of us lol



  • Gradual typing isn’t reinventing the wheel, it’s a new paradigm. Statically typed code is easier to write and harder to debug. Dynamically typed code is harder to debug, but easier to write. With gradual typing, the idea is that you can first write dynamic code (easier to write), and then – wait for it – GRADUALLY turn it into static code by adding type hints (easier to debug). It separates the typing away from the writing, meaning that the programmer doesn’t have to multitask as much. If you know what you’re doing, mypy really does let you eat your cake and keep it too.





  • I don’t know shit about fuck, but you explanation seems correct.

    I do remember hearing that precisely because of the limitations of vinyl compared to CD, music is mastered differently for each medium. So the CD master of a certain song might be more compressed (dynamic compression, not digital compression) to make it sound “louder”, while the vinyl release has a wider dynamic range. So some people might prefer the vinyl version because it actually does sound different to the CD version.

    Keep in mind tho, I might be spreading misinformation here.


  • Digital music can be taken as easily as it can be given.

    Digital does not always mean DRM. You can pry my bandcamp FLACs from my cold dead hands. Physical media nowadays is more about the experience than functionality. Maybe there are snobs who claim that vinyls are somehow functionally superior, but generally the people who use vinyls or CDs or tapes instead of digital are really just looking for that physical experience in a highly digitalized world.

    They have sound quality as good as digital

    CD quality is actually superior to streaming services like spotify (I personally can’t tell the difference tho).