kaftejiman has quit [Remote host closed the connection]
minion has quit [Remote host closed the connection]
specbot has quit [Remote host closed the connection]
specbot has joined #lisp
minion has joined #lisp
nullheroes has quit [Quit: WeeChat 2.9]
vutral has quit [Quit: Connection closed for inactivity]
mrcom has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 264 seconds]
galex-713 has quit [Ping timeout: 272 seconds]
marusich has joined #lisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
terpri_ has joined #lisp
terpri has quit [Ping timeout: 244 seconds]
orivej has joined #lisp
_jrjsmrtn has joined #lisp
<remexre>
hm, if I wanna rigorously measure the performance of my code (for preventing performance regressions in a certain function), is there standard tooling for doing so?
__jrjsmrtn__ has quit [Ping timeout: 240 seconds]
<mfiano>
trivial-benchmark should be decent
<remexre>
ooh, that looks nice
ghard has quit [Ping timeout: 260 seconds]
<remexre>
oof, though when I quickload it, I get an error about it violating the sb-impl package lock
Bourne has quit [Read error: Connection reset by peer]
<aeth>
If you're in SBCL, there are some good non-standard tools for measuring performance.
<mfiano>
remexre: ensure SBCL and the Quicklisp dist are up to date. It works here using latest for both
<remexre>
ah, yeah, I'm on sbcl 1.4.9
rumbler31 has quit [Remote host closed the connection]
<remexre>
I should poke the gentoo maintainers to mark the newer ones as stable...
<mfiano>
Ouch. more than 2 years is an eternity in the software world
<mfiano>
sbcl-1.4.9: June 28, 2018
wildbartty has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 256 seconds]
ralt has quit [Quit: Connection closed for inactivity]
<remexre>
okay, 2.0.4 wor
<remexre>
works, even
wsinatra has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` has joined #lisp
X-Scale` is now known as X-Scale
gko_ has joined #lisp
mrcom has joined #lisp
caltelt has quit [Ping timeout: 246 seconds]
rumbler31 has joined #lisp
ldb has joined #lisp
ldb has quit [Read error: Connection reset by peer]
ldb has joined #lisp
<ldb>
good morning
_whitelogger has joined #lisp
ldb has quit [Remote host closed the connection]
ldb has joined #lisp
nmg has joined #lisp
space_otter has joined #lisp
Alfr__ has joined #lisp
Alfr_ has quit [Ping timeout: 260 seconds]
_whitelogger has joined #lisp
ldb has quit [Ping timeout: 256 seconds]
Oladon has joined #lisp
ldb has joined #lisp
ldb has quit [Ping timeout: 240 seconds]
ldb has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
ldb has quit [Ping timeout: 264 seconds]
ldb has joined #lisp
ldb has left #lisp [#lisp]
rumbler3_ has joined #lisp
rumbler31 has quit [Read error: Connection reset by peer]
wsinatra has quit [Quit: WeeChat 2.9]
Necktwi has quit [Ping timeout: 256 seconds]
zigpaw1 has quit [Ping timeout: 256 seconds]
mindCrime has quit [Ping timeout: 260 seconds]
zigpaw1 has joined #lisp
mindCrime has joined #lisp
_whitelogger has joined #lisp
<beach>
Good morning everyone!
Oladon has quit [Quit: Leaving.]
<buoy49>
beach: mornin'
<beach>
buoy49: How is PCL reading coming along?
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
kmeow has joined #lisp
<buoy49>
beach: it's going well. I'm up to first macros chapter. I've also been messing with a little Telegram bot project that I had started before. It's running hunchentoot. That's the tried & true for little web things, right?
<beach>
I think so, yes.
<buoy49>
beach: cool. what type of projects do you use lisp for?
Oladon has joined #lisp
<beach>
minion: Please tell buoy49 about SICL.
<minion>
buoy49: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
<beach>
minion: Please tell buoy49 about Cleavir.
<minion>
buoy49: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
<beach>
Also improving other aspects of our set of development tools.
<buoy49>
beach: wow, that's some heavy lifting
<buoy49>
I don't much CS or PL stuff. I've learned some on the job, but I'm "self-taught," so to speak
<buoy49>
contrapunctus: I actually own a couple of these books (Computer Systems: A Programmers Perspective & Designing Data-Intensive Applications)
<buoy49>
Guess I should start with SICP after PCL. I've been thinking about SICP for awhile. I did the first chapter about 4 years ago, but was neck deep in my first dev gig and didn't maintain that effort
<beach>
I would go for PAIP or On Lisp instead.
<easye>
Like _Art of Computer Programming_, one is never finished with SICP esp. if you work through the problems.
<easye>
_On Lisp_ will definitely open your eyes about macros.
<beach>
And PAIP is pretty good about abstraction.
<buoy49>
beach: got it
<beach>
And, later, if you are interested in how Lisp is implemented, there is LiSP.
<beach>
minion: Please tell buoy49 about LiSP.
<minion>
buoy49: look at LiSP: "Lisp in Small Pieces". This book covers Lisp, Scheme and other related dialects, their interpretation, semantics and compilation. To sum it up in a few figures: 500 pages, 11 chapters, 11 interpreters and 2 compilers. <http://pagesperso-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html>
bhartrihari has joined #lisp
<beach>
It is a translation from French, but thanks to the very talented translator, the translation is actually better than the original.
<buoy49>
easye: ah, yes. Tbh, I'm not sure if I actually "finished" all the problems of Ch. 1
<easye>
buoy49: exactly, 'cuz the problems lead to further questions, which lead to further problems, like all truly great pedagogical texts.
<easye>
beach: interesting that the translation is better than the original. Never heard that before. (I don't know French well enough to judge)
<buoy49>
beach: that's interesting re: translation, but that seems to be the case with quite a few texts now that I think of it
<beach>
I said that partly tongue-in-cheek. The translator is my wife. But I do think it is better.
<buoy49>
Ha!
Chiota has joined #lisp
<beach>
She is from Houston, by the way.
shangul has joined #lisp
<easye>
Houston is somewhat near Paris, Texas...
<buoy49>
beach: so is my wife, haha!
<beach>
True dat.
<buoy49>
easye: you know about Paris, TX? I haven't been there, yet. But I was reading about it the other day, actually
<easye>
Never been to Paris, TX. I just know it from the movie.
<buoy49>
easye: ah, yes. Forgot about that
Jeanne-Kamikaze has quit [Quit: Leaving]
ldb has joined #lisp
ldb has quit [Read error: Connection reset by peer]
ldb has joined #lisp
* ldb
beaking news, mozilla laid off 250 ppl.
gravicappa has joined #lisp
Chiota has quit [Remote host closed the connection]
Necktwi has joined #lisp
terpri_ is now known as terpri
u0_a156 has joined #lisp
FennecCode has quit [Ping timeout: 260 seconds]
ldb has quit [Ping timeout: 240 seconds]
ldb has joined #lisp
dmr0x80 has joined #lisp
ldb has quit [Ping timeout: 256 seconds]
ldb has joined #lisp
FennecCode has joined #lisp
ldb has quit [Ping timeout: 256 seconds]
ldb has joined #lisp
ralt has joined #lisp
ldb has quit [Ping timeout: 264 seconds]
rumbler3_ has quit [Ping timeout: 265 seconds]
galex-713 has joined #lisp
ldb has joined #lisp
dmr0x80 has quit [Ping timeout: 256 seconds]
vutral has joined #lisp
ldb has quit [Ping timeout: 246 seconds]
Nikotiini has quit [Ping timeout: 264 seconds]
mangul has joined #lisp
shangul has quit [Ping timeout: 240 seconds]
pve has joined #lisp
gko_ has quit [Ping timeout: 256 seconds]
ggole has joined #lisp
Nikotiini has joined #lisp
galex-713 has quit [Read error: Connection reset by peer]
galex-713 has joined #lisp
Oladon has quit [Quit: Leaving.]
heisig has joined #lisp
orivej has joined #lisp
wxie has joined #lisp
troydm has quit [Ping timeout: 260 seconds]
farooqkz__ has joined #lisp
scymtym has joined #lisp
dmrintr has joined #lisp
mangul has quit [Ping timeout: 264 seconds]
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
_whitelogger has joined #lisp
Inline has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
gaqwas has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
drot has joined #lisp
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
wxie has quit [Quit: wxie]
troydm has joined #lisp
wxie has joined #lisp
liberliver has joined #lisp
wxie has quit [Ping timeout: 244 seconds]
rpg has joined #lisp
orivej has joined #lisp
gko_ has joined #lisp
mindCrime has quit [Ping timeout: 260 seconds]
kaftejiman has joined #lisp
kaftejiman has quit [Remote host closed the connection]
kmeow has quit [Remote host closed the connection]
vutral has quit [Quit: Connection closed for inactivity]
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
farooqkz__ has quit [Ping timeout: 260 seconds]
v3ga has quit [Quit: WeeChat 2.7.1]
v3ga has joined #lisp
dra_ has joined #lisp
dra_ is now known as dra
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
galex-713 has quit [Quit: No Ping reply in 180 seconds.]
galex-713 has joined #lisp
<jackdaniel>
I'm sure that you've read it on internet explorer :)
<dra>
Hello!
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
farooqkz__ has joined #lisp
farooqkz__ has quit [Remote host closed the connection]
madage has quit [Remote host closed the connection]
<jackdaniel>
I find it nice that silly Common Lisp functions fit in one line
<puchacz>
phoe: I found strcat in arnesi
<puchacz>
all good
dnm has quit [Ping timeout: 272 seconds]
physpi has quit [Ping timeout: 272 seconds]
dnm has joined #lisp
Inline has quit [Ping timeout: 260 seconds]
bitmapper has joined #lisp
physpi has joined #lisp
<puchacz>
jackdaniel: your function gives a compilation warning about unused argument. something is wrong with it :)
<jackdaniel>
the compiler is barking at the strdog
anewuser has joined #lisp
anewuser is now known as Guest3261
Guest3261 has quit [Remote host closed the connection]
Guest3261 has joined #lisp
Guest3261 has quit [Remote host closed the connection]
Guest3261 has joined #lisp
Guest3261 has quit [Remote host closed the connection]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has joined #lisp
Lycurgus has quit [Remote host closed the connection]
telior has joined #lisp
<pve>
is there some reason to be allergic to uiop?
<pve>
I'm somewhat reluctant to use it, but can't really put my finger on why
orivej has quit [Ping timeout: 264 seconds]
terpri has quit [Quit: Leaving]
terpri has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
<flip214>
If a macro wants to store a (static) value per-callsite (same for all threads), is the best way to use use the value slot of a gensym? Is there a more memory-efficient way if I just want to remember a fixnum? (cache for max. size of w-o-t-s)
rpg has joined #lisp
<pve>
flip214: would load-time-value work?
jessa^22 has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
cosimone has quit [Quit: Quit.]
yitzi has joined #lisp
jessa^22 has quit [Quit: Oh my God, why woman was easily to deceived and successfully tempted, then she became the tunnel of all sorts of sins. Adam was only her implicated. OMG nowadays many men impersonate the wicked deceiver to deceive woman online. Why? Brought to you buy 1]
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #lisp
gko_ has quit [Remote host closed the connection]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
terpri has quit [Quit: Leaving]
terpri has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
liberliver has joined #lisp
stoneglass has joined #lisp
ralt has joined #lisp
<ralt>
puchacz: you can use uiop:strcat
Bike has joined #lisp
dmrintr has quit [Ping timeout: 264 seconds]
gaqwas has quit [Remote host closed the connection]
<puchacz>
ralt: np, I used strcat from arnesi
stoneglass has quit [Quit: stoneglass]
mindCrime has joined #lisp
Oladon has joined #lisp
rogersm has joined #lisp
Inline has quit [Ping timeout: 265 seconds]
Jesin has quit [Quit: Leaving]
liberliver has quit [Ping timeout: 265 seconds]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
liberliver has joined #lisp
Jesin has joined #lisp
orivej has joined #lisp
<mrcom>
Josh_2: So I see! Forwarning--I've never been able to write DIY locking code that worked the first time, even after I was sure I debugged everything.
<mrcom>
Josh_2: ...and I see a bug in BEGIN-WRITE. You're calling CONDITION-NOTIFY in the loop instead of CONDITION-WAIT.
<mrcom>
Josh_2: Also, in END-READ you should consider calling (ASSERT (PLUSP RA)) instead of (UNLESS (ZEROP RA) ...)
<mrcom>
It might seem more forgiving to not do anything if it's already zero, but that case should never happen.
v3ga has quit [Ping timeout: 272 seconds]
gaqwas has quit [Remote host closed the connection]
<mrcom>
Bitter, bitter experience has taught me that it's better to detect threading errors as early as possible. If RA is ever zero at that point then something's gone wrong.
mindCrime has quit [Ping timeout: 260 seconds]
enrio has joined #lisp
<mrcom>
Josh_2: Also, in WRITE-WITH-RW-LOCK the second call is to END-READ instead of END-WRITE.
TwoNotes has joined #lisp
puchacz has quit [Remote host closed the connection]
<mrcom>
Josh_2: Oh, wait. I was thinking HANDLER-BIND. You don't to execute END-READ or END-WRITE twice, which UNWIND-PROTECT will do it everything is OK.
<mrcom>
Also, in READ-/WRITE-WITH-RW-LOCK, if the BEGIN-READ or BEGIN-WRITE themselves fail you're going to have a mess.
<mrcom>
(For example, if you hit Control-C right in the middle of the BEGIN-READ/-WRITE.)
Inline has joined #lisp
akoana has joined #lisp
<Josh_2>
mrcom: I copied the implementation from the wiki pseudocode
<Josh_2>
I added unwind protect because I initially had a bug where I was checking the wrong var (pretty typical) and it was stalling, if I C-c'd it the whole thing would break
<Alfr__>
It's still bogus: What happens when it's interrupted after (begin-write ,lock) but before (setf ,locked t)?... Look at the (when ...) at the bottom.
<Josh_2>
oh geez
<Josh_2>
xD
satousan has quit [Quit: WeeChat 2.3]
TwoNotes has quit [Quit: Leaving]
gaqwas has quit [Remote host closed the connection]
<Alfr__>
Josh_2, if your begin write is blocking, then Bike's variant is fine. (I think.)
<mrcom>
And we've got the same problem with the lock.
<mrcom>
Alfr__: No, if the body flakes out then the unlock is never called.
FreeBirdLjj has joined #lisp
<mrcom>
Sorry, other way around. If the lock flakes then the unlock will happen anyway.
<Bike>
in mine? if the body is interrupted the unlock is in the unwind-protect
<Alfr__>
mrcom, it is, there's a unwind protect ensuring the (end-write ..).
<Alfr__>
mrcom, but that begin-write better be uninterruptible otherwise (end-write ..) may be called without owning the lock.
<Bike>
if begin-write is aborted there's no unlock. if the body is aborted there's an unlock. if the body returns normally there's an unllock.
<mrcom>
Yeah, that's what he wants.
<mrcom>
We were stuck trying to put unwind-protect around the lock.
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<mrcom>
Although...
<Alfr__>
Bike, is there a guarantee that should begin-write return, the unwind-protect is in effect?
<mrcom>
It's possible to get interruped between the (begin-write) and the (progn)
<mrcom>
Er, between the begin-write and the unwind-protect
<mrcom>
Alfr__: yeah, what you said
galex-713 has quit [Ping timeout: 272 seconds]
<markasoftware>
I am writing a macro that takes a place as an argument. The place will be expanded multiple times. How can I avoid issues if the place passed in has side effects, for example, `(nth (incf i) foo)`?
<markasoftware>
eg, alexandria:once-only but for places
<Alfr__>
Bike, the that uninterruptible part war for that earlier version of yours, where you had (unwind-protect (progn ...; no the other way around.
galex-713 has joined #lisp
<Bike>
the way unwind-protect is usually written there's no actual time for an interrupt, and anyway, if you're worried about that there's no possible way to fix the problem since there's always some space after grabbing the lock
<phoe>
that's how I implemented mod-{incf,decf} based on SICL code
<mrcom>
Bike: "no actual time for an interrupt"--no such thing.
<Alfr__>
I was pondering whether a way out would be for each thread to cas it's unique id (> 0) onto some place in lock. Then whether one holds a lock could be determined later on.
<mrcom>
"Only once in a billion iterations", yeah.
<markasoftware>
defsetf wouldn't have worked there?
<mrcom>
If we only had to worry about a discrete return value, as C or C++ do, then you can just take the value and return it afterward.
<mrcom>
However, Lisp is a lot richer environment. We've got to worry about conditions and closures.
<phoe>
we don't need to worry about conditions since they are fully synchronous
rogersm has joined #lisp
<phoe>
and if they perform non-local exits then all such exits are caught by UNWIND-PROTECT
<mrcom>
What I mean is we can't (unwind-protect (lock) (setf save-val (progn @,body)) (unlock) (return save-val))
krid` has joined #lisp
<mrcom>
(Roughly)
<Bike>
sure you can, with multiple-value-list
<Bike>
though it's not efficient
<Bike>
and it's pointless anyway, since you can just use unwind-protect normally
<phoe>
wait a second, why is (lock) the only protected form
terpri_ has joined #lisp
<Bike>
also even in C++ you'd use RAII, which ends up looking kind of like unwind-protect
krid` has quit [Remote host closed the connection]
<Bike>
the real right thing to do here is probably to use the implementation's underlying with-lock-held, if your read write locks are implemented on top of the implementation locks
krid` is now known as krid
Inline has quit [Ping timeout: 265 seconds]
terpri has quit [Ping timeout: 260 seconds]
<Josh_2>
It's built with bt
<Bike>
you can have begin-write take care of its own abort behavior
<Bike>
so that it only unlocks the write lock if it actually locked it
<Alfr__>
Josh_2, bt has a with-lock-held macro!
<Josh_2>
yes
<Josh_2>
I'm using "with-lock-held"
<mrcom>
The body has to be executed within the with-lock-held.
<phoe>
my naïve approach for that would be (defmethod c2mop:slot-value-using-class (class object (slotd locked-slotd)) (bt:with-lock-held ((lock slotd)) (call-next-method)))
<Bike>
with the rwlock implementation i know you're not holding an actual lock during the write-locked section
<phoe>
but that's so simple that I'm sure I got it terribly wrong
<Josh_2>
Bike: I am
<mrcom>
You can't, at a high-level, split it up into BEGIN-READ/-WRITE and END-READ/-WRITE.
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
<Bike>
but you can though? to begin-write you grab the internal lock, increment a variable, do some condition waiting, decrement the variable, set another variable, then unlock the internal lock
galex-713 has quit [Ping timeout: 264 seconds]
galex-713_ has joined #lisp
<Josh_2>
Yes sorry I misunderstood what you wrote
<Bike>
and if you're using the reader-preferring implementation all you need to do to grab the write lock is grab an actual lock, which you can use the system with-lock-held for
<Josh_2>
When actually executing ,@body no lock is held
<mrcom>
The problem is that you need to atomically set-calc-unset
<Bike>
running the end-write procedure partway through the begin-write procedure seems fine to me
<Bike>
all it does is set a variable to what it would be anyway, and condition notify
<Josh_2>
hmm so I can (unwind-protect the body of begin-write and have end-write as the cleanup?
<Bike>
if you have begin-write clean up after itself appropriately, maybe
<pve>
flip214: I didn't understand that you need to modify it, so no load-time-value then
luckless_ has joined #lisp
space_otter has joined #lisp
luckless has quit [Ping timeout: 240 seconds]
CrazyEddy has quit [Ping timeout: 265 seconds]
<mrcom>
The fundemental problem is that Lisp doesn't really have a concept of critical sections.
<phoe>
that's implementation-defined, SB-SYS:WITHOUT-INTERRUPTS and such
<mrcom>
Yeah.
<Josh_2>
hmm
<Josh_2>
is there a compatibility library for that?
<mrcom>
(READ-WITH-RW-LOCK is left as an exercise for the reader :)
ggole has quit [Quit: Leaving]
<mrcom>
Josh_2: The key things is that incrementing writer-wait, calling the body, and decrementing are all one atomic operation, with a window while it's spinning waiting for readers to clear.
<Josh_2>
but isn't multiple simultaneous readers a good thing?
<mrcom>
Not in your case. All you're doing is a slot reference. That's so fast that it's utterly swamped by the lock/unlock.
<Josh_2>
okay, so it basically doesn't matter
<mrcom>
What you'll have is the "writers get priority" aspect.
<Josh_2>
hmm
<mrcom>
Yeah, in this case you'd probably actually get better performance without the condition variables.
<mrcom>
Looks good, except you really don't want the "(unless (zerop ra) (decf ra))". You *always* want to decrement.
<mrcom>
You no longer have the double-decrement problem, which is what you were fixing with the "unless ...".
<Josh_2>
yep
<Josh_2>
that was a holdover
<mrcom>
You can tweak the code to get true simultaneous-readers, but remember that you're locking one slot on one instance. How frequently are you going to have two threads looking at the same thing at the same moment?
<Josh_2>
who knows
<Josh_2>
I don't
<Josh_2>
pretty rare I imagine :P
<mrcom>
The tweak would actually take more time than just waiting for the first reader to unlock.
bsd4me has left #lisp ["Leaving"]
<mrcom>
Yeah, so it's up to what you want to learn out of it.
<Josh_2>
yes I would like to learn
gravicappa has quit [Ping timeout: 264 seconds]
<Josh_2>
Do you have any links to things I can read?
whiteline has quit [Ping timeout: 240 seconds]
rilez has joined #lisp
satousan has quit [Quit: WeeChat 2.3]
jesse1010 has joined #lisp
mangoicedtea has joined #lisp
dilated_dinosaur has joined #lisp
Josh_2` has joined #lisp
Josh_2` has quit [Client Quit]
Josh_2 has quit [Ping timeout: 240 seconds]
mindCrime has joined #lisp
space_otter has quit [Remote host closed the connection]
asarch has joined #lisp
<mrcom>
Josh_2: Wow, I can't find anything Lisp-specific.