Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kib2

#1
Anything else we might add? /
December 07, 2008, 03:27:11 PM
Maybe you can try to implement pegs in newLisp, there's already some Scheme/CL implementations given here :



http://pdos.csail.mit.edu/~baford/packrat/">//http://pdos.csail.mit.edu/~baford/packrat/
#2
newLISP in the real world /
December 02, 2008, 08:16:07 AM
Thanks for all your replies,



newdep : &rest and &optional were exactly what I was looking for. Now I need to test "args" within newLisp.



Lutz : this is a great example of a macro use : thanks for it !



Do you think such a markup langage http://www.nongnu.org/skribilo/">//http://www.nongnu.org/skribilo/ can be implemented in newLisp? In fact, that's what I want to do as a first project (with less features), but maybe I'm too pretentious/ambitious.
#3
newLISP in the real world / functions parameters
December 02, 2008, 04:05:59 AM
Hi,



I just wanted to know how to handle functions parameters in newLisp, in particular those ones (I only saw optionnal parameters in the docs):



- rest parameters;

- keyword parameters;



Thanks.
#4
Anything else we might add? /
November 11, 2008, 01:36:51 AM
Kazimir :



thanks for all these references and snippets, you're handling CL or newLisp with great ease: congrats ! Your psychedelic webpages reminds me the times when I was coding on a Commodore 64 computer.



I also just saw you came from Croatia, I've been there 2 years ago and I must say it has been one of the best trip I've ever made : very nice country !



cormullion : sure, newLisp is not compiled, my fault !



newdep :
QuoteI love how intresting topics popup here...
...and it's just a start :



- Is there any IRC chanel for newLisp ?

- Why do you choose newLisp over CL, Scheme, Clojure, Scala, Haskell, or whatever functionnal langage ?
#5
Anything else we might add? /
November 10, 2008, 04:36:13 AM
QuoteNote that CL has not fexprs=Newlisp macros. Older, pre-CL Lisps had fexprs. It would be hard to implement fexprs in CL; on the other hand, it is easy to implement CL macros in Newlisp.


ok, that suggest me some more questions :



- if fexprs were so good, why do they disappear from CL ?



- P.Seibel said :
QuoteAnd, in a compiled Lisp program, that new language is just as efficient as normal Lisp because all the macro code--the code that generates the new expression--runs at compile time. In other words, the compiler will generate exactly the same code whether you write
. Is this statement true for newLisp too ?
#6
Anything else we might add? /
November 10, 2008, 01:55:59 AM
-->cormullion : "You're almost learning two languages at once...

    And why not! :)"

   

You're right, maybe that's not the good approach. Thanks for telling me about

the CL fexprs : I wasn't aware of them.



    -->Kazimir :

   

Thanks for your nice sample. Maybe I'm wrong, but the simple 'if' cannot be a function too : right ?

   

    -->michael :

   

Cool : the slideshow is a good idea too.
#7
Anything else we might add? /
November 07, 2008, 02:34:29 PM
Hi cormullion,



I've taken the sample from chapter 3 of PCL : http://gigamonkeys.com/book/practical-a-simple-database.html">http://gigamonkeys.com/book/practical-a ... abase.html">http://gigamonkeys.com/book/practical-a-simple-database.html (about 3/4 of the page, or search for the word 'macro', it's quicker). PCL is not like other academic books, it has been a pleasure to read.



Yes, once I saw the result in my newLisp code, I though I had to 'eval' the result, and sure it works. Now my question is rather "why should I eval the result ?" and "why is it different from Common Lisp internals ?".



See you.
#8
Anything else we might add? /
November 07, 2008, 01:42:21 PM
Hi unixtechie,



You're right I've not read the entire docs (but if you want to test a new language, you often read between the lines...and the manual is just 329 pages long!).



I've no interest in building shell scripts-like, I'm using Python, Perl or Ruby for such everyday tasks. Nor do I want to write another factorial :)



But in following your suggestion, I just realized that I missed the nice vids from Michael Michaes : they are very well done.



Thanks for answering my first answer, I'll try to read the manual carefully.

What about the second one ?



I like playing with text and regexps, so I've tried to download the wiki engine, but the link seems dead.



Another question : when does the v10.0.0 comes out ?



Thanks.
#9
Anything else we might add? / Before starting
November 07, 2008, 12:19:42 PM
Hi,



I'm new to newLisp, but before I really start playing with it, I need your lights on several points :



- can we make an executable file from a lsp one ? I know that asking such a question on a Lisp forum would result in "you don't have to, just run your script from the REPL". But I really do care about this: users are not programmers, and they need to be able to launch an app without having to spend their time fighting with EMacs/Slime or whatever.



- the only book I've got on Functionnal programming is Peter Seibel's "Practical Common Lisp". The first time he handles a macro, he shows something like this :



 
(defmacro backwards (expr) (reverse expr))

CL-USER> (backwards ("hello, world" t format))
hello, world
NIL


I've tried doing the same 'reverse' macro with newLisp, but I don't know where I'm going wrong :



> (define-macro (backwards expr) (reverse expr))
(lambda-macro (expr) (reverse expr))
> (backwards ("something" println))
(println "something")


The result is not interpreted and I must miss something, but what ?



Thanks for your answsers,



KibĀ².