Giter Site home page Giter Site logo

conduit-examples's Introduction

README

This project contains examples of using Haskell's conduit library.

What is this repository for?

  • These code examples provide iterative examples of building up different uses of conduit (mostly) one step at a time
  • Version 0.1

How do I get set up?

Prerequisites:

  • Have GHC version >= 7.8 installed (examples tested against 7.8.3)
  • Have Cabal version >= 1.20 installed (examples tested against 1.20.0.2)
  • Tested on Windows 8.1 and Amazon Linux AMI
  • telnet or an equivalent tool must be available on the system (for running the examples)

Installing:

  • Run cabal sandbox init first
  • Run cabal configure; install any missing libraries with cabal install library-name
  • Run cabal build
  • Everything should just work from here, assuming your environment is not too crazy/different from the test environments listed above
  • On *nix, you might not see output on the network examples until you Ctrl+C the server

How do I run the examples?

conduit-101-01:

  • Just run the binary built by cabal build; this should be at dist/build/conduit-101-01/conduit-101-01
  • The user prompts should take you the rest of the way

conduit-101-02:

  • Run the binary built by cabal build; this should be at dist/build/conduit-101-02/conduit-101-02
  • From another shell terminal, run telnet 127.0.0.1 4000 (or an equivalent tool to communicate to localhost on port 4000)
  • Type some words; the server output should split each word to a new line until a newline character is read

conduit-101-03:

  • Run the binary built by cabal build; this should be at dist/build/conduit-101-03/conduit-101-03
  • Run the server binary from conduit-101-02
  • Press ENTER for the program to immediately write some output to the server

conduit-101-04:

  • Run the binary built by cabal build; this should be at dist/build/conduit-101-04/conduit-101-04
  • Run the server binary from conduit-101-02
  • Press ENTER to continue to the next setup step
  • From another shell terminal, run telnet 127.0.0.1 4002 (or an equivalent tool to communicate to localhost on port 4002)
  • Press ENTER to move to the "execution" step
  • Now, type some text into the telnet terminal; you should see the same output run through this server as well as the conduit-101-02 server

conduit-examples's People

Contributors

stormont avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.