Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

Rich Hickey is mad!

Name: Anonymous 2013-06-20 20:39

Name: Anonymous 2013-06-20 20:51

Rich Kike

Name: Anonymous 2013-06-20 20:54

I always feel a bit dirty using Clojure, but everything else is dirtier.

Name: Anonymous 2013-06-20 21:00

And all these clojure.lang.* are implemented in Java, while SBCL for example implements everything using Lisp.

Clojure cant be self hosting.

Name: Anonymous 2013-06-21 0:26

Clojure is just Java without syntax and with a half-assed typing.

Name: Anonymous 2013-06-21 1:25

>>5
People's problem with java nowadays is the syntax
the virtual machine is pretty much top NOTCH

Name: Anonymous 2013-06-21 1:27

>>6
Fuckin' LOL'd. A VM that cannot into generics, TCO, first class functions etc is "top notch"?

Name: Anonymous 2013-06-21 1:37

>>7
Yes, it's second notch. I'd still use it because I can work around that.

Name: Anonymous 2013-06-21 11:48

>>5
Java's syntax is so unhelpful, that JVM is much better without it.

Name: Anonymous 2013-06-21 12:11

>>7
So what are your alternatives?

HASKAL? I don't believe you have Haskell job, enjoy your basement.

.Net? You have the choice of being either bound to Windows or being [i][o][u]SLOW AS FUCK[/i][/o][/i].

Common Lisp/Racket/Scheme? See: HASKAL.

FIOC/Ruby/PHP? That's a category mistake.

Face it: Clojure and Scala are your most realistic options at getting to use a decent language in industry today.

Name: Anonymous 2013-06-21 12:14

>>10
There are both Scheme and Common Lisp for JVM. No need for Clojure.

Name: Anonymous 2013-06-21 12:20

>>11
I know.

Name: Anonymous 2013-06-21 12:30

>>10
Shit, even pure C, C#, Ada are all better than that lisp shit or le Implicit-fucking-everything-ala.
And there are going to be jobs in Haskell soon. It's becoming more and more powerful day to day.

Name: Anonymous 2013-06-21 12:35

>>13

Haskell is very hard, but even after 3 years of pretty intensive use, I never really felt productive with haskell in the same way that I've felt in other languages. Anything I did in haskell required a lot of thinking up-front and tinkering in the REPL to make sure the types all agreed and it was rather time-consuming to assemble a selection of data types and functions that mapped adequately onto the problem I was trying to solve. More often than not, the result was something of an unsightly jumble that would take a long time to convert into nicer-looking code or to make an API less terrible to use.

Name: Anonymous 2013-06-21 12:38

>>13
If the language requires regular look at the table of priorities and deal with parsing in mind - this is not normal.

When the code is normally written (with redundant parentheses) all at once priorities are clear from the expression, at first sight, maximum readability. If there is no excessive braces - if you please remember priority parse the mind or (worst of all) even stretch to the guide. Why waste time on this, if you can put parentheses or spend? Unfortunately, the syntax of languages ​​with pereuslozhnennym stimulate just writing the code, which makes spending time instead of saving it.
Yeah, not so rare that it is more convenient not to put extra brackets. But it is not always. And instead, if the braces are put _mozhno_ them and do not ever give. On this side, I stick to simple logic - if some "feature" allows you to write better code more (sometimes omit brackets), but at the same time - it allows you to write very bad code (omit the large number of unnecessary parentheses), then this "Del.icio.us StumbleUpon Reddit" it is better to prohibit . Since this ensures us of the lack of very bad code. The usual minimax criterion.

What do you mean "us"? The standard library and many more functions are defined as infix operators, they just all "their". I say again, yes, the same $ is often very convenient, but when with a ram's obstinacy generally try to remove all brackets, which can only remove (a standard combinators, in principle, sufficient to remove ALL ALL), then the code is obtained fucked up. And if you wrote an apologist for point-free, it is not just a fucking one-liners pearl compared to this - a sample of readability.
There also is the way and the partial application - yes, it is often convenient (yes what dick - it is often convenient!), But when they begin to apply part of the standard features are not liby - it's fucked up again, I want to take and uebat. And then tear off his arms and shove primenyalschiku ass. Because in these cases, we have regularly watch this f-arguments and simply to understand what is what is used (after all brackets, recall, do not write the same fucking fuck it w SYNTACTIC TRASH, and on them even imagine something could be !).
As a result, good things are like a grenade in the hands of a monkey. And deny it - well, how to prevent direct memory operation.

