Repository navigation
Releases: pyking-lang/pyking-releases
Release list
Pyking 0.1.3
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_styleand
canvas_stylechange every element of a kind;set_styleand
set_colorschange 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:fullalso holds Python, node,
gcc, a JDK and OCaml, sopyk compile --runruns 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, ornix profile install github:pyking-lang/pyking-releases. make website-releasepublishes the website at https://pyking.org/,
from the GitHub Pages repositorypyking-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_HOSTnames the addresspyk notebook,pyk playground,
pyk pykhelpandpyk servelisten on, 127.0.0.1 without it;
0.0.0.0listens 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
What's changed
Added
pyk pykhelpserves the help -- getting started, the language reference
and the library reference -- with every example runnable, andmake pykhelpopens it (make helplists 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
andpyk pykhelpshow the same pages, whichmakegenerates.- A function implemented in a target language may be declared with its
parameters named,def write(text: String) -> (), in place ofdef 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 examplelists example programs, one per line, andpyk example NAMEsaves 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 ofpyk, so nothing else is installed.
Options--stdio,-L,--log FILE; settingslibPathand
diagnostics(changeorsave). - 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 forweb24oriweb24, and lists a directory with no
index.html.
Changed
make test SUITE=tinywebruns one test suite,SUITE=repl,lsp
several;make helpsays 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
pykserving 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. :resetinpyk replkeeps 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 vendordownloads Monaco.
The notebook keeps Ace. pyk notebookandpyk playgroundare served bypykitself, so
Python is no longer needed to use them, and no package ships or
recommends it. Onlypyk notebook --mode testneeds node.pyk compile --runserves aweb24oriweb24page withpyk serve
rather thanpython3 -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 pykhelphas 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. pykgiven a file that does not exist says so as a usage error rather
than ending with an uncaught exception.make website-devno longer warns about the grammar'sebnfblocks
or a missingi18ncollection.- The Homebrew package ships the digest beside each library plugin, so
a program importingsys,tinywebor 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
What's changed
Added
- The
iolibrary:write,write_line,read_line(with an optional
prompt),readandis_eof, on every target. sys.exit, ending a program with a status, on every target.- The builtin
debug, which prints likeprintbut to standard error.
pyk compile --releaseremoves every call to it. - The
tinyweblibrary: 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_LOGandPYKING_TINYWEB_EVENTSrun 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
andTinyweb.java, documented on the website with examples.
- It runs on every target.
- 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 teachershows them, and--mode testchecks 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 notebook can hold rules with a maximum and a passing score,
- 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 withsys.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.jsand<module>_external_browser.js. - A runtime error raised by a library implemented in OCaml is reported
where the program called it. make testneeds 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
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.