Re: [Haskell-cafe] some algorithm help with jhc

2005-09-13 Thread Bjorn Lisper
John Meacham >I have started working on jhc more recently and have come across some >places where I think my algorithms could be improved but was not sure >exactly where to start so thought I would ask the list since perhaps >someone here has some insight. > >After a long time of trying various met

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Cale Gibbard
I apologise for the duplicate messages -- GMail was having issues, and told me that the message couldn't be sent the first time I'd attempted it. - Cale ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskel

[Haskell-cafe] some algorithm help with jhc

2005-09-13 Thread John Meacham
I have started working on jhc more recently and have come across some places where I think my algorithms could be improved but was not sure exactly where to start so thought I would ask the list since perhaps someone here has some insight. After a long time of trying various methods of speeding up

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Cale Gibbard
On 13/09/05, Dhaemon <[EMAIL PROTECTED]> wrote: > Hello, > I'm quite interested in haskell, but there is something I don't > understand(intuitively). I've been crawling the web for an answer, but > nothing talks to me... > So I was hoping I could find some help here: > "How is evaluating an expr

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Cale Gibbard
On 13/09/05, Dhaemon <[EMAIL PROTECTED]> wrote: > Hello, > I'm quite interested in haskell, but there is something I don't > understand(intuitively). I've been crawling the web for an answer, but > nothing talks to me... > So I was hoping I could find some help here: > "How is evaluating an expr

[Haskell-cafe] Re: Doing Windows Programming

2005-09-13 Thread Paul Moore
Brian McQueen <[EMAIL PROTECTED]> writes: > How can I use Haskell to do general Windows programming, like you > would be able to do if you were using one of those Windows IDEs: You may find H/Direct would help with this. Unfortunately, there isn't a binary build that I can find, you need to build

Re: [Haskell-cafe] Binary parser combinators and pretty printing

2005-09-13 Thread Tomasz Zielonka
On Tue, Sep 13, 2005 at 06:03:00PM +0300, Einar Karttunen wrote: > We will use the following Haskell datatype: > > data Packet = Packet Word32 Word32 Word32 [FastString] > > 1) Simple monadic interface > > [...] > > This works but writing the code gets tedious and dull. > > 2) Using better combi

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Sebastian Sylvan
On 9/13/05, Dhaemon <[EMAIL PROTECTED]> wrote: > Hello, > I'm quite interested in haskell, but there is something I don't > understand(intuitively). I've been crawling the web for an answer, but > nothing talks to me... > So I was hoping I could find some help here: > "How is evaluating an expre

Re: [Haskell-cafe] Template Haskell and Types

2005-09-13 Thread Gracjan Polak
Simon Peyton-Jones wrote: | > putStrLn $(mysplice ''MyData) | > | | Thanks for responses. Is there any up-to-date documentation avaliable? Template Haskell is, alas, poorly documented. I would really welcome someone to volunteer to help write better documentation. Meanwhile, as the user

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Wolfgang Jeltsch
Am Dienstag, 13. September 2005 15:45 schrieb Dhaemon: > [...] > Also, just for kicks, may I had this: I read the code of some haskell-made > programs and was astonished. Yes! It was clean and all, but there were > "do"s everywhere... Why use a function language if you use it as an > imperative on

RE: [Haskell-cafe] Haskell poker server

2005-09-13 Thread Simon Marlow
On 28 August 2005 20:00, Joel Reymont wrote: > I get a message from Erlang once data arrives over TCP and the > message is a {tcp, Socket, Bin} tuple where Bin is binary data. I can > easily extract what I need using Erlang binary pattern matching: > > read(<<24, GID:32, Seq:16>>) -> > {24,

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Thomas Davie
On 13 Sep 2005, at 16:22, David Roundy wrote: On Tue, Sep 13, 2005 at 01:45:52PM +, Dhaemon wrote: Also, just for kicks, may I had this: I read the code of some haskell-made programs and was astonished. Yes! It was clean and all, but there were "do"s everywhere... Why use a function la

RE: [Haskell-cafe] Weak hashtable memoization code?

2005-09-13 Thread Simon Marlow
On 28 August 2005 16:39, Bulat Ziganshin wrote: > Hello David, > > Sunday, August 28, 2005, 4:19:07 PM, you wrote: > >> Hi all, > >> Does anyone have a nice bit of example code to implement memoization >> using weak pointers and hash tables? It would be nice to have a >> pre-packaged module tha

Re: [Haskell-cafe] Binary parser combinators and pretty printing

2005-09-13 Thread Malcolm Wallace
Einar Karttunen writes: > I am trying to figure out the best interface to binary parser > and pretty printing combinators for network protocols. > > 2) Using better combinators > > packet = w32be <> w32be <> w32be <> lengthPrefixList w32be (lengthPrefixList > w32be bytes) > Has anyone used co

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread David Roundy
On Tue, Sep 13, 2005 at 01:45:52PM +, Dhaemon wrote: > Also, just for kicks, may I had this: I read the code of some haskell-made > programs and was astonished. Yes! It was clean and all, but there were "do"s > everywhere... Why use a function language if you use it as an imperative > one?(i

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Thomas Spriggs
Small point, From: Thomas Davie <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] CC: Haskell-Cafe@haskell.org Subject: Re: [Haskell-cafe] Functional vs Imperative Date: Tue, 13 Sep 2005 14:55:14 +0100 On 13 Sep 2005, at 14:45, Dhaemon wrote: Hello, I'm quite interested in haskell, but there is som

