libera/#commonlisp - IRC Chatlog
Search
22:29:31
Josh_2
I dont know how to help you with your problem :( Sounds like a lot of information about the system is required to find the solution
22:51:04
fe[nl]ix
sm2n: thanks, I committed https://github.com/sionescu/bordeaux-threads/commit/d5692d93ab8185fa74a378360276c996186273bb
0:54:03
Guest74
For those who use multiple desktops/workspaces any thoughts on strings vs keywords for naming them? Finally reworking my window manager.
0:55:47
Guest74
I'm thinking mainly of my repl use. But I'm sure many others don't care about manipulating their wm from the repl.
0:57:54
Guest74
The only hesitance I have with keywords is how do I display them in gui tools. As a keyword? or as the symbol-name? keyword might look weird, a symbol-name might be misleading. Or once again i'm overthinking it.
2:25:13
sm2n
I'm writing a (s-exp based of course) DSL, and trying to understand different approaches. One way to do it would be to just have a macro that expands out the entire thing, but another approach I was considering was to basically write a simple interpreter that has a compiler macro, which could be expanded recursively.
2:26:09
White_Flame
it all depends on the complexity you want. macroexpansion is fine for literal expansion with no further analysis
2:26:51
White_Flame
but really, any analysis you perform could either be done at compile time or at evaluation time, all depends on where the function calls are made
2:28:06
White_Flame
but once your macro reaches a certain size, it's certainly helpful to break out a bunch of functions to handle the various subclauses. these functions can either be called by the macroexpander, or by the expanded code, or externally if your macro just generates a datastructure
2:35:20
Josh_2
if you have a macro that expands out the entire thing then it should be trivial to add a compiler macro
3:33:03
White_Flame
sm2n: oh sorry, didn't read that as "compiler macro" originally. I haven't done that approach
5:04:21
yottabyte
either one. I was trying to use remove-if/delete-if but yeah. I could do what mfiano is saying
5:06:47
Bike
the remove/delete-if incantation would be something like (remove-if (constantly t) sequence :start n :count 1), i guess
5:20:17
mfiano
I'd use them all in different parts of the code, to please and displease everyone all at once.
5:22:31
mfiano
My original solution was to do it without walking twice. I'm not sure how remove-if/delete-if is usually implemented, but that is certainly more readable, if not more efficient than that one ^
5:23:38
White_Flame
if you walk once, you're going to be allocating as you go, and tail share the rest. if the element is not found, then those copies are redundant
5:24:49
White_Flame
also, if you're removing the first element, that's a special case as it's not the CDR of anything
5:27:23
White_Flame
you can (let ((temp-list (cons nil list))) ...setf cdr stuff... (cdr temp-list)) to operate in full cdr mode without special case for removing the head