One use case I can see AI glasses could solve that no other devices can is contextual reminders - when I eat, leave home, etc. This could be a game changer for elderly with memory issues too. Of course personally I would only consider using that with local processing.
Would be great if CSS allowed to refer to the computed element size in properties that cannot affect said size, i.e. transforms, animations and transitions.
Maybe I should use this an excuse to dive into @ladybirdbrowser and build a prototype ๐ .
I think React hooks may have been a net negative. They do provide a very powerful API, but:
- there are way too many gotchas
- it is too easy to write spaghetti code
- if I want to less rerenders, my code becomes a wall of useMemo / useCallback
@jarredsumner@jarredsumner this is a large legacy closed source project so no code snippet easily possible. The diagnostic report on Mac say it is a good old null-pointer exception. Please DM me if you want the .ips file.
I often consider dropping @WebStormIDE in favor of something more lightweight, but itโs static analysis is still way superior to what anything else JS/TS related offers.
Saved my butt more than once. I only wish I could run its checks on CI, not just in the IDE.
@realamrutpatil This doesnโt come up often but if you imagine some kind of callback / notification system usually there is only one variant of the callback and it is generally nicer if that can be called uses batches instead of individual items. Bonus points for configurable batch size.
Programming tip:
If you make an API to do something, and you can imagine people needing to call it more than once, it should probably have a bulk version. Or even only have a bulk version.
This is especially important for IO workloads including HTTP, RPC, DB, etc.
It has been a while, but I just published new compiler programming video. Continuing my from-scratch language and a compiler written in C. This time working on a built-in debugger:
https://t.co/tK7sC5oCvR
I just wanted to write a small exploration project to better understand Lottie animation file format.
3 levels deep in yak shaving and I am writing a compiler for matching expressions in AST-like data structures ๐
I now have very mixed feelings about the optional chaining (foo?.bar) in JavaScript.
It is useful occasionally, but at the same time it makes it way too easy to have loosely typed and validated data floating around throughout the whole codebase ๐ค
Every few years I try to make a code editor (syntax highlighted) in a browser that works without a custom text input and undo / redo system like CodeMirror, or VSCode do.
So far it always turned into a hackfest and ultimately failed. Going for round 6 or 7 now... Wish me luck๐
My JavaScript parser can now also print the source code (with poor formatting) and parse it again with the identical AST. ๐
This is surprisingly harder than it sounds because of all the dark corners of the JS grammar.
Now I'm going to indulge myself in some more optimization.
Got distracted optimizing. Now the speed is within a margin of error compared to Acorn. This is quite exciting as it means there is still a lot of space to be much faster.
My parser passes full test262 suite (22k+ tests) ๐
Speed is also pretty good: ~20% slower than Acorn
Next step: pretty printing and roundtrip tests.
JavaScript regex literal syntax is a cautionary tale on how a small feature / decision can completely screw you over in a long run. Even C/C++ typedefs aren't as bad for parser writers.
I wonder if I know someone who could say why both Windows and Mac OS updates take 10s of minutes to complete. In that time you could overwrite full capacity of the SSD dozens of times.
This is not a troll tweet - I actually want to know.
Been spending a few evenings on writing a JS parser and all I can say is that the language has quite a few dark corners. And haven't even touched the whole regex literal mess yet. Progress is pretty good though (>50% of test262)
TIL that in JavaScript you can put property access part of the method call in parens and will still get the correct "this" ๐คฏ
("foo".startsWith)("foo")
is the same as:
"foo".startsWith("foo")