• 0 Posts
  • 99 Comments
Joined 1 year ago
cake
Cake day: December 29th, 2023

help-circle

  • Pup Biru@aussie.zonetoProgrammer Humor@programming.devYes, But...
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    10 days ago

    Resource not found Data not found (client error). Data not found (server error)

    they are all the same thing; there is no useful, practical distinction between them

    if we request a list of objects and nothing was found, because we asked for a date when there was no data, its not an error. But i suppose many still just throw around exceptions still instead of handle them properly

    it’s an empty array: not found when requesting something specific is an error… that’s different to here is the complete set of 0 objects… like like if you have an array and request an index that doesn’t exist you get an exception, but that doesn’t mean an empty array is exceptional: it is in fact very valid

    using an error code for a non-error

    well, it is an error though. you have requested a URI for an object that doesn’t exist: it doesn’t matter whether it’s a resource or an individual thing

    remember that HTTP youre asking the server for some object matching a URI: please give me the object matching /users/bananoidandroid and /userssssss/bananoidandroid may both not be found for the exact same reason: the object referenced by that string does not exist

    here’s the spec definition for 404

    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

    when you’re dealing with specs, deciding not to follow them because you feel like they’re wrong is not appropriate… this leads to bugs and issues in compliant tools because they make assumptions about what things mean

    200 means the thing that you asked completed successfully

    here’s the definition of 200:

    The request has succeeded. The information returned with the response is dependent on the method used in the request, for example:

    GET an entity corresponding to the requested resource is sent in the response;

    HEAD the entity-header fields corresponding to the requested resource are sent in the response without any message-body;

    POST an entity describing or containing the result of the action;

    TRACE an entity containing the request message as received by the end server.

    *edit: when talking about compliant, standard tools the classic example is transparent cache: a GET should not transform the resource and thus a GET with response of 200 can be cached… an API that uses a GET to modify a resource may cause transparent proxies (or CDNs) to significantly mishandle the user request… same goes for 200 vs 4xx and 5xx: proxies know that 200 means what it means and may cache based on that, where 5xx should never be cached and 4xx is probably dependant on which specific 4xx


  • Pup Biru@aussie.zonetoProgrammer Humor@programming.devYes, But...
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    10 days ago

    error codes aren’t about who’s at fault… you don’t send a 404 because it’s the users or the servers fault. it’s information… a 404 says something doesn’t exist… it’s nobody’s fault; it just is

    a 4xx says the request, if tried again without changes or external intervention, is unlikely to succeed

    a 5xx says the request might have been fine but some other problem that you can’t control occurred so may be retried without changes at a later time

    these are all standard things that are treated in standard ways by generic HTTP libraries… look at, eg axios: a javascript HTTP library that’s often thinly wrapped to build API clients… a 200 is just passed through as success, where 4xx and 5xx will throw an error: exactly what you’d want if you try to retrieve a non-existent object or submit a malformed payload…

    this is standard behaviour for a lot of HTTP libraries, and helps people accidentally write better code - an explosion is better than silence for unhandled exceptions


  • I’m sure Fedora is full of binary blobs and not-so-free software

    fedora is staunchly opposed to non-free software in their default distro … that spat a few weeks ago with OBS was related to that AFAIK

    unsure about like signed blobs for “security” services but i imagine they’d be very limited, and optional

    rather than sticking a white label on Fedora and call it something else

    but for what benefit? no matter what’s trying to be achieved, starting with a very full-featured, robust OS that’s widely used is going to serve you very well… not just technically (less work for the same outcome), but for human reasons

    there are loads of guides out there for how to fix fedora issues, few for guix… loads of RPMs that are compatible with fedora, and i can only imagine fewer packages for guix

    and then if you’re talking about server OSes - and actually workstations too - managing them with tools like ansible etc… fedora is going to have off the shelf solutions

    just Fedora with different theme

    well, the actual software and configuration i’d argue aren’t the important part - owning the infrastructure is the important part… package mirrors, distribution methods (eg a website), being able to veto or replace certain packages, and the branding (or regulation) that draws people to it… being able to roll out a security patch to every installation without a 3rd party okaying it, for example


  • i’d say if it happens it should start with focusing on:

    • government and workstation (this is important first to have control and independence over so that government isn’t beholden to the whims of foreign companies)
    • then server (maybe - idk really if that’s worth it though; it’s a whole can of compatibility worms and adoption expense)
    • then user desktop

    though there is the argument that workstation and user desktop are close enough to each other that user desktop should be above server, but i’d imagine it’d be more of a “home user” than gamer situation. i could imagine some regulations around refurbishing old tech with this kind of OS too, and this would be more about low spec machines (that’d help workstations too)


  • alternative POV: it’s entirely FOSS so there’s little control that can be exerted from its use. it’s also entirely free, so use is extracting value without providing anything in return. by its use, you’re taking resources to maintain, host, etc and providing nothing in return

    similar reason to why i don’t use ecosia with an ad blocker: by blocking ads you’re using their resources without giving back and thus you’re taking resources away from the charity



  • python in general tends toward readability over performance optimisation… you’re right they’re an advanced concept, and i’d say if you ever use bitwise operators in python they should be wrapped in some descriptive and very minimal function: treat it like a black box, because the next person that comes along likely won’t understand what’s happening without a pretty good description

    a bit field is just not a descriptive data structure, so manipulate it directly as little as possible

    i’d also say that most peoples use of bitwise operators is when unpacking external data formats (network traffic, operating system primitives, files formats, etc) and they’re usually wrapped in data structures that make those things more pythonic

    unless you know you need bitwise operators, you probably don’t need bitwise operators


  • Pup Biru@aussie.zonetoProgrammer Humor@lemmy.mlDevelopment Methods
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    28 days ago

    waterfall:

    • you want to go to mars
    • plan to build a rocket
    • sign contracts with vendors for every tiny part
    • shit we didn’t need most of those parts but it’s too late
    • continue to follow the plan anyway
    • you now have a rocket but it doesn’t really work properly because parts needed shims to work together because the brochure didn’t mention that and the people making the plans weren’t actually building anything and also you actually wanted to drive to the beach but now you have a rocket so you have to use it anyway so you fly your rocket to the beach for $20m and you bail out and it explodes and everyone has run screaming but you’re technically on the beach and now you have to pay environmental clean up costs too





  • the problem is not with the change: the problem is with the implementation… we have international organisations that manage things like place names, and the president of the US doesn’t have the authority to just go ahead and change an internationally agreed upon thing. in the US? perhaps… but it’s bat shit insane that globally we now see both names. it’s like trump saying everything globally has to default to fahrenheit and feet and google etc just complying without question

    but also, as other commenters have mentioned: there’s no real issue with the original name; it’s just nationalism and racism that triggered the change




  • To suggest a machine neutral network “thinks like a human” is like suggesting a humanoid robot “runs like a human.” It’s true in an incredibly broad sense, but carries so little meaning with it.

    i wasn’t meaning to suggest that it thinks like a human - simply that the processes are similar enough, and humans aren’t non-replicable… in which case there is some process behind creativity, and that process is some sort of input, processing via our neural processes, and some output. the intent was to say that AI having the possibility of creativity shouldn’t be dismissed off-hand just because it’s not human

    If the AI is creative in the same way as a person, then it is a slave.

    is it though? does creativity rely on being able to interpret the concept of freedom? i think creativity can be divorced from a sense of self, and thus any idea of slavery except in the sense of anthropisation from a 3rd party

    but I am against selling it

    why though? if the art is the inspiration and intent, then the prompt is the art and the image itself is only the expression of that inspiration and intent - all are essential parts of the piece

    It’s sad to see an entire industry of workers get replaced by machines,

    agree and disagree there - it’s sad that a huge amount of artists that have devoted their lives to honing their craft are now less able to make money from using their skills… on the other hand, it’s the democratisation of skills. AI art allows more people to communicate their ideas without the need for skill


  • It’s also a tacit admission that the machine is doing the inspiration, not the operator. The machine which is only made possible by the massive theft of intellectual property.

    hard disagree on that one… the look of the image was, but the inspiration itself was derived from a prompt: the idea is the human; the expression of the idea in visual form is the computer. we have no problem saying a movie is art, and crediting much of that to the director despite the fact that they were simply giving directions

    The legality of an act has no bearing on its ethics or morality.

    Except their hired artist is a bastard intelligence made by theft.

    you can’t on 1 hand say that legality is irrelevant and then call it when you please

    or argue that a human takes inputs from their environment and produces outputs in the same way. if you say a human in an empty white room and exposed them only to copyright content and told them to paint something, they’d also entirely be basing what they paint on those works. we wouldn’t have an issue with that

    what’s the difference between a human and an artificial neural net? because i disagree that there’s something special or “other” to the human brain that makes it unable to be replicated. i’m also not suggesting that these work in the same way, but we clearly haven’t defined what creativity is, and certainly haven’t written off that it could be expressed by a machine

    in modern society we tend to agree that Duchamp changed the art world with his piece “Fountain” - simply a urinal signed “R. Mutt”… he didn’t sculpt it himself, he did barely anything to it. the idea is the art, not the piece itself. the idea was the debate that it sparked, the questions with no answer. if a urinal purchased from a hardware store can be art, then the idea expressed in a prompt can equally be art

    and to be clear, i’m not judging any of these particular works based on their merits - i haven’t seen them, and i don’t believe any of them should be worth $250k… but also, the first piece of art created by AI: perhaps its value is not in the image itself, but the idea behind using AI and its status as “first”. the creativity wasn’t the image; the creativity and artistic intent was the process