elisp-koans icon indicating copy to clipboard operation
elisp-koans copied to clipboard

Update with latest koans from lisp-koans

Open jtmoulia opened this issue 4 years ago • 4 comments

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):

  • [X] asserts
  • [X] nil-false-empty
  • [x] evaluation
  • [x] atoms-vs-lists
  • [x] let
  • [ ] scope-and-extent
  • [ ] basic-macros
  • [x] lists
  • [ ] arrays
  • [ ] vectors
  • [ ] multiple-values
  • [ ] equality-distinctions
  • [ ] hash-tables
  • [ ] functions
  • [ ] strings
  • [ ] structures
  • [ ] teration
  • [ ] mapcar-and-reduce
  • [ ] control-statements
  • [ ] loops
  • [ ] scoring-project
  • [ ] format
  • [ ] type-checking
  • [ ] clos
  • [ ] std-method-comb
  • [ ] condition-handlers
  • [ ] triangle-project
  • [ ] dice-project
  • [ ] backquote
  • [ ] macros
  • [ ] quicklisp - CL specific
  • [ ] threads - CL specific? what's the elisp way?
  • [ ] extra-credit

jtmoulia avatar Nov 28 '20 19:11 jtmoulia

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.

jtmoulia avatar Jan 06 '21 00:01 jtmoulia

+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 avatar Jan 06 '21 02:01 rajivr

@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.

rajivr avatar Oct 17 '21 02:10 rajivr

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 :)

jtmoulia avatar Oct 17 '21 21:10 jtmoulia