Open patricoferris opened 4 years ago
Many thanks for your work on this Patrick, and for posting the summary here. I'm working on making the ocaml.org site infrastructure be easier to contribute to (see https://github.com/ocaml/ocaml.org/issues/1178), and so I suggest:
Thanks @avsm, sounds like a plan 🍂 🧹 !
If anyone comes across this issue then do feel free to head over to Explore OCaml and contribute whether that's fixing typos, imparting valuable workflow information or otherwise:
I would add a link to explore in the header of awesome-ocaml and the homepage of ocamlverse, to help beginners now, until this content gets into ocaml.org proper
Good idea @kanishka-work -- it might also be useful to publicise more generally (as WIP) given the recent results of the OCaml survey where documentation/opam+dune/workflows featured quite heavily imo.
Explore OCaml
Current Work
Hi everyone, I'm Patrick working at Tarides on a project called "Explore OCaml". The purpose of Explore is to provide an as-up-to-date as possible set workflows for being productive in OCaml. Primarily this is done utilising the OCaml Platform that @avsm talked about at the OCaml Workshop as well as some battle-tested community libraries.
Please note the site is very much a work in progress.
Explore OCaml made to look like ocaml.org: https://deploy-preview-27--ocaml-explore.netlify.app/
Explore OCaml as is: https://ocaml-explore.netlify.app/
Source Code: https://github.com/ocaml-explore/explore
Some workflow examples include:
Configuring editors (VS Code, vim, emacs)
Fixing bugs in third party packages
Adding units tests and setting up continuous integration
Publishing and releasing to Opam (not written yet...)
Profiling OCaml code
There are quite a few great resources (like blog posts) on how to do specific things, but no centralised recommend way to do them. My OCaml journey started more or less a year ago (along with some others) and we all seemed to share the same pain points around documentation of tooling and workflows. Fundamentally this builds on what @johnwhitington described in #1136 but focusing on the OCaml Platform.
Proposal
Do people feel this kind of content would work well on ocaml.org say under
explore.ocaml.org
or similar? What's important is that there is a strong focus on getting a fairly specific task done. The dune documentation is great, but for many it is not immediately useful when they have the question "how do I start a new OCaml project" or when they find a bug in someone else's code theopam source
andopam pin
tools won't necessarily spring to mind from the opam documentation.This is fine, those documents are not there to catch these cases, but I believe something like Explore OCaml could. I think this will also help unify and solidify the OCaml Platform as a community-approved suite of tools for achieving these workflows.
Lessons learned from building Explore OCaml
Whilst building Explore OCaml, I think I've come across a few key aspects that are (in my eyes) crucial to a site whose primary purpose is to inform and document. Perhaps some of these lessons are transferrable to OCaml.org.
dune build
anddune runtest
are executed. This is a big maintenance burden lifted off the maintainers as the content is continuously tested (and could be on multiple OSes) to ensure it is correct. Mdx ensures the inline code is also correct using the dune diffing functionality.explore
) for building the site, running a local development server (which rebuilds on refreshes making it easy to preview changes), a "wizard" for generating new content types and linting those files to ensure they are correct. It acts as a mediator between developers that want to contribute and the maintenance and sustainability of the site.I think these points really help to maintain the code sustainably by trying to automate as many tasks as possible and offer a friendlier interface for people to contribute.
Lastly (thank you if you made it to the end) I would like to say thank you to the contributors and maintainers of ocaml.org -- I think documentation/teaching/informing is an often overlooked aspect to languages but one of the most important!