HNHacker News
TopNewBestAskShowJobs

larschdk

725 karma · joined September 3, 2011

submissionscomments
larschdk··on Valve bans 40k Dota 2 accounts using honeypot patch
You could possibly query the OS for whether physical pages have been allocated or not. Physical pages would only be allocated on the first page fault, when the pages are read.
larschdk··on Summer Afternoon – A WebGL Experiment
A short hike. Alba: a wildlife adventure. Alpaca Stacka (free).
larschdk··on Wobbly clock
You need to manually create a canvas at screen resolution and scale it to fit the screen. A default canvas has pixels that are logical pixels, not actual pixels.
larschdk··on Jump Servers
You need to fully trust your target server, so you need to manage your known_hosts diligently and make sure you trust the host you connect to. If you just accept the host key without checking, you allow any host to use your SSH key for authentication. Any SSH server can accept your private key as authentication. Also, if the target host is infiltrated, it can use your private SSH key for authentication elsewhere without your knowledge.
larschdk··on Ask HN: What's on your home server?
Topton Intel N6005 fanless PC as router/server - only 10W, but quite capabable

- Arch Linux

- just systemd/networkd for DHCP server/client, wireguard setup etc.

- router: own setup, just nftables, wireguard

- unbound DNS server (with blocklist for spam/ad domains) with encrypted DNS on uplink

- chronyd as timeserver

- mosquitto mqtt server

- custom jobs to post system stats to influx

- few VMs for testing things

- syncthing for keeping keepass database and documents

- git server (gitolite, gitc web)

- backup to encrypted S3 storage (duplicacy, encfs)

Hetzner VM

- influxdb (host stats, plus temp/humudity sensors around the house)

- grafana

larschdk··on Extremely Linear Git History
I want the 'merge' function completely deprecated. I simply don't trust it anymore.

If there are no conflicts, you might as well rebase or cherry-pick. If there is any kind of conflict, you are making code changes in the merge commit itself to resolve it. Developer end up fixing additional issues in the merge commit instead of actual commits.

If you use merge to sync two branches continously, you completely lose track of what changes were done on the branch and which where done on the mainline.

