HNHacker News
TopNewBestAskShowJobs

molsson

385 karma · joined December 28, 2013

submissionscomments
molsson··on GitHub Actions and Pages are experiencing degraded availability
5 hours going now and the entire thing is still completely down. This level of incompetence and their total disrespect for their customers is unbelievable.
molsson··on NPM debug and chalk packages compromised
I maintain a package on npm with >1M weekly downloads. I also got the same phishing e-mail, although I didn't click it.. here are the e-mail headers in the phishing e-mail I got:

Return-Path: <ndr-6be2b1e0-8c4b-11f0-0040-f184d6629049@mt86.npmjs.help> X-Original-To: martin@minimum.se Delivered-To: martin@minimum.se Received: from mail-storage-03.fbg1.glesys.net (unknown [10.1.8.3]) by mail-storage-04.fbg1.glesys.net (Postfix) with ESMTPS id 596B855C0082 for <martin@minimum.se>; Mon, 8 Sep 2025 06:47:25 +0200 (CEST) Received: from mail-halon-02.fbg1.glesys.net (37-152-59-100.static.glesys.net [37.152.59.100]) by mail-storage-03.fbg1.glesys.net (Postfix) with ESMTPS id 493F2209A568 for <martin@minimum.se>; Mon, 8 Sep 2025 06:47:25 +0200 (CEST) X-SA-Rules: DATE_IN_PAST_03_06,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FROM_FMBLA_NEWDOM,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY,SPF_HELO_NONE,SPF_PASS X-RPD-Score: 0 X-SA-Score: 1.1 X-Halon-ID: e9093e1f-8c6e-11f0-b535-1932b48ae8a8 Received: from smtp-83-4.mailtrap.live (smtp-83-4.mailtrap.live [45.158.83.4]) by mail-halon-02.fbg1.glesys.net (Halon) with ESMTPS id e9093e1f-8c6e-11f0-b535-1932b48ae8a8; Mon, 08 Sep 2025 06:47:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; x=1757637200; d=smtp.mailtrap.live; s=rwmt1; h=content-transfer-encoding:content-type:from:to:subject:date:mime-version: message-id:feedback-id:cfbl-address:from; bh=46LbKElKI+JjrZc6EccpLxY7G+BazRijag+UbPv0J3Y=; b=Dc1BbAc9maHeyNKed/X7iAPabcuvlgAUP6xm5te6kkvGIJlame8Ti+ErH8yhFuRy/xhvQTSj8ETtV f3AElmzHDWcU3HoD/oiagTH9JbacmElSvwtCylHLriVeYbgwhZVzTm4rY7hw/TVqNE5xIZqWWCMrVG wi+k9uY+FUIQAh7Ta2WiPk/A4TPh04h3PzA50zathvYcIsPC0iSf7BBE+IIjdLXzDzNZwRmjgv2ZHW GAx/FRCPFgg0PbVvhJw98vSHnKmjPO/mmcotKFG+MUWkCtTu28Mm46t7MI7z5PrdCXZDA7L1nVnIwE ffIf0zED32Z6tFSJFNmYgFZlD6g+DnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; x=1757637200; d=npmjs.help; s=rwmt1; h=content-transfer-encoding:content-type:from:to:subject:date:mime-version: message-id:feedback-id:cfbl-address:from; bh=46LbKElKI+JjrZc6EccpLxY7G+BazRijag+UbPv0J3Y=; b=DyWvxSOjMf7WfCVtmch+zw63kZ/OOBjcWnh1kIYs/hozgemb9mBIQCMqAdb4vSZChoW5uReVH5+k5 Jaz7UodbPJksVkYWqJOVg6nyx5EaYMYdgcw1+BCct/Sf2ceFwWurhupa6y3FBTFWBYLhcsAXERlx2l IuxWlpZoMDEBqDxjs8yvx/rkBrcd/2SNTcI+ooKJkrBIGBKuELOd3A5C6jlup6JNA4bE7vzP3FUfKw y0357UMnn45zWHm9HvudO4269FRlNjpiJaW7XF1/ANVrnDlNWfUGNQ5yxLZqmQDTtxFI7HcOrF3bTQ O/nrmVOvN9ywMvk/cJU4qGHqD9lT32A== CFBL-Address: fbl@smtp.mailtrap.live; report=arf X-Report-Abuse-To: abuse@mailtrap.io Received: from npmjs.help by smtp.mailtrap.live with ESMTPSA 6aee9fff-8c4b-11f0-87bb-0e939677d2a1; Mon, Sep 08 2025 00:33:20 GMT Feedback-ID: ss:770486:transactional:mailtrap.io Message-ID: <6be2b1e0-8c4b-11f0-0040-f184d6629049@npmjs.help> X-Mt-Data: bAX0GlwcNW6Dl_Qnkf3OnU.GLCSjw_4H01v67cuDIh2Jkf52mzsVFT_ZEVEe0W6Lf3qzW2LP_TCy93I46MCsoT0pB9HozQkvCw22ORSCt3JBma1G3v9aDEypT1DLmyqlb6hYLF3H7tJCgcxTU5pbijyNaOFtoUMdiTA6jxaONeZbBj.SKUa5CLT5TMpeNHG6oGIiY_jqlU.nQkxGPY3v9E34.Nz4ga8p9Pd_BplftaE~--2CLrluJMY65S5xFl--IISg0olYJu6DVyVDEcJ.AQ~~ MIME-Version: 1.0 Date: Mon, 08 Sep 2025 00:33:20 +0000 Subject: Two-Factor Authentication Update Required To: "molsson" <martin@minimum.se> From: "npm" <support@npmjs.help> Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

