• 0 Posts
  • 65 Comments
Joined 3 years ago
cake
Cake day: July 5th, 2023

help-circle
  • Redkey@programming.devtoLinux@lemmy.ml•it's true
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    Literally the only reason I keep a Windows machine around is to run proprietary software that I simply can’t replace, like games and software suites for specific hardware.

    Thanks to WINE/Proton, I can’t even remember the last time I turned on that Windows machine. I think it might’ve been years. I should probably turn it on just to cycle the battery (notebook) a little and run updates.


  • The writer of the video is (presumably) a paid, working writer.

    Why do you think that? To me, it just seems to be a guy with a YouTube account. He’s got exactly three videos listed, all from the last few weeks, although the account was created 16 years ago.

    Besides which, how is being a professional writer automatically connected with being a professional video editor?

    I’m not sure that your analogy works, either. All he said was that it was difficult to replicate his existing workflow with free software in Ubuntu. He never claimed to be editing video to a professional level; that requirement seems to have come from you.



  • There’s a whole lot of math in that article, and to be honest I’m not 100% clear on what they’re trying to say. I think they’re talking about how standard quantization isn’t making full or “accurate” use of the number space, although if you read through to the end they note that there’s really nothing terribly wrong with the standard way. But here’s my take.

    To simplify, I’ll use an integer range 0-4 instead of 0-255, but the principle’s the same.

    So, say that we’re quantizing from a floating-point range of 0.0-1.0 to an integer range of 0-4. Doing things the usual way, that’d be the orange numbers on the bottom of this diagram:

    But you can see that this doesn’t line up cleanly with a nice, regular division of the range into 5 equal blocks. If we just multiply by 4 (our integer max) and then round off to the nearest integer, the original value ranges represented by our integer 0 and 4 are half the size of the others. E.g. 0.0 to 0.49 become 0, but 0.5 to 1.49 become 1.

    Now, if we want to represent true 0.0 and 1.0 simply with our integer range (0-4), we should use 0 to exactly equal 0.0, and 4 to exactly equal 1.0. And converting from integer to float by calculating [value / 4] (or [value / 255] in reality) will get us exactly that. I wouldn’t change that.

    What I would suggest changing–to anyone who cares enough about it–is how the numbers are converted from float to integer. If you look at the diagram again, you can see that there is one orange integer per evenly-divided block, even if they don’t line up with the centers of the blocks. If we take a float (0.0-1.0) representation and multiply it by our integer max plus one, we’ll get the blue numbers at the top of the diagram. Then all we have to do is round down to the nearest integer and cap the result at 4 (or 255, or whatever our integer max is), and we’ll have a nice, even distribution in our conversion.

    I could have misunderstood, but it seems like all of the errors and uncertainty discussed in the article come from how the multiplied floats are truncated into integers. I think that this method eliminates that cleanly.


  • For VHS, it was much more common to record things from broadcast. Even if someone had multiple machines, copies using standard consumer VHS degraded noticeably even in one generation.

    For DVDs, writing drives were expensive and uncommon for a long time, and most early players didn’t like burned discs, so you were limited in how you could watch them anyway. I know that some people got into the mindset of physically cloning the discs, but I feel like it was at least as common to rip, re-encode just the main title with a more modern codec to shrink the size, and store that smaller copy electronically.


  • Surely it shouldn’t be surprising that a technology which literally can only regurgitate bits of things which others have already made, when put into the hands of people whose imagination is limited to what already exists (or alternatively, is not meaningfully directed) precisely because they lack an understanding of the underlying principles, results in only slight variations of the things we already have.

    I can’t immediately give you a smartphone app concept that completely breaks an existing, arbitrary taxonomy, but there are two good reasons for that. One; anything that can still run on a smartphone can almost certainly be shoehorned into any existing taxonomy by carefully-worded arguments. Two; by the time a break with tradition is clear enough that such arguments become impossibly tenuous, smartphones will be things that our great-grandparents used to use.

    To counterpoint the author’s smartphone analogy, think of how people looked at their TVs in the early 1970s. It was a society-changing but by that time relatively established technology with high growth. And people had all sorts of ideas for “new” things to do with it. You could’ve made arguments regarding most of them in the same vein as the arguments in this article. Most of those ideas were half-baked and failed at the time… only to resurface decades later, altered, refined, and successful, on PCs and smartphones. But PCs and smartphones are not, in any real sense, TVs.

    Which surprisingly, once I hunkered down and pushed my way through this lengthy essay, is essentially one of the points that I think the author is making (although obliquely): That by the time this technology has evolved beyond its current limits, it will no longer be something that we recognize as “software” in the current sense.

    I suggest trying to keep the concepts of “integrated system design” and “algorithmic process definition” separate from “digital computer software” in a similar way. Which, funnily enough, are the parts of all of this at which humans arguably still beat LLMs.


  • We bought a new car a few years ago that came with a whole suite of sensors and warnings. I’d like to turn them off, but my partner insists on turning them on again every time I do, so I need to deal with them. In the first six months with the new car, I think I had four or five near-accidents caused by the “safety” system suddenly making some loud noise when I was already partway through a manoever. But after a while I became able to tune out the stream of beeps, boops, and buzzes that come about half a second too late to be of any use, when they’re not false alarms.

    The car also has a “safety” feature I don’t think I can disable, that restricts acceleration when proximity sensors are triggered. It was not a pleasant feeling to be in the path of a multi-ton truck, flooring the accelerator, and having the car slowly mosey forward at the pace of a quiet afternoon stroll down a country lane. Worse, I believe that it was the barrelling behemoth itself which caused this reaction. Fortunately, I found quite by accident that if you keep pumping the accelerator in a blind panic for a couple of seconds, the car decides that you might really be serious about accelerating, and that maybe it should defer to the actual human intelligence that’s nominally in control of the vehicle. That, or the idiot software finally clocked that I was already in the truck’s way, and needed to get out of it. But subsequent events have lent credence to the pedal-pumping theory.

    I feel like new, automated “safety” features are going to kill and injure at least as many people as they protect.


  • Great! Let’s put 24/7 webcams in his house, so he’ll perform spectacularly and we can get many more absolute banger ideas like this one!

    I’m just doing what the man himself says: “Fighting for a world where the watching goes both ways.” But then, I suspect that when he said that he was thinking it’s “us versus the government”, and not “regular citizens versus billionaire tech-robber-barons”.

    Why do these tech-bros always seem to act like the problem is government, and they’re somehow “fighting the good fight” no matter what they do? The problem is any powerful group with the power to steamroller others. And big business is at least as bad as big government.






  • I know it’s a really picky take, but I resent the implication that I should want to keep my personal files mixed in at the same level of the file hierarchy as all my applications’ random settings, cached data, and temporary garbage. Documents, Music, Videos, Projects, .config, .cache, SelfishAppName, OtherSelfishAppName…

    It bothered me when Microsoft started doing it in Win95, and it still bothers me in Linux. Especially when software acts surprised (or occasionally indignant) that I don’t keep all my files in those directories. I have lost small bits of my own work over the years by forgetting to back up things that recalcitrant software refused to store anywhere else.

    But I am amused that this is the same name that I use at the top of my own storage hierarchy for self-made things.



  • Initialization in C++ is so simple that somebody wrote a nearly 300-page book on the subject

    There’s a book about 101 ways to cut potatoes. Perhaps that could be a real mike-drop bit of evidence that we shouldn’t be cooking potatoes.

    Here’s a 249-page book “just” about atomics and locks in Rust. Does a book this large about only one aspect of Rust prove that it’s a terrible language? No, because as with the C++ book, if we look at the summary of contents we can see that it actually covers a great deal more, simply with a focus on those topics.

    Luckily we don’t have to be compete masters of every aspect of a language in order to use it.

    Honestly, I think that modern C++ is a very piecemeal language with no clear direction, and it has many issues because of that. But the title and page count of a single book is not a convincing argument of anything.


  • I’m all for humourous roasts of things, but does anyone really find this funny? Was the author possibly being serious? I don’t know. What I do know is that I stopped watching after the first four examples because they were all deliberately incorrect or misleading, but also didn’t seem funny to me.

    1. Crazy initialization
      That sure is a lot of ways to initialize a variable! Even though some of these variables are quite different and would be initialized differently from each other in many other languages, even only counting the initializations that are functionally equivalent, there are a bunch of abuses of syntax that I’ve never seen used in the wild.

    At this point I had hope that this was meant to be amusing.

    1. Printing to the console
      C++ has had a version of C’s printf function from the very beginning. That weird stream syntax has some hardcore fans but many people ignore it. I did my CS degree close to 30 years ago, and the only time I used stream syntax was for one lab class exercise in which we had to show that we understood how to use stream syntax.

    They still could be going for a comedy roast, I guess.

    1. Getting a random number
      Much like the printf statement for number 2 above, C++ had its own version of C’s rand function from the start. I’ve never even heard of the stuff that’s being shown in this part of the video.

    OK that was virtually the same fake point as the previous one, and still no punchlines in sight.

    1. Having to type “static_cast” every time you recast a variable
      Nope, you don’t. You’re free to ask the compiler to automagically recast your variables to another type without giving any further detail just like you can in C. In fact, they’re often called “C-style casts”. There are even implicit casts, where you literally don’t add anything, and just cross your fingers that the compiler does what you think it should do. It’s like a little bit of the thrill of dynamic typing brought into C++! By using the static_cast keyword, you can tell the compiler that you understand that there’s a potential issue with this recast, but that you expect that the standard way of handling it will be fine. There are other keywords for more unusual situations; it’s not just a random bit of busywork added for no reason.


  • Years ago I used to have Lakka on a bootable USB drive to turn an old, low-powered laptop into a dedicated emulation machine.

    The specs are hard to read, but I believe the main processor is an AMD A6-1450 APU, designed for tablets and released some time in or after 2013. Not a powerful chip by modern standards, but IMO still useable depending on your expectations. It’s definitely capable of emulating SNES without breaking a sweat. Even PS1 shouldn’t be a problem at native resolution. N64, Saturn, and Dreamcast are probably where you’ll start seeing slowdown in some games, and anything more, like PS2 or GCN, is unlikely to be playable.


  • I have no expertise in this field and this is what I got just from reading the article without doing any further research.

    It seems that a consortium of giant tech companies got together to make a royalty-free video codec called AV1. This included getting legal agreements from a bunch of relevant patent holders that they wouldn’t pursue legal action against anyone implementing AV1.

    However, due to the U.S. patent office’s current policy of issuing patents left and right and letting applicants sort out whether or not their patents are actually unique in court later, lawyers representing Dolby and a couple of other companies that hold some separate video-related patents have smelled money in the water and are trying to sort out whether or not their patents are unique in court.