Andre Weissflog Profile Banner
Andre Weissflog Profile
Andre Weissflog

@FlohOfWoe

Followers
9,060
Following
1,099
Media
2,621
Statuses
43,812

Sokol Headers, Chips Emulators, Oryol, Nebula Device, Drakensang, C, C++, Zig, Python, WASM... @floooh @mastodon .gamedev.place

Berlin
Joined April 2013
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
Pinned Tweet
@FlohOfWoe
Andre Weissflog
6 years
alright, pretty big update to the Tiny Emulators page: new KC85/2 family emulators, more subtypes for the existing emulators, more file loading support, more games (mostly KC85 stuff), and the emulator git branches merged back to master: #WebAssembly
Tweet media one
Tweet media two
Tweet media three
Tweet media four
7
34
196
@FlohOfWoe
Andre Weissflog
6 months
...but it will live forever in software ;)
Tweet media one
@mike_acton
Mike Acton
6 months
The legendary Zilog Z80 CPU is being discontinued after nearly 50 years
10
22
161
9
158
1K
@FlohOfWoe
Andre Weissflog
5 years
Alright! perfect6502 simulation hooked up to the chip visualization running though the visual6502 standard test program at one half-cycle per frame :D Time to start with the UI :) (cc @pagetable )
13
244
1K
@FlohOfWoe
Andre Weissflog
2 years
@kettlecorn @natfriedman ...or as the saying goes "Poor planning on your part does not necessitate an emergency on mine.". This should be the first thing hammered into the mind of newbies. There are very rare actual emergencies where staying late may be justified. Made-up deadlines are not an emergency.
1
23
717
@FlohOfWoe
Andre Weissflog
6 years
I finally finished that blog post of how I'm using handles instead of raw- or smart-pointers in my C and C++ code, probably not very exciting for veteran coders, but hopefully useful for everyone not yet aware of the "C++ smart-pointer trap" ;)
22
140
582
@FlohOfWoe
Andre Weissflog
5 years
I wrote a new blog post "Modern C for C++ Peeps": Not the post about header-only libs I had in mind originally, that's still lying around half-finished. The post above was a lot easier to write in one sitting :)
32
143
431
@FlohOfWoe
Andre Weissflog
6 months
@DanielcHooper TBH, even machine code is a high level abstraction compared to what a CPU does internally (e.g. assembly code is a high level language which provides the illusion that instructions are processed in order).
5
13
386
@FlohOfWoe
Andre Weissflog
1 year
If you think cmake sucks, wait until you need to work with Gradle, compared to that cmake is a marvel of engineering (just had to vent a bit sorry).
35
15
338
@FlohOfWoe
Andre Weissflog
5 years
OMG looks like it's possible to render the Visual6502 data set with Dear ImGui at a smooth frame rate! And that's just a quick adhoc experiment without any optimizations. ...I think the next steps are inevitable :D (cc @ocornut )
8
27
264
@FlohOfWoe
Andre Weissflog
4 years
a really nice and comprehensive rant of everything that's wrong with "modern UI design", with examples
20
77
260
@FlohOfWoe
Andre Weissflog
6 years
new blog post, wherein I contemplate about a year of writing C code:
14
100
260
@FlohOfWoe
Andre Weissflog
10 months
Btw @ocornut , not sure if it's a first, but here's Dear Imgui running in a VSCode tab :D
Tweet media one
5
17
255
@FlohOfWoe
Andre Weissflog
8 months
AI chat tools would be alot less creepy (and time-wasting) if they would give short and crisp answers instead of that overly talkative "American" conversation style. A simple: "No/yes, because: ...". would do. Give me a "German Engineer" conversation style option please.
20
13
241
@FlohOfWoe
Andre Weissflog
3 months
Should've listened ;)
@molecularmusing
Stefan Reinalter
3 months
Hey @CrowdStrike , if you think you need to inject yourself into other processes, could you please do this without crashing them? This has happened to several of my customers, without them knowing what's going on. Fix this! Signed, Windows Developers
Tweet media one
35
178
1K
2
26
223
@FlohOfWoe
Andre Weissflog
6 years
a bare bones C64 emu written in C99, compiled to #WebAssembly in under 64K (43 KB WASM + 15 KB JS, compressed download size), sokol_app.h + sokol_gfx.h + sokol_time.h + 8-bit chip headers:
Tweet media one
6
74
215
@FlohOfWoe
Andre Weissflog
2 years
Interesting: the included line count of <vector> in Clang is roughly "C++ version * 1kloc" (via clang -E -std=c++..): C++11: 12810 C++14: 13870 C++17: 16905 C++20: 23127 C++20 is clearly ahead of its time :D
18
14
214
@FlohOfWoe
Andre Weissflog
5 years
Whoop whoop, Dear ImGui running on top of Chrome's current #WebGPU implementation via emscripten/WASM and sokol_app.h + sokol_gfx.h :D A bit of code cleanup, then I should be able to put up a little sokol-samples-on-WebGPU preview page over the weekend :)
Tweet media one
5
15
209
@FlohOfWoe
Andre Weissflog
5 months
One of the many things that Rust and C++ have in common is that Rust peeps are just as quick to dismiss Zig as C++ peeps used to dismiss C. That sort of closed-mindedness never pays off in the long run 🙄
28
15
207
@FlohOfWoe
Andre Weissflog
5 years
482 lines of (shader) code, no data, absolutely mindblowing. Most 3D APIs need more code to put a simple triangle on screen :D
@iquilezles
inigo quilez
5 years
A procedural animated creature, raymarched SDF as usual in @Shadertoy . It's a first basic attempt to some character animation. Live-Stream with the Making-of and QA soon! In the meanwhile, source code:
110
1K
5K
3
32
206
@FlohOfWoe
Andre Weissflog
4 years
Very cool interactive Dear ImGui "manual":
4
53
198
@FlohOfWoe
Andre Weissflog
7 years
nice, a Tomb Raider engine written in a ‘C-with-classes’ C++ style compiled via emscripten into 180 KByte asm.js:
2
99
187
@FlohOfWoe
Andre Weissflog
5 years
TL;DR: Never, ever expose a C++ API though a DLL, instead wrap your C++ API into a C API.
@CppLibHunt
C++ LibHunt
5 years
20 ABI (Application Binary Interface) breaking changes every C++ developer should know
0
23
60
10
30
185
@FlohOfWoe
Andre Weissflog
10 days
God-f*cking-dammit stop being such a f*cking security nazi macOS! >:(
Tweet media one
27
5
187
@FlohOfWoe
Andre Weissflog
5 years
Wow, with one can build simple installable Electron/WPA-style apps (with WebGL, WASM etc) in a single 27 KB(!) exe (on macOS), that's insane. Uses the system's browser engine instead of a Chromium+Node.js runtime.
Tweet media one
5
43
178
@FlohOfWoe
Andre Weissflog
4 years
Impressive "from scratch" game written in C (using the sokol headers for platform abstraction)! Playable WASM link is in the README:
4
43
178
@FlohOfWoe
Andre Weissflog
7 years
animation system debugging... visualization is everything :)
6
33
175
@FlohOfWoe
Andre Weissflog
5 years
If you're a new programmer please don't fall for bullshit like this: ...typing code into the machine is the least important aspect of programming (there *is* a bit of an argument for "staying in flow" though: not thinking about typing while doing it)
26
26
173
@FlohOfWoe
Andre Weissflog
5 years
All 6502-based Tiny Emus now support stepping by single cycles in the CPU debugger, very useful for debugging the video system, interrupt timing etc... Not yet for Z80 systems because Z80 emu isn't cycle-stepped yet. Webpage also updated:
6
51
173
@FlohOfWoe
Andre Weissflog
5 months
Friendship ended with iTerm2. Now wezterm is my new best friend. (seriously iTerm2... AI integration???)
19
15
164
@FlohOfWoe
Andre Weissflog
3 years
It's 2021 and Windows takes several minutes to unzip a 60MB archive🙄
Tweet media one
31
8
164
@FlohOfWoe
Andre Weissflog
7 months
Amiga's Intuition UI library had an interesting twist on named and optional parameters in C (via varargs):
Tweet media one
14
11
160
@FlohOfWoe
Andre Weissflog
10 years
Classic Pixar texture library going free (updated with bump and normal maps):
0
118
157
@FlohOfWoe
Andre Weissflog
2 years
"Blinkenlights is a command line debugger that focuses on visualizing how software changes memory." \o/ Why is it always underfunded individuals who move computing forward, while big organizations mostly just flail around helplessly?
5
20
155
@FlohOfWoe
Andre Weissflog
5 years
I figured that running the assembler on each keystroke probably burns 100x fewer cycles than that same keystroke cost so far traveling up to my code through all the OS layers, so ¯\_(ツ)_/¯
9
20
153
@FlohOfWoe
Andre Weissflog
8 months
The Rust jihadists have planted a mole in the White House :D
@m1guelpf
Miguel Piedrafita ✨
8 months
C is now illegal
210
1K
9K
11
12
155
@FlohOfWoe
Andre Weissflog
4 years
Ooooh WASM debugging via DWARF works now in Chrome Canary (most notable improvement over source-map debugging is that symbol names and structs are properly resolved). Debug-stepping is pretty slow though, esp the view-panel redrawing takes forever.
Tweet media one
5
21
153
@FlohOfWoe
Andre Weissflog
9 months
Remember kids: in a C++ source file which includes stdlib headers, your own code is just a tiny little piece dangling off at the bottom. (what's up with modules btw, weren't those supposed to be the silver bullet?)
@wenzeljakob
Wenzel Jakob
9 months
What's going on with LLVM's libc++ project? I noticed yesterday that the header file containing std::vector<> expands to 2 to 2.4 megabytes of pre-processed header code! (of which >99% is overhead) This ...
5
9
91
11
10
156
@FlohOfWoe
Andre Weissflog
4 years
"immediate mode" async-await-style coding :D
Tweet media one
9
8
153
@FlohOfWoe
Andre Weissflog
4 years
I created a minimal standalone starter-project for Dear ImGui apps written in C for Windows, Linux and macOS (via cimgui and the sokol headers): Yeah, cmake, I know... but Windows'n stuff. I tried to keep it as simple as possible though.
Tweet media one
14
23
152
@FlohOfWoe
Andre Weissflog
7 years
very cool: clang compiled to WebAssembly running in browser, compiling C++ programs to WebAssembly, and run the result in browser, a bit like @mattgodbolt 's , but without server: (discussion thread: )
1
69
151
@FlohOfWoe
Andre Weissflog
4 months
Wow nice, in today's Safari Technology Preview upate on Mac (Release 197), the sokol-gfx WebGPU samples suddenly started working (cc @SebAaltonen maybe also interesting to check your WebGPU renderer with this version)
Tweet media one
4
10
153
@FlohOfWoe
Andre Weissflog
7 years
I must say the more I code in plain C the less I miss C++, C has this almost python-like simplicity and "smoothness" to it, and there is never this "which of the thousand C++ features is the right one for this situation" anxiety...
11
24
146
@FlohOfWoe
Andre Weissflog
5 months
It's really quite bizarre how switching from Win10+MSVC to Linux with KDE and a GCC toolchain feels like a beefy hardware upgrade. On Windows+MSVC it's "geez I *really* need a new laptop", on Linux+KDE it's "nah, still fine".
21
6
147
@FlohOfWoe
Andre Weissflog
3 months
This is really cool (a WebGPU shadertoy using Dear ImGui as UI):
6
25
147
@FlohOfWoe
Andre Weissflog
25 days
Not sure how I missed that brilliant @aras_p blog post. interesting points about over-abstracting and the "zero cost abstraction myth":
7
32
147
@FlohOfWoe
Andre Weissflog
3 years
What's really nice about Zig is that the whole toolchain is in a 40-ish MB download archive which has exactly one executable (zig) in the root directory, and it "just works" after unpacking without running scripts or setting up env-variables. Just run /path/to/zig build
12
5
140
@FlohOfWoe
Andre Weissflog
5 years
Trace logger in "Visual6502 Remix" working now, each log item is the full chip state and the first 4 KB of memory, and it's possible to go back in time. The UI stuff for this is all so super-simple and pleasant with Dear ImGui :) WASM version here:
7
29
144
@FlohOfWoe
Andre Weissflog
2 months
Here's finally the Zig blog post I promised two weeks ago: Had to get that out of my system though for being able to focus on sokol stuff again ;)
6
23
141
@FlohOfWoe
Andre Weissflog
5 years
Nice short article detailing the differences between C99 and C++20 designated initialization (also a nice example of how C++ takes a wonderfully simple, flexible and intuitive C feature and applies the "C++ treatment", essentially removing those three attributes ;)
@meetingcpp
Meeting C++
5 years
C++20 designated initializers #cpp #cplusplus
1
5
46
8
23
139
@FlohOfWoe
Andre Weissflog
6 years
Without people who "pirated" the games I made in the 80's, and later digitized the cassette tapes and "illegally" put them on the internet I wouldn't be able to put them on a web page for everyone to play now. The games would be lost since my own tapes are no longer readable :/
3
33
137
@FlohOfWoe
Andre Weissflog
6 months
An actually nuanced article about C, Rust and memory safety by a "security dude". Did somebody check if hell froze over yet? :) (haven't read the whole thing yet, will do now)
10
22
138
@FlohOfWoe
Andre Weissflog
7 months
@matiasgoldberg This got to be a joke right?
Tweet media one
5
5
137
@FlohOfWoe
Andre Weissflog
3 years
\o/ This is a C++ command line tool with fairly complex dependencies (SPIRV-Tools,glslang, SPIRVCross, ...) compiled with Zig as C++ toolchain and build system. WIP build.zig script (a straight port from cmake, and a bit adhoc cobbled together:
Tweet media one
7
14
135
@FlohOfWoe
Andre Weissflog
5 years
That's some next-level C99 shit right there :D
Tweet media one
13
13
132
@FlohOfWoe
Andre Weissflog
4 years
Good read, quite accurately reflects my own view of Rust and Zig, and also written in a refreshingly "non-extremist" style:
7
17
133
@FlohOfWoe
Andre Weissflog
1 year
"zero-cost exception model" they said...
7
4
131
@FlohOfWoe
Andre Weissflog
3 years
Zig is basically fixing decades old C/C++ tooling problems as a side quest :D (Rust should take note, this is how you lure C/C++ coders into your camp) #ziglang
7
17
128
@FlohOfWoe
Andre Weissflog
3 years
Phew, slowly getting there with the sokol_app.h multiwindow stuff. Still a lot of work ahead so don't hold your breath ;) The Dear ImGui viewport mode is basically the "required feature reference".
8
8
128
@FlohOfWoe
Andre Weissflog
5 years
I started working on the WebGPU backend for sokol_gfx.h, not much to see yet, but I'll track the work in this PR if anyone is interesting in learning how I go about adding a new backend to sokol-gfx: I almost feel a little bit excited :)
8
13
130
@FlohOfWoe
Andre Weissflog
4 years
First printed presentation of the binary number system, 350 years old (and not by Leibnitz, but a "Juan Caramuel y Lobkowitz"). If it weren't for the Latin, this could also be taken from an old computer manual :) (via @nyquist64 )
Tweet media one
4
38
123
@FlohOfWoe
Andre Weissflog
4 years
well that Raspi4 desktop experience is shockingly delightful for a computer that costs as much as a video game... there's a few things I need to fix in my workflow because the @code C/C++ extension doesn't support ARM, so I need to use different plugins, but otherwise great!
Tweet media one
14
8
122
@FlohOfWoe
Andre Weissflog
1 year
So Baldur's Gate 3 apparently is completely DRM free even on Steam? This game really destroys all the "established" PC gaming business myths :) (if you're not aware yet, BG3 has an insane CCU which is still growing, despite being a hardcore single-player-focused RPG )
Tweet media one
4
13
122
@FlohOfWoe
Andre Weissflog
7 months
The sokol readme header just got a lot nicer thanks to @jakubtomsu_ :)
Tweet media one
6
3
119
@FlohOfWoe
Andre Weissflog
5 years
I started a new min-blog-series looking in detail at the different sokol_gfx.h backends (first: GL). A bit "dry" and more like a reference, but might be useful for getting an idea how expensive certain things are in sokol_gfx.h in the different backends:
4
23
120
@FlohOfWoe
Andre Weissflog
11 months
I wrote a blog post how to make WASM debugging work for browser apps with Emscripten and VSCode starting from scratch with an empty project directory:
4
20
121
@FlohOfWoe
Andre Weissflog
4 years
Ok, I've added some intro documentation to the code and consider Pacman.c "done" now (might do another run over the code comments though). It's not a complete replica of arcade Pacman, but "good enough". WASM version, link to C source is bottom-left:
Tweet media one
7
21
120
@FlohOfWoe
Andre Weissflog
4 years
What a funny coincidence: Apparently GTA Online takes 2 minute to parses a 10 MByte JSON file :D
5
29
117
@FlohOfWoe
Andre Weissflog
4 years
why is a Windows keyboard driver 380 MBytes
31
12
110
@FlohOfWoe
Andre Weissflog
4 years
Interesting, I wasn't aware that @Blender is mostly written in C. Some C++ sources sprinkled inbetween, but all behind C-APIs. Might be a good study case of how to structure a big C project:
5
8
113
@FlohOfWoe
Andre Weissflog
6 years
I wonder what's worse for global warming, Javascript or Bitcoin mining ;)
@rossipedia
rossipedia 🇺🇦
6 years
This is one of the hottest graphs I've ever seen. Rewrote a @nodejs API in @rustlang . Pretty much an exact port. It gets roughly ~180 requests per second. See if you can spot when I deployed it:
Tweet media one
19
186
646
3
19
106
@FlohOfWoe
Andre Weissflog
3 years
"Goto Considered Harmful" my ass :D
Tweet media one
15
7
104
@FlohOfWoe
Andre Weissflog
1 year
Sokol samples (well, most of them) running on WebGPU (still very wip though, and still in a branch), needs Chrome on macOS or Windows: (a bit more info over on Mastodon: )
Tweet media one
5
10
104
@FlohOfWoe
Andre Weissflog
1 year
sokol-gfx WebGPU backend has been merged => see the other side for details:
Tweet media one
5
9
103
@FlohOfWoe
Andre Weissflog
7 months
The fact that .at() even exists and is allowed to exist for so long (instead of fixing operator[]) is a pretty good indicator of how broken the C++ standardization process is :/
@meetingcpp
Meeting C++
7 months
Tip of the Week #224 : Avoid vector .at() #cpp #cplusplus
2
5
37
15
3
103
@FlohOfWoe
Andre Weissflog
2 years
Lol, unbelievable. Musk is turning Twitter into Soviet Union 2.0
Tweet media one
5
7
99
@FlohOfWoe
Andre Weissflog
4 years
...when your C++ coders would rather be Lisp coders... (I pity the poor sod who needs to debug this one day) Found on r/programming.
16
15
101
@FlohOfWoe
Andre Weissflog
7 years
new blog post about sokol_gfx.h (minimal dependency-free, header-only 3D-API wrapper in C):
6
30
100
@FlohOfWoe
Andre Weissflog
5 years
The same is true for moving from C++ to C, but in the entirely opposite direction than C++ to Rust ;) (essentially, realizing that data should be "dumb" and not "smart", and that a lot of data in an application can and should have "static lifetime")
@funcOfJoe
J☁e Duffy
5 years
OH: "After writing 10KLOC of Rust, I've become a much better C++ programmer. And that's having written C++ for over 15 years." Rust's lifetime model reshapes the way your brain fundamentally approaches data structures and algorithms. Rust boot camp for all!
9
53
488
3
13
98
@FlohOfWoe
Andre Weissflog
4 years
Every discussion about immediate mode UIs should start with: - no, "immediate mode" does *not* mean that calling a "button" function immediately draws that button - yes, immediate mode UIs can keep any amount state between frames - yes, widgets can have stable identifiers 😩
13
6
99
@FlohOfWoe
Andre Weissflog
1 year
New blog post about the soon-to-be-released WebGPU backend in sokol_gfx.h: (yeah I really need to blog more frequently again)
4
14
96
@FlohOfWoe
Andre Weissflog
6 years
this is awesome, goes step by step from a simple one-liner to interesting small 'physics doodles':
0
29
95
@FlohOfWoe
Andre Weissflog
5 years
Looks like somebody wrote an honest-to-god 6502 + Apple I emulator in shadertoy (the real deal, not just a "fake" BASIC terminal like the previous "C64 in shadertoy"). The interesting parts of the CPU emulation seem to be in "Buffer A" and "Buffer C":
3
32
94
@FlohOfWoe
Andre Weissflog
5 years
@tumult I've been thinking for a while that the key to a really "slick" computing experience is running old software on new computers. It didn't occur to me that running old software in an emulator on new hardware is still faster than running new software on new hardware ;)
4
4
93
@FlohOfWoe
Andre Weissflog
4 years
I just merged a new utility header "sokol_shape.h" for quickly creating simple shape geometries and plugging them into sokol_gfx.hl, along with a few new samples. Header is here: Samples with source code are here:
Tweet media one
Tweet media two
Tweet media three
3
11
93
@FlohOfWoe
Andre Weissflog
4 years
Finally a rational explanation why UIs have regressed so much in recent years :D
@vzverovich
🤍❤️🤍 🇺🇦 vic𓂿or
4 years
@blu51899890 @FlohOfWoe They ran an A/B test that showed an increase in site usage while people were desperately trying to figure out where their shit went.
2
13
84
4
20
93
@FlohOfWoe
Andre Weissflog
4 years
Using WASM outside the browser has become delightfully simple, and the "runtime" is just a single self-contained 7 MB executable (the other handful of installed files are things like readme, license, changelog...).
Tweet media one
5
12
94
@FlohOfWoe
Andre Weissflog
6 years
I just stumbled over an incredible series of blog posts of the inner workings of the Z80 CPU, most detailed I found so far, builds on the die analysis work by Ken Shirriff:
4
26
94
@FlohOfWoe
Andre Weissflog
3 years
Oh man, Xcode13 is the gift that keeps on giving. This is the typing performance in a 16kloc source file (about one or two characters per seconds, even slower if the CPU is busy - in Xcode12 this was completely fine).
10
8
92
@FlohOfWoe
Andre Weissflog
5 years
Shower thought: New C++ versions are mostly trying to fix design faults of old C++ versions that don't exist in C in the first place.
7
10
94
@FlohOfWoe
Andre Weissflog
4 years
@jfbastien std::javascript to make it easier for beginners to get into C++ programming ;P
6
6
92
@FlohOfWoe
Andre Weissflog
10 months
Working on C64 support for my VSCode retro-assembly extension (). Not yet published!
3
7
92
@FlohOfWoe
Andre Weissflog
5 years
This is awesome because GLSL is essentially "C without pointers", it demonstrates how far one can get without pointers (raw or smart) or references. Shadertoy was a tipping point for me to explore more into a "pointer- and allocation-free" direction when coding in C or C++.
@wkjarosz
Wojciech Jarosz
5 years
This year I changed the last 2 assignments in my CG class @dartmouth to use @Shadertoy instead of C++. Overall it was a fantastic experience. Students implemented @Peter_shirley ’s first ray tracing book, and then ray marching + sphere tracing of SDFs. Thanks @iquilezles !
6
19
134
5
15
88
@FlohOfWoe
Andre Weissflog
5 years
. @github automatically blocking repositories which had contributions from (e.g.) Iranian developers is complete and utter madness (and besides, how can a repository maintainer even know what country a PR is coming from?) Proposal: make such repos inaccessible to US devs only
6
30
90
@FlohOfWoe
Andre Weissflog
4 years
A new project written in C by a Microsoft team. Maybe there *is* a glimmer of hope for an updated Microsoft C compiler that isn't two decades behind the standard. (yeah, I'm a naive optimist)
2
11
88
@FlohOfWoe
Andre Weissflog
5 years
It's remarkable how D3D12 and Vulkan came up with DescriptorSets and DescriptorTables and Root Signatures and what not to fix the traditional slot-based binding model, and Metal 2 just says "here's ArgumentBuffers" and everything is clear by just looking at this one slide:
Tweet media one
8
7
88