Search found 604 matches
- Thu Sep 18, 2008 1:53 pm
- Forum: newLISP newS
- Topic: Profiling your application
- Replies: 7
- Views: 3503
- Wed Sep 17, 2008 5:54 pm
- Forum: newLISP newS
- Topic: Profiling your application
- Replies: 7
- Views: 3503
- Mon Sep 15, 2008 8:23 pm
- Forum: newLISP newS
- Topic: development release newLISP version 9.9.2
- Replies: 17
- Views: 6140
Wonderful! Thanks, Lutz. Couple of things: 1. Can we return references from our own functions? (define (my-first lst) (expand '(lst 0) 'lst)) 2. Lookup should accept the standard index syntax: (set 'foo '((a 1) (b 2) (c ((a 2) (b 3))))) (assoc (foo 'c 'b)) ; => (b 3) (lookup (foo 'c 'b)) ; => 3 As o...
- Mon Sep 15, 2008 5:42 pm
- Forum: newLISP newS
- Topic: Changes in newLISP v.10.0 (previous init.lsp)
- Replies: 20
- Views: 6517
Lutz,
When can we expect a dev release? Also, will we be able to create our own reference functions by returning a list reference expression? I.e.:
When can we expect a dev release? Also, will we be able to create our own reference functions by returning a list reference expression? I.e.:
Code: Select all
(define (my-first lst) (expand '(lst 0) 'lst))
- Mon Sep 08, 2008 5:32 pm
- Forum: newLISP newS
- Topic: Changes in newLISP v.10.0 (previous init.lsp)
- Replies: 20
- Views: 6517
- Sat Sep 06, 2008 11:32 am
- Forum: Anything else we might add?
- Topic: Optimizing a function
- Replies: 10
- Views: 6270
- Fri Sep 05, 2008 5:28 pm
- Forum: newLISP newS
- Topic: Changes in newLISP v.10.0 (previous init.lsp)
- Replies: 20
- Views: 6517
- Thu Sep 04, 2008 8:23 pm
- Forum: newLISP newS
- Topic: Ugly behaviuor of doargs
- Replies: 7
- Views: 3144
- Wed Sep 03, 2008 12:03 am
- Forum: Anything else we might add?
- Topic: Optimizing a function
- Replies: 10
- Views: 6270
- Tue Sep 02, 2008 4:39 pm
- Forum: Anything else we might add?
- Topic: Optimizing a function
- Replies: 10
- Views: 6270
Optimizing a function
I have been playing with some of the shootout functions and trying to get decent results with newlisp. Here is the fastest implementation I have so far for the sieve of eratosthenes: (define (sieve size , flags total) (set 'flags (array (+ size 1)) 'total 0) (for (i 2 (- size 1)) (when (not (flags i...
- Wed Aug 27, 2008 7:53 pm
- Forum: newLISP newS
- Topic: Curious about using quote in set
- Replies: 14
- Views: 5496
- Wed Aug 27, 2008 5:37 pm
- Forum: newLISP newS
- Topic: Curious about using quote in set
- Replies: 14
- Views: 5496
- Tue Aug 26, 2008 6:03 pm
- Forum: newLISP newS
- Topic: Curious about using quote in set
- Replies: 14
- Views: 5496
Let does not care what to do. It automatically quotes the symbol and evaluates the expression it points to. (let ((foo 10))) is the equivalent of:
Re the last example -
Code: Select all
(local (foo)
(setq foo 10))
Code: Select all
(set 'a 'b) ; a now points to b
(set a 10) ; sets b to 10
- Tue Aug 26, 2008 12:04 pm
- Forum: newLISP and the O.S.
- Topic: Write to file without changin Date modified
- Replies: 11
- Views: 8054
- Tue Aug 26, 2008 12:03 pm
- Forum: newLISP newS
- Topic: Curious about using quote in set
- Replies: 14
- Views: 5496
No, it cannot know what to do. As I said, you can point a symbol to a symbol, so that using set evaluates the first symbol and sets the second: (set 'a 'b) (set a 10) ;; b => 10 ;; a => 'b However, what if 'a already contains something else? What if it was previously used to store an expression, lik...
- Mon Aug 25, 2008 7:24 pm
- Forum: newLISP newS
- Topic: Curious about using quote in set
- Replies: 14
- Views: 5496
- Mon Aug 25, 2008 5:06 pm
- Forum: newLISP newS
- Topic: Help with FOOP
- Replies: 7
- Views: 3205
Take a look at my util.lsp module on Artful Code. It includes a macro called "with-slots". If you write your classes to use an association list for their members: (define (Point:Point x y) (list (context) (list (list "x" x) (list "y" y)))) Then, you can easily access the slots: (set 'point (Point 10...
- Mon Aug 25, 2008 12:01 pm
- Forum: newLISP and the O.S.
- Topic: newLisp as localhost - html logbook
- Replies: 7
- Views: 5750
Yes. See here: http://www.newlisp.org/downloads/newlis ... pip_server. newLISP comes with its own built-in web server. You can save data easily with the 'save function.
- Mon Aug 25, 2008 11:58 am
- Forum: newLISP newS
- Topic: Help with FOOP
- Replies: 7
- Views: 3205
Corm - you cannot destructively modify a FOOP object even with a macro. When a method is called, the actual method is not called. The : function is called, which first evaluates the first argument, which is presumed to be a FOOP list. Having done that, it tries to find the method in the context. So:...
- Fri Aug 22, 2008 7:10 pm
- Forum: newLISP in the real world
- Topic: Regex Question
- Replies: 2
- Views: 1657
- Thu Aug 21, 2008 1:40 am
- Forum: newLISP newS
- Topic: development release newLISP version 9.4.7
- Replies: 2
- Views: 1689
- Tue Aug 19, 2008 4:52 pm
- Forum: newLISP newS
- Topic: newLISP TextMate bundle 1.1
- Replies: 0
- Views: 1973
newLISP TextMate bundle 1.1
I added a new theme with a dark background, updated symbols, etc. 1.0 was a huge update with much better language recognition. Get it here: http://www.artfulcode.net/projects/releases/22/.
- Sat Aug 16, 2008 12:14 pm
- Forum: Anything else we might add?
- Topic: Unbalanced parenthesis
- Replies: 5
- Views: 4413
- Sat Aug 16, 2008 12:03 am
- Forum: Anything else we might add?
- Topic: Unbalanced parenthesis
- Replies: 5
- Views: 4413
Unbalanced parenthesis
Corm,
You know your site blows out into the comments textarea when veiwed in opera?
Jeff
You know your site blows out into the comments textarea when veiwed in opera?
Jeff
- Fri Aug 15, 2008 5:48 pm
- Forum: newLISP newS
- Topic: spawn/sync vs. fork/wait-pid
- Replies: 2
- Views: 1946
Re: spawn/sync vs. fork/wait-pid
I know that spawn/sync uses fork etc., but what are the reasons to use one rather than the other? Spawn is more straightforward to use. In order to access the result of something evaluated within a forked process, you must first set up a shared page of ram and a semaphore to control access to it. Y...