Search found 31 matches

by gcanyon
Tue Dec 05, 2006 9:00 am
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

By the way: Whats the size of a minimal runrev-app for windows standalone? Is it small like newLISP? ;-) Not so small. I don't know what the actual memory use is, but on disk the minimum is about 3MB I believe. Revolution doesn't compile conditionally. There's one engine file, and everything is in ...
by gcanyon
Tue Dec 05, 2006 8:55 am
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

Sometimes it just takes time and perspective...

I've been away for over a month. I hadn't thought about newLISP much during that time. I happened to think of newLISP tonight, though, so I came here to the forum. I re-read the suggestions here. I opened TextWrangler. (Not TextMate) I pasted in the runTK code. I pasted in the swarm code. I zapped g...
by gcanyon
Thu Oct 26, 2006 9:23 pm
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

Revolution is certainly cool - I tried it for a while, and I'd certainly consider choosing it if I ever had to develop a cross-platform application with a user interface. (And if someone else paid for licenses :-)) newLISP is a very different animal, complementary more than similar in any way. I fi...
by gcanyon
Thu Oct 26, 2006 5:35 pm
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

Any updates to either newlisp or text wrangler? Nope. Does a simple hello world program no longer work at all? Does it work with any other language (eg Perl, Ruby)? I'm happy to help, but there's not much information... I'll try this when I get home today. Maybe I'm just committing some stupid mist...
by gcanyon
Thu Oct 26, 2006 1:56 pm
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

If you've read the previous messages in this thread, you know Lutz admonished me for not using newLISP through Terminal. I've been doing it using Text Wrangler, which has a Run command that works nicely and puts the results into a separate window. In response, I told Lutz that i preferred working ou...
by gcanyon
Wed Oct 25, 2006 4:27 pm
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

Some comments: Any advanced use of newLISP (or any other scripting language) demands learning the basic UNIX commands in the Terminal application. Excutiing a file out of a text editor is practical during progragram development, but not much else (advanced Emacs and Vi users would object ;) ) Try a...
by gcanyon
Wed Oct 25, 2006 3:19 pm
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

Have you tried to run the programs without combining, as described here? http://newlisp.org/index.cgi?Tips_and_Tricks Lutz Yes, with no luck. I have no idea: -- What file name to save the runtk code as. -- Where to save that file. -- What to do then. I tried: -- Saving it as runtk (with no file ext...
by gcanyon
Tue Oct 24, 2006 2:00 pm
Forum: newLISP in the real world
Topic: Can't get runtk to work?
Replies: 17
Views: 17414

Can't get runtk to work?

