Re: [Haskell-cafe] Android and Haskell

2009-06-17 Thread Toby Hutton
On Wed, Jun 17, 2009 at 4:31 PM, Erik de Castro Lopo mle...@mega-nerd.commle%2...@mega-nerd.com wrote: Well if the android phones have a JVM then something like OpenQuark should do the trick. The Android phones actually have a different VM which essentially takes compiled/translated java

Re: [Haskell-cafe] Applying Data.Map

2009-06-08 Thread Toby Hutton
Although in this example using Data.Map is overkill, if the alphabet was very large then Data.Map probably would be the way to go. In that case I'd use: map head . group . sort instead of nub . sort since it's noticeably quicker for large lists. This is because nub needs to preserve the order

Re: [Haskell-cafe] beginners question about fromMaybe

2009-06-02 Thread Toby Hutton
On Wed, Jun 3, 2009 at 8:59 AM, Nico Rolle nro...@web.de wrote: hi there heres a code snipped, don't care about the parameters. the thing is i make a lookup on my map m and then branch on that return value probePhase is sc [] m = [] probePhase is sc (x:xs) m    | val == Nothing  =

Re: [Haskell-cafe] beginners question about fromMaybe

2009-06-02 Thread Toby Hutton
 where next = probePhase ...            key = ... Argh, I really wish Gmail would allow me to compose in a fixed with width font! Does anyone know of a setting or something that I'm missing? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Best text editor

2009-04-14 Thread Toby Hutton
On Wed, Apr 15, 2009 at 8:57 AM, Jeff Wheeler j...@nokrev.com wrote: As one of the Yi developers, I'd love to hear some more specific feedback on this. Do you remember any specific Vim features that were missing? My main gripe with the vi emulation in Yi was in vty mode[1] and how it was

Re: [Haskell-cafe] Retargeting the ghc code generator

2009-04-02 Thread Toby Hutton
2009/4/3 Vasili I. Galchin vigalc...@gmail.com: Hello,   Is there any project to retarget the GHC code generator to generate Common Intermediate Language(CLI) in order to run on Mono or .NET? I assume that Mondrian did precisely that. There are/were a couple of projects attempting that

Re: [Haskell-cafe] Translating an imperative algorithm - negascout

2009-02-26 Thread Toby Hutton
On Fri, Feb 27, 2009 at 7:54 AM, Colin Paul Adams co...@colina.demon.co.uk wrote: Hello Haskellers, I want to implement the negascout algorithm for the game I'm writing. Wikipedia gives the algorithm in imperative terms: http://en.wikipedia.org/wiki/Negascout I've tried to translate this

Re: [Haskell-cafe] Looking for pointfree version

2009-02-12 Thread Toby Hutton
On Thu, Feb 12, 2009 at 6:46 PM, Kim-Ee Yeoh a.biurvo...@asuhan.com wrote: On the same note, does anyone have ideas for the following snippet? Tried the pointfree package but the output was useless. pointwise op (x0,y0) (x1,y1) = (x0 `op` x1, y0 `op` y1) $ pointfree '(\op (a, b) (c, d) - (a

Re: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Toby Hutton
On Thu, Feb 12, 2009 at 8:11 AM, Bulat Ziganshin bulat.zigans...@gmail.com wrote: Wednesday, February 11, 2009, 11:55:47 PM, you wrote: And ghc is still making large improvements with each release, whereas gcc isn't likely to get significantly better. yes, it's close to perfect LOL!

Re: [Haskell-cafe] Employment

2009-01-22 Thread Toby Hutton
On Fri, Jan 23, 2009 at 11:56 AM, Jonathan Cast jonathancc...@fastmail.fm wrote: Not really. My company *advertises* for Haskell developers, and then when they come in to interview, informs them that the code base is actually written in Perl. Works, too --- we have several Haskellers

Re: [Haskell-cafe] Re: Parsec question

2008-12-23 Thread Toby Hutton
On Wed, Dec 24, 2008 at 9:22 AM, Erik de Castro Lopo mle...@mega-nerd.com wrote: My next problem is matching things like: identifier ('.' identifier)* ('.' '*')? I've had a look at lookAhead from Text.ParserCombinators.Parsec.Combinator but I can't get it to work. * is analogous to

[Haskell-cafe] Re: Fun with type functions

2008-11-27 Thread Toby Hutton
On Thu, Nov 27, 2008 at 8:29 PM, Simon Peyton-Jones [EMAIL PROTECTED] wrote: So this message is to ask you: can you tell us about the most persuasive, fun application you've encountered, for type families or functional dependencies? I only just discovered functional dependencies

Re: [Haskell-cafe] List as input

2008-10-15 Thread Toby Hutton
On Wed, Oct 15, 2008 at 5:44 PM, leledumbo [EMAIL PROTECTED] wrote: module Main where import Data.List -- quicksort of any list qsort [] = [] qsort (x:xs) = qsort(filter(x) xs) ++ [x] ++ qsort(filter(=x) xs) -- optimized quicksort, uses middle element as pivot qsortOpt [] = []

Re: [Haskell-cafe] List as input

2008-10-15 Thread Toby Hutton
On Thu, Oct 16, 2008 at 9:01 AM, Dan Weston [EMAIL PROTECTED] wrote: Google median order statistic. E.g. this is an interesting (and colorful) discussion:

Re: [Haskell-cafe] Re: practice problems?

2006-09-04 Thread Toby Hutton
On 9/5/06, Tomasz Zielonka [EMAIL PROTECTED] wrote: On Mon, Sep 04, 2006 at 07:39:40PM +0200, [EMAIL PROTECTED] wrote: The ultimate Haskell challenge is of course the ICFP contest http://icfpcontest.org/ There is also the International ACM Programming Contesthttp://acm.uva.es/problemset/I don't

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Toby Hutton
On 8/23/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: I use the following script from vim to infer top level type declarationsfor me. I've found it particularly useful for understanding others' code:delurkOn the topic of coding Haskell with Vim is there an indentation plugin for Haskell