Pages: 1 2 3
Author Topic: Second time  (236,549 Views)
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #30 Posted on: October 18, 2009, 07:44:57 PM
Quote from: Rusky on October 18, 2009, 02:03:56 AM
Or is this sarcastic? Obviously I don't use sarcasm enough if nobody can tell.
You use it too seriously.
Scheme is horrible.  You can't execute more than one "line" per function, making them useless.
Offline (Unknown gender) luiscubal

Member
Joined: Jun 2009
Posts: 452
View profile
Reply #31 Posted on: October 18, 2009, 07:58:37 PM
Excuse me? One "line" per function?

(define xyz
(lambda (a, b, c)

(print a)
(print b)
(print c)

)
)

I just made a valid Scheme function with 3 statements.
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #32 Posted on: October 19, 2009, 01:02:55 PM
Wow, sarcasm fail. All of you.

Also, Retro missed the point. Lisp isn't supposed to execute, it's supposed to be evaluated. It's functional:
(defun factorial (n)
  (if (= n 1)
      1
      (* n (factorial (- n 1)))))

You're supposed to describe formulas and use as little actual state as possible. Thus why it actually is extremely cool. And either way, you can still do multiple lines like that.
Offline (Unknown gender) Micah

Resident Troll
Joined: Jun 2008
Posts: 128
View profile
Reply #33 Posted on: October 19, 2009, 11:55:45 PM
Haskell is cooler, because it's Lisp with expressive syntax, compilation, pure functionality (as in functions, not as in working), and a very good static type system.

I wrote a lexer from scratch in Haskell in 15 lines, and it was only that long because I pressed enter a bunch to make it more readable. And it would have been extremely easy to expand or modify it.

And how about we start using the Snark? This is how you use it.~
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #34 Posted on: October 20, 2009, 12:10:11 AM
Quote from: luiscubal on October 18, 2009, 07:58:37 PM
Excuse me? One "line" per function?

(define xyz
(lambda (a, b, c)

(print a)
(print b)
(print c)

)
)

I just made a valid Scheme function with 3 statements.
That somehow didn't work for me, forcing me to:
(display
(string-append (string-append (string-append
  "You ate "
  (number->string meat))
  " meats.\n")
  "I don't even know how that's possible.\n\n"
  )
)

string-append string-append string-append number->string

My teacher hasn't taught us anything all year, and google was being mean to me.
Offline (Unknown gender) Game_boy

Member
Joined: Apr 2008
Posts: 228
View profile
Reply #35 Posted on: October 21, 2009, 03:58:45 PM
Any progress? Or is workload still an issue?
Pages: 1 2 3