That does it, you're right
Where do you get your time from ? Are your days -as ours- 24-h long ?
(dotimes (x 1000) (print-pretty '(thanks again)))
Search found 10 matches
- Mon Nov 10, 2003 2:22 am
- Forum: newLISP in the real world
- Topic: Optional args, and line length for printing.
- Replies: 6
- Views: 6329
- Sat Nov 08, 2003 2:51 pm
- Forum: newLISP in the real world
- Topic: Optional args, and line length for printing.
- Replies: 6
- Views: 6329
I personally prefer that no breaklines are introduced without my control. You see, if I print a datase to a file one register a line, then when I read the file with read-line, I'm sure I get a whole register, otherwise its awkward. Maybe you're right that it should be left as an option to break line...
- Thu Nov 06, 2003 9:27 pm
- Forum: newLISP in the real world
- Topic: Optional args, and line length for printing.
- Replies: 6
- Views: 6329
Optional args, and line length for printing.
Just two more quests (by now !): 1. Is it possible to use optional arguments in functions, other than through 'define-macro' ? I dont quite get it clear from the manual. It looks fine anyway, since a variable-number-of-args function is certainly a strange concept itself... not very 'mathematical' to...
- Wed Nov 05, 2003 11:30 pm
- Forum: newLISP in the real world
- Topic: Strange behaviour of (push )
- Replies: 2
- Views: 3935
Strange behaviour of push
The correct code is: (set 'people '((p1 (name (john macy)) (age 45) (hobbies fishing reading jogging)) (p2 (name (mary dickens)) (age 27) (hobbies knitting dancing watching-tv)) (p3 (name (paul donkey)) (age 18) (hobbies kicking eating)))) (define (insert value field-id register-id relation , regist...
- Wed Nov 05, 2003 11:04 pm
- Forum: newLISP in the real world
- Topic: Strange behaviour of (push )
- Replies: 2
- Views: 3935
Strange behaviour of (push )
I have a database organised as association lists (relations) of registers, one for each individual, and each register itself contains an association list of pairs <field value>. So, for example, it would be: (set 'people '(p1 (name (john macy)) (age 45) (hobbies fishing reading jogging)) (p2 (name (...
- Wed Oct 22, 2003 11:51 pm
- Forum: newLISP in the real world
- Topic: Problem with gammai
- Replies: 1
- Views: 3540
Problem with gammai
When calling (gammai n m) with n=0 (not the right thing to do, but can happen) my computer crashes badly. I must make a hard reset. OS: Windows XP. Pentium III.
Maybe some error trapping would do well.
Maybe some error trapping would do well.
- Fri Oct 10, 2003 4:31 pm
- Forum: newLISP in the real world
- Topic: Sorry, 'tis easy !
- Replies: 1
- Views: 3478
- Fri Oct 10, 2003 4:28 pm
- Forum: newLISP in the real world
- Topic: Sorry, 'tis easy !
- Replies: 1
- Views: 3478
Sorry, 'tis easy !
Of course, you parse the string and map 'symbol onto it:
(map symbol (parse "hi how are you")) -> (hi how are you )
Apologies
The parsing capabilities of Newlisp do much of the work, and so much simpler .
(map symbol (parse "hi how are you")) -> (hi how are you )
Apologies
The parsing capabilities of Newlisp do much of the work, and so much simpler .
- Fri Oct 10, 2003 4:18 pm
- Forum: newLISP in the real world
- Topic: More on reading
- Replies: 2
- Views: 4424
More on reading
I Common Lisp you can transform a string into a list of atoms, such as: "hi how are you" -> (hi how are you). You just 'read-input-from-string' the original string and cons the atoms into a list. For instance, see (read-sentence) in Winston 3rd ed., p. 426. How to do this in Newlisp ? I imagine this...
- Fri Oct 10, 2003 3:52 pm
- Forum: newLISP in the real world
- Topic: How about (read) ?
- Replies: 3
- Views: 4592
How about (read) ?
How can you do reading of regular Lisp expressions, in the way that CL does it with (read) ? Especially to read from files, its useful to be able to read a whole expression -enclosed in parentheses-. Maybe I've missed it somewhere ? In fact, load must use such a function, so it cannot be difficult. ...