IPmonger has quit [Remote host closed the connection]
nicktick has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
cosimone has joined #lisp
cosimone has quit [Client Quit]
iAmDecim has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
EvW1 has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
cosimone has joined #lisp
cosimone has quit [Client Quit]
terpri has quit [Ping timeout: 244 seconds]
gotousan has quit [Quit: WeeChat 2.3]
Bike has joined #lisp
AmatureProgramme has quit [Quit: Leaving]
<Bike>
::notify phoe why does pitman's handler-case impl (and by extension yours) get out of the handler functions with a tagbody, instead of just immediately doing the return-from?
<Colleen>
Bike: Got it. I'll let phoe know as soon as possible.
orivej has quit [Remote host closed the connection]
orivej has joined #lisp
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 256 seconds]
_whitelogger has joined #lisp
gotousan has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
gotousan has quit [Quit: WeeChat 2.3]
bsd4me has left #lisp [#lisp]
jesse1010 has quit [Ping timeout: 240 seconds]
jasom has joined #lisp
ggoes has quit [Quit: WeeChat 2.3]
ggoes has joined #lisp
Volt_ has joined #lisp
Bike_ has joined #lisp
Bike has quit [Quit: Bike]
Bike_ is now known as Bike
space_otter has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
Oladon has quit [Quit: Leaving.]
akoana has joined #lisp
Alfr_ has joined #lisp
Jeanne-Kamikaze has joined #lisp
Alfr has quit [Ping timeout: 260 seconds]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
tda has joined #lisp
<beach>
Good morning everyone!
dominic34 has joined #lisp
Oladon has joined #lisp
tda has left #lisp [#lisp]
Bourne has joined #lisp
shangul has joined #lisp
specbot has quit [Remote host closed the connection]
minion has quit [Remote host closed the connection]
minion has joined #lisp
specbot has joined #lisp
GuerrillaMonkey has joined #lisp
iissaacc has joined #lisp
iAmDecim has quit [Quit: WeeChat 2.8]
shangul has quit [Ping timeout: 260 seconds]
Jeanne-Kamikaze has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 240 seconds]
torbo has quit [Remote host closed the connection]
Alloc has quit [Ping timeout: 240 seconds]
Alloc has joined #lisp
CEnnis91 has quit [Quit: Connection closed for inactivity]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Kaisyu has joined #lisp
Lord_of_Life has joined #lisp
ck_ has quit [Ping timeout: 265 seconds]
Alloc has quit [Ping timeout: 256 seconds]
Alloc has joined #lisp
jasom has quit [Ping timeout: 272 seconds]
jasom has joined #lisp
gravicappa has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
Necktwi has quit [Ping timeout: 240 seconds]
Necktwi has joined #lisp
Oladon has quit [Quit: Leaving.]
orivej has joined #lisp
bocaneri has joined #lisp
GuerrillaMonkey has quit [Quit: Leaving]
Bike has quit [Quit: Lost terminal]
<markasoftware>
am I allowed to modify a variable during (loop) iteration, eg, (loop for blah on my-list do (setf blah something))
narimiran has joined #lisp
Kundry_Wag has joined #lisp
<White_Flame>
markasoftware: sure
<White_Flame>
the loop stepping & termination conditions simply work on the value that's there, no matter how it got there
<White_Flame>
for loop for blah IN my-list, though, I don't think the cons stepping variable is exposed, but for for-ON whatever's in BLAH will have its cdr as the next iteration
Kundry_Wag has quit [Ping timeout: 240 seconds]
iAmDecim has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
orivej has quit [Quit: orivej]
orivej has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
Cymew has joined #lisp
CEnnis91 has joined #lisp
<markasoftware>
awesome
edgar-rft has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
hiroaki has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
dominic34 has quit [Remote host closed the connection]
Bourne has quit [Ping timeout: 260 seconds]
Alfr has joined #lisp
Alfr_ has quit [Ping timeout: 240 seconds]
<phoe>
::notify Bike What do you mean? You cannot do RETURN-FROM in this case; you need to jump from the respective handler function to the respective handler case, and from the handler case you can perform a RETURN-FROM.
<Colleen>
phoe: Got it. I'll let Bike know as soon as possible.
<phoe>
do I get the notification now?
<Colleen>
phoe: Bike said 6 hours, 16 minutes ago: why does pitman's handler-case impl (and by extension yours) get out of the handler functions with a tagbody, instead of just immediately doing the return-from?
<phoe>
Colleen: thank you
<Colleen>
Unknown command. Possible matches: 8, grant, time, tell, set, say, mop, get, have a, block,
<phoe>
:(
cgay has quit [Quit: Connection closed for inactivity]
Volt_ has quit [Quit: ]
shangul has joined #lisp
davepdot_ has quit [Remote host closed the connection]
<Bike>
phoe: second note made me understand, thank you
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
gaqwas has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
nullheroes has quit [Quit: WeeChat 2.9]
davepdot_ has joined #lisp
moldybits has joined #lisp
davepdotorg has quit [Ping timeout: 256 seconds]
IPmonger has joined #lisp
lucasb has joined #lisp
Alloc has joined #lisp
jonatack_ has joined #lisp
rumbler31_ has joined #lisp
orivej has joined #lisp
sjl_ has joined #lisp
EvW has joined #lisp
dominic34 has joined #lisp
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
dominic34 has quit [Ping timeout: 246 seconds]
frgo_ has quit [Ping timeout: 265 seconds]
srhm has quit [Read error: Connection reset by peer]
rippa has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
bsd4me has joined #lisp
srhm has joined #lisp
srhm has quit [Read error: Connection reset by peer]
cosimone has quit [Quit: Quit.]
srhm has joined #lisp
cosimone has joined #lisp
cosimone has quit [Client Quit]
Kaisyu has quit [Quit: Connection closed for inactivity]
Cymew has quit [Ping timeout: 240 seconds]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #lisp
sr-hm has joined #lisp
Kaisyu has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
srhm has quit [Ping timeout: 256 seconds]
Denommus has joined #lisp
narimiran has quit [Ping timeout: 264 seconds]
rogersm has joined #lisp
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #lisp
cosimone has joined #lisp
jonatack_ has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 260 seconds]
EvW has quit [Ping timeout: 244 seconds]
random-nick has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
te239 has joined #lisp
te239 has left #lisp [#lisp]
dominic34 has joined #lisp
rogersm has quit [Quit: Leaving...]
davepdot_ has joined #lisp
cgay has joined #lisp
davepdot_ has quit [Remote host closed the connection]
skapata has joined #lisp
davepdotorg has quit [Ping timeout: 265 seconds]
jonatack_ has joined #lisp
terpri has joined #lisp
Denommus has quit [Remote host closed the connection]
thecoffemaker has quit [Ping timeout: 258 seconds]
slac-in-the-box has joined #lisp
<slac-in-the-box>
list
slac-in-the-box has left #lisp [#lisp]
gko_ has quit [Ping timeout: 240 seconds]
rogersm has joined #lisp
zaquest has quit [Quit: Leaving]
<fiddlerwoaroof>
Is minion gone?
<beach>
minion: Are you gone?
<minion>
maybe
* fiddlerwoaroof
was confused by Colleen being used for memos here...
bitmapper has joined #lisp
zaquest has joined #lisp
orivej has joined #lisp
davepdotorg has joined #lisp
thonkpod_ has quit [Quit: WeeChat 2.7.1]
thonkpod has joined #lisp
scymtym has joined #lisp
davepdotorg has quit [Ping timeout: 244 seconds]
thecoffemaker has joined #lisp
edgar-rft has quit [Quit: Leaving]
jonatack_ has quit [Quit: jonatack_]
Lord_of_Life_ has joined #lisp
jonatack has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
srhm has joined #lisp
rogersm has quit [Quit: Leaving...]
sr-hm has quit [Ping timeout: 256 seconds]
nicktick has quit [Ping timeout: 256 seconds]
davepdotorg has joined #lisp
yitzi has joined #lisp
davepdotorg has quit [Ping timeout: 260 seconds]
Achylles has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
drl has joined #lisp
<phoe>
Bike: no problem
clothespin has joined #lisp
<pve>
any juicy tips on how to refactor a CL application? pitfalls etc
<johnjay>
>refactor
<johnjay>
wait what. i thought that was a java thing
<Bike>
no?
kilimanjaro_ is now known as kilimanjaro
<Bike>
it's just a word
<pve>
i mean tidy up the code without changing functionality
<pve>
to make it easier to add feature in the future
<johnjay>
idk. get rid of empty lines and printf statements?
<Bike>
no, rearranging the internals of the system to clean it up
<Bike>
i don't think i have any cl specific advice though
<pve>
Bike: a practical thing I often wonder is, how big should packages be
<pve>
it's hard for me to get it right, it seems
<mseddon>
hmm, how can I add a new, completely empty dispatching macro character according to the ANSI spec from a virgin lisp world? It seems to me that I'd have to first (set-syntax-from-char #\# #\PlaceholderCharacter), and then remove all the dispatch macro characters that are default, but that is silly.
davepdotorg has joined #lisp
<Bike>
mseddon: make-dispatch-macro-character, i believe
<mseddon>
Bike: doh, I knew I was being stupid. Thanks ;)
<mseddon>
readtables are quite ornamental :)
davepdotorg has quit [Ping timeout: 244 seconds]
shangul has quit [Ping timeout: 256 seconds]
ck_ has joined #lisp
<aeth>
pve: one refactoring pitfall is that you could be calling a stale version of a function after you rename it because the old function object at the old name will still exist, even if you rename and start redefining parts of the new one. So you could accidentally have two bugs (mistaken refactoring of the function that doesn't preserve behavior that isn't detected yet, and calling the old function that still behaves the old way until you rest
liberliver has quit [Ping timeout: 272 seconds]
<aeth>
restart)
ck_ has quit [Client Quit]
ck_ has joined #lisp
<aeth>
pve: e.g. (defun foobar (x) (1+ x)) then rename it to (defun foo (x) (+ 2 x)) but if you forget to change the caller, you (1) won't get any errors until you restart since the old #'foobar still exists and (2) won't notice that you're adding two instead of 1 in your refactor until you fix this first problem
<aeth>
(obviously, with such a trivial example, it's clear FOOBAR and FOO do different things)
<aeth>
More likely, you'll change some but not all of the callers.
sr-hm has joined #lisp
Lycurgus has joined #lisp
<aeth>
You can hopefully catch this if you restart your Lisp (e.g. for slime M-x slime-restart-inferior-lisp) and quickload with :verbose t (which unfortunately is quite verbose) to see errors/warnings/etc. (I think calling an undefined function is a warning in SBCL, but it might be a style warning.)
srhm has quit [Ping timeout: 256 seconds]
hiroaki has joined #lisp
<aeth>
I personally do (ql:quickload :uiop) (ql:quickload :foo :verbose t) because UIOP is very noisy in SBCL because quickloading it redefines every single function (to upgrade from the built-in UIOP to the latest)
<jackdaniel>
not the best solution, because 1. foo could have been inlined, 2. further redefinitions will require "remembering" the old name to change a definition
<aeth>
yes, but quickloading with :verbose t will warn you when foo is called at quickload time, if the implementation warns on undefined functions
<aeth>
but that would require first restarting or unbinding the function you just renamed.
<aeth>
s/restarting or/restarting, or/
iAmDecim has quit [Ping timeout: 260 seconds]
karlosz has joined #lisp
cosimone has quit [Quit: Quit.]
random-nick has quit [Quit: quit]
random-nick has joined #lisp
bocaneri has quit [Ping timeout: 260 seconds]
<pve>
aeth: thanks, that's good advice
Krystof has joined #lisp
hiroaki has quit [Ping timeout: 272 seconds]
<pve>
aeth: I've been hit by that so many times I now run my tests in a loop in a shell in a fresh image
payph0ne has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
nullheroes has joined #lisp
<pve>
although the project I'm thinking of refactoring is decently sized so I'm not sure how well the "clean compile + test" loop would work in practice
drl has quit [Quit: Ex-Chat]
dominic34 has quit [Ping timeout: 265 seconds]
karlosz has quit [Quit: karlosz]
edgar-rft has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
drl has joined #lisp
cosimone has joined #lisp
Grauwolf has quit [Quit: WeeChat 2.9]
cosimone has quit [Read error: Connection reset by peer]
akoana has joined #lisp
cosimone has joined #lisp
Grauwolf has joined #lisp
bilegeek has joined #lisp
ayuce has quit [Remote host closed the connection]
Bourne has joined #lisp
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
gravicappa has quit [Ping timeout: 256 seconds]
Lycurgus has quit [Quit: Exeunt]
skapata has left #lisp ["Ĝis"]
ggole has quit [Quit: Leaving]
pve has quit [Ping timeout: 256 seconds]
<aeth>
I set a rule for myself that I must M-x s-r-i-lisp and quickload verbosely and run any unit tests (if there are any) before pushing to the git origin. And on a few of the occasions where I've broken this rule, I've pushed broken builds. Now, of course, this won't catch every refactoring error, but it will catch the ones that the CI process will also catch.
<aeth>
But jackdaniel pointed out some other solutions that will address this particular issue without restarting... Although, I think maybe uninterning so it shows up as an undefined function and requickloading might work. Maybe.
<aeth>
Inlining in general is pretty complicated.
pve has joined #lisp
<aeth>
I'm not sure if there's a way to detect stale macros and inline functions in the callers of something that has now been redefined.
<aeth>
I think in general, if you think inlining/macros are involved, you probably should requickload and hopefully ASDF handles the redefinitions properly, at least if you redefined via changing the source rather than directly in the REPL
simendsjo has joined #lisp
<aeth>
For refactoring, there are two complicating factors that I'm aware of if you want to redefine things. Redefining packages (e.g. no longer importing something that used to be imported; adding imports is fine) and redefining structs (afaik this is because accessors might be optimized, so the inlining problem comes up again). These are the ones that SBCL sort of complains about. There might be others that are permitted by the standard.
<aeth>
And on implementations complaining about something, you have to test in CCL after refactoring because a lot of refactoring is doing things like moving things into constants, and CCL is picky about when its constants are evaluated, requiring you to EVAL-WHEN some DEFCONSTANTs.
dra_ has joined #lisp
dra_ is now known as dra
IPmonger has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
IPmonger has joined #lisp
<pve>
aeth: I'm ashamed to admit I restart my repl probably more often than most, I even have a key bound to starting a new repl and loading a session file
<aeth>
This is why I find it amusing when people don't think about the necessity of inferior-lisps in their CL Emacs clone designs. Nope, you'd still need one.
<aeth>
I save practically every keystroke, and tests could take up to minutes. They probably all should, but I don't test enough.
shka_ has joined #lisp
<pve>
hmm yeah I save all the time too, and the feedback isn't instantaneous if there's lots of tests, but saving a file won't interrupt an already started test run
<pve>
so I just like check the terminal every once in a while
<pve>
I would have liked to have a red/green indicator in the emacs modeline, but don't know how to do it
iAmDecim has quit [Ping timeout: 240 seconds]
Oladon has joined #lisp
karlosz has joined #lisp
X-Scale` has joined #lisp
<aeth>
Personally, I'd just have it retest every $interval as long as it has been modified, where $interval depends on the project (a huge library with lots of long tests vs. a tiny library with instantly-running tests)
iAmDecim has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
<pve>
that would definitely work too
<aeth>
You could even determine it auotmatically based on the first successful run of the tests, although some tests are rather random.
<aeth>
So e.g. retest every 5x the expected test length if it's short (e.g. 1 minute tests means retest 5 minutes) or 2x (e.g. 20 minute tests means every 40 minutes) if it's long, with a minimum of 5 minutes wait
<pve>
although simple, but annoying breakage like fuzzing with package exports gets caught while loading the lib/app, before the tests even run
<pve>
i mean tweaking exported symbols an such
ebrasca has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
materialfuture[m has joined #lisp
<pve>
your approach is much simpler to implement, because getting asdf to tell me which files belong to a system and messing with inotify isn't very fun
yitzi has quit [Read error: Connection reset by peer]
<pve>
but I used to dread doing package work, like splitting a package up into smaller packages, or moving stuff from one package to another, or just renaming things
<pve>
but having that tool took the dread away
simendsjo has quit [Ping timeout: 265 seconds]
<pve>
(btw I'm not saying "use my tool", because it's quite ad-hoc)
karlosz has quit [Remote host closed the connection]
engelbert has joined #lisp
davepdotorg has joined #lisp
reggie_ has joined #lisp
engelbert has quit [Remote host closed the connection]
wsinatra has joined #lisp
payph0ne has quit [Remote host closed the connection]
davepdotorg has quit [Ping timeout: 272 seconds]
Achylles has quit [Remote host closed the connection]
karlosz has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
chiota has quit [Quit: Lost terminal]
iAmDecim has joined #lisp
pve has quit [Quit: leaving]
random-nick has quit [Ping timeout: 246 seconds]
torbo has joined #lisp
gaqwas has joined #lisp
sjl_ has quit [Ping timeout: 240 seconds]
iAmDecim has quit [Ping timeout: 260 seconds]
EvW has quit [Ping timeout: 260 seconds]
shka_ has quit [Ping timeout: 260 seconds]
aeth has quit [Ping timeout: 256 seconds]
nicktick has joined #lisp
aeth has joined #lisp
gioyik has joined #lisp
payph0ne has joined #lisp
dra has quit [Quit: Leaving]
EvW has joined #lisp
Lycurgus has joined #lisp
dmiles has quit [Ping timeout: 260 seconds]
DGASAU` has joined #lisp
DGASAU has quit [Remote host closed the connection]
davepdotorg has joined #lisp
karlosz has quit [Quit: karlosz]
davepdotorg has quit [Ping timeout: 272 seconds]
DGASAU`` has joined #lisp
DGASAU` has quit [Remote host closed the connection]
Kundry_Wag has quit [Remote host closed the connection]
davepdotorg has joined #lisp
gaqwas has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
cosimone_ has joined #lisp
nicktick has quit [Ping timeout: 258 seconds]
cosimone has quit [Ping timeout: 240 seconds]
cosimone_ has quit [Client Quit]
cosimone has joined #lisp
moldybits has quit [Quit: WeeChat 2.4]
karlosz has joined #lisp
Kundry_Wag has joined #lisp
srhm has quit [Remote host closed the connection]
srhm has joined #lisp
<jason_m>
Is there a simple way to build a wrapper around a function with optional arguments, preserving the lambda list and leaving the handling of optional arguments to the underlying function?
<jason_m>
E.g. I have a function (foo a b c &optional d e) and I want to write a wrapper around it with the same lambda list, (bar a b c &optional d e). bar should supply the argument d (or e) to foo IFF d (or e) was passed to bar. The best I can come up with is using supplied-p-parameters, but that feels verbose and tedious.
Oladon has joined #lisp
<White_Flame>
&rest and apply do contain that behavior, but yeah, they don't expose the same lambda list
payph0ne has quit [Remote host closed the connection]
cosimone has quit [Quit: Quit.]
payph0ne has joined #lisp
<jason_m>
Yes that could work, but I'd lose the lambda list.
<White_Flame>
and of course, only macros have &whole
<jason_m>
I was just reading about &whole. I've never used it before.
<White_Flame>
if (defun bar (a b c &rest opts &optional d e) ...) were defined such that OPTS would encompass all the remaining params, that would help as well
<White_Flame>
but that's not allowed
vsync has quit [Read error: Connection reset by peer]
vsync has joined #lisp
<phoe>
jason_m: you could try trivial-arguments to fetch the lambda list
<White_Flame>
however, (defun bar (a b c &rest opts &key d e) ...) does work to encapsulate the keyword args, just not optional
<White_Flame>
I don't know why the distinction was made, probably optimization or something
<phoe>
and then use COMPILE or COERCE FUNCTION to build your wrapper function object
<phoe>
I mean, a combo of TRIVIAL-ARGUMENTS:ARGLIST + ALEXANDRIA:PARSE-ORDINARY-LAMBDA-LIST should be capable of constructing your wrapper lambda form
<jason_m>
phoe: I know the lambda list. My questions is more about how to call the underlying function.
<phoe>
oooh
<phoe>
I don't think that you can work around supplied-p in an easy way.
<phoe>
sounds like a task for a helper macro/function of some sorts.
<White_Flame>
the runtime overhead also is kind of dumb with those types of workarounds, even if hidden under macroexpansion
davepdotorg has quit [Ping timeout: 272 seconds]
<White_Flame>
but switching to keyword params would likely still be direct and reasonable, if you can change your protocol
<jason_m>
Appreciate the tips. I'll have to play around a bit. But I wanted to make sure I wasn't overlooking anything obvious :)
<jason_m>
I'm trying to build a wrapper around a DB library. The underlying library's function for making a connection takes several optional args, like port for example. One solution for port would be that I define my own default and always explicitly pass port. I don't like that because I think it can be confusing. I'd much rather not pass port on if I didn't get it, and let the underlying library's default values apply.
<jason_m>
Using supplied-p will get the job done. It just might get a little unwieldy.
<White_Flame>
in my opinion, losing the lambda list is not that big a deal. Just requires using documentation instead of the emacs minibuffer hint
<White_Flame>
(unless of course you rely on introspecting the lambda list and doing something funky, of course)
akoana has left #lisp ["Leaving"]
<White_Flame>
(defun wrapped-foo (a b &rest c-d-e) (apply #'foo a b c-d-e)) is a readability hack for that
<jason_m>
Oh I like that, seems like a reasonable compromise
<White_Flame>
of course, it doesn't reflect any future changes of foo's underlying parameters, but with library usage that should be pretty stable anyway