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

Add symbols and tuples concept and exercise #685

Merged
merged 7 commits into from
Aug 11, 2024

Conversation

meatball133
Copy link
Member

No description provided.

@@ -0,0 +1,5 @@
{
"blurb": "Symbol represent a unique identifier through the program, which is created at compile time",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"blurb": "Symbol represent a unique identifier through the program, which is created at compile time",
"blurb": "Symbols represent unique identifiers throughout the program, which is created at compile time",

:"foo boo" # => :"foo boo"
```

Symbols are used in many places in the language, including as keys in namedtuples, to represent method names and variable names.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Symbols are used in many places in the language, including as keys in namedtuples, to represent method names and variable names.
Symbols are used in many places in the language, including as keys in namedtuples and to represent method and variable names.

I think this is what you intended, but I may have misunderstood.


## Symbols in Crystal

Symbols in Crystal is quite different from Ruby.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Symbols in Crystal is quite different from Ruby.
Symbols in Crystal are quite different from Ruby.

## Symbols in Crystal

Symbols in Crystal is quite different from Ruby.
In Crystal is a symbol a form of constants and is thereby is assigned at compile time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In Crystal is a symbol a form of constants and is thereby is assigned at compile time.
In Crystal a symbol is a type of constant and is thereby is assigned at compile time.

In Crystal is a symbol a form of constants and is thereby is assigned at compile time.
This means that symbols can't be created dynamically, which is possible in Ruby.

Symbols in Crystal is represented as an `Int32` which makes very efficient.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Symbols in Crystal is represented as an `Int32` which makes very efficient.
Symbols in Crystal are represented as `Int32`s which makes them very efficient.

config.json Outdated
Comment on lines 1596 to 1597
"slug": "tuples",
"name": "Tuples"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"slug": "tuples",
"name": "Tuples"
"slug": "tuple",
"name": "Tuple"

Should this be singular or plural? Symbol is singular below and Array is singular above, but some of the concepts are plural.


## General

- [Tuples][tuple] are data structures which are inmutable, have a fixed size, and can hold any data-type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Tuples][tuple] are data structures which are inmutable, have a fixed size, and can hold any data-type.
- [Tuples][tuple] are data structures which are immutable, have a fixed size, and can hold any data-type.

## General

- [Tuples][tuple] are data structures which are inmutable, have a fixed size, and can hold any data-type.
- Symbols may be used to denote finite states, as this exercise uses `:cup`, `:fluid_ounce`, `:teaspoon`, `:tablespoon`, `:milliliter` to denote the units used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Symbols may be used to denote finite states, as this exercise uses `:cup`, `:fluid_ounce`, `:teaspoon`, `:tablespoon`, `:milliliter` to denote the units used.
- Symbols may be used to denote finite states: this exercise uses `:cup`, `:fluid_ounce`, `:teaspoon`, `:tablespoon`, `:milliliter` to denote the units used.

# Instructions

While preparing to bake cookies for your friends, you have found that you have to convert some of the measurements used in the recipe.
Being only familiar with the metric system, you need to come up with a way to convert common US baking measurements to milliliters (mL) for your own ease.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Being only familiar with the metric system, you need to come up with a way to convert common US baking measurements to milliliters (mL) for your own ease.
Only being familiar with the metric system, you need to come up with a way to convert common US baking measurements to milliliters (mL) for your own ease.

Comment on lines 1 to 23
## Goal

The goal of this exercise is to teach the student about modules in Crystal.

## Learning objectives

- Know how to create a module
- How to include a module in a class

## Out of scope

- How to use mixins between classes

## Concepts

`Modules`:

- Create a module
- Include a module in a class

## Prerequisites

- return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a copy paste error

@ryanplusplus ryanplusplus merged commit 37a9758 into exercism:main Aug 11, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants