background preloader

Try Haskell! An interactive tutorial in your browser

Try Haskell! An interactive tutorial in your browser
Related:  Haskell

babysteps in using Persistent to interact with PostgreSQL as I mentioned I want to try some real-life Haskell and of course this means using some kind of database. I looked around a bit and found the really great Persistent package from Micheal Snoyman. Not only is this wonderfuly documented – no you get an yesod integration and a online-book(chapter) explaining it for free – thank you Micheal! This post will only detail the setup and installation I had to do on top of my PostgresSQL installation and it’s more or less my notes I wrote along the way (I hope you enjoy this experiment). So here we go – with opened SublimeText and console we start… made a directory and initialized a git repository in it git initcopied my generic haskell .gitignore into itinitialized cabal cabal init setting up the basic names and stuffadded persistent, persistent-sqlite and persistent-postgresql as dependenciesshamelessly copied the code from here into main.hs: Ok – comment out the postgres part for now – the code does not need it. a cabal run yields

Haskell: The Confusing Parts If you’re used to the C family of languages, or the closely related family of “scripting languages,” Haskell’s syntax (mainly) is a bit baffling at first. For some people, it can even seem like it’s sneaking out from under you every time you think you understand it. This is sort of a FAQ for people who are new to Haskell, or scared away by its syntax. Use this as a cheat sheet, not a textbook. Misc. Stuff You Should Know Already Quick review, because if you’ve heard of Haskell, you should also have heard of most of this. foo :: Bar baz -> Bar quux is a type signature for the function foo, where Bar baz is the type of argument it takes, and Bar quux is the type of the return value. There’s no null and no void. Haskell’s syntax is indirectly based on ML, so if you stop reading here and go learn OCaml instead, some of this information will still be kinda useful. Type Names and Constructors The “has type” (::) operator can appear as an expression in parentheses, or a separate declaration.

Chumby 8 Verbindet sich z.B. über einen WLAN Router mit dem Internet.Es gibt mehr als 1500 Apps in 30 Kategorien - alle kostenlos.Alles in Einem: Internet-Social-Media-MP3-Player-Gamer-Radio-Wecker.Verfügt über ein großes, hochauflösendes 8" Touchscreen Display.Richte einen Chumby Account ein, lade Deine Lieblings-Apps herunter und bleibe so über alles, was Dich interessiert, auf dem Laufenden, z.B. Facebook, Youtube, Nachrichten, Sport, Wettervorhersagen, Ebay und viel mehr. Der Chumby 8 ist das Nachfolgemodell des Chumby One und ebenso wie dieser ist auch Chumby 8 ein enorm vielseitiges Gerät der Unterhaltungselektronik. Was macht man mit Chumby und wo gehört er hin? Neben Dein Bett: Schlafe zur Musik Deines Lieblings-Internet-Radiosenders ein, werde durch einen Zen Gong geweckt oder z.B. durch den neuesten Podcast. Das Tolle an Chumby ist, dass Du das Internet völlig ohne Computer nutzen kannst, denn seine Funktionsweise ist ähnlich wie bei einem Smartphone oder Tablet PC. Technische Details

Pointfree Pointfree Style It is very common for functional programmers to write functions as a composition of other functions, never mentioning the actual arguments they will be applied to. For example, compare: with: These functions perform the same operation, however, the former is more compact, and is considered cleaner. This style is particularly useful when deriving efficient programs by calculation and, in general, constitutes good discipline. It is a common experience when rewriting expressions in pointfree style to derive more compact, clearer versions of the code -- explicit points often obscure the underlying algorithm. Point-free map fusion: foldr f e . map g == foldr (f . g) e versus pointful map fusion: foldr f e . map g == foldr f' e where f' a b = f (g a) b Some more examples: -- point-wise, and point-free member mem, mem' :: Eq a => a -> [a] -> Bool mem x lst = any (== x) lst mem' = any . (==) 1 But pointfree has more points! 2 Background 3 Tool support A transcript: 4 Combinator discoveries

Haskell Haskell is a functional programming language. If you are a seasoned programmer, consult the overview to see what makes Haskell unique and different from other languages. Haskell is distinct in a few ways: Haskell is pure. Haskell is enjoyable to use because dealing with pure functions makes code much easier to reason about, and the advanced type system helps catch silly and profound mistakes. Our aim in this book is to introduce you to the Haskell programming language — from the very basics to advanced features — and to computer programming in general. Overview[edit] The book is divided into a Beginner's Track, an Advanced Track, and a section called Haskell in Practice which covers more day-to-day issues and uses mostly items from the Beginner's Track. Search[edit] You may search the book here: Beginner's Track[edit] Our aim in this track is to introduce you to Haskell basics and some commonly used libraries. Advanced Track[edit] Haskell in Practice[edit] Appendices[edit] About the book[edit]

Digitales Board ePawn Arena schafft Verbindung zwischen Smartphone, Tablet PC und traditionellen Brettspielen Mit dem ePawn Arena wurde ein neues Gerät vorgestellt, das eine Verbindung zwischen Tablet PC, Smartphone und traditionellen Brettspielen schaffen soll. Das ePawn Arena, das auf den ersten Blick selbst wie ein Tablet erscheint, ist ein digitales Spielbrett, auf dem sich die Schlachten schlagen lassen sollen, wie man sie von vielen traditionellen Brettspielen kennt. ePawn Arena – digitales Brettspiel Board Die Spielfiguren, die auf dem ePawn Arena platziert werden, sind in der Lage miteinander zu interagieren. Das digitale Spielbrett erkennt die physischen Spielfiguren und bietet so endlose Möglichkeiten für eine Interaktion. ePawn Arena Video mit einer Demonstration Eigene Spiele fürs ePawn Arena sind möglich So können mittels des ePawn Arena Spielbretts beispielsweise die Spielfiguren einander mit Waffen oder Zaubersprüchen angreifen. Digitales Spielbrett soll noch in diesem Jahr auf den Markt kommen Quelle & Bild: dvice

Haskell Haskell is a functional programming language. If you've programmed before and would like to see a little bit of how Haskell works and is different from other programming languages, see the overview. Haskell is unique in two ways. First, it is a pure functional programming language. If you have a function and you call it twice in two different places with the same arguments then it will return exactly the same value both times. So, why do Haskellers like their language? In this book we aim to introduce you both to the Haskell language, from the very basics to the most advanced features, and to computer programming in general. Overview[edit] The book is divided into three sections: the Beginner's Track, the Advanced Track, and Haskell in Practice, which is designed to cover the more day-to-day issues, and is readable with knowledge of the Beginner's Track. Beginner's Track[edit] Most chapters contain exercises where you can test yourself on what you learned in that chapter. Appendices[edit]

The Haskell Cheatsheet

Related: