[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Personal Site in Lisp

gengyangcai

8/2/2015 10:35:00 AM

So I am back and have decided I am going to try to master Lisp whatever it takes. This really does seem to be the most powerful language in existence.

I want to create a personal site with my name on it in Lisp, like Paul Graham's site : http://www.paulg... and am using LispWorks personal edition on my Mac OSX Yosemite Version 10.10.2

Where do I start ?

Cai GengYang
11 Answers

Bigos

8/2/2015 1:30:00 PM

0

On 02/08/15 11:35, CAI GENGYANG wrote:

> Where do I start ?
>
> Cai GengYang
>

There's no point writing everything yourself so I would decide which
libraries to use.

server:
Hunchentoot or alternatives

simple web framework:
restas, clack or alternatives

would my Javascript be complex enough to require parenscript?

any other useful libraries fo markup css and database connectivity

I can be a very interesting experience for a newbie. I have understood
Rails much better trying to write my own framework in Lisp.

Kaz Kylheku

8/2/2015 4:13:00 PM

0

On 2015-08-02, CAI GENGYANG <gengyangcai@gmail.com> wrote:
> I want to create a personal site with my name on it in Lisp, like Paul
> Graham's site : http://www.paulg... and am using LispWorks personal
> edition on my Mac OSX Yosemite Version 10.10.2
>
> Where do I start ?

Probably, with a web page that says "Hello, World", served up by a Lisp
process. Then add complications and nuances one by one.

gengyangcai

8/3/2015 5:12:00 AM

0

On Sunday, August 2, 2015 at 9:30:04 PM UTC+8, Bigos wrote:
> On 02/08/15 11:35, CAI GENGYANG wrote:
>
> > Where do I start ?
> >
> > Cai GengYang
> >
>
> There's no point writing everything yourself so I would decide which
> libraries to use.
>
> server:
> Hunchentoot or alternatives
>
> simple web framework:
> restas, clack or alternatives
>
> would my Javascript be complex enough to require parenscript?
>
> any other useful libraries fo markup css and database connectivity
>
> I can be a very interesting experience for a newbie. I have understood
> Rails much better trying to write my own framework in Lisp.

Hi Bigos,

I managed to download Hunchentoot and install it on my laptop successfully

Download QuickLisp too and tried to use it to install Restas and Clack but both web frameworks don't install when I follow the download and installation instructions. Typed (ql:quickload "restas") and (ql:quickload :clack) in QuickLisp and hit enter but either nothing happens or I get error messages

Is there some kind of visual tutorial online where I can see a programmer creating a dynamic Lisp website in a step-by-step manner that even a 5 year old can understand?

I just need to get this website set up so I can start creating projects and putting stuff on it

Pascal J. Bourguignon

8/3/2015 5:17:00 AM

0

CAI GENGYANG <gengyangcai@gmail.com> writes:

> On Sunday, August 2, 2015 at 9:30:04 PM UTC+8, Bigos wrote:
>> On 02/08/15 11:35, CAI GENGYANG wrote:
>>
>> > Where do I start ?
>> >
>> > Cai GengYang
>> >
>>
>> There's no point writing everything yourself so I would decide which
>> libraries to use.
>>
>> server:
>> Hunchentoot or alternatives
>>
>> simple web framework:
>> restas, clack or alternatives
>>
>> would my Javascript be complex enough to require parenscript?
>>
>> any other useful libraries fo markup css and database connectivity
>>
>> I can be a very interesting experience for a newbie. I have understood
>> Rails much better trying to write my own framework in Lisp.
>
> Hi Bigos,
>
> I managed to download Hunchentoot and install it on my laptop successfully
>
> Download QuickLisp too and tried to use it to install Restas and Clack
> but both web frameworks don't install when I follow the download and
> installation instructions. Typed (ql:quickload "restas") and
> (ql:quickload :clack) in QuickLisp and hit enter but either nothing
> happens or I get error messages

Works for me:

cl-user> (ql:quickload :restas)
To load "restas":
Load 1 ASDF system:
restas
; Loading "restas"
[package impl-specific-gray]......................
[package trivial-gray-streams]....................
[package chunga]..................................
[package cl-base64]...............................
[package cl-fad]..................................
[package path]....................................
[package cl-fad-ccl]..............................
[package flexi-streams]...........................
...................................................
...................................................
[package trivial-garbage].........................
[package cl+ssl]..................................
[package md5].....................................
[package trivial-backtrace].......................
[package usocket].................................
[package url-rewrite].............................
[package hunchentoot].............................
[package puri]....................................
[package iterate].................................
[package routes]..................................
[package org.mapcar.parse-number].................
[package data-sift]...............................
[package restas]..................................
[package restas.policy.internal].
(:restas)
cl-user> (ql:quickload :clack)
To load "clack":
Load 1 ASDF system:
clack
; Loading "clack"
[package lack.component]..........................
[package nibbles].................................
[package ironclad]................................
...................................................
...................................................
...................................................
...................................................
[package lack.util]...............................
[package lack.builder]............................
[package lack]....................................
[package clack.util]..............................
[package clack.handler]...........................
[package clack]...................................
[package clack]
(:clack)
cl-user>


> Is there some kind of visual tutorial online where I can see a
> programmer creating a dynamic Lisp website in a step-by-step manner
> that even a 5 year old can understand?
>
> I just need to get this website set up so I can start creating projects and putting stuff on it

https://www.google.com/search?q=common+lisp+create+website+hunchentoot&a...

--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

gengyangcai

8/3/2015 9:09:00 AM

0

On Monday, August 3, 2015 at 1:16:46 PM UTC+8, informatimago wrote:
> CAI GENGYANG <gengyangcai@gmail.com> writes:
>
> > On Sunday, August 2, 2015 at 9:30:04 PM UTC+8, Bigos wrote:
> >> On 02/08/15 11:35, CAI GENGYANG wrote:
> >>
> >> > Where do I start ?
> >> >
> >> > Cai GengYang
> >> >
> >>
> >> There's no point writing everything yourself so I would decide which
> >> libraries to use.
> >>
> >> server:
> >> Hunchentoot or alternatives
> >>
> >> simple web framework:
> >> restas, clack or alternatives
> >>
> >> would my Javascript be complex enough to require parenscript?
> >>
> >> any other useful libraries fo markup css and database connectivity
> >>
> >> I can be a very interesting experience for a newbie. I have understood
> >> Rails much better trying to write my own framework in Lisp.
> >
> > Hi Bigos,
> >
> > I managed to download Hunchentoot and install it on my laptop successfully
> >
> > Download QuickLisp too and tried to use it to install Restas and Clack
> > but both web frameworks don't install when I follow the download and
> > installation instructions. Typed (ql:quickload "restas") and
> > (ql:quickload :clack) in QuickLisp and hit enter but either nothing
> > happens or I get error messages
>
> Works for me:
>
> cl-user> (ql:quickload :restas)
> To load "restas":
> Load 1 ASDF system:
> restas
> ; Loading "restas"
> [package impl-specific-gray]......................
> [package trivial-gray-streams]....................
> [package chunga]..................................
> [package cl-base64]...............................
> [package cl-fad]..................................
> [package path]....................................
> [package cl-fad-ccl]..............................
> [package flexi-streams]...........................
> ..................................................
> ..................................................
> [package trivial-garbage].........................
> [package cl+ssl]..................................
> [package md5].....................................
> [package trivial-backtrace].......................
> [package usocket].................................
> [package url-rewrite].............................
> [package hunchentoot].............................
> [package puri]....................................
> [package iterate].................................
> [package routes]..................................
> [package org.mapcar.parse-number].................
> [package data-sift]...............................
> [package restas]..................................
> [package restas.policy.internal].
> (:restas)
> cl-user> (ql:quickload :clack)
> To load "clack":
> Load 1 ASDF system:
> clack
> ; Loading "clack"
> [package lack.component]..........................
> [package nibbles].................................
> [package ironclad]................................
> ..................................................
> ..................................................
> ..................................................
> ..................................................
> [package lack.util]...............................
> [package lack.builder]............................
> [package lack]....................................
> [package clack.util]..............................
> [package clack.handler]...........................
> [package clack]...................................
> [package clack]
> (:clack)
> cl-user>
>
>
> > Is there some kind of visual tutorial online where I can see a
> > programmer creating a dynamic Lisp website in a step-by-step manner
> > that even a 5 year old can understand?
> >
> > I just need to get this website set up so I can start creating projects and putting stuff on it
>
> https://www.google.com/search?q=common+lisp+create+website+hunchentoot&a...
>
> --
> __Pascal Bourguignon__ http://www.informat...
> "The factory of the future will have only two employees, a man and a
> dog. The man will be there to feed the dog. The dog will be there to
> keep the man from touching the equipment." -- Carl Bass CEO Autodesk


Hmm ... doesn't work ... I get the same error message.

This video https://www.google.com/search?q=common+lisp+create+website+hunchentoot&a... is really blurry and I can't see anything. It works fine up till about 7.5 minutes. But for the next 12-13 minutes, I can't see anything at all because the video is so blurry ...

Pascal J. Bourguignon

8/3/2015 10:53:00 AM

0

CAI GENGYANG <gengyangcai@gmail.com> writes:

> On Monday, August 3, 2015 at 1:16:46 PM UTC+8, informatimago wrote:
>> CAI GENGYANG <gengyangcai@gmail.com> writes:
>> > (ql:quickload :clack) in QuickLisp and hit enter but either nothing
>> > happens or I get error messages
>>
>> Works for me:
>
> Hmm ... doesn't work ... I get the same error message.

Oh right. I see. Just do as I say telepathically.

--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

gengyangcai

8/3/2015 12:04:00 PM

0

On Monday, August 3, 2015 at 6:53:09 PM UTC+8, informatimago wrote:
> CAI GENGYANG <gengyangcai@gmail.com> writes:
>
> > On Monday, August 3, 2015 at 1:16:46 PM UTC+8, informatimago wrote:
> >> CAI GENGYANG <gengyangcai@gmail.com> writes:
> >> > (ql:quickload :clack) in QuickLisp and hit enter but either nothing
> >> > happens or I get error messages
> >>
> >> Works for me:
> >
> > Hmm ... doesn't work ... I get the same error message.
>
> Oh right. I see. Just do as I say telepathically.
>
> --
> __Pascal Bourguignon__ http://www.informat...
> "The factory of the future will have only two employees, a man and a
> dog. The man will be there to feed the dog. The dog will be there to
> keep the man from touching the equipment." -- Carl Bass CEO Autodesk

This makes me feel like entering the personal injury litigation industry ..

Pascal J. Bourguignon

8/3/2015 1:52:00 PM

0

CAI GENGYANG <gengyangcai@gmail.com> writes:

> On Monday, August 3, 2015 at 6:53:09 PM UTC+8, informatimago wrote:
>> CAI GENGYANG <gengyangcai@gmail.com> writes:
>>
>> > On Monday, August 3, 2015 at 1:16:46 PM UTC+8, informatimago wrote:
>> >> CAI GENGYANG <gengyangcai@gmail.com> writes:
>> >> > (ql:quickload :clack) in QuickLisp and hit enter but either nothing
>> >> > happens or I get error messages
>> >>
>> >> Works for me:
>> >
>> > Hmm ... doesn't work ... I get the same error message.
>>
>> Oh right. I see. Just do as I say telepathically.
>>
>
> This makes me feel like entering the personal injury litigation industry ..

Nope, I saw it fit to communicate the solution telepathically, since you
are communicating your code and your error message telepathically.

--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

gengyangcai

8/4/2015 6:49:00 AM

0

On Monday, August 3, 2015 at 9:51:42 PM UTC+8, informatimago wrote:
> CAI GENGYANG <gengyangcai@gmail.com> writes:
>
> > On Monday, August 3, 2015 at 6:53:09 PM UTC+8, informatimago wrote:
> >> CAI GENGYANG <gengyangcai@gmail.com> writes:
> >>
> >> > On Monday, August 3, 2015 at 1:16:46 PM UTC+8, informatimago wrote:
> >> >> CAI GENGYANG <gengyangcai@gmail.com> writes:
> >> >> > (ql:quickload :clack) in QuickLisp and hit enter but either nothing
> >> >> > happens or I get error messages
> >> >>
> >> >> Works for me:
> >> >
> >> > Hmm ... doesn't work ... I get the same error message.
> >>
> >> Oh right. I see. Just do as I say telepathically.
> >>
> >
> > This makes me feel like entering the personal injury litigation industry ..
>
> Nope, I saw it fit to communicate the solution telepathically, since you
> are communicating your code and your error message telepathically.
>
> --
> __Pascal Bourguignon__ http://www.informat...
> "The factory of the future will have only two employees, a man and a
> dog. The man will be there to feed the dog. The dog will be there to
> keep the man from touching the equipment." -- Carl Bass CEO Autodesk


The introduction message in the QuickLisp editor says this :

This is quicklisp.lisp, the quickstart file for Quicklisp. To use it, start Lisp, then (load "quicklisp.lisp")

So I started LispWorks and tried to load quicklisp using the above instructions, but got error messages instead, which I have posted below:

CL-USER 1 > (load "quicklisp.lisp")

Error: The file "quicklisp.lisp" does not exist.
1 (continue) Try loading quicklisp.lisp again.
2 Give up loading quicklisp.lisp.
3 Try loading another file instead of quicklisp.lisp.
4 (abort) Return to level 0.
5 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.

CL-USER 2 : 1 > load "quicklisp.lisp"

Error: The file "quicklisp.lisp" does not exist.
1 (continue) Try loading quicklisp.lisp again.
2 Give up loading quicklisp.lisp.
3 Try loading another file instead of quicklisp.lisp.
4 (abort) Return to level 1.
5 Return to debug level 1.
6 Try loading quicklisp.lisp again.
7 Give up loading quicklisp.lisp.
8 Try loading another file instead of quicklisp.lisp.
9 Return to level 0.
10 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.


Pascal J. Bourguignon

8/4/2015 8:38:00 AM

0

CAI GENGYANG <gengyangcai@gmail.com> writes:

> The introduction message in the QuickLisp editor says this :
>
> This is quicklisp.lisp, the quickstart file for Quicklisp. To use it,
> start Lisp, then (load "quicklisp.lisp")
>
> So I started LispWorks and tried to load quicklisp using the above
> instructions, but got error messages instead, which I have posted
> below:
>
> CL-USER 1 > (load "quicklisp.lisp")
>
> Error: The file "quicklisp.lisp" does not exist.

By default, the pathname designators you give to OPEN (and indirectly to
OPEN thru LOAD, COMPILE-FILE, WITH-OPEN-FILE, DIRECTORY, and so on), are
merged with *DEFAULT-PATHNAME-DEFAULTS*.

Check the value of *DEFAULT-PATHNAME-DEFAULTS*.

The default value of *DEFAULT-PATHNAME-DEFAULTS* is implementation
dependant, often something like #P"", and with implementation running on
POSIX systems, this leads to merged relative pathnames that are
eventually resolved relatively to the POSIX current working directory.

The default POSIX current working directory is inherited from the parent
process. On MacOSX, when you launch an application from the Finder, the
POSIX current working directory is "/".

There's no standard operator to change the POSIX current working
directory.

With the above assumption, (load "quicklisp.lisp") will try to load
"/quicklisp.lisp". You can check this with TRUENAME:

(truename "quicklisp.lisp")

You don't say where you downloaded quicklisp.lisp.

Assuming you downloaded it in the Downloads directory in your home
directory, you could load it either by giving an absolute pathname:

(load #P"/Users/cai/Downloads/quicklisp.lisp")

or by setting the *default-pathname-defaults* to that directory:

(setf *default-pathname-defaults* #P"/Users/cai/Downloads/")
(load #P"quicklisp.lisp")

You may also have forgotten where your home directory is, so you may
want to use USER-HOMEDIR-PATHNAME:

(setf *default-pathname-defaults*
(merge-pathnames #P"Downloads/" (user-homedir-pathname)))
(load #P"quicklisp.lisp")

or:

(load (merge-pathnames #P"Downloads/quicklisp.lisp"
(user-homedir-pathname)))


You could put in your ~/.lispworks file the following definition:

(defun cd (pathname)
(setf *default-pathname-defaults* pathname))

so that you can easily change *default-pathname-defaults* by typing:

(cd #P"~/src/my-first-project/")
(ensure-directories-exist "hw.lisp")
(ed "hw.lisp")


--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk