Re: [Haskell-cafe] Small syntax question

2006-02-13 Thread Ketil Malde
Maurício [EMAIL PROTECTED] writes: Why isn't this one [valid code]? module Main where main = do { let a = 3; return (); }; My guess is that the compiler is confused about whether you mean do let a = 3 return () or (your intended): do let a = 3

Re: [Haskell-cafe] Code completion? (IDE)?

2006-02-17 Thread Ketil Malde
Marc Weber [EMAIL PROTECTED] writes: I tried downloading, eclipse and the latest EcplipseFP zip file. I couldn't use the standard installer (Help- Add Features ..) because it didn't find anything.. Strange, that worked for me. From my quick look, Eclipse looks like a workable candidate.

Re: [Haskell-cafe] (Newbie Question) How to get the value of an IO String Monad?

2006-02-17 Thread Ketil Malde
Peter [EMAIL PROTECTED] writes: So, How am I supposed to get the value of an IO Monad, such as IO String, without returning an IO Monad? Short answer: you don't. IO is a one way street. Build your application top down in the IO monad (starting with 'main'), and bottom up with pure code,

Re: [Haskell-cafe] haskell question

2006-02-17 Thread Ketil Malde
IBRAHIM MOSHAYA [EMAIL PROTECTED] writes: I need to write a function to return a given number Homework assignment? Perhaps if you get stuck, you can post your best current effort, and people will be able to nudge you in the right direction? -k -- If I haven't seen further, it is by standing

Re: [Haskell-cafe] Re: Hashtable woes

2006-02-22 Thread Ketil Malde
Sebastian Sylvan [EMAIL PROTECTED] writes: I think you need to run the Fasta benchmark with N=25 to generate the input file for this benchmark... I made the file available at http://www.ii.uib.no/~ketil/knuc.input -k -- If I haven't seen further, it is by standing in the footprints of

Re: [Haskell-cafe] Layout rule

2006-02-28 Thread Ketil Malde
Brian Hulley [EMAIL PROTECTED] writes: You can't be serious. This would cause far more problems than the current rule. Why? Surely typing one tab is better than having to hit the spacebar 4 (or 8) times? What you type depends on your editor. I hit tab, and the editor inserts an appropriate

Re: [Haskell-cafe] Re: haskell programming guidelines

2006-03-01 Thread Ketil Malde
Christian Maeder [EMAIL PROTECTED] writes: That should correspond to your taste as well, although someone (ie. S.M.) proposed to disallow the dot as operator in haskell'. From http://hackage.haskell.org/trac/haskell-prime/wiki/CompositionAsDot: | We lose . as composition. Mostly this doesn't

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Ketil Malde
zell_ffhut [EMAIL PROTECTED] writes: Just wondering if anyone can help me with a Haskell problem im having. How would I get the value of, lets say, the 9th object in [4179355, 567412] ? You mean the ninth character in the concatenation of the list of strings? Concatenate the strings, and

Re: [Haskell-cafe] library sort

2006-03-08 Thread Ketil Malde
Neil Mitchell [EMAIL PROTECTED] writes: And a related question is: Which packages are searchable by Hoogle? The best answer to that is some. I intentionally excluded OpenGL and other graphics ones because they have a large interface and yet are not used by most people using Haskell. I'm not

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] 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: 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: 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-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] 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] 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] 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] Lambda-case / lambda-if

2010-10-04 Thread Ketil Malde
Max Bolingbroke batterseapo...@hotmail.com writes: [1] http://hackage.haskell.org/trac/haskell-prime/ticket/41 I tried to find anything about lambda-if in there, but failed (Trac and I aren't on very friendly terms, so it's probably my fault). Is there more information about the rationale and

Re: [Haskell-cafe] Lambda-case / lambda-if

2010-10-05 Thread Ketil Malde
Donn Cave d...@avvanta.com writes: I think you're not the first to ask. Just out of curiosity, or is there a use for these variations? Just that they seem to be natural generalizations. If it's just the single form of paramtrizing the condition, I think it's better served by a regular

Re: [Haskell-cafe] Big Arrays

2010-10-05 Thread Ketil Malde
Hemanth Kapila saihema...@gmail.com writes: Just out of curiosity, may I know a use case of such huge arrays? Bloom filters? At such sizes, I thought, the array would not have the expected array properties (constant access time) due to thrashing. Yes, but this is true for any array size,

