Bozhidar Batsov ๐Ÿ’Ž

108 Followers
26 Following
25 Posts
Hacker. Lover of parentheses. Emacs fanatic. Author of RuboCop, CIDER, Emacs Prelude and Projectile. Maintainer of nREPL. I'm not the best, but I'm pretty good.
Personal Site/Bloghttps://batsov.com/
FOSS Projects Bloghttps://metaredux.com
Emacs Bloghttps://emacsredux.com
Twitterhttps://twitter.com/bbatsov
Who here's into OCaml as well?OCaml 5.0 is right around the corner https://discuss.ocaml.org/t/first-release-candidate-for-ocaml-5-0-0/10922 If I were a gambling man I'd wager the final release will happen before/on Christmas!
First release candidate for OCaml 5.0.0

The release of OCaml version 5.0.0 is imminent. As a final step before the release, we are publishing a release candidate that you can test while waiting for the release in the upcoming weeks. If you find any bugs, please report them here: Issues ยท ocaml/ocaml ยท GitHub Compared to the second beta release, this release contains one toplevel bug fix and a minor type system fix. If you are interested by the bug fixes beyond the new multicore runtime, the full change log for OCaml 5.0.0 is a...

OCaml
RuboCop 1.40 is out! (https://github.com/rubocop/rubocop/releases/tag/v1.40.0) We've been cooking this release for quite a while and it has a ton of small improvements (and some bigger performance improvements in certain conditions). Enjoy!
Release RuboCop 1.40 ยท rubocop/rubocop

New features #11179: Add Style/ConstantBase cop. (@r7kamura) #11205: Add --[no-]auto-gen-enforced-style CLI option. (@ydah) #11224: Add Style/RequireOrder cop. (@r7kamura) #11219: Make Style/Selec...

GitHub

Thank you very much @bbatsov for this article about automating Spell Checking https://metaredux.com/posts/2021/11/26/automate-spell-checking-in-your-projects-with-github-actions.html

It wasn't a direct copy&paste but rubocop's repo version is ๐Ÿ‘Œ https://github.com/rubocop/rubocop/blob/master/.github/workflows/spell_checking.yml#L9-L27

Nice quick win on the code review automation front :)

Automate Spell-checking in Your Projects with GitHub Actions

A couple of years ago I wrote an article about dealing with typos in your source code. Today Iโ€™ll follow up with a simple recipe to automate this spell-checking process using GitHub Actions (GHA).1 Lately Iโ€™ve been adding the following GHA workflow to all of my OSS projects: name: Spell Checking on: [pull_request] jobs: codespell: name: Check spelling with codespell runs-on: ubuntu-latest strategy: matrix: python-version: [3.8] steps: - uses: actions/checkout@v2 - name: Set up Python $ uses: actions/setup-python@v2 with: python-version: $ - name: Install dependencies run: | python -m pip install --upgrade pip pip install codespell if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Check spelling with codespell run: codespell --ignore-words=codespell.txt || exit 1 misspell: name: Check spelling with misspell runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install run: wget -O - -q https://git.io/misspell | sh -s -- -b . - name: Misspell run: ./misspell -error Thereโ€™s nothing fancy here. Weโ€™re just installing a couple of popular spell-checkers for code and we run them on everything within the Git repository. If they discover any problems the build will fail. Just save the code above under .github/workflows/spell_checking.yml and youโ€™re good to go. The workflow will get triggered for each subsequent pull request. A couple of things to note: This workflow uses both codespell and misspell. Using both might be an overkill for some of you. Personally, I like misspell more, as itโ€™s super fast. Itโ€™s a good idea to run both tools locally first and address any existing typos. You may want to limit the checks only to files that were changed in the pull request. You may want to specify a locale for misspell if you want to enforce a specific flavor of English (e.g. misspell -locale US). This should probably be made a reusable workflow. I wonโ€™t be surprised if someone actually has created a public reusable workflow for spell-checking code already. Thatโ€™s all I have for you today. Big thanks to my fellow OSS hacker Koichi Ito, who came up with the idea of making spell-checking a CI step. In hindsight it seems like a very obvious thing to do, but it was always an afterthought for me. Iโ€™d be curious to hear how others are dealing with typos in their codebases. The outlined approach can easily be adapted for any other CI. โ†ฉ

Meta Redux
Who enjoyed "The Menu"? Went with no expectation and was blown away by that movie. A true work of (somewhat violent) art!
OCaml is a great language, but I really miss Ruby's standard library there. A great standard library can offset a lot of language shortcomings.
Don't get me wrong - I'm not complaining at all, as I understand how complex it is to handle such scaling issues. But I definitely think that the majority of Twitter users would not be nearly as forgiving, as they have completely forgotten the days of the Fail Whale.
A few hours later the situation hasn't changed much:

Just learned that @anmonteiro has recently started a fantastic newsletter focused on his OSS work (with a heavy emphasis on OCaml these days). Highly recommended!

P.S. Note to self - don't be so lazy and do something similar! :D

I guess it was a good idea to create a few Mastodon accounts - e.g. this morning fosstodon.org won't even load for me.
Today I got reminded of https://programmingpraxis.com/contents/about/ Not as famous as AoC, but certainly a lot of fun.
About

Programming Praxis