Qian : my first Elm project

Hi there !
Months ago, I wrote my first Elm program. It is a File explorer that uses Electron.
The global feedback of this experience is that Elm is really enjoyable to write UI and the “ports” are really usefull to write unsafe code.

The project lives here : https://github.com/xvw/qian
I am currently working on the roadmap for the 2th version where the ports will be written in OCaml. A bit like what I started here: https://github.com/phutur/neige

Feel free ton contribute and and make some feedbacks (if you have the time).

See ya !

9 Likes

Hi!

Glad to see something like this, really cool!

Why OCaml and not PureScript for the ports? I mean, PureScript philosophy is nearest from elm than OCaml. In OCaml, you have object, you don’t have the Eff monad, etc. My first intuition would be to go with PS, so maybe OCaml is a better choice? :slight_smile:

Anyway, good work!

Glad to see something like this, really cool!

Thanks !

Why OCaml and not PureScript for the ports?

I chose OCaml because I love OCaml :slight_smile: and to be honest, I am more comfortable with OCaml than with PureScript. (But PureScript is on my short-time-todo-list).

In OCaml, you have object

Yes, and Object fit very well with the JavaScript environement. But be reassured, you can write pure-object without state-mutation :wink:

you don’t have the Eff monad

I could handle dynamic effects using free monad (or be patient and wait for multicore and his effect handler).

In addition, syntax extensions of OCaml (via ppx) could generate me the module “port” Elm to guarantee a good typing between ports.

But the main reason is that I really love OCaml ^^

That’s an excellent reason! :slight_smile: