Search
Saturday, 6th of March 2021, 3:50:15 UTC
3:51:00
Bike
there is no particular way to see just what you've defined. a problem with that is that functions newly defined since the lisp started up may include e.g. IDE stuff you didn't define yourself
3:51:19
Bike
you could approximate it doing... let me write this out
3:51:21
ozzloy
so with do-symbols, i get 1005 things
3:52:03
ozzloy
oh, thanks! but don't worry if it turns out it's kinda a hairball
3:52:34
Bike
(let (c) (do-symbols (s "CL-USER" c) (when (eq (symbol-package s) (find-package "CL-USER")) (push s c))))
3:52:58
Bike
this will collect symbols that are (a) accessible from the cl-user (repl) package, and (b) are not part of some other package
3:53:12
Bike
for example your do-symbols form will include every symbol in the CL package, which is accessible from the cl-user package
3:53:17
Bike
and which includes 900-something symbols
3:53:24
Bike
you probably don't want those
3:53:39
Bike
my form here gets me 29 symbols, which isn't too bad
3:53:51
Bike
you can of course impose boundedness conditions as well
3:54:18
ozzloy
all right, that's much more manageable, 63 things
3:54:55
ozzloy
yep, those all look familiar. thanks Bike
3:55:22
ozzloy
apparently i defined add1 at some point and it's not a built-in
3:55:40
Bike
glad to be of assistance
3:56:39
ozzloy
b .bb.b but prefix!!!
3:56:54
ozzloy
shouldn't it be +1 ?
3:57:50
alandipert
(1+ 2) has a cool infix vibe though
3:58:42
Bike
1- always confuses me a little
3:58:54
Bike
not that -1 would be any better
3:59:01
Bike
+1 and -1 would be interpreted as numbers
3:59:39
ozzloy
i mean, i guess the operator is named "1+" and so it is still prefix... but the "+" though!
3:59:57
ozzloy
oh wow, 1- is kinda ugly
4:00:11
ozzloy
(1- 5), well that's 4 of course!
4:00:15
beach
Good morning everyone!
4:01:19
ozzloy
common lisp is fun though
5:52:23
asarch
Is there any tool to render calendars?
5:52:34
asarch
Just like the Unix cal tool does?
5:53:34
beach
asarch: I think you should take that on as a project, using McCLIM.
5:54:06
beach
Then I can give up Google calendar
5:54:48
asarch
I need it as text to send it to a template in a web application
5:55:08
beach
OK, then forget what I said.
5:57:22
beach
I can't stand the web. Not use it, and even less program it.
8:22:20
asarch
If I have: "<p>Lorem ipsum</p>", how could I remove the HTML tags with a regexp?
8:28:02
moon-child
asarch: https://stackoverflow.com/a/1732454
8:28:14
moon-child
that being said, the easy solution is: search for and replace "<[^<>]*>" with ""
8:28:53
moon-child
a slightly more sophisticated solution would also look for quotes inside the tag and ignore <> inside of those
8:30:00
moon-child
like ("(\\"|[^"])*"|'(\\'|[^'])*'|[^<>])*
8:30:03
moon-child
but with extra escapes
8:30:42
moon-child
(I don't remember if you can escape single quotes in html, if not then the second branch can just be '[^']*')
8:34:28
asarch
Well, in a more general fashion like: <span>Lorem ipsum</span>
8:34:45
asarch
Or even: <title>Lorem ipsum</title>
8:45:13
asarch
Anyway, thank you moon-child
8:45:17
asarch
Thank you very much :-)
11:06:07
VincentVega
Is there a way to skip an iteration in loop?
11:07:50
VincentVega
What does it depend on?
11:07:59
beach
With FOR IN and FOR/AS arithmetic, you have to surround the body with a conditional. But with FOR THEN you can control everything.
11:09:40
VincentVega
"surround the body with a conditional" do I understand correctly that that would involve putting the whole body in a do clause?
11:11:08
VincentVega
Hm, I see, will look into the "for then" business then. Thank you!
Saturday, 6th of March 2021, 15:50:15 UTC