profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/AltGr/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

AltGr/docker-opam 7

Docker container for an OCaml + OPAM setup

AltGr/Contre-jour 6

A toy image gallery application for OPA

AltGr/Calibre-french-news-rules 1

Rules for Calibre to handle news from Mediapart, Rue89, and L'Équipe

AltGr/ICFP2012 1

My humble attempt at this year's ICFP contest

AltGr/Marv-the-Tinker 1

A JS-to-JS compiler written in JS to simplify writing, maintaining and troubleshooting JavaScript code bases.

AltGr/alt-ergo 0

OCamlPro public development repository for Alt-Ergo

AltGr/auto-complete 0

Emacs auto-complete package

AltGr/camelus-testing-repo 0

A clone of opam-repository used as sandbox for testing Camelus

AltGr/catala 0

Programming language for literate programming law specification

pull request commentocaml-sf/learn-ocaml

Discourage redundant token creation from users

Rebased

AltGr

comment created time in 9 days

push eventAltGr/learn-ocaml

Louis Gesbert

commit sha 4be47cdc98a07953699b8848aecd5a7da13b7930

Cleanup obsolete ocp-build files

view details

Louis Gesbert

commit sha b66cf2c2b1828a99fca3d4407bd76a95ea3d4aa6

Upgrade ppx-metaquot from upstream

view details

Louis Gesbert

commit sha 2ac5c543511a46c56872022ba4410942816071ee

Port to OCaml 4.12

view details

Louis Gesbert

commit sha 66994f2931d61c03673f06f580144e4bd3d727ec

Debug add env var LEARNOCAML_SERVER_NOCACHE to disable all http caching

view details

Louis Gesbert

commit sha c9c77a98952faacd8b8fa3c617bf6575c030c261

Fixes for Docker and CI

view details

Louis Gesbert

commit sha c704ef53cac3581d06aa3a6f76712d9f0170a4b7

Worst typo ever How did this happen? I thought I was going mad for a moment

view details

Louis Gesbert

commit sha 82cea091b6af6e4d961b86607ae264d4f7e44ce2

Fix linking dune no longer accepts manually setting `-custom` and doesn't allow us to set complete bytecode binaries to be installed :/ (see https://github.com/ocaml/dune/pull/4837) it seems this combination with manual install is the only layout that allows normal and static linking to work...

view details

Louis Gesbert

commit sha 16d2d1251bc5b059fe1dcd1701781d0fac396285

Revert "Merge pull request #261 from beobillly/placement_toplevel_buttons" This reverts commit 3972fe179a4befa676a3b4b4915fabe52887b0ae, reversing changes made to d5c078ca79ec609ee571c10724df82e77251ae6c.

view details

Louis Gesbert

commit sha d61e7c076fc7816deadefda8df0480caf5d4e73e

Fix for #400 and #202 * move buttons to the right so that they are less easy to misclick * reverse order so that "eval phrase" is first

view details

EmileRolley

commit sha 276dac96c8d538a97e628e77b162c49642ae519a

fix(docs): should fix #399 and unify the markdown syntax

view details

Erik Martin-Dorel

commit sha f7bf4204c5b04ed80f73ab0f0736e2242bef42bd

Merge pull request #413 from EmileRolley/fix-md-syntax-err fix(docs): should fix #399 and unify the markdown syntax

view details

Louis Gesbert

commit sha 65ce0c42ef2075458f82c5063254b4fe68b641d0

