Leaving Rust gamedev after 3 years
https://loglog.games/blog/leaving-rust-gamedev/ [loglog.games]
2024-04-28 02:32
tags:
development
gaming
programming
rust
This post isn’t a scientific evaluation or an A/B study. It’s my personal opinion after trying to make Rust gamedev work for us, a small indie developer (2 people), trying to make enough money to fund our development with it.
source: L
How Not To Release Historic Source Code
https://www.os2museum.com/wp/how-not-to-release-historic-source-code/ [www.os2museum.com]
2024-04-28 02:30
tags:
development
format
retro
text
windows
For practical purposes, old source files are not text files. They are binary files, and must be preserved without modification. It is not OK to take an old source file and convert it to UTF-8. For one thing, UTF-8 didn’t even exist in the times of MASM 5.10 and Microsoft C 5.1, of course old tools can’t deal with it!
source: L
Motion Blur All the Way Down
https://www.osar.fr/notes/motionblur/ [www.osar.fr]
2024-03-04 05:53
tags:
gl
graphics
interactive
programming
visualization
What happens if you take motion blur past its logical extreme? Here are some fun observations and ideas I encountered while trying to answer this question, with an attempt to apply the results in a procedural animation.
source: L
An improved chkstk function on Windows
https://nullprogram.com/blog/2024/02/05/ [nullprogram.com]
2024-02-06 23:47
tags:
compiler
cpu
programming
windows
If you’ve spent much time developing with Mingw-w64 you’ve likely seen the symbol ___chkstk_ms, perhaps in an error message. It’s a little piece of runtime provided by GCC via libgcc which ensures enough of the stack is committed for the caller’s stack frame. The “function” uses a custom ABI and is implemented in assembly. So is the subject of this article, a slightly improved implementation soon to be included in w64devkit as libchkstk (-lchkstk).
source: L
Annoying details of a Z-buffer rasterizer
https://30fps.net/pages/z-rasterizer-details/ [30fps.net]
2024-01-04 23:12
tags:
gl
graphics
programming
I wrote a software rasterizer for occlusion culling and hit many small speed bumps along the way. Here I reveal what I’ve learned in the hope of you writing your own with more ease than I did.
source: L
How to (and how not to) fix color banding
https://blog.frost.kiwi/GLSL-noise-and-radial-gradient/ [blog.frost.kiwi]
2023-12-27 21:40
tags:
gl
graphics
programming
I love to use soft gradients as backdrops when doing graphics programming, a love started by a Corona Renderer product shot sample scene shared by user romullus and its use of radial gradients to highlight the product. But they are quite horrible from a design standpoint, since they produce awful color banding, also referred to as posterization. Depending on things like screen type, gradient colors, viewing environment, etc., the effect can be sometimes not present at all, yet sometimes painfully obvious.
source: L
An interactive study of common retry methods
https://encore.dev/blog/retries [encore.dev]
2023-11-23 04:00
tags:
development
networking
visualization
In this post we’re going to visually explore different methods of retrying requests, demonstrating why some common approaches are dangerous and ultimately ending up at what the best practice is. At the end of this post you will have a solid understanding of what makes safe retry behaviour, and a vivid understanding of what doesn’t.
source: L
There are no strings on me
https://www.scattered-thoughts.net/writing/there-are-no-strings-on-me/ [www.scattered-thoughts.net]
2023-11-23 03:52
tags:
programming
type-system
There is a kind of magic to those systems that is worth experiencing. But it’s also worth examining why we prefer to build puppets.
Because I’ve had days where I’ve had to debug my surly emacs boy, and I’ve quickly discovered that his behaviour has very little to do with the code that I’m reading. Methods overridden at runtime, traces that end with a call to a closure that no longer exists, event handlers whose execution order depends on side-effects during module loading, stack-traces which contain multiple different versions of the same function. On the worst days I find myself debugging code that doesn’t even exist on disk but was evaluated in the repl weeks before.
source: L
Running the “Reflections on Trusting Trust” Compiler
https://research.swtch.com/nih [research.swtch.com]
2023-10-26 19:09
tags:
c
compiler
development
programming
retro
security
turtles
unix
In October 1983, 40 years ago this week, Ken Thompson chose supply chain security as the topic for his Turing award lecture, although the specific term wasn’t used back then. (The field of computer science was still young and small enough that the ACM conference where Ken spoke was the “Annual Conference on Computers.”) Ken’s lecture was later published in Communications of the ACM under the title “Reflections on Trusting Trust.” It is a classic paper, and a short one (3 pages); if you haven’t read it yet, you should. This post will still be here when you get back.
In the lecture, Ken explains in three steps how to modify a C compiler binary to insert a backdoor when compiling the “login” program, leaving no trace in the source code. In this post, we will run the backdoored compiler using Ken’s actual code. But first, a brief summary of the important parts of the lecture.
source: L
A tale of /dev/fd
http://phala.isatty.net/~amber/hacks/devfd [phala.isatty.net]
2023-10-22 23:08
tags:
admin
freebsd
linux
systems
unix
Many versions of Unix provide a /dev/fd directory to work with open file handles as if they were regular files. As usual, the devil is in the details.
source: L
Polonius update
https://blog.rust-lang.org/inside-rust/2023/10/06/polonius-update.html [blog.rust-lang.org]
2023-10-08 19:10
tags:
compiler
compsci
programming
rust
update
Polonius refers to a few things. It is a new formulation of the borrow checker. It is also a specific project that implemented that analysis, based on datalog. Our current plan does not make use of that datalog-based implementation, but uses what we learned implementing it to focus on reimplementing Polonius within rustc.
source: L
Arena allocator tips and tricks
https://nullprogram.com/blog/2023/09/27/ [nullprogram.com]
2023-10-01 18:51
tags:
c
development
hash
malloc
programming
Over the past year I’ve refined my approach to arena allocation. With practice, it’s effective, simple, and fast; typically as easy to use as garbage collection but without the costs. Depending on need, an allocator can weigh just 7–25 lines of code — perfect when lacking a runtime. With the core details of my own technique settled, now is a good time to document and share lessons learned. This is certainly not the only way to approach arena allocation, but these are practices I’ve worked out to simplify programs and reduce mistakes.
See also: https://nullprogram.com/blog/2023/09/30/
An easy-to-implement, arena-friendly hash map
source: L
Champagne for my real friends
http://jeremybmerrill.com/documents/champagnerealpain.html [jeremybmerrill.com]
2023-10-01 18:46
tags:
language
programming
python
Real pain for my sham friends, real tricks for my meh friends, and finding more like this with NLP
source: L
Capslock: What is your code really capable of?
https://security.googleblog.com/2023/09/capslock-what-is-your-code-really.html [security.googleblog.com]
2023-09-17 02:39
tags:
development
security
Avoiding bad dependencies can be hard without appropriate information on what the dependency’s code actually does, and reviewing every line of that code is an immense task. Every dependency also brings its own dependencies, compounding the need for review across an expanding web of transitive dependencies. But what if there was an easy way to know the capabilities–the privileged operations accessed by the code–of your dependencies?
source: L
FreeBSD on Firecracker
https://www.usenix.org/publications/loginonline/freebsd-firecracker [www.usenix.org]
2023-08-24 15:14
tags:
freebsd
perf
programming
systems
virtualization
Experiences porting FreeBSD 14 to run on the Firecracker VMM
source: L
Smashing the state machine: the true potential of web race conditions
https://portswigger.net/research/smashing-the-state-machine [portswigger.net]
2023-08-10 16:24
tags:
concurrency
exploit
networking
security
web
HTTP request processing isn’t atomic - any endpoint might be sending an application through invisible sub-states. This means that with race conditions, everything is multi-step. The single-packet attack solves network jitter, making it as though every attack is on a local system. This exposes vulnerabilities that were previously near-impossible to detect or exploit.
source: L
A Blog Post With Every HTML Element
https://www.patrickweaver.net/blog/a-blog-post-with-every-html-element/ [www.patrickweaver.net]
2023-08-04 00:16
tags:
docs
essay
html
standard
text
ux
web
I could, element by element, continue to add support (mostly by making CSS updates for each element to fit in with the rest of my style choices) as I came across specific needs for them, but not one to shy away from an exhaustive exploration, I decided to write this post and attempt to use every element.
A goal of the post, was to avoid delaying other future posts with CSS updates on a previously unused element, but in reality it took a year and a half to make all the updates for just this post! I am using the MDN Web Docs list of HTML elements as a reference which has more than 100 tags divided into a few categories, which I will also use in this post.
source: L
Zenbleed
https://lock.cmpxchg8b.com/zenbleed.html [lock.cmpxchg8b.com]
2023-07-25 01:47
tags:
cpu
exploit
programming
security
sidechannel
systems
What should happen if the processor speculatively executed a vzeroupper, but then discovers that there was a branch misprediction? Well, we will have to revert that operation and put things back the way they were… maybe we can just unset that z-bit?
If we return to the analogy of malloc and free, you can see that it can’t be that simple - that would be like calling free() on a pointer, and then changing your mind!
That would be a use-after-free vulnerability, but there is no such thing as a use-after-free in a CPU… or is there?
source: L
A love letter to Objective-C
https://thoughtbot.com/blog/a-love-letter-to-objective-c [thoughtbot.com]
2023-07-21 21:18
tags:
intro-programming
objc
ruby
The nature of software is to always be evolving. COBOL jokes aside, it’s rare to find programming frameworks that reach a level of maturity and support that allow them to just exist without being supplanted by a newer language or a better abstraction. Which naturally is great. Who wants to find themselves writing software with the expectations of today while performing the tasks of manual memory management or manipulating strings that are just raw pointers in a block of memory terminating with a null (\0) character? But sometimes in this constantly evolving space, you find a framework that resonates, and you hold on to it tightly. I wanted to share how this happened for me, first with Ruby (no surprise) but then oddly with Objective-C.
source: L
Shoot ’em up in style: the making of Gun Trails on Playdate
https://news.play.date/news/gun-trails/ [news.play.date]
2023-07-21 21:04
tags:
c
development
gaming
perf
programming
retro
Enter Playdate. I had wanted to build a shmup for years, but for various reasons—primarily bad scoping—the efforts always sputtered out. This little yellow device could provide the constraints needed, with the added bonus of a programming challenge to hit consistently high framerates.
source: L