libera/#commonlisp - IRC Chatlog
Search
12:55:22
jmercouris
is there a way to actually obtain `(lambda () (print "tomatoes are great"))` from xyz?
13:01:29
Bike
in general the source of a function still isn't going to be enough to serialize it, e.g. for closures
13:13:45
polygon-op
being able to see the source code of the commercial system doesn't mean that it could be copied (that would depend on the license)
13:25:46
jmercouris
is there a way to see who has a reference to something preventing it from being GC'd?
13:28:19
beach
If you track everything, you are pretty much preventing it from being garbage collected, unless you use weak references.
13:30:57
Bike
what the thing i'm recalling does is give you a path from roots to a given object. since the object you're looking for is already alive for some reason, you're not making it any more impossible to collect
13:39:52
_death
(setf (gethash path *data-paths*) path) <- the hash table is weak only on keys.. if the value is path, then it defeats the purpose
17:29:20
jcowan
Indeed, in mainframe days (when clanking iron dinosaurs ruled the Earth), most customers got source under NDA, because they expected to customize it.
17:37:04
Bike
replace behaves normally if the source and destination are the same sequence, though not if array displacement causes sharing
17:46:44
Bike
there are some array libraries, but i've never personally needed them, so i can't tell you much there
17:47:56
aeth
most array libraries are going to be restricted to popular uses of arrays, such as FFI and/or graphics/lin-algebra
17:49:59
jcowan
My first attempt to define an array library for Scheme (with arrays implemented on top of vectors, which are primitive) followed CL closely.
17:50:28
_death
if it's a single row or so, you could use displaced arrays.. Lisp Machine Lisp also had conformal arrays
17:50:54
jcowan
Then along came Brad Lucier, a *real* array user, who said "No, no, that's all wrong!" and designed a really compelling library, with things like read-only arrays, a bunch of composable affine transfomers (a long chain runs just as fast as a single transformerP, lazy mapping, etc. etc.
17:51:52
jcowan
you can also provide an arbitrary getter (and optionally a setter) and get an array defined by them plus the shape, so it can do anything you want.
17:51:52
dieggsy
jcowan heck yeah i love his array library, i posted it to chicken. unfortunately i haven't schemed in a couple months cause my job is taking all of my brain energy
17:54:07
Josh_2
Does the :type key in defclass mean that every time I set the value of that slot it gets type checked again?
19:21:50
Josh_2
Okay before I make an issue on github I was wondering if anyone could spot the problem I am having with postmodern
19:23:06
Josh_2
here is my code https://plaster.tymoon.eu/view/2544#2544 basically when I run (find-user ...) in my repl I get a user returned, however when it is being called from a http request find-user is completely stalling, I tried pomo:query with the :dao key and it happens, but when I remove the :dao key I get a response
19:26:27
Josh_2
If I just use a toplevel connection with postmodern the call to (find-user ..) gets completely stuck and I have to restart my image
19:28:31
Josh_2
but find-user works perfectly with the exact same arguments when called in my repl :(
19:32:40
Josh_2
Yes (find-user.. ) works at the top level when I wrap it with a (pomo:with-connection ..)
19:36:26
Josh_2
It works when I call authorize-login-page but it doesn't work when its called by Hunchentoot