jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
ivan4th has joined #lisp
kmurphy4 has joined #lisp
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
ealfonso has joined #lisp
<Bike> i don't understand
TMA has quit [Ping timeout: 256 seconds]
Arcaelyx_ has quit [Ping timeout: 240 seconds]
Arcaelyx has joined #lisp
TCZ has joined #lisp
<ealfonso> how does a recursive macro work, is it dynamically expanded at runtime? I wrote a macro to retry an arbitrary form up to n times, retrying in case of a condition signalled. the problem is that n is not known at compile time
<Bike> a macro can expand into an invocation of itself
<Bike> if that's what you mean
<Bike> i don't know why you'd need or want that for your retro macro though
<makomo> ealfonso: why would you use a macro for that anyway?
<ealfonso> makomo what other option do I have without turning form into a function
<makomo> i mean, why would you do the retrying in the expander rather than the expansion
<makomo> if i understood correctly what you're saying
<ealfonso> so currently I wrote a macro using loop, so it's not a recursive macro. the problem is that I'm storing the result into a variable, and forms that return multiple values don't seem to work correctly
<Bike> (defun retrying (n thunk) (tagbody loop (handler-bind ((error (lambda (c) (declare (ignore c)) (go loop)))) (funcall thunk))))
karlosz has joined #lisp
<Bike> what do you mean they don't work correctly?
markoong has quit [Ping timeout: 255 seconds]
<Bike> i guess (return-from retrying (funcall thunk))
<ealfonso> Bike I guess I was trying to avoid turning thunk into a function
innovati has quit [Read error: Connection reset by peer]
<Bike> it's pretty similar as a macro
innovati has joined #lisp
<makomo> just interpolate the body in the place of the funcall
<ealfonso> yeah
<makomo> erm Bike, where do you use your n?
<Bike> i don't because i forgot
<makomo> :-D
bbobb has quit [Ping timeout: 256 seconds]
<makomo> something like this? https://plaster.tymoon.eu/view/809#809
<makomo> it might be overly complicated, this is a first try
on_ion has quit [Read error: No route to host]
<makomo> i guess it would be nice if the result of the body is returned
<makomo> that's probably the point
<Bike> (return-from out (progn ,@body)), that much is easy
nickenchuggets has quit [Read error: Connection reset by peer]
on_ion has joined #lisp
<Bike> establishing a bunch of blocks, including one named NIL, aorund arbitrary code is kind of bad though
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
innovati has quit [Quit: Textual IRC Client: www.textualapp.com]
<makomo> hm good point
msmith has joined #lisp
<makomo> Bike: because the blocks don't use gensym'd names, or because it's just complicated/bad style?
<makomo> or both?
<Bike> the former
<makomo> aha
<Bike> also i guess it can just use handler case
<makomo> and regarding the NIL block, what about that one
Kaisyu7 has joined #lisp
<Bike> the dotimes
<makomo> yeah, but you can't "fix" it without removing dotimes right?
<Bike> pretty much.
<ealfonso> i'm trying this, https://pastebin.com/B68fQy5P => "return for unknown block: #:|loop-tag823|"
<makomo> Bike: (loop) sets up a NIL block too right?
<Bike> it does
<ealfonso> I'm not too familiar with tags and blocks
<Bike> ealfonso: tagbody is different from block
<makomo> Bike: so what stndard looping construct is there that doesn't establish a NIL block? is there one even?
<makomo> standard*
<Bike> you can do "loop named"
<makomo> hm?
<makomo> oh wow
<makomo> now that's neat
<makomo> i thought loop was doomed too
eli_oat has joined #lisp
<makomo> so perhaps this one https://plaster.tymoon.eu/view/811#811
elfmacs has joined #lisp
<makomo> should be :for i :from 0 :below n
<ealfonso> but tagbody returns nil...
<Bike> that's why you return-from
vhost- has joined #lisp
<makomo> returning the result of the body: https://plaster.tymoon.eu/view/812#812
<makomo> oh err, i guess that let is unnecessary
<Bike> you don't need the block ,out either, you can just name the loop ,out.
<makomo> Bike: then i lose the ability to differentiate between exceeding and succeeding though, no?
<makomo> i mean, currently i don't differentiate via the return value in any way, only in "Exceeding" being printed
<Bike> you could put a finally block
<makomo> is the finally clause run after an exit from the loop's block?
<makomo> no i suppose?
<Bike> shouldn't be
<makomo> mhm
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<makomo> can return-from return multiple values?
<makomo> oh it can indeed
Cymew has joined #lisp
ivan4th has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
dddddd has quit [Remote host closed the connection]
<makomo> using multiple values: https://plaster.tymoon.eu/view/815#815
<ealfonso> thanks Bike makomo . I wanted to try it myself, and was only missing the (return-from ) and the named loop tag. https://pastebin.com/g3B3bidW
Cymew has quit [Ping timeout: 245 seconds]
innovati has joined #lisp
<makomo> no problem, this was a fun exercise :-)
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
Kundry_Wag has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 264 seconds]
eli_oat has quit [Quit: Leaving.]
EvW has quit [Ping timeout: 255 seconds]
smurfrobot has joined #lisp
Kundry_Wag has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
Achylles has quit [Ping timeout: 245 seconds]
eli_oat has joined #lisp
ealfonso has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
dented42 has joined #lisp
djuber has joined #lisp
kamog has quit [Quit: ERC (IRC client for Emacs 26.1)]
skidd0 has joined #lisp
<skidd0> Hello all. Quick question regarding packages and systems with asdf and quicklisp coming up.
<skidd0> I have a package.lisp that exports two classes from my project.lisp along with a project.asd that defines the project's system
<skidd0> that all works fine. I can (ql:quickload :project) in a REPL without errors
<skidd0> but, when i try to then (make-instance 'class-in-project), i get an error that says the class symbol doesn't exist in common-lisp-user
<skidd0> so then i tried to (in-package :project) in the repl
<skidd0> and then tried to make the class instance again.
<skidd0> same error
<skidd0> do i need to qualify my class symbols?
<skidd0> (make-instance project:class-in-project) ?
<skidd0> turns out, yes, yes i do
<skidd0> is there a way to not need the qualifier?
<Xach_> skidd0: yes.
<skidd0> good
ealfonso has joined #lisp
<Xach_> you can make it accessible without a prefix via importing or inheritance.
<Xach_> inheritance is done with use-package or :use in defpackage (it must be external in the source package)
red-dot has joined #lisp
<skidd0> oh use-package okay
<Xach_> import is done with import or :import-from or :shadowing-import-from in defpackage
<skidd0> right gotcha
<Xach_> use-package isn't something you'd use normally - it's more typical to use defpackage to set things up.
<skidd0> so for REPL, slime like development, what is the common way?
<skidd0> defpackage with use or import
<Xach_> defpackage
<Xach_> with use
<Xach_> or use prefixes
<Xach_> import is also ok
<skidd0> but that then means i get ALL the symbols of the package, right?
<Xach_> no. import works on only one symbol.
<skidd0> import negates that risk
<skidd0> i was talking about :use
<skidd0> just not typing fast enough
<Xach_> oh, use makes all external symbols accessible
<Xach_> not all present symbols
<skidd0> and import is specific choices
<skidd0> oh right
<skidd0> only exported
<skidd0> and :: can get around that, but if you're using :: it's usually not a good thing
<skidd0> right?
<Xach_> yes. but import has a bit of an issue where it doesn't matter if it's external. in theory you should import only external things. i'd like an import-if-external or something sometimes.
<Xach_> :: means if it breaks you can't complain too much
<Colleen> Unknown command. Possible matches: 8, time, set, say, mop, get, login, grant, tell, roll,
<Xach_> bad bot
<skidd0> oh Colleen! i saw that library on cliki and was interested
<skidd0> that's cool to see
<skidd0> and, i suppose, not a surprise for this channel
<skidd0> :roll
<skidd0> ::roll
<Colleen> 1d6: 3
karlosz has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
<simplegauss_> is there a standard way to create callable objects or (equivalently) add some annotation to a function object so that it can still be called by funcall?
<Xach_> simplegauss_: there's a mop thing called funcallable-standard-instance or similar
<Xach_> I don't know how it works, sorry.
surya has joined #lisp
<simplegauss_> i've actually seen that, but i don't think that's standard, and moreover have no idea how it works (as in I can use it, but I have no understanding of the link between funcall and MOP).
<Bike> mop funcallable-standard-object
<Bike> it's not standard, but any implementation worth its weight in salt supports it
<Bike> And they don't weigh very much
<Xach_> is this like on stack overflow where you post a question and the answer back to back
<simplegauss_> is there a specification for how funcall actually works in the standard? my main reference is the hyperspec and as far as I can tell it makes no mention of anything to do with the mop
<Bike> It doesn't for this particular thing, but MOP specifies it
<simplegauss_> Xach_: it isn't the solution I want :)
<Xach_> simplegauss_: you can't make an object funcallable without using the mop.
<Bike> why isn't it the solution you want?
<Xach_> it's mop, it's mop, it's mop, it's not the spec <guitar riff>
<Bike> Well this update dependent stuff is totally irrelevant
<simplegauss_> Bike: i wanted something closer to the standard. i guess it doesn't really matter in practice, but it makes me uneasy that I don't have an understanding of how it works.
<Bike> you need the mop, but thankfully the mop is reasonably well specified
<simplegauss_> is there a free way to learn about MOP? something like the hyperspec? it seems AMOP is only available for purchase
<Bike> The thing I linked has the specification chapters
robotoad has joined #lisp
<Xach_> the spec chapters are on line for free
<Bike> But it's probably a bit thin to read by itself
<Xach_> one way to not use the mop is to stop wanting to make objects funcallable
<Xach_> sometimes that is easiest
<Bike> I don't think there's really a resource other than AMOP
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<simplegauss_> Xach_: true :) really all i would need is a generic "funcall" that works on functions and on objects inheriting from a certain class, but that seems uglier and more invasive than using the existing MOP solution.
<Bike> well, that's pretty much what mop does
<Bike> the "certain class" is funcallable-standard-object
<Bike> it's not an actual generic function, if that's what you wanted
<pillton> simplegauss_: Are you binding these "functions" to names in the global environment?
daniel-s has joined #lisp
<simplegauss_> pillton: nope
<simplegauss_> Bike: what i'm confused about is, for example, I can't find in the spec you linked how funcall is modified, and this is the sort of thing i'd like to understand. do you know if that sort of info is in AMOP? if so I can try and get it from the library
eli_oat has quit [Quit: Leaving.]
<Bike> funcall isn't modified, exactly
<Bike> it's just specified that if you try to call a funcallable-standard-object, it calls that object's funcallable-instance-function instead
<Bike> not just from funcall either, also stuff like apply
djuber has quit [Remote host closed the connection]
<simplegauss_> Bike: but the point is I can't make a "funcallable-simplegauss-object" that doesn't inherit from "funcallable-standard-object" but still works with funcall/apply, right? it just seems like a weird special case in the design.
<Bike> why would you not want it to inherit from that?
<simplegauss_> or rather not inherit, but use as a metaclass
<Bike> you need the metaclass because the objects have an additional semi-slot for the function, which is reflected in the class
<Bike> in the standard you can't define objects that aren't instances of standard-object, or classes that aren't subclasses of standard-class, just by design
milanj_ has quit [Quit: This computer has gone to sleep]
eli_oat has joined #lisp
rpg has joined #lisp
AetherWind has joined #lisp
gigetoo has quit [Ping timeout: 256 seconds]
<simplegauss_> so historically CLOS came before and separately from the MOP infrastructure, or they were created concurrently but only certain parts made it into the standard?
<Bike> mm, sorta both. the standard recommends MOP in a few places.
stardiviner has joined #lisp
stardiviner has quit [Client Quit]
stardiviner has joined #lisp
jonh has left #lisp ["WeeChat 1.4"]
<simplegauss_> Bike, Xach_: thanks for the help!
karswell_ has quit [Read error: Connection reset by peer]
karswell_ has joined #lisp
<simplegauss_> more generally, i have a (mostly academic) interest in the tradeoffs of polymorphism the CLOS/MOP vs typeclass (pioneered by Haskell) way. it seems that in practice the only deficiency of CLOS is return-type dispatch (which would be quite difficult in lisp :))
<Bike> yeah, that doesn't make sense with the lisp type system.
<Bike> generic function calls will also involve a runtime dispatch cost that i believe haskell can avoid.
<simplegauss_> I guess there's also the ML modules way, but that seems just a few macros away :)
<simplegauss_> i bet you could even do modular implicits somewhat easily.
<simplegauss_> Bike: you might be interested in https://github.com/guicho271828/inlined-generic-function
<Bike> i am aware of it.
<simplegauss_> yet another reason i want to understand MOP :)
<Bike> amop is the best source.
<Bike> the basic idea is that it implements CLOS using itself, and exposes some of the generic functions therefore involved.
jeosol has joined #lisp
gigetoo has joined #lisp
stardiviner has quit [Read error: Connection reset by peer]
gigetoo has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
<ealfonso> let's say I want to split a single-package containing some utils into a utils and a 'core' file. defs in the 'core' file depend on defs made in util. do I need to put (defpackage ) in util?
karlosz has joined #lisp
gigetoo has joined #lisp
<pillton> Most people define packages in packages.lisp and use in-package inside other files.
<ealfonso> pillton makes sense. thanks
gigetoo has quit [Ping timeout: 240 seconds]
asarch has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
eli_oat has quit [Quit: Leaving.]
red-dot has joined #lisp
gigetoo has joined #lisp
phax has quit [Remote host closed the connection]
asarch has quit [Quit: Leaving]
deng_cn has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
tripty has quit [Ping timeout: 256 seconds]
gigetoo has quit [Ping timeout: 276 seconds]
<rpg> ealfonso: Often handy to put defclass, defmacro, defvar, defparameter forms in decls.lisp, which depends on package.lisp and then have everything depend on decls
ealfonso has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
shka_ has joined #lisp
Pixel_Outlaw has quit [Quit: Leaving]
Oladon has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
schoppenhauer has quit [Ping timeout: 245 seconds]
schoppenhauer has joined #lisp
doesthiswork has quit [Quit: Leaving.]
iAmDecim has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
jlarocco has joined #lisp
iAmDecim has quit [Remote host closed the connection]
iAmDecim has joined #lisp
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
skapata has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
skidd0 has quit [Quit: WeeChat 2.1]
Kundry_Wag has quit [Ping timeout: 248 seconds]
siraben has joined #lisp
gigetoo has joined #lisp
quazimodo has joined #lisp
krwq has joined #lisp
gigetoo has quit [Ping timeout: 240 seconds]
tripty has joined #lisp
Bike has quit [Quit: Lost terminal]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
Kundry_Wag has joined #lisp
Cymew has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
Cymew has quit [Ping timeout: 265 seconds]
<beach> Good morning everyone!
quazimodo has quit [Ping timeout: 240 seconds]
Inline has quit [Quit: Leaving]
nickenchuggets has quit [Quit: Leaving]
snits has quit [Ping timeout: 264 seconds]
snits has joined #lisp
emaczen has joined #lisp
quazimodo has joined #lisp
red-dot has joined #lisp
karlosz has quit [Quit: karlosz]
bbobb has joined #lisp
quazimodo has quit [Ping timeout: 276 seconds]
doesthiswork has joined #lisp
Oladon has quit [Quit: Leaving.]
quazimodo has joined #lisp
surya has quit [Remote host closed the connection]
gigetoo has joined #lisp
gigetoo has quit [Ping timeout: 256 seconds]
gigetoo has joined #lisp
<emaczen> how exactly does CFFI work?
<jack_rabbit> emaczen, in what way?
<emaczen> How does Lisp know about C objects/functions?
<emaczen> C structures etc...
<emaczen> usually we use define-foreign-library which loads the shared library
<emaczen> What exactly happens when we load the shared library?
flamebeard has joined #lisp
Kundry_Wag has joined #lisp
<jack_rabbit> shared libraries have certain calling conventions. All the lisp has to do is adhere to those and it's all good.
orivej has quit [Ping timeout: 260 seconds]
surya has joined #lisp
fraya has joined #lisp
<jack_rabbit> The functions and objects exposed by the library are made visible through an API.
<jack_rabbit> provided by the host system.
<jack_rabbit> or possibly by reading the file itself.
Kundry_Wag has quit [Ping timeout: 256 seconds]
emaczen has quit [Read error: Connection reset by peer]
akkad has quit [Remote host closed the connection]
sauvin has joined #lisp
vlatkoB has joined #lisp
Satou has joined #lisp
andrei-n has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
rippa has joined #lisp
shrdlu68 has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
shrdlu68 has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
jkordani_ has joined #lisp
doesthiswork has quit [Quit: Leaving.]
jkordani has quit [Ping timeout: 240 seconds]
Mutex7 has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
karswell_ has quit [Remote host closed the connection]
karswell_ has joined #lisp
Cymew has joined #lisp
aoh has quit [Quit: switching servers]
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
mflem has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
bbobb has quit [Quit: bbobb]
milanj_ has joined #lisp
smokeink has joined #lisp
Naergon has joined #lisp
dddddd has joined #lisp
krwq has quit [Remote host closed the connection]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
kmurphy4 has quit [Quit: kmurphy4]
Domaldel has joined #lisp
scymtym has joined #lisp
lumm has joined #lisp
shka_ has joined #lisp
Folkol has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
mange has quit [Ping timeout: 240 seconds]
Mutex7 has quit [Quit: Leaving]
varjag has joined #lisp
shka_ has quit [Ping timeout: 248 seconds]
karswell_ has quit [Remote host closed the connection]
karswell_ has joined #lisp
heisig has joined #lisp
wigust- has quit [Ping timeout: 260 seconds]
aindilis has quit [Read error: Connection reset by peer]
TMA has joined #lisp
jeosol has quit [Quit: Page closed]
aindilis has joined #lisp
jeosol has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
m00natic has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
Satou has quit [Quit: exit();]
jack_rabbit has quit [Ping timeout: 276 seconds]
smurfrobot has joined #lisp
_cosmonaut_ has joined #lisp
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
voidlily has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Remote host closed the connection]
voidlily has joined #lisp
Bronsa has joined #lisp
<White_Flame> so I'm trying to join #lispweb and it says "Cannot join channel (+r) - you need to be identified with services", yet I am identified. Is freenode still having problems?
<White_Flame> in any case, are there any examples of using hunchensockets with sec-websocket-protocol?
<White_Flame> the code in the implementation looks like an unexposed hack, but without being documented as such
deng_cn1 has joined #lisp
deng_cn has quit [Ping timeout: 248 seconds]
deng_cn1 is now known as deng_cn
jack_rabbit has joined #lisp
Folkol has joined #lisp
White_Flame has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
White_Flame has joined #lisp
Folkol has quit [Client Quit]
aindilis has joined #lisp
vaios has joined #lisp
vaios has left #lisp [#lisp]
Folkol has joined #lisp
aijony has quit [Ping timeout: 245 seconds]
simplegauss_ has quit [Ping timeout: 245 seconds]
aijony has joined #lisp
simplegauss has joined #lisp
khrbt has quit [Ping timeout: 245 seconds]
khrbt has joined #lisp
Folkol has quit [Ping timeout: 240 seconds]
blt has quit [Ping timeout: 255 seconds]
shrdlu68 is now known as deim0s
blt has joined #lisp
blt has joined #lisp
deim0s is now known as shrdlu68
red-dot has joined #lisp
Folkol has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
shrdlu68 has quit [Ping timeout: 265 seconds]
shrdlu68 has joined #lisp
Achylles has joined #lisp
makomo has quit [Ping timeout: 248 seconds]
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Folkol has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
smokeink has quit [Ping timeout: 260 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
smurfrobot has joined #lisp
hhdave has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
nickenchuggets has quit [Read error: Connection reset by peer]
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Folkol has quit [Ping timeout: 264 seconds]
toc has joined #lisp
EvW1 has joined #lisp
markong has joined #lisp
pierpal has quit [Ping timeout: 255 seconds]
Kundry_Wag has joined #lisp
markong is now known as markoong
toc` has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Kundry_Wag has quit [Ping timeout: 240 seconds]
toc has quit [Ping timeout: 260 seconds]
cvoxel has joined #lisp
toc` has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
lumm has quit [Ping timeout: 255 seconds]
smurfrobot has joined #lisp
AetherWind has quit [Quit: Leaving]
kozy has quit [Ping timeout: 264 seconds]
thodg has joined #lisp
smurfrobot has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
lumm has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 256 seconds]
karswell_ has quit [Remote host closed the connection]
karswell_ has joined #lisp
EvW1 has quit [Ping timeout: 245 seconds]
Kevslinger has joined #lisp
<rumbler31> what is sec-websocket-protocol
foom has joined #lisp
foom2 has quit [Ping timeout: 255 seconds]
pettrie has joined #lisp
red-dot has joined #lisp
lumm has quit [Quit: lumm]
edgar-rft has quit [Ping timeout: 256 seconds]
<xificurC> http://ix.io/1d5U/lisp - cli-arglist works fine when called in the REPL but the macroexpansion produces (&key). I guess that's because '(...) gets into clidef as (quote '(...)). What would be the solution? I am quoting the clidef because I want to be able to do `(:options (,@common-options (special #\s "special option" :flag)))
<xificurC> I often have this issue, I have a list that I want to be able to build at runtime and use that list in a macro. If I leave out the quoting then I cannot write lisp code, I just turned that piece into pure data. If I put a quote there I don't know how to use that piece of code in a function call - ,(func arg) where arg went in as '(1 2 3) and now is
<xificurC> ''(1 2 3). Is it OK to just do ,(func (cadr arg)) ?
<White_Flame> rumbler31: it's a websocket option to tell the server which user protocol you want to use inside your messages
<xificurC> it seems hacky to do (cadr ''(foo bar)) to get to (foo bar)
<TMA> xificurC: the quoting style you use seems very strange
edgar-rft has joined #lisp
<Xach_> xificurC: macros are for transforming source code, not runtime lists.
<White_Flame> in order to deal with runtime data, macros should output code to handle runtime data
cvoxel has quit [Ping timeout: 240 seconds]
<xificurC> and looking at the sample code what code would that be?
<White_Flame> depends on what you want done with it
<White_Flame> for instance, if you're trying to do a mapcar on a runtime list, you don't have that list at compile-time; you need to generate the mapcar code that will take the runtime list
<xificurC> White_Flame: but the result is supposed to be used in a defun for arglist
<White_Flame> well, you can issue a defun at runtime
<xificurC> White_Flame: so eval
<xificurC> ?
<White_Flame> yeah, since defun is a macro itself
smurfrobot has joined #lisp
<White_Flame> just make sure you're truly needing dynamic runtime code generation
<xificurC> TMA: what do you mean by strange? Do macros never take quoted arguments?
<White_Flame> macros rarely take quoted arguments
<White_Flame> usually it's just passthrough stuff for body; they pretty much never are written to destructure into quoted fields
Bike has joined #lisp
<xificurC> ne invocation: foo -c --down x.txt
<xificurC> White_Flame: I would hope not :) I'm building a library for handling command line. What I pasted is a piece of the puzzle. Basically I want to write '(:name "foo" :args ((file ...)) :description "makes some foo" :options ((down #\d ...) (create #\c ...)) to get a function (lambda (file &key down create) ...) that will be able to handle a command li
<White_Flame> take the quote off '(:args, for one
<White_Flame> you're passing in a data structure, not an evaluated form
<White_Flame> you need to extract lambdas out of there so that they do get evaluated, though
LiamH has joined #lisp
<xificurC> White_Flame: ok, if I take the quote off, how do I (defcli foo) and (defcli bar) both sharing (defparameter *common-options* '((help #\h "prints this help" ...) (verbose #\v "prints debugging information to stderr" ...)))
<White_Flame> the very first thing you need to do is figure out what your generated code should be
<White_Flame> and then work backwards from there
<White_Flame> you also need to ensure that your defparameter value is available at compile-time
klm2is has quit [Quit: Leaving]
lumm has joined #lisp
hjek has joined #lisp
doesthiswork has joined #lisp
doesthiswork has quit [Client Quit]
charh has quit [Ping timeout: 256 seconds]
doesthiswork has joined #lisp
smokeink has joined #lisp
pettrie has quit [Ping timeout: 260 seconds]
MoziM has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
warweasle has joined #lisp
cvoxel has joined #lisp
mindCrime has joined #lisp
hjek has left #lisp [#lisp]
cvoxel has left #lisp [#lisp]
<xificurC> compile time is a moving target when the compiler is available at runtime :) a defun in a library will be AOT compiled and a defun at a lisp file will be JIT compiled
<xificurC> I'm doing something similar to this https://github.com/fare/command-line-arguments , just wanted to avoid the replication of the options (he writes check, verbose, warn ... twice) and skip the creation of a +command-line-spec+
scymtym_ has joined #lisp
surya has quit [Ping timeout: 248 seconds]
<nowhere_man> xificurC: there isn't a difference between library and lisp file…
scymtym has quit [Ping timeout: 245 seconds]
<xificurC> nowhere_man: I meant (load "x.lisp") and (load "x.fasl"). A library loaded with asdf will be precompiled into a fasl, isn't that right?
<LdBeth> nowhere_man (IRC): the might refer to foreign library
Kundry_Wag has joined #lisp
schweers has joined #lisp
<beach> Here is my latest suggestion with respect to the stepping commands of a good debugger: http://metamodular.com/stepping.pdf
<LdBeth> xificurC: fasl could be native machine instruction representation
<xificurC> LdBeth: why would that matter. I was talking about handing a lisp file or a fasl to e.g. sbcl
<LdBeth> xificurC: sbcl just use native machine code in fasl
Kundry_Wag has quit [Ping timeout: 256 seconds]
kmurphy4 has joined #lisp
<LdBeth> Which means, you can’t use a AMD64 sbcl fasl on ARM
<xificurC> LdBeth: how does that relate to my point? I was saying compile time is a moving target. Think eval-when
Folkol has joined #lisp
<LdBeth> Yes, your main point is right. Just few details.
lumm has quit [Quit: lumm]
<xificurC> LdBeth: I see. thanks
<phoe> beach: 5.2.1 - the debuggers I know behave as "step over" in that case. If you cannot step into an instruction, you step over it.
lumm has joined #lisp
<phoe> Your debugger may behave differently, though - *especially* if it informs the user that the instruction at point cannot be stepped into.
<phoe> I'd actually like it that way.
<LdBeth> xificurC: if you’re still stuck with '(...) thing, I think you can use `,(form ...)
<beach> phoe: In that situation, step over also has no effect. So it does behave like step over.
fraya has quit [Remote host closed the connection]
<xificurC> White_Flame: here's a simplified piece of generated code i need - http://ix.io/1d6h/lisp . Think of that being e.g. in a (setf (symbol-function 'foo) snippet-here). The problem that is still baffling me is how to design the macro to take the data that defines the API (the '(:args ... :options ...) part) in a way it can be reused between different i
<xificurC> nvocations of the macro
heisig has quit [Quit: Leaving]
<xificurC> as with the *common-options* example
skapata has joined #lisp
<White_Flame> (defvar *shared* '(:key val)) is in the same format as what (mymacro (:key val)) receives
<xificurC> White_Flame: is that a question or a hint
<White_Flame> and if there isn't a defun in there, then your expansion isn't complete
<White_Flame> it's a statement. There's no difference in format between lists that a macro sees, and lists that are stored in variables
<White_Flame> the quote is needed when things are being evaluated, but it's still just a list
<White_Flame> but still, you need to finish your expansion to include the defun
siraben has quit [Ping timeout: 248 seconds]
<xificurC> White_Flame: there's no defun, as I wrote the expansion should have been (setf (symbol-function 'foo) :snippet-here)
<White_Flame> why setf symbol-function?
<xificurC> White_Flame: (mymacro (key val)) is different to (myfunction (key val)) though, that's the point.
<xificurC> brb
<White_Flame> sure. (mymacro (key val)) vs (myfunction '(key val)) if you want to interchanget hem
<White_Flame> or with (defmacro mymacro (paramlist) `(myfunction ,paramlist)), you can use (mymacro list-var) vs (mymacro '(key val)). It's your call
<White_Flame> but if you have parameters that need to be evaluated, then you can't evaluate them at compile-time
sjl has quit [Quit: WeeChat 2.1]
sjl has joined #lisp
siraben has joined #lisp
<xificurC> White_Flame: those examples are fine, I used them, but I'm stunned here because I'm trying to pass in code and use it as code in one spot and as data in another one
scymtym_ has quit [Remote host closed the connection]
<White_Flame> well, i dont' know what build-cli actually does
<xificurC> White_Flame: as you said if you do `(func ,val) then val can be '(a b c) or (defparameter *x* '(a b c)) and then just *x*
<xificurC> but if I pass e.g. '(a b c) I need to call ,(func val)
<White_Flame> one big issue is that build-cli is being called at runtime and is getting passed source code for lambda functions
<xificurC> and that basically becomes (func ''(1 2 3))
siraben has quit [Read error: Connection reset by peer]
<White_Flame> it needs to be `(:options ( ... ,(lambda ...))) if that is used in runtime
<White_Flame> if it's used in compile-time, then you can simply walk the structure and place the lambda clauses where they need to go
<White_Flame> in the format you curretnly have
<xificurC> White_Flame: yes I have it as `(... ,(lambda ...)) right now
<White_Flame> and that would make it non-portable to walk the structure at compile-time
<White_Flame> because the backquote hasn't been evaluated
<White_Flame> your first format was better
<xificurC> the problem is that clidef in the macro invocation becomes '`(... ,(lambda ...))
<White_Flame> then get rid of the quote!
siraben has joined #lisp
<White_Flame> but stlil, with the backquote, your macro can't really do anything with walking it
<White_Flame> so I would not use the backquoted version
<xificurC> White_Flame: I will if you tell me how to use it as *code*
<xificurC> :)
<White_Flame> it's souce
<White_Flame> source
<White_Flame> that's what you have to work with
<White_Flame> I'm not sure build-cli should be running at runtime
<White_Flame> but I don't know what it does
<xificurC> walks argv and returns a list of options and arguments left
<White_Flame> I think at compile-time, you should walk the list structure and generate code for the clauses it encounters
<xificurC> ah no, build cli just builds a struct
<White_Flame> or build-cli should be returning source code to be used in your macro
fikka has quit [Ping timeout: 264 seconds]
siraben has quit [Client Quit]
<White_Flame> but even with what you curretnly have, it doesn't work with (defcli dockerfile-generate (:args ...)), with (apply #'build-cli ',clidef) inside defcli?
<White_Flame> ah, no, because you still have the lambda problem, and the lambdas need to be pulled out at compile time
subroot has joined #lisp
fikka has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
thodg has quit [Ping timeout: 256 seconds]
Bronsa has quit [Remote host closed the connection]
_cosmonaut_ has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
pierpal has joined #lisp
pierpal has quit [Remote host closed the connection]
<xificurC> White_Flame: yes, only eval or cadr solves that
<White_Flame> you need to better separate compile-tiem vs runtime
<White_Flame> there's no barrier to do what you want; the fact that you've written so much to be runtime instead of compiletime is constraining you
<xificurC> actually I'm giving up on the macro because the function I want to generate I might want to use with other arguments than what comes from argv, right
fikka has quit [Ping timeout: 260 seconds]
<xificurC> White_Flame: I want to do as much at compile time as possible
<White_Flame> build-cli doesn't reflect that in its current state
random-nick has joined #lisp
<xificurC> White_Flame: why
<White_Flame> because it's called at runtime, with runtim edata
pancets has joined #lisp
<White_Flame> and that's where all the magic seems to happen
<xificurC> White_Flame: because '(:args ((file)) :options ((down #\d ".." :flag) (create #\c ".." :flag))) *is* runtime data
<White_Flame> are you sure?
<White_Flame> can it just be a literal at compile-time?
<White_Flame> right now it doesn't rely on any evaluation
pierpal has joined #lisp
<White_Flame> of course, it could simply be a stated requirement that it can be dynamically generated, which would force you to handle it at runtime
Inline has joined #lisp
fikka has joined #lisp
<xificurC> White_Flame: I don't see how can it be compile time constant if I want it to be composed
<xificurC> `(:args (,@docker-args another-arg) :options (,@*common-options* ...))
<White_Flame> right, that's what I meant
<White_Flame> so if you want a function whose arguments are extracted from that, it must be EVAL'd up at runtime
<xificurC> the purpose of code is to automate tasks. I don't want to copy-paste common arguments all over the place :)
<White_Flame> a macro can simply add &allow-other-keys to your defuns, and pass those through to the common handler
<xificurC> White_Flame: yes, or cadr'd. I wonder how much does that scream *hack*
<White_Flame> or inject whatever "common argument" needs to your defun statements
<xificurC> (cadr ''a)
<xificurC> vs. (eval ''a)
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<White_Flame> I would say never do that
<White_Flame> it just doesn't make sense
<White_Flame> the quote shouldn't be there if you're dealing with that
<White_Flame> it's runtime, so the macro never sees the quote literally
<White_Flame> ie, there is no macro in that case
<xificurC> White_Flame: I just don't see how to not have the quote there if I want it to be runtime composable
<White_Flame> if it's runtime, dont' use a macro
<xificurC> in which case as you said I would need to eval to get the lambda arguments
fikka has quit [Ping timeout: 276 seconds]
<White_Flame> a function in that sense would do exactly the same as a macro in your broken case
<White_Flame> it takes a spec, generates source code, and evaluates
<White_Flame> a macro takes a spec, generates source code, and returns it to the current evaluator
<White_Flame> so if you're fully runtime, there's no reason to use a macro here
<xificurC> ah ok, you're saying I could change the macro to be a function that calls eval
<xificurC> but if I cadr I don't eval and am using a macro :D lisp is strange
<xificurC> White_Flame: thank you
<White_Flame> you have to eval in order to create your defuns
<xificurC> not if I cadr!
<White_Flame> I have no idea what you're getting at with the cadr cases, or ''a
<White_Flame> cadr does not create functions
<White_Flame> cadr does not evaluate
<White_Flame> I don't know what you're referring to here
<White_Flame> fundamentally, you want to call DEFUN
<Bike> is there code or something here
<xificurC> http://ix.io/1d5U/lisp didn't work. If you replace ,(cli-arglist def) with ,(cli-arglist (eval def)) it works. If you replace it with ,(cli-arglist (cadr def)) it works too
<xificurC> I am saying (eval ''(1 2 3)) returns the same as (cadr ''(1 2 3))
<White_Flame> basically, he has runtime code to handle the spec list, but he also wants compile-time code to create a DEFUN whose arguments are defined by teh spec. The spec must be runtime-evaluated, as it might not be lieteral
fikka has joined #lisp
<White_Flame> xificurC: that doesnt' help you actually execute a DEFUN or instantiate a lambda
<Bike> Oh. Gross.
<Bike> xificurC: CADR won't work if you use a backquote form instead of a quote form.
<Inline> you are closing a let over a lambda there
<Inline> hmmm
<xificurC> Bike: (cadr ``(1 2 3)) works here the same way
<Bike> But it won't for something more complex.
<White_Flame> xificurC: none of that is relevant to your problem
<Inline> your macro returns a closure
<Bike> (car '`(1 ,@a 2)) => undefined
<Bike> The fact you don't understand why is worrying
<xificurC> Bike: I understand, don't worry
<Bike> CADR will only work if it's a quote form. If it will always be a quote forom, you should just not have it be quoted instead.
fikka has quit [Ping timeout: 260 seconds]
<xificurC> Bike: yes I understand
FreeBirdLjj has joined #lisp
papachan has joined #lisp
<xificurC> I'll just avoid the macro for now and have 2 steps - defining the spec and defining a function. Then there can be a helper function that parses the argv based on the spec and hands it over to the function
<xificurC> and the function will stand on its own so it can be called and tested outside of an "argv context"
<Bike> that's good.
<White_Flame> that was my suggestion, so yeah
<White_Flame> no macro needed
fikka has joined #lisp
<shka> i agree with the above
<shka> so 3 thumbs up
shrdlu68 has left #lisp [#lisp]
<shka> :-)
EvW has joined #lisp
<shka> xificurC: TLDR functions > macros
<White_Flame> and no (cadr ''(spec...)) junk required
charh has joined #lisp
daniel-s has quit [Remote host closed the connection]
karlosz has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<xificurC> I saw the repetition in the spec and the lambda list and thought of macros
<Xach_> Since macros don't evaluate their arguments like functions do, you can't use function-style tricks for reducing repetition.
<Xach_> I see people try to shortcut specifying slots in defclass that way
<Xach_> And same with macros like cl-who
<Xach_> You have to work within the evaluation rules, or wrap them in things that expand into what you want instead.
fikka has joined #lisp
<xificurC> Xach_: the problem was I didn't realize that I'm trying to reduce repetition across 2 different times, run- and compile-. Novice lisper
fraya has joined #lisp
TCZ has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Guest18531 has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
<xificurC> FYI I will release this code at some point so more criticism will be more than welcomed
SaganMan has joined #lisp
johnvonneumann has joined #lisp
johnvonneumann is now known as Guest23311
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
pancets has quit [Quit: Leaving]
nika has joined #lisp
fikka has joined #lisp
jmercouris has joined #lisp
smokeink has quit [Ping timeout: 268 seconds]
Achylles has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 245 seconds]
ft has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
kmurphy4 has quit [Quit: kmurphy4]
nika has quit [Read error: Connection reset by peer]
nika has joined #lisp
EvW has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 268 seconds]
elfmacs has quit [Ping timeout: 260 seconds]
flamebeard has quit []
TCZ has quit [Quit: Leaving]
brendyn has quit [Ping timeout: 240 seconds]
DemolitionMan has joined #lisp
fikka has joined #lisp
EvW has joined #lisp
serichsen has joined #lisp
thodg has joined #lisp
<serichsen> Good evening
<beach> Hello serichsen.
fikka has quit [Ping timeout: 256 seconds]
remix2000[m] has quit [Remote host closed the connection]
LdBeth has quit [Read error: Connection reset by peer]
RichardPaulBck[m has quit [Remote host closed the connection]
eatonphil has quit [Remote host closed the connection]
CharlieBrown has quit [Read error: Connection reset by peer]
thorondor[m] has quit [Remote host closed the connection]
manila[m] has quit [Remote host closed the connection]
ArthurAGleckler[ has quit [Read error: Connection reset by peer]
equalunique[m] has quit [Read error: Connection reset by peer]
wetha has quit [Remote host closed the connection]
drunk_foxx[m] has quit [Remote host closed the connection]
blep-on-external has quit [Read error: Connection reset by peer]
Jach[m]1 has quit [Read error: Connection reset by peer]
can3p[m] has quit [Remote host closed the connection]
spectrumgomas[m] has quit [Write error: Connection reset by peer]
lyosha[m] has quit [Remote host closed the connection]
kammd[m] has quit [Remote host closed the connection]
GNUPONUT[m] has quit [Remote host closed the connection]
plll[m] has quit [Read error: Connection reset by peer]
katco[m] has quit [Read error: Connection reset by peer]
kumori[m] has quit [Remote host closed the connection]
theemacsshibe[m] has quit [Remote host closed the connection]
hdurer[m] has quit [Read error: Connection reset by peer]
Guest10376 has quit [Remote host closed the connection]
jach[m] has quit [Read error: Connection reset by peer]
dirb has quit [Write error: Connection reset by peer]
z3r0d5y[m] has quit [Remote host closed the connection]
<jmercouris> is there a way to loop through the elements of a simple bit vector?
<jmercouris> I tried to do something like (loop for i in #*0110110001101111 do ...) but it complains
azimut has quit [Ping timeout: 240 seconds]
<on_ion> perhaps one may need to convert it ? or use map?
<sjl> jmercouris: IN is for lists, ACROSS is for vectors
<sjl> (loop :for i :across #*010101 :do (print i))
<jmercouris> sjl: Ah, handy fact! Thank you!
<jmercouris> I wonder why that is
<sjl> all vectors, not just bit vectors, but it'll work with bit vectors fine
<on_ion> ahh good ole loop
azimut has joined #lisp
fikka has joined #lisp
<sjl> it's so lisp knows the kind of iteration you need at compile time, instead of having to have both code paths available and only one used at runtime
serichsen has quit [Ping timeout: 240 seconds]
<on_ion> ahh
<pjb> if you can have either or both, use map.
<pjb> (map 'list 'list '(a b c) "abc" #(1 2 3)) #| --> ((a #\a 1) (b #\b 2) (c #\c 3)) |#
<sjl> otherwise every IN would have to support both walking lists by CDR, and walking arrays with an index variable
<pjb> (map 'vector 'list '(a b c) "abc" #(1 2 3)) #| --> #((a #\a 1) (b #\b 2) (c #\c 3)) |#
<sjl> or use iterate and write your own IN-WHATEVER that handles both cases, like me
scymtym has joined #lisp
fraya has quit [Quit: Leaving]
fikka has quit [Ping timeout: 245 seconds]
jmercouris has quit [Ping timeout: 240 seconds]
jmercouris has joined #lisp
kmurphy4 has joined #lisp
makomo has joined #lisp
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
scymtym has quit [Ping timeout: 240 seconds]
<on_ion> pjb why map?
smurfrobot has quit [Remote host closed the connection]
serichsen has joined #lisp
<shka> on_ion: works on lists and vectors
<on_ion> oh. but what sjl said is good though, to know one path at runtime
<shka> yes
<shka> but to quote pjb
<shka> [18:15] <pjb> if you can have either or both, use map.
<shka> so i explained why
fikka has joined #lisp
LdBeth has joined #lisp
<on_ion> ah hmm
jmercouris has quit [Remote host closed the connection]
DemolitionMan has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ft has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
wigust has joined #lisp
hhdave has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
serichsen has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
Kundry_Wag has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 260 seconds]
raynold has joined #lisp
Achylles has joined #lisp
red-dot has joined #lisp
kmurphy4 has quit [Remote host closed the connection]
mflem has joined #lisp
spectrumgomas[m] has joined #lisp
remix2000[m] has joined #lisp
CharlieBrown has joined #lisp
GNUPONUT[m] has joined #lisp
kammd[m] has joined #lisp
katco[m] has joined #lisp
drunk_foxx[m] has joined #lisp
eatonphil has joined #lisp
wetha has joined #lisp
Guest13662 has joined #lisp
kumori[m] has joined #lisp
equalunique[m] has joined #lisp
manila[m] has joined #lisp
theemacsshibe[m] has joined #lisp
thorondor[m] has joined #lisp
jach[m] has joined #lisp
plll[m] has joined #lisp
RichardPaulBck[m has joined #lisp
hdurer[m] has joined #lisp
lyosha[m] has joined #lisp
z3r0d5y[m] has joined #lisp
Jach[m]1 has joined #lisp
can3p[m] has joined #lisp
blep-on-external has joined #lisp
ArthurAGleckler[ has joined #lisp
dirb has joined #lisp
fikka has joined #lisp
slyrus1 has joined #lisp
khrbt has quit [Quit: ZNC 1.6.5 - http://znc.in]
fikka has quit [Ping timeout: 256 seconds]
zooey has quit [Ping timeout: 250 seconds]
zooey has joined #lisp
pagnol has joined #lisp
fikka has joined #lisp
Xach_ is now known as Xach
Xach has quit [Changing host]
Xach has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
lumm has quit [Quit: lumm]
lumm has joined #lisp
fikka has joined #lisp
scymtym has joined #lisp
svillemot has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
svillemot has joined #lisp
fikka has joined #lisp
schweers has quit [Ping timeout: 255 seconds]
thodg has quit [Ping timeout: 260 seconds]
ft has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 265 seconds]
smurfrobot has joined #lisp
shka_ has joined #lisp
lumm has quit [Ping timeout: 256 seconds]
serichsen has joined #lisp
fikka has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
smurfrobot has quit [Ping timeout: 248 seconds]
m00natic` has joined #lisp
m00natic has quit [Remote host closed the connection]
orivej has quit [Remote host closed the connection]
ft has joined #lisp
Folkol has joined #lisp
sukaeto has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
shenghi has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 256 seconds]
sukaeto has joined #lisp
serichsen has quit [Ping timeout: 256 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
fikka has joined #lisp
serichsen has joined #lisp
lumm has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
fikka has quit [Ping timeout: 276 seconds]
fraya has joined #lisp
surya has joined #lisp
sjl has joined #lisp
slyrus1 has quit [Ping timeout: 255 seconds]
shka_ has quit [Ping timeout: 240 seconds]
serichsen has quit [Ping timeout: 276 seconds]
shka_ has joined #lisp
fikka has joined #lisp
shenghi has joined #lisp
shka_ has quit [Read error: No route to host]
shka_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
skapata has quit [Remote host closed the connection]
kamog has joined #lisp
shka_ has quit [Read error: No route to host]
skapata has joined #lisp
shka_ has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
fikka has joined #lisp
makomo has quit [Ping timeout: 256 seconds]
EvW has quit [Ping timeout: 240 seconds]
pagnol has quit [Ping timeout: 256 seconds]
Cymew has quit [Ping timeout: 260 seconds]
TCZ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
shka_ has quit [Ping timeout: 264 seconds]
pagnol has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
m00natic` has quit [Remote host closed the connection]
fikka has joined #lisp
nika has quit [Quit: Leaving...]
fikka has quit [Ping timeout: 256 seconds]
akkad has joined #lisp
shka_ has joined #lisp
akkad has left #lisp [#lisp]
makomo has joined #lisp
serichsen has joined #lisp
surya has quit [Ping timeout: 276 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<skapata> mi revenis
<skapata> ta da
serichsen has quit [Quit: Bye]
shka_ has quit [Ping timeout: 256 seconds]
shka_ has joined #lisp
skapata has quit [Remote host closed the connection]
akkad has joined #lisp
fikka has joined #lisp
akkad has quit [Client Quit]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
fikka has quit [Ping timeout: 265 seconds]
<makomo> beach: found a typo in http://metamodular.com/environments.pdf, "that the extension* incurs"
varjag has joined #lisp
red-dot has joined #lisp
fikka has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
lumm has quit [Quit: lumm]
lumm has joined #lisp
Ven`` has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
random-nick has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
raynold has quit []
Ven`` has quit [Client Quit]
Ven`` has joined #lisp
Ven` has joined #lisp
fikka has joined #lisp
andrei-n has quit [Quit: Leaving]
Ven`` has quit [Ping timeout: 245 seconds]
dented42 has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
Ven` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zachk has joined #lisp
zachk has quit [Changing host]
zachk has joined #lisp
Ven`` has joined #lisp
pierpal has quit [Quit: Poof]
Ven`` has quit [Client Quit]
pierpal has joined #lisp
lavaflow has quit [Read error: No route to host]
Kundry_Wag has quit [Ping timeout: 264 seconds]
lavaflow has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
vlatkoB has quit [Remote host closed the connection]
fikka has joined #lisp
karswell_ has quit [Read error: No route to host]
varjag has quit [Ping timeout: 264 seconds]
lumm has quit [Ping timeout: 256 seconds]
lumm has joined #lisp
attila_lendvai has quit [Read error: No route to host]
Kundry_Wag has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Kundry_W_ has joined #lisp
TCZ has quit [Quit: Leaving]
pierpal has quit [Read error: Connection reset by peer]
lumm has quit [Read error: Connection reset by peer]
varjag has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
nickenchuggets has joined #lisp
pierpal has joined #lisp
attila_lendvai has quit [Read error: No route to host]
lumm has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dented42 has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
Arcaelyx has joined #lisp
Quetzal2 has joined #lisp
Mutex7 has joined #lisp
kmurphy4 has joined #lisp
bigfondue has quit [Ping timeout: 260 seconds]
kmurphy4 has quit [Remote host closed the connection]
Quetzal2 has quit [Quit: ?? Bye!]
EvW1 has joined #lisp
Guest13662 has quit [Remote host closed the connection]
remix2000[m] has quit [Read error: Connection reset by peer]
hdurer[m] has quit [Remote host closed the connection]
jach[m] has quit [Read error: Connection reset by peer]
can3p[m] has quit [Remote host closed the connection]
GNUPONUT[m] has quit [Remote host closed the connection]
LdBeth has quit [Remote host closed the connection]
CharlieBrown has quit [Read error: Connection reset by peer]
blep-on-external has quit [Remote host closed the connection]
theemacsshibe[m] has quit [Remote host closed the connection]
ecraven has quit [Quit: bye]
kammd[m] has quit [Remote host closed the connection]
spectrumgomas[m] has quit [Remote host closed the connection]
Jach[m]1 has quit [Remote host closed the connection]
dirb has quit [Remote host closed the connection]
manila[m] has quit [Remote host closed the connection]
wetha has quit [Remote host closed the connection]
equalunique[m] has quit [Write error: Connection reset by peer]
kumori[m] has quit [Remote host closed the connection]
ecraven has joined #lisp
RichardPaulBck[m has quit [Write error: Connection reset by peer]
katco[m] has quit [Remote host closed the connection]
z3r0d5y[m] has quit [Remote host closed the connection]
thorondor[m] has quit [Remote host closed the connection]
lyosha[m] has quit [Remote host closed the connection]
drunk_foxx[m] has quit [Remote host closed the connection]
asarch has joined #lisp
ArthurAGleckler[ has quit [Remote host closed the connection]
plll[m] has quit [Remote host closed the connection]
eatonphil has quit [Remote host closed the connection]
Achylles has quit [Quit: Leaving]
moei has quit [Quit: Leaving...]
rumbler31 has quit [Remote host closed the connection]
<beach> makomo: Thanks. But that paper has been published, so it can't be altered now.
<dxtr> Hmm, when I try to inspect an object in slime with C-c I I get: illegal sharp macro character: #\<
<dxtr> How come?
<Xach> dxtr: how did you input the object to inspect?
ealfonso has joined #lisp
<Xach> dxtr: since it's read and evaluated, you can't type/yank #<OBJECT foo>
<dxtr> I just realized I am inserting expressions here
<Xach> dxtr: When I want to inspect such an object, I make sure it's the most recent repl result and then inspect "*"
<dxtr> Oh neat
<dxtr> I can do that?
<Xach> NO! Only me
<Xach> Well, you can probably do it too.
<dxtr> I actually had a brain fart because it didn't dawn on me that I'm inserting expressions
<dxtr> But that last thing you mentioned is really helpful in either case
<dxtr> You get two high-fives for that!
<ealfonso> I need to make 1000 http requests. can I do them in parallel with drakma?
<dxtr> Just create a thousand threads
<Xach> ealfonso: not by itself. you would need something to parallelize it. i like lparallel but raw threads would work too.
varjag has quit [Ping timeout: 264 seconds]
<dxtr> Xach: Speaking of parallelization; my company (Well.. I. I'm the only one coding lisp here) used your s3 library for quite a while and it was pretty heavily parallelized!
fraya has quit [Remote host closed the connection]
<Xach> dxtr: so glad to hear it! i wish i had time to add to it but things have been pretty busy
<dxtr> It's quite funny because it was actually intended to be a one-off thing - which is why I made it in lisp in the first place (Because no one else would be able to maintain it otherwise) - but it ended up being run quite heavily and it worked really well
LdBeth has joined #lisp
<dxtr> It has served its purpose now, though, so we're not using it anymore. It involved synchronizing around 150k images downloaded via HTTP, normalizing file names and stuff and uploading it to our s3 bucket. Saved us quite a bit of labor.
<dxtr> Just wanted to give you some positive feedback :)
subroot has quit [Read error: Connection reset by peer]
emacsomancer has joined #lisp
<Xach> Thanks! Always nice to hear when something works
<ealfonso> can I use loop to split a list of 1000s of items into n-sized chunks?
<ealfonso> to iterate over chunks?
<ealfonso> I guess I could use "by"?
<Xach> I can't think of a terse, built-in way to do it.
<ealfonso> is there something like (nthcdr n ...) that I can combine with loop's "by" without creating a function?
<phoe> ealfonso: not really, BY requires an one-argument function
<phoe> you could theoretically (alexandria:compose #'cddddr #'cddddr #'cddddr) but that might not be the way
lumm has quit [Quit: lumm]
<PuercoPop> ealfonso: you could use for := clauses and (subseq xs 10) to 'move forward'
<dxtr> ealfonso: Is it maybe better to split it up into n chunks?
<shka_> serapeum has batches function that does that
rumbler31 has joined #lisp
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pjb> (loop for start on big-list by (lambda (x) (nthcdr n x)) while start collect (subseq start 0 (min (length start) n)))
lumm has joined #lisp
wigust- has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
<pjb> it's simple to write, but it's not efficient.
<pjb> you could add a variable: (loop for l = (length big-list) :then (- l n) for start on big-list by (lambda (x) (nthcdr n x)) while start collect (subseq start 0 (min l n))) ; but it would still read the big-list twice.
wigust has quit [Ping timeout: 260 seconds]
<pjb> personnally, I just write: (com.informatimago.common-lisp.cesarum.sequence:group-by big-sequence n)
<pjb> Way simplier…
<dxtr> That package name
<shka_> :)
<rumbler31> is it less words?
pierpa has joined #lisp
<shka_> it is almost like symbolic gesture
<pjb> Well, of course I lie. I write (group-by big-sequence n)
<pjb> But if I tell you that you will come again, "and where does group-by come from?" etc…
<shka_> "I really want local package nicknames"
<pjb> At least with the big package name you know where it comes from!
<shka_> true
<shka_> though common-lisp.cesarum seems to redundant
<shka_> or at least common-lisp
<pjb> It tells that its written in pure common-lisp, and not specifically for sbcl or clisp.
<shka_> anyway, goodnight
skeuomorf has joined #lisp
<shka_> pjb: ok, makes sense
<shka_> sadly, common lisp package system is suboptimal :/
<pjb> Yep, but there's nothing better. So it's still the best.
<shka_> eh, i guess
<dxtr> How is it suboptimal? I have no complaints
<shka_> good night
<pjb> dxtr: it uses a global namespace. In the Internet age, were you get systems from anywhere, you can easily have package name collisions.
<shka_> dxtr: i would prefer to use com.informatimago.common-lisp.cesarum.* for instance
<pjb> (if you don't use the reversed domain name convention).
<shka_> more like com.informatimago.common-lisp.* but you get the idea
<shka_> it is flat
<dxtr> shrug
<shka_> also, local nicknames are not standard
<pjb> Local package name systems have been defined and implemented, but there are variants, and it's not integrated in all implementations yet.
<dxtr> That's a non-issue in my opinion
<aeth> There are several issues with the package system. (1) No portable local package nicknames and it's very easy for nicknames to conflict. (2) You will wind up with a million exports for any decently sized program, and the verbosity of it seems very unlispy. (3) There's no easy way to check for unused imports or nonexistent exports because of the dynamic nature of it.
<pjb> hacve a look at com.informatimago.common-lisp.lisp.relative-package
<aeth> (2b) That verbose million exports thing could easily also apply to imports, which is why most imports are just used with :USE instead of :IMPORT-FROM
<pjb> it's a choice. You can easily define a lot of small package with very few exports.
<pjb> But it's more work.
<aeth> pjb: I do one package per file to keep the exports down and I *still* sometimes wind up with dozens of exports for a moderately sized (400-800ish) file
<shka_> anyway, i really think that packages in lisp could be waaaaaaaaay better
<aeth> s/400-800ish/400-800ish line/
<shka_> but it is what it is
<shka_> maybe someday
<shka_> but i doubt
<copec> What package systems do you like shka_ ?
<aeth> I can probably cut 20 of those exports, though.
<dxtr> I buy the package nickname/alias argument and the unused checking. The rest is like.. If you need that many imports and exports you need that many imports and exports
<dxtr> I think smaller packages is the solution. It's not that much work :)
<shka_> copec: i don't understand why would you be interested on my preferences ;-)
<aeth> Actually, you don't. Most of the time when you get tons of exports it's because of struct or CLOS object accessors. If you're okay with forcing the user to use with-foo-accessors (a specific version of with-accessors) you can do something like this: https://gitlab.com/zombie-raptor/zombie-raptor/blob/161143c74c456393a28ccb8618d86dd42444eaf7/util/util.lisp#L263-292
<aeth> The only imperfection there is that it doesn't check that it's a valid accessor first. I went for simplicity of definition/implementation, at least for now
kmurphy4 has joined #lisp
<copec> shka_ I assume you know more than I and I would like to compare/contrast package systems
<shka_> copec: sorry to disappoint you ;-)
<shka_> aeth: i have something like this as well
<aeth> (with-foobar-accessors ((foo foo) (bar bar) (baz baz)) foobar ...) ; 1 export instead of 3. adds up if you have tons of structs and CLOS objects all over the place
<aeth> Except it's really 2 exports because I also have (with-foobar-accessors* (foo (bar* bar) baz) foobar ...)
<aeth> Kill verbosity.
<shka_> but i did this somewhat differently
<aeth> Oh and my macro system supports prefixes, too. If you want safety, use one prefix for public accessors. The prefix is implicity added.
<shka_> (defmethod ((symbol (eql 'something))) is very useful in macros like this
<shka_> anyway, goodnight
<aeth> In case I was unclear, the accessors could be foobar-foo, foobar-bar, and foobar-baz, and the syntax would be identical in my examples above.
<aeth> So it's not just for simpler imports/exports. I also use it internally within the same package to eliminate prefixes.
<aeth> So I'm not sure I need to support some kind of safety to prevent people from using accessors they're not supposed to when the prefix system could work perfectly fine for that.
lumm has quit [Ping timeout: 260 seconds]
shka_ has quit [Ping timeout: 268 seconds]
moei has joined #lisp
Bike has joined #lisp
LiamH has quit [Quit: Leaving.]
mindCrime has quit [Ping timeout: 260 seconds]
red-dot has joined #lisp
karlosz has quit [Quit: karlosz]
<ealfonso> for the chunking issue, I used my own macro, even though sub-chunk elements are reversed https://pastebin.com/gpduRSqD
<dxtr> Hmm, can I remove functions in slime?
<dxtr> or sbcl rather
sjl has quit [Ping timeout: 276 seconds]
<ealfonso> (loop-do-chunked chunk '(1 2 3 4 5 6 7) 3 (format t "chunk is ~A~%" chunk)) => chunk is (3 2 1) chunk is (6 5 4) chunk is (7)
Kundry_W_ has quit [Remote host closed the connection]
<ealfonso> dxtr are you looking for fmakunbound?
<dxtr> Possibly. I just want to remove a function because I accidentally made it a defun when I wanted it as a defmethod
<dxtr> And now it won't let me redefine it
Khisanth has quit [Ping timeout: 248 seconds]
karlosz has joined #lisp
thodg has joined #lisp
<Xach> fmakunbound is the thing
Kundry_W_ has joined #lisp
Cymew has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 260 seconds]
Kundry_W_ has joined #lisp
thodg has quit [Read error: Connection reset by peer]
Khisanth has joined #lisp
pagnol has quit [Ping timeout: 264 seconds]
anunnaki has joined #lisp
Mutex7 has quit [Quit: Leaving]
fikka has quit [Ping timeout: 240 seconds]
drastik has quit [Ping timeout: 264 seconds]
karlosz has quit [Ping timeout: 260 seconds]
<dxtr> also, this is quite interesting. I'm running cl-dbi to use a sqlite3 database
<dxtr> And when I try to prepare a statement it says my table doesn't exist - although I can select from it from the cli
fikka has joined #lisp
robotoad has quit [Quit: robotoad]
kamog` has joined #lisp
drastik has joined #lisp
LdBeth has quit [Remote host closed the connection]
Patternmaster has quit [Quit: leaving]
kamog has quit [Ping timeout: 264 seconds]
<dxtr> One good idea is to use the correct filenames
<dxtr> That made all the difference
skapata has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
kamog` is now known as kamog
gigetoo has quit [Ping timeout: 240 seconds]
<pjb> aeth: you can always define your own package, exporting only the one symbol you want.
fikka has joined #lisp
<pjb> (defpackage "MINE" (:import-from "CL" "CAR") (:export "CAR"))
<pjb> So now you have a a package named "MINE" that exports only one accessor.
Kundry_W_ has quit [Remote host closed the connection]
<pjb> (let ((k (cons nil nil))) (setf (mine:car k) 42) k) #| --> (42) |#
eli_oat has joined #lisp
nickenchuggets has quit [Read error: Connection reset by peer]
<pjb> Notice how you can thus define as many packages as you want, as different interfaces for different clients.
eli_oat has quit [Client Quit]
nickenchuggets has joined #lisp
markoong has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 256 seconds]
drastik has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
vsync has quit [Quit: ZNC - http://znc.sourceforge.net]
vsync has joined #lisp
karlosz has joined #lisp
pjb has quit [Ping timeout: 245 seconds]
gigetoo has joined #lisp
fikka has joined #lisp
LdBeth has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
<dxtr> It's not possible to see if a &rest argument wasn't passed or was passed nil, right?
<Bike> those are the same thing, no?
<dxtr> That's what I figured :)
<Bike> i mean i'm not sure what you want to distinguish here
robotoad has joined #lisp
<dxtr> Well, what I'm making a sort-of wrapper around some cl-dbi functions and I've defined my execute like (defun execute (conn query &rest parameters)) - but that fails with prepared statements that is supposed to have zero parameters
<dxtr> Because parameters is nil
fikka has quit [Ping timeout: 255 seconds]
<Bike> yeah, that means the call was like (execute *connection* my-query)
<dxtr> But I can't just do (if parameters (dbi:execute ... parameters) (dbi:execute ...)) because I don't know if parameters actually is nil
<Bike> it sounds like you might want apply
<dxtr> Haha, that's literally what I did because I changed it so parameters is a list
<dxtr> But, yeah, turns out it works without lists too
<dxtr> Hmm
daniel-s has joined #lisp
<dxtr> Duh
<dxtr> &rest is a list
<on_ion> param eaters
<dxtr> It's too late for this
Kundry_W_ has joined #lisp
<dxtr> Well then that solves that
<dxtr> Thanks, Bike!
willdye has joined #lisp
fikka has joined #lisp
drastik has joined #lisp
gigetoo has quit [Ping timeout: 255 seconds]
shangul has joined #lisp
CharlieBrown has joined #lisp
remix2000[m] has joined #lisp
spectrumgomas[m] has joined #lisp
drunk_foxx[m] has joined #lisp
GNUPONUT[m] has joined #lisp
kammd[m] has joined #lisp
Guest9126 has joined #lisp
eatonphil has joined #lisp
wetha has joined #lisp
theemacsshibe[m] has joined #lisp
jach[m] has joined #lisp
thorondor[m] has joined #lisp
katco[m] has joined #lisp
manila[m] has joined #lisp
RichardPaulBck[m has joined #lisp
equalunique[m] has joined #lisp
kumori[m] has joined #lisp
plll[m] has joined #lisp
hdurer[m] has joined #lisp
can3p[m] has joined #lisp
lyosha[m] has joined #lisp
z3r0d5y[m] has joined #lisp
ArthurAGleckler[ has joined #lisp
dirb has joined #lisp
blep-on-external has joined #lisp
Jach[m]1 has joined #lisp
<on_ion> sketchy
<shangul> oh wow!
<shangul> they were all from matrix.org
<on_ion> [m] ... suspicious
<on_ion> ohhh =)