freenode/#lisp - IRC Chatlog
Search
15:01:19
troydm
doesn't seem so, as only variables that are used inside thread is global *server* and local port
15:02:39
troydm
basicly what I'm doing is debugging why https://github.com/cxxxr/cl-lsp is not working on MacOS as expected, as when I start cl-lsp with args tcp 10003
15:04:15
troydm
but it doesn't seems like it's something cl-lsp related, more probably related to jsonrpc and bordeaux-threads
15:45:37
troydm
it seems like jsonrpc is designed this way that when you bind a server on tcp it needs to load (ql:quickload "jsonrpc/transport/tcp" :silent t)
16:26:19
SpaceIgor2075
Hello! Can anybody recommend any resources to learn about modules,packages, asdf and projects? i am a newbie
16:27:23
phoe
once you've absorbed this document and played in the REPL with the knowledge you've gained this way, please come back for a bit more about ASDF, systems, and projects
16:32:33
Xach
i don't like its POV of "isn't this dumb system dumb? well, here's how it works" - I'd prefer an explanation from someone with less contempt for it.
16:33:53
beach
Xach: It's OK. I see Alexandria fixed the incorrect clause order. That's all I need for now.
16:34:33
Xach
beach: whenever i increase strictness (by updating my sbcl), something that is 5-10 years since last maintenance breaks
16:34:58
Xach
the current problem is a widely-used library named "access" which uses function designators wrong
16:35:36
phoe
Xach: is it possible for you to also test on high safety/debug settings? this exposes bugs that are not exposed otherwise, like this cl-unicode bug that I just encountered
16:47:52
phoe
I assume that is why this cl-unicode issue was not noticed by Xach when preparing the QL distribution
16:51:09
heisig
In case anyone is wondering, the correct way to restrict SBCL's compiler policy is (sb-ext:restrict-compiler-policy 'safety 3).
17:11:00
VincentVega
guys, i am reading the cl-containers docs for red-black trees and don't get one thing: is there really no function to find the closest element to a given or am i just not seeing it?
17:11:04
VincentVega
https://common-lisp.net/project/cl-containers/documentation/metabang.cl-containers-package/class-red--black--tree.html
17:27:32
ck_
yes, looks that way. It depends on what you mean by 'closest' then. If you're looking for something like a range test for the ordering that the tree uses.. well I don't see one either
17:35:03
ck_
if you need this type of look-up often or mostly, maybe a different data structure would be a better choice
18:21:29
benjamindc
IS there a way to get "(asdf:test-system "system")" to return an exit code of 1 when executed in a script for CI pipelines?
18:24:47
phoe
benjamindc: the convention is generally that if asdf:test-system signals an error, then it has failed
18:25:56
phoe
so you can do it like (handler-bind ((error (lambda (x) (print x) (print stacktrace) (exit 1)))) (asdf:test-system :foo) (exit 0))
18:29:28
aeth
benjamindc: In general, just ignore asdf:test-system in CI pipelines and just directly use the non-portable return value of whatever test suite you're using. ASDF doesn't want to have asdf:test-system return a non-portable return value, making it near-useless for CI
18:29:58
aeth
phoe's answer is the correct answer, but it winds up being like 5 lines of code just to return something that your test suite already returns that asdf:test-system is blocking...
18:34:15
aeth
benjamindc: Sorry, phoe's answer is almost the correct answer. You want to exit with (uiop:quit 1)
18:34:49
aeth
no, but I'm not very happy with any of them having used almost all of them in different projects of mine over the years
18:40:28
benjamindc
aeth i follow your advice, but my script returns 0 when there are failing tests: https://pastebin.com/zgKD6F4n
18:42:32
phoe
if your test framework returns gracefully when you run the test suite and there are failures, then you get what you see
18:42:49
aeth
benjamindc: most of them return the number of failed tests or can be configured to do so
18:42:50
phoe
you'll need to analyze the results manually and if there are any failures then you'll need to (exit 1)
20:17:02
emma
Not exactly lisp but do any of you enjoy electronic music like trance, house, or techno?
21:36:47
phoe
I can imagine the generated code must contain much more debug information and runtime checks
21:57:43
Xach
phoe: http://report.quicklisp.org/2021-01-02/failure-report.html has the report but there's a lot of noise from the things sbcl broke recently
21:58:24
phoe
Unhandled SIMPLE-CONDITION in thread #<SB-THREAD:THREAD "main thread" RUNNING {1001A50103}>: break
21:59:22
phoe
The constant MINUTES-PER-INTERNAL-TIME-UNIT is being redefined (from 1.6666668e-8 to 1.6666666e-8)
21:59:59
Xach
i don't get the increased # of arithmetic error COMMON-LISP:FLOATING-POINT-INVALID-OPERATION signalled
22:01:53
phoe
the current master includes some floating point stuff that me and mfiano have coerced stassats into adding
22:03:13
phoe
(SB-KERNEL:MAKE-NUMERIC-TYPE :CLASS COMMON-LISP:FLOAT :FORMAT COMMON-LISP:SINGLE-FLOAT :COMPLEXP :REAL :LOW #<SINGLE-FLOAT quiet NaN> :HIGH #<SINGLE-FLOAT quiet NaN> :ENUMERABLE COMMON-LISP:NIL)
22:10:06
phoe
in here in particular: https://github.com/brown/protobuf/blob/master/protocol-buffer.lisp#L109-L121
22:17:04
Xach
i don't think that would help my recent problems, which stem from SBCL detecting more invalid code at compile-time.
22:21:22
phoe
(cl:define-symbol-macro foo #.(sb-kernel:make-single-float -1)) works fine on default safety/speed
22:26:50
mfiano
Minimum reproducible error: (compile nil (lambda () #.(sb-kernel:make-single-float -1)))
22:41:47
mfiano
Wasn't me this time. I did find about a dozen SBCL bugs over the last few weeks that have all been fixed, but not this one
23:07:34
thmprover
Is there a way to verify `double-float` is in fact IEEE 754 double precision (since the CL standard doesn't require it)?
23:10:23
aeth
there's an :IEEE-FLOATING-POINT in *features* but they might not all have that because I don't think that's standard
23:12:42
thmprover
I'd prefer to have an error raised if the CL implementation does not support IEEE 754, so the user would know and be sufficiently alarmed/informed.
23:13:03
aeth
thmprover: based on the implementation support of float-features, IEEE is pretty much guaranteed to be present on any living implementation unless you stretch the definition of "living" to include CLISP. https://github.com/Shinmera/float-features
23:13:36
mfiano
If present, indicates that the implementation purports to conform to the requirements of IEEE Standard for Binary Floating-Point Arithmetic.
23:14:24
aeth
Airship Scheme does #+(or ccl ieee-floating-point) and probably will have to for some time even if CCL adds it to *features*.
23:14:33
thmprover
aeth: I hoped that most modern Lisp implementations support it, but I am doing numerical analysis, so I want to be *certain*.
23:15:50
phoe
escalate to the maintainers and tell them to fix their stuff up. we've been in this ground multiple times now, and local nicknames exist nowadays.
23:16:12
aeth
frodef: And the pile of things that it's missing because of that is climbing, e.g. package local nicknames
23:16:14
thmprover
aeth: good to know about the package; but you mean, I should wrap all floating point computation in a `(with-float-traps-masked ...)`?
23:17:13
aeth
mfiano: Plenty of alive software hasn't made a release in 10 years. However, Common Lisp gets this ecosystem stability because it shifts the burden of a lot of bitrot onto the implementations, which must continue to add things over time.
23:17:39
aeth
mfiano: Sure, portable CL will continue to run in CLISP as long as it remains ANSI compliant with no compliance bugs (which undoubtably exist in every implementation)
23:17:57
aeth
mfiano: But most nontrivial CL uses some nonportable code, either as extensions or libraries.
23:18:38
aeth
e.g. If you use package local nicknames, you can't say that CLISP is living because you're actively working to break large parts of the Quicklisp ecosystem in CLISP.
23:18:55
aeth
That's just the most popular one, there's lots of other assumptions people make that don't work on CLISP.
23:19:12
mfiano
One can use defpackage-plus to gracefully fall back to global nicknames if you need to test your code on CCL
23:20:02
aeth
float-features is another one. Most numerical code should have with-float-traps-masked, and maybe you can have a fallback for implementations that float-features doesn't support, but if you're using it, you might also want to be able to deal with infinities and NaNs
23:20:08
mfiano
I try not to use implementation features apart from PLN because I value portability, and it took a look time before I accepted I would like to use PLN because of this
23:21:56
aeth
I don't test in or support CLISP anymore because enough of my dependencies are broken in it these days that it's not worth the effort to figure out exactly what subset I can test in it.
23:23:52
aeth
The worst dependency of mine is probably cl-sdl2, which I need to replace at some point. I tested it in Roswell a while back and it only ran in SBCL, CCL, and ECL.
23:24:37
mfiano
It wraps float trapping around every call, and on the way out in unwind-protect, which accounted for about 30% of the runtime last time I made a flamegraph
23:29:28
mfiano
One can push a feature, but a large number of shader programs would fail to link on Intel/Mesa.
23:30:18
mfiano
Here is a flamegraph view of one draw call for example. Look at that that time spent: https://i.lisp.cl/JmiUBd.png
23:38:26
mfiano
Xach: curious, I recall recently you did some image thing with an octree. Did you write the octree yourself, or use some library?
1:03:21
moon-child
is there a version of mapcar which errors if the lists it applies to aren't the same length?
1:19:12
no-defun-allowed
You iterate over all the lists, then instead of terminating when one is '(), you check if all are '(), and if not, then you signal an error.
1:20:26
aeth
Fortunately, at least one log bot was on the "correct" side of the netsplit for anyone else who was confused
1:20:43
aeth
The rest of us were wondering what these answers had to do with the package system. :-)
1:21:49
aeth
frodef: There are some low-hanging fruits in package features, including hierarchical and versioned, although you can sort of fake the former with reexporting symbols and you can definitely do the latter manually (although only Alexandria does this afaik).
1:22:05
aeth
frodef: But the solutions would be controversial so it would take a lot to get anything.
1:23:08
frodef
aeth: The problem with CL is, it was so good back in 1990 that it's still "good enough" :-)
1:27:41
aeth
frodef: No, it's more like... how many > 100 kloc projects are there written in CL that aren't CL compilers?
1:28:22
aeth
And compilers can just add whatever internals they want, so they're not really having to deal with mostly-portable CL.
1:29:33
frodef
aeth: I tend to disagree, I suspect the lack of a global "module" system/architecture is holding CL back.
1:30:24
no-defun-allowed
How do you handle having version X for one package, and version Y for another?
1:31:31
no-defun-allowed
You might put versions in the package "names" or something, so they don't collide. But then would FIND-SYMBOL take a versioned name? These things seem hard with packages as bundles of sybmols.
1:32:13
aeth
The new version just inherits from the old one for the most part. Sometimes removing, but mostly adding.
1:32:39
no-defun-allowed
I think first class global environments, specifically sticking each module in a FCGE with its dependencies, is a good idea, but then you have edge cases like one module returning a FOO:B that's different to another module removing FOO:B, cause they came from different package objects.
1:33:24
no-defun-allowed
So you might want to have package objects collude to not create duplicate symbol objects somehow, I dunno.
1:34:25
aeth
no-defun-allowed: Versioned packages are way simpler than FCGE, though. Essentially you want to inherit symbols in a new package from an old one (several libraries do this, including UIOP and defpackage-plus afaik)
1:34:38
White_Flame
PLN would allow you to have package foo-3.5: and package foo-3.6: simultaneously, but I think those canonical package versions are better handled in the .asd file than scattered around the source's defpackages & imports
1:34:48
no-defun-allowed
Gnuxie tells me that in Self and Newspeak, module imports are just assignments to slots, so you can provide whatever objects you want. But packages, querying the environment for packages, and all that introspective stuff makes it harder.
1:35:15
aeth
no-defun-allowed: Except, sometimes, you want to do one of three things: (1) remove a symbol (something deprecated got removed from the API), (2) add a symbol (by far the most common and totally safe), (3) replace a symbol (because foo.1:barfoo and foo.2:barfoo have two different implementations so they refer to two different functions)
1:35:38
no-defun-allowed
Yeah, that much could be done with diffs. That'd handle deduping symbol objects across package versions.
1:37:12
aeth
To complicate things a bit, you'd want one of the symbol conflict resolution options to be "don't use the latest, use this specific version instead"
1:37:43
aeth
So if you USE my-package and it stops working because of a symbol conflict (and, yeah, USE is bad in general), then you can just use my-package.2 or whatever.
1:41:58
fiddlerwoaroof
Personally, I tend to distinguish "code that I might eventually put into quicklisp" from "application code"
1:42:17
fiddlerwoaroof
And only use implementation-specific features in the latter sorts of projects