QoL: reset the toplevel every time before evaluating code from the editor (#411) You might lose what you manually typed directly in the toplevel pane, but that shouldn't be a problem, and most importantly it will avoid already defined ids to clutter the environment. These often cause student confusion with cases like "type t instead of t", or a missing `rec` keyword that compiles because using an older definition.

view details

Erik Martin-Dorel

commit sha 34f04af5e0725e524d73d34d6b2b83b25d2777ed

Merge pull request #408 from AltGr/ocaml-412-port Port to OCaml 4.12

view details

Erik Martin-Dorel

commit sha 90066d0fb2ec468d0a211b371f44c59b7ebe4108

Merge pull request #409 from AltGr/movbuttons Move the toplevel buttons to the bottom-right

view details

Mohamed H

commit sha cbd2009e39fded6671383cf7da164e3a88a37cbe

Fixes unicode caracters display in ace

view details

Mohamed H

commit sha fdb5def9b6944942e28e13ce4df161f8fadc317d

removes the call to Js.Unsafe.eval_string

view details

Mohamed H

commit sha 0ea0663848708929ba72a73de7481f53619d5365

Moves the position conversion function to js_utils

view details

Mohamed H

commit sha e0fa640d508b96d6da027bc4fe352b73ed53d19f

some corrections

view details

Erik Martin-Dorel

commit sha debb635f216016372a44b4e18d97b72296038691

Merge pull request #412 from AltGr/fix-utf8 Fix the display of utf8 characters in the code editor

view details

Louis Gesbert

commit sha 5c5e209185f40b0b03aae60209cdcbba604d1a41

Blacklist jsoo version 3.10.0 It has a breaking bug, see https://github.com/ocsigen/js_of_ocaml/pull/1130

view details

push time in 9 days

issue commentocaml-sf/learn-ocaml

`learn-ocaml build -j 2` is broken

I have examined this a bit, and it attempts to use Lwt_unix.fork() which just can't be made to work reliably (see e.g. https://github.com/ocsigen/lwt/issues/812 and there are others like it) ; duplicating the Lwt state in the child process is just going to result in a mess, I am even puzzled that there appears to have been an Lwt version where it worked at some point.

So the option should just be disabled at this point. The more reasonable implementation could be:

  • define a dedicated CLI command to compile a specific exercise
  • run a whole process with that command inside the Lwt_list.map_p on each exercise, using e.g. Lwt_process.exec. The difficulty is to make sure that all relevant options in the current context are properly passed to the child process.

Or, of course, we could wait for multicore which should make it fairly trivial :rocket:

erikmd

comment created time in 9 days

pull request commentocsigen/js_of_ocaml

Fix toplevel generation

I often say that there are as many string_split variants as projects :)

Thanks!

hhugo

comment created time in 10 days

PR opened ocaml-sf/learn-ocaml

Blacklist jsoo version 3.10.0

It has a breaking bug, see https://github.com/ocsigen/js_of_ocaml/pull/1130

+1 -1

0 comment

1 changed file

pr created time in 10 days

create barnchAltGr/learn-ocaml

branch : blacklist-jsoo310

created branch time in 10 days

create barnchAltGr/js_of_ocaml

branch : fix-bytecode

created branch time in 10 days

PR opened ocsigen/js_of_ocaml

Fix emitting broken toplevel bytecode
+1 -1

0 comment

1 changed file

pr created time in 10 days

pull request commentocaml-sf/learn-ocaml

Fix the display of utf8 characters in the code editor

Rebased

AltGr

comment created time in 11 days

push eventAltGr/learn-ocaml

Louis Gesbert

commit sha 16d2d1251bc5b059fe1dcd1701781d0fac396285

Revert "Merge pull request #261 from beobillly/placement_toplevel_buttons" This reverts commit 3972fe179a4befa676a3b4b4915fabe52887b0ae, reversing changes made to d5c078ca79ec609ee571c10724df82e77251ae6c.

view details

Louis Gesbert

commit sha d61e7c076fc7816deadefda8df0480caf5d4e73e

Fix for #400 and #202 * move buttons to the right so that they are less easy to misclick * reverse order so that "eval phrase" is first

view details

EmileRolley

commit sha 276dac96c8d538a97e628e77b162c49642ae519a

fix(docs): should fix #399 and unify the markdown syntax

view details

Erik Martin-Dorel

commit sha f7bf4204c5b04ed80f73ab0f0736e2242bef42bd

Merge pull request #413 from EmileRolley/fix-md-syntax-err fix(docs): should fix #399 and unify the markdown syntax

view details

Louis Gesbert

commit sha 65ce0c42ef2075458f82c5063254b4fe68b641d0

