freenode/#lisp - IRC Chatlog
Search
7:01:50
p_l
patrixl: *after* my death. what isn't clear is whether I'd be still working, certainly I won't get to enjoy retirement
7:26:11
flip214
p_l: obviously you need to enjoy working, then it doesn't matter whether you retire or not
7:28:01
flip214
well, in 18 years you'll be one of the long-sought experts for the 2038 unix date migration, perhaps that's sufficient to let you retire
7:32:37
White_Flame
or dig into the hashtable internals of your implementation, and you'll likely find arrays to index into randomly
11:54:40
many-questions
When I step in slime, SLDB, emacs momentarily flashes a yellow highlight to show which form is being evaluated. Is there a way to make this flash longer, or even have a permanent highlight of the current form?
12:12:34
Xach
many-questions: that's an interesting question. i couldn't figure it out quickly from slime.el, but it can't be too tricky.
12:17:08
trittweiler
many-questions, There does not seem a way right now to configure this. To change the source code, you would want pass in a third parameter to slime-flash-region in slime-highlight-sexp
12:20:24
trittweiler
From an UI point of view, perhaps what should be done is to add a command that redoes the last flash.
12:31:41
Xach
trittweiler: can you tell me how sldb-step ties in to slime-highlight-sexp? I couldn't see the call sequence.
12:38:42
phoe
If a Common Lisp type is non-NIL and non-T, then can/should negating it ever produce a NIL or T type?
12:39:33
phoe
Set theory tells me that this should never be the case, since a negation of a non-empty/non-universe set is never an universe/empty set.
12:46:06
phoe
(NOT (OR (NOT INTEGER) (REAL (-0.5D0)) (REAL * (-0.5D0)))) is the smallest actual test case I've found that produces a NIL ctype on CCL and SBCL.
12:55:06
phoe
So this also must mean that (OR (NOT INTEGER) (INTEGER * -1) (REAL (-3.5D0)) (REAL * (-3.5D0))) is T.
12:55:36
phoe
And that (OR (NOT INTEGER) (INTEGER * -1) (REAL (-3.926510009989861D+7)) (REAL * (-3.926510009989861D+7))) is T.
13:26:24
trittweiler
Xach: grep for :show-frame-source in the *.el and *.lisp files. The control flow is not very apparent at all, you are right
13:27:47
phoe
First, somehow improve the type parsing, so CCL/SBCL can infer from the above type that it is equivalent to T.
13:28:19
phoe
Second, try and figure out why the hell (VALUES NIL T) is returned, which means that SBCL/CCL are *sure* that their decision is correct even if it is not.
15:42:33
pjb
phoe: it depends on whether "type-designator-1 IS type-designator-2" means the two type designators are identical, or whether they represent the same type, ie. the same set of values?
15:43:40
pjb
phoe: specifically, (and (not (equalp '(and (eql 1) (eql 2)) 'nil)) (subtypep '(and (eql 1) (eql 2)) 'nil) (subtypep 'nil '(and (eql 1) (eql 2)))) #| --> t ; t |#
15:44:03
pjb
phoe: but implementations may not be able to determine the subtype relationship in all cases!
15:45:23
pjb
eg. (defun always-nil (x) 'nil) (deftype few () '(satisfies aways-nil)) (and (subtypep 'always-nil 'nil) (subtypep 'nil 'always-nil)) #| --> nil |#
15:46:42
phoe
pjb: if the implementation is unable to determine the relationship, it must return NIL NIL.
15:52:16
jeosol
getting this sbcl specific error: dynamic space too small for core: 1912160KiB required, 1048576KiB available.
15:52:51
jeosol
when I try to load a core through slime. Works on the shell no issues. I do have a lot memory not used when I checked with top (~27GB)
16:04:19
phoe
I'll show you the commit when I'm done. Maybe SBCL has a similar place and you will be able to port it to SBCL.
16:18:52
phoe
https://github.com/phoe-trash/ccl/commit/ba281521b1cfbffe3c3b6ef0a56e27e425438f72?ts=8
16:22:21
easye
ACTION is really digging Travis with ABCL <https://travis-ci.org/easye/abcl/builds/613579263>
16:24:23
easye
As a public service, the Common Lisp Foundation also has Gitlab CI available to all users.
16:26:03
phoe
Travis has builds on macOS/Windows/Linux for free on github. Sourcehut has Linux/BSDs.
16:28:08
easye
"Correct under Linux means the vendors have the responsibility to make it work on their commercial offering."
16:28:53
easye
" maybe they can't get any CI utils to run on catalina": it's gonna take a little elbow grease, but they have the engineering talent and time to do it.
16:31:28
Bike
and in early-type.lisp it defines the cons type-class to have :might-contain-other-types nil
16:31:43
Bike
but given the description in the definition of type classes, i'm not sure just switching it is correct
17:58:22
phoe
Discussing with Bike on #sbcl made me realize that ccl::type-might-contain-other-types-p might not be what I think it means.
18:00:44
phoe
That is how it is used in SBCL internals. I wonder if that is also the case in CCL internals...
18:03:50
pjb
phoe: IMO, renaming is an important part of maintainance. ccl::type-might-contain-other-types-p -> ccl::type-might-be-a-subtype-of-other-types-p
18:05:21
phoe
and the only ctypes that satisfy TYPE-MIGHT-CONTAIN-OTHER-TYPES-P are hairy, negation, union, and intersection types
18:05:49
phoe
pjb: I'll rename it when I figure out what the hell it means and what the hell is it supposed to do
18:07:00
Bike
phoe: I think the idea is that an instance of a type-class is a type, and that, if a type-class does not "contain other types", instances of that type-class are disjoint from instances of distinct type-classes
18:09:39
phoe
Bike: CCL sources seems to agree with SBCL ones. The only four defined type classes in SBCL that have true might-contain-other-types are hairy, negation, union, intersection.
18:10:00
jjkola
pjb: as type of all types contains all types thus it must also contain type of all types otherwise it is not type of all types
18:10:38
phoe
So my CCL fix is incorrect and might likely cause SUBTYPEP to behave incorrectly - as in, the patched SUBTYPEP could return NIL NIL instead of NIL T
18:15:48
phoe
it likely needs to be smarter about merging ranges that end and begin on the same exclusive bound
18:18:12
Bike
if it's just a union type the ranges might as well be satisfies types for all it knows about them together
18:21:41
phoe
one thing is (or (real * (-0.5d0)) (not integer) (real (-0.5d0))) not being detected as a T
18:21:57
phoe
what is the other thing again? I mean the one you meant by 19:17 < Bike> no, you want it to also be smart enough to figure this othher thing out.
18:22:31
Bike
the analysis you're talking about doing is kind of predicated on the idea that (or (real * (-0.5d0)) (real (-0.5d0))) is handled more intelligently.
18:23:05
phoe
where you want to merge two ranges that neighbor but you need to find the point between them
18:23:46
phoe
because (specifier-type '(or (real * (-0.5d0)) (real -0.5d0 -0.5d0) (real (-0.5d0)))) ;=> #<NUMERIC-CTYPE REAL>
18:24:12
phoe
if SBCL can notice that (real -0.5d0 -0.5d0) is a subtype of (not integer) then this case is solved
18:25:24
phoe
I meant that when SBCL has two ranges that have the same exclusive bound, one starting, the other ending
18:25:43
Bike
it doesn't know that (or (real * (-0.5d0)) (real (-0.5d0))) is (and real (not (real -0.5d0 -0.5d0)))
18:26:30
phoe
it can figure it out then! if it has a union ctype with a range type with an exclusive bound, then it can look through all other ctypes in the union type
18:26:59
phoe
if that is true, then it can look for the third ctype - the one that contains that missing point
18:27:15
Bike
that is, it makes a range for real, and then subtracts out the (real -0.5d0 -0.5d0) to get the same union type.
18:28:21
phoe
so it iterates through all remaining ctypes to see if there is one whose *beginning* exclusive bound starts at -0.5d0
18:29:05
Bike
or, presuming it's in the middle of computing a disjunction, it sees if any of the types the exclusive range is being disjoined with includes the missing point.
18:29:10
phoe
so now it iterates through all remaining ctypes to see if there is anything that is a supertype of (real -0.5d0 -0.5d0)
18:39:52
Bike
"This extended subtypep decision procedure would then be NP-complete, since we could use it to do tautology-testing." right
18:41:04
phoe
or are they treated as blobs that can return arbitrary results and are therefore unpredictable until the first result is cached in?
18:42:02
Bike
and it can know that (or (satisfies foo) (not (satisfies foo))) is T, unless it wants to allow for an even weirder type system
18:44:06
Bike
you'd only run into NIL NIL results when you mix satisfies with normal things like ranges
18:46:28
Bike
really, i'd say rather than fixing this range thing you should figure out why sbcl and ccl are more confident than they oughta be
18:47:21
Bike
right... so what is it specifically? it assumes cons types are never nil or something?
18:48:36
Bike
i wrote an implementation of typecase that tries to be reasonably smart. it's still quite dumb and is already a thousand lines
18:49:13
pfdietz
I use trivia. I had a problem recently where it was taking exponential time to compile patterns.
18:50:50
phoe
the type method for complex equality is at https://github.com/Clozure/ccl/blob/master/level-1/l1-typesys.lisp#L3126
18:53:24
phoe
because we can only bail out and confuse ourselves and we cannot return T T at this point
18:53:24
Bike
and the union is all of cons types, so none of them have type-might-contain-other-types-p.
18:53:58
phoe
because the car-type of the first cons is the hellish T type in disguise that wasn't detected
18:54:13
phoe
hence my reasoning - if we solve this T detection, then this type nicely folds up into a T