Hi Alex,
On 24-05-13 12:38 , Alexander Burger wrote:
Hi Jon,
The problem is that the browser for some reason tries to get the
@lib.css (and @lib/form.js) from localhost:8080 while the main
request was directed to c9.io.
Ah, I see.
So, again, it seems to be what I said before, in that somethi
Hi Jon,
> The problem is that the browser for some reason tries to get the
> @lib.css (and @lib/form.js) from localhost:8080 while the main
> request was directed to c9.io.
Ah, I see.
So, again, it seems to be what I said before, in that something is
confused about the "mailto:picolisp@software-
Hi Alex,
On 24-05-13 11:34 , Alexander Burger wrote:
Hi Jon,
"@lib.css" (2nd line under "(html NIL"); it seems to make my browser
look for "http://localhost:8080/@lib.css";. For some reason my
...
Sorry, I wasn't clear. This happens when I try to access
"http://demo-project.jkleiser.c9.io/doc
Hi Jon,
> >>"@lib.css" (2nd line under "(html NIL"); it seems to make my browser
> >>look for "http://localhost:8080/@lib.css";. For some reason my
> ...
> Sorry, I wasn't clear. This happens when I try to access
> "http://demo-project.jkleiser.c9.io/doc/";.
I still don't get the point. You have
Hi Alex,
On 24-05-13 10:54 , Alexander Burger wrote:
Hi Jon,
"@lib.css" (2nd line under "(html NIL"); it seems to make my browser
look for "http://localhost:8080/@lib.css";. For some reason my
browser is also looking for "http://localhost:8080/@lib/form.js";,
Why is this a problem? That is th
Hi Jon,
> "@lib.css" (2nd line under "(html NIL"); it seems to make my browser
> look for "http://localhost:8080/@lib.css";. For some reason my
> browser is also looking for "http://localhost:8080/@lib/form.js";,
Why is this a problem? That is the intended behavior: The browser
requests some "@li
Hi again,
There are still problems with my 'default' script. One is the use of
"@lib.css" (2nd line under "(html NIL"); it seems to make my browser
look for "http://localhost:8080/@lib.css";. For some reason my browser is
also looking for "http://localhost:8080/@lib/form.js";, but not always.
Hi Jon,
concerning the trouble of removing the double "/" from 'Path':
> (let ...
> Path (car (file))
> ...
> Th '(class . th) )
> (when (tail '("/" "/") (chop Path))
> (setq Path (pack (head -1 (chop Path# removing extra "/" at
> the end
This removes
Hi,
Here is my improved 'default' script. It now works both on c9.io and on
localhost, and it handles both "doc" and "doc/". The logic that takes
care of all this, may not be rock solid and very clean, but at the
moment it's the best I can do. Here it is:
# This 'default' will be executed as
Hi Jon,
> I tried *Host and *Referer from my script, but they were empty.
Missing *Host is strange, I thought it should be sent by the user agent
(client).
*Referer is OK, it is only sent if you "come" to this server by clicking
on a link somewhere else.
> *Adr, however, gave me ":::127.6.
Hi Alex,
I tried *Host and *Referer from my script, but they were empty. *Adr,
however, gave me ":::127.6.26.129", and that can be useful. I think
I've also found a workaround for the "doc" / "doc/" effect on the URLs
in the list. I'll show it a little later ...
Thanks for the globals!
Hi Jon,
> of doc/"). Is it possible for my "default" script to access any info
> about the HTTP request from my web server (web.l)?
There are some globals which are set by the server, like
*Url The requested URL
*Adr The client's address
*Post Boolean GET/PO
Hi Alex,
On 23-05-13 12:22 , Alexander Burger wrote:
Hi Jon,
href="doc/ref.html">ref.html, but in the browser that was
expanded to the double-doc
"http://demo-project.jkleiser.c9.io/doc/doc/ref.html";. On c9.io I
...
sure. Can you suggest a fix for my "default" script that will make
it work in
Hi Jon,
> href="doc/ref.html">ref.html, but in the browser that was
> expanded to the double-doc
> "http://demo-project.jkleiser.c9.io/doc/doc/ref.html";. On c9.io I
> ...
> sure. Can you suggest a fix for my "default" script that will make
> it work in both contexts?
Hm, this sounds as if the br
Hi Alex,
It turns out that my "default" script was producing the same HTML code
when I run it on c9.io (64-bit) as when I run it on localhost:8080/
(32-bit). E.g. the HTML on demo-project.jkleiser.c9.io/doc/ for the
ref.html link was ref.html, but in the
browser that was expanded to the doubl
Hi Oskar,
> I builded the 64-bit version again, got a new ht file and 'ht:Pack'
> is defined. (The timestamp on the files showed me I builded the
> 32-bit on top of the 64-bit)
Fine. That explains it.
> And now the 32-bit version is showing 'ht:Pack' undefined :)
> Better not run them in one in
Hi Alex,
OK. So if 'ht:Pack' is undefined, then either the 'ht' library is not
found, or it somehow has the wrong contents.
What does
$ file /lib/ht
say? Is it perhaps incompatible to your 'picolisp' executable (e.g.
remained from some other build)?
/lib/ht: ELF 32-bit LSB shared object,
Hi Oskar,
> >This is strange. 'ht:Pack' (in the 'ht' library) is part of the PicoLisp
> >core. How did you install it? Along the lines of the INSTALL file, or
> >from a Debian-Derivate?
> I build the emu version along the lines of your INSTALL file.
> With local installation mode on a 32-bit ubunt
Hi Alex,
This is strange. 'ht:Pack' (in the 'ht' library) is part of the PicoLisp
core. How did you install it? Along the lines of the INSTALL file, or
from a Debian-Derivate?
I build the emu version along the lines of your INSTALL file.
With local installation mode on a 32-bit ubuntu 12.04.
It
Hi Jon,
> I inserted the "(trace 'file)" (on Cloud9) and what I get is this:
> ...
> file = ("doc//" "default" . 3)
OK, good. That's the same I get.
Then Path must be "doc//", and then "doc/". So the problem is that
( F (pack Path F))
somehow builds two "doc/" fragments?
Then 'F' must als
Hi Jon,
> No, it has to be "tail 2", as I want to detect when Path ends with "//" ...
>
> : (= '("/" "/") (tail 2 (chop "doc//")))
> -> T
> : (= '("/" "/") (tail 1 (chop "doc//")))
> -> NIL
Small optimization: 'tail' also works as a predicate if the
first argument is a list instead of a number.
Hi Oskar,
> I can't get your code running, only the following error msg popping up:
>
> ? !? (ht:Pack Lst)
> ht:Pack -- Undefined
>
> Do I have to modify the 64-bit version, if yes, in what way?
This is strange. 'ht:Pack' (in the 'ht' library) is part of the PicoLisp
core. How did you install i
On 05/22/2013 06:32 PM, Jon Kleiser wrote:
No, you don't have to do any modifications (unless you're going to run
it at c9.io), at least it works for me on standard 32-bit. Did you try
this with my tiny web server code? That's where the libs are loaded:
(load "lib/http.l" "lib/xhtml.l" "lib/
Hi Oskar,
On 22-05-13 12:09 , Oskar Wieland wrote:
Hi Jon,
guessing from your code I'd try:
(when (= '("/" "/") (tail 1 (chop Path)))
instead of
(when (= '("/" "/") (tail 2 (chop Path)))
No, it has to be "tail 2", as I want to detect when Path ends with "//" ...
: (= '("/" "/") (tail
Hi Jon,
guessing from your code I'd try:
(when (= '("/" "/") (tail 1 (chop Path)))
instead of
(when (= '("/" "/") (tail 2 (chop Path)))
I can't get your code running, only the following error msg popping up:
? !? (ht:Pack Lst)
ht:Pack -- Undefined
Do I have to modify the 64-bit version,
Hi Alex,
I inserted the "(trace 'file)" (on Cloud9) and what I get is this:
file :
file = ("doc//" "default" . 3)
/Jon
On 21-05-13 18:00 , Alexander Burger wrote:
Hi Jon,
files on the index list, since they have got URLs like
"http://localhost:8080/doc/ref.html";. However, when I run my web
Hi Jon,
> files on the index list, since they have got URLs like
> "http://localhost:8080/doc/ref.html";. However, when I run my web.l
> on Cloud9 and go to "http://demo-project.jkleiser.c9.io/doc/";, then
> the URL for doc/ref.html is now
> "http://demo-project.jkleiser.c9.io/doc/doc/ref.html";;
27 matches
Mail list logo