[Haskell] Any interest in the 'biohaskell.org' domain?

2020-10-25 Thread Ketil Malde
Hi, Some years ago, I set up the biohaskell.org domain with mailing list, wiki, etc, in order to collect bioinformatics tools, utilities, and libraries written in our favorite languages. Time has moved on, and I with it, and I am no longer doing (much) bioinformatics, and (sadly) also less

Re: [Haskell-cafe] abs minBound (0 :: Int) negate minBound == (minBound :: Int)

2013-08-21 Thread Ketil Malde
fact 0 = 1 fact n = n * fact (n-1) Now I ran it as fact 100 with signature Int - Int and with Integer - Integer In the first case I got 0 in about 3 seconds [...] And if that sounds like a unreal argument, consider representing and storing Graham's number. So, since computers are

Re: [Haskell-cafe] abs minBound (0 :: Int) negate minBound == (minBound :: Int)

2013-08-20 Thread Ketil Malde
Richard A. O'Keefe o...@cs.otago.ac.nz writes: I think a better argument for twos complement is that you're just doing all of your computations modulo 2^n (where n is 32 or 64 or whatever), and addition and multiplication work as expected modulo anything. To me, that's not a better

Re: [Haskell-cafe] Compiling stringable with GHC 7.0.4

2013-08-20 Thread Ketil Malde
I took the liberty of implementing this fix and uploading stringable-0.1.1.1 to HackageDB. I tested it on GHC 7.0.4 (you know, shipped with the cutting-edge Fedora distribution one year ago, but ancient and no longer to be bothered with by Haskell standards :-) and on 7.6.2. -k Ketil Malde ke

[Haskell-cafe] GHC and backwards compatibility

2013-08-19 Thread Ketil Malde
I recently encountered the following problem: $ cabal install Resolving dependencies... Configuring array-0.4.0.1... Building array-0.4.0.1... Preprocessing library array-0.4.0.1... Data/Array/IArray.hs:1:14:

Re: [Haskell-cafe] GHC and backwards compatibility

2013-08-19 Thread Ketil Malde
Joe Q headprogrammingc...@gmail.com writes: This is definitely an issue with the array package not setting the right minimum versions. You should email the maintainer. Yes, that would be the thing to do, except that the maintainer is librar...@haskell.org, whom I believe does not accept

Re: [Haskell-cafe] ordNub

2013-07-16 Thread Ketil Malde
Francesco Mazzoli f...@mazzo.li writes: import qualified Data.HashSet as S nub :: Hashable a = [a] - [a] nub = S.toList . S.fromList Well, the above is not stable while Niklas’ is. But I guess that’s not the point of your message :). We could also implement Data.BloomFilter.nub, which

[Haskell-cafe] Possible GSoC project

2013-04-04 Thread Ketil Malde
Hi, I proposed a bioinformatics GSoC project involving Haskell using OSC as the mentoring organization. Typically, haskell.org projects concern infrastructure rather than applications, and I don't know if I'm allowed to submit both places :-) Anyway, as this is a likely place to find

Re: [Haskell-cafe] Possible GSoC project

2013-04-04 Thread Ketil Malde
Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk wrote: What would you say is the level of bioinformatics understanding that one would have to have to even consider applying? Not very much, some knowledge of string edit distance and dynamic programming would be good, but if not, it's something I can

Re: [Haskell-cafe] Lazy object deserialization

2013-03-15 Thread Ketil Malde
Scott Lawrence byt...@gmail.com writes: All the object serialization/deserialization libraries I could find (pretty much just binary and cereal) seem to be strict with respect to the actual data being serialized. Binary became strict between 0.4.4 and 0.5, I think doing so improved the

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ketil Malde
Ertugrul Söylemez e...@ertes.de writes: People are using Hackage! +1. And I keep telling people to use it. Sure, it'd be better if they used .debs, .rpms, or whatever goes on Mac and Windows. But that would mean I would need to build those packages, including maintaining systems with the

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ketil Malde
Vincent Hanquez t...@snarc.org writes: On 01/31/2013 08:16 AM, Ketil Malde wrote: At least that way, I would be notified if it happened to my packages, and I would be able to check up on the situation, and rectify it. you wouldn't in real cases, I wouldn't what? Be notified? Rectify

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ketil Malde
Ertugrul Söylemez e...@ertes.de writes: And that may even be more harmful, because an insecure system with a false sense of security is worse than an insecure system alone. Yes. As is clear to all, the current low level of security means that nobody are _actually_ downloading stuff of

Re: [Haskell-cafe] containers license issue

2012-12-17 Thread Ketil Malde
Mike Meyer m...@mired.org writes: Niklas Larsson metanik...@gmail.com wrote: 2012/12/15 Mike Meyer m...@mired.org: Only if Tanenbaum documented the internal behavior of Linux before it was written. Tannenbaum wrote Minix, the operating system that Linus used (and hacked on) before he did

Re: [Haskell-cafe] containers license issue

2012-12-17 Thread Ketil Malde
Mike Meyer m...@mired.org writes: As it's commonly understood, reverse engineering doesn't involve looking at the code. I guess I should make it clear that I don't use it in the strict sense - I would call that clean-room reverse engineering. (I'm not sure which is the most commonly

Re: [Haskell-cafe] containers license issue

2012-12-15 Thread Ketil Malde
Clark Gaebel cgae...@uwaterloo.ca writes: I just did a quick derivation from http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 A copyrighted work, you say? to get the highest bit mask, and did not reference FXT nor the containers implementation. Here is my code: If

Re: [Haskell-cafe] containers license issue

2012-12-15 Thread Ketil Malde
Ketil Malde ke...@malde.org writes: I just did a quick derivation from http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 A copyrighted work, you say? Whoops, public domain, according to itself. Of course, there's no way to tell if the author read similar copyrighted

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-16 Thread Ketil Malde
Aleksey Khudyakov alexey.sklad...@gmail.com writes: Adding more restrictive constraints does not work, the broken package will be on hackage forever, while adding a new version with relaxed constraints works well. That illustrate real problem It's not possible to specify correct version

Re: [Haskell-cafe] Hard drive thrashing with modern controllers

2012-11-12 Thread Ketil Malde
timothyho...@seznam.cz writes: import Control.Monad foo = do forever $ writeFile filename.foo Hello world! I could be wrong, but I suspect this is unlikely to result in (hardly) any disk operations at all, as long as there is _any_ write caching in the system. will that destroy those

Re: [Haskell-cafe] Does anyone know where George Pollard is?

2012-11-08 Thread Ketil Malde
Myles C. Maxfield myles.maxfi...@gmail.com writes: Does anyone know where he is? On GitHub? https://github.com/Porges One of the repos was apparently updated less than a week ago. If not, is there an accepted practice to resolve this situation? Should I upload my own 'idna2' package? You

Re: [Haskell-cafe] Over general types are too easy to make.

2012-09-02 Thread Ketil Malde
timothyho...@seznam.cz writes: case largeMultiConstructorTypedValue of Foo{blah=blah,brg=brg} - Some large block... Bar{lolz=lolz,foofoo=foofoo} - ...Another large block... Frog{legs=legs,heads=heads} - Yet another large block... Where the obvious re-factor is: case

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-16 Thread Ketil Malde
Bryan O'Sullivan b...@serpentine.com writes: I propose that the sense of the recommendation around upper bounds in the PVP be reversed: upper bounds should be specified *only when there is a known problem with a new version* of a depended-upon package. Another advantage to this is that it's

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Ketil Malde
AntC anthony_clay...@clear.net.nz writes: I agree. I don't declare operators very often, and when I do I always struggle to remember which way round the precedence numbers go. [...] (Anything else we can bikeshed about while we're at it?) infixl * before + Perhaps before and after

Re: [Haskell-cafe] mutable arrays of tuples

2012-08-09 Thread Ketil Malde
David Feuer david.fe...@gmail.com writes: So I was thinking about a mutable array of tuples, but to avoid allocating tuples to modify their fields, I guess I really want an immutable array of tuples of STRefs. Just how much less efficient is this than a plain mutable array? might it even make

Re: [Haskell-cafe] Knight Capital debacle and software correctness

2012-08-04 Thread Ketil Malde
Vasili I. Galchin vigalc...@gmail.com writes: I am going to make an assumption except for Jane Street Capital all/most Wall Street software is written in an imperative language. Tsuru Captial and Standard Chartered are also known to hire functional programmers. Assuming this

Re: [Haskell-cafe] ghci session slows down over time.

