Search found 15 matches

by Ali Clark
Thu Jan 29, 2009 5:23 pm
Forum: Scheme
Topic: What's wrong with my hygienic Lisp macros?
Replies: 1
Views: 5255

Re: What's wrong with my hygienic Lisp macros?

Still no comment? Well anyway I thought it might be a good idea to show the actual code that would be used... (add-hygienic! list) ; Makes a new gensym, g0, and adds an entry for 'list -> 'g0 in a hash table, then expands to (define g0 list) (define-macro (my-foo x) `(,(hs 'list) ,@x)) ; Retrieve th...
by Ali Clark
Sun Jan 25, 2009 7:32 pm
Forum: Scheme
Topic: What's wrong with my hygienic Lisp macros?
Replies: 1
Views: 5255

What's wrong with my hygienic Lisp macros?

Hi there, I started learning Scheme after I'd learned a bit about Common Lisp. I found the Scheme hygienic macros difficult to do more advanced stuff like write macros that write macros and partly because of the system getting confused by different levels of pattern matching. It got ugly. So now I j...
by Ali Clark
Sun Jan 25, 2009 7:07 pm
Forum: Scheme
Topic: variable not acceptable
Replies: 1
Views: 4412

Re: variable not acceptable

I ran your code in gambit and got the following error: > (make-product 'x 2) *** ERROR IN product?, UNKNOWN@288.13 -- Unbound variable: atom? That's easy enough: > (define (atom? x) (not (list? x))) > (make-product 'x 2) (x * 2) Does that fix it? I'm surprised if your interpreter didn't mention atom...
by Ali Clark
Sun Jan 11, 2009 12:44 pm
Forum: The Lounge
Topic: How does defmacro expansion in Scheme and Common Lisp work?
Replies: 2
Views: 4283

Re: How does defmacro expansion in Scheme and Common Lisp work?

Thanks for your reply, I think that clears it up well for me. I've tried to use the Schemey hygienic macros, but found it pretty hard to write powerful macros using them. Besides which, I think I might have found a way to write hygienic lisp style macros in Scheme - so long as the macros used to def...
by Ali Clark
Sat Jan 10, 2009 4:08 pm
Forum: The Lounge
Topic: How does defmacro expansion in Scheme and Common Lisp work?
Replies: 2
Views: 4283

How does defmacro expansion in Scheme and Common Lisp work?

Hi, I've been trying to use a "defmacro" form in some Scheme code lately, and it appears that Scheme defmacro doesn't have access to run-time bindings (at least not in MzScheme or Gambit), so to get my macros to work in Gambit, I need to have a repl open and insert the run-time code before the defma...
by Ali Clark
Tue Oct 14, 2008 3:06 am
Forum: The Lounge
Topic: What feature would you most like to see in Lisp?
Replies: 43
Views: 48264

Re: What feature would you most like to see in Lisp?

Please can we stay on topic?

There are many implementations of Lisp in C, and there are implementations of Lisp in JVM and .NET . We can all have our cake and eat it.

The discussion on this raises interesting facts, but I'm not sure it is going anywhere.
by Ali Clark
Tue Oct 07, 2008 4:52 pm
Forum: The Lounge
Topic: What feature would you most like to see in Lisp?
Replies: 43
Views: 48264

Re: What feature would you most like to see in Lisp?

This thread was started in part to try to give an avenue to let off steam for exactly that. Its an informal note on the internet for the things that a modern lisp needs but doesn't currently have. People should draw their own conclusions from the thread, but what I gathered was that there are more t...
by Ali Clark
Tue Oct 07, 2008 3:22 pm
Forum: The Lounge
Topic: What feature would you most like to see in Lisp?
Replies: 43
Views: 48264

Re: What feature would you most like to see in Lisp?

It also has potential to attract people like me who desperately want to use Lisp but who find Common Lisp to be showing its age and lacking in many areas. Are the problems in CL really too much to solve retrospectively? Surely the language itself wouldn't prevent CL from adopting things from more m...
by Ali Clark
Mon Oct 06, 2008 12:17 pm
Forum: The Lounge
Topic: What feature would you most like to see in Lisp?
Replies: 43
Views: 48264

Re: What feature would you most like to see in Lisp?

Not sure which has the best support, but from the cliki threads page at http://www.cliki.net/thread

Bordeaux-threads seems to support a couple of implementations and was last updated in July.
http://common-lisp.net/project/bordeaux-threads/
by Ali Clark
Mon Oct 06, 2008 6:18 am
Forum: The Lounge
Topic: What feature would you most like to see in Lisp?
Replies: 43
Views: 48264

Re: What feature would you most like to see in Lisp?

Certainly not a pipe-dream. You need a C header parser like cparse (http://common-lisp.net/project/cparse/), and the FFI ofcourse. From there you should be able to do something like (printf ...). The #include ... statement can be implemented through a reader macro. The < ... > path delimiters could ...