Outreachy internship

Hello everyone!

I’m interested in doing an Outreachy internship this summer. I’ve seen the OCaml project listed on their website: “Test the OCaml compiler with random tests and a reference interpreter” and it sounds very exciting to me! I’ve used Haskell and a bit of OCaml during my studies and while I’m pretty much a beginner in programming languages implementation area, I’m very much interested in these topics and would love to learn more.

Probably I won’t have time to do an OCaml contribution this week, but in the next one I should manage to do it. I’ve seen some junior_job issues in the bug tracker, but I’m not sure whether I should create an account there and assign me to one of them before making a contribution? Do you maybe have any suggestion about whether I should start with documentation issues or some easy bug fixes or something else?

Thanks!

3 Likes

Hi @lambdanis; thanks for being interested in the Outreachy internship, and in general in contributing to the OCaml community!

If you do start working on one of the junior_job issues, then yes, posting a comment there to say that you are working on it would be useful. (I don’t think you can assign directly.)

If I understand correctly, the Outreachy program requires any sort of contribution to be eligible to apply. You should try the simplest possible thing first, although of course you are welcome to try a bigger task next.

I’m not terribly happy with all of the junior_job tasks on the OCaml bugtracker (some of them are harder than I’d like, some are old and not so relevant anymore…); the Outreachy project lists specific issues that I think are nice entry points, and I will try to add more medium- to larger-sized tasks later in the week.

2 Likes

Hi @gasche, thanks for the response! I’ve seen the issues list on outreachy website as well, will create an account on the bug tracker and look at these issues in more detail later this week.

Hello everyone!

I am interested in participating in an Outreachy internship by working on the project “Test the OCaml compiler with random tests and a reference interpreter” listed on the Outreachy website.
I studied Haskell programming last summer and worked on a Haskell study project this semester. I am very interested to learn more about the implementation of programming languages ​​and to help improve the OCaml language.
I read the instructions, built the OCaml compiler from the source code, registered on the bug tracker under the same nickname as on the forum and would like to start working on any issue as soon as possible. If possible, I would like to start with https://caml.inria.fr/mantis/view.php?id=7548 or https://caml.inria.fr/mantis/view.php?id=6955 issue. I’m not sure if I need to somehow assign myself to the task or the maintainers usually do it.
I will be glad to any advice and recommendations. Thank you in advance.

Hi @Lereena,

Thanks for your interest in the Outreachy internship! I took the liberty to merge your topic with the existing one on the project. To answer your question, you cannot auto-assign an issue on Mantis, but it would be nice to post a comment on it saying that you are working on it.

I updated the list of tasks in the project description with more suggestions.

1 Like

Thank you for answering the question and for updating the task list.
I will look through the list and write in the comments under the task that I will work on it.

Hi everyone! I am also applying for this internship and very excited about starting to contribute!

I have run into a few issues starting off. I thought this may be the right place to ask questions (we could establish a channel in OCaml discord or smth? for better communication between ocaml compiler starters)

  1. I started by creating an empty opam switch and building the compiler from clone of ocaml repo trunk branch into that switch. Is this the right way to go about getting the dev version of the compiler? opam switch does not show the compiler for my switch.
#  switch     compiler                    description
→  ocaml_dev                              ocaml_dev
  1. I am currently working on writing some material for the ocaml tutorial (manual). I am nearly done with the content but cannot wrap my head around "make"ing the manual. I’m closely following the instructions on building the docs but get errors.

Running make in ocaml_repo/manual gives

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tools clean
rm -f *.o *.cm? *.cmx?
rm -f transf.ml htmltransf.ml
rm -f texquote2 transf
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C tools all
../../runtime/ocamlrun ../../ocamlc  -nostdlib -I ../../stdlib -I ../../otherlibs/str -I ../../otherlibs/unix  -o texquote2 texquote2.ml
**make[1]: ../../runtime/ocamlrun: No such file or directory**
make[1]: *** [texquote2] Error 1
make: *** [tools] Error 2

I do not understand why the makefile thinks there needs to be ocamlrun in ../../runtime/.

I tried to run make in ocaml_repo/manual/manual but also got an error:

shell $ make
/Users/ulugbekna/code/ocaml/ocaml_source/runtime/ocamlrun ../tools/texquote2 < allfiles.etex > allfiles.texquote_error.tex
/bin/sh: /Users/ulugbekna/code/ocaml/ocaml_source/runtime/ocamlrun: No such file or directory
make: *** [allfiles.tex] Error 127

