What does HackerNews think of unison?

Unison file synchronizer

Language: OCaml

I've tested a lot of file synchronization software. I rely via scripts on Unison, originally authored by the computer scientist Benjamin Pierce, and now decades of tweaking by a strong open source community.

https://github.com/bcpierce00/unison

I'd love to see Darke Files get everything right that Unison gets right, that nearly all commercial projects get wrong, through the usual blend of arrogance and ignorance:

* Meta data. It takes a lot to insure that two copies of a MacOS file appear identical to a user. There used to be a test suite on the web that embarrassed everybody.

* Atomic folders such as ".git" or an application bundle. A prototypical example is a MacOS sparse disk bundle, supported by a folder of many small files. This makes incremental backup and transfer more efficient, assuming a single source. Unison lets you specify the conflict resolution at the folder level, all-or-nothing decide which copy or fix it.

* Symbolic links. This is wildly complicated by users, sure they're right, who want special handling to hack features into sync software that aren't there. A symbolic link is just a file, with correct use the responsibility of the user. You wouldn't want sync software stopping to view your porn, right? They're just files, not the sync software's business.

I use Dropbox for various purposes because I need to, but they bungle more of this than one would expect. For example, a typical MacOS application bundle can have internal symbolic links a typical user never notices, pointing the "current" version of resources to a versioned folder. Last I checked, Dropbox expands the symbolic link into a redundant copy, wasting space without kneecapping the app.

One could go on... I've given up on reporting these issues, though the responses would make a hilarious blog post.

I've been using Unison [1] to sync two and more computers for years. I can't recommend it enough.

[1]: https://github.com/bcpierce00/unison

Have a look at unison, it's what I use instead of Syncthing and I couldn't be more happy.

https://github.com/bcpierce00/unison

edit: Also, KeepassXC!

https://github.com/bcpierce00/unison

I use this to keep a few machines synced up. Including a machine that does proper daily backups.

> I hope functional programming languages become popular and also used for systems programming

My absolute favorite OCaml program is Unison [1], which is a cross-platform performant file watcher and sync tool.

It's essential to a good VM or remote development experience, and the the principal technology behind docker-sync. (Mac users will thank me.)

[1] https://github.com/bcpierce00/unison

[2] http://docker-sync.io/

If you're writing anything for the browser, then I'll solidly recommend Reason. It works out of the box and ReasonReact is much more ergonomic compared to vanilla React + ImmutableJS + Redux + TypeScript combo. And there is a growing community around that use case in the Reason world.

If you want to write a command-line application, you can choose either OCaml or Reason, depending on your taste of syntax - both compile to native statically linked binaries. If you're doing anything related to compilers, OCaml is particularly suited for that, and you'll be in very good hands with Menhir (see: https://pl-rants.net/posts/case-for-new-lang/). Another systems software written in OCaml is unison (https://github.com/bcpierce00/unison), which is a file synchronization tool with a clear specification.

But if you want to write database backed web application servers in OCaml, with sessions, background jobs, admin interfaces, ORMs, database migrations and all that jazz, then you might want to give F# a go, or Haskell which has a better story around it. I do have a tiny Node server written in Reason that I use as an API endpoint but if I were to build a full-fledged system, there is nothing yet in the OCaml world like Rails or Django.

In addition to books/tutorials/etc, I've found reading the source to unison [1] was a great way to see a more tangible example of using OCaml to create software

[1] https://github.com/bcpierce00/unison