Re: [Haskell-cafe] breaking too long lines

2009-04-25 Thread Claus Reinke
* with practically every modern IDE (say, Eclipse for Java), indentation is a non-issue. How so? In future IDEs, source code might just be a view on an internal representation, but we've have that kind of IDE in the past, and some users developed a definite dislike to tools that wouldn't let

Re: [Haskell-cafe] Overriding a Prelude function?

2009-04-24 Thread Claus Reinke
As far as referential transparency is concerned, you'd need to keep your reference levels straight, which can seem confusing if you can only communicate via representations(*:-) That came out more confusing than it needs to be, so let me try that again, from scratch: Reduction systems take

Re: [Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) --first release

2009-04-23 Thread Claus Reinke
Let's turn this around. You invest 4 months of your life coming out with your own experimental Haskell compiler designed to easily test new language features. Then a bunch of ungrateful wretches on Haskell Cafe demand that you stop distributing your compiler until you have full support for

Re: [Haskell-cafe] Overriding a Prelude function?

2009-04-23 Thread Claus Reinke
*Main :t rollDie ~ (rollDie ~ rollDie) rollDie ~ (rollDie ~ rollDie) :: Seed - (Int, Seed) This is a function. How exactly do you want ghci to show it? When you figure that out, feel free to make an instance of Show for it. Just because user programs can't show function internals (they can

Re: [Haskell-cafe] Overriding a Prelude function?

2009-04-23 Thread Claus Reinke
Well, than, what would you expect from this: let {f x = g x; g 0 = 0; g n = f (n-1)} in show f Well, not show, because any show instance for functions breaks r.t. But the interactive interpreter, if it is not subject to r.t., might show: let { f x = g x; g 0 = 0; g n = f

Re: [Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) --first release

2009-04-22 Thread Claus Reinke
Installing executable(s) in /home/david/.cabal/bin why the hell would cabal install binaries in a subdirectory of a hidden directory. Why not /home/david/bin or /home/david/local/bin ? Yes, this is clearly suboptimal but getting agreement on where to put it has not proved easy. There are users

Re: [Haskell-cafe] Non-atomic atoms for type-level programming

2009-04-22 Thread Claus Reinke
thanks for your elaborations. I'm still not convinced that a common name (e.g. TT :. Tr :. Tu :. Te) is a better interface than a common import (e.g. TypeLevel.Bool.True). In both cases, the authors of all modules have to actively collaborate, either to define common names, or to define common

Re: [Haskell-cafe] Non-atomic atoms for type-level programming

2009-04-22 Thread Claus Reinke
in case anyone stumbles over my ad-hoc notations, that should have been: module A[type label] where x = undefined :: label module B[type label] where x = undefined :: label module C[type label] where import A[label] import B[label] ok = [A.x,B.x] assuming that: - 'module X[types]' means a

Re: [Haskell-cafe] UPDATE: haskellmode for Vim now at projects.haskell.org (+screencast; -)

2009-04-21 Thread Claus Reinke
). Claus On Tue, Apr 7, 2009 at 10:23 AM, Claus Reinke claus.rei...@talk21.com wrote: I have become aware that many Haskellers are not aware of the Haskell mode plugins for Vim, in spite of the 100 downloads per month I saw when I last checked. Since the plugins have just completed their move

Re: [Haskell-cafe] UPDATE: haskellmode for Vim now at projects.haskell.org (+screencast; -)

2009-04-21 Thread Claus Reinke
|Yes, I found that one myself. My old ftplugin/haskell.vim used to |have autoindent set, but importing your haskell mode overwrote that |(slightly irritating behaviour if you ask me ;-). Putting my old |config into ftplugin/haskell_mine.vim restored the behaviour. Yes, one cannot have two

Re: [Haskell-cafe] ANNOUNCE: Utrecht Haskell Compiler (UHC) --first release

