Peter Hoddie
@phoddie
Followers
833
Following
2K
Media
310
Statuses
3K
I don't believe in straight lines.
SF Bay Area
Joined November 2007
🚀Exciting news: Moddable brings modern JavaScript to Zephyr RTOS! Standard, lightweight, open source, and built for real-world embedded developers. Our preview features Digital, Serial & I²C IO, Web Workers, KVP storage, and advanced debugging. 👉 https://t.co/izi8xf5h6s
0
2
6
Also, the last paragraph is nonsense because the constant name includes the value, not only the value's purpose.
1
0
0
Hallelujah! (From an upcoming TC39 presentation... and not mine.)
0
0
1
Came across this comment by Knuth: "By the way, if you don't like goto statements, don't read this." Reassuring that not everyone automatically considers a goto statement a sin.
0
0
3
Committing to a project on GitHub for the first time feels like enduring a hazing ritual.
0
0
3
Three cheers for JavaScript.
theregister.com
: 'Memory vulnerabilities pose serious risks to national security and critical infrastructure,' say CISA and NSA
0
0
1
Hey, ChatGPT, the layout is OK, but isn't it usual to break lines at white space?
0
0
0
Suggested automatic replies from LinkedIn reinforce that the only socially acceptable response on social media is a positive one. You agree, right?
0
0
2
Moddable uses the excellent adpcm-xq encoder for embedded audio compression. It's one of my favorite repos to watch. The expertise, patience, and clear explanations of the maintainer, David Bryant, are a model of how it should be done. Here's an example: https://t.co/QpeX48YbAH
github.com
Certain players (f.e. ffmpeg) use multiplication instead of shifts inside the adpcm decode loop. f.e.: sign = nibble & 8; delta = nibble & 7; diff = ((2 * delta + 1) * step) >> shift;...
0
0
1
"Pretending resources are infinite is wrong." Amen.
@BraveSampson Great work. Long ago at SGI, we followed other Unix vendors in changing the kernel not to fail sbrk(2) when attempting to grow the heap beyond total RAM+swap or similar sane VM limit. This meant malloc was infallible, but your system could thrash to starvation, and you might not
0
0
3
@nothings Heh. FWIW, while I wasn’t on that committee, for a long time i would have said I was confident they made the right call. Many prior file formats like TIFF had unbounded expressibility, an enormous bifurcation of cases that readers had to implement. PNG needed to not do that.
1
1
7
VS Code is completely correct that "result" isn't used (except for me to see the return value in the debugger). But... shouldn't the "Quick Fix" be to remove "let result = " and keep "eval(s)" since it may have side-effects?
0
0
2
Of interest to fellow C-using nerds: For many years I have initialized structs with lines like struct Foo f = {0}; This week I learned that if Foo contains a union in which the first entry is smaller than later entries, C99 only requires the first entry to be zero-initialized.
12
4
128
Never imagined that GitHub would be blocked by a high school's Wi-Fi.
1
1
3