<fiddlerwoaroof>
It looks like sbcl binds the variable with dynamic scope
<phoe>
no, you close over it
<phoe>
forming closures over loop variables is a common headache in lisp programmers
<phoe>
heisig can attest to it
<fiddlerwoaroof>
ugh
<fiddlerwoaroof>
So, I have to like (let ((tmp var)) (lambda () ...))?
<fiddlerwoaroof>
Hmm, I guess this makes sense
VincentVega has left #lisp [#lisp]
<fiddlerwoaroof>
The loop SETQ one binding, rather than shadowing on each iteration
<fiddlerwoaroof>
Mental model adjusted...
<moon-child>
if all you're doing is iterating over a single list, it might be easier to mapcar
<fiddlerwoaroof>
I'm a bit surprised it took me this long to discover this
<fiddlerwoaroof>
This is a simplified sample
ralt has quit [Quit: Connection closed for inactivity]
emys[m] has quit [Quit: Idle for 30+ days]
clar[m] has quit [Quit: Idle for 30+ days]
ckoz[m] has quit [Quit: Idle for 30+ days]
DanielCheng[m] has quit [Quit: Idle for 30+ days]
zstest3[m] has quit [Quit: Idle for 30+ days]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
luckless has quit [Quit: luckless]
gaqwas has quit [Remote host closed the connection]
akoana has left #lisp ["Leaving"]
narimiran has quit [Ping timeout: 264 seconds]
luckless has joined #lisp
v88m has quit [Ping timeout: 264 seconds]
v88m has joined #lisp
frodef has joined #lisp
drNobody has joined #lisp
pve has joined #lisp
drNobody has quit [Remote host closed the connection]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
Nilby has joined #lisp
birdwing has quit [Ping timeout: 240 seconds]
liberliver has joined #lisp
patrixl has quit [Read error: No route to host]
rgherdt has joined #lisp
skapata has quit [Remote host closed the connection]
sauvin has joined #lisp
Anonymous__ has joined #lisp
xrash has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
liberliver has quit [Ping timeout: 256 seconds]
jurov_ has joined #lisp
clintm has joined #lisp
jurov has quit [Ping timeout: 246 seconds]
frodef has quit [Ping timeout: 246 seconds]
lowryder has quit [Ping timeout: 256 seconds]
lowryder has joined #lisp
kaftejiman has joined #lisp
rogersm has joined #lisp
frodef has joined #lisp
h4ck3r9696 has joined #lisp
jurov has joined #lisp
<h4ck3r9696>
How do I get started with threading in Common Lisp? I read the CL cookbook's article, but I find it very brief and hard to understand. For example, how do I write to *standard-output* from a thread without getting wierd behavior and duplicating text? I tried to use a lock every time I use format, but that didn't work.
jurov_ has quit [Ping timeout: 246 seconds]
jurov_ has joined #lisp
jurov has quit [Ping timeout: 256 seconds]
<beach>
You shouldn't get any duplicated text.
andreyorst_ has quit [Ping timeout: 260 seconds]
<beach>
And you don't need locks unless you need mutual exclusion for some resource.
<phoe>
a stream might be such a resource
<phoe>
AFAIR e.g. CCL streams are not threadsafe by default, two streams cannot write to a stream at the same time
<beach>
But we haven't been told it is (yet).
<phoe>
oh, yes; I'm extrapolating
random-nick has joined #lisp
<h4ck3r9696>
CL-USER> (hello-from-thread)
<h4ck3r9696>
Hello, world
<h4ck3r9696>
NIL
<h4ck3r9696>
CL-USER> (hello-from-thread)
<h4ck3r9696>
Hello, world
<h4ck3r9696>
Hello, world
<h4ck3r9696>
NIL
<h4ck3r9696>
I'm getting this
<h4ck3r9696>
randomly
<beach>
You would have to paste your code somewhere. It is not clear what the constellation of threads is.
<h4ck3r9696>
It's just the tutorial from the CL cookbook
<ck_>
do you mean the website or the 'recipes' book?
<Nilby>
It's just that there's output from multiple threads in there if you don't make multiple stram buffers somehow.
ralt has joined #lisp
jurov_ has quit [Ping timeout: 272 seconds]
euandreh has joined #lisp
<h4ck3r9696>
Well, guess i'll have double output. It doesn't really matter anyway because i'll add a GUI soon
<Nilby>
I experience it all the time since I run stuff directly in a terminal. But it's not hard mitigate. Also, the normal flushing in sbcl &
<phoe>
in the terminal, yes
<phoe>
but why does slime get it right and sly doesn't?
<phoe>
in terminal it's normal when multiple threads write to a single stdout without locking
<Nilby>
Slime buffers output of multiple threads for you.
<phoe>
and sly ones don't?
<Nilby>
I don't know, but it probably does.
rogersm has quit []
<Nilby>
Also the stream flushing behaviour varies quite a bit between implementations.
<phoe>
hmmmmmmmm
* fiddlerwoaroof
thinks this is a good reason to use SLIME
<Nilby>
This gives pretty random results, and worse when you put a finish-output afger the print: (progn (bt:make-thread (lambda () (dotimes (i 50) (print i) (sleep .1)))) (bt:make-thread (lambda () (dotimes (i 50) (print i) (sleep .1)))))
<fiddlerwoaroof>
Basically, you create a stream and emacs creates a corresponding buffer
<fiddlerwoaroof>
I don't think it's been ported to sly, but it's a bit cleaner for some things (DRKMA:*HEADER-OUTPUT-STREAM*, for example) than just using *standard-output* for everything
paul0 has quit [Quit: Leaving]
attila_lendvai has quit [Ping timeout: 256 seconds]
vutral_ has joined #lisp
akoana has joined #lisp
<Nilby>
fiddlerwoaroof: Thanks. That seems quite useful, especially for network stuff. Interactive terminal stuff must take another path though.
kaftejiman_ has joined #lisp
kaftejiman has quit [Read error: Connection reset by peer]
miracle_fox has joined #lisp
mrios22 has joined #lisp
euandreh has quit [Quit: WeeChat 3.0]
BuboBubo has joined #lisp
Lycurgus has joined #lisp
surabax has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
rumbler31_ has quit [Ping timeout: 256 seconds]
frost-lab has quit [Quit: Connection closed]
BuboBubo has quit [Remote host closed the connection]
SlashLife has joined #lisp
luckless has quit [Ping timeout: 240 seconds]
hendursa1 has quit [Ping timeout: 240 seconds]
hendursa1 has joined #lisp
luckless has joined #lisp
liberliver1 has joined #lisp
h4ck3r9696 has quit [Remote host closed the connection]
liberliver1 is now known as liberliver
rumbler31_ has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
galex-713 has joined #lisp
mankaev has quit [Read error: Connection reset by peer]
vutral_ has quit [Quit: Connection closed for inactivity]
waleee-cl has joined #lisp
mrios22 has quit [Ping timeout: 256 seconds]
bilegeek has joined #lisp
miracle_fox has quit [Ping timeout: 264 seconds]
dmiles has joined #lisp
dmiles has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 265 seconds]
dmiles has joined #lisp
dmiles has quit [Read error: Connection reset by peer]
dmiles has joined #lisp
aorst has joined #lisp
dmiles has quit [Client Quit]
andreyorst has quit [Ping timeout: 256 seconds]
andreyorst_ is now known as andreyorst
<v3ga>
hmm, after Common LISP: A Gentle Introduction to Symbolic Computation should I read Let over Lambda or Land of Lisp?
<beach>
I think you should read PCL.
<beach>
minion: Please tell v3ga about PCL.
<minion>
v3ga: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<v3ga>
beach: Ok, I have that too on my shelf. Darn. so PCL > Land of Lisp.
<beach>
I am not sure of either of the LoL books.
Lycurgus has quit [Quit: Exeunt]
<beach>
I would do PCL, then PAIP.
<v3ga>
beach: lol, ok. I have that as well. I actually came across a copy for a good price and grabbed it but I haven't touched it yet.
<beach>
Others here may have a different opinion, of course.
<Nilby>
it depends on your reaction to the words "Grand Theft Wumpus"
<v3ga>
Nilby: say what? =P
<v3ga>
that must be land over lisp. Silliness is fine as well.
mankaev has joined #lisp
<Nilby>
it's a thing in LoL
dmiles has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
madage has quit [Ping timeout: 240 seconds]
hendursaga has joined #lisp
madage has joined #lisp
dmiles has quit []
reb has joined #lisp
jackhill has quit [Read error: Connection reset by peer]
bitmapper has joined #lisp
andreyor1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
madage has quit [Ping timeout: 240 seconds]
aorst has quit [Ping timeout: 264 seconds]
hendursaga has joined #lisp
madage has joined #lisp
lotuseater has quit [Ping timeout: 240 seconds]
<phoe>
IMO Let over Lambda should be read after Graham's On Lisp
<Anonymous__>
can someone check if i defined let and let* correctly in terms of lambda?
<Anonymous__>
In fact is scheme
<phoe>
#lisp is a place full of Common Lisp programmers
<phoe>
as it's dedicated to Common Lisp
<Anonymous__>
Understood, i will give a try on #scheme
mmmattyx has joined #lisp
dmiles has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
miracle_fox has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
reb has quit [Ping timeout: 264 seconds]
reb`` has joined #lisp
galex-713 has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 246 seconds]
_jrjsmrtn has joined #lisp
liberliver has quit [Ping timeout: 265 seconds]
narimiran has joined #lisp
reb`` has quit [Ping timeout: 264 seconds]
reb```` has joined #lisp
Blukunfando has joined #lisp
reb```` has quit [Ping timeout: 264 seconds]
amb007 has quit [Read error: Connection reset by peer]
reb`````` has joined #lisp
amb007 has joined #lisp
trocado has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
amb007 has joined #lisp
reb`````` has quit [Ping timeout: 264 seconds]
reb`````` has joined #lisp
reb`````` has quit [Ping timeout: 264 seconds]
reb`````` has joined #lisp
BuboBubo has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
liberliver has joined #lisp
amb007 has joined #lisp
andreyorst has quit [Quit: andreyorst]
amb007 has quit [Read error: Connection reset by peer]
andreyorst has joined #lisp
reb`````` has quit [Ping timeout: 264 seconds]
amb007 has joined #lisp
reb`````` has joined #lisp
thmprover has joined #lisp
reb`````` has quit [Ping timeout: 264 seconds]
reb`````` has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
miracle_fox has quit [Ping timeout: 246 seconds]
miracle_fox has joined #lisp
trocado has joined #lisp
bacterio has quit [Ping timeout: 265 seconds]
BuboBubo has quit [Remote host closed the connection]
akrl has quit [Ping timeout: 256 seconds]
akrl has joined #lisp
BuboBubo has joined #lisp
bacterio has joined #lisp
luna_is_here has quit [Ping timeout: 272 seconds]
luna_is_here has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
charles` has joined #lisp
rogersm has joined #lisp
orivej has joined #lisp
BuboBubo has quit []
Jeanne-Kamikaze has joined #lisp
skapata has joined #lisp
Oladon has quit [Quit: Leaving.]
ech has quit [Remote host closed the connection]
dmiles has quit []
renzhi has joined #lisp
ech has joined #lisp
Danishman has joined #lisp
rogersm has quit [Remote host closed the connection]
rogersm has joined #lisp
curiouscain has quit [Quit: WeeChat 2.8]
ebrasca has quit [Remote host closed the connection]
rogersm has quit [Ping timeout: 264 seconds]
Oladon has joined #lisp
luni has joined #lisp
shka_ has joined #lisp
<shka_>
good evening
dmiles has joined #lisp
<charles`>
Hello
jurov_ has joined #lisp
jurov has quit [Ping timeout: 256 seconds]
<travv0>
Hello
Jeanne-Kamikaze has quit [Ping timeout: 264 seconds]
<frodef>
hi
Lord_of_Life_ has joined #lisp
<charles`>
Has anyone used usocket and needed to detect a close? is a timer the best solution?
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life_ is now known as Lord_of_Life
nydel has quit [Ping timeout: 240 seconds]
bacterio has quit [Ping timeout: 256 seconds]
bacterio has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
nydel has joined #lisp
devon has quit [Ping timeout: 256 seconds]
slyrus has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
bilegeek has quit [Quit: Leaving]
Oladon has quit [Quit: Leaving.]
galex-713 has quit [Ping timeout: 246 seconds]
rumbler31_ has quit [Ping timeout: 240 seconds]
jurov has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
cage_ has quit [Quit: Leaving]
jurov- has joined #lisp
jurov_ has quit [Ping timeout: 256 seconds]
jurov has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
<johnjay>
solideogloria[m]: i used rainbow parens but idt they are necessary. I wrote my own extension that improves paren matching in emacs by going one level deeper
renzhi has quit [Ping timeout: 240 seconds]
<johnjay>
so it just highlights the current paren and all the children in the sexp. works pretty well
<johnjay>
you should use the indentation in emacs to get the most information first imo
Oladon has joined #lisp
hnOsmium0001 has joined #lisp
<fiddlerwoaroof>
Does anyone know of a RFC822 email parser?
birdwing has quit [Ping timeout: 256 seconds]
amb007 has quit [Read error: Connection reset by peer]
mgxm has quit [Quit: ....]
amb007 has joined #lisp
mgxm has joined #lisp
galex-713 has joined #lisp
rumbler31_ has joined #lisp
<fiddlerwoaroof>
I found one on Cliki, but its email address parser was really slow
<fiddlerwoaroof>
It uses one giant cl-ppcre regex to parse email addresses, probably a good test case for performance improvements to CL-PPCRE :)
hendursaga has quit [Ping timeout: 240 seconds]
ppbitb has quit [Remote host closed the connection]
madage has quit [Ping timeout: 240 seconds]
ppbitb has joined #lisp
miasuji has joined #lisp
msk has joined #lisp
ech has quit [Ping timeout: 240 seconds]
luckless has quit [Ping timeout: 240 seconds]
ted_wroclaw has joined #lisp
rogersm has joined #lisp
msk_ has quit [Ping timeout: 260 seconds]
madage has joined #lisp
Nilby has quit [Read error: Connection reset by peer]
luckless has joined #lisp
Aurora_v_kosmose has quit [Ping timeout: 240 seconds]
rogersm has quit [Ping timeout: 256 seconds]
Aurora_v_kosmose has joined #lisp
ech has joined #lisp
ppbitb has quit [Remote host closed the connection]
ppbitb has joined #lisp
andreyorst has quit [Ping timeout: 265 seconds]
<johnjay>
is there a common lisp email server you mean?
<johnjay>
oh its the email format
ljavorsk has joined #lisp
andreyorst has joined #lisp
zacts has joined #lisp
zacts has quit [Client Quit]
v88m has quit [Ping timeout: 240 seconds]
v88m has joined #lisp
Aurora_v_kosmose has quit [Remote host closed the connection]