Readit News logoReadit News
belak commented on SQLx – Rust SQL Toolkit   github.com/launchbadge/sq... · Posted by u/stmw
tmpfs · 8 months ago
I have used this as well as many of the other lower-level db drivers (which don't check your SQL at compile time) and I can say I much prefer the latter.

My issues with SQLx when I first tried it were that it was really awkward (nigh impossible) to abstract away the underlying DB backend, I expect those issues are fixed now but for some simple apps it's nice to be able to start with SQLite and then switch out with postgres.

Then I wanted to dockerize an SQLx app at one point and it all becomes a hassle as you need postgres running at compile time and trying to integrate with docker compose was a real chore.

Now I don't use SQLx at all. I recommend other libraries like sqlite[1] or postgres[2] instead.

SQLx is a nice idea but too cumbersome in my experience.

[1]: https://docs.rs/sqlite/latest/sqlite/ [2]: https://docs.rs/postgres/latest/postgres/

belak · 8 months ago
I'm have no experience with abstracting away the backend, but Dockerizing is actually pretty easy now - there's an offline mode[1] where you can have sqlx generate some files which let it work when there's no DB running.

[1]: https://docs.rs/sqlx/latest/sqlx/macro.query.html#offline-mo...

belak commented on The Curse of Markdown   codehike.org/blog/the-cur... · Posted by u/pomber
scblock · a year ago
Dude created a simple tool based on email conventions of the time and released it to the world for free and it's still with us, used all over. And you're here crying that he didn't want to work with you? Did you think he was somehow obligated to? How incredibly entitled.

It's open source, so you do what you do. That's the good and bad of it. No one owes you a god damned thing.

belak · a year ago
I think you're missing much of the context and are misrepresenting what happened.

As far as I'm aware, there was no crying he didn't want to work with people, but there was a frustration that he was not open to having a Markdown "standard". To the point where he actively opposed efforts to standardize it, at least under the name Markdown[1].

This is legally and technically fine, as he owns a trademark for Markdown, but when you combine the inconsistent application of that trademark (GitHub Flavored Markdown is seemingly fine, but Common Markdown was not), along with him calling it "Jeff Atwood's crusade" and mocking the effort[2], it's not a great look and resulted in quite a few frustrated people.

As an open source project, you're right that he doesn't owe anything to anyone, but that doesn't mean people have to be entirely happy about how the situation was handled either.

[1]: https://blog.codinghorror.com/standard-markdown-is-now-commo...

[2]: https://soundcloud.com/thetalkshow/ep-88-cat-pictures-side-1, around 1:15

belak commented on Tell HN: Gitlab Premium pricing increases incoming $19 to $29   about.gitlab.com/pricing/... · Posted by u/dijit
anonymoustrolol · 3 years ago
Does anyone use Bitbucket? Do you like it? I struggle to see the use case unless you only need a repo, or do they have CI/CD now too?
belak · 3 years ago
They introduced Bitbucket Pipelines around when I left, about 7 years ago.

- https://bitbucket.org/product/features/pipelines

- https://bitbucket.org/blog/introducing-bitbucket-pipelines-b...

belak commented on Use one big server   specbranch.com/posts/one-... · Posted by u/pclmulqdq
altdataseller · 4 years ago
What if your product simply stores a lot of data (ie a search engine) How is that weird?
belak · 4 years ago
That's fair - I added "are working on a specific problem which needs a more complicated setup" to my original comment as a nicer way of referring to edge cases like search engines. I still believe that 99% of applications would function perfectly fine with a single primary DB.
belak commented on Use one big server   specbranch.com/posts/one-... · Posted by u/pclmulqdq
cfors · 4 years ago
Yep, there's a premium on making your architecture more cloudy. However, the best point for Use One Big Server is not necessarily running your big monolithic API server, but your database.

Use One Big Database.

Seriously. If you are a backend engineer, nothing is worse than breaking up your data into self contained service databases, where everything is passed over Rest/RPC. Your product asks will consistently want to combine these data sources (they don't know how your distributed databases look, and oftentimes they really do not care).

It is so much easier to do these joins efficiently in a single database than fanning out RPC calls to multiple different databases, not to mention dealing with inconsistencies, lack of atomicity, etc. etc. Spin up a specific reader of that database if there needs to be OLAP queries, or use a message bus. But keep your OLTP data within one database for as long as possible.

You can break apart a stateless microservice, but there are few things as stagnant in the world of software than data. It will keep you nimble for new product features. The boxes that they offer on cloud vendors today for managed databases are giant!

belak · 4 years ago
This is absolutely true - when I was at Bitbucket (ages ago at this point) and we were having issues with our DB server (mostly due to scaling), almost everyone we talked to said "buy a bigger box until you can't any more" because of how complex (and indirectly expensive) the alternatives are - sharding and microservices both have a ton more failure points than a single large box.

I'm sure they eventually moved off that single primary box, but for many years Bitbucket was run off 1 primary in each datacenter (with a failover), and a few read-only copies. If you're getting to the point where one database isn't enough, you're either doing something pretty weird, are working on a specific problem which needs a more complicated setup, or have grown to the point where investing in a microservice architecture starts to make sense.

belak commented on Build Pong in Your Terminal with Go for Some Reason   earthly.dev/blog/pongo/... · Posted by u/jalletto
belak · 4 years ago
The article is great, but the title here has been editorialized a bit. I'm not super familiar with HN, so what's the best way to get that fixed to match the actual article?
belak commented on How generics are implemented in Go 1.18   github.com/golang/proposa... · Posted by u/komuW
_fz_ · 4 years ago
> I'd imagine RC is fairly soon though.

RC1 was released two weeks ago.

belak · 4 years ago
Thanks! Good catch! I was going off blog posts and didn't see that there was a download for RC1.
belak commented on How generics are implemented in Go 1.18   github.com/golang/proposa... · Posted by u/komuW
colesantiago · 4 years ago
When is generics officially coming into Go? I thought it would be in February as promised?
belak · 4 years ago
The original plan was to release in February, but in the Beta 2 release [1], they said this: "Because we are taking the time to issue a second beta, we now expect that the Go 1.18 release candidate will be issued in February, with the final Go 1.18 release in March."

It looks like there are still a few release blockers [2]. I'd imagine RC is fairly soon though.

EDIT: as mentioned by _fz_ below, RC1 has already released. Seems like the full release will most likely still be in March.

[1]: https://go.dev/blog/go1.18beta2

[2]: https://github.com/golang/go/issues?q=is%3Aopen+label%3Arele...

belak commented on Golang.org Is Gone   golang.org... · Posted by u/4ad
stonogo · 4 years ago
For those following along at home, "golang.org/x/pkgsite" redirects to "https://pkg.go.dev/golang.org/x/pkgsite", which declares the repository to be at "https://cs.opensource.google/go/x/pkgsite", which gives a "Permission denied" error page unless you fetch code from Google Tag Manager. So it's all nicely open source, and not proprietary, as long as you subject yourself to Google's tracking mechanisms, or sign into your Google account, and do not license any libraries public domain -- Google will use them, but not show them to you. So as you can see, there's nothing to complain about, and we should all thank Google for their grandmotherly kindness.
belak · 4 years ago
It's also available as a mirror at https://github.com/golang/pkgsite. All the golang.org/x/* packages are thankfully available there, making them pretty easy to find.
belak commented on Wayland in 2021   shibumi.dev/posts/wayland... · Posted by u/_7ffc
colordrops · 5 years ago
Is it still the case that Nvidia drivers don't work with Wayland?
belak · 5 years ago
The short version is "it depends". Essentially, each separate Wayland compositor needs to add support for the nvidia driver (or the driver needs to support more standardized APIs).

Gnome and KDE support Wayland on nvidia hardware (though it's a bit rough around the edges). Wlroots (and therefore Sway) doesn't because they don't want to have a separate code-path for one driver which doesn't want to support standards and because the APIs the driver does support wouldn't work well with the code model of wlroots.

u/belak

KarmaCake day180February 11, 2014View Original