Search found 12 matches

by John_Small
Tue Jun 26, 2007 9:19 pm
Forum: newLISP in the real world
Topic: Out of memory message
Replies: 14
Views: 10218

Adding another 30 minutes

I think I should warm up on newLISP again especially on contexts and def-new and the new unify etc. I'll try to then write about these additional subjects 1. lexically scoped programming in newLISP codified with examples (and perhaps macros) to make it as easily as rolling off a log. 2. a closer loo...
by John_Small
Mon Jun 25, 2007 10:17 pm
Forum: newLISP in the real world
Topic: Out of memory message
Replies: 14
Views: 10218

Thanks Ric

I forgot about dynamic scoping.

I wrote this when late at night when
I was half asleep.

Thanks!
by John_Small
Mon Jun 25, 2007 9:12 pm
Forum: newLISP in the real world
Topic: Out of memory message
Replies: 14
Views: 10218

I'm not sure where the extra bytes are going

I'm not sure I understand what you are
asking.

Unless I'm unwittingly recursively calling
something and growing the stack what else
could be causing this memory leak? Is
it my code or the newLISP garbage collector?

TBTW - hanks for taking the time to run it.
by John_Small
Mon Jun 25, 2007 6:22 pm
Forum: newLISP in the real world
Topic: Out of memory message
Replies: 14
Views: 10218

I'll send the code to whomever would like to test/use it.

Do you have an email that I can send you the code? It is basically a generic filter that anyone can use. The configuration file customizes it for handling your particular flat files. You simply specify the match column regular expressions and the replace column RE's and replacement text. So this cou...
by John_Small
Mon Jun 25, 2007 5:33 pm
Forum: newLISP in the real world
Topic: Out of memory message
Replies: 14
Views: 10218

Out of memory message

I'm using newLISP for filtering large number of huge ascii text files (one line equals one record). The filter is making simple changes to the input text line (record) and printing it to a tmp file and then when finished replacing the original file (after it was closed of course). After running for ...
by John_Small
Sat Jun 09, 2007 12:40 am
Forum: newLISP newS
Topic: implementation of file-map
Replies: 1
Views: 1924

slight correction

I delete the output file if I fail to write anything. <pre> (define (file-map fn-line-map filename out-filename out-temp) (setq out-file (open out-filename "write")) (if out-file (begin (setq in-file (open filename "read")) (setq out-written nil) (if in-file (begin (while (read-line in-file) (write-...
by John_Small
Sat Jun 09, 2007 12:34 am
Forum: newLISP newS
Topic: implementation of file-map
Replies: 1
Views: 1924

implementation of file-map

This was done in a hurry and briefly tested. It allows you to map the lines from the input to the output file. The optional 4th argument indicates the out-file is temporary and that the output file replaces the input file when finished. If the function succeeds it returns the final file name otherwi...
by John_Small
Fri Jun 08, 2007 12:13 am
Forum: newLISP newS
Topic: (for-all cond list1 [... listn])
Replies: 4
Views: 3288

exists is fine

my eye sight isn't the greatest any more.

I didn't see the hyperlink to exists in the manual
at the bottom of the example.
by John_Small
Thu Jun 07, 2007 11:50 pm
Forum: newLISP newS
Topic: (for-all cond list1 [... listn])
Replies: 4
Views: 3288

You're right exists does what I was asking for in for-any

I didn't see that before.
by John_Small
Thu Jun 07, 2007 11:38 pm
Forum: newLISP newS
Topic: read-file and write-file
Replies: 1
Views: 2055

read-file and write-file

Suppose read-file allowed an optional 2nd argument (read-file filename fnc) This fnc is called once for each line in the file. But instead of returning the entire file in a str-buffer it returns a continuation function that can be repeatedly called until returning EOF. If this is too confusing suppo...
by John_Small
Thu Jun 07, 2007 10:55 pm
Forum: newLISP newS
Topic: (for-all cond list1 [... listn])
Replies: 4
Views: 3288

(for-all cond list1 [... listn])

It would be nice if (for-all ..) allowed for additional, optional list arguments. (for-all (fn (item) ...) list1 ... listn) It may not always be efficient to use append to concatenate the lists since the for-all may be in a loop itself. It would also be nice to have a disjunction complement to for-a...
by John_Small
Fri Jun 01, 2007 12:03 am
Forum: newLISP and the O.S.
Topic: write-line outputs CRCRLF on my XP box
Replies: 2
Views: 3748

write-line outputs CRCRLF on my XP box

Hi,

I'm using version 9.1.1 on windows XP.

(write-line "")

and

(println "")

both output a three character sequence

CRCRLF

instead of just

CRLF

Is there something I'm doing wrong?