phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.14, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<sindan> holycow don't be ridiculous with your redneck understanding of world politics
<holycow> fair enough, critique is welcome
<holycow> my politics include the middle, left and right
<sindan> why is this madcow ranting on #lisp? can't you take it somewhere else?
<holycow> i can stop :) sorry. back to work.
<Inline> did you get fired from #politics ?
<Inline> lol
<Inline> orr wha ?
<sindan> man
<Inline> hahahahaha
<p_l> Inline: lazy time at #lisp and we have a wide spectrum of ppl here
<holycow> these conversation pop up when everyone is chill and relaxed. sometimes i jump in too :)
ckonstanski has quit [Read error: Connection reset by peer]
ckonstanski has joined #lisp
<p_l> holycow: a bit of weird and rarely known history of EU that is recently being resurrected - original treaties included NATO-equivalent
makomo has quit [Ping timeout: 250 seconds]
<holycow> *nod*
<holycow> just for context, i no longer believe that there is a left wing and right wing political position.
<no-defun-allowed> oh dear are we going into horseshoe theory
<holycow> i am convinced that every political position is based on an observable set of variables that those individuals are refelcting. i am interested in learning from all of them.
<no-defun-allowed> oh ok
<no-defun-allowed> better than "people wanting worker liberation and nazis are the same!!!1!" i suppose
Kaisyu has joined #lisp
<holycow> aren't they?
<holycow> aren't they just humans?
<holycow> every human can slaughter another human just as they can feed the starving
<holycow> all of that potential is in every one of us
<Inline> ok now it compiles a bunch of stuff again, i hope it won't do that at each restart....
<Inline> meh
<no-defun-allowed> well, don't be dumb and don't go on genocides i suppose
<no-defun-allowed> difference is some people think there's a motivation or reason to go on genocides
<holycow> isn't there? are you sure?
<holycow> i am not convinced humans are anything but on a spectrum of psychology from brutal to beautiful
<no-defun-allowed> i am sure of that, yes
robotoad has joined #lisp
<holycow> humans just trying to survive can justify anything including genocides.
<p_l> holycow: well, you're not required to tolerate those unwilling to tolerate
<p_l> That's one thing
<holycow> well that is a form of genocide, isn't it?
<holycow> it is a soft form of it but it is genocide none the less
nitrix-mas has left #lisp ["WeeChat 1.6"]
<holycow> all you have managed to illustrate, quite subtly is that, war is not decided by you but by your enemies
<holycow> either you kill them or they kill you especially if they "are unwilling to tolerate"
<no-defun-allowed> does anyone have a "random clhs page" button?
Essadon has quit [Quit: Qutting]
ckonstanski has quit [Remote host closed the connection]
libertyprime has quit [Ping timeout: 244 seconds]
sjl has quit [Ping timeout: 244 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
holycow has quit [Quit: Lost terminal]
holycow has joined #lisp
ebrasca has quit [Remote host closed the connection]
ealfonso has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
holycow has quit [Quit: Lost terminal]
vms14 has joined #lisp
vms14 has quit [Client Quit]
emar has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
impulse has quit [Quit: Lost terminal]
sjl has joined #lisp
hectorhonn has joined #lisp
<hectorhonn> morning everyone
<no-defun-allowed> morning
<hectorhonn> i'm surprised by the flexibility of CL
<hectorhonn> it wasn't very pretty, but i wrote haskell's do notation in it
<hectorhonn> the worst part was (lambda (...) ...), those are too verbose
<hectorhonn> and when errors occur, slime doesn't point out the source location where the error occurred, so i had to resort to printf debugging
<hectorhonn> is there any way to get the source location of where a lambda was defined?
<Bike> if you check the slime docs i think there's a jump to source in there
<Bike> sldb rather
<Bike> sldb-eval-in-frame, bound to v
<hectorhonn> jump to source seems to work only for defuns
panji has joined #lisp
<panji> Hi
<panji> I try to create macro replacing accessor in structure-class with generic function but failed with error message Objects of type FUNCTION can't be dumped into fasl files.
<panji> When i run the macro in REPL, It's works. could somebody help me fix the problem or explain what's wrong with the macro? https://gist.github.com/epanji/15c2c0fb8ce46b11f01bb395ca83898b
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 26.1)]
<krwq> panji: it doesn't produce any errors for me (not sure if works as intended though)
<krwq> try removing ~/.cache/common-lisp and M-x slime-restart-inferior-lisp
<panji> let me try restarting first.
<Bike> krwq: did you try it in a file or just the repl?
<Bike> because i don't think that would work in a file.
<krwq> Bike: I tried both
<Bike> the expansion involves something like (funcall #<FUNCTION FOO-BAR> instance)
<Bike> which has a literal function in it, which can't be dumped into a fasl
<Bike> so i don't see how it would work if you compile-filed a use of the macro.
<krwq> Bike: I did slime-load-file
<Bike> that doesn't necessarily compile it.
<panji> krwq: still got same error message.
<Bike> try, like, (compile-file filename) to really check
<Bike> C-c C-k should work too though
<Bike> (and by work, i mean not work)
<krwq> C-c on the last sexp gives me same error as he described
<krwq> C-c C-c*
<Bike> right, there we go then.
<Bike> have i adequately explained the problem or no?
<Bike> i would recommend naming the structure accessor something else and not fmakunbounding anything
<Bike> (what i'd really recommend is just using a class)
keep_learning_M has joined #lisp
<panji> Bike: Yeah, i prefer using a class too. But i want to try some other approach.
<sjl> If I have a function FOO that takes a stream as an argument and writes to it, is there a clever way of wrapping it up to return a string if given NIL, like format?
robotoad has quit [Quit: robotoad]
<sjl> http://paste.stevelosh.com/037b81dd5e8c0c5003176ba311304407ecd2b498 is what I have now but it's a little fiddly... wondering if I missed something clever built-in
<panji> Bike: The problem is clear. Sorry I am slow at reading and typing. Thanks.
<Bike> no prob
<krwq> panji: you can change that code to do the checks at runtime instead of during macroexpansion - don't have any better ideas
quipa has joined #lisp
<krwq> panji: something like this perhaps: https://pastebin.com/dKAPTnGB
<panji> krwq: maybe that's would work. let me try that later. need to go. Thanks
<krwq> panji: that works for me
* panji open the link.
<krwq> panji: + perhaps check-type to make sure name and struct are symbols
ealfonso has quit [Ping timeout: 252 seconds]
<panji> krwq: yeah, sure.
findiggle has quit [Remote host closed the connection]
<krwq> sjl: looking at the format source code (sbcl) they don't seem to be doing anything more clever: https://github.com/sbcl/sbcl/blob/master/src/code/target-format.lisp#L102-L104
<sjl> hmm, yeah
robotoad has joined #lisp
panji has quit [Ping timeout: 246 seconds]
_crow has quit [Quit: WeeChat 2.3]
<loke> krwq: SBCL's FORMAT is doing clever stuff
<loke> You might want to look at the compiler macros and DEFTRANSFORM's they have
<krwq> loke: how do i find it?
<loke> there are a bunch of them, starting from that line
space_otter has joined #lisp
<loke> Actually, it starts here:
<krwq> loke: not sure if that helps with sjl's question - I'm not familiar with sbcl's transforms
<loke> Hmm... then I misunderstood what the question was about.
<loke> oooh
<loke> I didn't see the original question
<krwq> :)
<krwq> loke: btw how do you find compiler macros related to a function?
<loke> krwq: Just press M-. on the function
<loke> it will propose bother defuns, deftransforms and the rest.
<loke> Just make sure you have build SBCL from source, and not just downloaded the binary.
<krwq> loke: just noticed as well :) my eyes always filtered those kind of stuff out
impulse has joined #lisp
<loke> krwq: If you do, then you'll get veeeery confused when looking up the source for CAR for example :-)
<loke> It's literally define dlike this: (defun car (list) "Return the 1st object in a list." (car list))
<krwq> (defun car (list) "Return the 1st object in a list." (car list))
<loke> right
<krwq> indeed
nowhere_man has quit [Remote host closed the connection]
<loke> The actual implementation is here, of course: https://github.com/sbcl/sbcl/blob/master/src/compiler/srctran.lisp#L4461
nowhere_man has joined #lisp
buffergn0me has quit [Remote host closed the connection]
buffergn0me has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
<krwq> loke: still not sure what's going on there
panji has joined #lisp
Lord_of_Life has joined #lisp
<Bike> it rewrites calls to car sometimes.
<Bike> that's not really the entire implementation since that transform doesn't always fire.
<Bike> i think the "real" definition, such as it is, is lower level, but i don't have sbcl up to check
<Bike> a what's it called, known function? something.
rumbler31 has joined #lisp
wlemuel has joined #lisp
dddddd has quit [Remote host closed the connection]
quipa has quit [Read error: Connection reset by peer]
<jcowan> Some Scheme compilers translate all references to primitive procedures thus: `car` as an operand becomes `primitive#car` and as an operator it becomes `(lambda (x) (primitive#car x))`.
<Bike> yeah that's basically what sbcl is doing, but without the funny name, so it looks weird.
<Bike> sicl does a special name too.
<Bike> (well, cleavir)
<loke> Someone proposed that SBCL introduce a special function, let's call it FOO so that CAR would be implemented as such: (defun car (x) (foo (car x))). The runtime FOO would throw an error, and at compile time it would throw an error if the inner form is not transformed. That way the code would be more understandable, and incorrect transforms wouldn't leat to infnite loops.
<loke> They never did that though.
<loke> The question about the weird implementation of CAR etc in SBCL has generated so many questions. :-) I remember being quite confused myself first time I saw it,.
<jcowan> This of course leads to the question of what (eq #'car #'car) and (eql #'car #'car) should return.
<loke> jcowan: T of course.
<loke> jcowan: #'car returns the fucntion that is defined by (defun car (x) (car x))
<jcowan> And yet if it is rewritten as (eq (lambda (x) (car x)) (lambda (x) (car x))) you'd expect it to return false.
<loke> jcowan: It isn't.
<loke> well, not in SBCL
<loke> and not in Common Lisp itself.
<jcowan> clhs eq
<loke> (because I believe that it woul;d not be legal to have it return nil)
<jcowan> The CLHS isn't specific.
<jcowan> In R5RS Scheme, it's required to return true; in R6RS it's undefined (allowing this transformation freely); in R7RS eq is undefined but eql is required to return true.
<jcowan> s/it's/they're/g
esrse has joined #lisp
wlemuel has quit [Quit: Textual IRC Client]
<jcowan> there aren't even any examples of equality of functions
<Bike> i actually ran into that eq problem when doing compiler stuff. unfortunate
<loke> jcowan: Yes, i checked the spec for FUNCTION as well, and it's not clear on that point.
<Bike> i think there's a small social expectation that it would be T though.
Lycurgus has quit [Quit: Exeunt]
<loke> I've be very confused if it didn't.
<jcowan> The R6RS interpretation has been described as "ML envy"
<jcowan> because ML has no notion of identity of functions
<jcowan> of course it doesn't have mutable local variables either, so functions are not objects as they are in the Lisps
panji has left #lisp [#lisp]
<aeth> Hmm... If CL removed mutable local variables, not much would change besides implementation detail semantics of the iteration constructs afaik. CL has tons of mutable stuff but we're normally mutating *objects*. So e.g. using a setter (even for things like SETF AREF).
<aeth> I think most local variable setting (outside of the internals of iteration macros) is working around MULTIPLE-VALUE-BIND being so awkward syntactically. Much easier to SETF VALUES a lot of the time.
<aeth> (And in LOOP afaik you either have to SETF VALUES or allocate a temporary list)
<jcowan> In the end, handling multiple values always involves state under the covers.
<jcowan> Still, poor man's objects work just as well in CL as in Scheme: a function that returns a closure over mutable variables.
<aeth> Ah, yeah, that's true, closures are probably the other case where setting variables happens.
<aeth> Although I guess even that is normally encapsulated in pseudo-accessors.
<jcowan> There's a nice example in CLtL, but I can't find it offhand
buffergn0me has quit [Remote host closed the connection]
<Bike> immutable local variables would make closures much easier.
<jcowan> Trivial, in fact
<jcowan> A common compilation technique in Scheme is to transform all mutable variables to immutable variables holding mutable boxes, called "assignment conversion"
<jcowan> Ah, here it is, https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node78.html s.v. `function`, the examples
<jcowan> And alas, CLtL doesn't say anything about eq/eql-ity of functions either
<jcowan> R7RS Scheme definition of eqv? (eql) https://www.irccloud.com/pastebin/cnvKmkNi/scheme-eqv-function
<jcowan> long and detailed, but precise; eq is defined in terms of it by saying that numbers and characters produce an undefined boolean.
<jcowan> and sometimes procedures too
_whitelogger has joined #lisp
SaganMan has joined #lisp
<beach> Good morning everyone!
<esrse> good afternoon
rumbler31 has quit [Remote host closed the connection]
joga has quit [Ping timeout: 252 seconds]
dale has quit [Quit: dale]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 250 seconds]
<beach> esrse: You are relatively new here, right?
sauvin has joined #lisp
<fiddlerwoaroof> good evening esrse
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
nowhereman is now known as Guest44017
jcowan has left #lisp [#lisp]
rozenglass has joined #lisp
krwq has quit [Remote host closed the connection]
rippa has joined #lisp
Lycurgus has joined #lisp
ggole has joined #lisp
<esrse> beach: yes i am newbie..
<beach> I understand.
<beach> Feel free to ask questions. If they are really basic, #clschool might be preferable.
<esrse> thanks
phenoble has quit [Quit: ZNC 1.7.0 - https://znc.in]
phenoble has joined #lisp
<esrse> fiddlerwoaroof: good morning again
SaganMan has quit [Quit: WeeChat 1.6]
vlatkoB has joined #lisp
bjorkintosh has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
scottj has left #lisp [#lisp]
conjo has joined #lisp
conjo has left #lisp [#lisp]
_whitelogger has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
pierpal has quit [Ping timeout: 245 seconds]
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
<LdBeth> Is there any conventional way of representing closure in Lisp?
<Bike> "representing" in what sense?
robotoad has quit [Quit: robotoad]
<LdBeth> like how a compiler/interpreter handles them, in a form of objects of a high level programming language
<no-defun-allowed> the least impressive representation in an interpreter is a tuple with a lambda list, code and the environment the closure was made in
<no-defun-allowed> when it's time to apply/funcall, make a new environment frame with the lambda list matched on top of the creation environment
<LdBeth> hmm, is that simliar to what a lisp do when the codes are compiled?
<beach> It has to be something like that.
<beach> LdBeth: In SICL, a function consists of an entry point (into the code) and an environment. A call is made by putting the arguments in registers or on the stack as appropriate. The environment is passed as an additional argument in a dedicated register.
<no-defun-allowed> usually the environment frames will be turned into a faster model, and variables may be folded if the debug quality is low enough
<LdBeth> good to hear that, I'm wondering what if the environment is made avaliable to the body of a closure, i.e as an extra argument
<beach> no-defun-allowed: I used to have environment frames in layers, but it turns out that this technique unnecessarily keeps dead object alive.
<no-defun-allowed> yeah, usually you want to get a better idea of variable liveness too
<beach> no-defun-allowed: So now it is just a flat environment, but the entries in the environment for closed-over variables are "cells" holding the values.
krwq has joined #lisp
<beach> LdBeth: I don't see any other reasonable way of doing it.
<LdBeth> So what if I want to "export" local function/variable from a "closure" for access from elsewhere? It seems really similar to message passing, I think.
<beach> LdBeth: Can you give a code snippet that illustrates such "export"?
<beach> If you can, I'll tell you how it can be done.
<beach> Like (let ((x ...)) (lambda (y) (+ x y)))?
<hectorhonn> how about making a clos object and putting the lambda as a slot? then you can use things like defgeneric and defmethod ala haskell typeclasses. a bit verbose though
space_otter has quit [Remote host closed the connection]
thodg has joined #lisp
<LdBeth> it's pseudo code
<beach> Oh, so not valid Common Lisp?
<beach> Then I can't tell you how it might be done.
<Bike> of course you could define fn1 to accept an argument or message that results in fn-1-1 being returned, or something
<LdBeth> I think Flavors support local variable/function
<beach> LdBeth: You are doing something much more than local variables and functions.
<aeth> Bike: yeah, that's the way to do it.
<aeth> Alternatively, return them all as multiple values or in a data structure or something, and then filter the resulting values or object or something. (With a macro, obviously.)
<aeth> (but then it would be hard to draw the line between these special multiple values and the function's intended multiple values)
esrse has quit [Quit: Leaving]
<aeth> Actually...
<aeth> One thing you could do is define the second defun within the first, which is normally not something that you want to do. You would just need to make sure that the defun part runs only once. It wouldn't allow multiple inheritance, though.
<aeth> s/the defun part/the inner defun part/
<aeth> (But maybe you do want it to be redefined every time just in case the bindings have side effects?)
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 250 seconds]
Bike has quit [Ping timeout: 256 seconds]
<LdBeth> aeth: > One thing you could do... | That's the situation I frequently met not in lisp but in functional programming languages, many common things would be nice to be shared as local functions, but nested functions look really bad, and don't have the benefit having distributed definitions.
<LdBeth> Since macro can solve most duplications
<aeth> LdBeth: No, a DEFUN in a DEFUN is not a local function, if that's what you mean.
<aeth> Counterintuitively, a DEFUN is always global.
<aeth> So if you put the defun of your second function in the body of the first (via a macro to hide it), you could inherit the outer scope of the first function, while still defining a global function.
azrazalea has quit [Ping timeout: 272 seconds]
xrash has joined #lisp
Lycurgus has quit [Quit: Exeunt]
<aeth> There are a lot of edge cases you would need to think about if you wrote a macro like that, though.
makomo has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
makomo has quit [Ping timeout: 272 seconds]
yvy has joined #lisp
rumbler31 has joined #lisp
pierpal has quit [Ping timeout: 250 seconds]
kajo has quit [Ping timeout: 260 seconds]
kajo has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
yvy has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
hhdave has joined #lisp
beach has quit [Ping timeout: 252 seconds]
beach has joined #lisp
vlatkoB has quit [Remote host closed the connection]
hhdave_ has joined #lisp
vlatkoB has joined #lisp
hhdave has quit [Ping timeout: 250 seconds]
hhdave_ is now known as hhdave
vlatkoB has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 250 seconds]
voidlily_ has quit [Ping timeout: 250 seconds]
vhost- has quit [Ping timeout: 268 seconds]
krwq has quit [Remote host closed the connection]
pierpal has joined #lisp
MichaelRaskin has quit [Quit: MichaelRaskin]
pierpal has quit [Ping timeout: 268 seconds]
thodg has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
strelox has joined #lisp
<seok> join #next-browser
strelox has quit [Client Quit]
strelox has joined #lisp
lisperinmove has joined #lisp
<jackdaniel> is it an order or did you forget "/"? ;-)
vhost- has joined #lisp
strelox has quit [Ping timeout: 252 seconds]
xrash has quit [Ping timeout: 272 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
robdog has joined #lisp
pierpal has quit [Ping timeout: 268 seconds]
hectorhonn has quit [Quit: Page closed]
lisperinmove has quit [Remote host closed the connection]
esrse has joined #lisp
lisperinmove has joined #lisp
lisperinmove is now known as inmove
isBEKaml has joined #lisp
inmove has quit [Quit: ERC (IRC client for Emacs 26.1)]
thodg has joined #lisp
iovec has joined #lisp
rozenglass has quit [Remote host closed the connection]
jdz has quit [Quit: ZNC - http://znc.in]
isBEKaml has quit [Quit: WeeChat 2.3]
lisperinmove has joined #lisp
Selwyn has joined #lisp
thodg has quit [Ping timeout: 272 seconds]
<Inline> good morning
Zaab1t has joined #lisp
lisperinmove has quit [Remote host closed the connection]
orivej has joined #lisp
pierpal has joined #lisp
<phoe> morning
<no-defun-allowed> Morning.
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
varjag has joined #lisp
heisig has joined #lisp
<seok> well, I've given up on trying to get next browser running on my ubuntu
<seok> guess I have to stick to selenium
rozenglass has joined #lisp
voidlily has joined #lisp
rozenglass has quit [Ping timeout: 272 seconds]
<ogamita> seok: it's only temporarily. Eventually it'll work.
esrse has quit [Ping timeout: 245 seconds]
<seok> What do you mean?
<ogamita> You've given up, assumedly because of difficulties. Those difficulties will disappear eventually.
<seok> yup
<seok> Ive been trying for 12 hours straight, can't figure out how to set the ports correctly
<dim> 12h straight? mmm, you need more breaks than that, and long enough to be meaningfull, and not in front of a screen: did you try going for a walk?
Inline has quit [Quit: Leaving]
<seok> O
<seok> O ya,
<seok> been trying to get this working for few days
<seok> just woke up after getting some sleep
<dim> makes more sense then ;-)
makomo has joined #lisp
strelox has joined #lisp
bzp has joined #lisp
voidlily has quit [Ping timeout: 250 seconds]
strelox has quit [Ping timeout: 268 seconds]
frobos has joined #lisp
_whitelogger has joined #lisp
atgreen has quit [Ping timeout: 244 seconds]
<shka__> how closures are allocated usually?
<jackdaniel> struct { lexenv; function; }
<shka__> ok
<shka__> so the function is compiled just once (for instance) and then each closure has it's distinct lexenv
<shka__> is that correct?
heisig has quit [Quit: Leaving]
<ogamita> yes.
<shka__> ok, that's great, thanks
<jackdaniel> usually when you carete a closure you define a new function as well, so in average case it is not correct (i.e (let ((foo 3)) (defun …)) or (let ((foo 3)) (lambda …)) )
<jackdaniel> but when you create a closure factory, i.e: (defun bar () (let ((foo 3)) (lambda …)))
<jackdaniel> then function may be compiled only once indeed
<jackdaniel> (inner one)
Inline has joined #lisp
<jackdaniel> I don't remember provisions in the spec which makes that mandatory though
<ggole> There are a bunch of ways to implement first class functions
<ggole> And various optimisations, of course
robdog has quit [Remote host closed the connection]
<ogamita> (mapcar (function funcall) (loop for i below 5 collect (let ((i i)) (lambda () i)))) #| --> (0 1 2 3 4) |#
<ogamita> Sometimes you create several closures from the same function.
<ogamita> Actually, if you don't the compiler could optimize out the function by inlining it, so no closure would exist.
<ogamita> (mapcar (let ((i 0)) (lambda (x) (+ x (incf i)))) '(1 2 3)) could be compiled into '(2 4 6).
<ogamita> or a dolist…
<shka__> i don't think it is possible
<shka__> mapcar is supposed to return new list
<shka__> so '(2 4 6) is nope
<shka__> but (list 2 4 6) maybe could be ok
<ogamita> You're right. It should generate (list 2 4 6) :-)
<ogamita> (incf shka__)
<shka__> don't incf, i don't want to be promoted to bignum...
<ogamita> (float shka__ 0.0d0) promoted to a double.
m0w has joined #lisp
makomo has quit [Ping timeout: 250 seconds]
ebrasca has joined #lisp
SaganMan has joined #lisp
heisig has joined #lisp
wxie has joined #lisp
rozenglass has joined #lisp
LiamH has joined #lisp
nirved is now known as Guest36801
Guest36801 has quit [Killed (adams.freenode.net (Nickname regained by services))]
nirved has joined #lisp
Guest44017 has quit [Ping timeout: 252 seconds]
bjorkintosh has quit [Remote host closed the connection]
dddddd has joined #lisp
amerlyq has joined #lisp
wxie has quit [Ping timeout: 250 seconds]
didi has joined #lisp
atgreen_ has quit [Remote host closed the connection]
atgreen_ has joined #lisp
Zaabtop has joined #lisp
Zaab1t has quit [Ping timeout: 240 seconds]
Zaabtop is now known as Zaab1t
<didi> How do I #define something using CFFI? A library that I'm using wants to read a #define to determine the API version it will abide by.
<shka__> didi: this works on the build time
<shka__> so probabbly not exactly releated to cffi if i understand this correctly
Lycurgus has joined #lisp
Zaabtop has joined #lisp
seok_ has joined #lisp
<didi> shka__: Well, the library is already compiled, but my C program uses #define and then my compiler links against the compiled library.
<seok_> (print x) -> (("ADDRESS" . "161 Maitland Rd, Mayfield NSW 2304") ("EMAIL" . "mayfield@mrm.com.au") ("URL" . "http://www.mrmlawyers.com.au") ("NAME" . "MRM Lawyers"))
Zaab1t has quit [Ping timeout: 240 seconds]
Zaabtop is now known as Zaab1t
<seok_> (assoc "URL" x) -> NIL
<seok_> what is the problem here?
<didi> seok_: :test
<shka__> seok_: test
seok has quit [Ping timeout: 256 seconds]
<seok_> hi
<didi> (assoc "URL" x :test #'string=)
<seok_> o
<didi> ;-)
<shka__> didi: so you are redefining and then linking?
<seok_> Why do I need it for strings?
<seok_> I don't need that for symbols or keys right?
<shka__> i think that your redefinition has absolutely no effect
<shka__> seok_: because assoc by default uses eql
<didi> shka__: Library's .h has something like #ifndef MACRO #define #MACRO #endif
<seok_> right
<seok_> makes sense
<shka__> didi: i am not expert on cffi, but from what i understand it allows you to call c code and use c types, what you are trying to do is to define C code
<shka__> so i think that you are using wrong tool
<didi> shka__: I see. Thank you.
Zaab1t has quit [Ping timeout: 244 seconds]
sjl_ has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
voidlily has joined #lisp
sjl has quit [Ping timeout: 268 seconds]
rozenglass has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #lisp
hhdave has quit [Ping timeout: 250 seconds]
thodg has joined #lisp
<ogamita> didi: you can use my cpp preprocessor to get the #define, and then use the value in lisp.
<didi> ogamita: Thanks. Where can I find it?
anamorphic has joined #lisp
<didi> ogamita: Thank you.
rozenglass has joined #lisp
<ogamita> didi: alternatively, write a little C program to print out the values you need, compile run and read.
<didi> *sigh* I'm very grateful for CFFI, but anything related to FFIs is a chore.
rumbler31 has joined #lisp
Zaab1t has joined #lisp
dale has joined #lisp
<flip214> didi: I had success with the "swig" tool in the past
<shka__> didi: unfortunatly, the mere fact that you need to get this #define out of compiled lib makes this lib poorly designed as far as making bindings goes!
rumbler31 has quit [Ping timeout: 250 seconds]
<flip214> didi: simplest case is like # swig -Dlibrary_version_define=5 -cffi -o output-file input-file
<didi> flip214: I entertain the possibility every time I have to use a foreign library. I should just try it for once.
warweasle has joined #lisp
<flip214> didi: another idea (if the header file is too complicated) to avoid manual writing of the FFI data is to use radare2 to decompile, and use the decompiled files to build an FFI wrapper...
* didi shakes fists
Selwyn has quit [Ping timeout: 272 seconds]
<flip214> sorry
<flip214> but I've seen libraries where this would have been the easiest choice by far
<flip214> doesn't look that bad..
<didi> Chore, chore, chore...
<flip214> "r2dec" in radare2 works okay -- at least the function definition line is nice
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Now with extra fish!]
<flip214> and should be parsable by swig...
<ogamita> didi: when using cpp-e, the problem is to find the :include-bracket-directories list for the host system. gcc uses strange directories…
orivej has quit [Ping timeout: 268 seconds]
<ogamita> For example, on ubuntu-18.04 you may try: (com.informatimago.languages.cpp:cpp-e "/usr/include/limits.h" :include-bracket-directories '("/usr/include/" "/usr/include/x86_64-linux-gnu/" "/usr/include/x86_64-linux-gnu/") :write-sharp-line t)
<ogamita> You may also want add some defines, such eg. __x86_64__
<ogamita> (com.informatimago.languages.cpp:cpp-e "/usr/include/limits.h" :defines '("__x86_64__" "1") :include-bracket-directories '("/usr/include/" "/usr/include/x86_64-linux-gnu/" "/usr/include/x86_64-linux-gnu/") :write-sharp-line t)
Lord_of_Life_ has joined #lisp
<ogamita> It would need a nice wrapper…
<didi> ogamita: Thanks.
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life
omilu has joined #lisp
azrazalea has joined #lisp
rumbler31 has joined #lisp
voidlily has quit [Ping timeout: 250 seconds]
gxt has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Ping timeout: 245 seconds]
acolarh has quit [Ping timeout: 240 seconds]
azrazalea has quit [Ping timeout: 245 seconds]
strelox has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
strelox has quit [Quit: Mutter: www.mutterirc.com]
FreeBirdLjj has joined #lisp
strelox has joined #lisp
acolarh has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
charh has joined #lisp
strelox has quit [Quit: Mutter: www.mutterirc.com]
orivej has joined #lisp
bzp has quit [Remote host closed the connection]
<jackdaniel> Xach: is there a supported way in quicklisp to query project url in REPL? I mean the information as found in quicklisp-projects (i.e https://github.com/quicklisp/quicklisp-projects/blob/master/projects/flexichain/source.txt)
quipa has joined #lisp
<dim> jackdaniel: I had to write some facilities at https://github.com/dimitri/ql-to-deb/blob/master/src/ql.lisp for automated debian packaging of QL libs
<dim> you might find usable bits of code there
<jackdaniel> also a semi-related note: does flexichain have a maintainer? I want to add weak pointer support for ecl to it (I see complaints when loading mcclim in a form of a warning)
<jackdaniel> beach: maybe you have some knowledge about its current state given you were among authors? ↑
<jackdaniel> dim: thank you
robotoad has joined #lisp
gxt has joined #lisp
FreeBirdLjj has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
<beach> jackdaniel: I don't think anyone other than me ever maintained it. In fact, it probably never changed.
FreeBirdLjj has quit [Ping timeout: 240 seconds]
varjag has quit [Ping timeout: 250 seconds]
<beach> Please add that.
<jackdaniel> uhm, that would explain lack of a repository whatsoever, thank you.
<beach> Oh, no repository even?
<beach> That could be fixed.
<jackdaniel> only a tar (at least ql takes it from flexichain-latest archive)
<beach> I see. There is this, though: https://github.com/robert-strandh/Flexichain
<beach> Someone should compare it to the tar I guess.
<jackdaniel> thank you for the link, I'll craft a PR this evening (most likely)
<beach> Great!
FreeBirdLjj has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<jackdaniel> is it OK if I plug a trivial-garbage as a dependency? it has a portability layer for weak values
<jackdaniel> argument against that would be that library doesn't have *any* dependencies right now
<beach> I would have to think about that.
<beach> I guess so, since the basic functionality does not use the library, right?
<jackdaniel> flexichain has no external dependencies
<jackdaniel> that is a good argument against adding any dependencies
<jackdaniel> I'll just add ecl support
wigust has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
wigust- has quit [Ping timeout: 268 seconds]
<jackdaniel> if you want to update flexichain as found in QL, good way of doing that would be updating flexichain_latest.tgz in here: https://www.common-lisp.net/project/flexichain/download/
<beach> Thanks.
<beach> I need to put it off until tomorrow. I had a long and tiring day and I am sure I would make mistakes if I did that today.
<jackdaniel> I don't think it is time-critical (at least it is not for me)
<beach> Good.
ggole has quit [Ping timeout: 250 seconds]
Bike has joined #lisp
marvin3 has quit [Ping timeout: 240 seconds]
omilu has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
<fiddlerwoaroof> beach: how does the flexichain-doc system work? is it just a collection of source TeX files, or is there some magic to make the docs accessible from lisp?
<Inline> ok, got mezzano working on my lappy via qemu-kvm
<Inline> hmmm
<Inline> could not type much in it
<Inline> it's a different keyboard it seems
makomo has joined #lisp
sjl_ has quit [Ping timeout: 244 seconds]
strelox has joined #lisp
strelox has quit [Client Quit]
<warweasle> Quiet day.
heisig has quit [Quit: Leaving]
strelox has joined #lisp
makomo has quit [Ping timeout: 250 seconds]
<jackdaniel> \o
<warweasle> jackdaniel: o/
strelox has quit [Client Quit]
bars0 has joined #lisp
<fiddlerwoaroof> \o/
acolarh has quit [Ping timeout: 250 seconds]
voidlily has joined #lisp
bars0 has quit [Quit: leaving]
<Inline> it still takes too long even with kvm
FreeBirdLjj has joined #lisp
amerlyq has quit [Quit: amerlyq]
Bike has quit [Ping timeout: 256 seconds]
Bike has joined #lisp
anamorphic has quit [Ping timeout: 268 seconds]
anamorphic has joined #lisp
<jackdaniel> I'm polishing non-SMP system support in McCLIM, it works pretty well already. A few final touches in schedule-event extension and I'll be satisfied with this improvements micro-pass
sauvin has quit [Remote host closed the connection]
<Inline> duh, what was SMP again
<jackdaniel> symmetric multiprocessing, commonly referred as native threads
<Inline> ah right, dict showed me that too
<Inline> native threads are OS level right ?
<Inline> kernel land
<Inline> as opposed to userland
orivej has quit [Ping timeout: 245 seconds]
<Inline> so non-native threads means what ?
<jackdaniel> yes, green threads. I've used a non-SMP - current implementation will work on implementations which doesn't have thread support at all
<Inline> ah, so you simulate threading ?
<jackdaniel> non-native threads are green threads (userland threads)
<jackdaniel> note that green threads doesn't necessarily mean cooperative threads, you may be able to interrupt a green thread and in that case you wouldn't need any cooperation
<jackdaniel> no, I've fixed regressed implementation which doesn't require threading at all
<Inline> hmmm
<Inline> so is it then faster or what ?
<jackdaniel> when is it faster?
<Inline> without threading ?
<jackdaniel> threading support is not granted (i.e you may build sbcl without thread support)
<Inline> aah
<Inline> so you want it to be functional even on those cases ok
<jackdaniel> so when the PR is merged, you'll be able to run you favourite McCLIM application on such build
<Inline> that's good
<Inline> threading as optional is good
rozenglass has quit [Read error: Connection reset by peer]
Lycurgus has quit [Quit: Exeunt]
orivej has joined #lisp
<beach> fiddlerwoaroof: It's just a LaTeX document. No magic.
SaganMan has quit [Quit: WeeChat 1.6]
tmokros has joined #lisp
marvin2 has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
rumbler31 has joined #lisp
Bike has quit [Ping timeout: 256 seconds]
iovec has quit [Quit: Connection closed for inactivity]
buffergn0me has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
sjl_ has joined #lisp
anamorphic has quit [Ping timeout: 246 seconds]
m0w has quit [Read error: Connection reset by peer]
angavrilov is now known as angavrilov_
sjl has joined #lisp
orivej has joined #lisp
<jasom> jackdaniel: SMP usually implies multipe processors, not multiple processes (or threads).
tmokros has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jasom> e.g. I ran windows 95 on a 133MHz Pentium, and it ran multiple threads, but was not an SMP system.
rumbler31 has quit [Remote host closed the connection]
<jackdaniel> jasom: it is called symmetric multiprocessing, I'm not sure which part I got wrong according to you?
<jasom> jackdaniel: multithreading and SMP are completely orthogonal.
<jackdaniel> maybe that I've suggested equality between smp and native threads - if you mean this part then sure, operating system may provide threads which do not depend on multiple processors present on the system
<jasom> jackdaniel: that is what i was referring to.
holycow has joined #lisp
<jackdaniel> I'll try to get it straight next time. thanks.
anamorphic has joined #lisp
Inline is now known as oleo
holycow has quit [Quit: Lost terminal]
oleo is now known as Inline
_whitelogger has joined #lisp
<ebrasca> What is make-load-form-saving-slots ?
bzp has joined #lisp
notzmv has quit [Read error: Connection reset by peer]
notzmv has joined #lisp
oleo has joined #lisp
<oleo> eheh
<oleo> ok, this is Inline here again, i started Mezzano via qemu-kvm on the lappy after configuring all the keyboards and the horrible background color
<oleo> heh it works
<oleo> hello all
orivej has quit [Ping timeout: 250 seconds]
orivej has joined #lisp
<ebrasca> Inline: You can change keyboard with M-F12
<oleo> oh
<oleo> thank you
teej has quit []
<ebrasca> Mezzano have its own channel in #mezzano
<oleo> yah, but there
<oleo> there's no hint of mezzano.gui.compositor::*current-keymap* s value
<oleo> so i don
<oleo> err i don't see when i switch maps
robdog has joined #lisp
orivej has quit [Ping timeout: 250 seconds]
shka_ has quit [Ping timeout: 250 seconds]
teej has joined #lisp
phoe has quit [Ping timeout: 246 seconds]
Lycurgus has joined #lisp
<oleo> oO
hiroaki has joined #lisp
didi has quit [Ping timeout: 245 seconds]
<oleo> when i change to another channel on this irc client, then i still see all the messages from the other channels
<oleo> and my nick seems to be the only one which is not long or supplemented with it's ip
<oleo> all the others are ellbow long, like taking half the screen estate of the irc client
<oleo> meh
<oleo> and how can i change font size ?
<ebrasca> oleo: You can make better irc in cl.
<ebrasca> oleo: I don't know how to change font size.
pierpal has quit [Ping timeout: 246 seconds]
<pjb> ebrasca: C-x + or C-x -
oleo has quit []
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<ebrasca> pjb: I don't think it work in mezzano irc.
pierpal has joined #lisp
Essadon has joined #lisp
<seok_> which function to match substring?
<seok_> Was it ppcle? The one contains regex functions
<seok_> hm guess ppcre might have it
makomo has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
anamorphic has quit [Quit: Leaving]
bzp has quit [Ping timeout: 250 seconds]
pierpal has quit [Ping timeout: 244 seconds]
quipa_ has joined #lisp
orivej has joined #lisp
quipa has quit [Ping timeout: 250 seconds]
<Inline> oh ok, didn't know there was a channel for mezzano too
<Inline> heh
scymtym has joined #lisp
<pjb> seok_: (search "foo" "bar foo baz") #| --> 4 |#
isBEKaml has joined #lisp
rumbler31 has joined #lisp
shifty has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
strelox has joined #lisp
kotrcka has quit [Ping timeout: 244 seconds]
strelox_ has joined #lisp
strelox_ has quit [Client Quit]
strelox has quit [Ping timeout: 250 seconds]
<seok_> How do i use #'search without case-sensitivity?
sjl_ has quit [Ping timeout: 245 seconds]
<seok_> (search a b :test #'string-equal) doesnt seem to do it
varjag has joined #lisp
<Xach> seok_: it does
<seok_> it does?
<Xach> seok_: yes. because (string-equal #\A #\a) => t
pierpal has joined #lisp
<seok_> hm, yes it does
<seok_> wonder why my code is not working
<Xach> seok_: but char-equal is better.
pierpal has quit [Read error: Connection reset by peer]
<seok_> ok, found it
<seok_> I did not fix my arrow macro after adding :test
<seok_> haha
<seok_> Thanks guys
iovec has joined #lisp
LiamH has quit [Quit: Leaving.]
khisanth_ has quit [Read error: Connection reset by peer]
moei has quit [Quit: Leaving...]
hiroaki has quit [Ping timeout: 246 seconds]
quipa_ has quit [Remote host closed the connection]
quipa_ has joined #lisp
andonilsson has joined #lisp
andonilsson has quit [Client Quit]
isBEKaml has quit [Quit: WeeChat 2.3]
quipa_ has quit [Max SendQ exceeded]
quipa_ has joined #lisp
andonilsson has joined #lisp
andonilsson has quit [Quit: Leaving]
khisanth_ has joined #lisp
zotan has quit [Ping timeout: 245 seconds]
zotan has joined #lisp
m0w has joined #lisp
tripty has quit [Ping timeout: 252 seconds]
Zaab1t has quit [Quit: bye bye friends]
varjag has quit [Ping timeout: 246 seconds]
m0w has quit [Read error: Connection reset by peer]
dmiles has quit [Ping timeout: 250 seconds]
robotoad has quit [Quit: robotoad]