Name: [Goldenbergerbaum] 2013-06-21 12:40

Name: Anonymous 2013-06-21 12:42

>>14
Scrub my toilet.

Name: Anonymous 2013-06-21 12:44

>>13
Meh, you just dislike dynamic typing. I can see why, I'd rather static typing anyway myself (but lol@putting C, Ada and C# in the same category).

And lookie, I'm rooting for Haskell. As soon as there are more Haskell jobs, I'll be all over them, really! But right now? There ain't. Enjoy your ASP.Net.

Or defense industry job, if you have the joy of using the most overlooked language in programming history; I bet the benefits are great.

But right now? It's hipster JVM languages or bust.

Name: Anonymous 2013-06-21 12:48

Haskell is the name handed down in the family. The name is an Americanized version of Chatskel, which derives from the Hebrew name, Ezekiel. For Eastern European Jews it would be Haskelovski, like most other Jewish surnames ending in "-ki" or "-ky" (i.e. Kozlovsky).

Name: Anonymous 2013-06-21 12:48

>>18
And everybody else went and chased static. And they've been doing it like crazy. And they've, in my opinion, reached the theoretical bounds of what they can deliver, and it has FAILED. These static type systems, they're WRONG. Wrong in the sense that when you try to do something, and they say: No, category theory doesn't allow that, because it's not elegant... Hey man: who's wrong? The person who's trying to write the program, or the type system?

Name: Anonymous 2013-06-21 12:50

>>20
Probably the scrub who can't get his shit to type check.

Name: Anonymous 2013-06-21 12:50

>>18
Haskell is annoying
- rich-syntax: impedes metaprogramming and complicates parsing for human and machine alike
- static-typing: impedes flexibility and complicates semantics for human and machine alike
- call-by-name: impedes reasoning about evaluation for human and machine alike
- auto currying: impedes handling of missing and superfluous arguments for human and machine alike

Name: Anonymous 2013-06-21 12:52

>>21
I mean when you are academic, it is like your papers are write only: you write your papers and there are very few people that read them - impact is very little; I felt like a vegetarian butcher, teaching software engineering, I've no clue what I was teaching about, because I never wrote a practical program, I never experienced how people really build software, so it really was theory and I didn't felt I was really teaching my students anything useful, that is how I came to work on Haskell. -- Erik Meijer, a major contributor to the functional programming language Haskell (http://www.youtube.com/watch?v=z0N1aZ6SnBk)

Name: Anonymous 2013-06-21 13:15

>>18
Dynamic typing is a pain for the programmer, the code maintainer, the compiler and the runtime. Don't know who in his sound mind would prefer writing anything over 500 LOC in dynamic trash.

Name: Anonymous 2013-06-21 13:17

>>22
impedes
impedo my anus

Name: Anonymous 2013-06-21 13:35

>>24
http://www.reddit.com/r/haskell/comments/da7w7/grempa_embedded_grammar_dsl_and_lalr_parser/c0yprcg
>Dynamic typing is only used internally, for example because the semantic action functions are put in an array indexing rule and production numbers (Ints) to functions, and they all have different types (and so can not be put in an ordinary array expecting the same type for each element). I know there are ways to do it using references into a typed environment, but from my experiments with it I felt it was too much work with little gain.


Next, translate the bit that says (pseudocode):

  if(attempt_file_open)
    if(attempt_file_read)
      process

That's it. No fancy, complex error messages. Just check the error
returns and only proceed if I have something to proceed with. Like
grown-ups do. I *will* check my error returns. I have tormented too
many newbies to *ever* consider doing anything else. If I cannot check
my error returns I will not write the program. This is production
programming 101, and I suspect that there's a real issue with
priorities between the traditional Haskell community and production
programmers.

So the time of madness began. I could find examples which did:

  if(attempt_file_open)
    attempt_file_read
    process

Which is useless. Other examples did:

  attempt_file_open
  if(attempt_file_read)
    process

Which is also useless. So I'm looking through the wxHaskell examples.
They're all contrived, using very high level functions to (for
example) read a complete image structure from a named file, which as
one function had one possible source of errors. I go back to scanning
and Googling like crazy. Eventually I notice a bit in "Yet Another
Haskell Tutorial" - page 65 - which introduces "bracket", immediately
explains that it is useless for my (very common) need, and refers the
reader to Section 10 - "Advanced Techniques". The author of this
excellent document hasn't yet written Section 10. I wonder why. I
pause to examine bracket some more. I really can't tell if the
"always" clause gets called if the initialization fails. From the use
with file opening it looks like it isn't (or the handle to be closed
would be invalid) but that wouldn't help if the initializer had two
steps, e.g. called socket(2) and bind(2). This is the kind of thing
good production programmers get really het up about.