2012-06-25 Thread Ketil Malde
Jonathan Geddes geddes.jonat...@gmail.com writes: Is this a known issue? More importantly, is there a known workaround? My experience is that ghci (typically run as an inferior Emacs process) often retains a lot of memory. Thus, I occasionally kill and restart it. (Not sure if that counts as a

Re: [Haskell-cafe] Install a script with Cabal?

2012-06-05 Thread Ketil Malde
Rogan Creswick cresw...@gmail.com writes: I have a small project that installs a couple of Haskell tools and a script that uses these. Cabal will of course build and install the Haskell programs, but how can I get Cabal to install the script as well? There's a host of UserHooks available¹,

Re: [Haskell-cafe] Need inputs for a Haskell awareness presentation

2012-06-01 Thread Ketil Malde
C K Kashyap ckkash...@gmail.com writes: c) Where's my inheritance? I was of the impression that OO has crawled our way, for instance frowing upon (implementation) inheritance and mutable data structures. Maybe you could find appropriate references? Lots of language development these days

Re: [Haskell-cafe] Most Important GHC extensions to learn/use?

2012-06-01 Thread Ketil Malde
wren ng thornton w...@freegeek.org writes: There are a bunch which are mostly just syntax changes. The important ones are: Also, if you have new GHC, it will often tell you if/when you need to enable extensions. E.g.: Line 8: 1 error(s), 0 warning(s) `Pos' has no constructors

Re: [Haskell-cafe] A functional programming solution for Mr and Mrs Hollingberry

2012-05-27 Thread Ketil Malde
Andreas Pauley apau...@gmail.com writes: Do you know of an exercise where classes would add value? Something fairly small, roughly similar in size to this exercise. AFAICR, the motivating example for OO (in Simula) was simulating an environment where different entities interact - I think the

Re: [Haskell-cafe] Parallel cooperative multithreading?

2012-05-24 Thread Ketil Malde
Benjamin Ylvisaker benjam...@fastmail.fm writes: The paper discusses implementations in Lua, C++ and C, but I think Haskell could be an awesome substrate for such a framework. Has anyone thought about this? I'm not convinced this will be better than using STM - the critique against STM seems

Re: [Haskell-cafe] darcs patch dependencies in dot format

2012-05-14 Thread Ketil Malde
Sönke Hahn sh...@cs.tu-berlin.de writes: On 05/13/2012 03:13 AM, Felipe Almeida Lessa wrote: Truly amazing! Yes, nice work! I wonder it would fare with larger repositories. =) It does not scale well. [...] Somehow related questions are: What am I going to do with a dot-graph, that has

Re: [Haskell-cafe] Printing call site for partial functions

2012-04-30 Thread Ketil Malde
Michael Snoyman mich...@snoyman.com writes: I had a bug in a site of mine[1] for a few weeks, where it would just print: Prelude.head: empty list It took a long time to track down the problem +1: I've been arguing this for something like ten years :-) One half-baked quasi-solution is

Re: [Haskell-cafe] static linking with ghc?

2012-04-25 Thread Ketil Malde
Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: A similar thing is mentioned here (see Caveat) http://www.haskell.org/haskellwiki/Web/Literature/Static_linking Another caveat is that shared linking isn't very useful on Linux, since the C library loads various stuff dynamically anyway.

Re: [Haskell-cafe] blog software in Haskell?

2012-03-30 Thread Ketil Malde
Reviving an old thread, since I owe some answers: Jason Dagit dag...@gmail.com writes: If you find a cool solution, let us know. I ended up with hakyll, but haven't had a lot of time to work on this. Here are some small tweaks, though -- partly framed as a response to Twan van Laarhoven's

Re: [Haskell-cafe] adding the elements of two lists

2012-03-29 Thread Ketil Malde
Richard O'Keefe o...@cs.otago.ac.nz writes: newtype PS a = PS [a] deriving (Eq, Show) u f (PS x)= PS $ map f x b f (PS x) (PS y) = PS $ zipWith f x y to_ps x = PS (x : repeat 0) BTW, isn't this a good candidate for an Applicative instance (similar to ZipList)? u f p

Re: [Haskell-cafe] a code that cannot compile with or without NoMonomorphismRestriction

2012-03-29 Thread Ketil Malde
Ting Lei tin...@hotmail.com writes: (f1, f2) = let commond_definitions = undefined in let f1 = id.show f2 x = ( x) in (f1, f2) I think the type signatures should be: f1 :: Show a = a - String and f2 :: Ord b = b - b - Bool When I define these

Re: [Haskell-cafe] Mathematics and Statistics libraries

2012-03-26 Thread Ketil Malde
Tom Doris tomdo...@gmail.com writes: If you're interested in UI work, ideally we'd have something similar to RStudio as an environment, a simple set of windows encapsulating an editor, a repl, a plotting panel and help/history, this sounds superficial but it really has an impact when you're

[Haskell-cafe] Install a script with Cabal?

2012-03-20 Thread Ketil Malde
Hi, I have a small project that installs a couple of Haskell tools and a script that uses these. Cabal will of course build and install the Haskell programs, but how can I get Cabal to install the script as well? There's a host of UserHooks available¹, but it'd probably be better to have an

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-17 Thread Ketil Malde
Ryan Ingram ryani.s...@gmail.com writes: You can emulate mutation with at most O(log(n)) penalty using a map. Given that memory is of fixed size, log2(n) = 64, so for real-world programs this becomes O(1). I'm not sure assuming fixed size memory is a good idea for a theoretical discussion -

Re: [Haskell-cafe] Empty Input list

2012-03-13 Thread Ketil Malde
Kevin Clees k.cl...@web.de writes: Now my function looks like this: tmp:: [(Int, Int)] - Int - (Int, Int) tmp [] y = (0,0) ^ tmp xs y = xs !! (y-1) If the function returns (0,0) it will blocked by another function. Personally, I think using special values like this is

Re: [Haskell-cafe] Global Arrays

2012-03-12 Thread Ketil Malde
Clark Gaebel cgae...@csclub.uwaterloo.ca writes: In Haskell, what's the canonical way of declaring a top-level array (Data.Vector of a huge list of doubles, in my case)? Performance is key in my case. The straightforward way would just be something like: globalArray :: V.Vector Double

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2012-03-09 Thread Ketil Malde
Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr writes: and the source of it power - if I might cite you - is that we don't see the difference between an object and the process which creates it. Interestingly, according to Wikipedia's article on type system: A type system associates a type

Re: [Haskell-cafe] xattr takeover

2012-02-13 Thread Ketil Malde
Deian Stefan haskell-c...@deian.net writes: I've been trying to get in touch with the maintainer (CC'd) about the xattr package for about a month. There are quite a few memory leaks (among other issues) for which I have a patch (see [1]). I would like to push the new version to Hackage, but

Re: [Haskell-cafe] Cabal-1.10.1.0 and bytestring-0.9.2.1 hackage problem.

2012-02-03 Thread Ketil Malde
Alan Pogrebinschi alan...@gmail.com writes: That Cabal-1.10.1.0 bug seems to be back, now with bytestring-0.9.2.1 just uploaded to hackage. Thanks for the link! I was banging my head on against the virtual wall, since all I'm getting is: % cabal install -v biopsl Reading

Re: [Haskell-cafe] Data newtype differences. Today: strictness

2012-01-24 Thread Ketil Malde
Yves Parès yves.pa...@gmail.com writes: I had for long thought that data and newtype were equivalent, but then I spotted some differences when it comes to strictness. data Test = Test Int newtype TestN = TestN Int Interesting. I'd thought that data Test = Test !Int and newtype Test

Re: [Haskell-cafe] black Wikipedia

2012-01-19 Thread Ketil Malde
John Meacham j...@repetae.net writes: now, you might say we can just move hackage out of the US This might actually make things worse. The President's office is against hurting US industry, and wants it to be mainly used to attack foreign sites. They will not only order takedowns, but use DNS

Re: [Haskell-cafe] STM atomic blocks in IO functions

2012-01-14 Thread Ketil Malde
Bryan O'Sullivan b...@serpentine.com writes: The question is a simple one. Must all operations on a TVar happen within *the same* atomically block, or am I am I guaranteed thread safety if, say, I have a number of atomically blocks in an IO function. If you want successive operations to see

Re: [Haskell-cafe] On the purity of Haskell

2012-01-01 Thread Ketil Malde
Chris Smith cdsm...@gmail.com writes: I wonder: can writing to memory be called a “computational effect”? If yes, then every computation is impure. I wonder if not the important bit is that pure computations are unaffected by other computations (and not whether they can affect other

Re: [Haskell-cafe] What happens if you get hit by a bus?

2011-12-16 Thread Ketil Malde
Michael Litchard mich...@schmong.org writes: One article addresses the question above. His answer was that he uses RoR which has a large community and he is therefore easily replaceable. My question, for freelancers in general, and web developers in particular is this: How do you address this

Re: [Haskell-cafe] Sharing on equality

2011-12-14 Thread Ketil Malde
Johan Brinch brin...@gmail.com writes: Can GHC eliminate one of two equal ByteStrings, when they are compared and turns out to be equal? Not in general, there is no guarantee that a is identical to b, just because a == b. Say i have a map, ByteString - Int. Data.Map.Map ByteString Int I

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Ketil Malde
Henrik Nilsson n...@cs.nott.ac.uk writes: Just like chatter and chattee, employer and employee, there is an iterator (usually as part of an enumerator/ee) and an iteratee. Thanks for the attempt to explain. But I, at least, remain mystified, and I agree with Douglas that the terminology is

Re: [Haskell-cafe] Poll: Do you want a mascot? -- please stop this

2011-11-24 Thread Ketil Malde
David Virebayre dav.vire+hask...@gmail.com writes: Also, this is café, right ? Aren't people subscribed to this list supposed to expect a broad range of topics ? I don't mind a broad range of topics, but using it to collect polls is IMHO abusing it. I guess I can dust off the killfiling

Re: [Haskell-cafe] A Mascot

2011-11-22 Thread Ketil Malde
serialhex serial...@gmail.com writes: On Tue, Nov 22, 2011 at 12:22 AM, Jeremy Shaw jer...@n-heptane.com wrote: - honey badger - can't beat that for 'robust' and 'fearless', http://www.youtube.com/watch?v=wPKlryXwmXk i think you were referring to this vid: Original channel with lots of

Re: [Haskell-cafe] [ANN] transformers-base, transformers-abort, monad-abort-fd

2011-11-18 Thread Ketil Malde
Felipe Almeida Lessa felipe.le...@gmail.com writes: It's funny how we, haskellers, find 'm' and 'b' descriptive names. I know many programmers who would cry after seeing this =). It takes a bit of practice to get used to, but then they really are descriptive. The trick is to keep the number

Re: [Haskell-cafe] A Mascot

2011-11-18 Thread Ketil Malde
John Meacham j...@repetae.net writes: People tend to concentrate on the lambda which cooresponds to the functional aspect of haskell when designing logos. Not nearly enough attention is paid to the other striking feature, the What about types? This is a distinguishing feature from many of

Re: [Haskell-cafe] blog software in Haskell?

2011-11-02 Thread Ketil Malde
Simon Michael si...@joyful.com writes: Did someone mention hakyll already? Yes, Mihai, but thanks for the link. I'll probably check it out when I'm back from vacation. Alistair: I'm already using gitit, but I think it's usage is a bit different. Jason: I know about the various services,

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-11-01 Thread Ketil Malde
Yitzchak Gale g...@sefer.org writes: Gregory Crosswhite wrote: could [Hackage] have a feature where when a working package breaks with a new version of GHC the author is automatically e-mailed? This would be nice. However, there would have to be a way for it to be turned on and off by the

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-11-01 Thread Ketil Malde
Max Bolingbroke batterseapo...@hotmail.com writes: This is where it stranded the last time, IIRC.  That sentiment makes me a bit uneasy; so you are the official maintainer of a package on Hackage, but you do not want to hear about it when it fails to compile? Don't forget that some packages

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-11-01 Thread Ketil Malde
. :-) it may cause some good packages not to be uploaded by people who are hesitant to agree to that. One solution could be to have a Maintainer field contain a name, but no email address? So I could do: Maintainer: Ketil Malde ke...@malde.org -- send email to me or Maintainer: Ketil

[Haskell-cafe] blog software in Haskell?

2011-10-31 Thread Ketil Malde
Hi, I just upgraded my server, and set up everything again. Except wordpress, as 1) I'm not too fond of its user interface, and 2) it's a big pile of PHP, difficult to keep updated, and basically a disaster waiting to happen (and in fact, it was hacked at one point). Before I enable it again,

[Haskell-cafe] STM program

2011-10-27 Thread Ketil Malde
Hi, Café, I'm playing with STM a bit, and did a small writeup. As I'm considering to submit it, uh, tomorrow, I was wondering if anybody would care to take a look? I'm especially nervous about the accuracy and clarity of my descriptions of monads and STM, which are terse and written in a

Re: [Haskell-cafe] Package documentation complaints -- and a suggestion

2011-10-25 Thread Ketil Malde
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: Right, but first we need to define what all those terms _mean_... and it's no good saying your package is stable if you change the API in a large-scale fashion every release. I think there are better criteria to use, like: - do exported

Re: [Haskell-cafe] Package documentation complaints -- and a suggestion

2011-10-25 Thread Ketil Malde
Max Rabkin max.rab...@gmail.com writes: This is useful information, but to call it stability is not only misleading, but it also prevents the package from using that field to indicate whether or not it is stable! Oh, right - I'm not much interested in the stability of a package. What I want

Re: [Haskell-cafe] Efficient mutable arrays in STM

2011-10-25 Thread Ketil Malde
Ben Franksen ben.frank...@online.de writes: An array of TVars is certainly *much* too inefficient for what I have in mind w.r.t. both memory and cpu time. You must be a lot more confident than I if you say this without benchmarking first. :-) IME, there are (at least) two possible problems

Re: [Haskell-cafe] ANN: diagrams 0.4

2011-10-24 Thread Ketil Malde
Rustom Mody rustompm...@gmail.com writes: I remember (vaguely) a 'live page' ie where one could enter (into the browser) changes to the diagrams code and see the results immediately. Is that page there? (Or am I mixing up with something else?) Chris Smith's web interface to Ben Lippmeier's

Re: [Haskell-cafe] hello Haskell

2011-10-24 Thread Ketil Malde
Tom Murphy amin...@gmail.com writes: Blocking/unsubscribing people based on their email provider seems... sort of impolite or unwelcoming. A greylist could work. Greylist, as in temporarily refuse a message, and wait for the sending mail server to retry? I don't see how it would work against

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-19 Thread Ketil Malde
Michael Snoyman mich...@snoyman.com writes: sense to try and pursue something like what you're suggesting, but I think the default Show (Vector Word8) should be the one most useful, most of the time, and I think the general consensus seems to be the current ByteString instance fits that role.

Re: [Haskell-cafe] The best way to call Java from Haskell?

2011-10-11 Thread Ketil Malde
Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr writes: Don't worry, my friend. Haskell is lazy, so there is no problem in handling those infinite modules. It will just take you an infinite amount of time before you get any money from such a work. But this is a general problem elsewhere as

Re: [Haskell-cafe] Three questions to graphviz

2011-10-10 Thread Ketil Malde
kaffeepause73 kaffeepaus...@yahoo.de writes: Thanks for the quick reply - it works now. - I wasted quite a bit time on this. Alternatively, you can turn on overloaded strings, which allows constructing text values (along with other types that are instances of IsString) from string constants.

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-05 Thread Ketil Malde
I don't know if this is relevant to your problems, but I'm currently struggling to get some performance out of a parallel - or rather, concurrent - program. Basically, the initial thread parses some data into an IntMap, and then multiple threads access this read-only to do the Real Work. Now,

Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package

2011-10-04 Thread Ketil Malde
Luis Cabellos cabel...@ifca.unican.es writes: * The main reason is that I'm not comfortable with the license you're using. The original code by Jeff Heard was BSD3 with an additional copyright notice. Your code is AGPL3. The GPL is known to cause problems with Haskell code due to cross

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-03 Thread Ketil Malde
sdiy...@sjtu.edu.cn writes: This has nothing to do with OOP or being imperative. It's just about types. Of course, it's not necessarily linked to OOP, but OO languages - to the extent they have types - tend towards ad-hoc polymorphism instead of parametric polymorphism. There are different

Re: [Haskell-cafe] Static linking for machines that don't have Haskell

2011-10-02 Thread Ketil Malde
Roshan James rpja...@umail.iu.edu writes: This gives me several warnings of the form: */usr/lib/haskell-packages/ghc6/lib/network-2.2.1.7/ghc-6.12.3/libHSnetwork-2.2.1.7.a(BSD.o): In function `sw4B_info':* *(.text+0x584c): warning: Using 'getservbyport' in statically linked applications

Re: [Haskell-cafe] mapM is supralinear?

2011-09-27 Thread Ketil Malde
Here's my feeble understanding of GC: 1. GC runs when after some specified amount of allocations 2. GC runs in time proportional to the live heap, which it needs to traverse. This means that for a long running mapM, like any other computation generating a long list, (1) GC will run a number

Re: [Haskell-cafe] instance Enum Double considered notentirelygreat?

2011-09-27 Thread Ketil Malde
Iavor Diatchki iavor.diatc...@gmail.com writes: last ([0.1, 0.2 .. 0.5]) == 0.5 False last (map fromRational [0.1, 0.2 .. 0.5]) == 0.5 True As Ross pointed out in a previous e-mail the instance for Rationals is also broken: last (map fromRational [1,3 .. 20]) 21.0 But only because it

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-21 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@googlemail.com writes: Btw, -0.0 can be problematic too. How so? As far as I can tell Ord and Eq treat it as equal to 0.0 in every way, Yes. Which can be inconvenient if you are interested in whether you got a -0.0, so if that's the case, you can't simply

Re: [Haskell-cafe] stack overflow pain

2011-09-21 Thread Ketil Malde
Tim Docker t...@dockerz.net writes: mapM_ applyAction sas Maybe you could try a lazy version of mapM? E.g., I think this would do it: import System.IO.Unsafe (unsafeInterleaveIO) : mapM' f = sequence' . map f where sequence' ms = foldr k (return []) ms k m m' =

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Ketil Malde
Chris Smith cdsm...@gmail.com writes: It would be a shame if we lost an occasionally useful and easy to read You forgot confusing? Expecting Enum to enumerate all inhabitants of a type seems very reasonable to me, and seems to hold for all non-floating point types. A numeric range [a..a+n]

