Re: Small URL problem at Cloud9
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. I have tried replacing the @lib.css with NIL, but the browser keeps expecting @lib/form.js. Strange ... /Jon On 23-05-13 16:07 , Jon Kleiser wrote: 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 a script, called from lib/http.l (let (Localhost (tail (chop 127.0.0.1) (chop *Adr)) IndexOf Index of Path (car (file)) APath Path Th '(class . th) ) (when (tail '(/ /) (chop Path)) (setq Path (pack (head -1 (chop Path# removing extra / at the end (setq APath (if Localhost Path# need APath on localhost ) ) )# no APath needed (html NIL (pack IndexOf Path (when Localhost (localhost)))# title @lib.css '(style . margin: 20px 60px; font-size: 105%;)# body style (prin style scoped tr:not(.th):hover {background-color: #ccf} /style ) (h1 NIL IndexOf Path) (table '(style . border-collapse: collapse) NIL NIL (tr Th (th NIL Name) (th NIL Last modified) (th NIL Size)) (tr Th (th '(colspan . 3) (hr))) (chdir Path (for F (sort (dir)) (unless (= default F)# skipping name of this file (let (Cnt (car (info F)) Dat (dat$ (cadr (info F)) -) Tim (tim$ (cddr (info F))) ) (when (=T Cnt) (setq Cnt -))# directory (tr NIL (td NIL (href F (pack APath F))) (td '(style . padding: 0 2em) (span NIL Dat) (span '(style . padding-left: 1em) Tim) ) (td '(style . text-align: right) Cnt)) ) ) ) ) (tr Th (th '(colspan . 3) (hr))) ) (p '(style . margin: 0; font: italic small serif;) (ht:Prin PicoLisp v (glue . (version T)) ( *OS ) Server) ) ) ) /Jon -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Quick try at building 64-bit on OSX 10.8.3
Hi Jorge, A quick question, what's the status of the *FPic variant on Linux? Is it working? If you mean the 64-bit version: Sorry, not at all ;-) If it works properly, I guess I could get it running on OSX as well when I find some spare time...-- That would be great! I must say that I gave up on that, see e.g. http://www.mail-archive.com/picolisp@software-lab.de/msg03816.html ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Small URL problem at Cloud9
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 @lib/... files from the server, and the server knows that '@' tells him to use the files in the PicoLisp installation directory, as in any other I/O operation. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Small URL problem at Cloud9
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 the intended behavior: The browser requests some @lib/... files from the server, and the server knows that '@' tells him to use the files in the PicoLisp installation directory, as in any other I/O operation. ♪♫ Alex Sorry, I wasn't clear. This happens when I try to access http://demo-project.jkleiser.c9.io/doc/;. I'm beginning to think that this use of the default script for this index purpose was a mistake ... /Jon -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Small URL problem at Cloud9
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 (html NIL ... @lib.css so the 'html' function generates a page referring to rel=stylesheet with name @lib.css. Then the browser knows it must fetch that stylesheet, and asks the server for it. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Quick try at building 64-bit on OSX 10.8.3
Hi Alex, On May 24, 2013, at 10:49 AM, Alexander Burger a...@software-lab.de wrote: If it works properly, I guess I could get it running on OSX as well when I find some spare time...-- That would be great! I must say that I gave up on that, see e.g. http://www.mail-archive.com/picolisp@software-lab.de/msg03816.html Well, x64 sucks, no surprise here, but not as much as x86. Perhaps a good strategy here would be to use one of the C calling registers (%r9 for instance) as a preloaded NIL. Restoring that value after calling C shouldn't be much of a problem and would probably make code cleaner and faster. I've done some preliminary experiments with that and it looks promising. What do you think of such approach? -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Small URL problem at Cloud9
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/;. I still don't get the point. You have (html NIL ... @lib.css so the 'html' function generates a page referring to rel=stylesheet with name @lib.css. Then the browser knows it must fetch that stylesheet, and asks the server for it. ♪♫ Alex 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. /Jon -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Small URL problem at Cloud9
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 something is confused about the base href= etc. Cloud9 must be doing something special, like putting a proxy into your communication between server and browser (?). ♪♫ Alex Yes, it's quite possible that Cloud9 is doing something special. I'll see if I can get some info from them. /Jon -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Missing o in -lcrypt in scr/Makefile
Hi, I believe there is a missing o at the end of line 104 in the current scr/Makefile. Adding the o to make it -lcrypto helped me build 32-bit PicoLisp, v. 3.1.2.9 C (on Mac OS X 10.8.3). /Jon -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Missing o in -lcrypt in scr/Makefile
Hi Jon, I believe there is a missing o at the end of line 104 in the current scr/Makefile. Adding the o to make it -lcrypto helped me build 32-bit PicoLisp, v. 3.1.2.9 C (on Mac OS X 10.8.3). Under Linux it is -lcrypt (according to the man page of crypt(3)). Seems we must make src/Makefile aware of the OS-depenencies again :( Does anybody know the difference between libcrypt.so and libcrypto.so? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Missing o in -lcrypt in scr/Makefile
On May 24, 2013, at 4:11 PM, Alexander Burger a...@software-lab.de wrote: Hi Jon, I believe there is a missing o at the end of line 104 in the current scr/Makefile. Adding the o to make it -lcrypto helped me build 32-bit PicoLisp, v. 3.1.2.9 C (on Mac OS X 10.8.3). Under Linux it is -lcrypt (according to the man page of crypt(3)). Seems we must make src/Makefile aware of the OS-depenencies again :( There's another option, embedding a libcrypt in picolisp sources. Dealing with changes upstream is always a pain, but OpenBSD's could be a good option. According to the CVS logs it seems quite stable. Didn't try to build it though. http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/ -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Missing o in -lcrypt in scr/Makefile
On Fri, May 24, 2013 at 04:11:54PM +0200, Alexander Burger wrote: Hi Jon, I believe there is a missing o at the end of line 104 in the current scr/Makefile. Adding the o to make it -lcrypto helped me build 32-bit PicoLisp, v. 3.1.2.9 C (on Mac OS X 10.8.3). Under Linux it is -lcrypt (according to the man page of crypt(3)). Seems we must make src/Makefile aware of the OS-depenencies again :( Does anybody know the difference between libcrypt.so and libcrypto.so? I tried -lcrypto in src/Makefile, and it doesn't work for me under Linux: $ ./pil lib/adm.l + : (de *Salt 16 . $6$@1$) - *Salt : (passwd abu) !? (ext:Crypt Str (or Salt (salt))) ext:Crypt -- Undefined In contrast, when using -lcrypt, I get $ ./pil lib/adm.l + : (de *Salt 16 . $6$@1$) - *Salt : (passwd abu) - $6$9D6/zPbxJaZ/KdUf$x9z5RBCSdxDPcNdBu8tPb0xjUiTIPNb2PFhBOGBvBslggvW16PS3P.WkxsPcWU211y2VoBO3oZPFSUh9l3Wm// BTW, an analog problem will be on the 64-bit version in the 'native' call too: : (pp 'passwd) (de passwd (Str Salt) (if *Salt (native libcrypt.so crypt 'S Str (or Salt (salt))) Str ) ) - passwd Tedious! :( ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe