frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Adding Window Functions to a Spreadsheet

https://www.getgrist.com/blog/running-totals-you-dont-have-to-chase/
10•reedciccio•46m ago

Comments

shevy-java•23m ago
The syntax is so archaic ... it really is anything but a thing of beauty.

    prev_balance = PREVIOUS(rec, order_by="Date").Running_Balance or 0
    prev_balance + $Amount
It's such a strange mix-up of stuff. PREVIOUS() is a macro or looks like one, right? But it is a function call assumingly. But then what's with .Running_Balance? Guess that also ties into a function. But why use different syntax for essentially the same thing? It seems rather weird to write code like that. What would the python variant be like? Or a DSL?

The syntax strangeness continues:

    rates = Rates.lookupRecords(Person=$Person, order_by="Rate_Start")
    rates.find.le($Date).Hourly_Rate
Does that really convey most easily what is wanted? It seems needlessly verbose. Why would it require both $Person and $Date? Should that not be easier to figure out in its own right? Is that efficient?

People need to remember that mentally, unless they use AI.

paulfitz•17m ago
It is straight Python. Yes the spreadsheet habit of making functions SHOUT does look weird mixed in with Python syntax.

PREVIOUS returns a record, then .Running_Balance pulls out one field of it.

whizzter•13m ago
What parts are Python and how does one know where the classic Spreadsheet functionality ends and Python starts ?
chii•9m ago
That's what makes it clunky. Returning a record is OK, but then a record is basically what spreadsheets are (ala, a table). Except records are named columns in a spreadsheet, and accessing it using a dot syntax looks out of place imho.

I reckon it makes more sense to return a table, and then have an index lookup in that table: e.g., index(PREVIOUS(blah_blah), column). Then you can also use an indirection to choose which column from another cell if desired.

This is how google finance in sheets returns some data (like exchange rates, iirc).

whizzter•15m ago
I think it's an push in Spreadsheets to become more "DB-alike" for less arbitrary results (like in the problem example the article starts out with) but kind-of misguided since it's complicated to do "easy things".

The root issue is that there's almost 50 years of spreadsheet syntax to consider and not colliding with.

Shlemiel the Painter Is Back: How Zig's Libc Rewrite Made SQLite 12,000× Slower

https://dennisforbes.ca/blog/microblog/2026/10/the_accidental_12000x_sqlite_slowdown/
1•theanonymousone•1m ago•0 comments

Show HN: 25posts – Guess the impressions of real LinkedIn posts

https://25posts.com/play
1•bilyas509•1m ago•0 comments

MSecure password manager hack prompts password reset warnings

https://www.bleepingcomputer.com/news/security/msecure-password-manager-hack-prompts-password-res...
1•sashk•2m ago•0 comments

Show HN: Meshword - crosswords meet nonograms

https://meshword.org/
1•oliwary•2m ago•0 comments

And now, all of the conditions are set for universal basic income

https://twitter.com/Joshbocanegra/status/2117992864638750744
2•jbai•2m ago•0 comments

LZ4 v1.11.0: multithreading in the library, speed gains for small data

https://github.com/lz4/lz4/releases/tag/v1.11.0
1•mfiguiere•3m ago•0 comments

Westchester voting snafu stemmed from a change in one Ardsley contest

https://www.lohud.com/story/news/politics/elections/2026/11/03/westchester-rockland-putnam-electi...
1•quuxplusone•3m ago•1 comments

Deterministic security and privacy checks for code from AI assistants

https://github.com/ankush1982/ai-secure-by-design
1•ankush82•3m ago•0 comments

Glyph Keyboard (Typewriter Type)

https://boilingsteam.com/epomaker-glyph-keyboard-review/
1•ekianjo•5m ago•0 comments

Uber only fulfilled 4 rides from AI agents last quarter

https://www.theverge.com/transportation/1026306/ber-ai-agents-q3-earnings-disintermediation
1•mattas•6m ago•0 comments

'A historic beatdown': Americans take back their country in rebuke to Trump

https://www.theguardian.com/commentisfree/2026/nov/04/a-historic-beatdown
1•hkhn•6m ago•0 comments

Buttons are back and storage is king when it comes to car interiors

https://arstechnica.com/cars/2026/11/yes-to-storage-no-to-piano-black-how-car-interior-design-is-...
1•Brajeshwar•6m ago•0 comments

As Mangrove Forests Expand in China, Bird Species Multiply

https://e360.yale.edu/digest/china-mangrove-restoration-bird-species
1•Brajeshwar•7m ago•0 comments

Show HN: Skykeep – Your iPhone's iCloud as desktop apps for Windows and Linux

https://github.com/YashwanthKamireddi/Skykeep
1•yashkamireddi•7m ago•0 comments

Ask HN: How are you making sites/APIs agent-ready?

1•dieselgate•7m ago•0 comments

The Forgotten Formula For Lovable Cities

https://worksinprogress.co/issue/the-forgotten-formula-for-lovable-cities/
1•karakoram•9m ago•0 comments

Fixes available in -proposed pocket for CVE-2026-98432

https://ubuntu.com/blog/fixes-available-in-proposed-pocket-for-cve-2026-98432
3•basedpolymer•9m ago•0 comments

Show HN: I built a Bible verse feed to replace doomscrolling

https://scrollhope.com/
2•jclardy•14m ago•1 comments

Bluetooth High Data Throughput opens a new chapter in wireless performance

https://www.bluetooth.com/press/bluetooth-high-data-throughput-opens-a-new-chapter-in-wireless-pe...
1•0in•15m ago•0 comments

Human-in-the-loop authorization for AI agents

https://airlockapp.io/
1•feldrim•15m ago•0 comments

Software Engineering Is Worth Teaching

https://uptointerpretation.com/posts/software-engineering-is-worth-teaching/
3•hardwaregeek•18m ago•0 comments

Show HN: Acoustic Orbit – a Mac app that plays your speakers together, in sync

https://acousticorbit.com/
1•snehasis_gouda•18m ago•0 comments

Building an inference stack that improves itself

https://twitter.com/DecagonAI/status/2115511110120120437
1•gmays•19m ago•0 comments

Survey: What are the pains of creating product demo videos?

1•loveTech•19m ago•1 comments

The Currency of the Journal Article Is Collapsing

https://www.theatlantic.com/ideas/2026/10/ai-journal-articles-writing/689186/
4•alphabetatango•20m ago•1 comments

Tag: Reasonably Polite Seattleites

https://www.seattlebikeblog.com/tag/reasonably-polite-seattleites/
1•Bluestein•21m ago•0 comments

Show HN: Algorithms, Explained, Proved and Run

https://algorithm.tamnd.com/
1•tamnd•21m ago•0 comments

Show HN: Upvoted - Hacker News as a daily magazine

https://upvoted.eng-atlas.dev/
1•xuancanh•21m ago•0 comments

HGH

1•kroelle•22m ago•0 comments

Show HN: RapAvatar – Turn any photo into a lip-synced rap video with AI

https://rapavatar.com/
1•nnooo•23m ago•0 comments