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

[v3] Implement new Concept Exercise: Character types #313

Open
bobbicodes opened this issue Feb 4, 2020 · 2 comments
Open

[v3] Implement new Concept Exercise: Character types #313

bobbicodes opened this issue Feb 4, 2020 · 2 comments

Comments

@bobbicodes
Copy link
Member

This issue describes how to implement the Character types concept exercise for the Clojure track.

Getting started

Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:

Goal

The goal of this exercise is to teach the student how character types are implemented in Clojure. According to the official guide this includes 3 main types: strings, characters and regular expressions.

Things to teach

This exercise aims to teach the student:

  • Clojure strings are Java strings - eg. they are immutable
  • Contained in double quotes
  • Individual characters represented w/ leading backslash \
  • Special characters (\newline \spec \tab, etc.)
  • Unicode characters (\uNNNN or in octal with \oNNN)
  • Literal regex syntax - #"[0-9]+"

Things not to teach

Things outside the scope of this exercise are:

  • Advanced regex usage

Concepts

This exercise teaches the following concepts:

  • char
  • string
  • regular_expression

Prerequisites

This is a base-level concept and likewise only assumes general knowledge of English letters.

Resources to refer to

Hints

After

Representer

This exercise does not require any modifications to the track's representer.

Analyzer

This exercise does not require any special analysis to be added for it.

Implementing

To implement a concept exercise, the following files must be created:

languages
└── clojure
    └── exercises
        └── concept
            └── <SLUG>
                ├── .docs
                |   ├── instructions.md
                |   ├── introduction.md
                |   ├── hints.md
                |   └── after.md (optional)
                ├── .meta
                |   |── design.md
                |   └── Example.clj
                ├── <NAME>.clj
                └── <NAME>_test.clj

Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue.

@bemself
Copy link
Contributor

bemself commented Feb 22, 2020

@paparomeo thanks! I feel like this is a group of concepts:-), each might serve as a new concept,

- char
- string
- regular_expression

and each one has its specific operations like compare, convert?

my basic idea of the concepts design, correct me if I didn't make it right please, describe the concept, offer the difference/common from other language e.g. Java, Lisp, provide the basic usage of it.

@bobbicodes
Copy link
Member Author

Ha, we're noticing a bit of a pattern here, aren't we? Perhaps it might help if I describe my methodology:

I've been extracting these based on the Clojure Reference, going in order and breaking them up into loose "topics" wherever they happen to split cleanly. As we can see this still leaves much room for these to be refined as we see fit.

Your comments are much appreciated, because that's exactly the work that needs to be done - deciding where they could be further divided.

It seems to me an efficient way to go, but as I continue I'll try to make smaller chunks.

@nicolechalmers nicolechalmers changed the title [Clojure] Implement new Concept Exercise: Character types [v3] Implement new Concept Exercise: Character types Jan 28, 2021
@nicolechalmers nicolechalmers transferred this issue from exercism/v3 Jan 28, 2021
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

2 participants