23 Jan 2019
2 min read
From time to time we share open source learning projects we love. This week we’re featuring Real World Halogen by Thomas Honeyman.
PureScript is a delightful purely-functional language that offers powerful, pragmatic tools to manage complexity and help you design, build, and refactor reliable apps of any size. This repository demonstrates the principles I apply at work every day in more than 2,000 lines of thoroughly commented code.
I’m a senior software engineer at Awake Security (and previously at CitizenNet). Both companies have large production PureScript applications that have remained reliable, understandable, and maintainable as they scale. I’m convinced PureScript is the best language for single-page applications available today.
This repository follows the RealWorld spec to implement a Medium clone called Conduit using Halogen. It’s large enough to demonstrate real world examples (CRUD, state management, scalable architecture, type classes, components, etc.) but not so large as to be overwhelming.
You can install and build the project with:
# clone the repository git clone https://github.com/thomashoneyman/purescript-halogen-realworld cd purescript-halogen-realworld # install dependencies yarn install # build the project and run the local server yarn build-serve
If you are doing local development, I'd recommend running
yarn watch-dev while working, and only use
yarn watch-serve when you need to view how your changes reflect in the application (Parcel takes some time to run).
This project is intended to give non-PureScript developers a taste of what a small application in the language looks like, and to give advanced beginners in PureScript a resource to feel comfortable building reliable applications of their own.
PureScript is a delightful language that becomes only more interesting and rewarding the more you use it and the larger your application becomes; if you haven’t yet tried it out, I encourage you to do so. Not convinced? Kris Jenkins has a lovely talk about PureScript which might change your mind.
The PureScript community is overwhelmingly warm and helpful. If you would like some help getting started, please consider joining the official Discourse and functional programming Slack (invite link). You may also want to check out:
PRs are welcome! Any functional changes will need to remain compliant with the RealWorld spec, and I may re-word documentation changes to fit with the voice used throughout the repository.
See other articles by Thomas
Ground Floor, Verse Building, 18 Brunswick Place, London, N1 6DZ
108 E 16th Street, New York, NY 10003
Join over 111,000 others and get access to exclusive content, job opportunities and more!