Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)R
Posts
0
Comments
96
Joined
3 yr. ago

  • JS has saved me many hours of mind-numbing, error-prone manual keyboard work by giving me a way to hack together a simple bit of automation as a web page.

    Even when a computer has been ham-fistedly locked-down by an overzealous IT department, I can almost always still access a text editor and a browser that will load local HTML files.

  • When you use any piece of Internet-enabled software, any and all data that passes through it can theoretically be copied and siphoned off back to the authors of the software.

    Should they do it? No. Can they do it? Yes.

    Does Mozilla do it? They say they don't, and I'm inclined to trust them. Do other major browsers do it? Absolutely.

    As regards your physical location, geoIP databases can get pretty close these days.

  • How many techie types have had someone come to them and say something like "Hey, you know tech thing XYZ? You know how it sucks? Well I've got a great idea: make a BETTER one! So what do you say? You whip it up in an afternoon, I'll handle marketing, and we'll be rich!"

    Like they really thought that the issue is just that no-one can see the flaws. They thought that the fix is super easy and they're just the first person clever enough to see it.

  • Not to take away from your very good point, but I think the word you might be looking for is "eqivalence".

  • I scored 12/28 on https://jsdate.wtf/ and all I got was this lousy text to share on social media.

  • Teams

    Jump
  • the boss can detect headphones going on your head and music starting from 50 feet away and instantly be behind you with a burning question that doesn't make any sense.

    I'm sure you realize that the question doesn't make any sense because they had to think of it on the spot, just to prove that you can't wear headphones in the office due to all the important ambient office talk you need to be a part of.

    One of my best, most competent bosses once said to the team "I don't understand how you guys can work while listening to music, but as long as your output stays high, I'm not going to interfere."

  • How about that worst of both worlds, the tutorial where the author starts out writing as if their audience only barely knows what a computer is, gets fed up partway through, and vomits out the rest in a more obtuse and less complete form than they would've otherwise?

    1. Turn on your computer. Make sure you turn on the "PC" (the big box part) as well as the "monitor" (TV-like part).
    2. Once your computer is ready and you can see the desktop, open your web browser. This might be called "Chrome", "Safari", "Edge", or something else. It's the same program you open to use "the Google".
    3. In the little bar near the top of the window where you can write things, type "https://www.someboguswebsite.corn/download/getbogus.html" and press the Enter key.
    4. Download the software and unarchive it to a new directory in your borklaving software with the appropriate naming convention.
    5. Edit the init file to match your frooping setup.
    6. If you're using Fnerp then you might need to switch off autoglomping. Other suites need other settings.
    7. Use the thing. You know, the thing that makes the stuff work right. Whatever.

    Congratulations! You're ready to go!

  • I was so triggered by the conversion from char-to-int-to-string-to-packedint that I had to write a bitwise version that just does char-to-packedint (and back again), with bitwise operators.

    https://pastebin.com/V2An9Xva

    As others have pointed out, there are probably better options for doing this today in most real-life situations, but it might make sense on old low-spec systems if not for all the intermediate conversion steps, which is why I wrote this.

  • I loved my MDs and Hi-MDs, but they had so many frills. All the frills. That was part of why I loved them!

  • The PlayStation 1 had a copy protection system that measured physical properties of the disc which couldn't be replicated by normal CD writers. There were a few ways to get around this, but to be able to put a burned CD into your console and boot directly from it into the game (as usual) required the installation of a fairly complex mod chip. A lot of people alternatively used the "swap trick", which is how I used to play my imported original games.

    The DreamCast's copy protection was heavily reliant on using dual-layer GD-ROM discs rather than regular CDs, even though they look the same to the naked eye. There were other checks in place as well, but simply using GD-ROMs was pretty effective in and of itself.

    Unfortunately, Sega also added support for a thing called "MIL-CD" to the DreamCast. MIL-CD was intended to allow regular music CDs to include interactive multimedia components when played on the console. However, MIL-CD was supported for otherwise completely standard CDs, including burned CDs, and had no copy protection, because Sega wanted to make it as easy as possible for other companies to make MIL-CDs, so the format could spread and hopefully become popular. Someone found a way to "break out" of the MIL-CD system and take over the console to run arbitrary code like a regular, officially released game, and that was the end of DreamCast's copy protection. People couldn't just copy an original game disc 1:1 and have it work; some work had to be done on the game to put it on a burned CD and still have it run (sometimes quite a lot of work, actually), but no console modification was needed. Anyone with a DreamCast relased before Sega patched this issue (which seems to be most of them) can simply burn a CD and play it on their console, provided they can get a cracked copy of the game.

  • Go for it, if it's to satisfy your own curiosity, but there's virtually no practical use for it these days. I had a personal interest in it at uni, and a project involving coding in assembly for an imaginary processor was a small part of one optional CS course. Over the years I've dabbled with asm for 32-bit Intel PCs and various retro consoles; at the moment I'm writing something for the Atari 2600.

    In the past, assembly was useful for squeezing performance out of low-powered and embedded systems, but now that "embedded" includes SoCs with clock speeds in the hundreds of MHz and several megabytes of RAM, and optimizing compilers have improved greatly, the tiny potential performance gain (and you have to be very good at it before you'll be able to match or do better than most optimizing compilers) is almost always outweighed by the overhead of hand-writing and maintaining assembly language.

  • I'm not too knowledgeable about the detailed workings of the latest hardware and APIs, but I'll outline a bit of history that may make things easier to absorb.

    Back In the early 1980s, IBM was still setting the base designs and interfaces for PCs. The last video card they relased which was an accepted standard was VGA. It was a standard because no matter whether the system your software was running on had an original IBM VGA card or a clone, you knew that calling interrupt X with parameters Y and Z would have the same result. You knew that in 320x200 mode (you knew that there would be a 320x200 mode) you could write to the display buffer at memory location ABC, and that what you wrote needed to be bytes that indexed a colour table at another fixed address in the memory space, and that the ordering of pixels in memory was left-to-right, then top-to-bottom. It was all very direct, without any middleware or software APIs.

    But IBM dragged their feet over releasing a new video card to replace VGA. They believed that VGA still had plenty of life in it. The clone manufacturers started adding little extras to their VGA clones. More resolutions, extra hardware backbuffers, extended palettes, and the like. Eventually the clone manufacturers got sick of waiting and started releasing what became known as "Super VGA" cards. They were backwards compatible with VGA BIOS interrupts and data structures, but offered even further enhancements over VGA.

    The problem for software support was that it was a bit of a wild west in terms of interfaces. The market quickly solidified around a handful of "standard" SVGA resolutions and colour depths, but under the hood every card had quite different programming interfaces, even between different cards from the same manufacturer. For a while, programmers figured out tricky ways to detect which card a user had installed, and/or let the user select their card in an ANSI text-based setup utility.

    Eventually, VESA standards were created, and various libraries and drivers were produced that took a lot of this load off the shoulders of application and game programmers. We could make a standardised call to the VESA library, and it would have (virtually) every video card perform the same action (if possible, or return an error code if not). The VESA libraries could also tell us where and in what format the card expected to receive its writes, so we could keep most of the speed of direct access. This was mostly still in MS-DOS, although Windows also had video drivers (for its own use, not exposed to third-party software) at the time.

    Fast-forward to the introduction of hardware 3D acceleration into consumer PCs. This was after the release of Windows 95 (sorry, I'm going to be PC-centric here, but 1: it's what I know, and 2: I doubt that Apple was driving much of this as they have always had proprietary systems), and using software drivers to support most hardware had become the norm. Naturally, the 3D accelerators used drivers as well, but we were nearly back to that SVGA wild west again; almost every hardware manufacturer was trying to introduce their own driver API as "the standard" for 3D graphics on PC, naturally favouring their own hardware's design. On the actual cards, data still had to be written to specific addresses in specific formats, but the manufacturers had recognized the need for a software abstraction layer.

    OpenGL on PC evolved from an effort to create a unified API for professional graphics workstations. PC hardware manufacturers eventually settled on OpenGL as a standard which their drivers would support. At around the same time, Microsoft had seen the writing on the wall with regards to games in Windows (they sucked), and had started working on the "WinG" graphics API back in Windows.3.1, and after a time that became DirectX. Originally, DirectX only supported 2D video operations, but Microsoft worked with hardware manufacturers to add 3D acceleration support.

    So we still had a bunch of different hardware designs, but they still had a lot of fundamental similarities. That allowed for a standard API that could easily translate for all of them. And this is how the hardware and APIs have continued to evolve hand-in-hand. From fixed pipelines in early OpenGL/DirectX, to less-dedicated hardware units in later versions, to the extremely generalized parallel hardware that caused the introduction of Vulkan, Metal, and the latest DirectX versions.

    To sum up, all of these graphics APIs represent a standard "language" for software to use when talking to graphics drivers, which then translate those API calls into the correctly-formatted writes and reads that actually make the graphics hardware jump. That's why we sometimes have issues when a manufacturer's drivers don't implement the API correctly, or the API specification turns out to have a point which isn't defined clearly enough and some drivers interpret it one way, while other drivers interpret the same API call slightly differently.

  • In my (admittedly limited) experience, SDL/SDL2 is more of a general-purpose library for dealing with different operating systems, not for abstracting graphics APIs. While it does include a graphics abstraction layer for doing simple 2D graphics, many people use it to have the OS set up a window, process, and whatever other housekeeping is needed, and instantiate and attach a graphics surface to that window. Then they communicate with that graphics surface directly, using the appropriate graphics API rather than SDL. I've done it with OpenGL, but my impression is that using Vulkan is very similar.

    SDL_gui appears to sit on top of SDL/SDL2's 2D graphics abstraction to draw custom interactive UI elements. I presume it also grabs input through SDL and runs the whole show, just outputting a queue of events for your program to process.

  • At the very least, please state which section you made small changes to, even if you are sure it's not worth mentioning what or why.

  • Child's play compared to what you'd need to do on a modern chip.

    I don't think it's the chips, but the operating environments. Modern CPUs offer dozens of multipurpose registers and many more instructions and addressing modes compared to those old, low-cost CPUs, which should make things easier, not harder. But no-one's building old-style dedicated systems around modern CPUs; our code now has to play nice with firmware, OS, libraries, and other processes, including resource management and preempting.

    Compare a single-gear go-kart to an automatic sedan. Getting top performance out of the go-kart on a closed track is difficult and requires nuance. If we could drive the automatic sedan around the same closed track, we could easily demolish the go-kart, and not just with raw engine power. The improved acceleration, braking assist, and power steering are enough. But when we drive the sedan we're usually doing it on public roads with traffic signals, intersections, speed limits, and other road users. That's what's more difficult.

  • I didn't know that generative AI could do things like this now.

  • Node =/= JavaScript

  • "Hopefully it will help with shit. Let's talk to the originating author, Aasish Pokhrel."

  • I once saw a documentary about Bedouin tribes that were dying out. The problem was very simple, from the outside; they were killing virtually all of their female children.

    The team interviewed an elder of one tribe, asking him about this practice. As expected, the elder said that parents wanted sons to continue their family names.

    "If no-one in the tribe has any daughters, where will these sons find wives?" asked the interviewer. The elder confidently replied without hesitation, "They will get wives from other tribes." "But what if the other tribes kill their female babies just like your tribe does?" the interviewer persisted (In fact, they had met people from several tribes, and indeed they all followed this terrifying practice). The elder looked at the interviewer like he was a slow child. "They will get wives from other tribes."