HNHacker News
TopNewBestAskShowJobs

louthy

6,853 karma · joined March 9, 2012

London based founder of meddbase.com (now sold)

Author: github.com/louthy/language-ext

* blog: paullouth.com

* bsky: @paullouth.bsky.social

* mast: 4four.org/@louthy

submissionscomments
louthy··on How did AMD Ryzen get 50% faster in two years?
I’ve been running the 64 core (128 logical cores) Threadripper PRO 3995WX in my dev machine for 4 years now (with 256gb ram).

Not sure I’ll need to upgrade my computer ever again :D

louthy··on Writing Rust code that's fast by asking agents to make the code faster
> Even in some of your examples like a compiler, game engine, or collection library, the big oh matters

Sure, but for example - today - I am literally building and optimising high-performance collections for my open-source library. Big-O is irrelevant, because I have built pretty much all of the fundamental collection types, what I care about is lower than that: what happens when enumerating any one of those collection types. Big-O tells you the scale of the problem, but not the per-element cost, which is still important when you're building core data-structures.

I am concerned about cache-friendly memory-layouts, how to do collection compositions without unnecessary memory allocations, keeping enough guards in place to make the types safe whilst removing as many branches as possible, reducing memory copying as much as possible, and catching stupid shit the compiler or JIT does and try to work around it. Literally what happens per-instruction, per-iteration, not how to pick a big-O based data-structure: trying to make all data-structures as fast as possible.

Anyway, we seem to be talking past each other. You're talking about the basics, I'm talking about the original source of this thread which was that (apparently) LLMs are surprisingly bad at optimisation. Which, I am trying to highlight becomes almost voodoo at a low-enough level and that highly-optimised code looks progressively more strange and opaque (in the hunt for a few nanoseconds here and there), which for an LLM wouldn't look statistically significant. I think the basics of data-structure choice should be easily within the realms of an LLM's current capabilities.

louthy··on Writing Rust code that's fast by asking agents to make the code faster
I mean, sure, but it really does depend on what you're doing. If you're working on a library with collection-types and you want to make each iteration as fast as possible, then roll up your sleeves. If you're writing a compiler and you want your language's source-code to finish compiling this week, roll up the sleeves. If you're working on a game-engine and you want to draw more than everyone else, roll up the sleeves...

There are plenty of real-world reasons why you'd want to get knee deep in this stuff. I wasn't suggesting not using tools (I've literally spent the day buried in JetBrains' memory and tracing tools!), but those tools can only tell you what is happening now, not what to do to improve it.

Profiling is, of course, essential. But performance tweaking can be quite a laborious process: if you're judging things by big-O notation, then that's a different level above the real low-level tweaking (imho of course). Picking the correct data-structures is all in the 101 of performance engineering. That's in the literature. But it's all too basic and simplistic. Most performance minded engineers wouldn't need a profiling tool to know which data-structure to use.

At the smallest level there's a lot of mental theory building and experimentation as you try out different approaches, which is where the instinct and intuition starts to build. I never see any of that in discussions about performance engineering.

louthy··on Writing Rust code that's fast by asking agents to make the code faster
Speaking as somebody who is a performance geek, my knowledge came from relentless experimenting over the years (starting in the 8 bit era). Beyond the basics, I haven’t seen much on high-performance engineering online. To learn, you need to do the hard yards and I think performance tweaking becomes almost instinctive rather than something driven by a hard set of rules.

At a low enough level, every performance tweak becomes unique and bespoke.

Of course, you could find people online talking about how to write high-performance code, but beyond a few basic techniques, their advice may not work for you — nobody can write a generalist article about performance engineering that will definitely solve the problem you have right now.

Arguably, there are fewer patterns for an LLM to infer as highly optimised code tends to become more and more opaque in the search for a nanosecond here or there.

louthy··on M5 Ultra Mac Studio Review
> could you not be like that? provide alternative language or go away. If youre offended, say so and be real.

Ok, as somebody with ADHD I find it offensive because I don't need constant supervision, implying people with ADHD need constant supervision is belittling and just plain wrong. So, I will call out an offensive trope if I see it.

> If you truly are offended, perhaps there is some truth you are reacting to preventing you from truly responding in good faith

No, because if there was some truth to it, I wouldn't be offended. Perhaps stop with the amateur psychology? You're not very good at it.

louthy··on M5 Ultra Mac Studio Review
> it's like the worst ADHD team member and requires constant supervision

Perhaps consider some non-offensive language for your comparison?

louthy··on Korea raises data breach fines to 10% of revenue
Please take a look at the posting guidelines [1] and consider using more respectful and constructive responses.

[1] https://news.ycombinator.com/newsguidelines.html

louthy··on Korea raises data breach fines to 10% of revenue
The bar is: do you have effective compliance in place? And are you audited? (ISO27001 [1] or similar).

If you are hacked and you are seen to have not given a shit about compliance, or independent penetration tests, or proper documentation of process, with good internal controls enforcing your processes. Then you’re almost certainly vulnerable to a negligence claim.

However, if you have all that in place, and somehow something slipped through the net. And once aware you put in new controls to make sure it doesn’t happen again, then you’re very unlikely to have the book thrown at you.

You may still get a fine, but it would be much reduced.

It’s not hard to do this. Yes, compliance can be overdone, so you need key stakeholders to make sure it doesn’t turn into jobsworth heaven; but the actual implementation isn’t hard to do, and if done well, will improve the processes within the business.

It’s very much like an insurance policy. It has some ongoing cost, but it saves you from the one big cost.

[1] https://www.iso.org/standard/27001

louthy··on Korea raises data breach fines to 10% of revenue
I realise I’m a sample size of 1, but for me caring was good for business: caring means you can empathise, if you can empathise you can understand, if you can understand you can build a better product.
louthy··on Korea raises data breach fines to 10% of revenue
> This is the default business mindset.

It isn’t, it is how some people approach business. Not all.

Again, in my opinion this is just cynical and constantly - almost psychopathically - propagated here as though it’s some kind of virtue of business or the only way a business can be ‘pure’ and succeed.

It just isn’t.

And, if you want to sell B2B, you have to sort out your compliance, or you’re gonna sell nothing. So, for a very large number of businesses, this levelling up is non-negotiable if you want to succeed.

louthy··on Korea raises data breach fines to 10% of revenue
Maybe I wasn’t clear in my message. But the buck stopping with the executives is when ‘the company’ breaks law. Usually because of gross negligence or corporate manslaughter.

With my last company, managing medical records, I was always conscious that if we didn’t take our responsibility of managing medical data correctly it could lead to the death of one of my customer’s patients; or some other extreme circumstance that the executives could be held liable for.

That was my point about being professional, if you have proper processes in place and audits to prove it, you have protection. And only the most egregious cases would land.

It’s good business to protect yourself from a gross negligence or corporate manslaughter claim. It just so happens that it’s good for your customer too.

Presumably, the reason you don’t hear much about executives in the dock for these crimes is because most professional organisations put these processes in place.

Again, I was just stating that it isn’t just data-breach fines that should encourage executives to professionalise.

louthy··on Korea raises data breach fines to 10% of revenue
If you want to be certified for SOC or ISO in the US you have to check all your suppliers too. You can’t outsource your responsibility if you want to comply. I know this because I have been through it in the US, EU, and UK.

If your supplier has these compliance audits in place and has the documentation to prove it, this isn’t “absolving”, it’s literally the diligence process.

But a “shell company”, as per your original comment, is not going to reach a compliance threshold to allow the diligence chain to succeed. Just from a business continuity point of view they would fail, but there are plenty of other areas that would be problematic from a compliance standpoint.

