Search found 253 matches

by Tim Johnson
Sun Mar 21, 2010 11:58 pm
Forum: Anything else we might add?
Topic: newlisp as a General Purpose java front end.
Replies: 7
Views: 6114

Re: newlisp as a General Purpose java front end.

Frankly, I'm surprised that there isn't more interest in this topic. But I think that the simplicity and practicality of newlisp just might attract a different "crowd" than what would be attracted to java. But, hey I gotta eat and there's a market for java resources. After looking thru the code in g...
by Tim Johnson
Sun Mar 21, 2010 1:48 am
Forum: Anything else we might add?
Topic: newlisp as a General Purpose java front end.
Replies: 7
Views: 6114

Re: newlisp as a General Purpose java front end.

I agree with you on all of this. I have no interest in a newlisp written in java. None. However The newlisp guiserver component is what interests me. Let me rephrase what I said earlier: 1)There is a "java library". It is a file called guiserver.jar 2)There is a "newlisp interface". It is a file cal...
by Tim Johnson
Sat Mar 20, 2010 9:50 pm
Forum: Anything else we might add?
Topic: newlisp as a General Purpose java front end.
Replies: 7
Views: 6114

newlisp as a General Purpose java front end.

I do not currently code in java, but I can see it on the horizon. There is a growing list of scripting languages that are front ends for java and are in part or in whole in java. See http://java-source.net/open-source/scripting-languages I've looked at clojure for the last couple of days, but I'm go...
by Tim Johnson
Wed Mar 10, 2010 4:30 pm
Forum: So, what can you actually DO with newLISP?
Topic: Index for assoc results
Replies: 5
Views: 4487

Re: Index for assoc results

Understood.
Thanks
tim
by Tim Johnson
Wed Mar 10, 2010 4:01 am
Forum: So, what can you actually DO with newLISP?
Topic: Index for assoc results
Replies: 5
Views: 4487

Re: Index for assoc results

OK. Let me take another crack at this: I will use examples that are not tested code but are meant to be illustrative: I have a list, let's call it 'parent-list. It is composed of lists, and we will call them 'member-list(s). They can be accessed by 'assoc (set 'member-list (assoc key parent-list)) ;...
by Tim Johnson
Wed Mar 10, 2010 2:24 am
Forum: So, what can you actually DO with newLISP?
Topic: Index for assoc results
Replies: 5
Views: 4487

Re: Index for assoc results

From my previous programming experience, I've had many needs for the index of a search result. I'm aware that in newlisp one takes more of a functional approach, but it seems to me that the execution of 'assoc in the native C code would have some sort of offset recorded, thus it would be an addition...
by Tim Johnson
Tue Mar 09, 2010 5:06 pm
Forum: So, what can you actually DO with newLISP?
Topic: Index for assoc results
Replies: 5
Views: 4487

Index for assoc results

From the manual

Code: Select all

(assoc 1 '((3 4) (1 2)))  → (1 2)
Is there a system variable that stores the index/position of '(1 2)?
And if not,
1)What is the best way to get the index?
2):) Put it on _my_ wish list.
thanks
tim
by Tim Johnson
Sat Feb 06, 2010 8:34 pm
Forum: So, what can you actually DO with newLISP?
Topic: Set or add a pair to a list by reference
Replies: 11
Views: 6993

Re: Set or add a pair to a list by reference

Example follows. First the data structure that "drives it" set form-data [ "txDBS"[type "select" txt[llabel "Muni:" lj 1] atr[data [(munis)] choice (muni) size 4]] "apn" [type "text" txt[llabel "Enter Apn:" lj 1] atr[value (any[apn ""]) size 20 maxlength 20 req[(if not mu/get 'apns)]] "apns"[type "s...
by Tim Johnson
Sat Feb 06, 2010 2:02 am
Forum: So, what can you actually DO with newLISP?
Topic: Set or add a pair to a list by reference
Replies: 11
Views: 6993

Re: Set or add a pair to a list by reference

What I would like to comment on is not meant to add to or detract from any of conversations going on in this thread, but consider my observations to be parallel to the topic: Oftentimes, it appears to me that the concept of OOP becomes a sort of benchmark with which one system or programming languag...
by Tim Johnson
Fri Feb 05, 2010 4:55 pm
Forum: So, what can you actually DO with newLISP?
Topic: Set or add a pair to a list by reference
Replies: 11
Views: 6993

Re: Set or add a pair to a list by reference

If you want to pass by reference, you also can use the new FOOP (since development version 10.1.8) as defined here: http://www.newlisp.org/downloads/development/newLISP-10.2-Release.html and stable in current development version 10.1.10. Thank you Lutz. I will lay low for a while and try to to dige...
by Tim Johnson
Fri Feb 05, 2010 4:50 pm
Forum: So, what can you actually DO with newLISP?
Topic: Set or add a pair to a list by reference
Replies: 11
Views: 6993

Re: Set or add a pair to a list by reference

Kazimir: The fix is really quite easy. The code becomes (define (set-pair lst key val) (unless(set-ref (list key '?) (eval lst) (list key val) match) (push (list key val) (eval lst) -1))) And the call becomes (set-pair 'attrs attr value) ;; no 'set! Note the use of (eval lst) in the function body an...
by Tim Johnson
Fri Feb 05, 2010 2:03 am
Forum: So, what can you actually DO with newLISP?
Topic: Set or add a pair to a list by reference
Replies: 11
Views: 6993

Set or add a pair to a list by reference

Here's the sample code: (println "<pre>") (define (set-pair lst key val) ;; set a pair if found or add it if not found (unless(set-ref (list key '?) lst (list key val) match) (push (list key val) attrs -1))) (set 'attrs '(("ID" "form0") ("method" "POST") ("name" "form0") ("action" "[[action]]") ;; s...
by Tim Johnson
Tue Jan 19, 2010 4:48 pm
Forum: newLISP in the real world
Topic: Newlisp does not compile on slackware 13.0
Replies: 7
Views: 2258

Re: Newlisp does not compile on slackware 13.0

I consider it very important that I be able to install and run newlisp from /usr/local. And in my experience, many sysadmins for remote servers wouldn't have it any other way. Here is what I did on my system, it is a bit of a hack and I would invite information on a cleaner way to do it. at line 522...
by Tim Johnson
Mon Jan 18, 2010 8:00 pm
Forum: newLISP in the real world
Topic: Newlisp does not compile on slackware 13.0
Replies: 7
Views: 2258

Re: Newlisp does not compile on slackware 13.0

consider the following code block in Makefile NOTE when changing PREFIX, then newlisp should only run # run in an environment, where NEWLISPDIR is predefined, # else NEWLISPDIR will be defined during newlisp startup # as /usr/share/newlisp which is hardcoded in newlisp.c prefix=/usr datadir=$(prefix...
by Tim Johnson
Mon Jan 18, 2010 3:51 pm
Forum: newLISP in the real world
Topic: Newlisp does not compile on slackware 13.0
Replies: 7
Views: 2258

Re: Newlisp does not compile on slackware 13.0

You were right Ted. No changes were necessary. Just curious: What did you do differently with the shell script on configure-alt? Also, I could probably figure this out myself, but perhaps we can share with the community how to target newlisp for installation under /usr/local. The reason for this is ...
by Tim Johnson
Mon Jan 18, 2010 4:28 am
Forum: newLISP in the real world
Topic: Newlisp does not compile on slackware 13.0
Replies: 7
Views: 2258

Re: Newlisp does not compile on slackware 13.0

Heh. Heh. Walked away from the computer. Poured myself a glass of my good old homebrew.
Came back, commented out the the line about debian and uncommented the line about
slack.
Flawless install followed.
cheers
tim
by Tim Johnson
Mon Jan 18, 2010 4:11 am
Forum: newLISP in the real world
Topic: Newlisp does not compile on slackware 13.0
Replies: 7
Views: 2258

Newlisp does not compile on slackware 13.0

Here is the output from configure bash-3.1$ ./configure removing old objects and setting correct permissions ... discovering platform and default memory model ... detected memory model ILP32 detected Operating System LINUX creating makefile_configure ... to make for ILP32 on LINUX type: make to make...
by Tim Johnson
Sat Jan 16, 2010 4:37 pm
Forum: So, what can you actually DO with newLISP?
Topic: Optimizing 'deep' setf
Replies: 7
Views: 5262

Re: Optimizing 'deep' setf

cormullion wrote:I don't think you're reflecting the pattern of the target list precisely enough. This might work:

Code: Select all

(match '(("ID" ?) *) attrs true)
That's correct. Thanks.
by Tim Johnson
Sat Jan 16, 2010 1:32 am
Forum: So, what can you actually DO with newLISP?
Topic: Optimizing 'deep' setf
Replies: 7
Views: 5262

Re: Optimizing 'deep' setf

cormullion does it again. Here were have cut the LOC in half: (unless(set-ref '("action" ?) attrs (list "action" newaction) match) (push (list "action" newaction) attrs -1)) But this raises a couple of more questions. Obviously the functor argument match does its job here, but I'm trying to use 'mat...
by Tim Johnson
Fri Jan 15, 2010 4:10 pm
Forum: So, what can you actually DO with newLISP?
Topic: Optimizing 'deep' setf
Replies: 7
Views: 5262

Re: Optimizing 'deep' setf

cormullion wrote:How about:

Code: Select all

(set-ref  '("action" ?) l '("action" "http://localhost/cgi-bin/test.lsp") match)
Gotta try this. I will get back to you folks on it.
Thanks very much.
tim
by Tim Johnson
Fri Jan 15, 2010 4:07 pm
Forum: So, what can you actually DO with newLISP?
Topic: Optimizing 'deep' setf
Replies: 7
Views: 5262

Re: Optimizing 'deep' setf

Hi Tim, I would probably try to simplify the code which POSTS the form. Normally You won't need a nested structure for posted data from HTML forms. Download Dragonfly and take a look at the request.lsp Here's what it works like: http://www.rundragonfly.com/dragonfly_getpost Cheers Marc Hi Marc, thi...
by Tim Johnson
Fri Jan 15, 2010 1:50 am
Forum: So, what can you actually DO with newLISP?
Topic: Optimizing 'deep' setf
Replies: 7
Views: 5262

Optimizing 'deep' setf

I have written a function that modifies a list four "levels" deep, or to put it another way, has four dimensions. My method uses multiple calls to 'setf. I would welcome any comments or advices as to how to optimize this function - if possible. The preconditions are this: I have a list that has as m...
by Tim Johnson
Tue Jan 12, 2010 6:39 pm
Forum: newLISP in the real world
Topic: Binding a value to multiple values
Replies: 8
Views: 2851

Re: Binding a value to multiple values

I like your method. thanks
by Tim Johnson
Tue Jan 05, 2010 8:50 pm
Forum: newLISP in the real world
Topic: Binding a value to multiple values
Replies: 8
Views: 2851

Re: Binding a value to multiple values

itistoday wrote:
Tim Johnson wrote:Have you done any comparative benchmarking?
I'm not really sure what benchmarking you're referring to. Comparing what to what?
Never mind. (see my previous post)
by Tim Johnson
Tue Jan 05, 2010 7:39 pm
Forum: newLISP in the real world
Topic: Binding a value to multiple values
Replies: 8
Views: 2851

Re: Binding a value to multiple values

Thank you cormullion, we have in you an affirmative second opinion :) so I will give it a try and implement Objective newLISP. Thus you and I may both learn more. Furthermore, I will not need to build these data structures every time the application runs. The source will be a text/html file, data st...