libera/#commonlisp - IRC Chatlog
Search
6:57:51
minion
memo for pve - any link to this Smalltalk-in-Lisp: I can't be expected to work when CLiki doesn't respond to me, can I?
7:22:07
pve
not the numbers, but everything else.. it's a strange ouroboros of classes and metaclasses, so the experience has been "interesting", to say the least
7:23:48
pve
oh, you mean the repository started 5 days ago.. yeah, I just recently cleaned it up and put it on github, been working on it on and off for much longer
7:39:30
pve
but what's currently working (and what I'm most proud of) is that the classes themselves respect the class hierarchy, so when a message is sent to the class itself, the methods defined on the superclasses can also be used.
8:48:52
beach
Is it just me, or is it the case that the ANSI test suite does not build in a very nice way?
8:57:10
beach
Also, I wish it were easier to run the tests on a bunch of "extrinsic" operators. By that I mean that I have a library that defines standard operators, but not in the CL package, so that it can be loaded into an existing implementation without clobbering the existing operators, and I would like to run the ANSI tests on the operators defined in that library.
9:00:12
beach
I guess if each function had a single entry point associated with it, and that entry point were passed the function as an argument, that might work.
9:10:55
jackdaniel
beach: you may discuss that with yitzi, he is very active recently on ansi-test repository
9:11:23
jackdaniel
as of the loading - it is based on makefile and bare calls to load, because when you test an incomplete common lisp implementation you can't sanely assume that asdf system will work
9:14:43
jackdaniel
it is also important to note that while we maintain ansi-test repository on common-lisp.net, pfdietz works on his own version that contains random testers and other goods - that's something I'd very much like to backport at some point if time and energy permits
9:15:45
jackdaniel
(and in a matter of fact pfdietz should be in charge of "our" ansi-test suite but I don't recall him expressing any interest in that)
9:16:07
jackdaniel
c.f: https://gitlab.common-lisp.net/ansi-test/ansi-test/ ; https://github.com/pfdietz/ansi-test/
10:44:41
pjb
beach: if you want to run ansi-tests, without modifying it, you may have some luck by redefining cl-user::defpackage and cl-user::in-package. Have a look at Image Based Development http://informatimago.free.fr/i/develop/lisp/com/informatimago/small-cl-pgms/ibcl/index.html and https://gitlab.com/com-informatimago/com-informatimago/-/tree/master/small-cl-pgms/ibcl
10:46:13
pjb
Well, actually only defpackage. https://gitlab.com/com-informatimago/com-informatimago/-/blob/master/small-cl-pgms/ibcl/ibcl.lisp#L307
10:46:43
pjb
However if ansi-tests uses qualified symbols eg. CL:CAR, then you may need to use a reader macro instead.
10:47:30
pjb
But in the context of sicl and in general of tools for implementation writters, ansi-tests should be written with that level of indirection, so a big patch would be in order, if it doesn't already have it (which I doubt).
12:20:32
random-jellyfish
does the use of (values ...) to return multiple values affect the execution speed of an inlined function?
12:21:08
random-jellyfish
I noticed that inlining some functions makes them much faster, in sbcl at least
12:21:59
jackdaniel
inlining is like the single best optimization compilers can make (if they can of course)
12:39:26
beach
I would expect the amount of work the function does to be more significant than whether it uses multiple values.
12:43:31
random-jellyfish
this is the function, it saves the least significant n bits of an integer and zeroes out the rest
12:43:57
jackdaniel
why does it return two values if the second value is the identity of the second argument? (just curious)
12:44:22
beach
For a fixnum, that's a very small amount of work, so the call overhead would be significant.
12:45:13
random-jellyfish
I have an entire library of bit level operations and I'm thinking of also returning the bit width of the result because in some cases it's not equal to one of the arguments
12:45:26
pjb
you could abstract it into a structure: (defstruct word width bits) (defun to-unsigned-bit (x n) (make-word :width n :bits (logand x (1- (ash 1 n))))) (to-unsigned-bit 42 16) #| --> #S(word :width 16 :bits 42) |#
12:45:33
random-jellyfish
for example when I want to concatenate the bits of two integers into a bigger integers
12:46:29
random-jellyfish
it's a lot of work to do this change to all the functions and I was wondering if you guys have an intuition about the performance impact it might have
12:47:57
pjb
For optimization sake, you may want to avoid the multiple values, since you already know the width in the caller.
12:48:40
pjb
But you may have operations that compute a new width. Eg, (multiply a wa b wb) --> a*b wa+wb
12:52:04
jackdaniel
random-jellyfish: if the function is inlined, the the compiler should figure out how to handle multiple values here without much issue