HNHacker News
TopNewBestAskShowJobs

YorickPeterse

2,777 karma · joined March 29, 2011

Author of the Inko programming language, formerly a staff developer at GitLab.

Website: https://yorickpeterse.com

submissionscomments
YorickPeterse··on The death of the sit-up
> What do I do to make my abs more visible within 13 days?

My honest advice: nothing. Going to the beach should be about enjoying the beach, the weather, etc; not about what some random person may think about your muscle or lack thereof. If that's really what they care about, they're probably not worth worrying about.

YorickPeterse··on I Accidentally Deleted 7TB of Videos Before Going to Production
I currently have about 12 years of experience, and a few years back I accidentally cleaned up GitLab's database a bit too well. I wouldn't be surprised if the people being dismissive simply never worked on a moderately complex and large system, and thus don't understand how easy it is to make these kinds of mistakes.
YorickPeterse··on The rise and fall of crypto culture
And the next day the value of their portfolio drops by 200%, and never quite recovers.

If your argument is that banks and savings in particular offer poor interest, the proper answer is to look into index funds and focus on long term growth, rather than short-term speculation.

YorickPeterse··on Ask HN: Have you ever switched cloud?
At GitLab we went from AWS to Azure, then to Google Cloud (this was a few years ago). AWS was what we started with, and I think like most companies very little attention was paid to the costs, setup, etc. The result was that we were basically setting money on fire.

I think at some point Azure announced $X in free credits for YC members, and GitLab determined this would save us something like a year's worth in bills (quite a bit of money at the time). Moving over was rather painful, and I think in the months that we used Azure literally nobody was happy with it. In addition, I recall we burned through the free credits _very_ fast.

I don't recall the exact reasoning for switching to GCP, but I do recall it being quite a challenging process that took quite some time. Our experiences with GCP were much better, but I wouldn't call it perfect. In particular, GCP had/has a tendency to just randomly terminate VMs for no clear reason whatsoever. Sometimes they would terminate cleanly, other times they would end up in a sort of purgatory/in between state, resulting in other systems still trying to connect to them but eventually timing out, instead of just erroring right away. IIRC over time we got better at handling it, but it felt very Google-like to me to just go "Something broke, but we'll never tell you why".

Looking back, if I were to start a company I'd probably stick with something like Hetzner or another affordable bare metal provider. Cloud services are great _if_ you use their services to the fullest extend possible, but I suspect for 90% of the cases it just ends up being a huge cost factor, without the benefits making it worth it.

YorickPeterse··on My boundaries as an open source developer
Correct, there's no way to restrict GitLab merge requests to trusted users, while still allowing others to view merge requests. It's either visible/accessible to all, or only to project members.
YorickPeterse··on Gitlab Critical Security Release
I doubt it's related. DZ left GitLab a while back, and even then his involvement had been limited for quite some time. Knowing GitLab and its history of security vulnerabilities, the timing is probably just a coincidence.

There has also never been any evidence of e.g. state actors sneaking in backdoors and what not. The code review process is quite extensive (probably a bit too much even), so it would be difficult to sneak in vulnerabilities deliberately. It's much more likely these issues are caused by growing complexity and the amount of functionality that GitLab supports.

YorickPeterse··on Chris Lattner left Swift core team
I wouldn't consider Rust to fall in this category to be honest, as there are plenty of issues/RFCs where people were bike shedding for months or even years.
YorickPeterse··on Systemd service sandboxing and security hardening (2020)
You can also use Bubblewrap, but getting it up and running requires a lot more fiddling around. For example, this is what I use to isolate Zoom from the rest of my system: https://gitlab.com/yorickpeterse/dotfiles/-/blob/0a0492c78b6...

In my case I'm using Bubblewrap because Firejail was only used for Zoom, and this felt a bit of a waste considering Bubblewrap was already installed.

YorickPeterse··on Life at 800 MHz
To add to that:

You'd use a custom vocabulary as well. So rather than "curly open" you'd use "heck", and instead of "enter" it would be "bark". I'm just making the actual words up here, but the point is to use a different/more simplified vocabulary that's also easier to understand by the computer.

https://talonvoice.com/ is also worth keeping an eye on.

