On 1/12/23 6:11, Craig Johnson wrote:
for those who are interested.
https://www.codeproject.com/Articles/5373567/Smallscript-A-Smalltalk-Inspired-Scripting-Languag
Thanks. It looks interesting indeed. So much that, what was a short
answer became a long reflection on minimal environments that provide
support for diverse learners (beyond developers or computer scientists)
via data storytelling and computational notebook. Here it comes.
======
I have been using Nim integrated with Pharo/GT when I need go to the
console, performance optimizations or use a library/functionality not
yet in Pharo, and I would like a better shell and external programs
story in Pharo/GT (I know the second is build on the first, despite
having different agendas, but that's the combination I use and for me,
GT's power provides from being done in Pharo).
I would like something fast and self contained / portable that can be
run from the terminal, but it is also able bootstrap a more complex
environment and GUI as needs require it, as I'm interested in data
storytelling for diverse learners (mainly non-developers) and
computational notebooks, that run in restricted/bureaucratic
institutional environments with low/restricted/intermittent connectivity
(for example university labs).
I will compare what is available AFAIK in the Pharo ecosystem, with what
I have found recently Pluto.jl[1][1a] (and others), which brings this
kind of bootstrappable computational notebook experience, thinking in
how Pharoers, could benefit from a bootstrapable experience from shell
at the end.
1. Pluto can run from a portable program that doesn't require admin
permission to install: just uncompress and run (like Pharo).
2. Pluto provides an interactive programming Julia shell where you can
load more packages and launch the WUI (Web UI). In Pharo's case, there
are Coral[2] and Scale[2a], with the second pretty close to a shell +
loadable graphical interface, but both seem unmaintained.
3. Pluto provides an interactive notebook interface (like GT), but it is
reactive, non-blocking and stores a computational graph of related
variables/expressions.
4. Pluto stores its notebooks as human/diff friendly plain text and, in
fact, they're just Julia scripts[3] (like Clojure's Clerk[3a][3b]). As I
told in ESUG 2023, we have been porting some lessons from Grafoscopio to
Lepiter about having human/diff friendly formats to store computational
notebooks using Markdeep[4], which is similar to the approach taken by
Elixir's LiveBook[3c]. See for example this documents, and their source
code, on building modular parsers with PetitParser[4a] (ported from the
chapter in Pharo books) or on migrating from WordPress to
TiddlyWiki[4b]. Such formats are in contrast with long nested diff/human
unfriendly JSON documents of Jupyter or Lepiter, and pretty readable
outside Pluto, Clerk, LiveBook or Lepiter, just with a plain text editor
or a web browser (in Markdeep's case).
So, how could we to have a pretty minimal Smalltalk/Pharo powered shell
language/mini-image that can execute .st scripts (like with Coral and
Scale) and launch a notebook, being it native (like Lepiter, with its
wonderful one single rendering tree, but more minimalist and with async
snippets/code execution by default) or web UI (still to be created,
maybe with HTMX)? My approach, for the moment, is to develop MiniDocs[4]
to provide support for minimalist documentation tools (starting with
Markdeep and some Pandoc support) and some notebook web rendering (via
Zinc) and export. Pandoc's Markdown export with metadata to make
notebooks collaborative (as we are doing with Markdeep) is yet to be
done (but soon in the radar). Also Brea[5] will be (slowly) used/revied
to explore building web sites/interfaces (now that HTMX is available to
avoid JS)
Still, the question of how minimal Pharo or GT can be made to run from
shell or integrate with external software ecosystems is an open question
for me. Seems that the best approach would be to revive Scale (or Coral)
and to see which minimal elements of a computational notebook experience
can be bootstrapped from there and which lessons from more (b)loaded
environments can we port to such minimal systems, while still interop
with the wider Pharo ecosystem or even with other languages (like Nim or
Julia). Maybe PharoIoT or other minimalist images could be a starting
point also (but pharoiot.org seems also unmaintained).
I'll keep the community posted on the experiments sketched above.
Cheers, happy new year and thanks for the Pharo community, ecosystem and
all the hard work and good vibe behind.
Offray
== Links
[1] https://plutojl.org/
[1a] https://www.youtube.com/watch?v=Rg3r3gG4nQo
[2] https://speakerdeck.com/cdlm/coral-esug-2011?slide=2
[2a] https://github.com/guillep/Scale
[3] https://featured.plutojl.org/
[3a] https://clerk.vision/
[3b] https://book.clerk.vision/
[3c] https://livebook.dev/
[4] https://code.sustrato.red/Offray/MiniDocs/
[4a]
http://mutabit.com/repos.fossil/mutabit/doc/trunk/wiki/en/petitparser-building-modular-parsers--ac8zq.md.html
[4b]
https://mutabit.com/repos.fossil/gig/doc/trunk/wiki/en/gig-portable-wiki--1apbv.md.html
[5] https://code.sustrato.red/Offray/Brea
[5a] https://mutabit.com/repos.fossil/indieweb/
[5b] https://mutabit.com/repos.fossil/brea/