Opens profile photo
Follow
zack
@zack_overflow
^thats my cat. 21 & low-key producing music and high-key building modfy.video (#ODX1 ). engaging in mischief related to rust/wasm/compilers/FP
Toronto / Saudizackoverflow.devJoined November 2020

zack’s Tweets

I noticed I find it impossible to turn off when coding (or writing in general). I wonder if, when working on a very visual problem, there's a cognitive context-switching performance overhead from constantly having to switch from visual to inner-monologue thinking and back
Show this thread
Meditating has given me a greater control over my inner monologue, it helps me tame the signal/noise ratio of my consciousness It also has improved my visual cognition, inner monologue gets in the way of visualization if you can't control it well
1
Show this thread
Do you have an inner monologue? If so can you turn it off when you code? Or do you think in abstract thoughts or visions/images/colors and what is that like when coding?
2
2
Show this thread
dis funny: PoAC has been successfully implemented, but for only 9 packets of data, with a packet loss ratio of 55% (due to operator error), and a response time ranging from 3,000 seconds (50 min) to over 6,000 seconds (100 min). Thus, this technology suffers from high latency.
4
Show this thread
"[...] our VP of People has previously said that backend Haskell engineer is the “easiest role to hire for” in the entire company, and in my opinion hiring is Haskell’s “killer app”."
1
Show this thread
rlly Interesting that has an easier time hiring devs for Haskell (a very esoteric lang) than TS devs "Too many companies recruit for common languages. Our recruiters have to send 10 times as much outreach to get a response for TypeScript jobs."
1
25
Show this thread
I know most modern TVs have multiple settings for adjusting picture quality / colors, are there similar settings for adjusting audio compression to hear dialogue better?
2
3
Show this thread
In audio engineering, compressors (not to be confused with data compression) reduce a signals dynamic range, reducing the difference in volume between the loudest and quietest sounds Whenever I watch movies/tv on VLC I turn up the compression to hear dialogue better
Quote Tweet
Am I going deaf or has anyone else had to watch every TV show with subtitles since like 2019
Show this thread
1
4
Show this thread
Design patterns every programmer should learn in the 21st century: 1. Associativity 2. Currying 3. Sum types / Product types 4. Fold / Map 5. Passing functions as arguments 6. Immutable data structures
29
866
I wanna make a new Vim mode called "syntax mode", when enabled you can manipulate code on the syntax/ast level (i.e. structured editing) And a popup appears above the token you're editing (like the intellisense popup) and shows the token's place in the syntax tree
2
6
Show this thread
wtf almost 2 years ago I made a site and literally forgot about it until just now just logged into google analytics and i see it gets 500k impressions, 25k clicks, and 37k users a month!
Image
Image
Image
4
20
Synapse ⚡️ It’s a neurone to neurone connection, or in other words, small gap at the end of a neurone that allows impulses to pass from one neurone (presynaptic) to the other (postsynaptic)🧐 An amazing Video to visualise how a synapse works😍 - Credit of Video:Helix animation
Embedded video
0:21
1.7M views
16
1,905
Show this thread
“In high school we learned that 2H₂ + O₂ → 2H₂O. It’s ridiculous to think that that simple reaction is sentient. So how could a human brain, which is simple a large system of such reactions, produce thought?”
Quote Tweet
Wrote op-ed w/ Nobel Prize winning economist @paulmromer in which we explore the power of mathematical functions (and mathematical thinking) to provide a clear debunking of AI sentience and to reveal what's been largely missing from the debate. 🧵 1/14 barrons.com/articles/ai-ar
Show this thread
2
11
Show this thread
Buuuut that proposal is inactive now, in favor of the component model proposal, which currently doesn't have a solution for this written in the design but lists "adapter functions" as a future feature. So it could be a very long time before its ready.
4
37
Show this thread
But this could be changed in the future WASM's Interface Types proposal addresses this exact problem. It lets you define an "IR" so you aren't stuck with WASM's fixed representation of data types
1
35
Show this thread
I think the only compelling reason to use a WASM web framework right now is if you want to write code in an another language: Rust/Zig/C++/etc. Which is valid, I just don't expect something like Yew to be much faster.
1
26
Show this thread
So I don't think perf is a super compelling reason to use a WASM frontend framework. And that's also why rewriting React/Svelte/SolidJS/etc. in WASM won't really amount to significant performance gains, if any.
1
27
Show this thread
Keep in mind wasm-bindgen is the lowest-level possible Rust WASM framework, it just calls vanilla DOM functions from WASM. It's the vanilla JS equivalent in WASM
1
18
Show this thread
It's particularly bad with strings, not only do you have to copy them, but convert them to several different representations (ex/ JS UTF-16 -> WASM array of numbers -> Rust UTF-8) Web frameworks read/write many strings (text content, classes, style attributes, etc.) from the DOM
1
28
Show this thread
But in a WASM frontend framework, you havee to call the DOM through imported JS functions (there's no way to access the DOM directly from WASM), so there's no escaping this performance cost
1
38
Show this thread
There is always an overhead from copying/serializing/deserializing data from WASM -> JS and vice-versa and it can be bad for perf. For WASM to outperform JS you kinda have to minimize how frequently data crosses the JS/WASM boundary, to reduce this redundant copying/computation
1
47
Show this thread
Why don't Rust/Zig/etc make their array list type parametric over the amount of bytes used to store the capacity & length? Most langs use u64s for the length & capacity, which can be wasted space / bad cache locality if the item count is small
3
3
Show this thread
The above example goes beyond type-safety, it's a performance optimization. You only need to check the array is sorted once and then you can use it in other functions that expect a SortedArray. Another example, composing refinement types for even stronger types:
Image
5
Show this thread