Re: [Haskell-cafe] Installation of GLUT package

2007-09-09 Thread Claus Reinke
Loading package OpenGL-2.2.1 ... linking ... done. Loading package GLUT-2.1.1 ... linking ... done. The above message was after you have installed GLUT-2.0, but GHC was still loading GLUT-2.1.1. The later errors were caused by your forced copy of 2.0 lib over the default 2.1.1. I noticed

Re: [Haskell-cafe] How can I stop GHCi from calling show for IOactions?

2007-09-18 Thread Claus Reinke
| It seems that GHCi outputs the contents of the variable you've created | when there's only one of them. Indeed, that is documented behaviour (first bullet here: http://www.haskell.org/ghc/docs/latest/html/users_guide/ch03s04.html#ghci-stmts ) Perhaps it's confusing behaviour? If so do suggest

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

2007-09-18 Thread Claus Reinke
I thought the master plan was that less would come with the compiler / interpreter and the user would install packages using cabal. Ideally, yes. I think a useful model would be GNU/Linux, where there is the Linux kernel, developed by core hackers, and then there are distributions, which

Re: [Haskell-cafe] Win32 Open GL / Glut Applications

2007-09-21 Thread Claus Reinke
http://www.haskell.org/HOpenGL/ First, the bad news: The HOpenGL site is outdated. Look at [1] and note the date of the most recent release: September 9, *2003*. [1] http://www.haskell.org/HOpenGL/releases.html try http://www.haskell.org/haskellwiki/Opengl ? [Sven: could there please be a

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

2007-09-24 Thread Claus Reinke
[cc-ed to haskell@, as this discussion is about [EMAIL PROTECTED] There are four things sent to the haskell list@ 1) Calls for papers 2) Annoucements 3) Oleg's stuff (which are really announcements of a library or technique) 4) Off topic stuff I'm initially only proposing to mop up category

Re: [Haskell-cafe] RE: simple function: stack overflow in hugs vs nonein ghc

2007-09-24 Thread Claus Reinke
return (repeat 'a') = \ x - print $ span (const True) x with hugs you will get a stack error, in ghc it executes in constant space, i.e. indefinitely. In essenece the above example does exactly the same as my ealier code. this thread might be relevant:

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

2007-09-24 Thread Claus Reinke
in other words, people were meant to subscribe either to haskell or to haskell+haskell-cafe, and posting to haskell was meant to be a flag able to raise a topic briefly over the general din in haskell-cafe. Do people think that is working? i don't think it is working anymore. haskell-cafe

Re: [Haskell-cafe] RE: simple function: stack overflow in hugs vsnonein ghc

2007-09-24 Thread Claus Reinke
afraid not the given example is too strict, the requirement is to generate the matched portion lazilly, and return the tail (unconsumed portion). ah yes, without optimisations, Prelude.span builds up stack, while the continuation-based alternative i mentioned is too strict for some uses. In

Re: [Haskell-cafe] RE: simple function: stack overflow in hugsvsnonein ghc

2007-09-24 Thread Claus Reinke
return (replicate 100 'a') = \x-print $ spant (const True) x ERROR - Garbage collection fails to reclaim sufficient space i.e. as the function unfold, the thunk representing the second term builds up on the heap. true. i've often wanted a copy pseudo-function that would avoid updating

Re: [Haskell-cafe] RE: simple function: stack overflow in hugsvsnonein ghc

2007-09-25 Thread Claus Reinke
return (replicate 100 'a') = \x-print $ spant (const True) x ERROR - Garbage collection fails to reclaim sufficient space i.e. as the function unfold, the thunk representing the second term builds up on the heap. (not sure why it works for an infinite list, hugs must drop the reference to

Re: [Haskell-cafe] Re: Very crazy

2007-09-25 Thread Claus Reinke
This is why I found it so surprising - and annoying - that you can't use a 2-argument function in a point-free expression. For example, zipWith (*) expects two arguments, and yet sum . zipWith (*) fails to type-check. You just instead write \xs ys - sum $ zipWith(*) xs ys which works as

[Haskell-cafe] getting more out of ghci [longish]

2007-09-25 Thread Claus Reinke
== intro no, i'm not talking about using a nice frontend to ghci, with added functionality, although the haskell modes for emacs and vim, and other such gui/ide/editor efforts, are well worth looking into!-) also, i'm not going to talk about the eagerly anticipated ghci debugger. what i am

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-08 Thread Claus Reinke
since this doesn't seem to want to go away:-) 1. reverse psychology approach if you have reached this page following rumours of a language others told you every serious programmer would have to learn, the ministry of programming would like to reassure you that there is no such

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

2007-10-14 Thread Claus Reinke
most widely-used programs (ex: web browsers, word processors, email programs, data bases, IDEs) tend to be 90% IO and 10% (or less) computation. This can make Haskell quite unweildy for solving these types of problems. On the otherhand, writing something like a compiler (which requires a small

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

2007-10-15 Thread Claus Reinke
but calling split-base base goes directly against all basic assumptions of all packages depending on base. The new base will have a new version number. There is no expectation of compatibility when the major version is bumped; but we do have an informal convention that minor version bumps

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

2007-10-15 Thread Claus Reinke
You need a way to specify foo 1.2 foo 2, which is a suggestion that was tossed around here recently. but what does such a version range say? that i haven't tested any versions outside the range (because they didn't exist when i wrote my package)? or that i have, and know that later

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

2007-10-15 Thread Claus Reinke
but the name that is everywhere does not stand for what the new version provides! any place that is currently referring to 'base' will have to be inspected to check whether it will or will not work with the reduced base package. and any place that is known to work with the new base package

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

2007-10-15 Thread Claus Reinke
However, I'd like to separate it from Cabal. Cabal provides mechanism not policy, regarding version numbers. but the examples in the cabal docs should reflect the standard interpretation of version numbers. of course, i have absolutely no idea how to write stable packages under this

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

2007-10-16 Thread Claus Reinke
Be happy: we're about 15 years ahead of the lisp guys. 'cabal install xmonad' works, for example. - not on windows (and since it is popular, it will seduce more good haskellers not to bother with windows compatibility.. :-( - from xmonad.cabal (version 0.3, from hackage): build-depends:

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

2007-10-16 Thread Claus Reinke
- if you provide a 'base' configuration that pulls in the stuff that used to be in base, the package will work I don't know of a way to do that. The name of the package is baked into the object files at compile time, so you can't use the same compiled module in more than one package.

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

2007-10-16 Thread Claus Reinke
1. Document the version numbering policy. agreed. just making everybody's interpretation explicit has already exposed subtle differences, so documenting common ground will help. We should have done this earlier, but we didn't. The proposed policy, for the sake of completeness is: x.y where:

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

2007-10-16 Thread Claus Reinke
If the convention for modifying package versions of form x.y.z is: - increment z for bugfixes/changes that don't alter the interface - increment y for changes that consist solely of additions to the interface, parts of the interface may be marked as deprecated - increment x for changes that

Re: [Haskell-cafe] Re: Proposal: register a package as providingseveral API versions

2007-10-16 Thread Claus Reinke
I have another concrete proposal to avoid things breaking so often. Let us steal from something that works: shared library versioning on unixy systems. indeed!-) there are established workarounds that are needed to make that system work as it does, so it is a good idea to check whether cabal

Re: [Haskell-cafe] Re: Proposal: register a package asprovidingseveral API versions

2007-10-16 Thread Claus Reinke
are those tricks necessary in this specific case? couldn't we have a list/range of versions in the version: field, and let cabal handle the details? I don't understand what you're proposing here. Surely just writing version: 1.0, 2.0 isn't enough - you need to say what the 1.0 and 2.0 APIs

Re: [Haskell-cafe] Re: Proposal: register a package asprovidingseveralAPI versions

2007-10-17 Thread Claus Reinke
the idea was for the cabal file to specify a single provided api, but to register that as sufficient for a list of dependency numbers. so the package would implement the latest api, but could be used by clients expecting either the old or the new api. I don't see how that could work. If the

Re: [Haskell-cafe] Re: Proposal: register a packageasprovidingseveralAPI versions

2007-10-17 Thread Claus Reinke
if that is your definition of compatible, you can never throw any packages away Is this a problem? apparently, yes. no two versions of base with ghc, only the newest set of core packages with each ghc release. and how much time do you want to spend on finding, re-building, and re-installing

Re: [Haskell-cafe] Re: Proposal: register a package as providingseveral API versions

2007-10-18 Thread Claus Reinke
Which reminds me that it would be nice to be able to ask for a list of what imports I need to specify (i.e. what names from the module are actually used). A case in point would be the example of non- monadic I/O I sent to the list the other day: I wanted to specify minimal imports, but

Re: [Haskell-cafe] Re: Proposal: register a packageasprovidingseveralAPI versions

2007-10-18 Thread Claus Reinke
These two cases could be solved by re-exports, no extra mechanism is required. yes, good support for re-export would be nice to have. the reason it has so many applications is that it is a way to explain connections between providers, apis, and clients to the package manager. - consider

Re: [Haskell-cafe] Re: Proposal: register a packageasprovidingseveralAPI versions

2007-10-18 Thread Claus Reinke
Incedentally, this reminds me that GHC should have a warning for not using explicit import lists (perhaps only for external package imports). for package-level imports/exports, that sounds useful. claus ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] will the real quicksort please stand up? (or: sorting a million element list)

2007-10-23 Thread Claus Reinke
It has been noted in a few places that the 2 line quicksort demo in the Introduction section of the haskell wiki http://www.haskell.org/haskellwiki/Introduction isn't a real quicksort, and wouldn't scale well with longer lists. Interested, and wanting to put my recently learned test data

Re: [Haskell-cafe] Re: [Haskell] [Fwd: undecidable overlappinginstances: a bug?]

2007-10-23 Thread Claus Reinke
Hi Mark, Declaration Formula --- --- class Eq a = Ord a forall a. Ord a = Eq a instance Eq a = Eq [a] forall a. Eq a = Eq [a] class C a b | a - b forall a, b. C a b /\ C a c = b = c This correspondence between declarations and

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-25 Thread Claus Reinke
From my point of view, the difference between 0b10111011 and (bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters. how about using ghc's new overloaded strings for this? 10111011::Binary there used to be a way to link to ghc head's docs, but i can't find it right now. the test is

Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-12 Thread Claus Reinke
For technical reasons, GHCi can only support the *-form for modules which are interpreted, so compiled modules and package modules can only contribute their exports to the current scope. But it does mean the interpreter isn't referentially transparent, which is weird for a language that puts so

Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-13 Thread Claus Reinke
Granted, I'm lazy. I read release notes only and only few first pages to see what's new. Couldn't GHCI be improved to at least give some hints? it does!-) watch the prompt, which says '*M', if all of M's top-level is in scope, or 'M', if only M's exports are in scope. check here:

Re: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Claus Reinke
Is there any plugin system for haskell? For example, in Java, I can load all compiled classes from given directory, check their interfaces and run some methods through reflection etc. Is it possible in haskell, to load modules from given directory, and if in module there is instance of class

Re: [Haskell-cafe] trouble building unix-2.2.0.0 on cygwin

2007-12-01 Thread Claus Reinke
hi, with the large number of just chatting messages on haskell-cafe, it is all too easy to miss problem reports here. you might have a better chance asking on more specific lists, eg. for ghc use, or library issues http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] Clean Dynamics and serializing code to disk

2007-12-06 Thread Claus Reinke
if you want to make something like this for haskell (and i'd very much like to use it!-), there are several issues, including: 1 handling code: - going for a portable intermediate representation, such as bytecode, is most promising, especially if the code representation is

Re: [Haskell-cafe] IO is a bad example for Monads

2007-12-10 Thread Claus Reinke
Maybe hardened Haskell programmers don't notice these things, but there's a wall that goes up when Haskell is presented to non-functional programmers. There are significant barriers for them to cross (some of them imaginary): there's the infamous type system, there's the mystique around monads,

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Claus Reinke
The approach is so simple and trivial that it must have occurred to people a hundred times over. Yet I do not find any other examples of this. Whenever I google for church encoding the examples don't go beyond church numerals. Am I googling for the wrong keywords? You might find Typing

Re: [Haskell-cafe] How to Show an Operation?

2010-06-07 Thread Claus Reinke
If I have a problem where I have to select from a set of operations, how would I print the result? Example: If I can chose from (x+y), (x*y), (x^2+y)... and I feed them all into my problem solver and it finds that (x*y) is right, how can I print that string? As others have pointed out,

Re: [Haskell-cafe] HP/Cygwin and Curl

2010-06-08 Thread Claus Reinke
Thanks Stephen--that was related to my original question, about using HP with Cygwin. The answer seems to be No!--you must use MSYS (for real work). The short version: - Cygwin provides commandline tools, compilers and libraries - MSYS provides commandline tools for the MinGW compilers and

Re: [Haskell-cafe] HP/Cygwin and Curl

2010-06-08 Thread Claus Reinke
of the Haskell tools won't work when launched from Cygwin Bash. Chris -Original Message- From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Claus Reinke Sent: 08 June 2010 09:02 To: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] HP/Cygwin and Curl

Re: [Haskell-cafe] How to Show an Operation?

2010-06-14 Thread Claus Reinke
As others have pointed out, you can't go from operation to representation, but you can pair operations and expressions with their representations. This idea is also implemented in my little 'repr' package: http://hackage.haskell.org/package/repr And probably more completely/comfortably!-)

Re: [Haskell-cafe] How to browse code written by others

2010-06-15 Thread Claus Reinke
..ghci is able to generate the tagsfiles for you. This allows you to jump to definitions of identifiers. If you go this route, I will shamelessly promote hothasktags instead of ghci. It generates proper tags for qualified imports. What do you mean by proper here? GHCi has the information

Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-17 Thread Claus Reinke
I'll work with Simon to investigate the runtime, but would welcome any ideas on further speeding up cafe4. Just a wild guess, but those foldWithKeys make me nervous. The result is strict, the step function tries to be strict, but if you look at the code for Data.IntMap.foldr, it doesn't really

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-18 Thread Claus Reinke
If you want to use cool languages, you may have to get a cool job. I know: it's easy to say and harder to accomplish. Most functional languages (e.g. Lisp, Haskell, ...) have a challenging time in industry since they require some savvy with multiple levels of higher abstractions and some

Re: [Haskell-cafe] Re: How to browse code written by others

2010-06-20 Thread Claus Reinke
If you go this route, I will shamelessly promote hothasktags instead of ghci. It generates proper tags for qualified imports. What do you mean by proper here? I think Luke means that if you use qualified names then hothasktags can give you better location information than current ghci ctags.

Re: [Haskell-cafe] TH instance code.

2010-06-22 Thread Claus Reinke
I have below duplicate code, but i don't know how to use TH instance code. -- duplicate code start -- instance Variable PageType where toVariant = toVariant . show fromVariant x = fmap (\v - read v :: PageType) $ fromVariant x If

Re: [Haskell-cafe] checking types with type families

2010-06-23 Thread Claus Reinke
I'm interested in situations where you think fundeps work and type families don't. Reason: no one knows how to make fundeps work cleanly with local type constraints (such as GADTs). If you think you have such as case, do send me a test case. Do you have a wiki page somewhere collecting

Re: [Haskell-cafe] Huffman Codes in Haskell

2010-06-23 Thread Claus Reinke
This seems like an example of list-chauvinism -- what Chris Okasaki calls a communal blind spot of the FP community in Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design -- http://www.eecs.usma.edu/webs/people/okasaki/icfp00.ps Thanks for sharing; this was an

Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-24 Thread Claus Reinke
I'll work with Simon to investigate the runtime, but would welcome any ideas on further speeding up cafe4. An update on this: with the help of Alex I tracked down the problem (an integer overflow bug in GHC's memory allocator), and his program now runs to completion. So this was about

Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-28 Thread Claus Reinke
Claus -- cafe5 is pretty much where it's at. You're right, the proggy was used as the bug finder, actually at cafe3, still using ByteString. It would be useful to have a really tiny data source - no more than 100 entries per Map should be sufficient to confirm or reject hunches about

Re: [Haskell-cafe] Re: checking types with type families

2010-07-02 Thread Claus Reinke
class C a b | a-b where op :: a - b instance C Int Bool where op n = n0 data T a where T1 :: T a T2 :: T Int -- Does this typecheck? f :: C a b = T a - Bool f T1 = True f T2 = op 3 The function f should typecheck because inside the T2 branch we know that

Re: [Haskell-cafe] Re: checking types with type families

2010-07-02 Thread Claus Reinke
f :: forall a b. C a b = T a - Bool f T1 = True f T2 = (op :: a - b) 3 as that results in the counter-intuitive Couldn't match expected type `Bool' against inferred type `b' `b' is a rigid type variable bound by the type signature for `f' at

Re: [Haskell-cafe] Re: checking types with type families

2010-07-03 Thread Claus Reinke
Prelude :t id :: Eq b = b - b id :: Eq b = b - b :: (Eq b) = b - b Prelude id :: Eq b = b - b interactive:1:0: No instance for (Show (b - b)) arising from a use of `print' at interactive:1:0-19 Possible fix: add an instance declaration for (Show (b - b)) In a stmt of a

Re: [Haskell-cafe] Is my code too complicated?

2010-07-03 Thread Claus Reinke
Most languages today provide a certain glue to bring everything together. Most languages today provide several kinds of glue and, while some of those kinds are not recommended, Haskell unfortunately doesn't provide all useful kinds of glue. Especially the module system is a weak point: in SML,

Re: [Haskell-cafe] Debugging cause of indefinite thread blocking

2010-07-07 Thread Claus Reinke
I am making use of the Data.Array.Repa module to achieve data-parallelism. On running my program I get the error: thread blocked indefinitely on an MVar operation Haven't seen any responses yet, so here are some suggestions: Two questions: 1. What could be some of the potential causes for

Re: [Haskell-cafe] Haddock anchors

2010-07-15 Thread Claus Reinke
One of the problems is that the anchors that Haddock currently generate aren't always legal in HTML, XHTML, or XML. I'd like to fix the anchor generation so that they are. If I do, then links between old and new generated Haddock pages will land on the right page, but won't always get to the

Re: [Haskell-cafe] Re: how do you debug programs?

2006-09-06 Thread Claus Reinke
scientists, who ought to know, assure us that it must be so, oh, let us never, never, doubt, what nobody is sure about. (or something like that..;-) as everyone else in this thread, I have my own experiences and firm opinions on the state of debugging support in Haskell (in particular on the

Re: [Haskell-cafe] Re: how do you debug programs?

2006-09-07 Thread Claus Reinke
thinking helps, but claiming that tools can't help doesn't. Lets be absolutely clear about this: I've never claimed that tools can't help. In this thread I've been using the term debugger in the narrow sense implied by the OP's question -- something that steps through the execution of the

Re: [Haskell-cafe] Haskell.org down

2006-09-26 Thread Claus Reinke
don't know whether this is useful/related, but - I got a whole bunch of very old haskell.org emails today (so they must have been hung up somewhere) - some of the ghc trac tickets look bogus, filled with links (#889, sent 05 Sept, received today, 26 Sept; #751, sent 05 Sept, received

Re: [Haskell-cafe] Computing lazy and strict list operations at thesame time

2006-09-27 Thread Claus Reinke
This is a follow-up to a thread from June-July[1]. The question was how to write the function initlast :: [a] - ([a], a) initlast xs = (init xs, last xs) so that it can be consumed in fixed space: main = print $ case initlast [0..10] of (init, last) -

[Haskell-cafe] Re: Fractional/negative fixity?

2006-11-07 Thread Claus Reinke
by all means, lets have warm fuzzy precedence declarations infix(nearly right) (exp (2*i*pi) + 1) :-) infix(mostly left) (((\x-cos x + i*(sin x)) (2*pi)) + 1) (-: who says that all the fun has to start in the type system?-) we would probably need to refer to hyperreals, in order to

Re: [Haskell-cafe] (twice head) (twice tail)

2006-11-12 Thread Claus Reinke
not a solution to your problem, but covers all your tests, as well as one more that would inevitably have followed:-) cheers, claus Twice.hs Description: Binary data ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Debugging partial functions by the rules

2006-11-15 Thread Claus Reinke
This isn't a trivial point. We know that error handling code is a major part of software cost--it can even dominate the cost of the correct case code (by a large factor). Erlang's program for the correct case strategy, coupled with good fault tolerance mechanisms, is one reason for its

Re: [Haskell-cafe] Debugging partial functions by the rules

2006-11-15 Thread Claus Reinke
Couldn't we just use rewrite rules to rewrite *transparently* all uses of fromJust to safeFromJust, tagging the call site with a location? .. Looks good! But that is deceiving: the assert was expanded before the rule fired, and refers to the rewrite rule source line (line 19), not the

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM- video

2006-11-24 Thread Claus Reinke
this thread reminds me about something that I wanted to ask you. if I recall correctly, most of the literature references in STM papers are recent, so I wondered whether you are aware of this one: NAMING AND SYNCHRONIZATION IN A DECENTRALIZED COMPUTER SYSTEM SourceTechnical Report:

Re: [Haskell-cafe] Difficult memory leak in array processing

2006-11-27 Thread Claus Reinke
In fact it turned out that the example code I posted did not exhibit the memory leak at all. It just took a /very long time/ to complete (compared to a Java version), but it did complete. My complete code, which also counted the instances of a given number from the array, does however exhibit the

Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explainSTM- video

2006-11-28 Thread Claus Reinke
also on the multi-version approach. but the particular reason I mentioned this was that it also tried to address the issue of composing transactions (discussion of which is explicitly excluded from the section 1.2 you refer to). for instance, compare the discussion and examples in Composable

Re: [Haskell-cafe] WANTED: grey line layout boxes in vim and emacs

2006-12-08 Thread Claus Reinke
something like the attached vim script might work for small sources (ignores all layout rules and keywords, just records increase/decrease of indentation stack; builds up a rather large pattern of positions for highlighting via :match). (don't assume that this is the only, let alone the right

Re: [Haskell-cafe] One question...

2006-12-09 Thread Claus Reinke
Hello yourself!-) Two days ago I have found Haskell in Internet. It sounds very nice. I have read some articles, few examples, ... yes it sounds nice. you need to try it as well. haskell.org has information, tutorials, interactive implementations (and to answer the likely follow-on question:

a cabal/database lib experience (was: [Haskell-cafe] Trivial database access in Haskell)

2006-12-11 Thread Claus Reinke
if you're using Haskell at all, you *are* the Haskell community. [..lots of I searched, I found, I tried, I got this error, I thought, I tried this workaround, I got to this point, now I'm stuck here..] I just wanted to comment that I find this kind of experience report very helpful,

Re: a cabal/database lib experience (was: [Haskell-cafe]Trivialdatabase access in Haskell)

2006-12-12 Thread Claus Reinke
We have made a number of assumptions which Paul exposed: - users should know to do darcs get, then runhaskell Setup.hs configure/build/install - users should know to look for Haddock docs - users should know how to look for and install dependent libraries (Cabal-1.1.6.1, in this case) and there

Re: [Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Claus Reinke
absolutely, this has occurred to me too. There should be a stanard Cabal README file, and Don's mkcabal tool could drop it in the tree. This occurred to me too. My current plan for mkcabal is that it creates: foo.cabal Setup.lhs README LICENSE based on a series of interactive

Re: [Haskell-cafe] Aim Of Haskell

2006-12-12 Thread Claus Reinke
Maybe we can claim it should be 'has kell', where kell is something cool, and no cornflakes. It has kell. if there was an implementation of Haskell on Cell processors, it could be has cell.. I wonder if knowing what people are going to do with your name is sufficient to put students off

Re: [Haskell-cafe] Aim Of Haskell

2006-12-13 Thread Claus Reinke
The reason why Haskell is academic-centric is that it was originally conceived by academics, and they were interested in doing research into language design and implementation .. shouldn't we make this used to be academic-centric? People outside academia who might be inclined to take on some

Re: [Haskell-cafe] Aim Of Haskell

2006-12-13 Thread Claus Reinke
well, if Sun hadn't have released a version of smalltalk with a funny c like syntax, you might have seen some interesting developments in the mid 90's yes, perhaps. but now that funny smalltalk is open source, the self team has been released from indenture (after Scheme and Self people, Sun is

Re: [Haskell-cafe] Re: Writing Haskell For Dummies Or At Least ForPeople Who Feel Like Dummies When They See The Word 'Monad'

2006-12-14 Thread Claus Reinke
+1 . I would love to read something that is the equivalent of 'design patterns', but for functional languages.. I want to learn how to think functionally. If you want to learn how to think functionally, forget you ever heard the words design pattern. There shouldn't be patterns in your

Re: [Haskell-cafe] some way to reverse engineer lambda expressionsout of the debugger?

2007-01-11 Thread Claus Reinke
[EMAIL PROTECTED]: Bulat Ziganshin [EMAIL PROTECTED] wrote: tphyahoo wrote: *UnixTools explodeLambda( map (*) [1,2] ) [(\x - 1*x),(\x - 2*x)] Have a play with this, from Claus Reinke: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/R.hs Regards, Malcolm

Re: Re[2]: [Haskell-cafe] Channel9 Interview: Software Composability andthe Future of Languages

2007-02-01 Thread Claus Reinke
while (hGetBuf h buf bufsize == bufsize) crc := updateCrc crc buf bufsize break if crc==0 print crc inContT $ callCC $ \break - do flip execStateT 0 $ do whileM (liftM (== bufsize) (hGetBuf h buf bufsize)) $ do modifyM (updateCrc buf bufsize)

Re: Re[4]: [Haskell-cafe] Channel9 Interview: Software Composabilityandthe Future of Languages

2007-02-01 Thread Claus Reinke
while (hGetBuf h buf bufzise .==. (return bufsize)) $ do crc =: updateCrc crc buf bufsize breakIf ((val crc) .==. (return 0)) `orElse` do printM (val crc) od your solution is just to make lifted copy of each and every pure operation. so one should define 2^n

Re: [Haskell-cafe] Re: Space Leak Help

2007-02-04 Thread Claus Reinke
pad causes a stack overflow and pad1 uses up about 6m of heap. pad1 xs = xs ++ [0x80] ++ ps where l = length xs pl = (64-(l+9)) `mod` 64 ps = replicate pl 0x00 wild guess: if you compute the length when the consumer reaches ps, you hold on to a copy of xs longer than needed,

Re: [Haskell-cafe] IO is not a monad

2007-02-12 Thread Claus Reinke
Adding seq ruins eta reduction. For normal order lambda calculus we have '\x.f x = f' (x not free in f). If we add seq this is no longer true. isn't that a problem of seq (and evaluation in Haskell generally) not being strict enough (ie, forcing evaluation only to weak head normal form

Re: [Haskell-cafe] Programming an Evaluation Context

2007-02-15 Thread Claus Reinke
in structural operational semantics, an evaluation context is often used to decompose an expression into a redex and its context. In a formal semantics on paper, an expression can just be pattern matched over the grammar of an evaluation context. If one wants to implement such a semantics in

Re: [Haskell-cafe] Programming an Evaluation Context

2007-02-15 Thread Claus Reinke
-- evaluation contexts, parameterized by rule to apply ctxt rule e = rule e `mplus` left (ctxt rule) e `mplus` right (ctxt rule) e left act e = do { (Plus l r) - return e; lv - act l; return (Plus lv r) } right act e = do { (Plus lv@(Val _) r) - return e; rv - act r; return (Plus lv

Re: [Haskell-cafe] Does laziness make big difference?

2007-02-16 Thread Claus Reinke
So, as I understand, choosing default laziness was just experimental design decision in order to answer the question: how good lazy language can be. I am practically convinced, that lazy evaluation included in the _right_ places can be extremely useful. I didn't state the question as strict vs

Re: [Haskell-cafe] Re: Genuine Eratosthenes sieve [Was: Optimizationfun]

2007-02-20 Thread Claus Reinke
i have to say that i find the folklore sieve quite acceptable as a sieve, whereas the faster test-against-primes is obviously different. but the discussion has prompted me to write yet another sieve, perhaps more acceptable to purists. instead of using (mod p) repeatedly and filtering

Re: [Haskell-cafe] Re: Code and Perf. Data for Prime Finders (was:Genuine Eratosthenes sieve)

2007-02-25 Thread Claus Reinke
Algorithm 10^310^4 10^5 10^6 10^7 10^8 Reinke0.04 1.2141.00- - - - Reinke is the ``applyAt'' algorithm Claus Reinke posted here while I'm not unhappy that this code is performing reasonably well, it was mostly an attempt to get

Re: [Haskell-cafe] Re: Code and Perf. Data for Prime Finders(was:Genuine Eratosthenes sieve)

2007-02-25 Thread Claus Reinke
This isn't a variant of the folklore sieve, it's actually the real one! :-) well, one thing i was trying for (and what perhaps one might like to see in a paper), is a way of relating the various code alternatives to each other, with suitably similar intermediate stages. not quite as detailed

[Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Claus Reinke
I hoped at least to stimulate interest in repeating GP experiment with latest GHC version. until that happens, I'd be wary to draw too many conclusions for today's applications from this paper. two orders of magnitude difference would seem to imply programming problems to me (though the

Re: [Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-27 Thread Claus Reinke
It'd be interesting to get the real code for this. Partly to just try optimising it but more so as a real test case for list/array fusion. As far as I see, there's no reason that consuming an assoc list of a bool vector with a foldl' (the ' is probably essential) should be slow. If it's fused

Re: [Haskell-cafe] Re: Code and Perf. Data for PrimeFinders(was:Genuine Eratosthenes sieve)

2007-02-28 Thread Claus Reinke
Melissa, thank you for taking my comments as constructively as they were meant. and not to worry, i'm sure i'm not the only one who enjoyed this little exercise and learned a lot from it!-) and even if we've found more that you expected, you're quite right, one doesn't get anywhere unless

bytestring vs polymorphic contiguous lists Re: [Haskell-cafe] Re: Using loop fusion for writing efficenthigh-level code Re[2]:[Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-28 Thread Claus Reinke
The main example of course is ByteString fusion as presented in our recent paper: http://www.cse.unsw.edu.au/~dons/papers/CSL06.html btw, why did you restrict yourself to improving [Char], rather than [a]? naively, it would seem to me that most of the framework should work just as well for

Re: [Haskell-cafe] Proposal: simple interface to libraries Haddock

2007-03-02 Thread Claus Reinke
http://docs.haskell.org/Data.Map.funcname this reminded me that haddock has long generated files with paths and relative urls that allow you to do that kind of thing, if slightly cryptically, and that i have long wanted to access the local haddocs from vim. since i'm a bit slow learning about

Doc.vim - Haddocks from Vim (Re: [Haskell-cafe] Proposal: simple interface to libraries Haddock)

2007-03-03 Thread Claus Reinke
Again, the problem with this script is that it requires you know the package name for the function you're looking up. I see this as an over-burdenous requirement on the user. okay. sometimes i know/guess the module i'm looking for, but not the item. sometimes i recall the item i'm looking for,

Re: [Haskell-cafe] auto-completion for Vim 7

2007-03-04 Thread Claus Reinke
If someone knows of a simple way to generate a function/type list of the standard modules, I'd love to hear about it. Generating such a list on the fly each time is probably not an option, as it would be too slow. Using a recent version of haddock, the --hoogle flag gives you exactly what you

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl senseof one-liners)

2007-03-04 Thread Claus Reinke
I think I could have most of the oneliner goodness of h4sh, without having to do the module install, if I could figure out a way to include modules with ghc -e. i confess myself to be among those who underappreciated ghc -e, until this thread:) as Joachim said (thanks for starting this,

Re: [Haskell-cafe] Rendering TTF fonts in Haskell and OpenGL

2008-02-22 Thread Claus Reinke
[cc-ed to hopengl list; are there many haskell opengl users not on that list, btw?] a standard package for easy-to-use, high-quality, portable font support would make a great addition to haskell's otherwise nice opengl bindings! is there a reason for going directly to freetype? from the old

Re: [Haskell-cafe] Re: Graphical graph reduction

2008-02-23 Thread Claus Reinke
About 7 years ago such a tool existed: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/ GHood was never intended to visualize graph reduction directly (*). instead, it visualized observations - ie, you could see if and when which parts of an observed data structure was

Re: [Haskell-cafe] Equality constraints in type families

2008-03-19 Thread Claus Reinke
type family F a :: * - * .. We made the design choice that type functions with a higher-kinded result type must be injective with respect to the additional paramters. I.e. in your case: F x y ~ F u v = F x ~ F u /\ y ~ v i'm still trying to understand this remark: - if we are talking

  1   2   3   4   5   6   >