Search found 15 matches
- Sun May 24, 2009 9:15 pm
- Forum: newLISP in the real world
- Topic: Hashes
- Replies: 2
- Views: 2284
- Thu May 21, 2009 10:02 pm
- Forum: newLISP in the real world
- Topic: Hashes
- Replies: 2
- Views: 2284
Hashes
Why does this work?
But this not work?
Code: Select all
(new Tree 'hash)
(hash "x" 0)
(hash "y" 1)
(hash "z" 2)
(hash "x")
0
Code: Select all
(dotree (x hash)
(print x " " (hash x) " "))
- Wed May 20, 2009 10:32 pm
- Forum: newLISP in the real world
- Topic: first gives errors on empty lists
- Replies: 3
- Views: 2742
- Wed May 20, 2009 7:20 pm
- Forum: newLISP in the real world
- Topic: first gives errors on empty lists
- Replies: 3
- Views: 2742
first gives errors on empty lists
Calling (first) on an empty list gives an error instead of returning the empty list. This is inconsistent with the documentation, which claims that first behaves the same as car in other Lisp implementations. On the contrary, ; sbcl This is SBCL 1.0.18.debian, an implementation of ANSI Common Lisp. ...
- Sun May 17, 2009 11:18 pm
- Forum: newLISP in the real world
- Topic: List access times versus array access times
- Replies: 1
- Views: 1806
List access times versus array access times
For very large lists/arrays, what is the time improvement for accessing the last element of either structure? I imagine that for arrays, the time taken to access the last element is flat, but for lists grows as the list size grows. Do arrays have restrictions on size (e.g., can't be indexed past the...
- Fri May 15, 2009 5:15 pm
- Forum: newLISP in the real world
- Topic: How to make newLISP quiet when it starts; start with ()
- Replies: 10
- Views: 27447
- Thu May 14, 2009 5:44 pm
- Forum: newLISP newS
- Topic: newLISP development release v.10.0.5
- Replies: 11
- Views: 9959
I don't see anything on the newLisp website guaranteeing that the API is stable anyway. If he wants to remove something or change its behavior, the worst you have to do is probably a find-replace. Unless the behavior of a fundamental, commonly used function is totally changed, which isn't what this ...
- Thu May 14, 2009 4:18 am
- Forum: newLISP in the real world
- Topic: I suppose there is no progn
- Replies: 2
- Views: 2152
I suppose there is no progn
For expressions that need to be evaluated sequentially in newLisp, there is no progn special form that says "evaluate these and return the last". So how do I make code like this valid? (if (expr) ((eval 1) (eval 2) (eval3)) (eval4)) It seems to execute the forms correctly, except that at the end of ...
- Tue May 12, 2009 6:03 am
- Forum: newLISP in the real world
- Topic: Importing C libraries
- Replies: 2
- Views: 2454
- Tue May 12, 2009 4:02 am
- Forum: newLISP in the real world
- Topic: Importing C libraries
- Replies: 2
- Views: 2454
Importing C libraries
I need to use the SHA1 function in libssl.so. The function has the following syntax: unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md); With the explanation SHA1() computes the SHA-1 message digest of the n bytes at d and places it in md (which must have space for SHA_D...
- Mon May 11, 2009 4:06 am
- Forum: newLISP Graphics & Sound
- Topic: objects in guiserver
- Replies: 2
- Views: 5456
- Mon May 11, 2009 4:05 am
- Forum: Whither newLISP?
- Topic: Macros need explanation
- Replies: 11
- Views: 10826
- Mon May 11, 2009 1:52 am
- Forum: Whither newLISP?
- Topic: Macros need explanation
- Replies: 11
- Views: 10826
I don't understand this misconception that Common Lisp/Scheme are faster just because they are compiled. In most benchmarks they perform worse than Perl (which we'll call a "fast" interpreted language) even when speed 3 safety 0 is on. When I saw the mergesort benchmark, I was pretty impressed; newL...
- Sun May 10, 2009 5:36 pm
- Forum: Whither newLISP?
- Topic: newLISP coding form
- Replies: 13
- Views: 12974
- Sun May 10, 2009 5:27 pm
- Forum: Whither newLISP?
- Topic: Macros need explanation
- Replies: 11
- Views: 10826
Macros need explanation
I hail from Common Lisp, where the entire idea of macros is completely different, it seems, from that of newLisp. Could someone please explain to me exactly what a newLisp macro does? Does it evaluate its body and not evaluate its inputs? Or does it evaluate its inputs but not its body? How can I us...