HNHacker News
TopNewBestAskShowJobs

conroy

4,032 karma · joined January 25, 2012

email: kyle@conroy.org working on: riza.io
submissionscomments
conroy··on How We Went All In on sqlc/pgx for Postgres and Go
Really appreciate the in-depth comment. Also, thanks for open-sourcing pggen. I love have more projects in this space. I'll have to take a look at how it works.

I did want to address the last point in your comment.

> This works great until you have a query like `SELECT * FROM foos WHERE field = $1`

When sqlc sees a query with a *, it rewrites the query in the generated code to have explicit column references. For example, if you have an authors table with three columns (id, name, bio), the following query:

  SELECT * FROM authors WHERE name = $1;
will have the * replaced in the final output.

  SELECT id, name, bio FROM authors WHERE name = $1;
You can see it in action here: https://play.sqlc.dev/p/2ea889b6d14ae7a91afdcdf4eebe7d100408...
conroy··on How We Went All In on sqlc/pgx for Postgres and Go
I haven't written up a public roadmap yet as I'm still focused on improving the MySQL and PostgreSQL support. While there is technically a SQLite parser in the main tree, it's substantially lower quality than the others. This is due to the fact that it's generated using Bison and not used by any else in production.

SQLite uses a custom parser generator called lemon[0] to parse SQL queries. Sadly that parser is deeply entwined with SQLite itself; it's not trivial to extract a full AST.

My current plan (still a work-in-progress and by no means final) is to use sqlparser-rs[1] via wasmtime. The AST produced by this crate is very high quality and it supports multiple dialects of SQL.

[0] https://www.sqlite.org/lemon.html [1] https://github.com/sqlparser-rs/sqlparser-rs

conroy··on How We Went All In on sqlc/pgx for Postgres and Go
No worries! Just wanted to make sure people didn't think Docker was a necessity.
conroy··on How We Went All In on sqlc/pgx for Postgres and Go
> Notably, the recommended way to run sqlc also requires Docker.

This isn't accurate. sqlc is a self-contained binary and does not have any dependencies. Docker is one of the many ways to install and run it, but it is not required. (author of sqlc)

conroy··on How We Went All In on sqlc/pgx for Postgres and Go
Author of sqlc here. Just wanted to say thanks to everyone in this thread. It's been a really fun project to work on the last two years. Excited to get to work on adding support for more databases and programming languages.
conroy··on Inside the all-hands meeting that led to a third of Basecamp employees quitting
"Fried ... began the meeting by apologizing for announcing the policy changes by a public blog post rather than first telling all employees"

The fact that no one internally was given a heads up about the post shows you how much respect the leadership team has for their employees.

conroy··on OpenSearch: AWS fork of Elasticsearch and Kibana
I just opened a pull request to fix a few typos in the README. They are requiring a Developer's Certificate of Origin.
conroy··on Whimsical Guide to Compensation
In my experience, such a rigid compensation system will fail to scale as a company grows. However, every company should do the first item:

> Full transparency. All salaries, equity, companies financials and so on are visible to everybody in the company.

It’s the only way to ensure that a company’s stated values are accurate.

conroy··on SpaceX launches and nearly lands starship on its first suborbital flight
Does anyone know if the engines cutting out one by one was planned? Or was something going wrong with the engines?
conroy··on Elon Musk moves to Texas
This move is about lowering his tax bill and nothing more.

"With a net worth of $134.7B, Musk recently surpassed Bill Gates as the second-richest person in the world, and he's on track to earn more than $50 billion in stock options. If he remained in California, he’d be facing income taxes on the profits when he exercises them. In Texas, there is no income tax."

conroy··on Pennsylvania Election Officially Contested
The title is heavily editorialized. From the guidelines: "Otherwise please use the original title, unless it is misleading or linkbait; don't editorialize."
conroy··on Pennsylvania Election Officially Contested
Flagged for an editorialized headline. Can the title be changed to "Texas, Plaintiff v. Pennsylvania, et al."?
conroy··on GitHub Universe 2020: Opening Keynote
The organization profile page has been updated with a Sponsoring tab, but only two of the launch partners appear to have active sponsorships. Maybe there's a setting they need to toggle to make them public?

https://github.com/orgs/stripe/sponsoring

https://github.com/orgs/cognitect/sponsoring

conroy··on Babelfish: SQL Server-to-Postgres Translation Layer
Argh, I scanned the article multiple times and missed that section. Thank you
conroy··on Babelfish: SQL Server-to-Postgres Translation Layer
Any idea what language it’s written in?
conroy··on Apple Announces App Store Small Business Program
I'm happy to see lower commission, but I'm skeptical of programs that require an application and an approval process.

Why not implement this like a tax bracket? For the first $1 million each year, Apple's commission is 15%. For each dollar after that, the commission rate is 30%. No programs, no application process.

conroy··on Cobaul: A COBOL to WebAssembly Compiler
Cloudflare announced this in a blog post a few months ago (https://blog.cloudflare.com/cloudflare-workers-now-support-c...). They explain a bit more about the history of COBOL and why this specific project exists.
conroy··on Staking Claims with Scheduled Tweets
patio11 wrote about “dropping hashes” here: https://www.kalzumeus.com/essays/dropping-hashes/
conroy··on Ask HN: Who wants to be hired? (August 2020)
Jumping back into full-time work after a small break. Looking for a funded startup with a small team building business software or developer tools.

Location: San Francisco, CA

Remote: Yes

Willing to relocate: Maybe?

Technologies: Go, SQL, React, Ruby, gRPC, distributed systems

Résumé/CV: https://conroy.org/ | https://github.com/kyleconroy

Email: kyle@conroy.org

conroy··on μPlot v1.1 – now with log scales support
I integrated uPlot into my small SaaS product a few weeks ago. Not only was it easy to do, leeoniya quickly answered a question of mine on GitHub about custom line shapes.

leeoniya, if you’re reading this, please apply to GitHub sponsors so I can give you money.

conroy··on Eliminating cold starts with Cloudflare Workers
Important to note that this only applies to "root" workers

> For now, this is only available for Workers that are deployed to a “root” hostname like “example.com” and not specific paths like “example.com/path/to/something.” We plan to introduce more optimizations in the future that can preload specific paths.

conroy··on The Slack Social Network
I maintain an open-source project with a few corporate sponsors. As part of their sponsorship, companies get Slack-based support. Shared channels have made this process incredibly easy. Since they already use Slack, I just create a shared channel in my organization and invite them. They get to decide who is in the channel. Even if you get added later, you can see the whole chat history. It's extremely valuable for doing cross-organization work.
conroy··on The Story of Stripe (2018)
Discussion from 2018: https://news.ycombinator.com/item?id=18153909
conroy··on The Next Step for Generics
Here's a four-line replacement for the various `sql.Null*` types in the standard library.

    type Null(type T) struct {
        Val   T
        Valid bool // Valid is true if Val is not NULL
    }
Here's what it looks like in practice: https://go2goplay.golang.org/p/Qj8MqYWWAc3
conroy··on Go 1.15 – Draft release notes
I despise Google Groups on mobile, as it usually requires me to log into my Google account. For those of you like me, the release notes[0] are easy to read in my phone.

[0] https://tip.golang.org/doc/go1.15

conroy··on Capitol Hill Autonomous Zone
A friend lives in Seattle and texted me today about his visit last night:

> I was there last night and it's such a cool pseudo utopian place

> The media coverage of it is WILD

> People on the internet are convinced it's protected by armed guards and people are dying of hunger and instead its...like a music festival campground

> There are speakers, musicians, art walls. I took a group pic for a bunch of black guys last night and they were so proud of what was built because they felt like they fought for it, which in a sense, they did.

conroy··on Activists seize control of Seattle neighborhood, declare “autonomous zone.”
A friend lives in Seattle and texted me today about his visit last night:

> I was there last night and it's such a cool pseudo utopian place

> The media coverage of it is WILD

> People on the internet are convinced it's protected by armed guards and people are dying of hunger and instead its...like a music festival campground

> There are speakers, musicians, art walls. I took a group pic for a bunch of black guys last night and they were so proud of what was built because they felt like they fought for it, which in a sense, they did.

conroy··on Show HN: PgTyped – Typesafe SQL in TypeScript and Postgres
As a maintainer of a similar project[0], it's great to see another entry in this space.

sqlc currently has great support for Go and experimental support for Kotlin. I'm planning on adding TypeScript support in the future, so it's great to see that others in the TypeScript community find this workflow useful.

[0] https://github.com/kyleconroy/sqlc

conroy··on It’s OK for your open source library to be a bit shitty (2015)
I maintain an open source project with ~2k stars (https://github.com/kyleconroy/sqlc). There’s a large list of bug reports and feature requests, but since I don’t work on it full time, I’ve gotten really good at saying “No” and “I’m sorry”.
conroy··on Ask HN: What's your quarantine side project?
https://sqlc.dev

Work continues on sqlc, my SQL compiler side project. I recently released v1.3.0, which mainly consisted of big fixes.

I’m really excited about the in-browser playground I launched at https://play.sqlc.dev. I hope it gets more people to install sqlc locally.

← PreviousPage 2 of 10Next →