HNHacker News
TopNewBestAskShowJobs

hurril

523 karma · joined December 11, 2020

# Functional toy language https://github.com/pandemonium/lukas-rs
submissionscomments
hurril··on Functional programming accelerates agentic feature development
It really isn't. Having worked for several decades on "both sides", this really is my experience. The functional side is better typed and has fewer side effects of this kind. It is more normal, as in more common, to have code work correctly as soon as it compiles. This is my lived experience having worked with Java, Scala, F# and Rust since 1999.
hurril··on Patterns for Defensive Programming in Rust
Well it isn't a good call. This is the kind of code that OOP makes people write.
hurril··on Patterns for Defensive Programming in Rust
You have a good point there, that is better. But it is still, well honestly, wrong. Two orders ordered at different times are just not the same order, and using a typeclass approach to say that they most definitely are is going to bite you in the back seat.

PartialEq and Eq for PizzaDetails is good. If there is a business function that computes whether or not someone orders the same thing, then that should start by projecting the details.

hurril··on The key to getting MVC correct is understanding what models are
An architecture that consists of monads.
hurril··on The key to getting MVC correct is understanding what models are
See, I don't think you don't really understand my point. I said this elsewhere: I have been programming Scala and Haskell for more than 15 years, which I am sure you have as well. This is not ment as a proof of my point as that would be arguing form authority. This is not my intention. But there are more things at play here.

What I think you are doing is: well quantum mechanics is just simple mathematical construction and some artithmetic.

Is it really? Is it _just_ that?

hurril··on The key to getting MVC correct is understanding what models are
I am going to interpret your question as one asked in good spirit.

I like this book: https://www.manning.com/books/functional-design-and-architec...

hurril··on The key to getting MVC correct is understanding what models are
I think that a big problem here is the fact that in OOP, everything is an object, i.e.: a class. And if all you have is a hammer, then .... But it is much better to picture the model, controller and the view as emergent. But implementing this in OOP is too challenging because some things in either of those three domains are going to be a process, or a piece of state or a role, etc.

And in implementing some process, what is it? As in: what is its encoding in $language and where does it go?

So you end up with the local stamp collectors in the office and get into an argument of: it is part of the model, so should be in the Model class. "Process, nah, that is totally a controller aspect. It does something." etc.

hurril··on The key to getting MVC correct is understanding what models are
You both have good points. But there is monads the mathematical and programmatic concept, and there is also something a little bit handwavy in how these things are incorporated into an application architecture. The latter is what is being used on the one hand in comparison to MVC, etc, on the other.

I.e.: a monadic architecture in Haskell is good, but one in Java is going to suck. A sort of half-way point is in The Elm Architecture, which is a sort of deconstructed IO monad.

(Writing this as someone with decades of experience in writing monadic architectures.)

hurril··on Why F#?
It runs on .NET, for god's sake. This is not a small platform.
hurril··on Why F#?
F# is a wonderful language, one that I write as my daily for the second time during my carrier. It _baffles_ me how it isn't more popular than it is because it truly is very very good. And I say this as an experienced and avid functional programmer.

We even do the frontend in it using Fable and Elmish, which is to say: we basically write our frontends in Elm, but the platform is .NET.

hurril··on Ask HN: What are you working on? (March 2025)
My own functional programming language. I'd done an imperative before but wanted one that has pattern matching, would let me do currying _and_ uses a bidirectional type-checker. All of this is currently implemented but not for all type constructs. It's name? Marmelade. Because Lady Marmelade and thus files with a lady suffix. m.lady.

https://github.com/pandemonium/marmelade

hurril··on Swedish minister eyes energy crisis steps, blames German nuclear phase-out
You are derailing my question above with a whataboutism here and I am being downvoted for pointing that out.

There are problems with a lot of things in the world, for instance the rentier economy you mention here. But I don't owe anyone a solution to that just because I want to know which privatisations are the cause of the Swedish energy production and price crisis.

hurril··on Swedish minister eyes energy crisis steps, blames German nuclear phase-out
Here, let me help you: things should not have problems. There. Solved it :)
hurril··on Swedish minister eyes energy crisis steps, blames German nuclear phase-out
Which privatisations are the cause of this energy conundrum?
hurril··on Swedish minister eyes energy crisis steps, blames German nuclear phase-out
The problem is that transferring energy like that requires both lines and the ability to receive the energy. Transferring has (large) energy losses, the ability to receive requires a large inertial mass, like the large and heavy turbines of the nuclear power plants.

There are/ were plans for a number of different power links, but some of them have been denied because of environmental concerns (I think! please correct me on that.)

hurril··on Every company should be owned by its employees
Oh, misunderstood. You still need to think about what it is you wish to optimise for. I am not a regulation hater but naive regulations tend to cause rather than mitigate pathological economic incentives. It is very very hard to get these kinds of things right.

Another thing, one related to your original post: it is, of course, good imho to have a working hand-out system so that you don't starve when you are out of a job, or are forced to have to work for really shitty conditions.

