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

2009-03-28 Thread Ketil Malde
Jonathan Cast writes: >> i.e., that application's file decoding result should be an Either >> type that anticipates that the file encoding may be invalid. > This is pretty standard, I thought. Do people write Haskell file input > methods that are undefined (`throw exceptions') on invalid inputs

Re: [Haskell-cafe] Use unsafePerformIO to catch Exception?

2009-03-28 Thread Ketil Malde
Duncan Coutts writes: > Yes, grouping is the one where I most often find the need for head or > partial patterns. The function group produces a list of non-empty lists > but that is not reflected in the type. On the other hand, actually > reflecting it in the type would make it more awkward: > >

Re: [Haskell-cafe] Rational and % operator remix

2009-03-29 Thread Ketil Malde
michael rice writes: > cf2 :: Rational -> [Int] > cf2 a = let ai = floor a  <-- Doesn't this make ai an Int?   -Michael >     in >   if a == (toRational ai) >     then [ai] >     else ai : cf2 (1 / (a - ai)) One thing that you could try, is ghc

Re: [Haskell-cafe] Re: Darcs - dependencies between repositories (aka forests)

2009-03-30 Thread Ketil Malde
Peter Verswyvelen writes: > I don't think it is realistic to expect that for a project of medium to > large size that you work only with stable versions of modules (this would > exclude most packages on Hackage I guess). I think you're putting too much into "stable" here. IMO, anything put on H

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

2009-04-01 Thread Ketil Malde
Don Stewart writes: >> Rumor goes that this is very difficult to do with Darcs. Is this correct? > darcs unpull Or just cd to a different directory, and darcs get -t ? -k -- If I haven't seen further, it is by standing in the footprints of giants _

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

2009-04-02 Thread Ketil Malde
Peter Verswyvelen writes: > Forgetting to add a file can be a nasty one, since if you discover > that too late, the original file at patch time might not exist > anymore (how do you guys solve this? Just plain discipline I > guess?). I've done this once, but with the cabal dependencies, not darc

Re: [Haskell-cafe] Program using 500MB RAM to process 5MB file

2009-04-03 Thread Ketil Malde
lu...@die.net.au writes: > I'm relatively new to haskell so as one does, I am rewriting an > existing program in haskell to help learn the language. > However, it eats up all my RAM whenever I run the program. This typically happens to me when I parse large files and either am a) using a parser

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

2009-04-03 Thread Ketil Malde
Peter Verswyvelen writes: > Regarding these files that people forget to checkin. > Doesn't every project have a well define directory structure? Shouldn't the > "prefs/boring" file use this fact to encapsulate the rules of file inclusion > and exclusion? Isn't it safer to checkin too many files (

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

2009-04-06 Thread Ketil Malde
"Brandon S. Allbery KF8NH" writes: >>> I wonder when we'll get a good haskell virtual package on Debian? >> What would this package do? > Install ghc + all the little pieces of libghc6-cruft needed to get a > sane working environment? Sounds easy to do (after all, it's just an empty package wi

Re: [Haskell-cafe] Functions from Data.Hashtable

2009-04-08 Thread Ketil Malde
wren ng thornton writes: >> Data.HashTable.lookup :: HashTable key val -> key -> IO (Maybe val) >> Data.Map.lookup :: Ord key => key -> Map key val -> Maybe val > I'd guess it's due more to antiquity than to intention. I am fairly sure that FiniteMap, which preceeded Data.Map, had the same para

Re: [Haskell-cafe] Trying to write 'safeFromInteger'

2009-04-09 Thread Ketil Malde
Neil Mitchell writes: >> Other than using go and foo', what do people use in Haskell? I tend to use 'go' for recursive or iterative functions. Which I belive is the original dons idiom. I occasionally use foo', but it is all too easy to write foo when you mean foo', and, which is worse, it occ

Re: [Haskell-cafe] Sequence differences

2009-04-10 Thread Ketil Malde
michael rice writes: > map :: (a -> b) -> [a] -> [b]    <==  I'm assuming this is correct This is the type of 'map', yes. Btw, ou can check types in GHCi with the :i command. > s f ls > > seems much like > > map f ls > > but instead looks like   > > s :: (a -> a -> a) -> [a] -> [a] If you l

Re: [Haskell-cafe] Best text editor

2009-04-13 Thread Ketil Malde
Michael Mossey writes: > I'm a beginner, but I'll chime in and say I use Emacs with > haskell-mode. It's auto-indentation is a bit complex in behavior which > is unappealing (I feel like I never know what it's going to do when I > hit tab), but I would be curious what someone with more experience

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

2012-01-01 Thread Ketil Malde
Chris Smith 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 computations). Many pu

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

2012-01-14 Thread Ketil Malde
"Bryan O'Sullivan" 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 a consis

Re: [Haskell-cafe] black Wikipedia

2012-01-19 Thread Ketil Malde
John Meacham 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 and ICANN to enf

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

2012-01-24 Thread Ketil Malde
Yves Parès 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 = Test Int wou

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

2012-02-03 Thread Ketil Malde
Alan Pogrebinschi 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 available packages...

Re: [Haskell-cafe] xattr takeover

2012-02-13 Thread Ketil Malde
Deian Stefan 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 the etiquette > for

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

2012-03-09 Thread Ketil Malde
Jerzy Karczmarczuk 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 with each computed value

Re: [Haskell-cafe] Global Arrays

2012-03-12 Thread Ketil Malde
Clark Gaebel 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 > globalArray = V.fromLis

Re: [Haskell-cafe] Empty Input list

2012-03-13 Thread Ketil Malde
Kevin Clees 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 a cod

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

2012-03-16 Thread Ketil Malde
Ryan Ingram 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 - your computer i

