freenode/#lisp - IRC Chatlog
Search
22:05:31
jgkamat
does anyone know if it's possible to attach some data to a function somehow? Like a marker or something, on the function itself.
22:08:29
krwq
jgkamat: I think people usually use hash-table and define a macro which auto-adds something there
22:10:39
jgkamat
in python, you can do it. Basically function.data = "foo" and "foo" == funciton.data. Maybe something like (getf #'my-function 'data)
22:15:58
saturn2
jgkamat: there are funcallable-instances http://metamodular.com/CLOS-MOP/funcallable-instances.html
22:17:50
krwq
you can define two functions in the same closure and call one of them and use other one to retrieve data
22:20:47
Jachy
jgkamat: Property lists? (defun fun-foo () ...) (setf (get 'fun-foo 'data) "foo") (get 'fun-foo 'data) ;-> "foo"
22:25:12
jgkamat
hmm, actually, is there a way to pass the function instead of a symbol in to get the data
22:49:59
Jachy
jgkamat: Maybe the other way around, see what defun/function/symbol-function are doing ;) I suppose you could add a wrapper that asserted that the given symbol was fboundp if you wanted to make sure you can also associate a function from the symbol.
5:26:22
gjvc
I am using emacs and slime. (merge-pathnames "myfile-.xml" *compile-truename*) is returning something in /tmp not in my source directory
5:44:15
loke`
gjvc: I recommend you do create an ASD file and then load the project through Quicklisp
8:59:45
heisig
The ELS'18 recordings are finally available: https://29660.net/2018-04-european-lisp-symposium.html
9:13:48
aeth
"good morning" at 00:41 https://29660.net/els2018/sound/01%20-%201200%20-%20IncrementalParsing%20-%20RobertStrandh_mono.mp3
9:16:59
schweers
Cool, thanks for these heisig! Also obviously a big thanks to everyone who contributed to this.