[Haskell-cafe] Binary parser combinators and pretty printing

2005-09-13 Thread Einar Karttunen
Hello I am trying to figure out the best interface to binary parser and pretty printing combinators for network protocols. I am trying to find the most natural syntax to express these parsers in Haskell and would like opinions and new ideas. As an example I will use a protocol with the followin

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Thomas Davie
On 13 Sep 2005, at 14:45, Dhaemon wrote: Hello, I'm quite interested in haskell, but there is something I don't understand(intuitively). I've been crawling the web for an answer, but nothing talks to me... So I was hoping I could find some help here: "How is evaluating an expression diffe

[Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Dhaemon
Hello, I'm quite interested in haskell, but there is something I don't understand(intuitively). I've been crawling the web for an answer, but nothing talks to me... So I was hoping I could find some help here: "How is evaluating an _expression_ different from performing action?" I'm puzzled... Does

[Haskell-cafe] RE: [Haskell] mailing list headaches

2005-09-13 Thread Simon Marlow
On 08 September 2005 17:53, Glynn Clements wrote: > Frederik Eaton wrote: > >> However, threading by "References", which RFC 2822 says >> SHOULD be possible, and which works on my other folders, doesn't work >> well on Haskell mailing lists. Presumably the issue is that there are >> a large numbe

[Haskell-cafe] RE: [Haskell] ANNOUNCE: ghc-src version 0.2.0

2005-09-13 Thread Simon Marlow
On 30 August 2005 12:05, Arthur Baars wrote: > Daan is right, I wrote a parser for GHC using Doaitse Swierstra's > parsing combinator library > (http://www.cs.uu.nl/groups/ST/Software/UU_Parsing/index.html). > I needed a drop-in replacement for GHC's Happy parser, to make a > prototype for syntax

[Haskell-cafe] Re: Language Workbenches - First attempt

2005-09-13 Thread Yoel Jacobsen
source = "#123456789012345678901234567890123456789012345678901234567890\n\ \SVCLFOWLER 10101MS0120050313.\n\ \SVCLHOHPE 10201DX0320050315\n\ \SVCLTWO x10301MRP220050329..\n\ \USGE1030

Re: [Haskell-cafe] Template Haskell and Types

2005-09-13 Thread Benjamin Franksen
On Tuesday 13 September 2005 09:16, Gracjan Polak wrote: > Tomasz Zielonka wrote: > > On Mon, Sep 12, 2005 at 12:08:14PM +0200, Gracjan Polak wrote: > >>Probably very simple question about template haskell: How do I make > >> a type for an argument to splice? Example: > >> > >>data MyData = MyData1

RE: [Haskell-cafe] Template Haskell and Types

2005-09-13 Thread Simon Peyton-Jones
| > putStrLn $(mysplice ''MyData) | > | | Thanks for responses. Is there any up-to-date documentation avaliable? Template Haskell is, alas, poorly documented. I would really welcome someone to volunteer to help write better documentation. Meanwhile, as the user manual says, the stuff about

Re: [Haskell-cafe] Language Workbenches - the Haskell solution?

2005-09-13 Thread Yitzchak Gale
Correction - I wrote: > If you want a GUI for configuration, you could, > for example, write a fairly simple transformation > of the master XML into a .NET dialog, or glade > file for GTK, or whatever. We never did that, > though. Actually, Yael Weinbach wrote a beautiful GUI for this configurati

Re: [Haskell-cafe] Template Haskell and Types

2005-09-13 Thread Gracjan Polak
Tomasz Zielonka wrote: On Mon, Sep 12, 2005 at 12:08:14PM +0200, Gracjan Polak wrote: Probably very simple question about template haskell: How do I make a type for an argument to splice? Example: data MyData = MyData1 | MyData2 mysplice mytype = [| litE $ stringL $ show mytype |] main =

Re: [Haskell-cafe] Template Haskell and Types

2005-09-13 Thread Tomasz Zielonka
On Mon, Sep 12, 2005 at 12:08:14PM +0200, Gracjan Polak wrote: > > Probably very simple question about template haskell: How do I make a > type for an argument to splice? Example: > > data MyData = MyData1 | MyData2 > > mysplice mytype = >[| litE $ stringL $ show mytype |] > > main = do >