Re: [Haskell-cafe] The applicative instances for Either?

2011-09-19 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@googlemail.com writes: Is there any information, or otherwise accessible source specifying exactly when this was changed, Checking the sources, it wasn't in base-4.2.0.2 (ghc-6.12.3), but it was in base-4.3.1.0 (ghc-7.0.2), so it was introduced with

[Haskell-cafe] The applicative instances for Either?

2011-09-17 Thread Ketil Malde
Hi, I have a program that makes use of the applicative instance for Either String. I used to define these instances locally, but at some point, they became part of Control.Applicative. I have limited the dependencies to 'base = 4', but apparently, some version 4s of base include this instance,

Re: [Haskell-cafe] Data structure

2011-09-01 Thread Ketil Malde
yrazes yra...@gmail.com writes: I want to compare data structure between Haskell, Java, Lisp and C. I am wondering if I could compare list comprehention in haskell with the vector class in Java, macros in common lisp and dynamic arrays in C. You /can/ compare them, of course, but they are

Re: [Haskell-cafe] ping haskell.org timeout

2011-08-26 Thread Ketil Malde
Jason Dagit dag...@gmail.com writes: Lots of servers turn off ICMP packet responses these days Because users don't really need error messages, that's privileged information for system administrators. Besides, if someone is trying to debug http protocol issues using ICMP, they're taking an

