Skip to content

Releases: pyking-lang/pyking-releases

Pyking 0.1.3

Choose a tag to compare

@david-broman david-broman released this 16 Oct 15:49
7e10492

What's changed

Added

  • tinyweb pages have a look of their own, the same in the playground,
    the notebook, the help and on every target: the light look the
    playground's Web output window had. tw.theme(name) switches the
    whole page to "light", "dark", "plain", "paper" or "retro";
    page_style, button_style, label_style, slider_style and
    canvas_style change every element of a kind; set_style and
    set_colors change one element. A new page, Getting started ›
    Styling tinyweb, shows each of them with examples to run.
  • Pyking as a Docker image, for x86_64 and arm64:
    docker run --rm -it -v "$PWD:/work" ghcr.io/pyking-lang/pyking hello.pyk. ghcr.io/pyking-lang/pyking:full also holds Python, node,
    gcc, a JDK and OCaml, so pyk compile --run runs every target. The
    playground, the notebook and the help can be opened from outside the
    container with -p 8000:8000 ... playground --port 8000.
  • Pyking as a Nix flake, on Linux and macOS: nix run github:pyking-lang/pyking-releases, or nix profile install github:pyking-lang/pyking-releases.
  • make website-release publishes the website at https://pyking.org/,
    from the GitHub Pages repository pyking-lang/pyking-lang.github.io.
  • The website's start page has a picture at its top, a python wearing a
    crown, and its example beside the title, dark in both themes, with a
    "Try in playground" button in its corner.
  • A playground link may hold a program: …/playground/#code=… opens the
    playground with that program in the editor, without running it, and
    Copy code as link makes one from what is in the editor.
  • PYKING_WEB_HOST names the address pyk notebook, pyk playground,
    pyk pykhelp and pyk serve listen on, 127.0.0.1 without it;
    0.0.0.0 listens on every interface.

Installing

Pyking 0.1.3: the compiler and interpreter, with no dependencies.

macOS 11 or later, Apple Silicon and Intel:

brew install pyking-lang/tap/pyking

Linux and WSL, x86_64 and aarch64, any distribution:

curl -fsSL https://github.com/pyking-lang/pyking-releases/releases/latest/download/install.sh | sh

Or, on Debian, Ubuntu and WSL Ubuntu, the .deb for your architecture: sudo apt install ./pyking_amd64.deb.

Nix, on Linux and macOS:

nix run github:pyking-lang/pyking-releases -- hello.pyk
nix profile install github:pyking-lang/pyking-releases

Docker, x86_64 and arm64; ghcr.io/pyking-lang/pyking:full also holds every target's host, for pyk compile --run:

docker run --rm -it -v "$PWD:/work" ghcr.io/pyking-lang/pyking hello.pyk

Checksums are in SHA256SUMS.

Pyking 0.1.2

Choose a tag to compare

@david-broman david-broman released this 12 Oct 04:54
7e10492

What's changed

Added

  • pyk pykhelp serves the help -- getting started, the language reference
    and the library reference -- with every example runnable, and make pykhelp opens it (make help lists the make targets, as before). The
    playground has it as a fifth tab, Help, with a button copying an
    example into the editor. The website, the Help tab
    and pyk pykhelp show the same pages, which make generates.
  • A function implemented in a target language may be declared with its
    parameters named, def write(text: String) -> (), in place of def write : (String) -> (); the standard library now is.
  • A REPL in the playground: pyk repl's own session, with its commands
    (:help, :ls, :type, :edit, :ast, :tokens, :reset), the
    standard library, a Stop button, Copy from editor (the text marked in
    the editor into the prompt), and the environment as a table below,
    updated after every entry.
  • The playground has a light and a dark theme, following the system's
    by default, with a switch in the header and a choice in the settings.
    On the website it follows the site's own switch.
  • pyk example lists example programs, one per line, and pyk example NAME saves one in the current directory. The playground's menu,
    now called Examples, offers the same ones, in a checkout and an
    install alike.
  • A language server, pyk lsp, for every editor that speaks LSP: errors
    as you type, the inferred type on hover, go to definition (into
    imported modules and the standard library), an outline and
    completion. It is part of pyk, so nothing else is installed.
    Options --stdio, -L, --log FILE; settings libPath and
    diagnostics (change or save).
  • A VS Code and Cursor extension, pyking-<version>.vsix, attached to
    every release, and setup for Neovim, Vim, Emacs, Sublime Text,
    PyCharm and Helix on the website's Editors page. The Emacs mode
    registers the server with eglot and ships in every package.
  • pyk serve [--port N] [DIR] serves a directory's files, such as a
    page compiled for web24 or iweb24, and lists a directory with no
    index.html.

Changed

  • make test SUITE=tinyweb runs one test suite, SUITE=repl,lsp
    several; make help says so.
  • The playground's right side is five tabs: Run output, Compiled code
    (the target list and Compile are there now), Web output (a tinyweb
    page, in a browser-window frame with a Refresh button), REPL and Help.
  • The playground's header shows the version of the pyk serving it.
  • The website: the sections are on the left of the header and the
    search on the right; the menu on the left lists only the section being
    read, with the page's headings under it, and there is no menu on the
    right. A new section, Documentation, holds the language reference,
    Editors (from Getting started) and tinyweb without Pyking (from
    Libraries). The playground fills the window under the header. The
    logo is a python wearing a crown.
  • The library reference shows each function in a box, with its full
    signature, its parameters, what it returns and a runnable example,
    for every function of the standard library.
  • :reset in pyk repl keeps the library path (-L) the session was
    started with.
  • The playground's editor is Monaco, in the source pane and in every
    output pane, and the source pane is a client of the Pyking language
    server: errors are underlined as you type, and it has hover, go to
    definition, an outline and completion. make vendor downloads Monaco.
    The notebook keeps Ace.
  • pyk notebook and pyk playground are served by pyk itself, so
    Python is no longer needed to use them, and no package ships or
    recommends it. Only pyk notebook --mode test needs node.
  • pyk compile --run serves a web24 or iweb24 page with pyk serve
    rather than python3 -m http.server.

Fixed

  • A tinyweb program's sounds play in the website's playground and cells:
    the samples were not copied into the site.
  • A page with many cells no longer freezes the browser while it loads:
    the language reference made 124 editors at once, and a click on the
    menu went unanswered for half a minute. A cell's editor is now made
    when the cell comes near the screen.
  • The Help tab shows the end of a long page, keeps a cell's run button in
    view at every width, and lines its menu -- the sections on the left,
    the page's headings on the right -- and its title up with the text.
    pyk pykhelp has one scroll bar and a light/dark switch.
  • An example's stdout shown under it is replaced by its own output when
    it is run, rather than a second box appearing, and stands in line with
    its code.
  • An example that does not run in a browser (sys.prog_name,
    sys.prog_path) follows the website's dark theme instead of showing
    white.
  • pyk given a file that does not exist says so as a usage error rather
    than ending with an uncaught exception.
  • make website-dev no longer warns about the grammar's ebnf blocks
    or a missing i18n collection.
  • The Homebrew package ships the digest beside each library plugin, so
    a program importing sys, tinyweb or any other library implemented
    in OCaml runs without OCaml installed. 0.1.1 tried to compile the
    plugin and failed.

Installing

Pyking 0.1.2: the compiler and interpreter, with no dependencies.

macOS 11 or later, Apple Silicon and Intel:

brew install pyking-lang/tap/pyking

Linux and WSL, x86_64 and aarch64, any distribution:

curl -fsSL https://github.com/pyking-lang/pyking-releases/releases/latest/download/install.sh | sh

Or, on Debian, Ubuntu and WSL Ubuntu, the .deb for your architecture: sudo apt install ./pyking_amd64.deb.

Checksums are in SHA256SUMS.

Pyking 0.1.1

Choose a tag to compare

@david-broman david-broman released this 11 Oct 11:29

What's changed

Added

  • The io library: write, write_line, read_line (with an optional
    prompt), read and is_eof, on every target.
  • sys.exit, ending a program with a status, on every target.
  • The builtin debug, which prints like print but to standard error.
    pyk compile --release removes every call to it.
  • The tinyweb library: a web page a program draws on and listens to,
    with canvases, buttons, labels, sliders, sound, and the mouse and keys.
    • It runs on every target. tinyweb.web_init(port) makes a program
      serve its own page and print its address (port 0 picks a free one).
    • The playground and the notebook show the page under the program.
    • The REPL keeps serving the page while it waits at the prompt.
    • PYKING_TINYWEB_LOG and PYKING_TINYWEB_EVENTS run a program
      without a page, logging what it would show and replaying events.
    • Each language's implementation is also a library of its own, usable
      with no Pyking: tinyweb.py, tinyweb.js, tinyweb.ml, tinyweb.c
      and Tinyweb.java, documented on the website with examples.
  • The C and Java targets: what the top level binds is visible inside
    functions, and a top-level function can be passed as a value, such as a
    callback to a library.
  • The website, built with make website: getting started, the library
    reference, and the playground, with runnable examples on every page.
  • Notebook exercises and quizzes.
    • A notebook can hold rules with a maximum and a passing score,
      exercises checked against a solution or expected output, and
      single- and multiple-choice quizzes, with attempts, points and
      penalties.
    • pyk notebook --mode student (the default) hides solutions and
      answers, --mode teacher shows them, and --mode test checks a
      notebook instead of serving it.
    • Progress is kept in the browser, and results() reports it to a page
      embedding the notebook.
    • Exercises and quizzes also work on the website.
  • A cell's standard input and arguments can be written on its header:
    ```pyking stdin = "…" args = "…".
  • Programs in the playground and the notebook can read standard input and
    their arguments, which the page asks for, and can end with sys.exit.
  • CHANGELOG.md, shipped in every package and shown on each release.

Changed

  • An external module's files are named <module>_external.pyk (was
    <module>.external.pyk), and its JavaScript implementation is split
    into <module>_external_node.js and <module>_external_browser.js.
  • A runtime error raised by a library implemented in OCaml is reported
    where the program called it.
  • make test needs node 22.7 or later (was 24).

Fixed

  • Building a library's interpreter plugin no longer fails when the
    current directory holds a compiled OCaml module of the same name.
  • The playground's editor shows an unterminated string correctly.

Installing

Pyking 0.1.1: the compiler and interpreter, with no dependencies.

macOS 11 or later, Apple Silicon and Intel:

brew install pyking-lang/tap/pyking

Linux and WSL, x86_64 and aarch64, any distribution:

curl -fsSL https://github.com/pyking-lang/pyking-releases/releases/latest/download/install.sh | sh

Or, on Debian, Ubuntu and WSL Ubuntu, the .deb for your architecture: sudo apt install ./pyking_amd64.deb.

Checksums are in SHA256SUMS.

Pyking 0.1.0

Choose a tag to compare

@david-broman david-broman released this 27 Sep 18:05

Pyking 0.1.0: the compiler and interpreter, with no dependencies.

macOS 11 or later, Apple Silicon and Intel:

brew install pyking-lang/tap/pyking

Linux and WSL, x86_64 and aarch64, any distribution:

curl -fsSL https://github.com/pyking-lang/pyking-releases/releases/latest/download/install.sh | sh

Or, on Debian, Ubuntu and WSL Ubuntu, the .deb for your architecture: sudo apt install ./pyking_amd64.deb.

Checksums are in SHA256SUMS.