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

Pages: 1-

Happiest programmers?

Name: faggot 2011-07-26 15:24

Name: Anonymous 2011-07-26 15:28

lol lisp hipsters boasting their new fibs implementations

Name: Anonymous 2011-07-26 16:27

HASKAL PROGRAMMERS = DEAD

Name: Anonymous 2011-07-26 16:32

>>3
I'm sure there are less than 57005 Haskal programmers

Name: Anonymous 2011-07-26 22:06

The Programming Language with the Happiest User Tweets
Fixed.

Name: Anonymous 2011-07-26 22:11

gonna summarize the comments before reading them:

"boohoo python wasn't on top. invalid."

Name: Anonymous 2011-07-27 5:22

Name: Anonymous 2011-07-27 16:21

i'm happy

Name: Anonymous 2011-07-27 16:25

>>8
You are happy inside your little bubble, autist

Name: Anonymous 2011-07-27 17:33

>>9
You are unhappy inside your little bubble, autist

Name: Prolog 2011-07-27 22:27

>100
true.

Name: Anonymous 2011-07-27 22:31

I'm thinking of going from C# to C++.  Does this mean I should reconsider?

Name: Anonymous 2011-07-27 22:32

happy programmers copy and paste other programmers code

Name: Anonymous 2011-07-27 23:17

>>13
lol, that's what I was thinking

Name: Anonymous 2011-07-28 2:52

>>2

#include <cstdio>
#define T long

struct Z {T R,I;};
Z m(Z l,Z r){return{l.R*r.R+5*l.I*r.I,l.R*r.I+l.I*r.R};}
Z s(Z l,Z r){return{l.R-r.R,l.I-r.I};}
Z x(Z e, T n){Z r={1,0};for(;n;n>>=1){if(n&0x1)r=m(r,e);e=m(e,e);}return r;}
T f(T n){Z p={1,1},_=s(x(p,n),x(s({2,0},p),n));return _.I/(1<<n);}

// The entry point to our program
int main(
    int   argc,   // The number of arguments to command-line binary (unused)
    char* argv[]  // An array of char* arguments to command-line binary (unused)
) {
    // The beginning of our program

    // Execute the following interior code 15 times
    for (int i=0; i<15; i++) {
   
        // Evaluate f at every integral value along the interval [0, 15).
        // "%d" signifies the result will be interpreted as a signed integer.
        // A space is included following the "format string" to provide a
        //   neatly formatted output
        printf("%d ", f(i));
       
    }
    // End of interior code section
   
    // Return a success code to the operating system
    return 0;
   
    // The end of our program
}

Name: Anonymous 2011-07-28 2:56

>>15
n.b. needs --std=c++0x and for usefulness' sake you would probably want to make T a bigger type

Name: Anonymous 2011-07-28 4:33

>>15
Well commented program.

Name: Anonymous 2011-07-28 4:34

A drunk man may be happier than a sober one.

Name: Anonymous 2011-07-28 5:28

Name: Anonymous 2011-07-28 8:24

Whats wrong with haskell? lol I find it very a compact and concise useful language. There's a few great compilers out there for haskell too, such that one needn't worry about optimisation. For example,

reverse      :: [Int] -> [Int]
reverse   []  = []
reverse x:xs  = reverse xs ++ [x]

is replaced in the compiler by some function like:

reverse2            :: [Int] -> [Int] -> [Int]
reverse2 [] ys       = ys
reverse2 x:xs ys     = reverse2 xs x:ys

useReverse     :: [Int] -> [Int]
useReverse xs   = reverse2 xs []

since the useReverse is much faster (because ++ takes more steps).

So one really doesn't have to worry about memory usage and such in haskell, which is why it's so awesome! :)

Name: Anonymous 2011-07-28 8:27

>>20
So one really doesn't have to worry about memory usage [...] in haskell,
Yeah, no.

Name: Anonymous 2011-07-28 8:58

Stupidity.

Name: Anonymous 2011-07-28 9:39

>>20
is replaced in the compiler by some function like:
No it's not. Where did you get that idea?

reverse' :: [a] -> [a]
reverse' []     = []
reverse' (x:xs) = reverse' xs ++ [x]


compiles to:

reverse' =
  \ (@ a_adG) (ds_dig :: [a_adG]) ->
    case ds_dig of _ {
      [] -> [] @ a_adG;
      : x_adu xs_adv ->
        ++
          @ a_adG
          (reverse' @ a_adG xs_adv)
          (: @ a_adG x_adu ([] @ a_adG))
    }

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