Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
louthy
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
91.
▲
by
louthy
10mo ago
I think you mean Left. And Left in Fin is Error, which has two subtypes: Expected and Exceptional, along with bespoke matching primitives for exceptional and non-exceptional errors (for the reasons I outlined) I understood what they meant,
92.
▲
by
louthy
10mo ago
If you ask yourself what the meaning of the word 'exception' is and then consider how many failures are exceptional , then one quickly realises that exceptions are the worst thing you could use to represent expected failure con
93.
▲
by
louthy
10mo ago
On your definition of FP you're right. But pure functional programming has the following over regular imperative coding: * Fewer bugs: Pure functions, which have no side effects and depend only on their input parameters, are easier
94.
▲
by
louthy
10mo ago
Aww, thanks Mike! And thank you for the contributions and suggestions too :) > At this point basically everyone has been exposed to the concept of `Option/Result/Either/etc. and discussions typically end up revolving arou
95.
▲
by
louthy
10mo ago
Fair enough :) By the way, I happen to agree on the general point, in my blog teaching Monads in C# [1], I wrote this: "I often see other language ecosystems trying to bring monads into their domain. But, without first-class support f
96.
▲
by
louthy
10mo ago
In C# you can implement SelectMany for a type and that gives this: from id in ParseId(inputId) from user in FindUser(id) from posts in FindPostsByUserId(id) from res in DeactivateDecision(user, posts) select res;
97.
▲
by
louthy
10mo ago
Yes, that's the limitation until the value-type DUs arrive in C# 15. In previous versions of language-ext, I defined Either as a struct with bespoke Match methods to pattern-match. But once pattern-matching appeared in C# proper, it di
98.
▲
by
louthy
10mo ago
I think you're describing part of the bind function, which is part of the definition of the monad interface: a -> m b But the full definition is: bind :: (a -> m b) -> m a -> m b In C#, it would look like th
99.
▲
by
louthy
10mo ago
Not discriminated unions, but they're coming (I think next version of C#). Although for now you can simulate them quite easily: public abstract record Either<L, R>; public sealed record Left<L, R>(L Value) : Eithe
100.
▲
by
louthy
10mo ago
This is all very basic, instead you can use C#'s new static interface methods feature to create higher-kinded traits where you can properly generalise over a monad trait (or applicatives, functors, foldables, etc.), which is what I do
101.
▲
by
louthy
10mo ago
> Personally I believe you’ve been operating on autopilot, and not designing your life to suit your own needs. You have no idea about me at all, so please don't insult me by thinking that you do.
102.
▲
by
louthy
10mo ago
> Is it? So you can what? Buy exotic vehicles? Buy extra houses? Buy surgeries? Buy expensive experiences? Regain your own time. As a former CTO who has recently exited, recovering my own time again is more valuable to me than the money
103.
▲
by
louthy
10mo ago
I've just bought a house in Alderwasley in Derbyshire, the nearest town is Wirksworth [1]. I assumed that, because this area was the heart of the industrial revolution [2], the town was an eponymously named workers town built for mill
104.
▲
by
louthy
10mo ago
> The title is written specifically for UK readers Is it? The `.au` TLD might suggest otherwise.
105.
▲
by
louthy
10mo ago
I also found that after my first 3 day fast I was able to deal with hunger much better. I used to get irritable when hungry and now I realise I can just tolerate it without any real downside — even years after my last fast. It’s like my bra
106.
▲
by
louthy
10mo ago
I’m not claustrophobic, but looking at those pods makes me anxious. You’re one air con fuckup from asphyxiating on your own CO2 by the looks of it.
107.
▲
by
louthy
10mo ago
I'm all for terseness in blog writing, but I think the author forgot to add the content. I know nothing more than I did when I opened it.
108.
▲
by
louthy
10mo ago
Yet you link to a YouTube video of questionable provenance. Not one book reference. Forgive me for just filing this in the ‘conspiracy theory nonsense’ folder.
109.
▲
by
louthy
10mo ago
You said: “There's considerable evidence and reason to believe Washington invaded Afghanistan in 2001 to supercharge opium production”, yet you provide nothing to back up your claim. It is not trolling to point that out. Your link to s
110.
▲
by
louthy
10mo ago
> There's considerable evidence Yet you provide none.
111.
▲
by
louthy
10mo ago
People with mental health issues need help and support. Just because there’s a pithy saying, doesn’t make it universally beneficial to have suffered hardship. Not sure what else you’re expecting? I’m not advocating imposed hardship, just tr
112.
▲
by
louthy
10mo ago
As someone who has had some serious hardship and is certainly more resilient because of it, I can also confirm the mental scarring that comes as ‘part of the package’. I think to an extent the mental impact of it is a necessary evil. The fu
113.
▲
by
louthy
10mo ago
It isn't about a particular time in history, it's about the individual. An individual who suffers hardships often has to endure to overcome said hardships. That makes the individual more resilient and more able to deal with futur
114.
▲
by
louthy
10mo ago
> cancelling Amazon Prime at first, but realized I didn't -really- need some JIXFOZ branded gadgets next day, after all. The problem with cancelling Prime is the unrelenting haranguing to re-sign up and the clearly punitive delivery
115.
▲
by
louthy
10mo ago
> If your protection is to "understand the implementation" it means buggy code. Hilarious. Understanding the code is literally the most important thing. If you don't understand the code then you can't understand any u
116.
▲
by
louthy
10mo ago
> Either you're a true 100x coder who can get a full understanding of every single project and every effect it will have through the full end to end stack. It's hard to state how good I am without sounding like an arsehole, so
117.
▲
by
louthy
10mo ago
> It sounds like you've never worked a job where you aren't just supporting 1 product that you built yourslef In my 40 years of writing code, I’ve worked on many different code bases and in many different organisations. And I
118.
▲
by
louthy
10mo ago
> Learning an unfamiliar aspect and doing it be hand will have the same issues. If you're new to Terraform, you are new to Terraform Which is why you spend time upfront becoming familiar with whatever it is you need to implement. Ot
119.
▲
by
louthy
10mo ago
> But not having to spend hours here and there getting up to speed on some mundane but unfamiliar aspect of the implementation Red flag. In other words you don’t understand the implementation well enough to know if the AI has done a good
120.
▲
by
louthy
10mo ago
That’s still a poorly designed system. For UI there should be a ‘view model’ that augments your model, that view model should be able to represent every state your UI can be in, which includes any ‘intermediate’ states. If you don’t do this
More ›