Xach changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/>
<Xach> yes, it's nice for in-memory binary streams
ebrasca has quit [Read error: Connection reset by peer]
<reepca> yeah, I used flexi-streams for my previous project
ebrasca has joined #lisp
quazimodo has joined #lisp
quazimodo has quit [Read error: Connection reset by peer]
libertyprime has joined #lisp
igemnace has quit [Ping timeout: 268 seconds]
brettgilio has quit [Ping timeout: 248 seconds]
quazimodo has joined #lisp
ebrasca has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 268 seconds]
sebboh has quit [Changing host]
sebboh has joined #lisp
quazimodo has joined #lisp
quazimodo has quit [Read error: Connection reset by peer]
slyrus__ has joined #lisp
brettgilio has joined #lisp
quazimodo has joined #lisp
slyrus_ has quit [Ping timeout: 268 seconds]
brain has joined #lisp
ax-hack has quit [Read error: Connection reset by peer]
JohnnyL has quit [Quit: leaving]
ax-hack has joined #lisp
brain has quit [Read error: Connection reset by peer]
shifty has joined #lisp
gioyik has joined #lisp
rumbler31 has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
bacterio has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
EvW has quit [Ping timeout: 245 seconds]
python476 has quit [Ping timeout: 268 seconds]
python476 has joined #lisp
jeosol has joined #lisp
rm34D has joined #lisp
gioyik has quit [Read error: Connection reset by peer]
bitmapper has quit [Ping timeout: 258 seconds]
efm has quit [Remote host closed the connection]
efm has joined #lisp
ax-hack has quit [Ping timeout: 258 seconds]
python476 has quit [Ping timeout: 268 seconds]
oni-on-ion has quit [Quit: Quit]
defaultxr has quit [Quit: WeeChat 2.7]
ebrasca has joined #lisp
mikecheck has joined #lisp
defaultxr has joined #lisp
oni-on-ion has joined #lisp
smokeink has joined #lisp
oni-on-ion has quit [Read error: Connection reset by peer]
oni-on-ion has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
Lycurgus has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
Lycurgus has quit [Quit: https://meansofproduction.biz Exit Quassel.]
noobineer has joined #lisp
atgreen_ has joined #lisp
Lycurgus has joined #lisp
Lycurgus has quit [Client Quit]
ebzzry_ has quit [Ping timeout: 245 seconds]
jonatack has quit [Ping timeout: 245 seconds]
gabiruh_ has joined #lisp
gabiruh has quit [Ping timeout: 252 seconds]
froggey has quit [Ping timeout: 265 seconds]
EvW1 has joined #lisp
EvW1 has quit [Client Quit]
froggey has joined #lisp
oxum has joined #lisp
igemnace has joined #lisp
oxum_ has joined #lisp
rm34D has quit [Ping timeout: 240 seconds]
oxum has quit [Ping timeout: 268 seconds]
atgreen_ has quit [Ping timeout: 265 seconds]
igemnace has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #lisp
Bike has quit [Quit: Lost terminal]
poet has joined #lisp
FreeBirdLjj has quit [Ping timeout: 248 seconds]
q-u-a-n2 has quit [Remote host closed the connection]
q-u-a-n2 has joined #lisp
ahungry has joined #lisp
gravicappa has joined #lisp
igemnace has joined #lisp
shangul has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
<beach> Good morning everyone!
rotty has quit [Ping timeout: 265 seconds]
rotty has joined #lisp
orivej has joined #lisp
libertyprime has quit [Ping timeout: 268 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
vs1 has quit [Ping timeout: 246 seconds]
<jeosol> Good morning beach
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
madagest has joined #lisp
libertyprime has joined #lisp
pjb has quit [Remote host closed the connection]
madage has quit [Ping timeout: 260 seconds]
pjb has joined #lisp
shifty has quit [Ping timeout: 258 seconds]
<ebrasca> Good morning beach , jeosol!
<jeosol> morning ebrasca!
shifty has joined #lisp
karlosz has joined #lisp
devon has quit [Ping timeout: 265 seconds]
brettgilio has quit [Quit: Quit]
bacterio has joined #lisp
_whitelogger has joined #lisp
brown121407 has quit [Ping timeout: 268 seconds]
brown121407 has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
oxum has joined #lisp
_whitelogger has joined #lisp
oxum has joined #lisp
gioyik has joined #lisp
vlatkoB has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
shangul has quit [Ping timeout: 265 seconds]
jlarocco has quit [Remote host closed the connection]
brettgilio has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
hostile has joined #lisp
mathrick has joined #lisp
norserob has quit [Quit: leaving]
oxum has quit [Read error: Connection reset by peer]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
flamebeard has joined #lisp
gaqwas has quit [Ping timeout: 268 seconds]
mathrick has quit [Ping timeout: 240 seconds]
ahungry has quit [Remote host closed the connection]
bacterio has quit [Read error: Connection reset by peer]
bacterio has joined #lisp
scymtym has quit [Ping timeout: 265 seconds]
amerlyq has joined #lisp
<phoe> morniiiing
<beach> Hello phoe.
edgar-rft has quit [Remote host closed the connection]
lavaflow_ has joined #lisp
edgar-rft has joined #lisp
<no-defun-allowed> Good morning phoe
lavaflow has quit [Read error: Connection reset by peer]
keep_learning has quit [Quit: Ping timeout (120 seconds)]
khisanth_ has quit [Ping timeout: 246 seconds]
loskutak has joined #lisp
gioyik has quit [Ping timeout: 268 seconds]
khisanth_ has joined #lisp
frgo has quit [Remote host closed the connection]
oxum has quit [Ping timeout: 240 seconds]
gioyik has joined #lisp
rgherdt has joined #lisp
raghavgururajan has joined #lisp
dddddd has quit [Remote host closed the connection]
vs1 has joined #lisp
gabiruh_ has quit [Ping timeout: 252 seconds]
gabiruh has joined #lisp
oxum has joined #lisp
oxum has quit [Ping timeout: 265 seconds]
varjag has joined #lisp
gioyik has quit [Ping timeout: 258 seconds]
shangul has joined #lisp
scymtym has joined #lisp
jprajzne has joined #lisp
Cymew has joined #lisp
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
ljavorsk has joined #lisp
stux|RC has quit [Read error: Connection reset by peer]
ljavorsk has quit [Ping timeout: 268 seconds]
william1 has joined #lisp
gareppa has joined #lisp
stux|RC has joined #lisp
ljavorsk has joined #lisp
oxum has joined #lisp
poet has quit [Ping timeout: 248 seconds]
gareppa has quit [Quit: Leaving]
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
hostile has quit [Quit: Leaving]
hhdave has joined #lisp
SumoSud0- is now known as SumoSud0
ggole has joined #lisp
ralt has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
vaporatorius has joined #lisp
ArthurStrong has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
vaporatorius has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
vaporatorius has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
mathrick has joined #lisp
wiselord has joined #lisp
igemnace has quit [Remote host closed the connection]
shangul has quit [Ping timeout: 248 seconds]
lnostdal has joined #lisp
varjagg has joined #lisp
cosimone has joined #lisp
varjagg has quit [Ping timeout: 268 seconds]
wigust has joined #lisp
mathrick has quit [Ping timeout: 268 seconds]
mathrick has joined #lisp
kajo has quit [Remote host closed the connection]
kajo has joined #lisp
william1 has quit [Ping timeout: 268 seconds]
frgo has quit [Remote host closed the connection]
smokeink has quit [Ping timeout: 240 seconds]
william1 has joined #lisp
frgo has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
pilne has quit [Quit: Life without danger is a waste of oxygen]
frgo has quit [Ping timeout: 268 seconds]
shangul has joined #lisp
jonatack has joined #lisp
rippa has joined #lisp
smokeink has joined #lisp
frgo has joined #lisp
william1 has quit [Ping timeout: 248 seconds]
edgar-rft has quit [Remote host closed the connection]
frgo has quit [Remote host closed the connection]
loskutak has quit [Ping timeout: 258 seconds]
shangul has quit [Ping timeout: 258 seconds]
ljavorsk has quit [Ping timeout: 265 seconds]
edgar-rft has joined #lisp
raghavgururajan has quit [Read error: Connection reset by peer]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
shifty has quit [Ping timeout: 258 seconds]
space_otter has quit [Remote host closed the connection]
william1 has joined #lisp
karlosz has quit [Quit: karlosz]
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
frgo has joined #lisp
antoszka has quit [Quit: WeeChat 2.7]
antoszka has joined #lisp
antoszka has quit [Client Quit]
antoszka has joined #lisp
gaqwas has joined #lisp
antoszka has quit [Client Quit]
william1 has quit [Ping timeout: 268 seconds]
frgo has quit [Ping timeout: 240 seconds]
antoszka has joined #lisp
anewuser has joined #lisp
william1 has joined #lisp
loskutak has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
anewuser has quit [Ping timeout: 268 seconds]
anewuser has joined #lisp
ebzzry_ has joined #lisp
luna_is_here has joined #lisp
mathrick has quit [Ping timeout: 268 seconds]
jeosol has quit [Remote host closed the connection]
amerigo has joined #lisp
smokeink has quit [Ping timeout: 258 seconds]
rgherdt has left #lisp ["Leaving"]
loskutak has quit [Ping timeout: 248 seconds]
william1 has quit [Ping timeout: 248 seconds]
vs1 has quit [Read error: Connection reset by peer]
brown121407 has quit [Read error: Connection reset by peer]
brown121407 has joined #lisp
raghavgururajan has joined #lisp
WorldControl has joined #lisp
WorldControl has quit [Remote host closed the connection]
Lycurgus has joined #lisp
Lycurgus has quit [Remote host closed the connection]
wiselord has quit [Ping timeout: 265 seconds]
Lycurgus has joined #lisp
Lycurgus has quit [Client Quit]
<Shinmera> Xach: there's a lot of spam appearing on the planet lisp rss feed right now.
<Shinmera> Looks like the CCL blog got hacked.
<_death> or maybe they decided to pivot to provide news in korean
EvW has joined #lisp
<Xach> I just saw it and removed it
<Shinmera> Thanks!
<Xach> And told the clozurians about it
william1 has joined #lisp
loskutak has joined #lisp
jonatack has quit [Ping timeout: 268 seconds]
bitmapper has joined #lisp
Cymew has quit [Quit: Konversation terminated!]
Cymew has joined #lisp
bitmapper has quit [Ping timeout: 265 seconds]
lucasb has joined #lisp
ljavorsk has joined #lisp
william1 has quit [Ping timeout: 268 seconds]
fivo has joined #lisp
fitzsim has joined #lisp
fivo has quit [Quit: WeeChat 1.9.1]
ljavorsk has quit [Ping timeout: 268 seconds]
fivo has joined #lisp
bitmapper has joined #lisp
orivej has joined #lisp
LiamH has joined #lisp
jmercouris has joined #lisp
<jmercouris> hi guys, I have a problem with lists I can solve, but I am trying to think of the most efficient way to do this
<jmercouris> so, there is a list of elements "a" "b" "c" "d" "e"
Bike has joined #lisp
<jmercouris> I want to take some elements that meet some criteria X and move them to the front of a new list, then I want to append the rest of the elements that meet some criteria Y to the end of the list
<jmercouris> I could make a new list, however, that feels quite wasteful
<jmercouris> maybe it isn't such a big deal here though, we're talking about a list of maximum 100 elements, run every several minutes
<_death> it's not a big deal, but if you're dealing with elements with a priority, maybe a priority queue is a good idea
<eeeeeta> Xach: wait, can anyone get added to planet lisp
<jmercouris> I'm not dealing with priority
<jmercouris> I guess a new list is the way to go...
<jackdaniel> use sort with two predicates
<jackdaniel> (cond (pred1) (pred2) (consistent-other-rule))
<Xach> eeeeeta: peopole who write about common lisp can get on planet lisp!
<eeeeeta> X
<eeeeeta> oops
<eeeeeta> Xach: ah, nice!
jonatack has joined #lisp
<jmercouris> jackdaniel: interesting idea, not sure how easy it would be in this context...
* eeeeeta just needs to write something about CL now >_<
<jmercouris> I did omit some details for the sake of simplicity... the criteria Y and X are further sorted by different functions...
<jmercouris> so yes, I *COULD* do it, but I think we'd lose a lot of clarity in this case
<jmercouris> but I will keep that idea of a cond within sort as another tool in my toolbox
<jmercouris> very cool idea
<jackdaniel> it doesn't sound like a complex problem, do whatever works for you
<jmercouris> it doesn't sound complex, because I have given only 1/10 of the details to ask a very specific question
<jackdaniel> so you are dealing wiht some complex problem?
<jmercouris> yes
<jackdaniel> well, good luck then
<Xach> a list of 100 elements is so cheap to make and mess with it
<Xach> thinking about the problem for more than 5 minutes will burn up all the time saved in thinking hard about it
<ralt> jmercouris: if you use another list, and pop from the first to put on the second, then you're not necessarily wasting any memory
antoszka has quit [Quit: WeeChat 2.7]
<Xach> you could make one billion 100 element lists per second for one thousand years before you use up 1gb of memory and 1 sec of cpu time on a modern computer
<Xach> (numbers are not completely accurate)
<jmercouris> OK :-D
<Xach> to be sure, it is a sin to be wasteful
<Xach> but thinking too hard is a form of waste also!
<_death> well, a single SORT will work for multiple nonconflicting constraints
loskutak has quit [Ping timeout: 265 seconds]
flamebeard has quit [Read error: Connection reset by peer]
flamebeard has joined #lisp
<_death> (and also a priority queue... hint hint)
<jmercouris> ...? what is the hint here?
<_death> if you can assign a priority to an element based on the constraints...
<jmercouris> I can't assign a global priority without getting into a scoring system
<jmercouris> I'm looking to just smush together two scoring systems with mutually exclusive elements
<jmercouris> which unfortunately are sourced from a single set of elements :-D
niklascarlsson has joined #lisp
<Xach> jmercouris: when you say "criteria X" and "criteria Y", without more info, that sounds like a score/priority value in different language
shangul has joined #lisp
<Xach> you could say "criteria X" assigns an element a score of -1, "criteria Y" 1, sort the list, hey presto, x at the front, y at the back.
<shka__> jmercouris: so you want to do topological sort?
<_death> criteria Z given Y with 1 or 2
<jmercouris> yes, but I would need to now make a data structure to store the score
<Xach> not with :key option to sort you don't.
<_death> are the criteria fixed?
<jmercouris> the criteria are user input
<shka__> if we are talking about 100 elements anything more complex is overkill
<Xach> eeeeeta: please do write about common lisp!
<jmercouris> all I've decided to do now is create two lists based on user input, and then sort those two lists based on two functions, and then append those into one product list
<shka__> very well, i would simply create one ordering and roll with it
pjb has quit [Remote host closed the connection]
clothespin_ has quit [Ping timeout: 268 seconds]
pjb has joined #lisp
pfdietz has joined #lisp
patlv has joined #lisp
anewuser has quit [Ping timeout: 268 seconds]
niklascarlsson has quit [Remote host closed the connection]
cosimone has quit [Quit: Terminated!]
wiselord has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
<Bike> Am I right in thinking that (funcallable-)standard-instance-access only works on instance slots? It's not mentioned in the description of the functions, but the page on the instance structure protocol says "direct access" is only possible for instance slots.
ebzzry_ has quit [Read error: Connection reset by peer]
pjb has quit [Remote host closed the connection]
bitmapper has quit [Remote host closed the connection]
pjb has joined #lisp
jack_rabbit has joined #lisp
<phoe> what else could it work on?
<Bike> slots with :class allocation
oni-on-ion has quit [Remote host closed the connection]
<beach> Bike: Yes, only instance slots I believe.
oni-on-ion has joined #lisp
<phoe> only instance I think - class slots might be stored elsewhere and (f-)s-i-a is meant to be fast above everything else
<Bike> the code clasp inherited from ecl works with class slots too, which means an extra type check. is why i'm wondering
<Bike> but i don't know how people use s-i-a
<phoe> > By usurping the normal slot lookup protocol, this function is intended to provide highly optimized access to the slots associated with an instance.
jack_rabbit has quit [Ping timeout: 265 seconds]
<phoe> hm
<phoe> vague, isn't it
Inline has joined #lisp
<Bike> the function description itself is, but the instance structure protocol section has some more detail.
Cymew has quit [Quit: Konversation terminated!]
Cymew has joined #lisp
william1 has joined #lisp
mathrick has joined #lisp
cosimone has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
cosimone has quit [Client Quit]
fookara has joined #lisp
cosimone has joined #lisp
loskutak has joined #lisp
manualcrank has joined #lisp
brown121407 has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
ArthurStrong has quit [Quit: leaving]
oxum_ has joined #lisp
nika_ has joined #lisp
amerigo has quit [Quit: Connection closed for inactivity]
milanj has joined #lisp
oxum has quit [Ping timeout: 268 seconds]
dmiles has quit [Ping timeout: 268 seconds]
patlv has quit [Ping timeout: 268 seconds]
oxum_ has quit [Ping timeout: 248 seconds]
vs1 has joined #lisp
anewuser has joined #lisp
vs1 has quit [Read error: Connection reset by peer]
raghavgururajan has quit [Read error: Connection reset by peer]
dmiles has joined #lisp
wsinatra has quit [Quit: WeeChat 2.7]
wsinatra has joined #lisp
EvW has quit [Ping timeout: 248 seconds]
oxum has joined #lisp
loskutak has quit [Ping timeout: 245 seconds]
bitmapper has joined #lisp
<hjudt> regarding the use of defun vs defmethod: when is it better to use defun instead of defmethod and vice-versa?
<dlowe> hjudt: methods are the specialized forms of generic functions
<jackdaniel> when you have a single function then use defun
<jackdaniel> when you want to specialize behavior for different object classes use defmethod
milanj has quit [Quit: This computer has gone to sleep]
<hjudt> so if i only have one object class and suppose that will not change, i should stick to using defun?
<jackdaniel> that's what I would do at least
<hjudt> ok. it is still easy to change defun to defmethod later probably.
grewal_ has quit [Ping timeout: 245 seconds]
<jackdaniel> sure
<shka__> hjudt: usually defgeneric/defmethods are used to construct object protocols and the likes
<hjudt> second question: when do you use extra packages in your projects?
<Xach> hjudt: i do it whenever i start to think i might use the same name for an unrelated purpose
<hjudt> i mean when do you define extra packages and separate functionality out into that?
<Xach> i do it quite often but i understand it's not typical style
grewal_ has joined #lisp
<Xach> i don't mind having many packages in an application. for libraries not as much.
<dlowe> as long as the library has a single package for its exported symbols I don't mind
<dlowe> hjudt: it's a matter of taste
<hjudt> ok. i have started separating code into packages but noticed there are quite some intersections, which forces me to import symbols and "proxy" them to other packages.
<hjudt> so i started thinking that maybe i have made bad design decisions.
<Xach> hjudt: it's possible.
ljavorsk has joined #lisp
<Xach> but it's also not abnormal to import and re-export
<dlowe> I would keep my program in one package until I was compelled to split it
<jackdaniel> hjudt: if you do it other way around you will save yourself a lot of hassle: create a your-library-implementation package where you implement everything. and this package USE-es packages meant as an API which only export symbols
<hjudt> for some parts of the code it feels fine, but for others it is awkward and makes me think if that package is actually the right place for it.
<Xach> i like to use relatively generic names so i like to make packages so i don't have to worry about clashes.
<jackdaniel> (that way you may assure that there are no name conflicts between your packages and you won't have to bother with moving things arounds every now and then)
<jackdaniel> and you have a single implementaiton namespace (saves some mental hasle)
<jackdaniel> hassle*
<dlowe> also, package-local-nicknames are a great alternative to using a package
<hjudt> dlowe: can i you point me to documentation on package-local-nicknames?
<boeg> If I load a asdf system where I have some package in, and quickload outputs among other things "[Package my-package]", why can't I call say a function from the package outright? Why do I still manually load the the file?
<dlowe> hjudt: it should be described in your implementation's manual
<Xach> boeg: you can call functions from the package and do not have to manually load files.
<Xach> boeg: how did you try to call the function? what happened when you tried?
AnimalCl` has joined #lisp
<hjudt> dlowe: ok thanks i'll look that up
dmiles has quit [Ping timeout: 265 seconds]
[ouo] has joined #lisp
<boeg> Xach: Ah, my bad, it was just me being dumb, sorry :)
rozenglass has joined #lisp
<hjudt> Xach: in my case, it is - luckily - not so much about name clashes but more a dependency problem and a matter of aesthetics; however, i suddenly noticed i can split my up components even more into smaller parts and import and re-export as needed.
jmercouris has joined #lisp
<hjudt> jackdaniel: also thanks for your suggestion about library-implementations. i think i can actually try and use this approach in another part of my application.
<beach> hjudt: I divide a project into "modules", where each module has an ASDF system definition, typically one (but maybe more) package definitions, and several source files.
dmiles has joined #lisp
<Xach> the flexibility and freedom (or, if you are unhappy with it, lack of direction) of the package system means you can choose from a number of different styles
dddddd has joined #lisp
<hjudt> beach: that is also fine, but imho that sounds a bit too complicated in my case. i already have defined a system for the backend, one for the frontend and one for tests. i actually chose to use extra packages only where functionality is really separate from the rest.
<jmercouris> hjudt: that is a just dandy approach, lots of systems is great if you plan on releasing them out into the world as standalone utilities people can take advantage of
<jmercouris> or if you find yourself copy/pastaing them into your projects over and over again
clothespin_ has joined #lisp
<hjudt> that is, where that functionality in that package could be tested completely separate and used by some other project (though my use-case is so special that this probably wouldn't happen).
<jmercouris> hjudt: exactly, otherwise, no worries
<hjudt> Xach: i think this is an accurate description of the problem that i am confronted with ;-)
<hjudt> jmercouris: thanks
orivej has joined #lisp
william1 has quit [Ping timeout: 258 seconds]
smazga has joined #lisp
<hjudt> about a detail: with defmethods, i assume you defgeneric somewhere, export its symbol and import it in other packages that implement it with defmethod?
<Xach> hjudt: not necessarily! i will often do (defmethod somepackage:name (...) ...)
<beach> Me too.
<hjudt> ah ok. i have not thought yet about this possibility.
<dlowe> yeah, symbols are just names. You're not exporting or importing anything else but the names.
trebor_home has joined #lisp
<hjudt> dlowe: this is now clear to me, but it is more a matter of style, and if you see this the first time (or just sporadically) then it seems awkward at first.
<beach> hjudt: Though, "it's just a matter of style" doesn't mean that all solutions are equally good.
<Xach> it can come down to a matter of how much importance you assign to the problems of each approach
m00natic has quit [Remote host closed the connection]
<dlowe> heh, that's a very generalizable sentiment
<Xach> "special variable clashes are not an important problem" says the author of let over lambda, heretically omitting earmuffs in defvars
xkapastel has joined #lisp
<hjudt> i have read that book and still like to use clos because it makes code easier to organize and understand.
<dlowe> some code, sure
<dlowe> all solutions are local optimums for something
<dlowe> (sometimes the something is that I'm not a very good coder)
<hjudt> yes. it still is an interesting book with some enlightening ideas though.
<hjudt> i guess that it's those pursue-to-the-extreme attitude leads to some controversial excesses ;-)
ljavorsk has quit [Ping timeout: 248 seconds]
gioyik has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
rumbler31 has joined #lisp
<hjudt> Xach: i now experienced some benefits of the approach putting code in its own package. it allowed me moving an flet out into its own function without worrying about causing name clashes. this enables me to write tests more efficiently.
<hjudt> in effect, it seems to encourage me to keep functions shorter ;-)
milanj has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
enrioog has joined #lisp
jmercouris has quit [Ping timeout: 268 seconds]
random-nick has joined #lisp
jmercouris has joined #lisp
refpga has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
smazga has quit [Read error: Connection reset by peer]
smazga has joined #lisp
fivo has quit [Quit: WeeChat 1.9.1]
<pjb> jmercouris: but note how the algorithm uses O(n) temporary cons cells.
wsinatra has quit [Quit: WeeChat 2.7]
flamebeard has quit []
<pjb> jmercouris: a more complex algorithm could do with O(1) temp space.
grewal has quit [Ping timeout: 248 seconds]
efm has quit [Ping timeout: 268 seconds]
grewal has joined #lisp
wsinatra has joined #lisp
<jmercouris> pjb: why (current (cons nil nil)) in let?
<jmercouris> ah, nvm
<jmercouris> interesting approach
jprajzne has quit [Quit: Leaving.]
<jmercouris> in case you are wondering, the end result of what I did was (let* ((matched-list-first (remove-if-not ...)) (second-list (set-difference total-elements matched-list-first)) (append matched-first-list second-list))
<jmercouris> not exactly like that, but you get the idea
wsinatra is now known as wDurrendal
wDurrendal has quit [Client Quit]
<pjb> jmercouris: works as well.
<_death> what about duplicate elements
wsinatra has joined #lisp
william1 has joined #lisp
<jmercouris> _death: there are no duplicate elements, fortunately
<_death> well, maybe the wording in clhs makes it ok, I'm not sure
<_death> jmercouris: if you do it that way, why not (append (remove-if-not pred list) (remove-if pred list))
<jmercouris> _death: I had that originally actually
<jmercouris> It is because set-difference is much quicker than the predicate function
<_death> (loop for item in list if (pred item) collect item into a else collect item into b finally (return (append a b)))
AnimalCl` has quit [Ping timeout: 268 seconds]
<pjb> _death: my algorithm doesn't consider the elements but the cells. The only way to have duplicate elements would be to have a circular list. In that case, the program would not terminate. My algorithm works only on proper-lists.
<pjb> _death: if you want to do the same thing with circular lists, you can break the circle, use my algorithm, and ensure-circular again.
<pjb> _death: be careful with spoons!
<pjb> _death: of course, you would have to decide on the semantics of element reordering in spoons!
<jmercouris> spoons?
<jmercouris> circular lists are known as spoons?
<jmercouris> what if you put a sentinel, could your algorithm be terminating then?
<jmercouris> I'm having a bit of an issue with Parenscript
<jmercouris> (ps:ps (ps:create foo "bar" :blorg 1)) -> "{ foo : 'bar', 'blorg' : 1 };"
<jmercouris> However, the semicolon is erroneous and causes issues in a JS console
<jmercouris> additionally, cl-json is unable to decode the object
<jmercouris> even a properly formed one like this: { foo:"bar", "blorg":30 }
<Xach> properly formed by what definition?
<jmercouris> by Javascript's definiton of JSON
<Xach> jmercouris: javascript does not define json
<jmercouris> (cl-json:decode-json-from-string "{ foo:\"bar\", "blorg":30 }") -> Evaluation aborted on #<UNBOUND-VARIABLE BLORG {10023B9803}>.
rgherdt has joined #lisp
<jmercouris> Xach: OK, the ecma foundation or whatever it is called
<Xach> No?
<jmercouris> in any case, the JS REPL happily accepts that JSON
<Xach> That is not valid json.
<Xach> It is fine javascript. Json is not javascript.
<Xach> check json.org for a definition
<jmercouris> Alright, let me ask the parent problem instead
<jmercouris> I want to create an object in parenscript that can then be read back into lisp by cl-json or some other library
<jmercouris> actually, let me try something first
<jmercouris> I have a suspicion about something
<_death> pjb: your code needs a bit of tweaking.. (reorder (list 'a) 'integerp 'symbolp)
niceplace has quit [Ping timeout: 258 seconds]
niceplaces has joined #lisp
loskutak has joined #lisp
cosimone has quit [Remote host closed the connection]
william1 has quit [Ping timeout: 258 seconds]
frgo has joined #lisp
orivej has joined #lisp
wsinatra has quit [Quit: WeeChat 2.7]
wsinatra has joined #lisp
clothespin__ has joined #lisp
amerlyq has quit [Quit: amerlyq]
hhdave has quit [Quit: hhdave]
clothespin_ has quit [Ping timeout: 248 seconds]
<pjb> _death: oops :-)
<pjb> _death: use: (let ((head (first (find nil cell-lists :test-not (function eql)))) in append-cells.
<_death> find nil => wrong
<pjb> jmercouris: spoons are lists where the last cons cell points back in the middle of the list.
<pjb> _death: why?
<_death> pjb: it always returns nil
<pjb> jmercouris: for example (s t e m #=1(s p o o n . #1#))
<pjb> _death: not with :test-not
<_death> pjb: hmm, right.. then it's just confusing
<_death> (some #'identity cell-lists)
<jmercouris> pjb: why would you want such a list?
<pjb> jmercouris: could happen. (append list circular-list) ; but foremost, it has encoded two integers: the length of the stem and the length of the spoon, so it may be useful. For example, (coerce 512/270 'double-float) #| --> 1.8962962962962964D0 |# is not periodic immediate. There's a stem of 1.8 before the circle of 962.
amerlyq has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
<jmercouris> OK, I can see that
clothespin_ has joined #lisp
clothespin__ has quit [Ping timeout: 248 seconds]
amerlyq has quit [Client Quit]
vs1 has joined #lisp
Lycurgus has joined #lisp
jmercouris has quit [Ping timeout: 248 seconds]
wsinatra has quit [Quit: WeeChat 2.7]
jgodbout has quit [Ping timeout: 245 seconds]
Necktwi has joined #lisp
adolby has quit [Quit: No Ping reply in 180 seconds.]
adolby has joined #lisp
<phoe> Xach: the spam from CCL blog is cleaned.
nika_ has quit []
davepdotorg has joined #lisp
gunnaaaR has joined #lisp
slyrus_ has joined #lisp
manualcrank has quit [Ping timeout: 240 seconds]
gunnaaaR has left #lisp ["Textual IRC Client: www.textualapp.com"]
slyrus__ has quit [Ping timeout: 268 seconds]
<phoe> fe[nl]ix: the split-sequence notes are some silly stuff that happens due to heavy function inlining - I'll work on it now
davepdotorg has quit [Remote host closed the connection]
gaqwas has quit [Ping timeout: 248 seconds]
micro_ has joined #lisp
micro_ has quit [Client Quit]
<phoe> basically SBCL is being a smart compiler now - it detects that, in SPLIT-LIST-FROM-END, the variable END is always non-NIL, so the "if END is NIL" branch inside the code of COLLECT-UNTIL inside SPLIT-LIST-INTERNAL inside SPLIT-LIST-FROM-END is unreachable
<phoe> and all further notes are the repeat of the original one due to everything being inlined everywhere
<aeth> Wait, it now warns about deleting branches inside inline functions? That's the opposite of smart because it has afaik always done that, but warning about it defeats half of the purpose of using inline functions to share code in the first place.
<aeth> I hope split-sequence is doing something unusual or I misread, though
<Xach> phoe: phoew
<phoe> aeth: it's not doing something unusual
<phoe> Xach: oof, that one hurt
<phoe> aeth: please direct your suggestions at #sbcl
bitmapper has quit [Remote host closed the connection]
<phoe> fe[nl]ix: how should I act?
X-Scale has quit [Ping timeout: 265 seconds]
ggole has quit [Quit: Leaving]
X-Scale` has joined #lisp
varjag has joined #lisp
X-Scale` is now known as X-Scale
gaqwas has joined #lisp
kajo has quit [Ping timeout: 245 seconds]
Lycurgus has quit [Quit: Exeunt]
fookara has quit [Remote host closed the connection]
<phoe> fe[nl]ix: I've manually spliced in the code, this is the issue
anewuser has quit [Quit: anewuser]
<fe[nl]ix> phoe: nevermind, the important is the the code stay clean
<fe[nl]ix> maybe open a bug with SBCL
<fe[nl]ix> aeth is right, these warnings are a bit silly
rozenglass has quit [Ping timeout: 258 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sjl_ has joined #lisp
<sjl_> Is there a way to read a slot with :allocation :class without creating a dummy instance of the class?
<Xach> sjl_: this has been discussed a bit on comp.lang.lisp and i don't remember the true answer to the question. i remember people saying things like "Well use a global special variable instead" but i don't know if that was the True Answer.
<phoe> sjl_: class prototype
dmiles has quit [Ping timeout: 258 seconds]
<no-defun-allowed> Using the MOP, you can obtain the class prototype.
<phoe> fe[nl]ix: I took this to #sbcl and I'll see what they say.
<no-defun-allowed> Thanks phoe
<sjl_> hmm
Necktwi has quit [Quit: leaving]
Necktwi has joined #lisp
<phoe> sjl_: read it from the class prototype. It has undefined values for instance-allocated slots but you can use it to access class-allocated slots (since these already exist by the time the prototype is created).
<sjl_> Xach: thanks, this could work
<sjl_> My other thought was to just (defgeneric foo (class-name)) and have my macros expand out a defmethod for every class
<sjl_> so instead of having the stuff inside an :allocation :class slot I'd call a method to get it
<sjl_> but the prototype should work too
<sjl_> thanks
loskutak has quit [Ping timeout: 268 seconds]
Necktwi has quit [Quit: leaving]
Necktwi has joined #lisp
dmiles has joined #lisp
brown121407 has joined #lisp
asdf_asdf_asdf has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
<aeth> If I write a function with a top-level etypecase and inline that etypecase function, I don't expect to get unreachable code notes. Unreachable code is literally the point of inlining that function.
<aeth> I'm not sure that that is happening, though. Do I have to build the latest SBCL from git? From the last release?
<phoe> aeth: happens on 1.5.9
EvW has joined #lisp
brown121408 has joined #lisp
brown121407 has quit [Read error: Connection reset by peer]
kajo has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
mikecheck has left #lisp ["part"]
loskutak has joined #lisp
jcob has quit [*.net *.split]
Nikotiini has quit [*.net *.split]
AdmiralBumbleBee has quit [*.net *.split]
jcob has joined #lisp
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Nikotiini has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
AdmiralBumbleBee has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
<aeth> phoe: if it's literally just for a typecase, then don't fix the library, the implementation is broken
gareppa has joined #lisp
shangul has quit [Ping timeout: 268 seconds]
william1 has joined #lisp
gravicappa has quit [Ping timeout: 268 seconds]
atgreen has joined #lisp
milanj has joined #lisp
bitmapper has joined #lisp
wsinatra has joined #lisp
dale has quit [Quit: dale]
wsinatra has quit [Quit: WeeChat 2.7]
wsinatra has joined #lisp
MetaYan has quit [*.net *.split]
Lord_Nightmare has quit [*.net *.split]
azrazalea has quit [*.net *.split]
mister_m has quit [*.net *.split]
jurov has quit [*.net *.split]
Kabriel has quit [*.net *.split]
mister_m` has joined #lisp
MetaYan has joined #lisp
Lord_Nightmare has joined #lisp
dale has joined #lisp
azrazalea has joined #lisp
jurov has joined #lisp
Kabriel has joined #lisp
scymtym has joined #lisp
shaakyamuni[m] has quit [*.net *.split]
madagest has quit [*.net *.split]
zooey has quit [*.net *.split]
oxford has quit [*.net *.split]
gareppa has quit [Quit: Leaving]
shifty has joined #lisp
clothespin_ has quit [Ping timeout: 252 seconds]
hostile has joined #lisp
wsinatra has quit [Quit: WeeChat 2.7]
wsinatra has joined #lisp
gareppa has joined #lisp
william1 has quit [Ping timeout: 240 seconds]
gareppa has quit [Client Quit]
clothespin_ has joined #lisp
wsinatra has quit [Quit: WeeChat 2.7]
wsinatra has joined #lisp
william1 has joined #lisp
brettgilio has quit [Ping timeout: 245 seconds]
cosimone has joined #lisp
hostile has quit [Quit: Leaving]
wsinatra has quit [Quit: WeeChat 2.7]
wsinatra has joined #lisp
brettgilio has joined #lisp
pilne has joined #lisp
efm has joined #lisp
wsinatra has quit [Client Quit]
EvW has quit [Ping timeout: 245 seconds]
gioyik has quit [Ping timeout: 268 seconds]
phlim has joined #lisp
trebor_home has quit [Ping timeout: 248 seconds]
kajo has quit [Ping timeout: 246 seconds]
wiselord has quit [Ping timeout: 258 seconds]
refpga has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
Cymew has joined #lisp
asdf_asdf_asdf has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 265 seconds]
enrioog has quit [Ping timeout: 268 seconds]
[ouo] has quit [Remote host closed the connection]
cosimone is now known as cosimone_
cosimone_ is now known as cosimone
random-nick has quit [Quit: quit]
william1 has quit [Ping timeout: 268 seconds]
random-nick has joined #lisp
EvW has joined #lisp
jonatack has quit [Ping timeout: 245 seconds]
jonatack has joined #lisp
space_otter has joined #lisp
cosimone has quit [Quit: Quit.]
gaqwas has quit [Ping timeout: 268 seconds]
LiamH has quit [Quit: Leaving.]
atgreen has quit [Ping timeout: 265 seconds]
gioyik has joined #lisp
slyrus__ has joined #lisp
gaqwas has joined #lisp
slyrus_ has quit [Ping timeout: 248 seconds]
rgherdt has left #lisp ["Leaving"]
chipolux has quit [Ping timeout: 248 seconds]
william1 has joined #lisp
surrounder has quit [Ping timeout: 265 seconds]
chipolux has joined #lisp
surrounder has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 258 seconds]
gaqwas has quit [Ping timeout: 258 seconds]
sebboh has quit [Ping timeout: 265 seconds]
manualcrank has joined #lisp
gaqwas has joined #lisp
patlv has joined #lisp
Bike has quit [Quit: Bike]
atgreen has joined #lisp
clothespin_ has quit [Ping timeout: 268 seconds]
random-nick has quit [Ping timeout: 260 seconds]
fivo has joined #lisp
william1 has quit [Ping timeout: 268 seconds]
fivo has quit [Client Quit]
fivo has joined #lisp
antoszka has joined #lisp
patlv has quit [Ping timeout: 258 seconds]
fivo has quit [Client Quit]
sjl_ has quit [Ping timeout: 268 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
madage has joined #lisp
madage has quit [*.net *.split]
antoszka has quit [Quit: WeeChat 2.7]
antoszka has joined #lisp
vs1 has quit [Ping timeout: 258 seconds]
antoszka has quit [Client Quit]
chipolux has quit [Ping timeout: 265 seconds]
Mearsu has joined #lisp
antoszka has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
Mearsu has left #lisp ["ERC (IRC client for Emacs 26.3)"]
clothespin has joined #lisp
loskutak has quit [Ping timeout: 248 seconds]
madage has joined #lisp
chipolux has joined #lisp
smazga has quit [Quit: leaving]
abhixec has joined #lisp
atgreen has quit [Ping timeout: 260 seconds]
milanj has quit [Quit: Leaving]