Benathon

41.5K posts

Benathon

Benathon

@Benathon

Dev. Founder. Free Speech. #gamedev Bitcoin, XMR. 3D printing. 250mm drones. Linux, C++, RF and DSP with SDR, Verilog, node, WASM. Hackathons. Bay Area.

SF bayarea Katılım Haziran 2012
6K Takip Edilen2.3K Takipçiler
Benathon retweetledi
Edmund Humenberger
awesome things/products can happen when you have an open source FPGA tool chain. No fear that the FPGA vendor does change the tool license. github.com/controlpaths/c…
English
1
6
25
1K
Benathon retweetledi
trish
trish@TrisH0x2A·
Redis does not use C strings antirez wrote a custom string library called SDS: Simple Dynamic Strings it later became a standalone library C strings had three problems Redis could not accept - strlen is O(n) because it scans until the null terminator - strcat needs manual capacity management and often scans the string again internally - and C strings cannot safely store arbitrary binary data because null bytes end the string SDS fixes all of this by storing metadata in a header placed right before the string buffer
trish tweet media
English
30
36
512
33.2K
Benathon retweetledi
trish
trish@TrisH0x2A·
in 2000 a programmer discovered you can implement coroutines in C using the same switch trick as Duff's Device it's called Tatham's Coroutine. it still compiles and is technically valid C he used it in production inside PuTTY (the SSH client used by millions) Simon Tatham's own words: "As far as I know, this is the worst piece of C hackery ever seen in serious production code."
trish tweet media
English
27
89
1.1K
66.8K
Tim
Tim@llhtimlam·
Want to see distributed computing explained via Pong? Inspired by TinyTPU and TinyTapeout workshop at FOSSi, I wrote a paper under a week pairs this demo with a proposed next-gen optical I/O chip architecture & a roadmap to prototype it. Read it on GitHub: github.com/llhtimlam/tt_u…
English
6
9
99
19.9K
Benathon
Benathon@Benathon·
@Johnsmemes Consider surfing as a way to increase lymph flow all throughout your body to allow medication to reach every bit of the disease
English
0
0
0
49
Benathon retweetledi
trish
trish@TrisH0x2A·
NaN boxing IEEE 754 says a 64-bit float is NaN when all 11 exponent bits are 1 but it leaves 52 mantissa bits undefined and modern 64-bit pointers only use 47 bits LuaJIT, JavaScriptCore, and SpiderMonkey all exploit this every value in the language nil, true, false, integers, strings, pointers is stored inside a single 64-bit double one 8-byte field carries any type if the double is a real number it is just a normal float if the upper 13 bits are all 1 it is a NaN and the remaining bits carry the type tag and the payload this is the actual layout from LuaJIT's lj_obj.h
trish tweet media
English
6
10
136
8.9K
Benathon
Benathon@Benathon·
@PipingJam @TrisH0x2A But this way skips the first i=0 of the for loop. Something a static i could still do but not with the for loop logic. Or an empty first ;
English
0
0
0
8
Jam 
Jam @PipingJam·
@TrisH0x2A Like the non macro way of writing this specific generator function is so much easier to understand, but maybe not the case for more general generators
English
1
0
0
26
trish
trish@TrisH0x2A·
@Benathon you call it like a normal function just call generator() in a loop and each call returns each call to generator() returns 0, then 1, then 2... up to 9. the state is saved inside the function itself between calls
trish tweet media
English
1
1
24
4.2K
Benathon
Benathon@Benathon·
@TrisH0x2A Ok I finally understand what’s going on here. I guess this is useful in some cases because it jumps down to the line when you resume. Yes this is cursed
English
0
0
0
85
karo miles
karo miles@Toobusy41913321·
The best doctor have seen so far never lost a life while saving lives Did you just see how extraordinary a doctor is supposed to be
English
43
233
13.3K
2.1M
Akshar Vastarpara
Akshar Vastarpara@AksharVastarpar·
@dwarkesh_sp @reinerpope FPGAs have always been a great platform to explore and experiment with. That’s why we’ve released a $4 FPGA dev board that gives you an Arduino-like MCU interface, along with an entry point into the FPGA world. Now, learning FPGA costs less than your coffee. @Vicharak_In
English
5
4
96
4.2K
Benathon
Benathon@Benathon·
@blind_via Name a USB-C product that uses wave soldering?
English
1
0
0
339
Samira Khan
Samira Khan@samiramanabi·
Hmm… did people forget to take the undergraduate computer architecture course?
English
20
17
600
120.9K
Jamie Jones
Jamie Jones@JamieJ23239·
@Freeaddition I know it’s a show but what a crock of shit! She couldn’t breathe yet still managed to wait for the ambulance to arrive and grill the nose lol 😂
English
6
0
172
14K
Benathon
Benathon@Benathon·
@CLAYGATLIN I have so many questions. What is resonance graph computing?
English
0
0
0
4