HNHacker News
TopNewBestAskShowJobs

legohead

3,447 karma · joined October 14, 2013

submissionscomments
legohead··on Retailers will soon have only about 7 weeks of full inventories left
From an economic perspective these new blanket import tariffs are a classic own-goal: tariffs are good for developing industries, but these levies hit huge, mature supply chains, so the main outcome is higher consumer prices, squeezed real wages, and slower growth.

A common example is Smoot-Hawley’s tariffs deepening the Great Depression, and early 2025 data already show trade and hiring slipping, but we won't know the full effect for a while.

As for the "bring manufacturing to the US" argument - tariffs often reroute, not reshore. GoPro moved from China to Mexico, Apple from China to India, Hasbro from China to Vietnam, to name a few.

legohead··on Ask HN: Do you still use search engines?
Mostly GPT, but for World of Warcraft, GPT is absolutely horrible. It's like it has been corrupted by the 20 years of bad/incorrect user data, or maybe just the sheer amount of it in general.

As an example, someone typo'd an abbreviation, so I asked GPT and it gladly made up something for me. So I gave it a random abbreviation, and it did the same (using its knowledge of the game).

Even when I tell it the specific version I'm playing it gets so much wrong it's basically useless. Item stats, where mobs are located, how to do a certain quest - anything. So I'm back to using websites like wowhead and google.

legohead··on Stupid Smart Pointers in C
> Today the libc allocators have advanced by maybe tens of thousands of PhDs worth of theory and practice.

For fun I wrote up a very basic memory manager and benchmarked it against free/malloc. On my Mac (M3) the manager was 3x faster. On a random kubernetes pod (alpine) it was 33x faster. Performance increases as memory size goes up.

legohead··on Stupid Smart Pointers in C
There are always details within details. The overall idea is easily understandable. You are being pedantic.
legohead··on Stupid Smart Pointers in C
I guess I'm confused at this chain of responses, then. As I'm doing what you are already suggesting.

Re-reading your comment, about the "not really freeing anything" -- I beg to differ, as when you do a real free(), it frees up memory for any program to use. As I already mentioned one of the benefits is once you have control of who can use that memory and aren't risking it not being available - disregarding some program that constantly grows in memory.

legohead··on Stupid Smart Pointers in C
libc allocator is considered "slow" for the extra overhead it has. I'll just leave it at that as you can GPT the rest. I did some of my own testing back in the days I wrote C, and mine was significantly faster than malloc/free.

It's also a way, I suppose, to ensure your program has the memory it needs, depending on how you design it. Mine basically allocates all the expected memory I need at the start, while still being able to grab more if it needs. This was more of an issue back when you shared a server with lots of others.

legohead··on Stupid Smart Pointers in C
When something would normally be freed, it calls the memory manager's version of free(), which zeroes the memory and adds it back into the appropriate available list.
legohead··on Stupid Smart Pointers in C
What are your issues with the memory requirements being small? One of the programs was a MUD that consumed a couple hundred megabytes, and I never had issues with it.

I mentioned gigabytes because of how mine specifically worked. It allocated chunks in powers of 2, so there was some % of memory that wasn't being used. For instance, If you only need 20 bytes for a string, you got back a pointer for a chunk of 32 bytes. Being just a game, and side project, I never gave it much thought, so I'm curious to hear your input.

legohead··on Stupid Smart Pointers in C
My C programs never consumed gigs of memory. So I (like many others I assume) made a memory manager and never freed anything. You'd ask it for memory and it kept a list of various sizes it allocated and returned what you needed to be re-used. Freeing and allocating is slow, and error prone, so just avoid it!
legohead··on A 10x Faster TypeScript
misleading titles are a no-no on HN.

I agree with pseudopersonal in that the title should be changed. technically it's not misleading, but not everyone uses or is familiar with typescript.

legohead··on Launch HN: Maritime Fusion (YC W25) – Fusion Reactors for Ships
I thought we need Q > 10 to really get enough power out of the reactor, due to our inability to capture all the energy efficiently.

Do you have any clever ways to capture the energy output?

legohead··on Nuclear fusion: WEST beats the world record for plasma duration
I'd just assume that temperature would be an important factor in the reactor.

With the millions of degrees being involved, seems a little more than "not very different" than a fission reactor. But would like to hear how this is supposed to work.

legohead··on Nuclear fusion: WEST beats the world record for plasma duration
Has any fusion reactor produced usable electricity, if only as a proof of concept?
legohead··on Robocode
> known as "dynamic clustering" which was really just K-nearest neighbor

I'm a self taught programmer. Recently had a technical interview - final interview before getting hired, everything had been going smoothly so far. Guy asked me to describe "dependency injection", and I had heard this phrase, but didn't know the definition off hand. I failed the interview because of this, and they told me so later when I tried to follow up.

