Dan is out here making the arguments for RSC I never knew I needed to hear.
01.06.2025 01:09 β π 5 π 1 π¬ 0 π 0@markeev.com.bsky.social
Principal full-stack engineer who codes for 25+ years, both professionally and as a hobby. - TypeScript and C - NGINX, Kubernetes, Nodejs, MongoDB, MySQL - Vue, React - Webdev, compilers and IDEs, IoT and wearables, gamedev, etc
Dan is out here making the arguments for RSC I never knew I needed to hear.
01.06.2025 01:09 β π 5 π 1 π¬ 0 π 0A nice write up on the race conditions attacks. While with a single data store, you can tackle those with transactions, but multiple data stores are much harder to secure. portswigger.net/research/sma...
31.01.2025 11:25 β π 0 π 0 π¬ 0 π 0Good points on distributed locking: martin.kleppmann.com/2016/02/08/h...
26.01.2025 09:24 β π 0 π 0 π¬ 0 π 0Turns out you can do grps mirroring with #nginx: inge.4pr.es/grpc-traffic...
I wonder if same trick can be used for websocket mirroring.
#javascript strings are faster than c++ strings! (sometimes): iliazeus.lol/articles/js-...
21.01.2025 17:26 β π 1 π 0 π¬ 0 π 0This is very 5head but super interesting! π€© Itβs crazy how people learned to exploit things you would never think are exploitable in the first place... #javascript pure.tugraz.at/ws/portalfil...
21.01.2025 16:44 β π 0 π 0 π¬ 0 π 0it returns undefined, because return statement doesnβt allow line break right after return. thankfully, modern IDEs will most likely give you a squiggly warning or even error, depending on your settings.
21.01.2025 16:00 β π 0 π 0 π¬ 0 π 0the modern web yep π€¦ββοΈ
20.01.2025 06:16 β π 0 π 0 π¬ 0 π 0A very nice writeup on the OpenAIβs incident with #kubernetes control plane going down: render.com/blog/a-hidde...
17.01.2025 12:52 β π 0 π 0 π¬ 0 π 0Just faced this: Nginx ingress controller consumes a lot of memory during configuration changes (e.g. when creating ingresses). Which can lead to pods getting killed with out of memory error π±
It is quite insane considering that NGINX is a very memory efficient server
github.com/kubernetes/i...
Some very interesting details there!
- to avoid a need for source maps, type annotations are replaced with spaces
- swc is used to do the actual stripping. one can say that swc is now shipped as part of Node.js π
- enums behaviour
- why tsx files are not supported
β¦and so on
I disable js in Chrome Dev Tools or use text browser e.g. lynx
13.01.2025 08:11 β π 1 π 0 π¬ 0 π 0Today's daily challenge on leetcode is really hard! If you like to do some morning brain racking, this challenge is for you! π
I am actually quite proud I was able to solve it. Saw a guy on Twitch who streams leetcode challenges for 24 days in a row and he couldn't solve it π€―
I used #typescript.
This is so cool⦠Minecraft that fits in a single QR code (2953 bytes): blog.allpurposem.at/minecraft-qr
10.01.2025 05:31 β π 1 π 1 π¬ 0 π 0I was fascinated by the 1-billion row challenge, but didn't think JavaScript would be the right tool for the job. It was great to see @jackyef.com's dive into it and achieve a 30x speedup from the baseline: jackyef.com/posts/1brc-n...
07.01.2025 22:55 β π 6 π 1 π¬ 0 π 0I also released ts2c 2.2.10 to npm - that's gonna be the last version based on TypeScript most likely.
The online demo at andrei-markeev.github.io/ts2c/ is using 2.2.10 for now.
Just merged a massive change in ts2c, migration from TypeScript Compiler API to kataw - faster and more lightweight JS parser π
Two weeks of hard work finally materialised. If I knew it would be that hard, I would probably never start π
But I did it πͺ
github.com/andrei-marke...
Even though I despise dynamic forms, but I built a dynamic forms engine myself about 3 years ago, to replace manually built forms π€·ββοΈ
The use case literally demanded it.
It was a long onboarding wizard with huge amount of customization per location, and we had hundreds of locations.
Ah so it was form generation from a schema?
Yeah I wholeheartedly agree that in 95% cases it's better to make forms manually. Like write them in JSX. If non-devs want to do it, there's e.g. Figma and then devs can brush up the result.
However, there are different use cases too.
sounds actually like a cool project to me :)
I did "intelligent" forms several times, for React and Vue, but never had to work with AST transforms for this, typings were enough.
it might be challenging, but why horrible?
used it in ts2c: github.com/andrei-marke...
02.01.2025 15:55 β π 0 π 0 π¬ 0 π 0#typescript has a very handy feature: it can merge interfaces, even with external libs.
I regularly forget how to make it work with modules, so here's the reminder π
Btw: `declare global` is also super useful π
I am actually quite proud of myself:
1. Investing a lot of hard work and still being able to withdraw is not easy.
2. Learned quite a bit about #javascript performance from this exercise :)
Spent 2 days (ok, nights π€ͺ) rewriting type inference system in ts2c to a new "super efficient and more debugabble" implementation.
Measured performance. Unchanged π
Tried debugging it. Still very hard.
Rolled back the changes π€·ββοΈ
Person is not a class, you can't use `instanceof` on interfaces π
Type guards can be used instead: www.typescriptlang.org/docs/handboo...
Also don't forget to make sure that `NaN !== NaN` ! π
01.01.2025 03:34 β π 0 π 0 π¬ 0 π 0Combine this with a clone of C preprocessor in JS (and maybe GNU make as well) github.com/ParksProjets...
Currently we don't have any preprocessors in JS and we cannot easily eliminate e.g. debug logging from production bundle.
Yesterday stumbled upon this funny idea of using `#include` in JS to bundle files with C preprocessor, thought "haha, nice", and closed the tab.
I guess my brain kept thinking about it π
I woke up and now I think it is a really interesting idea actually π€ͺ
rreverser.com/es6-modules-...
screenshot of `git log` commands, the most recent commit named "migrate to kataw WIP" showing that there were 54 files changed, with 1927 insertions and 1457 deletions
Current status: fixed 700+ typescript errors, phew π
Doing a big ass migration from using #Typescript Compiler API to a faster and more compact js parser (kataw) in TS2C.
Btw, fun fact: back in 2000s, I wrote a compiler. It was a long multi-year project. I even used it to compile executables for my own operating system.
And I guess because I was programming in Perl a lot in beginning of 2000s, the language didn't have ANY keywords π
Everything was special symbols π