[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 exa

Re: [Haskell-cafe] Mathematics and Statistics libraries

2012-03-26 Thread Ketil Malde
Tom Doris 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 exploring a data

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

2012-03-29 Thread Ketil Malde
"Richard O'Keefe" 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 = f <$> p

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

2012-03-29 Thread Ketil Malde
Ting Lei 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 separately, this

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

2012-03-30 Thread Ketil Malde
Reviving an old thread, since I owe some answers: Jason Dagit 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 recent post: htt

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

2012-04-25 Thread Ketil Malde
Johannes Waldmann 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. It'd be great to be able to

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

2012-04-30 Thread Ketil Malde
Michael Snoyman 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 to use: #define

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

2012-05-14 Thread Ketil Malde
Sönke Hahn 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 more than 500 v

Re: [Haskell-cafe] Parallel cooperative multithreading?

2012-05-23 Thread Ketil Malde
Benjamin Ylvisaker 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 (as always) not to

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

2012-05-27 Thread Ketil Malde
Andreas Pauley 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 case was queues i

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

2012-06-01 Thread Ketil Malde
C K Kashyap 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 seems to be looking

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

2012-06-01 Thread Ketil Malde
wren ng thornton 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 (-XEmptyDataDecls permits

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

2012-06-05 Thread Ketil Malde
Rogan Creswick 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¹, but it'd prob

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

2012-06-25 Thread Ketil Malde
Jonathan Geddes 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 workaround :-) -k -- I

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

2012-08-04 Thread Ketil Malde
"Vasili I. Galchin" 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 why is Wall St

Re: [Haskell-cafe] mutable arrays of tuples

2012-08-09 Thread Ketil Malde
David Feuer 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 sense to use para

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Ketil Malde
AntC 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" clearer than "higher" a

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

2012-08-16 Thread Ketil Malde
"Bryan O'Sullivan" 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 not always clear

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

2012-09-02 Thread Ketil Malde
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 largeMultiConstructor

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

2012-11-08 Thread Ketil Malde
"Myles C. Maxfield" 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 can always upload a

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 tho

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

2012-11-16 Thread Ketil Malde
Aleksey Khudyakov 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 constraints when pack

Re: [Haskell-cafe] containers license issue

2012-12-15 Thread Ketil Malde
Clark Gaebel 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 copyright follows rei

Re: [Haskell-cafe] containers license issue

2012-12-15 Thread Ketil Malde
Ketil Malde 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 copyr

Re: [Haskell-cafe] containers license issue

2012-12-17 Thread Ketil Malde
Mike Meyer writes: > Niklas Larsson wrote: >>2012/12/15 Mike Meyer : >>> 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 Linux. Minix contained lots of features

Re: [Haskell-cafe] containers license issue

2012-12-17 Thread Ketil Malde
Mike Meyer 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 understood" meani

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ketil Malde
Ertugrul Söylemez 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 respective O

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ketil Malde
Vincent Hanquez 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

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ketil Malde
Ertugrul Söylemez 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 Hackage, thank God

Re: [Haskell-cafe] Lazy object deserialization

2013-03-15 Thread Ketil Malde
Scott Lawrence 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 speed of GHC.

[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 prospectiv

Re: [Haskell-cafe] Possible GSoC project

2013-04-04 Thread Ketil Malde
Mateusz Kowalczyk 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 straighten out with a

Re: [Haskell-cafe] Re: "Haskell is a scripting language inspired by Python."

2010-11-05 Thread Ketil Malde
"Richard O'Keefe" writes: > Automatically? Probably not. >> Like biologist can determine the distance between two genotypes, and >> determine a hierarchy between species from that. I'm going to say the same as Richard, only differently. For computer languages, we can't observe the genotype,

Re: [Haskell-cafe] Re: "Haskell is a scripting language inspiredby Python."

2010-11-05 Thread Ketil Malde
Luke Palmer writes: > To us, scripting meant short, potent code that rolled off your > fingers and into the computers mind, compelling it to do your job with > reverence to the super power you truly are. Just when I thought, oh, there are two definitions for "scripting language", another one po

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-10 Thread Ketil Malde
John Smith writes: > Type-directed name resolution, as originally proposed for Haskell', > has now been proposed for GHC. Obvious benefits of this are Does that mean all the questions have been resolved? Can this be shown to interact sanely with type classes and GADTs, etc? I couldn't find a

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-10 Thread Ketil Malde
Neil Brown writes: > I wonder if special syntax is actually needed for this. +1 I think there are two issues here: 1) resolving ambiguities using types, and 2) inventing a new syntax¹ for it. It's not clear that these are at all dependent on each other. > How much of the language would be b

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-10 Thread Ketil Malde
"Richard O'Keefe" writes: >> it is often desirable to have the same field names >> for many records in the same module. > I'm not sure that it is desirable to have "many records in the > same module" in the first place. One possibility might be to allow mulitple module definitions in the same f

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-11 Thread Ketil Malde
Dan Doel writes: > You'd lose the whole notion of 'the category of haskell types and functions' > goodbye, too. Does f . id = f? Not if the former serializes as "f . id". ..and you are able to tell the difference. Am I wrong in thinking that this could be made to work if serialization was to/f

Re: [Haskell-cafe] Serialization of (a -> b) and IO a

2010-11-12 Thread Ketil Malde
"C. McCann" writes: > This was my first thought as well! However, reading to/from a file > would of course be in IO, at which point you'd be free to read the > file back in through normal means to get at the representation. So in > that respect, this is equivalent to (a -> b) -> IO String. IMO,

Re: [Haskell-cafe] Opportunity for Haskell porting to java at R&D labs in Bay Area, CA

2010-11-12 Thread Ketil Malde
David Fox writes: > I would hesitate to call it a terrible decision unless I had a good > idea of what the ratio of Java programmers to Haskell programmers was > out in the world. Just sayin... I'm not sure the ratio is very interesting, presumably they only need one or at most a few. Possibly

Re: [Haskell-cafe] Musings on type systems

2010-11-20 Thread Ketil Malde
Andrew Coppin writes: > Now here's an interesting thought. Haskell has "algebraic data > types". "Algebraic" because they are sum types of product types (or, > equivilently, product types of sum types). Now I don't actually know > what those terms mean, The quick rule to remember this that the s

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-11-25 Thread Ketil Malde
"Edward Z. Yang" writes: > Arguably the correct thing to do is to use GHC's hooks for > programatically specifying runtime options; unfortunately, because > this has to run /before/ any Haskell code starts, it's a bit > unwieldly Maybe what's needed is a way to allow certain RTS options to trick

