I’ve recently restarted my (previously abandoned) HackerNews project – huge thanks to @collindonnell’s code review.
I've just released v0.1.0, the first version that is “usable”.
Still has a long way to go though.
Please try it out! RTs appreciated.
https://t.co/tDLwofh2SS
Ok korean media out here calling me a "talented engineer" lmao
intelligence is literally a commodity now.
just spend more on claude + codex subs than your rent and u too can be a "talented engineer"
bro i'm literally a uni dropout 💀
Fast-forward merge for GitHub
https://t.co/hG0XhlwaOY
GitHub has gone far too long without supporting fast-forward merge in the web UI, so I built it myself as a Chrome extension. Give it a try!
One thing I can't get over with a lot of corporate blog posts is how a lot of them are LLM-translated, and then they show the translated one, with no clear button to switch to the original one.
Reading the article it's pretty obvious that they don't review the translate…
@jeremyphoward@mitchellh Oh I just googled this for reference and this tweet lol
More references:
https://t.co/S9T3WR21rU
https://t.co/KO3eiiH1Id
https://t.co/cimIFw8yD7
Unfortunately last time I checked there isn’t any method to configure this size :(
macOS's tty impl (in the kernel) has a 1024 byte internal buffer limit for cooked mode. After that, writes succeed but the data is silently dropped. iTerm2 works around this by sleeping ~16ms between writes. My day is ruined and my disappointment is immeasurable.
@jeremyphoward@mitchellh That’s probably a macOS thing, I had the same experience in https://t.co/K909GyzbGA. It’s due to the macOS kernel only providing a tiny (1024 chars) buffer to the tty for default cooked mode. That’s why if you paste text with no new lines, it gets truncated after 1024 chars.
@dai_shi@TkDodo Would creating an issue in the Zustand repo actually find out a good API for this, or nah?
I did notice that for Jotaiv2, there seems to be a provided AbortController that seems to prevent these scenarios:
https://t.co/7AN29lp7hv
I'm trying to figure out race conditions in async actions when using Zustand…
So i.e. if I have an async action that does async things before setting the store, when calling the same actions twice, the first might actually take more time than the second and set a wrong value.
@TkDodo@dai_shi@tan_stack For example… if you're doing web workers and you're getting asynchronous responses. (I guess one might probably able to bend over react query to actually handle it, but i'd rather not) ;)
@TkDodo@dai_shi@tan_stack I'm very grateful of react query and using it heavily, it's just that there's some kinds of async actions that aren't really data fetching… but still basically has the same problem.
i.e. if we have a
store = create((set) => ({ v: 0, action: (a) => { let v = await f(a); set({ v }); })
and we do action(a1) and action(a2),
then depending how much await f(a) takes, v might be set as f(a1) instead of f(a2).
I'd like to prevent this, how should I do that?
When Ghostty detects a password input prompt, it now changes the cursor to a lock and on macOS enables the secure input API. When the secure input API is enabled, we show a neat, animated icon that explains what's going on when clicked. Another example of native UI wins (imo).
Secure Input is the macOS system API that prevents accessibility APIs from reading your keystrokes, so things like screen recording software and so on can't read your passwords.
Other terminals on macOS support secure input. I think only iTerm also supports secure input on password detection. So as a disclaimer, I'm not trying to claim this as a huge innovation, I just think our implementation is nice. 😊
@TkDodo Yeah maybe.
I might just have too much resistance on creating new components and go the easy way. (I personally feel that if you have a lot of components 'for the same thing', it's harder to make the logic for that thing 'local')
@TkDodo So at that point you’re forced to have all of those returns at the end, and so you get a bunch of logic between your data fetching logic and your returns…
And at that point I feel like this starts to matter less (bc most of the complex code isn’t in JSX, but the logic above.)
@TkDodo I’ve always avoided early returns in React because I felt it doesn’t work well with hooks.
If you call a hook between one of the returns, that becomes an error right (due to the rules of hooks)?