Search found 604 matches

by Jeff
Thu Sep 18, 2008 1:53 pm
Forum: newLISP newS
Topic: Profiling your application
Replies: 7
Views: 3503

I think the profiler uses the underscores in situations when it needs to iterate over the keys.
by Jeff
Wed Sep 17, 2008 5:54 pm
Forum: newLISP newS
Topic: Profiling your application
Replies: 7
Views: 3503

I don't remember. It uses the new dictionary syntax, I know that. What is the error you are getting?
by Jeff
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...
by Jeff
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.:

Code: Select all

(define (my-first lst) (expand '(lst 0) 'lst))
by Jeff
Mon Sep 08, 2008 5:32 pm
Forum: newLISP newS
Topic: Changes in newLISP v.10.0 (previous init.lsp)
Replies: 20
Views: 6517

Will that be released anytime soon? I like setf :)
by Jeff
Sat Sep 06, 2008 11:32 am
Forum: Anything else we might add?
Topic: Optimizing a function
Replies: 10
Views: 6270

For math and graphics, PPCs should be faster.
by Jeff
Fri Sep 05, 2008 5:28 pm
Forum: newLISP newS
Topic: Changes in newLISP v.10.0 (previous init.lsp)
Replies: 20
Views: 6517

You should make it check the home directory first. If it finds it, it then stops. If it does not, it goes for the global, but only if there is nothing in the home directory.
by Jeff
Thu Sep 04, 2008 8:23 pm
Forum: newLISP newS
Topic: Ugly behaviuor of doargs
Replies: 7
Views: 3144

Comma-variables are convention, not spec.
by Jeff
Wed Sep 03, 2008 12:03 am
Forum: Anything else we might add?
Topic: Optimizing a function
Replies: 10
Views: 6270

Well, look at the numbers. It's making arrays of 512 * 10000 elements. Run it with smaller sizes and multiply the results. The array is used for constant access speeds. The same with the other languages. Xytroxon - it ran consistently at 20-21 seconds on my 2.5 ghz quad-core ppc with 4 gigs of ram.
by Jeff
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...
by Jeff
Wed Aug 27, 2008 7:53 pm
Forum: newLISP newS
Topic: Curious about using quote in set
Replies: 14
Views: 5496

Oh, yeah :)
by Jeff
Wed Aug 27, 2008 5:37 pm
Forum: newLISP newS
Topic: Curious about using quote in set
Replies: 14
Views: 5496

That will make your code confusing to others who expect define to define a new function. It's generally best for a programmer not to make up conventions when writing code. You never when *you* will be person who has to update it.
by Jeff
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:

Code: Select all

(local (foo)
  (setq foo 10))
Re the last example -

Code: Select all

(set 'a 'b) ; a now points to b
(set a 10) ; sets b to 10
by Jeff
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

Yes, by writing your own filesystem :)
by Jeff
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...
by Jeff
Mon Aug 25, 2008 7:24 pm
Forum: newLISP newS
Topic: Curious about using quote in set
Replies: 14
Views: 5496

If you don't use a quote, set attempts to evaluate the symbol (meaning you can set one symbol to point to another and set the second symbol using the first symbol). To skip the quote, use setq (short for set-quote).
by Jeff
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...
by Jeff
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.
by Jeff
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:...
by Jeff
Fri Aug 22, 2008 7:10 pm
Forum: newLISP in the real world
Topic: Regex Question
Replies: 2
Views: 1657

I disagree. I've put that side effect to good use in progressive logic. You can set $0 yourself between regexes. And you should always check the return value :)
by Jeff
Thu Aug 21, 2008 1:40 am
Forum: newLISP newS
Topic: development release newLISP version 9.4.7
Replies: 2
Views: 1689

What are the changes to unify? The changelog wasn't very clear.
by Jeff
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/.
by Jeff
Sat Aug 16, 2008 12:14 pm
Forum: Anything else we might add?
Topic: Unbalanced parenthesis
Replies: 5
Views: 4413

Thanks :)
by Jeff
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
by 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...