HNHacker News
TopNewBestAskShowJobs

weavie

3,068 karma · joined May 29, 2013

Code monkey

My email in base64: Y29kZXJzdGV2ZUBsaXNwLnNwYWNlCg==

submissionscomments
weavie··on The AI boom is causing shortages everywhere else
As someone in the UK for whom that link is blocked, I wonder if that meme is doubly apt.
weavie··on Don't rent the cloud, own instead
I'm largely just thinking $HUGE when throwing out that number, but there are plenty of companies that have cloud costs in that range. A quick search brings up Walmart, Meta, Netflix, Spotify, Snap, JP Morgan.
weavie··on Don't rent the cloud, own instead
What is the upper limit of Hertzner? Say you have an AWS bill in the $100s of millions, could Hertzner realistically take on that scale?
weavie··on Pebble Round 2
As someone who has only ever had a Garmin, what am I missing from other smartwatches?
weavie··on Thoughts on Go vs. Rust vs. Zig
To be clear though, the allocator API is still experimental and from what I remember has been for quite a while now..
weavie··on Ask HN: Is it OK to look at AoC solutions?
The more you struggle at something the more you will learn. That works up to the point where the struggle is beyond your capacity for struggle - then you just get stuck. So ideally (assuming you are doing this because you want to learn something) you want to reduce the amount of struggle to just below your capacity.

Just copying someone else's solution, or getting an LLM to fix it for you will be very low struggle, so you won't learn much.

To add some struggle, maybe look up a solution in a different language and translate to your language? You could choose a solution in a language similar to your language, so if you are solving in C, perhaps look up a C# solution or to make it harder look up a solution in a different paradigm. Find a Haskell solution or a Prolog one and see if that gives you enough hints.

weavie··on Casey Muratori: I can always tell a good programmer in an interview
Yes, a discussion of the tradeoffs of different solutions is exactly what I want to hear in an interview.
weavie··on Imgur pulls out of UK as data watchdog threatens fine
A well implemented system would somehow allow you to use your ID to prove you have the attributes a service needs (being over 18, able to drive, no criminal records, not a communist or whatever it is they need) without providing any further information that would allow multiple services to correlate ID's against eachother.
weavie··on Zig Software Foundation 2025 Financial Report and Fundraiser
There are projects that spend more than that every day.
weavie··on Ditching Obsidian and building my own
Emacs can be a curse too. Once you get into it, it's really hard to use anything else..
weavie··on EU fines Apple €500M and Meta €200M
500 million is like half a days revenue.
weavie··on Ancient Sumerians created the first writing system
They believed their writing was gifted to them by the Gods. According to them they were not the first, they were just the next in line after the Gods.
weavie··on Pin
I've been programming Rust professionally for several years now and being totally honest I don't really understand Pin that well. I get the theory, but don't really have an intuitive understanding of when I should use it.

My usage of pin essentially comes down to "I try something, and the compiler complains at me, so I pin stuff and then it compiles."

It's never been such a hurdle in the day to day coding I need to do that I've been forced to sit down and truly grok it.

weavie··on Enums in Go
Huge codebase. It was handled in 13 places, but they missed the 14th.
weavie··on Enums in Go
The problem isn't so much the lack of enums, it's more that there is no way to do exhaustive pattern matching at compile time. I have seen production systems go down because someone added a variant to an 'enum' but failed to handle that new variant everywhere.
weavie··on Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
A few years ago I worked on a Solaris box that would lock the whole machine up whenever I grepped through the log files. Like it wouldn't just be slow, the web server that was running on it would literally stop serving requests while it was grepping.

I never worked out how that could be happening.

weavie··on [dead]
I'm not quite sure I understand what "driving traffic through Google" actually means.. Anyone?
weavie··on Ardour 8.0
Once installed I've found it to work pretty much flawlessly, very few windows plugins don't work with it.
weavie··on Ardour 8.0
If it supports VST, I imagine yabridge would work fine to allow you to use Windows VST.

https://github.com/robbert-vdh/yabridge

weavie··on Effective Rust (2021)
The other commenters to this are correct, `Vec::new()` doesn't actually allocate so the code in the book is fine. I had a brain fart.

If that function was taking a reference to an object that was fairly expensive to create a default value for then my conundrum would still exist.

weavie··on Effective Rust (2021)
The example at the end of that section:

        pub fn encrypted(&self) -> Vec<u8> {
            encrypt(self.payload.as_ref().unwrap_or(&vec![]))
        }
Needlessly allocates a `Vec` if `self.payload` is `Some`. Really you should do:

     encrypt(&self.payload.as_ref().unwrap_or_else(|| &vec![]))
But that isn't going to work because the `else` Vec will be dropped at the end of the closure.

In this situation (if the code was on a hot path where every bit of performance mattered) I would probably do something like:

    match self.payload.as_ref() {
        Some(payload) => encrypt(payload),
        None => encrypt(&vec![])
    }
There is a slight bit of duplicated code. I'd be curious if anyone could come up with a better way.
weavie··on Haskell in Production: Standard Chartered
Did you get the job?
weavie··on Mastodon is doomed?
I see. So essentially the issue is built in to the way Activity Pub is designed.

It is a scaling issue. Your browser may not blink at loading 100 resources, but say you were constantly reloading 100s of tabs, it would start to grind down. Rewriting in a more efficient language would help, but that would just mean it would start to grind down when you have 20,000 users rather than 10,000.

I'm surprised it doesn't do some kind of batching peer to peer communication instead. Maybe that wouldn't be as real time.

Thanks for the insight.

weavie··on Mastodon is doomed?
What is the biggest resource bottleneck in Mastodon?

Like, are the certain design decisions that could be optimised to make it more resource efficient? Is it just because it is written in Ruby? Is there something inherent to ActivityPub that means it has to use a lot of resources? Can work be done to make it cheaper to run?

weavie··on Janet for Mortals
The difficulty with a lot of dynamic languages is that it is very difficult to determine at compile time what parts of the runtime are not going to be invoked so you largely end up having to include the entire platform in the executable.
weavie··on Ask HN: What has your personal website/blog done for you?
I guess times have changed. About 10 years ago I was getting hundreds per day.
weavie··on The extensible vi layer for Emacs
Vi commands are verb-noun (cw - change word). Helix are noun-verb (wc - select the word then change it).

Learn to use multiple cursors in Helix - many of the things I have found lacking from Vi - eg pressing . doesn't work the same way in Helix - can be made up with more or less by using multiple cursors.

weavie··on Show HN: Get advice from a GPT3-based stoic philosopher
"Whether to choose Emacs or Vim is a difficult decision, as it depends on the individual's preferences and needs. As Seneca said, “Will any one give this passion as an assistant and companion to virtue, although it disturbs calm reason, without which virtue can do nothing?” (1). It is important to remember that we should not let our passions dictate our decisions, and must use reason to guide us."
weavie··on I still Lisp (2021)
Kinda by definition the people you hear about are the people that are talking about it and not the people that are using it.
weavie··on The Janet Language
Look forward to it.
← PreviousPage 2 of 34Next →