How to start contributing to Typed Racket?

Hi,

TL;DR: How to start contributing to Typed Racket?

Full disclosure

I am working on a library to support my research. I am quite fond of types and of Typed Racket, and I would like to write as much of Typed Racket as I can. I have been writing Racket since the beginning of 2020, but I am only starting to wrap my head around macros. Before switching to Racket, I programmed in Haskell for about 8 years.

In the yet untyped part of my library, I wrote a function using for/stream, which is not yet provided by Typed Racket. I read the definition of for/stream and saw that it relies on for/foldr which is provided by Typed Racket, however, the typed version does not yet have the #:delay keyword, which means that the literal expansion of for/stream to for/foldr will not work with Typed Racket. Furthermore, dropping #:delay evaluates too many things, meaning that even taking the first 10 elements of in-naturals never halts. I went to read the definition of for/foldr in Typed Racket and saw that Typed Racket defines for/fold together with for/foldr. Since only for/foldr in Racket collects has the #:delay keyword argument, I realized that I would need to split this definition. However, I don't really see what would be the best way to do it. Further, how do I add the #:delay keyword argument? Does it need a new syntax class?

Clearly, I lack experience with Racket and Typed Racket to properly tackle this question directly. I should probably start with simpler contributions and work my up to more substantial changes.

Question

How do I start contributing to Typed Racket from where I am now?

I don't absolutely need for/stream in my library, as I can do everything I need with the primitives coming from @AlexKnauth 's https://github.com/AlexKnauth/typed-racket-stream. However, adding a keyword argument to typed for/foldr doesn't seem to be a ground-breaking change, and it may help other people. Ideally, I would like to be able to help Typed Racket stay up-to-date with the corresponding Racket code.

I have already asked this question about 1.5 years ago and @samth directed me to the Asumu's video explaining typed classes. Is this still a good entry point? Are there some easy low-hanging fruit?

Thank you for reading to the end :slight_smile:

3 Likes

Here is one way you can help: There are about 250 issues in the Typed Racket repository, many of them with no comments. You can try to investigate and fix one or more of these issues. This would work something like this:

  • pick an issue
  • try to reproduce the problem based on the description
  • if you cannot reproduce it, as the reporter for clarifications,
  • if you can reproduce it, try to find the location in the source code that is responsible for the problem.
  • either provide a fix yourself as a pull request or add a comment to the issue describing the exact problem and how to fix it.
  • repeat with the next issue :slight_smile:

Also, if you get stuck on an issue, you can just simply pick another one.

There are also general maintenance tasks for issues. For example, this one: append* not compiling · Issue #1178 · racket/typed-racket · GitHub appears to be fixed, but it was left open. Perhaps you could prompt the maintainers to close it...

There is also the option to contribute to the documentation. This might be easier, but it is unlikely to improve your familiarity with the Typed Racket code base, which, as I understand, is your goal.

Best Regards,
Alex.

3 Likes

Thanks a lot @alexh ! I'll follow your plan of attack :+1: