It’s possible since a while with --experimental-strip-types flag, but since Node v22.18 it is possible just like this under many circumstances. Check the official docs on how to run typescript natively to learn more!
You can’t tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don’t try to second guess and put in a speed hack until you’ve proven that’s where the bottleneck is. Measure. Don’t tune for speed until you’ve measured, and even then don’t unless one part of the code overwhelms the rest. Fancy algorithms are slow when n is small, and n is usually small. Fancy…
Today I was about to push a focussed test. A focussed test, you ask? In Jest (and others) one can run only a specific test, by writing it.only(... . Pushing this to production might create some funny or not so funny side effects though. Luckily there is the no-focussed-tests linter rule in eslint-plugin-jest .
If you want to mock an imported function in Jest in a way that allows you to check if it has been called, you can not do the seemingly straighforward: // mock prefix necessary btw const mockThatFunction = jest.fn(() => 'stuff') jest.mock('@/path/to/module', () => ({ thatFunction: mockThatFunction, })) // ...in test descriptions…
On kernel updates I saw a recurring “EFI variables are not supported on this system”, so I investigated and learned that the new EFI variables are provided via a file system that needs to be mounted first: mount -t efivarfs efivarfs /sys/firmware/efi/efivars
This article is crossposted on dev.to . Feel free to join the discussion there. At some point I started moving a side project over to Vue3 (which is still in beta). The side project is in a rather early stage and so I decided to rebuild the whole underlying foundation of it from scratch making use of the new possibilities of Vue3, especially of course the composition API. 🔗 Nuisance One nuisance…
A couple of years ago (Oh it’s almost a decade! Am I that old already?), when the Canvas API got widely adopted by most browsers, I started experimenting with it. The fascination was high and I immediately tried to use it for interactive toys and games. Of course, the games I made (and make) are usually not very sophisticated. That is mainly because I create them only for fun and without much…
This is a follow-up on The expected tutorial: How to install WriteFreely on a Raspberry pi 3 in 10 steps . I did it! I finally got WriteFreely to run on my Arm server (check out Scaleways baremetal cloud servers ). It wasn’t so easy because with 512MB of RAM I couldn’t simply download and build the source on my webserver. Only solution: Cross compiling. Easy especially in Go, right? If you read…
The font is called Spleen , as mentioned in this BSD Journal article . To be totally honest, I stopped thinking about TTY (aka console) fonts a long time ago. It just happened to get interesting again when I got a HiRes screen and suddenly a magnifying glass was necessary to read the TTY. Yes I am one of those people who still deny the existence of graphical installers. If you want to change my…
NOTE: This is a copy of the original article from Aug 17th, 2017. You can read the archived original on archive.org The button click invokes a function that just assigns a new value to a property. Still the template gets automagically rerendered. But we all know there is no fairydust involved, right? So how does it actually work? 🔗 The magic of getters and setters With the ES5 standard JavaScript…
When I uploaded image files, they somehow got mangled. The uploaded file was bigger than the original and the new “file format” was not readable by any means. I got intrigued. What is it, that happens to the files? The changes seemed very random but reproducible, so I created a few test files to see what exactly changes and when. My first file looked like this: 0123456789…
You can find the original article on github (in German). So, times changed and I thought about a reiteration of that topic, but instead focussing on the amount of money you need to crack the password using Amazons biggest GPU computing instances p2.16xlarge , which – at the time of writing this - costs 14.4 USD per hour. I will also compare this with the much faster Sagitta Brutalis (nice name,…