Re: Small URL problem at Cloud9

2013-05-22 Thread Jon Kleiser

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.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;; there's one
doc/ too much. What may be the reason for this?

Hmm, difficult to tell remotely. I suspect that this can be only the
'Path' local variable, i.e. the return value of (file) in

  (let (Path (car (file)) ...

Can you insert a 'trace'

(trace 'file)
(html NIL -index- @lib.css ...
...

in the beginning of the default file, to see what it returns?

♪♫ Alex


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Small URL problem at Cloud9

2013-05-22 Thread Oskar Wieland

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, if yes, in what way?

Do you have any idea?

all the best
Oskar


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Quick try at building 64-bit on OSX 10.8.3

2013-05-22 Thread Jon Kleiser

Hi,

I've just installed OSX 10.8.3, Xcode 4.6.2 and Command Line Tools 
(make, gcc, ...) on one of my Macs (but no Java yet), and I wanted to 
see if something magical have happened that would make it possible for 
me to build 64-bit PicoLisp, so I did the (cd src64; make). I then got 
this:


No Java runtime present, requesting install.
make: *** [emu.base.c] Error 1

A dialog box popped up asking if I wanted to install a Java SE 6 
runtime. As I'm not very convinced that such a Java SE 6 runtime would 
give me the 64-bit PicoLisp, I have not accepted that offer yet. Am I 
wrong? ;-)


/Jon
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Small URL problem at Cloud9

2013-05-22 Thread Jon Kleiser

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 2 (chop doc//)))
- T
: (= '(/ /) (tail 1 (chop doc//)))
- NIL



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?

Do you have any idea?

all the best
Oskar



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/form.l)

/Jon
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Small URL problem at Cloud9

2013-05-22 Thread Oskar Wieland

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/form.l)

/Jon


Yep, and in the 32-bit version everything runs fine. No /doc/doc/

Thx
Oskar
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Small URL problem at Cloud9

2013-05-22 Thread Alexander Burger
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 it? Along the lines of the INSTALL file, or
from a Debian-Derivate?

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Quick try at building 64-bit on OSX 10.8.3

2013-05-22 Thread Alexander Burger
Hi Jon,

 to see if something magical have happened that would make it
 possible for me to build 64-bit PicoLisp, so I did the (cd src64;
 ...
 runtime. As I'm not very convinced that such a Java SE 6 runtime
 would give me the 64-bit PicoLisp, I have not accepted that offer
 yet. Am I wrong? ;-)

If you install Java, you can cross-assemble PicoLisp via ErsatzLisp.
This is usually not necessary, because you might as well download the
pre-assembled '*.s'-files.

BUT: In case of the Mac, both approaches won't work, as the Mac's
a.out-format is still not supported (you know .. ye old problems).

So better don't install Java ;-)

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Small URL problem at Cloud9

2013-05-22 Thread Alexander Burger
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. So

   (= '(/ /) (tail 2 (chop doc//)))

can be replaced with

   (tail '(/ /) (chop doc//))

This doesn't help with the original problem, though ;-)

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Small URL problem at Cloud9

2013-05-22 Thread Alexander Burger
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

   (href F (pack Path F))

somehow builds two doc/ fragments?

Then 'F' must also contain doc/, which I can't believe, because (dir)
returns file names without paths.


I think there is no other way than doing further debugging. If I were
you, I would put an exclamation mark, e.g. in

   (! let (Path (car (file))

and then single-step into the code to see what goes wrong (see the
tutorial for how to do this if necessary).

Alternatively, you may trace more functions, e.g.

   (mapc trace '(file dir info href))

to find out where things go wrong.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Quick try at building 64-bit on OSX 10.8.3

2013-05-22 Thread Jorge Acereda Maciá
I tried to build the emu version on OSX and it failed. Here is the culprit line:



emu.patch
Description: Binary data


Regards,
  Jorge


On May 22, 2013, at 5:24 PM, Alexander Burger a...@software-lab.de wrote:

 Hi Jon,
 
 to see if something magical have happened that would make it
 possible for me to build 64-bit PicoLisp, so I did the (cd src64;
 ...
 runtime. As I'm not very convinced that such a Java SE 6 runtime
 would give me the 64-bit PicoLisp, I have not accepted that offer
 yet. Am I wrong? ;-)
 
 If you install Java, you can cross-assemble PicoLisp via ErsatzLisp.
 This is usually not necessary, because you might as well download the
 pre-assembled '*.s'-files.
 
 BUT: In case of the Mac, both approaches won't work, as the Mac's
 a.out-format is still not supported (you know .. ye old problems).
 
 So better don't install Java ;-)
 
 ♪♫ Alex
 -- 
 UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: Quick try at building 64-bit on OSX 10.8.3

2013-05-22 Thread Alexander Burger
Hi Jorge,

 I tried to build the emu version on OSX and it failed. Here is the culprit 
 line:

Thanks! Unfortunately, it is not so easy, because then you get a warning
on 32-bit systems:

   cast from pointer to integer of different size [-Wpointer-to-int-cast]


So for 32-bits, we must still first cast to an uint32_t. I'd say we
change it to:

   ...
   (p
  (if *Bits64
 (_genCC A.n = (uint64_t)(uint8_t*)@1(@2);@3)
 (_genCC A.n = (uint64_t)(uint32_t)(uint8_t*)@1(@2);@3) ) )
   ...

Does this work for you? If so, I'll put it into the release.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Quick try at building 64-bit on OSX 10.8.3

2013-05-22 Thread Jorge Acereda Maciá

On May 22, 2013, at 8:19 PM, Alexander Burger a...@software-lab.de wrote:

 Hi Jorge,
 
 I tried to build the emu version on OSX and it failed. Here is the culprit 
 line:
 
 Thanks! Unfortunately, it is not so easy, because then you get a warning
 on 32-bit systems:
 
   cast from pointer to integer of different size [-Wpointer-to-int-cast]
 
 
 So for 32-bits, we must still first cast to an uint32_t. I'd say we
 change it to:
 
   ...
   (p
  (if *Bits64
 (_genCC A.n = (uint64_t)(uint8_t*)@1(@2);@3)
 (_genCC A.n = (uint64_t)(uint32_t)(uint8_t*)@1(@2);@3) ) )
   ...
 
 Does this work for you? If so, I'll put it into the release.

Ok, if that's the problem this is nicer… Does it compile without warnings on 
your 32-bit system?




emu2.patch
Description: Binary data




Subscribe

2013-05-22 Thread Rick Hanson
Add me, baby! ;-)


Re: Small URL problem at Cloud9

2013-05-22 Thread Oskar Wieland

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 worked on first try.

oskar
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe