freenode/#clasp - IRC Chatlog
Search
16:58:41
drmeister
A weak pointer contains a single slot 'value' and this is a pointer to an object on the heap.
16:59:27
drmeister
https://github.com/clasp-developers/clasp/blob/dev/include/clasp/gctools/gcweak.h#L535
16:59:43
Bike
there's an assert saying "value can never contain anything but a pointer - if it does then when it gets set to NULL by the GC it will be interpreted as a Fixnum 0"
17:00:09
Bike
make-weak-pointer seems to return a WeakPointer_O, which has a WeakPointerManager in it
17:00:53
drmeister
Right - disabling the ability to allocate weak pointers to all immediates might have been an overreaction.
17:01:37
pfdietz
Since common lisps are allowed to copy numeric (and character) values at any time, the whole notion of weakness for them is dubious.
17:01:56
drmeister
I think I could allocate weak pointers to any immediate value that isn't 0x0 - I'll just NOT tell the GC to watch that pointer and splat it because the value won't be a pointer.
17:03:41
Bike
it's dubious, but on the other hand it would be kind of dicey to make the user aware of what's immediate and what's not
17:04:33
Bike
also i thought making a parameter size_t would imply a sign check when converting from fixnum, but no. too bad
17:05:00
drmeister
Yeah - it doesn't make sense to allocate weak pointers on immediate values. But different lisps have different types as immediate values - so I guess you need a consistent API.
17:06:27
drmeister
I didn't sign check when converting fixnum -> size_t - you can find the translator and add that.
17:06:57
drmeister
Actually, we shouldn't put those kind of tests in translators - they will slow things down. Type inference is a better way to handle it.
17:07:50
drmeister
I think unsafe translators and type inference that generates appropriate bounds checking is the best way to deal with this.
17:11:35
pfdietz
Users already can tell by using EQ and EQL. I've encountered cases in SBCL where use of EQL type declarations alters the EQ-behavior of a function (allowed by the standard, but weird.)
17:13:45
pfdietz
Yes. And the constant in the EQL declaration is not EQ to the constant being passed to the function.
17:13:45
stassats
the only way for the type check to succeed is to have the same constant, so it substitutes all the cases where it's used
17:18:49
stassats
in that case, nothing's actually optimized, loading 1d0 is more expensive than returning the argument
17:21:36
drmeister
stassats: The only problem in my mind when I wrote this is that the value cannot contain 0x0 because the Boehm GC uses 0x0 to splat the pointer. Now I see a solution to this. I could add a flag that tells me if value contains a pointer or an immediate. If it contains a pointer - then 0x0 means it was splatted. If it contains an immediate - then I don't tell the GC that the value contains a splatable pointer.
19:13:20
drmeister
I was going to ask about updates - I'll do it in slack - I don't know if Steven sees posts here.
20:48:07
drmeister
::notify Bike The cst compiler behaves differently than the ast compiler. This is what I get in the Activity Monitor. https://usercontent.irccloud-cdn.com/file/1R6CRBUG/image.png
20:52:09
drmeister
::notify Bike - It seems to be spending a lot of time in sigtramp https://usercontent.irccloud-cdn.com/file/wQjK39GH/image.png
1:50:52
drmeister
Bike: I'm trying to get more info on what is going on. Could you speculate on what might be different between your configuration and mine?
2:08:28
drmeister
Hmm, I don't think it's the problem. I think I defined this so that I would have a C++ type that would indicate that something returns a tagged Fixnum_sp and not a Fixnum (which is untagged)
2:08:38
drmeister
https://github.com/clasp-developers/clasp/blob/dev/include/clasp/gctools/smart_pointers.h#L689
2:10:06
drmeister
To be really clear: A C+ Fixnum_sp that represents the value 1 (one) has the bit pattern #B100 in the word that it contains.
2:14:20
drmeister
https://github.com/clasp-developers/clasp/blob/dev/src/core/sourceFileInfo.cc#L117
2:15:42
drmeister
In core__source_pos_info_lineno info is T_sp and then I call clasp_sourcePosInfo_lineno, which expects a SourcePosInfo_sp type. It's bad to mismatch types when calling.
2:54:56
dvssa
drmeister: I'm running into issues when loading :design with the clasp/cando build from the latest master, I get this when I try: https://gist.github.com/DurhamSmith/081ab7f049fde1359a25300468b6a89d
3:07:59
drmeister
I'm implementing a CI system to make this sort of breakage unlikely. We will have it in place next week.
3:10:07
drmeister
I don't have the CI system fully in place yet. I just have it building the testing branch of clasp and clasp+cando when I push to those branches.
3:10:58
drmeister
Bike: It appears that source-pos-info-lineno is being passed a fixnum rather than a core:source-pos-info object.
3:12:45
drmeister
Bike: I don't know - but something uses fixnums as origin doesn't it? Default Cleavir? Default Eclector?
3:18:01
drmeister
dvssa: I'm actively working in design.lisp - so it's possible that I push broken code.
3:27:30
dvssa
Ok no prob, when you want to chat about it drop me a message on slack. You might also be interested in this: https://arxiv.org/pdf/1807.04259.pdf
3:28:17
dvssa
And this seems to be a good training data source https://www.nature.com/articles/sdata201422.pdf
3:29:23
dvssa
I'm slowly learning more about QML as well, I want to see how we could incorporate it into clasp
3:59:04
drmeister
Bike: An origin that looks like (cons 1138 1157) is working it's way into the code somewhere.
4:02:03
drmeister
beach: Do you use instruction origins anywhere that look like (cons fixnum fixnum) ?
4:03:41
drmeister
So it's a failure of whatever method I was supposed to implement to supply my own source info objects.
4:05:32
drmeister
I do - it's not working for some reason. There is some difference between Bike's development system and mine.
4:07:42
drmeister
I think I see a problem. I have a mechanism to add to *features* by setting the CLASP_FEATURES environment variable - but the :CST feature is not in *features* for some reason.
4:09:35
drmeister
No - that's not it. If I start iclasp-boehm with that environment variable set I see :CST in *features*
4:09:59
drmeister
When I use ./waf build_rboehm . (runs aclasp) - the feature is also set - so waf isn't switching it off for some reason.
4:12:41
drmeister
dvssa: Oh dang - that doesn't test design.lisp - that comes later - so it may still have problems.
4:17:35
drmeister
beach: It will build branches of clasp and cando and if they build successfully build things from those and so on.
4:24:01
dvssa
drmeister: its good they are solving the keyboard issues. That detracted me from getting one. I ordered a thinkpad x1 a few days before they announced the new macbook pros
4:24:48
dvssa
It's a pretty nice machine so far. Some issues getting the battery life on linux to be acceptable tho.
4:38:48
beach
Bike: I see a potential paper submission for ELS, entitled "MAKE-METHOD-LAMBDA revisited" or something like that.
4:40:03
beach
It is not hard to store the name of the GENERIC-FUNCTION-CLASS and the METHOD-CLASS from the DEFGENERIC form in the compile-time environment, and to have DEFMETHOD look that up.
4:41:11
beach
DEFMETHOD would simply get the CLASS-PROTOTYPE of those two and pass them to MAKE-METHOD-LAMBDA. Problem solved.
4:42:19
dvssa
drmeister: testing branch doesnt load :cando-user it gives https://gist.github.com/DurhamSmith/8a34bb52c297e9c4c084f89257caa559 I think I'll be able to get it working myself im just going to grab something to eat first.
4:42:32
beach
Bike: And I will likely write a joint paper with Didier, showing that we can solve his issues with method combinations in a way that is consistent with both the MOP and the Common Lisp HyperSpec.
4:43:57
beach
And it does not use the ugly solution where the generic function is the data base for method combinations. It stores them in a SICL first-class global environment.
4:44:01
drmeister
dvssa: Ok - sorry about that. This is what the CI system should help us resolve. We have a chain of dev -> testing -> preview -> master branches. The CI system will only promote builds up the chain if they work.