Re: [Haskell-cafe] Big Arrays

2010-10-06 Thread Ketil Malde
Hemanth Kapila saihema...@gmail.com writes: Let us say, we are using a bit-array of size 2^43 (that is, a byte array of size 2^40) to store a bloom filter. And let us further assume that we are interested in a false-positive probability of 0.01 Since we are just making up numbers, let us

Re: [Haskell-cafe] Ordering vs. Order

2010-10-07 Thread Ketil Malde
Christian Sternagel c.sterna...@gmail.com writes: recently I was wondering about the two words order and ordering I would use ordering to mean the relation or function that orders (ranks) elements, and I'd use order to refer the actual progression. So by applying an ordering, you get elements

Re: [Haskell-cafe] Client-extensible heterogeneous types (Duck-typed variadic functions?)

2010-10-14 Thread Ketil Malde
Jacek Generowicz jacek.generow...@cern.ch writes: Let's say I need an Int - String. Both (fnA2 :: Banana - String) . (fnA1:: Int - Banana) and (fnB2 :: Onion - String) . (fnB1 :: Int - Onion) will do. So please allow me to store (fnA1, fnA2) and (fnB1, fnB2) in the same place.

Re: [Haskell-cafe] Client-extensible heterogeneous types (Duck-typed variadic functions?)

2010-10-14 Thread Ketil Malde
Jacek Generowicz jacek.generow...@cern.ch writes: def memoize(fn): cache = {} def memoized_fn(*args): if args not in cache: cache[args] = fn(*args) return cache[args] return memoized_fn Here's a simplified memoizer for Haskell: memoize :: (Integral t)

[Haskell-cafe] downloading GHC

2010-10-15 Thread Ketil Malde
I needed GHC on a new machine, and went to download a binary tarball. First, I go to http://haskell.org/ghc/download_ghc_6_12_3.html, which kindly suggests to get the Haskell Platform instead. Then, at http://hackage.haskell.org/platform/linux.html, I'm told that I first need GHC, and pointed

Re: [Haskell-cafe] Thunks

2010-10-15 Thread Ketil Malde
Bernie Pope florbit...@gmail.com writes: You can use side effects to observe the order of evaluation, by wrapping observed expressions (thunks) with some IO computation inside unsafePerformIO. Not what OP asks for, but I've used a variant of this as a rather hackish to provide progress

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Ketil Malde
Don Stewart d...@galois.com writes: First, I go to http://haskell.org/ghc/download_ghc_6_12_3.html, which kindly suggests to get the Haskell Platform instead. Then, at http://hackage.haskell.org/platform/linux.html, I'm told that I first need GHC, and pointed back to the GHC download page.

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Ketil Malde
Don Stewart d...@galois.com writes: Linux users don't have easy binary installers, usually. Speaking about which - this is made a lot more difficult than it need be due to the way libc doesn't work with statically linked executables. Basically, it seems to manually load hardwired dynamic

Re: [Haskell-cafe] downloading GHC

2010-10-16 Thread Ketil Malde
Brandon S Allbery KF8NH allb...@ece.cmu.edu writes: Linux users don't have easy binary installers, usually. What can we do about this bootstrapping problem? I thought the answer to that was supposed to be bug your distribution to package the Platform. In my case, it's more like bug the IT

Re: [Haskell-cafe] A rant against the blurb on the Haskell front page

2010-10-16 Thread Ketil Malde
Don Stewart d...@galois.com writes: Good start, if only the advanced were replaced with something more characteristic, like lazy, or statically typed. Which, BTW, both do not lazy and statically typed don't mean much to other people. They are buzz words that mean nothing to many people. But

Re: [Haskell-cafe] Haskell Weekly News: Issue 155 - October 20, 2010

2010-10-21 Thread Ketil Malde
Malcolm Wallace malcolm.wall...@me.com writes: might value HWN as a quick-summary catchup of community news. Can you resume posting HWN there as well please? s/as well/instead/g I'm always getting two copies of everything in haskell@, since everything is cross-posted to -cafe. Are there

Re: [Haskell-cafe] Haskell Weekly News: Issue 155 - October 20, 2010

2010-10-21 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: I have long been subscribed to -cafe but not to hask...@. Regarding why, I wasn't interested in what haskell@ was supposed to be for, while I was interested in what -cafe is for. The Wiki documents these lists as: hask...@haskell.org

Re: [Haskell-cafe] Re: Haskell Weekly News: Issue 155 - October 20, 2010

2010-10-22 Thread Ketil Malde
Peter Hercek pher...@gmail.com writes: I am. In part because I don't want to get two copies of everything, but in part because I'm lazy. This is my case too. As for as the amount of messages, who cares. Right. So the question is, what is (or should be) the contents of the messages that are

Re: [Haskell-cafe] On being called a troll

2010-10-28 Thread Ketil Malde
Antoine Latter aslat...@gmail.com writes: I have posted to this list for over 3 years now and until lately it was an enlightening experience. The responses to my questions have usually been helpful and friendly. Right - in most cases, the Haskell community is fanatically non-hostile. At least

Re: [Haskell-cafe] libffi mystery

2010-10-28 Thread Ketil Malde
Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com writes: Have you tried passing -optl-static to ghc (which causes -static to be passed to ld)? It used to be: -optl-static -optl-pthread But it doesn't seem to work anymore on my install. % ./a.out a.out:

Re: [Haskell-cafe] libffi mystery

2010-10-29 Thread Ketil Malde
Conor McBride co...@strictlypositive.org writes: ...seemed like a good plan. I got lots of scary warnings like (.text+0x51d8): warning: Using 'setprotoent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking I guess the message

Re: [Haskell-cafe] Edit Hackage

2010-10-30 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@web.de writes: On Saturday 30 October 2010 03:42:27, Ivan Lazar Miljenovic wrote: On 30 October 2010 12:22, Lauri Alanko l...@iki.fi wrote: On Thu, Oct 28, 2010 at 01:55:12PM -0700, Don Stewart wrote: The number of subscribers to the Haskell Reddit, for

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

2010-11-04 Thread Ketil Malde
Andrew Coppin andrewcop...@btinternet.com writes: On a somewhat tangental note: It seems increadible to me that Haskell was invented in 1990, and Miranda way back in 1985. At the same time, Commodore Business Machines released the iconic Commodore 64 in 1982, It is amazing - although as you

[Haskell-cafe] Concurrency and ghc 6.12.3

2010-11-04 Thread Ketil Malde
Hi, On experimenting with concurrency, I got somewhat surprising result. I have a program ('flower') that reads an input file and generates one or more output files. As the different output files are independent, I construct one IO action for each output requested on the command line, and just

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

2010-11-05 Thread Ketil Malde
Richard O'Keefe o...@cs.otago.ac.nz 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

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

2010-11-05 Thread Ketil Malde
Luke Palmer lrpal...@gmail.com 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,

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-10 Thread Ketil Malde
John Smith volderm...@hotmail.com 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,

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-10 Thread Ketil Malde
Neil Brown nc...@kent.ac.uk 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

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-10 Thread Ketil Malde
Richard O'Keefe o...@cs.otago.ac.nz 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

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

2010-11-11 Thread Ketil Malde
Dan Doel dan.d...@gmail.com 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

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

2010-11-12 Thread Ketil Malde
C. McCann c...@uptoisomorphism.net 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) -

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

2010-11-12 Thread Ketil Malde
David Fox dds...@gmail.com 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

Re: [Haskell-cafe] Musings on type systems

2010-11-20 Thread Ketil Malde
Andrew Coppin andrewcop...@btinternet.com 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

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-11-25 Thread Ketil Malde
Edward Z. Yang ezy...@mit.edu 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

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

2010-11-28 Thread Ketil Malde
Joachim Breitner m...@joachim-breitner.de 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

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 florian.leng...@gmail.com 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

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-07 Thread Ketil Malde
Dan Knapp dan...@gmail.com 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

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-07 Thread Ketil Malde
Brandon S Allbery KF8NH allb...@ece.cmu.edu 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

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-08 Thread Ketil Malde
Darrin Chandler dwchand...@stilyagin.com 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

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-08 Thread Ketil Malde
Vincent Hanquez t...@snarc.org 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

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

2010-12-09 Thread Ketil Malde
Andrew Coppin andrewcop...@btinternet.com 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

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

2010-12-09 Thread Ketil Malde
Mitar mmi...@gmail.com 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

Re: [Haskell-cafe] dot-ghci files

