• 0 Posts
  • 22 Comments
Joined 6 months ago
cake
Cake day: August 15th, 2024

help-circle
  • I think you can have it, but you’d need to spend a pretty penny.

    All it would take is calling an electrician to run the appropriate wiring from the place you want the kettle plugged in to you breaker box, connect it to the breaker box with the appropriate breaker, cap off the other end with the appropriate plug (a 240V plug does exist in America), and then buy a kettle capable of receiving the rated voltage and current and splice on the appropriate plug (because I presume you won’t find one sold with that plug).

    An extremely expensive way to save maybe three minutes boiling water, but you can do it.




  • I got a 1U rack server for free from a local business that was upgrading their entire fleet. Would’ve been e-waste otherwise, so they were happy to dump it off on me. I was excited to experiment with it.

    Until I got it home and found out it was as loud as a vacuum cleaner with all those fans. Oh, god no…

    I was living with my parents at the time, and they had a basement I could stick it in where its noise pollution was minimal. I mounted it up to a LackRack.

    Since moving out to a 1 bedroom apartment, I haven’t booted it. It’s just a 70 pound coffee table now. :/


  • I’m surprised I’ve yet to hear of a homebrew industry of completely cutting out the microcontrollers and soldering in a Pi or something to drive the raw display. I don’t predict it to be easy, but it doesn’t seem completely unobtainable?

    Flashing a custom bootloader would be even better, but I assume that hasn’t been done because they got that shit cryptographically locked down at the chip level.


  • pixelscript@lemm.eetoProgramming@programming.devThe yaml document from hell
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    edit-2
    25 days ago

    The first four of them are “just how floats work”, yeah. Has nothing to do with JavaScript.

    typeof NaN
    // "number"
    

    Classic, yes, very funny. “NaN stands for ‘not a number’ but it says it’s a number”. But for real though. It’s still a variable that’s the Number type, but its contents happen to be invalid. It’s Not a (Valid) Number.

    The next three are just classic floating point precision moments.

    The Math.max() and Math.min() ones are interesting. Seems that under the hood, both methods implicitly have a fallback “number” that it compares to any argument list you give it that will auto-lose (or at closest, tie) with any other valid number you can possibly give it, so when you give it nothing at all, they leak out. Honestly, makes sense. Kinda ludicrous it needs to have defined behavior for a zero-argument call in the first place. But JS is one of those silly languages that lets you stuff in or omit as many arguments as you want with no consequences, function signature be damned. So as long as that paradigm exists, the zero-argument case probably ought to do something, and IMO this isn’t the worst choice.

    Every other one is bog standard truthy/type coercion shitlery. A demonstration of why implicit type coercion as a language feature is stupid.


  • Toy Story 4 didn’t really wrap anything up, in my opinion. It feels like its own detatched thing.

    I say it’s still a decently good film, it definitely didn’t “ruin” anything by existing like so many sequel-queasy people like to screech. Woody had an arc that developed him in a direction that felt natural for the character and I was pleased by Bo Peep’s return.

    But the themes explored in this film definitely don’t feel core to the overarching narrative the original trio had. The toys’ relationship to Andy was the point. The passing of the torch to the new kid was the bookend. Yes, playing with the question of how toys come to life in the Toy Story universe is neat and all, and I think they handled that tastefully. But that didn’t seem like a question that really needed a spotlight on it.

    Every narrative issue explored in Toy Story 4 felt like a solution looking for a problem. The hallmark of a phoned-in story. It was phoned in quite well, all things considered, but it was still phoned-in.




  • Factorio never ever goes on sale, out of principle. The devs have stated on multiple occasions. They know what their game is worth and they’re upfront about asking every player to pay the same price for it.

    If you’re interested in Factorio at full price, no harm in buying now. If you will never buy it at full price, you will never buy it.



  • I took up enough precious space on this bitch of an Earth in life, so my only wish is to take up as little of it as possible in death.

    No giant overpriced wooden box in a concrete case on a dedicated plot of land, filled with fanciful linens to wrap my lifeless husk specifically treated to rot away as slowly as possible. Not if I get a say. Burn my dead ass to ashes and preferably scatter them to the wind, I don’t care where. Or, as a wise Danny DeVito said, throw me in the trash. Nature will have its way with what’s left. I’m crumbling to entropy anyway, might as well get it over with as efficiently as I can.

    I will not ““become”” a tree, or ““return to”” anyplace. I want to be gone. My lease on this world is over. I explicitly want that lease returned, to the fullest extent it matters.

    Not like I’d necessarily get a say, though. Funerals and their rituals are for the living. The ultimate conclusion of my wish to command nothing of the world after I’m gone is that I also can’t command what happens to my remains after I’m gone. I can express my wishes, but if no one agrees to honor them, so be it.

    If my loved ones want to stuff my corpse in a monkey suit and bury it in an expensive box on a dedicated plot of land for 100 years because that’s how they want to greive my passing, who am I to stop them? I’m dead.


  • This thread alone is showing me how divisive this question is for a lot of reasons. Just the meta-question of “what’s the definition of ‘free speech’ in this context?” on its own makes it a shitshow to answer, let alone the rest of it.

    It says in the name. ‘Free’, ‘speech’. If I can say it, you can’t silence it. Anything more restricted is not ‘free’.

    If that’s what it means to you, then no, “hate speech”, whatever it may be, is included by definition. There is no ambiguity. But that’s a pretty inflexible answer that doesn’t satisfy.

    Well that’s a stupid and useless definition of “free speech”. Obviously some things that can be spoken aren’t ‘free speech’, because they aren’t constructive, they’re not good-faith conversational, they are a form of harm, etc."

    Sure. Under that definition, it’s totally possible.

    But congratulations, by restricting what ‘free speech’ is in any way whatsoever, you’ve invented an implicit judge who rules what is and is not free speech. (And, likely as well, rules what is and is not “hate speech”.) That only kicks the can down the road to the question of, “Is this a fair judge?” And now we are back in the shitshow where we began, we just painted the walls a new color.

    “Free speech” as Americans in particular are so worked up about is a nickname given to one of the amendments of their constitution, which is a clause about disallowing the government from punishing anyone for their speech. Any implication of rights relating to speech outside of this context is a gross misunderstanding.

    If that’s the definition you’re going with, then yes, obviously it’s possible, because that’s where many of us are at right now and have been at for ages. That makes it a rather nothingburger of an answer because it dodges the implicit question of whether we should uphold “free speech” as a principle outside of this context, whatever that may mean.

    The way I see it, the two answers on the extreme ends are cop-outs that don’t actually help anyone, and any answer that exists in the middle just becomes politics. Is it possible to allow “free speech” and simultaneously stop “hate speech”? Yes, with adequate definitions of both. Will any solution that does so be satisfactory to a critical mass of people, randomly selected from all people? Haha no.



  • The two apps are identical and built from the same codebase anyway. K-9 is just a branding asset swap.

    I’ve seen conflicting info from Thunderbird devs on how long they actually intend to keep both branding packages active. I’ve heard no longer than a year. I’ve heard only as long as it takes to get Thunderbird out of beta. I’ve heard they have some sort of agreement with FDroid that obligates them to keep it listed for some minimum duration of time (???). I’ve most recently heard indefinitely, because their build script is just a toggle now and it costs them nothing. Which one do I believe? I have no idea. I doubt K-9 will be kept around in perpetuity, though.


  • Art supplies were historically not cheap. If you wanted to do this for a living, you were probably needing to aim for selling your art to the rich upper class. That implicitly meant catering to their fickle tastes and working on commission. You didn’t make art for you and find your audience later, you made art for the customers you had or you starved.

    And to put it bluntly, realism wasn’t the fashionable hotness for most of human history. The more “crude” styles you may think of as objectively inferior to and less technically impressive as realism were in fact the styles in demand at their respective times. Fashion existed in ancient and medeival times just like it does today, and those styles were the fashion.

    The idea of the independent eccentric artist who lives secluded in their ideas cave producing masterpieces for no one in particular leaving the world in awe at their genius every time they come out with something to show is a very modern concept. If any artist wanted to make a realism painting in an era where it was not popular, they’d be doing it purely for themselves at their own expense. So virtually no one did. Or if they did, their works largely didn’t survive.


  • I don’t think the existence of large instances is in itself strictly antithetical to decentralization. The network effect makes them inevitable.

    The power in the fediverse is everyone has a standard toolset to interact with the entire fediverse. Most people won’t, and that’s okay. The important thing is that, should larger communities become too oppresive as they gentrify, replacing them is a cheap decision, as you and everyone like-minded with you can squad up and leave at any time and lose nothing as the standard tooling of the platform facilitates that migration. You have mobility in the fediverse, and that permits choice to those who seek it.

    This will stop being true once the larger instances start augmenting their experiences with proprietary nonsense. Features that only work there, that you can invest into and become dependant on, that you’d have to give up if you leave.

    The day that happens will be the day that chunk of the Fediverse dies. Or, well, it won’t die, it will probably flourish and do very well. But it won’t be the Fediverse anymore. It will just be another knee-high-fence-gated community, that happens to run on Fediverse tech.


  • For anyone who was using K-9 wondering why Thunderbird looks no different, it’s because they aren’t different.

    They build both apps from the exact same codebase. Only difference between the two are the default color scheme, the branding icons, and the text strings of the application’s name. It’s literally just a choice of which brand skin you prefer.

    Which, honestly, kinda cool. A virtually zero-cost way to keep a few K-9 stans happy.


  • pixelscript@lemm.eetoProgrammer Humor@lemmy.mlComenting code
    link
    fedilink
    English
    arrow-up
    21
    ·
    edit-2
    4 months ago

    I recognize three kinds of comments that have different purposes.

    The first kind are doc block comments. These are the ones that appear above functions, classes, class properties, methods. They usually have a distinct syntax with tags, like:

    /*
     * A one-line description of this function's job.
     *
     * Extra details that get more specific about how to use this function correctly, if needed.
     *
     * @param {Type} param1
     * @param {Type} param2
     * returns {Type}
     */
    function aFunctionThatDoesAThing(param1, param2) {
        // ...
    }
    

    The primary thing this is used for is automatic documentation generators. You run a program that scans your codebase, looks for these special comments, and automatically builds a set of documentation that you could, say, publish directly to a website. IDEs can also use them for tooltip popups. Generally, you want to write these like the reader won’t have the actual code to read. Because they might not!

    The second kind is standalone comments. They take up one or more lines all to themselves. I look at these like warning signs. When there’s something about the upcoming chunk of code that doesn’t tell the whole story obviously by itself. Perhaps something like:

    /* The following code is written in a weird way on purpose.
    I tried doing <obvious way>, but it causes a weird bug.
    Please do not refactor it, it will break. */
    

    Sometimes it’s tempting to use a standalone comment to explain what dense, hard-to-read code is doing. But ideally, you’d want to shunt it off to a function named what it does instead, with a descriptive doc comment if you can’t cram it all into a short name. Alternatively, rewrite the code to be less confusing. If you literally need the chunk of code to be in its confusing form, because a less confusing way doesn’t exist or doesn’t work, then this kind of comment explaining why is warranted.

    The last kind are inline comments. More or less the same use case as above, the only difference being they appear on the same line as code, usually at the very end of the line:

    dozen = 12 + 1; // one extra for the baker!
    

    In my opinion, these comments have the least reason to exist. Needing one tends to be a signal of a code smell, where the real answer is just rewriting the code to be clearer. They’re also a bit harder to spot, being shoved at the ends of lines. Especially true if you don’t enforce maximum line length rules in your codebase. But that’s mostly personal preference.

    There’s technically a fourth kind of comment: commented-out code. Where you select a chunk of code and convert it to a comment to “soft-delete” it, just in case you may want it later. I highly recommend against this. This is what version control software like Git is for. If you need it again, just roll back to it. Don’t leave it to rot in your codebase taking up space in your editor and being an eyesore.