Page 1 of 2 12 LastLast
Results 1 to 10 of 34

Thread: [Beginner] Programming Challenge: 6

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Beans
    14,781

    [Beginner] Programming Challenge: 6

    Sorry for the delay, but you get what you pay for

    This new challenge with be something special. I decided to not go with the algorithm suggestions I have been getting and try something new (yet not hard).

    Hopefully, you will learn something.

    The Challenge
    Do any of the previous challenges, but in Scheme, Common Lisp, or Haskell. If you know one of those languages, you can use it, but I prefer one uses a new language.

    The Reasons
    The other challanges weren't hard. In particular, the first and second ones would be ideal candidates for this. The whole point of this is to expose new programmers to another syntax. C syntax will show its true colours; BASIC syntax will be revealed for the monstrosity that it is.

    My wiki would be a good place to learn the basics of these languages. Scheme would be the simplist.

    How it will be graded
    It won't be. You'll get feedback (hopefully) from those who can give it. You should focus on learning and trying to use new concepts.
    Last edited by LaRoza; September 24th, 2008 at 09:36 AM.

  2. #2
    Join Date
    Jul 2008
    Beans
    1,491

    Re: [Beginner] Programming Challenge: 6

    It might be a good idea to link to the (older) Beginner Challenges. Some of them got a couple of pages behind, I think.

  3. #3
    Join Date
    Apr 2007
    Beans
    14,781

    Re: [Beginner] Programming Challenge: 6

    Quote Originally Posted by Reiger View Post
    It might be a good idea to link to the (older) Beginner Challenges. Some of them got a couple of pages behind, I think.
    Index link: http://ubuntuforums.org/showpost.php...86&postcount=1

  4. #4
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: [Beginner] Programming Challenge: 6

    is Perl6 allowed?
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

  5. #5
    Join Date
    Sep 2006
    Location
    Central Europe
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: [Beginner] Programming Challenge: 6

    Never used or liked Lisp, so I did challenge 1 with Lisp:

    Code:
    (defun drink (n)
      (loop for i from n downto 1 do 
        (if (>= i 2)
          (format t "~a bottles of beer on the wall, ~a bottles of beer.~%~
            Take one down and pass it around, ~a ~a of beer on the wall.~%~%" i i (- i 1) (format nil "bottle~p" (- i 1)))
          (format t "~a bottle of beer on the wall, ~a bottle of beer.~%~
            Take one down and pass it around, no more bottles of beer on the wall~%~%~
            No more bottles of beer on the wall, no more bottles of beer.~%~
            Go to the store and buy some more, ~a bottles of beer on the wall." i i n))))
    I tried a recursive version but it looked bad compared to the above.
    Last edited by MacUntu; September 24th, 2008 at 11:06 AM.

  6. #6
    Join Date
    Jul 2008
    Beans
    1,706

    Re: [Beginner] Programming Challenge: 6

    was already working on this...awesome idea
    Last edited by jimi_hendrix; September 26th, 2008 at 01:05 AM.

  7. #7
    Join Date
    Jul 2008
    Beans
    1,706

    Re: [Beginner] Programming Challenge: 6

    are we aloud other functional languages like OCaml or other non C like syntax languages like assembler?

  8. #8
    Join Date
    Mar 2007
    Beans
    Hidden!
    Distro
    Kubuntu 7.04 Feisty Fawn

    Re: [Beginner] Programming Challenge: 6

    I don't even know what any of those are. This should prove to be very informative.

  9. #9
    Join Date
    Apr 2007
    Beans
    14,781

    Re: [Beginner] Programming Challenge: 6

    Quote Originally Posted by slavik View Post
    is Perl6 allowed?
    Code:
    if "Perl6" in ("Scheme", "Common Lisp", "Haskell"):
        print "Yes"
    else:
        print "Get some sleep and realise how silly that question is"
    Quote Originally Posted by SteelDragon View Post
    I don't even know what any of those are. This should prove to be very informative.
    Yes, it should be informative

    Eric Raymond in "How to Become a Hacker":
    Quote Originally Posted by ESR
    Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.

  10. #10
    Join Date
    Jul 2008
    Beans
    1,491

    Re: [Beginner] Programming Challenge: 6

    Yes, well that can be said about Haskell also.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •