jtmoulia / elisp-koans

Emacs Lisp Koans -- learn elisp through test-driven development.
Apache License 2.0
161 stars 22 forks source link

Update with latest koans from lisp-koans #9

Open jtmoulia opened 4 years ago

jtmoulia commented 4 years ago

Problem

The actual koans in lisp-koans got a big update with the 2.0 release. However, since this implementation forked awhile back we can't simply cherry pick over the updates.

For reference: lisp-koans 2.0 PR

Solution

Go through the latest lisp koans here. Which have been added which work with elisp? Which have been changed? Update the elisp koans where appropriate.

There is likely room for improvement by bringing over some of the lisp-koans assertions, e.g. (should (eq ___ ...)) is better written as (true-or-false? ___). I didn't want to pollute the global namespace initially, but that now seems like a small price to pay to make the user's life as simple as possible.

This ticket might be broken into smaller pieces.

Lisp Koans

Here's a list of the current lisp koans which need to be checked (some of these are common lisp specific and will be dropped):

jtmoulia commented 3 years ago

On starting work I flipped my opinion re defining custom assertions like true-or-false? vs leveraging ERT's should.

The reason is that I think there's value in having this library follow ERT's patterns rather than defining its own because it makes ERT an implicit lesson within the koans. Also, should is supremely composable as opposed to having a more expressive but more numerous set of assertions.

If anyone reading this agrees or disagrees let me know! I'm curious what others think.

rajivr commented 3 years ago

+1 for switching to ERT. I am looking to work through the koans once 2.0 update lands. If I can learn ERT along the way, that would be an added bonus. :-)

rajivr commented 3 years ago

@jtmoulia I was wondering if you might be able to complete the 2.0 update during upcoming holidays? :-) Working on this has been on my todo list for a long time.

jtmoulia commented 3 years ago

I am looking forward to revisiting this project around the holidays as a present to myself -- I'm not sure if I'll be able to do the full 2.0 update, but you should see some progress against it.

Thanks for checking in :)