Get flash to fully experience Pearltrees
A few days ago, my Facebook colleague Andrei Alexandrescu posted a note entitled Three Optimization Tips for C++ , which reminded me that I had unfinished business with Haskell’s text package .
Let’s start with a simple “Hello World” application. The idea is to achieve the following: The input to the system is static signal with value “Hello Yampa”. This signal will be piped through the main program without being changed. Thus, the resulting signal should be just “Hello Yampa”. All the output function has to do is to print it via putStrLn and indicate that it wants to terminate the program. import FRP.Yampa main :: IO () main = reactimate initialize input output process initialize :: IO String initialize = return "Hello Yampa" input :: Bool -> IO ( DTime , Maybe String ) input _ = return (0 . 0, Nothing ) output :: Bool -> String -> IO Bool output _ x = putStrLn x >> return True process :: SF String String process = identity
Gtk2hs is my favorite way to do cross-platform GUI programming in Haskell — and it’s the toolkit to use if you want to work through the examples in the excellent Real World Haskell . But the official instructions for building gtk2hs on Windows leave out some important information, so here’s how I got it all working on Windows 7… Haskell Platform
Gregory D. Weber July 5, 2012 Sifflet Version 2.0 Just as water flows through rivers, and as rivers flow into other rivers and join their waters, so data flows through channels and mingles with other flows of data. Just as factories, sewage processing plants, dams, or power plants on a river may alter its water (unfortunately, often for the worse), so information processing units transform the data that flow through them (but for the better, we hope).
I gave a talk ( video, slides, and paper ) at ICFP last month, arguing that it can be easy to build a high-assurance compiler. I gave a similar talk as a keynote a couple weeks later at the very enjoyable Midwest Verification Day , hosted by Kansas University this year (thanks Andy Gill and Perry Alexander for inviting me!). This paper wraps up the Copilot project . I had a great time (I mean, how often do formal methods engineers get to be around NASA subscale jet aircraft ?!?). I’ve been working on a Haskell library for testing Haskell programs I call SmartCheck .
Les fonctions Haskell peuvent prendre d’autres fonctions en paramètres, et retourner des fonctions en valeur de retour. Une fonction capable d’une de ces deux choses est dite d’ordre supérieur. Les fonctions d’ordre supérieur ne sont pas qu’une partie de l’expérience Haskell, elles sont l’expérience Haskell. Elles s’avèrent indispensable pour définir ce que les choses sont plutôt que des étapes qui changent un état et bouclent. Elles sont un moyen très puissant de résoudre des problèmes et de réflexion sur les programmes.
I’ve combined my new found hobby – cycling; my favourite gizmo – my Android phone; and my favourite programming language – Haskell, to implement the project: Gps2HtmlReport. The program takes exported GPS tracks (gpx files), and generates a HTML report providing information such as: Journey distance & time, and when the journey took place Two diagrams charting elevation, accumulated distance and average speed over time An OpenStreetMap diagram illustrating the journey Here’s an example HTML report, generated by the program: http://www.macs.hw.ac.uk/~rs46/gps2htmlreport/3/
The actor model provides high-level concurrency abstractions to coordinate simultaneous computations by message passing. Languages implementing the actor model such as Erlang commonly only support single-headed pattern matching over received messages. In
The current section of the GHC manual on creating DLL's on Windows is fairly confusing to read, and has some bugs (i.e. 3605 ). Since I got tripped up by the current documentation, I offered to rewrite sections 11.6.2 and 11.6.3 (merging them in the process). Creating Windows DLL's with GHC is surprisingly easy, and my revised manual section includes an example which can be called from both Microsoft Word (using VBA) and C++. I've pasted the revised manual section as the rest of this blog post.
real world haskell
From HaskellWiki This is part of Ninety-Nine Haskell Problems , based on Ninety-Nine Prolog Problems and Ninety-Nine Lisp Problems . 1 Problem 1 (*) Find the last element of a list. (Note that the Lisp transcription of this problem is incorrect.)
A lot has been written on the topic of Foreign Function Interface and its use for calling Haskell from C, yet the official GHC and FFI documentation lack a description of an easy way to create a shared library that may be used from C in a regular way. In this article I present a little bit hacky, but still very simple and comfortable way to do this on Linux (which hopefully applies to all similar Unixes as well). The FFI documentation as well as the GHC manual explain that you have to call hs_init before calling into Haskell. I will present a C helper that does this automatically, I shall explain why it really works and I will provide a Makefile that makes this all pretty easy.
From HaskellWiki Functional Reactive Programming (FRP) integrates time flow and compositional events into functional programming. This provides an elegant way to express computation in domains such as interactive animations, robotics, computer vision, user interfaces, and simulation. 1 Introduction FRP is about domain-specific languages that capture the notion of time-varying values.