query: internet required for newLISP?

Started by kazemori, August 22, 2003, 12:17:49 AM

Previous topic - Next topic

kazemori

i have recently installed newLISP (win32 binaries) onto my notebook pc (winme).



i am having a lot of fun with newLISP and the demo programs; however, i have one problem:



unless i am connected to the internet, only the console will work! newLISP complains about "net-send expecting a value".

no matter what i try, the console reports back with the same "net-send..."



this is an interesting "feature", to be sure; however, i would like  to use newLISP without having to initiate (or maintain) an internet connection.

(call me "mr. dial-up" ;-)



thanks in advance for any assistance!



kazemori

Lutz

#1
newLISP uses TCP/IP for communication between the newlisp-tk frontend and the newlisp.exe program. So you need to have at least an ethernet card in your computer, or be connected to the internet via dial-up. If not you, can only work with newlisp.exe directly and in console mode.



As a benefit of this architecture the newLISP frontend can be used remotely on a different computer. So you could control newLISP remotely. This is important when running newLISP on mainframes or other computers, you don't have direct access to.



Lutz

kazemori

#2
thank you for your reply!



my notebook has built-in ethernet (no connection is available); are you saying that you can not modify newLISP to operate (with full functionality) without a persistent TCP/IP connection?



if so, you should be *explicit* about this on the newLISP web-sites (SourceForge, et al) and state that newLISP can not offer full functionality to "stand-alone" users -- newLISP is in fact an "internet-only" programming tool.



i hope this is not the case. i have spent several weeks researching the various Lisp and Scheme dialects and had decided to use newLISP. now it seems that i will have to go elsewhere. DrScheme, anyone? ;-)



i can appreciate this "feature" which you have built into newLISP for remote host operations; however, this should be an optional capability (via a library or module). why should this be forced?



i hope that there is something that we can do...you have a customer here!



kazemori

eddier

#3
I have an ethernet card in my computer and I use newLisp at home on my laptop without connecting to the Internet. I fire up newLisp-tk from time to time but newLisp never asks me to dial up a connection. Maybe XP doesn't ask to dial in???



My favorite way to use newLisp on Windows is to use the SciTe editor, a free download. You can dump all the keywords in the lisp properties set F5 to automatically execute your code from the editor. If your doing Tk stuff, however, I'm not sure this works, but I will check.



Eddie

kazemori

#4
hello Eddie, thanks for the tip -- i will check out SciTe!



newLISP-Tk does not ask for a connection, and my system does not have permission to initiate one (never trust M$ ;-). i have determined (with fingers crossed) that an internet (or network?) connection is only required when the console is initiated. after the console is up and running (after a successful "load" of a Tk-enabled script), it does not seem to make additional checks for the system's connection status.



this is inconvenient, but tolerable for the moment. i really want to stick with newLISP for a while, so i am more interested in working around this hiccup than switching to a new Lisp/Scheme implementation.



having the Tk environment available (or something equivalent) is essential.



kazemori

Lutz

#5
You can work newLISP-tk without beeing connected to the Internet, but what you need is a TCP/IP stack running on your machine, because becuase the frontend and backend part communicate via TCP/IP.



Unfortunately on Windows a TCP/IP stack is ony loaded only when an ethernet card is present or the dialup software is running. On Unix-like operating system TCP/IP communications between parts of the system is an old and essential thing, i.e. X windows wouldn't run without and many bigger database systems.



Lutz

kazemori

#6
thank you, Lutz.



i do understand about *nix and *BSD systems having persistent TCP/IP. (i will not switch my notebook off from windoze until i have found a suitable driver for my winmodem ;-)



my notebook does have built-in ethernet, but this seems to be "inert" WRT my notebook's TCP/IP status. i will check the system configuration (maybe i disabled the card at some point).



as stated in my previous post: i can initiate an internet connection via dial-up, run newLISP-Tk and load at least one Tk-enabled script, and then disconnect. newLISP-Tk then seems to run normally with one exception: the console does not "unload" scripts that have been "quit". i have to manually delete the definitions (one-by-one) from an editor window (newbie alert -- maybe i am missing something here?). this is only an issue when modifying certain scripts and both the "old" and "new" copies are loaded.



seriously, i am having a lot of fun with your newLISP and see this as just a bump in the road... thank you for all of your efforts. i do appreciate it!



kazemori

Lutz

#7
Ok, I guess I didn't understand at first ...



When you load lisp files their definitions stay in memory in the newLISP workspace. That's the way it is supposed to work. You add definitions, set variables etc. than you can save your workspace or just one context (name space) by using the the 'save' funtion or in newLISP-tk using the menu to do the same.



Some people don't like editing in the Tk frontend and use it only for browsing functions, debugging etc. These people edit their files using a different editor and then can use the 'reload' button (the second from the left) or CTRL-r to 'reload' the last loaded.



This will overwrite existing definitions and contents of symbols but not 'undo' exisiting symbols.



Lutz

kazemori

#8
hello lutz,



thank you for making such prompt replies. it turns out that i am using newLISP-Tk just as you have described:



