Re: [Haskell-cafe] network 2.3.05 on windows 7 with ghc-7.2.1
Sai Hemanth K saihema...@gmail.com schrieb im Newsbeitrag news:canok7kum7-g5bwhj6btrraruykyl1xyltfr9rd4ke5sovbi...@mail.gmail.com... Hi, Apologies if this is an off-topic for the list, If someone here managed to build network 2.3.05 on windows 7 with ghc-7.2.1 , could you kindly pass me the trick? The config step fails with missing header. I tried running it with mingw (tried with the latest one too - just in case : http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/) I did not face any issue for the same thing on linux. Many thanks, Hemanth K I have done exactly this with the same versions. No problems. I used the MINGW that comes with ghc-7.2.1. I probably executed the configure under MSYS though, which probably makes the difference. Rene.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHCI Feature Request: Last SuccessfulCompilation State Saved
Daniel Fischer daniel.is.fisc...@googlemail.com schrieb im Newsbeitrag news:201108272331.01371.daniel.is.fisc...@googlemail.com... On Saturday 27 August 2011, 23:10:17, David Virebayre wrote: 2011/8/27 aditya siram aditya.si...@gmail.com: Hi all, I would like for the GHCI interpreter to save its environment before reloading a file and allowed the user to revert back to that state if the compilation was unsuccessful. That would be awesome. I would like this too. http://hackage.haskell.org/trac/ghc/ticket/1896 +1 from me too. How do I go about registering my interest in the ticket? I though there was a way of adding myself on the CC: of the ticket? How does one do this? Does one need some sort of user? Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Re: hxt memory useage
Uwe Schmidt [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] this statement isn't true in general. HXT itself can be incremental, if there is no need for traversing the whole XML tree. When processing a document containing a DTD, indeed there is a need even when no validation is required, for traversal because of the entity substitution. It would be nice if HXT was incremental even when you are processing the whole tree. If I remember correctly, the data type of the tree in HXT is something like data Tree = Tree NodeData [Tree] which means that already processed parts of the tree can't be garbage collected because the parent node is holding onto them. If instead it was data Tree = Tree NodeData (IORef [Tree]) Would could remove each subtree as it was processed (well just before would probably be necessary, and we would need to rely on blackholing to remove the reference on the stack). This would perhaps allow already processed subtree to be garbage collected. Together with the lazy evaluation this could lead to quite good memory usage. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: hxt memory useage
Matthew Pocock [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] On Thursday 24 January 2008, Albert Y. C. Lai wrote: Matthew Pocock wrote: I've been using hxt to process xml files. Now that my files are getting a bit bigger (30m) I'm finding that hxt uses inordinate amounts of memory. I have 8g on my box, and it's running out. As far as I can tell, this memory is getting used up while parsing the text, rather than in any down-stream processing by xpickle. Is this a known issue? Yes, hxt calls parsec, which is not incremental. haxml offers the choice of non-incremental parsers and incremental parsers. The incremental parsers offer finer control (and therefore also require finer control). I've got a load of code using xpickle, which taken together are quite an investment in hxt. Moving to haxml may not be very practical, as I'll have to find some eqivalent of xpickle for haxml and port thousands of lines of code over. Is there likely to be a low-cost solution to convincing hxt to be incremental that would get me out of this mess? Matthew I don't think so. Even if you replace parsec, HXT is itself not incremental. (It stores the whole XML document in memory as a tree, and the tree is not memory effecient. Still I am a bit surprised that you can't parse 30m with 8 gig memory. This was discussed here before, and I think someone benchmarked HXT as using roughly 50 bytes of memory per 1 byte of input. i.e. HXT would then be using about 1.5 gig of memory for your 30m file. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: XML parser recommendation?
Uwe Schmidt [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] it into HXT. This still does not solve the processing of very very large XML document. I doubt, whether we can do this with a DOM like approach, as in HXT or HaXml. Lazy input does not solve all problems. A SAX like parser could be a more useful choice for very large documents. Uwe I think a step towards support medium size documents in HXT would be to store the tags and content more efficiently. If I undertand the coding correctly every tag is stored as a seperate Haskell string. As each byte of a string under GHC takes 12 bytes this alone leads to high memory usage. Tags tend to repeat. You could store them uniquely using a hash table. Content could be stored in compressed byte strings. As I mentioned in an earlier post 2GB memory is not enough to process a 35MB XML document in HXT as we have 30 x 2 x 12 = 720 MB for starters to just store the string data (once in the parser and once in the DOM). (Well a machine with 2GB memory). I guess I had somewhere around 1GB free for the program. Other overheads most likely used up the ramaining 300 MB. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: XML parser recommendation?
Yitzchak Gale [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Henning Thielemann wrote: HXT uses Parsec, which is strict. I had a look at using HXT awhile ago. Parsec is the least of the problems. HXT stores the XML as an explicit tree in memory, where the head has explict references to the children. This means that the whole XML tree is stored in memory until the last child is processed. Also this tree is stored ineffeciently. Everything as non shared Haskell strings. My experience is that a 30MB file (which is quite small for an XML file) can NOT be processed with 2GB memory. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Code from Why Functional Programming Matters
Andrew Wagner [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] current position (or, even more ideally, the so-called principal variation, which is the best series of moves from the current position). Is there a good way to collect this, without mapping some sort of function over the tree that puts a list of moves on every node too? Hughes seems to completely ignore this, and I wonder if it's because it gets ugly to implement. While Hughes code looks nice, the more efficient you make your search the uglier it is going to be (at least with my Haskell skills) In reality you will at least want iterative deepening and principle variation search. I posted code for PVS (ugly code) http://www.haskell.org/haskellwiki/Principal_variation_search I thought I had some code doing iterative deepening based on this, but it looks like I lost it somewhere. If you want to use hash tables, history, killer moves, etc. Then I think you are going to have to monadize everything. It is a pity that Hughes doesn't demonstrate adding some of these things. Maybe it is possible using arrows? (without making everything look like C, which would be my solution). Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: quoting in Haskell
Peter Verswyvelen [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] In Scheme, on can quote code, so that it becomes data. Microsoft's F# and C# 3.0 also have something similar that turns code into expression trees. The latter is used extensively in LINQ which translates plain C# code into SQL code or any other code at runtime (this idea came from FP I heared) The normal way of doing such things in Haskell is to have 1) functions that generate the component data structures (these functions are often called smart constructors) 2) other functions to put the functions/data structures together (these other functions are often call combinators). The resulting data structure that represents the sql query for example is then processed to produce the real (textual) sql query which this then sent to the database. I can't find something similar for Haskell? Maybe I am looking at the wrong places? HaskellDB for example does this for database queries. Parsec does this parsers. HSXML (if I got the name right) does this for XML. In Haskell, I know one can use a data constructor as a function (as in (map Just [1..3])), but a function cannot be turned into a data constructor (= quoting), can it? A data constructor is a special case of a function, or perhaps better said, a particular way a function is defined. Either a function is a data constructor or it isn't. For example you can also do just = Just Just is a data constuctor. It was defined with a data statement (and as a result starts with a capital letter). data Maybe a = Nothing | Just a just is not a data constructor. Why? It wasn't defined with a data statement. However just and Just behave almost identically. (you can't pattern match on just, only on Just) Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: [Haskell] View patterns in GHC: Request forfeedback
Simon PJ and I are implementing view patterns, a way of pattern matching against abstract datatypes, in GHC. Our design is described here: http://hackage.haskell.org/trac/ghc/wiki/ViewPatterns If you have any comments or suggestions about this design, we'd love to hear them. You can respond to this list (and we can take it to haskell-cafe if the thread gets long) or, if you prefer, directly to me. I find the = operator excessive. GHC Haskell seems to be growing too rapidly syntax wise in my opinion. The important features of code are correctness, maintainability and readibility (IMHO), and I think = is working against these. = uses up more syntax. Buys very little. Equivalent to - Just _ or - Just x as far as I can see. I would prefer to type the extra 6 characters rather than having the hidden Maybe. It is also one more thing to learn. One more confusing type error when you mix them up. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Mathematica
How difficult would it be to implement Mathematica in Haskell? Why don't you use axiom? It already has several 100 of years man effort put into it. Or for dynamically type package you could use Maxima. Both are free. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6
Alistair Bayley [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Is this using the darcs repository version of hs-plugins? That's the only versions that works with 6.6 Just got, built, and installed the repo version, and it has the same problem. Alistair You managed to build the darcs version under ghc 6.6? For me runghc setup.hs configure fails with lots of strange error messages... (below) other packages build ok. Rene. C:\repos\hs-pluginsdarcs pull plink: unknown option -O Pulling from http://www.cse.unsw.edu.au/~dons/code/hs-plugins;... No remote changes to pull in! C:\repos\hs-pluginsrunghc Setup.lhs configure Setup.lhs: Warning: The field hs-source-dir is deprecated, please use hs-sourc e-dirs. Configuring plugins-1.0... configure: c:\ghc\ghc-6.6\bin\ghc-pkg.exe configure: Dependency base-any: using base-2.0 configure: Dependency Cabal-any: using Cabal-1.1.6 configure: Dependency haskell-src-any: using haskell-src-1.0 configure: Using install prefix: C:\Programme configure: Binaries installed in: C:\Programme\Haskell\bin configure: Libraries installed in: C:\Programme\Haskell\plugins-1.0\ghc-6.6 configure: Private binaries installed in: C:\Programme\plugins-1.0 configure: Data files installed in: C:\Programme\Gemeinsame Dateien\plugins-1.0 configure: Using compiler: c:\ghc\ghc-6.6\bin\ghc.exe configure: Compiler flavor: GHC configure: Compiler version: 6.6 configure: Using package tool: c:\ghc\ghc-6.6\bin\ghc-pkg.exe configure: Using ar found on system at: c:\ghc\ghc-6.6\bin\ar.exe configure: Using haddock found on system at: c:\other\bin\haddock.exe configure: No pfesetup found configure: Using ranlib found on system at: C:\other\MinGW\bin\ranlib.exe configure: Using runghc found on system at: c:\ghc\ghc-6.6\bin\runghc.exe configure: No runhugs found configure: Using happy: c:\other\bin\happy.exe configure: Using alex: c:\other\bin\alex.exe configure: Using hsc2hs: c:\ghc\ghc-6.6\bin\hsc2hs.exe configure: No c2hs found configure: No cpphs found configure: No greencard found Can't delete: '-f conf5164.sh' (error: -1) Can't delete: '-f conf5164 conf5164.exe conf5164.file' (error: -1) Can't delete: '-f conf5164 conf5164.exe conf5164.file' (error: -1) Can't open: Can't open: Can't open: Can't delete: '-rf conftest* confdefs.h' (error: -1) Can't open: Can't open: Can't open: Can't open: Can't open: checking build system type... i686-pc-mingw32 Can't open: Can't open: Can't open: checking for ghc... ghc Can't open: checking for value of __GLASGOW_HASKELL__... 606 checking for ghc library directory... c:/ghc/ghc-6.6 Can't open: checking for tex... no configure: WARNING: tex is needed to build some of the documentation checking for tex2page... no configure: WARNING: tex2page is needed to build some of the documentation http://www.ccs.neu.edu/home/dorai/tex2page/tex2page-doc.html checking for gcc... gcc Can't open: Can't open: checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. Can't open: Can't open: Can't open: Can't delete: '-f core *.core' (error: -1) C:\repos\hs-plugins ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Re: Haskell web forum
I'll just add myself onto the list of webforum haters. I find gmane over a news reader much more comfortable that any webforums I have used. Perhaps gmane can be used over a web interface? Then those that want to use a web forum have one, and I can continue to use my news reader. When I want to read the lists when I am away from the newsreader then I use www.netvibes.com. A very nice web interface for reading in my opinion. Alas no interface for posting. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Help wanted: Lazy multiway zipper with mismached intervals
Many thanks to all for the replies From: ChrisK [EMAIL PROTECTED] Could the interval for element x of List xList overlap with more than one element of another list? It does not matter too much, but is something you did not clarify. In general, how may the intervals for all the lists overlap? (The answer may be too complex, in which case you can just ignore me). Yes, unlimited overlap is possible. e.g. Infinite interval in one list, and infinitely many small intervals in another list. I would start by merging, perhaps in stages, into an intermediate list with elements of its own data FooIntermediate = A _ [_]| B _ [(_,_)] | C _ _ _ | ... types. Yes, I'll probably use this suggestion, maybe with records to make partial update easier. If you need to change the semantics of merging the streams then it may help when you refactor that the types of events are now types of constructors and the compiler is checking your code. Originally I had thought that I could treat the merge symetrically, but I now think this is not the case. Still I am not sure if I will use different types for different types of merge. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Help wanted: Lazy multiway zipper with mismached intervals
Hello, I need to zip together multiple lists. The lists are sorted by date, and each entry in the list represents data for a time interval. The time intervals between the lists may be missmatched from each other. This means that sometimes you don't need to move forward in list, while you move forward in other lists. It might also mean that you need to skip a number of entries foward. If the computation does not need part of the contents of one of the lists, then this list should be ignored until it is needed. As the lists are sorted you never need to go backwards. I found it fairly easy to write a zipper for two lists, where the items from both lists are needed (example binary operator on the payload of the list). However the combination of merging multiple lists together, and ignoring a list in the case it is not needed by the computation leads to very messy code. I though about if there was a away of encapsulating this in a monad, but haven't thought of any way to do this. Another idea is to have a mutable cursor for each list and move these forward as required. But I guess this might be worth avoiding? I think it would be good if somehow I could encapsulate each list, so on a per list basis, and can say given me the current head, or move one forward. But I haven't figured out how to pass the state of the other threads invisibly through. I guess the ony way might be to use the state monad? I guess there can be no simple recursive solution? Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Help wanted: Lazy multiway zipper with mismached intervals
From: ChrisK [EMAIL PROTECTED] Rene de Visser wrote: Does a single list have only disjoint intervals? Yes. The lists are strictly increasing Doing this for two lists with a recursive function is easy. There being an output element whenever the intervals of the two input lists overlap. Yes, I have done this. However the combination of merging multiple lists together, and ignoring a list in the case it is not needed by the computation leads to very messy code. Do mean multiple as in at least three? Yes If so, then what do have an output element only if all three or more input elements overlap, or do you have an output element when at least two input elements overlap? That can depend on the values (payloads) per entry. For example I might have a selector operator and one of the lists steers from which of the other lists I should take the value for that interval. I think a continuation per list would provide a nice solution. But I don't know how to do that, and it might be horribly ineffecient? Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Annotating calculations
From: Henning Thielemann [EMAIL PROTECTED] On Wed, 15 Jun 2005, Rene de Visser wrote: I have a somewhat complicated calculation programmed in Haskell. This calculation is coded without using monads. I want to also produce a report describing the details of this calculation for each particular set of inputs. On the other hand replicating the calculation source code twice, once without reporting and once without seems bad. smaller parts. If you have more breaks you have more chances to get temporary results. You can put temporary values into a data structure. E.g. if you have an iteration don't write a recursion with a fixed abort criterion but write a function which maps the old value to the new one, then apply 'iterate' on it. Now you can inspect the temporary values and you can later apply a function which decides when to stop the iteration. Thankyou for the reply, The calculation is for the mostly already structured as you have suggested. The trouble is there are lots of little pieces that need to be put together. Do I need to put these pieces together twice? Once to put the whole calculation together? And once to do the reporting? This is what I'd like to avoid. (A good deal of the complexity comes from that the calculation has a complex structure). It would be nice to describe the structure once (at the moment the structure of the calculation is describe impliciitly in the Haskell functions) and use it both for the calculation and for the reporting. I thought about using some like Buddha or Hat to generate a data structure describing the calculation and mining this for the reporting. But these seems like horrible over kill, and probably not very change resistant, not to mention making the development not very interactive. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Annotating calculations
From: Henning Thielemann [EMAIL PROTECTED] On Wed, 15 Jun 2005, Rene de Visser wrote: You can put temporary values into a data structure. E.g. if you have an iteration don't write a recursion with a fixed abort criterion but write a function which maps the old value to the new one, then apply 'iterate' on it. Now you can inspect the temporary values and you can later apply a function which decides when to stop the iteration. Designing the data structures to store the calculation results seems to be non-trivial, so I guess I should do this first. Then maybe the solution to the other problem will be apparent. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Tables in Haskell (data model /business app prototyping)
From: Bayley, Alistair [EMAIL PROTECTED] From: Rene de Visser [mailto:[EMAIL PROTECTED] I would rather use Haskell also for the persistency, global constraint maintanence, etc... rather than using an external database. What do you mean by external database? If you just mean on another I would like to write my views and constraints in Haskell, and not in a seperate database language. i.e. I want to use Haskell also as declarative active database language to define the business logic and rules. This would seem to me to be a lot easier when the database is written in Haskell itself and part of the same program. Rene. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe