HNHacker News
TopNewBestAskShowJobs

maga

892 karma · joined January 20, 2012

http://maga.name

denelxan@gmail.com

submissionscomments
maga··on Esbuild – An extremely fast JavaScript bundler
I guess it depends on your project and workflow preferences. Personally, I'm not a big fan of HMR and the bundling times are negligible even without "pre-bundling" npm dependencies (as Vite puts), so I see little reason for Vite.
maga··on Esbuild – An extremely fast JavaScript bundler
Often overlooked things when discussing esbuild here:

1. It's not just a faster replacement for a single %tool_name% in your build chain: for the vast majority of cases, it's the whole "chain" in a single cli command if you're doing it right.

That is, you don't just stick it inside, say, webpack as a faster replacement for babel (although you can). No, you look carefully through your webpack configs and its myriad of plugins, ask yourself whether you really need to inline css in jsx in png while simultaneously optimizing it for IE 4.0, realize you don't, through out the whole thing, and use esbuild instead.

I have two 50K+ LOC projects using esbuild, and I would use it even if it was slower than webpack/babel/tsc simply not to worry about the build chain breaking due to an update to some obscure dependency or plugin.

2. It is fast because it's written from scratch to do a set of particular things and do it fast, not just because it's Go and parallelized.

If you look at the commit log you will notice a lot of performance tweaks. If you look into the issues, you will find a lot of requests for additional features rejected, often due to possible negative performance impact.

3. The most impressive part about esbuild development is not just that it's one guy writing it: it is the level of support and documentation he manages to provide alongside.

The release notes alone are a good course into nitty-gritty details of the web ecosystem: all the addressed edge cases are explained in detail. To top it all off--all opened issues, no matter how uninformed they seem, find a courteous response.

maga··on Deno 1.14
I agree wholeheartedly with the argument: tools getting in a way is the ultimate annoyance; in fact, struggling to force Jest to play nicely with ESM modules and TypeScript was the final straw that pushed me towards Deno for library development.

However, the argument can be made against any tool, and I'd say Deno here is the least deserving: in most cases it has just adopted the "defaults" set by tsc, eslint, or prettier, and just like them it allows ignoring these rules where necessary.

That said, I also think Deno made the right choice by enforcing these by default. Hopefully, it will fight the tide of low-quality code that plagues NPM. I do have to wrestle the linter, but it's mostly because I'm writing libraries that by themselves are pushing the limits of the TS type system, e.g. in structurae[1] I make an extensive use of mixins extending built-in objects, and mixin support is still nascent in TS. This is far less common in day-to-day production code, where, for example, using `any` or `object` is more often a sign of sloppy thinking rather than a necessity.

[1] https://github.com/zandaqo/structurae

maga··on Deno 1.14
Thanks, I usually do, but in this case they are typescript issues and have tickets in the ts repo.

For example, constructor signature for mixins requires `any` type that conflicts with `no-explicit-any` rule. In another case, `object` cannot be replaced with `Record<string, unknown>` when used with conditional types to mean "any non-primitive value".

maga··on Deno 1.14
Can you share a bit on the use case, i.e. what do you need configured?

Personally, I find Deno's "zero config" approach appealing, although I do have to fight the linter's "ban-types" rule occasionally since suggested type replacements are not equivalent.

maga··on Ivermectin for the Treatment of Covid-19: A Systematic Review and Meta-analysis
The way these online memes turn into social issues forcing even reasonable people to pay attention is one of scarier things I've witnessed.
maga··on The lost tablet and secret documents: Clues pointing to a shadowy Russian army
There is no shortage of poor, desperate, and morally flexible (to put it mildly) Russians, period. There is no need to bring racism into it. In the particular case of Ukraine it's actually counterproductive--this "diversity" was overblown by both sides: Russians wanted to represent the whole affair as "Soviet men of all kinds defending against Ukrainian nazis", and Ukrainians wanted to see it as "an attack of an Asian horde". I understand it's hard for Ukrainians to accept that people attacking them cannot care less for their common Slavic roots, but the sooner you do the better your chances of survival.
maga··on Zx 3.0
And here is the same thing in Deno:

https://gist.github.com/zandaqo/93004fb265146a95aadb28ec851a...

maga··on Deno 1.13 Release
I'm using Deno for developing my isomorphic libraries (e.g. structurae[1]). It comes with a built-in toolchain (formatter, linter, test runner, compiler) that significantly reduces headache when compared to jangling prettier, eslint, jest, and tsc.

[1] https://github.com/zandaqo/structurae

maga··on American parents are sending their kids to 'Russian math' (2017)
A bit tangential here, but our calculus/math analysis professor actually told us that the Russian and later Soviet math school drew a lot from the French, although, he might have been biased due to his apparent partiality towards Bourbaki. According to him, the university level math was taught exclusively in French during the Tsarist times, and they had some troubles coming up with Russian terminology when Soviets ordered all teaching to be done in Russian.
maga··on American parents are sending their kids to 'Russian math' (2017)
That is indeed terrifying.

Not to take away from the importance of a well-thought-out program, learning materials, or competent teachers, I was drawing attention to the immense time and effort that some students would invest often with an institutionalized help.

