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

About Haskell

Name: Anonymous 2007-09-08 6:28 ID:qiAS//hY

Is it just me, or is Haskell the most confusing language to learn? I mean, C/C++, Java, Python, heck even Ruby are relatively easy compared to this cludgey shit. BTW, Monads are a retarded concept. Simon Peytell Jones (the creator of Haskell) was right when he said that Haskell is fucking useless (I'm paraphrasing, but that's the basic jist of it)

Name: Anonymous 2007-09-08 6:40 ID:8As4YO11

I was going to learn it once but then I was like, "Fuck, this is a lot of syntax... this is *really* a lot of syntax. Back to Lisp." It's not an across the board functional language thing either. Ocaml seems simple enough, and Erlang, while ugly as hell, seems fairly simple. Dunno why Haskell is so complicated.

Name: Anonymous 2007-09-08 6:44 ID:ErvAZqt7

It's not that complicated.

Name: Anonymous 2007-09-08 7:38 ID:yNhL+Hyt

>>3
You must have been an APL programmer back in the day.

Name: Anonymous 2007-09-08 7:58 ID:cF7dC9iS

Fuck, this is a lot of syntax... this is *really* a lot of syntax. Back to Lisp.

lol fucking failure, since when are lisp hackers idiots?

Name: Anonymous 2007-09-08 8:32 ID:21WGiu3s

Haskell is just different from imperative programming. It's best to let go of the idea of controlling order of execution. And you can't play an imperative programmer in a monad, like you can with reference types in ocaml.

Name: Anonymous 2007-09-08 10:27 ID:HCuPPGUk

try factor then

Name: Anonymous 2007-09-08 11:09 ID:4vzd0WxX

>>1
Is it just me, or is Haskell the most confusing language to learn?
Yes, it's just you. I didn't have any problems learning Haskell in a few weeks by doing a real project in it. You're probably just too deeply stuck in your imperative mindset.

Name: Anonymous 2007-09-08 11:17 ID:cF7dC9iS

>>1
yes, I agree with >>8

haskell is far too easy actually which is why I use lisp
I enjoy having to write fun little list munching algorithms and make my own pretty data structures..
when you hack haskell everything is there for you and before you know it your programs done.. I always get that ok now what feeling after finishing haskell projects.

anyways haskell is easy, just dont try it if you havent read SICP!

Name: Anonymous 2007-09-08 13:04 ID:Heaven

>>8-9
Haskell McProgrammers

Name: Anonymous 2009-03-06 11:12


The closing delimiter are?

Name: Anonymous 2013-03-18 19:05

Dead dog

Name: Anonymous 2013-03-18 19:41

so many haskell threads!

Name: Anonymous 2013-03-18 20:52

Haskell is the lulziest language. Almost everything can be overloaded - for the lulz!

Name: Anonymous 2013-03-18 22:41

Why would you make a thead to validate your hate to a language?

seriously is you hate it, it's okay, why need recommendations on this?


BTW I love haskell

Name: C PROGRAMER 2013-03-19 9:43

I can write haskell in every language!





    #include <stdlib.h>
    #include <stdio.h>

    #define VALUE(f,t, v) (t*)((f*)v)->current
    #define CAST(t,v) ((t*)v)
    #define GEN(t,v) ((t*)v)->current

    /* Forgetful functor */

    #define FORGET(t) t->object

    typedef void * value;

    /* Generic function :: a -> b */
    typedef void * (*arr)(void *);

    /* Generic fmap :: f a -> (a -> b) -> f b */

    typedef void * (*fmap)(void *, arr);

    /* Functors ala haskell */

    typedef struct functor {
        value object;
        fmap arrow;
    } functor;

    typedef struct maybe {
        int nothing;
        value current;
    } maybe;

    /* maybe has two constructors */
    maybe * nothing(){
       maybe * nothing = malloc(sizeof(maybe));
       nothing->nothing = 1;
       nothing->current = NULL;
       return nothing;
    }

    maybe * just(value item){
        maybe * just = malloc(sizeof(maybe));
        just->nothing = 0;
        just->current = item;
        return just;

    }
    /* functor invoker */
    void * map(functor * f, arr g){
        fmap h = f->arrow;
        f->object = h(f->object, g);
        return f;
    }

    /* Functor instance for maybe */

    void * mFunctor(void * m, arr f){
        if(CAST(maybe,m)->nothing){
            return (void *) m;
        } else {
            CAST(maybe, m)->current = f(GEN(maybe,m));
            return m;
        }
    }

    functor * maybeFunctor (maybe * object){
       functor * maybe = malloc(sizeof(functor));
       maybe->object = object;
       maybe->arrow = &mFunctor;
       return maybe;
    }
    /* I actually need an garbage collector. This will be so much nicer */
    int main(int argc, char *argv[]) {
        int x = 1;
        maybe * y = just(&x);

        /* this is not needed but it gives an haskelly feel to the code */

        functor * f = maybeFunctor(y);
     
        void * _in(void *x){
            int * y = CAST(int, x);
            (*y)++;
            return y;
        };
        functor * g = map(f, _in);
        printf("%d", *VALUE(maybe, int, FORGET(g)));
        return 0;

    }

Name: Anonymous 2013-03-19 13:15

YOU MENA HASKELL

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