Settings

Theme

Show HN: FUSE filesystem for Google Drive written in OCaml

github.com

86 points by astrada 13 years ago · 29 comments

Reader

chrissnell 13 years ago

I've never used OCaml so I started randomly clicking through your source. I was looking at this file:

https://github.com/astrada/google-drive-ocamlfuse/blob/maste...

It seems like it's using some GAE node (presumably owned by the author) for something to do with authentication. Would the author care to explain what's going on here?

bsaul 13 years ago

OCaml is pretty big in french universities, but could anyone from other countries say how popular this language is in their country (education and corporate sectors) ?

I'm quite surprised to see a news about this language on the front page of HN.

  • benesch 13 years ago

    I can't speak to other undergraduate programs, but it's taught as the second course in Computer Science (Intro II) at Harvard College [0]. That said, it was chosen because it was less popular than other functional languages (namely Haskell or a Lisp flavor), so everyone was likely to be starting on "equal footing."

    Take a look at the OCaml success stories [1]. Unison [2] in particular stands out—it's essentially the only two-way rsync tool for Unix, and it's written entirely in OCaml.

    The only corporation I know of that uses OCaml is Jane Street Capital [3][4]. They've been huge proponents since they switched over, but the movement doesn't appear to have caught on among many other US-based companies. (More complete list [5].) Jane Street recruits fairly heavily from Harvard for internships—presumably because very few schools teach OCaml.

    [0] http://cs51.seas.harvard.edu/

    [1] http://caml.inria.fr/about/successes.en.html

    [2] http://www.cis.upenn.edu/~bcpierce/unison/

    [3] http://janestreet.com/technology/

    [4] http://janestreet.github.io/

    [5] http://ocaml.org/companies.html

  • BMarkmann 13 years ago

    Probably the most known group using it in the US is Jane Street.

    https://ocaml.janestreet.com/

  • timsally 13 years ago

    OCaml sees a lot of use in the applied program analysis community, which has applications to automated reverse engineering and formal verification. A company in this area recently started by CMU assistant professor David Brumley is: http://www.forallsecure.com/mayhem.html.

  • georgemcbay 13 years ago

    It isn't widely used here in the USA, in my experience and outside of people who are big fans of ML and derivatives, or those who had some OCaml exposure in college courses, most programmers here seem to be largely unaware of it.

    I'm aware of it primarily through my exposure to Nicolas Cannasse's Haxe language, the compiler for which is written in OCaml.

  • mhd 13 years ago

    It is a compiled language with some decent enough unix integration, so this isn't the first system-level program I've seen written in it. The rather popular unison file synchronizer is Ocaml, too, if I'm not mistaken. For a while the most popular Linux client for the edonkey peer-to-peer file sharing network was mldonkey. And just recently I stumbled across a minimal PDF viewer called llpp that turned out to be Ocaml, too.

    You can easily distribute packages without huge dependencies, it's not any worse at concurrency than your usual Unix go-to language C, and the FFI ain't half bad, either. It's also relatively unopinionated about IO, which certainly helps writing servers and system utilities.

    There's also parsers and some web stuff, but I'll let others talk about this. Just wanted to say a bit about this somewhat surprising niche where the language managed to eke out a bit of a marketing share.

  • fabriceleal 13 years ago

    In Portugal I would say it doesn't exist...

    But I have knowledge of its usage on some projects by big corporations.

    It seems that janestreet [1] takes great pride in using OCaml. They have some interesting open source projects in github [2] and bitbucket [3].

    And facebook has pfff [4], an "Ocaml API to write static analysis on source code" (such as PHP code, not only OCaml code).

    (I'm not a facebook or janestreet employee)

    [1]: http://janestreet.com/

    [2]: https://github.com/janestreet

    [3]: https://bitbucket.org/janestreet

    [4]: https://github.com/facebook/pfff

    • icebraining 13 years ago

      We were taught OCaml in the Software Engineering undergraduate course at FCT-UNL, in Portugal, along with Prolog, C and Java.

      • fabriceleal 13 years ago

        My bad ... I wasn't aware. Do you know any Portuguese company that uses OCaml?

        • icebraining 13 years ago

          No, not really, it seems almost all use Java or .NET languages. Thankfully, I found a Python startup here in Lisbon.

  • jahewson 13 years ago

    F# is a superset of OCaml and both are descendants of ML (ML was created here in Edinburgh). Having worked with Ocaml extensively I would say that the ecosystem around the language is pretty stale: the standard library sucks, as does the documentation for it and important libraries such as "batteries included" are under the GPL, which rules out many uses. Usability is poor: stack traces can be a nightmare to get working properly, the compiler errors are the worst I have ever encountered anywhere (including C++ templates!), there's no standard build chain, the list goes on...

    I switched to Scala and haven't looked back. Haskell is very popular here in Edinburgh also.

    • jon_smark 13 years ago

      You should take a new/better look at OCaml, as most of the information you mentioned is wrong and/or out-of-date. For instance:

      * F# is not a superset of OCaml. OCaml has a number of powerful features missing from F#, like functors, polymorphic variants, and first-class modules.

      * I disagree that the ecosystem is "stale". There's lots of recent activity around the language, and you can find libraries for almost everything.

  • apaprocki 13 years ago

    On my team at Bloomberg, we built a non-trivial (roughly 20k loc) DSL -> C++ "transpiler" in OCaml that is in the critical path responsible for building core parts of the infrastructure.

  • bfung 13 years ago

    University of Illinois teaches it in the Programming Languages course: http://courses.engr.illinois.edu/cs421/mps/index.html

    Back in when it was CS 321, the course used bison and ocaml to build a smaller ML language, which helped in understanding ocaml itself!

  • astradaOP 13 years ago

    In Italy it isn't popular at all, but a couple of friends of mine use OCaml, mostly for hobby projects. And I like the language. It is more advanced than main stream languages I know (C#, Javascript), but, being strict, it is easier (for me) to reason about than Haskell.

  • zhemao 13 years ago

    I think it's relatively popular in University courses on compilers and programming languages. We use it for our Programming Languages and Translators course (i.e. the course the Dragon Book was written for) here at Columbia University.

  • tbrownaw 13 years ago

    University of Illinois uses it for CS421 "programming languages and compilers" (or at least they used to, and I'm assuming it won't have changed).

    We don't use it at work, and I haven't heard any mention of it (or any other functional languages) at the various local programmer groups I recently started going to.

  • bcuccioli 13 years ago

    It's used in Cornell's intermediate-level, required, notoriously difficult functional programming course.

    • agumonkey 13 years ago

      It looks larger than the one I had in France. Happy to have read your comment.

      offtopic ps: for a minute the staff pictures were CV segmented which was quite original.

  • munin 13 years ago

    you learn it in the PL class at UMD (that everyone takes) and the compilers class (which is an elective) uses it for everything.

rca 13 years ago

That's seems like a neat app! How did you handle the concurrent remote-access on the files? Is there a way for the user applications to be warned when you receive an operational transformation? I'm implementing a fuse filesystem for a similar webapp and I thought it would be impossible for an editor that hasn't be designed for that to deal with the concurrent modifications, even if the filesystem can handle it.

gregwebs 13 years ago

I am using the google drive app for Windows (in a shared folder that my Linux VM sees). When I save a file with Vim it creates a duplicate copy on the GDrive server.

I couldn't figure out how to turn off Vim's file saving behaviour, so I will give this a shot and see if it works better.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection