Re: [Haskell-cafe] ANNOUNCE: Guihaskell and PropLang 0.1

2007-08-15 Thread Neil Mitchell
Hi Dougal, It's cross platform, and will use GHC and Hugs if they are already installed. Thanks Neil On 8/15/07, Dougal Stanton [EMAIL PROTECTED] wrote: On 15/08/07, Asumu Takikawa [EMAIL PROTECTED] wrote: == GuiHaskell Guihaskell is a graphical REPL using PropLang, a GUI combinator

Re: [Haskell-cafe] Pattern matching articles/explanations

2007-08-16 Thread Neil Mitchell
Hi So what I noticed that A Gentle Introduction to Haskell mentioned that wild-cards are useful in constructors. For example: head (x:_) = x So, does that offer any performance benefits over: head (x:xs) = x No. They are exactly the same. _ simply means a new unique name. Or is it

[Haskell-cafe] List comprehension desugaring

2007-08-19 Thread Neil Mitchell
Hi, The Haskell desugaring for list comprehensions is given in: http://haskell.org/onlinereport/exps.html#list-comprehensions All the rules seem to be left to right rewrites, apart from the second one, which seems to be right to left. Is there some deep reason for this, or is this accidental.

[Haskell-cafe] Re: List comprehension desugaring

2007-08-19 Thread Neil Mitchell
Hi Sorry for the noise, I've now realised they are a left to right rewrite system, the second rule is required to set up the base case. Thanks Neil On 8/19/07, Neil Mitchell [EMAIL PROTECTED] wrote: Hi, The Haskell desugaring for list comprehensions is given in: http://haskell.org

Re: [Haskell-cafe] ghc 6.7 /6.8

