Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wz1000
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
331.
▲
by
wz1000
11y ago
It really depends on how you expect '+' to behave. When seeing '+', I immediately think of a semigroup operation. I would expect it to be associative but not necessarily commutative.
332.
▲
Building an Android game written in Haskell
(github.com)
1 points
by
wz1000
11y ago
|
0 comments
333.
▲
by
wz1000
11y ago
I was pointing out that if you can consider sizeof a function, you can consider return one too.
334.
▲
by
wz1000
11y ago
Was there something factually incorrect in my comment?
335.
▲
by
wz1000
11y ago
> "return()" is in no way a function. Ah, but in Haskell, `return` is a function, though it shares only a few similarities with with its counterpart in C-like languages. However, when using continuations or a continuation passi
336.
▲
by
wz1000
11y ago
Recursion and loops will be equally alien to a beginner. Here[0] is an interesting blogpost by somebody who learnt Haskell as their first programming language. Mutation and regular imperative programming are as alien to her as immutability
337.
▲
by
wz1000
11y ago
Yes, the Pickard bust[0] was an interesting example of this. A highly productive, extremely smart and insightful researcher was given two(!) life sentences(something even most violent criminals, rapists and murderers don't get) at a hi
338.
▲
by
wz1000
11y ago
It is harmless compared to many other substances, including aspirin and acetaminophen. Pretty much everything when taken in excessive quantities is harmful.
339.
▲
by
wz1000
11y ago
If you have a decent income, it is possible to live with a oxycodone addiction. You know that the substance is free of adulterants and is consistently dosed. Pure oxycodone should have limited side effects. However, if you are not in such a
340.
▲
by
wz1000
11y ago
> People ruin their lives pretty well currently with highly addictive drugs, and I don't see how increasing supply would stop that from happening. I don't see how prohibition and the War on Drugs prevented them from happening t
341.
▲
by
wz1000
11y ago
> I love Haskell and spend a lot of time learning it, but I've gotten by just fine without his resources. An author/creators personal qualities does not detract from their work. For example, Orson Scott Card, the author of Ende
342.
▲
by
wz1000
11y ago
This article doesn't really do justice to Haskell's type system, but the main benefit I achieve is that with a properly defined type, it is often impossible to put the internal state of the program in a inconsistent state, elimina
343.
▲
by
wz1000
11y ago
Same with Firefox 37.0.2 on Arch Linux
344.
▲
by
wz1000
11y ago
The front of the list can be garbage collected, so the Haskell version can be O(1) in memory.
345.
▲
by
wz1000
11y ago
Here's an explanation of how IO works in Haskell: http://blog.jle.im/entry/first-class-statements If you go through it and understand it, you will find that it is completely "pure".
346.
▲
by
wz1000
11y ago
Here's a memoized Fibonacci in Haskell fibs = 0 : 1 : zipWith (+) fibs (tail fibs) This is essentially equivalent to long memotable[]; // filled with -1, with first elements 0 and 1 long fib(int n) { i
347.
▲
by
wz1000
11y ago
I wouldn't call them statements because they aren't executed. Instead, I would classify them as "declarations". You state what something is , instead of telling the computer what to do . Traditional assignment is an ex
348.
▲
by
wz1000
11y ago
In the same vein, http://blog.jle.im/entry/first-class-statements
349.
▲
by
wz1000
11y ago
Question: If you had to redesign Unix from scratch(ignoring hardware limitations), how would you do it? Personally, I feel an ELisp like approach would be much better as a way for interacting with computers.
350.
▲
by
wz1000
11y ago
Here is a comment I wrote about the same issue some time ago: https://news.ycombinator.com/item?id=9085403 Haskell IO is severely misunderstood.
351.
▲
by
wz1000
11y ago
It is an absence of side effects because side effects are defined as effects that cannot be accounted for. As soon as you have a mechanism to document those effects, they are not "side effects" any more. hello :: IO () hello = put
352.
▲
by
wz1000
11y ago
The average speaker would find Mandarin easier to read than any other language. That does not say anything about the effectiveness of Mandarin over other languages.
353.
▲
by
wz1000
11y ago
> Be better prepared, as a founder, to understand engineers. Be careful, you may start to suffer from the Dunning-Kruger effect[0]. You would only begin to understand what engineers are doing after a substantial experience with programmi
354.
▲
by
wz1000
11y ago
Xmonad does the same thing.
355.
▲
by
wz1000
12y ago
Ahem, http://en.wikipedia.org/wiki/Dependent_type
356.
▲
by
wz1000
12y ago
Yi[0] is an editor written in Haskell. [0]: https://github.com/yi-editor/yi
357.
▲
by
wz1000
12y ago
I use Arch because its the only distro that "Just Works" for me. I like to use the latest version of every software I use, and this is almost impossible on non-rolling-release distros. Installing from source almost always ends up
358.
▲
by
wz1000
12y ago
It can, I was just trying to be clever :P For one, I don't need to drag monads into function composition: fizzbuzz i triggers = map (\x -> fromMaybe (show x) $ mconcat $ triggers
359.
▲
by
wz1000
12y ago
Here's a version in Haskell that has the same functionality: fizzbuzz i triggers = map (\x -> fromMaybe (show x) $ liftM mconcat (sequence triggers) x)
360.
▲
by
wz1000
12y ago
> If you have an array that fills a significant fraction of your memory (say, tens of Gigabytes), you don't have another choice but to use mutation (Haskell doesn't support that). Haskell does support mutation, it just requires
More ›