freenode/#lisp - IRC Chatlog
Search
11:06:16
jmercouris
somehow deleting the key argument in request-resource-block causes the error to go away
11:25:17
trocado
(rename-file #p"test/current/" #p"test/123/") is saying it can't rename [current dir]/test/current/ to [current dir]/test/current/test/123/
11:28:45
Shinmera
"The primary value, defaulted-new-name, is the resulting name which is composed of new-name with any missing components filled in by performing a merge-pathnames operation using filespec as the defaults."
11:29:54
Xach
i think this is widely unexpected behavior, but it does allow some shortcuts if you have it memorized. like (rename-file "/My/cool/file/frob.lisp" "frob-backup") => "/My/cool/file/frob-backup.lisp"
11:32:24
Xach
it has internal logic at least. the problem with intuition and expectation is it's formed by whatever you learn first, and i learned a different style first (unix mv style).
14:25:53
srandon111
guys what is meant by "natural recursion"? and what would it be a "non-natural recursioN" ? i found a post on stackoverflow but wasn't able to understand still
14:30:31
dlowe
yeah, I would interpret as "solving a problem particularly amenable to recursion" but it's not a term of art
14:34:05
beach
I am sure if Daniel Friedman came up with those examples, he probably also supplied a definition of the term.
14:34:45
edgar-rft
-> https://stackoverflow.com/questions/32260444/what-is-the-definition-of-natural-recursion
14:38:05
phoe
it seems to be related to natural numbers, and the most natural operations on these: a check whether a number is zero, adding one to a number, subtracting one from a number
14:38:57
Bike
well i mean it's not actually natural number related https://en.wikipedia.org/wiki/Natural_transformation
14:40:26
phoe
if you want to add 1 and 2 in the natural form, you get the stack of (add1 (add1 (add1 0))) which is a Church-encoded 3
14:53:17
_death
(there is also a http://cmsc-16100.cs.uchicago.edu/2015/Lectures/04-natural-recursion.php )
15:52:24
jcowan
specifically, structural recursion is correct based on the correctness of structural induction over the domain
16:17:37
Xach
vms14: no, there is no flag like that, put (load ...) in your script if you want to use quicklisp.
16:25:28
vms14
like this? #!/usr/pkg/bin/sbcl --load /home/vms/quicklisp/quicklisp/setup.lisp --script
16:33:03
vms14
does work fine, but I have to add --noinform because if not prints a banner even having --script
17:58:54
srandon111
why for example in other lisps such as clcojure the usage of macros is not encouraged ?
18:05:51
fiddlerwoaroof
srandon111: my experience with Clojure is that many of the developers come from other languages to it and, so, they don't see the value of macros
18:08:06
fiddlerwoaroof
Another problem is that some macros (go in core.async) use code-walkers to do major program transformations and end up pretty brittle
18:12:13
conjunctive
srandon111: They believe macros are more difficult to compose than functions, and tend to design interfaces around hash-table literals.
18:16:46
srandon111
is there any good resource walking you step by step from simple examples to more commples examples ? conjunctive
18:20:48
conjunctive
srandon111: I agree with fiddlerwoaroof, Practical Common Lisp is a great introduction.
18:20:50
conjunctive
I have heard good things about Let Over Lambda, for working extensively with macros.
18:21:52
fiddlerwoaroof
Let Over Lambda is a bad introduction because a couple of its examples dont' work
18:23:18
phoe
after reading multiple Lisp books, I've often come back to Graham's ANSI CL, Practical Common Lisp, On Lisp, CL Recipes
18:23:20
White_Flame
on lisp does make a bunch of little utility macros that aren't possible to write as functions
18:25:19
White_Flame
regarding let-over-lambda, having used codebases written to its style, I vehemently oppose it for actual work
18:26:20
phoe
srandon111: a library that is considered by some people to be an essential supplement to the CL package
18:27:50
conjunctive
srandon111: You can find the repo at https://gitlab.common-lisp.net/alexandria/alexandria
18:28:21
White_Flame
although as a learner, the simpler On Lisp utilities are easier to see how they're written
18:28:44
White_Flame
if you go through the alexandria source code, there's a lot more mindfulness to optimization and ease of use that makes it more complex
18:29:49
conjunctive
On the topic of Lisp books, would you recommend any prelimary material for the MOP book?
18:31:02
jcowan
LOL is a careful and thorough explanation of how to do things with macros that are not even worth doing.
18:35:46
fiddlerwoaroof
the first couple chapters of AMOP are a fairly good example of how to design a complex system in common lisp and wrap in in macros
19:15:30
ahungry
http://rosettacode.org/wiki/Compose_function#Common_Lisp - thats a good sample if you want to just roll your own, its pretty simple/small
20:33:25
pjb
srandon111: people tend to discourage the use of what THEY cannot master. For example, in C, it is strongly discouraged to use inner functions, since it's impossible to write them. In C++ it's discouraged to use OOP, since they cannot do multiple inheritance correctly. etc.
20:56:03
aeth
pjb: "Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?" https://en.wikiquote.org/wiki/Brian_Kernighan
20:56:28
aeth
in particular, anything here in this thread about C's switch is clever: https://news.ycombinator.com/item?id=22789304
20:59:14
aeth
Lisp also makes it possible to have things be undebuggable that are debuggable in other languages. e.g. most uses of the programmable reader
20:59:16
phoe
but it also makes it possible to write 100% clusterfuck code that is impossible to debug even in Lisp