Search found 117 matches

by Warren Wilkinson
Sat Jan 08, 2011 1:50 pm
Forum: Common Lisp
Topic: I just release a fastcgi toolkit (sb-fastcgi) for SBCL
Replies: 6
Views: 3745

Re: I just release a fastcgi toolkit (sb-fastcgi) for SBCL

I haven't had time to look right yet, but how does it compare to using mod-lisp? I'm guessing more portable to other web servers --- would it be faster? mod-lisp has really easy communication -- is this harder or simpler?
by Warren Wilkinson
Sat Jan 08, 2011 1:46 pm
Forum: Common Lisp
Topic: Cartesian product of 2 lists which is NOT dependent
Replies: 8
Views: 9083

Re: Cartesian product of 2 lists which is NOT dependent

@trillioneyes -- The problem isn't in how the list is built, but due to the reuse of (y 1) in many parts of it. Take a look at this: (in-package :cl-user) (defun product (fn a b) (mapcan #'(lambda (x) (mapcar #'(lambda (y) (funcall fn x y)) b)) a)) (defvar *first* '((1 (X 1)) (1 (Y 1)))) (defvar *se...
by Warren Wilkinson
Wed Jan 05, 2011 1:21 pm
Forum: Common Lisp
Topic: Cartesian product of 2 lists which is NOT dependent
Replies: 8
Views: 9083

Re: Cartesian product of 2 lists which is NOT dependent

Are list1 and list2 just lists of atoms? If so, then the result is fresh, there should be no shared structure. When you alter a part of the results, only that part of the result should change. Some destructive alterations can be a bit tricky to use for example: (setf *a* '((a b c) (3 2 1) (four five...
by Warren Wilkinson
Wed Jan 05, 2011 12:24 pm
Forum: Common Lisp
Topic: 2D graphics/turtle lib suitable for kids?
Replies: 17
Views: 19455

Re: 2D graphics/turtle lib suitable for kids?

Different strokes for different folks, but I would have found that tedious and painful. LOGO is beautiful, because once you write a few routines you can use those to draw stick figures and other simple objects, and if you have something more complete at your disposal (like SDL gives) you can grow f...
by Warren Wilkinson
Sun Jan 02, 2011 12:02 pm
Forum: Common Lisp
Topic: 2D graphics/turtle lib suitable for kids?
Replies: 17
Views: 19455

Re: 2D graphics/turtle lib suitable for kids?

I think Duke's idea is a good one (if you have the time). I discovered programming through Basic, because I could put it into mode 13h and draw pixels. I think pixel plotting is probably an easier starting point than rotation, recursion and line drawing. Were it me, I'd probably use SDL to create a ...
by Warren Wilkinson
Sat Jan 01, 2011 3:57 am
Forum: Common Lisp
Topic: I think I found an SBCL bug, would somebody run this for me?
Replies: 3
Views: 2393

Re: I think I found an SBCL bug, would somebody run this for me?

I got a response back from SBCL maintainters: Reading the source (or the disassembly, which you might find more transparent), you're supposed to pass a full word to the *-fill functions. For instance, you could pass (* #xAD #x0101010101010101) instead of #xAD. The ub8, ub16, etc. variants are still ...
by Warren Wilkinson
Fri Dec 31, 2010 7:14 pm
Forum: Common Lisp
Topic: I think I found an SBCL bug, would somebody run this for me?
Replies: 3
Views: 2393

Re: I think I found an SBCL bug, would somebody run this for me?

It seems SBCL on x64 is byte-alignment sensitive. I've had to change my system-area-ub32-copy's over to system-area-ub8-copy to get my tests to pass. I'm running SBCL 1.0.44.gentoo-r0. Just a heads up for anybody who loves system-area-pointers as much as I do.
by Warren Wilkinson
Thu Dec 30, 2010 2:05 pm
Forum: Common Lisp
Topic: I think I found an SBCL bug, would somebody run this for me?
Replies: 3
Views: 2393

I think I found an SBCL bug, would somebody run this for me?

This code uses C to malloc 32 bytes of memory. Then I use system-area-ub32-copy and system-area-ub32-fill. The behavior of FILL is incorrect I think (in these tests, I think it should give the same output as the copying). (defvar *sap* (alien-funcall (extern-alien "malloc" (function system-area-poin...
by Warren Wilkinson
Thu Dec 30, 2010 2:01 pm
Forum: Common Lisp
Topic: A simple Lisp program
Replies: 16
Views: 7540

Re: A simple Lisp program

According to the Xlisp documentation, (format t "a string") should print the string. The reason I had you add format statements everywhere was so that we could trace the flow of execution. If XPlus isn't printing the format statements, and you don't know why, you should probably seek face time with ...
by Warren Wilkinson
Thu Dec 30, 2010 12:48 pm
Forum: Common Lisp
Topic: A simple Lisp program
Replies: 16
Views: 7540

Re: A simple Lisp program

How does that look? It would give you a compilation error because (state) isn't a function [hint: it's a variable]. Heres what I want you to do. Add, as the first line, this line of code to every function: (format t "~%Function: xxx") Replace xxx with the name of the function. Then when you run you...