Re: How to set internal page links in a PicoLisp Wiki?

2025-01-08 Thread Alexander Burger
Hi Lindsay,

great that you found a solution!

> To answer my own question after a bit of investigation:
> I added a new markup tag  ;{  } to allow writing snippets of raw html. I
> also had to modify the external web link tag to allow urls starting with
> "/".  (see code at end).
> ...
> Although, the jump doesn't work when logged into the wiki (i.e. on a
> session port different than the default port that the server is listening
> on). I'm not sure why.

This is because the URL after logging in needs more information (mainly
the port and the session ID).

Such cases are e.g. in "wiki/gui.l"

   (if *Login
  (baseHRef NIL *SesId "?home")
  (baseHRef *Port1 "?home") )

I think you can use a similar pattern.

☺/ A!ex

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


Re: How to set internal page links in a PicoLisp Wiki?

2025-01-08 Thread Lindsay Lawrence
>
>
> great that you found a solution!
>
> Thanks Alex!


>
> This is because the URL after logging in needs more information (mainly
> the port and the session ID).
>
Such cases are e.g. in "wiki/gui.l"
>
>(if *Login
>   (baseHRef NIL *SesId "?home")
>   (baseHRef *Port1 "?home") )
>
> That makes sense. I think I see what to do there.

On an external facing system, with https, I would only want to open a
single port and on a deployed machine I may not have a ui, or browser that
I can administrate things locally.

Question: Is there a way to avoid a session switching to a different port?

Regards,
Lindsay


Re: How to set internal page links in a PicoLisp Wiki?

2025-01-08 Thread Lindsay Lawrence
>
>
> This would be possible, but requires a different session strategy.
>
> The Pil system forks a child process for each session, which then uses
> its own private port to listen for further client connections.
>
> ...

> I believe that the current solution is very good (for several reasons we
> discussed here and in IRC.
>
> Thanks! I appreciate the explanation.
I haven't dug into the code enough, but I'll see if I can at least restrict
the ports used for administration sessions


/Lindsay


Re: How to set internal page links in a PicoLisp Wiki?

2025-01-08 Thread Alexander Burger
On Wed, Jan 08, 2025 at 08:28:50PM -0800, Lindsay Lawrence wrote:
> I haven't dug into the code enough, but I'll see if I can at least restrict
> the ports used for administration sessions

This is easy. Set in your initial code

   (setq *HPorts (8040 . 8079))

for such a range.

☺/ A!ex

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


Re: How to set internal page links in a PicoLisp Wiki?

2025-01-08 Thread Alexander Burger
On Wed, Jan 08, 2025 at 11:01:56AM -0800, Lindsay Lawrence wrote:
> > This is because the URL after logging in needs more information (mainly
> > the port and the session ID).
> > ...
> On an external facing system, with https, I would only want to open a
> single port and on a deployed machine I may not have a ui, or browser that
> I can administrate things locally.
> 
> Question: Is there a way to avoid a session switching to a different port?

This would be possible, but requires a different session strategy.

The Pil system forks a child process for each session, which then uses
its own private port to listen for further client connections.

Another possibility could be using a coroutine for each session, all
running in the same process and being dispatched to in some way
(possibly using ServerSent Events).

A drawback with this for example would be that a crashing or blocking
session would bring down the whole system ;)

I believe that the current solution is very good (for several reasons we
discussed here and in IRC.

☺/ A!ex

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


Unsubscribe

2025-01-08 Thread Александр Астафьев
Good bye =?utf-8?B?0JDQu9C10LrRgdCw0L3QtNGAINCQ0YHRgtCw0YTRjNC10LI=?=  :-(
You are now unsubscribed


Until better times)

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