Git Product home page Git Product logo

crystal-koans's Introduction

The Crystal Language Koans

Inspired from RubyKoans, CppKoans, GoKoans; an educational unit test suite for the Crystal Programming Language and standard library.

Installation

  • clone this repository: git clone "https://github.com/ilmanzo/crystal-koans"

Manual Usage

  1. run crystal run koans.cr to make a small step at a time or run crystal spec to run all the tests at once
  2. observe the test errors
  3. think and make the test pass
  4. goto step 1

Automatic Usage (run tests on save)

  1. install shard dependencies with shards install
  2. open a separate terminal and run crystal run watch.cr. Keep it open and visible
  3. observe the test errors, think and make the test pass
  4. tests will automatically run as you save the files. Press CTRL-C to stop the watcher

Contributing

  1. Fork it ( https://github.com/ilmanzo/crystal-koans/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

crystal-koans's People

Contributors

aeldemery avatar collidedscope avatar dorianmariecom avatar ilmanzo avatar jackkav avatar s0kil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

crystal-koans's Issues

dir_spec should mention dir.rewind

dir.entries call after dir.children returns 0
after some investigation, it turns out that one must rewind the stream before using it once more. It should be documented to avoid surprises.

deprecation warnings on crystal 0.36


In spec/sets_spec.cr:18:8

 18 | s1.subset?(s2).should eq FILL_IN_THIS
         ^------
Warning: Deprecated Set(Int32)#subset?. Use #subset_of? instead.

In spec/sets_spec.cr:19:8

 19 | s2.subset?(s1).should eq FILL_IN_THIS
         ^------
Warning: Deprecated Set(Int32)#subset?. Use #subset_of? instead.

A total of 2 warnings were found.

Dependency problem with 'watch' shard

Command shards install generates error:

Resolving dependencies
Fetching https://github.com/danreeves/watch.git
Unable to satisfy the following requirements:

- `crystal (~> 0.35, >= 0.35.1)` required by `watch 1.0.1+git.commit.489bbbfaf4283f6d7a5bbf9ab34ae3c6d00713b2`
Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.

Minor issue: Stack vs Queue on Generics Chapter

Firstly congrats on the awesome resource, it is very pleasurable to use and understand.

Apparently in the ´generics_spec.cr´, what we have is a Stack and not a Queue.

Expecting a FIFO behaviour and getting a LIFO one can mess a bit with learners (as me) heads.

Maybe change description to use Stack instead? or change implementation to match naming?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.