HNHacker News
TopNewBestAskShowJobs

lucgommans

975 karma · joined August 2, 2013

https://lucgommans.nl
submissionscomments
lucgommans··on CoMaps: The Offline App That Guided Rescuers Without a Signal in Venezuela
I was recently recommended https://api.transitous.org (it's a webapp despite the domain). It can do things like "someone can pick me up on the far side and I don't mind walking 30 minutes at the start at 6 km/h, what's the optimal route to take?"

Revolutionary! Finally I don't have to look on a map to find all stations in walking/cycling/driving distance and then route to/from every possible combination of start and end station manually to see what busses and trains run there. And repeat the process with each schedule change in each involved country. Every other transport app that I know of will try to keep you within a few hundred metres of a bus stop or train station at all times and say "there exists no route" before telling you to cycle 10 minutes or from which station you have the shortest remaining distance by taxi or whatever

lucgommans··on CoMaps: The Offline App That Guided Rescuers Without a Signal in Venezuela
> The problem I have most of all with the routing is that it seems to default to my location as either the From or To value (whichever is the one I haven't selected). Once that's been chosen it's not immediately clear how to change it

Yeah this is an oft-asked question at least for OsmAnd, but I was recently corrected on this myself: so long as you don't press 'start' on the route, you can always change the from position freely and it won't flip back to your current location. You can close the navigation window (back button, swipe it away, or tap on the map) to get the map view back in full-screen for further browsing and selecting another point that you want as departure point, waypoint, or (subsequent) destination. Rinse and repeat until you have the route figured out with all the waypoints :)

I use this a lot for planning mapping routes. Another protip is to go into the waypoints view and on the top right you can do traveling salesman sorting to get the shortest way that visits all waypoints

CoMaps/OrganicMaps I don't know; I'm one of those who grew up with OsmAnd and got used to having all those features

lucgommans··on CoMaps: The Offline App That Guided Rescuers Without a Signal in Venezuela
Another alternative to geoIP could be WiFi-based location detection (comparing which WiFis are near you to a database). https://beacondb.net aims to replace Mozilla's shut-down location services, with public data releases once a proper anonymisation scheme has been figured out to avoid another Mozilla event. Google and Apple apparently also have usable back-ends: afaik it's not documented or meant for public use so ymmv, but the reverse engineered API is apparently super stable and not requiring any auth.

In case you have a second device where you'd like location, or ever don't have the USB GNSS receiver on you or something :)

lucgommans··on Astronomers capture highest-resolution image ever of the Sun's surface
Figure 1c from the paper[1] looked like it would make a great desktop background, but the resolution on the web is mediocre and there is this dashed rectangle to indicate the extent of the d-f subimages. In the PDF, the rectangle is drawn on top as a separate object so you can easily extract the underlying object!

Here are the figure 1 a-c images, lossless as they are in the PDF, having cropped a few transparent pixels for each one: https://lucgommans.nl/tmp/doi_10.1038_s41586-026-10871-3_fig... https://lucgommans.nl/tmp/doi_10.1038_s41586-026-10871-3_fig... https://lucgommans.nl/tmp/doi_10.1038_s41586-026-10871-3_fig...

edit: supplementary video 2 has a panel similar to figure 1b in 10% higher resolution, screenshot: https://lucgommans.nl/tmp/doi_10.1038_s41586-026-10871-3_sup...

[1] https://www.nature.com/articles/s41586-026-10871-3.pdf

lucgommans··on An SVG is all you need
> would love to see more tooling to lint and sanitize them before deployment

Sanitisation is one of two possible defences, the other being script execution controls or sandboxing. E.g., if you serve vector images on a web server, set a Content Security Policy header¹ for all your images that simply denies all scripting. You can also run it from a dummy domain ('origin') with nothing valuable on it (like how domains such as googleusercontent.com and githubusercontent.com are being used)