2007-08-19 Thread Neil Mitchell
Hi will 6.7 be released, or will only 6.8 be ? 6.7 is the HEAD branch, 6.8 will be released. -in that case, does the 6.8 branch means the freeze is on, and what would be the target for 6.8 ? Q3/2007 ? Q4 ? Soon, in the next month - according to latest targets/estimates. ( context: I am

Re: [Haskell-cafe] is there a way to patch the build-depends line of a cabal file without breaking backwards compatibility?

2007-08-20 Thread Neil Mitchell
Hi Distribution/Simple/InstallDirs.hs:267:36: Not in scope: `dropDrive' [EMAIL PROTECTED]:~/installs/cabal-head/caballs -l `which ghc` lrwxrwxrwx 1 root root 31 2007-08-20 11:08 /usr/local/bin/ghc - /usr/local/bin/ghc-6.7.20070816 You'll need to upgrade the filepath library as well,

Re: [Haskell-cafe] GHC optimisations

2007-08-21 Thread Neil Mitchell
Hi Wait, you're saying that ghc can produce pure c-code, that doesnt contain any assembly code, and that runs as fast as ghc code that does contain assembly? No. It can produce pure C code (unregistered), but to get high performance it processes the output assembly afterwards (registered).

Re: [Haskell-cafe] Generic data constructor in pattern?

2007-08-21 Thread Neil Mitchell
Hi Peter, liftV1 f (V x y) = V (f x) (f y) liftV2 f (V x1 y1) (V x2 y2) = V (f x1 x2) (f y1 y2) liftM1 f (M x y) = M (f x) (f y) liftM2 f (M x1 y1) (M x2 y2) = M (f x1 x2) (f y1 y2) Both pairs of lift functions have almost identical implementations. Can I

Re: [Haskell-cafe] Re: Newbie question: Where is StackOverflow on the Wiki?

2007-08-21 Thread Neil Mitchell
Hi sum (enum 1 10) = sum' 0 (enum 1 10) = ... sum' 36 (9 : enum (9+1) 10) = (sum' $! (36+9)) (enum (9+1) 10) = sum' 45 (enum (9+1) 10) = sum' 45 [] = 45 (I need to find some way to automate making these trails

Re: [Haskell-cafe] GHC optimisations

2007-08-22 Thread Neil Mitchell
Hi Other rules that could be interesting are: forall a b. fromInteger a + fromInteger b = fromInteger (a + b) forall a b. fromInteger a * fromInteger b = fromInteger (a * b) This is wrong, since the class function can do what it wants. Imagine: instance Num String where (+) = (++)

Re: [Haskell-cafe] GHC optimisations

2007-08-22 Thread Neil Mitchell
Hi If Num obeys ring axioms, fromInteger is a perfectly fine ring-homomorphism. (It's also the first or second homomorphism taught.) Does Int obey these axioms? I'm thinking that assuming properties about things such as numbers is very likely to go wrong very quickly. Monads you might be able

Re: [Haskell-cafe] help understanding lazy evaluation

2007-08-22 Thread Neil Mitchell
Hi factors :: Int - [Int] factors n = [x | x - [1..n], n `mod` x == 0] prime :: Int - Bool prime n = factors n == [1, n] My vague intuition said we either need factors or we don't, we do because we need to perform the test, so we compute it. That's wrong, so a posteriori the

Re: [Haskell-cafe] GHC optimisations

2007-08-23 Thread Neil Mitchell
Hi Its (==) isn't reflexive (is it transitive? probably, at least if there aren't too many optimizations, but floating-point transitive equality isn't very useful). It's not even referentially transparent in all cases. a == b may fail while the double's are in the high precision registers,

Re: [Haskell-cafe] Re: Graph reduction [Was: Where is StackOverflow on the Wiki?]

2007-08-23 Thread Neil Mitchell
Hi Yeah, the precise details may vary, even :) But for teaching, an automatic tool that does graph reduction would be great. I don't mind if it's sloppy (directly apply definitions pattern matching VS everything is a lambda abstraction) and only does simply typed lambda calculus (no

[Haskell-cafe] Re: [Haskell] Issue about use of WinHugs

2007-08-24 Thread Neil Mitchell
Hi I'm new to WinHugs, what's wrong with isUpper of my WinHugs? Nothing. The book/tutorial you are going from is out of date. Before using the isUpper/isLower functions you first have to type :load Char: Hugs :load Char Hugs filter isUpper ABCDEfgh ABCDE The :load Char loads the Char module

Re: [Haskell-cafe] Ideas

2007-08-25 Thread Neil Mitchell
Hi - Blogging software. (Because there isn't enough of it in the world yet.) Hope (google: Haskell Hope) - A wiki program. (Ditto.) Flippi (google: Haskell Flippi) - A general CMS. Hope - An interactive function plotter. (GNUplot is nice, but it can't plot recursive functions...) None

Re: [Haskell-cafe] Ideas

2007-08-25 Thread Neil Mitchell
Hi Flippi (google: Haskell Flippi) ...and yet haskell.org uses WikiMedia? (Which is written in something bizzare like Perl...) Yes, but WikiMedia is a result of years of work, Flippi is a lot less. Wikipedia uses WikiMedia - its a tried and proven solution. - A graphical programming

Re: [Haskell-cafe] Haskell on the Playstation 3? :-)

2007-08-25 Thread Neil Mitchell
Hi Another option would be to port the yhi bytecode interpreter to run on PalmOS. I tried this, but I ran into three problems: 1. libgmp dependency This is no longer an issue, we now have a flag to not require libgmp, which makes type Integer = Int 2. build system requires Python

Re: [Haskell-cafe] defining mapPairs function

2007-08-29 Thread Neil Mitchell
Hi Alexteslin, I just came across with this question on the exam and can not think of implementing it. mapPair :: (a - a - a) - [a] - [a] such that mapPairs f [x1, x2, x3, x4...] = [f x1 x2, f x3 x4,...] I would implement this using direct recursion. As a starting point, the standard

Re: [Haskell-cafe] defining mapPairs function

2007-08-29 Thread Neil Mitchell
Hi mapPairs :: (a - a - a) - [a] - [a] mapPairs f [x] = [x] mapPairs f [] = [] mapPairs f (x:xs) = f x (head xs) : mapPairs f (tail xs) It looks like it works, but you can get a better version by changing the last line: mapPairs f (x:y:zs) = ... - left as an exercise, but no need for head

Re: [Haskell-cafe] Hawiki articles

2007-09-03 Thread Neil Mitchell
Hi Bring back HaWiki! I couldn't agree more! We built up an incredible array of articles, by fantastic authors with stunning content - which we then deleted... I learnt much from the old wiki, and it would be a shame if others didn't get that opportunity. Of course it should be static only,

Re: [Haskell-cafe] Hawiki articles

2007-09-03 Thread Neil Mitchell
Hi There are two entirely separate issues in this thread - let's not confuse them. 1) The old HaWiki content is good and unavailable. I want it made available, in whatever form is appropriate. Please :-) 2) Licensing - the old content cannot be dumped onto the new wiki. My personal view is who

Re: [Haskell-cafe] Hackage and GHC 6.8

2007-09-08 Thread Neil Mitchell
Hi Neil, Given that GHC 6.8 is just around the corner and, given how it has re-organised the libraries so that the dependencies in many (most/all) the packages in the hackage DB are now not correct. Is there a plan of how to get hackage DB up to speed with GHC 6.8 ? I think whatever we go

Re: [Haskell-cafe] Elevator pitch for Haskell.

2007-09-08 Thread Neil Mitchell
Hi * Create sophisticated GUIs. Gtk2hs. Could do with a nice wrapper on that, but Conal is doing some interesting stuff, and I've got PropLang on the back burner. People are thinking the right thoughts, it just needs time. * Read and write standard binary file formats. (Images, compressed

Re: [Haskell-cafe] Elevator pitch for Haskell.

2007-09-08 Thread Neil Mitchell
Hi Data.Binary is the low level frameworks, now people can pick up the rest. Last time I checked, there's about half a dozen binary packages. All incompatible. All with different design. Seriously not obvious which one to use... Data.Binary is the answer,

Re: [Haskell-cafe] Tiny documentation request

2007-09-09 Thread Neil Mitchell
Hi I have the following page bookmarked: http://haskell.org/ghc/docs/latest/html/libraries/ Just bookmark: http://haskell.org/hoogle It's not perfect, but it probably solves lots of your problems. A tip is to use Firefox's search as you type feature if you know the module name. This

Re: [Haskell-cafe] Speed of character reading in Haskell

2007-09-09 Thread Neil Mitchell
Hi (Some list operations are too expensive with ByteString but for most string processing it's perfectly fine and much faster than String). I'm sure it's true, but it's quite irrelevant to my question, which is why is using getChar so much slower than using getContents? Buffering, blocks

Re: [Haskell-cafe] WinHugs shortcut keys

2007-09-10 Thread Neil Mitchell
Hi Peter, It does not seem to have shortcut keys for reload, edit, etc... When do you use reload? WinHugs automatically reloads modified files, so I've never felt the need to reload things. Similarly for edit, typing just edit on its own isn't that useful unless you give it a module. However,

Re: [Haskell-cafe] WinHugs shortcut keys

2007-09-10 Thread Neil Mitchell
Hi Peter, Automatic reloading is of course THE best solution, and that's already in :-) Maybe it could help new users to display a simple message into the WinHugs statusbar like module XXX reloaded after external modification at HH:MM:SS) or something? But that's really minor. That would be

Re: [Haskell-cafe] Tiny documentation request

2007-09-10 Thread Neil Mitchell
Hi I've never really understood what the benefit of this is... I mean, Google make the Google toolbar, but what's the point? Why not just click on the Google bookmark and type in your search? What benefits does installing a special addon provide? You can setup firefox so in the location

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-11 Thread Neil Mitchell
Hi Peter, The way I see it as a newcomer, Haskell shifts the typical imperical programming bugs like null pointers and buffer overruns towards space/time leaks, causing programs that either take exponentially long to complete, stack overflow, or fill up the swap file on disc because they

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-11 Thread Neil Mitchell
Hi Well, I actually meant more something like the imperative equivalences of code coverage tools and unit testing tools, hpc and HUnit cover these two things pretty perfectly. hpc will be in GHC 6.8, and its really cool :-) because I've read rumors that in Haskell, unit testing is more

Re: [Haskell-cafe] haskell and reflection

2007-09-11 Thread Neil Mitchell
Hi there is no runtime representation of type available for programmatic representation Data.Typeable.typeOf :: Typeable a = a - TypeRep there is no runtime representation of the type-inferencing or checking machinery Pretty much, no. The GHC API may provide some. there is no runtime

Re: [Haskell-cafe] Re: Is take behaving correctly?

2007-09-12 Thread Neil Mitchell
Hi A more serious point is that in some cases we might want take to underapproximate, or zip to truncate (or tail [] = [] ?). I don't think there's always a clear library choice here. I have a zipWithEq function I often use, which crashes if the zip'd lists aren't equal. I also have tailSafe

Re: [Haskell-cafe] Re: Is take behaving correctly?

2007-09-12 Thread Neil Mitchell
Hi The same should apply to head and tail. head or tail of [] should be []. What does the list think? Disagree, strongly. Its not even possible for head, since [a] - a. Wadler's theorems for free states that if head is given an empty list the _only_ thing it can do is crash. Thanks Neil

Re: [Haskell-cafe] Re: Is take behaving correctly?

2007-09-13 Thread Neil Mitchell
Hi Although I appluad the semantics of the safe package, I'm not delighted with the idea of replacing our concise elegant standard library names with uglyAndRatherLongCamelCaseNamesThatCouldBePerlOrEvenJava though. Conciseness of expression is a virtue. They aren't that long - merely an

Re: [Haskell-cafe] Re: Is take behaving correctly?

2007-09-13 Thread Neil Mitchell
Hi Similarly, I expect foo and foo' to be equivalent, except for strictness properties, but perhaps an underscore could be used for slightly different behaviors (interpretations, as it were)? tail_ or zip_, anyone? There are 4 variants of tail: tail :: [a] - [a] -- normal tailDef :: [a] -

Re: [Haskell-cafe] Re: Is take behaving correctly?

2007-09-13 Thread Neil Mitchell
Hi Is there a reason for not having tailM :: Monad m = [a] - m [a] which, at least for me, is much more useful? No, that probably is a much more sensible choice. Patches welcome :) Thanks Neil ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: Is take behaving correctly?

2007-09-13 Thread Neil Mitchell
Hi From the logical point of view tailMay is the right one. It pushes the error handling to the caller programm. tail = fromJust . tailMay The error messages suffer: tail [] = error: fromJust Nothing That's why I supplied tailNote, where tailNote foo broke its invariant! [] gives the

Re: [Haskell-cafe] Re: [Haskell] question about a failure to generalize

2007-09-15 Thread Neil Mitchell
Hi Monomorphism restriction? Replacing fold with foldRegsUsed would work because there's a type signature for foldRegsUsed. That looks like it. Another solution would be: fold = foldRegsUsed becomes: fold x = foldRegsUsed x Now the monomorphism restriction doesn't kick in because fold

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread Neil Mitchell
Hi Would you care to explain why you have this aversion to libs that aren't bundled with ghc? They are less stable and have less quality control. It is also an additional burden for a user to install the library to get the program working. cabal-install should fix the second. Some useful

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread Neil Mitchell
Hi What's bad about stagnation is that nobody will bother to produce anything better (at least not as a fully polished publicly available open source project), precisely because they have little chance of achieving a user base exceeding 1 (at least not if the attitude of David and Neil is

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-17 Thread Neil Mitchell
Hi They are less stable and have less quality control. Surely you jest? I see no evidence of this, rather the contrary in fact. No, dead serious. The libraries have a library submission process. Compare me changing my tagsoup library, to me changing my filepath library which comes bundled

Re: [Haskell-cafe] Library Process (was Building production stable software in Haskell)

2007-09-18 Thread Neil Mitchell
Hi What is the process for the inclusion of modules / packages in ghc, hugs and other compilers interpreters? Propose to have the packaged added. There is a very low chance of this being accepted. The only packages to have recently been added were FilePath and ByteString, both of which were

Re: [Haskell-cafe] Library Process (was Building production stable software in Haskell)

2007-09-18 Thread Neil Mitchell
Hi I think there is a niche for a subset of the hackage libraries providing an officially sanctioned standard library collection. Currently, hackage includes, well, everything. As such, it is a useful resource, but it would be useful to have a partitioning into two levels, where the SLC

Re: [Haskell-cafe] unique id for data types

2007-09-18 Thread Neil Mitchell
Hi Barney, This may be of interest, since all types already have an Int associated with them: http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Typeable.html#v%3AtypeRepKey Thanks Neil On 9/18/07, Barney Hilken [EMAIL PROTECTED] wrote: In order to make my records system

Re: [Haskell-cafe] Building production stable software in Haskell

2007-09-18 Thread Neil Mitchell
Hi okay, but this fails in some cases. i wrote a package to obtain financial quotes. yahoo changed the webservice url on me. i rolled out a change within a day. in your model, people suffer a broken service for two weeks. I don't think Yahoo will change the syntax or semantics of filepaths

Re: [Haskell-cafe] help me ! who has vty ?

2007-09-19 Thread Neil Mitchell
Hi who has vty for haskell? I can't find the right one so who can mail one to me ? http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vty-3.0.0 hackage has a lot of packages, and is always a good place to start a search. Thanks Neil ___

Re: [Haskell-cafe] Why isn't pattern matching lazy by default?

2007-09-19 Thread Neil Mitchell
Hi Now why isn't pattern matching lazy by default? This seems odd for a newbie since everything else is lazy by default. f ~(x:xs) = rhs f ~[] = rhs' Now guess what f [] does... If you use a where binding then pattern matching is lazy. Thanks Neil

Re: [Haskell-cafe] (win)hipe for Haskell?

2007-09-19 Thread Neil Mitchell
Hi Peter, During a googling session, I can across (Win)HIPE, a visualization program for the functional language HOPE. See http://dalila.sip.ucm.es/~cpareja/winhipe IMHO a similar tool would be a nice for learning/teaching Haskell; does that exist, or something else that comes close?

Re: [Haskell-cafe] (win)hipe for Haskell?

2007-09-19 Thread Neil Mitchell
Hi Yes, Hat does this http://www.haskell.org/hat/ (if you can get it to work, I typically have little success) Thanks. WinHIPE uses graphics and animation. If briefly encountered Hat before, but I had the impression it did not visualize the graphs using graphics, only text. Is this

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-19 Thread Neil Mitchell
Hi Peter, So I grabbed ghc-6.7.20070824 (=the latest one for Windows I could find) and the extra-libs, compiled and installed the GLUT package (which I needed), but when I compile my library, I get Could not find module `Data.Map': it is a member of package containers-0.1,

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Neil Mitchell
All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. That's a petty. I really would like to experiment with the debugger :-) Me too! A proper release of GHC 6.8 is very nearby, so you should get your wish then. Thanks Neil

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-22 Thread Neil Mitchell
Hi f = f and then try to evaluate 'f' in GHCi, as one would expect, the interpreter never returns an answer. The funny thing is that, while it is stuck in an infinite loop, GHCi doesn't seem to use any CPU time at all. It's called a black hole. The runtime can detect that f directly

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Neil Mitchell
Hi I'm not sure, but since it would require the detection of an evaluation that does not terminate, it comes down to the halting problem, which is not generally solvable. Maybe the experts can confirm my intuition? I think your intuition is off. This isn't the problem of detecting that a

[Haskell-cafe] Re: [Haskell] Math behind Haskell

2007-09-23 Thread Neil Mitchell
Hi The haskell-cafe@ mailing list is more appropriate for messages such as this. haskell@ is just for announcements (it should be called haskell-annouce@ !) * Lambda calculus - the basis of functional languages * Category theory - where all these mysterious things like monads, arrows, and

[Haskell-cafe] PROPOSAL: Rename haskell@ to haskell-announce@

2007-09-23 Thread Neil Mitchell
Hi I've just replied to another first poster with wrong list. Its entirely not their fault, but its also probably a bit off-putting that your very first post gets a (very polite) you got it wrong message. To steal the reasons and explanations from Ian: - pretty much what

Re: [Haskell-cafe] PROPOSAL: Rename haskell@ to haskell-announce@

2007-09-23 Thread Neil Mitchell
Hi I agree. Unless... do some people subscribe to haskell@ (not haskell-cafe@) and like the existing stuff that's sent there (not all announcements... I'm not sure if I'd call e.g. Oleg's occasional demonstrations announcements even)? There are four things sent to the haskell list@ 1)