Does anybody know how to tackle this? @Lereena have you managed to build the docs?

  1. Does building the ocaml from source make it impossible to get packages from opam? Currently, if I want to get a package, I have to build that package from source, e.g. qcheck (for efftester program generator). Any ideas here?

Thank a lot, sorry for a long post :slight_smile:

The manual build process assumes that the rest of the compiler has been built locally. Doing a make world.opt -j at the root of the compiler should fix these issues. The manual uses the in-tree compiler in order to have a fresh version of OCaml for checking the manual examples and building the documentation for the various libraries.

In general, if you have any question on the manual do not hesitate to ask me on discord (the ocaml channel should be fine) or irc .

@octachron that did the trick! thanks a lot!

Also note that you don’t need a new switch to work on a build of the compiler, you can work without a switch or in some active switch for any OCaml version – the compiler project itself is self-contained and will not use the ambient OCaml binaries, even when available. You only need a switch for the in-development compiler if you want to install other opam packages for that in-development version. (This is not required for any of the “easy tasks” proposed.)

P.S.: I’m not using Discord myself (or IRC), and happy to answer questions here, but whatever works for you.

Now I am working on adding material to the manual. I made changes only to the coreexamples.etex file, during the editing process I built the document several times and looked at how it looks. At the end of the editing, I launched the tests with the command

make tests

from the top directory and for some reason started to fail the ones listed below.

List of failed tests:
tests/lib-unix/unix-socket/'recvfrom_unix.ml' with 1.1 (bytecode) 
tests/lib-unix/unix-socket/'recvfrom_linux.ml' with 1.1.2 (native) 
tests/regression/pr7920/'pr7920.ml' with 1 (native) 
tests/lib-unix/unix-socket/'recvfrom_linux.ml' with 1.1.1 (bytecode) 
tests/lib-unix/unix-socket/'recvfrom_unix.ml' with 1.2 (native) 

I’m not sure that these tests are generally related to what I edited. Can you tell me please what causes this and what should I do?

1 Like

@Lereena: This looks like tests touched or introduced by recent fixes in the OCaml development version. One possibility is that, during your work, you have used git pull or equivalent to update the codebase, but not re-built the whole compiler codebase (make world.opt -j), so you are running new regression tests with a not-yet-fixed version of the compiler.

In any case, I am confident that these tests are not affected by your manual change. Feel free to just run make clean and make world.opt -j at the root, and run the (manual generation and) testsuite again.

Note: the manual has its own, small testsuite, that you can run with make tests in the manual/ subdirectory.

1 Like

Thank you very much, it worked.

I completed work on one of the issues and sent a pull request.

Hi! This is kaaira, and i want to work on this project as well.But the issue is that i am just a beginner with OCaml, and have just basic knowledge of it. I have seen the issues on Mantis, and with some more practice at the language, i think i can solve them. Can you please guide me as to where i should begin with?

@gasche Can you please help me with the problem with the output channel that I use to test a rewritten with printf pretty-printer? I made the following function header:

print_expr ppf expr

In function I use output_string instead of print_string and everywhere in the parameters I pass ppf as output channel. After that, I want to test the function using the example from the pretty-printing section, passing stdout as an output channel, but getting this
image
Documentation is also not built giving an encoding error. Probably, I am passing the wrong channel as a parameter. But I can not understand what channel is needed.

Hi, kaaira!

That’s how I got started: I registered in mantis, picked an issue that seemed interesting to me, left a comment under the issue showing my intent to work on that.

Then I forked the official repo, did some changes and created a pull request. Your request is reviewed, and if everything’s fine, it’ll get merged eventually. Btw, I’d recommend to create a new branch to work on your issue and send a PR with that branch.

If you have more specific questions, I’ll be glad to help to my best.

@Lereena, if you have a link with your code, I could have a look (https://sketch.sh is nice place to put your code for instance). It looks like there is some encoding incompatibilities between your source code and your terminal.

@octachron сopied here https://sketch.sh/s/YDUjSQfhIU6nMV2ac5u5zW/

The problem stems from output_value which is marshalling the value rather than printing it. You should try to replace it with Printf.fprintf ppf "%f" .

(@Lereena: feel free to open a new topic for a question on a specific program you are in the process of writing.)