Better HN
topnewbestaskshowjobs
Log inSign up

tusharsoni

304 karma · joined Mar 25, 2016 (10y ago) · 88 submissions

YC Badge: 0xc6ffeb1298eb33da430d14e5eb789256ec344625
Submissions

comment 4y ago · link · parent

> mCaptcha is basically a rate-limiter

This is a much better explanation of what it does than captcha where I expect "proof-of-human". A PoW based rate-limiter is a really interesting idea! Usually, the challenge with unauthenticated endpoints (ex. signups) is that the server has to do more work (db queries) than the client (make an http request) so it is really easy for the client to bring the server down. With PoW, we're essentially flipping that model where the client has to do more work than the server. Good work!

comment 4y ago · link · parent

haha yeah, gotta keep the tradition going

comment 4y ago · link · parent

Thank you! Go supports embedding static files natively [1]. Copper builds on top of it and provides the tooling to do it seamlessly for web projects.

[1]: https://pkg.go.dev/embed

comment 4y ago · link · parent

Thank you, so much to do in this space! Bud looks great and I see we share many common goals. The dependency injection piece looks interesting. Did you build it custom or integrated an existing solution?

comment 4y ago · link · parent

They're on top of my list to add to Copper. As soon as we get sqlite support!

comment 4y ago · link · parent

I think that remains a very valid use case. In Copper, you can create one of those with the CLI. For example `copper create -frontend=vite:react github.com/nasa/starship` will create a react app with a JSON backed API ready to go

comment 4y ago · link · parent

This is a good observation. One trend I'm noticing is that the "old way" (PHP, Rails, etc.) of doing things is making a comeback. Go is very well positioned for this but lacks the frameworks.

I'm hoping to add something like Phoenix to Copper. It should help with the "heavily API only side" problem. I've already added integrations for Tailwind and added some utilities on top of the templating (going to add more) to fix the lack of good templating.

comment 4y ago · link · parent

ha, add me to that list :) I think it's fine if CLIs are optional and I've tried to do that with Copper. Of course, your initial setup will be longer without scaffolding so it's not a great first time developer experience

comment 4y ago · link · parent

Code generation is an awesome alternate, I'm more familiar with sqlc.dev. They're doing some really interesting work.

My goal with Copper is to provide out-of-the-box integrations with popular solutions to various problems. For now, I picked GORM but I definitely see adding support for other tools.

comment 4y ago · link · parent

Oh that's fun! In my demo video [1], I build a (minimal) HN clone so hopefully that answers your question in detail.

But the tldr is - you'll need a lot more than just templating for a production ready app. To name a few things - server, storage, migrations, logging, configs. IMO there's a huge benefit in having a batteries included toolkit that stays close to the stdlib - so you can totally keep your templates as is!

[1] https://vimeo.com/723537998

comment 4y ago · link · parent

Please do! If nothing else, it's definitely a fun language to learn. We're also setting up a community of folks who are learning Go/Copper. Check the project readme link for the link.

comment 4y ago · link · parent

It kinda does but there's a lot of boilerplate that goes in before we actually get to the app logic. And, understandably, there's no structure provided by the Go stdlib. Once I made many projects with just using stdlib, I started taking common packages out. And Copper is essentially that. I can start writing my app code with minimal setup / boilerplate.

13.

Show HN: Copper – A Go framework for your projects(github.com ↗)

146 points · by tusharsoni · 4y ago · 80 comments

14.

Show HN: Hacker News clone using Copper + Tailwind(github.com ↗)

4 points · by tusharsoni · 4y ago · discuss

15.

Writing Go CLIs with Just Enough Architecture (2020)(blog.carlmjohnson.net ↗)

1 points · by tusharsoni · 4y ago · discuss

16.

Best Practice: Application Frameworks(queue.acm.org ↗)

3 points · by tusharsoni · 4y ago · discuss

17.

How to get things done as a tech lead?(tnotes.dev ↗)

1 points · by tusharsoni · 5y ago · discuss

18.

Thoughts on (Premature) Optimization(tnotes.dev ↗)

1 points · by tusharsoni · 5y ago · discuss

19.

Taxonomy of a Web App in Go(tnotes.dev ↗)

1 points · by tusharsoni · 5y ago · discuss

20.

State of Web Development in Go(tnotes.dev ↗)

1 points · by tusharsoni · 5y ago · discuss

comment 5y ago · link · parent

Because not all cookies are regulated (such as session cookies). It would be hard for browser to tell what the cookie is for.
123