News aggregator

Propositions in Haskell

haskell-cafe - Wed, 05/15/2013 - 4:34pm
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

cassy 0.5 released

Haskell on Reddit - Wed, 05/15/2013 - 2:44pm
Categories: Incoming News

Presenting the Rasenschach soccer simulation!

Haskell on Reddit - Wed, 05/15/2013 - 2:40pm

http://hackage.haskell.org/package/Rasenschach

Rasenschach is a soccer game. The game is written is Haskell with an FRP approach taken from Yampa Arcade:

http://haskell.cs.yale.edu/wp-content/uploads/2011/01/yampa-arcade.pdf

Each object (player, ball, game) is modeled as a Yampa signal function. The game uses SDL for graphics and sound.

This is the first project I uploaded on HackageDB, so any feedback is very welcome!

submitted by martingw
[link] [comment]
Categories: Incoming News

My first Haskell project is a file watcher.

Haskell on Reddit - Wed, 05/15/2013 - 10:53am

http://hackage.haskell.org/package/steeloverseer-0.2.0.0

I meant it to function similarly to yesod-devel so I wouldn't have to manually recompile a toy db I've been working on. I'm posting here for ideas on how to improve my code. As a beginner I sometimes completely miss obvious best practices. Thanks reddit!

submitted by schellsan
[link] [12 comments]
Categories: Incoming News

Using hackage for for local builds?

Haskell on Reddit - Wed, 05/15/2013 - 10:22am

I'm considering setting up hackage as a local build environment. I'm interested if anyone else in the community has considered and/or tried this, and how it turned out.

submitted by clewis
[link] [6 comments]
Categories: Incoming News

Haskell Amuse-Bouche - YouTube

del.icio.us/haskell - Wed, 05/15/2013 - 6:11am
Categories: Offsite Blogs

Wolfgang Jeltsch: ucs 2.2 released

Planet Haskell - Wed, 05/15/2013 - 5:52am

I have released a new version of the LaTeX ucs package yesterday, which is version 2.2. It fixes the bug that is described in the TeX StackExchange question Conflict between ifxetex and ucs under pdflatex/xelatex – why?.


Tagged: CTAN, LaTeX, software release, StackExchange, TeX, ucs (LaTeX package), Unicode
Categories: Offsite Blogs

Terra: A low-level counterpart to Lua

Lambda the Ultimate - Wed, 05/15/2013 - 2:38am

A very interesting project developed by Zachary DeVito et al at Stanford University:

Terra is a new low-level system programming language that is designed to interoperate seamlessly with the Lua programming language:

-- This top-level code is plain Lua code. print("Hello, Lua!") -- Terra is backwards compatible with C -- we'll use C's io library in our example. C = terralib.includec("stdio.h") -- The keyword 'terra' introduces -- a new Terra function. terra hello(argc : int, argv : &rawstring) -- Here we call a C function from Terra C.printf("Hello, Terra!\n") return 0 end -- You can call Terra functions directly from Lua hello(0,nil) -- Or, you can save them to disk as executables or .o -- files and link them into existing programs terralib.saveobj("helloterra",{ main = hello })

Like C, Terra is a simple, statically-typed, compiled language with manual memory management. But unlike C, it is designed from the beginning to interoperate with Lua. Terra functions are first-class Lua values created using the terra keyword. When needed they are JIT-compiled to machine code.

Seems as if the target use case is high-performance computing. The team has also released a related paper, titled Terra: A Multi-Stage Language for High-Performance Computing:

High-performance computing applications, such as auto-tuners and domain-specific languages, rely on generative programming techniques to achieve high performance and portability. However, these systems are often implemented in multiple disparate languages and perform code generation in a separate process from program execution, making certain optimizations difficult to engineer. We leverage a popular scripting language, Lua, to stage the execution of a novel low-level language, Terra. Users can implement optimizations in the high-level language, and use built-in constructs to generate and execute high-performance Terra code. To simplify meta-programming, Lua and Terra share the same lexical environment, but, to ensure performance, Terra code can execute independently of Lua’s runtime. We evaluate our design by reimplementing existing multi-language systems entirely in Terra. Our Terra-based auto-tuner for BLAS routines performs within 20% of ATLAS, and our DSL for stencil computations runs 2.3x faster than hand-written C.

