freenode/#lisp - IRC Chatlog
Search
15:56:07
rumbler31_
I'm kinda dumb right now. why is it a good practice to use that prefix when specifying, say, quicklisp packages to load. And also, whats the preferred library for doing things like copying files? UIOP?
15:58:16
jdz
But it basically boils down to interning arbitrary symbols in whatever package the user currently happens to be.
16:06:46
beach
rumbler31_: More important than the random interning is that you send a clear signal to the person reading your code, that the package of the symbol is of no importance, and the only important thing is the name.
16:09:04
remexre
If I want to define the same :around on a whole group of generic functions, what's the right way to do this? is there some mop trick, or am I better off just using macros
16:11:57
beach
A method can be present on at most one generic function, so you have to make distinct methods.
16:13:14
remexre
if I adjust my wording to, "define an :around on any generic function (that opts into it, perhaps with a special method combination?)" is that more possible?
16:14:35
beach
I mean, you can certainly do all this programmatically. After all, the DEFMETHOD form expands to some calls to functions.
16:41:31
cage_
hi! why (cl-ppcre:split "\\n" (format nil "~2%s")): => ("" "" "s") but (cl-ppcre:split "\\n" (format nil "~2%")); => nil ?
16:44:56
jackdaniel
I once had a problem and I thought: I know, I will use regexps! Then I had two problems.
16:45:22
rumbler31_
its not clear to me what the argument to asdf:system-weakly-depends-on should be. I've tried '#:project-name and "project-name"
17:04:41
cage_
this is tangential, but i'd love if there was a discourse (web forum) instance about lisp, maybe hosted on common-lisp.net
17:21:46
fiddlerwoaroof
cage_: if you don't actually need regular expressions, there's split-sequence
17:30:44
fiddlerwoaroof
It's interesting how all these split functions implement the keyword argument that limits the number of items in the return value differently
17:36:32
fiddlerwoaroof
the count counts the number of times the string is split, so the number of resulting elements is count+1
18:07:24
remexre
is the point of boole that it might be calling out to like, a hardware blitter or something?
18:09:39
cage_
rumbler31_, my very personal beliefs make me stay away from proprietary/surveillance platform, of course i hav eno problem if other find this platform useful but just they are not for me
18:10:52
Nilby
remexre: Yes, but it can have other uses. For exmaple CLX uses the bool-* symbols as the drawing function in the graphics context.
18:15:32
Nilby
One can do other interesting things with boole, like database bitmap index operations.
18:28:47
rumbler31_
anyone know why ensure-directories-exist would fail, when all but the last folder in the given path is created?
18:40:42
mfiano
All but the last directory being created implies you are supplying a file pathname, so fix it with make-pathname or wrap it in the above
18:42:41
rumbler31_
(ensure-directories-exist "/home/user/quicklisp/local-projects/project/project-bundle/local-projects/project/" :verbose t)
18:57:21
rumbler31_
i'm spending an inordinant amount of time getting common lisp to make a new directory and copy 3 files into it. sorry to gripe
19:04:40
Nilby
One simple way to see what's actually happening, is to trace the systems calls using something like strace on linux or truss on bsd, so you can see what actual file system call might be failing.
19:41:09
rumbler31_
Nilby: So there's a lot of lstatting of the right paths, I don't understand enough to find the syscalls for copying files
19:52:46
Josh_2
just found a program breaking bug that was because I missed the : on my :initarg definition
20:36:29
rumbler31_
it goes all the way down to two with-open-file macros and just copies the a buffer at a time into the output stream, and if
20:58:42
rumbler31_
derp tried to make a bundle that didn't include quicklisp that includes a function to call quicklisp bundle.... dummy <-----
21:00:02
rumbler31_
I want to make a bundle of a project, I guess none of the functions I wrote depend on the original package
21:00:22
rumbler31_
seems kinda hacky to just make another package that assumes things about another, like file paths and project names
21:06:05
Nilby
Since Quicklisp can't really be an asdf or quicklisp dependency, then unless you always install it as part of your own installation, things have to check for it manually before using it.
21:23:36
Nilby
Yes, but I'm pretty sure one might get different results loading it in it's recommended way, vs. just asdf loading it.
21:46:56
monaliza
Heyo! I've recently learned common lisp and i've read a book about it, I've been kind of indecisive for which other vlafor of lisp i should start using next, because of how many flavours there are. I'm mostly really interested in functional programming, and I'm a real fan of haskell-ish syntax, where it's short, makes sense, and works rather well. I've heard about Racket lisp, Arc lisp, and Scheme,
21:46:59
monaliza
and I'm getting mixed signals on which one I should try to extensively dive into first
21:49:16
moon-child
monaliza: you are unlikely to get very many responses here, because this channel is specifically about common lisp. That being said: I would avoid arc. Racket and scheme are both nice enough, and you may also want to look at coalton
21:51:05
monaliza
My fault for not reading the first word of the topic, I'm very sorry! And, thank you very much!
21:57:40
kagevf
use CL so you have the flexibility to take advantage of other styles when FP isn't a good fit
21:59:00
kagevf
also, if you want FP only no matter what, maybe consider clojure ... with the caveat that it's on the jvm
22:35:15
no-defun-allowed
m00natic: IIRC {} and [] in Scheme produce equivalent syntax to (), so you could write (let ([x 1]) x) in Scheme or even [let [[x 1]] x]
22:38:06
moon-child
seems chicken does exactly as you say, guile doesn'tlike {}, and s7 doesn't like either
23:01:14
edgar-rft
the beatiful thing with Scheme is that there are so many *different* syntax schemes you can choose from
23:35:47
kagevf
in CL could you write a reader macro to do the same thing? to make [] and {} act like ()?
23:36:40
kagevf
ok, that's what I thought ... do they exist as part of the standard, or in a library?
23:37:28
fiddlerwoaroof
There's also things like this that port the good bits of Clojure's syntax: https://github.com/joinr/clclojure/blob/master/reader.lisp
23:38:11
fiddlerwoaroof
So, technically, libraries aren't supposed to use these characters in the standard readtable
23:38:38
fiddlerwoaroof
However, libraries are free to provide their own readtables, and named-readtables exists to make that process nicer
23:39:06
fiddlerwoaroof
Also, personally, I tend to think "whatever a library can do should be left out of the standard as much as possible"
0:53:42
Bike
{} and [] are reserved in the sense that the implementation can't use them. there's no restrictions on programmer users, library writers or not. named readtables is probably still a good idea tho.
1:24:33
aeth
You'd probably want #[...] and #{...} instead of just [...] and {...} to make it really clear that it's a reader macro