Search
Saturday, 6th of March 2021, 5:48:25 UTC
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!
16:02:43
Josh_2
Whats the best resource for learning about compiler macros? I'm pretty sure there is a section in lol but I can't find it
16:08:11
heisig
Josh_2: I think I learned most of what I know by searching all Quicklisp projects for DEFINE-COMPILER-MACRO.
16:08:26
Josh_2
I thought I might have to do that
16:08:41
heisig
I can share my number one rule about using compiler macros: "Try inlining first"
16:08:55
Josh_2
I don't really have a use case right now, i'm just curious
16:09:58
heisig
I also have some more specific rules, like "Never use &key in a compiler macro's lambda list".
16:11:44
heisig
https://lispcookbook.github.io/cl-cookbook/macros.html mentions a talk by cbaggers that also seems to explain compiler macros.
16:12:06
Gnuxie[m]
there's also this https://web.archive.org/web/20160306051951/http:/pentaside.org/paper/compilermacro-lemmens/compiler-macros-for-publication.txt
16:18:22
beach
And thanks to call-site optimization, compiler macros may soon be a thing of the past. :)
Saturday, 6th of March 2021, 17:48:25 UTC