News aggregator
Propositions in Haskell
Presenting the Rasenschach soccer simulation!
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]
Understanding the Yoneda Lemma
Locks, Actors, and STM in pictures
My first Haskell project is a file watcher.
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]
Using hackage for for local builds?
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]
Haskell Amuse-Bouche - YouTube
Wolfgang Jeltsch: ucs 2.2 released
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
Terra: A low-level counterpart to Lua
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.
Philip Wadler: Bike lanes, fewer accidents, better for business
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.
list comprehension doesn't work
Trouble with Debug.Trace when using a library
Monoid, Monad, and more in C++ [x-post from /r/cpp]
(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]