HVML is a descriptive programming language designed by Wei Yongming, the author of China’s first open source basic software MiniGUI, and it is also the world’s first programmable markup language.

Counting from the conception in May 2020, Wei Yongming led the team for more than two years, and officially released the HVML specification document, interpreter, renderer and other software on July 31, 2022, with a total of more than 100 lines of code Ten thousand!

Facing the application development requirements in the future multi-screen collaboration scenario, HVML provides a new technical framework for the cross-terminal operation of applications. HVML contains a large number of novel designs and original ideas. It is the crystallization of Wei Yongming and his team’s nearly 30 years of experience in basic software development. Once released, it has attracted widespread attention from the industry.

This article will introduce the reader to recent developments in the HVML community.

Software and Documentation Updates

HVML interpreter PurC 0.9.2

On November 30, 2022, the HVML community released PurC 0.9.2, which is also the fourth alpha version of PurC 1.0.x.If you find any bugs, incompatibilities and problems, please contact https://github.com/HVML/PurC/… Report.

In this version, a large number of enhancements related to the interpreter have been completed, and some bugs have been fixed. Some major enhancements are described below:

1) Now, we can use line comments in compound expressions like:


{{
    # 尝试改变工作路径到 `/root` 目录下
    $SYS.cwd(! '/root') &&
        // 如果成功则调用 $FS.list 获得该目录下的所有目录项对象数组
        $FS.list ||
            # 否则向标准输出($STREAM.stdout)打印提示信息
            $STREAM.stdout.writelines('Cannot change directory to "/root"');
            // 并改变工作路径到 `/` 下
            $SYS.cwd(! '/' ) &&
                // 若成功,则获得该目录下所有目录项对象数组
                $FS.list ||
                    // 否则将 `false` 作为该 CHEE 的最终求值结果
                    false
}}

As shown above, we can use the compound expression # or // Define a line comment.

2) Available """(triple-double-quote, triple-double-quote) defines a multi-line text string, and retains the ASCII tab or newline character (U+0009 TAB, U+000A LF, U+000D CR), single quote (') and double quotes not appearing three times in a row (") without using escape symbols.Similarly, you can use '''(triple-single-quote, triple-single-quote) defines a multi-line text string, and retains the ASCII tab or newline character in it as it is, double quotes (") and single quotes not appearing three times in a row (') without using escape symbols. Such as:


{
    id:         1234567890UL,
    nickname:   "David",
    signature:
"""
一个

    被'程序'耽误的

        "文艺"青年。
""",
}

The difference between triple single quotes and triple double quotes is that when using triple double quotes, the expression contained in it will be evaluated, and the result will be stringified and concatenated with other parts as the final result. When using triple When single quotes are used, evaluated expressions within them are ignored.

3) In parameterized data or eJSON, support the use of [!  ] surrounded to define tuples. Such as:


<iterate on [! 1, 1, 2, 3, 5 ] >
    ...
</iterate>

In HVML, a tuple is an array with a fixed size, the members of which can be modified, but cannot be deleted or added. Tuples have lower memory consumption than arrays.

4) Support string constant syntax, used in catch with except The name of the exception defined in the element. Such as:


    <choose on $locales in "#the-footer" by "KEY: AS '$global.locale'">
        <update on "p > a" at 'textContent attr.href attr.title' with ["$?.se_name", "$?.se_url", "$?.se_title"] />
        <catch for `NoData`>
            <update on 'p' at 'textContent' with 'You forget to define the $locales/$global variables!' />
        </catch>
        <catch for `NoSuchKey`>
            <update on 'p > a' at 'textContent attr.href attr.title' with ["Google", "https://www.google.com", "Google"] />
        </catch>
        <catch for `ANY`>
            <update on 'p' at 'textContent' with 'Bad $locales/$global data!' />
        </catch>
    </choose>

So, when we are in catch or except When an incorrect exception name is used, an error will be reported during the parsing phase of the HVML program.

All bug fixes, enhancements, optimizations and tweaks in this release are listed below:

  • Variety:

    • Changed some long interface names.
  • Adjustment:

    • The serialization format of the document generated by HVML has been fine-tuned, which is convenient for developers to view.
    • Minor tweaks to the descriptions of some APIs.
  • Enhancement:

    • Support triple single quote syntax to define multi-line strings.
    • When using the triple-double-quote syntax, the evaluated expression inside it will be evaluated.
    • Compound expressions support line comments.
    • Support for tuples.
    • Supports string constant syntax for use in catch with except The name of the exception defined in the element.
    • In the implementation of predefined variables, use the linear container interface instead of array to support more container types.
    • Add new interface:purc_variant_make_atom().
    • purc The command line tool supports the use of URL query strings (RFC 3986) to specify request parameters passed to HVML coroutines.
    • purc The command-line tool’s Foil renderer supports more CSS properties, such as white-space,list-style-type,quotes,counter with counters Wait.
  • Bugfixes:

    • The eJSON parser will report an error for C0 control characters in unescaped strings.
    • hvml with iterate Expressions in elements are incorrectly evaluated twice.

HVML Specification 1.0 RC8

We released version 1.0 RC8 of the HVML specification on November 30, 2022, and moved into version 1.0 RC9 of the HVML specification.

In the RC8 version, we mainly made the following adjustments and enhancements around the HVML language specification:

  1. Exception or error names are defined using backtick attribute value syntax.
  2. Extended JSON syntax to support triple single quotes (''').
  3. Fine-tune stringification rules to avoid newlines in favor of commas and semicolons.
  4. Adjust some terms:

    • Evaluation expression: Hybrid evaluation expression (HEE).
    • Compound evaluation expression: Compound hybrid evaluation expression (CHEE).
    • Parameterized data: Parameterized Data.
    • Parameterized string: Parameterized String.
  5. $EJSON renamed to $DATA.
  6. $DATA.numberify renamed to $DATA.numerify.
  7. Tweaked chapters on evaluated expression syntax, eJSON syntax.

For details, please click to read the following link:

community activity

In November 2022, community partners made contributions in the following areas:

  1. Update the AUR package description for version 0.9.0, submitted a pull request by @taotieren.

next step

At the end of December 2022, we will release PurC version 0.9.4, the expected features include:

  1. enhance update elements to support intersect,subtract with xor and so on individually Adverb attribute.
  2. right request Full support for elements.
  3. Continue to enhance the Foil renderer to complete layout support other than tables.

At the end of January 2023, we will release PurC version 0.9.6, the expected features include:

  1. Support CSS Level 3 selector specification, perfect predefined $DOC Getters and setters for each attribute of a variable.
  2. Enhanced document positioning.
  3. from external data sources text/html The type is loaded as a native entity object to facilitate the processing and manipulation of web content.
  4. The Foil character renderer supports table layouts.

At the end of February 2023, we will release PurC version 0.9.8, the expected features include:

  1. Preliminary optimization of memory and performance.
  2. Dynamic object properties and methods defined in the predefined variable specification but not yet completed.
  3. A full-featured Foil character renderer that supports multiple windows, widgets and interactions.

At the end of March 2023, we will release PurC version 0.9.9 (PurC 1.0.0 Beta version), expected features include:

  1. Support for Windows platforms.
  2. A complete implementation of the predefined dynamic objects.

Frequently Asked Questions and Answers

Q: Is HVML targeted at embedded and IoT usage?

A: Not only that. HVML is a general-purpose glue language, and HVML’s target platforms include traditional desktops, servers, smartphones, tablets, embedded devices, and IoT devices.

Q: Is HVML intended to replace existing Web front-end development technologies, such as JavaScript?

A: There is no such plan. HVML’s renderer will use Web front-end technology, but the goal of HVML is not to replace the existing Web front-end development technology, but to meet the needs of future multi-screen collaboration scenarios and provide a new technical framework for cross-terminal running of applications , as the programming language of choice for the hybrid operating system (HybridOS).

Q: Where can I see the source code related to HVML?

A: HVML related documents and code repository are in https://github.com/HVML Open source releases, including:

  1. HVML Interpreter (PurC): https://github.com/HVML/PurC
  2. HVML graphics renderer (xGUI Pro): https://github.com/HVML/xGUI-Pro
  3. Extended WebKit engine (source package only)
  4. HVML character renderer for development (PurC Midnight Commander): https://github.com/HVML/PurC-…

Q: Is there a software package that can be directly downloaded and installed?

A: Due to the limited energy of the development team, there is no installation package for each operating system yet, but the friends from the open source community have taken active actions to help us complete the installation packages of some Linux distributions. We have collected these packages into the following pages, which can be accessed and viewed:

https://hvml.fmsoft.cn/software

#HVML #Update #Interpreter #Released #Evolution #Continues #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *