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

How does one handle an upgrade to mutators? If a client is running old code then the operation will differ to the server. Obvious answer would be to version them independently: `increment_v1`, `increment_v2`, but wondering if there is a better answer?


At the moment there is no better answer than do not remove your old mutators until you know there are no more clients out there that might have pending changes.

Right now that window is pretty small because we haven't turned on persistence yet.


Has anyone built a mobile app on top of SQLite that can work offline, but then sync to a server when it gets connectivity? It feels like this could be built with a similar approach to this distributed SQLite, you'd "just" need more robust conflict handling.


I haven't personally but typically people use a CRDT-based approach like vlcn[1] or Mycelite[2].

[1]: https://github.com/vlcn-io/cr-sqlite

[2]: https://github.com/mycelial/mycelite


Great that you brought it up. I will fill in the perspective of what I am doing for solving this in Marmot (https://github.com/maxpert/marmot). Today Marmot already records changes via installing triggers to record changes of a table, hence all the offline changes (while Marmot is not running) are never lost. Today when Marmot comes up after a long off-time (depending upon max_log_size configuration), it realizes that and tries to catch up changes via restoring a snapshot and then applying rest of logs from NATS (JetStream) change logs. I am working on change that will be publishing those change logs to NATS before it restores snapshots, and once it reapplies those changes after restoring snapshot everyone will have your changes + your DB will be up to date. Now in this case one of the things that bothers people is the fact that if two nodes coming up with conflicting rows the last writer wins.

For that I am also exploring on SQLite-Y-CRDT (https://github.com/maxpert/sqlite-y-crdt) which can help me treat each row as document, and then try to merge them. I personally think CRDT gets harder to reason sometimes, and might not be explainable to an entry level developers. Usually when something is hard to reason and explain, I prefer sticking to simplicity. People IMO will be much more comfortable knowing they can't use auto incrementing IDs for particular tables (because two independent nodes can increment counter to same values) vs here is a magical way to merge that will mess up your data.


Not 100% sure if it uses SQLite, but there's an app called "Flaming Durtles" on Android. It's a frontend for WaniKani (Japanese learning app). The app downloads all the lessons from WK's servers, and you can do them even when offline. When you go online, it uploads them to the backend and syncs everything else. In my experience, it works flawlessly.

It's actually a 3rd party app, WK provides an API so that people can make apps that interface with the system.

Forum thread: https://community.wanikani.com/t/android-flaming-durtles-and...

Source code (may be outdated): https://github.com/ejplugge/com.the_tinkering.wk


Not sure how it's implemented but seems like a pretty common pattern on Android. For instance, Gmail and Mint apps both allow offline changes that get synced. Not sure if they use SQLite but afaik that's sort of the defacto standard for Android app storage.


we have done it a few times. It is a lot more work and a lot of edge cases come up, especially if the same data can be written by multiple people. But if data or use case is such that only one person can write to same data and you limit only one logged in client at a time, it's much easier to do.


Looks great! I've currently use https://contexts.co/ but might switch over for the thumbnails


This also addresses an issue when you transition from black to transparent to emulate a shadow, and end up with a "cliff" where the gradient abruptly changes. You can see this in the tool when you transition from black to white with LRGB. Any of the other color spaces avoid it. Very cool!


Although it technically has cross platform GUI, Flutter has actually reimplemented all the native OS widgets. As soon as the OS changes some look and feel your app will look out of date.


Yes it will look out of date. But whats important? A functioning app or good looking one? We all know that websites written for ie6 are out there today making millions in revenue. It always comes down to the functionality not the looks


> But whats important? A functioning app or good looking one?

Depends on your audience.


It probably will be good looking just wont be aesthatically consistent with new OS looks.


Both. If you have only one, you have a shit product nobody wants.


I'm not advocating for garbage looking products. All I'm saying is that lets be tolerant on looks because functionality matters the most


You can be as tolerant as you want, that's not how things go for iOS apps. It's certainly not how things go on macOS except when there are no available alternatives.

Windows, Android, and the web, constantly changing so that there's never really been any sense of stability, blind a lot of developers to the fact that good design is both functionality AND looks.

When people complain about designs of controls being out of date, they don't only refer to looks. They refer to how they feel, behave — or more succinctly, don't correspond to the expectations set up by the rest of the system.

To reduce the debate down to looks vs. functionality is reducing things down to the wrong level, missing the forest for the trees, and ignoring the user — a person who often isn't able to express what they need but knows what they want, not often realising that they're the same thing.


Do you know what effect those changes have in the body?


We currently use wasm on the Adobe XD team for rendering shared prototypes in the browser. It allows us to share C++ rendering code across desktop and web and has been a massive success for us.

The browser support is good enough for our customer base, as it works across all operating systems and mobile devices, and we can fall back for asm.js for IE11.


You might be interested in a tool I wrote to serve .har files called server-replay: https://github.com/Stuk/server-replay

It also allows you to overlay local files, so you can change code while reusing server responses.


Thanks for mentioning Arq, that looks really useful. What are the cons you've found?


"atom" probably includes searches for the particle, not just the editor, so not really fair comparison.

Also "vs code" trends higher than "visual studio code", so take all of these results with a pinch of salt.


Except for the fact that you can “type hint” your query term (in this case, Atom: Text Editor), which the referenced URL does.


If you look it says "Atom - Text Editor"


That graph shows it was almost as popular in 2004 as it is today, so obviously that term isn't just referring to the editor. (since it wasn't released until 2015)


But if you select "Visual Studio Code - Text Editor", then that one becomes the most popular - see link I posted above


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: