<ludston>
jmercouris: Should just shuffle the set of fruit, output into a text file. When your program start, load into an array and (aref fruit (mod day (length fruit)))
aeth has quit [Ping timeout: 244 seconds]
aeth has joined #commonlisp
akoana has quit [Quit: leaving]
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
akoana has joined #commonlisp
Josh_2 has joined #commonlisp
<Josh_2>
Dumb question time, how do I get the common elements between multiple lists?
<moon-child>
INTERSECTION
<Josh_2>
ffs ofcourse
<Josh_2>
I knew there was a built in function, I blame it on the fact its 2am xD
<moon-child>
also UNION for the opposite operation
<pjb>
and set-difference
<moon-child>
that's \?
<pjb>
yes.
<Josh_2>
I knew about set-difference, I even checked PCL before coming here
<Josh_2>
I should have looked in GICL
pjb has quit [Ping timeout: 244 seconds]
fengshaun has quit [Remote host closed the connection]
fengshaun has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
wheelsucker has joined #commonlisp
zacts has joined #commonlisp
zacts has quit [Client Quit]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 244 seconds]
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 268 seconds]
pjb has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
taiju has joined #commonlisp
akoana has quit [Quit: leaving]
<beach>
Good morning everyone!
aanandc has joined #commonlisp
aanandc has quit [Remote host closed the connection]
<Josh_2>
Good morning beach
tyson2 has quit [Remote host closed the connection]
mindCrime has joined #commonlisp
mindCrime_ has quit [Ping timeout: 272 seconds]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 268 seconds]
Bike has quit [Quit: sleep]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life_ is now known as Lord_of_Life
derelict has joined #commonlisp
mindCrime has quit [Ping timeout: 272 seconds]
taiju has quit [Ping timeout: 240 seconds]
taiju has joined #commonlisp
mindCrime has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
knusbaum has joined #commonlisp
ad-absurdum has joined #commonlisp
mindCrime has quit [Ping timeout: 240 seconds]
etiago has joined #commonlisp
knusbaum has quit [Ping timeout: 240 seconds]
srhm has quit [Quit: Konversation terminated!]
cjb has joined #commonlisp
shka has joined #commonlisp
shka has quit [Client Quit]
shka has joined #commonlisp
mindCrime has joined #commonlisp
dsk has joined #commonlisp
Alfr has quit [Quit: Leaving]
pjb has quit [Ping timeout: 240 seconds]
mindCrime has quit [Ping timeout: 240 seconds]
kakuhen has joined #commonlisp
<kakuhen>
Reposting a question from #lisp : Is there any advantage to using sb-alien over cffi? I have a macro that only runs on SBCL due to using sb-alien, but I also have a macro with identical function that is portable and uses cffi. Should I keep the sbcl-specific macro and append #+:sbcl or just remove it entirely?
<phoe>
cffi stuff should call or expand into sb-alien calls
<kakuhen>
right
<kakuhen>
cffi is a wrapper around the implementation-specific C ffis, if i understood correctly
<phoe>
yes
<kakuhen>
so I am wondering if there is any benefit to keeping sb-alien over cffi
<kakuhen>
for now I am assuming no
<phoe>
perhaps some edge cases that cffi does not support, if there are any
<phoe>
but if you were able to rewrite everything in CFFI perhaps you do not have any
<kakuhen>
right
<kakuhen>
anyway, thanks for the input!
<MichaelRaskin>
Hm, it does look that foreign-funcall might do a bit more work in runtime that a direct sb-alien:alien-funcall
<MichaelRaskin>
Not too likely to matter in practice, though
<kakuhen>
yeah, I think so, too.
<kakuhen>
worst case scenario: upstream complains about my patch and I negotiate by keeping the sb-alien macro for sbcl users and others get the cffi version
<MichaelRaskin>
Does the function being called do anything meaningful?
<kakuhen>
the sbcl-specific macro was taken from a cffi macro and just rewritten to exclusively use sb-alien
<kakuhen>
dont know what the intent would be other than to break portability, so I am changing it to the original cffi macro
<kakuhen>
the software seems to use this macro exactly once for handling sighup signals
<MichaelRaskin>
OK, nobody cares about performance of signal handling
<moon-child>
more like, the overhead of handling a signal is enough that a little extra dispatch is irrelevant
<MichaelRaskin>
Even more specifically, the use case involves a context switch between processes…
<MichaelRaskin>
(although initial setup of signal handling takes «only» a kernel context switch… bit it is also done once per application launch anyway)
terrorjack has quit [Quit: Ping timeout (120 seconds)]
terrorjack has joined #commonlisp
fishfinger has joined #commonlisp
NeoCron has quit [Remote host closed the connection]
fishfinger has quit [Read error: Connection reset by peer]
fishfinger has joined #commonlisp
frgo_ has quit [Quit: Leaving...]
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 252 seconds]
fishfinger has quit [Remote host closed the connection]
cjb has quit []
fishfinger has joined #commonlisp
dider has joined #commonlisp
lyiriyah has joined #commonlisp
derelict has quit [Ping timeout: 240 seconds]
dider has quit [Quit: Client closed]
lyiriyah has quit [Quit: Client closed]
lyiriyah has joined #commonlisp
lyiriyah has quit [Quit: Client closed]
selwyn has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 268 seconds]
kevingal has joined #commonlisp
random-nick has joined #commonlisp
loke[m] has quit [Quit: Bridge terminating on SIGTERM]
etimmons has quit [Quit: Bridge terminating on SIGTERM]
katco has quit [Quit: Bridge terminating on SIGTERM]
akanouras has quit [Quit: Bridge terminating on SIGTERM]
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
dieggsy has quit [Quit: Bridge terminating on SIGTERM]
loke[m] has joined #commonlisp
yitzi has quit [Remote host closed the connection]
yitzi has joined #commonlisp
katco has joined #commonlisp
dieggsy has joined #commonlisp
akanouras has joined #commonlisp
etimmons has joined #commonlisp
Gnuxie has joined #commonlisp
yitzi has quit [Client Quit]
domovod has joined #commonlisp
selwyn_ has joined #commonlisp
selwyn has quit [Ping timeout: 264 seconds]
selwyn has joined #commonlisp
dlowe has joined #commonlisp
<luis>
kakuhen: CFFI-SYS is pretty much a wrapper around implementation-specific FFIs, the rest of CFFI builds on top of that. Most work takes place at compile time in any case (unless you define your own types in which case you may have to do some extra work to ensure most work does in fact take place at compile time)
<luis>
sb-alien's approach to FFI is interesting and different from CFFI. For example, pointers are typed.
selwyn_ has quit [Ping timeout: 244 seconds]
<kakuhen>
right, sb-alien could offer a bit more type safety, from what i've read online, but i didnt know exactly how
<luis>
kakuhen: yes, you get an error if you try to pass a pointer to int to a function that's expecting a pointer to double and things like that
<luis>
an interesting project would be to implement alien's API on top of CFFI-SYS
fishfinger has quit [Quit: Bye!]
Th30n has quit [Ping timeout: 244 seconds]
unyu has quit [Quit: WeeChat 3.1]
lyiriyah36 has joined #commonlisp
Th30n has joined #commonlisp
tyson2 has joined #commonlisp
fishfinger has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
Tomte has joined #commonlisp
ivche has joined #commonlisp
pjb has joined #commonlisp
yitzi has joined #commonlisp
<srji>
(plump:text (clss:select "p" (plump:parse (dex:get "https://httpbin.org/html")))) -> There is no applicable method for the generic function
taiju has quit [Remote host closed the connection]
selwyn has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
<pjb>
srji: so what do you expect plump:text to do?
<pjb>
srji: in slime, you can type M-. on plump:text and find a list of methods implemented on it.
<pjb>
srji: I would guess that it has methods for strings, but not for plump-dom:element
<srji>
i expect to print a string
<pjb>
No, that's not how html mark-up works.
lyiriyah36 is now known as lyiriyah
<pjb>
so plump:text has a method on plump-dom:nesting-node.
<srji>
clss selects the <p> return a plump DOM object and plump:text extracts the text from it
<dsk>
srji: CLSS:SELECT returns an *array* of 0 or more matches.
<srji>
`#(#<PLUMP-DOM:ELEMENT p {1005593353}>)` how are you able to recognize this as array? because of #()?
Tomte has quit [Quit: Leaving]
<dsk>
Yes. See also (type-of (clss:select "p" (plump:parse (dex:get "https://httpbin.org/html"))))
unyu has joined #commonlisp
<pjb>
so, something like (map 'list (function plump:text) (clss:select "p" (plump:parse (dex:get "https://httpbin.org/html"))))
<pjb>
srji: ^
<dsk>
srji: But you should read the docstrings of interface functions, they (ought to) tell you what to expect.
lyiriyah has quit [Quit: Client closed]
knusbaum has joined #commonlisp
knusbaum has quit [Ping timeout: 252 seconds]
azimut_ has joined #commonlisp
yewscion_ has quit [Ping timeout: 240 seconds]
<srji>
ok ty
<srji>
is it possible to open the source of (clss:select using emacs and M-. ?
<srji>
do ive to specify at some point the quicklisp folder to find the source?
azimut has quit [Ping timeout: 252 seconds]
<pjb>
srji: No, slime tracks everything automatically.
<pjb>
Just try M-.
<pjb>
srji: and google for common lisp clss manual
<srji>
i see
<srji>
it opens the buffer *slime-xref*
<srji>
but it does not jump to the source
X-Scale` has joined #commonlisp
<srji>
ah moment
<pjb>
that's because it has a compiler-macro, (generic function are like this too), so it gives you the choice betewen the function and the compiler-macro.
<srji>
i can select the func in this buffer
<pjb>
for generic functions, it would be betewen the generic function and its methods.
<pjb>
yes.
X-Scale` is now known as X-Scale
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
lyiriyah93 has joined #commonlisp
lyiriyah93 is now known as lyiriyah
nirved has joined #commonlisp
edgar-rft has quit [Read error: Connection reset by peer]
edgar-rft has joined #commonlisp
<pl>
srji: this is because sometimes you have multiple implementations, in case of generic-functions
nirved has quit [Client Quit]
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
<srji>
ok ty good to know
aeth has quit [Ping timeout: 244 seconds]
Bike has joined #commonlisp
aeth has joined #commonlisp
krjst has quit [Quit: bye]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 264 seconds]
krjst has joined #commonlisp
krjst has quit [Client Quit]
yitzi has quit [Remote host closed the connection]
krjst has joined #commonlisp
waleee has joined #commonlisp
lyiriyah has left #commonlisp [#commonlisp]
cage has joined #commonlisp
knusbaum has joined #commonlisp
Inline has joined #commonlisp
davep has joined #commonlisp
antoszka has joined #commonlisp
aeth has quit [Ping timeout: 268 seconds]
aeth has joined #commonlisp
yitzi has joined #commonlisp
Th30n has quit [Quit: WeeChat 3.1]
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #commonlisp
ad-absurdum has quit [Quit: Leaving]
cranium has joined #commonlisp
silasfox has joined #commonlisp
jeosol has joined #commonlisp
knusbaum has quit [Remote host closed the connection]
srhm has joined #commonlisp
knusbaum has joined #commonlisp
domovod has joined #commonlisp
knusbaum has quit [Ping timeout: 264 seconds]
john-a-carroll has joined #commonlisp
derelict has joined #commonlisp
john-a-carroll has quit [Quit: Ping timeout (120 seconds)]
ec has joined #commonlisp
silasfox has quit [Ping timeout: 268 seconds]
Inline has quit [Ping timeout: 244 seconds]
yitzi has quit [Quit: Leaving]
selwyn has quit [Read error: Connection reset by peer]
srhm has quit [Ping timeout: 264 seconds]
knusbaum has joined #commonlisp
cranium has quit [Quit: Leaving]
yitzi has joined #commonlisp
azimut_ has quit [Ping timeout: 252 seconds]
_whitelogger has joined #commonlisp
dsk has quit [Ping timeout: 240 seconds]
silasfox has joined #commonlisp
joast has joined #commonlisp
Cymew has quit [Ping timeout: 240 seconds]
selwyn has joined #commonlisp
selwyn_ has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
selwyn_ has quit [Read error: Connection reset by peer]
srji has quit [Quit: leaving]
kevingal has quit [Remote host closed the connection]
aeth_ has joined #commonlisp
Inline has joined #commonlisp
aeth is now known as Guest9574
aeth_ is now known as aeth
Guest9574 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
srji has joined #commonlisp
mindCrime has joined #commonlisp
domovod has quit [Quit: WeeChat 3.2]
ec has quit [Ping timeout: 252 seconds]
char has joined #commonlisp
mindCrime has quit [Ping timeout: 272 seconds]
jeosol has quit [Ping timeout: 268 seconds]
eta has quit [Ping timeout: 264 seconds]
selwyn has joined #commonlisp
eta has joined #commonlisp
micro has quit [Ping timeout: 264 seconds]
micro has joined #commonlisp
char has quit [Ping timeout: 264 seconds]
aeth_ has joined #commonlisp
aeth is now known as Guest8314
aeth_ is now known as aeth
Guest8314 has quit [Ping timeout: 244 seconds]
aeth_ has joined #commonlisp
dsk has joined #commonlisp
aeth has quit [Ping timeout: 244 seconds]
aeth_ is now known as aeth
seok- has quit [Ping timeout: 240 seconds]
bhaible has quit [Remote host closed the connection]
mindCrime has joined #commonlisp
jeosol has joined #commonlisp
mindCrime has quit [Ping timeout: 240 seconds]
aeth_ has joined #commonlisp
aeth is now known as Guest4211
aeth_ is now known as aeth
selwyn has quit [Read error: Connection reset by peer]
aleamb has quit [Quit: bye]
<Josh_2>
With postmodern whats the best way to store lists? right now I store a list converted to a string and then when I restore the object I have another slot which contains the actual list
<Josh_2>
I assume this isn't the most optimal way to do this?
<Josh_2>
Would be nice to just store a list straight into postgres, not sure how to do that
dsk has quit [Ping timeout: 252 seconds]
GreaseMonkey has joined #commonlisp
akoana has joined #commonlisp
mindCrime has joined #commonlisp
ec has joined #commonlisp
Tomte has joined #commonlisp
silasfox has quit [Ping timeout: 252 seconds]
shka has quit [Ping timeout: 268 seconds]
<Josh_2>
seems with Mito I can just use the :inflate :deflate keys
Tomte has quit [Quit: Leaving]
waleee has quit [Quit: WeeChat 3.1]
waleee has joined #commonlisp
cage has quit [Remote host closed the connection]
<Josh_2>
Think I'm just gonna convert my code over to Mito
unyu has quit [Remote host closed the connection]
unyu has joined #commonlisp
karlosz has joined #commonlisp
mindCrime has quit [Ping timeout: 252 seconds]
<phoe>
lists don't map well to the relational model
<phoe>
I guess that's the main issue
<dim>
when using Postgres you can use arrays there, but all array elements must be of the same datatype
<rdrg109>
[Q] Hello everyone, common lisp beginner here. Is there any way to get a list of all built-in functions? Is there any website, command or way that present that list? I know that "read" is a built-in function, because I can create a file containing a read statement and it will be executed. Sorry for using the term "built-in function" (if that's not the appropiate term), I have just started
<rdrg109>
today.
<dim>
basically SQL is strongly typed, and relational
<dim>
Josh_2: a list in lisp would be a relation (such as a table) in SQL
<Josh_2>
maybe I will try using an array
<Josh_2>
an array whose elements are all the same type isn't a problem
<dim>
rdrg109: that would be the Common Lisp Hyperspec, or the symbols exported by the COMMON-LISP package, I suppose
<dim>
Josh_2: also consider making it a relation mylist(listid bigserial, item ...) ; depending on how you want to process the list elements, having them available as rows will change your life in SQL query writting
<rdrg109>
dim: Thanks. I'm using GNU CLISP. I suppose, I will find what I'm searching in the official website.
<dim>
Josh_2: well you're now using a relational database, so you might as well have a relational model there
<dim>
(also I didn't know there was such as thing as the spirit of lisp) ;-)
<Josh_2>
Wish my lisp image could just be my database :(
<phoe>
grab a lisp object database
<phoe>
bknr.datastore for instance
<phoe>
using postgres as an object database won't work very well, even with ORMs like mito
<dim>
using an ORM will only make it worse, and postgres is a nice object oriented database when you look at it with the right angle, though it's not lisp at all, it's just something else
<phoe>
dim: it takes some time to look at objects from the relational point of view though
<phoe>
if one wants to just use it as if they were using Lisp* then a nosql database will be better for that use case
<phoe>
*and pay the price
<mfiano>
I hope you like JOIN
<dim>
I mean SELECT a + b FROM rel WHERE c > now() - 6 * interval '5 mins'; is pretty object oriented, with operator overloading depending on columns data types and all the jazz
<Josh_2>
phoe: is there a pdf of the docs anywhere? I cant build it
<dim>
mfiano: yeah I do, in list you compose lists, in SQL you compose relations, and JOINs are how you compose relations together to form new ones, I like that
<phoe>
Josh_2: (ql:quickload :bknr.datastore) works fine for me
<dim>
phoe: but yeah I see your point, it's not storage for in-memory lisp objects ; postgres solves concurrency, not storage
<dim>
(storage is part of the offer, it's the D of ACID, it's not the most interesting part though, as an application developer)
<dim>
anyway don't bother me and my Postgres ranting infinite ability, pick a lisp object data store that can serialize what's in-memory to and from disk if that's what you need ;-)
selwyn has joined #commonlisp
kakuhen has joined #commonlisp
aeth_ has joined #commonlisp
<Josh_2>
this app is about 99% complete, basically just need to add one more column to my database and I'm done. But for the future I reckon I will try bknr.datastore
aeth has quit [Ping timeout: 244 seconds]
yitzi has quit [Quit: Leaving]
aeth_ is now known as aeth
selwyn has quit [Quit: Leaving]
selwyn has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
knusbaum has quit [Remote host closed the connection]
tyson2 has quit [Ping timeout: 268 seconds]
rgherdt has quit [Ping timeout: 272 seconds]
<rdrg109>
dim: Thanks! I think that is what I was searching for
selwyn has joined #commonlisp
aeth has quit [Ping timeout: 268 seconds]
aeth has joined #commonlisp
Lycurgus has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.1]
sjl has quit [Ping timeout: 268 seconds]
Lycurgus has quit [Quit: Exeunt]
random-nick has quit [Ping timeout: 272 seconds]
tyson2 has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]