HN user

jason-johnson

108 karma
Posts0
Comments20
View on HN
No posts found.

As sad as it makes some version of me to say, the majority of code that gets written every day doesn't need to be good code. I am doing a pet side project right now, completely with copilot. I haven't written a line of code, documentation or anything else. The code is pretty poor but I don't care because I just need it to take a specific input and produce a specific output and I only need this to happen once and then I'll throw the whole thing away. As I mentioned elsewhere: this didn't get me the result faster than I could have done by hand, but it did let me not spend the entire time in deep focus trying to write all this.

This, for me, is the actual gain and I don't see a lot of people talking about it: it's not that I finish a project faster the LLMs. From what I've read and personally experienced, it probably takes about as long to complete a project with or without the LLMs. But the difference is, without it I spend all that time deeply engaged, unable to do anything else. With the LLMs I no longer require continuous focus. It may be the same wall-clock time but my own mental capacity is not being used at or near capacity.

I believe this is because England was conquered by the Normans (french speakers). I think it was within the last 100 years or so that the English aristocracy finally stopped speaking French among themselves.

well, if you ignore the current country borders then "German" would encompass a large portion of Switzerland and the Netherlands. So, with that assumption, I would be surprised if Italian had more dialects than German.

Can you say what your development environment was like? I was having 15 minute build times for a pretty small system. Everyone talks about how slow Rust compile times are so I thought that's just how it is. Then, by chance, I ended up building from a clean install on my work laptop and it took about 3 minutes from scratch.

My development environment is VS Code running in a Dev container in docker desktop. So after my work laptop was so fast, I made some changes to my Mac docker desktop and suddenly the mac could build the project from scratch in about 2 minutes. Incremental compile was several minutes before, instant now.

This has generally been the case, but a system language like Rust has access to optimisations that C simply won't have due to the compiler having so much more information (e.g. being able to skip run time array size checks because the compiler was able to prove out of bounds access cannot occur).

How can it not? Experts in C taking longer to make a slower and less safe implementation than experts in Rust? It's not conclusive but it most certainly says something about the language.

”Game theory optimal" (as poker players like to call it) is not really the optimal strategy. It's the nash equilibrium strategy assuming the other players are also playing a nash equilibrium strategy. As soon as one player deviates from the nash equilibrium it's not optimal anymore :).

This is not really what most people mean when they say “optimal strategy”. It’s true that exploitative play will make more money if you know exactly what your opponent is doing and if they keep doing it despite it not working. Neither of these will generally hold in an actual game.

The reason it’s called “optimal strategy” is because it works no matter what your opponent is doing. It will not make as much as a strategy tailored perfectly to your opponent but it will never lose to anyone under any circumstances, assuming infinite games (assuming infinite games just so we can ignore variance). The worse case the strategy has is break even to anyone else using it.

No, the best thing is not assume you know better than anyone who will ever ask this. It’s good to mention what the right way is and why but your answer should always include the answer to the question exactly as asked at a minimum.

Again, you’re not answering the person who asked but every person who ever will. Some of them will be asking because the “right way” is not an option in their situation.

Sure, but the issue is that SO was used largely for people working in companies with arcane rules. I can’t tell you how many times I’ve gotten one of these annoying “don’t do X, do Y” when I already know this. I have to do X for some reason, I don’t know how to do X because I do Y when given a choice and now no one will answer how to do X because someone killed interest in the question by apparently answering it. I use whatever points I get to downvote these answers.

The thing people don’t get is: when you answer on SO you’re not answering that poster. You’re answering anyone who will ever have this question. It’s quite arrogant to assume it will be an XY for every single person forever more.

The proper way to answer is to answer the question exactly as ask and then insert your “but you probably should be doing Y instead” at the end.

Actually the issue you're complaining about is not a Haskell problem, it's entirely a library problem. It so happens that the standard library has a really poorly defined numeric hierarchy at the moment. If you want to fix it right now, you can avoid importing the prelude and import a different numeric library which has more sensible definitions for everything.

The issue is that for most things you'd want (+) to be defined like: (+) :: a -> a -> a

But actually, to be more flexible it could be defined as: (+) :: a -> b -> a

So then all the normal stuff would supported, as now, but you could also support things like:

    instance BetterNum DateTime where
      (+) :: DateTime -> Duration -> DateTime
And so on.