Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leshow
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
64 ms
·
691.
▲
by
leshow
9y ago
If you want to be purely structural, why even use an interface? You can just as easily write: type MyType = { a: number, b: string };
692.
▲
by
leshow
9y ago
Look at the return type of the function and you can tell what instance it's using, if it's using something that's a type variable, then it's instance isn't important, just it's interface.
693.
▲
by
leshow
9y ago
> Note that the semantics change between versions. Because each one describes a different type's implementation of the monad interface. The blog post is just trying to illustrate: "all these problems have the same interface. If
694.
▲
by
leshow
9y ago
You could use the getData function just fine from anywhere. It's just that you wouldn't be able to use both the list monad instance and the maybe monad instance at the same time without a library like mtl.
695.
▲
by
leshow
9y ago
> What if I just want to call an existing getData function that returns a Maybe, not some generic monad thing? Maybe is a Monad. In Haskell, Monad is sort of like an interface (called typeclass) that a bunch of types implement. Maybe has
696.
▲
by
leshow
9y ago
I love this blog, monoid morphisms was very eye-opening for me.
697.
▲
by
leshow
9y ago
Theoretically, but when you throw in things like build systems often not being deterministic, minor versions of dependencies changing, different OS or slightly different OS version with different libraries; there's a multitude of place
698.
▲
by
leshow
9y ago
Why? It has nothing to do with where you host your files. You just seem to be making a knee-jerk partisan reaction.
699.
▲
by
leshow
9y ago
You don't trust one person on their board of directors more than all the confirmed things that the other poster mentioned about MS? That doesn't seem like a very well calculated choice.
700.
▲
by
leshow
9y ago
You're missing the point.
701.
▲
by
leshow
9y ago
What fields of math do you think it doesn't apply to?
702.
▲
by
leshow
9y ago
Not the other poster, but CT is the language of composition and abstraction, it's the high level language of math. I think people are just butt-hurt that he used the word 'ultimate'.
703.
▲
by
leshow
9y ago
How does Go not have package versioning? What do you guys use to get the appropriate version of a dep?
704.
▲
by
leshow
9y ago
We have different definitions of 'magic'. `Html.program` is magic, `comparable` is magic. Elm has been steadily removing features and adding magic since they lost `Signals`
705.
▲
by
leshow
9y ago
Id argue that while Scala has more powerful features, it has less "magic". Elm can't be used on the server because it has a magical create app function that you must feed the exact right functions into in order to make anythi
706.
▲
by
leshow
9y ago
What is a static or strong type system is sort of up for debate, the terms are not well defined. Not OP, but IMO type annotations are static but not strong. I'd consider a strong type system one that enables you to encode additional in
707.
▲
by
leshow
9y ago
Woah. I love Rust and program in it super often, but I've looked at Swift also and it seems like an incredibly capable language. It has similar capabilities for algrebraic types, and a "typeclass" like approach to parametric
708.
▲
by
leshow
9y ago
You really ought to disclose that you also hired the language's BDFL when you make comments like these. With that said, I sort of agree with the sibling comment here. Most other people involved with a language that I've seen are s
709.
▲
by
leshow
9y ago
> Work is for working; it's not a debating society, and especially not when the debating is done in bad faith. If this were true the far left wouldn't be able to discuss social issues at work either, but they are.
710.
▲
by
leshow
9y ago
I think the problem here is they are defining controversial as 'anything I don't agree with'.
711.
▲
by
leshow
9y ago
scoff how dare you use a mouse. In urxvt I have it mapped to ctrl+u
712.
▲
by
leshow
9y ago
I find graphs and trees are common 'exercises' that people do when they try out a new language, but you usually won't be implementing stuff like this day to day. You'd be using a well tested library, not cooking one up y
713.
▲
by
leshow
9y ago
There is a huge difference, you're also discounting GC. Haskell's GC for example is tuned to the aspects of the language, meaning it's pretty efficient at allocating and cleaning up lots of memory; it has to be, everything is
714.
▲
by
leshow
9y ago
no matter what term you invest on it's a gamble.
715.
▲
by
leshow
9y ago
Isn't go's greenthread offering part of it's runtime? If you use a go channel or thread, is that not calling some go std lib abstraction? What you're talking about seems like a pretty non-idiomatic use of go.
716.
▲
by
leshow
9y ago
You can't explain how your bitcoin debit is usable without paying a high fee or waiting a long time, so I don't know how bitcoin works? I hardly think that's fair. Your responses are practically non-sequiturs. Lightning netwo
717.
▲
by
leshow
9y ago
Sorry but non of this sounds very convenient or useable. It seems like you just really like btc so you're making concessions on usability.
718.
▲
by
leshow
9y ago
It's the function type, data (->) a b. It is commonly written in infix notation though.
719.
▲
by
leshow
9y ago
There are a bunch build into the language, I think a lot of libraries take their queue from there. Still, after you get over the initial hurdle of like <$> == fmap. It's not so bad.
720.
▲
by
leshow
9y ago
When I first start I though there was so MUCH syntax, (->), (<*>), (<$>), (>>=), (.), ($), etc I realized pretty early on all these were just functions, that was cool experience for me. Even the types are sort of functi
More ›