In our case, the programs were standardized, the textbooks were virtually the same throughout the union. Barred special schools and eccentric teachers, all kids were studying the same things at the same time. What differentiated the bespoken Siberians from us was that order of magnitude difference in the time put in. It challenged my sense of normalcy in many ways: people being this good at math without being apparent geniuses, universities teaching math extra 4 hours a day, realization that there is enough undergrad calculus to last 3K hours.

maga··on American parents are sending their kids to 'Russian math' (2017)
I went through the Soviet/Russian school system with all the advanced topics being covered in high school as others described here. My moment of zen was on my third year in one of the top tech universities in Moscow. There were quite a few students coming from Novosibirsk University who were comfortably ahead of the curve when it came to math. When they showed their transcript ("zachetka"), they had ~3000 hours of Calculus in the first few years against our ~120... As they described it, each day after the usual roster of lectures and seminars, they would spend 4 hours in class in the evening solving math problems with a teacher. While we might have spent a few hours doing homework every now and then, it was nowhere near this. Not to mention doing it in class with a teacher who would likely also give them more challenging problems and valuable feedback. The sheer amount of time and mental effort was staggering.
maga··on China’s 51st power reactor enters operation
Now I'm curious as to what would that pedant call a human reactor.
maga··on AlphaFold Protein Structure Database
A curious non-biologist here: how valuable are these low confidence predictions for biologists? In other words, is it hard to predict but easy to check situation as with, say, prime numbers in mathematics?
maga··on THW: Germany′s army of volunteers for disaster relief
> It's not that easy to keep young people, but I find that more and more "older" people (like around 30) start with the firefighters because they want to take part in the life in their village and what not. So, there's hope.

With a long life of "tech nomading" I'm pretty comfortable living alone and in strange environments. But the older I get the more I feel unfulfilled due to lack of real community around, contributing to it, taking ownership and responsibility in it. I guess that happens to those 30 year olds in Germany as well.

maga··on Virgin Galactic Unity 22 Spaceflight Livestream [video]
I've turned off the audio, it actually gets more informative this way...
maga··on Alcohol, health, and the ruthless logic of the Asian flush
Use sports. I tell them that I'm a competing athlete and cannot break my sports regimen, which is technically true, but not really the reason--I grew up in the post-communist Europe of 90s witnessing rampant alcoholism and came to look at alcohol as something for people who are too weak to face the life, but too afraid to die. Never had an inkling to try the stuff.
maga··on ARM64EC: Building Native and Interoperable Apps for Windows 11 on ARM
> I suspect the successor to the Qualcomm 8cx Gen 2 will integrate X2 cores, which should give the M1 a run for its money.

And by that time I guess M2 will drop... As much as I dislike Apple's walled garden, I'm having hard time finding a reason to choose Windows on ARM over it.

maga··on ARM64EC: Building Native and Interoperable Apps for Windows 11 on ARM
Is there any decent ARM CPU in works for this Windows on ARM that can be comparable to M1 in terms of performance?
maga··on Utopia, a visual design tool for React, with code as the source of truth
Delphi gang here! Encountered Delphi as a kid by accident, and playing with that first form was a life changing event for me: realizing that I can make something new, real, tangible, that I'm in control. Coming from a non-tech family/background, this was big for me, I don't think I'd have gone into tech if not for it.
maga··on Deep JavaScript
JS has been my main language for the last decade and Axel (the author of the book) is my go to source when it comes to understanding upcoming features. I frequent proposal repositories, read the standard, and still find myself learning something new when I read an article from Axel on the subject. I have not read the book, but I'm sure it's written with the same rigor and clarity as all Axel's writings.
maga··on Developer of aluminum-ion battery claims it charges faster than lithium-ion
Oh my, I never knew there was a different word for it, thank you!
maga··on Developer of aluminum-ion battery claims it charges faster than lithium-ion
I assumed they would need sheets of it for batteries, but if it works for them with just particles all the better.
maga··on Developer of aluminum-ion battery claims it charges faster than lithium-ion
They are talking about impregnating graphene with atoms of Aluminium and getting it in production by the end of the year. Yet I was under impression that we do not yet have a viable method for producing graphene on an industrial scale, did I miss something? Do we have such production capabilities or do the batteries in question require so little of it that the existing tech is enough?
maga··on A writing tip I learned at Oxford
Oxford comma[1]? It's not used in Spanish and a flat out mistake in Russian, for example.

[1] https://en.m.wikipedia.org/wiki/Serial_comma

maga··on A writing tip I learned at Oxford
I see what you did there and I disapprove. But seriously, I find Oxford commas so useful that I catch myself trying to use them in three other languages that don't have them.
maga··on A SpaceX booster now trails only 4 space shuttles in flight experience
Looking at how Falcon changed the industry and our outlook on space in general, I cannot imagine what Starship is going to do once fully functional.
maga··on JavaScript for Shell Scripting
`raw` would allow us to pass the input as is without escaping it using JS rules, but otherwise the code would remain the same, we still have to "stitch" both arrays together with the loops.
maga··on JavaScript for Shell Scripting
That's rather trivial with Deno.run, here I just wrote a gist for that out of curiosity: https://gist.github.com/zandaqo/93004fb265146a95aadb28ec851a...
maga··on Starting a TypeScript Project in 2021
tsconfig's noUnusedLocals can help you with the last one.
← PreviousPage 2 of 8Next →