louthy··on Korea raises data breach fines to 10% of revenue
Your replies here suggest a level of cynicism that is, well, … , it ain’t pretty.

In my experience, putting proper compliance procedures in place, following industry best practice in relation to data management and data security actually leads to a more effective organisation, because it professionalises.

It’s the first step out of the ad-hoc phase of a startup and into the real world of creating a business with value. It also means as you scale up the personnel in the organisation, there are proper checks and balances in place.

When you come to sell your business, if it has a ton of existential risks attached to it, it will be worth less and may even not be sellable at all. So even from a cynical “all I care about is money” point-of-view, you want a business that is sound and isn’t storage for future law suits or fines.

Also, the cost of a fine due to a data breach isn’t the only thing to be concerned about. Gross negligence could lead loss of life, loss of property, loss of earnings, etc. and the buck stops with the executives — don’t think you can’t be completely fucked by the good ol’ law as it stands today.

Some businesses are more vulnerable than others, but that’s also why you scale the compliance architecture to the business.

louthy··on Korea raises data breach fines to 10% of revenue
That’s not how it works. Especially with compliance schemes like ISO27001, Hippa, etc. they require an audit chain through the supply line. Obviously it depends on what data you’re managing to whether your customers care about whether you’re audited, or not, but if you’re selling enterprise software then this is all part of your compliance process. You can’t offload that responsibility, you have to make sure your suppliers comply too.
louthy··on Korea raises data breach fines to 10% of revenue
4% of revenue in the EU, 4% of revenue in the UK, and 10% of revenue in Korea should be enough of an incentive to start caring about how you deal with your customer’s privacy and personal data.

One assumes the rest of the world won’t be far behind, apart from the the corrupt land of the USA which is going backwards right now.

louthy··on Korea raises data breach fines to 10% of revenue
Perfect isn’t required. The bar is “gross negligence”. Perfect is impossible, but proper compliance procedures, proper process, and a commitment to following industry best practice will always see you on the right side of the negligence bar, even if something slipped through the net.

It’s the difference between being a professional and an amateur (or worse, a ‘cowboy’).

louthy··on Korea raises data breach fines to 10% of revenue
> It feels better only as long as everybody else cares too.

Not sure who “everybody else” is in your statement, but as someone who founded a healthcare tech platform (since sold) [1], I spent 20 years caring about the many millions of patient medical records we held and making sure my team cared too. In my mind it wasn’t optional.

I did it because:

* it’s the right thing to do

* for professional pride

* and so I could sleep at night

And, at least at the beginning, I believed a data breach could be the death knell of the company. Over time the laissez faire attitude to data protection, by the industry as a whole, made it seem like a breach would be survivable, but luckily we never tested that theory.

I still walked away from it a wealthy man. Being competent and caring about your customers (and being able to sleep at night) doesn’t have to mean failure like it seems everyone here thinks.

[1] https://www.meddbase.com/

louthy··on Korea raises data breach fines to 10% of revenue
Yes, being competent requires effort.

It certainly feels much better being an proactive member of society rather than a self-serving arsehole though.

So, there is that.

louthy··on Korea raises data breach fines to 10% of revenue
Or … and hear me out on this one … care?
louthy··on Performance Improvements in .NET 11
True, there are of course exceptions! :D

(Also, other architectures might use J for 'Jump' rather than 'Branch'). I don't make the rules ;)

louthy··on Performance Improvements in .NET 11
You don’t need to, but if you ever want to really optimise some code, understanding what it turns into on the target CPU really helps. Especially if you know the implications for any particular instruction (cost of memory access, potential branch prediction misses, etc)

The three* letter mnemonics are usually pretty easy to decode, even if you don’t know the architecture: anything beginning with ‘B’ will be branch, so ‘ble’ is branch if less than or equal. L and S based mnemonics are unusually Load and Store from and to memory. After that it’s understanding the stack and registers and you’re pretty much good to go.

