Yay fmt ! Title must be 15 chars. Yay Fmt again!

Apropos of writing-code-to-write-exams-and-assignments, I'm super-on-board with fmt, and I can't wait until the unstable interface becomes more stable. For now I'm just going to use it anyway....

Again, many thanks for putting this together!

1 Like

In case anyone is interested in what @jbclements is excited about:

raco fmt ‹file.rkt› ... reads ‹file.rkt›s and displays the formatted programs to the standard output.

Incidentally fmt is installed in the R16 trick bot on the Racket Discord chat so you can use it with the command !!fmt if you are sharing code in chat, and want it to be more readable. (Unfortunately not available in other places Racket code is discussed; Discourse, IRC, Slack, etc.)

If you are interested
*fmt: A code formatter for Racket presentation at 12th RacketCon

Many thanks to @sorawee for creating this wonderful tool. :racket_heart:

I’d like to know how @jbclements is using fmt for writing-code-to-write-exams-and-assignments ?

Best regards
Stephen :beetle:

PS the title minimum length of 15 characters is to encourage forum users to provide descriptive titles. How about ‘using fmt for writing-code-to-write-exams-and-assignments‘?

Thanks John and Stephen. Assuming that this is indeed about the code formatter, I would love to know too how fmt helps “writing-code-to-write-exams-and-assignments,” and how you are using the unstable interface.

The RacketCon talk is essentially about the stable interface for the next version. Alas, the backward compatibility issue is more complicated than I thought, and I haven’t had time to work on it.

1 Like

How about an fmt2 so you don't have to worry too much about backward compatibility, so as to just make things better/right?

At this point, I am not currently using the unstable interface. So please, feel free to axe it or change it. Should I watch your racketcon talk to see what the new one is likely to look like?

FWIW, my current stumbling block is formatting code in the style of PLAI, where I want (most) parens to come out at curly braces. I'm confident that I could make this work either by (a) using the existing interface or (b) hacking the existing code in a terrible way or (c) waiting for a new improved interface and documentation... I'm not sure which of those is the best path forward. (So I guess that means I'm implicitly following path (c)...)