All Projects → pointfreeco → Pointfreeco

pointfreeco / Pointfreeco

Licence: other
🎬 The source for www.pointfree.co, a video series on functional programming and the Swift programming language.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Pointfreeco

Elm Cheat Sheet
An overview of Elm syntax and features
Stars: ✭ 928 (+18.67%)
Mutual labels:  education, functional-programming
Test Each
🤖 Repeat tests. Repeat tests. Repeat tests.
Stars: ✭ 89 (-88.62%)
Mutual labels:  functional-programming, snapshot-testing
Functional Light Js
Pragmatic, balanced FP in JavaScript. @FLJSBook on twitter.
Stars: ✭ 14,764 (+1787.98%)
Mutual labels:  education, functional-programming
Swift Playgrounds
Collection of Swift playgrounds used in my posts: From functional aspects of Swift to C interoperability.
Stars: ✭ 134 (-82.86%)
Mutual labels:  swift-playgrounds, functional-programming
Codeworld
Educational computer programming environment using Haskell
Stars: ✭ 1,142 (+46.04%)
Mutual labels:  education, functional-programming
Pointless
Pointless: a scripting language for learning and fun
Stars: ✭ 116 (-85.17%)
Mutual labels:  education, functional-programming
Haskell Study Startup
Launch your own Haskell study group. Now.
Stars: ✭ 269 (-65.6%)
Mutual labels:  education, functional-programming
Optional
A robust option type for C#
Stars: ✭ 690 (-11.76%)
Mutual labels:  functional-programming
Learn Vim
Learning Vim and Vimscript doesn't have to be hard. This is the guide that you're looking for.
Stars: ✭ 7,221 (+823.4%)
Mutual labels:  education
Udacity Nanodegrees
🎓 List of Udacity Nanodegree programs with links to the free courses in their curricula
Stars: ✭ 5,893 (+653.58%)
Mutual labels:  education
Android Oss
Kickstarter for Android. Bring new ideas to life, anywhere.
Stars: ✭ 5,627 (+619.57%)
Mutual labels:  functional-programming
Carbon
🖤 Create and share beautiful images of your source code
Stars: ✭ 29,304 (+3647.31%)
Mutual labels:  education
Moon
🌙 The minimal & fast library for functional user interfaces
Stars: ✭ 6,058 (+674.68%)
Mutual labels:  functional-programming
Mlton
The MLton repository
Stars: ✭ 683 (-12.66%)
Mutual labels:  functional-programming
Pyret Lang
The Pyret language.
Stars: ✭ 771 (-1.41%)
Mutual labels:  education
Courses
Awesome Courses
Stars: ✭ 663 (-15.22%)
Mutual labels:  education
Gitignore.io
.gitignore.io is a web service designed to help you create .gitignore files for your Git repositories. The site has a graphical and command line method of creating a .gitignore for your operating system, programming language, or IDE.
Stars: ✭ 6,709 (+757.93%)
Mutual labels:  server-side-swift
Resources For Beginner Bug Bounty Hunters
A list of resources for those interested in getting started in bug bounties
Stars: ✭ 7,185 (+818.8%)
Mutual labels:  education
Letswritecode
🎓 code examples for Let's Write Code
Stars: ✭ 717 (-8.31%)
Mutual labels:  education
Frameless
Expressive types for Spark.
Stars: ✭ 717 (-8.31%)
Mutual labels:  functional-programming

🎬 www.pointfree.co

Swift 5.2 CI @pointfreeco

This repo contains the full source code for the Point-Free website, a video series exploring Swift and functional programming. The codebase is split into 3 pieces:

  • PointFree: This is the core application, and is responsible for routing requests, loading data and rendering HTML and CSS.
  • Styleguide: This library contains functions and data types for creating a consistent style across the entire website.
  • Server: This is the actual executable server. It uses NIO to handle the low-level server responsibilities, and hands everything else over to the PointFree package.

Point-Free Homepage

Getting Started

Interested in a video tour of the code base?

video poster image

The repo contains an extensive test suite and some playgrounds to explore. To get things running:

  • Open up a terminal window and grab the code:

    git clone https://github.com/pointfreeco/pointfreeco.git
    cd pointfreeco
    
  • Make sure cmark is installed. You can install it with Homebrew:

    brew install cmark # or your preferred installation method
    
  • Make sure Postgres is installed and running. It's our database of choice. You can install it with Homebrew:

    brew install postgres # or your preferred installation method
    brew services start postgresql # or your preferred launch method
    make db
    

    (If you use Postgres.app, EnterpriseDB, or another installation method, please follow some additional instructions in the CPostgreSQL README.)

With the project open in Xcode, you can:

  • Run the server locally
    • Select the Server target
    • Run: Command+R
    • Visit http://localhost:8080
  • Explore our playgrounds
    • Select the PointFree target
    • Build: Command+B
    • Open a playground!

Some fun things to explore

There're a lot of fun things to explore in this repo. For example:

  • We develop web pages in playgrounds for a continuous feedback loop. This is made possible by the fact that the entire server stack is composed of pure functions with side-effects pushed to the boundaries of the application. It allows us to load up any request in isolation, including POST requests, all without ever worrying about doing a side-effect. Server side Swift in a playground

  • We use snapshot testing to capture full data structures in order to verify their correctness. Not only do we do this in the traditional way of taking screenshots of web pages at various break points (e.g. on iPhone and desktop), but we can also snapshot any entire request-to-response lifecycle (e.g. the POST to a signup page does the correct redirect).

▿ Step
  ResponseEnded

▿ Request
  POST http://localhost:8080/launch-signup

  [email protected]

▿ Response
  Status 302 FOUND
  Location: /?success=true

Xcode Color Theme

Like the color theme we use in our episodes? Run make colortheme to install locally!

Related projects

Point-Free uses a bunch of interesting open-source software:

  • 🗺 swift-html: A Swift DSL for type-safe, extensible, and transformable HTML documents.
  • 🕸 swift-web: A collection of types and functions for dealing with common web server concerns, such as HTML render, CSS preprocessing, middleware and more.
  • 🎶 swift-prelude: Offers a standard library for experimental functional programming in Swift.
  • 🏷 swift-tagged: Helps us create strong contracts with our data boundaries, like JSON from GitHub and Stripe, and our PostgreSQL data.
  • 📸 swift-snapshot-testing: Powers our testing infrastructure by taking snapshots of various data structures to guarantee the correctness of their output. We use this on everything from middleware to ensure requests are correctly transformed into responses, and even entire web pages to make sure the site looks correct at a variety of sizes (e.g. on iPhone and desktop).

Explore more of our open-source on the Point-Free organization.

Learn More

Brandon gave a talk about most of the core ideas that went into this project at Swift Summit 2017.

The two sides of writing testable code

Find this interesting?

Then check out Point-Free!

License

The content of this project itself is licensed under the CC BY-NC-SA 4.0 license, and the underlying source code used to format and display that content is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].