News for hackers. Stuff that matters.
Re:Learn Lisp the Hard Way by gre on Thursday July 10, 2014 @05:50PM (#8017568)
The DSL for string formatting certainly doesn't look simple.

  (format t "~{~@(~A~)~^ ~}, because ~{~A~^ ~} is easier!" llthw (cddr llthw))
Re:Learn Lisp the Hard Way by ScottBurson on Thursday July 10, 2014 @06:06PM (#8017650)
It's complex because it's powerful. ~A is the most common directive; it simply prints an object. '~{...~}' (braces) iterates over a list, applying the directives within it to the list elements. Within that construct, '~^' exits if the last element of the list has been consumed; it's used here to keep the separating space from being printed after the last element. '~@(...~)' (parens) capitalizes words in the output of the directives it contains, downcasing the non-initial character of each word.

So there's a lot more power here than in 'printf' control strings. If you find the more exotic notation unintuitive -- and you certainly wouldn't be alone -- you don't have to use it.

Re:Learn Lisp the Hard Way by gre on Thursday July 10, 2014 @06:16PM (#8017706)
It's just disingenuous to say that LISP has extremely simple syntax and then show the DSL for format, which is anything but LISPy or simple.
Re:Learn Lisp the Hard Way by CatMtKing on Thursday July 10, 2014 @06:29PM (#8017763)
It's disingenuous to claim a DSL is part of the language syntax. E.g. I would not consider the regex formatting specification as Python syntax. I mean, if we follow that line of thought, it's like saying Jinja is Python syntax.
Re:Learn Lisp the Hard Way by Avshalom on Thursday July 10, 2014 @08:00PM (#8018120)
If you're going to need to teach it for students to read and write programs in the wild than it's irrelevant whether it's 'part of the language syntax' or the ecosystem's syntax. 'Loop' is another one.

Lisp as an idea has a simple syntax but Common Lisp isn't even close to that platonic ideal.

Re:Learn Lisp the Hard Way by ScottBurson on Thursday July 10, 2014 @07:44PM (#8018054)
I don't know if it's disingenuous, but I'll agree that it may not be good marketing :-)
Re:Learn Lisp the Hard Way by gaigepr on Thursday July 10, 2014 @05:55PM (#8017600)
I am only recently a lisp user but honestly, how is the format function far from:

printf("something %s then %d finally %f!", "asd", 1, 1.2)

As mentioned, there is a loop built into format. Since lisp also has a (list) function eg: (list 'a 'b 'c 1) I still don't see an argument beyond familiarity with the C style printf syntax for why format is bad/unreadable.

Re:Learn Lisp the Hard Way by wglb on Thursday July 10, 2014 @05:59PM (#8017620)
There is a loop embedded in the lisp version.
Re:Learn Lisp the Hard Way by mcosta on Thursday July 10, 2014 @05:58PM (#8017612)
I do not understant it, but with changing ~ with % I can imagine what it does.