freenode/#lisp - IRC Chatlog
Search
20:49:55
jasom
CAS removes the need for volatile in many cases because it explicitly performs the read and writes.
20:50:31
jasom
The typical CAS intrinsic has (nearly?) a superset of the guarantees that volatile provides
20:52:02
jasom
lockless Atomic modify can be implemented with a CAS, and atomic modify gets you many useful lockless algorithms, though there may be either forward-progess issues or slow performance for some algorithms if you build on top of that tower of abstraction.
20:53:05
jasom
and on multicore systems volatile will almost certainly not be enough, since cross-core synchronization is also going to be needed.
20:55:09
jasom
whartung: anyways when you get to gritty details, feel free to pick my brain since I've implemented a few simple lockfree algorithms on x86, arm and power.
21:14:17
asarch
I've done a few (ql:quickload...) and some (in-package...). Is there any SBCL command to wipe your session and start over again (anything else besides exit and restart again)?
21:19:12
whartung
but it’s an interesting question. For example, if I do (make-package “FOO”), then (in-package “FOO”), then (defun xxx ()), when I do a DELETE-PACKAGE, assuming no other binding, will FOO:XXX “go away” and be GCd?
21:19:59
phoe
so, if that symbol is not referenced anywhere in the image, it is free to be collected.
21:20:26
whartung
right, so, in theory, to “reset” he could delete all of the packages that he’s quick-loaded.
21:20:53
jasom
whartung: there are still things like DLLs that have been loaded, files that have been opened, &c.
21:22:14
whartung
outside of out-of-spec finalizers, there’s not much of a formal lifecycle for things.
21:22:51
|3b|
don't forget to delete all the print object methods, whoch keep refs to classes which ref names which ref ...
21:24:50
whartung
from a LispOS perspective (not wanting to open that, at all, really), I was always keen to understand how things were “forgotten”.
21:28:15
whartung
but that’s an interesting point regarding generic functions, and what holds on to them.
21:32:18
Bike
I guess the list of methods of a gf could be "weak" so that methods specialized on otherwise unused classes could be gced
21:33:44
jasom
beach recalculates the dispatch function whenever a method is added or removed though, right?
21:35:38
Bike
but if a method is collectable in this way, the discriminator doesn't actually need to be recomputed, since there's no way to call the gf with arguments of the gc'd classes
21:37:08
phoe
you'd need to explicitly make the method references in the discriminator weak, somehow
21:38:34
Bike
but conceptually there's no reason for a generic function to keep a method alive, i think.
21:38:44
phoe
yep, and you need to take them all into account when designing the CLOS implementation to make sure that methods are actually garbage-collectible.
21:39:24
phoe
Bike: basically, when a class becomes collected, then all methods specializing on that class are free to be collected, too, correct?
21:41:10
phoe
frodef: (defclass bar () ()) (defmethod foo ((bar bar)) 42) (setf (find-class 'bar) nil)
21:41:39
phoe
literally the only way for you to be able to call that method now is CLOS introspection
21:42:31
phoe
Bike: the issue is when you have (defmethod foo ((bar bar) (baz baz) (quux quux))) and when one of the classes becomes unreachable
21:43:54
phoe
frodef: if you have uncollected instances, then they refer to their class, so the class is reachable even if it's deleted
21:44:29
Bike
just putting a finalizer on classes would probably be okay. it's not like they're destroyed very often.
21:44:43
whartung
well, it’s not like you have a class and a list of generic functions. You have a list of generic functions and the dispatch arguments.
21:45:48
whartung
by that point, yes, in theory, if a class goes away then any generic function that is dispatched based on that class is “unreachable” via the dispath mechanism and could “go away".
21:46:19
phoe
when in a (defmethod foo ((bar bar) (baz baz) (quux quux)) 42) any of classes BAR, BAZ, QUUX are collected, then the method itself could freely be collected
21:47:20
whartung
in theory you would have a hard reference from teh symbol to the method, and a weak link from the “list of methods” to the method.
21:49:11
Bike
symbols just name generic functions. there are other ways to keep a generic function live.
21:50:15
phoe
you could (defvar *something* #'my-generic-function) and then (fmakunbound 'my-generic-function)
21:50:37
phoe
and 2) is lost but 1) is still live, since now a global variable refers to that function.
21:51:05
phoe
which brings me to another interesting question, storing methods for anonymous generic functions in the environment.
21:51:27
whartung
it just seems that “normally”, the “hard” references to the function would be tied to the naming symbol. Anything else (within the CLOS infrastructure) should probably be a weak reference.
21:52:28
phoe
I just wonder, if your generic function gets collected, you also need to collect its methods
21:52:56
whartung
that’s fine, but that doesn’t mean that the CLOS infrastruture should maintain hard references to them.
21:54:32
whartung
doesn’t this sort of work now since I assume the systems don’t leak memory when a generic function/method is redefined?
21:56:45
jasom
whartung: when a method is redefined, it still keeps the reference to the class around, so it's not really a parallel case
21:57:12
phoe
(defgeneric foo (bar)) (defmethod foo ((bar number)) 42) (defgeneric foo (baz)) (foo 1.0) ;=> 42
21:58:15
phoe
"if the new class given to setf is nil, the class association is removed (but the class object itself is not affected)"
21:58:19
Bike
actually destroying the object doesn't have a standard protocol any more than destroying any object does
21:59:31
pfdietz
method qualifiers should be weak references to their classes (or to objects, if EQL method qualifiers).
22:03:47
phoe
that's what (remove-duplicates (mapcar #'mop:method-qualifiers (mop:generic-function-methods #'print-object)) :test #'equal) tells me
22:07:32
phoe
and as long as they're unnamed, then we're already doing it in our garbage collection algorithms
22:08:33
phoe
we're talking about the cross-section of a CLOS implementation and a garbage collection algorithm
22:10:02
Bike
there's no need to manually destroy a class any more than there is to manually destroy any object.
22:11:06
|3b|
yeah, if you can find all the refs, removing a class, symbol, package works same as anything else
22:12:03
|3b|
just that for those, there are a lot, many of which are cyclic (but linked to other things so the whole cycle can't be collected), and some are hidden (like internal caches in GF dispatch or whatever)
22:12:24
phoe
and if you dare to have a reference to that class on a method on an anonymous generic function lingering in a closure inside some random instance somewhere inside a separate thread, then good luck finding that
22:13:01
|3b|
and that's before conservative GC, or some random half-dead loop variable somewhere up the stack happens to hit one
22:17:25
makomo
also, Jamie Zawinski who worked on early Netscape Navigator releases and thought of the name Mozilla, used to work for Lucid, Inc.
1:40:31
no-defun-allowed
we're doing a presentation on pidgins and creoles in eng lang so we have different places green screened
1:44:36
AeroNotix
I found an internal advertisement I was made to do ten years ago while I worked at HP on an old hard drive the other day. Other dimensions could feel the cringe.
3:00:40
Pixel_Outlaw
Is there a way to print a literal escape sequence? Thinking about toying with some ReGIS in xterm.
3:00:40
Colleen
Pixel_Outlaw: jackdaniel said at 2018.09.12 05:06:21: it seems that for some reason trivial-garbage's make-weak-hash-table doesn't remf this keyword argument before passing to make-hash-table in sbcl
3:00:40
Colleen
Pixel_Outlaw: jackdaniel said at 2018.09.12 05:06:53: what is weird, because I have newest trivial-garbage and all works just fine for me. do you have some hacked version in your local-projects?
5:37:28
gendl
I'm just going to bed (told my wife I would be there 2 hours ago but got stuck finishing a few things on our new web-based object browser)
5:40:49
gendl
can't rightly complain much, although I still do... been through some challenges lately,
5:41:46
gendl
you know about one of them. That looks like (knock wood) coming to a conclusion here real soon.
5:44:01
gendl
ALU has been in limbo, as far as I'm personally concerned, it's a bit far down on my list.
5:44:35
gendl
RS is technically still president and things are kind of in a holding pattern until he gets a new one
5:45:38
gendl
we have $5000 in matching funds and they're finally in the proper bank account and Stripe is hooked up to it
5:45:57
gendl
... so i just have to get the website spun up and re-skinned (the one from Quicklisp from almost two years ago)
5:47:50
beach
By the way, McCLIM development is very active these days, in case you are looking for a fundraising target in the future.
5:49:28
gendl
well, I think if we can demonstrate some modicum of organization, there are deep-pocketed donors out there who can help us out
5:50:21
gendl
i think it'll be great to have a balance between a good number of grass-roots donors of smaller amounts, and a few deep-pocketed well-wishers who can see that their larger donations are going to good use
5:52:12
beach
Seeing no-defun-allowed, I was reminded about the importance of coming to ELS so that one can recognize the people here.
5:53:01
gendl
I still have to make the XML file to index the ELS proceedings with ACM... I didn't see a hard deadline for that so I'm hoping they'll still accept.
5:53:52
beach
no-defun-allowed: I have told you this before, but I'll say it again. I think you should do what I recommended to froggey, namely put up a crowd funding site to pay your way to ELS 2019.
5:57:03
no-defun-allowed
anyways i do need to do school work for a while, i've got to hack up a video for tomorrow
5:57:55
no-defun-allowed
- make the parallel-mapvideo buffer guess the frame count that can fit in memory instead of a fixed frame count
6:00:27
no-defun-allowed
you're expected to have a medical certificate for days off, and anything below 90% attendance or some shit is failing too
6:01:23
Shinmera
talk to your department lead if you can get the week off to attend an important (!) conference that will further your studies (!)
6:07:36
beach
OK then, first check whether it is possible, hinting that you can get a letter from me.
6:11:54
beach
Go to the head of the school. Say something like "I have become involved in the Common Lisp community, and I have received an invitation to come to ELS 2019... Would there be a possibility for me to get that week off from school?"
6:12:28
beach
no-defun-allowed: It is a common mistake to believe that the talks are the important part of a conference like this.
6:12:49
beach
The important part is to chat with the participants between talk, at lunch, at diner, etc.
6:13:42
no-defun-allowed
is it going to cost anything if i manage to get a flight there? i've never been to europe or planned much myself
6:15:52
no-defun-allowed
the school does a lot of extracurricular stuff so maybe they'll let me go for the week
6:20:22
Shinmera
The story goes that it was initially supposed to be much more lisp-like before it got rushed out the door at netscape
6:28:11
jackdaniel
"In 1995, Netscape Communications recruited Brendan Eich with the goal of embedding the Scheme programming language into its Netscape Navigator."
6:54:13
shrdlu68
"But CL implementations! What big binaries you produce", said the Little Red Riding Hood.
7:00:27
Jachy
beach: was there much overlap in speakers between ELS and <Programming> the previous time they were co-located? I assume lots of attendees of ELS would go to <Programming> while they're there, did the reverse happen too?
7:05:26
jackdaniel
Jachy: unfortunately (imho) things were happening at the same time, so nobody would want to miss ELS to attend programming
7:18:39
aeth
no-defun-allowed: iirc it depends on the format and the direction because it's just a wrapper over other things.
7:22:50
|3b|
opticl has some options for fast, but like most pixel manipulation libs is easy to use slowly :)
7:23:54
|3b|
a large part of png reading time was zlib last i checked, so need to rewrite another lib to improve it much :(
7:25:30
|3b|
ACTION wants a version that can do streaming reads, so i can just start a bunch of threads and ignore some of the speed problems :p
7:26:13
|3b|
while limiting memory usage if i happen to want to load a bunch of 4kx4k images at once or something
7:28:36
jackdaniel
lucky for us it is an opensource library which we can improve to read all of them! :)
7:28:37
no-defun-allowed
it feels slightly faster with a custom ppm writer but i'm Totally Not Biased
7:38:29
no-defun-allowed
i've tried some type definitions and i've got sbcl's (speed 3) down to 3 complaints
7:39:42
no-defun-allowed
i haven't updated cl-vep recently with new stuff but it lives [here](https://gitlab.com/Theemacsshibe/cl-vep)
7:43:23
aeth
asarch: Either you have a sequence of length 9 and by convention treat it as a 3x3 matrix or you have a (3 3) array
7:47:14
aeth
asarch: If you're using SBCL for a lot of 2D array code, SBCL 1.4.10 and later has fixes for bounds checking on 2D arrays
7:48:40
|3b|
use :report :graph (or :type :graph if you call report directly instead of just with-profiling)
7:49:31
|3b|
if you end up using it much, probably also want to install and use the slime slime-sprof contrib, easier to navigate, but harder to paste for other people to look at :)
7:50:31
|3b|
(and you probably want other people to look at it when you start out, not obvious what the various internal things indicate about your code)
7:51:20
no-defun-allowed
i'm fairly sure it's gonna be the image read/write though, i've tuned the effects very carefully
7:53:41
|3b|
also, if you are starting threads inside with-profiling, make sure you wait for them to finish before with-profiling exits
7:55:18
|3b|
ACTION usually tries to profile 5-10sec of work, so process a few images, or do one in a loop or whatever
8:00:11
no-defun-allowed
by the looks of things there are still some array references that didn't get inlined
8:09:01
|3b|
in each block, the line with #s under 'total.' (and name shifted to the left a bit) is the function being measured in that block, above it shows what called it with how much to the left
8:10:12
|3b|
and in first block you can see same info, and that mask-blend is also making full calls to +,-,*
8:12:34
no-defun-allowed
every time i run a parallel-mapvideo, it complains the worked on video is invalid and crashes
8:14:14
no-defun-allowed
also it seems i should have taken a background picture for every clip i masked
8:16:19
shrdlu68
dim: Getting "Failed to connect to pgsql...Can't resolve foreign symbol "SSL_load_error_strings""
8:21:21
no-defun-allowed
also i have to do a beach and set the heap size relatively high to get the worker->writer cache working well enough
8:25:12
|3b|
hmm, actually i guess i've been building with 16gb heap out of 32gb ram lately, i should raise that
8:34:35
shrdlu68
dim: Runnning the dimitri/pgloader container fails with "The alien function "CRYPTO_num_locks" is undefined".
8:34:37
no-defun-allowed
i do need to work on the cache though, and make it use a "maximum pixel count" instead of "maximum frame count"
8:35:27
no-defun-allowed
i also need to work on cl-decentralise but that's not doing any school projects for me
8:37:12
makomo
shrdlu68: i remember having to install an older version of SSL (1.1.0, as opposed to 1.1.1, i think)
8:37:34
makomo
and then there was the problem of cl-plus-ssl not having the correct name of the shared lib in its CFFI defs
8:38:02
shrdlu68
makomo: ..this is in the docker image, shouldn't that bundle up everything it needs?
8:40:02
svillemot
shrdlu68: you may be interested in the patch I wrote to make cl+ssl work with OpenSSL 1.1 https://sources.debian.org/src/cl-plus-ssl/20180328-3/debian/patches/openssl-1.1.patch/
8:42:32
shrdlu68
I'll maybe look at it later, right now I need a pgloader-like thing to complete some task.
8:48:29
Xof
flip214: this? <http://christophe.rhodes.io/notes/blog/posts/2018/algorithms_and_data_structures_term2/> (not complete, haven't actually done the exam analysis, argh)
8:48:30
minion
Xof, memo from flip214: please send me the link with the full results (whole year) of your 'Using Lisp-based pseudocode to probe student understanding' Moodle experiments; ISTR that you posted that in June or so. I'd like to forward that. Thanks a lot!