Hacker News new | past | comments | ask | show | jobs | submit | salviati's comments login

We tried to use it alongside pouchdb to provide offline first experience. We ran into a lot of issues, mainly with pouchdb bugs. Then after reading this list [1] of issues in the couchdb architecture we decided to ditch it and stop trying to make pouchdb work.

[1] https://news.ycombinator.com/item?id=17115649


Out of curiosity, if you would like to start a new, offline-first project that needs syncing, which database would be the best candidate today?

One interesting idea I’ve seen is none[1]. That’s definitely more on the exploration side than the shipping one, though.

[1] https://tonsky.me/blog/crdt-filesync/


I can think of two complex pieces of software which intentionally shunned databases thinking they can just do its thing in "flat files" - git and DokuWiki.

What ended happening is that both developed their own custom shi*ty database engines because it turns out that things like indexes are just generally pretty useful, but doing them right is pretty damn difficult. I'm pretty sure that if Linus/git chose e.g. SQLite instead of "flat files", we'd have way fewer data corruption problems, and a more capable/extensible git.


I don’t know if Git’s storage is deserving of this level of scorn—I can’t lay claim to any in-depth knowledge, but if it were indeed a big problem I’d expect it to come up frequently in comparisons with Fossil, which stores things using SQLite. (As a counterpoint, I use git-annex quite a bit, and it almost certainly couldn’t integrate as neatly into Fossil’s storage approach as it does into Git’s.) So I’d appreciate any details here.

All that is beside the point, though: the article above is not about using or not using flat files as a storage primitive, it’s about using files of whatever nature as a replication and version reconciliation mechanism, in view of the fact that concurrent editing is inevitably application-specific, so we might as well lean into it instead of leaving it to a database. In that sentence, “a database” is not just any database, it’s one of a very short list of multimaster databases with relatively loose schemas, which includes CouchDB and—among legitimately FOSS projects—I’d struggle to name more.

This is not a decision about data storage at all, in other words. It is a decision about protocols. Experience shows that the alternative does not end up being an off-the-shelf database (even CouchDB, which does seem like a major road not taken looking back at Canonical’s efforts a decade ago), the alternative is usually a central synchronization server speaking a custom protocol. (CalDAV, CardDAV, Bitwarden, etc.)

And if you want to do your CRDT or OT or whatnot over per-client SQLite databases instead of per-client text files, all the more power to you.

Finally, I tried to phrase my comment above in a way that makes it clear that it’s a suggestion of a direction to have fun in, not of a principle to architect your production app around. So the sneering in your comment is... honestly disheartening to read. Like, do people even hack anymore? I know they do, but every time I read something like this I become a little bit less sure of it.


hum, allow me to toot my own horn here. I've written something to that effect in 2021. https://raphael.lullis.net/thinking-heads-are-not-in-the-clo...

I am (very) biased but Couchbase has a pretty solid Mobile offering for native apps. I have worked on the Sync Gateway component responsible for replication for the last six years.

Sync Gateway still maintains a CouchDB-compatible REST API, and PouchDB _mostly_ works thanks to that, but there are some corner cases and features that PouchDB does not support so YMMV with it. Our native app libraries have used a more performant websocket-based replication protocol for many, many years now, and I'd really love to have the time investigating a PouchDB adapter using this WS protocol instead.


I'm biased since I work on it, but https://ditto.live/ provides an SDK that allows P2P and cloud sync. You interact with it like a database: write your queries against your data, and it will move between devices automatically

I would still recommend you give CouchDB and PouchDB a fair shot. They are used successfully by many folks.

I tried to subscribe to an online newspaper in my country.

Subscription was very easy. When I wanted to end it, they made it purposefully hard for me to do. I think it's unacceptable, and should be outlawed: the process to unsubscribe should be as hard (or easy) as the one to subscribe.

Since newspapers (at least that specific one) have no problem doing this as long as it's legal, why should the public be more observant of ethics?


If Revolut is available in your country, create a new virtual card for each subscription and when you can't/don't want to pay them anymore just cancel the card in Revolut.


Also works with wise (used to be transfer wise).


I thought the Brave browser would provide such a solution. I was very disappointed to find out it's not an intended use case.


Yep! Also this one comes to mind

http://www.supersimplestorageservice.com/


The bad grammar is on purpose. I know of two possible reasons:

* Bayesian poisoning https://en.wikipedia.org/wiki/Bayesian_poisoning

* Weeding out poor mark candidates https://josephsteinberg.com/why-scammers-make-spelling-and-g...


I suspect it's a compromise. Entertaining a target with high literacy skills is more work. If you have AI that is excellent at communication, there goes one reason to aim low.


I see this a lot, but it seems hard to verify. Has a scammer actually ever come out and say they deliberately use poor grammar? Would be interesting to compare scam emails/messages from scammers based in the US/UK/Australia with those in India or Nigeria, and see if the pattern holds up for both.


> I see this a lot, but it seems hard to verify.

Easy. As you say all you need to do is to compare and as I occasionally have a glimpse of the spam for some non-English language with a non-Latin script - it's the same.


It would be best to also change the text then, not just the link. The text could read "Install the app and play now" when the link is changed to point to the play store.


Do the databases you propone work offline too?

If they don't they're not a good match at all.


I use React Query[0] for frontend data management regardless and my apps work great as PWAs.

0. https://tanstack.com/query/latest/docs/framework/react/quick...


React Query (and other query caching libraries) are great until you have overlapping data between your queries. E.g. you edit a message in one place but other queries that show that same message (like a preview in your chat list) don't update.

Having a complete query engine on the client makes this a lot easier to deal with. It's why most popular messaging apps will use SQLite on the client to render the UI and build their own sync engine to keep it up to date with the backend.


That is not a CRDT level solution though, it doesn't work with multiple clients with disparate conflicting data.


My understanding of your comment is that "free software zealots" are people who belong to the "free software movement" [1]. If that's correct, where did you get the impression it's "a tiny fraction of the open source community"? This article [2] from 2022 states that 22% of software project have a copyleft license. Is that a fraction you'd deem "tiny"?

[1] https://en.wikipedia.org/wiki/Free_software_movement

[2] https://www.mend.io/blog/open-source-licenses-trends-and-pre...


I'm a free software advocate, but I'm not a free software zealot. I think nonrestrictive terms of use is the only way to remain ethical. However I'm also a pragmatist and understand the value and use of non-free software. Zealots famously allow for no such exceptions.

Another example There are a number of "rust zealots" who believe it's a moral imperative to rewrite all software in rust, and any who disagrees is immoral and acting in bad faith. Similarly the number of people who are rust zealots are a small fraction of those who like and advocate for rust.


Any binary dependency you have would need to be present for all target architectures in your virtualenv for this to work. But when you pip install a package only the binary for your current platform gets installed.


I presume you'd have the same problem with the binary, there'd have to be separate builds for arm, x64, etc.


There are separate static builds for aarch64 and x86_64, those are put into a "fat binary" that runs on current generation hardware/software combos (osx with aarch64, win with x86_64 and linux with both). Just building for two things is better than figuring out the whole matrix of OS vs architectures which was the other option.

For other architectures like Power/armv7/i686 the software can run using the Blink project [0] [0] https://github.com/jart/blink


> But learning a language isn’t particularly hard

I'm very curious about what makes you think that. I belive it's true only if you already speak one or two other similarly rooted languages, or if you learn the language before you're 10.

Did you learn your first foreign language as an adult and found it "not particularly hard"?


people often move to places with a language that is needed to exist in that place and then manage to learn that language. I would say becoming proficient in a language with small effort and no especial facility in languages should take no more than 2 years. With a good deal of intensive effort, focus and natural 3-6 months.

this also depends a lot on the language, many of the Romance languages are relatively easy to learn, many of the Nordic ones seem quite difficult.

Difficulty of course may depend on what you are moving from to what you will be using.


Abilities to do this range widely with individuals.

Leaving that aside, there is a concept of linguistic distance from people´s first language, which makes it easier or harder to learn another language. French and English are very close to each other, as are Arabic and Hebrew, the Scandinavian languages are also all very close to each other (a little further from English), except for Finnish of course, which is kind of out there on its own. There is a nice recent paper looking at this in the academic context:

https://www.sciencedirect.com/science/article/pii/S004873332...

Essentially how far your native tongue is from the language you are attempting to learn will drastically affect how long it takes to learn it for most people.


For the other direction, based on a couple of centuries of data: https://www.state.gov/foreign-language-training/

Some languages take english L1 speakers 3x as long to learn as others.

I agree with GP's 2 years for Cat I-II languages (assuming you're mostly living there and learning the language in your spare time, not intensively).


I spoke absolutely fluent French, when I was a kid, living in Morocco. You could say a sentence; half in English, and half in French, and I'd not notice the difference.

I've forgotten almost every word. It would be quite difficult for me to relearn, at 61, and I'd likely not have anywhere near the efficacy, that I had, then.

People say how easy it is to learn new programming languages. I've probably written in a half-dozen different ones, over the years.

IME, learning the basics takes a week or two, but it takes years to really grok the language, at the fundamental level.


Chance is you haven't forgotten as much as you think and it would come back super fast if you had to use it daily again.

Having said that, this is a thing to be able to learn a language enough to interact with people and live in a country where another language is spoken. It is a different thing to use that language to understand completely scientific/medical/law/tax forms and texts.


> It is a different thing to use that language to understand completely scientific/medical/law/tax forms and texts.

Jargon has to be learned independently. This is true of every kind of jargon, not just academic and legal stuff. If you want to talk to junkies and sound like one of them, you'll have to learn how first.

The technical term for this kind of concern is usually "register", as in "writing in an academic register".

A Chinese college student once asked me to review a paper of theirs for English quality, because their professor had criticized the English in a prior paper and they trusted me to be a native speaker (which I am). But being a native speaker didn't really help; once I saw the paper, I had to say "I'm sorry, but I don't have academic business training; I can't guarantee that anything I said would be phrased correctly."


> I've forgotten almost every word. It would be quite difficult for me to relearn, at 61

Have you tried? It would probably be a lot easier than you imagine.


Not really. Maybe you’re right.

It would not be useful, unless I lived in an area where I would use it. Maybe if I moved to Canada.

Same goes for computer languages. At one time, I was quite fluent in C++, but I can hardly recognize it, anymore.


With both programming languages and spoken ones you also have the language moving on without you.

If you remembered pre-C++0x, or god forbid, pre-Standard C++, it would probably hurt as much as it helped, as your old idioms would either be outdated by new std features, or outright dangerous by modern coding standards.

At least with old spoken languages, you'll just either sound like a small child or a character from an old movie, using slang that no one uses anymore.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: