GithubHelp home page GithubHelp logo

coleea / effect-ts-learning-resources Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ethanniser/effect-workshop

0.0 0.0 0.0 1.35 MB

Shell 0.01% JavaScript 0.13% TypeScript 99.72% CSS 0.03% Vue 0.12%

effect-ts-learning-resources's Introduction

Effect Workshop & Crash Course & Learning Resources

By Ethan Niser & maxwell brown & Stefano Pigozzi

Check /src/every-tutorials folder. in this files, there are some example code and comments. These codes are the best resource I've found for learning effect-ts.

Original Repos

Useful Links

Videos - introduction to Effect

Podcasts - introduction to Effect

Videos - tutorial for beginner

Learning Material

fp-ts learning material

It is also helpful to learn fp-ts because fp-ts is the core library of effect-ts implementation.

Functional design series

code examples (Advanced)

Community documentation

Community Blog Posts

Reference : fp-ts official repo

REQUIREMENTS:

A way to run typescript Node (with ts-node or tsx) or Bun

https://nodejs.org/en

npm i -g tsx

I'm using bun just because its over twice as fast to run typescript than with tsx or ts-node If you want to also use bun you can install it at https://bun.sh/docs/installation

Install JS Dependecies

npm i
yarn i
pnpm i
bun i

An editor that supports LSP

Hovering to see types, autocompletion, and go-to-definition are gonna be pretty useful. I'll be using VSCode, but you can use any editor that supports LSP.

How this project is broken up

Slides

The slides are available online at https://effect-workshop-slides.vercel.app But, if you wish to run the slides locally:

cd slides
bun run dev

All of the content is in the src folder

Each part has its own folder. Within those folders you find these folders:

snippets

This contains typescript files that have code examples and comment explanations for individual concepts. I will go through these files in the workshop. Free free to follow along and read the comments.

exercises

This contains typescript files that define some practice exercises for individual concepts. They define test cases that you can check by just running the file.

Solutions are located in the solutions folder

project

For parts 2 and 3, we will be rewriting a non-effect application to effect. The project folder contains the non-effect application, and is where if you want to follow along, you can modify the code to use effect.

AFTER_THE_WORKSHOP.md

To reinforce your learning, I've provided some ideas for how to expand each project when you get home. Try them out on your own, and if you need help feel free to @ me in the Effect discord- I'd love to see how people approach each problem.

breakpoints

For parts 2 & 3, 'breakpoints' defines each of the steps we will take to refactor the non-effect application to effect. Each file is a folder. All changes between steps are described in the changes.md file.

If you get lost, you can always copy whatever 'breakpoint' you are on to the project folder and continue from there.

pad.ts

Stands for 'scratchpad'. Pretty useful for just trying out some code that doesn't necessarily belong anywhere.

bun run pad

Running Files

Every file is prefixed with a number. I have defined a bun of scripts so you don't have to type out the whole file name / path.

They follow this pattern:

part = 1 | 2 | 3 | 4
section = s (snippets) | e (exercises) | p (project) | b (breakpoints)
fileOrFolderNumber = (if folder will run index.ts)

bun run part-section-fileOrFolderNumber

For example, to run the first snippet in part 1:

bun run 1-s-1

To run the first exercise in part 2:

bun run 2-e-1

To run the part 3 project:

bun run 3-p

Cheat Sheet

For quick reference or for review feel free to read CHEATSHEET.md

VSCode Snippets

{
  "Gen Function $": {
    "prefix": "gg",
    "body": ["function* (_) {\n\t$0\n}"],
    "description": "Generator function with _ input"
  },
  "Gen Function $ (wrapped)": {
    "prefix": "egg",
    "body": ["Effect.gen(function* (_) {\n\t$0\n})"],
    "description": "Generator function with _ input"
  },
  "Gen Yield $": {
    "prefix": "yy",
    "body": ["yield* _($0)"],
    "description": "Yield generator calling _()"
  },
  "Gen Yield $ (const)": {
    "prefix": "cyy",
    "body": ["const $1 = yield* _($0)"],
    "description": "Yield generator calling _()"
  }
}

effect-ts-learning-resources's People

Contributors

ethanniser avatar coleea avatar ccntrq avatar

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.