• Executing Smalltalk Scripts In Jupyter

    From Lawrence D'Oliveiro@21:1/5 to All on Mon Mar 18 22:36:29 2024
    Jupyter notebooks don’t have to have all their code written in one
    language; you can use the “%%script” cell magic to intersperse cells containing code in quite a different language.

    For example, with GNU Smalltalk installed, I could (following an example
    in the User Guide) type the following in a notebook cell:

    %%script gst
    x := Set new.
    x add: 5; add: 7; add: 'foo'.
    x printNl.

    and get the output

    Set (7 5 'foo' )

    What’s nice is that I don’t have to specify any options to turn off extraneous startup/prompt messages. On the downside, I haven’t yet found
    an option for automatic display of any value returned from the last line.
    E.g. it would be nice if a sequence like

    %%script gst
    2 + 2

    would produce the output “4”. I can get such a thing with some other language implementations, but not this one.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)