libera/#commonlisp - IRC Chatlog
Search
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
13:13:28
phoe
beach: PCS license is complicated? how? it's public license for the code + BSD for tests copied from ANSI-TEST
13:15:06
phoe
oh, maybe you mean the CC0 license; yes, it's full of legalspeak, but basically it means that this code is public domain
13:16:50
beach
Good to know. Thanks! I may not use very much code anyway, but if I do, I'll make sure to indicate its origin.
16:13:57
beach
phoe: I asked a question the other day about associating a restart with a condition, and bike answered that I was write in assuming that the association must be distinct from the restart. However, in your code, a restart contains a list of associated conditions. What makes you think that will work?
16:27:18
beach
phoe: Never mind. I think I see. You kind of implement the logic of special variables yourself by using an UNWIND-PROTECT and popping off the conditions when the dynamic environment is no longer established.
16:28:13
beach
phoe: So let me ask you this instead: Why did you decide to do it this way, rather than with a special variable as (apparently) KMP does.
18:53:34
piethesailor
I am trying to use "clx" an running into an issue. Anyone familiar? looking for a tip.
18:55:14
piethesailor
So far I've (ql:quickload :clx) and tried to run (xlib:open-display "localhost:0") and im getting an: `Name service error in "getaddrinfo": -2 (Name or service not known)` error
18:55:50
Nilby
splittist: Here's some hackish lines I had in my .lisprc to start LEM without roswell. I haven't tested it recently. https://plaster.tymoon.eu/view/3812#3812
18:55:50
piethesailor
I've also tried using various ip address found with1 ip addr show | grep 'inet '
18:58:01
Nilby
piethesailor: maybe (open-display "localhost" :display 0) or even (open-display "" :display 0)
18:59:28
piethesailor
Nilby: Ah! your second suggestion returned a display object! Much appreciated!
18:59:29
gilberth
These days there also is (XLIB:OPEN-DEFAULT-DISPLAY) which may be more reliable. And are we sure that the X11 listens on a TCP/IP socket and not on a UNIX domain socket only?
19:01:00
piethesailor
I am not sure which it runs on, must be worth knowing. I am running ubuntu through windows subsystem. So that might muddy things..
19:02:39
piethesailor
and that makes sense now that I think about it Nilby. I am trying to get this code to work https://gist.github.com/wiedzmin/4653b830fd351b69dacb21b6108f4809
19:03:41
gilberth
What does "echo $DISPLAY" or (XLIB::GETENV "DISPLAY") say? Anyhow, this OPEN-DEFAULT-DISPLAY should do the right thing.
19:12:26
piethesailor
[Condition of type XLIB:MATCH-ERROR]. Ill post the code I am trying to run in a paste bin here in a sec
19:15:54
piethesailor
This might be a more in depth issue, could be too much for discussion here, but I'll try my luck