Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Or very weak" filter koan is skipped #14

Closed
sl4m opened this issue Aug 12, 2011 · 11 comments
Closed

"Or very weak" filter koan is skipped #14

sl4m opened this issue Aug 12, 2011 · 11 comments

Comments

@sl4m
Copy link
Contributor

sl4m commented Aug 12, 2011

Ironically enough, the koan below is skipped over because __ technically returns a keyword and is used as the filter which lets everything through. Not sure how to resolve this one, but bringing it to your attention.

in higher_order_functions.clj

  "Or very weak"
  (= '(:anything :goes :here) (filter (fn [x] __) '(:anything :goes :here)))
@trptcolin
Copy link
Member

Good call. I need to revisit the already-passing side of the test suite and see why it's not catching things like this. It should be.

@calebphillips
Copy link
Contributor

I was looking at this a couple of months back and if I read the code right, each meditation fails if any of the tests within it fail. So, ensure-failing-without-answers just tests that each koan has at least one failing test. I wanted to experiment with a testing macro that changed the meditations in some way (maybe negating each test result and updating the answer sheet to expect the negated meditations to pass) so that it could make sure every test failed, but I haven't made the time to play with it.

@trptcolin
Copy link
Member

Skim - thanks again for the report.

Caleb - thanks for the macro-replacement idea. That's done now. I verified the new hotness catches this issue. It's a bit messy for now, but does the trick just fine.

@dsouth
Copy link
Contributor

dsouth commented Sep 23, 2011

Again, this is still happening in the zip download. Perhaps I should just fork and have fun? :)

@trptcolin
Copy link
Member

Thanks for the heads-up. I uploaded the latest code as a zip file: https://github.com/downloads/functional-koans/clojure-koans/clojure-koans-2011-09-22.zip. The previously latest version was from August 1 (before this fix).

I need to figure out a way to automate this - would love suggestions on how if you have any.

@dsouth
Copy link
Contributor

dsouth commented Sep 23, 2011

As a lowly Java dev, the only automation I know for this is Ant. Would be happy to have a look into if you let me know the steps you require for creating and making the .zip available.

@trptcolin
Copy link
Member

Yeah, by "automate" I mean have this jar built & uploaded when I commit to the github repo. After sleeping on it overnight, it seems easy enough to build the shell script I use for this into the repo itself. Thanks again for the report.

@dsouth
Copy link
Contributor

dsouth commented Sep 23, 2011

My after sleeping on it is, "Shouldn't Lein be able to do that?" :)

@trptcolin
Copy link
Member

Lein absolutely could do that. I'm thinking of a script/deploy_koans.sh that does:

git push origin master
zip # [bunch of options redacted]
echo "Hey Colin, don't be a dummy - upload the zipfile!"

...since github's uploader is based on flash and not so API-friendly. Kind of low-tech, but this'll fix the immediate issue. I'm sure something clever exists for this, will try to take a look this afternoon.

@dsouth
Copy link
Contributor

dsouth commented Sep 23, 2011

A) I'm conscious of how off topic we are on this issue, but don't
think what we are discussing is worthy of its own issue?

B) I would almost never suggest this since the zip file is an artifact
of the repository, but maybe the simple answer is to version the zip
file, then it's a simple matter of pushing the changes???

@trptcolin
Copy link
Member

Right, I'd rather not add the zip file (or even the jars in the lib directory) to the repo. I think adding a release process is the right move - that's the way most projects run, after all :)

letronje pushed a commit to letronje/clojure-koans that referenced this issue Oct 30, 2012
bravelittlescientist added a commit to bravelittlescientist/clojure-koans that referenced this issue Jun 21, 2013
tedkulp added a commit to tedkulp/clojure-koans that referenced this issue Dec 31, 2013
jfo pushed a commit to jfo/clojure-koans that referenced this issue Feb 22, 2014
klausborges added a commit to klausborges/clojure-koans that referenced this issue Apr 4, 2016
abstractOwl pushed a commit to abstractOwl/clojure-koans that referenced this issue Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants