running demo guiserver scripts

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
mostlywrong
Posts: 32
Joined: Fri Jan 09, 2009 10:54 pm

running demo guiserver scripts

Post by mostlywrong »

Im a lisp noob. i know less than nothing about it.
I know slightly less about c as well. but i have poked around with other langs. most recently python. Im not a pro this is just a hobby.

I started up the newlisp edit program from the short cust and started looking at the demos to get a better feel for how things work. Lispy code still looks pretty strange. after looking over the code and doc for a bit i wanted to see one run, thats where things go down hill. I get this error
[ ("C" ".")
(lambda (gs:id gs:action) (net-send gs:out (string "frame-resized " gs:id " " gs:action
"\n")))
]

Some time later and reading the GS server comments i tried starting the jar file first. this worked just fine. Now im wondering why it wont start from the newlisp file.

The newlisp.exe does start up and i can tell (shows up in my firewall ports listing) that newlisp is looking for a server at the default or specified port, its just not starting the jar file (I think)

I do have java installed in fact it was just updated to 6.11 i believe.

Eventually if i leave newlisp edit alone i will get additional text
[
Could not connect to guiserver
]

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

You should be able to start newLISP-GS by either double clicking on the desktop icon installed or by executing:

C:\> newlisp "C:\Program Files\newlisp\newlisp-edit.lsp"

if either thing does not work something is wrong with the installation.

In a Win32 command shell execute the statement:

C:\> set

You should see the following two things in the output:

Path=C:\WINDOWS\system32; other stuff C:\Program Files\newlisp

and you also should see:

NEWLISPDIR=C:\Program Files\newlisp

Some questions:
- What version of Windows are you running?
- Did you install in the default location the installer was offering?

ps: after a failed startup delete all javaw.exe and newlisp.exe processes using the taskmanager.

mostlywrong
Posts: 32
Joined: Fri Jan 09, 2009 10:54 pm

Post by mostlywrong »

desktop icon works great. start menu icon works great.
NEWLISPDIR=C:\Program Files\newlisp is set.

start newlisp=GS from icon. nice neat look. clicks on the buttons, things work nicely.
I click on the HELP menu item and get 2 options. I choose "open demo folder"
I get a file selector. I choose any file (i have choosen them all 1 at a time) and file open in the editor.
the next actions im sure most will do is click on run, well this is where things go bad. i get an error.
The error is this
[
("C" ".")
(lambda (gs:id gs:action) (net-send gs:out (string "frame-resized " gs:id " " gs:action
"\n")))
]

I was hoping seomeone hard run into this before and could give me a pointer or 2.

The short version of the above is: I cant run a file from the editor. I have tried the demos from the demo folder. they all seem to use the guiserver.

I have been able to make the demo files work by using the shortcut as an example and starting from the dos prompt,

runing a file from the guiedit program produces an error after a long timeout i get [Could not connect to guiserver ] at the dospromt.

Im sorry for not providing any new info in this post but i have only just picked up newlip and dont clue.

To restate again when run from the editor the newlisp.exe is started and i do see connection attempts made on the port watcher but the script run from the editor eventually times out.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Please give me information to all of the following questions:

- When you run your demos from the command-line, and it seems to work, how did you start them? Can you given an example of how you start them?

- what flavor of Windows are you running?

- the executable Path, does it look like this? :
Path=C:\WINDOWS\system32; other stuff C:\Program Files\newlisp

- when the demos do not run, when starting from the editor, what output exactly is displayed?

I believe your Java installation is not working right. Reinstall the Java Run time Environment Java RE, not the SDK just the normal runtime environment used in the browser. You can get it here: http://java.com/en/download/manual.jsp

mostlywrong
Posts: 32
Joined: Fri Jan 09, 2009 10:54 pm

Post by mostlywrong »

ok. will remove and reinstall java runtime and get the other info for you. Thanks for the replay.

edit:
seems removing and reinstalling java has borked somethnig up, running from the cmdline no longer works.

more info as i work it out.
Last edited by mostlywrong on Tue Jan 13, 2009 1:42 am, edited 1 time in total.

xytroxon
Posts: 296
Joined: Tue Nov 06, 2007 3:59 pm
Contact:

Post by xytroxon »