Re: [Haskell-cafe] Re: Unable to install packages

2010-11-28 Thread Ketil Malde
Joachim Breitner writes: > I would not recommend using --global on Debian/Ubuntu-systems, as it > might interfere with packages installed by Debian. But 'cabal install --global' installs in /usr/local/, does it not? And official packages (i.e. debs) put stuff in /usr, so these would be separate.

Re: [Haskell-cafe] Re: Unable to install packages

2010-11-30 Thread Ketil Malde
Thanks for the clarification, the SICP article was something I feel I should have known, but did not. It seems to me that while there are *three* ways to install stuff: apt-get install, cabal install --global, and cabal install --user, there are just *two* ways things get installed, globally and

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-05 Thread Ketil Malde
Florian Lengyel writes: > Why is there even any consideration of some committee if someone wants to > mirror the Hackage site? Why not mirror the site? +1 Alright, Mr. Wiseguy," she said, "if you're so clever, you tell us what colour it should be." We can either let Dan set up a mirror, a

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-07 Thread Ketil Malde
Dan Knapp writes: > I agree that signed packages are a good idea. We should move with all > haste to implement them. But I'm not sure we want to hold up > everything else while we wait for that. IMO, mirroring is orthogonal to that, too. > That's also my take on a peer-peer repository, as I

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-07 Thread Ketil Malde
Brandon S Allbery KF8NH writes: >> IMO, mirroring is orthogonal to that, too. > Only if you consider security a minor or non-issue. What I mean is that you can mirror a repository regardless of whether packages are signed or not. > I'm tempted to say anyone who believes that on the modern In

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-08 Thread Ketil Malde
Darrin Chandler writes: >> It's not obvious to me that adding a mirror makes the infrastructure >> more more insecure. Any particular concerns? (I hope I qualify as >> naïve here :-) > If you run a mirror people will come to you for software to run on their > machines. I see a way to take adva

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-08 Thread Ketil Malde
Vincent Hanquez writes: > You have to start somewhere with security. Yes. And you should start with assessing how much cost and inconvenience you are willing to suffer for the improvement in security you gain. In this case, my assertion is that the marginal worsening of security by having a mi

Re: [Haskell-cafe] [Haskell] ANNOUNCE: genprog-0.1

2010-12-09 Thread Ketil Malde
Andrew Coppin writes: >> A change to a gene does not make you to have a extra bone. It can >> make you to have your hand slighltly longer. or shorter. > Actually I suspect it does - or at least can do. It's just a rather > rare event. Bodily development is regulated by a cluster of genes (the

Re: [Haskell-cafe] [Haskell] ANNOUNCE: genprog-0.1

2010-12-09 Thread Ketil Malde
Mitar writes: >> Neither Haskell nor any conventional language has [evolved to evolve] > True. Well - thinking about it, there's no fundamental difference between genetic algorithms - where you have a "genome" in the form of a set of parameters and genetic programming - where the "genome" is a

Re: [Haskell-cafe] dot-ghci files

2010-12-09 Thread Ketil Malde
Tony Morris writes: > I teach haskell quite a lot. I recommend using .ghci files in projects. > Today I received complaints about the fact that ghci will reject .ghci > if it is group-writeable. Huh? That's pretty weird. > I am wondering if these complaints have legitimate grounds i.e. maybe >

[Haskell-cafe] Enhancing the security of hackage

2010-12-09 Thread Ketil Malde
Vincent Hanquez writes: > You might have misunderstood what I was talking about. I'm proposing > signing on the hackage server on reception of the package, Okay, fair enough. You can't *enforce* this, of course, since I might work without general internet access but a local mirror, but you coul

[Haskell-cafe] Rather off topic: An ab initio universe simulation?

