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

Common Lisp is too hard.

Name: Anonymous 2007-12-04 19:06

I still can't get my head around prefix notation. I heard Scheme is easier though. Seriously, why do practitioners of Lisp-like languages claim it's so good? I honestly cannot see the big deal, it's an old, slow, awkward and overall clunky language to use.

Name: Anonymous 2007-12-05 18:14

int a = 4 * (73 + 5);
As opposed to
(setf a (funcall #'* 4 (+ 73 5)))
Tell me which one is easier to read (HINT: it's not the latter)

Name: Anonymous 2007-12-05 18:17

Oops slight error in the CL:

(setf a (funcall #'* 4 (funcall #'+ 73 5)))

Name: Anonymous 2007-12-05 18:26

>>55
and why setf? maybe a simple (with) would be ok. something like

(with var a = (* 4 (+ 73 5)) in ...)

Name: Anonymous 2007-12-05 18:28

>>57
No, you cannot use with, this is outside the problem domain.

Name: Anonymous 2007-12-05 18:33

>>57
What the fuck is (with)?

Name: Anonymous 2007-12-05 18:35

>>56
Don't you mean (setf a (apply #'* (list 4 (apply #'+ (list 73 5)))))?

Name: Anonymous 2007-12-05 18:47

>>59
It's a macro which allows you to make closures.

Name: Anonymous 2007-12-05 18:52

>>61
But why do you guys keep talking about it like it's standard?

Name: Anonymous 2007-12-05 19:05

Because it's in the CL ansi standard.

Name: Anonymous 2007-12-05 19:43

>>62
it's not standard, then again neither is (iter), yet everybody uses it. It's a general binding macro, includes let, multiple-value-bind, and stuff.

Name: Anonymous 2007-12-05 19:50

>>64
Iterate I know, but I've never seen with mentioned outside /prog/.

Name: Anonymous 2007-12-05 19:59

>>63
l2hyperspec

Name: Anonymous 2007-12-05 20:30

>>65
maybe I'm the only one here who uses with, so you everytime you see it here it's because i'm using it.

Name: Anonymous 2007-12-05 21:57

>>67
I think that's very likely.

Name: Anonymous 2007-12-05 22:07

>>68
yes.
but i'm not >>59. then again it's not a macro to create closures.

Name: Anonymous 2007-12-05 22:28

>>14
wow, what a fail language.
here's fizzbuzz in a much cleaner language:
: d dupd mod zero? ;
100
[
 1+ 15 d [ drop "FizzBuzz" ]
 [
  3 d [ drop "Fizz" ]
  [
   5 d [ drop "Buzz" ] when
  ] if
 ] if .
] each

Name: Anonymous 2007-12-05 23:04

>>70
That CL version is maybe more verbose than necessary.

Name: Anonymous 2007-12-05 23:10

>>71
all CL is more verbose than necessary.

Name: Anonymous 2007-12-05 23:38

>>72
All CL is exactly as verbose as necessary.

Name: Anonymous 2007-12-05 23:44

>>73
x g f >>> [code](f (g x))[code]

Name: Anonymous 2007-12-06 0:07

>>74
Your first example is insufficiently verbose.

Name: Anonymous 2007-12-06 0:33

(loop for i from 1 to 100                                             
      do (cond ((= 0 (mod i 15)) (format t "FizzBuzz~%"))              
               ((= 0 (mod i 3))  (format t "Fizz "))                   
               ((= 0 (mod i 5))  (format t "Buzz "))                   
               (t                (format t "~a " i))))

Name: Anonymous 2007-12-06 0:48

>>76
Forgetting some newlines there?

Name: Anonymous 2007-12-06 1:01

>>76
I didn't think it was possible for anyone to fail FizzBuzz. Obviously, I was horribly mistaken.

Name: Anonymous 2007-12-06 1:10

>>75
how so?

Name: Anonymous 2007-12-06 1:16

That lisp crap isn't taught in my skool. Best decision they ever made.

Name: Anonymous 2007-12-06 1:47

write a macro in lisp

(with a = 3 + 4 * x)

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