Re: [Haskell-cafe] lhs2TeX: automatic line wrap within code blocks?

2012-04-05 Thread Dominique Devriese
David, The easiest solution is probably to use multi-line string literals and line-wrap manually: \begin{code} cyphertext = rlkmlj, zlnift ekblvke pqc elvm if pzlp gblrk, akrlomk zk zle \ lfpiriglpke pzlp, if pzk flpojlb rcojmk cs knkfpm, morz qcobe ak pzk rcfeorp \ cs nkjriftkpcjiu, bklnkm

Re: [Haskell-cafe] lhs2TeX: automatic line wrap within code blocks?

2012-04-05 Thread David Mihola
Dominique, thank you very much for your reply! Yes, that would work for the code-blocks, but I'd still prefer automatic line wrapping like in this example: http://www.bollchen.de/blog/2011/04/good-looking-line-breaks-with-the-listings-package/ Also this does not solve the case of multi line

[Haskell-cafe] Yesod 1.0 Release Candidate

2012-04-05 Thread Michael Snoyman
Hi everyone, I'd like to announce the availability of the Yesod 1.0 release candidate. The code is available on Hackage now, so you should be able to install with a simple `cabal update cabal install yesod` to get up-and-running. If you've been installing from Github or Yackage, you'll probably

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Evan Laforge
I love the idea of easier to use FFI, but isn't the haskell FFI intentionally very low level, and intended to be used with tools? In that light, maybe it would be easier to extend hsc2hs with fancier macros and the ability to generate wrappers to directly call C++ methods and construct C++

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Brandon Allbery
On Thu, Apr 5, 2012 at 01:53, Sutherland, Julian julian.sutherlan...@imperial.ac.uk wrote: data Tree = Node Left Right | Leaf Could be converted to a struct in C/C++: struct Tree { struct Tree* left; struct Tree* right; }; Shouldn't this actually be a tagged union? Not that

Re: [Haskell-cafe] Fail-back monad

2012-04-05 Thread oleg
I thoutgh on the use or ErrorT or something similar but the fact is that i need many bacPoints, not just one. That is, The user can go many pages back in the navigation pressing many times te back buttton. The approach in the previous message extends to an arbitrary, statically unknown

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Holger Siegel
Am 05.04.2012 um 08:42 schrieb Brandon Allbery: On Thu, Apr 5, 2012 at 01:53, Sutherland, Julian julian.sutherlan...@imperial.ac.uk wrote: data Tree = Node Left Right | Leaf Could be converted to a struct in C/C++: struct Tree { struct Tree* left; struct Tree* right; };

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Brandon Allbery
On Thu, Apr 5, 2012 at 03:21, Holger Siegel holgersiege...@yahoo.de wrote: Am 05.04.2012 um 08:42 schrieb Brandon Allbery: On Thu, Apr 5, 2012 at 01:53, Sutherland, Julian julian.sutherlan...@imperial.ac.uk wrote: data Tree = Node Left Right | Leaf Could be converted to a struct in

Re: [Haskell-cafe] Fail-back monad

2012-04-05 Thread Stephen Tetley
There is also recent work by Aaron Turon and Olin Shivers - Modular Rollback through Control Logging http://www.ccs.neu.edu/home/shivers/ http://www.ccs.neu.edu/home/turon/ Note that as well as the paper on Olin Shivers's site there is a more recent monadic presentation on Aaron Turon's site

Re: [Haskell-cafe] thread killed

2012-04-05 Thread Gregory Collins
+haskell-cafe, oops On Thu, Apr 5, 2012 at 11:04 AM, Gregory Collins g...@gregorycollins.netwrote: On Wed, Apr 4, 2012 at 10:09 PM, tsuraan tsur...@gmail.com wrote: It's hard to rule Snap timeouts out; try building snap-core with the -fdebug flag and running your app with DEBUG=1, you'll

Re: [Haskell-cafe] thread killed

2012-04-05 Thread Michael Snoyman
On Thu, Apr 5, 2012 at 12:05 PM, Gregory Collins g...@gregorycollins.net wrote: +haskell-cafe, oops On Thu, Apr 5, 2012 at 11:04 AM, Gregory Collins g...@gregorycollins.net wrote: On Wed, Apr 4, 2012 at 10:09 PM, tsuraan tsur...@gmail.com wrote: It's hard to rule Snap timeouts out; try

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Anthony Cowley
On Thursday, April 5, 2012 at 1:53 AM, Sutherland, Julian wrote: Hey Guys, I'm Julian, I am reaching the end of my second year as a JMC (Joint Mathematics and Computer science) Student at Imperial College London and I'd like to apply to GSOC for a project involving Haskell and I just

[Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Grigory Sarnitskiy
Hello! I've just realized that Haskell is no good for working with functions! First, what are 'functions' we are interested at? It can't be the usual set-theoretic definition, since it is not constructive. The constructive definition should imply functions that can be constructed, computed.

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Vo Minh Thu
Le 5 avril 2012 16:14, Grigory Sarnitskiy sargrig...@ya.ru a écrit : Hello! I've just realized that Haskell is no good for working with functions! First, what are 'functions' we are interested at? It can't be the usual set-theoretic definition, since it is not constructive. The constructive

Re: [Haskell-cafe] Is this a correct explanation of FRP?

2012-04-05 Thread Paul Liu
On Thu, Apr 5, 2012 at 4:30 AM, Ertugrul Söylemez e...@ertes.de wrote: Paul Liu nine...@gmail.com wrote: This isn't switching.  It's selection.  If fullTime decides to be productive, then alterTime acts like fullTime.  Otherwise it acts like halfTime.  If both inhibit, then alterTime

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Donn Cave
Quoth Anthony Cowley acow...@seas.upenn.edu, ... I think this is a consequence of line buffering rather than a bug. If you write your own increment function in Haskell, you get the same behavior. If you `hSetBuffering stdout NoBuffering` before your `putStr` call, you should get the behavior

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Andrew Butterfield
On 5 Apr 2012, at 15:14, Grigory Sarnitskiy wrote: Hello! I've just realized that Haskell is no good for working with functions! Obviously, that's not all of the imaginable possibilities. One also can rewrite programs. And write programs that rewrite programs. And write programs

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Andrew Butterfield
Addendum: Intel's Forte was the framework, reFLect was the language : http://www.cs.ox.ac.uk/tom.melham/res/reflect.html Quoting that page: reFLect is a functional programming language designed and implemented by a team at Intel Corporation's Strategic CAD Labs under the direction of Jim

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Dan Doel
On Thu, Apr 5, 2012 at 10:14 AM, Grigory Sarnitskiy sargrig...@ya.ru wrote: First, what are 'functions' we are interested at? It can't be the usual set-theoretic definition, since it is not constructive. The constructive definition should imply functions that can be constructed, computed.

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Paul R
Grigory So now I wonder, what are the languages that are functional in Grigory the sense above? With a reasonable syntax and semantics, thus Grigory no assembler. I guess Lisp might be of this kind, but I'm not Grigory sure. In addition, I'm not a fan of parentheses. What else? Grigory Pure?

Re: [Haskell-cafe] thread killed

2012-04-05 Thread tsuraan
I think I might know what your problem is. You're accepting file uploads using handleMultipart, yes? Snap kills uploads that are going too slow, otherwise you would be vulnerable to slowloris (http://ha.ckers.org/slowloris/) DoS attacks. What's probably happening here is that you're doing

Re: [Haskell-cafe] thread killed

2012-04-05 Thread tsuraan
I think I might know what your problem is. You're accepting file uploads using handleMultipart, yes? Snap kills uploads that are going too slow, otherwise you would be vulnerable to slowloris (http://ha.ckers.org/slowloris/) DoS attacks. What's probably happening here is that you're doing

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-04-05 Thread Ben
perhaps it is too late to suggest things for GSOC -- but stephen tetley on a different thread pointed at aaron turon's work, which there's a very interesting new concurrency framework he calls reagents which seems to give the best of all worlds : it is declarative and compositional like STM,

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Tillmann Rendel
Paul R wrote: I am curious what are interesting use-cases for that? Symbolic analysis? self-compilers? Optimization. For example, imagine the following definition of function composition: map f . map g = map (f . g) f . g = \x - f (g x) In Haskell, we cannot write this, because we

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-04-05 Thread Ben Gamari
Ben midfi...@gmail.com writes: perhaps it is too late to suggest things for GSOC -- but stephen tetley on a different thread pointed at aaron turon's work, which there's a very interesting new concurrency framework he calls reagents which seems to give the best of all worlds : it is

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread KC
On Thu, Apr 5, 2012 at 11:59 AM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Paul R wrote: I am curious what are interesting use-cases for that? Symbolic analysis? self-compilers? Optimization. For example, imagine the following definition of function composition: map f .

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-04-05 Thread Ryan Newton
+1 -- the reagents model is interesting and it would be good to see a Haskell implementation. On Thu, Apr 5, 2012 at 3:05 PM, Ben Gamari bgamari.f...@gmail.com wrote: Ben midfi...@gmail.com writes: perhaps it is too late to suggest things for GSOC -- but stephen tetley on a different

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread Gábor Lehel
On Thu, Apr 5, 2012 at 8:59 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Paul R wrote: I am curious what are interesting use-cases for that? Symbolic analysis? self-compilers? Optimization. For example, imagine the following definition of function composition:  map f . map

[Haskell-cafe] Testing Concurrent Programs

2012-04-05 Thread satvik chauhan
How do you test concurrent programs in which you actually have to test over all possible interleaving schedules by the scheduler . Is this possible to do with quickcheck . Thanks , Satvik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org