jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
NotSpooky has quit [Quit: Leaving]
mfiano has quit [Quit: WeeChat 2.0.1]
Kundry_W_ has quit [Remote host closed the connection]
mfiano has joined #lisp
robotoad has quit [Quit: robotoad]
slyrus1 has joined #lisp
dddddd has quit [Remote host closed the connection]
Naergon has joined #lisp
<didi> aeth: I usually avoid `destructuring-bind' because I feel it freezes implementation.
<whartung> ???
<mfiano> What does that even mean?
<didi> By using `destructuring-bing', I feel I won't be able to freely change a data structure implementation. So, If I say (destructuring-bind (a . b) foo ...), `foo' is set to be a cons, with `a' as the `car' and `b' as the `cdr'.
<whartung> so you’d rather return a structure or class?
<aeth> If you use destructuring-bind, you can usually tell if something doesn't match what you expect pretty quickly. If you use cadr or whatever, you might never refactor it properly
<didi> whartung: So I would rather use accessor functions.
<mfiano> If it's built out of conses, it is trivial to parse with destructuring-bind. You argument holds better for arrays or hash tables.
<mfiano> Also trivial to change
<aeth> Accessor functions are an alternative, but they're probably less efficient.
<didi> aeth: *nod*
<aeth> If you're calling (cadr foo) and (caddr foo) through inline accessor functions you're probably going through the list twice (and certainly if they're not inline), and you could have nonsense at the end unless you do another check.
xantoz has quit [Ping timeout: 256 seconds]
<pjb> if you care abt releating accesses with cadr cadddr, then you should use defstruct.
<pjb> (or clos)
xantoz has joined #lisp
<aeth> It is a minor point, yes.
<aeth> Sometimes you have no choice, though, like in macros (okay, you can probably use a reader macro to create structs at compile-time and use make-load-form-saving-slots to save the compile-time object so it's handled as a constant at runtime... but why?)
<aeth> s/compile-time/read-time/
<aeth> I wonder if make-load-form-saving-slots works at read time
akkad has joined #lisp
<aeth> I find that either accessor functions or destructuring-bind (assuming it's not in a macro) is usually the first step to replacing it with a data structure, though
<pjb> aeth: there's already a reader syntax for literal structures: #S(point :x 42 :y 33)
<pjb> and if at any time you're worried about evolutivity of an implementation choice, you can always wrap it in a macro. Don't use destructuring-bind, use your own macro, that could expand to either that, or a with-accessors or a with-slots or something else.
oldtopman has quit [Quit: *pouf*]
<didi> I've done that ^, tho I didn't feel it was better than simply using LET and accessors.
<aeth> pjb: I usually hide complicated things behind symbol-macrolet or with-accessors or something similar
fikka has joined #lisp
<pjb> didi: that is, it's better if you have to use it several times, or if it has to have an implementation that should be consistent with some other such macro or operator.
<pjb> it is easier to ensure consistency in a mechanism, when it is implemented independently and separately from the rest of the code.
dogon has joined #lisp
<pjb> Also having such abstractions helps when you need to debug, since you can easily instrument those abstractions (add checks).
<aeth> add checks for debugging?
<aeth> hah
<aeth> I usually just keep the checks in there.
<pjb> Yes. There are quick and easy checks that you can add when debugging and leave in production, but you can also add heavy checks (things that walk whole data structures, or perform complex computations to validate).
fikka has quit [Ping timeout: 240 seconds]
<pjb> Note that I speak generally, here, not specifically for CL. I'm currently working on FreeRDP written in C, and it's horrible.
<aeth> I created a typed cons cell out of structs that's about 30% slower than the built-in cons, but it saves having to walk the data structure to verify things (just check the type in O(1))
<aeth> Of course, not everything can be expressed in types like that
Kundry_W_ has joined #lisp
<pjb> note that clisp can be compiled with a clisp compilation time option to add a slot to cons cells for your own usage.
<aeth> Using structs is mostly portable because :type on a slot is usually at least somewhat respected. Full portability would require testing implementation behavior and wrapping the or check-type in places where it isn't respected on various implementations.
<pjb> Yes.
<pjb> check-type must not be used indiscriminately. Sometimes you must rely on the intrinsic type checking.
Oddity has quit [Ping timeout: 248 seconds]
dogoff has joined #lisp
papachan has quit [Quit: Connection closed for inactivity]
dogon has quit [Ping timeout: 268 seconds]
Oddity has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
patlv has joined #lisp
zachk has quit [Quit: Leaving]
edgar-rft has quit [Remote host closed the connection]
BitPuffin has quit [Remote host closed the connection]
skapata has quit [Remote host closed the connection]
milanj has quit [Quit: This computer has gone to sleep]
buffergn0me has joined #lisp
parjanya has joined #lisp
elfmacs has joined #lisp
markoong has quit [Remote host closed the connection]
fikka has joined #lisp
elfmacs has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 248 seconds]
elfmacs has joined #lisp
JuanDaugherty has quit [Quit: Exeunt]
krwq has joined #lisp
<krwq> which doc generator would you could recommend?
mindCrime_ has quit [Ping timeout: 248 seconds]
Kundry_W_ has quit [Remote host closed the connection]
<nowhere_man> I'm starting to understand the concept of delimited continuations in the basic theory, but now I wonder: what are their typical uses?
``Erik_ has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
<LdBeth> nowhere_man: multi processing
fikka has quit [Ping timeout: 268 seconds]
<White_Flame> I find undelimited continuations way more confusing than delimited
<White_Flame> delimited continuations are basically registering an lambda event handler from within a closure, for example
<White_Flame> (depending on syntactic sugar)
<White_Flame> (and depending on personal definition)
housel has quit [Remote host closed the connection]
housel has joined #lisp
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
graphene has quit [Remote host closed the connection]
edgar-rft has joined #lisp
graphene has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
robotoad has joined #lisp
bjorkintosh has joined #lisp
Kundry_W_ has quit []
Kundry_Wag has joined #lisp
robotoad has quit [Quit: robotoad]
eli_oat has joined #lisp
mindCrime_ has joined #lisp
elfmacs has quit [Ping timeout: 260 seconds]
elfmacs has joined #lisp
k4rtik has joined #lisp
robotoad has joined #lisp
elfmacs has quit [Ping timeout: 248 seconds]
shrdlu68 has joined #lisp
elfmacs has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Remote host closed the connection]
patlv has quit [Ping timeout: 248 seconds]
k4rtik has quit [Quit: WeeChat 2.1]
k4rtik has joined #lisp
k4rtik has joined #lisp
k4rtik has quit [Changing host]
Bike has quit [Quit: Lost terminal]
elfmacs has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 240 seconds]
<didi> krwq: I dislike doc generators, so I have no recommendation. But, I like this article: http://stevelosh.com/blog/2013/09/teach-dont-tell/
elfmacs has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
buffergn0me has quit [Ping timeout: 268 seconds]
brendyn has joined #lisp
jkordani has quit [Read error: Connection reset by peer]
elfmacs has quit [Ping timeout: 256 seconds]
elfmacs has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
devon has joined #lisp
Pixel_Outlaw has quit [Remote host closed the connection]
xenosoz has joined #lisp
moei has quit [Quit: Leaving...]
xenosoz has quit [Client Quit]
pseudonymous has joined #lisp
dmiles has quit [Ping timeout: 268 seconds]
dmies has joined #lisp
<akkad> org-mode ftw :P
eli_oat has quit [Quit: Leaving.]
shka_ has joined #lisp
doesthiswork has quit [Quit: Leaving.]
pjb has quit [Remote host closed the connection]
doesthiswork has joined #lisp
pjb has joined #lisp
wheelsucker has joined #lisp
dmies has quit [Ping timeout: 260 seconds]
dmiles has joined #lisp
fikka has joined #lisp
xantoz has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 240 seconds]
xantoz has joined #lisp
pseudonymous has quit [Ping timeout: 256 seconds]
elfmacs has quit [Ping timeout: 264 seconds]
moei has joined #lisp
k4rtik has quit [Ping timeout: 240 seconds]
milanj has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
vlatkoB has joined #lisp
<drmeister> Does anyone have insight into how to implement the optimization where functions that call each other within a compilation unit call each other directly?
sauvin has joined #lisp
<oni-on-ion> directly? inline?
shifty has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
nickenchuggets has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
<mfiano> pillton: I got your message. I actually get a warning when quickloading specialization-store now
buffergn0me has joined #lisp
iskander has joined #lisp
<beach> Good morning everyone!
<beach> drmeister: Instead of going through the function name, you do a relative jump since the two functions are in the same code body.
jasom has quit [Ping timeout: 256 seconds]
<beach> But, if you do that, you can no longer redefine the callee by hitting C-c C-c in SLIME.
djinni` has quit [Quit: Leaving]
nika has joined #lisp
<drmeister> Hello - yes - I realize I won't be able to redefine the callee.
<beach> Also, functions can have more than one entry point. You don't need to check the number of arguments for such a call.
<drmeister> In most cases the callee will be in the top level environment - what if it isn't?
<beach> Too early in the morning for me to figure that out.
<drmeister> Thanks
<beach> How is clasp performance doing these days, by the way?
iridioid has quit [Ping timeout: 240 seconds]
doesthiswork has quit [Quit: Leaving.]
<drmeister> I don't feel like it's been improving much lately.
dogoff has quit [Remote host closed the connection]
<beach> Do we know where improvement is needed?
<drmeister> It's like a sore tooth that I keep probing. I'm not sure where the problem is.
<beach> Oh, OK.
<drmeister> Comparing it to sbcl and clisp? Absolutely improvement is possible and needed.
<drmeister> Profiling is not very useful.
djinni` has joined #lisp
<drmeister> We are stuck on a couple of fronts. Inlining is still broken and so we can't bring the new cst compiler online. That is very frustrating.
<beach> I understand.
<drmeister> Martin is just starting up - I'm hoping for progress.
<beach> I forget, is he a compiler expert?
andrei-n has joined #lisp
elfmacs has joined #lisp
parjanya has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
fikka has joined #lisp
parjanya has joined #lisp
oldtopman has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
parjanya has quit [Read error: Connection reset by peer]
test1600 has joined #lisp
vlad_ has joined #lisp
vlad_ is now known as DonVlad
fikka has joined #lisp
<drmeister> I'm not sure - are any of us?
mlf|2 has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 240 seconds]
brettgilio has joined #lisp
test1600_ has joined #lisp
test1600 has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
Oddity has quit [Read error: No route to host]
felideon has joined #lisp
fikka has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 256 seconds]
iridioid has joined #lisp
vertigo has quit [Ping timeout: 264 seconds]
vertigo has joined #lisp
pierpal has joined #lisp
fikka has joined #lisp
iridioid has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 256 seconds]
_whitelogger has joined #lisp
milanj_ has joined #lisp
milanj has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Oddity has joined #lisp
robotoad_ has joined #lisp
lnostdal has joined #lisp
robotoad has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 260 seconds]
littlelisper has joined #lisp
buffergn0me has quit [Ping timeout: 264 seconds]
random-nick has joined #lisp
aindilis has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
xantoz has quit [Ping timeout: 240 seconds]
xantoz has joined #lisp
littlelisper has left #lisp [#lisp]
fikka has joined #lisp
aindilis has joined #lisp
milanj_ has quit [Quit: This computer has gone to sleep]
fikka has quit [Ping timeout: 240 seconds]
robotoad_ has quit [Quit: robotoad_]
milanj_ has joined #lisp
EvW has joined #lisp
littlelisper has joined #lisp
brettgilio has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 245 seconds]
xrash has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
robotoad has joined #lisp
lumm has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
shrdlu68 has joined #lisp
Domaldel has joined #lisp
haom has joined #lisp
FreeBirdLjj has joined #lisp
Tristam has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
wigust- has joined #lisp
<littlelisper> how do i retrieve and save a file? any reference is helpful
wigust has quit [Ping timeout: 264 seconds]
Tristam has joined #lisp
haom has left #lisp [#lisp]
<ebzzry> littlelisper: the canonical answer is http://www.gigamonkeys.com/book/files-and-file-io.html
<littlelisper> from web, url
elfmacs has quit [Quit: WeeChat 2.1]
elfmacs has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<littlelisper> ebzzry: thanks
<ebzzry> littlelisper: np
elfmacs has quit [Client Quit]
elfmacs has joined #lisp
fikka has joined #lisp
EvW has quit [Ping timeout: 265 seconds]
iridioid has joined #lisp
pjb has joined #lisp
iridioid has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 245 seconds]
<p_l> beach: what about maintaining a WHO-CALLS database and checking it when recompiling ?
robotoad has quit [Quit: robotoad]
sakalli_ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
BitPuffin has joined #lisp
<beach> p_l: Sorry, lost the context. Can you elaborate?
sakalli_ has quit [Quit: Mutter: www.mutterirc.com]
fikka has joined #lisp
<beach> p_l: Do you mean when a function in a compilation unit is redefined?
<p_l> regarding direct references et al, yes
<beach> It is tricky stuff. I am pretty sure you don't have the right to recompile callers from source code. The environment may have changed since last compilation.
<p_l> beach: I was thinking more of just updating the reference
<beach> To the callee?
<p_l> inside caller
<beach> The call sequence will likely have changed.
<littlelisper> compiling my defpackage gives me "bogus DEFPACKAGE option: (:USE-IMPORT-FROM :CL-PPCRE :SCAN-TO-STRINGS)"
<p_l> beach: if the interface of the callee changed, I think the code *should* error out
<beach> p_l: At the very least, the direct call contains a relative callee address and after update, it must have an indirection through the symbol or the environment.
<beach> Oh, sure. That's not what I meant.
<p_l> beach: I was thinking of using absolute addresses instead, and essentially handling it the same way one would handle GC-movable code
<beach> Well, then you are not taking full advantage of the internal call.
<p_l> beach: depends a bit on how the underlying architecture handles it
<littlelisper> sorry, its import-from. i got it
<p_l> but I can see it workable with relative references anyway
fikka has quit [Ping timeout: 260 seconds]
<p_l> also, one could patch the callee location with a jump to new code, and have GC hooks that fixup it later
<p_l> though the latter requires that all code moves only in the area supported by relative call
fikka has joined #lisp
<beach> It gets complicated.
makomo has quit [Ping timeout: 260 seconds]
<p_l> AMD64 for example only gives 32bit relative addressing, which is something I once considered for a rather "larger" compilation unit
<p_l> where compilation unit also marked all data/code to fit into 2GB block
<p_l> with a compilation unit header that had references elsewhere
<p_l> (this could be in theory applied to smaller units down to individual thunks even)
<p_l> beach: doing it like that would also fit with my ideas of marrying your single-level-storage for OS with some robust real hw :)
Bike has joined #lisp
pseudonymous has joined #lisp
<beach> Yes, I see.
<beach> Perhaps the easiest thing to do is to require the programmer to us NOTINLINE for a function that can be redefined separately. Then there is no obligation to make it work otherwise, because the callee could very well have been inlined, so that redefining it won't have any effect anyway. Then for NOTINLINE, generate a full call so that redefinition works as expected.
<p_l> then compilation unit becomes essentially a "segment" which has a external reference table, a table of its own contents, and can be as big or as small as it needs to be (because we could do transparent segment nesting)
<beach> I think I understand.
rawste has joined #lisp
<p_l> and inside a segment, the IP-relative offsets could be market by debug data and updated when necessary (done right, one could also "fork" segments)
metallicus_ has joined #lisp
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has quit [Ping timeout: 248 seconds]
metallicus_ has quit [Quit: Leaving]
metallicus has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
fikka has joined #lisp
metallicus has quit [Quit: Leaving]
hph^ has quit []
budRich has joined #lisp
littlelisper has quit [Quit: leaving]
orivej has joined #lisp
<pjb> beach: what you're describing is what is specified AFAUI.
fikka has quit [Ping timeout: 240 seconds]
<budRich> hello lisp people. Im currently in the transition phase of going from i3 to stumpwm and sublime to emacs (don't ask why). And it feels like i need to get a good understanding of and learn some lisp. It's all a bit overwhelming right now, with all the different dialects and stuff, just thought i would ask here how YOU got started: book, cource, emacs, dialect, whatever.
<Bike> stumpwm is common lisp, so go with that
<pjb> budRich: emacs lisp is different from common lisp.
<pjb> But a alot of what you'll learn in CL will be appliable in emacs lisp.
<budRich> great, this is what i thought and planned, i try to conf stump and get used to that first, before starting with emacs, it feels like it can get confusing. And wm hacking is my cup of tea.
<budRich> thanks pjb.
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
angavrilov has joined #lisp
pseudonymous has quit [Ping timeout: 264 seconds]
shifty has quit [Ping timeout: 248 seconds]
lumm_ has joined #lisp
lumm has quit [Ping timeout: 265 seconds]
lumm_ is now known as lumm
metallicus has joined #lisp
nika has quit [Quit: Leaving...]
DonVlad is now known as Murii__
BitPuffin has quit [Remote host closed the connection]
shrdlu68 has quit [Quit: Lost terminal]
random-nick has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
random-nick has joined #lisp
muyinliu has joined #lisp
Smokitch has joined #lisp
shka1 has joined #lisp
fikka has joined #lisp
BitPuffin has joined #lisp
wigust- has quit [Quit: ZNC 1.7.0 - https://znc.in]
zotan has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 248 seconds]
zotan has joined #lisp
eli_oat has joined #lisp
makomo has joined #lisp
pierpal has quit [Quit: Poof]
wigust has joined #lisp
pierpal has joined #lisp
eli_oat has quit [Quit: Leaving.]
eli_oat has joined #lisp
iridioid has joined #lisp
eli_oat has quit [Client Quit]
milanj_ has quit [Read error: Connection reset by peer]
iridioid has quit [Ping timeout: 264 seconds]
milanj has joined #lisp
rawste has quit [Quit: Sleep....]
eli_oat has joined #lisp
eli_oat has quit [Client Quit]
<beach> minion: What does AFAUI stand for?
<minion> Anergia Freedom Ambilogy Unassuming Ideoplastic
<beach> pjb: You mean the NOTINLINE etc? Sure.
orivej has quit [Ping timeout: 268 seconds]
<beach> OK, I created an appendix describing how I plan to adapt Doug Lea's allocator to SICL. I would appreciate if y'all would take a look. It is the first draft so far, and I will likely work on the details later: http://metamodular.com/allocator.pdf
<beach> shka: ↑
shifty has joined #lisp
muyinliu has quit [Quit: Textual IRC Client: www.textualapp.com]
fikka has joined #lisp
<pjb> AFAUI = mispelled AFAIUI = A Far As I Understand It; sorry.
<beach> Ah, OK.
<beach> Yes, I think you are right.
<shka1> beach: i will take a look at it tomorrow
<shka1> btw, one thing occured to me
<beach> shka1: No rush. Just thought you might be interested since I think I figured it out.
<beach> What's that?
<shka1> why do you want to coalescent blocks backward?
<shka1> aren't you starting from the very front and just move forward?
rawste has joined #lisp
<shka1> that's is garbage collector afterall
<beach> No, no. This is a global memory allocator. It handles free chunks and chunks in use.
<beach> And I can't start for be very front, because that would be the entire memory.
<shka1> oh, ok
<shka1> so not nursery
<beach> No, all memory. I will use it for the global heap.
elfmacs has quit [Ping timeout: 240 seconds]
<shka1> ok
fikka has quit [Ping timeout: 260 seconds]
<edgar-rft> I don't think it rally matters what acronyms like WRKZTG really mean because people using such things don't show the slightest interest to be understood by others, so their opinion should be totally ignored.
milanj has quit [Read error: Connection reset by peer]
<beach> I am still surprised that I seem to be one of the few people using Emacs abbrevs.
<edgar-rft> beach: in human-readable text? :-)
<beach> I don't understand.
<edgar-rft> beach: Imagine a doctoral thesis full of unexpanded Emacs abbrevs.
<beach> Why would they be unexpanded?
milanj has joined #lisp
Quetzal2 has joined #lisp
Quetzal2 has quit [Changing host]
Quetzal2 has joined #lisp
<Bike> i'm just imagining that beach types like a champion texter, but we can't tell because of all the abbreviation expansions
<beach> I mean, when I type (say here in IRC) "gme", it expands to "Good morning everyone!", and when I type "hs" it expands to "Common Lisp HyperSpec", so I don't need to expose other participants to such abbreviations.
<edgar-rft> beach: what if I wrote my doctioral thesis with vim? would emacs abbrevs expanded there?
<beach> That would be unwise.
<shka1> heh, i just found my quote of the day
<shka1> "Forgetting how to implement a Prolog system is as hard as learning how to build one."
<shka1> ;-)
zxcvz has joined #lisp
budRich has quit [Ping timeout: 256 seconds]
<edgar-rft> beach: My original rambling was about abbrevs like AFAIUI in text intended to be read by humans. Of course I have no problem if anyone uses the capabilities of his/her editor to make life less painful, as long as I don't need to read unexpanded abbrevs like AFAIUI in plain text.
<beach> I understand.
<beach> I just pointed out an easy way to avoid that, without having to manually expand those abbreviations. But I take it very few people use that way.
<edgar-rft> Many people like tp use computers to make life *more* complicated than otherwise around.
lumm_ has joined #lisp
lumm has quit [Ping timeout: 240 seconds]
lumm_ is now known as lumm
metallicus has quit [Quit: Leaving]
<Xach> /win 3
xantoz has quit [Ping timeout: 264 seconds]
malice has joined #lisp
<pjb> Ok, so the message is: go read the emacs abbrevs tutorial this week end!
<beach> Sounds right.
<pjb> I'm lazy, I've been using emacs for at least 26 years, and I never had a look at abbrev…
<shka1> :-)
<beach> pjb: Yeah, you are not alone apparently.
<pjb> On the other hand, I wrote my own pjb-erc-answers for my own FAQ answers :-)
xantoz has joined #lisp
elfmacs has joined #lisp
doesthiswork has joined #lisp
milanj has quit [Read error: Connection reset by peer]
<malice> Hi! Macro question: I'm struggling with creating this macro. Here's my effort: https://pastebin.com/4t0mGHaB
<malice> The macro is basic with simple twist: it defines another macro(with macrolet) so that I don't have to pass the variable (parser) all the time in there.
<malice> However, I get errors and I'm not sure how to get it right. The error is either "variable parser is unbound" or "variable parser-name is unbound"
TCZ has joined #lisp
<malice> both happen during macroexpansion
<malice> parser is unbound if parser-name is double-unquoted, parser-name is unbound if parser-name is single-unquoted
<Bike> maybe ,',
<shka1> ,',
<Bike> i avoid double backquote and just write it out manually with list functions, usually
<shka1> malice: i have this issues all the time, just use ,', instead of ,, for variable name
<Bike> that said, this isn't going to work
<Bike> you have (previous) expanding into another (previous ...) form
<malice> is that going to be recursive?
<Bike> so you'll just get a not-enough-arguments error. yes.
<malice> I will simply modify the name of the function the
<malice> then*
milanj has joined #lisp
<malice> Thanks for catching it Bike
<shka1> it gets confusing rather quickly
<malice> shka1: these are some great macro names :)
<shka1> thanks :P
<shka1> i don't document those on purpose :P
pseudonymous has joined #lisp
<pjb> malice, it's not obvious that previous needs to be a macro. If it was a flet, you could call the outter previous function from an inner previous function with a different signature.
<pjb> Same with match.
milanj_ has joined #lisp
<pjb> malice: and a flet can also use an outter macro of the same.
<malice> pjb: I wanted to avoid it overwriting the function slot of the previous since I wasn't sure if that wouldn't affect other functions that call it
milanj has quit [Ping timeout: 256 seconds]
<pjb> flet is lexical.
<malice> I see. My assumption was invalid then.
<pjb> just like macrolet, so you if you can use one, you can use the other.
igemnace has quit [Remote host closed the connection]
knicklux has joined #lisp
<pjb> beach: after having read (only) C.1 we don't understand why the in-use bit is stored in the next chunk. And the diagrams don't even show the next of the next chunk, so the information displayed is incomplete.
<pjb> beach: what use are the chunks that don't have free space in them? bin 0 seems useless.
sz0 has joined #lisp
<pjb> beach: page 198 s/cunks/chunks/ there are other typoes, but this one can't stay ;-)
didi has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
dddddd has joined #lisp
gabiruh has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
<beach> pjb: Thanks.
bjorkintosh has quit [Quit: Leaving]
<beach> Only free chunks have 4 words with valid data. A chunk in use has only 1, so there are 3 words for user data.
<beach> ... in the smallest chunk.
<beach> The in-use bit is stored in the next chunk so that when a chunk is freed, you can check whether the previous chunk is in use. If it is not in use, the previous word is the size and you can use it to find the beginning of the previous chunk.
<beach> If it is in use, you can't do that because the size field is then used by user data, so you must have this bit to check which case it is.
fikka has joined #lisp
jmercouris has joined #lisp
<beach> pjb: I have yet to write the section on freeing a chunk, so it is normal that this is not clear from the current document.
josemanuel has joined #lisp
karswell has quit [Ping timeout: 245 seconds]
elfmacs has quit [Quit: WeeChat 2.1]
azimut has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 245 seconds]
deng_cn has quit [Remote host closed the connection]
deng_cn1 has joined #lisp
fikka has joined #lisp
deng_cn1 is now known as deng_cn
devon has quit [Ping timeout: 256 seconds]
* beach goes off to write that section.
patlv has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
klltkr has joined #lisp
klltkr_ has quit [Quit: Lost terminal]
fikka has quit [Ping timeout: 240 seconds]
pseudonymous has quit [Ping timeout: 255 seconds]
patlv has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
nowhere_man has quit [Ping timeout: 256 seconds]
gabiruh has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
iridioid has joined #lisp
paule32 has quit [Ping timeout: 256 seconds]
<beach> OK, new section added (Freeing a chunk): http://metamodular.com/allocator.pdf
EvW1 has joined #lisp
EvW1 has quit [Client Quit]
<pjb> beach: ok. I see.
EvW1 has joined #lisp
<beach> Whew!
iridioid has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
markoong has joined #lisp
paule32 has joined #lisp
<beach> Interestingly, since these chunks are going to be used for the racks, and many racks need a size stored in them (like for arrays), I can sometimes use the size field of the chunk instead of storing the size separately.
makomo has quit [Ping timeout: 260 seconds]
makomo has joined #lisp
skapata has joined #lisp
pseudonymous has joined #lisp
pseudonymous has quit [Remote host closed the connection]
pseudonymous has joined #lisp
lumm has quit [Read error: Connection reset by peer]
pseudonymous has quit [Remote host closed the connection]
pseudonymous has joined #lisp
lumm has joined #lisp
<beach> Hmm, this thing is so simple, I should just go ahead and code it up.
pseudonymous has quit [Remote host closed the connection]
lumm_ has joined #lisp
pseudonymous has joined #lisp
lumm has quit [Ping timeout: 260 seconds]
lumm_ is now known as lumm
pseudonymous has quit [Ping timeout: 245 seconds]
montxero has joined #lisp
anewuser has joined #lisp
oni-on-ion has joined #lisp
patlv has joined #lisp
<montxero> someone has a gun to your head and says, show me a simple example of a macro in under 7 lines! It must be simple enough for a non lisper to understand once some basic rules are explained
<beach> Does it count to show how some standard macros can be implemented?
<Bike> prog1, i guess
<montxero> beach: provided it is simple enough to be groked by a non expert
milanj_ has quit [Quit: This computer has gone to sleep]
papachan has joined #lisp
<beach> Sure, prog1 will do. (defmacro prog1 (first-form &rest more-forms) (let ((result-var (gensym))) `(let ((,result-var ,first-form)) ,@more-forms ,result-var))) something like that.
Kundry_Wag has joined #lisp
<trittweiler> montxero, how about (defmacro while (condition &body body) ...)? There are many ways you can base the expansion on. Which one depends on your intended pedagogy.
Kundry_W_ has joined #lisp
<_death> (defmacro backward (form) (reverse form))
<Bike> that might be better pedagogically
Kundry_W_ has quit [Client Quit]
Kundry_W_ has joined #lisp
pseudonymous has joined #lisp
<montxero> trittweiler: What are the basic rules required to understand this
gabiruh has quit [Read error: Connection reset by peer]
<montxero> _death: interesting... why not a function? why resort to macros here
<loke> When I deonstrated macros to a non-Lisp audience I created a reverse-if, basically something that worked like IF but reversed its arguments: (IF C T F) ⇒ (REVERSE-IF C F T)
<Bike> it's totally different as a function
Kundry_Wag has quit [Ping timeout: 240 seconds]
<Bike> it lets you do things like (reverse (2 2 +))
<montxero> beach: The gunslinger cocks the gun... too much stuff to unpack in there
<Bike> because the macroexpander reverses the (2 2 +) into (+ 2 2)
<beach> montxero: I don't think you are ever going to be happy with the answer, so I give up.
<montxero> Bike: ahhhh....
<montxero> I see
<loke> (defmacro reverse-if (clause iffalse iftrue) (list clause iftrue iffalse))
<loke> Sorry
<loke> (defmacro reverse-if (clause iffalse iftrue) (list 'if clause iftrue iffalse))
knicklux has quit [Quit: Leaving]
Kundry_W_ has quit []
pseudonymous has quit [Remote host closed the connection]
pseudonymous has joined #lisp
<montxero> loke: Nice... I will pore over the slide
<montxero> beach: Nooooo don't give up... you always deliver
patlv has quit [Ping timeout: 256 seconds]
<montxero> beach: How about this... BANG! now I've shot the tip of your right shoe missing your toes by inches... c'mon gimme one
<beach> Nah. I think there are plenty of people here who can do it.
<loke> beach: Have you looked at Axiom?
<beach> loke: I don't think so. Remind me what it is.
<loke> beach: It is another CAS, separate from Maxima, although the maintainer of Maxima started the Axiom project as well, back in the 70's or something
kozy has joined #lisp
<beach> Ah, OK.
<beach> Is it also written in Lisp?
kozy has quit [Remote host closed the connection]
<loke> It's still maintained, which is fine (but odd that I didn't know about it). It runs in Common Lisp, but it's written in lterate style (like Knuth does) and it seems as though they actually don't write the code in Lisp, but rather in the Axiom language that is converted to CL.
<beach> I see.
<loke> The source files bascially contains the axiom code in comments + the CL code. it seems they pass it through a translator that converts the axiom code in the comments to respective Lisp functions.
<loke> It's odd to see:
<loke> It's a bit strange, but at the same time perhaps a good example of how you can leverage Lisp to get natively compiled Lisp code even if you use a different language.
<beach> Yes, I see. Very strange looking.
<loke> wonder how this is maintained. Dothey write the code in comments, or do they paste the result manually after making modifications?
kozy has joined #lisp
iridioid has joined #lisp
<beach> Good question.
<loke> I'm looking at some changes in the git history. The git change records a change to oboth the code in the comment, along with the corresponding Lisp code in the same diff
<loke> It must be generated from the comments.
<beach> One hopes.
<makomo> loke: it uses the literate programming methodology.
<makomo> it's not that actively maintained though, at least i got that impression
<makomo> but there's an interesting talk from one of the the authors (and the current maintainer) on literate programming
<makomo> his name is timothy daly iirc
kerframil has joined #lisp
<makomo> loke: oh you already mentioned the "literate style", i missed that, sorry :D
<makomo> the video might be interesting: https://www.youtube.com/watch?v=Av0PQDVTP4A
<makomo> only 8.8k views, heh
pseudonymous has quit [Ping timeout: 260 seconds]
lumm has quit [Quit: lumm]
troydm has joined #lisp
varjag has joined #lisp
DemolitionMan has joined #lisp
cmoore has joined #lisp
cage_ has joined #lisp
jason_m has joined #lisp
nowhere_man has joined #lisp
<oni-on-ion> loke: that is indeed neat =)
Pixel_Outlaw has joined #lisp
makomo has quit [Ping timeout: 248 seconds]
Kundry_Wag has joined #lisp
<oni-on-ion> this tripped me out yesterday, it is one of two things ive seen yesterday which really opened my mind and respect for lisp : http://www.lispology.com/show?JHE
patlv has joined #lisp
<beach> oni-on-ion: That one doesn't take into account the published results that write floating point numbers so that reading it back gives the same exact value.
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
k4rtik has joined #lisp
<beach> Wow, new-ish paper about that by Aubrey Jaffer. Nice!
Kundry_Wag has quit [Remote host closed the connection]
<loke> beach: is that a guy's name?
<beach> You bet.
nanoz has joined #lisp
<beach> I think he wrote Guile or something like that.
<Fade> somebody involved with Axiom was in here asking questions a few years ago..
<Fade> although I can't remember about what.
makomo has joined #lisp
Kundry_Wag has joined #lisp
patlv has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<oni-on-ion> beach: ah
Kundry_Wag has quit [Ping timeout: 260 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
shaftoe_ has quit [Read error: Connection reset by peer]
ebrasca` has joined #lisp
shaftoe_ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
BitPuffin has quit [Ping timeout: 264 seconds]
hvxgr has quit [Ping timeout: 256 seconds]
Tordek has quit [Remote host closed the connection]
Tordek has joined #lisp
troydm has quit [Ping timeout: 264 seconds]
juristi has quit [Ping timeout: 264 seconds]
subroot has joined #lisp
ebrasca has quit [Ping timeout: 264 seconds]
troydm has joined #lisp
<fouric> does anyone know of a macro that expands into the line number that the macro is placed at, and for bonus points, the name of the file, too?
<fouric> the big Goog is not being helpful today
<loke> fouric: Nothing standard
<loke> Lisp doesn't have any notion of line numbers
<loke> SBCL has some internal stuff for that though
<fouric> rip
<fouric> well, my fallback was to just use SWANK for form definition lookups
<fouric> which i was hoping to avoid, but if it's the only reasonable/portable option, then i'll take it
hvxgr has joined #lisp
jmercouris has quit [Ping timeout: 245 seconds]
pierpal has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
NoNumber has joined #lisp
fikka has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
cage_ has quit [Remote host closed the connection]
<Xach> fouric: sbcl's SB-INTROSPECT provides that info and is supported.
cage_ has joined #lisp
<Xach> fouric: other implementations have something similar. swank papers over the differences to be portable.
juristi has joined #lisp
_paul0 has quit [Ping timeout: 264 seconds]
paul0 has joined #lisp
fikka has joined #lisp
paul0 has quit [Remote host closed the connection]
paul0 has joined #lisp
brendyn has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 268 seconds]
paul0 has quit [Ping timeout: 268 seconds]
carmack has quit [Ping timeout: 260 seconds]
Quetzal2 has quit [Ping timeout: 256 seconds]
nowhere_man has quit [Ping timeout: 256 seconds]
igemnace has joined #lisp
<klltkr> Oo, I finally found qbase64
cage_ has quit [Read error: Connection reset by peer]
cage_ has joined #lisp
svillemot has quit [Ping timeout: 265 seconds]
<oni-on-ion> would it be trivial to use ~ instead of : for keywords ?
fikka has joined #lisp
<_death> the answer is likely "no".. but depends on what you mean by "use"
<oni-on-ion> reader macro
<_death> (defun ~-reader (stream char) (let ((*package* (find-package "KEYWORD"))) (read stream t nil t)))
patlv has joined #lisp
mflem has joined #lisp
cmoore has quit [Quit: Textual IRC Client: www.textualapp.com]
fikka has quit [Ping timeout: 264 seconds]
kozy has quit [Remote host closed the connection]
montxero has quit [Ping timeout: 260 seconds]
montxero has joined #lisp
patlv has quit [Ping timeout: 245 seconds]
montxero has quit [Quit: leaving]
lumm has joined #lisp
light2yellow has joined #lisp
subroot has quit [Read error: Connection reset by peer]
lumm_ has joined #lisp
zachk has joined #lisp
zachk has joined #lisp
zachk has quit [Changing host]
lumm_ has quit [Read error: Connection reset by peer]
bjorkintosh has joined #lisp
lumm has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
Kundry_Wag has joined #lisp
EvW1 has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
makomo has quit [Quit: WeeChat 2.0.1]
patlv has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
housel has quit [Read error: Connection reset by peer]
patlv has quit [Ping timeout: 264 seconds]
robotoad has joined #lisp
patlv has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
orivej has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
xantoz has quit [Ping timeout: 240 seconds]
patlv has quit [Ping timeout: 256 seconds]
xantoz has joined #lisp
shifty has quit [Ping timeout: 248 seconds]
light2yellow has quit [Quit: light2yellow]
patlv has joined #lisp
NoNumber has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
fikka has quit [Ping timeout: 264 seconds]
xrash has joined #lisp
metallicus has joined #lisp
kark has joined #lisp
orivej has joined #lisp
metallicus has quit [Client Quit]
phenoble- has joined #lisp
rawste has quit [Quit: Sleep....]
rawste has joined #lisp
fikka has joined #lisp
rawste has quit [Client Quit]
terpri has quit [Ping timeout: 268 seconds]
kruhft has quit [Ping timeout: 265 seconds]
raynold has quit [Quit: Connection closed for inactivity]
Kundry_W_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
robotoad has quit [Quit: robotoad]
sauvin has quit [Ping timeout: 248 seconds]
Kundry_W_ has joined #lisp
sauvin has joined #lisp
nowhere_man has joined #lisp
metallicus has joined #lisp
sauvin has quit [Max SendQ exceeded]
sauvin has joined #lisp
robotoad has joined #lisp
pagnol has joined #lisp
buffergn0me has joined #lisp
jason_m has quit [Quit: Leaving]
patlv has quit [Ping timeout: 268 seconds]
phenoble- has quit [Quit: ZNC 1.7.0 - https://znc.in]
Kundry_W_ has quit [Remote host closed the connection]
fikka has joined #lisp
Kundry_Wag has joined #lisp
metallicus has quit [Quit: Leaving]
Kundry_W_ has joined #lisp
gabiruh has joined #lisp
josemanuel has quit [Quit: leaving]
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
nickenchuggets has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
pseudonymous has joined #lisp
housel has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
shka1 has quit [Ping timeout: 256 seconds]
k4rtik has quit [Ping timeout: 256 seconds]
nanoz has quit [Ping timeout: 260 seconds]
cage_ has quit [Quit: Leaving]
patlv has joined #lisp
Murii__ has quit [Remote host closed the connection]
fikka has joined #lisp
Murii__ has joined #lisp
rawste has joined #lisp
phenoble has joined #lisp
igemnace has quit [Quit: WeeChat 2.1]
Smokitch has quit []
jasmith has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 268 seconds]
didi has joined #lisp
Kundry_W_ has quit []
Kundry_Wag has joined #lisp
<didi> Is there some kind of hook in SBCL or SLIME that runs after a form is evaluated in the REPL?
pierpal has joined #lisp
andrei-n has quit [Read error: Connection reset by peer]
pierpal has quit [Client Quit]
pierpal has joined #lisp
andrei-n has joined #lisp
fikka has joined #lisp
pierpal has quit [Ping timeout: 256 seconds]
patlv has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
krwq has quit [Remote host closed the connection]
paule32 has left #lisp ["Leaving"]
jasmith has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
lnostdal has quit [Quit: https://www.Quanto.ga/]
ebrasca` is now known as ebrasca
lumm has joined #lisp
patlv has joined #lisp
lnostdal has joined #lisp
pseudonymous has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
nowhere_man has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 248 seconds]
andrei-n has quit [Ping timeout: 248 seconds]
elimik31 has joined #lisp
Arcaelyx has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
nowhere_man has joined #lisp
terpri has joined #lisp
buffergn0me has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
rawste has quit [Quit: Sleep....]
fikka has quit [Ping timeout: 256 seconds]
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
<flip214> _death: that's not quite enough, ylou
<flip214> *you'd have to set SYMBOL-VALUE of the symbol read to itself too
gabiruh has quit [Ping timeout: 264 seconds]
<flip214> not sure whether that happens with a simple READ already
<flip214> didi: you could try *send-repl-results-function* or *listener-eval-function*
<flip214> to use for that
<didi> flip214: Thank you.
<flip214> didi: you're welcome!
buffergn0me has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
elimik31 has left #lisp ["ERC (IRC client for Emacs 24.5.1)"]
nowhere_man has quit [Remote host closed the connection]
DemolitionMan has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
nowhere_man has joined #lisp
angavrilov has quit [Remote host closed the connection]
lavaflow has quit [Read error: Connection reset by peer]
lavaflow_ has joined #lisp
svillemot has joined #lisp
python476 has joined #lisp
Domaldel has quit [Quit: Leaving]
graphene has quit [Remote host closed the connection]
jason_m has joined #lisp
graphene has joined #lisp
fikka has joined #lisp
k4rtik has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
raynold has joined #lisp
gabiruh has joined #lisp
patlv has quit [Ping timeout: 264 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
lavaflow_ has quit [Ping timeout: 240 seconds]
lavaflow_ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Jesin has joined #lisp
test1600_ has quit [Ping timeout: 268 seconds]
milanj_ has joined #lisp
malice has quit [Remote host closed the connection]
mflem has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
Murii__ has quit [Remote host closed the connection]
python476 has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 256 seconds]
vlatkoB has quit [Remote host closed the connection]
jasmith has quit [Quit: Leaving]
ebrasca has quit [Read error: No route to host]
ebrasca has joined #lisp
random-nick has quit [Ping timeout: 268 seconds]
xantoz has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
xantoz has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
jasmith has joined #lisp
fikka has joined #lisp
python476 has joined #lisp
lumm_ has joined #lisp
lumm has quit [Ping timeout: 268 seconds]
lumm_ is now known as lumm
fikka has quit [Ping timeout: 248 seconds]
guaqua has quit [Ping timeout: 240 seconds]
gabiruh has quit [Ping timeout: 260 seconds]
guaqua has joined #lisp
patlv has joined #lisp
iridioid has quit [Quit: WeeChat 2.1]
buffergn0me has quit [Ping timeout: 264 seconds]
TCZ has joined #lisp
k4rtik has quit [Ping timeout: 265 seconds]
edgar-rft has quit [Remote host closed the connection]
jason_m has quit [Ping timeout: 265 seconds]
nowhere_man has quit [Ping timeout: 260 seconds]
<stacksmith> Good day. Could someone explain the difference between sb-walker::env-lexical-variables and sb-c::lexenv-vars ? The latter seems to be stored in the :vars slot of SBCL's environment structure... The former seems to be available only as a predicate sb-walker::var-lexical-p...
<pjb> Perhaps better on #sbcl
<stacksmith> indeed.
nowhere_man has joined #lisp
<hjudt> is there an easy way to remove parts of a string from beginning or end? like say (remove-suffix "-string" "from-my-long-string")?
<stacksmith> hjudt: if you know the lengths, (subseq ...
<hjudt> maybe already implemented in some lib?
<hjudt> stacksmith: that's how i do it atm, but it is a bit awkward to use and to write, a proper wrapper would be nice...
al-damiri has joined #lisp
<didi> Sometimes I want to iterate over lists inside macros, but I don't want DOLIST NIL block get in the way (because I want to use the NIL block myself). What do you think? https://paste.debian.net/hidden/38c9fc77
<stacksmith> hjudt: it's one line of code.
graphene has quit [Remote host closed the connection]
patlv has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Remote host closed the connection]
graphene has joined #lisp
DGASAU has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
Kundry_W_ has joined #lisp
<stacksmith> did: why not just use LOOP? or mapcar?
<stacksmith> Or wrap ,@body in its own block?
TCZ has quit [Quit: Leaving]
<didi> stacksmith: Because, as far as I understand it, LOOP defines a nil BLOCK and I want to avoid MAPCAR function calls. In respect to body's own block, if block calls RETURN, it will still stop at the enveloping nil block.
patlv has joined #lisp
<stacksmith> That seems to make sense. A minor annoyance is that your body cannot start with declarations because of the setf... which could be moved to follow body - I've also used pop in similar situations... I think it compiles to the same code...
mflem has joined #lisp
varjag has quit [Ping timeout: 265 seconds]
mflem has quit [Client Quit]
jasom has joined #lisp
impulse has quit [Ping timeout: 245 seconds]
impulse has joined #lisp
eli_oat has joined #lisp
<didi> stacksmith: Ah, true. I'm yet to use this outside macros, and I didn't need to use declarations inside it, tho I've used declarations deep inside these things.
eli_oat has quit [Client Quit]
patlv has quit [Ping timeout: 268 seconds]