<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>
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>
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>
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"
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))) ...
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>
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
<pjb>
Well, I must tell you that emacs does display them differently, so you can distinguish them: (quote (abc abc)) #| --> (abc abc) |#
<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 (abc abc))) #| --> 4 |#
<pjb>
(coerce (quote (abc abc)) '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)
<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]
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.
<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?