175 karma · joined Aug 11, 2011 (15y ago) · 59 submissions
comment 2y ago · link · parent
trait HttpService: Send {
fn fetch(&self, url: Url)
-> impl Future<Output = HtmlBody> + Send;
}
impl HttpService for MyService {
async fn fetch(&self, url: Url) -> HtmlBody {
// This works, as long as `do_fetch(): Send`!
self.client.do_fetch(url).await.into_body()
}
}comment 3y ago · link · parent
Try learning Rust.
Your anxiety of things constantly breaking will disappear.
I've been coding for about 20 years. My joy of coding would be gone if not for Rust. Instead, writing code is my primary hobby today, in addition to it being (part of) my job professionally.
comment 3y ago · link · parent
If you do Rust application server development, you might be interested for several reasons:
- It now auto-generates migrations from Rust structs. To my knowledge, it is the only Rust ORM with this capability.
- The join API, while in alpha, has far moving pieces than any other Rust ORM. It only relies on the table `struct`s themselves, and does not rely on relation traits (SeaORM) or modules (Diesel).
- There's little to no query builder syntax to learn. The query builder basically joins together &str fragments of raw SQL. It strikes the right level of abstraction between composability, and having near-zero learning curve for anyone who already knows SQL.
8.
Ormlite: An ORM in Rust for developers that love SQL(github.com ↗)
1 points · by kurtbuilds · 3y ago · 3 comments
comment 4y ago · link · parent
Companies like Azure and Meta now recommend Rust as either one of several viable choices, or THE recommended option, for the use cases you describe, including CLI and web servers.
Personally at this point, just about anything that's not a frontend (android, ios, web), I think Rust is the best language for the job. It's the language I prefer, and feel most productive in, for the use cases you're describing (web server, CLI, small scripts and utils).
There's a learning curve, but at this point, I almost entirely forget about the lack of GC. It feels like writing code in any other language - except of course with all the benefits you call out (no null, ADT, typed error values, trait-based OO system, the best tooling of any language I've used, expansive 3rd party libraries).
comment 4y ago · link · parent
I was looking at the server logs - are you the payments company with abbreviation CP? It looks like there are a few errors in your OpenAPI doc that prevented the generator for working in your case - I'm sorry the error message wasn't more clear.
If you're interested, email me, kurt at libninja dot com, and I can describe the spec issues and we can chat about working together.
comment 4y ago · link · parent
One tool we have under development is a tool (might end up being a chrome extension) that will analyze web requests to turn them into a spec.
There are a few tools that are similar in purpose, though I've only seen ones based on proxying, rather than chrome's network request recording.
13.
Show HN: Stripe-quality API client libraries with a single button click(libninja.com ↗)
27 points · by kurtbuilds · 4y ago · 10 comments
comment 4y ago · link · parent
Write up or copy a few page doc outlining security best practices, then require every employee to read & sign an acknowledgement that they've read it. Now every employee has gone through security training.
comment 4y ago · link · parent
Add these two lines to the top to use node executables and load the dotenv:
``` set dotenv-load := true export PATH := "./node_modules/.bin:" + env_var('PATH') ```
comment 4y ago · link · parent
I'm currently building a network of domain expert mentors, where companies can connect with experts for advising their existing team to solve business problems. Think of it like very low commitment consulting. It might be a great way to get a better feel for industry (and the salary you can command) before making a hard commitment.
If that sounds interesting, shoot me an email. My email is <my username> at gmail dot com.
comment 6y ago · link · parent
It has two chapters that are especially relevant for you: "Chapter 2: Transform self-love into empathy: The law of narcissism", which might be self-evident in its value from the title, and "Chapter 4: Determine the strength of people's character: The law of compulsive behavior", which discusses toxic personality types, how to avoid them, and what to do in case you notice those patterns in your own behavior. I think you'll find both of those chapters extremely illuminating.
The whole book is worth checking out too. And a relationship with a good executive coach or therapist works wonders too!
comment 9y ago · link · parent
1. Get some kind of market validation before you build. Get commitments from paying customers (or even pre-payment), or directly see them paying for a near-identical offering, and have a competitive advantage to deliver it more cheaply.
2. Do an inventory exercise of why these projects have failed. Doing a quick run-through, it looks like you didn't do marketing or user research for any of these projects. If making a side business still excites you, make sure you do these steps before going to build any future side business.
3. I know nothing about landscaping, but as an outsider, Bloom looks a promising product. Go talk to customers!
3. If the marketing side of things doesn't interest you, but you still want to make side money, reach out to me, my email is <hn username> at gmail. My background is pure engineering, but I have friends who are looking for technical co-founders and have ideas that I could use more technical talent on.
25.
Identifying Sources of Cost Disease(kurtsp.com ↗)
66 points · by kespindler · 9y ago · 37 comments
28.
See the gender ratio of Facebook events(producthunt.com ↗)
1 points · by kespindler · 10y ago · discuss
comment 10y ago · link · parent
For more info, check out 4H work week, Lean Startup, or http://firstround.com/review/90-of-feedback-is-crap-how-to-f...
30.
Show HN: Modern Python3 web framework(github.com ↗)
1 points · by kespindler · 10y ago · discuss