Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Laziness and XML parsing (Sean Hess) 2. Noisy Linking (Zhi-Qiang Lei) 3. Re: Laziness and XML parsing (Michael Snoyman) 4. Re: Laziness and XML parsing (David McBride) 5. Re: Laziness and XML parsing (Sean Hess) 6. Re: Issue with lazy eval + trace (Hugo Ferreira) 7. Re: Laziness and XML parsing (Michael Snoyman) ---------------------------------------------------------------------- Message: 1 Date: Tue, 8 Nov 2011 06:38:58 -0700 From: Sean Hess <seanh...@gmail.com> Subject: Re: [Haskell-beginners] Laziness and XML parsing To: Felipe Almeida Lessa <felipe.le...@gmail.com> Cc: beginners@haskell.org Message-ID: <beccc932-e32f-450a-b7c4-2d401ca4f...@gmail.com> Content-Type: text/plain; charset="us-ascii" I cannot seem to find a working example of xml-enumerator. It doesn't run: the names seem to have changed for some things, and I'm too much of a beginner to figure it out easily. http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings On Nov 7, 2011, at 7:59 PM, Felipe Almeida Lessa wrote: > On Tue, Nov 8, 2011 at 12:45 AM, Sean Hess <seanh...@gmail.com> wrote: >> I want to parse a large xml file (2GB), without putting the whole thing into >> memory. It's pretty simple with a sax parser in most languages, you just >> stream bytes to the sax parser, and wait for sax events. > > I recommend you taking a look at xml-enumerator [1] and > libxml-enumerator [2]. They are the SAX parsers you know from the > imperative world but much easier to write =). In particular, you > don't need to rely on lazyness. > > Cheers, > > [1] http://hackage.haskell.org/package/xml-enumerator > [2] http://hackage.haskell.org/package/libxml-enumerator > > -- > Felipe. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20111108/2339ad75/attachment-0001.htm> ------------------------------ Message: 2 Date: Tue, 8 Nov 2011 21:53:38 +0800 From: Zhi-Qiang Lei <zhiqiang....@gmail.com> Subject: [Haskell-beginners] Noisy Linking To: Haskell Beginer <beginners@haskell.org> Message-ID: <9115d5c9-c746-4ba9-a845-2fb74cdf5...@gmail.com> Content-Type: text/plain; charset=windows-1252 Hi, The console comes out lots of warning message and performs slowly when I compile my code. Google does not help. Does anybody know what it refers to? I'm using Mac OS X 10.7.2. bogon% make test ghc --make -isrc -fhpc Test.hs [1 of 2] Compiling Miner ( src/Miner.hs, src/Miner.o ) [2 of 2] Compiling Main ( Test.hs, Test.o ) Linking Test ... ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog ld: warning: text reloc in _r15W_info to _base_GHCziWord_zdfIntegralWord32_closure ld: warning: text reloc in _r15W_info to _Cryptozm4zi2zi4_DataziDigestziSHA2_zdfShowHash8_closure ld: warning: text reloc in _r15W_info to non_lazy_ptr ld: warning: text reloc in _r15W_info to non_lazy_ptr ld: warning: text reloc in _r15W_info to non_lazy_ptr ld: warning: text reloc in _r15Y_info to _base_GHCziWord_zdfEqWord32_closure ld: warning: text reloc in _r15Y_info to _Cryptozm4zi2zi4_DataziDigestziSHA2_zdfEqHash8_closure ld: warning: text reloc in _r15Y_info to non_lazy_ptr ld: warning: text reloc in _r15Y_info to non_lazy_ptr ld: warning: text reloc in _r15Y_info to non_lazy_ptr ld: warning: text reloc in _r160_info to _r15Y_closure ld: warning: text reloc in _r160_info to _base_GHCziWord_zdfOrdWord32_closure ld: warning: text reloc in _r160_info to _Cryptozm4zi2zi4_DataziDigestziSHA2_zdfOrdHash8_closure ld: warning: text reloc in _r160_info to non_lazy_ptr ld: warning: text reloc in _r160_info to non_lazy_ptr ld: warning: text reloc in _r160_info to non_lazy_ptr ld: warning: text reloc in _r162_info to _base_GHCziWord_zdfEqWord8_closure ld: warning: text reloc in _r162_info to _base_GHCziClasses_zdfEqZMZN_closure ld: warning: text reloc in _r162_info to non_lazy_ptr ld: warning: text reloc in _r162_info to non_lazy_ptr ld: warning: text reloc in _r162_info to non_lazy_ptr ld: warning: text reloc in _r164_info to _r162_closure ld: warning: text reloc in _r164_info to _base_GHCziWord_zdfOrdWord8_closure ld: warning: text reloc in _r164_info to _base_GHCziClasses_zdfOrdZMZN_closure ld: warning: text reloc in _r164_info to non_lazy_ptr ld: warning: text reloc in _r164_info to non_lazy_ptr ld: warning: text reloc in _r164_info to non_lazy_ptr ?... Best regards, Zhi-Qiang Lei zhiqiang....@gmail.com ------------------------------ Message: 3 Date: Tue, 8 Nov 2011 06:01:07 -0800 From: Michael Snoyman <mich...@snoyman.com> Subject: Re: [Haskell-beginners] Laziness and XML parsing To: Sean Hess <seanh...@gmail.com> Cc: beginners@haskell.org Message-ID: <CAKA2JgJd2owg+o=wzF1HM--e7WeSjEURnu=nYgp4ECrR7=q...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Here's a blog post on the package: http://www.yesodweb.com/blog/2011/10/xml-enumerator . It doesn't cover the streaming interface, but it might give you a good overview of the package in general. I'm not sure what you mean by "it doesn't run," but you'll need at least a basic understanding of enumerators to get off the ground. On Tue, Nov 8, 2011 at 5:38 AM, Sean Hess <seanh...@gmail.com> wrote: > I cannot seem to find a working example of xml-enumerator. It doesn't run: > the names seem to have changed for some things, and I'm too much of a > beginner to figure it out easily. > http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings > > On Nov 7, 2011, at 7:59 PM, Felipe Almeida Lessa wrote: > > On Tue, Nov 8, 2011 at 12:45 AM, Sean Hess <seanh...@gmail.com> wrote: > > I want to parse a large xml file (2GB), without putting the whole thing into > > memory. It's pretty simple with a sax parser in most languages, you just > > stream bytes to the sax parser, and wait for sax events. > > I recommend you taking a look at xml-enumerator [1] and > libxml-enumerator [2]. ?They are the SAX parsers you know from the > imperative world but much easier to write =). ?In particular, you > don't need to rely on lazyness. > > Cheers, > > [1] http://hackage.haskell.org/package/xml-enumerator > [2] http://hackage.haskell.org/package/libxml-enumerator > > -- > Felipe. > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > ------------------------------ Message: 4 Date: Tue, 8 Nov 2011 09:01:44 -0500 From: David McBride <toa...@gmail.com> Subject: Re: [Haskell-beginners] Laziness and XML parsing To: Sean Hess <seanh...@gmail.com> Cc: beginners@haskell.org Message-ID: <can+tr409rarhyqvsx05nhfjr3_eyknkhxj40wlng7nk3jxu...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Check out this chapter of the yesod book for good examples: http://www.yesodweb.com/blog/2011/10/xml-enumerator On Tue, Nov 8, 2011 at 8:38 AM, Sean Hess <seanh...@gmail.com> wrote: > I cannot seem to find a working example of xml-enumerator. It doesn't run: > the names seem to have changed for some things, and I'm too much of a > beginner to figure it out easily. > http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings > > On Nov 7, 2011, at 7:59 PM, Felipe Almeida Lessa wrote: > > On Tue, Nov 8, 2011 at 12:45 AM, Sean Hess <seanh...@gmail.com> wrote: > > I want to parse a large xml file (2GB), without putting the whole thing into > > memory. It's pretty simple with a sax parser in most languages, you just > > stream bytes to the sax parser, and wait for sax events. > > I recommend you taking a look at xml-enumerator [1] and > libxml-enumerator [2]. ?They are the SAX parsers you know from the > imperative world but much easier to write =). ?In particular, you > don't need to rely on lazyness. > > Cheers, > > [1] http://hackage.haskell.org/package/xml-enumerator > [2] http://hackage.haskell.org/package/libxml-enumerator > > -- > Felipe. > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > ------------------------------ Message: 5 Date: Tue, 8 Nov 2011 07:03:57 -0700 From: Sean Hess <seanh...@gmail.com> Subject: Re: [Haskell-beginners] Laziness and XML parsing To: Michael Snoyman <mich...@snoyman.com> Cc: beginners@haskell.org Message-ID: <1fadd938-0c83-4c20-abd2-9d2b50d10...@gmail.com> Content-Type: text/plain; charset="iso-8859-1" Thanks so much to both of you that sent that link. Sorry, my email totally wasn't clear. I meant that the example in the package description doesn't run: http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings I'll read through that article. On Nov 8, 2011, at 7:01 AM, Michael Snoyman wrote: > Here's a blog post on the package: > http://www.yesodweb.com/blog/2011/10/xml-enumerator . It doesn't cover > the streaming interface, but it might give you a good overview of the > package in general. I'm not sure what you mean by "it doesn't run," > but you'll need at least a basic understanding of enumerators to get > off the ground. > > On Tue, Nov 8, 2011 at 5:38 AM, Sean Hess <seanh...@gmail.com> wrote: >> I cannot seem to find a working example of xml-enumerator. It doesn't run: >> the names seem to have changed for some things, and I'm too much of a >> beginner to figure it out easily. >> http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings >> >> On Nov 7, 2011, at 7:59 PM, Felipe Almeida Lessa wrote: >> >> On Tue, Nov 8, 2011 at 12:45 AM, Sean Hess <seanh...@gmail.com> wrote: >> >> I want to parse a large xml file (2GB), without putting the whole thing into >> >> memory. It's pretty simple with a sax parser in most languages, you just >> >> stream bytes to the sax parser, and wait for sax events. >> >> I recommend you taking a look at xml-enumerator [1] and >> libxml-enumerator [2]. They are the SAX parsers you know from the >> imperative world but much easier to write =). In particular, you >> don't need to rely on lazyness. >> >> Cheers, >> >> [1] http://hackage.haskell.org/package/xml-enumerator >> [2] http://hackage.haskell.org/package/libxml-enumerator >> >> -- >> Felipe. >> >> >> _______________________________________________ >> Beginners mailing list >> Beginners@haskell.org >> http://www.haskell.org/mailman/listinfo/beginners >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20111108/ea186531/attachment-0001.htm> ------------------------------ Message: 6 Date: Tue, 08 Nov 2011 14:11:02 +0000 From: Hugo Ferreira <h...@inescporto.pt> Subject: Re: [Haskell-beginners] Issue with lazy eval + trace To: Daniel Fischer <daniel.is.fisc...@googlemail.com> Cc: beginners@haskell.org Message-ID: <4eb93876.6040...@inescporto.pt> Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 11/07/2011 04:56 PM, Daniel Fischer wrote: > On Monday 07 November 2011, 17:11:10, Hugo Ferreira wrote: >>> You're compiling with optimisations, aren't you? >> >> Not that I am aware of. I did not set up any compilation flags in the >> cabal file. > > cabal defaults to compiling with -O unless otherwise specified > ($ cabal build -v2 emits the command lines used to build, if you want to > check), so you most likely do. > Correct. I confirmed this. Thanks, Hugo F. ------------------------------ Message: 7 Date: Tue, 8 Nov 2011 06:33:42 -0800 From: Michael Snoyman <mich...@snoyman.com> Subject: Re: [Haskell-beginners] Laziness and XML parsing To: Sean Hess <seanh...@gmail.com> Cc: beginners@haskell.org Message-ID: <caka2jg+duou9bkcvfzjvv6_knmt1if10jqyp_tzn-yel6nf...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Thanks for the heads-up, it's just a few minor tweaks in the 0.3->0.4 transition. I'll update later, and add a link to the blog post, and release a new version to Hackage. On Tue, Nov 8, 2011 at 6:03 AM, Sean Hess <seanh...@gmail.com> wrote: > Thanks so much to both of you that sent that link. > Sorry, my email totally wasn't clear. I meant that the example in the > package description doesn't > run:?http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings > I'll read through that article. > > On Nov 8, 2011, at 7:01 AM, Michael Snoyman wrote: > > Here's a blog post on the package: > http://www.yesodweb.com/blog/2011/10/xml-enumerator . It doesn't cover > the streaming interface, but it might give you a good overview of the > package in general. I'm not sure what you mean by "it doesn't run," > but you'll need at least a basic understanding of enumerators to get > off the ground. > > On Tue, Nov 8, 2011 at 5:38 AM, Sean Hess <seanh...@gmail.com> wrote: > > I cannot seem to find a working example of xml-enumerator. It doesn't run: > > the names seem to have changed for some things, and I'm too much of a > > beginner to figure it out easily. > > http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings > > On Nov 7, 2011, at 7:59 PM, Felipe Almeida Lessa wrote: > > On Tue, Nov 8, 2011 at 12:45 AM, Sean Hess <seanh...@gmail.com> wrote: > > I want to parse a large xml file (2GB), without putting the whole thing into > > memory. It's pretty simple with a sax parser in most languages, you just > > stream bytes to the sax parser, and wait for sax events. > > I recommend you taking a look at xml-enumerator [1] and > > libxml-enumerator [2]. ?They are the SAX parsers you know from the > > imperative world but much easier to write =). ?In particular, you > > don't need to rely on lazyness. > > Cheers, > > [1] http://hackage.haskell.org/package/xml-enumerator > > [2] http://hackage.haskell.org/package/libxml-enumerator > > -- > > Felipe. > > > _______________________________________________ > > Beginners mailing list > > Beginners@haskell.org > > http://www.haskell.org/mailman/listinfo/beginners > > > > ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 41, Issue 11 *****************************************