Re: [Haskell-cafe] Wikipedia archiving bot - code review

2007-06-26 Thread Henning Thielemann
On Tue, 26 Jun 2007, Neil Mitchell wrote: You may find that the slow down is coming from your use of the TagSoup library - I'm currently reworking the parser to make sure its fully lazy and doesn't space leak. I hope that the version in darcs tomorrow will have all those issues fixed. Are

[Haskell-cafe] ANN: Scripting.Lua 0.1

2007-06-26 Thread Gracjan Polak
Hi all, I'm pleased to announce the first public release of Scripting.Lua. The package hslua-0.1 contains Haskell FFI bindings for a Lua interpreter along with some Haskell utility functions simplifying Haskell to Lua and Lua to Haskell calls. Full Lua interpreter is included in the package.

[Haskell-cafe] Re: Propositional logic question

2007-06-26 Thread apfelmus
Eric wrote: This seems rather complicated! What about this: A = (B = C) = { X = Y == ¬X \/ Y } ¬A \/ (¬B \/ C) = {associativity} (¬A \/ ¬B) \/ C = { DeMorgan } ¬(A /\ B) \/ C = { X = Y == ¬X \/ Y } A /\ B = C E. That works for classical

Re: [Haskell-cafe] ANN: Scripting.Lua 0.1

2007-06-26 Thread Donald Bruce Stewart
gracjanpolak: Hi all, I'm pleased to announce the first public release of Scripting.Lua. The package hslua-0.1 contains Haskell FFI bindings for a Lua interpreter along with some Haskell utility functions simplifying Haskell to Lua and Lua to Haskell calls. Full Lua interpreter is

[Haskell-cafe] Re: Collections

2007-06-26 Thread apfelmus
Andrew Coppin wrote: apfelmus wrote: Andrew Coppin wrote: I see lots of *trees*, but no general graphs. (As in, *data* structures having cycles in them. My *code* is often cyclic...) So what does a compiler do to typecheck it? It represents your code as a graph and calculates

[Haskell-cafe] Re: ANN: Scripting.Lua 0.1

2007-06-26 Thread Gracjan Polak
Donald Bruce Stewart dons at cse.unsw.edu.au writes: Great work! would you like to upload it to hackage.haskell.org too, so it will be archived for the ages? I surely will, but I'd like to wait a moment and first see what people say :) -- Gracjan\

[Haskell-cafe] loading an Haskell symbol at run-time

2007-06-26 Thread Pasqualino 'Titto' Assini
Hi, to load an Haskell symbol at run-time is still necessary to use the load functions from the hs-plugins library (System.Plugins.Load) or is there some function in the GHC API that does the same job? Thanks, titto ___ Haskell-Cafe

[Haskell-cafe] Tree Guidance

2007-06-26 Thread Hans van Thiel
Hello All, Both CFP and SOE have chapters on trees and there is a standard library Data.Tree. I expected to find all kinds of functions there, as in Data.List, but instead the functions are defined as instances of more general structures. It uses: import Control.Applicative (Applicative(..),

[Haskell-cafe] Re: ANN: Scripting.Lua 0.1

2007-06-26 Thread Maxim Khailo
You have just combined two of my favorite languages! Gracjan Polak wrote: Hi all, I'm pleased to announce the first public release of Scripting.Lua. The package hslua-0.1 contains Haskell FFI bindings for a Lua interpreter along with some Haskell utility functions simplifying Haskell to Lua

Re: [Haskell-cafe] Re: Propositional logic question

2007-06-26 Thread Bulat Ziganshin
Hello apfelmus, Tuesday, June 26, 2007, 12:45:54 PM, you wrote: That works for classical logic where ¬A \/ A always holds, but the task here is to prove it for intuitionistic logic. is it the same as so-called woman logic? :) -- Best regards, Bulatmailto:[EMAIL

[Haskell-cafe] Re: Haskell version of ray tracer code is much slower than the original ML

2007-06-26 Thread Simon Marlow
Philip Armstrong wrote: On Sat, Jun 23, 2007 at 08:49:15AM +0100, Andrew Coppin wrote: Donald Bruce Stewart wrote: Don't use -O3 , its *worse* than -O2, and somewhere between -Onot and -O iirc, Is this likely to be fixed ever? There is at least a bug report for it IIRC. It was fixed

[Haskell-cafe] Re: Tree Guidance

2007-06-26 Thread apfelmus
Hans van Thiel wrote: Both CFP and SOE have chapters on trees and there is a standard library Data.Tree. I expected to find all kinds of functions there, as in Data.List, but instead the functions are defined as instances of more general structures. Well, Data.Tree is not much in use since

Re: [Haskell-cafe] Re: Tree Guidance

2007-06-26 Thread Chris Kuklewicz
apfelmus wrote: Up-pointers won't work in Haskell, you'll need a different approach. Can you elaborate on what your tree looks like and what it stores? pointers don't exist in Haskell, though they do exist in the Foreign.* interface package. But Up-values work just fine: import Data.Tree

Re: [Haskell-cafe] Re: Tree Guidance

2007-06-26 Thread Chris Kuklewicz
I pasted the wrong show code. Here is the version I actually ran: instance Show a = Show (UpTree a) where show u@(UpTree {parent=Nothing}) = ROOT_UpTree ++show (value u)++\n ++(indent 3 $ show (children u)) show u@(UpTree {parent=Just p,children=[]}) = LEAF

Re: [Haskell-cafe] XmlSerializer.deserialize?

2007-06-26 Thread Hugh Perkins
On 6/25/07, Udo Stenzel [EMAIL PROTECTED] wrote: That type signature describes a function that can deliver *anything* (that is in class Data), whatever you ask from it. Yes, that is the goal :-) If you do that, you wind up dragging in all the machinery of Data.Generic Is reflection

[Haskell-cafe] Preferred way to get data from a socket

2007-06-26 Thread Chad Scherrer
I've never used sockets before, but I need to now, and I need to be able to get a lot of data quickly. I was thinking about doing something like this (below), but I'm wondering if there's a way that would be faster. Is the obvious way of doing this the right way? I'm happy to install outside

Re: [Haskell-cafe] Re: ANN: Scripting.Lua 0.1

2007-06-26 Thread Andrea Rossato
On Tue, Jun 26, 2007 at 07:54:26AM -0500, Maxim Khailo wrote: You have just combined two of my favorite languages! Gracjan Polak wrote: Hi all, I'm pleased to announce the first public release of Scripting.Lua. I quote: this is a really nice news. I'll be trying to use it in project of

Re: [Haskell-cafe] Re: Collections

2007-06-26 Thread Lennart Augustsson
If you are going to ban graphs you also need to ban web pages (the links for a graph, both between pages and interanlly), computer networks, maps, dictionaries, you name it, it has a graph structure. On 6/26/07, apfelmus [EMAIL PROTECTED] wrote: Andrew Coppin wrote: apfelmus wrote: Andrew

Re: [Haskell-cafe] XmlSerializer.deserialize?

2007-06-26 Thread Udo Stenzel
Hugh Perkins wrote: Is reflection hard in Haskell? In C# its easy, and its one of the most powerful features of C# That's another way of saying that the truly powerful features are missing from C#... Yes, but I'm kindof stuck giving useful input to makeConstrM, so if anyone has any ideas?

Re: [Haskell-cafe] Preferred way to get data from a socket

2007-06-26 Thread Donald Bruce Stewart
chad.scherrer: I've never used sockets before, but I need to now, and I need to be able to get a lot of data quickly. I was thinking about doing something like this (below), but I'm wondering if there's a way that would be faster. Is the obvious way of doing this the right way? I'm happy to

Re: [Haskell-cafe] loading an Haskell symbol at run-time

2007-06-26 Thread Donald Bruce Stewart
tittoassini: Hi, to load an Haskell symbol at run-time is still necessary to use the load functions from the hs-plugins library (System.Plugins.Load) or is there some function in the GHC API that does the same job? yes, definitely possible. i think Lemmih put an example on the wiki a

Re: [Haskell-cafe] Preferred way to get data from a socket

2007-06-26 Thread Chad Scherrer
Ok, cool. FWIW, the current documentation for Network says: For really fast I/O, it might be worth looking at the hGetBuf and hPutBuf family of functions in System.IO. But this looked pretty low-level to me, and I figured it might be outdated. I also know Bulat Ziganshin had put together a

Re: [Haskell-cafe] Preferred way to get data from a socket

2007-06-26 Thread Donald Bruce Stewart
chad.scherrer: Ok, cool. FWIW, the current documentation for Network says: For really fast I/O, it might be worth looking at the hGetBuf and hPutBuf family of functions in System.IO. But this looked pretty low-level to me, and I figured it might be outdated. I also know Bulat Ziganshin

[Haskell-cafe] update on SoC projects?

2007-06-26 Thread brad clawsie
does anyone have any interesting update info on the haskell SoC (summer of code) projects? in particular i am intersted in the haskell bindings to libcurl ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Parsec

2007-06-26 Thread Michael T. Richter
I just wanted to say thank you to Daan Leijen for Parsec. It's nice to finally find a tool that does parsing that's: a) readable; b) understandable; c) tightly integrated with the target language. I've been dodging Parsec for a long time because my experiences with parser generators and parser

Re: [Haskell-cafe] Re: Collections

2007-06-26 Thread Jon Harrop
On Tuesday 26 June 2007 23:20:32 Lennart Augustsson wrote: If you are going to ban graphs you also need to ban web pages (the links for a graph, both between pages and interanlly), computer networks, maps, dictionaries, you name it, it has a graph structure. Layout and rendering of web pages