Giter VIP home page Giter VIP logo

rodeo's Introduction

Scala Rodeo

Welcome to Deal Engine's Scala Rodeo.

This material is intended for you to learn the basic of scala and some common functional idioms.

Along the way you will find some Exercises, requiring you to change some code in order to practice some concepts.

Quickstart

  • Install Nix
  • (Optional) Enable Flakes support
  • (Optional) Install direnv
  • Clone this repository

If using direnv: Allow this repository. Else: Enter the Nix Shell using nix develop, unless you are not using flakes, then nix-shell shell.nix

Detailed instructions

The first thing to do is to install Nix. This is a package manager. It will allow you to download dependencies in an isolated way.

The new recomended way of installation for both Linux and macOS is this one:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

To install Nix in Linux run (using the official installer):

sh <(curl -L https://nixos.org/nix/install) --daemon

In macOS (Darwin) don't use --daemon (using the official installer):

sh <(curl -L https://nixos.org/nix/install)

For more information about Nix installation you can check their documentation.

If you are using NixOS, you already have Nix installed.

Flakes support

Flakes is a feature in the Nix package manager. It allows us to create isolated environments.

To enable Flakes:

  • In Linux/macOS: mkdir -p ~/.config/nix/ && echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf

Installing direnv

We recommend using direnv to enter the environment in an easier way.

You can install it using flakes:

nix profile install nixpkgs#direnv

Now add the hook to your ~/.zshrc if using ZSH:

eval "$(direnv hook zsh)"

For bash is similar:

eval "$(direnv hook bash)"

Clone this repository

Clone this repository to begin the Scala Rodeo.

git clone https://github.com/deal-engine/rodeo.git

Entering the environment

If you are using direnv you can just enter the repository and it will enter the nix shell unless it's your first time. For security reasons direnv will ask you to allow the environment. If it doesn't you can allow it with direnv allow.

Otherwise you can enter the environment using the command:

nix develop

Unless you are not using flakes, then you need to use nix-shell shell.nix.

Exiting

To exit the environment either exit the shell or exit the directory if you are using direnv.

Devshell

You will be presented with something like this:

### ๏ธ๐Ÿ”จ Welcome to the Nix devshell ###

Available commands:

## Commands

  , editor        : Run a preconfigured VSCode.
  , editor-setup  : Setup the editor.
  , readme        : Read the readme.
  , tests         : Run the Rodeo tests.

(Run ',' to display this menu again)

IntelliJ it's recommended. but we have included a functional VS Code editor with support for scala.

You can open it with , editor command. Unless it's your first time, you will need to setup the environment first. You can do it with the , editor-setup command.

Once you have opened the editor you can open the src folder. You will find the source code of the Rodeo.

You can read the README with , readme command.

Once you are finished you can exit the environment with exit.

You can run the tests with the , tests command.

Tests

Tests are here to check your exercises.

You can run the tests with , tests command.

This is syntactic sugar for mill -w rodeo.test

Running specific tests

You can run a specific test by running mill -w rodeo.test -t "something" where something is a tag that matches over all the tests.

For example, you can run all the tests related to the Option exercises with mill -w rodeo.test -t "Option".

That's all for now!

Happy rodeeeoooooo! ๐Ÿค ๐Ÿ‡๐Ÿป

rodeo's People

Contributors

ivanmoreau avatar davoclavo avatar vic avatar abeldeal avatar fabianhjr avatar undieg avatar

Stargazers

 avatar  avatar Erick avatar Eloy Hernandez avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ivanmoreau undieg

rodeo's Issues

Add some prose describing what is the reader required to implement on each exercise.

thanks to all to have contributed content and exercises to rodeo. one thing I believe we can improve is, adding more descriptions about what should I do on each exercise, I've seen we have exercises that are only code (some preliminar code and asserts) but it would be awesome to also have some prose on what am I expected to do, perhaps a description of what the asserts are testing.

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.