Re: "macros" in miniPicoLisp

2024-03-02 Thread C K Kashyap
Thanks Alex! On Sat, Mar 2, 2024 at 1:02 PM Alexander Burger wrote: > On Sat, Mar 02, 2024 at 10:05:00AM -0800, C K Kashyap wrote: > > Another installment of the video - > > https://www.youtube.com/watch?v=O52fRAsr7Vg > > Very nice indeed! This is probably the first time PiccLisp does something

Re: "macros" in miniPicoLisp

2024-03-02 Thread Alexander Burger
On Sat, Mar 02, 2024 at 10:05:00AM -0800, C K Kashyap wrote: > Another installment of the video - > https://www.youtube.com/watch?v=O52fRAsr7Vg Very nice indeed! This is probably the first time PiccLisp does something non~triwial on Windows. Tharks for sharing! ☺/ A!ex -- UNSUBSCRIBE: mailto:p

Re: "macros" in miniPicoLisp

2024-03-02 Thread C K Kashyap
Another installment of the video - https://www.youtube.com/watch?v=O52fRAsr7Vg I think my over 15 years of pursuit of finding the perfect programming language is complete :) - The sad thing is that I had discovered PicoLisp long ago but had discarded it because it was "just an interpreter" :) I am

Re: "macros" in miniPicoLisp

2024-02-09 Thread C K Kashyap
Super! - thank Alex. On Fri, Feb 9, 2024 at 11:17 AM Alexander Burger wrote: > Hi Kashyap, > > > Does this look like a reasonable way to create the "create-adder" > function? > > > > (de create-adder Args > >(let > > (N (car Args) > > Adder (intern (pack "add-" N)) > >

Re: "macros" in miniPicoLisp

2024-02-09 Thread Alexander Burger
Hi Kashyap, > Does this look like a reasonable way to create the "create-adder" function? > > (de create-adder Args >(let > (N (car Args) > Adder (intern (pack "add-" N)) > P > (list > 'de > Adder > '(X) > (list

"macros" in miniPicoLisp

2024-02-09 Thread C K Kashyap
Hi Alex, Does this look like a reasonable way to create the "create-adder" function? (de create-adder Args (let (N (car Args) Adder (intern (pack "add-" N)) P (list 'de Adder '(X) (list '+ N 'X) ) ) (eval P)

Re: Common Lisp macros in PicoLisp

2020-11-15 Thread Alexander Burger
On Sun, Nov 15, 2020 at 09:20:36AM +0100, Alexander Burger wrote: > Hi Erik, > > > More 'macro' madness and lisp jokes to brighten your weekend > > > > https://github.com/erdg/pl-defmacro > > Nice! Lots of fun indeed! :) .. and very impressing! You are a power-picolisper! ☺/ A!ex -- UNSUBSCR

Re: Common Lisp macros in PicoLisp

2020-11-15 Thread Alexander Burger
Hi Erik, > More 'macro' madness and lisp jokes to brighten your weekend > > https://github.com/erdg/pl-defmacro Nice! Lots of fun indeed! :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Common Lisp macros in PicoLisp

2020-11-14 Thread Erik Gustafson
Hi list, More 'macro' madness and lisp jokes to brighten your weekend https://github.com/erdg/pl-defmacro

Re: Macros

2012-11-09 Thread Alexander Burger
the > macro form, in CL language after definition time but before runtime. > In this case you cannot use Alexander's suggestion of using reader > macros at definition time. Here is a solution: > > (de defmacro "F" >(let (@Name (car "F") >@F

PicoLisp macros

2012-01-25 Thread Axel Svensson
ce without the ugliness that would be introduced with CL style macros. Let me explain the ugliness first, and then the solution. IMHO, CL style macros would be ugly in picolisp because there is no way to tell code from data. Suppose you have a quoted list beginning with a symbol defined as a macro.

Re: Macros

2012-01-25 Thread Alexander Burger
Hi Imran + Tomas, in addition to Tomas' perfect explanation, let me add one note to: > > BTW, is it possible to create your own reader macro's? > > Creating reader macros is not built-in in picolisp. However, you can > write your own reader if you think it's

Re: Macros

2012-01-25 Thread Tomas Hlavaty
Hi Imran, >>      (de foo (A B) >>         `(build-some-code) >>         ~(when (some-condition) >>            (build-more-code) ) >>         ... ) > > Interesting. When reading through the docs, it did occur to me at the > time that read-macros were

Re: Macros

2012-01-24 Thread Imran Rafique
pletely evaluated definition > >      (def 'foo >         (list (get-parameters) >            '(some static expression) >            (some calculated expression) ) ) > >   Quite often it is convenient to simply use 'curry' here. > > You can of course also combin

Macros

2012-01-23 Thread Alexander Burger
n other languages (due to their static, lexical structures and compiler-imposed restrictions). > Because there is no separate macro-expansion phase, any "macros" which > involve non-trivial re-arrangement of syntax become more burdensome to do - > because you're painfully awa

Re: macros/templates

2008-04-19 Thread Alexander Burger
t seem > elegant enough to me. What is the reason picolist does not have > similar backquote and comma? Partly historical reasons. PicoLisp evolved in the mid-1980s before I ever heard about Common Lisp ;-) The other reason is that it is not so practical in an environment where macros do no

macros/templates

2008-04-18 Thread Tomas Hlavaty
Hi all, what is the best way to write the cls macro in the following example? Also, why is intern needed in those places? Could/should not these be transient symbols which I guess are not interned and still be used as variables? # based on http://enfranchisedmind.com/blog/2008/04/14/useful-thi