um so hi I'm joe corneli
uh this is work I did with ray puzio and
cameron smith
um and they're the main protagonists in
this story they
are uh researchers who've been working
on theoretical biology um so in a
typical project they may use manxima
and julia their work for biology physics
and computer science
computer science and the latest work in
progress is on branching processes for
cancer modeling so
how can um Emacs possibly help
let's let's have a look uh moving code
and data between these different
programs by hand is
annoying on separate workflows for
writing up notes and preparing
publications
is perhaps even more annoying all of
it's time consuming and error-prone
um so what about maybe using jupiter
uh we found something called script of
scripts and it solves some of those
problems because you can use
maximum and julia together but we were
quite happy to explore emacs based
solutions being emax enthusiasts and we
even
got cameron to be enthusiastic about
doing emacs so that
went nice so just here's a little
feature grid
of emacs org versus just sort of your
generic
um tools that are in a different more
general ecosystem so as you can see it's
quite
feature complete you've got your maximo
mode julia mode you can use both of them
inside of org mode
you can present things with word tree
slide you can set up a
wiki inside of orgrome this is one I
found
rather recently you can even use
compatibly with orgrome something called
log seek
which is in the browser um so that's
nice
um you can do real-time collaborative
editing um
either in a kind of pairing style or in
a more etherpad style
obviously you can manage your references
you can typeset whatever you want um you
can publish work in progress on a blog
and the fern is another one of these
external
org mode tools it's not actually any mac
but works with
org mode stuff and you know so we're
good to go
uh with all of that so what does that
look like well here's
a little example from before they were
doing um
before we started really thinking
seriously about this stuff so this is
just maxima
well maximo doesn't have a long running
process by default if you've ever used
python
uh you have something called sessions uh
they don't have that for maxim at least
not by default
um so how what was the workaround
there's this thing called uh
solve for you here and um
that shows up down below again in these
angle brackets which you've seen maybe
in someone else's talk
uh which means go to the previous uh
thing that was named soul for you
and do that all over again so they do
that over again
and here's the little maxima code for
defining you saw so you've now defined
you saw
and then you can use it in the next
expression you get out a nice juicy
zero at the end but it's a little bit a
little bit
like cartridge in a pear tree to have to
redefine everything every time
so this is clearly at the level of work
around um maybe just
one more time going looking through that
um
that stuff um
sorry so uh looking through that stuff
this is we're going to need something
like that probably for stitching
maxima and julie julia together so it's
good to
look a little bit about how that might
work so first of all you can cache
results so if you wanted to save the
date
out of block one at a certain time and
then use
use it again later so at the time when I
ran this code
you can see I've got two slightly
different time stamps down below one's
the cached result and the other was the
result of reevaluating
the block so you can move things around
um and that's
that's going to be useful but you know
that's not really the main problem the
main problem is
making maxima long running so kind of
the
core of this talk is a new observant
facility which is a general purpose
way to do that kind of thing which
involves a very simple
change to obcor uh so we'll give a quick
overview of that and show
an example um so here's the example
um a very simple sort of silly example
uh what does it mean to have a long
running process here I've set this
display2d
to be false um which just means that
things are going to come
come across in 1d and then I ask it to
expand
uh something and I get latex by default
so so that's what it means is I've sent
something in and it's going to come
across in one view which is great
um maybe you'll also notice that there's
no semicolon if you're a maxima fan
um and things are coming across as tech
so those were some little bonus features
and I'll show you how that works later
so
um the change to obcor is as follows uh
um we uh actually this should say uh
instead of stream here it should say um
servant
sorry uh we tried an experimental
version what's called stream so now it's
called servant but all it does is it
overrides uh or babel execute laying for
arbitrary laying
if you have um a servant
in your in your params so that's the
change that hasn't been
pushed out or sent as a patch to anybody
but it's a pretty minor change
um here's an overview without the code
of just a high level overview of
observant.el so
it stores information about these
processes in a hash table
it can do pre-processing and
post-processing
um it does all these things it stores
the output
I mentioned here that in principle we
could store lots of output and have a
kind of browsable
history although we don't do that
presently um but that's what observant
does is it does what you might expect
and here's the
here's the maxima kind of um
on-ramp uh to get maxima brought in so
you have to obviously have a maximum
process you can call
um put hash uh this is the preprocessing
thing I mentioned adding in some tech um
and adding in
uh or deleting rather a substring and
here here is why you delete the
substring
is because um maxima thinks it's a good
idea to tell you false
once you once you run check on things
you've got to delete that back out to
get something kind of coherent out of it
but so this is how to set up maximal um
that's enough really of the demo is not
really a demos for
show and tell but uh this is an
experience report I wanted to talk about
the experience of doing this
so some some negatives like we tried to
get emacs jupiter working
prior to prior to working on the um
observant and we couldn't get it doing
everything we wanted despite a bit of
heavy lifting and debugging and stuff so
that's not not finished that was a bit
difficult
um on the other hand working on
observing was fun and pretty lightweight
and easy
um we got some experience co-editing
things with these real-time tools
obviously the stack is somewhat work in
progress um
so I just wanted to give a shout out to
crdt which was really fun
and champion was making bug fiction
bug fixes for that as we go similarly
for fern and log seek the maintainers
were really responsive
um and so that was nice we did try to
get emacs running in the browser
thinking it would be really nice for
people who
um didn't want to install it to get a
chance to just try it
uh but actually browsers capture things
like uh control n
and so that's that was a bit annoying
but we did get lots of great feedback
and interaction with people including
around this conference so thank you
to those who we've had discussions with
um
so future work okay so maybe you
remember I didn't
give a talk a few years back on arcana
so what what
might this have to do with org mode and
that's always the question one asks
about arcata
well so arcana one of the things it does
is transclusions and so that could be
actually very helpful
in connection with this combined notes
and write-up workflow so you might have
a
forward mode uh and some of these
results we got back as raw results
could go right into your write up in a
kind of
convenient way at a level above um
transparently a level above the notebook
so you'd have the notebook alongside the
write-up in that case
which is a sort of variation on the
literate programming
workflow this is speculative who knows
the other thought is
it just relates to the idea of network
programming so we can imagine these
networks of
computational nodes maybe sitting inside
of orgrome calling each other
um and you would want to maintain some
kind of model of that
process and a sort of general question
is how do we have a remote control for
long-running processes you could do that
in lisp or closure but
maybe we could have something a little
bit like that here
um so conclusions what have we actually
addressed well uh we addressed uh
accessing any long-running process with
a simple or mode interface
obviously we're not the only people to
think about notebooks but we think that
emacs has some advantages
related to reproducible research and
interdisciplinary collaboration so let's
just
say that we think something is
reproducible if it's actually teachable
to someone new and they can do it
org mode seems very useful for that many
of the other talks have touched on this
interdisciplinary collaboration is great
this was an interdisciplinary
collaboration on some level but
what about you know future work for
bringing in scenario planners simulation
scientists
and local farmers and building something
that they can all
use that's more than the sum of the
parts so a little
future work for everybody else here so
we think science should be widely
teachable
shareable semi-automated
transdisciplinary and real time
like EmacsConf so you can get in touch
uh via these methods and the code which
is very much early stage work in
progress
as this was meant to be an experience
report not a it's all done here it is
polished report
um it's also online if you'd like to
have a look so that's the end of the
talk and I don't know if there's time
for questions
or not but um I'm at your disposal now
thank you you are now unmuted
um many thanks for the tough job
uh let's see we have about I think four
minutes four questions
um and we have a couple of questions on
the pad would you like to read them
yourself or should I read them to you
uh just for sake of easy management why
don't you read them out if that's okay
yeah sure uh so they ask have you looked
into trying
sage math I've long uh long wanted
nothing org files
right and I and I wrote the answer that
we should be possible because one can
call it from a command
okay
and I see there's another sagemath
question that you seem to have answered
as well so I guess I won't repeat that
[Music]
there's let's not forget about embedded
calc in emacs
so so the first demos actually were with
calc so that's that's
useful uh although I think it was a
different kind of a different command
line
well that was the next calc yeah
so sure there is there is calc so that
would be calculus and
calc is already in org mode yeah
yeah yeah
um still looking for questions
okay I think that's about it I don't see
any questions on the ether pad
and let's see
anything on irc
um nothing but phrases and everyone
thanking you
thank you all right you're welcome
thanks a lot uh
we'll see you guys around then cheers
and see you around