YorickPeterse··on An Ode to Ruby
> For I once again have trouble installing Nokogiri.

One could consider https://rubygems.org/gems/oga, as it doesn't have any installation problems. It's not actively maintained though (mostly because the author considers it to be complete). I do think the author is a bit of a weirdo though :)

YorickPeterse··on NFT Replicas: An app to mint a replica of virtually any NFT
Let's be realistic here: there's no need for NFTs other than fear of missing out, and money laundering.
YorickPeterse··on The Third Web
> but what about the newer/better tech?

But what about existing and proven technology that has been around for decades? This whole "web3" thing seemingly focuses on problems nobody has, cares for, or can be solved with what already exists in far more efficient ways.

YorickPeterse··on Rust maintainer perfectionism, or, the tragedy of Alacritty (2020)
I've run into this myself: a contributor submitted a pull request that didn't follow a bunch of guidelines, and the changes they introduced were very different from the rest of the code in the same file. I asked them to keep things consistent with the existing code, and they basically argued "This fixes the problem, so you must merge it".
YorickPeterse··on Async Ruby
> There can only be a couple thousand threads at the same time.

You can easily have tens of thousands of threads on Linux. Beyond 50 000 or so you may need to adjust some settings using `sysctl`, but after that you should be able to push things much further.

Task counts themselves are also a pretty useless metric. Sure, you can have may fibers doing nothing. But once they start doing something, that may no longer be the case (this of course depends on the workload).

> Threads are really hard to work with - race conditions everywhere. Async doesn't have this.

You can still have race conditions in async code, as race conditions aren't limited to just parallel operations.

YorickPeterse··on What our research says about teen well-being and Instagram
In the early 90s there was an advertisement on Dutch TV. It was about a company's toilet cleaning product, and during the ad some "scientists" said (literally translated) "We from Toilet Duck recommend Toilet Duck" (https://nl.wikipedia.org/wiki/Wij_van_Wc-eend_adviseren_Wc-e...). The slogan ended up being synonymous with organizations recommending their own products.

This article reminds me of that. Facebook will never admit their services are harmful, as that would be in direct conflict with their business. And because of that I would treat any claim they make about how good their services are as nothing more than just bullshit.

YorickPeterse··on Using two keyboards at once for pain relief
I'm not sure if I'd consider it all hype, at least not when talking about the force required to press down a key. When using regular 55g switches (brown, red, or something else), my fingers get tired rather quickly. But when using 35g red switches, I can go all day without any problems (finger wise at least). I've tried lighter (20g), but I ended up accidentally pressing keys too often.

I will say this: clicky switches serve no practical purpose. The same goes for tactile switches, _especially_ when using light springs as you'll bottom out most of the time. Whether you buy Cherry switches, Kailh or something else doesn't really matter either ergonomics wise.

YorickPeterse··on Resource efficient Thread Pools with Zig
Crossbeam is a library that provides various concurrency primitives, such as a queue type that allows stealing of work.

Rayon is a library for running code in parallel. Typically you'll give it a (parallel) iterator of sorts, and it will distribute the work across a pool of threads.

Tokio is a library for async IO operations.

YorickPeterse··on ProtonMail logged IP address of French activist after order by Swiss authorities
> Refuse to comply with unfair laws?

And do what exactly, go to prison? Expecting that is unreasonable at best.

YorickPeterse··on A Year in Deno Land
> I come from Europe where race doesn't matter and hearing about American woke rhetoric is extremely annoying.

Not sure what rock you have been living under, but the EU absolutely has its share of racial issues. Saying race doesn't matter is nothing but naive.

