Re: [Haskell-cafe] Haskell Platform, Hackage and Cabal : The 2nd Year : Status Report

2010-10-03 Thread Ketil Malde
Matthias Kilian k...@outback.escape.de writes: http://www.vimeo.com/15462768 And is there any way to just *download* the video? For people not using adobe flash? +1. I'd like to watch video offline on my phone, so Flash isn't really a good option. It doesn't work on my computer either,

Re: [Haskell-cafe] Memoization/call-by-need

2010-09-16 Thread Ketil Malde
Alex Rozenshteyn rpglove...@gmail.com writes: I understand that fib50 = slowFib 50 will take a while to run the first time but be instant each subsequent call; does this count as memoization? I didn't see anybody else answering this in so many words, but I'd say no, since you only name one

Re: [Haskell-cafe] malicious JS on haskell site

2010-09-10 Thread Ketil Malde
Albert Y. C. Lai tre...@vex.net writes: Looks like the free web counter was sold to an advertiser as few years ago. I've seen this happen before, and it's just a strategy - first provide some cross-site neat function, wait around for a while, then replace it with some ad-serving crap. Take

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

2010-08-18 Thread Ketil Malde
John Millikin jmilli...@gmail.com writes: The reason many Japanese and Chinese users reject UTF-8 isn't due to space constraints (UTF-8 and UTF-16 are roughly equal), it's because they reject Unicode itself. Probably because they don't think it's complicated enough¹? Shift-JIS and the

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

2010-08-17 Thread Ketil Malde
Benedikt Huber benj...@gmx.net writes: Despite of all this, I think the performance of the text package is very promising, and hope it will improve further! I agree, Data.Text is great. Unfortunately, its internal use of UTF-16 makes it inefficient for many purposes. A large fraction -

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

2010-08-17 Thread Ketil Malde
Johan Tibell johan.tib...@gmail.com writes: It's not clear to me that using UTF-16 internally does make Data.Text noticeably slower. I haven't benchmarked it, but I'm fairly sure that, if you try to fit a 3Gbyte file (the Human genome, say¹), into a computer with 4Gbytes of RAM, UTF-16 will

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

