
Mesh Spreadsheet - galfarragem
http://mesh-spreadsheet.com/
======
chrispsn
Hi! Didn't expect this.

Mesh is still very much an alpha. Since the last public commit I have been
experimenting with:

\- different text representations of the sheet (to make diffs as readable as
possible)

\- ways to compress more functionality into the 'boilerplate' included with
each sheet.

On the to-do list are:

\- persistence (including fixing "save sheet as URL" and local load/save)

\- selecting input cells with a keyboard while editing a formula

\- a way to include 'standard' spreadsheet formulas such as 'SUM' on-demand in
the sheet file

\- case-insensitive cell references

\- much more polish...

JavaScript's lack of a built-in parser is a real bummer, and it means that
while Mesh's backend logic can be written _as_ a spreadsheet, _in_ Mesh [1],
the file has to include a third-party JS parser, which significantly slows
down the editing process. I'd also like a proper SQL and first-class table
support, but we work with what is supported by Internet Explorer 11.

I remain confident that we can substantially improve the status quo of
spreadsheets and, by extension, programming.

[1]
[https://twitter.com/MeshSpreadsheet/status/10195553103635046...](https://twitter.com/MeshSpreadsheet/status/1019555310363504640?s=20)

~~~
galfarragem
The only two projects I know regarding "visual programming" that I think "are
on the money" are Mesh Spreadsheet and Hyperfiddle. Luna-lang, even if in
theory is great, didn't click with me. Observablehq is also interesting but I
don't have a use case for it.

Keep the good work!

edit - some remarks to "get there": it must be/feel fast like native Excel,
Sublime Text or at least VS code. In another phase, to be a real "programming
editor" it would be great if you could use any programming language you want,
not just JS. Clojurescript or Elm/Purescript could be a good start.

edit2 _> ways to compress more functionality into the 'boilerplate' included
with each sheet._ I think the boilerplate should be somehow hidden from the
end user.

~~~
microcolonel
> _some remarks to "get there": it must be/feel fast like native Excel,
> Sublime Text or at least VS code._

As someone who is working on an Excel compiler, I can tell you it's
challenging to make it very fast.

~~~
infinite8s
Is your compiler running on an interpreted language? I think to make this sort
of product fast requires JIT compiling the users expressions, and doing some
sort of whole program analysis to pull out the dependencies between cells.

~~~
microcolonel
I do whole program analysis, and the host is not interpreted. The costs are
mostly about the data structures used to store the intermediate values.
Automatically selecting whether to make some values contiguous or not is
difficult, and the types are a bit complex (basically option types).

The sheets I'm working with have around a million expressions, and there are
large sparse regions, so the data structures have to be a bit compact.

~~~
vchak1
I also think it would be valuable to autoconvert long lines (rows or columns)
of similar formulas into a mapping on an array. That would require some level
of shape analysis on the excel file.

~~~
microcolonel
That is in fact the first step, we have around 800k instances, but only around
1500 unique combinations of dependency shape and expression, which makes a big
difference.

------
eb0la
Reminds me Tiddlywiki ([https://tiddlywiki.com/);](https://tiddlywiki.com/\);)
but with spreadsheets instead of wikis...

... as a second thought spreadsheets are the wikis of people in finance,
management...

------
ajnin
Pretty cool, some basic documentation would be nice (the readme does not tell
everything). I didn't find how to reproduce some of the behavior of the loan
example in the GIF, like how to format cells (turns out formatting is just
writing a function that transforms a value and assigning it to the cell's 'f'
field. Are there other special fields ?). I can't seem to make sub-table
creation work, after creating a table with ctrl-alt-t, I seem to be stuck in
table edition mode, I can't click on another cell or press enter or tab to
deselect a cell.

I think it's a pretty promising project. Spreadsheets are very useful tools
but usually crippled by single-line, crappy, not syntax-checking, not
highlighting function editors.

~~~
chrispsn
Thanks for trying it out!

Yes - there are, or will be, other special fields, such as 'transpose' (so
table headers would go in the first column instead of the first row). I was
still figuring out which flags should be included, which is why it was under-
documented.

Never expected sub-tables as a use case. Displaying nested cells would require
a substantial re-write, but having _logically_ nested tables may work... you'd
just need to call the table making boilerplate function manually.

------
chrispsn
If you’d like to see more of Mesh in action, here’s a long form video of an
early version showing how to write a primitive RSS reader in a Mesh
spreadsheet and use it as the backend to a website. Back then typing into a
blank cell created a name; it now creates a value and uses the cell position
as the default name. Cell references also had to be preceded with $; we now
just add cell names as properties of the global object so you don’t need a
prefix.

[https://youtu.be/4e1vNqMs0QI](https://youtu.be/4e1vNqMs0QI)

------
erikcw
This immediately reminded me of org-mode spreadsheets[0]. I wonder if they
were a source of inspiration for this project.

[0] [https://orgmode.org/worg/org-tutorials/org-spreadsheet-
intro...](https://orgmode.org/worg/org-tutorials/org-spreadsheet-intro.html)

------
tryitnow
Great job.

On the "Why may I want to use Mesh instead of..." you may consider describing
why I would want to use mesh instead of jupyter notebooks.

------
pqs
Nice project. I always wanted a Python based spreadhshet. One where all the
formulas are written in python, with access to all the standard library and
more. This project is in javascript, but maybe someone could do it in python
one day.

~~~
donarb
There are a couple of a Python based spreadsheets, one called pyspread and
another Grid Studio.

[https://manns.github.io/pyspread/index.html](https://manns.github.io/pyspread/index.html)

[https://hackernoon.com/introducing-grid-studio-a-
spreadsheet...](https://hackernoon.com/introducing-grid-studio-a-spreadsheet-
app-with-python-to-make-data-science-easier-tdup38f7)

------
chrisweekly
Very cool!

Tangent: I'm reminded of [Mobx creator] Michael Weststrate's post^1 citing
familiar spreadsheet formulas and input cells as a way to explain concepts of
derivations and observables in mobx (his excellent state mgmt lib, which imho
improves on redux), making React actually "reactive".

^1 [https://hackernoon.com/becoming-fully-reactive-an-in-
depth-e...](https://hackernoon.com/becoming-fully-reactive-an-in-depth-
explanation-of-mobservable-55995262a254)

------
SamBam
Neat project, although selecting cells often does not work. (I assume that's
because it's in alpha.)

This line, though:

> is lightweight: ~2000 lines of source code (excluding libraries)

I feel like that's a very different meaning of "lightweight" than I normally
think of. I guess you're considering it from the perspective of a developer
who works on it. As a user, however, the browser downloads 1.4MB of
javascript, which is quite large, I'd say.

~~~
Someone
1.4MB is about 50 VisiCalcs
([http://www.bricklin.com/history/vcexecutable.htm](http://www.bricklin.com/history/vcexecutable.htm))
but I wouldn’t call it “quite large” for modern software.

------
MuffinFlavored
Does having JavaScript in the cell formulas allow you to do anything more than
you could already do with Excel?

~~~
chrispsn
Yes! Regex, tables that can expand/contract (not just arrays) are two big
ones.

------
miki123211
Could be cool, but this has zero screen reader accessibility. I hope this gets
fixed.

~~~
chrispsn
Good point, thank you. It is added to the isssues log. I’d love to hear more
about what would make Mesh more accessible for you and others.

[https://github.com/chrispsn/mesh/issues/68](https://github.com/chrispsn/mesh/issues/68)

------
theo31
If you like this concept, you might like [https://clay.run](https://clay.run)
which is spreadsheet + functions hosted in the cloud

------
kerneis
This reminded me of Histogram:
[http://tomasp.net/histogram/](http://tomasp.net/histogram/)

------
MR4D
Any idea how to run this on an iPad?

~~~
chrispsn
It should work on iPad, although it’s designed as a keyboard-preferred
experience. What were you trying to do?

~~~
MR4D
Not sure why, but the edit button doesn’t seem to work, and I think that is
preventing the keyboard from coming up (using virtual, not physical keyboard).

------
Simulacra
Spiffy! I like this !

------
denster
Chris,

"substantially improve the status quo of spreadsheets and, by extension,
programming."

I couldn't agree more!

We've created a new kind of spreadsheet for building software -- mintdata.com

Would be great to get your feedback -- any thoughts on what we could improve?

~~~
acjohnson55
Your product looks really interesting, but

\- $95/mo for a single user sets the impression that this is way out of reach
for anything I'd consider. Clearly, I'm not the customer. \- The fact that it
appears to be using traditional spreadsheet formulas gives me concerns about
how general it might be. Mesh is intriguing for its more flexible programming
and table model. \- There's a live chat module on your page that appears to
not be able to be dismissed, which blocks a lot of the page content.

