Hacker News
GitGitGadget
Article URL: https://gitgitgadget.github.io
Comments URL: https://news.ycombinator.com/item?id=41577027
Points: 1
# Comments: 0
What Is React.js?
Article URL: https://briefs.video/videos/what-is-react/
Comments URL: https://news.ycombinator.com/item?id=41577014
Points: 2
# Comments: 0
3GPP Release-18 Physical Layer Enhancements for IoT-NTN
Article URL: https://ieeexplore.ieee.org/document/10666399
Comments URL: https://news.ycombinator.com/item?id=41577006
Points: 1
# Comments: 0
Harris victory seen as most likely election outcome,according to CNBC Fed Survey
Article URL: https://www.cnbc.com/2024/09/17/harris-trump-election-cnbc-fed-survey-economists.html
Comments URL: https://news.ycombinator.com/item?id=41576987
Points: 2
# Comments: 0
Markets What a Fed rate cut could mean for the world
Article URL: https://www.cnbc.com/2024/09/18/what-a-fed-rate-cut-could-mean-for-the-world.html
Comments URL: https://news.ycombinator.com/item?id=41576971
Points: 2
# Comments: 0
Wetting Current
Article URL: https://en.wikipedia.org/wiki/Wetting_current
Comments URL: https://news.ycombinator.com/item?id=41576962
Points: 1
# Comments: 0
Show HN: TestTrove: Portal for taking tests and publishing tests/quizzes
Nothing fancy. Just a simple portal to allow users to freely publish and take tests. Free publishing and no premium feature non sense. It does not have many features right now, but appreciate any feedback and/or criticisms.
Comments URL: https://news.ycombinator.com/item?id=41576957
Points: 1
# Comments: 0
Show HN: Parse your Postgres queries into a fully-typed AST in TypeScript
Hey all, I'm the creator of @pg-nano/pg-parser. I'm using it in pg-nano[1] to statically analyze Postgres schemas spread across multiple SQL files for a couple of reasons:
1. Each CREATE statement needs to be in topological order, so pg-nano's dev command can execute them without issue.
2. pg-nano has a plugin system like Vite that allows SQL generation based on the parsed schema.
Probably to the surprise of no one, working with an untyped AST feels like you're back in the days of JavaScript, because well... you are. Most of you know by now just how great TypeScript and static types in general are, especially if you appreciate SQL.
So why is this project worth sharing with you?
Well, writing the AST type definitions by hand would have taken me way too much time. It would also be a bear to keep up-to-date as Postgres continues to evolve.
To my surprise, I discovered that libpg_query, the C library used under-the-hood, includes JSON definitions in their /srcdata/ folder. I figured I could use them to generate the type definitions. Genius, right? Okay... maybe not genius, but still cool, I think.
You see, those JSON definitions provided by libpg_query? They don't exactly contain the TypeScript definitions (was that obvious?). No, no. I had to translate them into TypeScript definitions. (I'm sure you could have done it, yes yes. But did you? No siree bob)
It was pain-staking, but overall really not too hard. Time-consuming? Yes, but not as much as writing the type definitions by hand. So... was it worth it? Only time will tell. I hope you find it as useful as I do. And that's all I've got, so thanks for reading.
P.S. The build for Windows is broken, so if anyone could lend a hand, you would be a true hero.
[1]: https://github.com/pg-nano/pg-nano (not ready for production use)
Comments URL: https://news.ycombinator.com/item?id=41576956
Points: 2
# Comments: 0
I'm glad I miss the 90s-00's internet
Article URL: https://tonyedwardspz.co.uk/blog/im-glad-i-miss-the-old-internet/
Comments URL: https://news.ycombinator.com/item?id=41576887
Points: 1
# Comments: 1
Power Law of Practice
Article URL: https://en.wikipedia.org/wiki/Power_law_of_practice
Comments URL: https://news.ycombinator.com/item?id=41576718
Points: 1
# Comments: 0
Hick's Law
Article URL: https://en.wikipedia.org/wiki/Hick%27s_law
Comments URL: https://news.ycombinator.com/item?id=41576708
Points: 1
# Comments: 0
Not everyone is as good at reading and writing as you are
Article URL: https://shkspr.mobi/blog/2024/09/not-everyone-is-as-good-at-reading-and-writing-as-you-are/
Comments URL: https://news.ycombinator.com/item?id=41576668
Points: 2
# Comments: 0
Tara Polar Station – drifting polar station in the Arctic
Article URL: https://fondationtaraocean.org/en/schooner/tara-polar-station/
Comments URL: https://news.ycombinator.com/item?id=41576663
Points: 1
# Comments: 0
CRuby switches the default parser from parse.y to Prism
Article URL: https://github.com/ruby/ruby/pull/11497
Comments URL: https://news.ycombinator.com/item?id=41576644
Points: 1
# Comments: 0
Norway sees electric cars outnumber petrol models
Article URL: https://www.bbc.com/news/articles/cx25ljxpygeo
Comments URL: https://news.ycombinator.com/item?id=41576630
Points: 1
# Comments: 0
Enabling ChatGPT in a TI-84 calculator [video]
Article URL: https://www.youtube.com/watch?v=Bicjxl4EcJg
Comments URL: https://news.ycombinator.com/item?id=41576617
Points: 1
# Comments: 0
TopExpert: Find the best expert for your needs
Article URL: https://www.topexpert.online
Comments URL: https://news.ycombinator.com/item?id=41576599
Points: 1
# Comments: 1
Check Out Wachamacalit – Concept Idea for an AI Agent Social Media Network
Article URL: https://ai.google.dev/competition/projects/wachamacalit
Comments URL: https://news.ycombinator.com/item?id=41576586
Points: 1
# Comments: 0
OpenSearch is moving to the Linux Foundation
Article URL: https://opensearch.org/blog/building-the-future-of-OpenSearch-together/
Comments URL: https://news.ycombinator.com/item?id=41576577
Points: 1
# Comments: 0
How can a jigsaw have two distinct solutions? [video]
Article URL: https://www.youtube.com/watch?v=b5nElEbbnfU
Comments URL: https://news.ycombinator.com/item?id=41576552
Points: 1
# Comments: 0