OP's link is a good one, but if you want a different perspective (heh), there's https://gabrielgambetta.com/computer-graphics-from-scratch/i..., also from scratch, also for free. The name clash is unfortunate, I don't really know who started using it earlier :(
Good show, this is how I recommend doing it and have been teaching it for years.
It's quite unfortunate that basically everyone thinks 3D graphics necessarily implies rasterisation and using someone else's API, and I feel extremely lucky to have taught myself in a time when you could trivially display images by direct memory access (mode 13h), and to have focused on ray tracing instead of rasterisation.
if you are looking for a resource for this, I did this exact thing last year through pikuma that man is the best software teacher online I have come across. Highly recommend his 3D software renderer course.
Use a checkbox, d. Define vars for light mode. Override when checked for dark mode with body:has(#d:checked) and can include the dark mode media query too
Why would you build a switch instead of relying on the user’s system settings? The only reason I can imagine is that your dark/light mode is not usable/readable so it forces the user to switch
I often use different light/dark settings between apps and my system. Just because I want system UIs to be dark, for example, doesn't mean I want to read long pages of white-on-black prose on your blog.
Seconded. Just because I like to have the browser toolbar dark and GitHub dark doesn't mean I also want to read lengthy articles (LWN) in thin white text on a black background.
My specific usage is a site to host my own internal training content.
I want to read it in dark mode and give users that option, but I want to present it in light mode because dark mode suffers poorly from video compression when screen sharing.
I currently have a JS toggle for it which uses local browser storage, but ditching JS would be nice if possible.
Having it default to the users preference is nice, but you should still provide an override. I sometimes use my browser in light mode while my OS is dark mode. Many times, I find the contrast for dark mode websites too low unless I’m in a totally dark room.
While I agree with the sentiment that LLM coding can produce a lot of inefficient junk code which works with holes if you're lucky...
What you're describing is 7 days of productivity supported by probably 7+ years (or 27+ years) of experience and learning and getting things wrong and restarting over again.
The biggest thing to affect laptops in "decades" is solid state storage. No longer do you need to worry about killing your entire device simply by putting it down on a solid surface.
There are also plenty of other things like modern dense lithium ion batteries with 12+ hour runtimes, super power friendly CPUs of all architectures, the ultra-thin body and metal body popularised by Apple, LCD panels without ghosting, external power bricks instead of literally a PC power supply in a briefcase.
But yeah sure, the infinite slop plagiarism machine is coming. Gotta get some clicks!
Buy from listings with many sales and good reviews.
Look for reviews with real images and real seeming phrases in many languages, not 10 accounts all posting the same phrase with no pictures.
Buy from stores with a name, preferably who have established a "brand" for themselves across many products. UGreen are a great example of this for USB gadgets.
Don't buy from stores named Shop195772040, these will take your money and disappear or ship fakes. Don't buy suspiciously cheap items with no sales, these will do the same.
If you want to do it cheap, get a desktop motherboard with two PCIe slots and two GPUs.
Cheap tier is dual 3060 12G. Runs 24B Q6 and 32B Q4 at 16 tok/sec. The limitation is VRAM for large context. 1000 lines of code is ~20k tokens. 32k tokens is is ~10G VRAM.
Expensive tier is dual 3090 or 4090 or 5090. You'd be able to run 32B Q8 with large context, or a 70B Q6.
For software, llama.cpp and llama-swap. GGUF models from HuggingFace. It just works.
If you need more than that, you're into enterprise hardware with 4+ PCIe slots which costs as much as a car and the power consumption of a small country. You're better to just pay for Claude Code.
I was going to post snark such as “you could use the same hardware to also lose money mining crypto” then realized there are a lot of crypto miners out their that could probably make more money running tokens then they do on crypto. Does such a market place exist?
reply