[Haskell-cafe] Re: gtk2hs with old gtk2

2010-08-13 Thread Andy Stewart
Johannes Waldmann writes: > Andy Stewart gmail.com> writes: > >> Just "cabal install" is enough. > > Hm. That's what bootstrap.sh does, > and it builds tools, then glib, but then: > > Preprocessing library gio-0.11.0... > gtk2hsC2hs: Errors during expansion of binding hooks: > > ./System/GIO/Ty

[Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Kevin Jardine
On Aug 14, 2:41 am, Brandon S Allbery KF8NH wrote: > Efficient for what?  The most efficient Unicode representation for > Latin-derived strings is UTF-8, but the most efficient for CJK is UTF-16. I think that this kind of programming detail should be handled internally (even if necessary by swit

Re: [Haskell-cafe] Re: philosophy of Haskell

2010-08-13 Thread Conal Elliott
On Sat, Aug 14, 2010 at 9:27 AM, Ertugrul Soeylemez wrote: > Conal Elliott wrote: > > > > There are various models. One (the state monad model) of them would > > > desugar this to: > > > > > > \world0 -> > > > let (x, world1) = getLine world0 > > > world2 = print (x+1) world1 > > >

Re: [Haskell-cafe] Unwrapping long lines in text files

2010-08-13 Thread michael rice
Hi Bill, Each quote of the input is on a single line. I want to unwrap lines greater than 72 characters, i.e., break them into several lines each <= 72 characters, but I don't want to break up words. and I want to retain the blank lines. So, my output is correct except for the error message. M

Re: [Haskell-cafe] Unwrapping long lines in text files

2010-08-13 Thread Bulat Ziganshin
Hello michael, Saturday, August 14, 2010, 5:38:46 AM, you wrote: > The program below takes a text file and unwraps all lines to 72 > columns, but I'm getting an end of file message at the top of my output. > How do I lose the EOF? use isEOF function. even better, use interact -- Best regards

Re: [Haskell-cafe] Unwrapping long lines in text files

2010-08-13 Thread Bill Atkins
Not sure if I understood what you're trying to do, but development will be easier if you minimize your IO, e.g. : maxLineLength :: Int maxLineLength = 72 wrapLine :: String -> [String] wrapLine "" = [] wrapLine line | length line <= maxLineLength= [line] | otherwise

[Haskell-cafe] Unwrapping long lines in text files

2010-08-13 Thread michael rice
The program below takes a text file and unwraps all lines to 72 columns, but I'm getting an end of file message at the top of my output. How do I lose the EOF? Michael == unwrap.hs == main = do     line <- getLine     if null line     then do    putStrLn ""    

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-13 Thread Lennart Augustsson
So it's a bug in the garbage collector. It's closing a handle that clearly is still reachable, otherwise this would not have happened. On Fri, Aug 13, 2010 at 10:53 AM, Simon Marlow wrote: > On 12/08/2010 21:59, Yitzchak Gale wrote: >> >> Wei Hu wrote: >>> >>> nonTermination _ = blackhole where

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Felipe Lessa
On Fri, Aug 13, 2010 at 10:01 PM, Dan Doel wrote: > On Friday 13 August 2010 8:51:46 pm Evan Laforge wrote: >> I have an app that is using Data.Text, however I'm thinking of >> switching to UTF8 bytestrings.  The reasons are that there are two >> main things I do with text: pass it to a C API to d

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Dan Doel
On Friday 13 August 2010 8:51:46 pm Evan Laforge wrote: > I have an app that is using Data.Text, however I'm thinking of > switching to UTF8 bytestrings. The reasons are that there are two > main things I do with text: pass it to a C API to display, and parse > it. The C API expects UTF8, and the

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Evan Laforge
On Fri, Aug 13, 2010 at 6:41 PM, Brandon S Allbery KF8NH wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 8/13/10 16:37 , Kevin Jardine wrote: >> Surely efficient Unicode text should always be the default? And if the > > Efficient for what?  The most efficient Unicode representation

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/13/10 16:37 , Kevin Jardine wrote: > Surely efficient Unicode text should always be the default? And if the Efficient for what? The most efficient Unicode representation for Latin-derived strings is UTF-8, but the most efficient for CJK is UTF-1

[Haskell-cafe] Re: philosophy of Haskell

2010-08-13 Thread Ertugrul Soeylemez
Conal Elliott wrote: > > There are various models. One (the state monad model) of them would > > desugar this to: > > > > \world0 -> > > let (x, world1) = getLine world0 > > world2 = print (x+1) world1 > > world3 = print (x+2) world2 > > in world3 > > Hi Ertugrul, > > This state mon

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Ivan Lazar Miljenovic
Jason Dagit writes: > On Fri, Aug 13, 2010 at 4:03 PM, Ivan Lazar Miljenovic < >> >> So, the real issue here is that there is not yet a good abstraction over >> what we consider to be textual data, and instead people have to code to >> a specific data type. >> > > Isn't this the same problem we h

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Bryan O'Sullivan
On Fri, Aug 13, 2010 at 9:55 AM, Daniel Fischer wrote: > > That's an unfortunate example. Using the stringsearch package, substring > searching in ByteStrings was considerably faster than in Data.Text in my > tests. > Daniel, thanks again for bringing up this example! It turned out that quite a l

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Jason Dagit
On Fri, Aug 13, 2010 at 4:03 PM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > Kevin Jardine writes: > > > Hi Don, > > > > With respect, I disagree with that approach. > > > > Almost every modern programming language has one or at most two > > standard representations for strings. >

Re: [Haskell-cafe] cabal, haddock, hscolour

2010-08-13 Thread Ivan Lazar Miljenovic
Johannes Waldmann writes: > How is the "cabal" magic that would run hscolour? > > I am using "cabal haddock --executables --hyperlink-source" > and this generates the API docs for all modules, > and all have source links, but the actual html-ized source > is only generated for the main module,

Re: [Haskell-cafe] putStrLn "ß"

2010-08-13 Thread Ivan Lazar Miljenovic
"Henk-Jan van Tuyl" writes: > L.S., > > When I try > putStrLn "ß" > (Eszett (sharp S)) in WinGhci, the interpreter seems to have > disappeared; ctrl-C gives the message "Interrupted" in a separate > window, but no new prompt. That's weird; possibly an encoding problem> > When I start GHCi in

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Ivan Lazar Miljenovic
Kevin Jardine writes: > Hi Don, > > With respect, I disagree with that approach. > > Almost every modern programming language has one or at most two > standard representations for strings. Almost every modern programming language thinks you can whack a print statement wherever you like... ;-) >

[Haskell-cafe] Re: Trying to compile Glade Gtk2Hs demo / cabal install glade problem

2010-08-13 Thread Peter Schmitz
Thanks so very much Axel and Ivan. You were both absolutely correct and I can compile Glade apps now fine. Great help! The tricky part (for me) would have been looking at the error from cabal install glade: "setup.exe: The pkg-config package libglade-2.0 version >=2.0.0 is required but it co

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Erik de Castro Lopo
Ketil Malde wrote: > Haskell does have a standard representation for strings, namely [Char]. > Unfortunately, this sacrifices efficiency for elegance, which gives rise > to the plethora of libraries. To have the default standard representation be one that works so poorly for many common everyday

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Erik de Castro Lopo
Kevin Jardine wrote: > With respect, I disagree with that approach. > > Almost every modern programming language has one or at most two > standard representations for strings. I think having two makes sense, one for arrays of arbitrary binary bytes and one for some unicode data format, preferabl

Re: [Haskell-cafe] String vs ByteString

2010-08-13 Thread Erik de Castro Lopo
Pierre-Etienne Meunier wrote: > Hi, > > Why don't you use the Data.Rope library ? > The asymptotic complexities are way better than those of the > ByteString functions. What I see as my current problem is that there is already a problem having two things Sting and ByteString which represent stri

[Haskell-cafe] putStrLn "ß"

2010-08-13 Thread Henk-Jan van Tuyl
L.S., When I try putStrLn "ß" (Eszett (sharp S)) in WinGhci, the interpreter seems to have disappeared; ctrl-C gives the message "Interrupted" in a separate window, but no new prompt. When I start GHCi in a shell, the interpreter displays: Prelude> print "ß" "\223" Is this a known is

[Haskell-cafe] MOF and functional language paradigm

2010-08-13 Thread Vasili I. Galchin
Hello, In my company (and I believe many, many companies) they use MOF heavily: http://en.wikipedia.org/wiki/Meta-Object_Facility MOF seems to be tightly coupled with object oriented program and has nothing to do with functional language approach?? Regards, Vasili _

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Ketil Malde
Kevin Jardine writes: > Almost every modern programming language has one or at most two > standard representations for strings. > That includes PHP, Python, Ruby, Perl and many others. The lack of a > standard text representation in Haskell has created a crazy patchwork > of incompatible librari

[Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Kevin Jardine
Hi Don, With respect, I disagree with that approach. Almost every modern programming language has one or at most two standard representations for strings. That includes PHP, Python, Ruby, Perl and many others. The lack of a standard text representation in Haskell has created a crazy patchwork of

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Edward Z. Yang
Excerpts from Kevin Jardine's message of Fri Aug 13 16:37:14 -0400 2010: > I find it disturbing that a modern programming language like Haskell > still apparently forces you to choose between a representation for > "mostly ASCII text" and Unicode. > > Surely efficient Unicode text should always be

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Don Stewart
There are many libraries for many purposes. How to pick your string library in Haskell http://blog.ezyang.com/2010/08/strings-in-haskell/ kevinjardine: > I find it disturbing that a modern programming language like Haskell > still apparently forces you to choose between a representation f

[Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Kevin Jardine
I find it disturbing that a modern programming language like Haskell still apparently forces you to choose between a representation for "mostly ASCII text" and Unicode. Surely efficient Unicode text should always be the default? And if the Unicode format used by the Text library is not efficient e

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Ketil Malde
Johan Tibell writes: > Here's a rule of thumb: If you have binary data, use Data.ByteString. If you > have text, use Data.Text. If you have a large amount of mostly ASCII text, use ByteString, since Data.Text uses twice the storage. Also, ByteString might make more sense if the data is in a byt

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Daniel Fischer
On Friday 13 August 2010 21:32:12, Kevin Jardine wrote: > Surely a lot of real world text processing programs are IO intensive? > So if there is no native Text IO and everything needs to be read in / > written out as ByteString data converted to/from Text this strikes me > as a major performance si

[Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Kevin Jardine
Surely a lot of real world text processing programs are IO intensive? So if there is no native Text IO and everything needs to be read in / written out as ByteString data converted to/from Text this strikes me as a major performance sink. Or is there native Text IO but just not in your example? K

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Daniel Fischer
On Friday 13 August 2010 19:53:37 you wrote: > On Fri, Aug 13, 2010 at 9:55 AM, Daniel Fischer wrote: > > That's an unfortunate example. Using the stringsearch package, > > substring searching in ByteStrings was considerably faster than in > > Data.Text in my tests. > > Interesting. Got a test cas

[Haskell-cafe] Re: gtk2hs with old gtk2

2010-08-13 Thread Johannes Waldmann
Andy Stewart gmail.com> writes: > Just "cabal install" is enough. Hm. That's what bootstrap.sh does, and it builds tools, then glib, but then: Preprocessing library gio-0.11.0... gtk2hsC2hs: Errors during expansion of binding hooks: ./System/GIO/Types.chs:584: (column 12) [ERROR] >>> Unkno

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Daniel Fischer
On Friday 13 August 2010 19:53:37, Bryan O'Sullivan wrote: > On Fri, Aug 13, 2010 at 9:55 AM, Daniel Fischer wrote: > > That's an unfortunate example. Using the stringsearch package, > > substring searching in ByteStrings was considerably faster than in > > Data.Text in my tests. > > Interesting.

[Haskell-cafe] Re: gtk2hs with old gtk2

2010-08-13 Thread Andy Stewart
Johannes Waldmann writes: > I'm trying to build gtk2hs on debian/lenny, > that is, with gtk2 v. 2.12 if I understand this correctly. > > I got the gtk2hs sources from darcs (I guess it's 0.11.0) > and http://www.haskell.org/gtk2hs/ says > "You need to specify -f-gtk_2_20 for Gtk+ 2.18 etc." > I w

[Haskell-cafe] gtk2hs with old gtk2

2010-08-13 Thread Johannes Waldmann
I'm trying to build gtk2hs on debian/lenny, that is, with gtk2 v. 2.12 if I understand this correctly. I got the gtk2hs sources from darcs (I guess it's 0.11.0) and http://www.haskell.org/gtk2hs/ says "You need to specify -f-gtk_2_20 for Gtk+ 2.18 etc." I would love to, but where exactly? (When bo

[Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Kevin Jardine
This back and forth on performance is great! I often see ByteString used where Text is theoretically more appropriate (eg. the Snap web framework) and it would be good to get these performance issues ironed out so people feel more comfortable using the right tool for the job based upon API rather

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-13 Thread Wei Hu
On Fri, Aug 13, 2010 at 4:53 AM, Simon Marlow wrote: > Ah yes, that works too.  But other similar versions don't, like this one: > > process :: String ->  String > process _ = let x = x in x > > Hence why I added the "tail" in my version. Without "-O", this version doesn't work, but with "-O" it

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Bryan O'Sullivan
On Fri, Aug 13, 2010 at 9:55 AM, Daniel Fischer wrote: > > That's an unfortunate example. Using the stringsearch package, substring > searching in ByteStrings was considerably faster than in Data.Text in my > tests. > Interesting. Got a test case so I can repro and fix? :-) __

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Daniel Fischer
On Friday 13 August 2010 17:57:36, Bryan O'Sullivan wrote: >3. Some commonly used functions, such as substring searching, are > *way*faster than their ByteString counterparts. That's an unfortunate example. Using the stringsearch package, substring searching in ByteStrings was considerably fa

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Johan Tibell
2010/8/13 Bryan O'Sullivan > 2010/8/13 Gábor Lehel > > How about the case for text which is guaranteed to be in ascii/latin1? >> ByteString again? >> > > If you know it's text and not binary data you are working with, you should > still use Data.Text. There are a few good reasons. > >1. The

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-13 Thread Tillmann Rendel
Simon Marlow wrote: So what happens is this: - the recursive definition causes the main thread to block on itself (known as a "black hole") - the program is deadlocked (no threads to run), so the runtime invokes the GC to see if any threads are unreachable - the GC finds that (a) t

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Donn Cave
Quoth Sean Leather , > Which one do you use for strings in HTML or XML in which UTF-8 has become > the commonly accepted standard encoding? It's text, not binary, so I should > choose Data.Text. But isn't there a performance penalty for translating from > Data.Text's internal 16-bit encoding to UT

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Bryan O'Sullivan
2010/8/13 Gábor Lehel > How about the case for text which is guaranteed to be in ascii/latin1? > ByteString again? > If you know it's text and not binary data you are working with, you should still use Data.Text. There are a few good reasons. 1. The API is more correct. For instance, if you

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Daniel Fischer
On Friday 13 August 2010 17:27:32, Sean Leather wrote: > Which one do you use for strings in HTML or XML in which UTF-8 has > become the commonly accepted standard encoding? It's text, not binary, > so I should choose Data.Text. But isn't there a performance penalty for > translating from Data.Text

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Daniel Fischer
On Friday 13 August 2010 17:25:58, Gábor Lehel wrote: > How about the case for text which is guaranteed to be in ascii/latin1? > ByteString again? If you can be sure that that won't change anytime soon, definitely. Bonus points if you can write the code so that later changing to e.g. Data.Text re

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Sean Leather
Johan Tibell wrote: > Here's a rule of thumb: If you have binary data, use Data.ByteString. If > you have text, use Data.Text. Those libraries have benchmarks and have been > well tuned by experienced Haskelleres and should be the fastest and most > memory compact in most cases. There are still a

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Gábor Lehel
On Fri, Aug 13, 2010 at 4:43 PM, Johan Tibell wrote: > On Fri, Aug 13, 2010 at 4:24 PM, Kevin Jardine > wrote: >> >> I'm interested to see this kind of open debate on performance, >> especially about libraries that provide widely used data structures >> such as strings. >> >> One of the more puzz

[Haskell-cafe] cabal, haddock, hscolour

2010-08-13 Thread Johannes Waldmann
How is the "cabal" magic that would run hscolour? I am using "cabal haddock --executables --hyperlink-source" and this generates the API docs for all modules, and all have source links, but the actual html-ized source is only generated for the main module, and missing for all others. Thanks - J

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Johan Tibell
On Fri, Aug 13, 2010 at 4:24 PM, Kevin Jardine wrote: > I'm interested to see this kind of open debate on performance, > especially about libraries that provide widely used data structures > such as strings. > > One of the more puzzling aspects of Haskell for newbies is the large > number of libra

Re: Re[2]: [Haskell-cafe] Compiled OpenGL program has DOS window?

2010-08-13 Thread Henk-Jan van Tuyl
On Fri, 13 Aug 2010 12:29:52 +0200, Bulat Ziganshin wrote: Hello Henk-Jan, Friday, August 13, 2010, 2:23:58 PM, you wrote: You can do this with the flag -optl-mwindows; this passes the flag -mwindows to the linker. Because this is a linker option, you cannot find it in the GHC documentat

[Haskell-cafe] Beautiful Differentiation using VectorSpace

2010-08-13 Thread Christopher Witte
Hi all, I'm trying to go through the paper Beautiful Differentiation by Conal Elliott and got a bit stuck. So I decided to download the VectorSpace package, which as far as I know implements the paper, and just try and play around with it. Unfortunately when I tried the simple examples at the be

[Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Kevin Jardine
I'm interested to see this kind of open debate on performance, especially about libraries that provide widely used data structures such as strings. One of the more puzzling aspects of Haskell for newbies is the large number of libraries that appear to provide similar/duplicate functionality. The

Re: [Haskell-cafe] String vs ByteString

2010-08-13 Thread Johan Tibell
On Fri, Aug 13, 2010 at 4:03 PM, Pierre-Etienne Meunier < pierreetienne.meun...@gmail.com> wrote: > Hi, > > Why don't you use the Data.Rope library ? > The asymptotic complexities are way better than those of the ByteString > functions. > > PE > For some operations. I'd expect it to be a constant

Re: [Haskell-cafe] String vs ByteString

2010-08-13 Thread Pierre-Etienne Meunier
Hi, Why don't you use the Data.Rope library ? The asymptotic complexities are way better than those of the ByteString functions. PE El 13/08/2010, a las 07:32, Erik de Castro Lopo escribió: > Hi all, > > I'm using Tagsoup to strip data out of some rather large XML files. > > Since the files

[Haskell-cafe] Re: Build failure for PortMidi on mac: incorrect Block.h

2010-08-13 Thread Brian Victor
Stephen Tetley wrote: > Possibly you need to supply extra-include-dirs (and extra-lib-dirs) to cabal. I tried --extra-include-dirs=/usr/include (the directory where the real Block.h resides) and there was no change. Adding the -v flag showed cabal trying to build with this line: /usr/bin/ghc -I

[Haskell-cafe] ANN: hswip-0.3 embedding swi-prolog in haskell

2010-08-13 Thread Evgeny Tarasov
I would like to announce a small library hswip. It is an analogue of pyswip [1] python library in haskell. Hswip allows to embed swi-prolog [2] interpreter into your haskell applications in a convenient way. Let't look at an example: main = do prologInit ["-q","-nosignals"] prolog

Re: [Haskell-cafe] String vs ByteString

2010-08-13 Thread Johan Tibell
On Fri, Aug 13, 2010 at 1:47 PM, Michael Snoyman wrote: > Use qualified imports, like so: >> >> import qualified Data.ByteString as B >> > > main = B.putStrLn $ B.pack "test" >> >> If you want to pack a String into a ByteString, you'll need to import > Data.ByteString.Char8 instead. > > Very true.

Re: [Haskell-cafe] String vs ByteString

2010-08-13 Thread Michael Snoyman
On Fri, Aug 13, 2010 at 2:42 PM, Johan Tibell wrote: > Hi Erik, > > > On Fri, Aug 13, 2010 at 1:32 PM, Erik de Castro Lopo > > > wrote: > >> Since the files are large I'm using ByteString, but that leads me >> to wonder what is the best way to handle clashes between Prelude >> functions like put

Re: [Haskell-cafe] String vs ByteString

2010-08-13 Thread Johan Tibell
Hi Erik, On Fri, Aug 13, 2010 at 1:32 PM, Erik de Castro Lopo > wrote: > Since the files are large I'm using ByteString, but that leads me > to wonder what is the best way to handle clashes between Prelude > functions like putStrLn and the ByteString versions? > > Anyone have any suggestions for

Re: [Haskell-cafe] String vs ByteString

2010-08-13 Thread Michael Snoyman
Just import the ByteString module qualified. In other words: import qualified Data.ByteString as S or for lazy bytestrings: import qualified Data.ByteString.Lazy as L Cheers, Michael On Fri, Aug 13, 2010 at 2:32 PM, Erik de Castro Lopo > wrote: > Hi all, > > I'm using Tagsoup to strip data o

[Haskell-cafe] String vs ByteString

2010-08-13 Thread Erik de Castro Lopo
Hi all, I'm using Tagsoup to strip data out of some rather large XML files. Since the files are large I'm using ByteString, but that leads me to wonder what is the best way to handle clashes between Prelude functions like putStrLn and the ByteString versions? Anyone have any suggestions for doin

Re[2]: [Haskell-cafe] Compiled OpenGL program has DOS window?

2010-08-13 Thread Bulat Ziganshin
Hello Henk-Jan, Friday, August 13, 2010, 2:23:58 PM, you wrote: > You can do this with the flag -optl-mwindows; this passes the flag > -mwindows to the linker. Because this is a linker option, you cannot find > it in the GHC documentation. This solution also works for other GUIs, like > wxHaskell

Re: [Haskell-cafe] Compiled OpenGL program has DOS window?

2010-08-13 Thread Henk-Jan van Tuyl
On Fri, 13 Aug 2010 10:18:22 +0200, Eitan Goldshtrom wrote: Hi. I'm working in Windows on an OpenGL application. I finally got everything working, doing all of my testing through the interpreter. When I finally compiled and ran the program from an executable for the first time I noticed that

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-13 Thread Simon Marlow
On 13/08/2010 09:53, Simon Marlow wrote: On 12/08/2010 21:59, Yitzchak Gale wrote: Wei Hu wrote: nonTermination _ = blackhole where blackhole = blackhole My original example was actually: process :: String -> String process = let x = x in x Ah yes, that works too. But other similar version

Re: [Haskell-cafe] Re: A GHC error message puzzle

2010-08-13 Thread Simon Marlow
On 12/08/2010 21:59, Yitzchak Gale wrote: Wei Hu wrote: nonTermination _ = blackhole where blackhole = blackhole My original example was actually: process :: String -> String process = let x = x in x Ah yes, that works too. But other similar versions don't, like this one: process :: Stri

[Haskell-cafe] Twidge Short URL not working...

2010-08-13 Thread arn-arn fernch
Hello, It's my first time using this mailing list thing so forgive me if I made any mistakes. I was using Twidge (http://wiki.github.com/jgoerzen/twidge/) and it's mentioned there is an available support in the Haskell Cafe. I only have a slight problem with Twidge. It's currently not shortening U

Re: [Haskell-cafe] Compiled OpenGL program has DOS window?

2010-08-13 Thread Lyndon Maydwell
I vaguely recall that there is a way to avoid this if you don't import any terminal functions or something similar. I don't remember the specifics though. Sorry I couldn't be of more help! On Fri, Aug 13, 2010 at 4:18 PM, Eitan Goldshtrom wrote: > Hi. I'm working in Windows on an OpenGL applic

[Haskell-cafe] Compiled OpenGL program has DOS window?

2010-08-13 Thread Eitan Goldshtrom
Hi. I'm working in Windows on an OpenGL application. I finally got everything working, doing all of my testing through the interpreter. When I finally compiled and ran the program from an executable for the first time I noticed that before creating my OpenGL window an empty DOS prompt popped up

Re: [Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-13 Thread wren ng thornton
Dan Doel wrote: On Thursday 12 August 2010 7:59:09 pm wren ng thornton wrote: Not quite. Strong-sigma is a dependent pair where you can project both elements. Weak-sigma is a dependent pair where you can only project the first element (because the second is erased). Existentials are dependent pa

Re: [Haskell-cafe] Re: philosophy of Haskell

2010-08-13 Thread Conal Elliott
> > There are various models. One (the state monad model) of them would > desugar this to: > > \world0 -> > let (x, world1) = getLine world0 > world2 = print (x+1) world1 > world3 = print (x+2) world2 > in world3 > Hi Ertugrul, This state monad model does not really work for IO, sin

[Haskell-cafe] Re: Documentation for OpenGL?

2010-08-13 Thread Eitan Goldshtrom
Woops, nevermind. I WAS looking in the wrong place. I should've known =P. Sorry for the unnecessary request. -Eitan PS. For anyone interested all of the documentation is in Graphics.Rendering.OpenGL.GL.PerFragment on hackage ___ Haskell-Cafe mailing