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

help-circle
  • You are not joking. Comparing a $2000 Purism Liberty with eg. a $200 HMD Fusion. The Fusion has somewhat better screen and battery; much better processor and camera. More RAM, the option of more storage, has NFC. It’s also designed to be easy-to-maintain, but is somewhat thinner and lighter despite having a larger screen area. Are ‘made in USA’ and ‘open-source drivers’ worth paying 10x as much for a noticeably worse phone? (It’s not really ‘made in USA’ either - it’s a mix of US, Chinese and Indian parts assembled in the USA.)

    I think that the people who believe a US-made iPhone will also cost $2k are kidding themselves - economy of scale and all that, but it must be substantially more.


  • Enough of that crazy talk - plainly WheeledDeviceServiceFactoryBeanImpl is where the dependency injection annotations are placed. If you can decide what the code does without stepping through it with a debugger, and any backtrace doesn’t have at least two hundred lines of Spring boot, then plainly it isn’t enterprise enough.

    Fair enough, though. You can write stupid overly-abstract shit in any language, but Java does encourage it.



  • Well now. My primary exposure to Go would be using it to take first place in my company’s ‘Advent of Code’ several years ago, in order to see what it was like, after which I’ve been pleased never to have to use it again. Some of our teams have used it to provide microservices - REST APIs that do database queries, some lightweight logic, and conversion to and from JSON - and my experience of working with that is that they’ve inexplicably managed to scatter all the logic among dozens of files, for what might be done with 80 lines of Python. I suspect the problem in that case is the developers, though.

    It has some good aspects - I like how easy it is to do a static build that can be deployed in a container.

    The actual language itself I find fairly abominable. The lack of exceptions means that error handling is all through everything, and not necessarily any better than other modern languages. The lack of overloads means that you’ll have multiple definitions of eg. Math.min cluttering things up. I don’t think the container classes are particularly good. The implementation of pointers seems solely implemented to let you have null pointer exceptions, it’s a pointless wart.

    If what you’re wanting to code is the kind of thing that Google do, in the exact same way that Google do it, and you have a team of hipsters who all know how it works, then it may be a fine choice. Otherwise I would probably recommend using something else.


  • I feel that Python is a bit of a ‘Microsoft Word’ of languages. Your own scripts are obviously completely fine, using a sensible and pragmatic selection of the language features in a robust fashion, but everyone else’s are absurd collections of hacks that fall to pieces at the first modification.

    To an extent, ‘other people’s C++ / Bash scripts’ have the same problem. I’m usually okay with ‘other people’s Java’, which to me is one of the big selling points of the language - the slight wordiness and lack of ‘really stupid shit’ makes collaboration easier.

    Now, a Python script that’s more than about two pages long? That makes me question its utility. The ‘duck typing’ everywhere makes any code that you can’t ‘keep in your head’ very difficult to reason about.


  • Frezik has a good answer for SQL.

    In theory, Ansible should be used for creating ‘playbooks’ listing the packages and configuration files which are present on a server or collection of servers, and then ‘playing the playbook’ arranges it so that those servers exist and are configured as you specified. You shouldn’t really care how that is achieved; it is declarative.

    However, in practice it has input, output, loops, conditional branching, and the ability to execute subtasks recursively. (In fact, it can quite difficult to stop people from using those features, since ‘declarative’ doesn’t necessarily come easily to everyone, and it makes for very messy config.) I think those are all the features required for Turing equivalence?

    Being able to deploy a whole fleet of servers in a very straightfoward way comes as close to the ‘infinite memory’ requirement as any programming language can get, although you do need basically infinite money to do that on a cloud service.




  • Yeah, Fark used to be great. That bear headline is a beast.

    And then they got rid of the ‘foobies’ (ie. nudity) links off of the main page in order to appeal to advertisers, then they got rid of lots of extra stuff that upset advertisers, then they started shadow-banning paying subscribers if their posts didn’t fit the narrative. And then all the users got fed up of it all and moved ever to Reddit, where the mods were more transparent and there was more of a sense of community. How ironic.

    If your core site content is users posting links and commenting on them, then there’s probably a lesson to be learned about how important it is to treat your users well and have a welcoming, inclusive community. Probably a lesson that Lemmy users have already learned, mind.


  • addie@feddit.uktoxkcd@lemmy.worldxkcd #3085: About 20 Pounds
    link
    fedilink
    English
    arrow-up
    22
    ·
    2 months ago

    Well, we know that our understanding of physics isn’t correct - galaxies rotate faster than we think they ought to based on the amount of matter that we think is in them based on our theories of gravity and the evolution of the universe.

    The “simplest” explanation is that there’s a particle that only interacts gravitationally, and has no other interaction with matter, hence being dark. Gravity might work differently on galactic scales, although it’s hard to make that maths work; or neutrinos (which are also ‘dark’) don’t have the gravitational interaction that we expect from theory.

    Simple answer is that we don’t know, and “dark matter” is the useful placeholder term until we work it out. Could be a lot of things, although there’s a lot of things that we know it isn’t.

    Wikipedia has a big list of all the things that don’t fit our current model, and which a proper theory of everything would have to explain. Dark matter ticks all the boxes, whereas other theories work for one or two but can’t explain the rest.

    https://en.m.wikipedia.org/wiki/Dark_matter


  • You’ve got that a bit backwards. Integrated memory on a desktop computer is more “partitioned” than shared - there’s a chunk for the CPU and a chunk for the GPU, and it’s usually quite slow memory by the standards of graphics cards. The integrated memory on a console is completely shared, and very fast. The GPU works at its full speed, and the CPU is able to do a couple of things that are impossible to do with good performance on a desktop computer:

    • load and manipulate models which are then directly accessible by the GPU. When loading models, there’s no need to read them from disk into the CPU memory and then copy them onto the GPU - they’re just loaded and accessible.
    • manipulate the frame buffer using the CPU. Often used for tone mapping and things like that, and a nightmare for emulator writers. Something like RPCS3 emulating Dark Souls has to turn this off; a real PS3 can just read and adjust the output using the CPU with no frame hit, but a desktop would need to copy the frame from the GPU to main memory, adjust it, and copy it back, which would kill performance.


  • Money is an emotional thing. Do I believe that this coin / bit of paper / number on a website is something that I can exchange for goods and services? If not enough people believe that, that currency will collapse.

    Mind you, not using money is inefficient at scale. Sending the bag of potatoes that I’ve grown in my garden this month to my internet provider for continued shitposting privileges only goes so far.



  • It’s one of those materials that has an almost complete list of superb properties, with one overwhelming downside. It’s cheap, abundantly available, completely fireproof and can be woven into fireproof cloth, adds enormous structural strength to concrete in small quantities, very resistant to a wide range of chemical attacks. It’s just that the dust causes horrific cancers. See also CFCs, leaded petrol, etc, which have the same ‘very cheap, superb in their intended use, but the negative outweighs all positives’.

    One of the ‘niche industrial applications’ was the production of pump gaskets in high-temperature scenarios, especially when pumping corrosive liquids. We’ve a range of superalloys that are ‘suitable’ for these applications - something like inconel is an absolute bastard to form into shapes, but once you’ve done so it lasts a long time. But you still need something with similar properties when screwing the bits together. For a long time, there was no suitable synthetic replacement for asbestos in that kind of usage.

    If you know that the asbestos is there, have suitable PPE and procedures, then IMHO it’s far from the worst industrial material to work with. It’s pretty inert, doesn’t catch fire or explode, and isn’t one of the many exciting chemicals where a single droplet on your skin would be sufficient to kill you. What is inappropriate is using it as a general-purpose building material, which is how it was used for so long, and where it was able to cause so much suffering for so many people.


  • If I believed that they were sincerely interested in trying to improve their product, then that would make sense. You can only improve yourself if you understand how your failings affect others.

    I suspect however that Saltman will use it to come up with some superficial bullshit about how their new 6.x model now has a 90% reduction in addiction rates; you can’t measure anything, it’s more about the feel, and that’s why it costs twice as much as any other model.


  • A binary tree is one way of preparing data, usually for sorting. Each node can have a left, right, or both, children.

      A
     / \
    B   C
       / \
      D   E
    

    “Inverting the tree” means swapping the children for each node, so that the order that the nodes are visited is reversed. Depending on whether you want to copy the tree or swap it in place then the algorithm is different. C++ provides iterators too, so providing a “order reversed” iterator can be done efficiently as well.

    You’re going to have to visit every node and do at least one swap for every node, and an efficient algorithm won’t do much more than that. Bring unable to do it suggests that the student programmer doesn’t understand stacks or recursion yet, so they’ve more to learn.


  • Does make me think about the story of Thales of Miletus; ancient Greek philosopher, got asked what use was philosophy if it doesn’t make you any money. Predicted good weather, and monopolised all the olive presses, made a fortune.

    For a modern example; shares in Rheinmetall (German firm who make, amongst other things, the turrets for tanks) have gone through the roof after the recent US debacle. I could have told you a year ago that Trump getting in would have meant the US abandoning Ukraine; obvious in hindsight that that would mean a boon for European arms manufacturers.

    I don’t think you need to be quick to take advantage. I think you need insight. If there’s a topic that you’re knowledgeable about and you can see which way the wind is blowing, then you can make your own boat.

    https://en.wikipedia.org/wiki/Thales_of_Miletus#Olive_presses



  • Man alive, all that time I wasted learning LaTeX in that case. Supports tables properly, “floats” pictures and figures about without messing up the flow of text, exceptional support for equations, beautiful printed output…

    Suffers from a completely insane macro-writing language, and its markup is more intrusive in the text than markdown’s is. Also, if you have very specific formatting output requirements (for a receiving publication, for instance) then it can be somewhat painful to whip into shape. Plain-text gang forever, though.