Re: [Haskell-cafe] ping haskell.org timeout

2011-08-25 Thread Ketil Malde
Jason Dagit dag...@gmail.com writes: On Thu, Aug 25, 2011 at 2:39 PM, Greg Fitzgerald gari...@gmail.com wrote: cabal update hangs.  ping haskell.org times out.  But haskell.org and hackage webpages are loading just fine.  What's going on? Lots of servers turn off ICMP packet responses these

Re: [Haskell-cafe] Invitation to connect on LinkedIn

2011-08-14 Thread Ketil Malde
Andrew Smith B.Sc(Hons),MBA asmith9...@gmail.com writes: I'd like to add you to my professional network on LinkedIn. Since LinkedIn tends to spam even more ambitiously than the other social network sites, I have a procmail rule sending any mail from Linkedin to /dev/null. But it doesn't work

Re: [Haskell-cafe] partial inheritance

2011-07-18 Thread Ketil Malde
Patrick Browne patrick.bro...@dit.ie writes: Is it possible to model partial inheritance using Haskell type classes? For example, if the class Bird has a flying method can we represent Penguins as a sub-class of Bird without a flying method? I'm not sure the question makes sense, if fly is a

Re: [Haskell-cafe] NLP libraries and tools?

2011-07-10 Thread Ketil Malde
Perhaps this is interesting? On the relationship between exploratory (a.k.a. sloppy or theoretical) and rigorous math. http://arxiv.org/pdf/math/9307227v1 -k -- If I haven't seen further, it is by standing in the footprints of giants ___

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Ketil Malde
[snip haskell@, leaving -café] Heinrich Apfelmus apfel...@quantentunnel.de writes: Do you know any *small GUI programs* that you would *like* to see *implemented with Functional Reactive Programming?* I don't know if this fits the bill, but a tool that I'd like to see is plotting for one or

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-08 Thread Ketil Malde
Max Bolingbroke batterseapo...@hotmail.com writes: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than 

