Search found 20 matches
- Tue Nov 08, 2005 1:05 am
- Forum: Anything else we might add?
- Topic: Evaluation of context symbols.
- Replies: 2
- Views: 3445
- Mon Nov 07, 2005 8:44 pm
- Forum: Anything else we might add?
- Topic: Evaluation of context symbols.
- Replies: 2
- Views: 3445
Evaluation of context symbols.
- When using a function to generate symbols for the creation of contexts the following behavior can be observed: > (define (build-sym x) (sym (string 'C x))) (lambda (x) (sym (string 'C x))) > (context (build-sym 2)) C2 C2> (context MAIN) MAIN > (context? (build-sym 2)) nil > (context? (eval (build-...
- Sat Nov 05, 2005 9:15 am
- Forum: Anything else we might add?
- Topic: Debugger display mistake
- Replies: 7
- Views: 6935
I'm a println man myself from way back but I used the debugger today. I was about eight levels deep in a sea of parentheses, they were balanced (though not very well as it turned out), and I couldn't figure why I was getting different runtime errors as I switched things around, until I started watch...
- Fri Nov 04, 2005 10:10 pm
- Forum: Anything else we might add?
- Topic: Weekend intro
- Replies: 3
- Views: 3941
Re: Fed up with Lambda ?
LOL. "First-class continuations" - I love it!
-
- Fri Nov 04, 2005 9:56 pm
- Forum: newLISP in the real world
- Topic: Just another encounter of newlisp flexibility ;-)
- Replies: 7
- Views: 7392
Ha ha, very funny! One thing for sure, sort is a really slow way to get the max:newdep wrote: Is 'max quicker on a sorted or unsorted list ;-)
Code: Select all
> (time (sort c))
183
> (last c)
3549
Code: Select all
> (time ((push max c) (eval c)))
27
- Fri Nov 04, 2005 7:10 pm
- Forum: newLISP in the real world
- Topic: Just another encounter of newlisp flexibility ;-)
- Replies: 7
- Views: 7392
...shorter. But not neccesarily faster: > (setq c (flat (dup b 1000))) ....35 51 34 > (time (apply max c)) 49 > (time ((push max c) (eval c))) 23 > (pop c) max <C42C> > (time (apply max c)) 48 I'm wondering if pushing a function onto a list is always faster than mapping apply or is it just a peculi...
- Sun Oct 30, 2005 10:34 pm
- Forum: Anything else we might add?
- Topic: unattended symbol
- Replies: 5
- Views: 5469
Re: unattended symbol
Note about the last NCR:x symbol. Where is it from? I think it must not be present... Or I have a mistake somewhere? The NCR:x is the symbol x in the dolist and was created along with NCR:ctx and NCR:import-ncurses when the function "import-ncurses" was *defined*. The various strings were used to c...
- Thu Oct 27, 2005 8:04 pm
- Forum: newLISP in the real world
- Topic: CPYMEM with arrays
- Replies: 4
- Views: 5005
I also thought to 'do something with sym', and I see your solution points in this direction. But you're using the 'cons' statement, which I never used myself before; Peter, I think I might have left out a few functions in that last example. However here is some working code I wrote yesterday that s...
- Thu Oct 27, 2005 6:41 pm
- Forum: Anything else we might add?
- Topic: newLISP game
- Replies: 22
- Views: 19854
Honestly... Concept of this game isn't mine. I played one that has 5x5 field. I couldn't solve it (only by accident), so I decided to make my own version where I can better see the field and can think about it more :-) Later on, I added more levels ;-) Fanda Good for you! I can't solve the 5x5 even...
- Thu Oct 27, 2005 6:33 pm
- Forum: newLISP in the real world
- Topic: CPYMEM with arrays
- Replies: 4
- Views: 5005
So every time when I print the address of an array member, the address changes....?!?! Peter The manual defines "address" to work only with "int", "double flost", and "string". There is some more documentation of memory management in the FAQ at: http://newlisp.org/MemoryManagement.html How about us...
- Tue Oct 25, 2005 9:24 pm
- Forum: newLISP in the real world
- Topic: Question about the "def-new" function.
- Replies: 0
- Views: 2882
Question about the "def-new" function.
I am trying to write a function that creates a number of contexts of the same type all with the same default function, a sort of class constructor method, if you will. It seems possible but I can't get it to work (at least without a macro). > (define (myProc) (println "hi")) (lambda () (println "hi"...
- Sun Oct 23, 2005 6:02 pm
- Forum: Anything else we might add?
- Topic: Implied Conditional
- Replies: 5
- Views: 6001
Regarding an implicit 'if': I have been going back and forth on this in my mind, I am just not sure if I want it, if it leads to too much ambiguities from a users point of view? When the first expression evaluates to 'nil' things are clear, but what if the the xpression evauates to a list or number...
- Fri Aug 05, 2005 7:59 pm
- Forum: Anything else we might add?
- Topic: Arguments against newlisp (pro-SBCL)
- Replies: 7
- Views: 8806
Re: Arguments against newlisp (pro-SBCL)
Taken from a debate in the #newlisp channel on freenode, here was this guy's complaints/arguments: <someguy> well, newlisp's memory manager really sucks <someguy> because it doesn't handle shared structure Put them in a context. <someguy> it copies objects when you pass parameters <someguy> because...
- Tue Aug 02, 2005 4:23 am
- Forum: Anything else we might add?
- Topic: Create drawings on a canvas
- Replies: 6
- Views: 6589
Re: Create drawings on a canvas
Hi newLispers, With the GTK-server it is possible to create a drawing on a canvas. I made a demonstration here: ... It is always a pleasure to read your well formatted code! However, I much prefer the formatting scheme for parentheses that you used in "fractals.lsp" to the one you employed in "canv...
- Tue Aug 02, 2005 4:11 am
- Forum: Anything else we might add?
- Topic: Create drawings on a canvas
- Replies: 6
- Views: 6589
Re: Create drawings on a canvas
Hi newLispers, With the GTK-server it is possible to create a drawing on a canvas. I made a demonstration here: ... It is always a pleasure to read your well formatted code! However, I much prefer the formatting scheme for parentheses that you used in "fractals.lsp" to the one you employed in "canv...
- Thu Jun 16, 2005 4:30 pm
- Forum: Anything else we might add?
- Topic: Passing paramters by value
- Replies: 8
- Views: 9297
This inconsistent function name also occurs in the "Design elements and patterns" doc: Chapter 6. Creating accessing and modifying lists section: Passing lists by reference (define (change-data obj i value) (nth-set i obj:data value)) (set 'DB:data '(a b c d e f)) (change DB 3 'x) => d DB:data => (a...
- Thu Jun 16, 2005 2:45 am
- Forum: newLISP in the real world
- Topic: variable capture.
- Replies: 3
- Views: 4112
variable capture.
In section13 - "Dynamic and lexical scoping" of the "newLISP Users Manual and Reference v.8.6.0 rev-1" it states: Note that by passing quoted symbols to a user-defined function, a potential name clash may occur if the same variable name is used as a function parameter: (define (inc-symbol x y) (inc ...
- Sun Jun 12, 2005 5:33 pm
- Forum: newLISP newS
- Topic: newLISP v.8.6.0 tk-126 source and Win32 installer
- Replies: 10
- Views: 12710
Thanks Lutz! This latest binary build (8.6.0a-dmg) seems to work like a charm. That Tcl interface is really slick. The only problem I've had is an error when trying to access the Help menu when inside of Wish but I haven't really researched my setup or any documentation yet. Sorry if I sounded a lit...
- Sun Jun 12, 2005 3:03 am
- Forum: newLISP newS
- Topic: newLISP v.8.6.0 tk-126 source and Win32 installer
- Replies: 10
- Views: 12710
OSX installer not functional.
So I download newlisp-8.6.0.dmg and the documentation says to run the Mac package installation and follow the instructions. It also states that to run newlisp after the install I should type either "newlisp" or "newlisp-tk" at a Terminal command line. OK. The installer program says that installation...
- Wed Jun 08, 2005 1:31 am
- Forum: Anything else we might add?
- Topic: Passing paramters by value
- Replies: 8
- Views: 9297
Lutz wrote: ...Code: Select all
(define (change lst idx value) (nth-set idx (eval lst) value)) (change-db 'mydb 1234 "abcdefg") ; quoted 'mydb ... Lutz[/quote] Shouldn't that be: ([color=darkred][b]change[/b][/color] 'mydb 1234 "abcdefg") ? .