# Anything like the Sage cell server in Julia, or planned for Julia?

**URL:** <https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808>\
**Category:** Internals & Design\
**Created:** [February 4, 2018, 12:26pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808 "2018-02-04T12:26:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henri\_Laurie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henri_laurie/32/5079_2.png) [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Post date:** [February 4, 2018, 12:26pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808/1 "2018-02-04T12:26:09Z")

</div>

Not sure how to tag this, but it seems a request for discussion of a new interface, so probably belongs under Development.

I am wondering if anything like the Sage cell server is possible, desirable and contemplated in/for Julia?

My immediate need is for using PreTeXt to write some course material and/or books (see [https://mathbook.pugetsound.edu/](https://mathbook.pugetsound.edu/)). The Sage cell server is a way to short bits of Sage code within a browser, usually via HTML but more generally from some XML application as is the case with PreTeXt. (See [https://sagecell.sagemath.org/](https://sagecell.sagemath.org/), [https://www.sagemath.org/](https://www.sagemath.org/) and [SageMath - Wikipedia](https://en.wikipedia.org/wiki/SageMath)).

Madrid Autonomous University’s maths dept even have a Sage cell server anybody can call on via HTML in a web page. Bit like a tiny JuliaBox, one cell at a time and no need to log in …

My perception is that this might be difficult to do efficiently in Julia, unless the cell server is purely local and loads a number of additional packages beyond Core and Base (perhaps specified by the user setting up the server), so that when a cell runs on the server it is basically a REPL with those packages (possibly even user-defined modules) available. In that case, it would start a new REPL each time, with a new workspace, so it might have noticeable lag. Even so it might be OK for course-work interface I force my students to use ;-).

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [February 4, 2018, 6:29pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808/2 "2018-02-04T18:29:09Z")

</div>

Are you looking for something like [JuliaBox](https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.juliabox.com/&ved=2ahUKEwi-wIHc8YzZAhVSnlkKHV27BysQFjAAegQIERAB&usg=AOvVaw3Unm2KLAquSSl9oW_zPAUP)?

---

<div class="post-metadata">

**Author:** ![Henri\_Laurie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henri_laurie/32/5079_2.png) [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Post date:** [February 5, 2018, 1:20pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808/3 "2018-02-05T13:20:56Z")

</div>

No, looking for something weaker. JuliaBox fires up and runs a whole  
environment, with active code cells (perhaps very many), maintained by a  
live kernel. I am no expert on sagecell, but it seems that it runs a cell  
and exits (storing some sort of history/variables, no idea how that works).  
It is this lightweight property that makes it attractive for embedding bits  
of code in a teaching text, which is what I would want it for.

In other words, I am not wanting to write a notebook. The main reason for  
that is to escape from the limitations of markdown (and to embrace the  
possibilities of LaTeX).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 5, 2018, 1:55pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808/4 "2018-02-05T13:55:09Z")

</div>

You may be looking for  
[https://github.com/mpastell/Weave.jl](https://github.com/mpastell/Weave.jl)

---

<div class="post-metadata">

**Author:** ![Henri\_Laurie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henri_laurie/32/5079_2.png) [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Post date:** [February 5, 2018, 2:23pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808/5 "2018-02-05T14:23:48Z")

</div>

Indeed I might, and for my purposes that might serve. But there is a bit of  
a community around PreTeXt, and I am (partly) speaking for them: they  
already have this resource and some 40 open text books have been or are  
being made that way, and they already use sagecell, so merely adding some  
more capacity (i.e. running small free-standing bits of Julia code in a  
code cell) is attractive to them.

I wonder if some sort of Julia-lite is not attractive in other contexts  
also. Of course, what one might mean by “Julia-lite” is likely to vary a  
lot, but in this context it means Core and Base and a bit more (for example  
linear algebra and differential equations, but not all of many linear  
packages that go beyond Base and not all of DifferentialEquations). For  
example, Julia as a first language for computing might use Core, Base,  
IJulia, Plots and perhaps a few more bits and pieces. If this were  
pre-compiled it might have virtually no lag for any typical beginner’s  
project. Of course such a beginner’s Julia-lite might exactly not serve for  
the code examples of a textbook!

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 5, 2018, 3:03pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808/6 "2018-02-05T15:03:49Z")

</div>

> [@Henri\_Laurie](#):
>
> they already use sagecell, so merely adding some more capacity (i.e. running small free-standing bits of Julia code in a code cell) is attractive to them.

Then perhaps they could contribute this functionality?

All of the tools above were written by people who found them useful; I guess that this is the most likely way for Sage cells to happen, too. If you want to do this yourself, I am sure you could get help here implementing it. My impression is that this needs someone who knows Python (because Sage uses that) and Julia.

That said, I am not sure I see the benefit. Small snippets of code for relatively simple calculations is not where Julia’s comparative advantages are.

---

<div class="post-metadata">

**Author:** ![Henri\_Laurie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henri_laurie/32/5079_2.png) [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Post date:** [February 5, 2018, 3:18pm UTC](https://discourse.julialang.org/t/anything-like-the-sage-cell-server-in-julia-or-planned-for-julia/8808/7 "2018-02-05T15:18:25Z")

</div>

Oh, I doubt there would much pay-off for the current Julia community. I see  
it as yet another opportunity to raise awareness of and liking for Julia  
elsewhere 😉

Rob Beezer, the main PreTeXt developer, is already trying it out, but  
within PreTeXt, mostly because I suggested it to him. Thanks for implied  
offer of help — or perhaps I should say reminder that the Julia community  
is vibrant and generous one, where help is never far away!
