[Haskell-cafe] Stream instance for Parsec + conduits

2013-05-09 Thread Phil Scott
, the test parser fails, saying: [Left Blah (line 1, column 1): unexpected g expecting h or g] Any ideas? Cheers! Phil pgpO1A9LG3iWl.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

[Haskell-cafe] Announce: LA Haskell User Group February Meeting

2013-02-07 Thread Phil Freeman
Dear Haskellers, There will be a meeting of the LA Haskell User Group on Wednesday February 13th at 7pm. The details, including a list of discussion topics, as they become available, can be found here: http://www.meetup.com/Los-Angeles-Haskell-User-Group/events/102199892/ Thanks, Phil Freeman

[Haskell-cafe] First Los Angeles Haskell User Group Meetup

2013-01-10 Thread Phil Freeman
presentations and discussions on Haskell-related topics roughly once a month. Interested parties can register for the group and RSVP here: http://www.meetup.com/Los-Angeles-Haskell-User-Group/ Thanks, Phil Freeman. ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] HTTP package freezes on Windows 7

2010-03-16 Thread Phil
On 16/03/2010 01:05, Phil wrote: Scrap my original query - the problem isn't as black white as I thought. The below works fine - I've changed the response type from json to xml strange, but for some reason downloading json doesn't work it's fine on Linux. I'm guessing this is more

[Haskell-cafe] HTTP package freezes on Windows 7

2010-03-15 Thread Phil
working fine in Linux. Is this a known issue? Anyone else had success using HTTP from Windows? Thanks, Phil. import qualified Network.HTTP as HTTP main :: IO () main = do x - HTTP.simpleHTTP(HTTP.getRequest http://maps.google.com/maps/api/geocode/json?address=Londonsensor=false

re: [Haskell-cafe] HTTP package freezes on Windows 7

2010-03-15 Thread Phil
Scrap my original query - the problem isn't as black white as I thought. The below works fine - I've changed the response type from json to xml strange, but for some reason downloading json doesn't work it's fine on Linux. I'm guessing this is more likely to be a Windows issue

Re: [Haskell-cafe] Re: Anyone up for Google SoC 2010?

2010-03-11 Thread phil
Would be great to see GHC on Maemo. I recently bought an N900 and googled around to see if this is possible to write Haskell for the platform. The short answer is 'not easily' There are some old notes on getting previous versions compiling, but nothing up to date I gave up pretty quickly

[Haskell-cafe] A few ideas about FRP and arbitrary access in time

2010-03-02 Thread Phil Jones
...Are hereby presented at: http://www.ee.bgu.ac.il/~noamle/_downloads/gaccum.pdf Comments are more than welcome. (P.S Thanks to a whole bunch of people at #haskell for educating me about this, but most notably Conal Elliott) ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Re: frag game - compilation fixes

2009-10-29 Thread Phil Jones
Ok, thanks - done. I also fixed the gun problem thanks to Henk-Jan van Tuyl. On Thu, Oct 29, 2009 at 11:52 AM, Malcolm Wallace malcolm.wall...@cs.york.ac.uk wrote: So here's the resulting package tree. If anyone knows how to turn it into a darcs working copy and create a patch from it, please

[Haskell-cafe] Re: frag game - compilation fixes

2009-10-28 Thread Phil Jones
I've hacked through (senselessly) the various compilation errors (I think they were all related to GLfloat vs. Float, etc.) Frag now compiles and works, but I think I may have introduced some bugs (the weapon doesn't appear on the screen?) Unfortunately, I did the whole job on an unpacked cabal

Re: [Haskell-cafe] FFI link failing due to no main?

2009-08-27 Thread phil
Hasnkell.Funcs.o - libCInterface.so I'll take a look at the full -v output and see if that reveals anything. Thanks, Phil. On 27 Aug 2009, at 04:38, Bernie Pope wrote: Hi Phil, ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] FFI link failing due to no main?

2009-08-26 Thread phil
on (PPC/Leopard) Mac OS X? Has anyone succeeded in getting a similar example to work on Mac OS X? I notice on Linux it is still very temperamental, if I play around with the arguments even slightly I get the same error there. Cheers, Phil. On 26 Aug 2009, at 06:51, Yusaku Hashimoto

[Haskell-cafe] FFI link failing due to no main?

2009-08-25 Thread phil
, but can't work out what is wrong here. If I give it a main (to humor it - it's not a solution), then it links and produces an executable - so it looks to me like I'm not telling the linker what I want correctly? Any ideas? Cheers, Phil. ghc -O2 --make -no-hs-main -package mtl -package

Re: [Haskell-cafe] Linking failing due to Control.Monad.State.Strict?

2009-08-07 Thread phil
That's the puppy! Thanks so much for your help! Phil. On 7 Aug 2009, at 10:14, Malcolm Wallace wrote: If I look with '-v' tho it seems to include Haskell libs in the underlying link - see below? Plus it only complains about this library, I use many other standard libs too? Looks like

[Haskell-cafe] Linking failing due to Control.Monad.State.Strict?

2009-08-06 Thread phil
about, the compile is fine, just the linker which is blowing up. Any ideas what is causing this? I'm using GHC 6.10.4 on PPC Mac OS X 10.5. I've included the makefile below the error. Cheers! Phil. ghc -o OptionCalculator -O2 -Wall ./FrameworkInterface.o ./Maths/ Prime.o ./Misc/Debug.o

Re: [Haskell-cafe] Linking failing due to Control.Monad.State.Strict?

2009-08-06 Thread phil
? Looks like something stranger is going on? Also I've tried using --include-pkg-deps (perhaps incorrectly) - it doesn't help. Phil. rm -f OptionCalculator ghc -o OptionCalculator -O2 -Wall -v ./FrameworkInterface.o ./Maths/ Prime.o ./Misc/Debug.o ./MonteCarlo/DataStructures.o ./MonteCarlo

Re: [Haskell-cafe] Retrieving inner state from outside the transformer

2009-08-01 Thread phil
obvious question - apologies if it is! Thanks again! Phil. On 31 Jul 2009, at 04:39, Ryan Ingram wrote: StateT is really simple, so you should be able to figure it out: runStateT :: StateT s m a - s - m (a,s) runState :: State s a - s - (a,s) So if you have m :: StateT s1 (StateT s2

[Haskell-cafe] Retrieving inner state from outside the transformer

2009-07-30 Thread Phil
= execStateT ( do replicateM_ (iterations userData) (mc userData)) 0 Any advice greatly appreciated! Thanks, Phil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Ambiguous type variable - help!

2009-07-20 Thread phil
On 19 Jul 2009, at 21:18, Yitzchak Gale wrote: Hi Phil, I've concocted a very simple example to illustrate this (below) - but it doesn't compile because ghc complains that my type is ambiguous arising from my use of 'fromSeq'. Notice that you have given two completely separate sets

[Haskell-cafe] Ambiguous type variable - help!

2009-07-19 Thread phil
simple template style code in Haskell? Any help or suggestions would be really appreciated. Many Thanks, Phil. Thus just implements a state Monad which counts up from 1 to 10, using either an Int or a Double depending on user choice. It's pointless of course, but illustrates my point

Re: [Haskell-cafe] Catering for similar operations with and without state

2009-07-06 Thread phil
: Hi Phil, On Mon, Jun 15, 2009 at 5:23 PM, Phil p...@beadling.co.uk wrote: Hi, I'm trying to think around a problem which is causing me some difficulty in Haskell. I'm representing a stateful computation using a State Transform - which works fine. Problem is in order to add flexibility to my

[Haskell-cafe] Catering for similar operations with and without state

2009-06-15 Thread Phil
advice or hints would be great, Cheers, Phil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Stacking State on State.....

2009-03-03 Thread Phil
I've had a look at your example - it's raised yet more questions in my mind! On 02/03/2009 23:36, Daniel Fischer daniel.is.fisc...@web.de wrote: A stupid example: -- module UhOh where import Control.Monad import

Re: [Haskell-cafe] Stacking State on State.....

2009-03-02 Thread Phil
Thanks again - one quick question about lazy pattern matching below! On 01/03/2009 23:56, Daniel Fischer daniel.is.fisc...@web.de wrote: No, it's not that strict. If it were, we wouldn't need the bang on newStockSum (but lots of applications needing some laziness would break). The Monad

Re: [Haskell-cafe] Stacking State on State.....

2009-03-01 Thread Phil
not if it runs like a dog! Any ideas why the triple stack runs so slow? Thanks again! Phil * Triple Stack Specific Impl: type MonteCarloStateT = StateT Double mc :: MonteCarloStateT BoxMullerQuasiState () mc = StateT $ \s - do nextNormal - generateNormal let

Re: [Haskell-cafe] Stacking State on State.....

2009-03-01 Thread Phil
be interested to hear it! Thanks again, Phil, ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Stacking State on State.....

2009-03-01 Thread Phil
Thanks very much for your patient explanations - this has really helped again! A few final questions in-line. On 01/03/2009 21:46, Daniel Fischer daniel.is.fisc...@web.de wrote: One thing that helps much is to use import Control.Monad.State.Strict Using the default lazy State

[Haskell-cafe] Stacking State on State.....

2009-02-28 Thread Phil
and outer state ? OK ­ I think that¹s more than enough typing, apologies for the warpeace sized post. Any help muchly muchly appreciated, Many Thanks, Phil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

[Haskell-cafe] Array use breaks when I make it unboxed?

2009-02-21 Thread Phil
Hi, The code below compiles fine as it is, but if I change the import statement to: import Data.Array.Unboxed I get the following error: philip-beadlings-imac-g5:MonteCarlo phil$ ghc -O2 --make test.hs [2 of 5] Compiling InverseNormal( InverseNormal.hs, InverseNormal.o ) InverseNormal.hs

Re: [Haskell-cafe] Array use breaks when I make it unboxed?

2009-02-21 Thread Phil
Thanks for the tip - I got it to work using: a :: UArray Int Double And so on. Cheers, Phil. On 22/02/2009 01:05, Felipe Lessa felipe.le...@gmail.com wrote: 2009/2/21 Phil pbeadl...@mail2web.com: InverseNormal.hs:28:38: No instance for (IArray a1 Double) arising from

[Haskell-cafe] darcs-client on ghc 6.10.1

2009-01-30 Thread Phil
Hi, Was wondering if anyone knew if darcs-server is still maintained? The author¹s e-mail address bounces. The Haskell client is broken in ghc 6.10. I have a straightforward fix for it: phil$ darcs whatsnew hunk ./client/build 2 -ghc -Wall -O2 -o darcs-client -package network Http.hs

Re: [Haskell-cafe] Employment

2009-01-19 Thread Phil
Barclays Capital use it for Equity Derivative modeling and pricing - it's a small team at the moment, but the whole project is in Haskell. I don't work on it myself so I couldn't give you any details (plus I would get fired for blabbing!), I work in an adjacent group. Haskell certainly lends

[Haskell-cafe] Efficient Factoring Out of Constants

2009-01-17 Thread Phil
is correct :-) If anyone has any insight into how this might looked once compiled down to machine code, or has an opinion one which example below makes for better Haskell, I¹d be grateful for any comments, advice or discussion. Cheers, Phil. Note: I recognize the use of getSum and getStateInfo

Re: [Haskell-cafe] Efficient Factoring Out of Constants

2009-01-17 Thread Phil
speculation than I. Luke [Phil] Heh heh ­ totally accept what your saying, I am obsessing over details here. I¹ve ran some empirical tests to get some crude insight (just using the linux¹s time program), I expected the differences to be small for the amount of data I was passing around, but I

Re: [Haskell-cafe] Efficient Factoring Out of Constants

2009-01-17 Thread Phil
On 17/01/2009 20:45, Eugene Kirpichov ekirpic...@gmail.com wrote: A very short time ago Simon Marlow (if I recall correctly) commented on this topic: he told that this transformation usually improves efficiency pretty much, but sometimes it leads to some problems and it shouldn't be done by

Re: [Haskell-cafe] Multiple State Monads

2009-01-15 Thread Phil
Inline On 14/01/2009 01:08, Luke Palmer lrpal...@gmail.com wrote: On Tue, Jan 13, 2009 at 5:45 PM, Phil pbeadl...@mail2web.com wrote: mcSimulate :: Double - Double - Word64 - [Dou ble] mcSimulate startStock endTime seedForSeed = fst expiryStock : mcSimulate startStock endTime

