
Example of a Shakti-powered spreadsheet application [video] - chrispsn
https://www.youtube.com/watch?v=CEG9pFNYBCI
======
chrispsn
Hi everyone! The Shakti k version of Mesh is under development, but for now
you can try the JavaScript prototype: [http://mesh-
spreadsheet.com/](http://mesh-spreadsheet.com/)

Slides (view in Powerpoint slideshow mode to see the animated GIFs):
[https://github.com/chrispsn/presos/raw/master/2020-02-26%20M...](https://github.com/chrispsn/presos/raw/master/2020-02-26%20Mesh%20Shakti%20intro.pptx)

And past demo videos of the JS prototype:

\- Basics:
[https://www.youtube.com/watch?v=_U6gE3cNgbI](https://www.youtube.com/watch?v=_U6gE3cNgbI)

\- Dynamic tables:
[https://www.youtube.com/watch?v=x32tBLGrLAQ](https://www.youtube.com/watch?v=x32tBLGrLAQ)

------
madhadron
I'm reminded of Siag ([http://siag.nu/siag/](http://siag.nu/siag/), Scheme In
A Grid).

~~~
ken
Reminds me more of
[https://en.wikipedia.org/wiki/Subtext_(programming_language)](https://en.wikipedia.org/wiki/Subtext_\(programming_language\))
but in a loosely-typed sort of way.

------
dkersten
What is Shakti? I’ve spent 20 minutes browsing around and nowhere does it tell
me, so I have no idea what the context of this even is.

EDIT: Ok, I found it: [https://shakti.com/](https://shakti.com/) although I’m
still unsure what it does. I guess some kind of stream processor database.

~~~
anentropic
Millions! Billions! Trillions!

Sounds totally Web Scale

~~~
dkersten
Yeah, I didn’t find the website particularly informative, just a bunch of
marketing hype. I’m still a bit confused by what it does, how it works, how it
can achieve those numbers (and benchmarks to prove it can), what the failover
story is, etc etc

~~~
chrispsn
The Shakti co-founder's previous tech was a very fast time series language+DB
- this is his next iteration. [https://tech.marksblogg.com/billion-nyc-taxi-
kdb.html](https://tech.marksblogg.com/billion-nyc-taxi-kdb.html)

------
maest
In a past life I've made extensive use of the q/kdb excel plugin to do my
financial analysis (backtesting, model fitting etc).

The basic setup was:

1\. set up a q server and load lots of price data and signal tables in memory
2\. open a connection to the server from your spreadsheet 3\. write q queries
in excel directly.

Because q is so compact you could essentially write a (quite long) one line
aproximate backtester, as long as your q server stored daily prices, volumes,
advs etc in a sensible way.

The spreadsheet form factor was pretty good - it was nice to be able to plot
arbitrary series and generally made it quite fast to work with data.

It was by no means perfect, but I found it infinitely better than setups like
jupyter notebooks.

------
fastball
I don't get it. Maybe he lost me at the beginning when he showed an example of
a table that was apparently supposed to be easy to grok but I just found
puzzling.

~~~
yiyus
The first example is a new version of mesh based on the k programming language
(afaik, still under development). If you are not familiar with k or other
array languages, you may find much clearer the examples in which he shows the
previous version of mesh, based on JS. See also: [http://mesh-
spreadsheet.com/](http://mesh-spreadsheet.com/)

~~~
raidicy
The interesting thing is, you can run the js you build in the spreadsheet,
independent of the spreadsheet environment.

Unfortunately the project looks pretty dead. And further one of the bullet
points is "is lightweight: ~2000 lines of source code (excluding libraries)"
but looking into app.js it's something like 23k loc. It uses react but it
looks to be pre-JSX. And because it's all in one giant file it feels too
overwhelming for me to want to learn/extend it. He says it's compatible with
IE 11. And maybe that's why it's structured that way, but I don't know.
Despite it all the idea is really cool.

~~~
chrispsn
Not dead, just evolving! I hope to bring some of the insights from doing the k
version into the free JS version. But even then, the formula language is
unlikely to be raw JS - maybe jq, or a k subset. JS, as a moving target, is
just too hard to parse in a small package.

Mesh's backend sits in one giant file because that's how we can write it in a
Mesh sheet. But unfortunately the JS parsing library is huge and forms the
bulk of the code. Happily, the k version is currently ~100 lines excluding
tests.

If JSX were used, would the code need to be compiled? Mesh used to have a
compilation step but it just added complexity (config files, build process,
increased download size). Keep it simple! React.createElement is fine.

~~~
raidicy
Thanks for the reply. I hope my post didn't sound snarky. I have very limited
time and was just disappointed at the size of the parsing code. Ultimately, I
really think the idea is great!

I've never seen k, nor any array langs before but would definitely checkout
the K mesh version.

No idea about the JSX though.

------
xixixao
I'm honestly unable to make sense of this given the poor "camera pointed at
projector screen" quality. Website looks intriguing, but I can't figure out
how to do anything in the browser demo besides simple numeric calculations
inside single cells.

~~~
xixixao
These videos are more informative:
[https://www.youtube.com/watch?v=_U6gE3cNgbI&list=PLf1PDMa3qV...](https://www.youtube.com/watch?v=_U6gE3cNgbI&list=PLf1PDMa3qVP27-oVMEdCX6FR1Ok972cpI&index=2)

~~~
chrispsn
Thanks! And hopefully the README helps too:

[https://github.com/chrispsn/mesh/blob/master/README.md](https://github.com/chrispsn/mesh/blob/master/README.md)

------
nymanjon
One thing that I like about Google Sheets is the ability to query the sheets
with SQL. Only complaint is that the queries aren't super powerful and I can't
use names. This would be super helpful. A powerful query language in a more
powerful spreadsheet.

------
gitgud
Cool project, but the title is a bit confusing:

> _" A code editor that feels like a spreadsheet"_

It literally is a spreadsheet though right? Is there something that separates
this from an google sheet?

Also, the source repository on [1] Github is a bit more informative (for this
audience).

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

~~~
chrispsn
Users have strong expectations about what features a "spreadsheet" application
should have, so I say it merely "feels like" a spreadsheet to help manage
those expectations.

For example, in existing spreadsheet programs, each cell gets an A1-style
location reference (even in an Excel table or a dynamic array).

That's not the case in Mesh, but it does something similar: a cell's default
name is where it was entered in the grid UI, and (soon!) we update that name
when the cell gets moved around.

~~~
gitgud
> That's not the case in Mesh, but it does something similar: a cell's default
> name is where it was entered in the grid UI, and (soon!) we update that name
> when the cell gets moved around.

But that's still possible in Excel too right? With "named ranges".

Anyway, I see you're the creator and want to thank you for sharing the project
and releasing the source-code. I feel like it's pushing the boundaries, but it
can't really be explained yet. Look forward to seeing future development in
this!

~~~
chrispsn
Kind of - in Excel everything just _has_ a location reference, even if you
name it. So that means you can get collision errors if a dynamic array expands
into another cell.

------
raghava
Came here excited to see an operational spreadsheet program on Shakti (
[https://shakti.org.in/](https://shakti.org.in/) ) :)

More excited to discover ShaktiDB!

Curious to know how this relates to kona! [
[https://github.com/kevinlawler/kona](https://github.com/kevinlawler/kona) ]

~~~
dintech
It's an evolution of the same language: K3 = K (Kx) / Kona (Kevin Lawler open
source), K4 = Q (in the current Kx KDB), K7 = Shakti (Arthur Whitney's most
recent project),

~~~
SifJar
Actually, shakti is now k9 (it was originally k7 but k7 is now abandoned)

~~~
smabie
Any info on K5-K8? All I want is lexical scoping, will I get it in k9?

------
maest
Is Shakti the reason we've had such a large influx of APL/kdb/q posts on HN
recently?

------
CodeEpiphany
Just reading this headline triggered me.