I'm trying to use runtk to call tk, and getting an error. Here's the error: invalid function : (map set  '(myin tcout)   (pipe)) Thanks for any help -- Geoff This is the code I tried to run. It's a combination of the runtk file with the swarm example code. #!/usr/bin/newlisp ; setup communications t...
by gcanyon
Thu Oct 12, 2006 12:07 am
Forum: newLISP in the real world
Topic: Perhaps a dumb question
Replies: 5
Views: 5784

Lutz wrote:yes, that is exactly it, you should construct the list before the loop begins: (snip)
Or just this?

Code: Select all

(map println '(1 2 3 4))
by gcanyon
Sat Sep 30, 2006 6:50 am
Forum: newLISP in the real world
Topic: newLISP TextMate bundle not working for me
Replies: 3
Views: 3599

newLISP TextMate bundle not working for me

I'm using TextMate 1.5.3 and trying to install the newLISP syntax bundle. Whnever I drag the bundle onto TextMate I get a dialog that says, "Bundle is Corrupt." Specifically the info.plist file is corrupt, it says, or missing.

Any ideas what I might be doing/not doing?

thanks,

gc
by gcanyon
Thu Sep 28, 2006 5:42 am
Forum: Anything else we might add?
Topic: Is there a way to play sounds?
Replies: 5
Views: 4725

Is there a way to play sounds?

I looked in the documentation and didn't see anything related to playing sounds, either resources or external files. Is there a way to do this?

thanks,

Geoff
by gcanyon
Wed Sep 27, 2006 9:41 pm
Forum: newLISP newS
Topic: introducing named parameters
Replies: 1
Views: 3177

Really nice!

Out of curiosity (since I barely understand newLISP, let alone macros) I tried extending the example with a synonym: (set 'From 0 'To 1 'Subject 2 'Body 3 'Through 4 'Using 4) After that modification, I could make it work with either Through or Using for the server name. So it would be possible to a...
by gcanyon
Tue Sep 26, 2006 5:07 am
Forum: Anything else we might add?
Topic: Tk libraries?
Replies: 0
Views: 2583

Tk libraries?

Has anyone put together libraries for tying in to Tk to create a user interface? I'm thinking of something that shields a poor simpleton like me from having to learn any Tcl along with trying to shove newLISP into my brain. I'm thinking of something that would take (tk-newwidget windowid widgettype ...
by gcanyon
Tue Sep 26, 2006 3:43 am
Forum: Anything else we might add?
Topic: Speed Question -- Go, newLISP!!
Replies: 2
Views: 3117

After doing some research, a signiifcant portion of the difference came down to the arrays I used. Revolution uses associative arrays only. Even if you use x[1], x[2], x[3] etc., Revolution is still using associative arrays. Thus something simple like (set 'x (prisonerArray x))) can be up to 9 times...
by gcanyon
Sun Sep 24, 2006 7:46 pm
Forum: Anything else we might add?
Topic: Puzzled by (let examples in the documentation
Replies: 3
Views: 3966

Lutz wrote:
Wouldn't this make more sense in defining a sum-of-squares routine?
Yes, absolutely, the example has been kept simple for didactic purposes.

Lutz
Thanks, just making sure I wasn't missing something.

gc
by gcanyon
Sat Sep 23, 2006 11:13 pm
Forum: Anything else we might add?
Topic: Puzzled by (let examples in the documentation
Replies: 3
Views: 3966

Puzzled by (let examples in the documentation

The examples given for the use of (let are leaving me confused. I think I understand what (let is for, but in the context of the example, isn't it unnecessary? (define (sum-sq a b) (let ((x (* a a)) (y (* b b))) (+ x y))) (sum-sq 3 4) → 25 (define (sum-sq a b) ; alternative syntax (let (x (* a a) y ...
by gcanyon
Thu Sep 21, 2006 5:53 pm
Forum: Anything else we might add?
Topic: Tough (for me at least) macro question
Replies: 10
Views: 8660

cormullion wrote:I would do one of these - more idiomatic perhaps?

Code: Select all

(dolist (n (sequence 1 10))
	(println n " step a")
	(unless (= n 5)
		(println n " step b")))
		
		
(dolist (n (sequence 1 10))
	(and
		(println n "step a")
		(!= n 5)
		(println n "step b")))
Both of these look like good solutions, thanks.
by gcanyon
Thu Sep 21, 2006 5:49 pm
Forum: Anything else we might add?
Topic: Tough (for me at least) macro question
Replies: 10
Views: 8660

Oops, I meant 'no' continue, not 'now' continue, I corrected my previous post Lutz ps: I am not a native English speaker, so sometimes I get 'phonetic' ;) This time through, I saw your edited post first. I saw "there is no continue" and said, "wait a second, didn't that say "now?" I wondered how I ...
by gcanyon
Thu Sep 21, 2006 5:07 pm
Forum: Anything else we might add?
Topic: Tough (for me at least) macro question
Replies: 10
Views: 8660

Yes, there is now 'continue' or 'repeat next' in newLISP loops. Over time you get acustomed to program in a functional style, using 'if', 'cond' etc. to control the flow. All loop constructs in newLISP like 'dotimes', 'for' and 'dolist' can have a break expression to leave the loop early. Then ther...
by gcanyon
Thu Sep 21, 2006 4:57 pm
Forum: Anything else we might add?
Topic: Speed Question -- Go, newLISP!!
Replies: 2
Views: 3117

Speed Question -- Go, newLISP!!

In general, it seems newLISP is pretty fast, and intended to be so. I compared an implementation of my first solution in newLISP to an implementation of the same concept in Revolution, which I have used for several years. The code for each is included below. The interesting point is that even though...
by gcanyon
Thu Sep 21, 2006 4:05 pm
Forum: Anything else we might add?
Topic: Tough (for me at least) macro question
Replies: 10
Views: 8660

Tough (for me at least) macro question

In my experience with other languages I'm used to being able to do this: repeat with i = 1 to 10 #do step a if i = 5 then next repeat #do step b end repeat This means that for i = 1 2 3 4 6 7 8 9 10 the code does both step a and step b. For i = 5, the code only does step a, and then skips on to i = ...
by gcanyon
Thu Sep 21, 2006 3:49 pm
Forum: newLISP newS
Topic: let/letn proposal
Replies: 5
Views: 5598

Thanks Lutz, I'll chose somewhat from it. gcanyon: "arrays" doesn't helps to store a values. U may store a list as well. This construct is for assigning the list's elements to some sepatate symbols at once. Examine a manual about a "map" function. I understand (in a basic way) how map works, but I'...
by gcanyon
Wed Sep 20, 2006 11:19 pm
Forum: newLISP newS
Topic: let/letn proposal
Replies: 5
Views: 5598

Re: let/letn proposal

From time to time I using the construction (map set '(a b c ...) (something that returns a list)) Unfortunately, the most of such applications (for me) requires predefinition of a, b and c as local scope symbols, i.e.: (snip) I'm a newbie, but is there a function to convert a list to an array thus ...
by gcanyon
Wed Sep 20, 2006 3:54 pm
Forum: newLISP newS
Topic: Tell me how I talk funny
Replies: 7
Views: 6502

Re: Tell me how I talk funny

As for the rest - we're a tolerant bunch, and if it works for you, cool! newLISP is flexible enough to allow you to write how you like, to some extent, and to use any sort of formatting and commenting you prefer. There isn't a right way...! (Although there sometimes is a faster way. And sometimes a...
by gcanyon
Wed Sep 20, 2006 3:51 pm
Forum: newLISP newS
Topic: Tell me how I talk funny
Replies: 7
Views: 6502

Re: Tell me how I talk funny

Is there a better way to do an if than this: #if the prisoner has already been included in a list, go next (until (prisonerDoneList i) (good suggestions snipped) I'm not sure which one you need here, though. I'm not too sure why you need to mark each prisoner as done - the loops can be found just b...