Closed ArulselvanMadhavan closed 4 years ago
@hmemcpy Part 1 of the book is now done. I will be starting work on Part 2 of the book soon.
@mseri Chapter 11 and Chapter 12 are ready for review. Now you can review the snippets by generating the pdf and reading the text that provides the context to it.
make ocaml
Great job! Keep it going :)
@mseri Chapter 13 is ready for review, when you have some time...
Thanks! Chapter 13 looks fine as it is
@mseri Chapter 14 is ready for review. Thanks
@ArulselvanMadhavan can you please also resolve the src/Makefile
conflict?
@XVilka Resolved the conflicts. Let me know if you're not able to generate the pdf.
@mseri Chapter 15 is ready for review. Thanks!
Chapter 15 looks good. We should find a way to deal with ocaml “verbosity” in the compiled book. Many lines are too long or truncated in a weird way
@mseri Chapter 16 is now ready for review. This also marks the completion of Part 2 of the book. Re: Your suggestion on formatting the snippets. I'm thinking about using ocamlformat. Do you have a sample repo that I can look at? I haven't looked into it that much. I just know that it exists.
Thanks!
I had a suggestion for Ch16, a PR is already on your repo.
For ocamlformat, you need to produce a .ocamlformat
file with your configuration (I use https://github.com/owlbarn/owl_ode/blob/master/.ocamlformat), add (using fmt 1.1)
to your dune-project
file, and then run dune build @fmt --auto-promote
to update all the snippets (I hope it works with your current workflow, but I don't immediately see why not).
@mseri Chapter 18 is ready for review. Snippet06.ml got really long mainly because I was trying to get compiled code that shows the equivalence between unit/counit and left_adjunct/right_adjunct. Let me know if it feels like too much information to the reader and then I will resort to simpler version.
Thanks!
I have sent a small PR but looks good
@mseri Chapters 19 and 20 are ready for review, when you have some time. Chapter 20 has quite a lot of snippets and I had to upgrade compiler to 4.08.1 to get the let* bindings to work.
I had a brief look. I think chapter 20 need some changes, PR and comments are on the repo
Is there a pre-built pdf to be downloaded somewhere?
@jbulow To be consistent with the base repo, I haven't checked in the pdf file. But you should be able to generate one by checking out the branch and running make ocaml
Hi @mseri, Chapter 21 is ready for review. It has quite a lot of snippets but they were simple.
@jbulow To be consistent with the base repo, I haven't checked in the pdf file. But you should be able to generate one by checking out the branch and running
make ocaml
Where do I find the branch to checkout?
@jbulow Oh, It's the branch from which this PR is made. Here's the link - https://github.com/ArulselvanMadhavan/milewski-ctfp-pdf/tree/ocaml?files=1
@jbulow Oh, It's the branch from which this PR is made. Here's the link - https://github.com/ArulselvanMadhavan/milewski-ctfp-pdf/tree/ocaml?files=1
Thanks!
The next step is to find the requirements to build the pdf. A full texlive installation does not seem to be enough:
! Package fontspec Error: The font "Inconsolata LGC" cannot be found.
@jbulow Oh, It's the branch from which this PR is made. Here's the link - https://github.com/ArulselvanMadhavan/milewski-ctfp-pdf/tree/ocaml?files=1
Thanks!
The next step is to find the requirements to build the pdf. A full texlive installation does not seem to be enough:
! Package fontspec Error: The font "Inconsolata LGC" cannot be found.
I found the missing fonts here:
The pdf builds but the build ends with:
Chapter 22. (./content/3.6/monads-categorically.tex [362] [363] [364] (./_minted-ctfp-reader-ocaml/991E021E8D4F02BF29CCA18F8D81B02E5E10569AA78F25D735 249D93B94B8D68.pygtex)Error: cannot read infile: [Errno 2] No such file or directory: 'ctfp-reader-ocaml.pyg' system returned with code 256
There's a nix-shell environment that downloads all prerequisites for building the book, so you don't have to!
Install nix and type nix-shell
at the project root directory. After nix downloads the entire internet, you'll get a shell where you can run the makefile, and everything should Just Work™
@mseri 👋 Chapter22 is ready for review, when you have some time
Looks good!
@mseri 👋 Chapter 23 is ready for review and it has quite a lot of snippets. Also, I'd like hear your thoughts on (if/how) we can define ComonadImplViaExtend
and ComonadImplViaDuplicate
using recursive modules.
Only a few chapters with the actual code left (27th is the last one with the code). Amazing work! 💯
@mseri Chapter 24 is also ready for review. Enjoy your holidays, and when you are back, and find some time, let me know how it looks. Thanks!
@mseri Happy New Year 2020! Chapter 25 is now ready for review.
Just wanted to congratulate you again on the fantastic job! Thank you so much! Looks great!
There are some snippets that will have to be adjusted for width, but we can deal with it later!
In the meantime, please rebase on top of master, so the build issues are fixed.
Hmm, also I need to fix the half-title page, I'm using \titlecap
to convert the OPTCustomLanguage
name to Title case, but it obviously doesn't work for OCaml... perhaps I'll just add another field with the "display name" of the language.
@hmemcpy Rebased. Also, I'd like to run an idea by you. I have been thinking of the potential corrections to snippets in the book. Right now, we are maintaining the scripts in two places.
If we accept corrections to the completed version of the book in one of the two repos, the other will be outdated. This also applies to minor changes like formatting to limit the width.
I'm thinking of writing a script that downloads and uses the snippets during the pdf generation and removes them when it's done, so the snippets are in one place? Just a thought. I am open to other ideas as well.
Hey @mseri , Just wanted to let you know that Chapter 26 is also ready for review.
Sorry, for the long silence. I hope I will have time to see all the chapters in a couple of weeks time
No worries @mseri ! Take your time. I added the snippets for the final two chapters. So, now everyone should be able to build the full book with the OCaml version. I will wait for you to review the snippets before trying to get this merged.
cc: @XVilka @hmemcpy
Added my comments. Thanks for the nice work!
@ArulselvanMadhavan Awesome work! I took a quick look and it seems the snippets could benefit from running a formatter (e.g. ocamlformat
) on them. There are quite a few places with inconsistent use of whitespace, e.g. x:int
vs x : int
and so on. I could give you a hand with that if you think it's worth doing it.
@ddickstein @anton-trunov Yes. I do plan to run ocamlformat on the snippets that cut off from the page after I merge @mseri 's changes
I guess it's not WIP anymore then and ready for the review?
Indeed. And chapter 24 would benefit from more eyes
@mseri Yeah, I plan to make a post with the Fix point examples from the book to OCaml forums when I find some time
This is fantastic, @ArulselvanMadhavan and everyone! Thank you for your efforts!
I would like to fix the half-title page, so it doesn't display Ocaml
, and when it's all reviewed would be proud to press the merge button!
I finally had some time to rework the caches and some tweaks in the Makefile, hopefully it won't break much. @ArulselvanMadhavan can you give me push access to your fork? I'll send my fixes directly to the branch.
@hmemcpy I added you as a collaborator. You should be able to send the fixes, now. Thanks!
Alright! I'm ready to push the big button! Let's fix minor issues once it's on.
Thank you again very much for this valiant effort!
@ArulselvanMadhavan have you seen this? https://discuss.ocaml.org/t/attempting-to-create-recursion-schemes-in-ocaml/5144/2
@mseri No, I haven't. Thanks for bringing it to my attention! I will have a look
The snippets are pulled from this repo(currently using a semi-automatic way): https://github.com/ArulselvanMadhavan/ocaml-ctfp
@hmemcpy When you get a chance can you review and let me know if everything looks good. cc: @mseri @XVilka
Added chapters:
To see the completed version of the PDF
Please submit your corrections to the original branch, since I don't look at this PR often