running demo guiserver scripts

Started by mostlywrong, January 09, 2009, 08:09:47 PM

Previous topic - Next topic

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

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



C:> newlisp "C:Program Filesnewlispnewlisp-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:WINDOWSsystem32; other stuff C:Program Filesnewlisp



and you also should see:



NEWLISPDIR=C:Program Filesnewlisp



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

#2
desktop icon works great. start menu icon works great.

NEWLISPDIR=C:Program Filesnewlisp 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

#3
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:WINDOWSsystem32; other stuff C:Program Filesnewlisp



- 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">http://java.com/en/download/manual.jsp

mostlywrong

#4
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.

xytroxon

#5
Quote from: "mostlywrong"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/">//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

#6
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,


Quote- 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 Filesnewlisp> "C:Program Filesnewlispguiserver.jar" 47011 guiserverbutton-demo.lsp


Quote- what flavor of Windows are you running?


win xp sp2


 
Quote- the executable Path, does it look like this? :


PATH=PATH=C:WINDOWS;C:WINDOWSsystem32;C:WINDOWSSystem32Wbem;C:Program FilesUltraEdit-32;C:Program FilesAltirisSoftware Virtualization Agent;C:Program FilesATI TechnologiesATI.ACECore-Static;C:Program FilesActiveState Komodo Edit 5;C:Program Filesnewlisp


Quote- 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

("C" ".")
(lambda (gs:id gs:action) (net-send gs:out (string "frame-resized " gs:id " " gs:action
"n")))


this appears after a few minutes
Could not connect to guiserver

Lutz

#7
in C:Program Filesnewlispguiserver.lsp line 748 you will find the following:


(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:


(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

#8
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

#9
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.