Re: [Haskell-cafe] Multiple State Monads

2009-01-15 Thread Phil
it is called. Thanks again! Phil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Multiple State Monads

2009-01-13 Thread Phil
don't want to be guilty of overcomplicating my algorithm, and more importantly it means I'm not yet totally grasping the power of Haskell! Thanks again, Phil. On 13/01/2009 03:13, David Menendez d...@zednenem.com wrote: On Mon, Jan 12, 2009 at 8:34 PM, Phil pbeadl...@mail2web.com wrote: Thanks

Re: [Haskell-cafe] Multiple State Monads

2009-01-13 Thread Phil
I allayed my own concerns I wanted to check that in the Haskell world passing around lots of parameters isn¹t a bad thing ­ that is, I¹m not missing a trick here to make my code more readable or more importantly more performant. Thanks again, Phil. On 13/01/2009 23:24, Luke Palmer lrpal

[Haskell-cafe] Multiple State Monads

2009-01-12 Thread Phil
this. Was wondering if anyone could give me a push in the right direction ­ how can I rework my state monad so that it looks less wildly. Many thanks, Phil. mcSimulate :: Double - Double - Word64 - [Double] mcSimulate startStock endTime seedForSeed = expiryStock : mcSimulate startStock endTime

Re: [Haskell-cafe] Multiple State Monads

2009-01-12 Thread Phil
the problem using the StateT transformer, although for the purposes below carrying two states in a tuple is probably clearer and more performant? Thanks again, Phil. mcSimulate :: Double - Double - Word64 - [Double] mcSimulate startStock endTime seedForSeed = fst expiryStock : mcSimulate startStock

Re: [Haskell-cafe] Shared library creating on Mac OS X

2009-01-10 Thread Phil
they are position dependant. So the only way I see forward would be to recompile haskell with ³­fPIC². This seems like a lot of hassle, so I¹m shelving this for now ­ if anyone has any other (less distruptive) ways to proceed give me a shout ­ even if it means linking statically. Cheers, Phil

[Haskell-cafe] Shared library creating on Mac OS X

2009-01-09 Thread Phil
_envrion symbols?? Has anyone seen this before / can confirm my analysis / and by any chance have a solution? Many thanks, Phil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] State Monad - using the updated state

2009-01-08 Thread Phil
for all your help, Phil. On 08/01/2009 13:27, Kurt Hutchinson kelansli...@gmail.com wrote: Ryan gave some great advice about restructuring your program to do what you want, but I wanted to give a small explanation of why that's necessary. 2009/1/7 Phil pbeadl...@mail2web.com: I want

[Haskell-cafe] State Monad - using the updated state

2009-01-07 Thread Phil
, but how do I then get the second and third without writing the giveMeTenRandoms style function? I guess what I want is a next() type function, imperatively speaking. Many thanks for any help, Phil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] State Monad - using the updated state in an adhoc manner

2009-01-07 Thread Phil
, but how do I then get the second and third without writing the giveMeTenRandoms style function? I guess what I want is a next() type function, imperatively speaking. Many thanks for any help, Phil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Who started 42, and when?

2008-02-01 Thread Phil Molyneux
programming was to wonder what non-functional programming might be. Phil On 1 Feb 2008, at 14:03, Loup Vaillant wrote: I have read quite a lot of Haskell papers, lately, and noticed that the number 42 appeared quite often, in informal tutorials as well as in very serious research papers

RE: Yet Another Monad Tutorial

2003-08-14 Thread Phil Molyneux
point mention some definitions of monads, monoids et al --- since this is where the power (sorry, QA) comes from. Phil On Tue, 12 Aug 2003, Bayley, Alistair wrote: Date: Tue, 12 Aug 2003 12:10:24 +0100 From: Bayley, Alistair [EMAIL PROTECTED] Subject: RE: Yet Another Monad Tutorial From

(no subject)

2002-02-09 Thread Phil Haymen
hi,I have a function, using list comprehension to pick out the head and last elements from a list of lists and output this into a list without duplicates. It doesn't work. I want to know what is the error. function :: [[Int]] - [Int] function seg = nub (concat([head s, last s | s - seg])