mostlywrong wrote:ok. will remove and reinstall java runtime and get the other info for you. Thanks for the replay.
Of course, by being designed for XP, newlisp-edit.lsp won't run on my outdated home Win98se laptop (and I can't work on it at work ;) so I can't help much debugging your XP problems...

But... To test out your Java installation, try the jEdit editor.
http://www.jedit.org/

jEdit runs on Mac OS X, OS/2, Unix, VMS and Windows. (Even Win98se updated for jre1.5.0_13 But it is a bit sluggish on my laptop.) And jEdit looks beautiful!

Note to all: Getting newLISP highlighting and a plugin running newLISP on jEdit might be be a good project, for someone that knows Java (and likes using jEdit), to help spread newLISP's presence. Also jEdit is a good lesson to look at for ideas on clean looking Java gui design.

-- xytroxon

P.S. mostlywrong Welcome!!!
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976

mostlywrong
Posts: 32
Joined: Fri Jan 09, 2009 10:54 pm

Post by mostlywrong »

complete reinstall of java. The bork turned out to be a 0 length guiserver jar file so i reinstalled newlisp. all of the following info is after both reinstalls,
- When you run your demos from the command-line, and it seems to work, how did you start them? Can you given an example of how you start them?
from a cmd prompt in the following folder :
C:\Program Files\newlisp> "C:\Program Files\newlisp\guiserver.jar" 47011 guiserver\button-demo.lsp
- what flavor of Windows are you running?
win xp sp2
- the executable Path, does it look like this? :
PATH=PATH=C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\Program Files\UltraEdit-32;C:\Program Files\Altiris\Software Virtualization Agent\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\ActiveState Komodo Edit 5\;C:\Program Files\newlisp
- when the demos do not run, when starting from the editor, what output exactly is displayed?
this shows up right after i click run button

Code: Select all

("C" ".")
(lambda (gs:id gs:action) (net-send gs:out (string "frame-resized " gs:id " " gs:action
"\n")))
this appears after a few minutes

Code: Select all

Could not connect to guiserver 

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

in C:\Program Files\newlisp\guiserver.lsp line 748 you will find the following:

Code: Select all

(if (= ostype "Win32")
    ; on some Win32 systems the jar -> javaw.exe association my be missing, the use the following:
    ;(set 'server-path (string "javaw.exe -jar " "'\"" (env "NEWLISPDIR") "/guiserver.jar\"'")) 
    (set 'server-path (string  "'\"" (env "NEWLISPDIR") "/guiserver.jar\"'"))
    (set 'server-path (string (env "NEWLISPDIR") "/guiserver.jar"))
)
change it to:

Code: Select all

(if (= ostype "Win32")
    (set 'server-path (string "javaw.exe -jar " "'\"" (env "NEWLISPDIR") "/guiserver.jar\"'")) 
    (set 'server-path (string (env "NEWLISPDIR") "/guiserver.jar"))
)
May be for some reason the .jar to javaw.exe association is not available on your system when starting guiserver.jar from a newLISP child process. Which would be strange, but the only explanation I have at the moment. My Win32 installation is also XP with SP2.

The output you see is the last return value from loading guiserver.lsp (1st satement in the demo). The demo program then gets stuck in gs:init (guiserver.lsp line 1808) waiting for guiserver.jar to respond over TCP/IP.

As guiserver.jar is known to work on your machine (can be started with the icon or from command line), it seems that it fails when starting from gs:init as a newLISP child process.

Lets hope that the above change solves the problem for you.

mostlywrong
Posts: 32
Joined: Fri Jan 09, 2009 10:54 pm

Post by mostlywrong »

I will make the change you suggest. Just not right away. Now i have a problem to chase and its gonna bug me if i don't. blast it.

Edit:
Ok, I made the change.
Seemed to be pretty much comment one out and remove the comment from the other.

Still doesn't work. I really don't feel like reinstalling windows right now :(

mostlywrong
Posts: 32
Joined: Fri Jan 09, 2009 10:54 pm

Post by mostlywrong »

after playing with this for a day or two I tried something different. I used python to make a small script that takes the filename of what ever is dropped on it and starts the newlisp-GS with that file as its argument. at least i can start a file now without typing quite so much.

Locked