Search found 10 matches

by gutzofter
Thu Dec 18, 2008 9:37 am
Forum: Common Lisp
Topic: changing argument variables
Replies: 10
Views: 19650

Re: changing argument variables

Why not do this:

Code: Select all

(let ((y 6))
  (defun reset-y ()
    (setf y 6))
  (defun set-y (x)
    (setf y x))
  (defun get-y ()
    y))
It looks like what your doing is describing an object that has three functions. A a reset, setter, and a getter.
by gutzofter
Thu Dec 18, 2008 1:01 am
Forum: Common Lisp
Topic: lambda lists
Replies: 5
Views: 9927

Re: lambda lists

WooHoo! I did it! (defmacro make-prop (name args) (let ((g (gensym)) (r-args (flatten (remove-keywords args)))) `(progn (defun ,name (obj &rest ,g) (block ,name (destructuring-bind ,args ,g (declare (ignorable ,@r-args)) (apply (getf obj ',name) ,g))))))) Note this is only REPL tested, not unit ...
by gutzofter
Wed Dec 17, 2008 12:27 pm
Forum: Common Lisp
Topic: lambda lists
Replies: 5
Views: 9927

Re: lambda lists

@Harleqin Yes, I would say your right about Java and C#. If you look at my blog you can see some of my experiments with an object framework. I've learned a lot of Lisp because of this. Instead of doing book examples I thought I would get out there. What I'm driving towards is framework that doesn't ...
by gutzofter
Wed Dec 17, 2008 12:27 pm
Forum: Common Lisp
Topic: lambda lists
Replies: 5
Views: 9927

Re: lambda lists

@S11001001 'destructoring-bind' handles lambda-lists (lists with keyword paramters?). (destructuring-bind (&key a) '(:a 1123) (print a)) The output: 1123 1123 The macroexpand-1: (LET ((#:WHOLE1043 '(:A 1123))) (DECLARE (TYPE LIST #:WHOLE1043)) (LET* ((#:KEYWORDS-1045 #:WHOLE1043)) (DECLARE (SB-E...
by gutzofter
Tue Dec 16, 2008 9:40 am
Forum: Common Lisp
Topic: lambda lists
Replies: 5
Views: 9927

lambda lists

As of right now I'm creating my own objects. I also use macros to automatically create those objects. The object is specifically a list composed of properties and their access functions: (defun make-obj () (let ((data :my-whatever)) (list :get-data (lambda () data) :set-data (lambda (d) (setf data d...
by gutzofter
Mon Dec 15, 2008 9:52 am
Forum: Common Lisp
Topic: Creating args from list
Replies: 6
Views: 16022

Re: Creating args from list

That is exactly what I was looking for. I'm use to doing funcall. Woohoo this should work!

Thanks a bunch!
by gutzofter
Wed Dec 03, 2008 12:49 am
Forum: Common Lisp
Topic: Common Lisp Bloggers
Replies: 10
Views: 18993

Common Lisp Bloggers

What are your Blogs?
by gutzofter
Thu Jul 03, 2008 5:17 pm
Forum: Common Lisp
Topic: Best way to start on Windows : need advices
Replies: 13
Views: 34928

Re: Best way to start on Windows : need advices

I use an Eclipse plug-in called CUSP

http://bitfauna.com/projects/cusp/

So far it is working out great.

The back-end is SBCL
by gutzofter
Thu Jul 03, 2008 5:03 pm
Forum: Common Lisp
Topic: What are you doing in Common Lisp lately?
Replies: 26
Views: 64272

Re: What are you doing in Common Lisp lately?

A Synchronous Event Framework. It will store closures in a hash. It will also be multi-broadcast, Each event can have more than 1 listener.
by gutzofter
Thu Jul 03, 2008 4:59 pm
Forum: Common Lisp
Topic: How do I install Hutchentoot using Corman CL or SBCL/Win32?
Replies: 2
Views: 11674

Re: How do I install Hutchentoot using Corman CL or SBCL/Win32?

I had some issues with hunchentoot's latest tarball. Luckily I was using CUSP, an eclipse plug-in (sbcl is the backend), so I used the version of hunchentoot that comes with it.