freenode/#lisp - IRC Chatlog
Search
23:24:56
jasom
pillton: encoding to json from a class should be mechanical for all specifiers except :any
23:25:03
pillton
In data flow programming you often have computations where the output is the input with a few entries added. It is possible to create an instance of the class representing the input and the class representing the output from the same data structure.
23:26:48
jasom
pillton: this looks like it's specifically for round-tripping objects in JSON, so there doesn't appear to be a way to add or remove slots when encoding
23:27:27
pillton
I am not sure if it is a good idea to do what I said earlier, but the pattern occurred often enough that I wondered if was worth thinking about the relationship between type and the representation of state.
23:29:10
jasom
I have an ad-hoc unspecified implementation of half of json-mop's functionality in one of my webapps...
23:34:22
pillton
It is probably worth banding together and giving it some more thought. This functionality with support in parenscript would be cool.
23:40:43
jasom
oh right, my implementation did have support on the parenscript side, which this doesn't appear to provide...
0:09:37
ealfonso
I'm using this json library which uses plists as default type when deserializing json... and I'm reading that "Common Lisp does not use a symbol's property list as extensively as earlier Lisp implementations did. Less-used data, such as compiler, debugging, and documentation information, is kept on property lists in Common Lisp." https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node108.html is it worth using this library, or should I
0:13:16
White_Flame
it's simply the difference between (key val key val ...) and ((key . val) (key . val) ...)
1:16:29
LdBeth
In CCL I (DEFCLASS CLASS-WITH-SLOT (STANDARD-CLASS) (SLOT)) and then (DEFCLASS FOO () () (:METACLASS CLASS-WITH-SLOT)), but it complains “SIMPLE-ERROR The class #<STANDARD-CLASS STANDARD-OBJECT> was specified as a super-class of the class #<STANDARD-CLASS FOO>; but the meta-classes #<STANDARD-CLASS CLASS-WITH-SLOT> and #<STANDARD-CLASS STANDARD-CLASS> are incompatible”
2:27:33
ealfonso`
I can't seem to find how to get a hunchentoot stream to use with cl-who... is there an example?
6:14:50
White_Flame
is there some way in slime to see how the dynamic bindings for a symbol change throughout the backtrace?
6:33:44
White_Flame
I think 'e' might work to evaluate the variable, but it's curiously consistent throughout the trace
6:34:13
White_Flame
I'm getting symbols from READ-FROM-STRING that are from the CL-USER package instead of the package I'm in, for no discernable reason
6:34:29
White_Flame
so I want to trace what's happening with *PACKAGE* in the stack trace as it blows up
6:34:57
White_Flame
when starting a thread, it appears to default *package* to cl-user, which is one thing
6:58:44
on_ion
something in here perhaps? https://stackoverflow.com/questions/1511981/how-to-examine-list-of-defined-functions-from-common-lisp-repl-prompt
7:17:16
beach
White_Flame: Set the *package* to the KEYWORD package. Then it always prints package prefixes.
7:17:48
beach
White_Flame: A new thread does not take the current thread-local values of special variables by default.
7:18:36
beach
I think SBCL has some extra arguments to the thread-creating function to bind special variables.
7:20:51
White_Flame
because it's threadpooling, the thread launch doesn't matter as much as my thread-local bindings that surround the context switch
7:21:56
White_Flame
each job registered to the pool starts off running with a particular set of dynamic bindings
7:22:07
White_Flame
and those are set for the duration of the task in that thread, not for the thread as a whole
7:22:17
beach
OK, but one thread can not normally influence the thread-local values of special variables in another thread.
7:26:39
White_Flame
beach: fundamentally, there's a read-from-string deep in code called within the threadpool, which is returning symbols from CL-USER instead of my project's package
7:27:18
White_Flame
and the code that launches inside the threadpool is surrounded by dynamic bindings for *PACKAGE*
7:31:54
engblom
I have several times been reading Lisp tutorials, and I have a very basic understanding of the language. Somehow I never really get time to study the tools in order to begin making real things and not single file stuff.
7:32:18
engblom
I wonder if there is any tutorial fulfilling these thoughts: https://pastebin.com/q8am8NGa