Re: [Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Karel Gardas
Ryan Trinkle wrote: > Rick, > > I know some work has been done on JVM - iirc, Don Stewart did some work back > in the day, www.cse.unsw.edu.au/~pls/thesis/dons-thesis.ps.gz, but I'm not > sure how comprehensive it is. > > Is anyone else interested in JVM-based Haskell targets? Hello, certainly

Re: [Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Ryan Trinkle
Rick, I know some work has been done on JVM - iirc, Don Stewart did some work back in the day, www.cse.unsw.edu.au/~pls/thesis/dons-thesis.ps.gz, but I'm not sure how comprehensive it is. Is anyone else interested in JVM-based Haskell targets? Ryan On Mon, Jun 22, 2009 at 20:42, Rick R wrote:

[Haskell-cafe] Re: Haskell on the iPhone

2009-06-22 Thread Benjamin L . Russell
On Mon, 22 Jun 2009 18:30:50 -0400, Ryan Trinkle wrote: >[...] > >I would like to take this opportunity to propose the creation of a >haskell-iphone mailing list, so that all Haskellers working with the iPhone >- whether for profit or for pleasure - can come together to make Haskell a >force to b

[Haskell-cafe] IMO ghc 6.8.2 misleading warning messages

2009-06-22 Thread Vasili I. Galchin
Hello, For: parseOptional = Parse.parseOptional I got warning messages: Swish/HaskellUtils/ParseURI.hs:77:4: Warning: Defined but not used: `parseOptional' Swish/HaskellUtils/ParseURI.hs:77:4: Warning: Definition but no type signature for `parseOptional' Inferred type

[Haskell-cafe] Re: ANN: haskell-src-exts-1.0.0

2009-06-22 Thread Maurí­cio
It is with great pleasure I hereby announce the first stable release of the haskell-src-exts package, version 1.0.0! There's a kind of programming work that have great intelectual impact, as it lets you see your code in diferent ways. Yours, however, is of a special kind, as it has a physical im

Re: [Haskell-cafe] STM/Data Invariant related Segfault with GHC 6.10.3

2009-06-22 Thread Bertram Felgenhauer
Jan Schaumlöffel wrote: > I just discovered that programs compiled with GHC 6.10.3 segfault when > accessing a TVar created under certain conditions. This is a known bug, but it hasn't gotten much attention: http://hackage.haskell.org/trac/ghc/ticket/3049 Bertram __

Re: [Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Rick R
This is definitely good news! So... who's doing the Android/JVM target? ;) On Mon, Jun 22, 2009 at 7:37 PM, Daniel Peebles wrote: > How exciting! I fully support the creation of a new mailing list about > iphone+haskell :) > > On Mon, Jun 22, 2009 at 6:30 PM, Ryan Trinkle wrote: > > Dear Has

[Haskell-cafe] ANN: haskell-src-exts-1.0.0

2009-06-22 Thread Niklas Broberg
Fellow Haskelleers, It is with great pleasure I hereby announce the first stable release of the haskell-src-exts package, version 1.0.0! haskell-src-exts is a package for Haskell source code manipulation. In particular it defines an abstract syntax tree representation, and a parser and pretty-pri

Re: [Haskell-cafe] GHCi infers a type but refuses it as type signature

2009-06-22 Thread Felipe Lessa
On Tue, Jun 23, 2009 at 02:02:25AM +0200, Eric wrote: > It seems that an extension is required: > > Non type-variable argument in the constraint: MonadState [a] m > (Use -XFlexibleContexts to permit this) > In the type signature for `play3': > play3 :: (MonadState [a] m, Eq a) =>

[Haskell-cafe] GHCi infers a type but refuses it as type signature

2009-06-22 Thread Eric
Hi haskell helpers, I am new to haskell (but enthusiast). I have begun to play with State and StateT, but this very simple exercice has led me to a strange situation where GHCi recognises and accepts the type of a function but GHC won't allow it as a type signature. Here is the example (which is

Re: [Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Daniel Peebles
How exciting! I fully support the creation of a new mailing list about iphone+haskell :) On Mon, Jun 22, 2009 at 6:30 PM, Ryan Trinkle wrote: > Dear Haskellers, > > Recently, there's been a groundswell of activity in the Haskell community > regarding the Haskell's use in developing iPhone games. 

[Haskell-cafe] HaRe (the Haskell Refactorer) in action - short screencast

2009-06-22 Thread Claus Reinke
I've heard that many Haskellers know HaRe only as a rumour. It has been many years since the original project finished, and HaRe hasn't been maintained for quite some time, so just pointing to the sources isn't quite the right answer. The sources are still available, and build with GHC 6.8.3 (

Re: [Haskell-cafe] FFI and heap memory usage limit

2009-06-22 Thread Bulat Ziganshin
Hello Marcin, Tuesday, June 23, 2009, 2:31:13 AM, you wrote: > Now this took an odd turn, because the simulation started crashing > with > out-of-memory errors _after_ completing (during bz2 compression). I'm fairly > certain this is a GC/FFI bug, because increasing the max heap didn't h

Re: [Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Don Stewart
If you're doing it in Haskell, please feel free to keep plugging. A new market for Haskell apps is highly welcome. ryant5000: > Jason, > > iPwn is currently in pre-production for its first title, which will be an > action-RPG reminiscent of Diablo and Fallout. I'll try to keep the shameless > p

Re: [Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Ryan Trinkle
Jason, iPwn is currently in pre-production for its first title, which will be an action-RPG reminiscent of Diablo and Fallout. I'll try to keep the shameless plugging on Haskell-cafe to a minimum, but I make no promises :P I will definitely let people know when our website is put together in some

Re: [Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Jason Dagit
On Mon, Jun 22, 2009 at 3:30 PM, Ryan Trinkle wrote: > Dear Haskellers, > > Recently, there's been a groundswell of activity in the Haskell community > regarding the Haskell's use in developing iPhone games. The iPhone is a > powerful, innovative platform (with a great monetization scheme, to bo

[Haskell-cafe] FFI and heap memory usage limit

2009-06-22 Thread Marcin Kosiba
Hello, Recently I've come across a certain GC/FFI-related problem. I've googled a bit, but didn't find anything specific. I'm running certain simulations, which tend to allocate a lot of garbage in memory. Since this causes the OOM-killer to kill my simulation at 98% completion

[Haskell-cafe] Haskell on the iPhone

2009-06-22 Thread Ryan Trinkle
Dear Haskellers, Recently, there's been a groundswell of activity in the Haskell community regarding the Haskell's use in developing iPhone games. The iPhone is a powerful, innovative platform (with a great monetization scheme, to boot), and it's not surprising that many of us would want to devel

Re: [Haskell-cafe] Re: haskelldb + sqlite problem.

2009-06-22 Thread John Goerzen
GüŸnther Schmidt wrote: > Hi John, > > let me first of all apologize, I didn't mean to criticize you, I'm sure > you had good reasons for those changes, I'm merely mean to state how > they did affect me after switching to HDBC 2.1. No, I completely understand and I'm not offended; but I didn't

[Haskell-cafe] Re: haskelldb + sqlite problem.

2009-06-22 Thread GüŸnther Schmidt
Hi John, let me first of all apologize, I didn't mean to criticize you, I'm sure you had good reasons for those changes, I'm merely mean to state how they did affect me after switching to HDBC 2.1. Since after the rollback they no longer occurred I surmise that there is a connection. The e

Re[2]: [Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Bulat Ziganshin
Hello Don, Tuesday, June 23, 2009, 1:22:46 AM, you wrote: > One easy way to fix the GC time is to increase the default heap size. > ./a.out +RTS -A200M to be exact, -A isn't a heap size - it's frequency of generation-1 collections. by default, collection perfromed every 512kbytes, tied to L2

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Henning Thielemann
On Mon, 22 Jun 2009, Malcolm Wallace wrote: Example: f a b = g (a+b) (b-a) where g a c = a*c ghc warns that g's parameter a shadows the parameter to f. So we introduce a primed identifier to eliminate the warning: f a b = g (a+b) (b-a) where g a' c = a*c Now, no warnings!

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Henning Thielemann
On Mon, 22 Jun 2009, Jules Bean wrote: Miguel Mitrofanov wrote: I so don't want to be the one supporting your code... Well, that's lucky. Because you aren't. I think the most frequent warning which denotes actually an error for me, is the 'unused identifier' warning, since there are often

Re: [Haskell-cafe] Re: haskelldb + sqlite problem.

2009-06-22 Thread John Goerzen
John Goerzen wrote: > I do recall some discussion about data within a database; I don't recall > one about the filename of it, which would certainly be a separate > discussion. I can see why a connectRaw or some such function could be I have just pushed a patch to my git repo that adds connectSql

Re: [Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Don Stewart
kamil: > On Jun 22, 9:10 am, Ketil Malde wrote: > > Kamil Dworakowski writes: > > > Right... Python uses hashtables while here I have a tree with log n > > > access time. I did not want to use the Data.HashTable, it would > > > pervade my program with IO. The alternative is an ideal hashmap that

Re: [Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Daniel Fischer
Am Montag 22 Juni 2009 22:54:49 schrieb Kamil Dworakowski: > Wait! Have you typed that definition into the msg off the top of your > head? :) No, took a bit of looking. > > I went back to using Strings instead of ByteStrings and with that > hashtable the program finishes in 31.5s! w00t! Nice :D

Re: [Haskell-cafe] Re: haskelldb + sqlite problem.

2009-06-22 Thread John Goerzen
GüŸnther Schmidt wrote: > Hi Cloud, > > this often occurs when the path to the database includes a non-ascii > character. > > In my dev environment, the path to the database deliberately contains an > umlaut and the original code base of hdbc.sqlite3 from John Goerzen, > version 2.0 & version

Re: [Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Bulat Ziganshin
Hello Kamil, Tuesday, June 23, 2009, 12:54:49 AM, you wrote: > I went back to using Strings instead of ByteStrings and with that > hashtable the program finishes in 31.5s! w00t! and GC times are? also, try ByteString+HT, it should be pretty easy to write hashByteString -- Best regards, Bulat

Re: [Haskell-cafe] haskelldb + sqlite problem.

2009-06-22 Thread John Goerzen
Magicloud Magiclouds wrote: > Hi, > I am using haskelldb and haskelldb-hdbc-sqlite3. Well, I finally got > the source compiled and ran, I got this error: > App: user error (SQL error: SqlError {seState = "", seNativeError = > 21, seErrorMsg = "prepare 74: SELECT subject,\n timestamp\nFROM >

[Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Kamil Dworakowski
On Jun 22, 9:06 pm, Daniel Fischer wrote: > Am Montag 22 Juni 2009 21:31:50 schrieb Kamil Dworakowski: > > > > > On Jun 22, 6:46 am, Bulat Ziganshin wrote: > > > Hello Kamil, > > > > Monday, June 22, 2009, 12:01:40 AM, you wrote: > > > > Right... Python uses hashtables while here I have a tree

[Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Kamil Dworakowski
On Jun 22, 9:10 am, Ketil Malde wrote: > Kamil Dworakowski writes: > > Right... Python uses hashtables while here I have a tree with log n > > access time. I did not want to use the Data.HashTable, it would > > pervade my program with IO. The alternative is an ideal hashmap that never > > gets ch

Re: [Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Daniel Fischer
Am Montag 22 Juni 2009 21:31:50 schrieb Kamil Dworakowski: > On Jun 22, 6:46 am, Bulat Ziganshin wrote: > > Hello Kamil, > > > > Monday, June 22, 2009, 12:01:40 AM, you wrote: > > > Right... Python uses hashtables while here I have a tree with log n > > > > you can try this pure hashtable approach

Re: [Haskell-cafe] Type system trickery

2009-06-22 Thread Ross Mellgren
This works for me: {-# LANGUAGE EmptyDataDecls, GADTs #-} module Main where data NoZoo data Zoo newtype X = X Int deriving (Show) newtype Y = Y Char deriving (Show) data Foobar a where Foo :: X -> Y -> Foobar NoZoo Bar :: X -> Y -> Foobar NoZoo Zoo :: Foobar NoZoo -> Foobar Zoo fo

Re: [Haskell-cafe] Type system trickery

2009-06-22 Thread Andrew Coppin
Niklas Broberg wrote: Not nearly as annoying as this: data Foobar a where Foo :: X -> Y -> Foobar NoZoo Bar :: X -> Y -> Foobar NoZoo Zoo :: Foobar NoZoo -> Foobar Zoo For some reason, if I do this I get endless type check errors. I have to change the top two back to Foobar a before it w

[Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Kamil Dworakowski
On Jun 22, 6:46 am, Bulat Ziganshin wrote: > Hello Kamil, > > Monday, June 22, 2009, 12:01:40 AM, you wrote: > > > Right... Python uses hashtables while here I have a tree with log n > > you can try this pure hashtable approach: > > import Prelude hiding (lookup) > import qualified Data.HashTable

Re[2]: [Haskell-cafe] Getting my mind around UArray -> STUArray conversion

2009-06-22 Thread Bulat Ziganshin
Hello Scott, Monday, June 22, 2009, 10:23:42 PM, you wrote: > wombat :: forall e ix s. (IArray UArray e, Ix ix, MArray (STUArray s) e (ST s)) =>> e -> ix -> UArray ix e -> UArray ix e http://haskell.org/haskellwiki/Library/ArrayRef#Reimplemented_Arrays_library "Unboxed arrays now can be used in

[Haskell-cafe] ANN: hledger 0.6.1 released

2009-06-22 Thread Simon Michael
I have released hledger 0.6.1 which fixes a build problem with ghc 6.8. You can ignore this release if you use a newer ghc or if one of the http://hledger.org/binaries works for you. Thanks to Andreas Reuleaux for the report. More reports welcome on irc, list or http://code.google.com/p/hle

Re: [Haskell-cafe] Type system trickery

2009-06-22 Thread Thomas DuBuisson
Andrew Coppin said: >  data Foobar a where >   Foo :: X -> Y -> Foobar NoZoo >   Bar :: X -> Y -> Foobar NoZoo >   Zoo :: Foobar NoZoo -> Foobar Zoo > > For some reason, if I do this I get endless type check errors. I have to > change the top two back to Foobar a before it will work. *sigh* That c

Re: [Haskell-cafe] Type system trickery

2009-06-22 Thread Niklas Broberg
> Not nearly as annoying as this: > >  data Foobar a where >   Foo :: X -> Y -> Foobar NoZoo >   Bar :: X -> Y -> Foobar NoZoo >   Zoo :: Foobar NoZoo -> Foobar Zoo > > For some reason, if I do this I get endless type check errors. I have to > change the top two back to Foobar a before it will work

Re: [Haskell-cafe] Getting my mind around UArray -> STUArray conversion

2009-06-22 Thread Don Stewart
scooter.phd: > On Fri, Jun 19, 2009 at 7:08 PM, Dan Doel wrote: > > Oops, I replied too hastily. > > > > What I wrote in my first mail is a problem, as witnessed by the "ix" and > > "ix1" > > in the error message. However, it isn't the main error. The main error is > > that > > you have a monadic

Re: [Haskell-cafe] Type system trickery

2009-06-22 Thread Andrew Coppin
Brent Yorgey wrote: On Sun, Jun 21, 2009 at 09:16:12PM +0100, Andrew Coppin wrote: Niklas Broberg wrote: That's what GADTs are for: data Flag = HasZoo | NoZoo data Foobar a where Foo :: Foobar a -> Foobar a Bar :: Foobar a -> Foobar a Zoo :: Foobar a -> Foobar HasZoo O

Re: [Haskell-cafe] rewrite rules

2009-06-22 Thread Ryan Ingram
Not 100% sure (especially without source/core), but my guess is that the higher-rank types make the rule unlikely to fire. Try -ddump-simpl to see the core output, and look for places where you expect the rule to fire. I suspect you will find that the types of f and g are not "forall" at that poi

Re: [Haskell-cafe] Getting my mind around UArray -> STUArray conversion

2009-06-22 Thread Scott Michel
On Fri, Jun 19, 2009 at 7:08 PM, Dan Doel wrote: > Oops, I replied too hastily. > > What I wrote in my first mail is a problem, as witnessed by the "ix" and "ix1" > in the error message. However, it isn't the main error. The main error is that > you have a monadic expression, with type something li

Re: [Haskell-cafe] rewrite rules

2009-06-22 Thread Sjoerd Visscher
On Jun 22, 2009, at 6:38 PM, Ryan Ingram wrote: Not 100% sure (especially without source/core), but my guess is that the higher-rank types make the rule unlikely to fire. Try -ddump-simpl to see the core output, and look for places where you expect the rule to fire. I suspect you will find th

Re: [Haskell-cafe] rewrite rules

2009-06-22 Thread Daniel Schüssler
Hi Sjoerd, I don't know the cause of the problem, but if I add this rule, it works: {-# RULES "inline_map" forall g x. map g x = transform (. g) x -#} maybe, for whatever reason, the 'map' is inlined "too late" for the transform/transform rule to see it? Greetings, Daniel On Monday 22 Ju

Re: [Haskell-cafe] Type system trickery

2009-06-22 Thread Brent Yorgey
On Sun, Jun 21, 2009 at 09:16:12PM +0100, Andrew Coppin wrote: > Niklas Broberg wrote: >> That's what GADTs are for: >> >> data Flag = HasZoo | NoZoo >> >> data Foobar a where >> Foo :: Foobar a -> Foobar a >> Bar :: Foobar a -> Foobar a >> Zoo :: Foobar a -> Foobar HasZoo >> > > Ouch #1:

[Haskell-cafe] ICFP09 Call for Participation

2009-06-22 Thread Matthew Fluet (ICFP Publicity Chair)
= Call for Participation The 14th ACM SIGPLAN International Conference on Functional Programming (ICFP 2009) http://www.cs.nott.ac.uk/~gmh/icfp09.html E

Re: [Haskell-cafe] Suggestion for Network.Socket in regards to PortNumber

2009-06-22 Thread Johan Tibell
On Mon, Jun 22, 2009 at 2:46 PM, Thomas DuBuisson < thomas.dubuis...@gmail.com> wrote: > All, > I've started to add to the network trac [1] - its just framework for > now. Please do add proposals, organized comments, and feel free to > alter the framework. I'm not sure how formal we'd like to ma

[Haskell-cafe] Re: haskelldb + sqlite problem.

2009-06-22 Thread GüŸnther Schmidt
Hi Cloud, this often occurs when the path to the database includes a non-ascii character. In my dev environment, the path to the database deliberately contains an umlaut and the original code base of hdbc.sqlite3 from John Goerzen, version 2.0 & version 2.1 thus does not work. John Goerzen

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Jochem Berndsen
Jules Bean wrote: > Magnus Therning wrote: >> Also from experience, I get a good feeling about software that >> compiles without warnings. It suggests the author cares and is >> indicative of some level of quality. > > In contrast, I find almost all the GHC warnings to be useless, and > therefore

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-22 Thread Max Rabkin
On Mon, Jun 22, 2009 at 2:54 PM, Deniz Dogan wrote: > Are you saying that when a function is named "isDirectory" you expect > it to only check for a trailing forward slash character? No. I'm saying that *if* isDirectory existed, then (isDirectory "/no/such/directory/") should equal true on Unix. I

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-22 Thread Ketil Malde
Deniz Dogan writes: >> One explanation is that isBlah asks "is this thing a blah", but we're >> not asking that because there is an indirection via the filepath. We're >> asking "does this filepath refer to a directory" not "is this filename a >> directory". > I think see what you mean, but I fi

[Haskell-cafe] Re: coding standard question

2009-06-22 Thread Christian Maeder
Malcolm Wallace wrote: > Johan Tibell wrote: > >>> Example: >>> f a b = g (a+b) (b-a) >>>where g a c = a*c The proper way to avoid shadowing in this simple case would be to make g global (and don't export it). f a b = g (a+b) (b-a) g a c = a*c >>> > >>> f a b = g (a+b) (b-a) >>

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-22 Thread Deniz Dogan
2009/6/22 Max Rabkin : > On Mon, Jun 22, 2009 at 2:09 PM, Deniz Dogan wrote: >> I think see what you mean, but I find the argument more of an excuse >> to the poor naming than a solid argument for it. Following the >> convention and intuition that most users have should be more important >> than ma

Re: [Haskell-cafe] Suggestion for Network.Socket in regards to PortNumber

2009-06-22 Thread Thomas DuBuisson
All, I've started to add to the network trac [1] - its just framework for now. Please do add proposals, organized comments, and feel free to alter the framework. I'm not sure how formal we'd like to make this so I haven't even tried to make guidelines for proposals. I'll add proposals and perhap

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Malcolm Wallace
Johan Tibell wrote: > > Example: > > f a b = g (a+b) (b-a) > >where g a c = a*c > > > > > f a b = g (a+b) (b-a) > >where g a' c = a*c > > Actually there's a warning: > :1:34: Warning: Defined but not used: `a'' Clearly I simplified the example too far. Try this, only slig

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-22 Thread Max Rabkin
On Mon, Jun 22, 2009 at 2:09 PM, Deniz Dogan wrote: > I think see what you mean, but I find the argument more of an excuse > to the poor naming than a solid argument for it. Following the > convention and intuition that most users have should be more important > than making the (sometimes unnecessa

[Haskell-cafe] Re: Optimizing spelling correction program

2009-06-22 Thread Kamil Dworakowski
On Jun 22, 10:03 am, Eugene Kirpichov wrote: > Hey, you're using String I/O! > > nWORDS <- fmap (train . map B.pack . words) (readFile "big.txt") > > This should be > > WORDS <- fmap (train . B.words) (B.readFile "big.txt") > > By the way, which exact file do you use as a misspellings file? The >

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-22 Thread Deniz Dogan
2009/6/22 Duncan Coutts : > On Mon, 2009-06-22 at 08:53 +0200, Deniz Dogan wrote: >> 2009/6/22 Colin Paul Adams : >> >> "Judah" == Judah Jacobson writes: >> > >> >    Judah> On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul >> >    Judah> Adams wrote: >> >    >> I've been hoogling like bad to try t

Re: [Haskell-cafe] Suggestion for Network.Socket in regards to PortNumber

2009-06-22 Thread Johan Tibell
On Mon, Jun 22, 2009 at 1:52 PM, Thomas DuBuisson < thomas.dubuis...@gmail.com> wrote: > Johan - glad you chimed in! > > I'm all in favor of keeping a low level interface and don't have an > issue with Network.Socket existing, I additionally really like the > suggestion of moving from the ML to a

Re: [Haskell-cafe] Suggestion for Network.Socket in regards to PortNumber

2009-06-22 Thread John Van Enk
Moving off list to the Wiki has my vote. On Mon, Jun 22, 2009 at 7:52 AM, Thomas DuBuisson wrote: > Johan - glad you chimed in! > > I'm all in favor of keeping a low level interface and don't have an > issue with Network.Socket existing,  I additionally really like the > suggestion of moving from

Re: [Haskell-cafe] Suggestion for Network.Socket in regards to PortNumber

2009-06-22 Thread Thomas DuBuisson
Johan - glad you chimed in! I'm all in favor of keeping a low level interface and don't have an issue with Network.Socket existing, I additionally really like the suggestion of moving from the ML to a wiki in the same style as Haskell'. I'll port these comments to the wiki if that is whats agree

Re: [Haskell-cafe] Documentation on hackage

2009-06-22 Thread Duncan Coutts
On Mon, 2009-06-15 at 06:49 -0700, Don Stewart wrote: > si: > > Dear Haskellers, > > > > who needs this kind of documentation? > > > > http://hackage.haskell.org/packages/archive/tfp/0.2/doc/html/Types-Data-Num-Decimal-Literals.html > > > > isn't this a kind of spam? > > > > Seems like a good

Re: [Haskell-cafe] Cross platform getProcessID

2009-06-22 Thread John Van Enk
Hi John, > The short anser is...you need to make a ffi call to getCurrentProcessId > > unfortunately there is no binding to this function in System.Win32.Process > which is the natural home for it. > > Perhaps you could submit a patch for Win32 package, once you have created > the binding the sign

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Erik de Castro Lopo
Malcolm Wallace wrote: > When I write code that shadows variable names, it is always deliberate. > In fact, the language's lexical rules encourage shadowing, otherwise why > have scopes at all? I think bug-introduction by the elimination of > shadowing is much more common than bug-elimination by

[Haskell-cafe] Re: Creating a new Haskell mailing list

2009-06-22 Thread Benjamin L . Russell
Most likely, if you propose your new mailing list (on the Haskell mailing list), the discussion will focus on whether it will be likely to gather enough posts to stay reasonably active. While the definition of "reasonably active" differs depending on the individual, it is likely to mean somewhere

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-22 Thread Duncan Coutts
On Mon, 2009-06-22 at 08:53 +0200, Deniz Dogan wrote: > 2009/6/22 Colin Paul Adams : > >> "Judah" == Judah Jacobson writes: > > > >Judah> On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul > >Judah> Adams wrote: > >>> I've been hoogling like bad to try to determine if a function > >>

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Johan Tibell
On Mon, Jun 22, 2009 at 12:06 PM, Malcolm Wallace < malcolm.wall...@cs.york.ac.uk> wrote: > Erik de Castro Lopo > wrote: > > > Vasili I. Galchin wrote: > > > > > "where/let" functions use the > > > same name for function parameters as the outer function and hence > > > there is a "shadow" warning

[Haskell-cafe] STM/Data Invariant related Segfault with GHC 6.10.3

2009-06-22 Thread Jan Schaumlöffel
Hello, I just discovered that programs compiled with GHC 6.10.3 segfault when accessing a TVar created under certain conditions. This happens when the TVar is created and a data invariant is added (using alwaysSucceeds) in the same atomic block. The invariant does not necessarily have to read th

Re: [Haskell-cafe] Optimizing spelling correction program

2009-06-22 Thread Johan Tibell
On Mon, Jun 22, 2009 at 12:05 PM, Ketil Malde wrote: > Johan Tibell writes: > > > Typo? Bloom filters have O(1) lookup and tries O(m) lookup where m is the > > number of characters in the string. > > Typically you need to examine the (whole) search string in order to > compute the hash function,

[Haskell-cafe] Re: Creating a new Haskell mailing list

2009-06-22 Thread Benjamin L . Russell
On Wed, 17 Jun 2009 20:38:54 -0400, Ryan Trinkle wrote: >Hi all, > >I'm interested in starting a mailing list on haskell.org. Who should I talk >to about such things? One way is to propose the mailing list on the Haskell mailing list (see the Haskell Info Page at http://www.haskell.org/mailman/

Re: [Haskell-cafe] Creating a new Haskell mailing list

2009-06-22 Thread Ryan Trinkle
I'm interested in creating a list for iPhone development. While I also have an ongoing iPhone build target project, which I will be open-sourcing very soon, I'd like the list to be about Haskell on iPhone without regard to whether it has anything to do with my project. Ryan On Fri, Jun 19, 2009

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Neil Brown
Jules Bean wrote: I've been using GHC for years and my honest opinion is that the warnings very rarely flag an actual maintainability problem in the code I write, and very frequently annoying highlight something I knew I was doing, and did quite deliberately - most often inexhaustive patterns

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Malcolm Wallace
Erik de Castro Lopo wrote: > Vasili I. Galchin wrote: > > > "where/let" functions use the > > same name for function parameters as the outer function and hence > > there is a "shadow" warning from the compiler. > > In Haskell there is an easy way around this. Variables can > be name a, a', a''

Re: [Haskell-cafe] Optimizing spelling correction program

2009-06-22 Thread Ketil Malde
Johan Tibell writes: > Typo? Bloom filters have O(1) lookup and tries O(m) lookup where m is the > number of characters in the string. Typically you need to examine the (whole) search string in order to compute the hash function, so I think it is fair to consider them both O(m). (Sorry about t

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Miguel Mitrofanov
Jules Bean wrote on 22.06.2009 13:09: Miguel Mitrofanov wrote: I so don't want to be the one supporting your code... Well, that's lucky. Because you aren't. Exactly. However, that's an easy arrow to fling. I say I don't find warnings useful so you suggest my code is unmaintainable. Is

[Haskell-cafe] rewrite rules

2009-06-22 Thread Sjoerd Visscher
Hi all, I have a rewrite rule as follows: {-# RULES "transform/transform" forall (f::forall m. Monoid m => (a -> m) -> (b - > m)) (g::forall m. Monoid m => (b -> m) -> (c -> m)) (l::FMList c). transform f (transform g l) = transform

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Jules Bean
Miguel Mitrofanov wrote: I so don't want to be the one supporting your code... Well, that's lucky. Because you aren't. However, that's an easy arrow to fling. I say I don't find warnings useful so you suggest my code is unmaintainable. Is that based on any knowledge of my code, or the GHC wa

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Erik de Castro Lopo
Magnus Therning wrote: > Speaking from experience it's good to fix all warnings, This was may experience from the C programming language. > since otherwise there > will be enough of them to cause a few "terminal pages" to scroll by when you > compile and then there's a real danger of not notic

Re: [Haskell-cafe] Optimizing spelling correction program

2009-06-22 Thread Eugene Kirpichov
Hey, you're using String I/O! nWORDS <- fmap (train . map B.pack . words) (readFile "big.txt") This should be WORDS <- fmap (train . B.words) (B.readFile "big.txt") By the way, which exact file do you use as a misspellings file? The corpus linked to at Norvig's page has many. And do you have a

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Miguel Mitrofanov
I so don't want to be the one supporting your code... Jules Bean wrote on 22.06.2009 13:00: Magnus Therning wrote: Also from experience, I get a good feeling about software that compiles without warnings. It suggests the author cares and is indicative of some level of quality. In contrast,

Re: [Haskell-cafe] Optimizing spelling correction program

2009-06-22 Thread Johan Tibell
On Mon, Jun 22, 2009 at 10:10 AM, Ketil Malde wrote: > Kamil Dworakowski writes: > > > Right... Python uses hashtables while here I have a tree with log n > > access time. I did not want to use the Data.HashTable, it would > > pervade my program with IO. The alternative is an ideal hashmap that

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Jules Bean
Magnus Therning wrote: Also from experience, I get a good feeling about software that compiles without warnings. It suggests the author cares and is indicative of some level of quality. In contrast, I find almost all the GHC warnings to be useless, and therefore turn them off. I don't find t

Re: [Haskell-cafe] Optimizing spelling correction program

2009-06-22 Thread Ketil Malde
Kamil Dworakowski writes: > Right... Python uses hashtables while here I have a tree with log n > access time. I did not want to use the Data.HashTable, it would > pervade my program with IO. The alternative is an ideal hashmap that never > gets changed. This program creates a dictionary at start

Re: [Haskell-cafe] ANNOUNCE fmlist

2009-06-22 Thread Sebastian Fischer
On Jun 19, 2009, at 7:12 PM, Sjoerd Visscher wrote: I see you did performance tests. How does your current version compare to f.e. one based on DiffLists? The current versions (0.4) of bfs and idfs based on FMList (0.5) use the same amount of memory and are about 10-15% slower than corre

Re: [Haskell-cafe] Suggestion for Network.Socket in regards to PortNumber

2009-06-22 Thread Johan Tibell
On Mon, Jun 22, 2009 at 1:22 AM, Thomas DuBuisson < thomas.dubuis...@gmail.com> wrote: > I'm in favor of the entire Network library being reworked with an > improved API that is higher level and type-safe instead of a direct > translation/FFI of Berkeley sockets. I also would like the Network >