molsson··on Show HN: Sharpe Ratio Calculation Tool
I guess this is the 1yr sharpe plotted over time, ie the sharpe at date X considers the stddev within the previous 365 days etc?

Many brokers only show 1yr sharpe or perhaps 3yr sharpe (for example swedish nordnet has 1/3/5 year sharpe: https://www.nordnet.se/fonder/lista/jupiter-gold-silver-usd-... )... but very often stocks/funds go steadily upwards for several years in "good times" and then we have major drawdowns during turmoil like 2008 or 2020 etc. In these cases, a 1yr or 3yr sharpe can be very misleading.

Have you considered also plotting 3yr sharpe and 5yr sharpe over time? Perhaps the length of the sharpe ratio would be configurable in the calculator?

molsson··on Node.js, Pipes, and Disappearing Bytes
process.stdout._handle.setBlocking(true)

...is a bit brutal but works. Draining the stream before exiting also kind of works but there are cases where drain will just permanently block.

async function drain(stream) { return new Promise((resolve) => stream.on('drain', resolve)) }

molsson··on Modern CSV Version 2 Beta is now available
Hmm, why did you build it as a desktop app in 2022? Seems like a no brainer to have this in the cloud so that you can seamlessly process huge files and integrate with various third-party APIs. I've used https://www.gigasheet.com/ for this before (which is cloud-based). And there is also the open source visidata project.
molsson··on India’s second wave
It would be nice if the web somehow filtered out links that one had decided to not pay for.
molsson··on Shitlist Driven Development (2016)
We used a similar approach when we pushed to get -Werror enabled in a large C++ code base I worked on years ago.
molsson··on I built a lay-down desk
It's a beauty. Why buy a finished product when you can quickly put something like this together ?
molsson··on Birds 'falling out of the sky' in mass die-off in south-western US
Dead birds? Clearly, the Earth's magnetic field must be reversing!!11

https://www.imdb.com/title/tt0298814/

molsson··on Dark patterns in GDPR consent boxes
I hate when you browse through 10-15 websites and for all of them you quickly click the "Accept" button in the bottom banner to get rid of the irritating cookie banners.

And then suddenly, on the 16th website they put a fucking "Buy our thing" button in a bottom bar that you quickly click on without even thinking twice.

molsson··on Wren is a small, fast, class-based concurrent scripting language
The name wren is already used by: https://projectwren.com/
molsson··on Anyone made the jump from MySQL to PostreSQL? It is worth it?
I recently migrated a small side project from MySQL to PostgreSQL. I wrote a short blog post about how I did the migration, issues I ran into etc: http://blog.minimum.se/2019/07/09/upgrading-node-mysql-to-po...

I'm overall very happy with the migration and PostgreSQL also ended up taking less memory (RSS) in prod, which was a nice bonus (this is useful for me because I'm running this on a low-end Digital Ocean droplet).

molsson··on QuickJS JavaScript Engine
Very impressive!
molsson··on Stripe's API was down
Wow, Stripe is having a really shitty day.
molsson··on Mastery with SQL: Learn Modern SQL with Postgres
I agree. Some more info here for those interested: https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_P...
molsson··on Mastery with SQL: Learn Modern SQL with Postgres
I agree, especially some info on production installation on Linux would be really nice. For example, is it better to install the "postgres" ubuntu distro package, or is it better to install the Ubuntu package provided by postgres themselves at https://www.postgresql.org/download/linux/ubuntu/? Which one of these offer the best security / stability?
molsson··on Mastery with SQL: Learn Modern SQL with Postgres
The OWASP Postgres hardening page recommends that one removes the default "public" schema in postgres: https://www.owasp.org/index.php/OWASP_Backend_Security_Proje...

