Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
76 ms
·
781.
▲
by
Peaker
14y ago
If your project sports auto-generated code, or any sort of build targets that depend on inputs only known after generation -- Make simply cannot handle this. There are ugly workarounds but they don't work well. Make is: * Slow (e.g: when co
782.
▲
by
Peaker
14y ago
What's the difference between Juche and self-reliance?
783.
▲
by
Peaker
14y ago
The Pirate Party wrote a good rebuttal of this: http://www2.piratpartiet.se/an_alternative_to_pharmaceutical...
784.
▲
by
Peaker
14y ago
Checking nil after assigning variables is not helpful for the reason you mentioned earlier: If you check for it and it is nil where it shouldn't be -- you're merely converting one runtime error (null exception) to another (different excepti
785.
▲
by
Peaker
14y ago
Ok, you checked your pointer to see it isn't null. Then you passed it to function foo. Which passes it to function bar. Do foo and bar have to check it again? That maintains dead code that will never fire, is untestable, and costs runtime.
786.
▲
by
Peaker
14y ago
http://www.computerworld.com.au/article/261958/a-z_programmi... Anders estimates 50% of the bugs in C# and Java are due to null dereferences. Your example illustrates the unsafety of undefined , not the unsafety of nulls/Nothing. And you
787.
▲
by
Peaker
14y ago
There was a quote from .NET authors about roughly 50% of the field issues with .NET code being Null Pointer exceptions.
788.
▲
by
Peaker
14y ago
Well, how can it infer the dependency on particular versions? Or on particular implementations of some interface you're using?
789.
▲
by
Peaker
14y ago
He wasn't trying to explain how to use monads. There are good tutorials that do that. He was trying to explain what they are . And that definitely involves their operations and the laws that apply.
790.
▲
by
Peaker
14y ago
Your class is not representing the "Monad" abstraction, but the "Identity" value wrapper that happens to have a Monad instance.
791.
▲
by
Peaker
14y ago
It is similar to a Monad, but not quite, because the "bind" (addCallback) mutates it inplace, and does not return a chained operation. Also because if your callback's return value is itself again a Deferred, it will flatten it out. That m
792.
▲
by
Peaker
14y ago
It does not cover any of the interesting traits of Monads. I could try to explain Monads in this comment, but others have already done it well. Any explanation of Monads must at least cover the actual Monadic operations and the laws that re
793.
▲
by
Peaker
14y ago
> A Monad is an object whose methods return monads. This is exceptionally wrong.
794.
▲
by
Peaker
14y ago
When did you last use `cabal`? Cabal works much better now, and most of the problems were due to over-conservative version ranges combined with an over-eager reinstallation policy that overwrote packages in a breaking way. That was fixed ab
795.
▲
by
Peaker
14y ago
Don't know anything better than stylish-haskell, but AFAIK it fits the bullet point completely.
796.
▲
by
Peaker
14y ago
> Compiler speed is not some minor difference, it is absolutely massive. Build times of 30 seconds vs 2 seconds, and that is without counting the 10 seconds of cabal resolving dependencies I simply did not play with Go to know the compi
797.
▲
by
Peaker
14y ago
Hoogle type search is great: Give a type, get back names implementing that type or a generalization of it. There's the haddock auto-generated documentation from cabal (if you enable it). Not sure if that qualifies for "available from the co
798.
▲
by
Peaker
14y ago
Except for his bullet about compiler speed, which might be faster than GHC, all of his bullets apply to GHC Haskell too.
799.
▲
by
Peaker
14y ago
The lack of named args is seen as a disadvantage. Varargs are modeled with Maybe params and such. The main benefit is syntactic ease of partial application.
800.
▲
by
Peaker
14y ago
Humans are not evolving (in the Darwinian sense). The closest thing is selection based on which parts of the population have the most children. We are devolving in many ways: diseases that kill us or make us infertile are being treated so a
801.
▲
by
Peaker
14y ago
Gates was a good business man. I've not heard many call him a good hacker before. I'd like to hear more...
802.
▲
by
Peaker
14y ago
So more a matter of the atmosphere around the language than the language itself. Intrinsically, Python and CL seem just as fit for functional programming (with semi-legitimate reliance on TCO being a slight benefit for CL's side).
803.
▲
by
Peaker
14y ago
I explained how you do know the return type, it is of some known, universally quantified type variable. A type variable is a compile-time known type.
804.
▲
by
Peaker
14y ago
I think sometimes the creative solutions end up being better than the simple "obvious" solutions that were apparent before the limitations were put in place.
805.
▲
by
Peaker
14y ago
Typically limitations aid creativity, not hamper it.
806.
▲
by
Peaker
14y ago
These two types in Haskell are very similar: show :: Show a => a -> String read :: Read a => String -> a And there's also a law that connects their behavior: read . show = id show . read = id There's no
807.
▲
by
Peaker
14y ago
Lexical binding, higher-order functions, etc are very common in Python, for example. Except for TCO which is not widely supported in Python, and problematic if support is not guaranteed, Python seems to be just as functional as CL. Nobody c
808.
▲
by
Peaker
14y ago
the type is statically checked, not dynamically checked. Unlike something that just returns an unknown existential "object" type.
809.
▲
by
Peaker
14y ago
I can mostly agree, Haskell's additions aren't even in the same ballpark. I also prefer Python overall to Ruby. But Ruby has a huge advantage of anonymous code block parameters. That facilitates dsls and I believe it's important enough to n
810.
▲
by
Peaker
14y ago
Read in Haskell returns a well defined type, it just happens to be polymorphic.
More ›