p_l 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/> | ASDF 3.3.4
efm has quit [Read error: Connection reset by peer]
varjag has joined #lisp
varjag has quit [Ping timeout: 255 seconds]
efm has joined #lisp
mathrick has quit [Ping timeout: 255 seconds]
shifty has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
<iAmDecim> does anyone use Woo webserver? I see it's still BETA but for moderate traffic??
stereosphere has joined #lisp
z147 has quit [Quit: z147]
stereosphere has quit [Client Quit]
ebrasca has quit [Remote host closed the connection]
zulu_inuoe has quit [Ping timeout: 240 seconds]
markoong has quit [Ping timeout: 240 seconds]
dtman34_ has joined #lisp
dtman34_ has quit [Remote host closed the connection]
<no-defun-allowed> For some function call that has a compiler macro, will that compiler macro ever be invoked more than once?
efm has quit [Read error: Connection reset by peer]
<no-defun-allowed> Maybe an example would help: I have a protocol for a database, and say it has two methods MAP-FOO-NAMES and GET-FOO. Each place (map-foo-names function database) is called, I want to rewrite it to (map-foo-names/named function database '#:symbol-that-designates-this-place); and I have a simple compiler macro that facilitates that rewrite.
<no-defun-allowed> Will MAP-FOO-NAMES/NAMED be called with the same symbol each time it is called from that invocation?
<Bike> there's no guarantee that a compiler macro is called at most once.
<no-defun-allowed> Bummer.
<Bike> there's also no guarantee that they'll be called at all, so i'm not sure it's good for what you're doing anyway.
<no-defun-allowed> True.
<Bike> you could write it as a macro instead, and then it'll be called at least once but maybe more than once.
<no-defun-allowed> Say I had a silly query like (map-foo-names (lambda (name) (print (get-foo name database))) database); an SQL database probably would not appreciate being asked to retrieve foo #1, foo #2, etc.
efm has joined #lisp
<no-defun-allowed> I could add another operator to map foos instead of foo-names, but this is a pretty small protocol compared to the one I am working with; so it might not be a good idea to give each query a generic function. Another legitimate query might not get any foos either.
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
<no-defun-allowed> It also would be unfortunate to make non-SQL databases implement half of SQL. My compromise is to tag each invocation of MAP-FOO-NAMES and count how many foos are retrieved and how many names were provided, allowing the database to decide if it should prefetch the foos or not.
<pjb> or at least once.
<Bike> i don't know the second thing about sql, sorry.
ArthurStrong has joined #lisp
dtman34 has quit [Remote host closed the connection]
<no-defun-allowed> My understanding is they like big "batch" queries like SELECT NAME, FOO IN FOOS instead of SELECT NAME IN FOOS then repeatedly SELECT FOO IN FOOS WHERE NAME = 'a name'
hiroaki has quit [Ping timeout: 272 seconds]
dtman34 has joined #lisp
prince1 has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
KDr21 has joined #lisp
<White_Flame> no-defun-allowed: look up "query planners"
<White_Flame> that's the name for the sql search optimization stuff
<White_Flame> which the DB does internally
<no-defun-allowed> Are you suggesting the database can guess what it has to prefetch?
<White_Flame> it looks at the whole query and tries to map out what the fastest way to traverse it will be
<White_Flame> with like many decades of research into the field
<no-defun-allowed> Right, but if my protocol generates multiple queries, will it still be of any use?
<White_Flame> if you talk to a database, you want to put as much into a single query as possible, so it can cross-link and filter and make use of internal indexes in the DB
<White_Flame> at least, if you want better performance
<no-defun-allowed> That's what I hope to do with gathering statistics on what is retrieved per map-foo-names use.
<White_Flame> I don't quite have the context of what you're doing; if you want that sort of smarts in your own data traversall, then looking at what query planners do is what you want
ArthurStrong has quit [Ping timeout: 240 seconds]
<no-defun-allowed> Sure.
swills has quit [Quit: swills]
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
ArthurStrong has joined #lisp
bitmapper has quit [Ping timeout: 265 seconds]
buffergn0me has joined #lisp
ArthurStrong has quit [Ping timeout: 256 seconds]
ArthurStrong has joined #lisp
dtman34 has quit [Remote host closed the connection]
dtman34 has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
efm has quit [Quit: Konversation terminated!]
efm_ has joined #lisp
efm_ has quit [Client Quit]
gko_ has joined #lisp
semz has quit [Ping timeout: 240 seconds]
ahungry has joined #lisp
efm has joined #lisp
KDr21 has quit [Ping timeout: 240 seconds]
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
space_otter has joined #lisp
v88m has quit [Ping timeout: 265 seconds]
emys has joined #lisp
makomo has quit [Ping timeout: 265 seconds]
caltelt has joined #lisp
v88m has joined #lisp
iAmDecim has quit [Ping timeout: 258 seconds]
emys has quit [Ping timeout: 240 seconds]
emys has joined #lisp
v88m has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 255 seconds]
gigetoo has joined #lisp
emys has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
v88m has joined #lisp
ebzzry has joined #lisp
_whitelogger has joined #lisp
ebzzry has quit [Ping timeout: 256 seconds]
prince1 has quit [Ping timeout: 255 seconds]
emys has quit [Ping timeout: 258 seconds]
marusich has joined #lisp
shifty has joined #lisp
rwcom has quit [Ping timeout: 255 seconds]
emys has joined #lisp
marusich has quit [Ping timeout: 256 seconds]
marusich has joined #lisp
emys has quit [Ping timeout: 265 seconds]
<nitrix> For the interested, SpaceX is launching CRS-20 in the next few 15 minutes. https://www.youtube.com/watch?v=1MkcWK2PnsU
<no-defun-allowed> not Lisp don't care
emys has joined #lisp
KDr21 has joined #lisp
shifty has quit [Ping timeout: 255 seconds]
KDr21 has quit [Excess Flood]
Bike has quit [Quit: Lost terminal]
KDr21 has joined #lisp
marusich has quit [Quit: Leaving]
theruran has joined #lisp
fookara has joined #lisp
<beach> Good morning everyone!
KDr21 has quit [Ping timeout: 256 seconds]
fookara has quit [Remote host closed the connection]
devponies[m]2 has joined #lisp
devponies[m]2 has left #lisp [#lisp]
emys has quit [Ping timeout: 255 seconds]
wxie1 has joined #lisp
ebrasca has joined #lisp
emys has joined #lisp
KDr21 has joined #lisp
rwcom has joined #lisp
ArthurStrong has quit [Ping timeout: 256 seconds]
ebzzry has joined #lisp
KDr21 has quit [Ping timeout: 240 seconds]
emys has quit [Ping timeout: 240 seconds]
KDr21 has joined #lisp
orivej has joined #lisp
rwcom has quit [Ping timeout: 265 seconds]
ArthurStrong has joined #lisp
ebzzry has quit [Ping timeout: 265 seconds]
mathrick has joined #lisp
gravicappa has joined #lisp
emys has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
emys has quit [Ping timeout: 260 seconds]
emys has joined #lisp
ArthurStrong has quit [Quit: leaving]
ebrasca has quit [Ping timeout: 255 seconds]
caltelt has quit [Ping timeout: 265 seconds]
emys has quit [Ping timeout: 256 seconds]
prince1 has joined #lisp
ahungry has quit [Remote host closed the connection]
ebrasca has joined #lisp
<ebrasca> Good morning!
prince1 has quit [Ping timeout: 255 seconds]
<beach> Hello ebrasca.
emys has joined #lisp
emys has quit [Ping timeout: 258 seconds]
ebzzry has joined #lisp
emys has joined #lisp
buffergn0me has quit [Ping timeout: 240 seconds]
emys has quit [Ping timeout: 240 seconds]
asarch has quit [Quit: Leaving]
narimiran has joined #lisp
emys has joined #lisp
wxie1 has quit [Ping timeout: 256 seconds]
emys has quit [Ping timeout: 255 seconds]
sauvin has joined #lisp
gko_ has quit [Ping timeout: 260 seconds]
lxbarbosa has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #lisp
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
shka_ has joined #lisp
wxie1 has joined #lisp
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 258 seconds]
Lord_of_Life_ has joined #lisp
prince1 has joined #lisp
<splittist> Good morning
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life_ is now known as Lord_of_Life
prince1 has quit [Ping timeout: 268 seconds]
<beach> Hello splittist.
ArthurStrong has joined #lisp
ArthurStrong has quit [Client Quit]
elderK has joined #lisp
ebrasca has quit [Remote host closed the connection]
narimiran has quit [Ping timeout: 265 seconds]
<elderK> Hey all! Happy Saturday!
<elderK> I am here, once again, to consult you for advice.
<elderK> Particularly, naming of generic functions, the convention.
<elderK> I've been using what I call the "Scheme" convention for accessors and the like.
<elderK> type-thing. Say, activation-frame-size or location-offset
<elderK> But for some types, this becomes unwieldy fast.
<elderK> So, I was wondering how you guys get around this.
<elderK> Do you use generics and just say the thing? Like, instead of location-offset, you just have a generic called index, and specialize it for a location?
<elderK> Do you change convention depending on context? If so, when, and what questions do you ask, what constraints, help you decide when to apply which?
<beach> elderK: I skip the type thing. Not only because it becomes unwieldy, but also because it becomes really weird with subclassing. Take CLIM, for instance. It looks very strange to say (SHEET-PARENT PANE).
<beach> elderK: So I just skip the type prefix and use more packages instead.
<elderK> beach: Thanks :)
wxie1 has quit [Ping timeout: 256 seconds]
<elderK> The next question comes to do with overloading, or the situation where say, you have a generic with a name that applies to many types, but in different ways.
<elderK> I have seen the 'allow-other-keys' thing. I was wondering if and how that could be used to do this.
<elderK> Say, one method expects two parameters, another expects one. But they are all the same generic.
<beach> Such a situation is not recommended.
<beach> If you have a name that appears to apply to different, unrelated, types, then those types should probably go in different packages.
<elderK> So you'd disambiguate that case by using qualified names?
<beach> Yes.
<elderK> Which brings me to the next thing: Can each package define a generic with the same name?
<beach> The correct term would be that I use "explicit package prefixes".
<beach> Sure, the name of a generic function is either a symbol or (SETF symbol).
<no-defun-allowed> I use your "Scheme convention" for classes that have subclasses that introduce few concepts that the superclasses don't.
<beach> And symbols are specific to packages.
wsinatra has quit [Ping timeout: 246 seconds]
ebrasca has joined #lisp
wsinatra has joined #lisp
fookara has joined #lisp
<elderK> Thank you :)
elderK has quit [Quit: WeeChat 1.9]
nowhereman has joined #lisp
lottaquestions_ has joined #lisp
lottaquestions has quit [Ping timeout: 256 seconds]
luckless has quit [Quit: Leaving]
luckless has joined #lisp
emys has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
fookara has quit [Remote host closed the connection]
emys has quit [Ping timeout: 256 seconds]
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 240 seconds]
dddddd has quit [Ping timeout: 260 seconds]
emys has joined #lisp
prince1 has joined #lisp
prince1 has quit [Ping timeout: 240 seconds]
v88m has quit [Ping timeout: 255 seconds]
emys has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
fookara has joined #lisp
X-Scale has quit [Ping timeout: 258 seconds]
emys has joined #lisp
X-Scale` has joined #lisp
X-Scale` is now known as X-Scale
rippa has joined #lisp
narimiran has joined #lisp
fookara has quit [Remote host closed the connection]
fookara has joined #lisp
Inline has joined #lisp
emys has quit [Ping timeout: 260 seconds]
makomo has joined #lisp
iamFIREcracker has joined #lisp
shka_ has quit [Ping timeout: 265 seconds]
emys has joined #lisp
xuxuru has joined #lisp
emys has quit [Ping timeout: 272 seconds]
xuxuru has quit [Client Quit]
fookara has quit [Remote host closed the connection]
emys has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
emys has quit [Ping timeout: 256 seconds]
lottaquestions has joined #lisp
lottaquestions_ has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 268 seconds]
emys has joined #lisp
shifty has joined #lisp
<phoe> minion: memo for elderK: there also exist package-local nicknames that aid one with defining functionalities in multiple packages. You can use names like A:OFFSET, F:OFFSET, S:OFFSET, even if the packages are named e.g. FROB.ACCESSIBILITY, FROB.FUNCTIONALITY, FROB.SECURITY - PLNs do the translation.
<minion> Remembered. I'll tell elderK when he/she/it next speaks.
zooey has quit [Ping timeout: 240 seconds]
ebzzry has quit [Ping timeout: 260 seconds]
zooey has joined #lisp
lottaquestions_ has joined #lisp
lottaquestions has quit [Ping timeout: 268 seconds]
shifty has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
shifty has joined #lisp
emys has quit [Ping timeout: 240 seconds]
prince1 has joined #lisp
prince1 has quit [Ping timeout: 265 seconds]
SN_ has quit [Remote host closed the connection]
SN_ has joined #lisp
SN_ has quit [Client Quit]
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
red-dot has joined #lisp
zooey has quit [Remote host closed the connection]
gabot has quit [Ping timeout: 268 seconds]
zooey has joined #lisp
markoong has joined #lisp
gabot has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
narimiran has quit [Ping timeout: 265 seconds]
lemoinem has quit [Ping timeout: 255 seconds]
lemoinem has joined #lisp
Bike has joined #lisp
wxie has joined #lisp
ebzzry has joined #lisp
EvW has joined #lisp
mrrevolt has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
lottaquestions has joined #lisp
markong has joined #lisp
lottaquestions_ has quit [Ping timeout: 258 seconds]
markoong has quit [Ping timeout: 255 seconds]
varjag has joined #lisp
nowhere_man has joined #lisp
nowhereman has quit [Ping timeout: 272 seconds]
paul0 has quit [Remote host closed the connection]
paul0 has joined #lisp
admich has joined #lisp
lottaquestions has quit [Ping timeout: 256 seconds]
lottaquestions has joined #lisp
shka_ has joined #lisp
KDr21 has quit [Ping timeout: 255 seconds]
ljavorsk has joined #lisp
zaquest has quit [Remote host closed the connection]
zaquest has joined #lisp
vap1 has quit [Quit: Leaving]
vaporatorius has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
prince1 has joined #lisp
lucasb has joined #lisp
prince1 has quit [Ping timeout: 258 seconds]
wxie has quit [Ping timeout: 256 seconds]
gko_ has joined #lisp
shifty has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
EvW has quit [Ping timeout: 240 seconds]
hiroaki has joined #lisp
libertyprime has joined #lisp
libertyprime has quit [Ping timeout: 256 seconds]
mrrevolt has quit [Remote host closed the connection]
jello_pudding has quit [Ping timeout: 240 seconds]
EvW1 has joined #lisp
troydm has joined #lisp
prince1 has joined #lisp
dddddd has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
caltelt has joined #lisp
lottaquestions has quit [Ping timeout: 265 seconds]
lottaquestions has joined #lisp
swills has joined #lisp
narimiran has joined #lisp
oxum has quit [Remote host closed the connection]
libertyprime has joined #lisp
rj0d has joined #lisp
jello_pudding has joined #lisp
oxum has joined #lisp
rj0d has quit [Client Quit]
EvW1 has quit [Ping timeout: 256 seconds]
lottaquestions has quit [Ping timeout: 265 seconds]
lottaquestions has joined #lisp
caltelt has quit [Ping timeout: 258 seconds]
shifty has quit [Ping timeout: 255 seconds]
shifty has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
sajuuk_ has joined #lisp
oxum has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 272 seconds]
sajuuk_ has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 265 seconds]
sajuuk_ has joined #lisp
<sgithens> Hi all. I'm wondering if there is a way (or preferably nice way) to get a :predicate option for defclass similar to defstruct? I'm somewhat new, so I'm not sure if this would be lurking in an existing option, or needs to be a superclass, or metaclass that must be brought in.
<beach> I think you either have to define it "manually", or you need some MOP manipulation to define a new metaclass, etc. It is probably not worth it.
<beach> Just do (defgeneric stuff-p (x) (:method (x) nil) (:method ((x stuff)) t))
<beach> ... or you can use TYPEP to test for it.
bitmapper has joined #lisp
<sgithens> beach: Thanks, I'm actually bringing an old project back up to speed that I've inherited, and it has and uses `XYZed?` predicate tests for all it's classes, but I can't quite tell where they are coming from, I think it may have pulled in quite older versions of CLOS and things. Mostly I'm looking at how to properly replicate this on modern CL
<beach> I see, yes.
<beach> sgithens: It is a bit strange to have so many uses for such a predicate.
<beach> sgithens: It would be more common to use generic dispatch than to test for the type explicitly.
<pjb> sgithens: a lighter way would be to define the predicate separately. (defclass foo …) (define-type-predicate foop foo)
<pjb> sgithens: with a simplier (defmacro define-type-predicate (name type) `(defun ,name (x) (typep x ',type)))
ljavorsk has quit [Ping timeout: 256 seconds]
<sgithens> pjb: Thanks much! I may start with the less intrusive define-type-predicate here, as there are probably less than 30 classes I need to do this for. I fear I'm still new enough to CL to be a little initimated at shadowing the defclass, but will take a look at it :)
ljavorsk has joined #lisp
<beach> sgithens: Like I said, a better way would be to use more generic functions rather than explicit tests for the type.
caltelt has joined #lisp
<sgithens> beach: I'm guessing because it would handle more of the nuances for comparing class heirarchies and oddities with equality and whatnot?
prince1 has joined #lisp
<beach> It is more a question of modularity. If you are using explicit tests in a function that has some action, then each class-specific action must be present in that function. So if you add some class you need to modify the function.
Necktwi_ has joined #lisp
Necktwi has quit [Read error: Connection reset by peer]
<beach> If you use a generic function ACTION, and specialize it to different classes, the class-specific actions are physically separated, and you can put them in different modules.
<beach> So instead of (defun action (x) (cond ((a-p x) (do-a x)) ((b-p x) (do-b x))...)) you get (defmethod action ((x a)) (do-a x)) (defmethod action ((x b)) (do-b x)) ...
Inline has quit [Ping timeout: 272 seconds]
rwcom has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
buffergn0me has joined #lisp
v88m has joined #lisp
<sgithens> thanks beach, that was a helpful to have unpacked
<beach> Oh, good.
lottaquestions_ has joined #lisp
lottaquestions has quit [Ping timeout: 258 seconds]
caltelt has quit [Ping timeout: 265 seconds]
ebzzry has quit [Read error: Connection reset by peer]
rwcom3 has joined #lisp
rwcom has quit [Ping timeout: 258 seconds]
rwcom3 is now known as rwcom
lottaquestions_ has quit [Ping timeout: 240 seconds]
vms14 has joined #lisp
lottaquestions_ has joined #lisp
gko_ has quit [Ping timeout: 265 seconds]
libertyprime has quit [Quit: leaving]
lucasb has quit [Quit: Connection closed for inactivity]
markong has quit [Ping timeout: 256 seconds]
markong has joined #lisp
narimiran has quit [Ping timeout: 258 seconds]
lottaquestions has joined #lisp
lottaquestions_ has quit [Ping timeout: 265 seconds]
rwcom5 has joined #lisp
lottaquestions_ has joined #lisp
rwcom has quit [Ping timeout: 240 seconds]
rwcom5 is now known as rwcom
lottaquestions has quit [Ping timeout: 265 seconds]
ljavorsk has quit [Ping timeout: 258 seconds]
bitmapper has quit []
ljavorsk has joined #lisp
oxum has joined #lisp
thodg has quit [Ping timeout: 256 seconds]
margeas has joined #lisp
ebzzry has joined #lisp
ArthurStrong has joined #lisp
oxum has quit [Ping timeout: 268 seconds]
markong has quit [Ping timeout: 256 seconds]
vaporatorius has quit [Quit: Leaving]
ArthurStrong has quit [Quit: leaving]
vms14 has quit [Remote host closed the connection]
markoong has joined #lisp
entel has quit [Quit: Connection closed for inactivity]
margeas has quit [Ping timeout: 268 seconds]
oxum has joined #lisp
prince1 has joined #lisp
Khisanth has quit [Ping timeout: 255 seconds]
sajuuk_ has quit [Quit: WeeChat 2.7.1]
prince1 has quit [Ping timeout: 240 seconds]
ljavorsk has quit [Ping timeout: 255 seconds]
ljavorsk_ has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
markong has joined #lisp
markoong has quit [Ping timeout: 258 seconds]
Inline has joined #lisp
admich has quit [Ping timeout: 256 seconds]
Khisanth has joined #lisp
makomo has quit [Quit: WeeChat 2.4]
phlim has joined #lisp
Volt_ has quit [Quit: exit();]
EvW has joined #lisp
shadowswalker has joined #lisp
margeas has joined #lisp
markong has quit [Ping timeout: 256 seconds]
oxum has quit [Ping timeout: 265 seconds]
vms14 has joined #lisp
shadowswalker has quit [Ping timeout: 256 seconds]
geirt has joined #lisp
geirt has left #lisp [#lisp]
orivej has joined #lisp
shifty has joined #lisp
dilated_dinosaur has quit [Ping timeout: 240 seconds]
shka_ has quit [Ping timeout: 265 seconds]
drl has joined #lisp
antepod has joined #lisp
antepod has quit [Client Quit]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
gravicappa has quit [Ping timeout: 255 seconds]
jmercouris has joined #lisp
Frobozz has quit [Quit: quit]
dilated_dinosaur has joined #lisp
prince1 has joined #lisp
prince1 has quit [Ping timeout: 265 seconds]
varjag has joined #lisp
gareppa has joined #lisp
dale has joined #lisp
oxum has joined #lisp
vms14 has quit [Remote host closed the connection]
<Kabriel> I'm playing around with py4cl. Anyone familiar with this package? I would like to unpack a dictionary in a function call, but can't quite figure out how to do that.
* Xach is not familiar, sorry
narimiran has joined #lisp
<jmercouris> Kabriel: you are trying to do ** basically with some function that accepts kwargs?
<Kabriel> yes
<jmercouris> Kabriel: and does python-call work for you?
<Kabriel> let me see; I was using chain
<jmercouris> "python-call can be used to pass arguments to any python callable, such as a function in a module"
<jmercouris> (py4cl:python-call "lambda a=0, b=1: a-b" :b 2 :a 1)
<jmercouris> you see how you could unpack a dictionary into key-value pairs to make a call?
<Kabriel> the issue is that the hash is "pythonized" as string and passed as a signle argument.
<Kabriel> no
<jmercouris> look at the call above
<jmercouris> :b 2 :a 1
<jmercouris> looks a lot like a plist does it not?
<jmercouris> or is it alist?
<jmercouris> I get them confused
<MichaelRaskin> plist
<jmercouris> anyways, you can convert your dictionary into that, and make the call
<Kabriel> I am trying to use a python function that returns a dictionary and then pass that to a second pythong function
<jmercouris> Yes, I get it
<jmercouris> what I am telling you is that you may have to do some processing in Lisp
<Kabriel> got it
<jmercouris> deconstruct that dictionary into a plist and pass it where you would normally do kwargs things in Python
<jmercouris> MichaelRaskin: thank you
<MichaelRaskin> Well, you could probably write a "lambda …" string so that ** happens in Python
<jmercouris> ah, yeah, that's another good idea
<Kabriel> no, because then the dict gets passed as a string
<jmercouris> OK, so then you will have to do the processing as I've suggested
<Kabriel> in process
<jmercouris> dictionary -> plist, and use python-call
<MichaelRaskin> Does it get passed as string with python-call too?
<Kabriel> there is a generic function pythonize that turns the hash table into a python dictionary
<jmercouris> you know, you could just also write a lambda that contains both funcalls together in python
<jmercouris> "lambda funcall2(funcall1)..."
<Kabriel> I think this happens in both call and chain
oxum has quit [Ping timeout: 256 seconds]
<MichaelRaskin> Composing in Python is probably also faster (every time you cross some kind of imperfectly transparent border, there is some overhead)
<Kabriel> temporary situtaion to use python plotting until some matplotlib equivalent is done
<Kabriel> (in cl)
mercourisj has joined #lisp
jmercouris has quit [Ping timeout: 256 seconds]
mercourisj is now known as jmercouris
<MichaelRaskin> Well, I mean just that as long as you do multiple things in Python, consider doing all of them as a single chunk
<MichaelRaskin> Then later the chunk might get smaller
<jmercouris> I would say that is good advice
<jmercouris> you could even wrap the chunk in a flet or defun
<jmercouris> you don't necessarily want to interleave blobs of python everywhere in your CL
<jmercouris> it might get hard to reason about, and difficult to extend in the future
<Kabriel> Definitely not. I'm trying to interface with just a set of plotting stuff.
<jmercouris> then just keep your API very simple
<jmercouris> only pass the data once to python and let it do the rest in one solid chunk
<jmercouris> no need to use this py4cl line by line passing back and forth then
<jmercouris> it will be harder to understand that way anyway as compared to just plain python
<jmercouris> that's just what I would do, :-)
gareppa has quit [Quit: Leaving]
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
luni has joined #lisp
vms14 has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
rippa has quit [Read error: Connection reset by peer]
vms14 has quit [Ping timeout: 265 seconds]
shifty has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #lisp
red-dot has quit [Read error: Connection reset by peer]
red-dot has joined #lisp
narimiran has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Inoperable has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
prince1 has joined #lisp
prince1 has quit [Ping timeout: 265 seconds]
slyrus_ has joined #lisp
KDr21 has joined #lisp
slyrus__ has quit [Ping timeout: 256 seconds]
z147 has joined #lisp
EvW has quit [Ping timeout: 256 seconds]
vms14 has joined #lisp
EvW1 has joined #lisp
KDr21 has quit [Ping timeout: 268 seconds]
<vms14> windows users, do you know if sbcl unix sockets work on windows 10?
<vms14> I see windows 10 has unix sockets support
luni has left #lisp [#lisp]
KDr21 has joined #lisp
random-nick has quit [Ping timeout: 260 seconds]
<vms14> meh, it's not the same api, so won't work
KDr21 has quit [Ping timeout: 255 seconds]
<p_l> SBCL uses Winsocks, afaik, so no, it has only access to the crippled side of Windows networking
ebrasca has quit [Remote host closed the connection]
<vms14> p_l: windows 10 stole the bsd sockets and "implemented" the unix sockets
<vms14> but they're assholes and changed slightly the api
<p_l> vms14: Berkeley got money to reimplement TOPS-20 TCP/IP implementation with contractual obligation to provide the source code to everyone
impulse has quit [Quit: leaving]
<p_l> nobody in the world stole BSD sockets
<vms14> yeah, that's what the BSD license lets you do
<vms14> but I tend to use "steal" where I mean "copy"
<p_l> and Windows NT *native* network API isn't BSD sockets
<p_l> Winsock just emulates them for applications based on BSD sockets API (which, btw, sucks - it's one of the worst around)
<vms14> p_l then I'll have some kind of unix sockets with sbcl in windows?
<p_l> vms14: my suggestion is to use OS-native APIs where possible. On Windows the norm is to use Named Pipes (not the same as unix FIFOs)
<vms14> yes, I'll end using pipes instead for windows
<p_l> wrap the system-specific transports in higher level API (it's not like it's hard to do, you have lisp on your side)
<p_l> the implementation of Unix sockets is, afaik, mostly done for WSL1
<p_l> WSL2 runs a stripped-down Linux kernel
<vms14> I'm realizing since I'm using perl and sdl + unix sockets + sbcl and on the lisp side I won't use any external library, has to be quite portable
<vms14> excepting the sockets part
phlim has quit [Read error: Connection reset by peer]
<vms14> and since just discovered win 10 provides unix sockets, I was wondering if I'll really won't need any single change on the code
<p_l> vms14: well, the necessary libs are part of the OS in WinNT case, and I'm pretty sure Perl has the libs for that as well
<vms14> but it seems I'll have to use named pipes for win
<vms14> perl supports that win sockets api, so on the perl side Idon't need to change nothing
<vms14> but on the lisp side, it seems I will
hiroaki has joined #lisp
<vms14> anyway it won't be much work to change unix sockets for named pipes, since that would be the only change I'll need
markoong has joined #lisp
margeas has quit [Ping timeout: 256 seconds]
markong has joined #lisp
markoong has quit [Ping timeout: 265 seconds]
z147_ has joined #lisp
vms14 has quit [Remote host closed the connection]
KDr21 has joined #lisp
z147 has quit [Ping timeout: 240 seconds]
harshrc has joined #lisp
KDr21 has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 258 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
z147_ has quit [Quit: z147_]
KDr21 has joined #lisp
buffergn0me has quit [Ping timeout: 256 seconds]