Re: [Haskell] Re: [Haskell-cafe] PROPOSAL: Rename haskell@ to haskell-announce@

2007-09-24 Thread Neil Mitchell
Hi Forgive me, but I would much prefer a newsgroup to a mailing list. True, I could unsubscribe now and just browse the mailman archives - but for posting, I'd have to temporarily re-subscribe, which is awkward. (Indeed that's the only reason I'm not doing it.) I believe you can post from

Re: [Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Neil Mitchell
Hi Vimal, I was surprised to find out that the following piece of code: length [1..] 10 isnt lazily evaluated! The problem is that Int and Integer are both eager. It is possible to write a lazy peano number based data type, but I'm not aware of anyone who has - I have half the code (in

Re: [Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Neil Mitchell
Hi In this world, use length (take 11 [1..]) 10... not (null (drop 10 [1..])) is surely faster (not tested...) Faster? There might be a few microseconds in it. Clearer? Possibly... ;-) lengthNat [1..] 10 Couldn't be clearer, and can be made to work perfectly. If anyone does want to

Re: [Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Neil Mitchell
Hi lengthNat [1..] 10 Couldn't be clearer, and can be made to work perfectly. If anyone does want to pick up the lazy naturals work, I can send over the code (or write it yourself - its not hard!) Um... isn't a lazy natural just a list with no data, where the list length encodes a

Re: [Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Neil Mitchell
Hi Pretty much, yes. So I just need to write newtype LazyNatural = LazyNatural [()] or data Nat = Zero | Succ Nat it's your choice really. and then add some suitable instances. ;-) Yes. Lots of them. Lots of instances and lots of methods. Hey, the length function would then just

Re: [Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Neil Mitchell
Hi I'm guessing there's going to be fairly minimal performance difference. (Or maybe there is. My way uses a few additional pointers. But it also allows me to elegantly recycle existing Prelude list functions, so...) I think we can safely assume that people using peano numbers aren't actually

Re: [Haskell-cafe] Very crazy

2007-09-25 Thread Neil Mitchell
Hi show_system = unlines . zipWith (\l ms - Eq ++ show l ++ : ++ (concat $ intersperse + $ zipWith (\n x - x ++ x ++ show n) [1..] (init ms)) ++ = ++ last ms ) [1..] . map (map (take 8 . show)) And people complain that

Re: [Haskell-cafe] Very crazy

2007-09-25 Thread Neil Mitchell
Hi complex. The input is quite simple (it's a bunch of numbers), the output is quite simple (it's a neatly formatted string), but the process in the middle is... a mess. I'd like to find a more readable way of doing stuff like this. It's not just this specific function; any general hints

Re: [Haskell-cafe] Extract source code from literate Haskell (LHS) files

2007-10-06 Thread Neil Mitchell
Hi Peter, This is of course very easy to do manually, but does a command line tool exist for extracting source code from literate Haskell files? Cpphs is the perfect tool to do this. Thanks Neil On 9/30/07, Peter Verswyvelen [EMAIL PROTECTED] wrote: Thanks, Peter

Re: [Haskell-cafe] GLFW for WinHugs

2007-10-06 Thread Neil Mitchell
Hi Peter, It sounds like the problem is that you need to convert it to Hugs, rather than WinHugs specific (which might put a few people off looking to see if they can help). Perhaps an email to the author of the library might help you find if they would be interested in doing a port to Hugs.

Re: [Haskell-cafe] Hugs, dotnet, C#...

2007-10-08 Thread Neil Mitchell
Hi Peter, There is a Dotnet tree in the Hugs source code files, which I believe is what supports dotnet. As far as I am aware, it probably won't work. A windows developer may be able to build it, but I've never tried. You might also be interested to know that Yhc supports --dotnet to generate a

Re: [Haskell-cafe] Adding GLUT package to WinHugs

2007-10-10 Thread Neil Mitchell
Hi Peter, Also typing runhugs Setup.hs configure fails with runhugs: Error occurred ERROR c:\program files\winhugs\packages\base\Text\ParserCombinators\ReadP.hs:156 - Syntax error in type expression (unexpected `.') This is because Cabal gets it wrong. You need to type runhugs -98 Setup

Re: [Haskell-cafe] Adding GLUT package to WinHugs

2007-10-11 Thread Neil Mitchell
Hi The file you have requested (http://www.cs.york.ac.uk/fp/cpphs-1.5-win32.zip) could not be found on this server. The slightly older version works: http://www.cs.york.ac.uk/fp/cpphs-1.2-win32.zip I'm unable to get SSH from this machine, so can't tell where that file has gone to. Malcolm

[Haskell-cafe] Re: [Haskell] Abstract syntax representation

2007-10-11 Thread Neil Mitchell
Hi In future questions like this are usually best directed to haskell-cafe, with haskell being left for annoucements. The standard full haskell representation is in Template Haskell (http://haskell.org/ghc/docs/latest/html/libraries/template-haskell/Language-Haskell-TH.html). If you want to work

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Neil Mitchell
Hi Then, I set out to learn Monads + Category Theory from a Math perspective. This is where you went wrong. I know none of this stuff and am perfectly happy with IO in Haskell. Read http://www.haskell.org/haskellwiki/Monads_as_Containers and then read lots of other Monad tutorials for Haskell.

Re: [Haskell-cafe] Re: On the verge of ... giving up!

2007-10-14 Thread Neil Mitchell
Hi main n = print . sum . map read . take n . reverse . lines = getContents Could someone describe succinctly how to compute the space complexity of this program, if there are m lines of input and m n? Many thanks. --PR The space complexity is the size of the file - i.e. of size m. reverse

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Neil Mitchell
Hi (/ 10) means the function that divides its argument by 10 (- 10) however is just the number -10, even if I put a space between the - and 10. How can I create a function that subtracts 10 from its argument in a clean way then? subtract is the way to go. (`subtract` 10) I think you

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Neil Mitchell
Hi I think you should have to write negative numbers using the syntax 0-10, since currently having one single unary operator is ugly. I think writing 0-10 is ugly. Ugly - yes. But very clear as to its meaning. How often do people actually write negative numeric literals? My guess is that

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Neil Mitchell
Hi I agree. = 1.0 isn't viable in the long term. Rather, a specific list, or bounded range of tested versions seems likely to be more robust. In general, if it compiles and type checks, it will work. It is rare that an interface stays sufficiently similar that the thing compiles, but then

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-17 Thread Neil Mitchell
Hi In general, if it compiles and type checks, it will work. It is rare that an interface stays sufficiently similar that the thing compiles, but then crashes at runtime. Given that, shouldn't the tested versions be something a machine figures out - rather than something each library

Re: [Haskell-cafe] wordsBy in the base libraries?

2007-10-22 Thread Neil Mitchell
Hi We certainly need a function to split a list into sections. Whether it be wordsBy, or something like linesBy, or some new split variant. wordsBy :: (a - Bool) - [a] - [[a]] wordsBy p s = case dropWhile p s of [] - [] s':rest - (s':w) : wordsBy p s'' where (w, s'')

Re: [Haskell-cafe] XML parser recommendation?

2007-10-22 Thread Neil Mitchell
Hi Ketil, I'm struggling to get my HXT-based parser to parse a largish file (300MB), even after breaking into reasonably-sized chunks. The culprit appears to be parsing one element comprising 25K lines of text, which apparently requires more memory than the 2Gb my computer is equipped with.

Re: [Haskell-cafe] wordsBy in the base libraries?

2007-10-22 Thread Neil Mitchell
Hi You are still over by one test. Try instead: wordsBy :: (a - Bool) - [a] - [[a]] wordsBy p s = case dropWhile p s of [] - [] s':rest - (s':w) : wordsBy p (drop 1 s'') where (w, s'') = break p rest This still has the redundant empty list tests, Perhaps.

Re: [Haskell-cafe] wordsBy in the base libraries?

2007-10-22 Thread Neil Mitchell
Hi If you want to guarantee that level of optimization, you probably have to inline everything by hand and not use any library functions at all. I wonder how much of that is already done by the compiler, though. A reasonable level of optimisation for this function would be that the

Re: [Haskell-cafe] string literals and haskell'

2007-10-22 Thread Neil Mitchell
Hi I can see problems with this. This comes up when typing windows file path's: C:\path to my\directory\boo If this now reports no errors, who wants to guess which come up as escape codes, and which don't. The way other languages like C# have dealt with this is by introducing a new type of

Re: [Haskell-cafe] OS Abstraction module??

2007-10-22 Thread Neil Mitchell
Hi Bill, In the Haskell libraries, is there an OS abstraction module, that would hide the POSIX API and Win-32 API? If not, this would be nice so that Haskell programs could be written in an OS independent manner! Yes, Haskell provides a fairly complete API in the base libraries, which

Re: [Haskell-cafe] OS Abstraction module??

2007-10-22 Thread Neil Mitchell
module to manipulate filepaths, if you are doing that to any great extent. If you say what you are tying to do, and why you suspect it might not just work in a cross platform manner, people might be able to address your specific concerns. Thanks Neil On 10/22/07, Neil Mitchell [EMAIL PROTECTED

Re: [Haskell-cafe] OS Abstraction module??

2007-10-22 Thread Neil Mitchell
Hi Bill I am really talking about a module or perhaps a Haskell class that provides notion for multiple threads of execution, semaphores, .. that hides POSIX vs Win32 APIs .. i.e. the underlying OS APIs would be totally hidden. I think you are thinking in a C way. In Haskell, portable is

Re: [Haskell-cafe] OS Abstraction module??

2007-10-22 Thread Neil Mitchell
Hi Bill, I am really talking about a module or perhaps a Haskell class that provides notion for multiple threads of execution, semaphores, .. that hides POSIX vs Win32 APIs .. i.e. the underlying OS APIs would be totally hidden. I think you are thinking in a C way. In

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-24 Thread Neil Mitchell
Hi Are there binary constants in Haskell, as we have, for instance, 0o232 for octal and 0xD29A for hexadecimal? No, though it is an interesting idea. You can get pretty close with existing Haskell though: (bin 100010011) where bin :: Integer - Integer, and is left as an exercise for

Re: [Haskell-cafe] Re: Why can't Haskell be faster?

2007-10-31 Thread Neil Mitchell
Hi I've been working on optimising Haskell for a little while (http://www-users.cs.york.ac.uk/~ndm/supero/), so here are my thoughts on this. The Clean and Haskell languages both reduce to pretty much the same Core language, with pretty much the same type system, once you get down to it - so I

Re: [Haskell-cafe] Re: Why can't Haskell be faster?

2007-10-31 Thread Neil Mitchell
Hi So in a few years time when GHC has matured we can expect performance to be on par with current Clean? So Clean is a good approximation to peak performance? No. The performance of many real world programs could be twice as fast at least, I'm relatively sure. Clean is a good short term

Re: [Haskell-cafe] Re: Why can't Haskell be faster?

2007-10-31 Thread Neil Mitchell
Hi I don't think the register allocater is being rewritten so much as it is being written: From talking to Ben, who rewrote the register allocator over the summer, he said that the new graph based register allocator is pretty good. The thing that is holding it back is the CPS conversion bit,

Re: Re[2]: [Haskell-cafe] Re: torrent for 6.8.1?

2007-11-04 Thread Neil Mitchell
Hi The binaries are ~47MiB apiece. I suspect that almost everyone on Windows and Linux x86 will want the binaries too, since compiling GHC tends to take a while. Anyway, it seems like haskell.org is becoming more responsive now, but it would be something to keep in mind for the future.

Re: [Haskell-cafe] hoogle broken?

2007-11-07 Thread Neil Mitchell
Hi Mike, It looks as if hoogle isn't working. I get 404s whenever I try to do any search on hoogle. Hoogle works for performing searches, but the documentation links are incorrect. Expect this fixed by this evening! Thanks Neil ___ Haskell-Cafe

Re: [Haskell-cafe] hoogle broken?

2007-11-07 Thread Neil Mitchell
Hi Mike, It looks as if hoogle isn't working. I get 404s whenever I try to do any search on hoogle. I have fixed quite a lot of the links, some will still be broken, but hopefully not too many. Really, hoogle needs upgrading to use the new base library etc - I'll try and do that sometime

Re: [Haskell-cafe] Building Haskell stuff on Windows

2007-11-07 Thread Neil Mitchell
Hi Arthur, The correct steps to take are: 1) install GHC from the windows installer - trivial 2) install Gtk2hs from the windows installer Unfortunately Gtk2hs hasn't been updated to work with GHC 6.8.1, so step 2 will fail. The person who is going to do this is Duncan. He usually breaks down

Re: [Haskell-cafe] Disable echo in POSIX terminal

2007-11-09 Thread Neil Mitchell
Hi I've written a little Haskell program to get information from a MySQL database (great thanks to anybody reading this who works on HSQL, by the way) but I want to keep the user's password concealed, obviously. Currently I prompt for it from the terminal, but the problem is that it's echoed

Re: [Haskell-cafe] MD5?

2007-11-09 Thread Neil Mitchell
Hi The final alternative is that I just call MD5SUM.EXE from my Haskell program and try to parse the output. But that strikes me as rather messy. Messy, but I don't see any disadvantage to doing it this way - if you can control that the MD5SUM program is installed alongside your code. Of

Re: [Haskell-cafe] MD5?

2007-11-09 Thread Neil Mitchell
Hi The MD5SUM.EXE file I have chokes if you ask it to hash a file in another directory. It will hash from stdin, or from a file in the current directory, but point-blank refuses to hash anything else. Try http://www.cs.york.ac.uk/fp/yhc/dependencies/UnxUtils.zip - that has an MD5SUM program

Re: [Haskell-cafe] please help... small problem

2007-11-09 Thread Neil Mitchell
Hi Is there anyway to cut down this code and to not use auxillary functons, but instead use pattern matching? You haven't attached any code, but even if you had, I don't think it would have worked. [hi ryan 1,hi jeff 2] becomes [[hi,ryan 1], [hi,jeff, 2]]. In Haskell lists are collections

Re: [Haskell-cafe] Somewhat random history question - chicken and egg

2007-11-11 Thread Neil Mitchell
Hi ...if GHC is written in Haskell, how the heck did they compile GHC in the first place? GHC was not the first Haskell compiler, hbc was the main compiler at some point, so I suspect they used hbc. There was also lazy ML which I suspect was used to bootstrap hbc - but I'm not sure of the

  1   2   3   4   5   6   7   8   9   10   >