Week #6 Challenge: Haskell

  • (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4

57 Replies - 11451 Views - Last Post: 01 June 2010 - 06:46 AM

#46 .Aaron  Icon User is offline

  • Rock, paper, scissors, lizard, Spock
  • member icon

Reputation: 62
  • View blog
  • Posts: 2,895
  • Joined: 04-August 09

Re: Week #6 Challenge: Haskell

Posted 16 February 2010 - 05:52 PM

Quote

I seriously doubt I'll be lucky enough to get another Haskell specific challenge in, for obvious reasons. I think a generalized GTK challenge might be appropriate, and then people could write a GTK app in any language they like.


True. That would allow a wider group of people, while still leting those that enjoyed Haskell takw it a bit further.


Quote

@Arron

The challenge was to just submit some sort of Haskell application, code, anything really. A lot of people did that. Stop making things more complex than they have to be!

Even I submitted a tiny little error-prone calculator. Anything you've took a little while to write yourself is counted as a submission. Everybody who submitted something will be placed in a pool and chosen from randomly for the prize.


Uhh.. you mean '@Metropoler' there..? They're the one that put "nobody could finish it."


Oh, and @carltech: I know how you feel. My luck seems to be just as bad. Figure it has to let up eventualy but hasn't yet..

This post has been edited by .Aaron: 16 February 2010 - 06:08 PM

Was This Post Helpful? 0
  • +
  • -

#47 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Week #6 Challenge: Haskell

Posted 16 February 2010 - 06:01 PM

You're right. I fail.
Was This Post Helpful? 0
  • +
  • -

#48 .Aaron  Icon User is offline

  • Rock, paper, scissors, lizard, Spock
  • member icon

Reputation: 62
  • View blog
  • Posts: 2,895
  • Joined: 04-August 09

Re: Week #6 Challenge: Haskell

Posted 16 February 2010 - 06:04 PM

And your the one talking to us about being to harsh? :P
Was This Post Helpful? 0
  • +
  • -

#49 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Week #6 Challenge: Haskell

Posted 16 February 2010 - 06:06 PM

Heh heh.
Was This Post Helpful? 0
  • +
  • -

#50 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Week #6 Challenge: Haskell

Posted 16 February 2010 - 11:55 PM

View Postbbq, on 16 February 2010 - 03:15 PM, said:

View Posterik.price, on 16 February 2010 - 08:05 AM, said:

Quote

Also, I'm not sure what editor you and erik are using, but you're really borking indentation


I was using gedit *shame*


Yea same here, i will stick to Emacs a bit more in the future.

Thanks for the advice Raines, i will remember the indenting and removing the parenthesis :), if for any reason i ever code in haskell again :P

ps: there is a prize ??


There sure is, and you've won it.
Was This Post Helpful? 0
  • +
  • -

#51 Metropoler  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 78
  • Joined: 29-December 09

Re: Week #6 Challenge: Haskell

Posted 17 February 2010 - 01:57 PM

I'm sorry if I confused you all :-) I just wanted to emphazise that there are not a lot people who took part in this event even if it was possible to win cash $$$ :-)

Congratulation to bbq for the win :D

And here is is my simple code to calculate the end capital for a given capital, itnerest and the period of years:

calcCapital capital years interest = if years < 0
	             then 0
		 else if interest < 0
	             then 0
		 else if capital < 0
		     then 0
		 else
		     capital*(1+(interest/100))^years

Was This Post Helpful? 0
  • +
  • -

#52 .Aaron  Icon User is offline

  • Rock, paper, scissors, lizard, Spock
  • member icon

Reputation: 62
  • View blog
  • Posts: 2,895
  • Joined: 04-August 09

Re: Week #6 Challenge: Haskell

Posted 17 February 2010 - 04:27 PM

The learning curve comming from OOP probably help off at least a couple potential people, even with the prize for extra motivation. Think it shows that this was just the right week to give it out. If we're going to give some one $50, it should be for something that may require a little extra effort/thought put into it. :rolleyes:


And on that note, congrats bbq!
Was This Post Helpful? 0
  • +
  • -

#53 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Week #6 Challenge: Haskell

Posted 17 February 2010 - 04:42 PM

I don't know - quite a few people did this challenge. The ones who didn't probably didn't because they are scared of what they have heard, or don't think the benefit outweighs the time it takes to get comfortable with Haskell. I hope these people stop listening to how hard Haskell is, and start listening to how awesome it is in the future.

I will point out that this challenge is a great prerequisite for my Clojure challenge. If you intend to do my Clojure challenge when it's put out, you might want to spend a bit of time with Haskell so that you are versed in functional programming when the time comes. A lot of people think they already are because they use Python and <insert language with a few functional-oriented features here>, but that isn't really the case most of the time. Python's FP is rather half-assed, and you'll understand what I mean if you learn Haskell. Anyways, if you know a little Haskell, You'll have less trouble transitioning to Clojure.

If you believe Haskell isn't good for anything, it's purity makes it a very good language for forcing yourself to learn functional programming and it's idioms.

EDIT: Re-read the post and noticed that the Python comment sounded offensive. Edited it to detail the point I'm trying to make.

This post has been edited by Raynes: 17 February 2010 - 04:54 PM

Was This Post Helpful? 0
  • +
  • -

#54 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Week #6 Challenge: Haskell

Posted 17 February 2010 - 04:47 PM

I enjoyed working with Haskell, and intend to stick with it. I have basically the entire language to learn at this point, but it seems much more approachable than it did when I first started.

Anyway, congrats to bbq :)
Was This Post Helpful? 0
  • +
  • -

#55 DaneAU  Icon User is offline

  • Great::Southern::Land
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,617
  • Joined: 15-May 08

Re: Week #6 Challenge: Haskell

Posted 19 February 2010 - 09:53 PM

Nic nice nice, thanks guys and gals it was a really good challenge for me and i am stoked to get the prize :D :D
Was This Post Helpful? 0
  • +
  • -

#56 aniri  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 54
  • View blog
  • Posts: 657
  • Joined: 24-November 09

Re: Week #6 Challenge: Haskell

Posted 25 April 2010 - 09:26 AM

Two months later, but I finally managed to read a haskell tutorial and play a bit :P

Seems pretty cool :) one line is enough to check if a number is prime :

isPrime :: Integral a => a -> Bool
isPrime p = p > 1 && (all (\n -> p `mod` n /= 0 ) $ takeWhile (\n -> n*n <= p) [2..])  


And to get the 10001th prime number for example:

[x | x <- [1..], isPrime x] !! 10000



Will keep learning haskell, hope I'll have the time :)
Was This Post Helpful? 0
  • +
  • -

#57 Penzyak  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 26
  • Joined: 22-April 10

Re: Week #6 Challenge: Haskell

Posted 25 April 2010 - 12:37 PM

I don't think it's Haskell that "scares" people off. I think it's just functional programming as a whole that some people don't want to bother with, that's all. Haskell itself is no harder (nor more special) than any other functional language.
Was This Post Helpful? 0
  • +
  • -

#58 marmoor1989  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 28-August 09

Re: Week #6 Challenge: Haskell

Posted 01 June 2010 - 06:46 AM

There is an excellent site for learning Haskell
tryhaskell.org
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4