4
40
Fork
You've already forked tinyrwm
16

Add Ocaml implementation #15

Open
ricmaps wants to merge 3 commits from ricmaps/tinyrwm:add-ocaml into main
pull from: ricmaps/tinyrwm:add-ocaml
merge into: river:main
river:main
Contributor
Copy link

I tried making it as functional as I could given the stateful nature of wayland protocols :)

I tried making it as functional as I could given the stateful nature of wayland protocols :)
Add Ocaml implementation
Some checks reported errors
builds.sr.ht/archlinux Job failed
builds.sr.ht/alpine Job failed
032aed4085
ricmaps force-pushed add-ocaml from 032aed4085
Some checks reported errors
builds.sr.ht/archlinux Job failed
builds.sr.ht/alpine Job failed
to 021c47fd33
All checks were successful
builds.sr.ht/archlinux Job completed
builds.sr.ht/alpine Job completed
2026年06月13日 05:15:03 +02:00
Compare
ricmaps force-pushed add-ocaml from 021c47fd33
All checks were successful
builds.sr.ht/archlinux Job completed
builds.sr.ht/alpine Job completed
to ee2d5ef342
All checks were successful
builds.sr.ht/archlinux Job completed
builds.sr.ht/alpine Job completed
2026年06月13日 05:22:25 +02:00
Compare

Very cool! I guess I'll need to learn a bit of OCaml :)

Would you please add CI steps to ensure that fetching dependencies and building works? Could also test that the .ocamlformat is enforced in the CI.

Very cool! I guess I'll need to learn a bit of OCaml :) Would you please add CI steps to ensure that fetching dependencies and building works? Could also test that the `.ocamlformat` is enforced in the CI.
add ocaml task to ci
Some checks reported errors
builds.sr.ht/alpine Job failed
builds.sr.ht/archlinux Job failed
02c2d09e8d
ricmaps force-pushed add-ocaml from 02c2d09e8d
Some checks reported errors
builds.sr.ht/alpine Job failed
builds.sr.ht/archlinux Job failed
to e534558f7f
Some checks reported errors
builds.sr.ht/alpine Job failed
builds.sr.ht/archlinux Job failed
2026年06月15日 22:31:43 +02:00
Compare
ricmaps force-pushed add-ocaml from e534558f7f
Some checks reported errors
builds.sr.ht/alpine Job failed
builds.sr.ht/archlinux Job failed
to df32b19ecd
All checks were successful
builds.sr.ht/archlinux Job completed
builds.sr.ht/alpine Job completed
2026年06月15日 22:43:21 +02:00
Compare
Author
Contributor
Copy link

sorry for all the force pushing. the alpine ocaml package is way too old for the project

sorry for all the force pushing. the alpine ocaml package is way too old for the project
@ -0,0 +355,4 @@
if contains_edge Edges.top edges then sub start_height dy else start_height
in
let height = if contains_edge Edges.bottom edges then add height dy else height in
River_window.propose_dimensions window.proxy ~width ~height
Contributor
Copy link

will this allow a user to propose window dimensions of zero or less? (for example, when attempting to make an infinitesimally small window?)

all of the other implementations are (effectively) taking a max of the width/height and 1 here, and although I don't see that being done here it could be that I am naive to some Ocaml magic. :)

will this allow a user to propose window dimensions of zero or less? (for example, when attempting to make an infinitesimally small window?) all of the other implementations are (effectively) taking a max of the width/height and `1` here, and although I don't see that being done here it could be that I am naive to some Ocaml magic. :)
Author
Contributor
Copy link

haha yes it's an ocaml spell named "oopsie". thanks for pointing it out! i mostly looked at the rust implementation while writing this since rust is the closest language to ocaml in the repo, so that's why

haha yes it's an ocaml spell named "oopsie". thanks for pointing it out! i mostly looked at the rust implementation while writing this since rust is the closest language to ocaml in the repo, so that's why
fix call to propose dimensions
All checks were successful
builds.sr.ht/archlinux Job completed
builds.sr.ht/alpine Job completed
40c79a589b
All checks were successful
builds.sr.ht/archlinux Job completed
builds.sr.ht/alpine Job completed
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u add-ocaml:ricmaps-add-ocaml
git switch ricmaps-add-ocaml

Merge

Merge the changes and update on Forgejo.
git switch main
git merge --no-ff ricmaps-add-ocaml
git switch ricmaps-add-ocaml
git rebase main
git switch main
git merge --ff-only ricmaps-add-ocaml
git switch ricmaps-add-ocaml
git rebase main
git switch main
git merge --no-ff ricmaps-add-ocaml
git switch main
git merge --squash ricmaps-add-ocaml
git switch main
git merge --ff-only ricmaps-add-ocaml
git switch main
git merge ricmaps-add-ocaml
git push origin main
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
river/tinyrwm!15
Reference in a new issue
river/tinyrwm
No description provided.
Delete branch "ricmaps/tinyrwm:add-ocaml"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?