2009-04-19 Thread Claus Reinke
|data Test = Test { foo :: Int, bar :: Char, baz :: Bool } |smallPrint t = concatMap (\f - show $ f t) [foo, bar, baz] |In this code the list [foo, bar, baz] should have the type [exists a. Show a = Test - a]. {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ExistentialQuantification #-} data EShow =

Re: [Haskell-cafe] Strange type error with associated type synonyms

2009-04-16 Thread Claus Reinke
| But the core part of my suggestion (which this example was meant | to help explain) remains attractive, at least to me: somewhere during | type inference, GHC *does* unify the *apparently free* 'd' with an | internal type variable (lets call it 'd1, as in the type error message) You are

Re: [Haskell-cafe] Non-atomic atoms for type-level programming

2009-04-15 Thread Claus Reinke
- if type-level tags (such as 'data TTrue'/'data TFalse') are declared repeatedly in separate modules, they represent separate types, preventing shared use (your type-level predicate doesn't return my version of 'TTrue'/'TFalse') How is the need for a common import for 'data TTrue;

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-15 Thread Claus Reinke
but the fact that the breakout example works is an indication that at least it's not hopelessly broken. Well, a breakout game does *not* work (yet) in most other FRP implementations except Yampa, which do have firm theoretical foundations :-) While certainly more entertaining, the problem

[Haskell-cafe] Non-atomic atoms for type-level programming

2009-04-14 Thread Claus Reinke
The recent GHC trac ticket revision reminded me of the old open type-sharing problem with type tags and record labels: - if type-level tags (such as 'data TTrue'/'data TFalse') are declared repeatedly in separate modules, they represent separate types, preventing shared use (your

Re: [Haskell-cafe] Strange type error with associated type synonyms

2009-04-09 Thread Claus Reinke
|Oh now i see what you mean: consider |f' = abst . (id :: (d-a)-(d-a)) . appl |which GHC understands to mean |f' = abst . (id :: forall d a. (d-a)-(d-a)) . appl | |GHC infers the type |f' :: (Fun d) = Memo d a - Memo d a |Now you are saying that GHC *could* have figured

Re: [Haskell-cafe] automatically inserting type declarations

2009-04-07 Thread Claus Reinke
I remember hearing about a Haskell mode for Vim, Emacs, Yi or VisualHaskell that inserts type declarations automatically (it's lazier to just check the type than to write it manually), but I can't remember any details. What editor mode / IDE was it? As far as I know, my haskellmode plugins for

[Haskell-cafe] UPDATE: haskellmode for Vim now at projects.haskell.org (+screencast; -)

2009-04-07 Thread Claus Reinke
I have become aware that many Haskellers are not aware of the Haskell mode plugins for Vim, in spite of the 100 downloads per month I saw when I last checked. Since the plugins have just completed their move to their new home at http://projects.haskell.org/haskellmode-vim/ this seems to be a

Re: [Haskell-cafe] UPDATE: haskellmode for Vim now atprojects.haskell.org (+screencast; -)

2009-04-07 Thread Claus Reinke
http://projects.haskell.org/haskellmode-vim/ The download link on this page seems to use \ instead of /, making it not work. For anyone eager to download it, just replace \ (or %5C) in your address bar with \ and it should work. argh, thanks, now fixed (filename completion in Vim, :help

Re: [Haskell-cafe] UPDATE: haskellmode for Vim now atprojects.haskell.org (+screencast; -)

2009-04-07 Thread Claus Reinke
Hi Matthijs, I've installed the vimball, and it spit a few errors at me. In particular, it couldn't find the haddock documentation directory. A quick look at haskell_doc.vim shows that it should autodetect the directory. However, for some reason my ghc-pkg command returns the doc directory

Re: [Haskell-cafe] Strange type error with associated type synonyms

2009-04-07 Thread Claus Reinke
Basically, type checking proceeds in one of two modes: inferring or checking. The former is when there is no signature is given; the latter, if there is a user-supplied signature. GHC can infer ambiguous signatures, but it cannot check them. This is of course very confusing and we need

Re: [Haskell-cafe] UPDATE: haskellmode for Vim now atprojects.haskell.org (+screencast; -)

2009-04-07 Thread Claus Reinke
Matthijs, thanks for the reports, and analyses and suggested patches are even better! We should probably take this offlist at some point, though. I've found two more little bugs. The first is that version comparison is incorrect. It now requires that all components are greater, so comparing

Re: [Haskell-cafe] Strange type error with associated type synonyms

2009-04-07 Thread Claus Reinke
| Here is a variation to make this point clearer: | | {-# LANGUAGE NoMonomorphismRestriction #-} | {-# LANGUAGE TypeFamilies, ScopedTypeVariables #-} | | class Fun d where | type Memo d :: * - * | abst :: (d - a) - Memo d a | appl :: Memo d a - (d - a) | | f = abst . appl | | -- f' ::

Re: [Haskell-cafe] high probability of installation problems andquality of the glorious implementation

2009-04-06 Thread Claus Reinke
I want the Zen package: Make me one with everything. But would you find that on hackage?-) If an author had contemplated the perfect package, they wouldn't have put it on hackage, they wouldn't have a hackage account, they wouldn't have written the package, they might not even exist - you

Re: [Haskell-cafe] Making videos of your project

2009-04-06 Thread Claus Reinke
Btw, there seem to be many Haskells on YouTube - should we have some way of marking clips related to our Haskell? I've used haskell.org as a tag, but noone else has, yet - also, perhaps there should be a Haskell channel or something? And just in case there are others on the same Windows

[Haskell-cafe] community.haskell.org unreachable?

2009-04-06 Thread Claus Reinke
I seem to be having problems reaching anything on that server. Does anyone know what is going on, or who to contact? It would help if the haskellwiki page http://www.haskell.org/haskellwiki/Haskell.org_domain would mention the admin address directly, instead of referring to

Re: [Haskell-cafe] community.haskell.org unreachable?

2009-04-06 Thread Claus Reinke
of the connection. If I read the bandwith graph correctly, there was a peak followed by several hours of silence, matched by odd memory usage (though I don't see what the load average is trying to tell us?): http://community.haskell.org/mrtg/daily.html Claus On Mon, Apr 6, 2009 at 1:32 PM, Claus Reinke

Re: [Haskell-cafe] about Haskell code written to be too smart

2009-04-04 Thread Claus Reinke
takeListSt' = evalState . foldr k (return []) . map (State . splitAt) where k m m'= cutNull $ do x-m; xs-m'; return (x:xs) cutNull m = do s-get; if null s then return [] else m |Not only is ths not that elegant anymore, As I was saying, sequence/mapM with early cutout is

Re: [Haskell-cafe] Problem with prepose.lhs and ghc6.10.1

2009-04-03 Thread Claus Reinke
Hugs did not support lexically scoped type variables then (and probably doesn't support now). I may be misremembering, but I think Hugs had them first;-) http://cvs.haskell.org/Hugs/pages/hugsman/exts.html#sect7.3.3 It is just that Hugs and GHC interpret the language extension differently

Re: [Haskell-cafe] Wishful thinking: a text editor that expands function applications into function definitions

2009-04-03 Thread Claus Reinke
One word says more than a thousand pictures: Vim http://www.vim.org/. (well, okay, I'm sure Emacs will do just as well, and some of the more recent IDEs seem to be catching up;-) plus plugins, of course!-) - unfolding definitions: if you really want that, it is in the domain of program

Re: [Haskell-cafe] Issue with IsFunction/Vspace in GHC 6.10.1

2009-04-02 Thread Claus Reinke
{-# LANGUAGE ScopedTypeVariables #-} without, the 'f's in the instance are independent. Claus - Original Message - From: Jacques Carette care...@mcmaster.ca To: haskell-cafe@haskell.org Sent: Thursday, April 02, 2009 10:15 PM Subject: [Haskell-cafe] Issue with IsFunction/Vspace in GHC

Re: [Haskell-cafe] Is there a way to see the equation reduction?

2009-04-01 Thread Claus Reinke
But I am more interested in seeing the expansion and reduction that the execution encounters as it lazily evaluates the function. Have you tried GHood? examples: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/ package:

Re: [Haskell-cafe] Looking for practical examples of Zippers

2009-04-01 Thread Claus Reinke
my quest for data structures continues. Lately I came across Zippers. Can anybody point be to some useful examples? Once upon a time, there was a hardware implementation of a lambda calculus based functional language (mostly, I was told, to show that it could be done:-). The program

Re: [Haskell-cafe] Re: ANNOUNCE: vacuum-cairo: a cairo frontend tovacuum for live Haskell data visualization

2009-04-01 Thread Claus Reinke
Did you use hubigraph? http://ooxo.org/hubigraph/ Ah, there it is, then. Btw, more interesting than the 3d nature of the visualizations is that Ubigraph seems to have been designed for incremental updates of the layout (see the paper available via their home site). The lack of support for

Re: [Haskell-cafe] Reverting to any old version using Darcs

2009-04-01 Thread Claus Reinke
Perhaps the rumours refer to non-tagged versions? In conventional non-distributed version control systems, one might go back to the version on a specific date, while with darcs, that only makes sense wrt a specific repo (I think?). So you can unpull all patches after a date from your local

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-31 Thread Claus Reinke
appendU is strict, insertWith just doesn't force it (follow the source link in the haddocks to see why). Ok, I see. But, IMHO, this should be clearly documented. There seems to be some agreement that strict variant operations should also be provided, but it needs some more thinking, and

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-31 Thread Claus Reinke
Can I close this ticket as not being to do with uvector? -- Don You did notice the suggestion that performance of uvector and bytestring could be improved drastically if compile-time fusion would be augmented with runtime fusion? Claus

Re: [Haskell-cafe] Making videos of your project

2009-03-31 Thread Claus Reinke
Is there anyone here with experience in screencasting of text-based applications, who could offer advice on how to produce screencasts on windows/xp? The basic screencasting (capture+annotation/editing) is not the problem, eg, CamStudio seems ok, and Wink gives me more control for mostly

Re: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Claus Reinke
| When I looked at it a year ago or so, it was a return of one | constructor in a sum. | Looking at core, you can see several places where a function is called | and that function always returns the same constructor, so the case | analysis of the return value is not needed; it should be returned

Re: [Haskell-cafe] Re: A guess on stack-overflows - thunks build-up andtail recursion

2009-03-30 Thread Claus Reinke
I wonder if I could write some sort of chunked fold which basically still produces the same amount of thunks but in a way so that the do not go on the stack all at once for reduction and thus do not cause a stack overflow. Kind of a tree. Not without re-associating the applications of the

Re: [Haskell-cafe] type-level programming support library

2009-03-30 Thread Claus Reinke
I suppose having a good description of what I'd like to do might help: I'd like to be able to make an N-Tuple an instance of a type class. class Foo a where instance Foo (,) where instance Foo (,,) where The different kindedness of (,) and (,,) prevent this from working. Not that this

Re: [Haskell-cafe] Template Haskell messes up scoping?

2009-03-29 Thread Claus Reinke
It looks like the scope is interrupted just above $( ... ) - but I'd like to know why and find a more beautiful way than just moving all th calls to the bottom of the module file :) Top-level splices can introduce bindings. IIRC, the current TH implementation uses a simple sequencing approach,

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-29 Thread Claus Reinke
IntMap (UArr (Word16 :*: Word8)) I was adding elements to the map using something like: v = map singletonU (a :*: b) insertWith appendU k v m However doing this eats a *lot* of memory. Since 'insertWith' doesn't actually do the 'appendU', the appends will also be compressed in

Re: [Haskell-cafe] uvector package appendU: memory leak?

2009-03-29 Thread Claus Reinke
But Claus was right, appendU is lazy; this seems to be the cause of the problem. appendU is strict, insertWith just doesn't force it (follow the source link in the haddocks to see why). However now I don't really understand why the two implementations differs in lazyness. Or, to ask a

Re: [Haskell-cafe] about Haskell code written to be too smart

2009-03-27 Thread Claus Reinke
Continuing our adventures into stylistic and semantic differences:-) Can you write this analysis on the wiki? Hmm, we tried that in the past, and I haven't seen any indication that people search for those things, let alone find them (one particular example I recalled I still haven't been able

Re: [Haskell-cafe] about Haskell code written to be too smart

2009-03-26 Thread Claus Reinke
Continuing our adventures into stylistic and semantic differences:-) Comparing the 'State' and explicit recursion versions takeListSt = evalState . mapM (State . splitAt) -- ..with a derivation leading to.. takeListSt []s = [] takeListSt (h:t) s = x : takeListSt t s'

Re: [Haskell-cafe] Re: Exception handling in numeric computations

2009-03-26 Thread Claus Reinke
safeDiv :: (Exception e, Integral a) = a - a - Either e a safeDiv x y = unsafePerformIO . try . evaluate $ div x y I just want to know, from a theoretical point of view, whether this 'safeDiv' in above definition is the same as safeDiv' :: (Exception e, Integral a) = a

Re: [Haskell-cafe] about Haskell code written to be too smart

2009-03-25 Thread Claus Reinke
The beauty of functional programming is that there doesn't have to be a conflict between those who prefer explicit and those who prefer implicit recursion. Think of them as different views on the same functions - just as with graphical visualizations, pick the view best suited to your purpose

Re: [Haskell-cafe] Making videos of your project

2009-03-24 Thread Claus Reinke
Perhaps the make a video slogan doesn't quite explain what is intended - it didn't to me!-) Reading John Udell's short article What is Screencasting? http://www.oreillynet.com/pub/a/oreilly/digitalmedia/2005/11/16/what-is-screencasting.html?page=1 gave me a better idea: the screen video part is

Re: [Haskell-cafe] Re: A guess on stack-overflows - thunksbuild-upandtail recursion

2009-03-22 Thread Claus Reinke
, interactive, profiling views instead of the somewhat awkward PostScript generation of static views. Regards, Duane Johnson On Mar 20, 2009, at 5:36 PM, Claus Reinke wrote: It would be great to have a video of this in action up on youtube. You can simply 'recordmydesktop' on linux (and likely elsewhere

Re: [Haskell-cafe] about beta NF in lambda calculus

2009-03-22 Thread Claus Reinke
If above is true, I am confused why we have to distinguish the terms which have NF and be in NF? isn't the terms have NF will eventually become in NF? or there are some way to avoid them becoming in NF? Another way to think about it: what about terms which have no NF? And given both kinds of

Re: [Haskell-cafe] Re: A guess on stack-overflows - thunks build-upand tail recursion

2009-03-20 Thread Claus Reinke
The problem occurs when the result value is needed and thus the thunks need to be reduced, starting with the outermost, which can't be reduced without reducing the next one etc and it's these reduction steps that are pushed on the stack until its size cause a stack-overflow. Yes,

Re: [Haskell-cafe] Re: A guess on stack-overflows - thunksbuild-upand tail recursion

2009-03-20 Thread Claus Reinke
It would be great to have a video of this in action up on youtube. You can simply 'recordmydesktop' on linux (and likely elsewhere), then upload the result. I'm curious: how would a non-interactive animation running in Flash in a browser be better than an interactive animation running in Java

Re: [Haskell-cafe] What unsafeInterleaveIO is unsafe

2009-03-19 Thread Claus Reinke
/people/simonpj/papers/imprecise-exn.htm [3] Functions, Frames, and Interactions, Claus Reinke (chapter 3) http://www.cs.kent.ac.uk/~cr3/publications/phd.html [4] Olivier Danvy et al, miscellaneous reports http://www.brics.dk/~danvy/ [5] The Origins of Structural Operational Semantics

[Haskell-cafe] Re: Go Haskell!

2009-03-18 Thread Claus Reinke
of this and upload it to hackage, I'd be delighted. Hack away. A GTP interface would be useful, to allow playing against other bots. Cheers, Simon Simon Marlow wrote: Claus Reinke wrote: Do you have an example of a mutable state/ IO bound application, like, hmm, a window manager or a revision

Re: [Haskell-cafe] What unsafeInterleaveIO is unsafe

2009-03-17 Thread Claus Reinke
So that first step already relies on IO (where the two are equivalent). Come again? The first step in your implication chain was (without the return) throw (ErrorCall urk!) = 1 == evaluate (throw (ErrorCall urk!)) = evaluate 1 but, using evaluation only (no context-sensitive IO), we

Re: [Haskell-cafe] What unsafeInterleaveIO is unsafe

2009-03-16 Thread Claus Reinke
exception handling which allows to catch programming errors. And which I have a sneaking suspicion actually *is* `unsafe'. Or, at least, incapable of being given a compositional, continuous semantics. A semantics for imprecise exceptions

Re: [Haskell-cafe] What unsafeInterleaveIO is unsafe

2009-03-15 Thread Claus Reinke
main = do r - newIORef 0 v - unsafeInterleaveIO $ do writeIORef r 1 return 1 x - case f v of 0 - return 0 n - return (n - 1) y - readIORef r print y -- a couple of examples: f x = 0 -- program prints 0 -- f x = x -- program prints 1 f is

Re: [Haskell-cafe] How to catch error in array index when debugging

2009-03-14 Thread Claus Reinke
I'm getting a runtime failure Error in array index. This causes ghci to exit. Is there a way to get it to break instead, so I can find out which function is failing? i recall two techniques - one is trivially define your own (!) and print index at least. another is to use ghc profiling with

Re: [Haskell-cafe] How to catch error in array index when debugging

2009-03-14 Thread Claus Reinke
Claus None of which is satisfactory. You might also want to add Claus yourself to this ticket: Clausindex out of range error message regression Claus http://hackage.haskell.org/trac/ghc/ticket/2669 How do I do that? Ghc Trac's idea of voting is by adding yourself to the cc, so

Re: [Haskell-cafe] Re: Sugestion for a Haskell mascot

2009-03-12 Thread Claus Reinke
I agree that looking for a mascot that is inspired by laziness is a bad idea from a P.R. perspective (I am tired of people walking out the room when I give Haskell talks to general audiences and explain lazy evaluation). Do they walk out when you mention it or when you explain it?-) Lazy

Re: [Haskell-cafe] bytestring vs. uvector

2009-03-08 Thread Claus Reinke
uvector is, if my memory serves me correctly, a fork of the vector library. It uses modern stream fusion, but is under active development and is a little scary. I'm a little unclear on the exact difference between uvector and vector. Both use arrays that are not pinned, so they can't be readily

Re: [Haskell-cafe] Looking for literature

2009-03-08 Thread Claus Reinke
I'm trying to catch up with all the wonderful Haskell Types, classes, Abstract Data Types, Algebraic Data Types, Types that give peoples headaches and all the other, deeper stuff I have been happily putting off. Hmm, do we need more pragmas?-) {-# LANGUAGE TypesThatGivePeopleHeadaches #-} {-#

Re: [Haskell-cafe] ANNOUNCE: Extensible and Modular Generics for theMasses: emgm-0.3

2009-03-03 Thread Claus Reinke
Due to a problem with the template-haskell package and Cabal, you cannot cabal-install the emgm package with GHC 6.8. However, take heart! EMGM works very well with GHC 6.8. You merely have to download the tar.gz package from Hackage yourself, build it, and install it. I thought I had seen you

Re: [Haskell-cafe] possible memory leak in uvector 0.1.0.3

2009-03-03 Thread Claus Reinke
At first guess it sounds like you're holding onto too much, if not the whole stream perhaps bits within each chunk. It is possible. I split the string in lines, then map some functions on each line to parse the data, and finally calling toU, for converting to an UArr. Just to make sure

Re: [Haskell-cafe] possible memory leak in uvector 0.1.0.3

2009-03-03 Thread Claus Reinke
I split the string in lines, then map some functions on each line to parse the data, and finally calling toU, for converting to an UArr. Just to make sure (code fragments or, better, reduced examples would make it easier to see what the discussion is about): are you forcing the UArr to be

Re: [Haskell-cafe] possible memory leak in uvector 0.1.0.3

2009-03-03 Thread Claus Reinke
That helps to make things clearer, I think. One issue is the nature of Maps (strict in keys, non-strict in values). - neither singleton nor unionWith are strict in the Map values, so nothing here forces the evaluation of rate or constructionof UArr But, as I have written, in one of my

Re: Re[2]: Pickling a finite map (Binary + zlib) [was: [Haskell-cafe]Data.Binary poor read performance]

2009-02-24 Thread Claus Reinke
btw, i always thought that it should be a way to overcome any export lists and go directly to module internals. limiting export is the way to protect programmer from errors, not security feature, and it should be left to programmer to decide when he don't need it. compilers should just be able to

Re: [Haskell-cafe] Hoogle and Network.Socket

2009-02-22 Thread Claus Reinke
sitting in a pub with some beer having a platform war). Martijn's thoughts of +windows, +unix, +os is exactly right, I'm happy to let users say oh, please show me these packages, but there are trade-offs in Hoogle design. If someone has some clear viewpoint on the answers, I'd love to hear them.

Re: Re[2]: [Haskell-cafe] Re: speed: ghc vs gcc

2009-02-20 Thread Claus Reinke
Concrete examples always help, thanks. Turning this into a ticket with associated test will: - enable others to find and repeat the test when this thread is long gone, to see whether any other ghc changes have helped in any way - enable documentation of what exactly the issue is (why is it

Re: [Haskell-cafe] Hoogle and Network.Socket

2009-02-20 Thread Claus Reinke
1) Show all the functions (when the number is low), but place platform specific functions under separate headers: Windows, Linux/BSD/POSIX, OS X, etc. If a function isn't available on all OS's then all Hoogle would be encouraging you to do is break compatibility and stop me from using your

Re: Re[4]: [Haskell-cafe] Re: speed: ghc vs gcc

2009-02-20 Thread Claus Reinke
Turning this into a ticket with associated test will: but why you think that this is untypical and needs a ticket? ;) Because generally ghc is doing a good-enough job. And it is doing that because long ago, ghc hq's war cry was if ghc generates code that is slower than any other haskell

Re: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-12 Thread Claus Reinke
Check out what GHC is doing these days, and come back with an analysis of what still needs to be improved. We can't wait to hear! can you point me to any haskell code that is as fast as it's C equivalent? You should do your own benchmarking! Please, folks! This is hardly helpful. It isn't

Re: [Haskell-cafe] Re: Why binding to existing widget toolkitsdoesn't make any sense

2009-02-01 Thread Claus Reinke
A common standard would be useful, but OpenVG doesn't look like ready soon. On the declarative side, there's also SVG.. Seems I've got to qualify that remark somewhat - apart from some commercial/closed-source implementations, there is also a open source ANSI C one (implemented on top of

Re: [Haskell-cafe] Re: Why binding to existing widget toolkits doesn't make any sense

2009-01-31 Thread Claus Reinke
When I said Cairo felt rather slow, I was comparing it again fully hardware accelerated solutions. .. IMO the future is fully hardware accelerated rendering on the GPU, like OpenVG. It will take a while before it is common to see glyphs being rendered on the GPU, but I'm sure this is all doable.

Re: [Haskell-cafe] Re: Why binding to existing widget toolkits doesn't make any sense

2009-01-31 Thread Claus Reinke
I should have mentioned that my tests have been done only on Windows and OSX. I guess I would have to try on a system that supports XRender to compare. Unfortunately, the target audience of our application are mostly windows and OSX users, so although it would be great that Cairo performs fast

Re: [Haskell-cafe] Re: Laws and partial values

2009-01-25 Thread Claus Reinke
Yes. If you've got a set of terminating computations, and it has multiple distinct elements, it generally doesn't *have* a least element. The P in CPO stands for Partial. and this concern does not apply to () . Btw, what would a non-lifted () be used for? If the least element _|_ is known

library documentation comments and contributions (was [Haskell-cafe] Comments from OCaml Hacker Brian Hurt)

2009-01-16 Thread Claus Reinke
2) the Haskell docs _don't_ do good enough a job at giving intuition for what math terms mean If we fix #2, then #1 is no longer a problem, yes? For you folks who work on GHC, is it acceptable to open tickets for poor documentation of modules in base? I think leaving the documentation to the

Re: Names in Haskell (Was: [Haskell-cafe] Comments from OCamlHacker Brian Hurt)

2009-01-15 Thread Claus Reinke
What I don't understand is why Monoid and Monad are objectionable, while Hash, Vector, Boolean, and Integer are (presumably) not objectionable. They all appear equally technical to me. It's simply that other languages' libraries already have those terms in them. So there is nothing new to

Re: [Haskell-cafe] Re: [Haskell] ANN: HLint 1.0

2008-12-27 Thread Claus Reinke
You were asking about getting the output of ':show modules' into a variable 'x', so that you can process it further. ':redir x :show modules' should do just that. There is another example command for implementing ':edit' this way (by now a native ghci command). I think I'm seeing your meaning.

Re: [Haskell-cafe] Re: [Haskell] ANN: HLint 1.0

2008-12-23 Thread Claus Reinke
Well, sort of. Ok, we can parse that. Let's assume a variable x holds the output of :show modules as a String. We call lines on it, then map words on it, do a !! 2 on it, and we get [Util.hs,, Recorder.hs,, Game.hs,, Monadius.hs,, Demo.hs,]. Chuck in a map (filter (\= ',')), and we get a good

Re: [Haskell-cafe] Re: [Haskell] ANN: HLint 1.0

2008-12-22 Thread Claus Reinke
Well, sort of. Ok, we can parse that. Let's assume a variable x holds the output of :show modules as a String. We call lines on it, then map words on it, do a !! 2 on it, and we get [Util.hs,, Recorder.hs,, Game.hs,, Monadius.hs,, Demo.hs,]. Chuck in a map (filter (\= ',')), and we get a good

Re: [Haskell-cafe] Missing comment highlighting in vim syntax script

2008-12-14 Thread Claus Reinke
The Haskell syntax script for vim mentions this mailing list as the maintainer. Perhaps one of you could fix this bug. Comments on the same line as import declarations don't get highlighted: I don't know how this list-as-maintainer idea is going to work, but the fix seems straightforward: find

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Claus Reinke
Let's see what David thinks. If he thinks is possible to fix these kinds of things where haddock is not covering the whole GHC AST (at least to the degree where it can ignore bits it does not understand). If that's not realistic in the short term then we probably should introduce some haddock

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Claus Reinke
I would be happy to work around it if I could, but I can't. As far as I can tell, I can't pass any flags to Haddock via the Cabal file. I would love to tell Hackage to run Haddock like so, cabal haddock --haddock-option=--optghc=-D__HADDOCK__, but I don't know how. Let's suppose that I do

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Claus Reinke
Still, you might find something useful in the discussion for this ticket: Cabal should support Cabal-version-dependent Setup.hs http://hackage.haskell.org/trac/hackage/ticket/326 or, more directly: http://www.haskell.org/pipermail/cabal-devel/2008-August/003576.html so, if you add the

Re: [Haskell-cafe] Re: Dr Dobbs: Time to get good at functionalprogramming

2008-12-08 Thread Claus Reinke
For this purpose, the only thing better is if we could somehow get them to mention Microsoft everywhere they mention Haskell. Any actual explaining would just get in the way :) Doesn't quite work without explaining, because one would have to be very careful not to mis-represent financial

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-12-02 Thread Claus Reinke
I finally got round to trying cabal-install with OpenGL/GLUT, using a freshly built ghc head, a cygwin bash, and http://haskell.org/~duncan/cabal/cabal.exe cabal-install version 0.6.0 using version 1.6.0.1 of the Cabal library Yes, building it requires mingw/msys, but with it cabal

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-12-02 Thread Claus Reinke
ghc --make -package OpenGL -package GLUT something.hs I get nothing but undefined references in the linking phase. C:\Program Files\Haskell\GLUT-2.1.1.2\ghc-6.11.20081202/libHSGLUT-2.1.1.2.a(Window.o):fake: (.text+0x15): undefined reference to `glutWarpPointer' Does ghc-pkg describe

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-12-02 Thread Claus Reinke
I believe these errors are caused by the wrong calling convention being used in the Haskell bindings. This part in the configure script tests the build (host) platform: case $host in *-mingw32) CALLCONV=stdcall ;; *) CALLCONV=ccall ;; esac Since it doesn't test for Cygwin, you end up with

Re: [Haskell-cafe] Re: Go Haskell! - array libraries

2008-11-30 Thread Claus Reinke
Should mutable arrays have list-like APIs? All the usual operations, just in-place and destructive where appropriate? I don't know. To be honest, I don't think that the term mutable array describes a single data structure. For instance, one of the central questions which unveils a whole

Re: [Haskell-cafe] Control.Exception Funny

2008-11-29 Thread Claus Reinke
CE.catch :: (CE.Exception e) = IO a - (e - IO a) - IO a foo d = CE.catch (openFile d ReadMode return ()) (\e - hPutStr stderr (Couldn't open ++ d ++: ++ show e)) btw, if your handler cannot return the same type as your action, is this the right place to catch the

Re: [Haskell-cafe] Re: Go Haskell! - array libraries

2008-11-28 Thread Claus Reinke
But I don't want Perl, I want a well designed language and well designed libraries. I think it's find to let libraries proliferate, but at some point you also need to step back and abstract. -- Lennart Especially so if the free marketeers claim there is something fundamentally wrong with the

Re: [Haskell-cafe] Re: Go Haskell! - array libraries

2008-11-28 Thread Claus Reinke
Yes, it is very difficult. A sensible API for a standard array library is something that needs more research. FWIW, I don't know of any other language that has what I'd like to see in Haskell. C++ probably comes closest but they have it easy - they don't do fusion. I assume you've looked

Re: [Haskell-cafe] Re: Go Haskell!

2008-11-27 Thread Claus Reinke
Do you have an example of a mutable state/ IO bound application, like, hmm, a window manager or a revision control system or a file system...? If you're looking for a challenge, how about this one (there used to be lots of Haskellers into this game, any of you still around?-):

Re: [Haskell-cafe] Re: Go Haskell!

2008-11-27 Thread Claus Reinke
http://computer-go.org/pipermail/computer-go/2008-October/016680.html Interestingly, I did this a while ago. Here's my results: $ ./Bench 1 10 b: 14840, w: 17143 mercy: 67982 elapsed time: 3.42s playouts/sec: 29208 so, nearly 30k/sec random playouts on 9x9. That's using a hack that stops

Re: [Haskell-cafe] Re: Go Haskell!

2008-11-27 Thread Claus Reinke
What do those folks working on parallel Haskell arrays think about the sequential Haskell array baseline performance? Try using a fast array library like uvector? (With no serious overhead for tuples too, fwiw)... I downloaded uvector a while ago, but haven't got round to trying it (yet

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Claus Reinke
Luke Palmer wrote: I've been wondering, is it ever possible to have two (extensionally) different Functor instances for the same type? I do mean in Haskell; i.e. (,) doesn't count. I've failed to either come up with any examples or prove that they all must be the same using the laws. For

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Claus Reinke
Are identity and composition sufficient to guarantee that the mapped function is actually applied? eek - f :: a - b, not f :: a - a, so that example doesn't work !! Sorry for the noise, Claus ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] monads with take-out options

2008-11-24 Thread Claus Reinke
- i am interested in a first-principles notion of data. Neither lambda nor π-calculus come with a criterion for determining which terms represent data and which programs. You can shoe-horn in such notions -- and it is clear that practical programming relies on such a separation -- but

<    1   2   3   4   5   6   >