phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
lavaflow has quit [Ping timeout: 245 seconds]
lavaflow has joined #lisp
asarch has quit [Quit: Leaving]
rumpelszn has quit [Ping timeout: 272 seconds]
<gabbiel> pjb: nice, but can you link that library?
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Client Quit]
<pjb> gabbiel: github.com/informatimago/lisp
elderK has quit [Quit: Connection closed for inactivity]
q9929t has quit [Remote host closed the connection]
q9929t has joined #lisp
igemnace has joined #lisp
t58 has quit [Quit: Night]
abarbosa has joined #lisp
john2x has quit [Ping timeout: 258 seconds]
anewuser has quit [Ping timeout: 246 seconds]
lavaflow has quit [Ping timeout: 248 seconds]
lavaflow has joined #lisp
moldybits has joined #lisp
lavaflow has quit [Ping timeout: 258 seconds]
lavaflow has joined #lisp
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 272 seconds]
zotan has quit [Ping timeout: 258 seconds]
zotan has joined #lisp
zotan has quit [Ping timeout: 250 seconds]
zotan has joined #lisp
manualcrank has joined #lisp
maxxcan has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
maxxcan has quit [Remote host closed the connection]
orivej has joined #lisp
<gabbiel> tanks pjb
john2x has joined #lisp
shifty has joined #lisp
libertyprime has joined #lisp
dddddd has quit [Remote host closed the connection]
nowhere_man has joined #lisp
jelanv has joined #lisp
nowhereman has quit [Ping timeout: 272 seconds]
lavaflow has quit [Ping timeout: 272 seconds]
nowhere_man has quit [Ping timeout: 246 seconds]
<beach> Good morning everyone!
<Josh_2> Mornin
<drmeister> Hey does anyone have thoughts on the following? I'm implementing maphash on thread safe hash-tables.
<drmeister> I put a read-lock on the hash-table for the entire duration of the maphash - but this causes problems if the programmer evaluates (setf (gethash current-element current-hash-table) value).
<drmeister> I get a deadlock because the (setf (gethash ...) ...) tries to grab a write lock while the maphash has a readlock.
<beach> It is also problematic if the body of the maphash does some significant calculation that will make the hash table locked for a long time.
<drmeister> beach: Yeah - that is a concern as well.
<drmeister> Should I copy the hash-table contents into another data structure and then map over that?
<beach> I think that would be incorrect behavior.
<beach> As I recall, some modification is allowed to the hash table during maphash.
<beach> Let me check...
<drmeister> You are allowed to update the value of an element in the hash table.
jelanv has quit [Quit: Page closed]
<beach> I see. So maybe it's safe.
<drmeister> My hash table is a vector of cons cells - if I copied it and iterated over its key/value pairs the programmer would be free to do what they want.
<beach> Apparently not any element.
<drmeister> Ah - the element being currently processed.
<beach> Well, I was thinking of the following scenario: During maphash, an call is made to a function F. That function modifies a value that has not yet been seen in the maphash. But apparently, that is undefined behavior.
<beach> Perhaps they were thinking that you should do exactly what you are now thinking.
<beach> Oh, but here is a scenario you need to handle then...
<beach> During maphash, the current entry is removed or modified and then an external function F is called.
<beach> The function F accesses the modified or removed element.
<beach> It has to see the modification (or get the result NIL, NIL).
<beach> So, when you modify the current element, the modification has to be visible in two places; in the original hash table and in the copy.
<beach> Also, you have to handle the case where two different threads are doing a maphash on the same hash table simultaneously.
<drmeister> Does it? maphash iterates over the copy and calls the maphash lambda with the key/value from the copy. The lambda has the original to work with. So if it changes the value in the original are you saying that the value has to change?
lavaflow has joined #lisp
<drmeister> The value that was passed to the lambda?
<beach> Let's say (maphash (lambda (key value) ... (setf (gethash key table) 234) (print value)) table).
<beach> Oh, I guess you can consider the value bound beforehand. Never mind.
<beach> So anyway, if maphash copies, where do you put the copy?
<beach> In the thread object?
<beach> Or do you have a single copy?
<beach> Suppose you do a maphash that removes an entry, and sometime after the entry is removed, but before the maphash finishes, a different thread starts a maphash on the same table.
<drmeister> I think if I made a copy, it would be only exist as long as maphash was running.
<beach> Sure.
<drmeister> If a different thread starts a maphash on the same table it would map over whatever the table looked like at the start of the maphash.
<drmeister> I'm trying to think of how to do this while avoiding copying the hash-table - but I can't come up with anything.
<beach> So you would keep the copy locally inside maphash?
<drmeister> Now that clasp's hashtables use open addressing - it's just a matter of allocating a vector of cons cells and copying the whole thing.
<drmeister> Yeah.
<beach> OK. It would be a bit surprising that maphash might allocate memory. But perhaps you can make the vector dynamic-extent.
<beach> You also need to think about what might happen during the process of copying the table.
<beach> Do you lock it then?
<drmeister> Yes, I think it should be locked while copying it.
<beach> Have you decided against the use of lock-free hash tables?
<beach> And if so, why?
gravicappa has joined #lisp
clothespin has joined #lisp
<drmeister> I'm not sure how to implement them.
<beach> There are plenty of publications on the subject. Here is one that I just found: https://www.liblfds.org/downloads/white%20papers/[Hash]%20-%20[Michael]%20-%20High%20Performance%20Dynamic%20Lock-Free%20Hash%20Tables%20and%20List-Based%20Sets.pdf
C0x10 has quit [Ping timeout: 258 seconds]
<beach> I know of at least 2 others.
<clothespin> hi beach
notzmv has quit [Ping timeout: 246 seconds]
notzmv has joined #lisp
makomo has joined #lisp
<drmeister> beach: Thanks - I'll take a look at it.
pillton has joined #lisp
caltelt_ has joined #lisp
caltelt has quit [Ping timeout: 245 seconds]
meepdeew has joined #lisp
dacoda has joined #lisp
vlatkoB has joined #lisp
shifty has quit [Ping timeout: 248 seconds]
meepdeew has quit [Ping timeout: 272 seconds]
Inline has quit [Quit: Leaving]
jprajzne has joined #lisp
john2x has quit [Ping timeout: 272 seconds]
libertyprime has quit [Ping timeout: 248 seconds]
_whitelogger has joined #lisp
asarch has joined #lisp
<asarch> What is the shortcut for ++ang;
<asarch> (Or even ang++;)
<beach> What?
<asarch> (+1 ang)?
<beach> Why don't you tell us what it is that you want to do.
<asarch> (incf ang 1)?
<beach> As opposed to referring to constructs in other languages.
<asarch> (setf ang (+ ang 1))
<asarch> I mean, any short form for that operation?
<beach> What is "that operation"?
<asarch> (setf ang (+ ang 1))
<beach> (incf ang)
<asarch> Thank you!
<beach> It is not about being short. It is about using the most specific construct that will have the desired effect.
<beach> That is a very general rule in programming, no matter what language you are using.
<asarch> I see
<asarch> どもうありがとう 先生 beach :-)
SaganMan has joined #lisp
<beach> Sure.
malm has quit [Quit: Bye bye]
malm has joined #lisp
MichaelRaskin has quit [Quit: MichaelRaskin]
<beach> Also notice that (setf <form> (+ <form> 1)) has different semantics compared to (incf <form>) when <form> has side effects.
<beach> For example (incf (aref array (print 1))) is different from (setf (aref array (print 1)) (+ (aref array (print 1)) 1))
* asarch takes notes...
<asarch> You can kill SBCL meanwhile... http://paste.scsys.co.uk/584672
<asarch> That's the beta version
meepdeew has joined #lisp
SaganMan has quit [Ping timeout: 272 seconds]
<asarch> How could I know why SBCL died every time I load that file?
aindilis has quit [Ping timeout: 246 seconds]
caltelt_ has quit [Ping timeout: 272 seconds]
dacoda has quit [Ping timeout: 272 seconds]
lnostdal has quit [Ping timeout: 258 seconds]
iovec has joined #lisp
meepdeew has quit [Remote host closed the connection]
leb has quit []
v88m has quit [Read error: Connection reset by peer]
ggole has joined #lisp
lnostdal has joined #lisp
sauvin has quit [Ping timeout: 268 seconds]
sauvin has joined #lisp
Necktwi has quit [Ping timeout: 245 seconds]
<oni-on-ion> asarch, at a glance it looks like it could be a GLUT thing, if it kills the thread
JohnMS_WORK has joined #lisp
<oni-on-ion> だが、しらん
shka_ has joined #lisp
<oni-on-ion> asarch, oh! i see it. your parentheses are wrong.
<oni-on-ion> right after defmethod glut:reshape
<oni-on-ion> (sb-ext:exit))))
<oni-on-ion> so, the code just quits sbcl.
<oni-on-ion> just comment that line and all should be well .
<oni-on-ion> if you are using emacs please try "paredit" and/or "rainbow-delimiters-mode" to keep the parens balanced. no sane person counts these by hand
donotturnoff has joined #lisp
<asarch> D'oh!
<asarch> Thank you!
<asarch> Thank you very much oni-on-ion :-)
Necktwi has joined #lisp
<oni-on-ion> not a problem
<asarch> どもうありがとう 先生!!!
<oni-on-ion> いえいえ、別に
<asarch> Ok
quazimodo has quit [Ping timeout: 258 seconds]
v88m has joined #lisp
esrse has joined #lisp
shidima has joined #lisp
v88m has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
schjetne has joined #lisp
<asarch> Do you know how could I avoid this? "CL-GLUT:PASSIVE-MOTION-FUNC already names an ordinary function or a macro."
<no-defun-allowed> don't have a function defined as cl-glut:p-m-f that probably
quazimodo has quit [Ping timeout: 248 seconds]
<asarch> Let's see..
<asarch> (defmethod cl-glut:create-menu ((w window) value) (format t "Hello, world!~%")): CL-GLUT:CREATE-MENU already names an ordinary function or a macro.
q9929t has quit [Ping timeout: 245 seconds]
q9929t1 has joined #lisp
<no-defun-allowed> Yeah, it's probably not a generic function.
q9929t1 is now known as q9929t
SaganMan has joined #lisp
shifty has joined #lisp
q9929t has quit [Ping timeout: 248 seconds]
varjag has joined #lisp
scymtym has joined #lisp
zmt00 has quit [Read error: Connection reset by peer]
<asarch> Better, let's ask to the main developer: https://github.com/3b/cl-opengl/issues/82
<asarch> :-P
lavaflow_ has joined #lisp
<SaganMan> Morning beach
lavaflow has quit [Ping timeout: 268 seconds]
<asarch> Doing a (glut:display-window window) I get: "The value :RIGHT-BUTTON is not of type (SIGNED-BYTE 32) when binding SB-ALIEN::VALUE"
<asarch> I mean, a (glut:attach-menu :right-button)
<asarch> And not even doing a (glut:attach-menu 'right-button) works: "The value RIGHT-BUTTON is not of type (SIGNED-BYTE 32) when binding SB-ALIEN::VALUE"
dpl has joined #lisp
asarch has quit [Quit: Leaving]
<oni-on-ion> hmm
aindilis has joined #lisp
quazimodo has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
schweers has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
<beach> I think this is a song about a programmer who wants to use Common Lisp but the manager does not agree: https://www.youtube.com/watch?v=IIyoGPOwqLM
<shka_> beach: good day!
<beach> Hey shka_.
dale has quit [Quit: dale]
<shka_> and "endless sacrifice" is all about the C
<beach> Heh!
<phoe> "I extend my hand." Does it mean that his hand now has hand-extent?
<beach> Good question.
<shka_> though i consider this to be the lisp theme music https://www.youtube.com/watch?v=bKFxAXn1QOQ ;-)
<shka_> eldars in the warhammer 40k have this tragic and arrogant edge
<shka_> which seems fitting for lisp as well :P
longshi has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
orivej has joined #lisp
dddddd has joined #lisp
quazimodo has joined #lisp
gabbiel has quit [Ping timeout: 272 seconds]
donotturnoff has quit [Read error: Connection reset by peer]
<loke> Which is your favourite C*R function? I kinda like CDAADR
<LdBeth> car
* LdBeth the reason is obvious
<no-defun-allowed> CDAAAAR is my favourite, as it subverts all expectations on what you call a list
oni-on-ion has quit [Remote host closed the connection]
v88m has joined #lisp
refpga has joined #lisp
Necktwi has quit [Quit: leaving]
<LdBeth> well that's a binary tree
<loke> no-defun-allowed: There is no CDAAAAR. Maybe you mean CDAAAR?
<no-defun-allowed> sure
<loke> I like CDAADR because it's kind of symmertirc, completely useless, and impossible to track without drawing a box-and-arrow diagram.
<LdBeth> I like how acl2 puts contracts on arguments
thijso has joined #lisp
<phoe> Siiiigh
<phoe> I desire a graphical tool for creating and managing ASDF systems
<shka_> your desires are acceptable
<shka_> you lucky man :P
<phoe> that's only the tip of the iceberg
* gjvc looks for some slick emacs setups on github
refpga has quit [Read error: Connection reset by peer]
<flip214> I've got a special variable that I need to change via SETF during a test, as it is used by other threads. Is there a facility in 5AM that provides help for that, or do I just have to put an UNWIND-PROTECT in my test and hope the other threads are done accessing even if something goes wrong?
<phoe> flip214: is it used by other threads? are you setting the global binding of that dynamic variable or some dynamic one?
<phoe> as in, is that a dynamic variable, as in, is it rebound by your code, or is it a global variable that your code does not rebind?
<flip214> phoe: I need to change the global binding, so that other threads see the "right" value.
<flip214> ie. my test connects to hunchentoot (in the same process), and needs to fake some data for these threads.
* phoe mutters something about shared mutable state
<phoe> sounds like a case for UNWIND-PROTECT with a pair of SETFs, one in the test body, the other in the cleanup forms
<flip214> phoe: it's not shared state but authentication configuration that needs to be faked.
<flip214> so the other threads wouldn't write to that, so the two SETFs should be good enough --
<flip214> but I'm asking for the case too that the other threads might want to change something there
<flip214> but as 5am has no control over these threads it won't offer any help, I guess
<gjvc> melpa.org is so slow
hhdave has joined #lisp
<shka_> flip214: use function as accessor, put any synchronization you may need into it
<shka_> don't use variables directly and you are golden
longshi has quit [Ping timeout: 272 seconds]
<flip214> can I tell YASON to encode a multi-level alist, or do I need to change the structure to hash-tables?
<flip214> for example ((:a . (:b . 1)) (:c . 4))
<flip214> yason:encode-alist only does the first level, on the second I get "no applicable method" for the keyword
<flip214> ah, should be ((:a . ((:b . 1))) (:c . 4))
<loke> I'm confused. What is the different between DEPOSIT-FIELD and DPB?
<loke> The hyperspec is very unclear.
<LdBeth> gjvc: given that there's plenty of mirrors, u could choose one closest to u location
<jackdaniel> loke: maybe this part will shed some light: " deposit-field is to mask-field as dpb is to ldb. "
<loke> jackdaniel: Not really. THose two looks very similar too.
<flip214> ugh, I'm too stupid right now. first example was correct, ((:a (:b . 1) . (:c . 2))) ...
<gjvc> LdBeth: thank you i will find one
SaganMan has quit [Quit: WeeChat 1.6]
SaganMan has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
gravicappa has quit [Ping timeout: 257 seconds]
crystalball has joined #lisp
gravicappa has joined #lisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
crystalball has quit []
longshi has joined #lisp
Lord_of_Life has joined #lisp
rumpelszn has joined #lisp
<pjb> loke: the difference is in the shifting.
<pjb> (list (dpb 1 (byte 1 10) 0) (deposit-field 1024 (byte 1 10) 0)) #| --> (1024 1024) |#
<pjb> (list (dpb 1 (byte 1 10) 0) (deposit-field (ash 1 10) (byte 1 10) 0)) #| --> (1024 1024) |#
<pjb> (list (dpb 5 (byte 3 10) 0) (deposit-field (ash 5 10) (byte 3 10) 0)) #| --> (5120 5120) |#
orivej has joined #lisp
<pjb> loke: notably, for ldb mask-field: (values (ldb (byte 3 10) 5120) (mask-field (byte 3 10) 5120)) #| --> 5 ; 5120 |#
<pjb> (values (ldb (byte 3 10) 5120) (ash (mask-field (byte 3 10) 5120) -10)) #| --> 5 ; 5 |#
crystalball has joined #lisp
<loke> pjb: Got it. Thanks!
longshi has quit [Ping timeout: 245 seconds]
GoldRin has joined #lisp
gravicappa has quit [Ping timeout: 268 seconds]
gravicappa has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
lavaflow_ has quit [Ping timeout: 248 seconds]
liead has joined #lisp
malm_ has joined #lisp
kdas_ has joined #lisp
cronolio has quit [Ping timeout: 258 seconds]
adlai has quit [Read error: Connection reset by peer]
schjetne has quit [Ping timeout: 258 seconds]
malm has quit [Ping timeout: 258 seconds]
kushal has quit [Remote host closed the connection]
cronolio has joined #lisp
crystalball has quit []
orivej has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
crystalball has joined #lisp
lavaflow_ has joined #lisp
pankajgodbole has joined #lisp
crystalball has quit [Client Quit]
crystalball has joined #lisp
cosimone has joined #lisp
crystalball has quit [Client Quit]
lavaflow_ has quit [Ping timeout: 246 seconds]
igemnace has quit [Quit: WeeChat 2.4]
igemnace has joined #lisp
v88m has quit [Ping timeout: 245 seconds]
kajo has quit [Ping timeout: 248 seconds]
kajo has joined #lisp
<cosimone> newb question: when using a lambda expression as argument (for instance, in procedures such as mapcar) do you think it's better to use #' or omit it?
<pjb> cosimone: in CL, omit it.
<pjb> In CLtL2, use it.
<pjb> Do you know a CLtL2 compiler?
<no-defun-allowed> i don't like it tbh, but some people might find it more "consistent"
<cosimone> forgot to specify, yes, i was talking about common lisp
<pjb> Now it's a little more complicated than that.
<no-defun-allowed> and if you get crap from a CLtL2 compiler, just (defmacro lambda (&whole me) `(function ,me))
<pjb> #' by default is a reader macro that reads as (CL:FUNCTION …) CL:FUNCTION is the only special operator that creates closures.
<pjb> lambda by default is CL:LAMBDA which is bound to a macro that expands to (CL:FUNCTION (CL:LAMBDA ….))
<cosimone> ok, that makes sense
<pjb> BUT, you could have a shadowed lambda, that would expand to something else, for example, (cl-stepper:function (cl-stepper:lambda …))
<pjb> BUT if you don't have a similar reader macro that reads #'x as (cl-stepper:function x) it could make a big difference.
<cosimone> i see
<pjb> So I prefer to avoid #' (I even write (function f) instead of #'f, because I find #' to be too spiky, I prefer the roundness and chubiness of ( ) ).
<pjb> But sometimes you may want to use it.
<pjb> (or use explicit qualified symbols, but the readtable could also play tricks with that, see for example IBCL).
<shka_> yes ( ) is quite erotic
<cosimone> i see, i know that #' is pretty much a shorthand for (function ...)
<cosimone> but i was wondering whether you should use #' or (function ...) at all when using lambdas
<pjb> cl:function yes.
<pjb> Since in CL lambda is a macro that expands to (cl:function (cl:lambda …)) there's no need.
<cosimone> since lambda is a macro that already "incorporates" (function ...), my first reaction would be that it isn't
<cosimone> yes
<pjb> #' does it at read time, lambda does it at macroexpansion time.
<cosimone> i often see both styles in other people's code, and i was just wondering what would be considered best practice
<cosimone> omitting it seems more in the spirit of scheme
<pjb> Also, you must be careful, because #'x is read as a list, so when it's quoted, you don't get a function. (neither with lambda). But it may be confusing since #P produces a pathname at read-time.
<pjb> (mapcar 'type-of '(#'foo #P"foo")) #| --> (cons pathname) |#
<cosimone> mmm ok, makes sense
<pjb> (mapcar 'type-of '((lambda (x) x) #'foo #P"foo")) #| --> (cons cons pathname) |#
<pjb> (mapcar 'type-of '((lambda (x) x) (function foo) (pathname "foo"))) #| --> (cons cons cons) |#
<pjb> the later may be less surprising.
<jdz> shka_: ( Y )
<pjb> Of course, you can always use #. (if *read-eval* is not nil): (mapcar 'type-of '(#.(lambda (x) x) #.#'car #.(function car) #.#P"foo" #.(pathname "foo"))) #| --> (function function function pathname pathname) |#
<pjb> EU: (.)(.) USA: ( . ) ( . )
<antoszka> lol
<cosimone> pjb: ok, thanks for all the info
<cosimone> ( ) )
<phoe> ...oh gods, I just saw it
<phoe> looks like #lispcafe is leaking again
<shka_> don't blame me, i have some unfulfilled needs :P
<shka_> like, a lot
quazimodo has joined #lisp
wigust has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
powerbit has quit [Ping timeout: 246 seconds]
wigust- has quit [Ping timeout: 248 seconds]
<no-defun-allowed> pjb: Nothing appears before . in list
<no-defun-allowed> also, we know you've never seen those IRL and you can't coerce people to objects like that either
crystalball has joined #lisp
crystalball has quit [Client Quit]
kdas_ is now known as kushal
cosimone has quit [Quit: WeeChat 2.3]
vxe has joined #lisp
Lord_of_Life has quit [Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine]
Lord_of_Life has joined #lisp
esrse has quit [Ping timeout: 258 seconds]
_whitelogger has joined #lisp
cosimone has joined #lisp
m00natic has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 258 seconds]
amerlyq has joined #lisp
vaporatorius has quit [Ping timeout: 246 seconds]
q9929t has joined #lisp
GoldRin has quit [Remote host closed the connection]
karayan has joined #lisp
steiner has joined #lisp
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
Inline has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
khisanth_ has quit [Ping timeout: 258 seconds]
nirved_ has quit [Quit: Leaving]
m00natic has quit [Remote host closed the connection]
nirved has joined #lisp
t58 has joined #lisp
rumpelszn has quit [Ping timeout: 245 seconds]
khisanth_ has joined #lisp
karayan has quit [Quit: Page closed]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
jprajzne has quit [Quit: Leaving.]
orivej has quit [Ping timeout: 272 seconds]
shka_ has quit [Quit: WeeChat 1.9.1]
orivej has joined #lisp
hhdave has quit [Quit: hhdave]
<phoe> no-defun-allowed: (nothing . nil)
<phoe> you are right, nothing appears before . in list
anewuser has joined #lisp
nckx has quit [Ping timeout: 248 seconds]
nckx has joined #lisp
GoldRin has joined #lisp
jmercouris has joined #lisp
<schweers> phoe: maybe one could use some funky nonbreaking space or so, which may be interpreted as a symbol on some lisp.
donotturnoff has joined #lisp
quazimodo has joined #lisp
<dim> zero width space: “​” ; might be my favorite unicode weird character
<dim> then you can have symbols ab​c and a​bc which are not the same but are impossible to distinguish…
<dim> and with CCL at least (let ((​ 2)) ​) ==> 2
<dim> then (let ((cell (cons '​ '​))) cell) is obviously (​ . ​)
jmercouris has quit [Remote host closed the connection]
<jackdaniel> there are also unicode "parens" which you could in a symbol name ,-)
<jackdaniel> (let ((foo(bar)qux 42)) (cons 13 foo(bar)qux))
cosimone has joined #lisp
<pjb> Well, I must tell you that emacs does display them differently, so you can distinguish them: (quote (ab​c a​bc)) #| --> (ab​c a​bc) |#
<schweers> pjb: I guess that depends on the font. For my untrained eye those two look identical.
<pjb> I wouldn't so far as saying that the zero-width space has a width, but probably the kerning is different. Which is a strange thing to say for a non-proportional font…
<schweers> Ah. Now I see it.
<schweers> But boy is it subtle.
<pjb> Indeed. It would be a good idea if it used symbol escapes…
<dim> pjb: my emacs setup doesnt' show any difference at least
<pjb> You can save your life with: (set-syntax-from-char #\Zero_Width_Space #\space) #| --> t |# (length (quote (ab​c a​bc))) #| --> 4 |#
<pjb> (coerce (quote (ab​c a​bc)) 'vector) #| --> #(ab c a bc) |#
<dim> ah yeah maybe there's something, but I can't decide if that's because I know where to look and then my brain is happy to provide me again what I decided I wanted to see, or if there's a subtle difference for real
<pjb> Use Cmd-Opt-8 ; it's definitely there.
kajo has quit [Ping timeout: 258 seconds]
varjag has joined #lisp
anewuser has quit [Ping timeout: 245 seconds]
cosimone has quit [Ping timeout: 257 seconds]
kajo has joined #lisp
v88m has joined #lisp
cosimone has joined #lisp
schweers has quit [Ping timeout: 250 seconds]
ym555 has joined #lisp
rippa has joined #lisp
pauljb has joined #lisp
refpga has joined #lisp
pauljb has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 272 seconds]
meepdeew has joined #lisp
GoldRin has quit [Ping timeout: 258 seconds]
meepdeew has quit [Remote host closed the connection]
ebrasca has joined #lisp
nanoz has joined #lisp
sz0 has joined #lisp
FreeBirdLjj has joined #lisp
liead is now known as adlai
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
another-user has joined #lisp
<another-user> hello
pankajgodbole has quit [Ping timeout: 250 seconds]
<another-user> is there a way to direct flexi stream to file without manually reading it byte by byte?
<another-user> i need it to save file obtained via (drakma:http-request :want-stream t)
FreeBirdLjj has quit [Ping timeout: 258 seconds]
<_death> alexandria:copy-stream?
<another-user> _death: hm, i don't see it here https://common-lisp.net/project/alexandria/draft/alexandria.html
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
<another-user> found it in source, thank you, _death !
orivej has joined #lisp
<_death> yeah, I guess the manual needs to be updated
steiner has quit [Remote host closed the connection]
<another-user> do i need to specify element-type for with-open-file if i deal with binary file?
<_death> yes.. (unsigned-byte 8)
shka_ has joined #lisp
<another-user> _death: wouldn't it use usigned-byte 8 by default?
<_death> clhs open
<another-user> _death: got it, it's better to specify then, thanks!
<_death> not just better.. "The default is character."
zmt00 has joined #lisp
<another-user> looks like flexi-io-stream has element type of FLEXI-STREAMS::CHAR* would it be okay to copy-stream from flexi one to file stream with unsigned-byte element type?
<_death> flexi streams are bivalent streams, i.e. they support both binary and character IO..
<another-user> _death: got it, thank you for explanation and patience :)
Oladon has quit [Ping timeout: 245 seconds]
caltelt has joined #lisp
another-user has quit [Quit: WeeChat 2.4]
oni-on-ion has joined #lisp
Folkol has joined #lisp
longshi has joined #lisp
longshi has quit [Client Quit]
gravicappa has quit [Ping timeout: 248 seconds]
cosimone has quit [Quit: WeeChat 2.3]
gabbiel has joined #lisp
ravenousmoose has joined #lisp
shifty has quit [Ping timeout: 244 seconds]
oni-on-ion has quit [Remote host closed the connection]
Posterdati has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Posterdati has joined #lisp
rdh has joined #lisp
mgsk has quit [Ping timeout: 252 seconds]
l1x has quit [Read error: Connection reset by peer]
Duns_Scrotus has quit [Ping timeout: 252 seconds]
q9929t has quit [Remote host closed the connection]
q9929t has joined #lisp
ggole has quit [Quit: Leaving]
RagnarDanneskjol has quit [Ping timeout: 276 seconds]
splittist has quit [Ping timeout: 276 seconds]
refpga has quit [Ping timeout: 248 seconds]
nanoz has quit [Ping timeout: 272 seconds]
datajerk has quit [Quit: ZNC 1.7.3 - https://znc.in]
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
jmercouris has joined #lisp
<jmercouris> hello everyone
<pjb> hello alone
splittist has joined #lisp
mgsk has joined #lisp
l1x has joined #lisp
Duns_Scrotus has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
meepdeew has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
ym555 has quit [Quit: leaving...]
datajerk has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
hiroaki has joined #lisp
ravenousmoose has quit [Read error: Connection reset by peer]
ravenousmoose has joined #lisp
meepdeew has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
ym555 has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ym555 has quit [Quit: leaving...]
donotturnoff has quit [Remote host closed the connection]
ym555 has joined #lisp
<jmercouris> :|
<jmercouris> oh you probably mean a single person
<jmercouris> :D
meepdeew has joined #lisp
Arcaelyx has quit [Ping timeout: 248 seconds]
jmercouris has quit [Ping timeout: 272 seconds]
john2x has joined #lisp
ym555_ has joined #lisp
Arcaelyx has joined #lisp
donotturnoff has joined #lisp
ym555 has quit [Ping timeout: 248 seconds]
meepdeew has quit [Remote host closed the connection]
abarbosa has quit [Ping timeout: 258 seconds]
Arcaelyx has quit [Ping timeout: 246 seconds]
donotturnoff has quit [Ping timeout: 248 seconds]
nowhere_man has joined #lisp
jmercouris has joined #lisp
jmercouris has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 252 seconds]
hiroaki has joined #lisp
shka_ has quit [Ping timeout: 272 seconds]
amerlyq has quit [Quit: amerlyq]
shidima has quit [Ping timeout: 248 seconds]
oni-on-ion has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
Arcaelyx has joined #lisp
varjag has quit [Ping timeout: 245 seconds]
ym555_ has quit [Quit: leaving...]
meepdeew has joined #lisp
meepdeew has quit [Remote host closed the connection]
john2x has quit [Ping timeout: 246 seconds]
hiroaki has quit [Ping timeout: 252 seconds]
oni-on-ion has joined #lisp
caltelt_ has joined #lisp
jcowan has joined #lisp
<jcowan> What are the practical applications, if any, of lists of lists (of atoms)?
<edgar-rft> Everything that needs a variable length at runtime. The underlying CONS can be used for building arbitrary data stuctures.
caltelt_ has quit [Ping timeout: 258 seconds]
dddddd has quit [Ping timeout: 272 seconds]
caltelt_ has joined #lisp
<pjb> jcowan: Symbolic expressions (lists of atoms or lists) are used to represent any data you want.
<jcowan> Certainly. But that hardly answers the question. "What is this for?" "Anything you want." is not a very useful reply.
<no-defun-allowed> Lists can have conses consed to the front without mutations, which is good for making spaghetti stacks and environments among other things you might want in a recursive process.
<pjb> jcowan: for example, if you want to represent flags by their scheme and colors, (vertical blue white red) and (horizontal gold red black) could represent the flags of France and Germany.
<no-defun-allowed> *(solid white)
<pjb> jcowan: then if you want to hold a list of flags, you'd use the list of list of atoms: ((vertical blue white red) (horizontal gold red black)).
<pjb> jcowan: that's it.
<oni-on-ion> or use unicode
<pjb> oni-on-ion: unicode doesn't describe the structure of the flag!
<no-defun-allowed> 🏳
<oni-on-ion> oh =) i thought it might already. (it does with families/skintones)
<jcowan> True. But that is not a pure list-of-list context: you most likely want a list of flag structs/instances with slots country, direction, and colors.
<oni-on-ion> like a lil' proglang
<pjb> jcowan: another example, would be to represent a program. You could use a list of expressions: (progn (print 'hello) (* 42 33)) which would be a list of list or atoms.
<jcowan> oni-on-ion: No, it's just <flag> G B or <flag> C H etc. sequences
<oni-on-ion> 193 accepted flags by UN...
<edgar-rft> no-defun-allowed: what is |01F3F3| ?
<oni-on-ion> jcowan, in your application of it? cool
<jcowan> Again, the representation of a form as a list is historical: you really want a struct with :operator and :operands. All the use cases I can think of are like this.
<jcowan> A list of to-do lists probably associates each to-do list with a person or date or what have you, for example.
<pjb> jcowan: you could use list of lists to represent a list of equivalence classes: (equivalence-classes (iota 20) :test (lambda (a b) (zerop (mod (- a b) 3)))) #| --> ((17 14 11 8 5 2) (19 16 13 10 7 4 1) (18 15 12 9 6 3 0)) |#
<jcowan> Excellent, and very convincing! Thanks.
<oni-on-ion> ehh i'd use prolog for this myself. flag(X,any_stripe(orange)). X = Glossonovia
<oni-on-ion> flag(Canada,Y). Y = vertical(red,white,red).
<jcowan> Orange (aka tenné) is very marginal in heraldry. Normally, if you can't do it with or, argent, azure, gules, vert, and purpure, you probably shouldn't try.
<oni-on-ion> 'or' ? french for gold?
<jcowan> (gold/yellow, silver/white, blue, red, green, purple)
<oni-on-ion> ah
<jcowan> Yes, most of the terminology is fractured French
<oni-on-ion> interesting
zcid has quit [Remote host closed the connection]
<oni-on-ion> i notice that british uses flags-in-flag
<jcowan> The U.S. flag, for instance, is "Gules six bars argent on a canton azure 50 mullets of the second, six, five, six, five, six, five, six, five, and six"
<oni-on-ion> ie. Ascension Island(aus?), British Columbia(canada)
<oni-on-ion> ohh! you're parsing that ?
<jcowan> Blazonry can describe that too.
<jcowan> something like "A red background with six horizontal stripes that are white, with a blue upper left corner with 50 five-pointed stars of the second color (white again), arranged in the specified pattern (a row of six, then of five, etc.)"
<oni-on-ion> 676 possibilities
hiroaki has joined #lisp
<oni-on-ion> did not know that there really are this many british/UK-conquered places
<oni-on-ion> jcowan, what about reducing language to simple draw commands ? (fill 'white) (fill 'red :pattern 0.5) (fill 'blue :rect '(0 0 0.25 0.25)) (....stars...)
<oni-on-ion> (simpler than that ofc)
<pjb> oni-on-ion: this is #lisp, not #prolog.
<oni-on-ion> pjb, i meant to say unification. posted link to CL library i've used for it
<pjb> I see there's some interest for vexillology…
<oni-on-ion> so.... #vexillologism ??
dddddd has joined #lisp
orivej has joined #lisp
<no-defun-allowed> edgar-rft: a white flag
_leb has joined #lisp
gabbiel has quit [Remote host closed the connection]
techquila has joined #lisp
_leb has quit []
caltelt_ has quit [Ping timeout: 258 seconds]
linli has joined #lisp
rdh has quit [Remote host closed the connection]
moldybits` has joined #lisp
linli has quit [Remote host closed the connection]
linli has joined #lisp
libertyprime has joined #lisp
moldybits has quit [Ping timeout: 245 seconds]
iovec has quit [Quit: Connection closed for inactivity]
asarch has joined #lisp
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
moldybits` has quit [Quit: WeeChat 2.4]
linli has quit [Read error: No route to host]
linli has joined #lisp
SaganMan has quit [Ping timeout: 248 seconds]
moldybits has joined #lisp
_leb has joined #lisp
P0rkD_ has joined #lisp
tko has joined #lisp
<aeth> So 64c128t AMD (i.e. x86-64) server CPUs are (probably) coming in September. And an enthusiast 64c128t might follow in 2020. Mainstream AMD is going to be 12c24t in July. And who knows? Maybe they'll have a mainstream 16c32t in 2020. Things seem to be increasing on schedule since 2017. I wouldn't be surprised if 32 cores is considered to be in the mainstream desktop niche by 2025.
<aeth> How are you preparing your Lisp programs for the decade of just throwing more cores at things because single-core performance improvements are largely dead?
<no-defun-allowed> M-x r-str mapcar lparallel:pmapcar
<clothespin> resurrect *Lisp
<no-defun-allowed> (petalisp:α #'foo #2a((1 2) (3 4) ...))
<no-defun-allowed> still gotta get IR running on my gpu backend but i have too many projects to do ]:<