2010-12-09 Thread Ketil Malde
In order to simulate nature, you need to have the mutation and selection process itself be part of the programs (and not the interpreter). How about you have a "world" consisiting of some memory, bombard this world with "cosmic radiation", and add some "enzymatic activity" in the form of an inter

Re: [Haskell-cafe] Rather off topic: An ab initio universe simulation?

2010-12-09 Thread Ketil Malde
Michael Lesniak writes: > Hence the interpreter can itself be modified? Well - the interpreter in nature is chemistry. Living organisms are just chemistry programs. -k -- If I haven't seen further, it is by standing in the footprints of giants ___

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-16 Thread Ketil Malde
Simon Marlow writes: > ulimit is a good way to catch an infinite loop. But it's not a good > way to tell GHC how much memory you want to use - if GHC knows the > memory limit, then it can make much more intelligent decisions about > how to manage memory. I'm interpreting this to mean that GHC

Re: [Haskell-cafe] Cabal message problem.

2010-12-16 Thread Ketil Malde
Daniel Fischer writes: > Or: it breaks with a bug introduced in 3.4.6 which hasn't yet been fixed. This is an important point, I think: API breakages are not always intentional. Except for base, I generally don't specify upper bounds (well, maybe this is laziness on my part as well), unless I k

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-17 Thread Ketil Malde
"John D. Ramsdell" writes: >> In absence of any explicit limits, I think a sensible default is to set >> maximum total memory use to something like 80%-90% of physical RAM. > This would be a poor choice on Linux systems. As I've argued > previously in this thread, the best choice is to limit th

Re: [Haskell-cafe] Haskell, Step by Step, Tutorial, Developing a Whole Application

2010-12-17 Thread Ketil Malde
Mathijs Kwik writes: > It's indeed hard to really explain what I feel is missing. I think the basics are well covered, with lots of introductory and tutorial material available. The advanced stuff is very abstract and general, and the difficult part is developing an intuition for how and when t

Re: [Haskell-cafe] [URGENT] DNS problems at haskell.org?

2010-12-18 Thread Ketil Malde
Karel Gardas writes: > http://www.reddit.com/r/haskell/comments/encrv/whats_happened_to_haskellorg_did_someone_forget/c19guw1 Quoth dons: | The domain name was seized by Network Solutions (it wasn't due to | expire until this time next year). The confusion seems to be that | while Yale was the

Re: [Haskell-cafe] [darcs-users] Darcs failure

2010-12-26 Thread Ketil Malde
Andrew Coppin writes: >> but you should look into the pkill >> command, which allows you to kill processes (including sending signals >> other than SIGTERM) by name. It's installed by default on Ubuntu. Or 'killall'. Which has (had) the interesting namesake on Solaris which would indiscriminate

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Ketil Malde
Antoine Latter writes: >> openTempFile >>:: FilePath >>-> String >>-> IO (FilePath, Handle) My main discomfort with this is not the result type, but that the first argument appears different from the rest. I much prefer having the :: be attached to the identifier. FWIW. -k -- If I

Re: [Haskell-cafe] Type System vs Test Driven Development

2011-01-12 Thread Ketil Malde
Serge Le Huitouze writes: > So, do you have any "methodology" for such use cases? QuickCheck has the ==> operator, which lets you add a precondition. So you could limit the testing of your property to values that satisfy the precondition. An alternative is to use newtype with a custom generato

Re: [Haskell-cafe] Haskell, C and Matrix Multiplication

2011-01-17 Thread Ketil Malde
Blake Rain writes: > Here is the one in C: > > void multiplyM4 (float m1[4][4], float m2[4][4], float m3[4][4]) { > m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0] + > m2[0][3] * m3[3][0]; > m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1] +

Re: [Haskell-cafe] class-instance

2011-01-17 Thread Ketil Malde
Henning Thielemann writes: >> class PERSON a b where >> p1 :: a >> name :: a -> b A multi-parameter typeclass is a relation over types... >> instance PERSON Int String where >> p1 = 1 >> name p1 = "john" ^--note that this is just an unused paramter, it is clearer to spec

Re: [Haskell-cafe] class-instance

