Thanks, very clear explanation
Maurizio
Search found 52 matches
- Thu Mar 09, 2006 1:24 pm
- Forum: newLISP newS
- Topic: what's wrong with this ?
- Replies: 4
- Views: 4130
- Thu Mar 09, 2006 11:24 am
- Forum: newLISP newS
- Topic: what's wrong with this ?
- Replies: 4
- Views: 4130
However I don't understand the following example: in context FIRST the x gets the correct value, in context SECOND a pre-definition of x is neeed, otherwise an error occurs. Any suggestion ? Regards Maurizio (context 'FIRST) (define (create aname val) (new FIRST aname) (set 'aname (eval aname)) (set...
- Wed Mar 08, 2006 5:03 pm
- Forum: newLISP newS
- Topic: what's wrong with this ?
- Replies: 4
- Views: 4130
what's wrong with this ?
calling sec:init i'm trying to create a new object, of type ctx, in the object sec, but newlisp complains with the following error symbol not in MAIN context in function new : asymbol called from user defined function sec:init this is the program : (context 'CTX) (define (doit) (set 'x 1)) (context ...
- Fri Feb 25, 2005 4:53 pm
- Forum: newLISP in the real world
- Topic: About parse and scannig
- Replies: 7
- Views: 4861
I've seen a certain improvement reorganizing the alternatives in the regex so that the patterns that recognize the more frequents tokens are the firsts in the expression. anyway I'm trying with a 130kb file with 15600 tokens. Now the scan time is about 1 second. (pentium 4 - 2.80 ghz, + hyperthreadi...
- Fri Feb 25, 2005 2:32 pm
- Forum: newLISP in the real world
- Topic: About parse and scannig
- Replies: 7
- Views: 4861
- Fri Feb 25, 2005 9:54 am
- Forum: newLISP in the real world
- Topic: About parse and scannig
- Replies: 7
- Views: 4861
- Thu Feb 24, 2005 4:07 pm
- Forum: newLISP in the real world
- Topic: About parse and scannig
- Replies: 7
- Views: 4861
About parse and scannig
I try to parse a text file separating every "word" according to a regular expression. The code is reported below What I see, is that even with a moderate text file (190k) it is very slow. I suppose this is due to the continuos string splitting after each succesfull parse. Any suggestion ? Btw, shoul...
- Fri Feb 18, 2005 1:35 pm
- Forum: Anything else we might add?
- Topic: Is it there a better way to read a file in a list ?
- Replies: 4
- Views: 3212
- Fri Feb 18, 2005 10:52 am
- Forum: Anything else we might add?
- Topic: Is it there a better way to read a file in a list ?
- Replies: 4
- Views: 3212
Is it there a better way to read a file in a list ?
I'd like to read a file in a list, having each line as a separate string. I've tried this, but it seems to me a little clumsy. Is it there a better way ? Regards Maurizio (define (read-my-file) (set 'lst '()) (set 'in-file (open "myfile.txt" "read")) (while (read-line in-file) (set 'lst (append lst ...
- Thu Feb 10, 2005 11:51 am
- Forum: newLISP in the real world
- Topic: What's wrong with this ? (unexpected stack overflow)
- Replies: 9
- Views: 5748
- Mon Feb 07, 2005 2:18 pm
- Forum: newLISP in the real world
- Topic: What's wrong with this ? (unexpected stack overflow)
- Replies: 9
- Views: 5748
Thanks, I'll do that. Anyway I suppose there is something wrong about it. I'm required to know the internal details of any macros before I'm able to use them ? What if I use someone other's code ? Perhaps simply I cannot use directly any of my macros as a parameter to someone other's code ? Regards ...
- Mon Feb 07, 2005 9:32 am
- Forum: newLISP in the real world
- Topic: What's wrong with this ? (unexpected stack overflow)
- Replies: 9
- Views: 5748
What's wrong with this ? (unexpected stack overflow)
the following program gives an overflow error I'm using vers 8.3.6 on win2k Regards Maurizio (define (tostring argos) (join (map eval argos) " ")) (define-macro (packleft) (tk "pack " (tostring (args)))) (define (test) (tk "toplevel .main") (set 'aname (tk "button .main.1")) (set 'asecond (tk "butto...
- Fri Jun 04, 2004 7:02 am
- Forum: newLISP in the real world
- Topic: Block comments
- Replies: 3
- Views: 3296
- Thu Jun 03, 2004 12:53 pm
- Forum: Whither newLISP?
- Topic: About contexts and context evaluation
- Replies: 6
- Views: 6134
- Thu Jun 03, 2004 12:15 pm
- Forum: Whither newLISP?
- Topic: About contexts and context evaluation
- Replies: 6
- Views: 6134
- Thu Jun 03, 2004 10:31 am
- Forum: newLISP in the real world
- Topic: Block comments
- Replies: 3
- Views: 3296
Block comments
would be very fine to have a way to comment out several rows of code
(something like /* and */)
sometimes, while debugging, I found the necessity to
comment out several procedures at once,
and it's very disturbing to have to comment every single line.
Regards
Maurizio
(something like /* and */)
sometimes, while debugging, I found the necessity to
comment out several procedures at once,
and it's very disturbing to have to comment every single line.
Regards
Maurizio
- Thu Jun 03, 2004 9:27 am
- Forum: Whither newLISP?
- Topic: About contexts and context evaluation
- Replies: 6
- Views: 6134
About contexts and context evaluation
Looking in the manual, in the parahraph Context as classes,
I see the following statement :
(set 'ctx (eval ctx)) ;; get context out of symbol
I really don't understand it.
Any explanation ?
Regards
Maurizio
I see the following statement :
(set 'ctx (eval ctx)) ;; get context out of symbol
I really don't understand it.
Any explanation ?
Regards
Maurizio
- Fri Apr 30, 2004 3:18 pm
- Forum: newLISP in the real world
- Topic: unexpected echo
- Replies: 1
- Views: 2241
- Fri Apr 30, 2004 3:10 pm
- Forum: newLISP in the real world
- Topic: unexpected echo
- Replies: 1
- Views: 2241
unexpected echo
I'm trying a simple lisp program activated via httpd this is the source : (define (bold text) (print (string "<b>" text "</b>"))) (define (italic text) (print (string "<i>" text "</i>"))) (print "Content-type: text/html\n\n") (print "<html>") (print "<body>") (print (string "<p> this is " (bold "bol...
- Fri Apr 30, 2004 2:08 pm
- Forum: newLISP in the real world
- Topic: hiding httpd command window
- Replies: 2
- Views: 2654
- Fri Apr 30, 2004 1:37 pm
- Forum: newLISP in the real world
- Topic: hiding httpd command window
- Replies: 2
- Views: 2654
hiding httpd command window
is it possible to start newlisp httpd .....
without having a command window floating around ?
I'd like to start the program using a batch file, or a menu or desktop link
and it should run httpd without showing any window,
or better, with a little icon in the tray area....
Regards
Maurizio
without having a command window floating around ?
I'd like to start the program using a batch file, or a menu or desktop link
and it should run httpd without showing any window,
or better, with a little icon in the tray area....
Regards
Maurizio
- Sun Dec 07, 2003 6:06 pm
- Forum: newLISP in the real world
- Topic: problem with integer
- Replies: 11
- Views: 7070
My idea was to test a user-entered argument
to checkit was a proper number.
i've solved the problem with the following function
Regards
Maurizio
to checkit was a proper number.
i've solved the problem with the following function
Code: Select all
(define (number? x,temp)
(set 'temp (integer x))
(and temp
(= x (format "%d" temp))))
Maurizio
- Sun Dec 07, 2003 9:49 am
- Forum: newLISP in the real world
- Topic: problem with integer
- Replies: 11
- Views: 7070
- Sat Dec 06, 2003 10:43 pm
- Forum: newLISP in the real world
- Topic: problem with integer
- Replies: 11
- Views: 7070
problem with integer
it seems that
(integer "12a")
returns 12 instead of nil
it's a bug or a feature ?
(if it's a feature, how can i check for a valid integer ?)
Regards
Maurizio
(integer "12a")
returns 12 instead of nil
it's a bug or a feature ?
(if it's a feature, how can i check for a valid integer ?)
Regards
Maurizio
- Sun Nov 23, 2003 8:21 pm
- Forum: newLISP in the real world
- Topic: unexpected double evaluation of statement.
- Replies: 2
- Views: 2707