This causes another problem, however. It is very easy to get dependant on these hand-outs because the difference in pay between the jobs you are able to do and the size of the hand-out can be very small. Even negative. We have (had) this problem in Sweden for a long time. And it is a problem because when people are less poor, then things cost more money because of it. Cynical, I know. Economics is very very hard.

hurril··on Every company should be owned by its employees
What is gained by preventing the company from accepting more money than your revenue cap? It would be bad for everyone. What are you trying to optimise?
hurril··on 10% of Cubans left Cuba between 2022 and 2023
Much bigger per capita?
hurril··on 10% of Cubans left Cuba between 2022 and 2023
This is not a good explanation without also looking at who is unemployed. In Sweden, the unemployment is low:ish but it is basically non-existent with the natives, but very high among immigrants. So it might be true that crime correlates with unemployment rates, but Sweden does not have a high unemployment.
hurril··on Experts vs. Imitators
What does it mean for a thing to be hard to do in the context of different programming languages?

Hard and easy here are extremely deep and complex subject matters. Is goto hard or easy, for example?

The person is going to give up (or you are,) because you are not going to be able to just have this conversation for any meaningful length of time. This is a (bad) fantasy, and one that books sometimes attempt (that I hate) and some people fantasise this way.

They are not going to Ask The Next Question because if they could do that, it would come from a position of already understanding in a sort of anachronistic way. (In that they already have your answer, yet still want it.)

They lack intuition for all the new concepts, they have a bunch of false friends (to borrow from linguistics, in that they think they understand some of the concepts - but they are different concepts with the same or simliar names).

If you are a good teacher, then I am sure you will be very successful in explaining, but it's just not happening quickly nor with just anyone.

hurril··on Experts vs. Imitators
This hinges on a thorough understanding of safety. It also does not even mention trading things off. Both of which are topics that will require further clarifications. And as it were: and so on.
hurril··on Apple unveils 'Passwords' manager app at WWDC 2024
Guided to want it. Sure. Everyone else, all those other folks with other lives, opinions and preferences, they are brain washed by my enemies. Come on, man :)

I just wanted Passwords to be its own app because the Settings applet(?) is obnoxious to interact with in some scenarios. My passwords are already all in there.

Now, I use a Windows laptop too and would love for Apple to make the Passwords thing work there too. It probably won't :)

hurril··on OpenAI and Apple Announce Partnership
I love Apple products but I doubt this will become good.
hurril··on Daylight Computer – New 60fps e-paper tablet
Why are you even doing anything with the scrolling? Something someone can do in JavaScript in a WebPage is better than the implementation in my touch pad on my Mac?
hurril··on Daylight Computer – New 60fps e-paper tablet
Happily interested in this, I discover that they have broken the scrolling on the homepage about this for reasons. This tells me that since they have never tried their own homepage, they don't really care about usability so their product is probably not going to be very good.
hurril··on What UI density means and how to design for it
Yes. Mobile friendly sites tend to suck because they take us back to WAP and the 90:ies. Even desktop sites suffer from a weird movement recently where all text is unbearably HUGE.
hurril··on LLM-generated code must not be committed without prior written approval by core
Thing is: derivatives are verboten, sometimes. Otherwise we could all just steel and rename all the things.
hurril··on LLM-generated code must not be committed without prior written approval by core
I was trying to explain so that you might understand, that there is a continuum between copying (the identity function) to more complex combinations of other transformations via your memory/ intuition.

I am definitely not trying to conclude that copyright or licensing is bad.

I have read the scheduler implementations in a number of different operating systems. If I were to implement a scheduler in a operating system, would you say that there is a probability that my scheduler will be a derivative to some extent of those that I have read? How is this materially different from training a GPT on those same pieces of code, and then asking it to construct a scheduler?

I would argue that while there are differences, there are also similarities. That means that the dichotomy is not true.

hurril··on LLM-generated code must not be committed without prior written approval by core
So this comes down to probabilities then. What is the probably that the fact that my TotallyNotLinux-kernel matches line-by-line with the actual Linux-kernel? I didn't copy it. Promise! But my function called println which is very very similar to some other, well it might not be a derivative.
hurril··on LLM-generated code must not be committed without prior written approval by core
An exact match is of course a derivative, let's call it the identity derivative. So in:

let new_code = f previous_work

where f could be identity. But it could be other transformations such as: rename_all_the_things, move_items_around, object_oriented_to_functional, and what not. Probably a combination. But here's the kicker: all permutations of these functions are all derivatives.

And we don't have to be naive here, thinking that I'm talking about using refactoring tools on an actual code base because I want to hide the fact that I want to steel some piece of code.

I'm talking about the fact that I've seen so much code and this has in fact taught me basically everything I know. I have trained myself on a stream of works. Just like an AI. The difference is in scale, not in nature.

← PreviousPage 2 of 10Next →