• 0 Posts
  • 68 Comments
Joined 2 years ago
cake
Cake day: June 15th, 2023

help-circle
  • There’s plenty of schemes that aren’t fully standards-compliant but I don’t think leaving out eval is common – it’s easy to implement and nothing about the standard says that it needs to run code fast.

    Just wanted to point out that eval is the real static vs dynamic boundary. As to evil, sure, you shouldn’t run just any code you find without having a sandbox in place, C’s way to do the same thing is to call cc followed by dlopen, that’s way scarier, which is why people just link in lua or something instead. I guess in <currentyear> you should probably include a wasm runtime instead of using dlopen.



  • Rust has affine types and gets close to linear when you include #[must_use] (you can still let _ = foo but at least it won’t be an accident, also, drop code isn’t guaranteed to run and there’s good reasons for that), refinement types there’s a library for that. GADTs… I mean sure trait magic can get annoying and coming from Haskell you’d want to do more in the type system but in the end the idiomatic rust way to do many of those things is with macros. Which, unlike Haskell, Rust actually is really good at. Really good. Tack refinement types onto the language kind of good.

    Proving tools, honestly, there’s only one piece of actually proven software (SeL4) and the only language it’s really written in is Coq. Which Rust will never, ever, compete with on its home turf.



  • Because allow/blocklist are just as old if not even older and are way clearer terminology.

    “white” and “black” there are metaphors, the “master” in git branches and SCSI isn’t.

    See at some point you have to ask yourself the question whether you’d be opposed to the change if blue-haired college students really into performative politics weren’t a thing. Imagine the idea coming from your slightly computer-illiterate 60yold shop floor boss saying “I don’t want to think about the terms here, I want to do CAD/CAM. Speak English, whippersnapper”.


  • The false positive problem actually works in favour of the dogs, here: Their noses are excellent they know exactly whether there’s drugs there or not. They also know that the humans can’t tell so it’s easy to get a treat regardless. And they also know to not overdo it.

    Even more complicated are cats, figures that they are by and large uninterested in being studied or proving anything to you.




  • I seem to be speaking Klingon. I never told anyone to “un-depress” themselves. Quite the contrary, I’m talking about the necessity to accept that it’ll be the path you’re walking on for, potentially, quite a while. All I’m telling you is that that path doesn’t have to be miserable, or a downward spiral.

    Make a distinction between these two scenarios: One, someone has a fever. They get told “stop having a fever, lower your temperature, then you’ll be fine”. Second, same kind of fever, they get told “Accept that you have a fever. Make sure to drink enough and to make yourself otherwise comfortable in the moment. Ignore the idiot with the ‘un-fever yourself’ talk”.


  • I’m sorry what’s long-term executive function about cancelling your appointments? What’s harsh about it?

    What about “take a bath” and “go outside to breathe” is less protestant-work-ethic than what I was saying?

    The simple, actionable things are, precisely, the simple, actionable things. “Breathe in the fresh air” is not actionable when living in a city. “Sit on a bench and people-watch” is not actionable in the countryside. You know much better where you live, what simple things you could do right now. The point is not about the precise action, it’s about that it’s simple and actionable thus you should do it. Also, to a large degree, that it’s your idea, something you want.


  • You’ve laid out your personal depression cure to someone stating that reading about other people’s depression cures is incredibly frustrating when you’re actually depressed.

    That’s not what the complaint was about. The complaint was about the generic drivel. The population-based “We observed 1000 patients and those that did these things got better” stuff that ignores why those people ended up doing those things, ignorance of the underlying dynamics which also conveniently fits a “pull yourself up by the bootstraps” narrative. The kind of stuff that ignores what people are going through. Ignores which agency exists, and which not.

    Read what I wrote not as a plan “though shall get up at 6 and go on a brisk walk”, that’s BS and not what I wrote. Read it as an understanding of how things work dressed up as a plan. Going out and cooking food? Just an example, apply your own judgement of what’s good and proper for you moment to moment. You can read past the concrete examples, I believe in you.

    In most cases the best thing you can do to help is to try to understand how someone is feeling.

    The trick is to understand why you’re in that situation, what your grander self is doing, or at least trust it enough to ride along. Stop second-guessing the path you’re on and walk it, instead. You don’t really have a choice of path, but you do have a choice of footwear.

    Or, differently put: What’s more important, understanding a feeling or where it’s coming from? Why it’s there? What it’s doing? What is its purpose? …what are the options? Knowing all this, many feelings will be more fleeting that you might think.

    There’s an old Discorian parable, and actually read it it’s not the one you think it is:

    I dreamed that I was walking down the beach with the Goddess. And I looked back and saw footprints in the sand.
    But sometimes there were two pairs of footprints, and sometimes there was only one. And the times when there was only one pair of footprints, those were my times of greatest trouble.
    So I asked the Goddess, “Why, in my greatest need, did you abandon me?”
    She replied, “I never left you. Those were the times when we both hopped on one foot.”
    And lo, I was really embarassed for bothering Her with such a stupid question.



  • Sorry, I didn’t know we might be hurting the LLM’s feelings.

    You’re not going to. CS folks like to anthropomorphise computers and programs, doesn’t mean we think they have feelings.

    And we’re not the only profession doing that, though it might be more obvious in our case. A civil engineer, when a bridge collapses, is also prone to say “is the cable at fault, or the anchor” without ascribing feelings to anything. What it is though is ascribing a sort of animist agency which comes natural to many people when wrapping their head around complex systems full of different things well, doing things.

    The LLM is, indeed, not at fault. The LLM is a braindead cable anchor that some idiot, probably a suit, put in a place where it’s bound to fail.


    1. Accept that your brain wants to do something different than what you had planned, thus
    2. Cancel all mid- to long-term appointments and
    3. Use the opportunity of not having that shit distracting you to reinforce good moment-to-moment habits. Like taking a walk today, because you can use the opportunity to buy fresh food today, to make a nice meal today, because that’s a good idea you can enjoy today while the back of your mind does its thing, not something you can do anything about in particular so stop worrying. And you probably don’t want to go shopping in pyjamas without taking a shower so that’s also dealt with. And with that,
    4. You have a way to set a minimum standard for yourself that will keep you away from an unproductive downward spiral and keep depression what it’s supposed to be, and that’s a fewer to sweat out shitty ideas, concepts, and habits, none of which, let’s be honest, involve good food and a good shower. That’s not shitty shit you dislike.

    The tl;dr is that depression doesn’t mean you need to suffer or anything. Unless you insist on clinging to that to be sweated out stuff, that is. The downregulating of vigour is global, yes, necessary to starve the BS, but if you don’t get your underwear in a twist over longer-term stuff your everyday might very well turn out to simply be laid back.

    …OTOH yeah if this is your first time and you don’t have either a natural knack for it or the wherewithal to be spontaneously gullible enough to believe me, good luck.

    Also clinical depression as in “my body just can’t produce the right neurotransmitters, physiologically” is a completely different beast. Also you might be depressive and not know it especially if you’re male because the usual symptom set follows female-pattern symptoms.


  • barsoap@lemm.eetoProgrammer Humor@lemmy.mlOf course
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    9 months ago

    I speak fluent x86, I’ve been writing xor eax, eax before rax was a thing and you had to wonder whether you shouldn’t be using xor rax, rax (you shouldn’t), I figured out how to write linux binaries in pure assembly before arch was a thing, just don’t throw sse or something arcane like aaa at me. But damned if I know a single opcode.

    Reverse engineers are a whole different kind of breed. And apparently they hate rust.


  • All instructions occupy the same amount of space in memory.

    Both ARM and RISC-V have compressed instructions. Dunno how ARM works but with RISC-V the 16-bit instruction set is freely interspersable with the 32 bit one, which also get their alignment reduced to 16 bits. Gets like 95% of the space reduction possible with full variable-width instructions without overcomplicating the insn decoder.

    As to addressing and loads and arithmetic: No such instructions, but every CPU but the tiniest ones are expected to do macro-op fusion for things like indexed loads. Here’s an overview.

    The MMU thing… well the vector extension can do gather/scatter, I guess it could stay within the letter of “use the MMU once” but definitely not the spirit.


  • Nope it’s still a register-register op, that’s very much load-store architecture.

    It’s reduced, not minimalist, otherwise every RISC CPU out there would only have one instruction like decrement and branch if nonzero. RISC-V would not have an extension mechanism. The instruction exists because it makes things faster because you don’t have to do manual bit-fiddling over 10 instructions to achieve a thing already-existing ALU logic can do in a single cycle. A thing that isn’t even javascript-specific (or terribly relevant to json), it’s a specific float to int cast with specific rounding and overflow mode. Would it more palatable to your tastes if the CPU were to do macro-op fusion on 10(!) instructions to get the same result?


  • We can invent one: kn-h. It’s knot-hours, which is technically correct but horrific to look at. It’s like the time I came across hp-h (horsepower-hour) to measure gasoline energy.

    Quite standard, actually. If you buy a fridge over here it’d say something like “150 kWh/a”, which is 17.12 Watts, which is how much the fridge uses on average. People don’t pay for Watts, though, but for kWh, that’s what’s on the bill so kWh/a is way more practical if you want to convert to €/a. Also if you put more than one number in Watts in the docs civilians might get confused, ideally the only one you put there is connection power.

    What’s a hectare?

    I actually have no idea. I know that it’s what farmers pick up women with but I have no real mental image of how much it is. 100m, sure, make that a square but it’s still somehow without meaning.

    but I went into a cold sweat thinking about all the awful things that would happen with a 25 mm inch,

    Blame the Swedes, or more precisely Carl Edvard Johansson, inventor and manufacturer of gauge blocks. Before that the US and Brits had slightly incompatible definitions of inches and he split the difference pretty much in the middle and rounded a bit and ended up producing 25.4mm gauge blocks, and only after that industry even started to be precise and actually adhere to proper measures – without wide availability of reference gauge blocks that was impossible. He should’ve rounded just a bit further.



  • The knot is non-SI but perfectly metric and actually makes sense as a nautical mile is exactly one degree meridian. kn also doesn’t clash with kN, Newtons are always written with capital N. Capitalisation generally matters. No standard abbreviation exists for nautical miles but definitely don’t use nm because newtonnano metres.

    That is, if you take all those colonial units out of there suddenly you’re left with SI units and things that work well with SI units.

    Oh and a pint is 500ml, a pound is 500g, a hundredweight is 50kg (because 100 pound), and a teaspoon is rather approximate because everyone outside of North America will use an actual spoon you stir tea with. The important part is not the precise amount but distinguishing it from “a pinch” etc. I guess by extension ounces should be 25ml and 25g. While we’re at it: An inch is 25mm, and a foot an even 1/3rd of a metre while a yard is exactly one metre.

    Did you know that a Newton metre is about exactly one chocolate bar metre? The work it takes to lift it in about standard gravity, that is. Very intuitive.

    t for ton is a quirk in SI, you can use Mg if you want. There’s also other SI-adjacent strangeness such as the hectare, which is one hecto-are: While SI has meters for length and litres for volume somehow the are isn’t official for area.