YorickPeterse··on Terraform is currently not reviewing community pull requests
In addition, many people will only contribute once or twice. The result is that you as a maintainer may need to invest a lot of time, while the results are minimal.
YorickPeterse··on Friendship ended with the garbage collector
Not so sure, does Objective-C have a single ownership model and move semantics? As far as I know it doesn't, which would make it pretty different.
YorickPeterse··on Friendship ended with the garbage collector
My bad for not making it more clear: it refers to a lightweight process here (e.g. like Erlang), not an OS process. Merely spawning these is basically just an allocation (Inko doesn't use PIDs either), so about as fast as it gets.
YorickPeterse··on Friendship ended with the garbage collector
In Inko, the reference counts are regular integers, not atomics. They don't need to be atomic because the same object can't be used by different processes.

Moving objects between processes itself doesn't lead to fragmentation, as processes don't have their own heap in the data structure sense. That is, the structures representing a process don't have some sort of "heap" field. Instead, the OS threads running processes maintain the heaps (each thread has its own heap). This brings several benefits:

1. Since the heap is physically detached from processes, we can move without copying

2. Since the heap is still thread-local, allocations don't need synchronisation

3. Since the heap is detached from the processes, each process is smaller, allowing for more processes to run concurrently

4. Since objects (and their children) can only be owned by one process, we also don't have to worry about multiple processes trying to write into the same object

This is only possible because we statically guarantee that a value `T` can't be _shared_ between processes, and because we'll disallow sending references between processes.

YorickPeterse··on Lisp in an “impossible” language, the most complex Malbolge program to date
Yeah, how dare people have some fun trying to implement a Lisp in an esoteric language. They should be ashamed!
YorickPeterse··on Support for team members who are mistreated in their country
Correct, you're still subject to regular immigration laws and such; some parts of it are just made easier.
YorickPeterse··on Are we GUI Yet? The state of building user interfaces in Rust
I did some testing using webview (https://github.com/Boscop/web-view) which is used by Tauri if I'm not mistaken. On Linux this uses webkitgtk, and it used a total of around 100 MB. That's not that good, but certainly better compared to Electron.
YorickPeterse··on Are we GUI Yet? The state of building user interfaces in Rust
I don't think it was created for Firefox, as Rust (in various forms) has been around for over 10 years at this point I think.

Setting that aside, Servo and Firefox both implement the UI side of things from scratch I think. I think from a browser perspective that makes sense: you're already writing a rendering engine, so you may as well also use it for your browser UI.

YorickPeterse··on Are we GUI Yet? The state of building user interfaces in Rust
I recently looked into this for a while (best I can do is this Twitter thread about it: https://twitter.com/YorickPeterse/status/1412417105329365004), as I wanted to see how feasible it would be to write a GUI text editor in Rust.

My conclusion is basically "there's nothing viable". _If_ you are OK with basically limiting yourself to Linux/BSD, the GTK bindings are good. However, for a text editor you'll likely need a custom text widget (the GTK ones aren't very good), and that's where things (with basically any GUI toolkit) get tricky.

There are a few libraries providing Qt bindings for Rust, but they either focus on QML, are only infrequently maintained (e.g. Ritual), or seem to focus more on exposing Rust to C++; not the other way around.

egui looked really interesting, and the immediate mode GUI pattern is really nice to write. Sadly, it's still in the very early stages, and most notably is lacking support for displaying text with different colors/styles.

The rest isn't really worth mentioning I think, at least when wanting to write a text editor. They basically all suffer from the same issues, such as:

- It not being clear if the library will still exist 2 years from now

- Poor support for Unicode (especially Emoji)

- No support for assistive technologies

- Poor support for flexible text rendering (e.g. multiple colors and styles)

- Little to no documentation

For a while I thought about just using Electron, or maybe Sciter (that would at least need fewer resources). Technology wise I think HTML makes sense, as it's very flexible (e.g. many GUI toolkits struggle the moment you want to mix text and e.g. images in the same widget) and quite easy to work with. Sadly, Electron is a fat pig and the last thing I want to do is write Javascript in my spare time. Sciter is proprietary, and you can't distribute the binaries yourself (from what I understand). That basically means your project is dead on arrival, at least if you intend to open source it.

So for now I shelved my idea. Maybe in a year I'll take another look :)

YorickPeterse··on Are we GUI Yet? The state of building user interfaces in Rust
The difference is that Electron guarantees you're always using a known version/engine. With Tauri, you'd be using whatever is installed, and that engine may behave different from what you are used to.

So basically you get all the drawbacks of developing for different web browsers, without really any of the benefits a cross-platform GUI gives you.

YorickPeterse··on Replit used legal threats to kill my open-source project
The premise of being sued should be enough to scare most people, whether they are right or wrong. As such it's not surprising.
← PreviousPage 5 of 14Next →