Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
54 ms
·
571.
▲
by
Peaker
13y ago
It is true, however, that knowing about parallelism without (visible) concurrency is useful for writing less buggy software.
572.
▲
by
Peaker
13y ago
There are examples of both kinds of systems, afaik it swings one way far more strongly than the other.
573.
▲
by
Peaker
13y ago
I don't think everyone agrees, but I think usually, a closure refers to the implementation of that concept, and not the concept itself. The implementation being a pair of the static code alongside the captured environment. Also, I thi
574.
▲
by
Peaker
13y ago
I didn't measure, no. I suppose maybe it uses the optimized compiled packages code, and the main code doesn't really do anything, so -O2 doesn't matter. However, I would still expect "-threaded" to have an effect.
575.
▲
by
Peaker
13y ago
Don't use "runhaskell", it's more of a "script mode". Use: ghc -threaded -O2 main.hs && ./main
576.
▲
by
Peaker
13y ago
Since Warp seems to use many light-weight(green) threads behind the scenes, and Mio is mainly about improving multithreaded performance on actual multi-core set ups, the answer seems to be yes. However, it would probably only help if you us
577.
▲
by
Peaker
13y ago
It may fall upon the FBI, but weren't the leaks all about the fact that the NSA does in fact implement domestic surveillance? Also, if the NSA surveillance stopped many terrorists - they could expose it. Whether this trade-off of priva
578.
▲
by
Peaker
13y ago
Strict fields in records are probably a better default than lazy fields. So you indeed see lots of strictness annotations in data structures. It also helps with unpacking/unboxing. However, strictness annotations in functions is a rela
579.
▲
by
Peaker
13y ago
To do it the way he described (buffer of zeros + fill): import qualified Data.Vector.Unboxed.Mutable as V encode len fields = do buffer <- V.replicate len 0 forM_ fields $ \(fieldPos, fieldData) -> V.copy (V.slice
580.
▲
by
Peaker
13y ago
Inside the boxes, you might use a (State SymbolTable) monad to carry around the symbol table: type SymbolTable = Map String Symbol Me and a codeveloper are working on a type system in Haskell, where our current code has iterative com
581.
▲
by
Peaker
13y ago
Pure functions model state nicely. compile :: Source -> Core optimizer :: Core -> Core nativeCode :: Core -> Assembly
582.
▲
by
Peaker
13y ago
Your last point is the other way around: Haskell has excellent static reasoning/debugging facilities therefore there is little pressure to make good debugging tools. I believe purity should make debugging easier, not harder. Laziness s
583.
▲
by
Peaker
13y ago
You're overstating it. Debugging Haskell code is definitely harder than in other languages. But it's far from impossible (I use Debug.Trace successfully), and you do it far less often. So debugging takes 5 times more effort but ne
584.
▲
by
Peaker
13y ago
First example is nullability. Anders says ~50% of production issues with c# involve null deference errors. Haskell tags in compile time which types may or may not be null. In c# if your method is supposed to return one thing and set an obje
585.
▲
by
Peaker
13y ago
Ironically, Haskell is gaining traction while your comment is fading away :-)
586.
▲
by
Peaker
13y ago
Another one: fibs = map fst (iterate (\(cur,next)->(next,cur+next)) (0,1))
587.
▲
by
Peaker
13y ago
> However, new libraries are sometimes added to the standard library, which means the reasons you listed can be overcome by even better reasons for inclusion. Or overcome by bad judgement.
588.
▲
by
Peaker
13y ago
They didn't mean "is Democracy overrated" in a hypothetical way. There are no "all-knowing Philosophers" to be made kings, and even if there were, there would be no reliable mechanism to find them. And if there was,
589.
▲
by
Peaker
13y ago
It doesn't really matter that much that the NSA spies on the whole world. I care a lot less that other governments watch me than my own government. Other governments can watch all day, but they don't yield serious power over me.
590.
▲
by
Peaker
13y ago
Open source unfortunately gives no such guarantee [1]. [1]. https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thomp... (Reflections on trusting trust)
591.
▲
by
Peaker
13y ago
And use so-called "intrusive" data structures and APIs to avoid more allocations.
592.
▲
by
Peaker
13y ago
I tried going back to Debian as well. I'm having serious slowness issues in my windowing environment (hardware acceleration is enabled). e.g: Opening large windows takes almost a full second. Ubuntu was snappier on the same machine,
593.
▲
by
Peaker
13y ago
I've tried Xubuntu but XFce doesn't seem to work that well with Hebrew keyboard layouts, at least without more tinkering than I was willing to put into it. Dislike Kubuntu/KDE (I've used Ubuntu/gnome2 for long enoug
594.
▲
by
Peaker
13y ago
Unity is pretty terrible, and a huge step backwards. Mint reverts the huge step backwards.
595.
▲
by
Peaker
13y ago
Again, please mention a specific quote and time... Or do you expect me to invest 50 minutes finding that quote in there?
596.
▲
by
Peaker
13y ago
A list is not a "generalization" of a pair. If anything that used something else was a "generalization" of that other thing, things would get confusing. Why is it more reasonable to split the code? You get the safety fro
597.
▲
by
Peaker
13y ago
The IO monad (a particular instance ) is an abstract data type (not an Algebraic data type, by the way). Other monads (e.g: the State monad from Control.Monad.Trans.State) are not abstract data types (or algebraic for that matter). Speci
598.
▲
by
Peaker
13y ago
[] is a list, yes (not a pair). I explicitly mentioned it as an example of a monad which is an algebraic data type. Then I also mentioned (->) which isn't. Why does the fact that pure code can be executed in all those ways relate
599.
▲
by
Peaker
13y ago
Where did the authors of haskell-98-tutorial say that monads are in general ADTs? Do you mean algebraic data types or abstract data types? Monads aren't necessarily either one. Particular instances of Monad (e.g: IO) are abstract data
600.
▲
by
Peaker
13y ago
> Monad is a simple ADT. A data structure with constructors and selectors Are you talking about the Free monad? Or the reification of the monadic operations as a dictionary? If so, that's a weird way to describe monads, and not very
More ›