So I looked up what dependency injection is, and realized it's something that to me is just basic programming common sense that I had already been using 30 years ago.

legohead··on Tariffs result in 10% laptop price hike in U.S. says Acer CEO
That's how the US got most of its income until 1913, when federal tax income was introduced.

But it doesn't work in a real market economy, for many reasons already stated. It doesn't just hurt our people but the world economy as a whole.

Tariffs can be good, but you wont find politicians using them correctly. They can be used to protect newly growing businesses from foreign competition - but they are often used in the opposite, protecting large businesses.

legohead··on IT Unemployment Rises to 5.7% as AI Hits Tech Jobs
We don't. Economics is complex and it is extremely common for journalists to simply take something and run with it. Even just saying "unemployment" needs scrutiny, as there are multiple ways to measure "unemployment."
legohead··on 1% Equity for Founding Engineers Is BS
Basic economics. If it's still at 1%, then people must be accepting the 1%.
legohead··on 1% Equity for Founding Engineers Is BS
Basic economics. If it's still at 1%, then people are taking 1%. That simple, crying about it wont help.
legohead··on Google drops pledge not to use AI for weapons or surveillance
I pledge to not drink coffee.

drinks coffee

Nevermind.

legohead··on Show HN: Eonfall – A new third-person co-op action game built for the web
Looks interesting. Some feedback on the trailer: I wouldn't waste the precious first 5 seconds on guys running at the camera, and your post says something about roguelite. Are there skill trees? Items/equipment? Shops? Different zones? I assume the characters running at the start represent classes but there's no way to tell. I'd showcase clips of what all the game has to offer, not just combat the whole time.
legohead··on Ghost artists on Spotify
There is an incredible amount of unique music & artists on Soundcloud. Or at least there was some years ago. I got quite into it, to where it was taking up too much of my time and I stopped using it altogether. They kept making it more difficult to download music too so that was another thing that drove me away.
legohead··on 'I'm running a Mud so I can learn C programming ' (1993)
MUDs are how I began programming, about 30 years ago at the age of 16. Now I'm a senior engineer making mobile games. Unsurprisingly I focus on the backend.

MUDs taught me C, devops, multiplayer/sockets, security to some extent, databases (I wrote my own MUD that used MySQL). Also HTML/webpages eventually. MUDs taught me the full stack.

legohead··on Show HN: Rebels in the sky – Terminal game about space pirates
from the readme: https://deep-fold.itch.io/pixel-planet-generator
legohead··on A “meta-optics” camera that is the size of a grain of salt
In The Culture series books, there's a concept of "smart dust". Basically dust sized surveillance drones that they cover planets with, that lets them see and hear everything that's going on.
legohead··on I Don't Have Spotify
Well I can tell you as a Spotify user that their random play is horrible. It's not truly random, which is extremely frustrating when you have 1000+ playlist and keep hearing the same 10 songs over and over.

Here's an ongoing 150+ page, 4 years old thread about it on their forums: https://community.spotify.com/t5/Live-Ideas/All-Platforms-Op...

legohead··on Riot Games: Peeking into Valorant's Netcode (2020)
Back in the early days of the internet when it was mostly connecting to universities, there was a popular PK mud hosted at the university I went to. So I had a massive advantage in that game. Game hackers weren't really a thing so people just assumed I was amazing at the game.
legohead··on Amazon reveals first color Kindle, new Kindle Scribe, and more
I want to upgrade my Kindle but first I need to know where the power button is. My current one has the power button on the bottom and it turns off when I rest it on things - extremely annoying. Can't be certain from the product pictures, but looks like it's on the bottom again.
legohead··on The Cheating Device (ChatGPT on a TI-84) [video]
We hire interns and I've interviewed quite a few since Chat GPT. It's interesting they almost always ask what I (and the company) think about AI. Never had this question in the past. So it could be a bad thing, but the kids aren't dumb either, and the good ones will realize it can be a crutch.

Part of our interview process is a take home programming exercise. We allow use of AI, but ask that you tell us if you used it or not. That could be a good option for teachers as well.

legohead··on Unity is cancelling the runtime fee for games customers
Yes, very exciting. People at work are already talking about it. But will take some time before we switch versions, that takes research, QA, etc.
legohead··on Unity is cancelling the runtime fee for games customers
I work at a fairly large mobile gaming company. We are stuck on the old version of Unity that doesn't have this fee. But to Unity's credit they are still supporting that version and doing bugfixes for us, but it sucks to be walled off like that, trying to eke out our existence as long as possible until we have to pay a lot more money.
← PreviousPage 2 of 34Next →