r/purescript • • Jun 15 '21

PureScript Book: Functional Programming Made Easier: A Step-by-Step Guide

91 Upvotes

I’m excited to announce that I finished my book, Functional Programming Made Easier: A Step-by-Step Guide. By the end of this book, the reader will not only learn Functional Programming, but they will learn PureScript.

https://leanpub.com/fp-made-easier

This book takes the reader from knowing zero about Functional Programming to writing a Full-Stack application using HTTPure on the backend and Halogen 6on the front-end.

Below is a list of some of what’s covered (in no particular order):

  1. Pure Functions

  2. Immutability

  3. Higher-order Functions

  4. Currying

  5. Partial Application

  6. Recursion

  7. Tail Recursion

  8. Pattern Matching

  9. Types

    1. Polymorphic

    2. Monomorphic

    3. Sum

    4. Product

  10. Typeclasses

  11. Multi-parametric Typeclasses

  12. Overlapping Instances

  13. Orphaned Instances

  14. Functional Dependencies

  15. Isomorphisms

  16. Homomorphisms

  17. Abstract Algebra

  18. Magma

  19. Semigroup

    1. Monoid

    2. Group

    3. Abelian Group (aka Commutative Group)

    4. Semiring

    5. Ring and Commutative RingEuclidean Ring

  20. Folds

  21. Algebraic Data Types (ADT)

  22. Functors (Covariant, Contravariant, Invariant)

  23. Functors of Values vs Functions

  24. Bifunctors

  25. Profunctors

  26. Applicative Functors

  27. Traversables

  28. Foldables

  29. Applicative Parsers

  30. Monads

  31. Monadic Parsers

  32. Monad Stacks (aka Monad Transformers)

  33. Category Theory (superficially)

    1. Definition

    2. Hask Category

    3. Functors

    4. Applicative

    5. Kleisli Category

Some of the skills it’ll teach you along the way are:

  1. Interpreting Compiler Errors

  2. Type Holes

  3. Effects (Synchronous and Asynchronous)

  4. AVars and Refs (Managed Global State)

  5. Data Bus

  6. Ajax

  7. JSON Decoding

  8. Foreign Function Interface (FFI)

From the exercises and final project you will learn:

  1. Hash Routing

  2. Static File Servers

  3. CORS

  4. Salt Hashing Passwords


r/purescript • • Mar 01 '21

PureScript 0.14 Released

Thumbnail
discourse.purescript.org
65 Upvotes

r/purescript • • Apr 29 '22

PureScript v0.15.0 Released

Thumbnail
discourse.purescript.org
55 Upvotes

r/purescript • • Jun 01 '20

Halogen 5 Released

55 Upvotes

Halogen 5 has been in its release candidate for a long period, and it’s been in the package sets as v5 for a number of months. However, Halogen 5 is now officially released!

There is also a discussion about the release on the PureScript Discourse.

If you’d like to see what changed from Halogen 4 to Halogen 5, you’ll find the transition guide for Halogen 5 helpful. It walks through the major changes between the versions and provides some tips on how to make the most of the new features. You may also want to review the PR that migrated Real World Halogen to Halogen 5.

The new release also introduces a brand-new guide for using Halogen, which now covers topics like lifecycles, event sources, the HTML types, and more in addition to the core component features already covered by the previous guide.


r/purescript • • Jan 14 '19

Real World Halogen Released

Thumbnail
discourse.purescript.org
51 Upvotes

r/purescript • • Jun 04 '19

PureScript release v0.13.0

Thumbnail
github.com
48 Upvotes

r/purescript • • Aug 11 '20

Recommended Tooling for PureScript in 2020

Thumbnail
discourse.purescript.org
47 Upvotes

r/purescript • • Mar 09 '21

Halogen 6 released

Thumbnail
discourse.purescript.org
46 Upvotes

r/purescript • • Apr 03 '20

purescript-flame: cool & well documented alternative Elm like frontend framework

46 Upvotes

GitHub | Documentation website

Hello everyone! I shamelessly took purescript-hedwig and added more features to make a complete Elm like frontend framework. Including:

  • Different ways to handle application events

  • Server side rendering (a la React hydration)

  • Signals for arbitrary custom events

  • Some convenience type classes and functions for the DSL markup