I'm still grovelling through reams of stuff, trying to find out how to
open **and** read a file in a grown up way, and I find various programs
on haskell.org. There's an implementation of cat(1)! That's the thing!
A file concatenator must be able to open *and* read it's file. Eagerly
I download it. Curiously there doesn't seem to be any error handling.
I compile it and point it at a non-existent file. The program crashes.
Horribly. So much for Cat.hs. I feel glad I hadn't been able to cope
with the video of Simon Peyton-Jones OSCON talk, because the camera
operator kept filming his face while he's gesturing at the specific
line of code he's talking about with a pointer! After seeing Cat.hs do
essence of FAIL just opening a file, claims that Haskell could serve
as a scripting language suitable for the crew of the Black Pearl in
yonder corner to use would pain me.

Name: Anonymous 2013-06-21 14:11

>>26
So you want me to teach you how to do nested ifs in Haskell, or what?

Name: Anonymous 2013-06-21 14:13

>>22
But metaprogramming is overrated if you have a good syntax.

Name: Anonymous 2013-06-21 15:44

>>28
Ruby has both good syntax and meta programming.
Ruby made Lithp and Haxell obsolete.

Name: Anonymous 2013-06-21 16:06

>>27
Forget it. Nested ifs in Haskell are PhD-level topic.

Years ago, I wanted to write something in Haskell that worked like Clojure's memoize (which is implemented in a half-dozen or so lines of code in Clojure's core), and asked about it on the Haskell mailing list.  I was pointed to a PhD dissertation on the topic of how to write memoize in Haskell.  All I could think was, "Do I really want to be using a language where memoize is a PhD-level topic?"

Name: Anonymous 2013-06-21 16:09

>>26
IO operations in Haskell are a bit difficult because they need so called monads You would need a special do-notion here to sequence the outputs.
http://stackoverflow.com/questions/874168/nested-if-in-haskell

Name: Anonymous 2013-06-21 18:27

Rich Hickey
Richard Hickey
Dick Hickey
...sounds painful

Name: Anonymous 2013-06-21 18:35

Dickhard Kikey

Name: Anonymous 2013-06-21 18:55

Dickhard Richkike

Name: Anonymous 2013-06-21 20:49

Kike McKikey

Name: Anonymous 2013-06-21 21:23

I tried translating (if t (lambda (x) x) (lambda (x) (first x))) into Haskell, can't find a way to do it:
Prelude> (if True then (\x -> x) else (\x -> fst x))

<interactive>:1:36:
    Occurs check: cannot construct the infinite type: a = (a, b)
      Expected type: (a, b)
      Inferred type: a
    In the expression: fst x
    In the expression: (\ x -> fst x)

Name: Anonymous 2013-06-21 21:27

>>36
Typical answer to all kinds of Haskell errors is:
http://stackoverflow.com/questions/5529332/occurs-check-cannot-construct-the-infinite-type-a-a
"Think about lines one to five. What do you want to archieve? Your approach is very strange. I don't see through your code, but I think I have an idea about what you try to do. Try to give your functions type-signatures, then you will see wuickly, what's going wrong."


And this "cannot construct the infinite type" appears to be the Haskell version of "segmentation fault"

Name: Anonymous 2013-06-21 21:46

Why can't I create a stub function, returning just True?
Prelude> (\ -> True)

<interactive>:1:3: parse error on input `->'
Prelude>

Name: Anonymous 2013-06-22 2:09

>>36
Because type a is not the same as type (a, b), you numbskull.
>>37
See, that's the advantage of a robust type system: it helps you see your errors at compile time and points out where they are, instead of leaving you on a date with a runtime segfault.
>>38
Because any value is already a function without any parameters, no need for lambda syntax.

Fucking brainless lishp idiots.

Name: Anonymous 2013-06-22 2:50

>>39
Type a unifies with type (a,b). It's cars all the way down. Don't make excuses for haskell. It should be better.

Name: Anonymous 2013-06-22 3:05

>>40
Try to strain your lishp brain and think about what the computer should do if you try to call cdr on an integer.

Name: Anonymous 2013-06-22 3:08

>>41
You don't need to give up type safety in order to support recursive types.

Name: Anonymous 2013-06-22 3:16

>>40
Type a unifies with type (a,b)
I'm more of a Lisp person, and this is completely retarded.

Name: Anonymous 2013-06-22 3:18

cdr n => n + 1

Name: Anonymous 2013-06-22 5:00

>>43
It's not that hard. Even java programmers can do it.


class a {
  a car;
  b cdr;
}

Name: Anonymous 2013-06-22 5:05

>>45
but (a,b) is Tuple a b, not a a b.

Name: Anonymous 2013-06-22 5:15

>>46
a is a Tuple a b

Name: Anonymous 2013-06-22 5:32

>>36
You want a function with type a ∨ (a,b) → a or (a → a) ∨ ((a,b) → a) but Haskell doesn't let you do that, so you have to wrap it in a data constructor.
data Union a b = Value a | Pair a b

Name: Anonymous 2013-06-22 5:38

>>42
But Haskell already supports recursive types. In fact, the whole Lishp type system can fit into one Haskell recursive type.

Name: Anonymous 2013-06-22 5:41

>>48
It needs to be Pair a b all the way down along the first element of the pair, to be the same.

Name: Anonymous 2013-06-22 5:45

>>49
It doesn't seem to handle recursive types in type inference. Is there a way to do it explicitly?

Name: Anonymous 2013-06-22 5:49

>>51
>>50
`I don't know where you get your ideas, TJ`
Haskell can have any kinds of fucking trees, including but not limited to the lisp lists. For instance like this:
data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show)
The type system handles them like any other fucking type. Type inference works. You can even save time if you want to walk down a path in a tree without evaluating it whole, thanks to laziness.
Get your heads out of your SICP archaism and read about fucking Haskell which can do everything Lisp can, and more.
http://learnyouahaskell.com/zippers

Name: Anonymous 2013-06-22 6:02

>>52
Type inference does not work, because it cannot unify a with (a,b).

Name: Anonymous 2013-06-22 6:04

also, (lambda (x) (x x))

Name: Anonymous 2013-06-22 6:07

>>53
Because (a, b) is fucking not the same as a. Just fucking not the same. Can you wrap your head around that? Are you capable of thought or is carring, cdring and consing the only thing a lishp-idiot can understand?
>>54
What the fuck is that? Why do you need it? You've never written actual programs, have you. It's all just infinite fucking Turing machines and syntax trees for you imbeciles.

Name: Anonymous 2013-06-22 6:09

>>53
Unification of recursive type should be, like, unifying [a,b] with [b]. Where do you get the idea that it's about unifying a and (a,b)? (a,b) has the type 2-element-tuple type-of-a type-of-b. It's not even recursive in nature.

Name: Anonymous 2013-06-22 6:14

>>55
He's right about self application though. If you're bragging about your favorite funtional language you should at least know the basic gist of LAMBDA CALCULUS

Name: Anonymous 2013-06-22 6:18

>>53
a and (a,b) can be constrained to be the same.

>>54
fix. Haskell has it built in because you can't express it using its puny non-recursive type system.

>>56
a = (a,b) = ((a,b),b) = (((a,b),b),b) = ...
It's natural enough for me. Maybe it's just too much for you, being a goy and all.

Name: Anonymous 2013-06-22 6:31

