Haskell rocks

I have done sooooo much with our programming teacher Chris I have learned how to program Haskell in the smallest definition.

I am running a program that looks like this on the raw end of it  (not a functional code)

import Graphics.Gloss

    cloud=pictures [translate (-5) (32) color (light(light rose)) (circleSolid 85)),
    translate (-160) (32)color (light(light rose)) (circleSolid 85)) ,
    translate (156) (32 color (light(light rose)) (circleSolid 85)),
    color (light (light (light yellow)) (rectangleSolid 480 100)]

    beam=pictures[color orange rectangleSolid 3 100)]

{-   sun=pictures [(color orange (circleSolid 99)),
      translate -96 -32 (beam),
    rotate (-90) (translate (134) (-200) beam),
    rotate (-90) (translate (134 50) beam),
    rotate (-45) (translate (70 -36 beam),
    rotate (45) (translate -165 80 beam)]

picture = pictures [color ( dark rose) (rectangleSolid 500 500),
    translate -98 -150 (color orange (circleSolid 99)),

    translate -96 -32 (beam),

    rotate (-90) (translate 134 -200 beam),
rotate (-90) (translate 134 50 beam),
    rotate (-45) (translate 70 -36 beam),
    rotate (45) (translate -165 80 beam),
     rotate 50 (translate -163 -275 (color(dark(dark green)) (circleSolid 99)),
    (translate -180 -280 (color(dark(dark green)) (circleSolid 99)),
    (translate -65 -300 (color(dark(dark green)) (circleSolid 99)),
    (translate 190 -290 (color(dark(dark green)) (circleSolid 99)),
    translate 100 100(scale (0.5) (0.5) (cloud)),
    translate 50 -245) ((scale (0.25) (0.25)) (text Sunset by: Marcello))]
wich looks like this

PhotobucketIt was fun finding errors with the code and fixing the and putting in the ray (in code beams) I swear they took about 45min a piece.

I cant wait untill next class :)

 

by marcello

 

 

Google Reader Yahoo Facebook Twitter Digg FriendFeed Delicious Google Translate
This entry was posted onAugust 18th, 2011 at 5:08 pm. You can follow any responses to this entry through the RSS 2.0. You can Leave a response, or Trackback.

4 Responses

Comments(3)Trackbacks(1)

  1. daniel

    Congrats! Keep it up!

    August 24, 2011 12:16 am | #1 @
  2. Dustin

    Very cool! With time it gets easier and less time consuming. Hope you’re finding it fun!

    Learning to program is surely an opportunity you wouldn’t have had in a traditional school. How fortunate you are!

    August 24, 2011 3:48 pm | #2 @
  3. Simon

    Cool!

    August 24, 2011 11:45 pm | #3 @
  1. [...] Marcello: http://pilotkid.edublogs.org/2011/08/18/hakell-rocks/ [...]

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

(Ctrl+Enter)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>