Following the links above, there are plenty of examples and documentation. There is still need of a few polishing touches (like adding benchmarks), but overall it is stable and I am quite happy using it on my own projects (e.g. here).


r/purescript • • Sep 11 '19

Recommended tooling for PureScript applications in 2019 - Discourse

Thumbnail
discourse.purescript.org
41 Upvotes

r/purescript • • May 19 '23

Intro to PureScript for TypeScript developers

Thumbnail
advancedweb.hu
40 Upvotes

r/purescript • • Oct 02 '16

PureScript Compiler v0.10.1

Thumbnail
github.com
39 Upvotes

r/purescript • • May 22 '18

PureScript Compiler Release v0.12.0

Thumbnail
github.com
38 Upvotes

r/purescript • • Feb 28 '17

purescript-halogen v1.0.0 released

Thumbnail
github.com
38 Upvotes

r/purescript • • Aug 20 '20

[Updated]: How to Write PureScript React Components to Replace JavaScript

Thumbnail
thomashoneyman.com
35 Upvotes

r/purescript • • Mar 31 '20

Introducing Halogen Hooks (React Hooks for PureScript's Halogen)

35 Upvotes

I'm excited to announce Halogen Hooks, a new approach to stateful code in Halogen inspired by React Hooks. I explained hat Hooks are, what problems they solve, and how they can make your Halogen code better in this article:

https://thomashoneyman.com/articles/introducing-halogen-hooks

The library is available here and you can use it in your Halogen code today:

https://github.com/thomashoneyman/purescript-halogen-hooks

If you use Halogen, I hope you give Hooks a try to see how they feel!


r/purescript • • Feb 05 '21

IHP now comes with a new PureScript + Halogen Template, for having Haskell in the Backend and PureScript in the Frontend :)

Thumbnail
ihp.digitallyinduced.com
34 Upvotes

r/purescript • • Dec 14 '17

What I Wish I Knew When Learning PureScript

34 Upvotes

I don't know if it already exists, but I wanted a clear and concise overview of the language and tools. So I made one in the same style as "What I Wish I Knew When Learning Haskell" by Stephen Diehl.

https://github.com/mjepronk/wiwinwl-purescript

It's definitely not complete yet, and I will expand it in the coming weeks, but pull requests are welcome!


r/purescript • • Feb 24 '21

PureScript and Haskell

Thumbnail blog.drewolson.org
33 Upvotes

r/purescript • • May 27 '20

Used Purescript to put together a COVID-19 data aggregator/animotor/analyzer

Thumbnail
coronavirus.jle.im
33 Upvotes

r/purescript • • Dec 11 '16

PureScript Compiler v0.10.3

Thumbnail
github.com
33 Upvotes

r/purescript • • Jan 16 '18

I wrote an Alexa Skill in Purescript

32 Upvotes

Today my Alexa Skill “Secret Word”, that I wrote in Purescript, was published to the Skill Store.

I found Purescript to be an incredibly pleasant language for implementing an Alexa Skill. I really appreciated being able to narrowly define the type of my “Session” (the record of state that is manipulated throughout the stages of a user’s interaction with the skill) and the “Intents” (categories of user actions). After that, implementing the actual logic of the skill felt like filling in the blanks, thanks to the power of the type checker. This is despite my being a relative newbie to Purescript (and the whole family of Haskell-like languages).

In the course of implementing my skill I produced a library 'purescript-alexa’ which in the present iteration isn't anything more than (incomplete) type definitions for the Alexa "Event" object that is passed in on each skill invocation. In future iterations I hope to provide some helpers, maybe stricter types, and possibly even a way to generate the "Language Model" and "Intent Schema" (JSON objects which right now I've manually synced with the definitions in my skill).

Anyway, I had a lot of fun. I think an Alexa Skill is a great beginning Purescript project -- it was for me -- and I'd encourage others to try it out!


r/purescript • • Nov 02 '22

Recommended Tooling for PureScript in 2022

Thumbnail
discourse.purescript.org
31 Upvotes

r/purescript • • Jan 19 '22

Purescript For Haskellers by Benjamin James Mikel Hart

Thumbnail
youtube.com
31 Upvotes

r/purescript • • May 23 '19

lumi.dev - Announcing Lumi Components

Thumbnail lumi.dev
30 Upvotes