This is a set of exercises for YOW! Lamba Jam 2016's PureScript workshop: A Whirlwind Tour of PureScript.
[Context: This workshop was meant to be tackled from inside a virtual machine (Virtualbox w/ an OVA). A bootstrap script was also provided in case people wanted to set up PureScript on their own machines.]
To get started:
- Clone this git repo to somewhere local on your machine,
- Run the bootstrap setup script (with
./bootstrap.sh
, from inside the checked-out workshop directory). This script will:- Check and install any tools you need (Node, npm, PureScript / pcs, Pulp, purescript-psa, pscid), and
- Run a
bower install
,npm install
and annpm run -s build
on every exercise, to prepare the exercises for you in advance (eg. if you're only connected to the 'net for a short while).
It's recommended that you 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.
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 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. - Test:
npm run test
will run any tests defined. - Interactive Console Tool (REPL):
npm run repl
will kick offpulp psci
, an interactive command-line tool (like GHCI,irb
, ornode
orpython
without arguments). Hit Ctrl-C to quit. - Server: Some later exercises have a web-based component;
npm run start
will start the Webpack+Express dev server, which also provides hot-reloading for quick feedback. Hit Ctrl-C to stop it.
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.
-
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 Playground
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.