290 karma · joined May 17, 2012 (14y ago) · 122 submissions
comment 10mo ago · link · parent
Without prior software dev experience people may take what the LLM gives them at face value, and that's where the slop comes from imho.
comment 1y ago · link · parent
comment 2y ago · link · parent
CF could probably get a lot more customers if they would allow you to use custom nameservers for your domain.
9.
Payment Request API: W3C Candidate Recommendation Draft(w3.org ↗)
1 points · by hakanito · 2y ago · discuss
comment 2y ago · link · parent
Make the browser store you credit/debit card info, make the browser handle the payment UI, make the browser expose JS apis to invoke payments and receipt fetching against pluggable payment providers.
My ideal world looks like this. New html button element:
`<pay amount="1.00" currency="USD" reference="my-article-123" checkoutUrl="https://...">Unlock for $1.00</pay>`
Clicking it opens browser checkout flow. The url you get from stripe/paypal or another whitelisted payment provider that has implemented the spec, some flow similar to OAuth. On a successful tx, a signed receipt (something like a jwt) is returned from the provider and saved by the browser, on disk on your computer.
The webpage can then load signed receipt references from the browser api, sends it to the backend which can return the article content if the receipt jwt is valid.
It can be fixed if the right people from Chrome and Stripe got together in a room and brainstormed for a bit. Then everyone else would follow.
comment 3y ago · link · parent
- Using golang, how do I write a custom marshaller for uber/zap
- Given a list of protogen.Files, how do I parse protobuf options and their values
Unfortunately the generated code is more often than not incorrect or uses non-existing API methods, but can give an idea of methods to use or where to look in the official api docs.
comment 3y ago · link · parent
But like a sibling comment said here, if you want the database implementation to dictate your models you can probably generate protos from something like EdgeDB. But then the db implementation is in charge, which seem a bit backwards.
If you’ve used graphql you’re presented with a similar challenge but on the other end of the spectrum - the graphql schema that needs to map to application models.
So one of the main considerations is to figure out how and where you want to define your source models. Is it the view layer, the model layer or the database layer.
Tldr; yes you’re right, it depends!
comment 3y ago · link · parent
Not sure you need a completely new db though; with protobuf’s native support for plugins, perhaps the missing piece you’re looking for is a protoc plugin that generates the table definitions for your db of choice? Could work well for databases with declarative schemas..
Don’t want to discourage you from creating a new database, but writing a proto plugin is arguably a quicker undertaking!
comment 5y ago · link · parent
comment 5y ago · link · parent
BTC follows the stock-to-flow model pretty accurately https://www.lookintobitcoin.com/charts/stock-to-flow-model/
comment 6y ago · link · parent
Companies like Acast[0] and Midroll have tech to dynamically insert targeted ads right into the audio stream while playing. So two people listening to the same podcast will get different ads.
comment 7y ago · link · parent
The server must fulfil this contract by providing methods (called resolvers) for each field.
The client must fulfil this contract by only asking for available fields.
The query language is built to support highly nested data.
Now, the N+1 problem you are talking about is not a GraphQL problem, but an implementation problem. Depending on how you write your server methods you can get it down to very few db calls (some use a thing called dataloader. Other tools are hasura or postgraphile)