freenode/lisp - IRC Chatlog
Search
6:39:54
travv0
you been working on anything exciting lately? i mostly am in discord and don't check irc very often
7:16:31
beach
travv0: Don't feel you have to read the paper. Here is an executive summary: I suggest a way to optimize call sites by having the callee generate the code for the call site, thereby allowing more opportunities for optimization, like avoiding indirections, avoiding optional and keyword argument parsing, etc.
7:17:44
beach
It has the potential to make Common Lisp function calls faster than (say) C++ function calls, at least when C++ function calls use the default calling conventions.
7:25:40
travv0
wow, that definitely sounds interesting. and i guess silver lining with the covid stuff is I'll get to watch along with ELS presentations again this year from the US
7:46:24
flip214
I build an application via QL and its ADSF file, then call a function to dump an image. When running that image, my main starts swank in there (to debug); but when I connect, I'm thrown in sldb - from a (LOAD "... .asd").
7:48:48
flip214
seems that ASDF gets triggered on the defined system _again_ .... - or still, though I'd have expected loading to complete when QL returns?!
11:55:05
Xach
flip214: last i checked, swank does not act like most asdf systems, but i don't know if its behavior accounts for what you see.
11:56:20
flip214
looks like my swank _client_ tried to load something - causing ASDF to look at all its asd files... but I haven't fully debugged that yet.
14:59:49
jedii
what are lispers using for persistance lately? postgresql? is there a driver for scylladb.com? or is there a lispy database? or simply use lisp data structures? and serialize?
15:13:11
Fade
maybe it's just me, but I think this font needs to be united with Xach's sparkline hack: http://www.datalegreya.com/?lang=en
15:51:25
jackdaniel
the point is that it is different from defpackage and that some people may find it more useful than defpackage
15:52:51
phoe
"If the new definition is at variance with the current state of that package, the consequences are undefined; an implementation might choose to modify the existing package to reflect the new definition."
15:53:37
Xach
SBCL used to do everything incrementally so if you encountered a conflict or other issue, the package system would be in a freaky state if you aborted
15:54:53
phoe
also its :REEXPORT is very useful for reexporting stuff, and MIX is like USE on steroids if you know how to use it
15:56:16
phoe
usually because I want to redefine packages and SBCL yells at me, or I want to make use of the additional options
15:56:46
jmercouris
if it contains all of the functionality of defpackage and more, why not just use it by default?
15:57:42
jmercouris
I think comparing cond to other branching statements vs defpackage to uiop:defpackage is different
15:58:10
jmercouris
when we are talking about specificity of style, there is no more learning provided by uiop:defpackage vs defpackage
16:07:59
jmercouris
so what is the point of printing that by default? why doesn't it get me something I can read again that refers to that instance?
16:08:44
Bike
jmercouris: you can read the string at any time, including after the instance has been garbage collected, or after you restart lisp and the XYZ class isn't even defined
16:09:03
phoe
should it create a new object? should it try to intern it somewhere? should it try to find it and signal an error if it does not exist? where should it look for it?
16:09:18
jmercouris
phoe: I would expect it to try to find the object, otherwise error if it doesn't exist
16:09:42
jmercouris
I don't know, shouldn't my implementation have a reference of all existing objects?
16:10:02
Bike
they might have an address, but GCs often copy things around, so the address isn't constant
16:11:01
Bike
you could get every object an ID tag, but then obviously you'd need to use an extra word of storage for every single object.
16:11:32
Bike
Of course if you want that you can just define read and write functions that do whatever you want, and then use a symbol macro so it looks exactly the same.
16:12:11
phoe
1) because you can't rebind them by accident, 2) because you get all the clos goodness.
16:13:56
jackdaniel
jmercouris: did you consider reading a book about CL? like practical common lisp?
16:14:50
jmercouris
jackdaniel: oh yeah, I totally forgot that chapter about implementation specific details regarding object IDs
16:15:10
jmercouris
jackdaniel: where the author goes into an explanation of why eq would use memory addresses instead
16:15:44
jmercouris
jackdaniel: oh yeah, I also forgot about the section where the author talks about dispatching method performance
16:16:00
jmercouris
where he explains the difference between how long a function call vs a method call takes, and why
16:17:30
Bike
but if you do (xyz 123) you are calling a generic function, which may result in multiple methods being called.
16:18:04
jackdaniel
jmercouris: my point is that you sometimes tend to ask questions that could be easily looked up, like about dispatch macro #:foo
16:21:35
phoe
current CLOS implementations work in a way where GFs must do runtime argument dispatch that cannot be done at compile time
16:21:59
phoe
second, effective methods must be computed - second source of overhead, even if they are cached
16:23:49
phoe
actually lots of this stuff can be precomputed at compile-time; that's what beach is working on now
16:24:19
jmercouris
so you are telling me that SICL will have a really fast generic function dispatch
16:24:28
Bike
what you can't compute ahead of time is the actual dispatch, generally speaking. If you have one method specialized on class xyz, and one specialized on class zyx, and you call the generic function on an argument and it's not discernable at compile time that it's definitely one of those classes, the generic function has to actually check the class.
16:24:31
jmercouris
and that implementation developers will just pop that bad boy into their implementation?
16:25:56
jmercouris
consider this, whenever we create an object, we give it a list of functions it can invoke
16:26:09
phoe
jmercouris: "just pop that bad boy into" is troublesome because different implementations do it differently
16:26:42
Bike
vtables don't always work for lisp because we have multimethods, i.e. a generic function does different things depending on the classes of _multiple_ objects.
16:27:32
phoe
I think this is more or less what already happens e.g. with regard to effective method functions in SBCL
16:27:57
Bike
You could store a map from lists of classes to effective methods in the generic function
16:28:15
Bike
that is pretty much exactly how beach's method works. however, it's still nonzero overhead compared to doing no dispatch at all
16:29:09
Bike
I mean, fundamentally the generic function is doing something the non-generic function isn't