Re: [Haskell-cafe] Diagnose stack space overflow

2011-07-08 Thread Ketil Malde
John Lato jwl...@gmail.com writes: I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? I'd like to point out that a stack-space overflow in Haskell isn't quite the

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-07-01 Thread Ketil Malde
Eugene Kirpichov ekirpic...@gmail.com writes: 2011/7/1 Heinrich Apfelmus apfel...@quantentunnel.de: Eugene Kirpichov wrote: I'm rewriting timeplot to avoid holding the whole input in memory, and naturally a problem arises: Plain old lazy lists? Heretic! :-) I generally have written a

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-16 Thread Ketil Malde
Dmitri O.Kondratiev doko...@gmail.com writes: Let me know if you would like opinions on Emacs vs vi! I know vi, but it is just that I got used to Emacs which is my main IDE for most PL that I work with and for many years already ) No, no! Stop, it was just a joke, really. I regret it

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-16 Thread Ketil Malde
John D. Ramsdell ramsde...@gmail.com writes: Developers should be using older versions of GHC because they cannot be sure users will have an up-to-date GHC. I wonder, how hard would it be to have, say Amazon images of various Linux distributions with ghc and cabal-install available?

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-15 Thread Ketil Malde
Dmitri O.Kondratiev doko...@gmail.com writes: Which platform - Mac OS X, Linux or Win32 is best for development with GHC today? I think most developers use Linux, which tends to ensure that more stuff will work there. Most developers will also tend to use recent versions of everything, so go