2010-12-09 Thread Ketil Malde
Tony Morris tonymor...@gmail.com 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

[Haskell-cafe] Enhancing the security of hackage

2010-12-09 Thread Ketil Malde
Vincent Hanquez t...@snarc.org 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,

[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

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

2010-12-09 Thread Ketil Malde
Michael Lesniak mlesn...@uni-kassel.de 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 marlo...@gmail.com 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

Re: [Haskell-cafe] Cabal message problem.

2010-12-16 Thread Ketil Malde
Daniel Fischer daniel.is.fisc...@googlemail.com 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

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-17 Thread Ketil Malde
John D. Ramsdell ramsde...@gmail.com 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

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

2010-12-17 Thread Ketil Malde
Mathijs Kwik bluescreen...@gmail.com 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

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

2010-12-18 Thread Ketil Malde
Karel Gardas karel.gar...@centrum.cz 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

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

2010-12-26 Thread Ketil Malde
Andrew Coppin andrewcop...@btinternet.com 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

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Ketil Malde
Antoine Latter aslat...@gmail.com 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

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

2011-01-12 Thread Ketil Malde
Serge Le Huitouze serge.lehuito...@gmail.com 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

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

2011-01-17 Thread Ketil Malde
Blake Rain blake.r...@gmail.com 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]

Re: [Haskell-cafe] class-instance

2011-01-17 Thread Ketil Malde
Henning Thielemann lemm...@henning-thielemann.de 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

Re: [Haskell-cafe] class-instance

2011-01-17 Thread Ketil Malde
Patrick Browne patrick.bro...@dit.ie 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

Re: [Haskell-cafe] Re: Cabal's default install location

2009-04-29 Thread Ketil Malde
Victor Nazarov asviraspossi...@gmail.com writes: This tradition of global and /usr/local for ./configure scripts is ok, but for a convenient package manager it's not necessarily ideal. Well, the system package manager uses /usr. But for locally compiled software, I don't see any good

Re: [Haskell-cafe] Generating random enums

2009-05-02 Thread Ketil Malde
Rahul Kapoor r...@trie.org writes: *Main toEnum 2 ghci does not know what type of enum you want to create from the number 2. Try: toEnum 2 :: DayOfWeek That said, I would expect toEnum 2 to give an error like: 'Ambiguous type variable `a''. So I am not sure why your error message says:

Re: [Haskell-cafe] applicative challenge

2009-05-05 Thread Ketil Malde
Thomas Hartman tphya...@gmail.com writes: That's slick, but is there some way to use interact twice in the same program? No :-) t10 = let f = unlines . takeWhile (not . blank) . lines in do putStrLn first time interact f putStrLn second time interact f

Re: [Haskell-cafe] calling a variable length parameter lambda expression

