Step-by-step tutorial materials for the "A Whirlwind Tour of PureScript" workshop, held at YOW! Lambda Jam 2016 in Brisbane, and Compose Conf 2016 in Melbourne, Australia..
PureScript JavaScript CSS HTML Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
01 Basics
02 Rows and Effects
03 Web with Pux
04 FFI/99 Playground
common
.gitignore
README.markdown
bootstrap.sh
devdocs.sh

README.markdown

PureScript Workshop Exercises

This is a set of exercises for YOW! Lamba Jam 2016's and Compose Melbourne 2016's PureScript workshop: A Whirlwind Tour of PureScript.

Setup

This repository has a bootstrap script, which downloads a small pile of things and sets things up for you. To get this going:

  1. Clone this git repo to somewhere local on your machine (eg. with git clone https://github.com/damncabbage/purescript-workshop workshop)
  2. Run the bootstrap setup script (with ./bootstrap.sh, from inside the checked-out workshop directory).
  3. Put an issue in this repo if you get stuck.

It's helpful to use an editor with some PureScript integration. I recommend Atom set up with the atom-ide-purescript plugin, opening each exercise as a separate project. Alternatively, pscid is an alternative that can be used as a file-watch + fast-rebuild tool with any editor.

Exercises

The exercises are broken up into sections and sub-sections, with each having its own README, Exercise and Answer folders. Every Exercise and Answer is an independent program that can be interacted with in the following way:

  • Build: npm run -s build in an Exercise or Answer directory will rebuild that program and display errors and warnings. If you're using the VM with the Atom editor, this is being run for you on every save.
  • Interactive Console Tool (REPL): npm run -s repl will kick off pulp psci, an interactive command-line tool (like GHCI, irb, or node or python without arguments). Hit Ctrl-C to quit.
  • Server: Some later exercises have a web-based component; npm run -s start will start the Webpack+Express dev server, which also provides hot-reloading for quick feedback. Hit Ctrl-C to stop it.

Additionally, there are a pile of generated API docs in Markdown format in each exercise's folder, under devdocs/....

How Do I Start?

Open up the 01 Basics folder, then the first 01 Building Things, Finding Things... folder, and then read and follow the instructions from the README.markdown file within.

Topic Outline

  • 01 Basics

    • 01 Building Things, Finding Things, Trying Things
    • 02 Here's One We Messed Up Earlier
    • 03 Types and Patterns
    • 04 Maybe it's Just Nothing
  • 02 Rows and Effects

    • 01 Places to Be
    • 02 Things to Do
    • 03 Composing Effects
  • 03 Web with Pux

    • 01 States and Views
    • 02 Actions and Updates
    • 03 Effectful Updates
    • 04 Skynet
  • 04 FFI

    • 99 Playground

License

Copyright 2016 Rob Howard

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.