OCaml.org Newsletter: February 2024
Welcome to the February 2024 edition of the OCaml.org newsletter! This update has been compiled by the OCaml.org team. You can find previous updates on Discuss.
Our goal is to make OCaml.org the best resource for anyone who wants to get started and be productive in OCaml. The OCaml.org newsletter provides an update on our progress towards that goal and an overview of the changes we are working on.
We couldn't do it without all the amazing OCaml community members who help us review, revise, and create better OCaml documentation. Your feedback enables us to better prioritise our work. Thank you!
This newsletter covers:
- OCaml Documentation: New documentation has been released, and existing documentation has been improved.
- OCaml Cookbook: A prototype of an OCaml cookbook that provides short code examples that solve practical problems using packages from the OCaml ecosystem is on staging.ocaml.org/cookbook.
- Dark Mode: We're almost ready to release dark mode now.
- Community Section Rework: We are preparing wireframes for the community section to better present the existing content. In addition, we started preliminary work towards a dedicated "Events" page.
- General Improvements: As usual, we also worked on general maintenance and improvements based on user feedback, so we're highlighting some of our work below.
Open Issues for Contributors & Outreachy Application Period
There are open issues for external contributors. However, since github.com/ocaml/ocaml.org participates in the Outreachy application period, we might have a shortage of open issues in March, since Outreachy applicants will quickly take them on.
You can find open issues for contributors here!
OCaml Documentation
User Testing
Twenty-one brave newbies accepted being observed for one hour while discovering OCaml through the online docs and completing a couple of programming tasks. Many thanks to all the participants of the user testing sessions we held!
Half of the user testing participants used the recently updated tutorials, the other half used v2.ocaml.org/docs. Our takeaway from this is:
- Learning OCaml isn't hard. However, learning functional programming is. Most participants who had previous FP experience successfully completed the tasks.
- The updated docs do a little better than the manual at teaching both OCaml and FP to participants without FP experience. A few of them succeeded at the more complex tasks using the new tutorials, while all participants without FP experience failed using the old documentation.
By observing the participants try to make sense of the tasks and find relevant materials in the documentation, we have identified many smaller changes that are likely to improve the user experience on the documentation pages.
Relevant PRs and Activities:
- In Progress:
- In Review (internal):
- In Review (community):
- Published:
- Maps
- Sets
- Options
- Modules, Functors, Libraries With Dune (see Discuss)
- Labelled Arguments
- The OCaml Playground by @The-Amoghavarsha
- Running Commands in an opam Switch
- Mutable State / Imperative Programming (see Discuss Thread)
- Announcement on Discuss: New Tutorials on Basics of OCaml
- Basic Data Types (see Discuss Thread)
- Functions and Values (see Discuss Thread)
- Installing OCaml (see Discuss Thread)
- A Tour Of OCaml (see Discuss Thread)
- Your First OCaml Program (see Discuss Thread)
- Introduction to opam Switches
- Fix Homebrew Errors on Apple M1
- Operators
- Error Handling (see Discuss Thread)
- Arrays (see Discuss Thread)
- Sequences (see Discuss Thread)
- Other Activity:
- (docs) Basic Data Types: Add link to module Str
- First class module (Learning/Language/Module System) by @F-Loyer
- Update bp_03_run_executables_and_tests.md by @F-Loyer
- DOC: replace dream with yojson in first program by @heathhenley
- Update typo + change from append to prepend by @danipoma
- Add workspace file for use with dune-pkg by @gridbugs
- Fix typos in guidelines by @cionx
- Removing dune from setup instructions by @The-Amoghavarsha
- Improve some wording in the functors tutorial by @neuroevolutus
- Add link from operators to monads by @cuihtlauac
- (doc) Improve wording in "Libraries with Dune" tutorial by @The-Amoghavarsha
- Replace Variable by Parameter by @cuihtlauac
- (docs) Adding an example of a closure that contains mutable state in Mutable State & Imperative Tutorial by @The-Amoghavarsha
- (docs) Recommend dune watch mode by @yawaramin
- (docs) Set “Sets“ as Set's tutorial title by @cuihtlauac
- (docs) Correct map to map_error in Error Handling Guide by @cuihtlauac
- Omit mention of Merlin by @yawaramin
Upcoming OCaml Cookbook
We made some progress towards adding a new, community-driven section to the Learn area: the OCaml Cookbook. The cookbook aims to be a compilation of recipes that provide code samples that solve practical-minded tasks using packages from the OCaml ecosystem.
Here is the design we are considering:
- Category: High-level groups of tasks, e.g., networking, data compression, or command line arguments.
- Task: Single thing to be done in a category, e.g., write to a file, make an HTTP GET request, or return an exit status.
- Recipe: Version of task using a package, e.g., HTTP GET using
curly
orcohttp
.
A rough prototype is on staging.ocaml.org/cookbook. The contributions and the user feedback we received suggest that the structure of the cookbook needs to be refined one more time until it is ready to be released.
A good place to give feedback on the cookbook is this discuss thread.
Relevant PRs and Activities:
- Prototype OCaml Cookbook
- Contributions to the Cookbook:
- (WIP) Cookbook : filesystem by @F-Loyer
- (WIP) Cookbook networking by @F-Loyer
- (WIP) Cookbook xml by @F-Loyer
- (WIP) Cookbook : Web / simple HTTP client by @F-Loyer
- (WIP) Cookbook Web / uri by @F-Loyer
- (WIP) Cookbook: Regexp (ppx_regexp) by @F-Loyer
- Cookbook : encoding by @F-Loyer
- Cookbook : and Sorting list and arrays by @F-Loyer
- Cookbook textprocessing by @F-Loyer
- Cookboot : Add a Database / ezsqlite entry by @F-Loyer
- Cookbook concurrency : Lwt by @F-Loyer
- Cookbook caqti ppx rapper by @F-Loyer
- Cookbook Ezsqlite - typo and rewriting by @F-Loyer
- Cookbook Sorting - typo by @F-Loyer
Dark Mode
In December, oyenuga17 started to implement the new dark mode on OCaml.org.
By now, the new dark mode is mostly complete, but it hasn't been reviewed or tested sufficiently.
We have enabled the dark mode on staging.ocaml.org, based on your browser / operating system preferences. If you want to help, you can view the dark mode on staging.ocaml.org and report anything you see by opening an issue.
Completed Pages:
- Learn/Get Started + Language + Guides by @oyenuga17
- Learn/Excercises by @oyenuga17
- Learn/Books by @oyenuga17
- Learn/Platform Tools by @oyenuga17
- Packages Search Results by @oyenuga17
- Packages + Community by @oyenuga17
- Blog + Jobs + Changelog by @oyenuga17
- Learn/Overview by @oyenuga17
- Install + Papers + Logos and Policy Pages by @oyenuga17
- Governance + Outreachy Internships Page by @oyenuga17
- Komepage + Tutorial Search Results Page by @oyenuga17
- OCaml Workshop + Success Stories by @oyenuga17
Community Section Rework
This month, we have started to do user research on the community area and gathered feedback and ideas on the current pages. Among others, we have identified these:
- the Community section needs a better Events directory
- the Jobs page needs to be more easily reachable from the community page
- it would be great to highlight Open Source projects from the OCaml ecosystem that are looking for contributors
If you have opinions on the community section, feel free to share them in this discuss thread!
Relevant PRs and Activities:
- Create Community Subnav to put Jobs under Community by @sabine
- Add Title for Breadcrumb Subnav (e.g. "Learn" / "Community") by @sabine
General Improvements
Many thanks go out to the many contributors who helped improve OCaml.org in February. Find them listed below!
Relevant PRs and Activities:
- General:
- Make tutorial field short_title optional by @amarachigoodness74
- (build) Dont Crunch the data/ Folder by @sabine
- Refine Learn Landing Page Styles to meet Figma Design by @sabine
- Remove obsolete text on difficulty symbols on exercises page by @cuihtlauac
- make the github links on ocaml.org point to the ocaml org by @v-gb
- feat: create ocaml playground mobile view by @FatumaA
- Add OCaml Language Manual button on Learn Overview hero section by @sabine
- Bugfix: Remove the duplicated "Docs" link and make it looks like the figma by @kiyov09
- Advertise atom feed in head using link by @cuihtlauac
- adjust list bullet color by @egmaleta
- Make the playground cursor more obvious by @sabine
- Add Two Packages to "Is OCaml Web Yet?" by @F-Loyer
- Data parsing:
- (ood-gen) Make optional list types in 'tutorials' type non-optional by @egmaleta
- (ood-gen) Adjust type of fields with
list option
type tolist
in Changelog, News, Planet, and Workshop by @egmaleta - (ood-gen) Unify Data.Event / Data.Meetup into Data.Event / Data.Event/RecurringEvent by @sabine
- (ood-gen) Adjust type of fields with
option
type in Workshop by @egmaleta - Do not generate empty data/watch.yml by @cuihtlauac
- Don't let get_ok swallow error causes by @cuihtlauac
- (ood-gen) Adjust type of fields with bool option type to bool in Release by @egmaleta
- Data: