Windows install

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Windows install

Post by jazper »

Hello all
Have just re-installed newLISP (Win 7 pro 64 bit). When I try running programs from the IDE, I get:
run-shell
Could not start C:\Program Files (x86)\newlisp/newlisp.exe -C -w "C:\Users\MyUserName"
I have java installed, and the IDE loads ok and loads files ok. It just won't run them. Will be grateful for any help.

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Re: Windows install

Post by HPW »

Hans-Peter

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

Hello jazper,

I'm taking a blind shot at this, especially since I don't run Windows (and I don't run the IDE), but your message reads as if you installed the 64-bit binaries, but the IDE is looking for newLISP under the 32-bit binaries directory (namely, "C:/Program Files (x86)"). I think your newLISP might be located under the 64-bit binaries directory (namely, "C:/Program Files"). You might check to see (1) where newLISP is actually located on your machine and (2) if the IDE is, or can be, configured to find it in the right place.

Again, this may not be the problem, but worth a check.
(λx. x x) (λx. x x)

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

Re: Windows install

Post by Lutz »

Actually the IDE doesn't care what kind of newLISP you run. You can mix and match both 64/32 to your liking. If the temp directory situation is ok, I would de-install Java and reinstall it taking an installer JRE (Java Runtime Environment) directly from the Oracle website. The same thing happened to me two weeks ago after a Java update on a Windows 7 64bit laptop, I am using. After reinstalling Java and the IDE everything, was fine, as it was just before the Java update.

Ps: for the temp situation, you can check (env "TEMP") in newLISP. If it shows anything, you are fine.

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Thanks for all the quick responses. After another few attempts, including installing in C:\Program Files rather than the (x86) equivalent (because I found java in C:\Program Files, but not in the other, though I doubt that made any difference), I am back to where I started.

I still get the same error when running

Code: Select all

newlisp newlisp-edit.lsp
- the IDE loads, but immediately gives the error message, as it does whatever I load and try to run. Loading from the Desktop shortcut does the same thing, as does loading from the Start Menu.

However, the demos run:

Code: Select all

newlisp [demo_name]-demo.lsp
from Command Prompt. They just won't run from the IDE itself. There must be some config error somewhere, but I can't find it. All the "env" tests work fine, producing predictable results: they appear correct. I guess I should make some change to newlisp-edit.lsp - will have to come back to that ...

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Java 7 update 21 breaks my newLISP install :(

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

jazper, do you mean you can't install newLISP because some Java update somehow breaks it or prevents you from successfully installing newLISP? Or do you mean that newLISP is installed OK, but now you can't interact with Java (e.g. newlisp IDE/guiserver seems broken)?

I don't mean to make light of your situation with the following dictum, but one of the reasons I work with newLISP is so that I can actively avoid languages like Java. :)

So, my ignorance of Java to that extent does not allow me to help you properly -- sorry. :( I hope someone else can though. Good luck.
(λx. x x) (λx. x x)

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

Re: Windows install

Post by Lutz »

He can start the demo programs using the Java guiserver. The problem is with the IDE.

After newlisp-edit.lsp starts running and established a connection with the Java based guiserver, the guiserver starts an extra newlisp process communicating with the lower monitor area in the IDE.

The message:
run-shell
Could not start C:\Program Files (x86)\newlisp/newlisp.exe -C -w "C:\Users\MyUserName"
happens in the runShell() calling setupShell() methods in guiserver/TextAreaWidget.java.

So what happens is, that Java cannot shell-out other processes, probably the Java update is a security fix, and the whole problem is permission related.

One of the things I did last month, when this happened to me, was reinstalling Java and newLISP, but also - and this may be important - removed the C:\Program Files (x86)\newlisp directory. The newLISP uninstall removes all files inside that directory but leaves the directory itself and perhaps with wrong permissions.

So try uninstalling Java and newLISP and remove that directory. Then reinstall everything. Perhaps that directory then gets installed with adequate permissions.

Another possibility is, that it is firewall related. The newLISP shell is created with two pipes for STDIO and error I/O. Perhaps those pipes cannot be established.

To make it short: It's a security problem when Java is trying to shell out a process.

... also the fact that the machine, Jazper is talking about, is an office machine, points to security related stuff. Probably the machine is managed by some IT departement in that company and with special pernissions.

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Sorry @rickyboy, that I never got a chance to reply. Lutz's diagnosis is well reasoned, to do with Java. I believe that's hit the nail on the head.

Whether I can *do* anything about it is another question, if I am indeed up against permission problems. Everyone loves to hate/hates to love Java these days, and sysads are at the head of that queue.

The next step - to remove C:\Program Files (x86) is basically impossible - it would need wiping everything (that is to say, all 64 bit programs) on this pc, which is *all* programs on this pc, and then re-installing everything, preferably newLISP first. The operative word is moron :) - as they joke in England,
moron my job is worth
since they have done two full installations for me in a week already, and I am not allowed access to the licences to reinstall everything myself. Sigh.

Anyway. Thanks Lutz for the explanation: I have been poring over newlisp-edit, trying to work out how and what it called, so you've saved me a lot of what would have been fruitless effort. I will ask for help from a sysad, just in case they may be able to help, but I sure as hell am going to leave that to a day like Tuesday or Wednesday. They are rather unapproachable on Mondays and Fridays!

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Just another question on this:

I'm not familiar with the Newlisp HTML IDE. Would that be an option? In other words, would that allow me to side-step java?

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

Sounds like it's time to break out vi(m) or emacs. :)

Seriously. I use emacs for my newLISP programming (on Windoze, OSX, Linuxen and BSD) and others here on the board have their favorite editor/platform (other than emacs) for the same purpose. All of the ones I have heard about can do at least what newlisp-edit can do ... and no Java. ;)
(λx. x x) (λx. x x)

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

(P.S. There are also ways to get portable* versions of Java before 7u21, but do you really want to go to all that trouble just to use Java for newLISP programming development? I think not. Java, ptoo! Blech! :)
_________________
* "portable" = "self-contained, and install wherever you want without admin privs".
(λx. x x) (λx. x x)

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Java, ptoo! Blech! :)
Well, rickboy, you got a laugh out of me there. I do like Emacs on my Ubuntu machine, though am not particularly good at using it, yet. What you say makes perfect sense, of course, except that the last time I tried installing Emacs on Windows was only slightly better than waiting for the dentist to open on Monday after toothache for the whole weekend.

