xkapastel has quit [Quit: Connection closed for inactivity]
georgie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinohai has joined #lisp
madand has left #lisp ["Changed major mode"]
madand has joined #lisp
prite has quit [Ping timeout: 245 seconds]
CEnnis91 has quit [Quit: Connection closed for inactivity]
cl-arthur has quit [Quit: Lost terminal]
igemnace has quit [Quit: WeeChat 2.6]
red-dot has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
ttron has joined #lisp
Oladon has joined #lisp
Blukunfando has quit [Ping timeout: 245 seconds]
superkumasan has joined #lisp
bitmapper has quit [Ping timeout: 245 seconds]
jfe has joined #lisp
frgo has quit [Ping timeout: 268 seconds]
jfe has quit [Ping timeout: 240 seconds]
prite has joined #lisp
liberiga has quit [Quit: Leaving]
orivej has joined #lisp
Jeanne-Kamikaze has joined #lisp
kajo has quit [Ping timeout: 276 seconds]
akoana has left #lisp ["Leaving"]
semz has quit [Ping timeout: 245 seconds]
isBEKaml has joined #lisp
igemnace has joined #lisp
salinasc has joined #lisp
prite has quit [Ping timeout: 240 seconds]
Jeanne-Kamikaze has quit [Quit: Leaving]
Jeanne-Kamikaze has joined #lisp
CEnnis91 has joined #lisp
xkapastel has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
lucasb has quit [Quit: Connection closed for inactivity]
salinasc has quit [Remote host closed the connection]
klausnrooster53 has joined #lisp
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
klausnrooster53 has quit [Quit: Leaving]
ahungry has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
ttron has quit [Quit: ttron]
ahungry has quit [Ping timeout: 245 seconds]
ahungry has joined #lisp
zmt00 has quit [Quit: Leaving]
Jeanne-Kamikaze has quit [Ping timeout: 240 seconds]
zmt00 has joined #lisp
ahungry has quit [Ping timeout: 240 seconds]
salinasc has joined #lisp
igemnace has quit [Quit: WeeChat 2.6]
jlarocco has quit [Ping timeout: 268 seconds]
jfe has joined #lisp
jfe has quit [Ping timeout: 240 seconds]
_whitelogger has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
yoeljacobsen has joined #lisp
Bike has quit [Quit: Lost terminal]
ahungry has joined #lisp
nanoz has joined #lisp
salinasc has quit [Remote host closed the connection]
salinasc has joined #lisp
torbo has joined #lisp
<beach>
Good morning everyone!
`420 has left #lisp [#lisp]
livoreno has joined #lisp
<aeth>
`(:morning ;good t "beach")
<livoreno>
hoi!
<aeth>
s/;good/:good/
<livoreno>
good commenting technique :P
<aeth>
or as a function call instead of a DSL, it might be (morning beach :good t)
<aeth>
of course, t is the default value for good so (morning beach) works, too
Oladon has quit [Quit: Leaving.]
<jeosol>
what about the "everyone"
<jeosol>
good morning
<aeth>
jeosol: (map nil #'morning everyone) ; assuming it's called for its side effect and not its return value
<aeth>
or (map nil (lambda (person) (morning person :good t)) everyone) if you want to be more explicit with the "good" value
zaquest has quit [Remote host closed the connection]
Necktwi has quit [Ping timeout: 245 seconds]
<aeth>
Although technically speaking, you want to also filter it so it doesn't include you since saying good morning to yourself isn't socially acceptable.
<jeosol>
aeth: cool
<no-defun-allowed>
But then you're saying good morning to each person individually, which is slow.
<aeth>
no-defun-allowed: eh, idc, sbcl optimizes it
yoja has joined #lisp
<aeth>
I write portable CL, but it doesn't have to be efficient everywhere
Necktwi has joined #lisp
<no-defun-allowed>
You can just use (morning everyone :good t) and a method on groups.
zaquest has joined #lisp
<no-defun-allowed>
Then it will be O(log n) instead of O(n).
salinasc has quit [Remote host closed the connection]
<aeth>
no-defun-allowed: well, submit a pull request, then
salinasc has joined #lisp
yoeljacobsen has quit [Ping timeout: 265 seconds]
milanj has joined #lisp
<no-defun-allowed>
Why should I? beach already has written that code, as he says "Good morning everyone", not "Good morning aeth", "Good morning aeti (the hypothetical user after aeth)", ...
superkumasan has quit [Ping timeout: 265 seconds]
mindthelion has joined #lisp
CEnnis91 has quit [Quit: Connection closed for inactivity]
techquila has quit [Ping timeout: 245 seconds]
georgie has joined #lisp
isBEKaml has quit [Quit: leaving]
ahungry has quit [Ping timeout: 240 seconds]
georgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shangul has joined #lisp
froggey has quit [Ping timeout: 265 seconds]
froggey has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life has joined #lisp
<Fade>
hum. the sbcl mirror at github is not updated.
torbo has quit [Remote host closed the connection]
manualcrank has quit [Quit: WeeChat 1.9.1]
mindCrime has joined #lisp
jfe has joined #lisp
CrazyEddy has quit [Ping timeout: 245 seconds]
ggole has joined #lisp
jfe has quit [Ping timeout: 245 seconds]
krid has quit [Ping timeout: 265 seconds]
shangul has quit [Ping timeout: 265 seconds]
_whitelogger has joined #lisp
gravicappa has joined #lisp
ttron has joined #lisp
CrazyEddy has joined #lisp
yoja has quit [Ping timeout: 268 seconds]
yoja has joined #lisp
yoja has quit [Remote host closed the connection]
ttron has quit [Quit: ttron]
yoja has joined #lisp
igemnace has joined #lisp
leedleLoo has joined #lisp
igemnace has quit [Ping timeout: 240 seconds]
abhixec has quit [Remote host closed the connection]
Blukunfando has joined #lisp
mindCrime has quit [Ping timeout: 264 seconds]
hiroaki has joined #lisp
jello_pudding has joined #lisp
mindCrime has joined #lisp
kajo has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
abhixec has joined #lisp
jello_pudding has quit [Remote host closed the connection]
jfe has joined #lisp
jfe has quit [Ping timeout: 265 seconds]
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
lnostdal has quit [Quit: "Fascism, Nazism, Communism and Socialism are only superficial variations of the same monstrous theme—collectivism." -- Ayn Rand]
gareppa has joined #lisp
lavaflow has quit [Quit: WeeChat 2.5]
lavaflow has joined #lisp
lavaflow has quit [Client Quit]
lavaflow has joined #lisp
salinasc has quit [Remote host closed the connection]
salinasc has joined #lisp
random-nick has joined #lisp
jonatack has quit [Ping timeout: 264 seconds]
salinasc has quit [Remote host closed the connection]
salinasc has joined #lisp
salinasc has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
gareppa has quit [Quit: Leaving]
libertyprime has joined #lisp
leedleLoo has left #lisp [#lisp]
mindCrime has quit [Ping timeout: 245 seconds]
Blukunfando has quit [Ping timeout: 276 seconds]
jonatack has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
dale has quit [Quit: My computer has gone to sleep]
seok has joined #lisp
<seok>
I shouldn't have to worry about locks if only one thread is writing on a variable and other threads are only reading it right?
<seok>
with bordeaux-threads
<beach>
You probably don't have to worry about locks at all for reading and writing a variable.
<seok>
I've been using locks when
<seok>
two or more threads are writing on a variable
<seok>
What do you mean?
<beach>
It is very likely the case that reading and writing a variable is already an atomic operation.
<beach>
A variable can not be partially read or partially written.
<seok>
Hm, why does cookbook tell us otherwise then?
<beach>
It does?
<beach>
Can you show me the reference?
<seok>
it has a bank account example
superkumasan has joined #lisp
<seok>
if 2 threads are adding balance to a variable, you will get unexpected results without locks
<beach>
Tell me what chapter and I'll go find my book.
<pjb>
beach: I think it should be documented. Because at the level of the processor, it's quite possible that a write and a read in memory of values of 32-bit or 64-bit (or more) be intermixed, when the data bus is not as wide as the access.
<pjb>
beach: Not all processors ensure atomic read/write in that case.
<pjb>
beach: therefore it's up to the implementation to do or not do something about it and to document it.
gareppa has joined #lisp
<White_Flame>
and while the pointer value being written into the variable might be atomic, if it's pointing to a composite thing, then there might be other mutatey things going on as well
<pjb>
seok: adding is not read or write. it's read AND write. Then you need to ensure the atomicity of the add operation!
<saturn2>
adding to a variable involves a read, an add, and a write
<White_Flame>
but if it's just a fixnum, you're probably okay
<seok>
Yeah
<seok>
So my initial question, if only one thread is writing and other threads are only reading, no locks are needed right?
<beach>
seok: If you need to both read and write it and make sure it is not modified in between, then you need locks.
<beach>
seok: But that is not what you said.
<White_Flame>
"need" and "right" are subjective to what the actual expectations are
<White_Flame>
do you want the readers to see all writes and not miss them in overwrites? then use a queue
<seok>
I'm fine with reader threads reading pre-write values if write is not complete
<White_Flame>
but it's rarely the case that a single value is mutated completely different from anything else's context, so generally you'll find yourself with some sort of lock over multiple slots of something
jfe has joined #lisp
shangul has joined #lisp
gareppa has quit [Quit: Leaving]
jfe has quit [Ping timeout: 268 seconds]
raghavgururajan has joined #lisp
ljavorsk_ has joined #lisp
<saturn2>
also, i don't know if any CL compilers are actually smart enough, but the compiler might decide to optimize away some reads that aren't protected by locks
prite has joined #lisp
<beach>
saturn2: Hmm. When I contemplated that possibility in the past, I didn't think locks were an issue; only whether an external function is called in between two reads.
<saturn2>
yes, for now an probably for the forseeable future, but that's not really a guarantee
<beach>
Can you explain that?
cosimone has joined #lisp
<ggole>
You can get visibility problems reading without a lock, even if the load itself is atomic
<beach>
What kind of "visibility problems"?
yoja has quit [Ping timeout: 240 seconds]
<ggole>
Where you read part of something else and it isn't visible in the current thread yet (eg, you see a 'stale' value)
<beach>
I'm lost.
<saturn2>
if the compiler can tell that the function you called doesn't modify the variable you're reading, it's within its rights to do things like hoist reads out of loops
<beach>
saturn2: Sure, but can you explain what might change in the future that would make it no longer possible?
<beach>
saturn2: Actually, that is not true in the case of multiple threads, I think.
<saturn2>
some day someone might decide they want a CL compiler that's smart enough to do cross-function analysis like that, and there would be no rule against it
<beach>
Thread A can read a variable V and then call an external function that sets a variable W.
<ggole>
beach: if you construct an object (say, a cons) in one thread and read it in another, the contents of the object need to be up to date ('visible'). Loads do not ensure that.
<ggole>
(Either at the compiler or hardware level.)
<beach>
saturn2: A different thread can read variable W and then write variable V.
<ggole>
Locks provide that with barriers.
asdf_asdf_asdf has joined #lisp
gareppa has joined #lisp
<beach>
ggole: I see.
<saturn2>
yeah, what i'm really talking about is barriers, but bordeaux-threads doesn't provide any barrier primitives afaik
<saturn2>
so a lock is all you have
<saturn2>
and CL compilers probably do treat every function call as a barrier, but that's just contingent on how much effort has gone into CL optimization
<ggole>
I doubt there are worthwhile guarantees at all (maybe for a particular implementation).
Ricchi has joined #lisp
<saturn2>
just that locks without barriers would be completely useless and lots of things would break
georgie has joined #lisp
igemnace has joined #lisp
nowhereman has quit [Ping timeout: 276 seconds]
ljavorsk_ has quit [Ping timeout: 265 seconds]
milanj has joined #lisp
Cymew has joined #lisp
adip has quit [Read error: Connection reset by peer]
libertyprime has quit [Ping timeout: 265 seconds]
ironbutt has quit [Read error: Connection reset by peer]
ironbutt has joined #lisp
niceplace has quit [Read error: Connection reset by peer]
niceplace has joined #lisp
niceplace has quit [Excess Flood]
gareppa has quit [Quit: Leaving]
niceplace has joined #lisp
yoja has joined #lisp
gareppa has joined #lisp
xkapastel has joined #lisp
Ricchi has quit [Remote host closed the connection]
libertyprime has joined #lisp
gareppa has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 240 seconds]
scymtym has quit [Remote host closed the connection]
Inline__ has joined #lisp
Inline__ has quit [Remote host closed the connection]
jonatack has quit [Ping timeout: 245 seconds]
georgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eSVGDelux has quit [Ping timeout: 264 seconds]
Inline has quit [Ping timeout: 264 seconds]
Bike has joined #lisp
prite has quit [Ping timeout: 240 seconds]
Inline has joined #lisp
jfe has joined #lisp
nanoz has quit [Quit: Leaving]
jfe has quit [Ping timeout: 240 seconds]
ljavorsk_ has joined #lisp
asdf_asdf_asdf has quit [Remote host closed the connection]
EvW has joined #lisp
rippa has joined #lisp
igemnace has quit [Quit: WeeChat 2.6]
dxtr has quit [Ping timeout: 276 seconds]
dxtr has joined #lisp
elinow has joined #lisp
scymtym has joined #lisp
jonatack has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
APic has quit [Ping timeout: 240 seconds]
yoja has quit [Ping timeout: 240 seconds]
gareppa has joined #lisp
Ven`` has joined #lisp
bitmapper has joined #lisp
gareppa has quit [Quit: Leaving]
salinasc has joined #lisp
APic has joined #lisp
asdf_asdf_asdf has joined #lisp
Inline has quit [Quit: Leaving]
georgie has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
<afidegnum>
i wanted to fetch values under cols and later get column_name
<asdf_asdf_asdf>
(let ((tb 'table_name))
<asdf_asdf_asdf>
no
<asdf_asdf_asdf>
(let ((tb 'table_name) col cols)
ljavorsk_ has quit [Ping timeout: 240 seconds]
<beach>
afidegnum: I have no idea what you mean, but when you write (let ((tb 'table_name) col cols) ...) you are binding col and cols both to NIL and then you do not use them in the ... body.
yoeljacobsen has joined #lisp
<afidegnum>
i got it, my smartparens is messing up
<beach>
This stuff is so fundamental that you should probably take it to #clschool, though perhaps not since it is Emacs Lisp, and it belongs neither here nor there.
<asdf_asdf_asdf>
Figure out issue, because not see the problem.
libertyprime has quit [Quit: leaving]
<afidegnum>
i got it to work in some way but only 1 values got printed... i see no table_name
<ebrasca>
psych: random link of amazon , are you spamer?
<psych>
no that was an accident
<psych>
im trying to paste the stuff from the interpreter
<psych>
I guess you can't copy and paste it
<stylewarning>
ebrasca: do you mean when you have an error, and you have the list of options?
<stylewarning>
Press ‘a’ to abort that (when your cursor is inside that window)
<ebrasca>
psych: copy in emacs is M+w
<ebrasca>
psych: M-w
<psych>
What does that mean
<psych>
What's M?
<psych>
M on my keyboard?
<ebrasca>
psych: M for alt
<psych>
oh
<p_l>
psych: Meta key, in practice it will be Alt
<psych>
Nothing happened except printing a sigma
ym has quit [Read error: Connection reset by peer]
<p_l>
psych: are you on mac?
<psych>
yes
<stylewarning>
Command-C and Command-V work on Mac.
ym has joined #lisp
<p_l>
you can try to use menu "Edit" -> "Copy" etc.
<psych>
I'm not trying to copy
<psych>
In the book its talking about recovering from errors
hiroaki has quit [Ping timeout: 245 seconds]
<psych>
the writer says to type control g to 'abort'
<p_l>
psych: yeah, that's just for you to be able to copy whatever you see
<psych>
so I'm tring to figure out which key is 'abort'
nowhere_man has quit [Ping timeout: 276 seconds]
<p_l>
what does Portacle show?
<psych>
command c and command v
<psych>
highlighted a portion of the text
<p_l>
let's go back to start: you mentioned trying to abort some computation, right?
<psych>
yes
fsmunoz has joined #lisp
legit has joined #lisp
<stylewarning>
psych: when an error happens, you get a list of options. You can click on an option, you can type an option number, or if you’re just interested in getting out of the error, you can press a
<psych>
#<UNBOUND-VARIABLE {1003BCC053}>--------------------The object is a CONDITION of type UNBOUND-VARIABLE.NAME: DENOT-YET-LOADED: NIL
<stylewarning>
Ok, that’s the inspector. You can press control-x k (enter) to kill that. The top window has the list of options. Put your cursor in the top window and press a, and it should disappear.
<stylewarning>
You can also click —more— and then click ABORT
lxbarbosa has quit [Remote host closed the connection]
lxbarbosa has joined #lisp
<stylewarning>
psych: this is definitely not the most user friendly experience at the beginning, but after a few days, it becomes second nature
<psych>
yes this is some horrendous UX lol
<psych>
gonna put LISP down for today and get back to it tomorrow
lxbarbosa has quit [Remote host closed the connection]
<p_l>
psych: it's a question of what one is used to :)
<stylewarning>
psych: I think it’s also maybe fair to add to that “and 99% of computer users are used to being able to copy and paste”
<stylewarning>
p_l **
<p_l>
stylewarning: unless they were iPad-raised ;) but yeah, that's why I suggested menu the first thing, because even for me combination of OSX+Emacs is sometimes incompatible in copy/paste
<stylewarning>
One day Lisp with garner enough popularity and attention that somebody will write a slick, open source IDE
gareppa has quit [Quit: Leaving]
<p_l>
well, there are some alternatives available
<p_l>
I think we need to put them on, somewhere
<p_l>
ACLU website?
<stylewarning>
There are (big air quotes) Alternatives (TM)
<p_l>
(might have mixed up the acronym)
<p_l>
stylewarning: I heard people saying good things about whatever is done for Atom
<p_l>
even if it's much less than full SLIME
<p_l>
at least they reuse SWANK
<stylewarning>
True, some folks get by with it
<stylewarning>
But there’s no PyCharm or IntelliJ for Lisp ):
<p_l>
there was SWANK client for Eclipse
jfe has quit [Ping timeout: 276 seconds]
<stylewarning>
There were the greatest IDEs ever in the past
random-nick has joined #lisp
cosimone has joined #lisp
jfe has joined #lisp
ralt has joined #lisp
stzsch has quit [Ping timeout: 276 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
mathrick has joined #lisp
cosimone has quit [Remote host closed the connection]
<aeth>
Might be more relevant in the CLIM channel if there is one, but I'm not there
<aeth>
some fun edge cases.
gravicappa has quit [Ping timeout: 276 seconds]
<aeth>
stylewarning: re IDEs, that's one of the (secondary) reasons that I'm making a game engine. It might sound weird, but almost every game engine eventually has a built-in IDE (which I kind of hate, since I like using Emacs), so... in a roundabout way, it might be more effective to write an IDE by writing in the class of software that's commonly known as bloating into including one.
ggole has quit [Quit: Leaving]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
mindCrime_ has quit [Ping timeout: 265 seconds]
<aeth>
And I guess it makes sense because no one wants to use a half-complete text editor and IDE (so toy editors never grow up)... unless it's built into something else.
psych has quit [Remote host closed the connection]
shka_ has quit [Ping timeout: 240 seconds]
milanj has quit [Quit: Leaving]
analogue has quit [Quit: Leaving]
cl-arthur has joined #lisp
antonv has joined #lisp
<ebrasca>
Hi , Hunchentoot load and start in mezzano but when I try to open one page it never load and don't give any error.
<ebrasca>
How I can debug someting like this?
ted_wroclaw has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<ebrasca>
Ok , after very long wait it gives error.
shka_ has joined #lisp
mindCrime_ has joined #lisp
superkumasan has joined #lisp
hh47 has quit [Ping timeout: 250 seconds]
hh47 has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<afidegnum>
using cons seems not to work, how do i add the result of the loop into the list?
<p_l>
this channel might not be best option (a lot of us don't really touch elisp). Tried ##lisp or #lispcafe? Latter is mostly same people as in here, but they can't jump at you for elisp
<asdf_asdf_asdf>
afidegnum, how have be result?
<p_l>
if it was CL I'd swap "do" and "cons" for a :collecting
<p_l>
(loop for i across (cdr lp) :collect (cdr (assoc 'column_name i)))
<fsmunoz>
afidegnum: snub you? Generally elisp is well within the scope of #emacs...
<fsmunoz>
oh, no answers... that is also well within the scope of #emacs :D
<afidegnum>
fsmunoz: i posted other related question since more than 6 hours now went unanswered, but other had their questions answered.
<fsmunoz>
afidegnum: likely nobody had an answer for your specific doubt, don't take it personally
<fsmunoz>
I will give it a look
<asdf_asdf_asdf>
afidegnum. (coerce "txt" 'list)
<asdf_asdf_asdf>
(loop for i in (coerce "txt" 'list) ...
<afidegnum>
ok but that will print single list right? i wanted to have a collection of lists
<asdf_asdf_asdf>
(loop for x in (coerce "abcdefghi" 'list) for y in (coerce "123456789" 'list) collect (list (string x) (string y)))
<afidegnum>
ok
jfe has joined #lisp
shka_ has quit [Ping timeout: 268 seconds]
<asdf_asdf_asdf>
(loop for x = (coerce "abcdefghi" 'list) then (setf x (cdr x)) while (not (eq x NIL)) collect x)
Ven`` has joined #lisp
<afidegnum>
thanks, it works, i m eliminating the nil output :)
<asdf_asdf_asdf>
You also can use mapcan instead mapcar.
<afidegnum>
asdf_asdf_asdf: (loop for i across (cdr lp) collect (cdr (assoc 'column_name i)))
emacsomancer has joined #lisp
<asdf_asdf_asdf>
OK.
afidegnum has quit [Ping timeout: 268 seconds]
afidegnum has joined #lisp
torbo has quit [Remote host closed the connection]
lxbarbosa has joined #lisp
learning has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
lucasb has quit [Quit: Connection closed for inactivity]
CrazyEddy has quit [Ping timeout: 265 seconds]
<remexre>
If I want to embed a file's contents into a lisp image, is it better to do (eval-when (:compile-toplevel :execute) (read-my-file ...)) or #.(read-my-file ...)?
<Xach>
remexre: I don't think there's any need to do it with tricks. you can use normal functions to do it at runtime and it will be preserved when you save the image.
<Xach>
remexre: (defvar *my-file* (read-my-file ...)) or similar.
<remexre>
oh, neat
<remexre>
I'm still more used to thinking about staged computation, I guess
<saturn2>
you only need tricks if you want it to be incorporated into the .fasl
quazimodo has joined #lisp
mrcode_ has quit [Quit: WeeChat 2.4]
monokrom has quit [Remote host closed the connection]
afidegnum has quit [Quit: leaving]
cl-arthur has quit [Quit: Lost terminal]
mindCrime_ has quit [Ping timeout: 240 seconds]
ralt has quit [Quit: Connection closed for inactivity]