2010-08-17 Thread Ketil Malde
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: Seeing as how the genome just uses 4 base letters, Yes, the bulk of the data is not really text at all, but each sequence (it's fragmented due to the molecular division into chromosomes, and due to incompleteness) also has a textual

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

2010-08-17 Thread Ketil Malde
Michael Snoyman mich...@snoyman.com writes: As far as space usage, you are correct that CJK data will take up more memory in UTF-8 than UTF-16. With the danger of sounding ... alphabetist? as well as belaboring a point I agree is irrelevant (the storage format): I'd point out that it seems

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

2010-08-17 Thread Ketil Malde
Yitzchak Gale g...@sefer.org writes: I don't think the genome is typical text. I think the typical *large* collection of text is text-encoded data, and not, for lack of a better word, literature. Genomics data is just an example. -k -- If I haven't seen further, it is by standing in the

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

2010-08-17 Thread Ketil Malde
Colin Paul Adams co...@colina.demon.co.uk writes: Char is not an encoding, right? Ivan No, but in GHC at least it corresponds to a Unicode codepoint. I don't think this is right, or shouldn't be right, anyway.. Surely it stands for a character. Unicode codepoints include non-characters

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

2010-08-17 Thread Ketil Malde
Felipe Lessa felipe.le...@gmail.com writes: [-snip- I've already spent too much time on the other stuff :-] And what do you think about creating a real SeqData data type with two bases per byte? In terms of processing speed I guess there will be a small penalty, but if you need to have large

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

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

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

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

Re: [Haskell-cafe] Re: Haskell in Industry

2010-08-11 Thread Ketil Malde
Henning Thielemann schlepp...@henning-thielemann.de writes: about functional programming jobs in investment banking ... I don't think this is bad: having talented people recruited to work on functional programming will improve the technology for all of us. I'm not sure I follow this opinion

Re: [Haskell-cafe] Is there any experience using Software Transactional Memory in substantial applications?

2010-08-11 Thread Ketil Malde
Simon Peyton-Jones simo...@microsoft.com writes: In contrast, in a pure functional language there are no reads and writes, so all the pure part has zero overhead. Only when you do readTVar' and 'writeTVar' do you pay the overhead; these are a tiny fraction of all memory accesses. I'm

Re: [Haskell-cafe] Re: Haskell in Industry

2010-08-10 Thread Ketil Malde
Tom Hawkins tomahawk...@gmail.com writes: Second, I would like to know what exactly is bad about a Haskell job in investment banking as a lot of good programmers work in this industry. It's disproportionate. 95% of the job offerings in functional programming are with investment firms. I

Re: [Haskell-cafe] Chart package segfaults when rendering to window

2010-08-01 Thread Ketil Malde
bri...@aracnet.com writes: Seems to be ok rendering to png files. I'm using timeplot, which is based on Chart, to plot temperatures from my server in the attic (http://malde.org/~ketil/temp.png if you're curious :-). This runs from crontab, and I notice that I occasionally get mails saying

Re: [Haskell-cafe] Haskell Forum

2010-07-27 Thread Ketil Malde
Brandon S Allbery KF8NH allb...@ece.cmu.edu writes: Usenet *is* NNTP. In the same way the web is HTTP... (Usenet is a set of global, distributed forums using a message format similar enough to email (RFC822 + extensions) that many mail reader software supports news, and vice versa. NNTP is

Re: [Haskell-cafe] Page rank and GHC docs directory organization

2010-07-23 Thread Ketil Malde
Robin KAY komad...@gekkou.co.uk writes: the redirects and ignore the original URLs [2]. Using a 302 Found redirect instead might produce better results, at least for Google But the page you point to suggests 302 is discouraged, and says they don't help for the other search engines. Perhaps

[Haskell-cafe] Experiences with cabal-install and Hackage

2010-07-22 Thread Ketil Malde
I've rather recently started to use cabal-install to install packages from Hackage. Unfortunately, so far many packages fail to install. I try to email authors/maintainers, but when I check build logs on Hackage, I discover that some of these packages have failed building for some time.

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-21 Thread Ketil Malde
John Goerzen jgoer...@complete.org writes: I need to read the LGPL and analyze it closer, but my first analysis suggests that this would work fine for me and others. I'm using the LGPL for library code, and GPL for applications. Although a lot of noise is generated from the linking issues,

Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-21 Thread Ketil Malde
Vo Minh Thu not...@gmail.com writes: For a LGPL library, why do you make the distinction between open source and proprietary applications? They can all link to a LGPL library. The problem with the LGPL is that in order to distribute a program using an LGPL library, the recipient must be

Re: [Haskell-cafe] Hackage survey

2010-07-20 Thread Ketil Malde
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: I'd like to request some clarification of some of the questions: You might want to add a don't know or similar option, so that people don't have to fill in questions arbitrarily in the case they feel none of the answers match. 3. I use

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-20 Thread Ketil Malde
Christopher Done chrisd...@googlemail.com writes: Sadly nobody has the time nor inclination to do proper web development and actually test designs and get feedback, so I suppose we're working with the time we've got. At least with theme support, we can write a load of themes, and then

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-20 Thread Ketil Malde
Don Stewart d...@galois.com writes: (Looking at http://code.haskell.org/haskell-platform/download-website) * The three columns at the bottom overlap! Perhaps this is a valid case for a table rather than three divs and CSS layout. Agreed and implemented. That was easier! Scaling is still a

Re: [Haskell-cafe] [Newbie] What to improve in my code

2010-07-19 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: First of all: I'm not sure if this question is allowed here. If not, I apologize You might want to check out the haskell-beginners list, but IMO most questions are okay to post here. Just a couple of style issues Daniel didn't mention: process

Re: [Haskell-cafe] A question about State Monad and Monad in general

2010-07-19 Thread Ketil Malde
C K Kashyap ckkash...@gmail.com writes: I looked at State Monad yesterday and this question popped into my mind. From what I gather State Monad essentially allows the use of Haskell's do notation to invisibly pass around a state. So, does the use of Monadic style fetch us more than syntactic

Re: [Haskell-cafe] Actually loading a Cabal package in GHCi

2010-07-12 Thread Ketil Malde
d...@patriot.net writes: d...@hypno:~/haschorus-1.2.1$ ghci GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude :m Haskore No error

The state of Hugs (was: Re: [Haskell-cafe] Re: Rewriting a famous library and using the same name: pros and cons)

2010-07-06 Thread Ketil Malde
wren ng thornton w...@freegeek.org writes: A bit more seriously: is there any listing anywhere of which extensions Hugs supports? Cabal has a partial listing embedded in its code, though I can't seem to find a textual version at the moment. In general, Hugs has all the features of GHC 6.6:

Re: [Haskell-cafe] Re: Rewriting a famous library and using the same name: pros and cons

2010-07-04 Thread Ketil Malde
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: People still use Hugs? :p Well, I just did a quick count of Haskell libraries in Debian and Ubuntu (as a sort of comment to Don's blog post), but I forgot Hugs. It seems to be installed on 6000 Ubuntu-respondents, compared to 17000

Re: [Haskell-cafe] Status of status on freenode

2010-07-03 Thread Ketil Malde
Walt Rorie-Baety black.m...@gmail.com writes: My work environment is what I'd call typical US corporate - IRC nodes are blocked, but I can use a web-based client to access it. I solve these kinds of problems by routing stuff through an SSH connection to an outside server - which isn't blocked,

Re: [Haskell-cafe] functional dependencies question

2010-07-01 Thread Ketil Malde
Patrick Browne patrick.bro...@dit.ie writes: Why do some cases such as 1) fail to run even if they are the only instantiation. I think this is because literal numbers are polymorphic, i.e. a '1' in your source code is shorthand for 'fromIntegral 1', which is a type of Num a = a. Thus,

Re: [Haskell-cafe] whine and solution about programmers not respecting documentations

2010-06-29 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: Maybe it is because deleteBy is defined wrongly? i.e. it is not logical, doesn't follow the common sense user might expect. It accepts any predicate but narrows requirements only in docs. Unfortunately, you can't easily encode the requirement

Re: [Haskell-cafe] whine and solution about programmers not respecting documentations

2010-06-29 Thread Ketil Malde
Max Rabkin max.rab...@gmail.com writes: Your deleteBy is (filter . not), isn't it? With the caveat that I haven't actually used it, my impression is that delete only removes one element, while filter removes all of them. -k -- If I haven't seen further, it is by standing in the footprints of

Re: [Haskell-cafe] whine and solution about programmers not respecting documentations

2010-06-29 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: An important point of a powerful type system is to model your program so that only sensible code is legal. That would be an awesomely powerful type system :) Heh. But while we're waiting for it, we can try to use what we got to eliminate as

Re: [Haskell-cafe] whine and solution about programmers not respecting documentations

2010-06-28 Thread Ketil Malde
Albert Y.C.Lai tre...@vex.net writes: The doc of deleteBy states: The deleteBy function behaves like delete, but takes a user-supplied equality predicate. A precondition is that the user-supplied predicate is an equality predicate. (=) is not an equality predicate, be it in the layperson

Re: [Haskell-cafe] Fwd: signficant improvements to the containers package

2010-06-25 Thread Ketil Malde
Don Stewart d...@galois.com writes: Some people might be quite excited by Milan's work on significant performance improvements to the containers package... Yes, this is great news - both a well written article and an important piece of work on a cornerstone of the Haskell libraries. But I am

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-21 Thread Ketil Malde
Roman Beslik ber...@ukr.net writes: I do not agree. They are not confused by other languages, they treat all languages as born equal. Are you saying this is a good thing? creating our separate source of knowledge leads to isolationism and narrow-minded vision. But also to a consistent,

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-21 Thread Ketil Malde
Roman Beslik ber...@ukr.net writes: I do not agree. They are not confused by other languages, they treat all languages as born equal. Are you saying this is a good thing? Yes. There is more than Haskell. Sure. But when I am programming in Haskell, I am generally most interested in using

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-16 Thread Ketil Malde
Edward Kmett ekm...@gmail.com writes: I realize that this is addressing the symptom, not the cause I'm not so sure Wikipedia is a good source of information for this. I've tried to read some of their articles on e.g. type systems or generic programming, but they tend to be confused by other

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

2010-06-15 Thread Ketil Malde
braver delivera...@gmail.com writes: In fact, the tag cafe2, when run on the full dataset, gets stuck at 11 days, with RAM slowly getting into 50 GB One tip might be to limit available heap memory by using +RTS -M2G (or whatever your real memory is). If (as seems likely) the RAM usage leads

Re: [Haskell-cafe] Reporting a problem with binary-0.5

2010-06-07 Thread Ketil Malde
Alexey Khudyakov alexey.sklad...@gmail.com writes: This issue was discussed on the list before. Get monad definition was changed in binary 0.5.0.2. It was made strict and evaluation of result of runGet is forced. This increased performance but broke programs which relies on lazyness to work.

Re: [Haskell-cafe] How to name a mapped function?

2010-06-07 Thread Ketil Malde
Martin Drautzburg martin.drautzb...@web.de writes: If I have a function, say compute whose last parameter is some value ... and I create another function, which applies compute to a list of values, how would I call this function? If I understand you correctly, and it's not simply map .

Re: [Haskell-cafe] Efficient string construction

2010-06-04 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: So why is there a UTF8 implementation for bytestrings? Does that not duplicate what Text is trying to do? If so, why the duplication? I think Data.ByteString.UTF8 predates Data.Text. One difference is that Data.Text uses UTF-16 internally, not

Re: [Haskell-cafe] alphanum in infix constructors (and possibly functions as well) - why not?

2010-06-04 Thread Ketil Malde
Ozgur Akgun ozgurak...@gmail.com writes: Then people would need to put spaces between those things, right? What a horrible consequence! I like to think that Haskell is a language where aesthetics matter. So, in my opinion this is indeed a horrible consequence. I find mixing of symbols and

Re: [Haskell-cafe] Reporting a problem with binary-0.5

2010-06-04 Thread Ketil Malde
Pete Chown 1...@234.cx writes: This code attempts to create an infinite list of random numbers -- a technique also used by network-dns. It turns out that this code works with binary-0.4.4 but not with binary-0.5.0.2. There was a deliberate change in strictness in 0.5 making binary strict,

Re: [Haskell-cafe] Sockets get bound to wrong port on Windows

2010-06-03 Thread Ketil Malde
Antoine Latter aslat...@gmail.com writes:   *Main PortNum   47138 The PortNum constructor should rarely be used directly So, shouldn't the constructor be hidden, and exported from an .Internal module? - it contains the port number in network-order. You should try: Or perhaps even

Re: [Haskell] Re: [Haskell-cafe] Work on Video Games in Haskell

2010-05-27 Thread Ketil Malde
b...@telenet.be writes: Or maybe this would be a nice research topic: how to generate C code that looks like it’s human written… Nah, that's too easy: just add a sprinkling of buffer overflows, undefined behavior, and off-by one index errors. -k -- If I haven't seen further, it is by

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Ketil Malde
Michael Snoyman mich...@snoyman.com writes: * If you're standardizing on UTF-8, why not support bytestrings? +1 I'm aware that a user could shoot him/herself in the foot by passing in non-UTF8 data, but I would imagine the performance gains would outweigh this. Wrap them in a (new)type?

Re: [Haskell-cafe] debugging a hanging program: where to start?

2010-05-13 Thread Ketil Malde
Aran Donohue aran.dono...@gmail.com writes: I have a program that I can reliably cause to hang. It's concurrent using STM, so I think it could be a deadlock or related issue. I also do some IO, so I think it could be blocking in a system call. If it's the latter, 'strace' might help you. Use

Re: [Haskell-cafe] Haskell and the Software design process

2010-05-03 Thread Ketil Malde
Henning Thielemann lemm...@henning-thielemann.de writes: http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Exception.html#v%3Athrow I see. This should be forbidden, at all! :-) Why is this worse than or different from 'error'? To me it looks like 'error', only with a

Re: [Haskell-cafe] Haskell and the Software design process

2010-05-03 Thread Ketil Malde
Gregory Collins g...@gregorycollins.net writes: Henning Thielemann lemm...@henning-thielemann.de writes: http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Exception.html#v%3Athrow I see. This should be forbidden, at all! :-) Why is this worse than or different from

Re: [Haskell-cafe] Benchmarks game updated to ghc 6.12.2

2010-04-29 Thread Ketil Malde
Don Stewart d...@galois.com writes: http://shootout.alioth.debian.org/u64q/haskell.php Observations: Although we're mostly beaten on speed, and about the same on code size, we're using a lot less memory than Java. As for code size, the programs are heavily tuned for speed. Although it is

Re: [Haskell-cafe] Benchmarks game updated to ghc 6.12.2

2010-04-29 Thread Ketil Malde
Ketil Malde ke...@malde.org writes: Is it an idea to go back a few steps to more idiomatic code? I had a whirl at the 'reverse complement' benchmark, where we're in the Java ballpark for performance and memory, but at twice the code size. My simple implmentation is down from seventy to about

Re: [Haskell-cafe] Benchmarks game updated to ghc 6.12.2

2010-04-29 Thread Ketil Malde
Felipe Lessa felipe.le...@gmail.com writes: On Thu, Apr 29, 2010 at 10:54:09AM +0200, Ketil Malde wrote: Anyway - it occurs to me that this can fairly simply be sped up by parallelizing: chunk the input, complement chunks in parallel, and reverse. Any takers? Do you mean, something like

Re: [Haskell-cafe] Re: instance Eq (a - b)

2010-04-16 Thread Ketil Malde
Ashley Yakeley ash...@semantic.org writes: There's an impedance mismatch between the IEEE notion of equality (under which -0.0 == 0.0), and the Haskell notion of equality (where we'd want x == y to imply f x == f y). Do we also want to modify equality for lazy bytestrings, where equality is

Re: [Haskell-cafe] instance Eq (a - b)

2010-04-14 Thread Ketil Malde
Joe Fredette jfred...@gmail.com writes: Consider the set of all rationals with 1 as a numerator, and positive denominator, eg: S = {1/n, n : Nat} this is bounded, enumerable, but infinite. Isn't making this an instance of Enum something of an abuse? How would you use enumFromThenTo

[Haskell-cafe] Re: instance Eq (a - b)

2010-04-14 Thread Ketil Malde
Ashley Yakeley ash...@semantic.org writes: Another practical consideration is that checking a function taking a simple Int parameter for equality would mean 2^65 function evaluations. I think function equality would be too much of a black hole to be worth it. Oh FFS, _don't do that_. I

Re: [Haskell-cafe] Cabal dependency hell

2010-04-12 Thread Ketil Malde
Duncan Coutts duncan.cou...@googlemail.com writes: Here are a few things which I would like to see implemented that would help all this: * Build reporting in the hackage server The idea here is that cabal sends back anonymous reports to the server to say if a package

Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)

2010-04-08 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: However, I wanted to know what the etc stood for, with taking care of dependencies and uninstalling already mentioned. Upgrading, yes, but what else? Keeping the system consistent with other systems? If I use the system packages, I can have a

Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)

2010-04-08 Thread Ketil Malde
Ivan Miljenovic ivan.miljeno...@gmail.com writes: Which packages are these? I don't recall seeing any with this kind of maintainer address... http://www.google.no/search?q=site%3Ahackage.haskell.org+maintainer+libraries%40haskell.org -k -- If I haven't seen further, it is by standing in

Re: [Haskell-cafe] Suitable structure to represents lots of similar lists

2010-04-08 Thread Ketil Malde
Dan Piponi dpip...@gmail.com writes: I have a situation where I have a bunch of lists and I'll frequently be making new lists from the old ones by applying map and filter. (While keeping the old ones around, I presume?) One option (or source of inspiration) might be lazy bytestrings, which

Re: [Haskell-cafe] Re: Hackage accounts and real names

2010-04-06 Thread Ketil Malde
Pekka Enberg penb...@cs.helsinki.fi writes: Can you really legally distribute your software under an open source license if you don't use your real name? I think it would be hard to enforce any copyright license without revealing the connection between your pseudonym and real person, but I

Re: [Haskell-cafe] Re: Hackage accounts and real names

2010-04-06 Thread Ketil Malde
David House dmho...@gmail.com writes: Let me summarise the main arguments against the restriction: 1. It stops people from contributing [..] 2. Inconsistency [..] 3. Privacy issues [..] 4. It inteferes with people's freedom - who has the right to dictate what name a person (or, for that

Re: [Haskell-cafe] How do I use ByteString?

2010-04-06 Thread Ketil Malde
Mads Lindstrøm mads_lindstr...@yahoo.dk writes: It may seem unfair that I put byte-strings and char-strings in the same bucket, but libraries do use byte-strings to contain characters. For example, Parsec has a [Char] and a bytestring interface. It bears noting that Data.ByteString and

[Haskell-cafe] GSoC and Machine learning

2010-03-30 Thread Ketil Malde
Hi, Once upon a time, I proposed a GSoC project for a machine learning library. I still get some email from prospective students about this, whom I discourage as best I can by saying I don't have the time or interest to pursue it, and that chances aren't so great since you guys tend to prefer

Re: [Haskell-cafe] Where are the haskell elders?

2010-03-30 Thread Ketil Malde
Don Stewart d...@galois.com writes: I notice that posts from the Haskell elders are pretty rare now. Only every now and then we hear from them. I'm not sure who the 'elders' are, but generally grown-ups with a day time job (professorships, say) tend to be busy people, without much time for

Re: [Haskell-cafe] Re: Haskell-friendly Linux Distribution

2010-03-30 Thread Ketil Malde
Jason Dagit: The reason I started telling everyone to avoid GHC in apt was the way it was packaged. [..] If they are lucky they figure out which apt package to install. I think people who are too lazy to bother to find out how their distribution works, should avoid any distribution. %

Re: [Haskell-cafe] Re: Haskell-friendly Linux Distribution

2010-03-30 Thread Ketil Malde
Joachim Breitner nome...@debian.org writes: The profiling data is put in -prof packages, i.e. ghc-prof, libghc6-network-prof etc. Indeed, there is no easy way to tell the package system: Whenever I install a Haskell -dev package, please install the -prof package as well. One option might to

Re: [Haskell-cafe] Haskell-friendly Linux Distribution

2010-03-28 Thread Ketil Malde
Chris Dornan ch...@chrisdornan.com writes: I am choosing a Linux distribution for a production Haskell project and would would normally just go with Debian I think Debian (I use Ubuntu, which inherits its packages) just got a lot better. I upgraded to 10.4 Lucid, and now I have ghc 6.12.1 and

Re: [Haskell-cafe] Are there any female Haskellers?

2010-03-28 Thread Ketil Malde
Jochem Berndsen joc...@functor.nl writes: Could you point us to any evidence that supports your assumption that there are sexual differences in mathematical abilities? Luce Irigaray? (Amply butcherd by Sokal and Bricmont, or see e.g. http://www.absoluteastronomy.com/topics/Luce_Irigaray)

Re: [Haskell-cafe] Are there any gay haskelleres?

2010-03-28 Thread Ketil Malde
Günther Schmidt gue.schm...@web.de writes: are there any gay haskellers? Look, Günther, I'll give you credit for trying, but you might as well accept the fact that using Haskell isn't going to get you laid. Which is just as well, since this list is for discussing a certain programming

Re: [Haskell-cafe] Testing for valid data

2010-03-27 Thread Ketil Malde
michael rice nowg...@yahoo.com writes: When I'm learning a new language I like to translate old programs into the new language as a test of my understanding. However, many of the old programs are from old programming texts, many written in the time of punch-cards for batch processing, and

[Haskell-cafe] Mail threading

2010-03-24 Thread Ketil Malde
sorry. My mistake :-). I wanted to send to haskell-cafe, so I just pick up a mail thread and send reply. But I forgot to change the title. Don't do that! Your email contains headers like the following: In-Reply-To: ccd8be491003232152u60ed0396wc01eecd00c296...@mail.gmail.com References:

[Haskell-cafe] openFile and portability

2010-03-23 Thread Ketil Malde
Hi, For convenience, I often build binaries with -optl-static, and distribute them. Except for the slightly annoying necessity of adding -optl-pthread as well, this works great. Now I just upgraded my Ubuntu box from 9.10 (Karmic) to 10.4 (Lucid), and suddently static binaries refuse to work

Re: [Haskell-cafe] Re: Parallel Pi

2010-03-19 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: 3.06GHz Pentium 4, 2 cores. [I.e. a single-core hyperthreaded CPU] I have mixed results with parallelism, some programmes get a speed-up of nearly a factor 2 (wall-clock time), others 1.4, 1.5 or so, yet others take about the same wall-clock

Re: [Haskell-cafe] Space leak

2010-03-15 Thread Ketil Malde
Arnoldo Muller arnoldomul...@gmail.com writes: I am trying to use haskell in the analysis of bio data. One of the main reasons I wanted to use haskell is because lazy I/O allows you to see a large bio-sequence as if it was a string in memory. Funny you should mention it. I've written a

Re: [Haskell-cafe] How to do the permutation and combination thing?

2010-03-12 Thread Ketil Malde
Casey Hawthorne cas...@istar.ca writes: For example, I have this: list1 = [a, b, c] list2 = [d, e, f] list3 = [g, h, i] Think in abstract terms what you want to accomplish. A bit more specifically, let's say the input is a list of lists, and you want to produce all combinations of drawing

Re: [Haskell-cafe] Re: If wishes were horses...

2010-03-12 Thread Ketil Malde
Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: Well, meaningful identifier names is nice, but I think here we have a case of the code smell type info embedded in the name. Strictness of a function should be expressed in the function's type instead. I've stumbled into this sentiment

Re: [Haskell-cafe] First time haskell - parse error!

2010-03-10 Thread Ketil Malde
Miguel Mitrofanov miguelim...@yandex.ru writes: Maybe it's just me, but I think composition chain is MUCH easier to read. I definitely agree. [Cited from Learn You a Haskell for Great Good] oddSquareSum :: Integer oddSquareSum = sum . takeWhile (1) . filter odd . map (^2) $

Naming and coding style (was: [Haskell-cafe] First time haskell - parse error!)

2010-03-10 Thread Ketil Malde
Colin Adams colinpaulad...@googlemail.com writes: Named values are just like comments, which IMO also should be kept to a bare minimum.  A bit tongue in cheek: If you need a name to understand what a function does, or a comment to understand how it does it, then your code is too complicated.

Re: [Haskell-cafe] First time haskell - parse error!

2010-03-10 Thread Ketil Malde
Sebastian Fischer s...@informatik.uni-kiel.de writes: I do not agree that introducing names locally for compositions is *always* a bad idea, even if used only once. Well, of course I do that all the time too. :-) (Choosing names that are misleading or flat out wrong is of course always a

Re: [Haskell-cafe] First time haskell - parse error!

2010-03-10 Thread Ketil Malde
Stephen Tetley stephen.tet...@gmail.com writes: oddSquareSum :: Integer oddSquareSum = sum . takeWhile (1) . filter odd . map (^2) $ [1..] Why filter out the evens after generating them? In other words: sum . takeWhile (1) . filter odd . map (^2) $ [1..] Since odd (x^2) = odd x:

Re: [Haskell-cafe] First time haskell - parse error!

2010-03-09 Thread Ketil Malde
S. Doaitse Swierstra doai...@cs.uu.nl writes: then (s1 ++ s2 ++ s3 ++ s4) where s1 = Golds s2 = show (gold s g) s3 = , Silvers s4 = show (silver s g) If you want to keep the definitions local to the expression you should write

Re: [Haskell-cafe] Re: GPL answers from the SFLC

2010-03-07 Thread Ketil Malde
Stefan Monnier monn...@iro.umontreal.ca writes: What if a new library X' released under BSD or MIT license implements the X API (making possible to compile Y against it)? Can such a new library X' be licensed under something else than the GPL (we guess Yes because we don't think it is

Re: [Haskell-cafe] Prelude.undefined

2010-03-04 Thread Ketil Malde
Ivan Miljenovic ivan.miljeno...@gmail.com writes: GHC.Err.CAFTest: Prelude.undefined Are you matching all patterns? When compiling with -Wall does it make any complaints? How would this help? 'Prelude.undefined' happens because somewhere you're trying to evaluate a value defined with that

Re: [Haskell-cafe] Re: Function to detect duplicates

2010-02-26 Thread Ketil Malde
| Am Freitag 26 Februar 2010 00:57:48 schrieb Rafael Gustavo da Cunha Pereira | Pinto: | | There is a single 10 digit number that: | | 1) uses all ten digits [0..9], with no repetitions | 2) the number formed by the first digit (right to left, most | significant) is divisible by one | 3) the

Re: [Haskell-cafe] Re: Function to detect duplicates

2010-02-26 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de skrev: Am Freitag 26 Februar 2010 16:50:42 schrieb Ketil Malde: solutions = [[x1,x2,x3,x4,x5,x6,x7,x8,x9,x10] | x1 - [0..9] First digit can't be 0, so make it [1 .. 9]. Since you use the fact that the last digit must be the 0, pull all

Re: [Haskell-cafe] Haskell and XML, need some tips from practioners

2010-02-25 Thread Ketil Malde
Gregory Collins g...@gregorycollins.net writes: xml: http://hackage.haskell.org/package/xml hexpat: http://hackage.haskell.org/package/hexpat HXT: http://hackage.haskell.org/package/hxt HaXml: http://hackage.haskell.org/package/HaXml After experimenting with a couple of the above, I ended up

Re: [Haskell-cafe] Function to detect duplicates

2010-02-23 Thread Ketil Malde
Rafael Gustavo da Cunha Pereira Pinto rafaelgcpp.li...@gmail.com writes: First I used: noneRepeated=null.(filter (1)).(map length).group.sort But this seemed very unneficient, so I thought that I could detect the duplicates while sorting, and devised this: [...] 1) Is there any

Re: [Haskell-cafe] Linux ghci vs Windows ghci

2010-02-21 Thread Ketil Malde
Donghee Nah ppk...@gmail.com writes: I feel that ghci code executing speed in guest os is 1.5~2x faster than host os The code: let t n = do {if n `mod` 10 == 0 then print n else return ()} t (n+1) t 1 any clue? Speed of the terminal? Cost of syscalls (user/kernel transitions)? -k

Re: [Haskell-cafe] Seen on reddit: or, foldl and foldr considered slightly harmful

2010-02-11 Thread Ketil Malde
Johann Höchtl johann.hoec...@gmail.com writes: In a presentation of Guy Steele for ICFP 2009 in Edinburgh: http://www.vimeo.com/6624203 he considers foldl and foldr harmful as they hinder parallelism because of Process first element, then the rest Instead he proposes a divide and merge

Re: [Haskell-cafe] Using Cabal during development

2010-02-09 Thread Ketil Malde
Limestraël limestr...@gmail.com writes: how do usually Haskell developpers build their softwares (and especially medium or big libraries) while they are still developping them ? With cabal-install, by doing one 'cabal configure' once and 'cabal build' each time they have altered their code ?

Re: [Haskell-cafe] Links to darcs.haskel.org in the haskellwiki

2010-02-08 Thread Ketil Malde
Henk-Jan van Tuyl hjgt...@chello.nl writes: There are a lot of links in the haskellwiki that point to projects at darcs.haskel.org; I hope that anyone who moves a project, looks the links up and updates them. An example of a page with several obsolete links is I check my own pages once in a

Re: [Haskell-cafe] scheduling an alarm

2010-01-28 Thread Ketil Malde
Brian Denheyer bri...@aracnet.com writes: doEvent f usDelay = forkIO $ threadDelay usDelay doEvent f usDelay f There's a missing 'do' here, right? Infinite loop? yes, that is what you wanted. Memory gobbling? Why would you think that? Why would I think that ? doEvent f

Re: [Haskell-cafe] Linguistic hair-splitting

2010-01-28 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: It has been known to call such things 'computations', I think actions has been used, too, but perhaps mostly for things in IO and similar monads? as opposed to 'values', and even to separate the categories of types and expressions which

Re: [Haskell-cafe] scheduling an alarm

2010-01-28 Thread Ketil Malde
Thomas DuBuisson thomas.dubuis...@gmail.com writes: Yes - I said that in a later e-mail but it doesn't fix me violating my own peeve about non-functional code snippits on -cafe. I guess we're spoiled by the type checker catching all our mistakes. Since I recently discovered the new and

Re: [Haskell-cafe] Having a look at XMonad window manager

2010-01-19 Thread Ketil Malde
michael rice nowg...@yahoo.com writes: Perhaps. Is there a Linux distro that's more XMonad friendly? I use Ubuntu, in the GDM login screen, I get a drop down menu that includes Xmonad as an option. Even if Fedora doesn't have this, it probably has a Failsafe option that will just give you an

Re: [Haskell-cafe] Re: AlternativePrelude extension

2010-01-17 Thread Ketil Malde
Maciej Piechotka uzytkown...@gmail.com writes: However, the option to set language extension globally is still available, either as an option to the compiler when building, or in the cabal file describing the package. Hmm. Since the extensions should be specified in Cabal anyway (at least I

Re: [Haskell-cafe] Typed Configuration Files

2010-01-15 Thread Ketil Malde
Neil Mitchell ndmitch...@gmail.com writes: The CmdArgs manual might help: http://community.haskell.org/~ndm/darcs/cmdargs/cmdargs.htm Yes, this is what I used :-) Presenting examples is great, but gives me the hubris to rip off the example that seems to fit most closely, and modify it. This

<    1   2   3   4   5   6   7   8   9   10   >