HNHacker News
TopNewBestAskShowJobs

keithwhor

3,884 karma · joined March 14, 2013

hacker. canadian in sf. oss = <3. learning to be a CEO, one mistake at a time.

building Superuser, come join :)

https://superuser.app

https://x.com/keithwhor

submissionscomments
keithwhor··on The Most Mario Colors
I just wanted to comment to say that the design of this blog / personal website is incredible. A very minimalistic, nostalgic, and yet modern take on personal websites from the Geocities era.

I love this.

keithwhor··on Vector databases are the wrong abstraction
I agree.

Similar to blog post, instead of at the extension layer I built a PostgreSQL ORM for Node.js based on ActiveRecord + Django's ORM that includes the concept of vector fields [0][1] that lets you write code like this:

    // Stores the `title` and `content` fields together as a vector
    // in the `content_embedding` vector field
    BlogPost.vectorizes(
      'content_embedding',
      (title, content) => `Title: ${title}\n\nBody: ${content}`
    );

    // Find the top 10 blog posts matching "blog posts about dogs"
    // Automatically converts query to a vector
    let searchBlogPosts = await BlogPost.query()
      .search('content_embedding', 'blog posts about dogs')
      .limit(10)
      .select();
I find it tremendously useful; you can query the underlying data or the embedding content, and you can define how the fields in the model get stored as embeddings in the first place.

[0] https://github.com/instant-dev/orm?tab=readme-ov-file#using-...

[1] https://github.com/instant-dev/orm?tab=readme-ov-file#using-...

keithwhor··on setBigTimeout
Oh yikes. Yeah; not ideal.
keithwhor··on setBigTimeout
I haven’t looked at the code but it’s fairly likely the author considered this? eg the new timeout is set based on the delta of Date.now() instead of just subtracting the time from the previous timeout.
keithwhor··on setBigTimeout
Off the top of my head, a cron scheduler for a server that reads from a database and sets a timeout upon boot. Every time the server is reboot the timeouts are reinitialized (fail safe in case of downtime). If upon boot there’s a timeout > 25 days it’ll get executed immediately which is not the behavior you want.
keithwhor··on Swarm, a new agent framework by OpenAI
Hey! I was responsible for developing this.

Not speaking for OpenAI here, only myself — but this is not an official SDK — only a reference implementation. The included relay is only intended as an example. The issues here will certainly be tackled for the production release of the API :).

I’d love to build something more full-featured here and may approach it as a side project. Feel free to ping me directly if you have ideas. @keithwhor on GitHub / X dot com.

keithwhor··on Ask HN: Should I put my startup on my resume?
I didn’t realize HN was allowing GPT-powered replies now…
keithwhor··on Mersenne Twister PRNG for JavaScript
what are the faster / more effective alternatives?
keithwhor··on PlanetScale performs layoff and prioritizes profitability
This is a particularly clever post.

For those that don’t have experience running companies with permissive free tiers, free tiers often act as a honeypot for a certain category of users that (1) don’t and will never pay for your product, (2) complain loudly and often and (3) eat up your support time.

This category of user is equally toxic to any competitor’s platform. The best B2B companies paywall early and set the bar high.

keithwhor··on Is the emergence of life an expected phase transition in the evolving universe?
> It's like claiming a calculator exists to use up electricity.

sighs in bitcoin

keithwhor··on New models and developer products
I suspect it is in OpenAI's interest to have their API as a loss leader for the foreseeable future, and keep margins slim once they've cornered the market. The playbook here isn't to lock in developers and jack up the API price, it's the marketplace play: attract developers, identify the highest-margin highest-volume vertical segments built atop the platform, then gobble them up with new software.

They can then either act as a distributor and take a marketplace fee or go full Amazon and start competing in their own marketplace.

keithwhor··on Jevons paradox
How do you define wealth? From first principles, wealth is just the accumulation of resources used for production: oil, gas, water, lumber, minerals. The next abstraction would be the accumulation of productive labor from these resources: buildings, vehicles, electronics, materials.

How many of these things are the wealthiest nations net exporters of — or at least breakeven on, eg they produce enough for self-sustenance?

keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Thanks for the tip! Fixed this; just missed this when writing the example.

This error would only be found if you wrote a test for it. The framework doesn't have an AI integration that checks whether or not your types are consistent with real world applications... but could.

keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
No not necessarily! I just haven’t written type import support yet; though you’re welcome to help.

And no — type safety is applied at the HTTP interface. API consumers need no special library to get all the benefits.

keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
<3
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Good call! Do you think Python developers would feel more comfortable venturing into JavaScript with this framing?
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
If you’d like to help build a TS integration, welcome! What’s the MRR of your company? Did you found it or are you an employee? Any specific tips on how TS projects can significantly improve either revenue acquisition or retention over JS projects?
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Feel free to email keith@instant.dev if you’re legitimately interested :)
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Entirely possible! I mean right now we restrict endpoint definitions to HTTP methods but in theory you could define unique endpoints for any combination of parameters. What I would want to find is the most effective / used combinations as opposed to unlimited flexibility.
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Our approach doesn’t preclude TypeScript! In fact I think it would integrate well with it. If you’re interested in a TS approach could you email me at keith@instant.dev ?
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
I’m not quite sure I grok the use case, can you give a more precise example? Either way, if you’re interested in the approach I *very welcome* issues, PRs and contributors. I think it would be pretty straightforward to create tests for whatever you’re looking for.
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Interestingly I published a Ruby framework called FastAPI before Python’s FastAPI existed ;) — been thinking about this stuff for a long time.

https://github.com/thestorefront/FastAPI

keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
That’s good feedback! We can probably do both; if you think it’s cool would you be interested in contributing to TypeScript support to circle the square?
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Fair enough; if I were to change the qualifiers associated with the project, what’s cool about what exists here and how would you describe it in a way that’s maximally appealing? Is “type-safe” an acceptable generalization given an audience less sophisticated than you or can I use a different framing to the same effect?
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
I’d never suggest this is “mess type” safe. In fact I strongly discourage mess types.

Edit: Parent added quotation marks and hyphens after my comment. I stand proudly by my cutesy remark.

keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
When you say “we” who are you referring to? Would love to learn more about what you’ve built. I haven’t built easy deployment rails for Azure but if you’re interested in playing with our solution I’d be down for a call! email keith@instant.dev
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
My claim is only type-safety at the HTTP layer. This claim is intentionally specific! As per another comment in this thread, pedantry is the most valuable currency on HN, so this sort of feedback is not only expected but welcome.
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Worry not, this is Hacker News. Pedantry is more valuable as currency than H100s here.
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
Actually only a month! I just looked it up and was surprised myself.
keithwhor··on Show HN: Instant API – Build type-safe web APIs with JavaScript
The naming is completely coincidental and probably a little confusing / unfortunate. OpenAPI is a rebranding of Swagger, a really popular open source API specification. Incidentally the OpenAPI initiative only predates OpenAI by a month so I don’t think Sam, Greg & co could have known better at the time.

But OpenAPI is the “gold standard” machine readable API specification format so it makes sense that OpenAI would rely on it!

← PreviousPage 2 of 20Next →