Everything in assembly is loading something from memory into registers doing something basic with those registers, like add/divide/etc and then putting the result back into memory or using the result to make a decision to jump to processing instructions from another place in memory.

Most devs won’t ever need to know this stuff, but as someone who grew up with computers that could barely do anything without grinding to a halt (8bit computer, 2mhz processor, 32kb of RAM, 20kb of which is for the screen), knowing this stuff was essential; however I still find this stuff useful today, even with my C# work.

I am a bit of a performance tuning nerd though, so…

[*] or more

louthy··on Small programming tricks
Well, there's my super-secret future-of-software-development-and-data-autonomy project, but we're not to talk about that, so shhh! (basically my next startup idea, once I've finished inventing it).

Then, there's language-ext [1], which is my large open-source functional-programming framework for C#. And although this isn't beyond the realms of an LLM: they know FP and they know C# and even my library has been around for more than a decade, so it'll be in the training data, when it comes to bending C# to my whims or to trying to eek out exceptional performance, they're all at sea.

A good example would be what I am working on at the moment, which I have in a standalone prototyping repo [2]. Basically I have introduced functional traits to C#, like `Functor<F>`, `Applicative<F>`, `Monad<M>`, etc. This brings more rigour to things like LINQ comprehensions and allows for the building of truly generic trait-based behaviours. Something that just doesn't really exist in C#.

In language-ext today I have `Foldable<F>`, which is a little bit like `IEnumerable`, but pure. I want to be able to provide a super efficient set of default implementations for any `Foldable` (or enumerable/iterable). For this I need an efficient lazy-stream or co-routine system. The one built-in to C# (`IEnumerable` and `IEnumerator`) is impure (it mutates as it enumerates), so I am trying to build an efficient iterator/enumerator that:

* Takes around 0.25 nanoseconds per-iteration-step for its housekeeping (this speed is then on a par with the mutable IEnumerators that are a core part of C#).

* Doesn't allocate any memory

* Is immutable

* Is lazy

* Can be stopped at any point and the iterator reference be passed around (because it's immutable)

* Can be composed with standard functional operators (functor map, applicative apply, monad bind, etc.) without performance degradation and without a large memory-allocation cost.

I've been building several prototypes to try different ways of bending C# to my whims. I've managed all but the last item on that list.

Not allocating memory means using value-types (stack allocated types), but that also means the entire state of the co-routine needs to be stored in the value-type as each value is yielded (because control needs to be given back to whatever code is processing the values). To solve it, I'm pretty much building my own runtime, stack-machine, and memory manager on top of the .NET CLR so that I don't have to submit to its rules. I'm trying to apply as many of my old-skool low-level engineering chops as I can (without making it brittle); but to do the last item on that list needs more space in a value-type than would be reasonable (to avoid copying costs), so I'm looking at other pooling strategies and into building lots of bespoke to-the-metal memory managers.

After all of that, it may be a fools errand, and not doable. The LLM wouldn't understand, and that's for just one feature! Also, it must be stated, I just love doing this shit, it's brain fuel. The idea of having this conversation endlessly with an LLM as it continuously gets it wrong is nightmare fuel.

I'm not anti-AI, I love the fact that people who can't, now can. But, at this point in my journey with code, I think quicker and can produce quicker than an LLM. I think it's akin to a virtuoso piano player. If the piano player had to describe what they wanted to an LLM, the magic would go, the enjoyment would go, and potentially the quality would go. It would it also take much longer than if they had just played.

That's how I feel with code. An LLM can maybe churn out more code than me, but I can build more value and I can invent. And when in my flow state, nothing can stop me.

I will certainly keep checking in though, I'm sure there'll be a point where I feel like it augments me rather than hinders. It's just not there for me yet.

Too much information? :D

[1] https://github.com/louthy/language-ext

[2] https://github.com/louthy/iterator-prototype (this is messy prototype code, don't hate me).

louthy··on Small programming tricks
> To what extent are people still coding by hand these days?

I write everything myself. After 41 years of coding, I think in code — code flows from my brain through my fingers effortlessly: translating my thoughts to English for an LLM to then translate back to code is much, much slower than me. And once my hyperfocus kicks in, the last thing I need is to be jolted out of it by an LLM prompting loop.

JetBrains Rider has an AI auto-complete which I do use for the 5-10% of the time that it can predict what I’m going to write next. But even the next-word/next-block-of-code prediction seems so hopelessly out of its depth (which is supposed to be LLM’s party piece), it’s genuinely shocking how wrong it is most of the time.

Disclaimer: I’m not writing vanilla line-of-business code or bog standard web apps, so I suspect I’m just not in the training data.

louthy··on Small programming tricks
> “the old days”

Is this just plain old rage baiting? I literally can’t tell any more.

louthy··on Giving up on smart rings
Fair enough.
louthy··on Giving up on smart rings
I use the Pump Club app when lifting, it has the day's programme to follow: I simply enter the reps after each exercise.

It never occurred to me that I'd want to automatically track reps. I mean, it could be kinda useful, but I'm also taking 45 to 60 seconds cool-down between exercises anyway, so it's not like it gets in the way.

That also moves the app onto the next exercise in the programme. It's manual, but it's not intrusive and can't be wrong, like a fitness tracker, that definitely can be. So shrug, just personally, auto-tracking reps isn't something I need and wouldn't be a big selling point for a band/watch over a ring.

louthy··on Giving up on smart rings
If you constrain the device to ‘fitness tracker” and not lifestyle/sleep/health/illness/fitness telemetry, sure.

I wear an Oura Ring for the complete suite of telemetry, not just for tracking workouts.

I also lift, I’ll take the ring off for heavy lifts, and keep it on for every other exercise (unless I feel there’s a risk that the ring could get caught on the equipment, in which case I’ll take it off for those reps too). Granted this is in my home gym, so there’s no inconvenience to me doing this.

I’ll rest between exercises and that’s when I make the call to keep the ring on or not [for the subsequent exercise].

I still get most of the insights and the Oura ring app lets me to tell it that I was doing strength training, which allows it to guesstimate calorie usage based on duration.

Of course that’s not perfect, but it’s good enough for people who are interested in health metrics without being obsessed with them (which is just probably a better idea unless you’re a pro athlete).

The workout tracking is kinda the least interesting aspect for me. It’s more about the long term trends of activity, sleep, heart rate, stress, etc.

Also, it’s worth saying, I went with a ring rather than a watch or a band because I like to wear a real watch.

louthy··on OpenAI bots knew about the RubyGems caching vulnerability
That’s corporate negligence. The executives are liable unless there is evidence of malfeasance by one of the employees.
louthy··on Paint.net 5.2 alpha now runs on Linux
I use Krita, but I miss Paint.NET

It’s lighter, simpler, and faster with a much more intuitive UX. for basic image manipulation tasks it’s awesome.

For creation of art I’d use Krita, it is more feature complete. But if Paint.NET appeared on Linux, I’d use it in a heartbeat.

Paint.NET is closer to Gimp, but usable.

louthy··on Dwarf Fortress' creator says the industry's in shambles over AI
If you find this stuff interesting, you can read about the failure of the first game I worked on here [1].

I replied in the comments [2]

It says 1997, but dev started in ‘95, I joined in ‘96.

I was pretty gutted at the time, I was just 21 years old and had the big dreams of working in games. It soon becomes clear that very few titles succeed. Luckily I had a few wins on the way, but the lack of professionalism really did get tiring.

[1] https://www.unseen64.net/2020/11/16/lunatik-pure-entertainme...

[2] https://www.unseen64.net/2020/11/16/lunatik-pure-entertainme...

← PreviousPage 2 of 34Next →