News for hackers. Stuff that matters.
Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @07:29AM (#21114010)
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...

Re:Mesh Spreadsheet by galfarragem on Monday September 30, 2019 @09:08AM (#21114924)
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.

Re:Mesh Spreadsheet by microcolonel on Monday September 30, 2019 @10:46AM (#21115896)
> 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.

Re:Mesh Spreadsheet by infinite8s on Monday September 30, 2019 @11:39AM (#21116517)
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.
Re:Mesh Spreadsheet by microcolonel on Monday September 30, 2019 @11:56AM (#21116729)
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.

Re:Mesh Spreadsheet by vchak1 on Monday September 30, 2019 @01:19PM (#21117565)
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.
Re:Mesh Spreadsheet by microcolonel on Monday September 30, 2019 @03:30PM (#21118861)
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.
Re:Mesh Spreadsheet by infinite8s on Monday September 30, 2019 @01:58PM (#21117981)
Sounds interesting, have you published any more details anywhere?
Re:Mesh Spreadsheet by microcolonel on Monday September 30, 2019 @03:33PM (#21118885)
Not yet, gotta do our jobs first, then we can have the candy. :- )

I would like to do a write-up about it at some point though, if for no other reason but to show the Open Document or LibreOffice people what could be improved about the formats.

Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @04:28PM (#21119361)
Agree on the speed.

Not every programming language is suitable but ClojureScript would probably work (no plans to support it right now though, gotta finish this one first!).

Considering hiding the boilerplate in the text pane.

Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @09:34AM (#21115155)
Thank you!
Re:Mesh Spreadsheet by codetrotter on Monday September 30, 2019 @07:47AM (#21114187)
This is really cool! Do you develop all of Mesh in itself exclusively, or do you still use a regular text editor as well? Either way I can certainly see this as being useful. I starred the project on GitHub and look forward to see what more is to come.

Aside from the SQL support you mentioned wanting to add, and the various todo-items, are you planning on going beyond the spreadsheet concept? For example with some type of node-based interface, like Unreal Engine 4 Blueprints [1], or like the materials editor in Blender [2]? I realize that might be a vague question, heh.

[1]: https://docs.unrealengine.com/en-US/Engine/Blueprints/index....

[2]: https://docs.blender.org/manual/en/latest/editors/shader_edi...

Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @07:51AM (#21114230)
Thanks! I honestly haven't developed much of Mesh in Mesh, because it's still early in the 'bootstrap cycle' and due to the parse delay issue mentioned above. It's also not nearly as robust to errors as it should be - text editors and traditional spreadsheets allow the user to 'sketch' ideas as discussed by Aaron Hsu [1].

I'd like to stick to a grid for writing 'functional core' logic, but there's potential to use a node interface at the surface of the 'imperative shell', to link up sheets or data feeds (push/pull). I was really impressed by Nodes [2] and I need to spend some time digging into Node-RED [3].

[1] https://www.sacrideo.us/un-structured-programming/

[2] http://nodes.io/story/

[3] https://nodered.org/

Re:Mesh Spreadsheet by Paperweight on Monday September 30, 2019 @01:12PM (#21117483)
I wonder if a spreadsheet and its editor could go in a self-contained HTML file. You'd open it in a browser, it modifies its own source code, and you just re-export or "Save Page As" when you're done?

Furthermore, maybe the data could be in CSV at the top of the file, in an HTML comment, and the editor could be in HTML at the bottom of the file, in a CSV comment, so the file could be opened in either a browser or Excel? Haha

Re:Mesh Spreadsheet by chrispsn on Tuesday October 01, 2019 @09:39AM (#21125183)
Re:Mesh Spreadsheet by Paperweight on Tuesday October 01, 2019 @01:52PM (#21128456)
Programatically invoking the "Save As" dialog seems troublesome. Maybe there could be a signed WebExtension blob in the file, too - or it should download the latest updated library script every time the file is opened (although then there are security & CORS issues).
Re:Mesh Spreadsheet by dustingetz on Monday September 30, 2019 @08:10AM (#21114394)
Chris do you want to chat? I'm a founder in this space. Can you add contact info here or on github, or open twitter DMs or something:) My contact in profile.
Re:Mesh Spreadsheet by WorldMaker on Monday September 30, 2019 @04:31PM (#21119396)
> I'd also like a proper SQL and first-class table support, but we work with what is supported by Internet Explorer 11.

If you were thinking about WebSQL, then sticking to IE11 has skipped you over an obstacle course in web standards, because WebSQL was abandoned by the browsers (for good reasons, led by Mozilla and Microsoft trying not to let SQLite bugs define the web platform for decades) and won't be supported again soon, in lieu of the much simpler key-value store called IndexedDB.

> JavaScript's lack of a built-in parser is a real bummer

eval() wasn't sufficient for your needs?

Re:Mesh Spreadsheet by _bxg1 on Monday September 30, 2019 @04:37PM (#21119443)
eval() parses and executes. I assume the OP's use-case involved working with the abstract syntax tree and not simply running a string as code.
Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @05:05PM (#21119653)
Yes, correct.
Re:Mesh Spreadsheet by macca321 on Tuesday October 01, 2019 @12:11PM (#21127075)
I'd be really interested in the ability to put in probability ranges for cell values and run monte-carlo simulations to get the final values (Excel+montecarlo has been a pet idea of mine for years but I haven't got the time to do it)
Re:Mesh Spreadsheet by chrispsn on Tuesday October 01, 2019 @03:13PM (#21129399)
You might like Guesstimate: https://www.getguesstimate.com/
Re:Mesh Spreadsheet by macca321 on Wednesday October 02, 2019 @04:19AM (#21134330)
Thanks, that looks great!
Re:Mesh Spreadsheet by tenaciousDaniel on Monday September 30, 2019 @09:50AM (#21115296)
This is awesome! I happen to be working on something similar, although it's oriented towards UI design.
Re:Mesh Spreadsheet by eb0la on Monday September 30, 2019 @06:52AM (#21113669)
Reminds me Tiddlywiki (https://tiddlywiki.com/); but with spreadsheets instead of wikis...

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

Re:Mesh Spreadsheet by ajnin on Monday September 30, 2019 @10:46AM (#21115901)
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.

Re:Mesh Spreadsheet by chrispsn on Tuesday October 01, 2019 @08:56AM (#21124793)
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.

Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @09:45AM (#21115249)
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

Re:Mesh Spreadsheet by erikcw on Monday September 30, 2019 @12:35PM (#21117140)
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...

Re:Mesh Spreadsheet by tryitnow on Monday September 30, 2019 @11:10AM (#21116156)
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.

Re:Mesh Spreadsheet by pqs on Monday September 30, 2019 @11:17AM (#21116229)
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.
Re:Mesh Spreadsheet by donarb on Monday September 30, 2019 @11:35AM (#21116449)
There are a couple of a Python based spreadsheets, one called pyspread and another Grid Studio.

https://manns.github.io/pyspread/index.html

https://hackernoon.com/introducing-grid-studio-a-spreadsheet...

Re:Mesh Spreadsheet by fulvous on Monday September 30, 2019 @02:25PM (#21118226)
You can write macros in Python for Libreoffice.

https://help.libreoffice.org/6.3/en-US/text/sbasic/python/ma...

Re:Mesh Spreadsheet by j88439h84 on Monday September 30, 2019 @01:26PM (#21117660)
Re:Mesh Spreadsheet by mlevental on Monday September 30, 2019 @08:21PM (#21120892)
> I always wanted a Python based spreadhshet.

isn't that just pandas?

Re:Mesh Spreadsheet by chrisweekly on Monday September 30, 2019 @09:31AM (#21115131)
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...

Re:Mesh Spreadsheet by SamBam on Monday September 30, 2019 @11:26AM (#21116346)
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.

Re:Mesh Spreadsheet by Someone on Monday September 30, 2019 @12:07PM (#21116857)
1.4MB is about 50 VisiCalcs (http://www.bricklin.com/history/vcexecutable.htm) but I wouldn’t call it “quite large” for modern software.
Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @03:30PM (#21118854)
Yeah, I’m not happy with the download size either. It’s mostly the third-party JS parser.
Re:Mesh Spreadsheet by MuffinFlavored on Monday September 30, 2019 @10:48AM (#21115928)
Does having JavaScript in the cell formulas allow you to do anything more than you could already do with Excel?
Re:Mesh Spreadsheet by chrispsn on Monday September 30, 2019 @03:34PM (#21118902)
Yes! Regex, tables that can expand/contract (not just arrays) are two big ones.
Re:Mesh Spreadsheet by miki123211 on Monday September 30, 2019 @11:57AM (#21116749)
Could be cool, but this has zero screen reader accessibility. I hope this gets fixed.
Re:Mesh Spreadsheet by chrispsn on Tuesday October 01, 2019 @09:23AM (#21125024)
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

Re:Mesh Spreadsheet by theo31 on Monday September 30, 2019 @12:41PM (#21117198)
If you like this concept, you might like https://clay.run which is spreadsheet + functions hosted in the cloud
Re:Mesh Spreadsheet by kerneis on Tuesday October 01, 2019 @01:50AM (#21122399)
This reminded me of Histogram: http://tomasp.net/histogram/
Re:Mesh Spreadsheet by MR4D on Monday September 30, 2019 @08:24PM (#21120906)
Any idea how to run this on an iPad?
Re:Mesh Spreadsheet by chrispsn on Tuesday October 01, 2019 @09:24AM (#21125036)
It should work on iPad, although it’s designed as a keyboard-preferred experience. What were you trying to do?
Re:Mesh Spreadsheet by MR4D on Tuesday October 01, 2019 @11:31PM (#21133231)
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).
Re:Mesh Spreadsheet by Simulacra on Sunday October 06, 2019 @03:52PM (#21174635)
Spiffy! I like this !
Re:Mesh Spreadsheet by denster on Monday September 30, 2019 @01:45PM (#21117843)
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?

Re:Mesh Spreadsheet by acjohnson55 on Monday September 30, 2019 @11:46PM (#21121858)
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.