QoL: reset the toplevel every time before evaluating code from the editor (#411) You might lose what you manually typed directly in the toplevel pane, but that shouldn't be a problem, and most importantly it will avoid already defined ids to clutter the environment. These often cause student confusion with cases like "type t instead of t", or a missing `rec` keyword that compiles because using an older definition.

view details

Erik Martin-Dorel

commit sha 34f04af5e0725e524d73d34d6b2b83b25d2777ed

Merge pull request #408 from AltGr/ocaml-412-port Port to OCaml 4.12

view details

Erik Martin-Dorel

commit sha 90066d0fb2ec468d0a211b371f44c59b7ebe4108

Merge pull request #409 from AltGr/movbuttons Move the toplevel buttons to the bottom-right

view details

Mohamed H

commit sha cbd2009e39fded6671383cf7da164e3a88a37cbe

Fixes unicode caracters display in ace

view details

Mohamed H

commit sha fdb5def9b6944942e28e13ce4df161f8fadc317d

removes the call to Js.Unsafe.eval_string

view details

Mohamed H

commit sha 0ea0663848708929ba72a73de7481f53619d5365

Moves the position conversion function to js_utils

view details

Mohamed H

commit sha e0fa640d508b96d6da027bc4fe352b73ed53d19f

some corrections

view details

push time in 11 days

pull request commentocaml-sf/learn-ocaml

Port to OCaml 4.12

I don't think it will interfere too much with other PRs and should be merged as soon as possible, this has already been stalled for quite long. Note that the number of commits shouldn't matter too much for the order, but the number of affected files (and the "liveness" of these files) is a more important concern; people have different practices but for long-standing branches with lots of commits it's often more reasonable to use merges rather than rebases (I do always prefer rebases for my work branches, but sometimes they just become unnecessarily tedious. I really disapprove reverse merges from master into work branches though!)

As for the CI, there is no reason not to merge https://github.com/ocaml-sf/learn-ocaml-corpus/pull/32/files , it's backwards-compatible with 4.05 and should fix this.

AltGr

comment created time in 12 days

PullRequestReviewEvent

Pull request review commentocaml/opam

Sandbox updates checker

 (rule   (targets opamScript.ml)   (deps    ../../shell/crunch.ml (glob_files shellscripts/*.*sh))-  (action  (with-stdout-to %{targets} (run ocaml %{deps}))))-+  (action  (with-stdout-to %{targets}+  (progn+    (run ocaml %{deps})+    (run sed -i -e "s/$SCRIPTOPAMVERSION\\b/%{read-lines:../version}/g" %{targets})))))

The sed -i %{targets} within with-stdout-to %{targets} seems highly suspicious to me anyway :roll_eyes:

A cleaner approach would be to rename bwrap.sh to bwrap.sh.in, and have a separate rule for the sed from the latter to the former (I don't remember if glob_files will handle it correctly though).

rjbou

comment created time in 25 days

pull request commentocaml/opam

Sync the behaviour of the macOS sandbox script with Linux's

(ergo, I am fine with merging this!)

kit-ty-kate

comment created time in 25 days

pull request commentocaml/opam

Sync the behaviour of the macOS sandbox script with Linux's

IIRC our discussions, we decided the safer option was to keep disallowing writes to /tmp — even if we break POSIX ; the few packages directly writing to /tmp should be fixed already, or shouldn't be too hard to patch.

The alternatives are just not fully satisfactory

kit-ty-kate

comment created time in 25 days

PullRequestReviewEvent

Pull request review commentocaml/opam

Make sure that `--best-effort` only installs root package versions that where requested

 let update_dev_packages_t ?(only_installed=false) atoms t = let compute_upgrade_t     ?(strict_upgrade=true) ?(auto_install=false) ?(only_installed=false)     ~all atoms t =+  let packages = OpamFormula.packages_of_atoms t.packages (List.rev atoms) in

No need to List.rev, see my comment below

LasseBlaauwbroek

comment created time in 25 days

Pull request review commentocaml/opam

Make sure that `--best-effort` only installs root package versions that where requested

 let universe st     ?reinstall     ~requested     user_action =+  let names = OpamPackage.names_of_packages requested in   let requested_allpkgs =-    OpamPackage.packages_of_names st.packages requested+    OpamPackage.packages_of_names st.packages names

This is patched in a reasonable and conservative way...

But this makes me wonder: it would seem consistent to use requested here directly instead of requested_allpkgs. This would potentially change the semantics at some point, but could be expected to lead to the same results...

A visible change I could imagine is when you change the installed version of a package, e.g. with opam install foo.2 when foo.1 is installed: in the current implementation (and behaviour preserved by the proposed patch), foo.1 is a member of requested_allpkgs. This affects:

  • the values of with-test, with-doc: this is harmless, the action on foo.1 can only be a removal
  • the triggering of pending reinstallation within the dependency cone of foo.1

The second point could have visible effects in some cases: the idea is not to trigger pending recompilations (see opam reinstall --list-pending) if you opam install something unrelated. If foo.2 depends on the package needing reinstallation, opam definitely needs to do that reinstallation before compiling it ; but if it's only foo.1, that will just be removed, I guess it can be skipped.

All well considered, I think this can be simplified by just using requested everywhere instead of requested_allpkgs :)

LasseBlaauwbroek

comment created time in 25 days

Pull request review commentocaml/opam

Make sure that `--best-effort` only installs root package versions that where requested

 let import_t ?ask importfile t =     let add_roots = OpamPackage.names_of_packages import_sel.sel_roots in      OpamSolution.resolve_and_apply ?ask t Import-      ~requested:(OpamPackage.Name.Set.of_list @@ List.map fst to_import)+      ~requested:(OpamPackage.Set.union (to_install %% available) unavailable_version)
      ~requested:((to_install %% available) ++ unavailable_version)
LasseBlaauwbroek

comment created time in 25 days

Pull request review commentocaml/opam

Make sure that `--best-effort` only installs root package versions that where requested

 let reinstall_t t ?ask ?(force=false) ~assume_built atoms =   let t, full_orphans, orphan_versions = check_conflicts t atoms in    let requested =-    OpamPackage.Name.Set.of_list (List.rev_map fst atoms) in

rev_map was only here because we don't care about order, no need to List.rev we are converting to a set anyway :)

LasseBlaauwbroek

comment created time in 25 days

PullRequestReviewEvent

Pull request review commentocaml/opam

Make sure that `--best-effort` only installs root package versions that where requested

 let filter_unpinned_locally t atoms f = let install_t t ?ask ?(ignore_conflicts=false) ?(depext_only=false)     ?(download_only=false) atoms add_to_roots ~deps_only ~assume_built =   log "INSTALL %a" (slog OpamFormula.string_of_atoms) atoms;+  let packages = OpamFormula.packages_of_atoms t.packages (List.rev atoms) in

same here

LasseBlaauwbroek

comment created time in 25 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

pull request commentocaml/dune

Byte_complete is an installable mode ?

Yes, sorry. If I have an exe with only modes: byte_complete, dune won't let me use it for installation with public_name. So for example here I had to remove public_name and define my install action manually. The error I get otherwise is:

Error: No installable mode found for this executable.
When public_name is set, one of the following modes is required:
- exe
- native
- byte
AltGr

comment created time in a month

pull request commentocaml/opam

Make sure that recursive dependencies are not reflexive

I guess this is true, although it depends a bit on how one reads the documentation of --required-by and --depends-on.

Hm, that doc probably needs some effort then. The idea is that --depends foo,bar is not the same as --depends foo --depends bar, because the latter wouldn't need an extra syntax.

It's not a very common pattern, so I guess the solution you propose would be fine, dependency queries are not that expensive; and I can't think of an other one :)

LasseBlaauwbroek

comment created time in a month

PullRequestReviewEvent

Pull request review commentocaml/opam

Sandbox: Always mount every directories under / (gets rid of OPAM_USER_PATH_RO)

 add_sys_mounts() {     done } -# remove some unusual paths (/nix/stored and /rw/usrlocal )-# use OPAM_USER_PATH_RO variable to add them-# the OPAM_USER_PATH_RO format is the same as PATH-# ie: export OPAM_USER_PATH_RO=/nix/store:/rw/usrlocal-add_sys_mounts /usr /bin /lib /lib32 /lib64 /etc /opt /home /var /tmp+# NOTE: The list of moint-points to avoid is always to be sync'd with the list at the top of the file+# It is due to a limitation of bubblewrap that we have to mount the directories one by one+# See https://github.com/containers/bubblewrap/issues/413+for dir in $(ls -a /); do

Using ls in shell scripts is generally discouraged, there may be lots of output options enabled locally. I would go with something like:

for dir in /*; do
    if [ ! -d "$dir" ]; then continue; fi
    case "$dir" in
        /proc|/dev|/run|/opam-tmp) ;;
        *) add_sys_mounts "$dir";;
    esac
done

The difference is that this wouldn't mount hidden root directories... could that be an issue ?

kit-ty-kate

comment created time in a month

PullRequestReviewEvent