Handmade Network»Yasser Arguelles

Recent Activity

Ever needed to intern a lot of stuff across a bunch of cores? well I did and I've now got it working correctly, this is a lock-free hashset. It's an application of Cliff's non-blocking hash map except written in C instead of Java and for simplified for hashsets, not hashmaps (If i need those later I might port it). Here i've got a spall trace of attempting 4 million interns on around 1 million unique entries, it's 360ms for 6 threads to do all that and around 400ns per attempt when it's not resizing. I do start with a shitty size to stress test it (32 entries) and you can see the resizes in yellowish. When I cut the number of threads in half it's around 512ms to complete the job and single-threaded it's 1.1 seconds. I'm hoping to finish packaging it up into a library tomorrow alongside writing some comparisons against strided & fully locking interning.

nothing planned yet, just fiddling with an old project and fixing the Cascaded shadow maps such that it's one texture rather than 3 (need to pick better distances lol)

&cuik I've been learning to parse LLVM bitcode, on the left is TB in it's flattened text form and on the right we have the disassembled LLVM bitcode, the goal being to eventually have a drop-in replacement for the llvm tool, llc, yes it does compile too (left is mine, right is LLVM, both unoptimized):

&cuik When im bored i toy around with TB's optimizer, in this example it's doing some dumb stuff with the regalloc but more importantly it folded the branch into a branchless select and that into a float max operation (in retrospect the code was slightly wrong but i fixed it :p)

My forth (i have too many side projects :despair:) is now capable of storing variables, when you write :var x ; you're saying you want to have a 64bit region of memory and it'll generate two words to deal with accessing it x@ which loads from x, x! which can store into x (so x@ 1 + x! is just x += 1). Other stuff has been fixing up the JIT->interpreter interactions to not be bugged and making sure that small words are inlined early, in forth you might compose a bunch of words into tiny sequences but in the machine code i actually need them as a big blob if i expect it to be performant

&cuik Only a bit laggy :P, i'll be improving codegen on switch statements once i'm not up at 7am

&cuik a bit of GLSL parsing using the Cuik facilities along with some additional stuff, we winning :P (the qualifiers are being parsed, the dumper just doesn't show their results yet)

&cuik more stuff, we've got quads now so i can start on making the game logic in lua, ideally we get sword slashing tonight

&cuik ok we got a window showing up now, i had to fix some idiv bug because regalloc is lovely :P, time to make a GL2 context

&cuik Got the JIT to be able to call other functions, we can now printf from inside it

&cuik started work on the DLL side of libcuik, i'm calling libcuik from luajit using the fancy FFI and now i can introspect or compile C code from within lua, im hoping to setup a nice little library for this such that a lua project can easily embed C and call it when it needs performance or other C concerns. I purposefully made it error because if not it doesn't say anything lol

&elf Next step is writing the loader simulator, it shouldn't be hard considering my scope but it should be able to display when and where things are allocated and loaded.

we got some tooltips working, now when you hover over highlights it'll tell you what they're called, now it's time to start on animations

Got inspired by the Tommorow Corp stuff, so i wrote a hot reloading system that can preserve globals across runs because... well because i can?

Cuik/TB can now emit EXEs directly, the feature is still early but it's almost capable of linking against libc. Here's a test of ciabatta compiling with the microsoft linker and the TBlink respectively. For the spall views you can see link.exe on the left and TBlink on the right. &cuik

&cuik started work on the user-friendly diagnostics option 🎉 , the idea being that some reporting methods play better with automated systems like editors but some play far better at removing the noise (there's both a highlighted options and caret version because colors aren't always available and i haven't decided on things yet). Compare this against the old way of dealing with these types of errors.

&cuik More debug info! this time i've got some basic support for structs

&cuik Guess who just got a little further into Codeview support in Cuik/TB! 🎉

Final addition before being done for the jam (i'll continue this project afterwards, just without the crunching :kekw: ), got some loops!

&cork started work on functions calls, ideally i can do retyping tommorow so that my display of arrays isn't incorrect

Got some basic control flow visualization working, imma add functionality to reorder things for convenience!

&cork Got the variable renaming working!

&cork Got my first function converted over using my Decompiler, it's slightly broken but almost there

&cork I've made TB bindings for Odin using Cuik to handle the automated labor with me filling in for the limits of it. I'll be needing it for the code analysis stuff that i'll be doing.

&cuik Been making changes to the CLI, also the spinning triangle is doing as spinning triangles do... that's right, compile correctly

Getting closer to having parsed & type checked my entire compiler with itself 🥳, ignore the .cpp file, it won't be doing that one, instead i'll probably convert it to valid C file &cuik

Made a small demo for generating COFF .obj files for windows, it does enough to print a simple formatted string (ping me if you've got questions or see something wrong in the code): https://gist.github.com/RealNeGate/428a274496ce9852e06f9db1852b6cc2

Getting somewhere with line info on my Cuik C compiler

It's becoming a proper project now (not complete :p but now people can view my ""masterpiece""), the disassembler itself will most likely be part of the Cuik toolchain once i fix that up: https://github.com/RealNeGate/disx86

Working towards a simple x86 disassembler library! (left is me, right is dumpbin)

Got the IOCCC donut working with only minor changes to be C11 compliant (no default int, no implicit decls)

Added an AST dump to CuikC behind a little -emit-ast option

Added a very undescriptive and very early "time report" feature to my compiler where it tells you where time is spent 🙂

Got the restrict pointers working 😄

I've successfully failed at hello world :kekw:

Attempting to make an visual for my optimizer, still early but the idea is there... ish