Categories: Offsite Discussion

Philip Wadler: Bike lanes, fewer accidents, better for business

Planet Haskell - Wed, 05/15/2013 - 2:09am

A study conducted in New York City last year shows that bike lanes decrease accidents by up to 58%, while increasing retail business by up to 49%.  Spotted via Boing Boing.  Edinburgh has plans to install a bike lane on George Street downtown. I hope it will be the first of many.
A new study from the New York Department of Transportation shows that streets that safely accommodate bicycle and pedestrian travel are especially good at boosting small businesses, even in a recession.

NYC DOT found that protected bikeways had a significant positive impact on local business strength. After the construction of a protected bicycle lane on 9th Avenue, local businesses saw a 49% increase in retail sales. In comparison, local businesses throughout Manhattan only saw a 3% increase in retail sales.
Categories: Offsite Blogs

list comprehension doesn't work

haskell-cafe - Tue, 05/14/2013 - 3:57pm
Hi, I have to write a function which returns a list of all pairs (x,y) where x, y ∈ N AND: – x is the product of two natural numbers (x = a · b, where a, b ∈ N) AND – x is really bigger than 5 but really smaller than 500, AND – y is a squer number (y = c² where c ∈ N) NOT greater than 1000, AND – x is a divisor of y. My attempt is as follows: listPairs :: [(Int, Int)] listPairs = [(x,y) | x<-[0..], y<-[0..], x<-[0..]*[0..], x > 5, x < 500, (y*y) < 1001, mod y x == 0] However it doesn't work unfortunatly Could anyone tell me where my mistake is? Thanks. -- View this message in context: http://haskell.1045720.n5.nabble.com/list-comprehension-doesn-t-work-tp5730158.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Trouble with Debug.Trace when using a library

haskell-cafe - Tue, 05/14/2013 - 2:03pm
My project is split in two packages, A and B, where B uses A. All together, there are about 100 haskell modules. Currently, there seems to be a loop somewere, that only seems to occur when working with rather large datastructures. I use trace (from Debug.Trace) to see what exactly is going on. As long as I trace functions from B, trace works as expected. However, at some point I need to trace into functions supplied by package A. In package A I have a function like this: (I have simplified the function) fA :: SomeInput -> SomeResult fA a = let x = f a in trace ("Entering fA") x (The function f is defined in package A) In package B, I have a function like this: fB :: SomeInput -> SomeResult fB a = let x = fA a in trace ( "Entering fB") x At runtime, I get the message Entering fB and then nothing more. a lot of cpu is used, but no more output. I have made some wrappers like the ones above. As long as they are in the same package, trace works fine. However, when entering a function
Categories: Offsite Discussion

Monoid, Monad, and more in C++ [x-post from /r/cpp]

Haskell on Reddit - Tue, 05/14/2013 - 1:35pm

(original post here)

Long time lurker, first time poster here. For a while now, I've worked on a re-implementation of a bunch of Haskell type classes, data types, and related functions in C++.

It basically started out as a simple "just for fun"-experiment--to see how much was possible--but it proved interesting enough that I just kept adding to it.

The FTL (Functional Template Library), as I came to call the library, still does not cover all that much, but it does some of the basics fairly well (Monad, Monoid, Maybe, ...), I think. In fact, at this point I think some of the results are actually quite neat and might just be useful to someone.

Anyway, leaving it here because I feel the code has reached a stage where some outside input would be nice, and reddit seemed as good a place as any.

submitted by abeark
[link] [10 comments]
Categories: Incoming News