HNHacker News
TopNewBestAskShowJobs

perbu

1,312 karma · joined May 5, 2012

Per Buer. I cache things.
submissionscomments
perbu··on Comcast: Simulating shitty network connections so you can build better systems
Trademarks are supposed to be consumer protection regulation. They aren't there to protect the corporations. If I make some brown goo and call it "Pepsi" then Pepsico can sue me because I confuse their customers and not because this will cause losses for Pepsico.

At least, this was the original intention. In today's more corporation-friendly world, more emphasis is being put on the corporations interests unfortunately.

perbu··on The euro has tumbled near parity to the US dollar
Both. Imported stuff will be more expensive in Europe. Bad for consumers.

Exports from EU will be more competitive, which in the medium term will strengthen the Euro again.

perbu··on Charming Cobras with Bubbletea – Part 1
I've just spent the week making a TUI frontend to an existing application with Bubbletea. It's been a pretty pleasant experience. I don't have much experience doing frontends and I was not familiar with Model-View-Update.

But after a couple of days of head scratching and some help from the Bubbletea slack I managed to put something together that works.

The only inconvenience was that I have to redirect logs away from standard out, but once I did that everything else was a work in the park.

Since the application wasn't really made to continuously report progress I had to poll my data structures and re-render the UI every 100ms. But as the data structures are relatively small that wasn't expensive.

perbu··on Oxygen Candles: Providing Emergency Air
Hollywood has always perpetuated the myth that when you are in an air tight room you'll die as you run out of oxygen. The CO2 poisoning will kill you before you run out of oxygen.

So, if you're sitting in a nuclear shelter, remember to get the CO2 scrubbers working first, then worry about the low oxygen.

perbu··on OpenSSH 9.0
I guess you can call it a (application) protocol. However, when implementing this I've not needed to anything to make scp works as opposed to anything else. Just supporting ssh executions requests and connecting the channels as you do with any remote invocation.
perbu··on OpenSSH 9.0
I think perhaps this was a bigger issue back in the day when we were using rotating harddisks. In those day doing a seek would be a lot slower than doing a write.

Today seeks are mostly instants, so maybe my experience isn't valid anymore.

perbu··on OpenSSH 9.0
It handles millions, but it can be a lot faster to just pipe output from tar through the ssh connection.
perbu··on OpenSSH 9.0
I'm pretty sure scp isn't a protocol. It is just a tool that relies on doing a request for execution over the regular ssh2 protocol.

I've written a few custom ssh servers and you don't really need to do anything to them to support scp.

sftp uses the sftp subsystem. scp just uses regular ssh requests and transports data over the ssh channels.

perbu··on OpenSSH 9.0
I'm somewhat of an old fart, but rsync(1) has worked well for me. It integrates well with ssh on both sides, using ssh channels to execute the binary on the server side and transporting data nicely back and forth.

It isn't suited for millions of files, but neither is scp.

perbu··on The decline and fall of Java on the desktop
FWIW; I use the Jetbrains suite every day and I don't have a problem with it at all. Compared to, say, VS Code, I think it is pretty snappy stuff.
perbu··on Ask HN: What's your solution for SSL on internal servers?
Just beware that the records of the TLS certs are public. So you'll leak a some hostnames. This might or might not be ok.
perbu··on Go is about to get faster
I think you're misrepresenting the debate.

I've never seen anyone argue that generics aren't a useful concept, but I've seen plenty argue that it isn't worth the cost in incurs. That is a quite a different debate then the one you are outlining.

perbu··on Microsoft to Acquire Activision Blizzard
UK, I think. Still a weird decision. Of all the stuff Facebook bought they blocked Giphy. Not Whatsapp, Instagram, etc.
perbu··on The operating system: should there be one? (2013) [pdf]
I've worked with Unikernels for a couple of years. They are great, but they are very, very pure and this can be limiting.

Say I have an web API written in Go. For some reason I need to do some openssl stuff before I start up my main program. In a container I can just wrap my program in a little shell script which generates/signs a cert before starting the API.

Such a simple task. It is gonna be a lot harder with a Go Unikernel as I could have to bake this functionality into the application itself.

This Swiss Army knife that is Unix often has it's uses.

perbu··on The operating system: should there be one? (2013) [pdf]
PLOS’13, November 3 2013, Farmington, PA, USA Copyright c©2013 ACM

(bottom left corner)

perbu··on The operating system: should there be one? (2013) [pdf]
I've had some experience with running applications without an operating system. First and foremost I like the simplicity. Instead of having state distributed between the kernel and the application all the state is in your application. No longer having this dance where an application and the kernel interacts there is only one place where state is kept.