2011-01-17 Thread Ketil Malde
Patrick Browne writes: > I think the problem is there is just one constant p1 in the class and > there needs to be multiple constants in the implementation (one for each > person). It seems difficult to specify this using type classes So, some > data declaration as you suggest will probably be n

Re: [Haskell-cafe] Proposal: Applicative => Monad: Call for consensus

2011-01-25 Thread Ketil Malde
Erik Hesselink writes: >>> importing Control.Applicative >> main = print =<< liftM2 (+) readLn (return 3) >> [...] line noise > Why not just: > > main = print . (+3) =<< readLn Or using applicative: print =<< (+3) <$> readLn ? (Which separates the printing from the addition.) -k -- If I

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Ketil Malde
David Leimbach writes: > BSD3 doesn't really state anything about what it links with, but the GPL > injects itself into the tree of stuff it's linked with via the derivative > works clause. I'm not an IP lawyer either (thank God), but merely using a published interface does not make it a deriv

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-26 Thread Ketil Malde
Chris Smith writes: > I definitely interpret the license field in Cabal to refer to the terms > and conditions that govern distribution of the entire program or library > as a unit, including binaries. I disagree, I've always interpreted the license to cover the text in that particular package.

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-27 Thread Ketil Malde
Chris Smith writes: >> I disagree, I've always interpreted the license to cover the text in >> that particular package. > There seems to be a difference in focus here that's confusing to me. > When I write a library, my primary concern is generally with helping > others use that library I'm not

Re: [Haskell-cafe] Another Question

2011-02-03 Thread Ketil Malde
Navin Rustagi writes: > It gives the error ERROR - Control stack overflow. I assume it is > because of the lazy evaluation. Yes, you're just building a tower of additions, and when evaluating this, you blow up the stack. You need to make sure to evaluate the tuple element each time, so instead

Re: [Haskell-cafe] Byte Histogram

2011-02-07 Thread Ketil Malde
Johan Tibell writes: >> The GHC documentation says the information is in the interface files, >> but they are binary now, and I can't find it there. > ghc --show-iface HI_FILE > The strictness signatures are a bit hard to parse though. Having a > cheat sheet would be nice. Am I the only one wh

Re: [Haskell-cafe] Help needed for converting IOArray to ByteString

2011-02-08 Thread Ketil Malde
C K Kashyap writes: > I am currently using a list of tuples - [(Int,Int,Int)] to represent an > image buffer. [...] > Looks like this is pretty slow, Unsurprisingly, as there's a huge space overhead, and (depending on usage, but probably even worse) linear access time. > I wonder if working

Re: [Haskell-cafe] Byte Histogram

2011-02-08 Thread Ketil Malde
Gábor Lehel writes: > Is there any sensible meaning for bangs on return types? I've been > trying to think this through but not necessarily succeeding. Not knowing Clean in any detail, I've always just thought that a type signature of, say: something :: !Foo -> Bar would mean the sam

Re: [Haskell-cafe] Cabal && license combinations

2011-02-08 Thread Ketil Malde
Vivian McPhail writes: > Looking specifically at hmatrix, there are three kinds of modules > >i) bindings to GSLGPL >ii) bindings to LAPACK BSD >iii) pure Haskellhmatrix author's choice > > 1) Am I correct in thinking that even the bindings modules (the

Re: [Haskell-cafe] [Cabal-devel] Cabal && license combinations

2011-02-10 Thread Ketil Malde
Dan Knapp writes: > There is a legal distinction between static and dynamic linking, Well, the obvious distinction is that a dynamically linked executable doesn't actually contain any code from its libraries, while a statically linked one does. > In particular, they assert that you are legall

Re: [Haskell-cafe] [Cabal-devel] Cabal && license combinations

2011-02-11 Thread Ketil Malde
Chris Smith writes: > actually matter. The instant anyone actually compiles an application > that uses your library, however indirectly, they are bound by the terms There are other uses for code than compilation. Let's say I wrote a wrapper for a proprietary library that connects to Oracle dat

<    2   3   4   5   6   7   8   9   10   >