Live data from Hacker News

Luckysheet, an open-source spreadsheet

github.com

111–120 of 123 posts

Re: Luckysheet, an open-source spreadsheet

#111

Earlier quoted context omitted.

This way is very, very wrong in how it resets the scroll position: it essentially assumes synchronous scrolling, and falls apart completely if that isn’t the case—and it hasn’t been for some years. By “synchronous scrolling” I mean that reading scrollTop gets you the true current value, and that setting scrollTop sets the value immediately. These used to be the case, but scrolling is handled off-thread now, so the va…

On Chrome based browsers on Android at least, it works perfectly fine with momentum. It even does accumulating momentum, I can easily get it up to 6,000px/frame. Does this not work properly on iOS?

Although in theory the problem is universal, in practice the problem only appears when the user is using touchpad-based scrolling; touch-based scrolling is typically unaffected.

But it’s all happening because you’re interacting with the scroll position in a way that is incorrect within the models of the platform, reading and writing the scroll position as though it were atomic and sequentially consistent when it’s not, so it could break in more situations at any time. It’s thus much better to avoid the technique and work in a way that is supported.

(I’ve decided to change the terms I’m using from synchrony to atomicity. For users familiar with that domain: the problem is essentially equivalent to the scroll position being atomics that are changed from another thread, but you’re doing a load and a store, probably with relaxed sequential consistency, rather than using an atomic swap operation, or a mutex lock over a non-atomic. There is no recourse while using this technique because the scroll position is not exposed as an atomic or something lockable.)

Re: Luckysheet, an open-source spreadsheet

#112

Earlier quoted context omitted.

I think you’re misunderstanding. I’m saying that on platforms where the native scrollbar has arrows that you can click to scroll by a small amount in the nominated direction, you might prefer clicking on those arrows to do something different—to scroll one row or one column, whatever distance may be, rather than however many pixels the user agent decides. But you can’t do that on the web. element.scrollIntoView() is…

Ah gotcha, yes you are indeed correct. Something like custom amount of lines to scroll isn't possible afaik. I was just stating that with scrollIntoView and the element's scroll-snap-align and scroll-padding/scroll-margin CSS properties you could set the wanted offsets and alignments of the scrollbar and define what you were argueing about. But of course, you cannot influence the behaviour of the scrollbar arrows the…

Ah, CSS scroll snapping. Refer to my other comment in this thread about that, I strongly recommend against using it for layout matters like this, it messes with the scrolling behaviour (especially on devices with precise-scrolling touchpads and inertia) something fierce; it’s quite unavoidably every bit as bad as doing the scrolljacking in JS.

Re: Luckysheet, an open-source spreadsheet

#113
post #103
post #97

Earlier quoted context omitted.

Hi, what's K9? My Google searches in combination with "formula and/or language" gave me only dog related results.

I believe he is talking about: https://shakti.com/ which confusingly is a version(?) of K https://aplwiki.com/wiki/K hence K9.

Yes, that's it.

Re: Luckysheet, an open-source spreadsheet

#114
post #31

I wish people wouldn't copy Excel (or Google apps for that matter). Those spreadsheets are terrible . It still baffles me that none of them can do sideways scrolling correctly, they are all incredibly awkward to edit, the formulae are fundamental to how they work yet hidden and obscure, they do weird "magical" stuff to strings like turning them into numbers or dates when you didn't ask, etc. I'd really like to see pe…

When you say 'has the functionality of a spreadsheet but looks nothing like current spreadsheets', what do you mean? I am working on Mesh Spreadsheet. It gives you a spreadsheet UI that writes code as text. It will likely use k9 as the formula language once it matures, but: - you can try the JavaScript prototype at this link: http://mesh-spreadsheet.com - you can see a proof of concept video using k here: https://www…

That‘s pretty cool.

One reason I prefer Apple Numbers to Excel is that in Numbers you arrange tables on a canvas. The tables can refer to each other. I think it makes it easier to work with, for example, an input table and an output table because they are separate entities and not just different ranges on the same grid. It’s similar to how some websites enable you to configure a dashboard view of multiple tables and charts.

Your presentation reminded me of that, specifically the view of how you implemented the tool in itself. But you’re using one large table rather than a collection of tables on a canvas.

I’m wondering if the Numbers approach might work better. In particular it might be more natural for dynamic arrays because they would not “overlay” a range of cells. They would be their own dynamically resizing table on the canvas. This might lead to something like Spreadsheet 2000: https://en.m.wikipedia.org/wiki/Spreadsheet_2000

Re: Luckysheet, an open-source spreadsheet

#115
post #31

I wish people wouldn't copy Excel (or Google apps for that matter). Those spreadsheets are terrible . It still baffles me that none of them can do sideways scrolling correctly, they are all incredibly awkward to edit, the formulae are fundamental to how they work yet hidden and obscure, they do weird "magical" stuff to strings like turning them into numbers or dates when you didn't ask, etc. I'd really like to see pe…

I rather like the Airtable concept - it feels like a spreadsheet, but the columns are typed, and it can do joins. It's a shame that it's so limited (50,000 rows in the most expensive plan).

https://jexcel.net/v5

Re: Luckysheet, an open-source spreadsheet

#116
post #3

Language files blank comment code ------------------------------------------------------------------------------- JavaScript 142 54627 91825 243672 CSS 9 790 238 5908 HTML 2 10 1 43 ------------------------------------------------------------------------------- SUM: 153 55427 92064 249623 ------------------------------------------------------------------------------- without the demoData dir. that's nuts

Looks like there's a lot of vendored code in src/expendPlugins/chart—maybe that's the source of some of that?

Chart is MIT license

Re: Luckysheet, an open-source spreadsheet

#117

Earlier quoted context omitted.

When you say 'has the functionality of a spreadsheet but looks nothing like current spreadsheets', what do you mean? I am working on Mesh Spreadsheet. It gives you a spreadsheet UI that writes code as text. It will likely use k9 as the formula language once it matures, but: - you can try the JavaScript prototype at this link: http://mesh-spreadsheet.com - you can see a proof of concept video using k here: https://www…

That‘s pretty cool. One reason I prefer Apple Numbers to Excel is that in Numbers you arrange tables on a canvas. The tables can refer to each other. I think it makes it easier to work with, for example, an input table and an output table because they are separate entities and not just different ranges on the same grid. It’s similar to how some websites enable you to configure a dashboard view of multiple tables and…

Thanks! I have been considering this!

It might impact the 'flow' of modelling eg using automatic cell names like 'A1'. And it might complicate storing the sheet as text (might need to store more complex layout info than 'table is at coordinates x,y').

But it could also make layout easier, eg tables underneath each other could have different column widths. Could use CSS flow layout.

I also hadn't heard of Spreadsheet 2000 - great reference, thanks.

BTW - I think of the Mesh spreadsheet as a canvas, just a 'discrete' one as opposed to continuous. In theory, if the grain is fine enough (eg 1 character width of a monospace font), then you might be able to get the best of both discrete and continuous approaches.

Re: Luckysheet, an open-source spreadsheet

#118

Earlier quoted context omitted.

That‘s pretty cool. One reason I prefer Apple Numbers to Excel is that in Numbers you arrange tables on a canvas. The tables can refer to each other. I think it makes it easier to work with, for example, an input table and an output table because they are separate entities and not just different ranges on the same grid. It’s similar to how some websites enable you to configure a dashboard view of multiple tables and…

Thanks! I have been considering this! It might impact the 'flow' of modelling eg using automatic cell names like 'A1'. And it might complicate storing the sheet as text (might need to store more complex layout info than 'table is at coordinates x,y'). But it could also make layout easier, eg tables underneath each other could have different column widths. Could use CSS flow layout. I also hadn't heard of Spreadsheet…

Speaking of automatic cell names ‘A1’, the other thing I prefer about Numbers is that you can name columns and use the name in formulas. For example, you might have a table “Sales” with columns “Item”, “Number Sold”, “Item Price”, and “Total”. The formula for all cells in column “Total” is

=‘Item Price’ * ‘Num Sold’

Instead of =B1C1, =B2C2, etc. You’re doing something similar with the name cell, but with separate tables you can designate column headers and row headers, and use them to reference cells. For example, in another table you might say: =SUM(‘Sales :: Total’) to sum up column “Total” in table “Sales”.

(I might be getting the syntax wrong here, you don’t type this in, you “option-click” on the cell you want to reference and it inserts the reference.)

This is optional, you can still do A1, B4, etc and sometimes that’s what you get when you use the same name for two columns in order to disambiguate. But in general it makes it easier validate your spreadsheet, I think.

I believe the approach to naming goes back to Lotus Improv: https://en.m.wikipedia.org/wiki/Lotus_Improv

I think Quantrix Modeler is also based on the ideas of Improv.

Come to think of it, there was Javelin in the 1980, that you might find interesting. It’s not a spreadsheet but it was used for financial modeling and time series: https://en.m.wikipedia.org/wiki/Javelin_Software

But those are quite far departures and might not be where you want to go. I just wanted to point them out in case you hadn’t heard of them. (I’ve only heard of them but I have never used them, so I cannot say how good or bad they worked in daily life.)

Re: Luckysheet, an open-source spreadsheet

#119

Earlier quoted context omitted.

Thanks! I have been considering this! It might impact the 'flow' of modelling eg using automatic cell names like 'A1'. And it might complicate storing the sheet as text (might need to store more complex layout info than 'table is at coordinates x,y'). But it could also make layout easier, eg tables underneath each other could have different column widths. Could use CSS flow layout. I also hadn't heard of Spreadsheet…

Speaking of automatic cell names ‘A1’, the other thing I prefer about Numbers is that you can name columns and use the name in formulas. For example, you might have a table “Sales” with columns “Item”, “Number Sold”, “Item Price”, and “Total”. The formula for all cells in column “Total” is =‘Item Price’ * ‘Num Sold’ Instead of =B1 C1, =B2 C2, etc. You’re doing something similar with the name cell, but with separate t…

> you can name columns and use the name in formulas

You can do that in Excel too: whether it's the whole column of a sheet, or a column of a table - syntax for latter is `someTable[someColumnName]`. Mesh will have the latter, albeit with different syntax.

Thank you for the links! I will have a look. There's a deep history.

Re: Luckysheet, an open-source spreadsheet

#120

Earlier quoted context omitted.

Speaking of automatic cell names ‘A1’, the other thing I prefer about Numbers is that you can name columns and use the name in formulas. For example, you might have a table “Sales” with columns “Item”, “Number Sold”, “Item Price”, and “Total”. The formula for all cells in column “Total” is =‘Item Price’ * ‘Num Sold’ Instead of =B1 C1, =B2 C2, etc. You’re doing something similar with the name cell, but with separate t…

> you can name columns and use the name in formulas You can do that in Excel too: whether it's the whole column of a sheet, or a column of a table - syntax for latter is `someTable[someColumnName]`. Mesh will have the latter, albeit with different syntax. Thank you for the links! I will have a look. There's a deep history.

I didn’t know Excel supported that too. Nice. I should have guessed, it does a lot of things.
Post reply on HN