freenode/#lisp - IRC Chatlog
Search
7:21:38
faheem
You should definitely try and write up some of it. Even a rough draft would be helpful. On Github or whereever.
7:21:59
faheem
You could ask for comments/feedback. AFAIK there isn't such a thing as a performance guide for CL>
7:32:59
aeth
I think you'd get a lot of people complaining about a performance guide, though, because it's fairly necessarily SBCL-specific, although a lot of it would/could also apply to implementations like CCL and probably will never apply to implementations like CLISP and basically are impossible to apply to JSCL (a JavaScript CL attempt)
7:34:08
aeth
People love portability, although a "performance guide" really just a bunch of workarounds that might just slightly slow things down on other implementations rather than e.g. a guide to SBCL's define-vop like this https://pvk.ca/Blog/2014/08/16/how-to-define-new-intrinsics-in-sbcl/
8:03:02
seok
How is session managed in caveman2 when stored in memory, i.e, do I need to manage destruction to avoid overloading
8:30:30
faheem
aeth: I think if you want performance, portability would have to take a back seat. Though of course portability is desirable.
8:31:17
faheem
Documentation is a big problem, across the board. For much of the free software ecosystem.
8:31:49
faheem
It can be quite frustrating, having these powerful tools and not knowing how to use them.
12:17:56
jmercouris
hi guys, I am having a bit of a mental block here, let's say I have list like this (list 0 1 2 (my-fun 10)), how can I get the evaluated list where (my-fun 10) --> 10
12:22:03
ck_
maybe you want (mapcar (lambda (elt) (if (and (listp elt) (functionp (first elt))) (apply 'funcall elt) elt)) list)
12:23:19
jmercouris
however I want to store the unevaluated, aka quoted from of the list, and then the evaluated form of the list
12:24:29
jmercouris
I want to store the unevaluated form as well because if I change some of the functions, I would like the new output
12:41:46
pjb
(defun my-fun (x) 10) (let ((have-list '(list 0 1 2 (my-fun 10)))) (eval (first (last have-list)))) #| --> 10 |#
12:43:31
pjb
jmercouris: on the other hand, if you want to save both the unevaluated form and the evaluated form, perhaps eval is what you want. Unless you need access to the lexical environment, in which case a macro might be preferable.
12:45:54
pjb
(defmacro save-form-and-value (form stream) (let ((value (gensym)) (vstream (gensym))) `(let ((,value ,form) (,vstream ,stream)) (print ',form ,stream) (print ,value ,stream)))) (save-form-and-value (+ 1 2) *standard-output*) #| (+ 1 2) 3 --> 3 |#
12:46:38
pjb
jmercouris: have a look at DRIBBLE (some implementations write both the form and the values).
13:12:35
beach
Also, you can't be sure that people here know Java, so you need to explain what it is you want to do.
13:19:01
beach
bzp: If you want to learn Common Lisp, people here are more than willing to help, but it doesn't look like you do, so I am guessing it is unlikely that you will find someone to do this for you here.
13:19:23
ck_
bzp: I tried! Unfortunately, I failed at the first line :-( I don't know how to import java.util.* in Common Lisp
13:21:28
_death
here you go: (let ((a (make-array (list (read) (read))))) (map-into (make-array (reduce #'* (array-dimensions a)) :displaced-to a) #'read) (print a)) ;; HTH
13:28:53
ck_
bzp: okay -- you said you tried your hand at implementing it in common lisp. Can you show that code, please?
13:59:10
minion
bzp: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).