My little toy operating system from last year runs in 16-bit Real Mode (like DOS). Since I’ve recently figured out how to switch to 64-bit Long Mode right after BIOS boot, I now have a little program that performs this switch on my toy OS. It will load and run any x86-64 program, assuming it’s freestanding, a flat binary, and small enough (< 128 KiB code, only uses the first 2 MiB of memory).

Here I’m running a little C program (compiled using normal GCC, no Watcom trickery):

https://movq.de/v/b27ced6dcb/los86%2D64.mp4

https://movq.de/v/b27ced6dcb/c.png

Next steps could include:

  • Use Rust instead of C for that 64-bit program?
  • Provide interrupt service routines. (At the moment, it just keeps interrupts disabled.)

#gslvc3q

(#o3hv4aq) @zvava@twtxt.net I might misunderstand what you wrote, but only hashing the message once and storing the hash together with the message in the database seems a way better approch to me. It’s fixed and doesn’t change, so there’s no need to recompute it during runtime over and over and over again. You just have it. And can easily look up other messages by hash.


#pmmlyta

Oh great, I received an e-mail that my SMTP credentials have been exposed. Once again, just another shitty scanner that generates garbage reports from tests it doesn’t understand. Thank you for nothing!

conf := &Config{
    SMTPHost: "smtp.example.com",
    SMTPPort: 587,
    SMTPUser: "user",
    SMTPPass: "hunter2",
    SMTPFrom: "from@example.com",
}

#eljhddq

(#c6rrdzq) @prologic@twtxt.net @movq@www.uninformativ.de A crocodile had bitten the big submarine internet cable that connects Australia to Europe. The investigations revealed that some construction work last week accidentally tore up the protective layer around it. That went unnoticed, unfortunately, so marine life had an easy job today. For just 40 minutes, they were quite fast in repairing the damage if you ask me! These communication cables are fricking large.

Just kidding, I completely made that up. :-D I didn’t notice any outage either. But I didn’t try to connect to Down Under at the time span in question.


#hsmdvqq

(#2hgjg3q) @movq@www.uninformativ.de Very nice! I often wish other languages had something similar. Sometimes, I use lambdas, but that also looks ugly and feels a bit like a misuse. Other times, just the normal blocks are enough, but it’s not the same. Especially with the mutability aspects as the article explains. Typically, I just put it in a function or ignore it if it’s just a few lines.


#xqyb4ya

(#dddn3ja) @movq@www.uninformativ.de @kiwu@twtxt.net it just so happens to be a happy coincidence that I’m extending mu’s capabilities to now include a native toolchain-free compiler (doesn’t rely on any external gcc/clang or linkers, etc) that lowers the mu source code into an intermediate representation / IR (what @movq@www.uninformativ.de refers to as ā€œthick layers of abstractionsā€ā€¦) and finally to SSA + ARM64 + Mach-O encoder to produce native binary executables (at least for me on my Mac, Linux may some later?) 🤣


#pyoecwq

(#dddn3ja) @kiwu@twtxt.net Assembly is usually the most low-level programming language that you can get. Typical programming languages like Python or Go are a thick layer of abstraction over what the CPU actually does, but with Assembler you get to see it all and you get full control. (With lots of caveats and footnotes. šŸ˜…)

I’m interested in the boot process, i.e. what exactly happens when you turn on your computer. In that area, using Assembler is a must, because you really need that fine-grained control here.


#eftrlaq