2009-05-05 Thread Ketil Malde
Nico Rolle nro...@web.de writes: A function is recieving a lambda expression like this: (\ x y - x y) or like this (\ x y z a - (x y) (z a) And the type of that function is..? my problem is now i know i have a list filled with the parameters for the lambda expression. but how can i

Re: [Haskell-cafe] Is Haskell a Good Choice for Web Applications? (ANN: Vocabulink)

2009-05-07 Thread Ketil Malde
Anton van Straaten an...@appsolutions.com writes: Exactly. I'm worried about, e.g. needing to use something as simple as a stream of [...] Haskell lets you easily create infinite lists, which is a powerful and useful feature. This has bit me on several occasions, and I think streaming over

Re: [Haskell] Re[2]: [Haskell-cafe] Is Haskell a Good Choice for WebApplications? (ANN: Vocabulink)

2009-05-08 Thread Ketil Malde
wren ng thornton w...@freegeek.org writes: FWIW, the JVM also fails to release memory resources back to the OS. Given all the problems I've seen that one cause for long-running processes, I'm definitely in support of correcting any behavior like this in the GHC RTS. I'm curious what real

Re: [Haskell-cafe] is value evaluated?

2009-05-08 Thread Ketil Malde
Nikhil Patil patil.nik...@gmail.com writes: I am curious to know if there is a function in Haskell to find if a certain value has already been evaluated. The function I need would have the type: (?!) :: a - Bool Well, obviously you can't do this, it would violate referential transparency.

The HP and PackedString (was: Re: [Haskell-cafe] Removing mtl from the Haskell Platform)

2009-05-13 Thread Ketil Malde
Not of the same gravity as mtl, but I was a bit surprised to see that PackedString was included, in spite of it being marked as deprecated on Hackage. Presumably, this is because some other library depends on this, but I think platform-blessing a deprecated library is a strange thing to do. If

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-25 Thread Ketil Malde
Duncan Coutts duncan.cou...@worc.ox.ac.uk writes: The PVP says: 1. If any entity was removed, or the types of any entities or the definitions of datatypes or classes were changed, or instances were added or removed, then the new A.B

Re: [Haskell-cafe] About the lazy pattern

2009-05-28 Thread Ketil Malde
张旭 stircrazyn...@hotmail.com writes: Hi, I am really new to haskell. I am reading A gentle instruction to haskell now. And I just cannot understand the chapter below. Is there anybody who can gives me some hints about why the pattern matching for client is so early? How does the pattern

Re: [Haskell-cafe] Data.Binary and little endian encoding

2009-05-29 Thread Ketil Malde
Duncan Coutts duncan.cou...@worc.ox.ac.uk writes: FWIW, I've used Data.Binary extensively and have found it a joy to work with. I've used it to serialize/deserialize ethernet packets in real time for a VPN implementation and have never had a problem. It's quite fast and robust. Is that code

Re: [Haskell-cafe] Missing a Deriving?

2009-05-30 Thread Ketil Malde
michael rice nowg...@yahoo.com writes: The following code is from Section 8.4.2, pgs. 111-112 (PDF paging) of YAHT. It compiles fine, but upon trying it I get the following error message. It seems to be trying to 'Show' the Computation class but I'm not sure where to put the 'Deriving'. My

Re: [Haskell-cafe] measure a function in ghci

2009-06-04 Thread Ketil Malde
Jason Dagit da...@codersbase.com writes: Be wary of timing things in GHCi. By default there are no optimizations in ghci so you could find that one implementation is much worse than the other but the situation might be completely different when optimizations are enabled. I'm pretty sure if

Re: [Haskell-cafe] Fast code question

2009-06-05 Thread Ketil Malde
Bartosz Wójcik bar...@sudety.it writes: myConcat' :: (Integral a) = Integer - [a] - [Integer] : myConcat' acc (x:xs) = case x `mod` 16 of : 10 - fail $ show acc 11 - fail $ show acc 14 - fail $ show acc

Re: [Haskell-cafe] Re: Non Empty List?

2009-06-05 Thread Ketil Malde
GüŸnther Schmidt gue.schm...@web.de writes: I need a data structure as in my example without the [] being possible to be empty. Well, a list can by definition be empty, so this is clearly impossible. The best you can do is to hide the constructors and have smart constructor functions that

Re: [Haskell-cafe] A small puzzle: inTwain as function of foldr

2009-06-05 Thread Ketil Malde
Martijn van Steenbergen mart...@van.steenbergen.nl writes: inTwain = foldr (\x (ls, rs) - if length ls == length rs then (x:ls, rs) else (x:(init ls), (last ls):rs)) ([], []) But this uses length and init and last all of which are recursive functions. I consider that cheating: only foldr

Re: [Haskell-cafe] A small puzzle: inTwain as function of foldr

2009-06-05 Thread Ketil Malde
Martijn van Steenbergen mart...@van.steenbergen.nl writes: inTwain as = let (x,y,_) = foldr (\a (r,s,t) - case (t) of {b:(b':bs) - (r,a:s,bs); _ - (a:r,s,t)}) ([],[],as) as in (x,y) This one is very interesting. Yes, neat. I'm not too happy with the whole list as part of the initial

Re: [Haskell-cafe] Re: Non Empty List?

2009-06-05 Thread Ketil Malde
MH mha...@gmail.com writes: data Container a = Many a(Container a) but here is what I don't understand (fyi, I am a beginner) how can you construct this container? I can do let a = Many somestring - and I will get back a function but I can not do let a = Many 'a' somestring - because the

Re: [Haskell-cafe] Change value of a variable

2009-06-07 Thread Ketil Malde
ptrash ptr...@web.de writes: I want to make something like a counter. I have written a recursive method which for example runs x times and counts how many times it runs, and also count some other thinks. Add the end I want a statistic about certain thinks returned by the method. Keep in mind

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