This can lead to some spectacular results for things like TCP. Having the ability to serialize a TCP connection and sending it over the network means you're able to transfer a TCP connection from one host to another, even with SSL on top.

Now, this can be done with a POSIX kernel as well, as long as you move the networking from the kernel into the application. But if you're doing this you're eroding away the benefits of the kernel, basically turning your OS into a bootloader. Same thing with scheduling.

Another benefit is that, at least on compiled languages, code that isn't used isn't there. So the linker can strip away everything that is never called.

This still feels like utopia. The average development environment is pretty complex and ripping out and replacing all the layers below your language runtime is too much effort.

perbu··on One Fastly customer triggered internet meltdown
The somewhat awkward "a customer pushed a _valid_ configuration" is Fastly making sure they aren't pushing any blame onto the customer.

There is no customer blaming here. None at all.

perbu··on Show HN: I made a 5-key keyboard
You use two of them. You pair them, decide on who is left and who is right and load the keymap.
perbu··on The effect of switching to TCMalloc on RocksDB memory use
I remember this hit the Varnish Cache project about 7-8 years ago.

We've spent endless hours trying to identify leaks before we finally tried a few alternative allocators. We switched to jemalloc and the positive effects where huge.

Its a bit weird that this is still an issue.

perbu··on But how, exactly, do databases use mmap?
For the general case? No. Varnish retained it's mmap backend so you could still chose to use it if you have a load that required it.

For the general case, where writes are somewhat frequent and the dataset is pretty small the malloc backend was a lot more performant, once we figured out the the default implementation of malloc in Glibc was pretty shit (wrt overhead).

perbu··on But how, exactly, do databases use mmap?
The author notices that Bolt doesn't use mmap for writes. The reason is surprisingly simple, once you know how it works. Say you want to overwrite a page at some locations that isn't present in memory. You'd write to it and you'd think that is that. But when this happens the CPU triggers a page fault, the OS steps in and reads the underlying page into memory. It then relinquishes control back to the application. The application then continues to overwrite that page.

So for each write that isn't mapped into memory you'll trigger a read. Bad.

Early versions of Varnish Cache struggled with this and this was the reason they made a malloc-based backend instead. mmaps are great for reads, but you really shouldn't write through them.

perbu··on Wild lynx could be reintroduced into Scottish Highlands
It is also worth noting that far more sheep die of sickness/exposure than the few that are taken by predators.

IIRC 100k sheep are lost and 20k of those are to predators.

perbu··on Tech Preview of Docker Desktop for M1
Me and I just about everyone I know that has a mac develops _for_ Linux. What is nice is that I can push, pull and run Linux images on my mac.

If the containers where native Macos docker images it would be about as useful as native Docker on Windows. Which I'm sure is great for the few ppl that need it - but pretty useless for most ppl.

But I sure wouldn't mind if was a bit snappier. But it is plenty fast enough for my needs atm.

perbu··on Tech Preview of Docker Desktop for M1
If Docker for mac was running natively it would be more or less useless. Nobody deploys production code on MacOS hosts anymore.

That it is all so smoothly powered by Linux is what makes it a great product.

perbu··on Apple unveils M1, its first system-on-a-chip for portable Mac computers
You can use the touchbar to skip commercials on Youtube in Safari.

I love it.

perbu··on Deprecating scp
rsync used to be quite a bit slower at some point. rsync optimizes for network traffic and quite often network capacity is abundant. not sure how much of an issue this is with today's solid state drives and fast CPUs.

OTOH there where issues with scp having a fixed tcp window size of 4k (not sure if this is still the case) which would slow down copies on networks with some latency.

sftp have none of these issues. i prefer sftp for most tasks.

perbu··on Gray Wolves to Be Removed from Endangered Species List
In Norway we pay ranchers for sheep which are taken by wolves. They still really hate wolves.

More sheep are taken by wolverines, lynx and bears yet the ranches are still keen on full extermination of the wolf population.

perbu··on TamaGo – bare metal Go for ARM SoCs
Thanks.

So, for other who are curious. TamaGo is focused on certain ARM SoCs. So CPUs rather than microcontrollers. TamaGo is more or less a fully fledged go running on bare metal.

Pretty cool, actually.

perbu··on TamaGo – bare metal Go for ARM SoCs
Last year I discovered TinyGo (tinygo.org). Looking at the list of supported hardware I see quite a few ARM SoCs there. I also believe Google supports the TinyGo project in some shape or form.

So why does TamaGo exists? (No snark, just curious)

perbu··on Fastest star ever seen is moving at 8% the speed of light
Way off.

60 minutes, 11 seconds on earth would be more like it.

← PreviousPage 6 of 11Next →