Computer Old Farts Forum
 help / color / mirror / Atom feed
From: Adam Thornton <athornton@gmail.com>
To: Computer Old Farts Followers <coff@tuhs.org>
Subject: [COFF] Re: [TUHS] Re: Command Line Editing in the Terminal Driver (Was: A few comments on porting the Bourne shell)
Date: Tue, 3 Jan 2023 16:02:42 -0700	[thread overview]
Message-ID: <CAP2nic0UaCvYHsPsP1LTBck5qNkbUYXAzx77BkP7s=nn6ryB4g@mail.gmail.com> (raw)
In-Reply-To: <CAK0pxsH6bWTLVApE_vDhATmMgaF+nwc5D3pSz4srtwGS-8Ux_A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5218 bytes --]

(moving to COFF)

On Tue, Jan 3, 2023 at 9:55 AM Marshall Conover <marzhall.o@gmail.com>
wrote:

> Along these lines but not quite, Jupyter Notebooks have stood out to me as
> another approach to this concept, with behavior I'd like to see implemented
> in a shell.
>
>
Well, you know, if you're OK with bash:
https://github.com/takluyver/bash_kernel

Or zsh: https://pypi.org/project/zsh-jupyter-kernel/

One of the big things I do is work on the Notebook Aspect of the Rubin
Science Platform.  Each JupyterLab notebook session is tied to a "kernel"
which is a specific language-and-extension environment.  At the Rubin
Observatory, we support a Python 3.10 environment with our processing
pipeline included.  Although JupyterLab itself is capable of doing other
languages (notably Julia and R, which are the other two from which the name
"Jupyter" came), many others have been adapted to the notebook environment
(including at least the two shells above).  And while researchers are
welcome to write their own code and work with raw images, we work under the
presumption that almost everyone is going to use the software tools the
Rubin Observatory provides to work with the data it collects, because
writing your own data processing pipeline from scratch is a pretty
monumental project.

Most astronomers are perfectly happy with what we provide, which is Python
plus our processing pipelines, which are all Python from the
scientist-facing perspective (much of the pipeline code is implemented in
C++ for speed, but it then gets Python bindings, so unless you're actually
working very deep down in the image processing code, it's Python as far as
you're concerned).  However, a certain class of astronomers still loves
their FORTRAN.  This class, unfortunately, tends to be the older ones,
which means the ones who have societal stature, tenure, can relatively
easily get big grants, and wield a lot of power within their institutions.

I know that it is *possible* to run gfortran as a Jupyter kernel.  I've
seen it done.  I was impressed.

Fortunately, no one with the power to make it stick has demanded we provide
a kernel like that.  The initial provision of the service wouldn't be the
problem.  It's that the support would be a nightmare.  No one on my team is
great at FORTRAN; I'm probably the closest to fluent, and I'm not very, and
I really don't enjoy working in FORTRAN, and because FORTRAN really doesn't
lend itself easily to the kind of Python REPL exploration that notebooks
are all about, and because someone who loves FORTRAN and hates Python
probably has a very different concept of what good software engineering
practices look like than I do, trying to support someone working in a
notebook environment in a FORTRAN kernel would very likely be exquisitely
painful.  And fortunately, since there are not FORTRAN bindings to the C++
classes providing the core algorithms, much less FORTRAN bindings to the
Python implementations (because all the things that don't particularly need
to be fast are just written in Python in the first place), a gfortran
kernel wouldn't be nearly as useful as our Python-plus-our-tools.

Now, sure, if we had paying customers who were willing to throw enough
money at us to make it worth the pain and both bring a FORTRAN
implementation to feature-parity with the reference environment and make a
gfortran kernel available, then we would do it.  But I get paid a salary
that is not directly tied to my support burden, and I get to spend a lot
more of my time working on fun things and providing features for
astronomers who are not mired in 1978 if I can avoid spending my time
supporting huge time sinks that aren't in widespread use.  We are scoped to
provide Python.  We are not scoped to provide FORTRAN.  We are not making
money off of sales: we're employed to provide stable infrastructure
services so the scientists using our platform and observatory can get their
research done.  And thus far we've been successful in saying "hey, we've
got finite resources, we're not swimming in spare cycles, no, we can't
support [ x for x in
things-someone-wants-but-are-not-in-the-documented-scope ]".  (To be fair,
this has more often been things like additional visualization libraries
than whole new languages, but the principle is the same.)  We have a
process for proposing items for inclusion, and it's not at all rare that we
add them, but it's generally a considered decision about how generally
useful the proposed item will be for the project as a whole and how much
time it's likely to consume to support.

So this gave me a little satori about why I think POSIX.2 is a perfectly
reasonable spec to support and why I'm not wild about making all my shell
scripts instead compatible with the subset of v7 sh that works (almost)
everywhere.  It's not all that much more work up front, but odds are that a
customer that wants to run new software, but who can't guarantee a POSIX
/bin/sh, will be a much more costly customer to support than one who can,
just as someone who wants a notebook environment but insists on FORTRAN in
it is very likely going to be much harder to support than someone who's
happy with the Python environment we already supply.

Adam

[-- Attachment #2: Type: text/html, Size: 6154 bytes --]

      parent reply	other threads:[~2023-01-03 23:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <52FB6638-AEFF-4A4F-8C2E-32089D577BA0@planet.nl>
     [not found] ` <464819f0-d2f6-2a60-6481-a194f4428b4d@case.edu>
     [not found]   ` <20221230200246.GW5825@mcvoy.com>
     [not found]     ` <88f83b4c-b3f9-ed87-b2fa-560fb369742a@makerlisp.com>
     [not found]       ` <20221231035931.GG5825@mcvoy.com>
     [not found]         ` <BD716565-29A2-4959-AA20-339E91DBF789@iitbombay.org>
     [not found]           ` <20221231044049.GI5825@mcvoy.com>
2022-12-31 11:57             ` [COFF] fmt Strings. " Ralph Corderoy
     [not found]         ` <alpine.BSF.2.21.9999.2212311516330.69068@aneurin.horsfall.org>
     [not found]           ` <528f0c53-ccc2-88a1-5a7b-120362c648dd@mhorton.net>
     [not found]             ` <CAC20D2NZbBa9PK_F50iWVn+t7m8=_mcw4mR2mKcTgDbdqxJi=w@mail.gmail.com>
     [not found]               ` <20230102165120.GK25547@mcvoy.com>
     [not found]                 ` <E977D385-604F-49A9-83FD-8C5270623066@gmail.com>
     [not found]                   ` <20230102174304.GM25547@mcvoy.com>
     [not found]                     ` <E4339ED1-73F4-4BBB-92EF-B9D5A92C5096@gmail.com>
     [not found]                       ` <CAC20D2Pf-rLL8NqoJ7RcXHjrq4crQKC=K25218fuM0yd0rQNDA@mail.gmail.com>
     [not found]                         ` <CAEoi9W7A==NC+W+H+kZbUZ6AK2O-cUjwjUz_Gx_HY_BKfeeBqA@mail.gmail.com>
2023-01-02 18:48                           ` [COFF] Re: [TUHS] Re: A few comments on porting the Bourne shell Dan Cross
2023-01-02 19:53                             ` [COFF] Re: [TUHS] " Adam Thornton
     [not found]     ` <8ca17d52-a25a-dbbf-e1f0-d743b8884cfa@in-ulm.de>
     [not found]       ` <b689c244-3ea9-4fd6-bb45-a59d131071d6@app.fastmail.com>
     [not found]         ` <CAK0pxsH6bWTLVApE_vDhATmMgaF+nwc5D3pSz4srtwGS-8Ux_A@mail.gmail.com>
2023-01-03 23:02           ` Adam Thornton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP2nic0UaCvYHsPsP1LTBck5qNkbUYXAzx77BkP7s=nn6ryB4g@mail.gmail.com' \
    --to=athornton@gmail.com \
    --cc=coff@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).