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

Pages: 1-4041-

Haskell rocks

Name: Anonymous 2007-03-24 16:50 ID:xVqPIWca

In this thread we praise the awesome Haskell and extol on its glorious features

for instance, say you have an arbitrarily complex data type, if you add
          deriving (Show, Read, Eq)
to the definition

Haskell will automatically figure out how to 1) convert it into a string 2) parse a string into data 3) compare for equality

How fucking awesome is that! Automatic hassle-free serialisation!

No more fucking around with how to parse a matrix! read m :: Matrix yay!

Name: Anonymous 2007-03-24 16:55 ID:RDHJbV0e

too bad read is slow as hell

Name: Anonymous 2007-03-24 17:07 ID:iENV+kEQ

One word: forced derivation of typeclasses. Thread over.

Name: Anonymous 2007-03-24 17:12 ID:xVqPIWca

>>3
Fail. It's not forced i.e.

instance Eq YourShit where
    (==) a b = ...

Name: Anonymous 2007-03-24 17:16 ID:+6m6XJuV

>>2
Too bad ByteString is blazing fast.

Name: Anonymous 2007-03-24 17:29 ID:iENV+kEQ

>>4
Oh stfb I can't think of anything forced in Haskell. Certainly not indentation of code, that's optional.

Name: Anonymous 2007-03-24 18:37 ID:RDHJbV0e

>>6
Indeed, you can use semicolons and those brackets that I don't know what they do instead.

{What do these brackets do?}

Name: Anonymous 2007-03-24 20:46 ID:xFpPqzXS

>>6
Forced capitalization for constructors, types, etc, or lack thereof for variables, keywords, etc. But that is a Good Thing.

Name: Anonymous 2007-03-25 3:10 ID:Gyh74TAu

>>8
could probably be 'fixd' with Language.Haskell.TH.Syntax

Name: Anonymous 2007-03-25 4:43 ID:5lvD0N94

So what are the actual benefits of learning Haskell? What makes it superior to any other language?

Name: Anonymous 2007-03-25 4:54 ID:xHBICUtx

>>10
You get to join the Expert Programmer club.

Name: Anonymous 2007-03-25 5:55 ID:3j52o8fU

I'd rather praise Qbasic. I use to program with it when I was twelwe and, oh golly, I was quite impressed. You don't even have to declare your variables, how timesaving!

Name: Anonymous 2007-03-25 6:21 ID:Gyh74TAu

>>12
Lol variables. Welcome to 1900

Name: Anonymous 2007-03-25 6:31 ID:IyBeTp0t

>>10
Elitism and fappage.

Name: Anonymous 2007-03-25 10:43 ID:uhBjCc/1

Assembly kicks your ass.

Name: Anonymous 2007-03-26 7:38 ID:+GfSEkzN

let ohshit x = putStr "I divided by zero" in ohshit (1 / 0)

In Haskell you can divide by zero because of nigger evaluation.

Name: Anonymous 2007-03-26 9:27 ID:GKsXM8pH

>>16
What's nigger evaluation? It sounds interesting.

Name: Anonymous 2007-03-26 9:39 ID:+GfSEkzN

>>17
niggers are lazy

Name: Anonymous 2007-03-26 16:27 ID:RXIcT08b


$ ghi
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98. (4ch-patched version)
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :3 for help.

Prelude> 1 / 0
Oh-Shi

Name: Anonymous 2007-03-26 16:45 ID:VJyEpm48

$ hugs
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: 20050308       _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

Type :? for help
Hugs.Base> 1 / 0
inf
Hugs.Base> fuck your floating points nigga!
ERROR - Syntax error in expression (unexpected end of input)
Hugs.Base> :quit
[Leaving Hugs]

Name: Anonymous 2007-03-26 17:00 ID:Heaven


Hugs.Base> 1 `div` 0

Program error: divide by zero

Hugs.Base> let ohshit x = putStr "I divided by zero" in ohshit (1 `div` 0)
I divided by zero

Name: Anonymous 2007-03-26 17:14 ID:T4RtC8U9


forward k0 λ0 e0 a b f φ λ = (x, y)
    where a1 = (a / (1+n)) * (1 + (n^2/4) + (n^4/64))
          e = sqrt $ 2*f - f^2
          hs = [h1', h2', h3', h4']
          n = (a-b) / (a+b)
          q = q' - e * q''
              where q' = asinh $ tan φ
                    q'' = atanh $ e * sin φ
          β = atan $ sinh q
          η' = atanh $ (cos β) * (sin $ λ - λ0)
          ξ' = asin $ (sin β) / (sech η')

          η = η' + (sum $ zipWith ηn hs [2, 4..])
              where ηn h c = (h $ n) * (cos $ c*ξ') * (sinh $ c*η')

          ξ = ξ' + (sum $ zipWith ξn hs [2, 4..])
              where ξn h c = (h $ n) * (sin $ c*ξ') * (cosh $ c*η')

          x = a1 * η * k0 + e0
          y = a1 * ξ * k0


Discuss.

Name: Anonymous 2007-03-26 18:31 ID:yJCgkHVv

>>22
Don't let Larry Wall see you using greek letters, or he'll make them new Perl operators.

Name: Anonymous 2007-03-27 2:10 ID:j1xVw4gw

>>23
I take it you haven't used APL?  Here are it's operators:

    '     (     )     +     ,     -     .     /      :      ;     <     =     >      ?     [     ]
    \     _     ¨     ¯     ×     ÷     ←     ↑     →     ↓     ∆     ∇     ∘     ∣     ∧     ∨
    ∩     ∪     ∼     ≠     ≤     ≥     ≬     ⊂     ⊃     ⌈     ⌊     ⊤     ⊥     ⋆     ⌶     ⌷
    ⌸     ⌹     ⌺     ⌻     ⌼     ⌽     ⌾     ⌿     ⍀     ⍁     ⍂     ⍃     ⍄     ⍅     ⍆     ⍇
    ⍈     ⍉     ⍊     ⍋     ⍌     ⍍     ⍎     ⍏     ⍐     ⍑     ⍒     ⍓     ⍔     ⍕     ⍖     ⍗
    ⍘     ⍙     ⍚     ⍛     ⍜     ⍝     ⍞     ⍟     ⍠     ⍡     ⍢     ⍣     ⍤     ⍥     ⍦     ⍧
    ⍨     ⍩     ⍪     ⍫     ⍬     ⍭     ⍮     ⍯     ⍰     ⍱     ⍲     ⍳     ⍴     ⍵     ⍶     ⍷
    ⍸     ⍹     ⍺     ⎕     ○

Name: Anonymous 2007-03-27 4:06 ID:4DSyCgj1

+1 for Haskell rocking.

Name: Anonymous 2007-03-27 6:24 ID:bnRPEr1Q

>>24

Seriously?

Name: Anonymous 2007-03-27 6:27 ID:Heaven

Name: Anonymous 2007-03-27 6:28 ID:j1xVw4gw

>>27
I recommend following the link to the J programming language as well ;)

Name: Anonymous 2007-03-27 11:02 ID:Dv/34h9Z

>>24
The guy who came up with that that was retarded. He would be good friends with Larry Wall. So good the UCS did not exist back when they started to work.

Seriously, shit like using the $%& operator to extract prime numbered elements of a list makes me think it's a good idea to keep everything a function (or a macro with the shape of a function) as in Lisp and fuck operators.

Name: Anonymous 2007-03-27 11:07 ID:bnRPEr1Q

>>27

That is awesome

Name: Anonymous 2007-03-28 2:33 ID:ZODNWUws

One word, Forced indentation of code.

You may have noticed that I use indention to indicate lines that are part of a block of source code. This is not simply good style, but it is also part of Haskell's syntax. Indentation denotes structure. Specifically, changing the indentation from one line to the next indicates that a block of code has begun or ended. Also, Haskell will not let you place the definitions for two functions one line after another. Instead it demands a blank line to indicate that the definition of a function has truly finished. This all enforces good style, and it greatly reduces the amount of junk syntax in the language, such as '{', '}', and ';'.

Thread over.

Name: Anonymous 2007-03-28 2:42 ID:SKkeG8Li

>>32
You can also use {} and ; and no indentation if you're still a semi-retarded Haskeller.

Name: Anonymous 2007-03-28 4:50 ID:bNqnRtrF

>>31
Not forced, you fail. Haskell's layout rules are optional. Python tried to rip this off but failed.

Name: Anonymous 2007-03-29 2:01 ID:s6Plgy8j

>>32
Semi-retarded like Simon Peyton Jones?

Name: Anonymous 2007-03-29 4:44 ID:dNx7MkV8

>>34
He does it speed up GHC compile times so it's okay.

Name: Anonymous 2007-03-29 9:26 ID:2pY0cz3G

If you need to care about your compiler/interpreter speed and you do so by stuffing shit in the same line, then Haskell fails sir. Spectrum age ended long ago.

Name: Anonymous 2007-03-29 10:27 ID:s6Plgy8j

>>35
He uses it everywhere. Ever read one of his papers?

Name: Anonymous 2007-03-30 1:48 ID:Sag+UVcf

bump

Name: Anonymous 2007-03-30 23:41 ID:RxF/48L6

One word, forced parenthesis around code. Thread over.

Name: Anonymous 2007-03-31 4:06 ID:br75S7Ih

>>39
It's actually optional.

Name: Anonymous 2007-03-31 4:14 ID:eMGB1aMj

One word, forced referential transparency. Thread over.

Name: Anonymous 2009-01-14 14:45

Trolls

Name: Anonymous 2009-03-06 5:38


Who always keen to   criticize the mouse   for too long   since the last   datum was handled   incrementing the instruction   set a jump   instruction Sure enough   the next program   instruction was in   first grade Depends   on if you   wish to program   in any language   that are better   at it than   C i Scheme   unpure due to   its DOS underpinnings   Windows also recognizes   a whole host   of other characters   such as asterisks   and spaces as   have special meanings.

Name: Anonymous 2010-12-10 15:00

Name: Sgt.Kabu쵘ꭽkiman쁈葰 2012-05-28 23:39

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy

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