HNHacker News
TopNewBestAskShowJobs

alextingle

2,111 karma · joined February 20, 2010

submissionscomments
alextingle··on Are we the baddies?
> If you buy a game on steam, you own it for real.

How so? If Steam goes away, then so does your game. That's not ownership.

Just because they have carefully and honestly fostered a lot of trust in their game rental service, doesn't make it not a game rental service.

alextingle··on The provenance memory model for C
I don't imagine that the exposed state would need to be represented in the final compiler output, so the optimiser could mark the pointer as exposed, but still eliminate the dead integer load.

Or from a pragmatic viewpoint, perhaps if the optimiser eliminates a dead load, then don't mark the pointer as exposed? After all, the whole point is to keep track of whether a synthesised pointer might potentially refer to the exposed pointer's storage. There's zero danger of that happening if the integer load never actually occurs.

alextingle··on Untangling Lifetimes: The Arena Allocator
This approach to memory management is completely at odds with the whole point of Rust.

Object orientated programming has conditioned programmers into believing that having a hairy nest of small allocations, all with pointers to each other, is the normal, unavoidable situation.

In fact, it creates all sorts of problems. First, and most obviously, it's really hard to keep track of all those allocations, so you get leaks, and use after free, and all the other familiar memory bugs. But you also get bloated memory use, with both your user code, and the allocator having to keep track of all those chunks of memory. You get poor cache utilisation. You incur often ridiculous CPU overhead constructing and tearing down these massive, intricate structures.

Rust makes it harder to trip over the memory bugs, but that makes it easier to keep on using the lots-of-tiny-allocations paradigm, which is a much bigger problem overall.

alextingle··on Learn Makefiles
A serious makefile will disable all the default rules by defining the empty rule ...

.SUFFIXES:

alextingle··on Learn Makefiles
If you can't easily reason about dependencies, then your builds will just get more and more bloated.

People who care about build systems are a special kind of nerd. Programmers are often blissfully ignorant of what it takes to build large projects - their experience is based around building toy projects, which is so easy it doesn't really matter what you do.

In my experience, once a project has reached a certain size, you need to lay down simple rules that programmers can understand and follow, to help them from exploding the build times. Modules make that extra hard.

alextingle··on Jemalloc Postmortem
The only difference between "" and <> is that the former adds the current file's directory to the beginning of the search path.

So the only reason to use "" instead of <> is when you need that behaviour, because the dependency is relative to the current file.

If you use "" in any other situation, then you are introducing a potential error, because now someone can change the meaning of your code simply by creating a file with a name and location that happens to match your dependency.

(Yes, some compilers have -isystem and -iquote which modify that behaviour, but those options are not standard, and can't be relied upon. I'd strongly advise against their use.)

alextingle··on Using `make` to compile C programs
My configure scripts never checked for a FORTRAN compiler. I'm not going to claim that using autotools is a pleasant experience, but it's not that bad, and it's very well documented.
alextingle··on Jemalloc Postmortem
>> `#include "base/pc.h"`, where that `"base/pc.h"` path is not relative to the file doing the include.

> I have to disagree on this one.

The double-quotes literally mean "this dependency is relative to the current file". If you want to depend on a -I, then signal that by using angle brackets.

alextingle··on It's the end of observability as we know it (and I feel fine)
Cheap-as-chips AI from gigantic data-centres is certain to go away, one way or another. Either the companies succeed in their game plan, and start to raise prices once they've established a set of dependent customers, or else they all go bust and the data-centres stand idle whilst the industry puzzles over a business model that works.

