re: My opinion re LISP #21410 (4/16/2013 3:49:42 PM) comp.lang.lisp Gareth McCaughan wrote:
> Oh, and if we're playing the intuitive-appeal-to-novices
> game, consider
>
> (loop for n from 1 upto 10 sum n) ==> 55
>
> and try to find another language in which th... WJ
Re: simple lisp function #2012 (4/9/2013 10:44:11 PM) comp.lang.lisp A monkey (Peter Seibel ) wrote:
> Did someone say LOOP?
>
> (defun variations (x list)
> (loop for cons on (cons nil list) collecting
> (nconc (ldiff list (cdr cons)) (cons x (cdr cons))... WJ
Re: Excerise in Graham's ANSI Common Lisp013 (3/8/2013 4:56:47 AM) comp.lang.lisp Rob "Peacock" Warnock wrote:
> (defun hash-table-alist (table)
> (let (result)
> (do-hash (key value table result)
> (push (cons key value) result))))
>
> One can also do it... WJ
Re: efficiently accumulating values015 (3/8/2013 4:28:58 AM) comp.lang.lisp Giorgos Keramidas wrote:
> LOOP is clever enough to do this in a simpler way:
>
> CL-USER> (defun foo (num)
> (* num 10))
> FOO
> CL-USER> (loop for k below 10
> ... WJ
Re: How to write binary data to standard out?015 (2/26/2013 8:46:38 PM) comp.lang.lisp Rob Warnock wrote:
> Plain ol' MAP should also work:
>
> > (map 'vector 'char-code "Hello World!")
>
> #(72 101 108 108 111 32 87 111 114 108 100 33)
Clojure:
user=> (mapv int "hello")
[... WJ
Re: Lis(t|p) comprehensions #2014 (2/25/2013 8:50:14 PM) comp.lang.lisp Frank Buss wrote:
> joswig@corporate-world.lisp.de wrote:
>
> > For combinations of this kind of stuff I really prefer the functional
> > approach:
> > CL-USER 5 > (remove-if-not 'oddp '(1 2 3))
> > (1... WJ
Re: With format, how to print a variable number of spaces #3315 (2/24/2013 11:30:34 AM) comp.lang.lisp Frank Buss wrote:
> > I have another 'format' question: say I have a list of key/value
> > pairs, in an alist:
> > '((foo 3) (bar 2) (baz 10))
> >
> > Can I use format with the list iteration oper... WJ
Re: With format, how to print a variable number of spaces #2210 (2/23/2013 3:07:21 AM) comp.lang.lisp Rob "Peacock" Warnock wrote:
> Pascal Bourguignon wrote:
> +---------------
> | Kent M Pitman writes:
> | > So if you do:
> | > (defun spaces (n) (format nil "~V{ ~}" n '(IGNORED)))
> | > you'll ge... WJ
concatenating 2 lists1016 (3/27/2013 11:53:53 AM) comp.lang.lisp Hello.
Suppose I've two lists of symbols, for example:
'(a b c d) '(1 2 3 4). I wan't to concatenate it: '(a1 b2 c3 d4).
How can I do very simply & very quickly in cl?
thanks.
... kelsar777(5)
What is this dolist doing? #21410 (4/2/2013 12:06:53 AM) comp.lang.lisp What is dolist doing on line #3? What is "n", "numbers" and "prod"? I'm not following _all_ of the flow of the logic of this method.
http://bin.cakephp.org/view/1503298950
... yoursurrogategod(101)
Using mapcar with fewer lists than function arguments336 (4/12/2013 6:35:49 PM) comp.lang.lisp Noobish question.
I've been working on a toy project as an excuse to learn Lisp, and I've com=
e up with the following situation:
I want to mapcar a function over some lists, but I don't have as many lis... grmann1123(9)
re: My opinion re LISP #21410 (4/16/2013 3:49:42 PM) comp.lang.lisp Gareth McCaughan wrote:
> Oh, and if we're playing the intuitive-appeal-to-novices
> game, consider
>
> (loop for n from 1 upto 10 sum n) ==> 55
>
> and try to find another language in which th... w_a_x_man(2778)
De re and de dicto readings of a variable73 (4/29/2013 9:57:18 PM) comp.lang.lisp Hi,
I have a problem with which I am stuck (probably it is obvious).
I have defined a defstruct like the following, where the slot-values are
lists:
CL-USER> (defstruct a (b '(1 2)) (c '(3 4)) (d '(5... feldspat(10)
What is symbolic compoutation?73 (5/6/2013 5:22:46 PM) comp.lang.lisp I posted this question on SO: http://stackoverflow.com/questions/16395704/what-is-symbolic-computation/16401387?noredirect=1#16401387 , but there are only a few answers so far. Please help.
... solidius4747(12)
newlisp33 (5/8/2013 2:14:31 PM) comp.lang.lisp In the same vein as the thread about PicoLisp, does anyone here use
newlisp and have any opinions on it?
I am intrigued by its support for building guis right out of the box,
although I should caveat tha... Milkman1(6)
Racket22 (5/10/2013 3:57:34 AM) comp.lang.lisp I've been playing with Racket more lately and I'm struggling with macros.
define-syntax-rule is simple and beautiful compared to defmacro, but I'm st=
ruggling to get more advanced functionality out of it. ... nbeenken(5)
Permuting array rows132 (5/17/2013 7:15:52 AM) comp.lang.lisp I posted this to /r/common_lisp, but nobody seemed interested, so I thought I'd try this turf.
I have some array rows I'd like to permute; I'd like a function/macro
> (setf A (make-array '(3 6) :initial-... jasonsewall(12)