...whereas this course seems to use the public schema and just query for "SELECT * IN public.foobar" etc.

I remember being a bit confused about "schemas" when I switched from mysql to postgres. I think it would be good to have a special section that explains what schemas are typically used for, and in particular when/how to use the public schema correctly.

molsson··on Mastery with SQL: Learn Modern SQL with Postgres
The free "teaser video" starts off showing "actor_id serial NOT NULL" but in postgres 10 and above identity columns can/should be used instead?

https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_s...

molsson··on Mastery with SQL: Learn Modern SQL with Postgres
The content overview doesn't include anything about escaping data to prevent SQL injection (escaping of literals vs escaping of table/field names etc). This is important to get right and postgres has a slightly different approach compared to mysql and others.

For example, you can and should use parametric queries like:

client.query('INSERT INTO mytable(a) VALUES ($1)', ['hello'])

...but that doesn't work for all types of queries, for example you get an error for:

client.query('SET LOCAL SEED = $1', [someVal])

Another example, you might need to build a dynamic where-clause based on data from an "advanced search" UI query builder, and then you need to make a list of all the "foo = $N" parts (and increment $N as you go), plus another list of the actual variables. Maybe there are some nice tricks / techniques to simplify that?

molsson··on Mastery with SQL: Learn Modern SQL with Postgres
It should be really nice to have variable playback speed for the videos.
molsson··on Technical Challenges Developing a Distributed SQL Database
Great article!
molsson··on Bleve: Full-text search and indexing for Go
Thanks (you can upvote it here if you want: https://news.ycombinator.com/item?id=19605334 )

I've added a mention of Xapian/Xapiand as well now and generated new graphs that include data for those two projects.

molsson··on Bleve: Full-text search and indexing for Go
Good point; I've added it now, both to the blog post and to the graph: https://blog.minimum.se/assets/elasticsearch-open-source-com...
molsson··on Bleve: Full-text search and indexing for Go
To get a feel for the size of Bleve, checkout this graph that shows commit rates doing into Bleve versus Elasticsearch and Vespa: http://blog.minimum.se/assets/elasticsearch-open-source-comm...

If you don't need heavy lifting, then "sonic" implemented in rust is a really nice lean alternative too: https://github.com/valeriansaliou/sonic

FWIW, that graph is from a blog post I published earlier today: http://blog.minimum.se/2019/04/08/elastic-search-introductio...

molsson··on Show HN: Cloud browser – headless Chrome and image maps
Authentic8 Silo is something like this as a commercial product but it is based on Firefox I think.
molsson··on EXploit X: “Give Me Root” [video]
find other setuid binaries on your system using: find / -user root -perm -4000 -print 2>&1 | grep -v "Permission denied"
molsson··on EXploit X: “Give Me Root” [video]
Looks like it was patched in Ubuntu 18.04 just two weeks ago, see "apt changelog xserver-xorg-core":

xorg-server (2:1.19.6-1ubuntu4.2) bionic-security; urgency=medium

  * SECURITY UPDATE: Privilege escalation and file overwrite
    - debian/patches/CVE-2018-14665.patch: disable -logfile and -modulepath
      when running with elevated privileges in
      hw/xfree86/common/xf86Init.c.
    - CVE-2018-14665

 -- Marc Deslauriers <marc.deslauriers@ubuntu.com>  Thu, 25 Oct 2018 11:18:32 -0400
molsson··on PhotoPrism: web app for browsing, organizing and sharing your photo collection
If you look at the Dockerfile you will realize this project uses a lot of stuff beyond just the go binary; it looks like docker is a good fit for this project.
molsson··on D3.js 5.0 is out
And until recently it could abort() either, but Chrome/FF/Edge all have it now (yay!) and there is a polyfill for Safari/MSIE and old browsers: https://www.npmjs.com/package/abortcontroller-polyfill
molsson··on Microsoft launches Windows 10 on ARM
It's obviously not easy by any stretch of the imagination to port something as complex as Windows to a new platform, but I'm still surprised it took THAT long to finish this.
Page 1 of 2Next →