>>57
Why is lambda calculus important? What are its advantages? By the way, lithp itself is only very remotely related to lambda calculus.

Name: Anonymous 2013-06-22 6:32

>>58
Because that's just simply not how tuples are defined in Haskell. How couldn't you get over that?
You can do the following if you're so anally about that though:
data Tuple a b = Tuple (Tuple a b) b| NIL
Now if x has the type Tuple a b, it can be unified with a tuple with the type Tuple x y (y has the type b of course).

Name: Anonymous 2013-06-22 6:34

>>59
I just mean that self application is just some basic shit that you shouldn't react all like ``WTF IS THAT SHIT'' about if you called yo, that's all.

Name: Anonymous 2013-06-22 6:34

>>60
a tuple with the type Tuple x y (y has the type b of course)
What you're saying is y is a type that has the type b. You've spent too much time here with these lishp-retoids.

Name: Anonymous 2013-06-22 6:35

>>61
*called yourself a functional programmer.

Name: Anonymous 2013-06-22 6:35

>>61
What is it useful for? Why do we need it? What is the type of f if f can be applied to itself?

Name: Anonymous 2013-06-22 6:37

>>62
Yeah, I was going to say ``a tuple with the value ``Tuple x y''''.

Name: Anonymous 2013-06-22 6:38

>>58
...and then you end up spewing (declare) everywhere because you cannot into static typing.

Name: Anonymous 2013-06-22 6:41

>>64
f is a function that take a function that take a function that....
Well, you can define it and do useful shit with it in untyped lambda calculus, but Haskell doesn't really need it.

Name: Anonymous 2013-06-22 6:41

>>67
useful shit
untyped lambda calculus
DIVISION BY ZERO ERROR

Name: Anonymous 2013-06-22 6:44

>>68
Useful for barebone untyped lambda calculus, of course.
Gosh, you're just as much anally frustrated as the other doubly linked anus Lithper.

Name: Anonymous 2013-06-22 6:46

If lisp is mental masturbation, what is haskell?

Name: Anonymous 2013-06-22 6:47

If lisp is mental masturbation, what is haskell?
Statically typed mental masturbation.

Name: Anonymous 2013-06-22 6:47

>>59
By learning the untyped lambda calculus, you'll realize why haskell sucks. It's safe, but it's weak.

>>60
I don't doubt that you can define your own data type for that example. Although, to match the recursive type exactly, it would be data Tuple a b = Tuple (Tuple a b) b. The type can't include NIL, as there no case to handle that in the original code. But the issue I have is that this isn't done in type inference. It's a hole in the feature. With this example, you have no choice but to define your own datatype. Some people would say that is more self-documenting, but then at that point you may as well throw out type inference all together and force type declarations everywhere.

And then with self application you aren't so lucky. Although maybe there is a work around for that as well.

Name: Anonymous 2013-06-22 6:47

Lazily haxed anus masturbation.

Name: Anonymous 2013-06-22 6:49

The only type I need is the word.

Name: Anonymous 2013-06-22 6:50

>>72
By learning simply-typed lambda calculus, you'll realize why lisp sucks. It's unsafe, and it's weak.

Name: Anonymous 2013-06-22 6:57

>>75
But Lisp is safe. You can't do retoid computation like (/ 1 x) where x = 0.

Name: Anonymous 2013-06-22 6:58

>>76
^ the lishp-imbecile idea of safety.

Name: Anonymous 2013-06-22 6:58

>>75
\x -> x x

Name: Anonymous 2013-06-22 6:59

^ the haskall-anal idea of ``safety''.

Name: Anonymous 2013-06-22 6:59

>>77
Static typing does not prevent division by zero.

Name: Anonymous 2013-06-22 7:00

Anyone here who has written more than toy programs in haskell that actually likes the type system?

Name: Anonymous 2013-06-22 7:02

>>81
I love it. Once you start thinking and solving problems in types rather than in primitive cars and conses, you'll love it too. If you have the brains for that, of course.

Name: Anonymous 2013-06-22 7:03

>>82
It sounds like you have poor exposure to lisp. You should check out CLOS.

Name: Anonymous 2013-06-22 7:06

>>82
I don't think anyone thinks of problems only in pairs.

Name: Anonymous 2013-06-22 7:07

>>82
If you've read SICP, you would know that THE SUSSMAN does advocate data abstraction. What's so impossible about (define (type-constructor a b) .... )? Of course it doesn't have some benefits the anal type system of Haskell has, and you actually have to document the ``type'''s definition as well as the functions' type to make sense out of your shits, but it is exactly what Lithpers normally do. Hint: Lithpers usually avoid using conses if possible, because EFFICIENCY.

Name: Anonymous 2013-06-22 7:20

>>85
Nothing is impossible about your Scheme gimmick, it's just so primitive that it's hard to understand what the author of is trying to say. For every elementary thing you have to write out loads of parentheses by hand, when in a real language they would be built in. If SICP was written in Haskell, it would be much better.

Name: Anonymous 2013-06-22 7:23

>>86
but haskell can't y-combinate ani

Name: Anonymous 2013-06-22 7:24

>>83
CL and CLOS are regarded as archaic shit by lishpers themselves. The only real production lithp nowadays is Clojure, thanks to the Java world. But Clojure doesn't have anything that rivals CLOS.

Name: Anonymous 2013-06-22 7:33

>>89
That's ok. With macros it can be extended to include CLOS.

Name: Anonymous 2013-06-22 7:38

>>89
But it'll be just JVM-shit underneath, so probably will be some limp-dicked semblance of CLOS.
No, of course CLOS is excellent. For OOP. But OOP itself is way overrated. You would know that if you read your SICP.
The fact that Haskell doesn't have OOP is one of its strengths.

Name: Anonymous 2013-06-22 8:14

>>76
(/ 1 x)
Not Lispy enough. You can use (/ x).

Name: Anonymous 2013-06-22 9:26

>>88
CL and CLOS are regarded as archaic shit by lishpers themselves.
Concerning CLOS, some Lispers, like Paul Graham or this Jew Stallman, just disagree that CLOS is the right way to do OOP. Especially because that Alonzo Church himself used simply lambdas instead of objects. Morevoer, CLOS is less efficient or intuitive than traditional Smalltalk style OOP.

Name: Anonymous 2013-06-22 9:50

>>92
They also don't like CL itself as being bloated, ugly and old. For instance, no concurrency, no first-class functions, etc.

Name: Anonymous 2013-06-22 11:55

>>93
no first-class functions

Oh, you!

Name: Anonymous 2013-06-22 12:20

>>86
Bullshit! Haskell is good already, but it would be much better if it used something like s-expression instead of that monstrosity of syntax.

Name: Anonymous 2013-06-22 12:52

>>36
There's probably something in HList that would help.
>>58
a = (a,b) = ((a,b),b) = (((a,b),b),b) = ...
OCaml lets you do that with -rectypes.

Name: Anonymous 2013-06-22 13:04

>>95
I'm trying to translate (if t (lambda (x) x) (lambda (x) (first x))) into Haskell, but GHC gives me the following error:
Prelude> (if True then (\x -> x) else (\x -> fst x))

<interactive>:1:36:
    Occurs check: cannot construct the infinite type: a = (a, b)
      Expected type: (a, b)
      Inferred type: a
    In the expression: fst x
    In the expression: (\ x -> fst x)

Name: Anonymous 2013-06-22 13:19

>>94
You have to use special (funcall) shit.

Name: Anonymous 2013-06-22 13:22

>>98
So what? It's ugly and ancient, but so is the rest of Common Lisp. Doesn't mean it's wrong.

Name: Anonymous 2013-06-22 13:28

>>98
It doesn't mean CL doesn't have first-class function.
It has indeed, but the seperated namespace makes it look fugly.

Name: Anonymous 2013-06-22 13:37

>>100
Any more bullshit boilerplate than in Haskell means no first-class.

Name: Anonymous 2013-06-22 14:02

>>101
I see a lot of non-``first class'' objects in Haskell by that definition, preceded by type signatures or wrapped in a mess of functors.

Name: Anonymous 2013-06-22 14:02

>>102
But functions ain't one of 'em.

Don't change these.
Name: Email:
Entire Thread Thread List