For sanitisation, DOMPurify² is the only widely used and tested library that I know of. It could use more bindings for other languages but, if you can call into it, it can go in your deployment pipeline. (Disclosure: I've worked with some of the people at Cure53, but not on this project)

You can also combine the approaches for defence in depth

¹ https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP

² https://github.com/cure53/DOMPurify

lucgommans··on Bring bathroom doors back to hotels
The website has no open data license so this isn't usable for OSM, even if we wanted to. I just meant to propose collaborating on an existing platform where we already have a lot of data about physical features, rather than erecting an ephemeral platform for this special purpose
lucgommans··on Bring bathroom doors back to hotels
More than 200 hotels already on this website. Wouldn't this be much more useful as an OpenStreetMap tag so people can find and share these good/bad hotels in whatever front-end they like?

There does not seem to be a tag for it yet. That there are apparently hundreds of instances, and it being definitely something you'd want to select for, makes me think it's a good fit for OSM. Currently, hotels can already have tags like phone number, reception opening hours, WiFi fees, etc. It might even be a good fit for the toilets:* namespace, since this has overlap with toilets in (semi-)public spaces offering different levels of privacy

lucgommans··on Ask HN: Local hostnames without root/admin
Or if you need records other than A/AAAA, like MX for delivering email: https://anyz.one

e.g. 10.2.3.4.anyz.one will refer the recursive resolver to query 10.2.3.4 for the answer to the query. You can also buy a domain and configure it to do that, but this is quicker

Disclosure: I wrote anyzone

lucgommans··on Europe's first geostationary sounder satellite is launched
List: https://en.wikipedia.org/wiki/List_of_organizations_with_.in...

(Not real affiliation but still: I added a domain to that page at some point)

lucgommans··on Why JPEGs still rule the web (2024)
> It’s been difficult to remove [old JPEG] from its perch. [...] the formats AVIF and HEIC, each developed by standards bodies, have largely outpaced [JPEG]

I'm currently sticking to JPEG because, last time I tried, JPEG came out as the best format. Referencing my memory at https://chaos.social/@luc/113615076328300784

- JPEG has two advantages on slow connections: the dimensions are either stored up front so the layout doesn't jump, or maybe the renderer is better; and it loads a less-sharp version first and progressively gets sharper

- JPEG was way faster when compressing and decompressing

- on the particular photo I wanted to optimise in this instance, JPEG was also simply the best quality for a given filesize which really surprised me after 32 years of potential innovation

Regarding AVIF, my n=1 experience was that it "makes smooth gradients where jpeg degrades to blotchy pixels, but at decent quality levels, jpeg preserves the grain that makes the photo look real". Gradients instead of ugliness at really small sizes can be perfect for your use-case, but note that it's also ~80 times slower at compression (80s vs. <1s)

JpegXL isn't widely in browsers yet so I couldn't use it

> These days, the [JPEG] format is similar to MP3

The difference with mp3 is that Opus is either a bit better or much better, but it's always noticeably better.

You can save ~half the storage space. For speech (audio books) I use 40kbps, and for music maybe 128kbps which is probably overkill. And I delete the originals without even checking anymore if it really sounds the same, I noticed that I simply can't tell the original apart in a blind test, no matter what expensive headset setup I try

TFA attributes it to a simple "they were first" advantage, but I think this is why "Why JPEGs still rule the web": no file format is better than JPEG in the same way as Opus is better than MP3; in that you don't have to think about it anymore and it's always a win in either filesize or quality

That said, Opus is also annoyingly hard to get into people's minds, but I've done it and you also see major platforms from compress-once-serve-continuously video (e.g. Youtube) to VoIP (e.g. Whatsapp) switching over for all their audio applications

lucgommans··on Plain Vanilla Web
Was wondering what you meant so I looked up "the innerhtml problem" and the top result indeed does list quite a few issues with appending to innerHTML that can be easily avoided. For anyone else interested: https://stackoverflow.com/a/33995479/1201863
lucgommans··on Why is appending to the innerHTML property bad?
I knew changing innerHTML had some side effects, but this answer shows just how many corner cases it causes and offers a drop-in replacement at least for appending. Thought other developers on this site would also be interested to learn this
lucgommans··on How to Use Em Dashes (–), En Dashes (–), and Hyphens (-)
Taken to an extreme without formatting, sure, but what ranges have that many digits in human-readable situations? And if there are those exception situations, you can word around it for that case ("285368760800±45691" or "45'691 years after 285'368'737'954")

Genuinely trying to think of an examples, since e.g. books aren't ever that long and search results don't have that many pages (that you'd all read and refer back to). A salary range, perhaps, can get into the seven digits in extreme cases (not that you care about any individual digit when you make a lifetime's worth of money in a bit more than a year): "Prospective salary is 2'423'000 to 2'432'000" seems to convey the relevant info as well as "Prospective salary is 2'423'000 to 9'000" does (except that I wouldn't understand the latter and ask what this second number means, but that's plausibly attributable to me as an individual not being used to it)

lucgommans··on Most promoted and blocked domains on Kagi
I really like alternativeto. It's not always good: sometimes there are simply no good alternatives, or the community hasn't voted for the ones I'd have voted for and so a good option is way, way down. But if I want to know alternatives, I go there directly, so I guess that's maybe why people block it from appearing in random search results? I found it puzzling to see a useful site blocked (especially when I haven't seen it appear much in search results, but then, I've also been using DDG primarily, which ranks things rather differently)
lucgommans··on Most promoted and blocked domains on Kagi
I don't understand. Opening the page in a logged-out state, it looks the same to me (just that there are not buttons to pick whether you want to raise/lower/block a domain when you're logged out). What's the different view you mean?
lucgommans··on Most promoted and blocked domains on Kagi
If only it was merely useless. I know its reputation but it had some information that MDN did not have, so I used it this once in recent years. Turned out, the information was simply wrong and so I made a wrong decision based on that. (It might have been about favicon format support in different browsers. Presumably it was Safari that never had support for vector graphics whereas w3schools listed it as such, and it's not like you can just download Safari to double check.) Regardless, what I'm sure about is that I alerted them to whatever the problem was, but for me it was the last nail in that coffin
lucgommans··on How to Use Em Dashes (–), En Dashes (–), and Hyphens (-)
Is this meaning to grep for a double hyphen from standard in, or to mark the start of positional arguments and then grep for a hyphen? If you want both, it should be:

    $ python -m this | grep -- -- -
Which is just beautiful

(Your example causes the last hyphen to be grepped for, which happens to only match doubled-up ones because single ones don't occur in that text. The quotes/apostrophes do nothing because they're parsed by (ba)sh and so only the hyphens are passed to grep, not the quotes. The last hyphen can be omitted because reading from stdin is the default if neither filenames nor recursion options are passed.)

lucgommans··on How to Use Em Dashes (–), En Dashes (–), and Hyphens (-)
It is usually clear that 2-3 thingies means a range of thingies, but I seem to remember there being situations where it could also have been a minus sign. Perhaps it was with placeholders, where 10-N could be either one. Problem is, iirc, the real minus sign is longer than the hyphen, looking like an en dash (the one meant for ranges) and so it defeats the purpose... hence I totally use hyphens as minus signs, but en dashes for ranges, which makes sense in my head because a range has a certain span/length whereas a minus sign is just a little mark to indicate that something is negative. I see lots of people/software use en dashes for ranges but the existence of a real minus sign is, from my perspective, mostly just noted in typographic resources, so I think this reflects most people's usages (for the people that care for these details)

I do like that the em dash is as long as it feels that broken-off thoughts should be

Not everything has to be functional, sometimes things can also just look nice for the sake of it

lucgommans··on How to Use Em Dashes (–), En Dashes (–), and Hyphens (-)
Literally never seen this (wish I could grep all comments I've ever replied to) and I do not understand what makes you say that it's clearer when it's dropping information, making it relative rather than a fully qualified number

In speech, it's common, and misunderstandings are usually not a problem (if you're not monologuing on a recording) because someone will just ask; but in writing it looks like the range is the wrong way around. Maybe I expect more care in writing because the feedback loop is longer, or maybe it's just habit and I think it's wrong in writing because I never see it?

lucgommans··on Plane crashes, overturns during landing at Toronto airport
Contact method is in profile (or more directly: https://lucgommans.nl/email), though by now I can't edit the comment and thus link anymore so will have to post a new comment and kill the old link if we want to change it. Just let me know, all is fine by me
lucgommans··on Plane crashes, overturns during landing at Toronto airport
Rehosted so it'll stay alive at least a few years: <https://lucgommans.nl/tmp/YYZ_Crash.mp3>. Let me know if you'd like something more permanent than my tmp dump folder, or a filename that gives credits or so! (BTW if you're editing clips, I can recommend exporting to Opus instead of ancient MP3: released in ~2012 so support is very good by now and it's like twice the quality at the same file size, probably even better for speech)
lucgommans··on I recreated Shazam’s algorithm with Go
I compared Shazam's, SoundHound's, and BeatFind's recognition library in August 2021. (And tried MusixMatch but it crashed on startup apparently.) Don't think I published it anywhere, these are my raw notes I found among saved chat messages. The format is starting to make more sense now that I'm putting it into a wider window than a chat screen, so I can recommend using a wide browser (94 characters per line should do it). Eyeing the song choices, it looks like I tried to find different genres and artist types (ccMixer/youtube celebrities, to indie, to established) but a larger sample size would obviously have been even better. Still, I hope it's one step up from adding another random opinion!

The conclusion appears to be that BeatFind and Shazam know the most songs, but are also somewhat complementary and all of the services had at least one song they uniquely recognised.

---

    Fun facts:
     * Night Driver (W) said "1 Shazams". I think I was the first person to ever Shazam that. Some of the most obscure things had hundreds, often thousands of shazams!
     * You know where they are taking the hobbits but none of the services do!

    ========

    - ABC = found the song
    - # = number of attempts
    - f = exceptionally fast matching (when it did match, might not be first attempt)
    - ~ = knew one of the songs

    BeatFind:     2B  C     1E    2G 2H  1I  2Jf 2Lf 4M 2Nf 2Of 1Pf 1Rf ~S 2T  1Uf 1Vf 1W 1Xf Y Z
    SoundHound: A 1B        1E 2F 1G 2H  2If     1L         2O  3P  2R     1Tf 2U
    Shazam:       1Bf    1D 1E 1F 1G 1Hf 1I  2J  1L  1M 4N  1O  1Pf 1Rf    1Tf 1Uf 1V  2W 1X  Y Z
    MusixMatch: crashes on startup, presumably it realizes it won't be able to show me ads

    missingno
    Shazam:     A C K Q S
    SoundHound: C D F J K M/N Q S V W X Y Z
    BeatFind:   A D F K Q

    non-universal finds (repeated letter = unique = counts double; slash means same artist so should be counted as one)
    Shazam:     DD F J M/N V X Y Z
    SoundHound: AA F
    BeatFind:   CC J M/N S V X Y Z

    A: Levan Polkka Epic Orchestral Cover version
    B: Pokémon red/blue soundtrack
    C: Mayhem (various songs, it seems either they have all or they have none)
    D: Art Now ft. Snowflake
    E: Hero's Choice
    F: Three Days Grace - Scared
    G: Syrian - Supernova
    H: The Explosion - Here I Am
    I: The Von Bondies - C'mon C'mon
    J: Frank Klepacki - Scouting (C&C TibSun)
    K: Conspiracy - Chaos Theory (demoscene)
    L: Cheshyre - Madness6 (remix) (Newgrounds ID 77998)
    M: Dimrain47 - Twilight Techno
    N: Dimrain47 - Cloud Control
    O: DragonForce - My Spirit Will Go On
    P: Yuki Kajiura - The First Town (SAO)
    Q: THEY'RE TAKING THE HOBBITS TO ISENGARD! THE HOBBITS- THE HOBBITS- TO ISENGARD! TO ISENGARD!
    R: Faithless - Insomnia
    S: Age of Empires 1 soundtrack
    T: Moulin Rouge - El Tango De Roxanne
    U: Van Canto - Master of Puppets
    V: Slack Bird - Jouni
    W: Floppytronic - Night Driver
    X: EgoSalad / Kitboga - Breathe in
    Y: Floppy Drive music: top 4 hits on yt: sweet dreams, imperial march, ghostbusters, beat it. Only ghostbusters was known to any
    Z: Obsidian Shell - Orphanage
---

Note that what I did not test/review introducing noise (like people talking through it) or filtering (like when you hear the music through a wall)

lucgommans··on HTML Tags Memory Test
I gave it some thought but it's hard to say. For most of the ones I missed and mentioned in sibling threads, I can think of people who'd be aware of them:

- Probably <ruby> and related tags are used in Japanese and other spheres with such a language feature

- <base> I knew of, I thought archive.org used it but apparently not currently. Probably if you work with archived or otherwise namespaced content, you can reasonably find this a very familiar element

- <track> if you're a media person, doesn't seem that outlandish

- <dfn> I knew of basically, but just couldn't recall the names for glossary tags

- <kbd> is used all the time on Superuser (in Markdown, where HTML is valid though of course they filter most of it)

- Some others that I didn't remember, like <template> and <article>, were just stupidity. I know these...

This leaves <del> and <ins>. There are enough diffing tools, but it's not as big a category of software people constantly work on, especially since this is only for browsers. I'd not be surprised if these are the most-forgotten elements

Or does anyone still use <map>? I saw it in the HTML tutorial (linked from a Dutch magazine) that got me into programming so I know of it and remembered while doing the quiz, but it's fairly far faded from my mind and I'm not sure anyone would ever use it when, if you want this sort of functionality, you'd probably want the versatility of JavaScript

lucgommans··on HTML Tags Memory Test
I tried the exact same three! Eventually gave up on that path, thinking "I could swear HTML had some way to have a glossary...", and of course seeing it does after revealing the answers
lucgommans··on HTML Tags Memory Test
<img> also took me the longest time, and <br> even longer though I used it within the last hour, but the facepalm moment came when I almost decided to give up and then remembered <h1> through <h6>. I even knew how many levels existed! Not that I didn't try h7 for good measure, one can't be too sure with these things :-)
lucgommans··on HTML Tags Memory Test
If you want to see which ones you've missed, put this in the JS console:

    Els.filter((item) => {return ! Elsguessed.includes(item)})
In Firefox (probably also in other browsers), links in the console are also clickable, so if you want to look any up, printing them as a link may be helpful:

    Els.filter((item) => {return ! Elsguessed.includes(item)}).map((item) => {console.log(`https://developer.mozilla.org/en-US/docs/Web/HTML/Element/${item}`)})
I got to 80 found / 34 remaining (plus, of course, various deprecated tags and some which I'm very surprised were not deprecated such as map). Of the remaining ones, I've used several in the past and would have been able to say what they do... stupid memory is bad at enumeration!
lucgommans··on Organizing OpenStreetMap mapping parties
I guess the OSM community is more defaulting to developing for other open platforms because that's what we mostly use ourselves and can test/run the code on, but iOS is in the making:

Pinned ticket "iOS - Planning": https://github.com/streetcomplete/StreetComplete/issues/5421

See also the project board: https://github.com/orgs/streetcomplete/projects/1/views/1 showing quite a few things already done, some in progress, and a handful todo or blocked each

lucgommans··on A rudimentary simulation of the three-body problem
It's a hundred times less polished than rebound (that readme looks seriously cool!), but in 2021 I also wanted to toy around with orbital mechanics / gravity and couldn't find a quick and easy simulator so I made this to run in a browser: https://lucgommans.nl/p/badgravity/

Since it's so rough on the edges (especially on mobile, initially I was surprised it works at all), here's the steps for the mentioned example of making Jupiter 10x heavier:

    1. Open the scenarios on the left and click play on the inner solar system to load that up
    2. Click the plus on the outer planets to add them in (if it looks like nothing happened: zoom out. Space is big and this is to scale)
    3. Fold out the "bodies" section and alter the mass for "J"upiter. The change is applied live.
    4. Optionally press Restart to restart with the current settings but back at their initial positions and speeds
Making Jupiter 1000× heavier (and fast-forwarding the time in the Simulator controls by 10×) makes it eject Mars from the solar system within one minute, but interestingly Mercury and Venus seem pretty stable around the sun in that configuration

The help/about page (https://lucgommans.nl/p/badgravity/about.html) contains links to all other orbit projects I could find. Seeing Rebound as well as the OP, I should probably add a "libraries" section! Or do you think that should just go with "Software to download" alongside Stellarium and such?

lucgommans··on New world record with an electric racing car: From 0 to 100 in 0.956 seconds
GRPN for anyone else who doesn't know it: http://lashwhip.com/grpn.html

What I meant to say is that, if one uses a featureful calculator like qalc, then you get unit conversion included without needing two separate utilities. Of course, if you've used a(n obscure) calculator for decades then it may be easier to learn to use a separate unit convertor instead

lucgommans··on New world record with an electric racing car: From 0 to 100 in 0.956 seconds
I don't understand, is that what you used originally to come up with your original comment (this one: https://news.ycombinator.com/item?id=37483892)?

If so, that is surprisingly similar to what I ended up with when trying to validate it!

Page 1 of 5Next →