Xach changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/>
<aeth> heh, I never realized that downside of destructuring-bind because I almost never mutate lists
<aeth> (arrays are almost always better for that, at least with what I do)
<aeth> I'd personally do `(4 ,b ,c) in your case, but that obviously isn't what you want
<harovali> aeth: thanks!
<rtt> you can even setf the cadr, etc.
<aeth> (in other words, if you can get away with not mutating, then it's so short and elegant even with d-b)
<rtt> I'm a newbie too, so take my ideas with a grain of salt
<aeth> rtt: You're almost on the right path. Basically, instead of naming the variables, you'd create accessors and name them. Then you can have a reader and a writer (getters and setters in most languages)
<harovali> yes but how do you bind a name to the cadr?
<aeth> e.g. (defun a (l) (car l))
<aeth> A simple pattern so you can use a macro to generate a (defun a ...) and a (defun (setf a) ...) for each thing you name
<aeth> then you'd (setf (a l) 4) instead of (setf a 4)
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> If you make it a macro instead of a function, you get the setter for free and don't have to define a pair, but that's kind of less elegant
<White_Flame> clhs symbol-macrolet
<White_Flame> harovali ^
<aeth> The problem here is that it's O(n) to set an element so you don't want to do it to long lists, and you especially don't want to set many elements in a list.
<White_Flame> with a symbol macro, you can define A to expand to (first list)
<aeth> And, right, symbol-macrolet can make a function into a "variable"
<White_Flame> which will work in both readeing and setf
<aeth> you can also use with-accessors
rtt has quit [Remote host closed the connection]
<aeth> (car l) and (first l) are both an accessor to the cons that accesses the first element
rtt has joined #lisp
<aeth> Basically just a shortcut over symbol-macrolet
<rtt> pretty good, I thought I could write something like this if I wanted
<aeth> (let ((l (list 1 2 3))) (with-accessors ((first first)) l (setf first 42)) l)
<rtt> seems there's no need
<aeth> Maybe an implementation doesn't implement WITH-ACCESSORS via SYMBOL-MACROLET and doesn't have this trick work, but IMO that's a non-conforming implementation. CAR is an accessor, no matter how it's implemented. Accessors don't just have to be those things generated by DEFCLASS.
<aeth> The spec calls it an accessor, and if it's (accessor object) WITH-ACCESSORS is perfectly natural. http://www.lispworks.com/documentation/HyperSpec/Body/f_car_c.htm
<aeth> You only need SYMBOL-MACROLET (or a macro that uses it) for cases that aren't as simple as (accessor object)
<rtt> It would have been an exercise anyway, not that I'd have used this solution.
<rtt> Most of the time, I can get away without optimizing for space with destructive functions or methods
<rtt> I'll keep that in mind, shorthand creating like this pretty neat tool to make more readable code
slyrus_ has joined #lisp
hdasch has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
<harovali> this works (setf *a* '((nil . 2) (nil . 3)) ) (destructuring-bind (a b) *a* (setf (cdr a) 4) (setf (cdr b) 40))) , yields *a* = ((NIL . 4) (NIL . 40))
<White_Flame> right, because you're not altering the list *A* itself, but rather components nested within it
slyrus__ has quit [Ping timeout: 265 seconds]
<White_Flame> by "the list" itself, I mean the cons cells cdr-chained starting from *A*
<harovali> White_Flame: yes
<harovali> this works too:
<harovali> (setf *a* '((2 . nil) (3 . nil)) )
<harovali> (destructuring-bind (a b) *a* (setf (car a) 4) (setf (car b) 40))
<harovali> couldn't find a simpler way for the list
<White_Flame> well, you are still using (car a) and (car b) in this example instead of a variable for the locations of the 2 and 3
<White_Flame> so it's equivalent
<White_Flame> if you wanted (setf a-loc 4) and (setf b-loc 40) to work, it'd still have to be a symbol-macro or such
<harovali> White_Flame: yes
Kundry_Wag has quit [Remote host closed the connection]
turona has quit [Ping timeout: 252 seconds]
smazga has quit [Quit: leaving]
turona has joined #lisp
stepnem has quit [Ping timeout: 258 seconds]
stepnem has joined #lisp
rtra has quit [Quit: Lost terminal]
nckx has quit [Quit: Updating my GNU Guix System — https://guix.gnu.org]
oxum has joined #lisp
slyrus has joined #lisp
slyrus_ has quit [Ping timeout: 240 seconds]
oni-on-ion has quit [Ping timeout: 248 seconds]
hdasch has joined #lisp
nckx has joined #lisp
Kundry_Wag has joined #lisp
sjl has quit [Quit: WeeChat 2.3-dev]
Kundry_Wag has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
arduo has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 258 seconds]
antepod has joined #lisp
milanj has joined #lisp
_jrjsmrtn has joined #lisp
smokeink has quit [Quit: Leaving]
__jrjsmrtn__ has quit [Ping timeout: 268 seconds]
Codaraxis_ has joined #lisp
antepod has quit [Quit: WeeChat 2.3]
Codaraxis has quit [Ping timeout: 260 seconds]
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 26.3)]
rtt has quit [Remote host closed the connection]
stepnem has quit [Read error: Connection reset by peer]
stepnem has joined #lisp
lavaflow has quit [Ping timeout: 260 seconds]
MonoBobo has quit [Quit: -a- Connection Timed Out]
william1_ has joined #lisp
patlv has quit [Quit: Leaving]
lavaflow has joined #lisp
MonoBobo has joined #lisp
william1_ has quit [Ping timeout: 260 seconds]
g0d_shatter has joined #lisp
krid` has joined #lisp
krid has quit [Ping timeout: 268 seconds]
<pjb> harovali: stop using destructuring-bind! aeth gave you the solution: use with-accessors !
<pjb> harovali: note however that it may be more efficient to build a new list!
<pjb> (or to use a vector).
bitmapper has quit [Ping timeout: 260 seconds]
Necktwi has joined #lisp
<aeth> What you'd want for 'maximal' (still not great if you set a lot) efficiency is probably something that combines with-accessors with destructuring-bind. i.e. read into bindings so reading is O(1) after the initial binding, but set into accessors (and update the binding after the set) which still makes them O(n)
<aeth> But that's a lot of work, so you're probably just going to have to pick something with various tradeoffs
Kundry_Wag has joined #lisp
<aeth> At some point of setting that's not too high (but maybe too high for a typical program) it probably becomes more efficient to build a new list and just use REPLACE on the original at the end.
Kaisyu7 has joined #lisp
<aeth> i.e. (flet ((f (x) (+ 31 (* x 11)))) (let ((l (list 1 2 3))) (destructuring-bind (a b c) l (setf a (f a) b (f b) c (f c)) (replace l `(,a ,b ,c)))))
smokeink has joined #lisp
<aeth> (the destructuring-bind is where it starts so it's a lot simpler than it looks, it's just that I needed to give it a list and a function to work with)
Kundry_Wag has quit [Ping timeout: 268 seconds]
shifty has joined #lisp
<aeth> But in general if you're setting arbitrary things you usually want a vector instead imo. Unless you're building a data structure that e.g. needs O(1) insert, or if you're starting from an arbitrary point, etc.
Kundry_Wag has joined #lisp
<aeth> And technically speaking, a compiler should be able to optimize (replace known-to-be-a-list `(#| this is known to be a temporary, pure list |#)) but none probably do
<pjb> On thing for with-accessors, is that it costs nothing to name a lot of accessors, contrarily to destructuring-bind which must perform the destructuring to validate the list.
<aeth> pjb: yes, but unless there's caching (there probably isn't) each accessor is going to cost time on access, which is more of a thing if it's like a length 500 list and you're doing (last foo)
<aeth> So no matter what there are lots of little costs involved
<aeth> really, simple-vectors are so much easier to reason about if performance matters one slight bit
harovali has quit [Remote host closed the connection]
<Josh_2> hmm can someone help me write a macro that would expand to something like: https://plaster.tymoon.eu/view/1639#1639 where the funcs (remove-trai .. (conver .. op)) would be a λ
<Josh_2> I have made some attempts but not getting very far :(
vidak` has joined #lisp
dddddd has quit [Remote host closed the connection]
Domaldel has joined #lisp
Domaldel has quit [Client Quit]
<aeth> Josh_2: So you want the setter of the accessor with a different getter or with local bindings instead of a getter? Yeah, afaik, the inner LET will replace the outer WITH-ACCESSOR bindings and even the SETF won't work. And that appears to be the case. (let ((l (list 1 2 3))) (with-accessors ((c car)) l (let ((c 42)) (setf c 43) (values c l)))) => (values 43 (1 2 3))
<aeth> but apparently you can FLET a (setf f) not just a regular function
Lord_of_Life has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Lord_of_Life_ has joined #lisp
<aeth> Josh_2: so you can do something like this: (let ((l (list 1 2 3))) (flet ((f (x) (* (car x) 0)) ((setf f) (new-value x) (setf (car x) new-value))) (with-accessors ((c f)) l (setf c 43) (values c l))))
<aeth> => (values 0 (42 2 3))
Lord_of_Life_ is now known as Lord_of_Life
Kundry_Wag has joined #lisp
<aeth> i.e. you separated the accessors
<Josh_2> hmm, well I don't need the setter or the getter, I just want variables of the same name with the func called on all the variables in accessor
pi123 has joined #lisp
thijso has quit [Ping timeout: 268 seconds]
johnjay has quit [Read error: Connection reset by peer]
<aeth> right, which I just did (the function here being the rather useless (* ... 0) that will either return 0 or error)
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
<Josh_2> well I understand what you put
jonatack has quit [Ping timeout: 248 seconds]
ahungry has joined #lisp
Kundry_W_ has quit [Ping timeout: 268 seconds]
kark has joined #lisp
jonatack has joined #lisp
thijso has joined #lisp
vidak` has quit [Quit: ERC (IRC client for Emacs 26.2)]
<Josh_2> Well I still don't know how to write the macro
Kundry_Wag has joined #lisp
<Josh_2> spend 4 hours failing at writing a macro instead of just writing a normie function when required xD
<pjb> Josh_2: the problem might be that you don't know what you want. At least, I didn't understand what you wanted at all.
<pjb> Josh_2: Casting Spels in Lisp Conrad Barski, M.D. http://www.lisperati.com/casting.html
papachan has joined #lisp
papachan has quit [Remote host closed the connection]
<pjb> Also, macros are functions like any other function. If you can define the inputs and the result, you can write a function that does it. Hooking it in a macro is trivial.
<Josh_2> Well I know what I want, I obviously didn't express the idea properly
<pjb> (defmacro moo (args…) (moo* args…))
<aeth> Josh_2: for one (with more, consider using alexandria) you'd want something like this: (let ((g (gensym))) `(flet ((,g ...) ((setf ,g) ...)) (with-accessors ((,name ,g)) ,thing-being-accessed ,@body)))
ahungry has quit [Remote host closed the connection]
<aeth> and now you can control what's being set/read by the accessor in with-accessors by controlling the ...
<aeth> notice how with-accessors needs to be in the inner scope
<aeth> and actually, if you use with-accessors instead of symbol-macrolet you know more (the getter can only have one argument and the setter two) and can say something like (flet ((,g (object) ...) ((setf ,g) (new-value object) ...)) ...)
<aeth> (whether or not those need gensyms and ,s depends on your specific design of their function bodies)
ahungry has joined #lisp
<aeth> As a rule of thumb, if the user has access to a function body, you need gensyms, and otherwise you don't... so you need to gensym the function g because it's in the scope of ,@body -- which is user provided -- but you might not necessarily need gensyms within the flet bodies
<aeth> s/a function body/a body/
ahungry has quit [Remote host closed the connection]
xkapastel has joined #lisp
ahungry has joined #lisp
ebzzry has joined #lisp
dmiles has quit [Read error: No route to host]
vidak` has joined #lisp
william1_ has joined #lisp
logicmoo has joined #lisp
EvW1 has quit [Ping timeout: 260 seconds]
william1_ has quit [Ping timeout: 258 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
karlosz has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 265 seconds]
<Josh_2> yep, I don't know ¯\_(ツ)_/¯
holycow has joined #lisp
mason has joined #lisp
<beach> Good morning everyone!
<holycow> hello
<Josh_2> Morning beach
milanj has quit [Quit: This computer has gone to sleep]
karlosz has joined #lisp
ebzzry has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
karlosz has quit [Quit: karlosz]
akoana has left #lisp ["Leaving"]
<ahungry> mornin
Codaraxis_ has quit [Read error: Connection reset by peer]
Bike has quit [Quit: Lost terminal]
karlosz has joined #lisp
oni-on-ion has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Read error: Connection reset by peer]
krid` has quit [Ping timeout: 240 seconds]
gravicappa has joined #lisp
jfb4_ has joined #lisp
harovali has joined #lisp
jfb4 has quit [Ping timeout: 260 seconds]
jfb4 has joined #lisp
jfb4_ has quit [Ping timeout: 265 seconds]
oxum has joined #lisp
ahungry has quit [Remote host closed the connection]
jfb4_ has joined #lisp
jfb4 has quit [Ping timeout: 260 seconds]
oxum_ has joined #lisp
oxum_ has quit [Remote host closed the connection]
oxum has quit [Read error: Connection reset by peer]
oxum has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag_ has joined #lisp
smokeink has quit [Quit: Leaving]
<harovali> within the body of multiple-value-bind and the body of other system macros such as with-output-to-string , are the lexical variables of the enclosing scopes accesible ? Especially, if there is a do inside these macros, are the lexical variables of the enclosing scopes of the macros accesible inside the do?
Kundry_Wag has quit [Ping timeout: 268 seconds]
Kundry_Wag_ has quit [Ping timeout: 240 seconds]
<beach> Of course. Nesting applies as usual, so everything is accessible unless shadowed.
torbo has joined #lisp
Codaraxis_ has joined #lisp
rwcom0 has joined #lisp
rwcom has quit [Ping timeout: 268 seconds]
rwcom0 is now known as rwcom
william1_ has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
harovali` has joined #lisp
igemnace has joined #lisp
harovali has quit [Read error: Connection reset by peer]
william1_ has quit [Ping timeout: 258 seconds]
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 258 seconds]
Buggys has quit [Excess Flood]
torbo has quit [Remote host closed the connection]
narimiran has joined #lisp
Buggys has joined #lisp
oxum_ has joined #lisp
Josh_2 has quit [Ping timeout: 240 seconds]
oxum has quit [Ping timeout: 268 seconds]
oxum_ has quit [Remote host closed the connection]
oxum has joined #lisp
pi123 has quit [Ping timeout: 265 seconds]
pi123 has joined #lisp
vlatkoB has joined #lisp
sauvin has joined #lisp
quazimodo has quit [Ping timeout: 258 seconds]
sauvin has quit [Max SendQ exceeded]
quazimodo has joined #lisp
pi123 has left #lisp [#lisp]
pjb has quit [Ping timeout: 246 seconds]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
oxum_ has joined #lisp
oxum has quit [Ping timeout: 268 seconds]
longshi has joined #lisp
karlosz has quit [Quit: karlosz]
sauvin has joined #lisp
varjag has joined #lisp
varjag has quit [Client Quit]
adam4567 has joined #lisp
arduo has joined #lisp
7JTABJZ3T has joined #lisp
harovali` has quit [Remote host closed the connection]
Shinmera has joined #lisp
JohnMS_WORK has joined #lisp
Colleen has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
slyrus__ has joined #lisp
harovali has joined #lisp
<harovali> I've just upgraded to sbcl-2.0.0 from sbcl-1.5.9. I removed all old
<harovali> .fasl files from /usr and from my home directory. However when I
<harovali> try to run the stepper , when it hits a break statement, instead of
<harovali> showing the code which contains it , it shows an inner file of a
<harovali> library I'm using, irrelevant to the break.
<harovali> sorry for the flood
<harovali> I wonder what else I'm missing
quazimodo has quit [Ping timeout: 240 seconds]
slyrus_ has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
<harovali> be right back
harovali has quit [Remote host closed the connection]
harovali has joined #lisp
<harovali> I'm back , any help is welcome
Kundry_Wag has joined #lisp
<jackdaniel> harovali: that seems to be implementation-specific behavior, so you may try asking at #sbcl
<harovali> jackdaniel: thanks !
oxum_ has quit [Remote host closed the connection]
oxum has joined #lisp
scymtym has quit [Ping timeout: 268 seconds]
rwcom4 has joined #lisp
william1_ has joined #lisp
beach` has joined #lisp
rwcom has quit [Ping timeout: 258 seconds]
rwcom4 is now known as rwcom
Kundry_Wag_ has joined #lisp
<jackdaniel> sure
beach has quit [Ping timeout: 246 seconds]
william1_ has quit [Ping timeout: 240 seconds]
Kundry_Wag_ has quit [Ping timeout: 260 seconds]
holycow has quit [Quit: leaving]
milanj has joined #lisp
harovali has quit [Remote host closed the connection]
Duuqnd has joined #lisp
pjb has joined #lisp
beach` is now known as beach
adam4567 has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
varjag has joined #lisp
nowhere_man has quit [Ping timeout: 268 seconds]
grabarz has joined #lisp
shka_ has joined #lisp
scymtym has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
z147 has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
mingus has joined #lisp
g0d_shatter has quit [Quit: Leaving]
brown121408 has joined #lisp
7JTABJZ3T has quit [Ping timeout: 240 seconds]
william1_ has joined #lisp
longshi has quit [Ping timeout: 245 seconds]
isoraqathedh has joined #lisp
longshi has joined #lisp
hhdave has joined #lisp
amerlyq has joined #lisp
_fe_ has joined #lisp
dilated_dinosaur has quit [Ping timeout: 260 seconds]
datajerk has quit [Ping timeout: 268 seconds]
MonoBobo_ has joined #lisp
datajerk has joined #lisp
MonoBobo has quit [Ping timeout: 268 seconds]
davepdotorg has joined #lisp
dilated_dinosaur has joined #lisp
dddddd has joined #lisp
z147 has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
ggole has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
davd has joined #lisp
<davd> hello there! Does someone have some basic knowledge or experience with Mito (sql library)? And some time to help me?
z147 has joined #lisp
JohnMS_WORK has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
atgreen has joined #lisp
Lord_of_Life has quit [Read error: Connection reset by peer]
frgo has quit [Remote host closed the connection]
_fe_ has quit [Quit: Leaving]
Lord_of_Life has joined #lisp
longshi has quit [Ping timeout: 246 seconds]
longshi has joined #lisp
neuro_sys has joined #lisp
longshi has quit [Client Quit]
neuro_sys is now known as Guest12070
ljavorsk has joined #lisp
xkapastel has joined #lisp
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
Posterdati has quit [Read error: Connection reset by peer]
Posterdati has joined #lisp
m00natic has joined #lisp
gigetoo has quit [Ping timeout: 265 seconds]
jfb4 has joined #lisp
davepdotorg has quit [Read error: Connection reset by peer]
papachan has joined #lisp
davepdotorg has joined #lisp
jfb4_ has quit [Ping timeout: 240 seconds]
ghard has joined #lisp
cosimone has joined #lisp
gigetoo has joined #lisp
_fe_ has joined #lisp
<Xach> davd: no and yes respectively!
mingus` has joined #lisp
mingus has quit [Ping timeout: 268 seconds]
shka_ has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
shka_ has joined #lisp
oxum_ has joined #lisp
oxum_ has quit [Remote host closed the connection]
oxum_ has joined #lisp
oxum has quit [Read error: Connection reset by peer]
jonatack has quit [Ping timeout: 260 seconds]
oxum has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
william1_ has quit [Ping timeout: 268 seconds]
oxum_ has quit [Ping timeout: 260 seconds]
Kundry_Wag_ has joined #lisp
Kundry_Wag_ has quit [Remote host closed the connection]
Kundry_Wag_ has joined #lisp
<Xach> i wrote the file compile/run looper thing I talked about yesterday. it saved all my image output and all the code that produced that output. https://imgur.com/a/29QsMTI has a gallery of noodling around with an evolving vectometry program
Kundry_Wag_ has quit [Remote host closed the connection]
<Xach> it watches for a new file-write-date, copies the file to a timestamped path, compiles and loads, and if that succeeds, runs a function
<Xach> one problem is that compiling the new path leads to lots of redefinition warnings
<remexre> anyone have any advice for producing a statically linked executable w/ sbcl 2.0.0? I got :static-program-op working, but it still dynamically links to libc
Duuqnd has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 268 seconds]
<Xach> remexre: that's an interesting idea, i wish i could help. what will you use it for?
brown121408 has quit [Read error: Connection reset by peer]
<remexre> My development environment uses glibc, I'm deploying to an environment that uses musl libc
brown121407 has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
_fe_ has quit [Ping timeout: 248 seconds]
quazimodo has joined #lisp
Kundry_Wag_ has joined #lisp
milanj has joined #lisp
Kundry_Wag_ has quit [Remote host closed the connection]
cosimone has quit [Quit: Terminated!]
icer has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
jmercouris has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
mingus` has quit [Ping timeout: 265 seconds]
Guest12070 has quit [Ping timeout: 268 seconds]
davd has quit [Ping timeout: 240 seconds]
oxum_ has joined #lisp
mingus` has joined #lisp
Kundry_Wag has joined #lisp
oxum has quit [Ping timeout: 268 seconds]
oxum_ has quit [Remote host closed the connection]
oxum has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
icer has left #lisp ["ERC Version 5.3 (IRC client for Emacs)"]
MonoBobo_ has quit [Quit: -a- Connection Timed Out]
amerlyq has quit [Ping timeout: 258 seconds]
MonoBobo has joined #lisp
zmv has joined #lisp
bitmapper has joined #lisp
mingus` has quit [Ping timeout: 260 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
Kundry_Wag has joined #lisp
atgreen has quit [Ping timeout: 258 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
oxum_ has joined #lisp
oxum_ has quit [Remote host closed the connection]
oxum has quit [Ping timeout: 265 seconds]
cosimone has joined #lisp
random-nick has joined #lisp
jmercouris has quit [Ping timeout: 268 seconds]
<lieven> you could try http://statifier.sourceforge.net/
zmv has quit [Ping timeout: 240 seconds]
patlv has joined #lisp
jonatack has joined #lisp
zmv has joined #lisp
neuro_sys has joined #lisp
neuro_sys is now known as Guest55748
xuxuru has joined #lisp
Kundry_Wag has joined #lisp
<flip214> luis: thanks, looking
<flip214> --
<flip214> If I've got (DESTRUCTURING-BIND (a (b c)) (some-fn)), but the (c d) is optional, how would I specify that?
<flip214> (a &optional (b c)) would use c as default value for B... I guess I can't destructure optional data, right?
<flip214> Is there something more compact than (D-B (a b?) (some-fn) (if b? (d-b (b c) b? ...)))?
<Shinmera> &optional ((b c) '(NIL NIL))
Kundry_Wag has quit [Ping timeout: 268 seconds]
scymtym__ has joined #lisp
<flip214> thanks! and for (a (b (c d))) with the b and c parts being optional I would need (a &optional ((b &optional ((c d) '(NIL NIL))) '(NIL (NIL NIL)))) then? Ugh.
davepdotorg has quit [Read error: Connection reset by peer]
davepdotorg has joined #lisp
scymtym_ has quit [Ping timeout: 248 seconds]
<remexre> lieven: hm, I'll try it; not supporting aarch64 is a bummer though
xuxuru has quit [Quit: xuxuru]
<Shinmera> flip214: my advice is to 1) not structure your data that deep 2) not destructure it in one place
<flip214> Shinmera: the data comes from esrap ;)
<flip214> but perhaps there's my original problem.
rwcom2 has joined #lisp
<flip214> I need to parse "", "a", "a,", "a,a", "a,a," etc.
<flip214> so the separator "," might not be followed by another element
milanj has quit [Quit: This computer has gone to sleep]
<flip214> and I currently use (defrule args-or-empty (? (and element (? (and separator args-or-empty)))))
rwcom has quit [Ping timeout: 240 seconds]
rwcom2 is now known as rwcom
lucasb has joined #lisp
Kundry_Wag has joined #lisp
<lieven> remexre: you can just list all dynamic libraries it uses with ldd, copy them over and set LD_LIBRARY_PATH
<remexre> yeah, but doing that with libc feels wrong :/
bitmapper has quit []
jonatack has quit [Ping timeout: 268 seconds]
<remexre> it sounds like aslr might mess with statifier too, and I don't really wanna disable that
<Shinmera> lieven: if only it were that easy
jonatack has joined #lisp
<flip214> lieven: you'll need to use strace to see _dynamically_ linked libraries (like all the _nss), and then it depends on the configuration - another system might use ldap and require nss_ldap as well, etc.
MonoBobo has quit [Quit: -a- Connection Timed Out]
<remexre> tbh, might just use appimage and sacrifice ideological purity
<remexre> augh, nope, appimage needs glibc
<remexre> wtf
Arcaelyx has joined #lisp
zulu-inuoe_ has joined #lisp
<Shinmera> flip214: glibc version dependency is the biggest problem.
<Shinmera> and once you try to ship that you create your own hellscape
<Shinmera> see: Portacle
<remexre> ^^ I get bitten by this on a weekly basis
<flip214> Shinmera: yeah, getting a version that doesn't have security holes but still works with old kernels is a major headache
<remexre> I build software on my local glibc2.29 machine, copy to ubuntu's glibc2.26, end up needing to recompile
<lieven> flip214: I know but to a first approximation it works
zulu-inuoe has quit [Ping timeout: 265 seconds]
_fe_ has joined #lisp
MonoBobo has joined #lisp
krid has joined #lisp
_fe_ has quit [Client Quit]
Guest55748 has quit [Ping timeout: 268 seconds]
Bike has joined #lisp
ghard has quit [Read error: No route to host]
FreeBirdLjj has joined #lisp
bitmapper has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
LiamH has joined #lisp
neuro_sys has joined #lisp
amerlyq has joined #lisp
neuro_sys is now known as Guest11084
papachan has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
patlv has quit [Ping timeout: 258 seconds]
EvW has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Odin- has quit [Ping timeout: 260 seconds]
holycow has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Cymew has quit [Ping timeout: 268 seconds]
william1_ has joined #lisp
XenophonF has joined #lisp
MonoBobo has quit [Quit: -a- Connection Timed Out]
pfdietz has joined #lisp
flazh has quit [Ping timeout: 260 seconds]
cosimone has quit [Quit: Terminated!]
Lord_of_Life_ has joined #lisp
MonoBobo has joined #lisp
enrio has joined #lisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
papachan has joined #lisp
monokrom has joined #lisp
holycow has quit [Quit: Lost terminal]
milanj has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Kundry_W_ has quit [Remote host closed the connection]
jonatack has quit [Ping timeout: 265 seconds]
flazh has joined #lisp
brown121407 has quit [Ping timeout: 260 seconds]
pfdietz has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
MonoBobo has quit [Quit: -a- Connection Timed Out]
karayan has joined #lisp
MonoBobo has joined #lisp
Guest11084 has quit [Ping timeout: 258 seconds]
karlosz has joined #lisp
smazga has joined #lisp
MonoBobo_ has joined #lisp
MonoBobo has quit [Ping timeout: 268 seconds]
ljavorsk has quit [Ping timeout: 240 seconds]
Kundry_Wag_ has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
XenophonF has quit [Quit: leaving]
amerlyq has quit [Quit: amerlyq]
Kundry_Wag_ has quit [Ping timeout: 265 seconds]
papachan has quit [Quit: Leaving]
EvW has quit [Ping timeout: 248 seconds]
jfb4 has quit [Ping timeout: 240 seconds]
<jackdaniel> huh, The function QL-SETUP::QCMMERGE is undefined.
<jackdaniel> Xach: should I be concerned? :)
<jackdaniel> (i.e that my lisp doesn't start! ,)
FreeBirdLjj has quit [Remote host closed the connection]
jfb4 has joined #lisp
<Xach> heck yeah
<Xach> what produced that?
<jackdaniel> there is (push (qcmmerge "quicklisp/") asdf:*central-registry*) in setup.lisp near the end of the file
anewuser has joined #lisp
<Xach> jackdaniel: that must be a local edit
<jackdaniel> quite unlikely
karayan has quit [Read error: Connection reset by peer]
<jackdaniel> it could be some ancient setup.lisp, but rather not a local edit
<Xach> Ok.
<Xach> It is not the setup.lisp that is distributed as part of quicklisp
karayan has joined #lisp
jfb4_ has joined #lisp
jfb4 has quit [Ping timeout: 260 seconds]
<Xach> setup.lisp from quicklisp has sha256 sum 2a7fbb8dbda22bb932ad12898f2ad3ebf1e770a4d0992cf4a2debe5739e35801
<jackdaniel> hm
<jackdaniel> either way changing it to qmerge made it work. was there ever function qcmmerge in quicklisp? if not, then maybe it was some kind of accidental edit from a a few days back
<Xach> never was there such a function
<jackdaniel> uhm, then sorry for a false alarm
<Xach> it is no bother
<Xach> a little excitement is good for the soul
<Xach> but only a little
jfb4_ has quit [Ping timeout: 265 seconds]
jfb4 has joined #lisp
_fe_ has joined #lisp
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 268 seconds]
X-Scale` is now known as X-Scale
EvW1 has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
Kundry_Wag has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
frgo has joined #lisp
krid has quit [Ping timeout: 268 seconds]
klltkr has joined #lisp
davepdotorg has quit [Remote host closed the connection]
_fe_ has quit [Quit: Leaving]
pfdietz has joined #lisp
_fe_ has joined #lisp
jmercouris has joined #lisp
<jmercouris> how can I take a list (list 0 1 2 3 4) and loop having access to both 0 and 1 in the loop body, and then 2 and 3
fe_ has joined #lisp
<jmercouris> basically, I want to do a (loop for element in (list 0 1 2 3 4) ...) and have a access to the subsequent element
fe_ has quit [Client Quit]
<jmercouris> I thought of nth, that seems inefficient though
<jmercouris> not sure if for on will work in parenscript
<beach> (loop for (a b) on list ...)
<jmercouris> I should have mentioned that
<jmercouris> I will try it though
_fe_ has quit [Quit: Leaving]
_fe_ has joined #lisp
<jmercouris> beach: OK that works, how can I get it to skip every other element?
<jmercouris> (loop for (a b) on (list 0 1 2 3) do (print "lol")) -> "lol" x 4
<jmercouris> where I would really like a "lol" x 2
<jmercouris> not sure if I am making sense, I've been programming all day
<beach> (loop for (a b) on list by #'cddr ...)
Kundry_Wag has joined #lisp
Josh_2 has joined #lisp
<jmercouris> I don't think that will work in parenscript, but there must be an equivalent in js
<beach> Can't help you with that, sorry.
sjl has joined #lisp
<alandipert> jmercouris is it true to say you want to split the input list into a list of succeeding pairs?
<jmercouris> alandipert: yes, I believe that is correct
<beach> LOOP is just a macro, so expand the macro and use the expansion. I would think that would be automatic.
<alandipert> jmercouris in JS and FP worlds that operation is called 'chunk' or 'partition', various util libs have it or you could find a snippet that does it
<jmercouris> alandipert: OK, thank you
<jmercouris> beach: OK, I will think a little bit more about this, thank you
Kundry_Wag has quit [Ping timeout: 268 seconds]
<jmercouris> well, I ended up doing the naieve approach with step and elt... for now
<jmercouris> I'll think about it, I don't like it, but these are the limitations of parenscript...
<alandipert> jmercouris happy to help. out of curiousity, do you know why parenscript doesn't work for this?
<jmercouris> alandipert: I couldn't think of a javascript function that has the equivalent functionality of cddr
<jmercouris> maybe I could have chained some other functions in a lambda or something though
<Bike> er, but you're still working with lists?
gxt has quit [Ping timeout: 240 seconds]
<jmercouris> I'm working with javascript lists
<jmercouris> so I would need a javascript function to return subsequent elements
<jmercouris> I just don't know enough javascript :(
<Bike> doesn't seem like loop could possibly work at all, then
<jmercouris> well, what I did was this: (loop for i from 0 to (- (length substrings) 1) by 2
<Bike> or nth, or anything, since you're actually doing javascript...?
<jmercouris> and then I do (elt substrings i), (elt substrings (+ 1 i)
<jmercouris> well, parenscript compiles to javascript
<Bike> parenscript works with a language that looks like common lisp but isn't. you should mention that sorta thing before someone tries telling you about loop, you know?
whiteline has quit [Remote host closed the connection]
<Bike> the manual doesn't seem to describe the parenscript loop in detail...
whiteline has joined #lisp
<Bike> does seem to support for-on in some capacity
<Bike> except you'd use "by 2" instead of "by #'cddr", if i'm reading the source correctly
jonatack has joined #lisp
<Bike> so array.slice(2) as cddr.
hhdave has quit [Quit: hhdave]
krid has joined #lisp
neuro_sys has joined #lisp
neuro_sys is now known as Guest87024
brown121408 has joined #lisp
jmercouris has quit [Ping timeout: 258 seconds]
eddof13 has joined #lisp
Kundry_Wag has joined #lisp
_fe_ has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Ping timeout: 260 seconds]
rwcom8 has joined #lisp
slac-in-the-box has joined #lisp
rwcom has quit [Ping timeout: 260 seconds]
rwcom8 is now known as rwcom
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 258 seconds]
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 268 seconds]
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
karayan has quit [Ping timeout: 265 seconds]
karayan has joined #lisp
Kundry_Wag has joined #lisp
lavaflow has quit [Quit: WeeChat 2.6]
Kundry_Wag has quit [Ping timeout: 260 seconds]
m00natic has quit [Remote host closed the connection]
ggole has quit [Quit: Leaving]
enrio has quit [Quit: Leaving]
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 268 seconds]
lavaflow has joined #lisp
karayan has quit [Remote host closed the connection]
karayan has joined #lisp
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 260 seconds]
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 258 seconds]
william1_ has quit [Ping timeout: 260 seconds]
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 268 seconds]
milanj has quit [Quit: This computer has gone to sleep]
EvW1 has quit [Ping timeout: 245 seconds]
sauvin has quit [Read error: Connection reset by peer]
zmv has quit [Remote host closed the connection]
decent-username has joined #lisp
<decent-username> good evening. Does someone know a tool, which visualizes the structure of an asdf project?
<decent-username> That would be super useful. I was thinking about something that creates a png/svg which shows each lisp-file and all the functions, classes, method, macros and variables defined in that file.
<Xach> decent-username: i haven't heard of anything like that. it would be cool.
<decent-username> It shouldn't be too hard to implement. I just not experienced with graphics libraries.
eddof13 has quit [Quit: eddof13]
<sjl> You could output a dot file and render it with graphviz and not worry about rendering graphics at all
<decent-username> sjl: I'm not sure what you mean when you say "dot file".
jmercouris has joined #lisp
<jmercouris> Bike: could work
<dlowe> <3 graphviz
eddof13 has joined #lisp
<decent-username> dot files are awesome!!!
<decent-username> I love how intuitive the notation is.
<_death> yep.. and cl-dot is a nice library as well
<sjl> There's also http://foldr.org/~michaelw/projects/cl-dot/ if you don't want ot print it from scratch
<sjl> yeah
<jmercouris> parenscript manual says: (new (-Person age shoe-size)) -> new Person(age, shoeSize);
<jmercouris> However, in my REPL: (ps:ps (new (-Person age shoe-size))) -> "new(Person(age, shoeSize));"
<jmercouris> can anyone confir?
<jmercouris> s/confir/confir
<jmercouris> s/confir/confirm
<jackdaniel> confir confir :)
<jmercouris> jackdaniel: are you confirming?
<jackdaniel> in fact I do, but above message was meant as a joke
<jmercouris> damn, that is unfortunate :(
<jmercouris> well, how will I make a hash table then?
<jackdaniel> "new(Person(age, shoeSize));" ; ←
<jackdaniel> this is waht I get
<jmercouris> I need to do new Hash()
<jackdaniel> if you want to program in javascript why don't you do just that?
<jmercouris> Negative
<jmercouris> I don't want to program in javascript
<jmercouris> I am using parenscript for that purpose
<jackdaniel> s/want/need/
<jmercouris> aha, you have to do ps:new
<jmercouris> well, parenscript is a fine enough language :-)
<_death> javascript objects are a javascript man's hash tables?
<jmercouris> javascript hash tables are an object
<jmercouris> (ps:ps (defvar *nodes* (ps:new (-Hash)))) -> "if ('undefined' === typeof NODES) { var NODES = new Hash(); };"
<_death> what I mean is.. var NODES = {};
<jmercouris> I can't just type that in parenscript
<jmercouris> but yes, var NODES = {} is equivalent
<jmercouris> I belive {} is just syntactical sugar
<_death> I don't know that there is "Hash"?
jmercouris has quit [Read error: Connection timed out]
<Bike> glancing at the manual, maybe (create) for {}
<_death> maybe you mean new Object()
jmercouris has joined #lisp
<jmercouris> death: you are right. damn
<jmercouris> seems I will have to just make an object...
<jmercouris> I got confused looking at some javascript
<Bike> well, (ps:ps (ps:create)) => "{ . };", close enough
<Bike> no period. don't know where that came from.
<jmercouris> (ps:new (-Object))
<_death> you can also pass the initial contents to ps:create
<jmercouris> Indeed, to make the literal
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
rixard has quit []
harovali has joined #lisp
<jmercouris> (ps:ps (ps:@ foo fish)) -> "foo.fish;"
<jmercouris> (ps:ps (ps:@ foo 0)) -> "foo[0];"
<jmercouris> However, I would like foo[fish]
<jmercouris> any ideas?
<pjb> (aref foo fish)
<_death> parenscript manual has examples for it
<jmercouris> 1
<jmercouris> Yes
<dlowe> js foo[fish] is exactly foo.fish
<jmercouris> what if fish = 5
sjl has quit [Ping timeout: 268 seconds]
<jmercouris> is it still the same?
<_death> dlowe: you mean foo["fish"]
<jmercouris> foo[5] = foo.fish?
<jmercouris> I don't believe so
<dlowe> _death: yes, that's what I mean
gareppa has joined #lisp
varjag has joined #lisp
shifty has quit [Ping timeout: 265 seconds]
sjl has joined #lisp
milanj has joined #lisp
xuxuru has joined #lisp
hostile has quit [Ping timeout: 260 seconds]
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
jmercouris has quit [Ping timeout: 268 seconds]
Guest87024 has quit [Ping timeout: 258 seconds]
MonoBobo_ has quit [Quit: -a- Connection Timed Out]
eddof13 has quit [Quit: eddof13]
xuxuru has quit [Quit: xuxuru]
slyrus has joined #lisp
hostile has joined #lisp
MonoBobo has joined #lisp
slyrus_ has quit [Ping timeout: 240 seconds]
scymtym__ has quit [Ping timeout: 248 seconds]
rixard has joined #lisp
atgreen has joined #lisp
rixard has quit [Remote host closed the connection]
rixard has joined #lisp
anewuser has quit [Ping timeout: 260 seconds]
Codaraxis_ has quit [Quit: Leaving]
jmercouris has joined #lisp
ramenbytes has joined #lisp
ramenbytes has quit [Remote host closed the connection]
scymtym has joined #lisp
eddof13 has joined #lisp
mercourisj has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
gravicappa has quit [Ping timeout: 265 seconds]
mercourisj has quit [Ping timeout: 265 seconds]
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 258 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
narimiran has quit [Ping timeout: 260 seconds]
Bike has quit [Quit: Bike]
XenophonF has joined #lisp
shka_ has quit [Ping timeout: 265 seconds]
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
<XenophonF> anyone here using one of the ZeroMQ libraries that can share some working examples?
<XenophonF> I'm struggling with getting cl-zmq or lisp-zmq to work (both installed via Quicklisp on SBCL).
<galdor> cl-zmq was already 7 years ago when I wrote lisp-zmq
<galdor> I haven't used lisp-zmq or zmq in general for years
<galdor> zmq in general never really took off
<XenophonF> :/
<galdor> what's the problem (who knows)
<XenophonF> ok
<galdor> *was already dead
<XenophonF> for now I'm just trying to learn ZeroMQ by following the examples on the project's wiki
<XenophonF> but I can't get any of them to work
<XenophonF> sometimes the code references symbols that don't seem to exist, e.g., one of them has a call to (make-instance 'zmq:msg)
<XenophonF> or there's references to packages that don't exist, e.g., something called packer
<XenophonF> I guess I could do it in Python but thought CL might be fun instead.
<galdor> there's nothing about 'packer' in lisp-zmq, I'm not sure what's happening
<galdor> having the actual code and error messages would help ;)
<XenophonF> sure!
<XenophonF> just a sec let me switch over to lisp-zmq and show you what I've got :)
<_death> personally I've been using pzmq
<XenophonF> I'm running Ubuntu 18.04, SBCL 1.4.5, and lisp-zmq-20160208, for reference
<XenophonF> I'll check pzmq out, thanks :)
<_death> here's some old code using pzmq (see zmqimg-test.lisp): https://github.com/death/FFmpeg/commit/91149048ecc8168475889a1a72f97febc13bc88a
<XenophonF> I'm trying to connect to the Elite: Dangerous Data Network, https://github.com/EDSM-NET/EDDN/wiki#trading-tool-developers-data-consumers
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
gareppa has quit [Quit: Leaving]
<galdor> oh I did not know about this stream
<galdor> >1 year ago I tried to do something similar, but processing archives
MonoBobo_ has joined #lisp
<XenophonF> I can connect to it successfully.
Kundry_Wag has joined #lisp
<XenophonF> oh man - maybe I'm using the message object wrong
MonoBobo has quit [Ping timeout: 268 seconds]
<XenophonF> this is what I have so far
<XenophonF> according to the EDDN docs, I need to decompress that
<XenophonF> not sure how
<XenophonF> and then parse the JSON
<XenophonF> I'm looking at your code now, _death
<oni-on-ion> zip ..
Kundry_Wag has quit [Ping timeout: 265 seconds]
<_death> XenophonF: for simpler tasks pzmq:send/pzmq:recv-string may be sufficient (no need to deal with pzmq:with-message and friends)
sjl has quit [Ping timeout: 258 seconds]
sjl has joined #lisp
<galdor> you are printing a foreign pointer
<galdor> there is MSG-DATA, MSG-DATA-STRING, MSG-DATA-ARRAY
william1_ has joined #lisp
<XenophonF> oh
<XenophonF> it's a pointer
<XenophonF> omg
<XenophonF> i'm so dumb
william1_ has quit [Ping timeout: 268 seconds]
<galdor> don't worry it's a common issue when playing with FFI
<galdor> if I were to use zeromq nowadays I'd implement the wire protocol directly to avoid the FFI nastiness
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
efm has joined #lisp
arduo has quit [Ping timeout: 260 seconds]
MonoBobo has joined #lisp
<XenophonF> I'd love to hack something like that together, but I'm afraid that's a bit beyond me atm
MonoBobo_ has quit [Ping timeout: 260 seconds]
Kundry_Wag has joined #lisp
atgreen has quit [Ping timeout: 258 seconds]
<_death> interesting that people expose zmq streams like that..
akoana has joined #lisp
v0|d has joined #lisp
<galdor> why not ?
<galdor> nobody complains about open HTTP servers
papachan has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
<XenophonF> oh recv-string supports multiple-value-bind
<XenophonF> sweet
Kundry_Wag has joined #lisp
Bike has joined #lisp
<galdor> I have to go, feel free to ping/mail me if you have an issue
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kundry_Wag has quit [Ping timeout: 268 seconds]
<_death> galdor: those are usually designed for such use, or have a cdn front providing QoS mechanisms.. I think there were some projects adding some such features over zmq, but never seen such use in the wild
<XenophonF> thanks galdor
<XenophonF> and thank you too, _death
<XenophonF> ok, this is what I have so far
<XenophonF> and now I'm getting this exception:
<XenophonF> ; Evaluation aborted on #<BABEL-ENCODINGS:INVALID-UTF8-STARTER-BYTE {100367C0F3}>.
<XenophonF> so, progress?
stepnem_ has joined #lisp
<XenophonF> hm, probably means I can't use recv-string
stepnem has quit [Ping timeout: 260 seconds]
<XenophonF> oh wow thank you!
<XenophonF> really really appreciate that
<XenophonF> this is the route I was going down: https://gist.github.com/xenophonf/a6567dc285f0a1c203980ebc2f72a03b
<XenophonF> but zlib:uncompress blew up when I passed it that output
patlv has joined #lisp
holycow has joined #lisp
<_death> not sure why heap exhausted, but in that gist you pass UNCOMPRESS a list instead of the vector
<_death> ah, zlib has an evil declaim
xkapastel has joined #lisp
<_death> never used zlib.. maybe check out chipz
<_death> (well, never = never before this snippet I pasted :)
LiamH has quit [Quit: Leaving.]
<XenophonF> haha
<jasom> I really need to push my "recv-bytes" function upstream to pzmq. I think I've re-implemented it separately about 3 times now.
smazga has quit [Quit: leaving]
<_death> yes please :)
<jasom> here's one version: https://github.com/jasom/mymongrel2/blob/master/mymongrel2.lisp#L47 (note that it doesn't use with-foreign-pointer because that is permitted to stack-allocate (and it *does* stack-allocate on sbcl)
<jasom> If I use that one, I'd also have to have it return 2 values to make work like recv-string
<jasom> that particular program never uses multipart messages
<_death> not sure why stack allocation is a problem there, since you copy it to a lisp array
cosimone has quit [Remote host closed the connection]
patlv has quit [Ping timeout: 268 seconds]
cosimone has joined #lisp
<XenophonF> basically, your code but a different JSON implementation
<_death> also check out my use of cffi:foreign-array-to-lisp in the plaster paste, although it seems to be undocumented???
<jasom> _death: I got a 1MB message and segfaulted.
<_death> ouch :)
<jasom> sbcl happily returned a pointer on the stack when I requested 1MB. Not sure if that's a bug...
<XenophonF> thanks again for your help!
<XenophonF> now to figure out how to write this data to a PostgreSQL database
<_death> jasom: I guess there could be opportunity for a "smart" macro here
<XenophonF> and then how to import the multiple gigabytes of star data :)
<_death> XenophonF: postmodern is a cool library
<XenophonF> I will definitely check that out
<jasom> XenophonF: +1 for postmodern
<XenophonF> it's just a quickload away :)
lucasb has quit [Quit: Connection closed for inactivity]
<jasom> yup, I remember the bad-old-days where I would write my own library rather than trying to figure out how to install someone else's (or 3 someone's elses when I don't konw which one to use).
<XenophonF> oh man tell me about it
<XenophonF> the last time I touched lisp stuff was 20 years ago
<XenophonF> it's about a billion times better now
asdf_asdf_asdf has joined #lisp
<jasom> The worst was when the homepage said "use asdf-install to install" which meant it didn't have manual install instructions and therefore was not worth even bothering with
<XenophonF> slime is magical
<XenophonF> and quicklisp is the bomb
<_death> I would just git clone.. and that is what I do nowadays as well, with libraries that use git..
<aeth> I git clone some things, but then I symbolic link to them in ~/quicklisp/local-projects/ which apparently works fine except when CCL is the first to see the symbolic link... it doesn't matter, though, I develop in SBCL
<_death> jasom: the segfault issue is worrying, though.. and since there's no stack space the errors seem to nest..
<_death> aeth: I have a ~/quicklisp/third-party directory for stuff that's not mine
<_death> which is in *local-project-directories*
decent-username has quit [Ping timeout: 246 seconds]
slyrus__ has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]