<lutz> Some people don't like editing in the Tk frontend and use it only for browsing functions, debugging etc. These people edit their files using a different editor and then can use the 'reload' button (the second from the left) or CTRL-r to 'reload' the last loaded. </lutz>



i have very little previous Tk experience (perl-Tk), so i am trying to gain a basic competence by re-tooling the demo programs you were kind enough to include. for the moment i just cycle scripts through wordpad's MRU file list, and reload scripts into newLISP-Tk as needed.



i have O'Reilly's win98 in a nutshell, which suggests that i can setup a diagnostic loop for TCP/IP communications (ipconfig). i will try this and see if i can "hot-wire" my notebook to keep newLISP-Tk happy...



kazemori

Lutz

#9
Before I did the frontend for newLISP I had almost no Tcl/Tk experience. Besides the demo programs, you also might look into the source of the frontend. The file newlisp-tk.tcl is included in the source distribution and has some interesting things, like doing menu's, tcp/ip etc..



The demo programs are a good start, because I have tried to put most of the elements you might encounter when doing Tk into it. The manual also gives you some specifics about Tk on newLISP.



At that time I used the book "Practical Programming in Tcl and Tk" from "Brent B. Welch". He is from the Tcl/Tk development team and his book helped me a lot. I also use the O'Reilly pocket reference a lot.



I never got to much excited about the Tcl part of Tcl/Tk, but think that the graphical part Tk is relatively easy to learn and streight forward.



In earlier times newLISP had it's own layer of windows and graphics on top of the MS Windows API. But then I wanted a way to make graphics for newLISP portable on all OS platforms and Tk has done a very good job at that.



The MS Windows API is full of inconsistencies and I know from my own experience that it is very hard to build something clean and logical on top oft it. Tk has done that and it works on Windows, OSX and most UNIX flavors.



Hope you find some trick to get your Tcp/Ip stack up running on your notebook without dialing to your ISP ...



Lutz

kazemori

#10
time for a new thread?



<topic Tk>

i also have the O'Reilly pocket reference and the O'Reilly Perl-Tk book (maybe i will survive =). i have also downloaded the newLISP-Tk source, so i will take a look at newlisp-tk.tcl file. "pick a lisp, learn Tk" =)



have you seen the FreeWrapBLT 5.5 release? does this add anything (useful) over the standard FreeWrap?



how far back was the last release of a "non-Tk" newLISP? it seems that you have been developing newLISP for over 10 years. wow... BTW, you write really clean C.

</topic>



<topic TCP/IP>

alas, i failed. my ethernet card had indeed been disabled, but turning it on did not help. nor did any of my attempts to reconfigure my networking. in the end, i had to just reset eveything back to the original configuration.



i will simply proceed as i have indicated before. if i'm out in the boonies, i will content myself with the console on my notebook -- or just take LispMe!

</topic>



kazemori

eddier

#11
When I plug in newlisp-tk into SciTe it executes with the full path, that is, it just brings up the newlisp-tk console without running the program. I'm not sure how to fix it to just run the file. I know the file must be in a directory in the PATH variable also for this to work.



I used Tk a long time ago before I discovered CGI and JavaScript. I've written quite a few programs for the College, mainly for financial aid, but they are accessed through CGI, which is a much easier way for me to make a cross platform GUI interface and allow people to share files.



Eddie

Lutz

#12
If newlisp-tk.exe starts it looks for newlisp-tk.config normally in the same directory wher newlisp-tk.exe is located. newlisp-tk.config contains all kinds of settings (mostly TCP/IP stuff) to start the newlisp.exe main program.



-  put the path of newlisp.exe in you sytem path, so newlisp-tk.exe will always find it even if newlisp-tk.exe was started from a different place.



-  perhaps newlisp-tk.exe is looking for newlisp-tk.config in the directory where you start SciTe.exe?



Lutz

kazemori

#13
hi all,



i have downloaded SciTe and will try it out today. i have also downloaded a few other editors to "test drive". if any of these editors are promising (and play nice with newLISP =) -- i will post some information with a new thread.



cgi reminds me too much of my time with perl...no thanks! javascript (in the form of jscript) is built into windows, so i have been using jscript and vbscript to torment my notebook. i have an idea to use a script to initiate newLISP (connect to internet : load newLISP : load one Tk-script : disconnect from internet : hand-off newLISP).



if this is tiny hack successful (and if anyone is interested...) i will make the script available.



kazemori

eddier

#14
I've tried some things like copy newlisp-tk.config into the SciTe directory and making sure newlisp is in the PATH environment variable. It works for newlisp but not newlisp-tk. I have so many other projects that must be completed, I will have to look at this later.



Good luck on those other editors.  I use jed sometimes on my Linux box (it works on Windows too) .



I like vim for some things, especially PHP. I know a lot of people that hate it because it seems so old fasion, but who knows, you might like it.



I think my favorite editor is emacs, but for some reason, I don't enjoy it on Windoze. BTW, if you change the compile command in emacs from "make -k" to "newlisp-tk," it runs newlisp-tk programs with out a hitch, at least on my Linux box.



Eddie