Of course the technology will remain. You'll still be able to run models locally (but they won't be as good). And eventually someone will work out how to make the data-centres turn a profit (but that won't be cheap for users).

Or maybe the local models will get good enough, and the data-centres will turn out to be a gigantic white elephant.

alextingle··on Cinematography of “Andor”
The US Navy has aircraft carriers, which are every bit as ridiculous as a Death Star. They are utterly useless against well armed opponents.

But they still got built, for good political, and psychological reasons that have nothing to do with cost effectiveness.

alextingle··on Cinematography of “Andor”
One of the original movie's main characters was a senator. It's hardly original.
alextingle··on Stargate and the AI Industrial Revolution
This is all going to be hilarious when the inevitable AI crash happens. Somebody will pick up all of this infrastructure for pennies, and eventually it will come into its own years later. Just like the fibre rollouts of yesteryear.
alextingle··on US vs. Google amicus curiae brief of Y Combinator in support of plaintiffs [pdf]
Killing Gmail would be a massive win for email deliverability. It's got so big now that they simply don't give a shit about delivering emails from smaller players.

That gives users the impression that other providers are unreliable, and further bolsters their monopoly.

alextingle··on Odin, a pragmatic C alternative with a Go flavour
The language creator strongly suggests using arenas and zero-is-initialization. That's a programming paradigm that completely avoids having to keep track of zillions of small memory allocations, so the mechanisms needed to manage that are less important.
alextingle··on Try Switching to Kagi
Shoplifting and copyright violation are not comparable.

Most of us on this site produce copyrighted works for money. Many of us are pretty knowledgable about how copyright works, as it's an integral part of our livelihood. So please don't try to promulgate that weird media industry propaganda here.

alextingle··on Google blocked Motorola use of Perplexity AI, witness says
You could have simply written "I have no idea what anti-trust is all about", and saved yourself a lot of words.
alextingle··on Apple and Meta fined millions for breaching EU law
There are no fees.
alextingle··on Trump exempts phones, computers, chips from ‘reciprocal’ tariffs
A free market requires regulations in order to operate. Regulations require a bureaucracy in order to be effective.
alextingle··on Europe's GDPR privacy law is headed for red tape bonfire within 'weeks'
The EU didn't mandate that annoying UI. That's malicious compliance from businesses who are trying to undermine the law.
alextingle··on E.U. Prepares Major Penalties Against X
Why? Companies are regulated all the time. Is deceptive advertising allowed in the US? Didn't think so.[1] Does that violate your First Amendment too?

This case is all about forbidding deceptive practices. Did Twitter's redefinition of blue checkmarks amount to deception? Maybe. There'll be a court case where Twitter get to make their case, if they lose them have to pay the fine. Lay off the pearl clutching.

[1] https://www.law.cornell.edu/uscode/text/15/54

alextingle··on I genuinely don't understand why some people are still bullish about LLMs
It would be nice to have some kind of "confidence level" annotation.
alextingle··on Better Shell History Search
Having the partial search bound to the up/down arrows is the most fundamental part of the shell for me. I very rarely have to resort to Ctrl-R. Every few weeks I might need a more complex history search, but for that I can just grep in my .zsh_history.
alextingle··on Shift-to-Middle Array: A Faster Alternative to Std:Deque?
I love how the descriptive text specifically calls it an alternative to a deque, but the complexity comparison pointedly does not compare it to a deque.
alextingle··on EmptyEpsilon open source spaceship bridge simulator
Are there any reviews of how the actual game plays? This sounds right up my street, but I'd need some idea of what I'm getting before I get my friends to invest their time in playing it.
alextingle··on Oxidizing Ubuntu: adopting Rust utilities by default
This is the worst kind of busy-work. Rewriting something for the sake of it is terrible practice.

There's a lot of refreshing energy amongst Rust coders eager to produce better, more modern command-line tools. That's amazing, and a real benefit to everyone. But rewriting simple, decades-old, perfectly functional tools, with the explicit goal of not improving them is just a self-absorbed hobby. And a dangerous one at that - any new code will contain bugs, and the best way to avoid that is not to write code if you don't have to.

alextingle··on Make Ubuntu packages 90% faster by rebuilding them
> including at least one method that is native to Ubuntu and doesn’t need any external tooling.

Can you explain a little more? Search has failed me on this one.

alextingle··on Make Ubuntu packages 90% faster by rebuilding them
I'll have a go at explaining: The process described in the article isn't a simple recipe that you can apply to any program to achieve similar results.

`jq` is a command-line program that fires up to do one job, and then dies. For such a program, the only property we really want to optimise is execution speed. We don't care about memory leaks, or how much memory the process uses (within reason). `jq` could probably avoid freeing memory completely, and that would be fine. So using a super-stupid allocator is a big win for `jq`. You could probably write your own and make it run even faster.

But for a program with different runtime characteristics, the results might be radically different. A long-lived server program might need to avoid memory bloat more than it needs to run fast. Or it might need to ensure stability more than speed or size. Or maybe speed does matter, but it's throughput speed rather than latency. Each of those cases need to be measured differently, and may respond better to different optimisation strategies.

The comment that confused you is just trying to speak a word of caution about applying the article's recipe in a simplistic way. In the real world, optimisation can be quite an involved job.

alextingle··on Stupid Smart Pointers in C
Is your function body really 600+ LOC?? If so, then I think I might have found your problem...
alextingle··on Show HN: Online Python Compiler with Libraries
Who would search for "Python compiler"?

Honestly: It makes it sound like you literally have no idea what you're talking about. Not a good look for someone trying to sell a service.

alextingle··on What makes code hard to read: Visual patterns of complexity (2023)
If you like to actually read the code, then being able to search for a variable name really helps comprehension. Shadowing makes that harder, by introducing multiple distinct objects with the same name.

Now you need something like an IDE to easily follow the lifetime of an object. Introducing a heavyweight dependency like that, as a prerequisite for simply following the code easily, is... a poor choice.

← PreviousPage 5 of 27Next →