Users (on Windows) expect apps, either something they can point to and
click, or at least invoke from the CLI. This is real easy to do with
the .NET environment, using the various Visual Studio languages. It's
also easy in Java, even if all you have is the command like tools,
like javac, jar, etc.It's not as easy with something like Perl (which
I use almost exclusively), but it's possible to teach users to invoke
a Perl script from the command line, and in a client/server
environment, it's real easy to build a web interface to your program
and data sources (like a database). In fact, in today's work
environments, I'd say that using something like Perl for delivering
functionality via a web browser is by far the easiest, cheapest, and
best way to do it.
Regardless of web apps, delivery of stand alone apps is trivial in the
most popular technologies, Java, C#, C++, etc. Today is Wednesday, and
I've spend most of the last three days looking very hard at ways to
deliver apps written in Lisp, and it's been a frustrating experience.
Most frustrating, to me, are the posts on the Lisp newsgroups and
discussion boards that ask, 'Why would you want to do that?' I've also
seen several posts about Lisp not being used to build applications.
(Names withheld to protect the guilty!) I've played with clisp
saveinitmen, and read the LispWorks and Allegro documentation, looked
at ThinLisp and ECL, and have found them all deficient for one reason
or another.
I've played around some with NSIS, and have found it a good tool to
use in the context of delivery of configuration items. I haven't
actually used it to deliver applications, but am aware that this is
the general use. In light of all of this, I'd like to ask:
- Has anyone ever used NSIS to deliver a Lisp implementation and fasl
files to an end user?
- Does anyone know if there is any theoretical reason why it can't be
done?
- Would this work in the general case to deliver apps in CL to end
users?
Thanks, CC.
> and read the LispWorks documentation,
Read again
http://www.lispworks.com/documentation/lw60/DV/html/delivery.htm
Best,
Art
"Personal Edition (32-bit)
"LispWorks Personal Edition is intended for personal and educational
Lisp programming. It is available free of charge.
"While the Personal Edition includes the full Common Lisp compiler and
development environment, it does limit program size and duration and
it does not support application delivery."
NOTE: doesn't support application delivery. If I were Bill Gates, I
would buy it. Of course, if I were Bill Gates, I could also write it!
I've got two kids in college and can't justify the expense of buying
either LispWorks or Allegro, so I'm looking for solutions that don't
require cash.
Thanks for your response, CC.
I think for this particular desire you will have to make up in time and
effort what you lack in cash.
Zach
That's the point of these implementations. They are commercial.
What is the problem generating executables with CLISP, CCL or SBCL?
I'm not a Windows user, but generally creating an app is supereasy
in most Common Lisp implementations. Save an executable image.
Done.
You need to be more specific to get help. After reading the manuals
for the implementations you are using, what questions do you have?
> the .NET environment, using the various Visual Studio languages. It's
I seem to remember that Visual Studio was something like $5000+ (BTW I
think that included MSDN). It's was certainly not free.
Petter
--
.sig removed by request.
What I would like is a way to write Lisp programs and deliver the
executable files to users:
(a) with the ease of creating the executable as in Visual Studio or
using javac and jar,
(b) with the monetary cost of using Java or Perl,
(c) without the relatively large size of a saveinitmem file.
Yes, I know that you get what you pay for, this functionality isn't
trivial, and that people like to reap the fruits of their labor,
hopefully in cash. You can have this functionality if you pay for it,
but if you aren't willing to pay for it you either do without, or you
spend the time writing it yourself. In all cases, you trade time for
money or vice versa.
Actually, this isn't a real world problem, because I have access to
VS.NET (through MSDN) and Java, and if I were living in the real world
(I'm not) I would use either VS or Java, or use Closure or an
equivalent. Still, it's discouraging not to be able to write something
in CL, save it, and then invoke it with a mouse click. I'm currently
asking myself, 'Why should I learn Lisp if I can't easily give the
apps to others to use?'
There are reasons why languages like C, C++, C#, Java, etc., are much
more popular than Lisp. Speaking of which, we have Lisp targeted to
the JVM. Has anyone said anything about targeting Lisp to MSIL,
similar perhaps to Mono?
CC.
It's easier. You load the code and save an executable image.
It's all described in the manuals.
> (b) with the monetary cost of using Java or Perl,
CLISP, CCL, SBCL and others are all available at no cost.
> (c) without the relatively large size of a saveinitmem file.
What is large? Is ten MB a problem?
Why?
> Actually, this isn't a real world problem, because I have access to
> VS.NET (through MSDN) and Java, and if I were living in the real world
> (I'm not) I would use either VS or Java, or use Closure or an
> equivalent. Still, it's discouraging not to be able to write something
> in CL, save it, and then invoke it with a mouse click. I'm currently
> asking myself, 'Why should I learn Lisp if I can't easily give the
> apps to others to use?'
Sure you can. Save the image as an executable. Depending on
your implementation the default image will be a few MB
or a few ten MB. Means it fits on a 4GB USB stick
many times...
What is your real problem?
I don't have a 'real' problem, at least not on this topic. I do have
plenty of 'real' problems, but that's another story. That leaves the
not-very-real problems that you asked me about.
My first not-very-real problem is that I comparing the before file of
483 bytes with the after file of 4,000 KB. This bothers me. Maybe it
shouldn't, but I compare it with tiny executable files produced by
gcc, or smallish Perl source files, or even MSIL files that are
smaller.
My second not-very-real problem is that something that should be
pretty quick and easy turned into a frustrating three days (maybe
12-15 hours). More than once I thought, 'If something that should be
fairly obvious and easy is this obscure, maybe people are justified in
not using Lisp.'
Before you respond, please consider that I have a high desire to learn
and use Lisp, I have professionally used Perl, Python, Java, and a
little C & C++, and the mechanics of learning this part of Lisp are
significantly more arduous than those other languages.
CC.
> My first not-very-real problem is that I comparing the before file of
> 483 bytes with the after file of 4,000 KB. This bothers me. Maybe it
> shouldn't, but I compare it with tiny executable files produced by
> gcc, or smallish Perl source files, or even MSIL files that are
> smaller.
If this kind of thing worries you deliver your system as a bunch of
FASLs which you load into a Lisp by some minute bit of bootstrap code
(the way I do this on Unixoid systems is to have a tiny shell script
which sets paths and so on, finds the image, starts it and tells it to
load the boot file. That's, for instance, how jar files work
basically: it looks small because the (vast) java runtime
infrastructure is somewhere else.
> On Nov 17, 5:29 pm, "jos...@corporate-world.lisp.de" <jos...@lisp.de>
> wrote:
> > What is your real problem?
>
> I don't have a 'real' problem, at least not on this topic. I do have
> plenty of 'real' problems, but that's another story. That leaves the
> not-very-real problems that you asked me about.
>
> My first not-very-real problem is that I comparing the before file of
> 483 bytes with the after file of 4,000 KB. This bothers me. Maybe it
> shouldn't, but I compare it with tiny executable files produced by
> gcc, or smallish Perl source files, or even MSIL files that are
> smaller.
Yeah, and then you link it against libc or other libraries
for anything useful.
For a comparison install a Lisp on your system
that also supports shared libraries, then
you get smaller executables, too.
> My second not-very-real problem is that something that should be
> pretty quick and easy turned into a frustrating three days (maybe
> 12-15 hours). More than once I thought, 'If something that should be
> fairly obvious and easy is this obscure, maybe people are justified in
> not using Lisp.'
How about reading the manual of your Lisp?
> Before you respond, please consider that I have a high desire to learn
> and use Lisp, I have professionally used Perl, Python, Java, and a
> little C & C++, and the mechanics of learning this part of Lisp are
> significantly more arduous than those other languages.
You need to get over the hurdle: by default Common Lisp
applications will be larger than 2 MB or even
20MB depending on the implementation.
It is also 2010 and this is no problem anymore.
There were attempts to provide Common Lisp compilers
that compile to C and create small executables.
With a few exceptions this is no longer used.
Btw., most C programs need infrastructure installed.
Which comes with the OS. Sadly, Lisp does not
come preinstalled. But on Windows
it is the same with Java. Java needs the full JVM plus
the libs you use. If you want to run java software on Windows
you have to install the JVM, too.
A Lisp needs a runtime with GC, library etc.
If your system does not have the runtime
for Lisp installed, you have to provide it.
But you are in luck, many Lisp systems can
save an image with the full runtime
into a single file. Nothing to install
then.
Now comes the example:
Here is a Mac and CCL, I mentioned that I don't use
Windows, but saving the image is basically the same:
RJMBA:tmp joswig$ ccl
Welcome to Clozure Common Lisp Version 1.6-dev-r14396M-trunk (DarwinX8664)!
? (defun foo () (print "foo was here") (quit))
FOO
? (save-application "foo" :toplevel-function 'foo :prepend-kernel t)
RJMBA:tmp joswig$ ./foo
"foo was here"
I would not even know how to measure startup time...
It is not noticeable on my Laptop.
The image contains a lot of stuff (for example
a Lisp compiler) and is 24MB in size.
RJMBA:tmp joswig$ ls -l | grep foo
-rwxr-xr-x 1 joswig wheel 24948976 17 Nov 23:55 foo
Other than the size of the executable, there is no hurdle.
Plus 24MB executables are not really a problem. Nowadays.
Okay, was that difficult?
> My first not-very-real problem is that I comparing the before file of
> 483 bytes with the after file of 4,000 KB. This bothers me. Maybe it
> shouldn't, but I compare it with tiny executable files produced by
> gcc, or smallish Perl source files, or even MSIL files that are
> smaller.
So you're application source is 483 bytes?
Ok, Lisp is not made for hello world programs. For that you can use C,
it's exactly it's domain of application.
Come back when you have a real application to write.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
...
> Now comes the example:
>
LispWorks 6:
LispWorks(R): The Common Lisp Programming Environment
Copyright (C) 1987-2009 LispWorks Ltd. All rights reserved.
Version 6.0.0
Saved by LispWorks as lispworks-6-0-0-amd64-darwin-gtk, at 22 Dec 2009 8:17
User joswig on RJMBA.local
CL-USER 1 > (defun foo () (print "foo was here"))
FOO
CL-USER 2 > (compile 'foo)
FOO
NIL
NIL
CL-USER 3 > (deliver 'foo "lwfoo" 5)
;;; Delivery function FOO
;;; Destination file #P"lwfoo"
;;; Delivery severity 5
;;; Delivery parameters NIL
...
Total allocation 9312768 (0x8E1A00), total size 30957568 (0x1D86000)
Shaking stage : Saving image
Delivery successful - lwfoo
RJMBA:tmp joswig$ ./lwfoo
"foo was here"
RJMBA:tmp joswig$ ls -l | grep lwfoo
-rwxr-xr-x 1 joswig wheel 9183232 18 Nov 00:36 lwfoo
That did not look too difficult, either.
The application size is a bit under ten MB.
> In article <joswig-703D7B....@news-europe.giganews.com>,
> Rainer Joswig <jos...@lisp.de> wrote:
>
> ...
>
> > Now comes the example:
> >
>
>
> LispWorks 6:
ecl
RTFM:
http://ecls.sourceforge.net/new-manual/ch24s06.html#id416235
Write a file foo.lisp with the code.
ECL (Embeddable Common-Lisp) 10.7.1
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.
Top level.
> (compile-file "foo.lisp" :system-p t)
;;;
;;; Compiling foo.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Compiling (DEFUN FOO ...).
;;; End of Pass 1.
;;; Emitting code for FOO.
;;; Note:
;;; Invoking external command:
;;; gcc -I. "-I/usr/local/include/" -g -O2 -fPIC -fno-common -Ddarwin -O2 -w -c "foo.c" -o "foo.o"
;;;
;;; Finished compiling foo.lisp.
;;;
#P"/private/tmp/foo.o"
NIL
NIL
> (c:build-program "eclfoo" :lisp-files '("foo.o") :epilogue-code '(foo))
;;; Note:
;;; Invoking external command:
;;; gcc -I. "-I/usr/local/include/" -g -O2 -fPIC -fno-common -Ddarwin -O2 -w -c "/private/var/folders/k5/k5-MNqCJECehH40nXQPsZk+++TI/-Tmp-/eclinitBlkLhz.c" -o "/private/var/folders/k5/k5-MNqCJECehH40nXQPsZk+++TI/-Tmp-/eclinitBlkLhz.o"
;;;
;;; Note:
;;; Invoking external command:
;;; gcc -o "eclfoo" -L"/usr/local/lib/" "/private/var/folders/k5/k5-MNqCJECehH40nXQPsZk+++TI/-Tmp-/eclinitBlkLhz.o" "foo.o" -lffi -lecl -lm
;;;
#P"eclfoo"
> (quit)
RJMBA:tmp joswig$ ./eclfoo
"foo was here"
RJMBA:tmp joswig$ ls -l | grep eclfoo
-rwxr-xr-x 1 joswig wheel 10640 18 Nov 00:53 eclfoo
Now, the executable is 10k.
It think it uses a shared library of the installed ECL.
Looks to me that it is all well documented and easy
to use...
Which is what I discovered. Same thing for Perl, at least in Perl 5
all attempts to compile to an executable seem to have been abandoned.
> Btw., most C programs need infrastructure installed.
> Which comes with the OS. Sadly, Lisp does not
> come preinstalled.
Yes. Which is why I think that Closure is getting traction.
> But on Windows
> it is the same with Java. Java needs the full JVM plus
> the libs you use. If you want to run java software on Windows
> you have to install the JVM, too.
Yes, but close to 100% Windows systems can be depended on to have a
Java runtime.
> A Lisp needs a runtime with GC, library etc.
Yes. This is why I asked about the executable. I sometimes have to
walk a user into installing Perl and configuring it, which isn't too
bad once they get past the command line, but it helps a lot that they
know that Perl is used for 'real work.' For better or worse, Lisp
doesn't have that reputation in the workaday world.
> If your system does not have the runtime
> for Lisp installed, you have to provide it.
Yes. And thanks for your example.
As I indicated before, I think the best use is to build web enabled
apps, what we used to call CGI, in which case you can put Lisp on your
server and all the users need is a browser.
CC.
Hey, I've got to crawl before I can walk.
> Come back when you have a real application to write.
Did I not make that clear in the OP? I'm LEARNING the language, not
using it to produce real applications. Besides, it just makes sense to
see the capabilities of the technology before you invest your time,
money, and energy in learning it -- something that engineers call due
diligence, or maybe a cost/benefit analysis -- if you've heard of any
such a thing.
CC.
> On Nov 17, 6:11 pm, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> So you're application source is 483 bytes?
>>
>> Ok, Lisp is not made for hello world programs. For that you can use C,
>> it's exactly it's domain of application.
>
> Hey, I've got to crawl before I can walk.
Yes, and when you learn to crawl, you don't complain that a whole planet
is provided in your universe to let you feel some gravity. You just
crawl. Leave philosophical questions about the size of the planet
where you learn to crawl for when you grow old.
>> Come back when you have a real application to write.
>
> Did I not make that clear in the OP? I'm LEARNING the language, not
> using it to produce real applications. Besides, it just makes sense to
> see the capabilities of the technology before you invest your time,
> money, and energy in learning it -- something that engineers call due
> diligence, or maybe a cost/benefit analysis -- if you've heard of any
> such a thing.
Lisp makes it to the stars. What more do you want to know about the
capabilities of the technology?
http://wiki.alu.org/Success%20Stories
I understand where you're coming from because I used to think about
that same issue and 10 years ago it might have been an issue. These
days the 25 meg saved image from SBCL just isn't an issue. Actually,
it's better than the typical .NET or Java situation because you don't
have to do these complex installation routines that go ahead and
install the JRE or .NET rumtimes if not installed.
Don't waste your time worrying about it.
I'm not sure about C# and Java -- you need to ship runtime in some way...
c> Today is Wednesday, and I've spend most of the last three days looking
c> very hard at ways to deliver apps written in Lisp, and it's been a
c> frustrating experience.
What exactly were you doing and why it was that hard?
I think it is trivial unless you're a moron.
c> Most frustrating, to me, are the posts on the Lisp newsgroups and
c> discussion boards that ask, 'Why would you want to do that?' I've also
c> seen several posts about Lisp not being used to build applications.
c> (Names withheld to protect the guilty!) I've played with clisp
c> saveinitmen, and read the LispWorks and Allegro documentation, looked at
c> ThinLisp and ECL, and have found them all deficient for one reason or
c> another.
Why are they deficient? Maybe you've misunderstood something?
c> - Does anyone know if there is any theoretical reason why it can't be
c> done?
I don't see why it cannot be done. Essentially it boils down to copying
files.
Lisp files are no different from other files. So there should be no problem.
Perhaps it would help you to understand that there is absolutely nothing
special about CL.
c> - Would this work in the general case to deliver apps in CL to end
c> users?
You betcha.
I'm more familiar with InnoSetup, though.
You're comparing apples to oranges.
c> it with tiny executable files produced by gcc,
It is tiny because libc is bundled with OS.
c> or smallish Perl source files,
_Source files_ are smallish, but you need Perl to be installed.
c> or even MSIL files that are smaller.
Yes, but you need .NET framework to be installed.
And no, you cannot depend on .NET framework already being installed.
There are many versions of .NET framework and you need to install a
particular one which works with your application.
Usually when they distribute .NET applications they include relevant version
of .NET framework redistributable.
Likewise, when they distribute Java applications they include some version
of Java. (Note that code compiled for Java 1.6 won't work on Java 1.5 and
Java 1.4)
And even if you use C++, you'll have to include its runtime.
MSVC7 runtime in a shared library is approximately one MB.
If you link wtih static library it can be smaller as long as your app does
not use runtime functions.
If you use GUI toolkit like MFC you'll need its runtime which is
multi-megabyte fat.
c> My second not-very-real problem is that something that should be
c> pretty quick and easy turned into a frustrating three days (maybe
c> 12-15 hours).
I guess it is because you're confused. It is not a problem of lisp.
c> More than once I thought, 'If something that should be fairly obvious
c> and easy is this obscure, maybe people are justified in not using Lisp.'
It is easy if you don't have unrealistic expectations.
Okay, let me make it clear to you. I've been through Seibel's PCL,
working all the chapters, and copying most of the practical stuff
seeing how they work. I'm now working on Barski's LoL, copying all the
games seeing how they work. HOWEVER, with games, you want an easy way
to play them, which is the point of the game-repl function in chapter
6. Having gotten the code to work, I thought about how you would
distribute a game app.
In any such endeavor, the first step is to create and distribute the
smallest possible application that could be considered functional in
any sense, something like this:
[7]> (defun main () (hello))
MAIN
[8]> (defun hello () (princ "Hello"))
HELLO
[9]> (main)
Hello
"Hello"
If you write (main) and (hello) to hello.lisp and create a hello.fasl
file, how do you package it and deliver it so that it will install on
their Windows PC or laptop with a clickable icon, so that when they
invoke it, it prints "Hello"? I'm not even asking for a GUI app, a
plain vanilla DOS command prompt would make me happy.
Turns out that this is amazingly difficult in Lisp, but trivial in
Java, C#, C, VB, and the other languages. Who woulda' thunk it?
> Lisp makes it to the stars. What more do you want to know about the
> capabilities of the technology?
What more that I want to know is, how to do in Lisp something that's
easy and trivial in Java (for example).
CC.
Yet another LOL book on Lisp! (Land Of Lisp, Let Over Lambda).
Lisp is evidently an exhilarating language.
if you're on SBCL, have you tried
http://www.xach.com/lisp/buildapp/
?
I was going to mention it, but ccc31807 reminds me of a poem I learned
as a child:
Sour face Ann
With your chin in your hand,
Haven't you ever been pleased?
You used to complain that you had no fur coat,
And now you complain of the fleas.
Zach
c> [7]> (defun main () (hello))
c> MAIN
c> [8]> (defun hello () (princ "Hello"))
c> HELLO
c> [9]> (main)
c> Hello
c> "Hello"
c> If you write (main) and (hello) to hello.lisp and create a hello.fasl
c> file, how do you package it and deliver it so that it will install on
c> their Windows PC or laptop with a clickable icon, so that when they
c> invoke it, it prints "Hello"?
c> I'm not even asking for a GUI app, a plain vanilla DOS command prompt
c> would make me happy.
Rainer Joswig have already explained how to do this for Linux via ECL, now
Windows version.
1. Download MKCL (a fork from ECL) from here:
http://common-lisp.net/project/mkcl/
We use MKCL because Juanjo doesn't provide binaries and I guess building it
yourself would be too hard for you.
2. Write my.lisp with this contents:
(defun main () (hello))
(defun hello () (princ "Hello"))
(main)
3. run mkcl.exe
> (compile-file "my.lisp" :fasl-p nil)
#P"E:/Program Files/MKCL/bin/my.o"
NIL
NIL
> (c:build-program "my.exe" :lisp-files '("my.o") :epilogue-code
> '(si::raw-exit 0))
#P"E:/Program Files/MKCL/bin/my.exe"
4. That is all, you can call my.exe:
E:\Program Files\MKCL\bin>my.exe
Hello
Now you want to distribute it, right? You need to copy my.exe and mkcl.dll
for this executable.
Application works with this, but MKCL shows a warning that it cannot find
its libraries.
To shut warning create empty directory ..\my\mkcl-1.0.0
So your file structure looks like this:
H:\FOOBAR
????lib
? ????mkcl-1.0.0
????my
mkcl.dll
my.exe
Now lisp-specific part is over. You can zip whole foobar directory and
distribute foobar.zip.
If you want to wrap your program into fancy installer so that it
automatically creates icons and shit, use any free installer builder like
NSIS or InnoSetup.
At this point it is no different from any other executable binaries.
c> Turns out that this is amazingly difficult in Lisp,
Was it?
c> but trivial in
c> Java, C#, C, VB, and the other languages.
It is not trivial because you need to distribute language runtime for Java,
C# and VB.
It is actually harder because you can't just distribute it in DLL but you'll
have to install it.
So you need to take runtime redistributable and integrate it with your
installer.
c> What more that I want to know is, how to do in Lisp something that's
c> easy and trivial in Java (for example).
So how you do this in Java?
And here's how you do this with CLISP:
1. Download CLISP for windows
http://www.gnu.org/software/clisp/ look for win32 link
2. Make this my.lisp file:
(defun hello () (princ "Hello"))
(defun main () (hello) (ext:exit))
3. Run CLISP.exe
[1]> (load (compile-file "my.lisp"))
;; Compiling file E:\Program Files\clisp-2.49\my.lisp ...
;; File writen E:\Program Files\clisp-2.49\my.fas
0 ??????, 0 ??????????????
;; Loading file E:\Program Files\clisp-2.49\my.fas...
;; File loaded E:\Program Files\clisp-2.49\my.fas
T
[2]> (ext:saveinitmem "my.exe" :init-function 'main :executable t :quiet t)
;; Writing memory image into my.exe (4,312,128 ????)
4. Copy this files
libiconv-2.dll
libintl-8.dll
libreadline6.dll
from C:\Program files\clisp-2.49\base to, say, C:\foobar
Copy my.exe to C:\foobar
5. Now you run C:\foobar\my.exe and it works!
Executable + libraries is just 5.7 MB.
c> Turns out that this is amazingly difficult in Lisp,
I spent less than 10 minutes to figure this stuff out, including time to
find, download and install CLISP executable and read documentation for
SAVEINITMEM.
If that is difficult then I dunno.
Normally I don't use CLISP, let alone on Windows. Neither I use MKCL or ECL.
I do all my Lisp stuff with SBCL on Linux.
So it is not like I knew how to do it before. I just downloaded, read
documentation and filled missing parts from trial and error.
It was easier for CLISP, by the way, as MKCL doesn't seem to be properly
documented so I had to read its source code. Still it took less than half an
hour.
Yep! I know, there is no documentation for MKCL yet. I'm working on it.
Sorry, it is RTSC for now. But I am glad to see that MKCL can be
somewhat useful already.
Cheers,
Jean-Claude Beaudoin
Thank you. Yes, it is simple and it works. Now, if it works on another
Windows, I will say that it's easier than doing it in Perl.
> If that is difficult then I dunno.
There are some conceptual hurdles to surmount. One is dealing with
different implementations. One is knowing 'howto', that is NOT how to
do the stuff, but how to find out how to do the stuff.
No, it's not difficult, in fact, it's pretty easy. However, the first
time, starting from a position of almost total ignorance with on one
handy to ask for advice, yeah, I found it extremely difficult.
Thank you again, CC.
> No, it's not difficult, in fact, it's pretty easy. However, the first
> time, starting from a position of almost total ignorance with on one
> handy to ask for advice, yeah, I found it extremely difficult.
No one on hand? You didn't ask here. When you did ask here, in the
backwards way of complaining how difficult it is, you got prompt
answers. Next time, why not ask here first directly?
Zach
First, I generally want to do it myself, not ask for help. It's
cheating if you read the directions. ;-) That's why I spent the time
trying to figure it out. Only after I concluded that I couldn't do it
by myself, at least in a reasonable amount of time, did I post on
c.l.l.
Second, when you post on c.l.*, you have to put up with the neuroses
of various people. I'm not singling out any language, and I'm not
singling out any direction. I plead guilty to having my share of
neuroses. I've certainly dished out enough dirt over the years,
probably more than I have received.
Third, since I now have the capacity to create and distribute
applications (and the fact that they are written in Lisp is not
relevant) I can begin to explore using Lisp in my day job.
I'm not a programmer, I'm a database guy, but I use a lot of Perl to
munge data files. I'm the only guy in my shop who does what I do, so I
can decide for myself what tools I use. Perl is just an absolutely
great language for my little niche, but it has its share of problems:
(1) building GUI apps in Perl is problematical, so I write CL scripts
for my users to run, and (2) users have to install Perl to run the
scripts.
I'm probably a little crazy to want to use Lisp for this, but I have
decided not to use C, Java, C#, VB, Python, or other languages, so
I'll play with Lisp.
Thanks for your help, and thanks in advance for your future help, and
accept my prospective apologies for trying your patience.
CC.
> Yes. Which is why I think that Closure is getting traction.
It looks as if the traction is not sufficient for making trolls pick up
its name correctly.
Nicolas
LOL
--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
"like Perl" in what respect? I consider PHP the easiest
(interleaved script segments and block-quote segmets), cheapest
(PHP is integrated into Apache HTTP server, unlike Perl or CMUCL or
even sh/tcsh/whatever, so there's no extra start-up time with each
PHP script-run), and perhaps best way (including `tick` commands to
invoke CMUCL or other efficient processor for specific sub-tasks).
> Regardless of web apps, delivery of stand alone apps is trivial
> in the most popular technologies, Java, C#, C++, etc. Today is
> Wednesday, and I've spend most of the last three days looking
> very hard at ways to deliver apps written in Lisp, and it's been
> a frustrating experience.
Lisp is a complete user interface, in which scripts are run. These
scripts call functions which call functions which call functions as
deep as needed. The paradigm is using tools to do what you really
want rather than running somebody's totally canned application to
do what that other wants you to do instead of what you want.
> Most frustrating, to me, are the posts on the Lisp newsgroups and
> discussion boards that ask, 'Why would you want to do that?'
Yeah. I ask you the same question. Why would you want to constrain
your end-user to an "app", thereby making your software no better
than something written in Java, when instead you could give your
end-user an experience so far beyond those other languages that
you'd have a dedicated end-user who never wanted to go back to
software written in those other languages?
Note that a Java 'app' doesn't run on a bare system (Windows, Mac,
Linux) as-is. It requires that the system already have a JVM
together with all the shell scripts needed to invoke the JVM
together with your toplevel and the bootstrap class loader and all
the classes needed to load classes and link them into your toplevel
'app' and all the libraries actually called from your 'app'. If
just one of those scripts or libraries is missing, your end-user
will see a stack backtrace or even even worse a crash. Recently,
MicroSoft Windows has usually come bundled with all that is needed
to load and execute already-compiled Java applications. But who is
to say if that will continue now that Sun has deprecated Java, and
MicroSoft prefers .NET or C# or somesuch instead anyway.
Note that in general, any 'app' must be built indivdiually for each
target environment. An 'app' built to run on Windows won't run on
Mac nor on Linux or BSD Unix, and even within each class of systems
you might need to build different 'app's for each group of system
versions. As long as you're going to do that, why not simply
include the appropriate version of Lisp in your CD-ROM or
WebPageForDownload? If the end-user doesn't already have an
appropriate Lisp, he/she copies/downloads your master copy, as part
of the installation process. But if Lisp is already available, that
step is skipped. Thus the very first Lisp 'app' you deliver to a
given customer takes a few seconds extra time, but any later
applications, including upgrades of the same application, don't
take any extra time.
> I've played around some with NSIS,
Google search for that term -> A scriptable win32 installer/uninstaller system.
That would seem to work only on Windows.
What do you plan to do for your end-users on the three other major
classes of systems?
> - Does anyone know if there is any theoretical reason why it
> can't be done?
Not every end-user has access to Windows.
> - Would this work in the general case to deliver apps in CL to
> end users?
No, only that subset of users who are *always* on Windows and never
use any other kind of system and therefore would never be upset if
they couldn't transfer their work from their Windows computer to
their other computer.
So why do you need to deliver an 'app' in the first place? Why
don't you like providing Web-based services where you don't
actually need to deliver anything to the end-user except the use of
your Web-based application?
And if you really do want to deliver an 'app' to the end-user's
computer, do you have enough money to pursue sufficient lawsuits to
deter people from buying just one copy of your 'app' and passing it
to others who haven't paid you for the 'app'? Are you really
willing to sell just one (1) copy of your app to one (1) end-user
and then nobody will ever buy another copy because they can get it
cheaper from that first end-user?
BTW I'm currently building an infrastructure for multi-computer
Web-based applications, using public-key signed&encrypted messages
between components on different machines. User accounts will be
maintained on the front-end site, and when a service request
requires control to be transferred to another site, the front-end
site will put some funds into an escrow account, and pass a
"voucher" to the service-providing site, which will then extract
funds from that voucher and return a "receipt" to the front-end
site telling how much funds were consumed (hence need to be moved
to the service-provider's account) and how much funds were unused
(hence need to be refunded to the user's account). Maybe you'd like
to join this infrastructure? What kind of services do your
applications provide? Would it make sense for such services to be
provided over the InterNet rather than in a stand-alone
application?
In that case, re-write your application in PHP and host it on one
of the several free PHP/MySQL hosting sites.
You can fix that: Install your Lisp application via CGI or PHP, to
show your potential users that they can do "real work" using your
application. Then later, they don't like being dependent on the Web
while running your application, you can sell them something that
does the same thing as a standalone. But a lot of people noawadays
are going in the opposite direction, to "cloud computing", so they
might not want to switch from Web to standalone.
> As I indicated before, I think the best use is to build web
> enabled apps, what we used to call CGI,
It's *still* CGI, Common Gateway Interface, i.e. HTML with FORMs
from server to client, and urlencoded form contents from client to
server.
> in which case you can put Lisp on your server and all the users
> need is a browser.
A billion people in the world have cell-phones. That's more than
all the laptop- and desktop- computers combined. Most of these
cell-phones are digital, i.e. if they don't have mobile-Web it's
just because the individual user hasn't found a reason to pay the
extra money to have it enabled. If you set up a really useful
application for cell-phones, word should get around, and more and
more cell-phone owners will enable mobile-Web in order to use your
application. Thus if you format your output to work well on
cell-phones, you have a *huge* potential user-base for your
Web-based application.
Do you have enough cash to pay for a server that will support Lisp?
If not, try PHP/MySQL hosting which is free.
I already pay $20/month for NiftyTelnet -> MacPPP -> FreeBSD, and
then I get CGI/anythingIWantSuchAsCMUCL + PHP/MySQL on that machine
at no additional cost, and get FTP and lynx to free PHP/MySQL sites
with gigabytes of free MySQL/disk space at no additional cost.
I suggest you crawl by writing CGI applications, so that you can
show your working demo to me (and anyone else who is curious). I
suggest you look at http://www.rawbw.com/~rem/HelloPlus/hellos.html
and try to write not just CGI/Lisp but all the other languages
included there. (And if you have access to any other programming
language that is available on FreeBSD here where I am then please
write corresponding hello-CGI application with that and show me the
code so that I can include it in my CGI tutorial.) Compare how
easy/hard it is to write various simple applications using each of
the available languages. I bet that PHP and Lisp will be the
easiest.
> > Come back when you have a real application to write.
> Did I not make that clear in the OP? I'm LEARNING the language,
> not using it to produce real applications.
I've written software in Lisp since 1973, and I've never felt the
need to create a standalone application that can run without using
an accompanying Lisp REP+runtime. Hence I don't think making an
application is really anything you need to be worried about any
time soon. If you target your software to run over the Web,
especially on a billion (thousand million) cell-phones around the
world, you may *never* feel a true need to make a standalone
application.
> Besides, it just makes sense to see the capabilities of the
> technology before you invest your time, money, and energy in
> learning it
But there are so many different capabilities of software technology
other than the ability to deliver standalone applications. In fact,
FORTH is the only programming language that I know which is truly
able to deliver a standalone application that doesn't require an
operating system with support libraries the way all those other
languages (C for example) do.
I suggest you think of some application that requires building some
complicated multi-level data structure, manipulating it at will,
saving to disk, loading back into memory to create a copy of the
data structure, etc. Compare Lisp with the other languages at such
capabilities.
> something that engineers call due diligence, or maybe a
> cost/benefit analysis -- if you've heard of any such a thing.
It seems to me that if you want to walk before you crawl, test the
waters before you dive in, consider cost/benefit, etc. you should
set up demos of all your algorithms on the Web to see what anybody
cares about enough to encourage you to continue work on
applications using such algorithms. It would be a shame if you put
years of effort into producing a shrink-wrapped application that
not one other person wanted to buy.
Aside: Please look at http://www.rawbw.com/~rem/WAP/projectIdeas.html
to see some Web-application ideas of my own. Do any of those ideas
look like anything you'd like to try building, either by yourself
or working together with me?