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

2025-01-10 Thread Lindsay Lawrence
On Fri, Jan 10, 2025 at 12:53 PM Alexander Burger 
wrote:

> Great! So I installed it on picolisp.com, and also released a new TGZ
>
> Thanks Alex! I am happy to have made a small contribution.

/Lindsay


Subscribe

2025-01-10 Thread Henrique Solér Kalinovski



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

2025-01-10 Thread Lindsay Lawrence
On Fri, Jan 10, 2025 at 3:01 AM Alexander Burger 
wrote:


> I would slightly change it to suppress the "#" if no
> jump label is given:
>
>(de wikiLink (Lst)
>   (let
>  (L (++ Lst)
> S (split L "#")
> Nm (or (pack (car S)) (: nm))
> Loc (if (cdr S) (pack Nm "#" @) Nm)
> Str (or (glue " " Lst) Nm) )
>  (cond
> ((fetch '(nm . +Doc) (fold Nm))
>( Str (pack "?" Loc)) )
> (*Login ( '*ID Loc Str))
> (T (ht:Prin Str)) ) ) )
>
> What do you think?
>
>
Very neat! That change works well in my testing.

Thanks Alex!

/Lindsay

P.S. I have some questions regarding PicoLisp database functionality, on
its own and in an app context like the wiki. I am going to try and work
through them on my own first. The wiki code seems a good real-world example
to do that with.


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

2025-01-10 Thread Alexander Burger
On Thu, Jan 09, 2025 at 05:29:12PM -0800, Lindsay Lawrence wrote:
> On Thu, Jan 9, 2025 at 1:26 PM Lindsay Lawrence <
> lawrence.lindsayj...@gmail.com> wrote:
> 
> >
> > PS: After all of that, I realize another, and perhaps contextually better,
> > solution may be to modify the 'wikiLink function, ={ .. } syntax, to handle
> > '#' when parsing the document name?

Indeed, this is much more consistent than using external links.


> (de wikiLink (Lst)
>(let (CurNm (get This 'nm)
>  NmParts (split (car Lst) "#")
>  Nm (or (pack (car NmParts)) CurNm)
>  Loc (pack Nm "#" (cdr NmParts))
>  Str (or (glue " " (cdr Lst)) (pack (car Lst))) )
>   (cond
>  ((fetch '(nm . +Doc) (fold Nm 0))
> ( Str  (pack "?" Loc)) )
>  (*Login ( '*ID Loc Str))
>  (T (ht:Prin Str)) ) ) )
> 
> I can now write markup like
> 
> ={DevForum#viprc  My viprc}
> 
> to jump to id in a specific wiki doc
> 
> and also
> 
> ={#viprc My viprc}
> 
> to jump to id within the current wiki doc

Great! If ok, I will change this also in the original.

I would slightly change it to suppress the "#" if no
jump label is given:

   (de wikiLink (Lst)
  (let
 (L (++ Lst)
S (split L "#")
Nm (or (pack (car S)) (: nm))
Loc (if (cdr S) (pack Nm "#" @) Nm)
Str (or (glue " " Lst) Nm) )
 (cond
((fetch '(nm . +Doc) (fold Nm))
   ( Str (pack "?" Loc)) )
(*Login ( '*ID Loc Str))
(T (ht:Prin Str)) ) ) )

What do you think?

☺/ A!ex

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


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

2025-01-10 Thread Alexander Burger
On Fri, Jan 10, 2025 at 10:36:54AM -0800, Lindsay Lawrence wrote:
> Very neat! That change works well in my testing.

Great! So I installed it on picolisp.com, and also released a new TGZ

   https://software-lab.de/wiki.tgz

Thanks for the ideas and coding!

☺/ A!ex

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


Installation

2025-01-10 Thread Henrique Solér Kalinovski
Hello, PicoLisp community.

Recently, I tried to build PicoLisp from source (master branch at github).
I've followed the instructions at INSTALL, but GNU Make complains that it
can't find "../bin/picolisp" (from "src" directory). Am I supposed to
download an executable and insert it there in order to build PicoLisp? I
hope that doesn't mean PicoLisp depends on itself.

Thanks for your help, Henrique


Re: Installation

2025-01-10 Thread Alexander Burger
Hello Henrique,

> Recently, I tried to build PicoLisp from source (master branch at github).
> I've followed the instructions at INSTALL, but GNU Make complains that it
> can't find "../bin/picolisp" (from "src" directory). Am I supposed to
> download an executable and insert it there in order to build PicoLisp? I
> hope that doesn't mean PicoLisp depends on itself.

PicoLisp does indeed depend on itself, but it comes with pre-built *.ll
files, so make should succeed out of the box.

Only if you modify *.l files, the *.ll files need to be rebuilt, and
this requires a running picolisp.

However, if you clone from a repo, the file timestamps may be destroyed,
and make possibly finds *.l files newer than the *.ll files.

The best is you fetch the TGZ with the rolling release

   https://software-lab.de/pil21.tgz

File meta data are preserved in tar files.


This is also described in

   https://software-lab.de/INSTALL

Good luck! :)

☺/ A!ex

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