New HyperDoc

7 views
Skip to first unread message

Waldek Hebisch

unread,
May 31, 2026, 9:33:23 AM (yesterday) May 31
to fricas...@googlegroups.com
As you know I am working on new HyperDoc code. You can try it now.
At

https://wiki.fricas.org/public/HDTOP.spad

is Spad code implementing Browse functionality. At

https://wiki.fricas.org/public/br_sup.boot

there is Boot code forwarding requests from C side to Spad.

To try, build current trunk, fetch the file above, start FriCAS and do:

)compile HDTOP.spad
)read br_sup.boot

I have tried to reproduce old behaviour, so it is possible that
at first you will see no difference. The 'Selectable' search
is visibly different, it allows now logical operators in
patterns and number of arguments field beside numbers allows
things like '<2' or '>1' (the '<2' meaning less than 2 arguments,
the second meaning more than 1 argument). I removed search
for default packages, it is not clear to me if it is of any
use.

Some bugs and misfeatures are fixed, for example '_*' will
search for multiplication, 'search_operat*' will find
appropriate operations. 'OrderedVariableList([x, y, z])'
and klicking on constructor search will correctly propagate
the variable list to field on constructor page.

Some old bugs are still present, for example
'SAE(INT, SUP(INT), x^2+17)' and klicking on constructors
signals error.

There are certainly some new bugs, so some work is needed
before new code can replace old one in the trunk.

On technical level, 'br_sup.boot' replaces Boot functions
used in HyperDoc protocal and redirects them to Spad, so
all protocol exchange goes trough Spad. Basic functionality
is provided by previously unused HyperdocPage and
HyperdocConnection.

Note: the above replaces Browse functionality, in principle
parts like 'Settings' and 'Basic commands' may be broken.
I have diff for them too, but it is intertwined with
unrelated changes. Also, 'Settings' and 'Basic commands'
are still done by Boot code, changes just remove unsed
parts and adapt them to rest of code.

Note2: The HDTOP constructor alone is incative and can not do
any charm. I will probably do some more cleanups and fixes
but I intend to include it soon. The 'br_sup.boot' part is
switching to new code, I do not want to delay much including
it, but it has potential for breakage, so that will be
slower. Also several other changes should go in with
'br_sup.boot'.

--
Waldek Hebisch

Kurt Pagani

unread,
May 31, 2026, 10:41:52 AM (yesterday) May 31
to fricas...@googlegroups.com
I get the err below when compiling
)co HDTOP ....


compiling local emit_predicate :
(HyperdocPage,SExpression,SExpression) -> Void
****** comp fails at level 3 with expression: ******
error in function emit_predicate

(SEQ
(|:=| |ls| | << | (|predicate_to_strings| |p| |true| (|construct|)) |
>> |)
(|exit| 1 (|add_list_to| |page| (|reverse!| |ls|))))
****** level 3 ******
x:= (predicate_to_strings p true (construct))
m:= $EmptyMode
f:=
((((|form| # # #) (|p| # #) (|page| # #) (|emit_predicate| #) ...)
((|display_doc| #) (|finish_constructor| #))
((|finish_constructor| #) (|display_op_sig| #))
((|display_op_sig| #) (|add_op_link2| #)) ...))

>> Apparent user error:
no modemap for construct with 0 arguments


Though, I have not the latest version but not so old:
(1) -> )version
"FriCAS 2025.12.23git compiled at Sat 11 Apr 18:15:48 CEST 2026"

Waldek Hebisch

unread,
May 31, 2026, 11:24:59 AM (yesterday) May 31
to fricas...@googlegroups.com
On Sun, May 31, 2026 at 04:41:47PM +0200, Kurt Pagani wrote:
> I get the err below when compiling
> )co HDTOP ....
>
>
> compiling local emit_predicate : (HyperdocPage,SExpression,SExpression)
> -> Void
> ****** comp fails at level 3 with expression: ******
> error in function emit_predicate

<snip>

> Though, I have not the latest version but not so old:
> (1) -> )version
> "FriCAS 2025.12.23git compiled at Sat 11 Apr 18:15:48 CEST 2026"

HDTOP depends on latest hypertex.spad (at least on latest BRINFO.spad)
and fauto.spad. Yesterday version is too old. I am not sure about
other files, maybe you will get away with using older versions,
maybe not.

> On 31/05/2026 15:33, Waldek Hebisch wrote:
> > As you know I am working on new HyperDoc code. You can try it now.
> > At
> >
> > https://wiki.fricas.org/public/HDTOP.spad
> >
> > is Spad code implementing Browse functionality. At
> >
> > https://wiki.fricas.org/public/br_sup.boot
> >
> > there is Boot code forwarding requests from C side to Spad.
> >
> > To try, build current trunk, fetch the file above, start FriCAS and do:
> >
> > )compile HDTOP.spad
> > )read br_sup.boot

--
Waldek Hebisch

Kurt Pagani

unread,
May 31, 2026, 12:17:51 PM (yesterday) May 31
to fricas...@googlegroups.com


On 31/05/2026 17:24, Waldek Hebisch wrote:
> On Sun, May 31, 2026 at 04:41:47PM +0200, Kurt Pagani wrote:
>> I get the err below when compiling
>> )co HDTOP ....
>>
>>
>> compiling local emit_predicate : (HyperdocPage,SExpression,SExpression)
>> -> Void
>> ****** comp fails at level 3 with expression: ******
>> error in function emit_predicate
>
> <snip>
>
>> Though, I have not the latest version but not so old:
>> (1) -> )version
>> "FriCAS 2025.12.23git compiled at Sat 11 Apr 18:15:48 CEST 2026"
>
> HDTOP depends on latest hypertex.spad (at least on latest BRINFO.spad)
> and fauto.spad. Yesterday version is too old. I am not sure about
> other files, maybe you will get away with using older versions,
> maybe not.

Thanks, the current (git) version is working.

---
(1) -> )version
"FriCAS 2025.12.23git compiled at Sun 31 May 17:30:30 CEST 2026"
; wrote /home/kfp/sandbox/newhyper/HDTOP.NRLIB/HDTOP.fasl
; compilation finished in 0:00:01.115
WARNING: redefining BOOT::|htGloss| in DEFUN
WARNING: redefining BOOT::|htGlossSearch| in DEFUN
(1) -> pattern_substitution_list
[isDomain, EM, $EmptyMode]

Qian Yun

unread,
5:34 AM (9 hours ago) 5:34 AM
to fricas...@googlegroups.com
This is a huge file to be reviewed by human...

Well, LLM doesn't see obvious breakages, other than a typo:
costructor_operations_page -> constructor_operations_page

- Qian

Waldek Hebisch

unread,
9:10 AM (5 hours ago) 9:10 AM
to fricas...@googlegroups.com
On Mon, Jun 01, 2026 at 05:34:02PM +0800, Qian Yun wrote:
> This is a huge file to be reviewed by human...

The intent is to check if things that you (and other people)
use work OK. Interactive features are tricky for automatic
tests and (at least currently) we need to test them by hand.

> Well, LLM doesn't see obvious breakages, other than a typo:
> costructor_operations_page -> constructor_operations_page

Thanks. I have put changed version at the same place. I also
fixed another typo (had shop_op_detail instead of show_op_detail),
added a workaround for 'T$' problem and where possible replaced
uses of Symbol by abbreviation.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages