HNHacker News
TopNewBestAskShowJobs

garritfra

1,230 karma · joined December 29, 2019

This is an OpenPGP proof that connects my OpenPGP key to this Hackernews account. For details check out https://keyoxide.org/guides/openpgp-proofs

[Verifying my OpenPGP key: openpgp4fpr:2218337e54aa1dbe207b404dbb54af7eb0939f3d]

submissionscomments
garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
This is valuable feedback. I opened two issues to track this:

Use numerically stable algorithms for SUM and AVERAGE: https://github.com/garritfra/cell/issues/43

Keystrokes doubled in Windows Terminal: https://github.com/garritfra/cell/issues/44

Thanks!

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
I fully agree that this should be on the roadmap: https://github.com/garritfra/cell/issues/21

Thanks for bringing this up!

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Thank you! I fully agree with your request. Added it to the roadmap: https://github.com/garritfra/cell/issues/20
garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
I see the value, but I'm not sure if I'd be confident enough to add proper scripting yet, as this requires a lot of attention towards a stable API.

Nonetheless, I think it's an intersting discussion to put on the roadmap: https://github.com/garritfra/cell/issues/23 (RFC sketched out by AI)

Thanks!

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Thank you!

XLSX and ODS support won't be trivial, but I see the value of having it. I added it to the roadmap: https://github.com/garritfra/cell/issues/22

Regarding your question: This idea has been sitting on my todo list [1] for over 3 years now. I don't usually work with large data files in my dayjob, but occasionally working with the odd CSV on macOS frustrated me enough to put it on the list. And now that spec-driven development has matured enough to be actually useful, there's no real excuse not to build this.

I genuinely see myself caring for this long-term. I'm comfortable with the scope, and there seems to be some real interest from the community.

[1]: https://garrit.xyz/todo

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Update: This just landed in v0.1.7. Thanks again for bringing this up!
garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Author here - thanks for bringing this up!

Cell is very much tailored towards what you're looking for. My vision was "Excel but it's (Neo)Vim". Editing files should feel just as smooth as looking at the data. I believe Xan and Cell could actually pipe into each other quite nicely for rendering more complex data.

I'd really appreciate your time to report the bugs you encountered. Looking forward to them.

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Thanks for trying it, and the spreadsheet repo is great prior art — I'll dig through it.

Drag-fill. Not yet, but the parts are mostly there. The formula layer already carries abs_col/abs_row through tokenization → AST → eval, so $A2 + B$1 parses correctly today; what's missing is the editing op that copies a formula across a range and shifts only the relative components. Opened #17 for it. The tricky part isn't the rewrite, it's the keybinding — Vim doesn't have an obvious idiom for "drag," so I'm leaning toward a visual-selection + fill-from-anchor key (Y is a candidate) or a :fill command. Open to suggestions if you have a feel for what works in a modal editor. It also needs to land on top of the bulk-undo work in #8/#9 so a fill is one undo step instead of N.

bar() / inline visualizations. Love it, opened #18. The interesting design call is whether BAR returns a CellValue::Visual { … } that the renderer dispatches on (correct under column resizes, but ripples into CSV export, copy/paste, and how SUM treats a visual cell), or whether it just returns a string of block-drawing chars at eval time (trivial to add, but width gets baked in at compute time which is wrong). The first is the right answer; the second is a tempting MVP. SPARKLINE(range) is the natural follow-up once the abstraction settles.

#17 — https://github.com/garritfra/cell/issues/17 #18 — https://github.com/garritfra/cell/issues/18

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Cell is heavily inspired by this project. FWIW, I added a comparison chart to the README: https://github.com/garritfra/cell#comparison-with-sc-im
garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Thanks!

Honestly, the current implementations are pretty naive — they pass the tests and feel snappy on the small sheets I work with, but they'd buckle pretty quickly under real load. Most of what you're asking about is already on the tracker; I opened a batch of issues citing your comment as the prompt.

Recalculation. Right now it's a full recalc on every edit: recalculate collects all formula cells, computes in-degrees across the whole formula set, topo-sorts, and evaluates top to bottom. The dirty flag gets propagated by mark_dirty but isn't actually used to prune work. It's also re-parsing every formula from its raw string on every pass. Two issues cover this: #8 introduces a batch boundary so paste/fill/CSV import trigger one recalc instead of N, and #7 adds criterion benches so we can actually tell whether the parser, the BFS, or the topo sort is the hotspot before optimizing. AST caching on Cell is the obvious next step once #7 confirms parsing dominates.

https://github.com/garritfra/cell/issues/8 https://github.com/garritfra/cell/issues/7

Dependency tracking. The bigger smell is in extract_deps — a range like SUM(A1:A1000) literally enumerates 1000 cell positions into the dep graph, with a HashSet per cell on each side. Fine at hundreds of cells, a disaster at hundreds of thousands. Range expansion is one of the bench cases in #7; the proper fix (interval-keyed deps so ranges stay first-class instead of fanning out) doesn't have its own issue yet — I should open one, since #7 only measures the problem.

Undo/redo. This is the worst offender right now. UndoEntry only had a single-cell variant until very recently; #12 added MultiCellEdit, but #13 tracks two destructive paths I missed — visual-mode d and p/P paste — that still don't push undo entries at all. #9 is the broader coalescing story (one dd = one undo, CSV import = one undo, etc.), tied to the batch mechanism from #8 so a single transaction produces a single undo entry. sort_by_column is also non-undoable today and belongs in that bucket.

https://github.com/garritfra/cell/issues/13 https://github.com/garritfra/cell/issues/9

Larger CSVs. Storage is HashMap<CellPos, Cell> — fine sparse but with overhead per cell; for very wide imports a column-oriented or arena layout would pay off. I haven't profiled it though, so this is speculative; the dependency-graph blowup will hurt before raw storage does. #7 includes a 100k-row CSV load case to put numbers on it.

And #10 is the meta-issue to lift all of this out of source comments and into actual architecture docs, which I probably should have done before posting.

https://github.com/garritfra/cell/issues/10

So: nothing here scales today, but the architecture splits cleanly enough that none of it needs a rewrite — AST caching, dirty-set recalc, range-aware deps, and grouped undo are the four threads, and most have issues attached.

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Glad to hear that. Thanks for trying it out! If you have any feedback, I'd be more than happy to hear it.
garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Huh, I haven't thought about that yet, but I like it. I opened an issue to track this: https://github.com/garritfra/cell/issues/11

I'd have to look into the tools you mentioned to really understand all the details. Thanks!

garritfra··on Show HN: A terminal spreadsheet editor with Vim keybindings
Love this idea! I created a GH issue for this: https://github.com/garritfra/cell/issues/6

I'll try to add this ASAP. :)

garritfra··on Ask HN: What are your favourite websites that display a lot of data / tables?
Not a website per se, but https://datasette.io is very rich in features. Hopefully not off-topic, but related.
garritfra··on Beware of Base64 Encoded Strings
I added this TL;DR to the post. Thanks for summing it up!
garritfra··on Beware of Base64 Encoded Strings
This is exactly what the article suggests.
garritfra··on CSS Only dark mode without JS
There's also:

`color-scheme: light dark`

which automatically switches the color scheme of default html elements depending on the preferred color scheme. No theming required!

https://garrit.xyz/posts/2023-04-12-instant-dark-theme

garritfra··on Curl 8.0.1
LMAO
garritfra··on maps.google.com now redirects to google.com/maps
> Oh boy.

Do you mind pointing out where you think this applies?

garritfra··on maps.google.com now redirects to google.com/maps
A/B testing?
garritfra··on QBE 1.0
There's a "Users" page on the homepage, that lists projects using QBE:

https://c9x.me/compile/users.html

garritfra··on A List of Bugs in macOS
> Gui can't remember screen to desktop placement across plug unplug replug of screen.

This! Adding it to the list.

garritfra··on Ask HN: Migadu? Postale? Mxroute? Or any other mail services using this model?
+1 for purelymail. Pricing is just unbeatable.
garritfra··on Show HN: I built a platform for projects to find maintainers
Thanks for the hint! This can probably be integrated quite well into the site.
garritfra··on GNUnet 0.16
> This is a new major release. It breaks protocol compatibility with the 0.15.x versions.

No, it's a minor release. It breaks compatibility, so it should be v1.0.0

garritfra··on Btrfs on Alpine Linux
It's quite the opposite in fact. BTRFS was pulled INTO the kernel recently. It's seeing massive development and is production-ready.

> Why not ZFS?

The main reason for me is its flexibility. Just an example: Expanding BTRFS is just a matter of shoving in arbitrary disks and rebalancing the existing array. ZFS requires you to plug in drives of the same size to properly scale.

I wrote about this some time ago, in case you're interested: https://garrit.xyz/posts/2021-02-07-storage-setup

garritfra··on Gravatar leaks data on millions of users
But are you equally not concerned about your email address?
garritfra··on Gravatar leaks data on millions of users
No, since I only know your username after you reply to this thread.
garritfra··on I'll redesign any 3 websites in less than 3 hours: (Challenge?) HN
Any updates?
garritfra··on Show HN: The simplest React state manager now at stable release
IMHO, since react hooks hit the market, state management libraries became kind of obsolete.
Page 1 of 2Next →