I will give it another try.

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

I've had good luck with this on Windoze: http://ntemacs.sourceforge.net/

The first download link there, "ntemacs24-bin-20120825.7z" is what you want -- it's a pre-built, portable emacs24. I just unarc[1] it in any directory; then make shortcut to the "runemacs.exe" binary there.

But I use emacs also for other things (org-mode, IRC, mail, etc) so I have a truly "integrated" environment. :) However, you should feel free to explore other editors, and I'm surprised nobody has chimed in yet on another editor. Hmmm.
______________________
[1] -- you'll need an arc utility that understands the .7z format. If you don't have one, try http://www.7-zip.org/ or even better (if you don't have admin privs): http://portableapps.com/apps/utilities/7-zip_portable.
(λx. x x) (λx. x x)

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Thanks very much, rickyboy.

Btw, what about the available newLISP modes for emacs? Have you used any of them, and is it difficult to get one working?

Org, email -- wow -- you sound like one of those "emacs as an OS" people :)

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

Thanks, again, rickyboy. usb drives, at my workplace, are unfortunately even more verboten and reviled than handing out the permission I would need for java. Insert one, and a so-called support person is sure to arrive (looking peeved) within seconds, and speaking in tongues :(

Nonetheless, I am glad you drew my attention to Portable Apps - great idea - I will try it for travelling - has promise for internet cafes at airports etc, where they have usually never *heard* of emacs.

emacs(24) installed just fine on my work PC. Things have come a long way in the last couple of years, because this was painless.

When I have time, I'll scout around there for where to put the newLISP mode file - on Ubuntu 12.04, it will be in ~/.emacs.d, which is currently empty, waiting for me to place a newlisp.el file there.

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

See this for a discussion on the state of newlisp-mode: http://newlispfanclub.alh.net/forum/vie ... =16&t=4349.
(λx. x x) (λx. x x)

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

I finally found a folder at

Code: Select all

C:\emacs\lisp\progmodes
(emacs on my setup is on C:\emacs) containing a bunch of .el files that I assume are mode files, and placed newlisp.el in it. Not a single posting or guide found thus far even mentions that folder. Then I found a book I bought years ago on Gnu Emacs which was up to date for emacs 21.3, in which some poring (in chapter 13) revealed that my .emacs file should be placed in whatever folder is configured to be my HOME folder. That was not yet defined, so I created that User Variable via Control Panel, and Advanced System Settings. Then, I created the .emacs file, and copied the emacs load code from the newlisp.el README into it. Naturally, I had to change the folder where newlisp.el is found, accordingly.

So, I am at the point where emacs loads normally (until I got things right, it complained of not finding the file), and the result is ... hopeless. Because, when I load a newlisp file, I get no syntax colouring, nor do I get the option of shelling out to program execution, and editing by turns, which is the whole point of the many hours that I have spent. Ptooey! Blech!

And that, sadly is the state of MY discussion on newlisp mode.

I did find a little program, though, named "LispIDE" for windows. One has to create a batch file, containing for example:

Code: Select all

newlisp myprogram.lsp
name it [anything].bat (I used myprogram.bat), and then (in LispIDE) use Tools menu to set the path, being that .bat file. Once that's done, all one needs to do is use the reset icon each time the program is to be run.

Syntax highlighting is colourful and good, and, side-stepping my java isse, this will do just fine on Win 7 at work, because I do only small test programs there.

In the end, though, I am irked that I can't get emacs to work usefully for me on Windows - even for Latex, I resorted to TexWorks. The exact same file that works fine in (Win 7) TexWorks results in many Latex errors under emacs in Win 7. The PDF does finally print and is ok, but who wants to press OK sixty times to get a PDF?

On Ubuntu, I use both Emacs and TexWorks interchangeably for Latex without problems.

Once again, if there is a newlisp user who is actually successfully using both emacs and newLISP on Win 7, it would be great if that person could share setup experience with me.

Having said all that, I am still grateful, as always, to rickyboy and whoever else lends a hand.

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

Oops. Mea culpa, on the Emacs startup thing. Stay tuned. I'm going to put something together and get back to you here, as soon as I'm finished helping the fam get their day started.
(λx. x x) (λx. x x)

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

Re: Windows install

Post by Lutz »

Note, that although you could not run the newLISP GS IDE, you still could run the Guiserver Java demos from the command line.

That means, you also can use the Emacs based IDE to edit/launch programs launching and communicating with the Java based guiserver. The problems you had, where just shelling out from Java, starting a new process, but you still can use Java from newLISP.

Ps: updated http://www.newlisp.org/code/newlisp.el to 10.5.0 and using the latest from here https://github.com/kosh04/newlisp-files

I believe kosh04 is the same kosh on this forum.

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

I am not sure what is meant here:
That means, you also can use the Emacs based IDE to edit/launch programs launching and communicating with the Java based guiserver. The problems you had, where just shelling out from Java, starting a new process, but you still can use Java from newLISP
Which IDE are we talking about here? Emacs, LispIDE or newLISP GS IDE?

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

Re: Windows install

Post by xytroxon »

Lutz, I am also having the same problem on Win 7 :o(

Back in March, I uninstalled Java 6 when it failed to upgrade to Java 7... (Downloading nearly 31 megabytes over a 28.8k phone modem over a rickety phone line in the country isn't pretty...) From the on going Java security problems I read about back then, I waited to download Java 7... (One article I read recomended uninstalling Java and to wait until fall 2013... or 2014... or...)

When I saw Jazper was having problems, I tried downloading Java 7... when lighting zapped my modem after about 27 megabytes. (expletives deleted)... So, I fired up my old Win 95/98 machine and... the moniter died... (expletives deleted)... then the clock battery died (more expletives deleted)...

Tried downloading via my Android tablet at MickyD's a couple of times... (9+ partial downloads - severe eye and thumb strain - 3+ pounds weight gain)...

Finally!!! Downloaded Java 7u21 last weekend, (GetRight - 26.8k - 4+ hours) and... no (expletive deleted) USB port... Oh my old machine has the holes in the PC board and case for USB... but back in 1996, it was an optional upgrade... Then the (expletives deleted) CD burner... I thought my Win 98 CD burner was dead... After several days of on and off hightech troubleshooting, it seems that old Win 98 CD burners don't like Win 7 DVD-R's... So after a (many, many more expletives deleted) month, I now have Java 7 on my Win 7 machine, a beautifully readable Win 98 screen on my HDTV, and a sore thumb from switching between TV and VGA modes on my remote control...

And while the newLISP GS IDE runs nicely on Win 7, using that cmd.exe shell process to run the demo programs dies like the dirty dog son of a Java security fix that blocks it!!!!!!!!!

Since I don't have an IT department at home blocking me, I fear this affects all WIn 7 machines with the Java 7 upgrade installed... I don't use the newLISP GS IDE *, so I don't care...

Also, as a point of reference, since I mostly use my home Win 7 machine offline, it has never been automatically molested by Microsoft security fixes...

Moral: Never use a software platform named after an island that angry coffee drinking volcano gods call home...
http://en.wikipedia.org/wiki/Volcanology_of_Java

-- xytroxon

P.S. * As for me and my house, we will worship the editor house of (w)SciTE forever...
http://www.scintilla.org/SciTE.html
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

@jazper

I installed the kosh04 (kosh) newlisp-mode on a clean linux install (I don't have Windoze at home), but the following should work on Windoze equally well.

Two steps to activate newlisp-mode in Emacs (24).

1. First, you should have already obtained and placed newlisp.el (and other files (aka newlisp-mode files)) into a proper directory. I'm going to recommend they get placed in the directory ~/.emacs.d/newlisp-mode. Here's one way to do it.

Code: Select all

$ cd ~/.emacs.d
$ git clone git://github.com/kosh04/newlisp-files.git newlisp-mode
You should now have the newlisp-mode files in ~/.emacs.d/newlisp-mode. Of course, the "$ " prefix indicates working at the *nix shell, you just do the same at the cmd.exe prompt. Maybe on Windoze, at the cmd prompt, it would be something like this.

Code: Select all

C:\> cd %HOME%/.emacs.d
C:\Users\me\.emacs.d> git clone git://github.com/kosh04/newlisp-files.git newlisp-mode
Notice that the git clone command should be exactly the same as the *nix version.
But what if you don't have git? Oops, I originally didn't think about that. My first answer would be, why not? :) Then, my recommendation would be to get git installed on your Windoze box ... however ... in lieu of getting git, you could perform the folllowing steps as a "poor man's install" of newlisp-mode.
  1. Create the directory ~/.emacs.d/newlisp-mode.
  2. Simply copy Lutz's version of newlisp.el (which, for the time being, is now newer than kosh's git repo version) into this directory.
2. Now, add the following lines to your ~/.emacs.d/init.el file.

Code: Select all

;; Setup this handy variable to reference ~/.emacs.d.
(setq dotemacsdotd-dir (file-name-as-directory (expand-file-name "~/.emacs.d")))

;; Turn on column number indicator in the mode-line. (Not related at
;; all to newlisp-mode BTW; just nice to have.)
(column-number-mode t)

;; If you hit the TAB key to indent source, you want blanks, not
;; tabs. This is not newlisp-mode specific, but you'll want this
;; because tab insertion, when you hit the TAB key, is the default. :(
(setq-default indent-tabs-mode nil)

;; This turns on syntax coloring (highlighting) for all "buffers whose
;; major mode supports it." (quote from the font-lock-mode func doc.)
(global-font-lock-mode t)

;; newlisp-mode config -- these steps are taken from the header
;; comment in kosh04's newlisp.el.
(add-to-list 'load-path
             (file-name-as-directory
              (concat dotemacsdotd-dir "newlisp-mode")))
(require 'newlisp)
(add-to-list 'auto-mode-alist '("\\.lsp$" . newlisp-mode))
(add-to-list 'interpreter-mode-alist '("newlisp" . newlisp-mode))
I did this, restarted emacs, opened a file (I called it "try.lsp") and it put the buffer into newlisp-mode straight away. There will be a "newLISP" menu in the Menu bar. You can type an expression in the source file, access this menu to evaluate the whole buffer (source file) or only the expression before your cursor (note your cursor position of course).

Man, this works so well for me that I'm going to switch to using this (the kosh) version over the current newlisp-mode I have been using, which is a fork of the TJ version. Thank you, kosh!

_____________________________________________
UPDATE: I just found this little easter egg: if you're in a newLISP buffer, and you do a Meta-: -- i.e. type Alt : -- you will be given a prompt at the bottom of the Emacs window (it's called the minibuffer) where you can enter a one-off expression to get evaled by the running newLISP process. Your hands never have to leave the keyboard. Pretty cool.

UPDATE #2: Added one more config line in the ~/.emacs.d/init.el (above) to change Emacs's default behavior of possibly inserting a tab character in source files when you hit the TAB key, when all you really wanted was for the line of code to indent (with spaces, and never tabs).

UPDATE #3: Added an optional "git-less" install of newlisp-mode (in step 1). Sorry for all the updates.
(λx. x x) (λx. x x)

jazper
Posts: 92
Joined: Thu Dec 10, 2009 8:26 am
Location: South Africa

Re: Windows install

Post by jazper »

@xytotron - my Win 7 newLISP setup on my (home) Dell Vostro works fine. But. You make me think. I have not installed any Windows updates in quite a while. What you say makes me think that if I do, I will arrive at the same situation I have at work. So, in order to preserve my sanity, and my current newLISP setup, I won't be doing any Windows updates at home very soon :)

You take me back to the time I was myself on a dial up modem (56kbb) on a rickety farm line. I was running a mill on a small farm just south of Soweto in a high crime area, surrounded by car-jacking chop shops. One morning, I found a stiff on the corner of my plot - gangster assassination, shot from behind the head. I tell ya, those WEREN'T the days.

Now, I am safely in an apartment in Cape Town, the windows being battered by hail - one of our typical winter storms, a real Atlantic squall coming at us all the way from Antarctica (well, it feels like that), and my 3G connection goes way more west than the wind every few minutes. And that is ... technology.

Btw, I also like Scite. I used it for Lua when I used that before I found newLISP. The IDE I mentioned named "LispIDE" uses a Scintilla base, says its author.

@rickyboy. An enormous thanks for all your caring and effort. When the aforementioned storm eases up, I will have a go at things - what you mentioned about newLISP in the menu is what I expected at my last attempt, because when I use Emacs for Latex, a Tex menu appears as soon as a file with the extension ".tex" is loaded. It is, in fact, the way Emacs handled Latex that got me interested in using it for newLISP.

When I looked at Kosh's code for the newLISP mode, I suspected it was a cut above what I had already installed, so I am glad it has worked out for you.

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Windows install

Post by rickyboy »

@jazper

kosh's code is still a cut above, even though I ran into a snag testing it my Windoze machine at work.

It seems that a few hours ago, kosh re-organized his github space, splitting out what used to be in a repo called newlisp-files (the one I was using) into smaller repos. This makes a lot of sense, considering that what was in newlisp-files was a collection of orthogonal components which are not components of newLISP mode for Emacs, per se.

The problem that I ran into was the fact that, not only had the repo name changed (from newlisp-files to newlisp-mode.el), but that the Emacs Lisp file that defines newLISP mode in Emacs was renamed from newlisp.el to newlisp-mode.el. However, the require primitive (which loads the mode) does NOT like the new filename because it apparently doesn't look for the mode code there (i.e. (require <mode>) will fail if your code is in a file called <mode>-mode.el; however require will find the code of it's in a file called <mode>.el).

That kind if surprised me, because I could have sworn that I saw that scenario (i.e. <mode>-mode.el for (require <mode>)) work before in the past. Hmmm. Perhaps this condition used to prevail but doesn't anymore (in the new version of Emacs). idk.

At any rate, I noticed kosh about it: https://github.com/kosh04/newlisp-mode.el/issues/1.

Of course, you can do the "git-less install" above and it should work just fine. In the meantime, I'll stick with the git repo and help kosh iron out any problems from the user perspective.
(λx. x x) (λx. x x)

Locked