99 Smiley's ahead :)

Started by newdep, April 26, 2005, 01:39:32 AM

Previous topic - Next topic

Lutz

#15
I think you mean:



(define-macro (:-) (silent (print (string ":-" (first (args))))))

> (:- |)

:- |



because (args) takes only the unassigned arguments, so you have to throw out the 'x. This was a changed in 8.4.2, previously (args) returned all arguments.



Also, why do you use a macro for this? It would only be necessary when passing symbols directly, as in my example.



I did not understand the last question. Do you want to call your fuinction/macro recurselvy? you can do that.



Good to hear from you Excalibor, a lot of folks are very happy with with your newlisp.vim.



Lutz

Excalibor

#16
Quote from: "Lutz"I think you mean:



(define-macro (:-) (silent (print (string ":-" (first (args))))))

> (:- |)

:- |



because (args) takes only the unassigned arguments, so you have to throw out the 'x. This was a changed in 8.4.2, previously (args) returned all arguments.


Aahh... that's why I had to throw the 'x out (I'm using the last development version, 8.5.4; btw, I like the indexing thing! :-)


Quote
Also, why do you use a macro for this? It would only be necessary when passing symbols directly, as in my example.


Just because... :-) It adds to the sum, still way below the proposed 99, but two less than before... Also, it was an opportunity to keep playing with macros... I'm still thinking in writing a newLISP tutorial that's both useful and fun, but I'm very short of time... Thus I jumped to the last version, and I'm exploring all the changes, lots of them, newlisp is keeping you busy! also, congrats for the korozu.com success, I'm sure it will give newlisp a great boost and lots of exciting new functionality and documentation...


Quote
I did not understand the last question. Do you want to call your fuinction/macro recurselvy? you can do that.


actually I want to call the macro without the parens :-)



think about a DSL written on newlisp, it will help to get the parens off the way, to make things easier for others... of course, a parenthetical dsl "enhancing" newlisp would be cool by itself, and that's probably what I would do... but I remember a common lisp tutorial, writting a small game, that managed to get rid of the parens by using macros... i know CL macros are not NL's, but it never hurts to ask :-)


Quote
Good to hear from you Excalibor, a lot of folks are very happy with with your newlisp.vim.



Lutz


thanks, i've been pretty busy the last months, thus i just walked around the fora, but didn't have time to work on it... i will try to get a newlisp.vim based on 8.5.4 this weekend... no promises, but it's feasible :-)



take care and congrats for a great tool,

dvd

Lutz

#17
newLISP does not have a 'reader macro function', which could change the behaviour of the source code reader, which is hardcoded in newLISP (and very fast). so there is no ways to get rid of our beloved parenthesis.



An updated newlisp.vim is always included in the source distribuition in the doc directory, I always have been making changes to it as they came up. But it would be good to update it on your web site, as many people run into you site and get it from there.



Lutz

Excalibor

#18
Quote from: "Lutz"newLISP does not have a 'reader macro function', which could change the behaviour of the source code reader, which is hardcoded in newLISP (and very fast). so there is no ways to get rid of our beloved parenthesis.


OK, I was just wondering... I don't dislike parentheses, they are pretty useful ;-)  (see? :-)


Quote
An updated newlisp.vim is always included in the source distribuition in the doc directory, I always have been making changes to it as they came up. But it would be good to update it on your web site, as many people run into you site and get it from there.



Lutz


Done (corrected the version number within the file)



I was thinking in adding some more support for different kinds of things still pending, and if we fix on an autoindent policy, implementing it so it makes autoindent as well...



but it's a bit tricky, so I may fail again, i'll let you know, anyway...



laters!