larschdk··on https://16777217/
This is just a convention from BSD, and is not even POSIX compliant. However, 'ping 1.1' is a convenient shortcut (actually pings 1.0.0.1). iproute2 and systemd do not use inet_aton and don't follow this BSD4.2 convention and instead parse it as '1.1.0.0' or not at all.
larschdk··on I have complicated feelings about TDD
I think we should try and separate exploration from implementation. Some of the ugliest untestable code bases I have worked with have been the result of some one using exploratory research code for production. It's OK to use code to figure out what you need to build, but you should discard it and create the testable implementation that you need. If you do this, you won't be writing tests up front when exploring the solution space, but you will be when doing the final implementation.
larschdk··on RustDesk – Open-source TeamViewer alternative
So, you didn't notice that video playback in Firefox isn't hardware accelerated and stutters a lot? (Firefox' sandbox prevents itself from creating the OpenGL context needed for hardware accelerated video playback).
larschdk··on The Lazy Monad
To me, it is because the term 'a monad' refers to a thing that doesn't even exist as its own thing in programming. Of course your can realize a monad, but the monad is not the type, nor the function, but the abstract, mathematical "thing" that defines a type and the two operations (value wrapping, and the compose function).

Programmers without a mathematical background will naturally struggle with such concepts. You can't point to where in the the code "the monad" is, as it's just the pattern, or the abstract mathematical combination of the type and the operations. Sure you could pack them into a class or a module, but it's still hard to point to where "the monad" is.

When we describe other patterns, like a Singleton, Factory, an Adapter, etc., it's is much more clear what and where the thing is. It's just a word to describe a function, a class, or a module.

Perhaps 'function composition with metainformation' would be a better title for the pattern. You take composable functions that act on certain types, and extend them to support metainformation attached to the values, while defining how the metainformation combines.

larschdk··on XHTTP: An HTTP server library in a single C file
Unnecessary optimization? At face value, it avoids calling strlen(). However, any modern compiler would be able to do that compile time anyway for static strings.
larschdk··on How to draw sub cutaways in MS Paint (2015)
Ah Inkscape, also a pain to use because of the complete lack of hardware acceleration. I get 2 fps dragging simple shapes on decent hardware. I had better performance in Corel Draw on Windows 3.1.
larschdk··on Europe is investing heavily in trains
Agree. Trains make perfect sense in metro areas like London, Berlin, Paris, Frankfurt, etc. Everywhere else, they are a complete waste of money, are difficult to run on a regular schedule, service only narrow corridors, are inconvenient to get to/from for daily commutes and increase total commute time 2+ times. To increase use of public transport, we need to increase convenience, not reduce cost.
larschdk··on Persepolis of ancient Persia rendered in WebGL
I would have enjoyed this way more as a game/walking simulator where you can explore this magnificent place at your own pace and discover its secrets.
larschdk··on Meld is a visual diff and merge tool targeted at developers
Absolutely.
larschdk··on Meld is a visual diff and merge tool targeted at developers
The things that makes it borderline useless to you is actually one reason I like it so much. Makes it really easy to do code reviews and focus on what actually matters. Also, it was until somewhat recently the undisputed best 3-way merge tool. Meld gets close, but to me Meld's UI is sluggish and fuzzy (on Windows) while BC is snappy and sharp.
larschdk··on Play Half-Life in the Browser
Ctrl+w (crouch+forward) attempts to close the tab even in fullscreen for me in Firefox.
larschdk··on Amazon Pip Horror Story
If you submit 51k lines of code in a month you are not productive. You are a liability. Producing 5-10 lines of quality code per hour is considered good in my world.
larschdk··on Origin of the Bluetooth Name
No, but a BLE extension for audio is being created.
larschdk··on There’s No Such Thing as Clean Code
So many developers say "clean code" when they mean "familiar code" and "familiar coding patterns". One person's clean code is another's heap of spaghetti. Idioms (like Duff's device, assignments in conditionals, function chaining) can be clean code if you apply it appropriately and your developers recognize it. Strict class hierarchies can be dirty code if you need to move gigabits in real time with 10 µs latency.

Kids don't like broccoli because they haven't tasted broccoli.

larschdk··on Google Camera randomly changes some QR code URLs on Android 12
Or, it is incidentally applying the same error correction it would normally apply to human input.
larschdk··on Let's Settle This
Simply, the cake is a quiche, but a slice is a toast.
larschdk··on Let's Settle This
Typewriters have tab stops that you can jump to by pressing the tab(ulator) key.
larschdk··on Foot: A fast and minimalistic Wayland terminal emulator
XTGETTCAP is implemented in many terminals which replaces the need for terminfo, but it's not used yet by client libraries except for notcurses afaik.
larschdk··on Amazon to stop accepting UK Visa credit cards
Denmark has a standardized national debit card. Physical stores are not allowed to charge a fee, but online stores are (typically DKK1.50/$0.25). Works great, but obviously only for stores in Denmark. They are almost always combined with a Visa debit card on the same card for a yearly fee (typically DKK150/$25).
larschdk··on DoorDash Joins Forces with Wolt
It's still an open question whether this is legal in some countries, e.g. Denmark. It's being argued heavily that Wolt shouldn't be allowed to avoid pension, payed vacation, and payed sick leave, which are required by law for all workers. The competing Just Eat have just signed a union agreement with couriers which includes full benefits, without increasing prices for customers.
larschdk··on Microsoft is ditching Electron for Teams
Getting something to display is not hard, but getting full Unicode support, font support, high-DPI support, accessibility, translation, fluid layouts, auto-completion, table rendering, dark mode, cross-platform, including mobile, while not looking like something from 2000 is a massive undertaking, and you often end up re-inventing the web browser doing it. Then if you need a diagram or graph rendered, you need to write it yourself or accept 3rd party library with poor style choices, where there are many great packages for the web. Any if your widget library falls short (and it will), you need a native developer to make a kludge.
larschdk··on Microsoft is ditching Electron for Teams
Lync/Skype for Business was way worse than teams.
larschdk··on Apple Has Opened the Backdoor to Increased Surveillance and Censorship
5. The system can easily be abused by governments or malicious actors to frame innocent people. People merely suspected of keeping such images are de-facto punished and stripped of rights even without standing before a judge or getting a conviction.
larschdk··on 25 Gigabit Linux internet router PC build
My passively cooled RPi4 with 8GiB RAM + 1GiB/USB ethernet dongle working as a 1Gb router never goes above 50 degrees C (all-metal case from aliexpress).
← PreviousPage 4 of 6Next →