Re: [Haskell-cafe] ∀ lexing in ghc and ghci

2009-09-18 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: In ghci I can do ∀ :: Var - Base - Formula - Formula ∀ = All fine. But then ghc complains. What's going on here? Maybe your encodings aren't UTF8? Or rather, one of them is UTF-8, and the other isn't. So that in one case, you get the

Re: [Haskell-cafe] Re: [Haskell-beginners] map question

2009-09-18 Thread Ketil Malde
Gregory Propf gregorypr...@yahoo.com writes: Heh, perhaps we should petition to have a new computer key and symbol added to the world's way of writing maths, something like maybe a downward angled slash to mean prefix (-) Or just use 'negate' and 'subtract'? -k -- If I haven't seen

[Haskell-cafe] Re: Where can I find a non-fee-based version of Hudak's paper, Conception, evolution, and application of functional programming languages?

2009-09-18 Thread Benjamin L . Russell
On Thu, 17 Sep 2009 15:32:51 + (GMT), jean legrand kkwwe...@yahoo.fr wrote: Does anybody know where I can find a non-fee-based version of Paul Hudak's paper, Conception, evolution, and application of functional programming languages [1]? There used to be a version that did not seems you

Re: [Haskell-cafe] Is it safe to use unsafePerformIO here?

2009-09-18 Thread Cristiano Paris
On Fri, Sep 18, 2009 at 4:06 AM, Ryan Ingram ryani.s...@gmail.com wrote: I am confused about why this thread is talking about unsafePerformIO at all.  It seems like everything you all want to do can be accomplished with the much less evil unsafeInterleaveIO instead.  (Which is still a bit evil;

Re: [Haskell-cafe] Is it safe to use unsafePerformIO here?

2009-09-18 Thread Cristiano Paris
On Fri, Sep 18, 2009 at 5:15 AM, Daniel Fischer daniel.is.fisc...@web.de wrote: ... But that does something completely different from what Cristiano wants to do. He wants to read many files files quasi-parallel. As far as I can tell, he needs to read a small chunk from the beginning of every

[Haskell-cafe] Thank you guys

2009-09-18 Thread Cristiano Paris
I wish to thank Cafè's people for their great support in understanding Haskell. Thank you all! Cristiano ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: [Haskell-beginners] map question

2009-09-18 Thread Jon Fairbairn
Ketil Malde ke...@malde.org writes: Gregory Propf gregorypr...@yahoo.com writes: Heh, perhaps we should petition to have a new computer key and symbol added to the world's way of writing maths, something like maybe a downward angled slash to mean prefix (-) Or just use 'negate' and

Re: [Haskell-cafe] Re: [Haskell-beginners] map question

2009-09-18 Thread Thomas Davie
On 18 Sep 2009, at 04:32, Gregory Propf wrote: Heh, perhaps we should petition to have a new computer key and symbol added to the world's way of writing maths, something like maybe a downward angled slash to mean prefix (-) Such a symbol already exists, but isn't in the ASCII set: (-)

Re: [Haskell-cafe] weak pointers and memoization (was Re: memoization)

2009-09-18 Thread Peter Verswyvelen
I would also like to see a solution for problems like these. Haskell provides a lot of nice memoizing / caching data structures - like a trie - but the ones I know indeed keep growing, so no garbage collection takes place? It would be nice to have a data structure that performs caching but does

Re: [Haskell-cafe] ∀ lexing in ghc and ghci

2009-09-18 Thread Sean McLaughlin
Hi Daniel, Prelude Data.Char.isSymbol (toEnum 8704) True On Thu, Sep 17, 2009 at 11:09 PM, Daniel Fischer daniel.is.fisc...@web.dewrote: Am Friday 18 September 2009 04:41:13 schrieben Sie: Weird. OK, thanks a lot! I'm switching to ¥ until I get this figured out. Sean What does your

Re: [Haskell-cafe] weak pointers and memoization (was Re: memoization)

2009-09-18 Thread Job Vranish
Yeah it seems like the general solution to the problem would be some sort of map-like datastructure that you add items via a key/value pair, and if the key gets GC'd, that entry gets removed from the structure. I've been wanting something like this as well, but didn't know about weak references

Re: [Haskell-cafe] weak pointers and memoization (was Re: memoization)

2009-09-18 Thread Job Vranish
Hey it works :D Here is a proof of concept: http://gist.github.com/189104 Maybe later today I'll try to make a version that can be safely used outside IO. - Job On Fri, Sep 18, 2009 at 10:19 AM, Job Vranish jvran...@gmail.com wrote: Yeah it seems like the general solution to the problem

Re: [Haskell-cafe] code-build-test cycle

2009-09-18 Thread Job Vranish
Yeah linking in windows is _very_ slow. Supposedly this is because the linker forks a lot of processes. In linux this is fine as forking is dirt cheap, but in windows (at least older versions, not completely sure about vista or 7) forking is expensive. Building a Qt app on my EEE in linux only

Re: [Haskell-cafe] How to generate random string?

2009-09-18 Thread Snouser
Snouser wrote: I need to generate a random string from 1 to 30. This is the parts I've done so far. unikString xs | let x = unsafePerformIO (randomRIO (1,30)) elem x xs = x : unikString xs | otherwise = unikString xs How do I proceed? I need the

Re: [Haskell-cafe] Re: [Haskell-beginners] map question

2009-09-18 Thread Gregory Propf
I actually meant it as sort of a joke but maybe it's not after all.  Among the many benefits, think of all the delightful conspiracy theories such a change would spawn - even our math isn't safe now!, Save the minus sign!. --- On Fri, 9/18/09, Jon Fairbairn jon.fairba...@cl.cam.ac.uk wrote:

[Haskell-cafe] Re: Suggested additions to System.FilePath.Posix/Windows

2009-09-18 Thread Neil Mitchell
Hi Marcus, Thanks for your suggestions. I'm a Windows user so aren't really qualified to comment on these suggestions - it depends what Posix users would like. I suggest you follow the Library Submission Process - filepath is now a core library, and as such I don't have the freedom/power to

[Haskell-cafe] Too much strictness in binary-0.5.0.2

2009-09-18 Thread Khudyakov Alexey
Hello I run into problems with new binary package. Following function reads a list of elements one by one until end of stream. List is very long (won't fit into memory). In binary-0.5.0.1 and earlier it read list lazily. Now it seems that it tries to read whole list to memory. Program does

[Haskell-cafe] Re: Suggested additions to System.FilePath.Posix/Windows

2009-09-18 Thread Marcus D. Gabriel
Hello Neil, Thanks for the pointer Neil. I will read the site. Besides, it allows me to submit a fixed version since I just found a bug! Cheers, - Marcus P.S. 452 black box tests of my little command utility, and I still forgot about a corner case. Now there are 454 black box test cases :).

[Haskell-cafe] big array allocation too slow?

2009-09-18 Thread Paul L
I'm trying to use newArray to allocate something that has 100M unboxed doubles. It takes quite a few seconds to do so on GHC 6.10.2. But doing the same thing (and initialize all to 0) in C returns immediately. Setting RTS heap size doesn't help. Does anybody happen to know why? -- Regards, Paul

Re: [Haskell-cafe] big array allocation too slow?

2009-09-18 Thread Don Stewart
ninegua: I'm trying to use newArray to allocate something that has 100M unboxed doubles. It takes quite a few seconds to do so on GHC 6.10.2. But doing the same thing (and initialize all to 0) in C returns immediately. Setting RTS heap size doesn't help. Does anybody happen to know why? Use

Re: [Haskell-cafe] big array allocation too slow?

2009-09-18 Thread Paul L
wow, using newArray_ and initialize the whole thing myself is much faster than newArray. But why? On 9/18/09, Don Stewart d...@galois.com wrote: ninegua: I'm trying to use newArray to allocate something that has 100M unboxed doubles. It takes quite a few seconds to do so on GHC 6.10.2. But

[Haskell-cafe] Compiling Yi's Dependencies on Windows

2009-09-18 Thread Jeff Wheeler
Hey all, Yi has a lot of dependencies that currently make it a pain to install on Windows, so I'm wondering which of those can be streamlined for easier install on Windows. So far, I haven't succeeded at getting them to work on my own machine, and I've already spent a lot of time on it. The