Re: [Haskell-cafe] Data.List / Map: simple serialization?

2011-06-10 Thread Ketil Malde
Dmitri O.Kondratiev doko...@gmail.com writes: xss2 - read `fmap` readFile output.txt Two questions: 1) Why to use 'fmap' at all if a complete file is read in a single line of text? Because it's not 'map', it's more generalized. So the argument ('read' here) is applied to whatever is

Re: [Haskell-cafe] Comment Syntax

2011-06-08 Thread Ketil Malde
Guy guytsalmave...@yahoo.com writes: Out of interest, is there any other language where the comment delimiter is invalid if immediately followed by a symbol? Another quaint example, in shell scripts, lines starting with '#' are comments, except when the first line starts with '#!'.

Re: [Haskell-cafe] Comment Syntax

2011-06-08 Thread Ketil Malde
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: And #! in the first line is also treated as a comment in Haskell code so that you can run it as a script. True. But then you're allowed to add arbitrary symbols after it, I think. At least, GHC seems happy about it. -k -- If I haven't

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Ketil Malde
Guy guytsalmave...@yahoo.com writes: Out of interest, is there any other language where the comment delimiter is invalid if immediately followed by a symbol? Perl has a rather infamous example where the comment syntax may depend on run-time properties - would that count? whatever / 25 ;

Re: [Haskell-cafe] Iteratees again

2011-06-03 Thread Ketil Malde
dm-list-haskell-c...@scs.stanford.edu writes: leaking file descriptors ...until they are garbage collected. I tend to consider the OS fd limitation an OS design error - I've no idea why there should be some arbitrary limit on open files, as long as there is plenty of memory around to store

Re: [Haskell-cafe] *GROUP HUG*

2011-06-03 Thread Ketil Malde
Michael Litchard mich...@schmong.org writes: I disagree. I'm by no means proficient in Haskell. And, I never bothered learning PHP. I will when I need to. PHP programmers are a dime a dozen. ..and since PHP programmers are a dime a dozen, any decent manager (who, after all, has an MBA and

  1   2   3   4   5   6   7   8   9   10   >