Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ashishb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
151.
▲
by
ashishb
10mo ago
> TypeScript is really nice though. Even if that's true, it is irrelevant. - You need to decide package manager and everyone has their favorite one: npm, yarn, bun, pnpm ... - You need to depend on npmjs.com for dependencies,
152.
▲
by
ashishb
10mo ago
JavaScript is meant to be run in a browser. Not on a backend server [1]. Those who are choosing JS for the backend are irresponsible stewards of their customers' data. 1- https://ashishb.net/tech/javascript/
153.
▲
by
ashishb
10mo ago
> For example, I'm happy to maintain Python codebases with type annotations and type checking enabled. "Python codebases with type annotations and type checking enabled" is not the norm. Consider a random file from the fam
154.
▲
by
ashishb
10mo ago
> I think those are two separate concerns. Indeed. And the latter, that is, taking over and maintaining code written by someone else, is the more common concern in day-to-day jobs. More likely that you will get to build and improve an ex
155.
▲
by
ashishb
10mo ago
Here is my single way of deciding what your favorite language is. It is not "I like to write code in this language" but "If I am handed down a production ready system, I would prefer it to be written in this language". A
156.
▲
by
ashishb
10mo ago
Run these tools inside Docker[1] 1 - https://ashishb.net/programming/run-tools-inside-docker/
157.
▲
Reddit Migrates Comment Back End from Python to Go Microservice to Halve Latency
(infoq.com)
6 points
by
ashishb
10mo ago
|
1 comments
158.
▲
by
ashishb
11mo ago
Definitely. Would you prefer doing those tricks or exposing everything on your machine to random npm packages?
159.
▲
by
ashishb
11mo ago
> I think it's better to not run npm as root user on container. I would suggest adding --user 1000 to your docker run command. Good point. Here's the improvement that work for me https://github.com/ashishb/
160.
▲
by
ashishb
11mo ago
> My understanding is that docker escapes are not all that difficult, 1. Show me how you would escape Docker 2. Show me npm packages doing this in the wild
161.
▲
by
ashishb
11mo ago
I have a perfect set up in inside docker that works. I would love to know why bubblewrap is a superior alternative. Here's mine https://github.com/ashishb/dotfiles/blob/067de6f90c72f0cf849...
162.
▲
by
ashishb
11mo ago
What is genuine sandboxing? Everyone waives there hands by saying this
163.
▲
by
ashishb
11mo ago
Run npm and yarn inside docker [1]. Infact, do this for all risky tools[2] 1 - https://github.com/ashishb/dotfiles/blob/067de6f90c72f0cf849... 2 - https://ashishb.net/programming/run-tool
164.
▲
by
ashishb
11mo ago
> Don't expose `orders` as a field on `User`. Why not use Open API then?
165.
▲
by
ashishb
11mo ago
> Using another spec that autogen's the Golang would be an extra step we did not feel we needed. No need to. You can start with Go Lang server and generate the spec from it as well.
166.
▲
by
ashishb
11mo ago
> And rust, but they chose to panic on the error condition. Wild. unwrap() implicitly panic-ed, right?
167.
▲
by
ashishb
11mo ago
GraphQL is awesome if you are a frontend engineer. GraphQL is terrible if you are a backend engineer - https://bessey.dev/blog/2024/05/24/why-im-over-graphql
168.
▲
by
ashishb
11mo ago
Why not use OpenAPI for this - https://ashishb.net/programming/openapi/ ? OpenAPI supports a lot of languages, not just 2.
169.
▲
by
ashishb
11mo ago
> You are saying this would not have happened in a C release build where asserts define to nothing? Afaik, Go and Java are the only languages that make you pause and explicitly deal with these exceptions.
170.
▲
by
ashishb
11mo ago
I have said this before, and I will say this again: GitHub stars[1] are the real lock-in for GitHub. That's why all open-core startups are always requesting you to "star them on GitHub". The VCs look at stars before deciding
171.
▲
by
ashishb
11mo ago
> I'm still trying to convince the scientists I work with that they should format their code or use linters. Consider adding a pre-commit hook if you are allowed to.
172.
▲
by
ashishb
11mo ago
Contributing to a new Go codebase is easy. The Go codebases look all alike. Not only the language has really few primitives but also the code conventions enforced by standard library, gofmt, and golangci-lint implies that the structure of c
173.
▲
by
ashishb
11mo ago
> Seems like the wrong tools for the job. Thanks for the confirmation. I was confused as well. I always thought that the real use of WASM is to run exotic native binaries in a browser, for example, running Tesseract (for OCR) in the brow
174.
▲
by
ashishb
11mo ago
I have a similar experience except I use Go+GitHub Actions+Google Cloud Run.
175.
▲
by
ashishb
11mo ago
How is Rust + Web Assembly + Cloudflare workers in pricing and performance compared to say deploying Rust-based Docker images on Google Cloud Run or AWS Fargate?
176.
▲
by
ashishb
11mo ago
> You should probably put some quotes around `$PWD`: Yeah, fair point. > Doesn't NPM sometimes build against system libs, which could be different in the container? Yes, and I run all JS inside a container.
177.
▲
by
ashishb
11mo ago
So, switching to pnpm does not entail any work habit changes?
178.
▲
by
ashishb
11mo ago
firejail, bubblewrap, direct chroot, sandbox-run ... all have been mentioned in this thread. There is a gazillion list of tools that can give someone analysis paralysis. Here's my simple suggestion: all of your backend team already kno
179.
▲
by
ashishb
11mo ago
Exactly for JS code, run all inside the container, all the time. I have been doing it for weeks now with no issues.
180.
▲
by
ashishb
11mo ago
Exactly so you should still execute all JS code in a container.
More ›