lucasta has quit [Remote host closed the connection]
FragmentedCurve has joined #commonlisp
kevingal has quit [Ping timeout: 265 seconds]
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
shawnw has quit [Ping timeout: 265 seconds]
JuanDaugherty has joined #commonlisp
X-Scale has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
troojg has joined #commonlisp
X-Scale24 has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
troojg has quit [Remote host closed the connection]
troojg has joined #commonlisp
svitax has joined #commonlisp
Akbar-Birbal has joined #commonlisp
svitax has quit [Ping timeout: 248 seconds]
svitax has joined #commonlisp
svitax has quit [Max SendQ exceeded]
svitax has joined #commonlisp
svitax has quit [Max SendQ exceeded]
triffid has quit [Quit: triffid]
rtypo has quit [Ping timeout: 272 seconds]
troojg has quit [Ping timeout: 260 seconds]
svitax has joined #commonlisp
svitax has quit [Read error: Connection reset by peer]
svitax has joined #commonlisp
svitax has quit [Max SendQ exceeded]
lucasta has joined #commonlisp
alcor` has joined #commonlisp
alcor has quit [Ping timeout: 265 seconds]
Pixel_Outlaw has joined #commonlisp
bh34e5 has quit [Ping timeout: 255 seconds]
<paulapatience>
Suppose I have a set of config classes which each contains a number of properties, or parameters.
<paulapatience>
These classes will be defined via mixins, where each mixin represents one or more properties.
<paulapatience>
I want to provide a macro to facilitate defining these mixins.
<paulapatience>
Which name between DEFINE-CONFIG-MIXIN and DEFINE-PROPERTY-MIXIN would be more appropriate, or unambiguous?
<paulapatience>
In the first case, DEFINE-CONFIG-MIXIN suggests that we are defining a mixin to be mixed into configs ("define mixin *for* config").
<paulapatience>
In the second, that we are defining mixins that represent properties ("define property mixin").
<paulapatience>
I can't decide which of the two is clearer.
<paulapatience>
<beach>
dnhester26: I don't think there was a Lisp OS before the ones that were written for Lisp machines.
<nil>
Early minicomputers like PDP8 and PDP11 could just boot Lisp as the only program with no other OS, but it's not really the same.
<Bubblegumdrop>
paulapatience why not the most general case define-mixin ?
<Bubblegumdrop>
paulapatience I am using mixins in a similar way. Thanks for the idea.
<paulapatience>
Bubblegumdrop: It defines some methods which make sense only in the context of config parameters. PACKAGE-NAME:DEFINE-MIXIN would be misleading in this case.
<Bubblegumdrop>
I suppose
<Bubblegumdrop>
config-mixin it is?
<paulapatience>
That's the one I'm leaning towards, because the library uses the symbol config elsewhere, and not property. I guess the only issue I was having is that sometimes FOO-MIXIN means "contains a FOO slot" and sometimes "represents a FOO". So here, DEFINE-CONFIG-MIXIN could mean "define a mixin which represents a config" or "define a mixin which will be part of a config".
lucasta has quit [Remote host closed the connection]
<Bubblegumdrop>
you know, someone suggested to me that I should use packages more heavily. perhaps this is an appropriate case for a separate package?
<paulapatience>
I have toyed with that idea as well. I will revisit it. Thanks for the reminder.
<paulapatience>
Hoten is basically (or rather, could be) a replacement for UIOP:RUN-PROGRAM and UIOP:LAUNCH-PROGRAM, but with a CLOS interface
<paulapatience>
For now it just falls back on UIOP, but I will eventually add backends for the implementations I use
<Bubblegumdrop>
neato
<Bubblegumdrop>
I tried using that other one...
<Bubblegumdrop>
INFERIOR-SHELL
<paulapatience>
Fictor is a protocol containing one (!) generic function, plus some subpackages which implement that generic function. For now just some wrappers of command-line programs (using Hoten).
decweb has quit [Ping timeout: 252 seconds]
<Bubblegumdrop>
It looks neat, it's like 2D 3D image rendering and not lisp image rendering right? :P
<paulapatience>
What do you mean by lisp image rendering? For now it renders images, I will add some wrappers for rendering meshes too, via some more command-line programs.
<paulapatience>
2D/3D images
<Bubblegumdrop>
yeah not that kind of image, the "lisp image"
<Bubblegumdrop>
like your repl reader everything loaded in at your repl
<Bubblegumdrop>
would be a neat visualization too!
<paulapatience>
Heh, well that could be an implementation of the protocol, sure
<Bubblegumdrop>
I actually came across this too https://www.unison-lang.org/ it has a neat idea taking like sha256 of the AST .. I started a bit in lisp but haven't done much yet. So many cool/fun applications.
<ixelp>
The Unison language
<paulapatience>
Inferior-shell looks interesting. I remember having seen it before. I could layer a similar interface over Hoten, as another package.
<Bubblegumdrop>
I didn't like it, I used it once and went back to uiop:launch-whatever
<Bubblegumdrop>
I didn't even end up using the code that I linked
alternateved has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
X-Scale24 has quit [Ping timeout: 256 seconds]
alternateved has joined #commonlisp
menad__ has joined #commonlisp
varjag has joined #commonlisp
menad__ is now known as menad
menad is now known as mena
mena is now known as menad
menad has quit [Remote host closed the connection]
meaty has quit [Ping timeout: 260 seconds]
menad has joined #commonlisp
<dnhester26>
beach: good morning. How are you? A while back you suggested to me to use an in memory storage for my application instead of a DB. After doing the math of my needs, you are right by like a factor of 100x haha. My question is how to actually do it to ensure persistence to the disk? Using the print and read object facilities that come with CL? or do you recommend using some library that deals with this? I basically have modeled my dat
<dnhester26>
a with classes.
<beach>
dnhester26: I am fine thank you. You too I hope.
<dnhester26>
I'm doing well as well, thank you
<beach>
It depends on how critical the application is. If writing out the data from time to time is enough, then programming the printer and the reader is good enough.
<beach>
If you need some kind of transaction facility, you could try out Clobber.
<dnhester26>
I was thinking of writing a file every few hours or maybe once a day with the state of all the objects in memory, and then maybe write some other file which contains all the transactions that happen since the snapshot is taken, that way it's easy to get back the state while avoiding writing the whole state to disk all the time.
<dnhester26>
It's for financial transactions
<dnhester26>
clobber, I'll look it up. thanks
<beach>
Then I recommend not using a snapshot at all, and to use Clobber instead.
<beach>
It is just a list of transactions. You can do some back-of-envelope calculations for Clobber as well, and you will probably find that loading the entire transaction file each time you start up the application is going to take very little time.
<beach>
And, yes, 100x is not surprising to me. People tend to get it wrong by orders of magnitude unless they actually do the calculation.
<beach>
The reason I don't recommend a snapshot is that you are then unable to change the internal data structure at some later point. Clobber makes no assumptions about how things are represented, so you can change the data structure afterwards and the transaction log will still work.
<beach>
In fact, I wrote Clobber as a reaction to "object prevalence" that uses a combination of snapshots and transaction logs.
<beach>
As I probably mentioned, my students were furious when I pointed out that 100 years of student data would fit in the RAM of the dinky laptop that I used to project the lecture slides.
<dnhester26>
changing the data structure, I don't follow that 100%. I'm going to read the demos you posted.
<dnhester26>
Are there any considerations with concurrency/parallelism? Is it in the docs and I should just read them?
<beach>
dnhester26: You use some kind of data structure to store data in your application. If you take a snapshot of the data structure, then you have just committed to not changing how that structure is organized.
<beach>
dnhester26: You should ask rainthree who as essentially taken over the maintenance of Clobber.
<dnhester26>
beach: thanks, let me read the docs and demo first, probably (hopefully) I'll understand it after I read it
<dnhester26>
thank you!
<beach>
Sure.
<beach>
It is a very simple system. A few 100 lines of code.
rtypo has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
<dnhester26>
if I'm understanding correctly the tradeoff is that using clobber I should make sure not to ever redefine any functions in the system in order to be able to get the data back, and because of that it simplifies the saving of the data. On the other hand saving only data and not functions makes it so that getting the data back is possible even if the function definitions change, however it can be very difficult dealing with the state c
<dnhester26>
hanges. Is that correct?
alcor` is now known as alcor
alcor has quit [Changing host]
alcor has joined #commonlisp
<beach>
I have not checked the details, but you should be able to keep the old functions and create new ones until you have created a log that contains only the new functions. But the functions involved are very tied to the model, so changing the functions would basically mean creating a new model, and no system can deal with that.
<beach>
Even if you save only data, you have to label it somehow as it what it is, and then you can't change those labels. Same problem.
<beach>
*as to what it is.
chomwitt has quit [Ping timeout: 265 seconds]
<dnhester26>
thanks
alcor has quit [Ping timeout: 272 seconds]
X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Read error: Connection reset by peer]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
mwnaylor has quit [Ping timeout: 246 seconds]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
reb` has joined #commonlisp
reb has quit [Ping timeout: 255 seconds]
menad has quit [Read error: Connection reset by peer]
menad has joined #commonlisp
attila_lendvai has quit [Ping timeout: 265 seconds]
random-nick has joined #commonlisp
attila_lendvai has joined #commonlisp
dnhester26 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
ingeniot has quit [Ping timeout: 256 seconds]
edgar-rft_ has joined #commonlisp
edgar-rft has quit [Ping timeout: 246 seconds]
donleo has joined #commonlisp
kopiyka_ is now known as kopiyka
yitzi has joined #commonlisp
menad has quit [Ping timeout: 248 seconds]
chomwitt has joined #commonlisp
drewjose has quit [Quit: Ping timeout (120 seconds)]
drewjose has joined #commonlisp
edgar-rft_ is now known as edgar-rft
kamafam has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
yitzi has quit [Ping timeout: 265 seconds]
treflip has joined #commonlisp
yitzi has joined #commonlisp
yitzi has quit [Client Quit]
yitzi has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
jjnkn has joined #commonlisp
dnhester26 has joined #commonlisp
decweb has joined #commonlisp
Akbar-Birbal has left #commonlisp [#commonlisp]
treflip` has joined #commonlisp
treflip has quit [Ping timeout: 265 seconds]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
treflip` has quit [Quit: Quit]
treflip has joined #commonlisp
Akbar-Birbal has joined #commonlisp
attila_lendvai has quit [Ping timeout: 248 seconds]
chomwitt has quit [Ping timeout: 246 seconds]
Th30n has quit [Ping timeout: 265 seconds]
treflip has quit [Ping timeout: 272 seconds]
<paulapatience>
Bubblegumdrop: In case you were interested, I went with DEFINE-OPERAND-MIXIN and DEFINE-OPTION-MIXIN, because the properties were being mapped to command-line options and operands anyway.
kamafam has quit [Quit: kamafam]
treflip has joined #commonlisp
younder has quit [Remote host closed the connection]
zxcvz has joined #commonlisp
treflip has quit [Read error: Connection reset by peer]
zxcvz has quit [Client Quit]
younder has joined #commonlisp
knight has joined #commonlisp
knight has quit [Remote host closed the connection]
chomwitt has joined #commonlisp
shawnw has quit [Ping timeout: 255 seconds]
knight has joined #commonlisp
knight has quit [Remote host closed the connection]
treflip has joined #commonlisp
lucasta has joined #commonlisp
yitzi has quit [Ping timeout: 276 seconds]
yitzi has joined #commonlisp
<Bubblegumdrop>
cool!
<remexre>
do any CL impls have a notion of a user-defined "keyword-like" package (either in the sense of every symbol being external or every symbol being a constant)?
<Bubblegumdrop>
dnhester26 do you utilize macroexpand or macroexpand-1 ? You asked a question about when and cond yesterday, if you do (macroexpand-1 '(when ...)) you can see what it expands into
<Bubblegumdrop>
remexre I believe that's how keywords work in CL
<dnhester26>
Bubblegumdrop: thanks, yeah, don't know what happened to me, I use both if and when all the time, not sure why my mind was just fixated on treating it like an if instead of a when. Thanks though!
<remexre>
Bubblegumdrop: right, I meant "user-defined" as in "for a package other than the standard keyword package"
<beach>
remexre: Can't you create such a thing yourself, fairly easily?
<Bubblegumdrop>
you could (inter ... :my-keywords)
<Bubblegumdrop>
I'm not sure how to make it available globally though
menad has joined #commonlisp
<Bubblegumdrop>
dnhester26 so if you (macroexpand-1 '(when ...)) you can see that it expands into an implicig progn I think is what somebody said last night
<Bubblegumdrop>
progn will evaluate all the forms and return the value of the last form evaluated I believe
yitzi has quit [Ping timeout: 265 seconds]
<remexre>
Bubblegumdrop: I think it'd need impl support for this to work in the reader, right? (read-to-string "MY-KEYWORDS:FOO") would error unless it'd been interned then
<dnhester26>
yeah thanks, the docs also say it clearly, not sure why I was stuck in my mind with the if
menad has quit [Read error: Connection reset by peer]
<Bubblegumdrop>
remexre I'm not certain perhaps beach would know better than I do. I'm aware of "trivial-readtable" which may be helpful in this scenario
<ixelp>
GitHub - melisgl/named-readtables: The official repo of named-readtables.
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
<beach>
remexre: Do you have some reader syntax in mind for symbols in this package?
<bike>
remexre: clasp has vestigial support for that, but we don't actually use it any more. i'm not sure why one would want it.
<remexre>
I'm not trying to do custom syntax, I just want ordinary references to those symbols to "work" (because all symbols in the package are external)
<beach>
remexre: OK, but how do you imagine creating such a symbol?
<remexre>
really, the answer is "yes, I do have syntax I want," but that syntax is a package-local-nickname, and I don't want to make the leading character of the nickname a macro character or something
<bike>
if it works like the keyword package, you'd only create symbols through intern, and intern would define the new symbol as constant
<beach>
I think I see. So you just want to create symbols "normally", but you want them to automatically be external and/or self evaluating?
<remexre>
yeah
<beach>
remexre: Right, what bike said. Like would *package* ever have this package as its value?
triffid has joined #commonlisp
<beach>
remexre: The only solution I can see is to use Eclector instead of the implementation-specific reader. Then you can intercept attempts to intern symbols in this special package.
<remexre>
I'll take a look at that
<beach>
bike: Do you see any other way?
menad has quit [Ping timeout: 244 seconds]
<bike>
i don't think there's any way to do it with the standard reader, no
<bike>
you could define a reader macro, like say !FOO reads as (my-intern "FOO") and that makes it a constant and such, but then that wouldn't cover intern
dnhester26 has quit [Remote host closed the connection]
menad has joined #commonlisp
treflip` has joined #commonlisp
treflip has quit [Ping timeout: 265 seconds]
skeemer has joined #commonlisp
chomwitt has quit [Ping timeout: 248 seconds]
treflip` has quit [Quit: Quit]
menad has quit [Ping timeout: 260 seconds]
menad has joined #commonlisp
treflip has joined #commonlisp
menad has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
treflip has quit [Ping timeout: 246 seconds]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pixel_Outlaw has joined #commonlisp
chomwitt has joined #commonlisp
mm007emko has quit [Ping timeout: 265 seconds]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
awlygj has quit [Quit: leaving]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester_ has joined #commonlisp
dnhester_ has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
wacki has quit [Ping timeout: 246 seconds]
wacki has joined #commonlisp
skeemer has quit [Ping timeout: 265 seconds]
pranav has quit [Remote host closed the connection]
lucasta has quit [Remote host closed the connection]
jfloren_ has quit [Ping timeout: 252 seconds]
jfloren_ has joined #commonlisp
yitzi has joined #commonlisp
Akbar-Birbal has left #commonlisp [#commonlisp]
alcor has joined #commonlisp
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
yitzi has quit [Ping timeout: 255 seconds]
King_julian has joined #commonlisp
treflip has joined #commonlisp
yitzi has joined #commonlisp
yitzi has quit [Client Quit]
yitzi has joined #commonlisp
shawnw has joined #commonlisp
King_julian has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
treflip` has joined #commonlisp
younder has quit [Remote host closed the connection]
treflip has quit [Ping timeout: 272 seconds]
younder has joined #commonlisp
younder has quit [Remote host closed the connection]
younder has joined #commonlisp
shawnw has quit [Ping timeout: 252 seconds]
<Bubblegumdrop>
remexre are you writing something like a DSL? I don't see the issue with having a single-character macro if the utility of your package is clear. E.g. in a typical prolog or forth interpreter you may have something like (defmacro <- ...) or (defmacro : ...)
<Bubblegumdrop>
if the utility of your package is clear and the system you're developing uses that package as a basis for forming a DSL I see no issues here...
<remexre>
Bubblegumdrop: more-or-less; the issue I have with a macro character is that I'd like to use ? as the local-nickname (what would be the macro character), but I have plenty of functions with names like FOO? around
cage has joined #commonlisp
cage has quit [Excess Flood]
<Bubblegumdrop>
Hmm
<Bubblegumdrop>
let me check my thesaurus
<Bubblegumdrop>
inquiry enquiry query interrogation head interrogative doubt (I kinda like doubt as a package name lol)
<Bubblegumdrop>
interrogate interview wonder
<Bubblegumdrop>
enquirer
<Bubblegumdrop>
questionarre
<Bubblegumdrop>
lol, scruple debrief feel out examine interpellate
<Bubblegumdrop>
scruple
<Bubblegumdrop>
CL-SCRUPLE
cage has joined #commonlisp
<remexre>
naming the package isn't as much of a problem as giving it keyword semantics
jjnkn has quit [Remote host closed the connection]
owenradcliffe has joined #commonlisp
skeemer has joined #commonlisp
treflip`` has joined #commonlisp
treflip` has quit [Ping timeout: 252 seconds]
chomwitt has joined #commonlisp
pranav has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.4]
attila_lendvai has quit [Ping timeout: 265 seconds]
treflip`` has quit [Quit: Quit]
szkl has joined #commonlisp
jadzi has quit [Remote host closed the connection]
kevingal has joined #commonlisp
<paulapatience>
NotThatRPG: Not sure if this is the best place to report it, but the docstrings of UIOP's CALL-WITH-INPUT-FILE and CALL-WITH-OUTPUT-FILE say they accept other keys but discard them, but they don't accept any other keys.
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
X-Scale has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
alexander1 has quit [Ping timeout: 260 seconds]
wacki has joined #commonlisp
lagash has quit [Remote host closed the connection]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
lagash has joined #commonlisp
meaty has joined #commonlisp
akoana has joined #commonlisp
owenradcliffe has quit [Ping timeout: 248 seconds]
Eoco has quit [Ping timeout: 265 seconds]
Eoco has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shka has quit [Ping timeout: 246 seconds]
mgl has quit [Ping timeout: 255 seconds]
shka has joined #commonlisp
NotThatRPG has quit [Ping timeout: 252 seconds]
elderK has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
shka has quit [Ping timeout: 265 seconds]
X-Scale has joined #commonlisp
akoana has quit [Quit: leaving]
<elderK>
Guys, I'm a little confused as to how ~^ works with ~{. From CLHS, I see that it terminates the iteration early but from my experiments, I don't quite see what it means. It only seems to have an effect when iterating on the last element on some list.
owenradcliffe has joined #commonlisp
pve has quit [Quit: leaving]
<elderK>
Ah, I see: ~^ terminates if there are no more elements.
<paulapatience>
elderK: What are some of your experiments? It basically means that the last iteration will not have the characters between ~^ and ~}.
<elderK>
paulapatience: That's what I have discovered from my experiments but that's not what the CLHS led me to believe :D
<paulapatience>
Normally used like (format nil "~{~A~^,~}" '(a b c))
<paulapatience>
to make comma-separated
<paulapatience>
I often refer to the Practical Common Lisp entry on format
<elderK>
I figured, given that ~{ is an iteration construct, that it would abort the iteration of a list early, not abort the processing of an element early :D
chomwitt has quit [Ping timeout: 252 seconds]
<paulapatience>
s/entry/chapter/
<elderK>
It's surprising from the wording in CLHS, too, that ~^ only has an effect if there are no more elements left to be processed.
<elderK>
I will check out PCL :) Thanks paulapatience
<elderK>
cltl can sometimes be more clear, too.
<_death>
it can be used to terminate the iteration early.. e.g., (format nil "~{~A~V^,~}" '(a 1 b 0 c 1 d 1))
<_death>
clhs ~^
varjag has quit [Ping timeout: 265 seconds]
<elderK>
Right but that's where it is unclear: It doesn't end the iteration itself early, it ends the execution of the stuff for the last iteration early.
mgl has joined #commonlisp
<elderK>
Like, using ~{, is it possible to say, loop over a list, printing things, until you hit a particular condition, then stop printing the list?
<_death>
no, look at my example again (and read the clhs page)
<elderK>
I would imagine you'd use ~^ there, since it "stops iteration" but it doesn't: It just stops the processing of the last iteration early.
<elderK>
Moment.
NotThatRPG has joined #commonlisp
<elderK>
Right: So it will print the , if and only if we're not iterating over the final pair of arguments.
<elderK>
paulapatience: The text from PCL was exactly what I needed, thank you.
<elderK>
"You can fix that with the ~^ directive; within the body of a ~{ directive, the ~^ causes the iteration to stop immediately, without processing the rest of the control string, when no elements remain in the list."
<_death>
the result of the format form I gave is "A,B"..
<_death>
it didn't iterate over C and D because it got a prefix argument of 0
<elderK>
That's really interesting :D
<elderK>
Where can I learn about the prefix behavior of ~^?
<elderK>
_death: Is the ~^ mentioned in the entry for ~{ the same ~^ as mentioned in your link? I assume it is but just to make sure.
<_death>
it is
<elderK>
Thank you btw :) I didn't get to this section this morning.
istewart has joined #commonlisp
<elderK>
Gosh. If I just got this far, I wouldn't have been so confused. Thanks a bunch, guys.
<elderK>
Lesson learned :)
<_death>
I don't think I ever used that functionality tbh
<elderK>
I found myself learning about it this morning as I've been writing my own version of something I found online, to try and brush off the rust and I wanted to generate a nice error message :)
<_death>
I mean prefix arguments to ~^
<elderK>
On the topic of formatting and stuff, when would you use the formatter macro?
mgl has quit [Ping timeout: 244 seconds]
alternateved has quit [Remote host closed the connection]
<_death>
in the rare case where you don't have a literal format control string (say, you generate one) and want to compile it for repeated printing (and perhaps live in the 80s where it mattered ;)
<elderK>
Ah, that makes sense. Thank you :)
<_death>
actually as formatter is a macro and the control string is not evaluated, maybe that's not useful even then..
<bjorkintosh>
elderK: brush off the rust? you're supposed to embrace Rust, don't you know?
<elderK>
bjorkintosh: Heh. I was more meaning that it's been a long time since I did any real work in CL so, I'm doing little projects where I can to get familiar again.
<elderK>
I found a macro set called "defstar" and I thought it was neat. I spent some time taking a look at how it works. I'm trying to recreate it in a way that I think is "cleaner". My goal is to like, finish that and post it online for review here. That way, I can learn more about what's good, what's bad and idiomatic and stuff.
<elderK>
I have a book on the Rust language, too and I sometimes read it but I feel more compelled to learn about CL :)
owenradcliffe has quit [Ping timeout: 252 seconds]
amb007 has quit [Ping timeout: 244 seconds]
X-Scale has quit [Ping timeout: 256 seconds]
kevingal has quit [Remote host closed the connection]
kaffcop has joined #commonlisp
alcor has quit [Ping timeout: 272 seconds]
donleo has quit [Ping timeout: 252 seconds]
kaffcop has quit [Quit: Client closed]
troojg has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
owenradcliffe has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
owenradcliffe has quit [Ping timeout: 244 seconds]