clojure icon indicating copy to clipboard operation
clojure copied to clipboard

[v3] Implement new Concept Exercise: Character types

Open bobbicodes opened this issue 5 years ago • 2 comments

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.

bobbicodes avatar Feb 04 '20 06:02 bobbicodes

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

bemself avatar Feb 22 '20 03:02 bemself

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.

bobbicodes avatar Feb 22 '20 05:02 bobbicodes