Git Product home page Git Product logo

hurricane's Introduction

Hurricane

Hurricane, a Tornado inspired Warp powered web framework written in Haskell.

The information below will be moved into the wiki.

Why Hurricane?

Dynamic languages are popular on the web because they are easy to use. We're forced to use Javascript on the client, so why not just put up with it on the server too?

Most people will tell you to use static languages for things like correctness, proofs, and security. Our reasoning is simple. Programming in a dynamic language requires actually running the code to deduce simple errors like typos and type mismatches. Static code tells you these things before you get to actually run it.

Of course, imposing things on the programmer can be both aggravating and time-inefficient. However, silly mistakes will always produce errors or undefined behavior (ew) when you run the code. Dealing with them at compile-time is smarter, but it usually comes at a cost. With Haskell, we get concise code, but it's tough to understand. The goal of Hurricane is to abstract the confusing stuff away and make it easy for you to work in a world where "code that compiles just works."

The other significant advantage is speed. Haskell is powered by Warp, which has some impressive benchmarks. With GHC 7 and Iteratees, Haskell has all the tools to be the next big concurrent language. Of course, this stuff is pretty tough (at least for us) to understand. Hurricane makes this power available, but with the ease of programming in something like Tornado.

Finally, people argue that dynamic code is easier to iterate. This is true in the short short term. But we believe that knowing the type of something in advance gives you a little bit of a guarantee about what it does. You know ahead of time what you're breaking when you change something, so you can try out a new idea, and then know exactly what you have to fix to make everything work again. In a dynamic setting, you have to wait to run a bunch of different scenarios before finding this out.

Design Principles

  1. Code should not favor performance over ease-of-use. Performance is important, and that's why we're using Warp, but nowadays iterating over ideas is the top priority, and this relies on readability.
  2. Code should not be concise at the expense of readability. Hurricane was written by people relatively new to the language, and we want you to be able to understand our code without wondering why things typecheck and work.
  3. You should not have to generate files or code to use Hurricane. To us, Tornado stands because out it doesn't impose a design paradigm or force you to organize your project with a specific convention. It stays out of the way for the most part, and most of its functionality lies in the library tools it provides. We want the same for Hurricane.
  4. If it compiles it works... almost. Certain pieces of a webapp are suited to parsing at runtime, like routes ("/foo/bar" gets this handler) and templates (programming logic injected into html). But, any such extension should be parsed when the application starts up. In the case of an error, it should prevent the application from serving traffic and clearly notify what the problem is.

hurricane's People

Contributors

ankrgyl avatar anlu avatar

Stargazers

Serhii Shyran avatar Sławomir Janecki avatar  avatar Byron Gibson avatar

Watchers

 avatar Serhii Shyran avatar

Forkers

sshyran

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.