<interactive>:1:0:
No instance for (Num (t -> t))
arising from a use of `*' at <interactive>:1:0-8
Possible fix: add an instance declaration for (Num (t -> t))
In the expression: (+) 1 * 3 2
In the definition of `it': it = (+) 1 * 3 2
<interactive>:1:6:
No instance for (Num (t1 -> t -> t))
arising from the literal `3' at <interactive>:1:6-8
Possible fix: add an instance declaration for (Num (t1 -> t -> t))
In the second argument of `(*)', namely `3 2'
In the expression: (+) 1 * 3 2
In the definition of `it': it = (+) 1 * 3 2
Prelude>
Name:
Anonymous2012-01-08 2:51
Functions have higher precedence than operators.
Your first line means this:
((+) 1 2) * 3
Your second line means this:
((+) 1) * 3 2
which is naturally invalid
yes. I quickly get in the habit of putting parenthesis around every subexpression, and it all ends up looking like lisp anyways.
Name:
Anonymous2012-01-08 6:14
It can make for very light code:
foo . map bar . foldl baz bar . filter foobar . baz
Name:
Anonymous2012-01-08 8:25
>>5
That's not light, it's actually very dense. Haskell programs are awesome because one can compress a non trivial amount of code into deceptively clean code like that.
If linear Lisp has no GC, which is obviously superior, why this innovative feature hasn't caught on?
I suspect there some flaws in this "Linear Lisp" approach which the author doesn't mention.
>>8
Don't bother telling a militant anti-LISPer such things. They'll just continue spouting diatribes about things they have little to no knowledge of.
>>6
I obviously meant syntactically light. How did you not get that?
Name:
Anonymous2012-01-09 6:14
Haskell is annoying
- rich-syntax: rich syntax impedes metaprogramming and complicates parsing by human and machine alike
- static-typing: impedes flexibility and complicates semantics for human and machine alike
- call-by-name: makes it hard to reason about evaluation for human and machine alike
>>13
It's not that rich.
Haskell's type system is flexible enough.
CbV and CbN have both advantages and disadvantages. Neither is a silver bullet. Eta-equivalence and product types are broken under CbV, sum types are broken under CbN. Haskell has strictness annotations.
>>15
No, type system does not mean Java. Go back to /g/.
Name:
Anonymous2012-01-09 8:52
>>14 CbV and CbN have both advantages and disadvantages. Neither is a silver bullet.
CbN has only useless mathematical "advantages", which are harmful in pracitce if you aint into theorem proving. Mathematics isn't know for intuitivity, while CbV is pretty intuitive and corresponds to layman view of the world.
It's not that rich.
Lisp | Haskell
---------------------------|----------------------------------------------------
Prefix notation. | Prelude> let fac 1 = 1; fac n = n * fac n-1
| Prelude> fac 4
| *** Exception: stack overflow
|
| Prelude> let f 1 = 1; f n = ((*)(n)((f) ((-) n 1)))
| Prelude> ((f) 4)
| 24
Name:
Anonymous2012-01-09 8:53
>>16
type system means mathematics, theorems, rules and self-imposed restriction. harmful stuff.
>>17
Some people like having much more readable code and less to type when the only drawback is having to spend 5 minutes learning a couple precedence rules.
Name:
Anonymous2012-01-09 10:01
>>19
Programming has no "Infinity" and there is Lisp, which has beautiful prefix syntax.
The language really doesn't matter.
You cant have macros in Haskell. Neither you can have `eval`, cause Haskell is a useless piece of shit.
>>21
You don't have to know all precedence rules. 99% of the time all you need is basic arithmetic precedence and functions > operators. This alone makes code much more pleasant to read and write.
flip flip snd . (ap .) . flip flip fst . ((.) .) . flip . (((.) . (,)) .)
So you wrote down some random operators and function names that don't make any sense. Your point being?
Probably the only use for it is to convert C/C++ to Lisp. Hope someday all programs will be converted to Lisp, which will run on a real Lisp Machine.
Name:
Anonymous2012-01-09 12:29
>>30
You're still a retard with no possible future as a computer programmer.
Name:
Anonymous2012-01-09 12:33
>>31
Better being a retard, than sucking Java/Rails/PHP cocks.
Name:
Anonymous2012-01-09 13:45
I had a dream about sucking cocks. Though it was a woman's.
Name:
Anonymous2012-01-09 15:06
if you were looking for a powerful and elegant language then you missed python
Name:
Anonymous2012-01-09 21:14
Cant believe Haskell is a serious language, there is so much wrong with it! Maybe Haskell's seriousness manifests in it's own esoteric way, incomprehensible without some kind of borderline personality disorder? In any case, Haskell feels like a very marginal language.
>>36
Nope. It's goes like that: you're studying "Real World Haskell", the chapter about some prepromorphisms, and then something in your head goes "click" and you suddenly realise how ridiculous this static typing is, and your last thoughts abruptly sink into pure laugh caused by a sheer idiocy of Haskell World.