Re: [Haskell-cafe] Ticking time bomb

2013-02-03 Thread Richard O'Keefe
On 1/02/2013, at 3:32 PM, Kevin Quick wrote: Without details of git's trust/verification model, it's difficult to see how this particular SCM tool provides the trust capabilities being discussed any better than a more focused solution. Additionally, the use of git is also difficult for

Re: [Haskell-cafe] linking errors while compile hugs98 in macos

2013-02-03 Thread Richard O'Keefe
On 1/02/2013, at 6:19 PM, Brandon Allbery wrote: Probably you could, but the effort needed might be significant. In particular fixing things like environ see https://bugs.ruby-lang.org/attachments/2591/ruby-changes.patch for the kind of change you'll need to make, although I have to

Re: [Haskell-cafe] Most used functions in hackage

2013-02-03 Thread Richard O'Keefe
On 2/02/2013, at 7:05 AM, Rustom Mody wrote: Instead lets make a map (functor?) from learning the programming language Haskell to learning the natural language English. So I dont know English (and yeah there are Godelian anomalies in that statement) and I gather that vocabulary is a key to

Re: [Haskell-cafe] list comprehansion performance has hug different

2013-01-29 Thread Richard O'Keefe
On 29/01/2013, at 10:59 PM, Junior White wrote: So this is a problem in lazy evaluation language, it will not appear in python or erlang, am i right? Wrong. Let's take Erlang: [f(X, Y) || X - g(), Y - h()] Does the order of the generators matter here? You _bet_ it does. First off,

Re: [Haskell-cafe] category design approach for inconvenient concepts

2012-12-18 Thread Richard O'Keefe
On 19/12/2012, at 11:03 AM, Christopher Howard wrote: Since I received the two responses to my question, I've been trying to think deeply about this subject, and go back and understand the core ideas. I think the problem is that I really don't have a clear understanding of the basics of

Re: [Haskell-cafe] category design approach for inconvenient concepts

2012-12-17 Thread Richard O'Keefe
On 18/12/2012, at 3:45 PM, Christopher Howard wrote: Recently I read this article I happened across, about the categorical design pattern: http://www.haskellforall.com/2012/08/the-category-design-pattern.html It's basically the very old idea that an Abstract Data Type should be a nice

Re: [Haskell-cafe] Can cabal be turned into a package manager?

2012-12-13 Thread Richard O'Keefe
On 13/12/2012, at 7:12 PM, Rustom Mody wrote: On Thu, Dec 13, 2012 at 1:29 AM, Brandon Allbery allber...@gmail.com wrote: On Wed, Dec 12, 2012 at 12:51 PM, Andre Cunha andrecunha@gmail.com wrote: Janek, did you mean something like Rubygems (http://rubygems.org)? It manages the

Re: [Haskell-cafe] containers license issue

2012-12-13 Thread Richard O'Keefe
On 14/12/2012, at 7:45 AM, Christopher Howard wrote: Just thought I'd mention: It is possible for anyone involved in a FOSS project to get pro bono legal advice from the SFLC, from actual lawyers who are highly familiar with the legal aspects of FOSS licenses:

Re: [Haskell-cafe] education or experience?

2012-12-09 Thread Richard O'Keefe
On 10/12/2012, at 6:34 AM, Malcolm Wallace wrote: On 9 Dec 2012, at 16:31, Doug McIlroy wrote: In fact the FP community came late to some of these, just as programming languages at large came late to garbage collection. Lazy evaluation--at the heart of spreadsheets since the

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-25 Thread Richard O'Keefe
On 24/11/2012, at 5:26 PM, wren ng thornton wrote: On 11/20/12 6:54 AM, c...@lavabit.com wrote: Hello, I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level language into a small (core) language. Is it

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-22 Thread Richard O'Keefe
On 23/11/2012, at 1:56 AM, Jacques Carette wrote: On 20/11/2012 6:08 PM, Richard O'Keefe wrote: On 21/11/2012, at 4:49 AM, c...@lavabit.com wrote: Well, I don't know. Would it save some time? Why bother with a core language? For a high level language (and for this purpose, even Fortran

Re: [Haskell-cafe] Cabal failures...

2012-11-21 Thread Richard O'Keefe
Let's put some numbers on this. (1) In this country, you can buy a second-hand dual core desktop for NZD 200 (roughly USD 165, EUR 130). You can buy a new laptop for NZD 400 (roughly USD 330, EUR 260). Not fancy machines, but more than adequate to compile and build stuff. Shipping

Re: [Haskell-cafe] code length in Haskell, a comparison

2012-11-20 Thread Richard O'Keefe
On 20/11/2012, at 4:55 PM, Gregory Guthrie wrote: There is some interesting data in the article at: Code Length Measured in 14 Languages http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ basically comparing program lengths in various languages, and some

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Richard O'Keefe
On 21/11/2012, at 4:49 AM, c...@lavabit.com wrote: What would be the point in doing so? Well, I don't know. Would it save some time? Why bother with a core language? For a high level language (and for this purpose, even Fortran 66 counts as high level) you really don't _want_ a direct

Re: [Haskell-cafe] local type denotation

2012-11-14 Thread Richard O'Keefe
On 15/11/2012, at 1:03 AM, Serge D. Mechveliani wrote: Please, how to correctly set an explicit type for a local value in the body of a polymorphic function? Other people have told you how to do it. I'd like to tell you why you don't need to. Example (tested under ghc-7.6.1): data

[Haskell-cafe] Unicode case (in)stability and Haskell identifiers.

2012-11-02 Thread Richard O'Keefe
I've been putting together a proposal for Unicode identifiers in Erlang (it's EEP 40 if anyone wants to look it up). In the course of this, it has turned out that there is a technical problem for languages with case-significant identifiers. Haskell 2010 report, chapter 2.

Re: [Haskell-cafe] Optimal line length for haskell

2012-10-30 Thread Richard O'Keefe
On 30/10/2012, at 5:56 PM, Alexander Solla wrote: For example, I generally prefer using the combinators directly when dealing with functors, applicatives, and monads. This can be written wide, but it can also be written in the style of: f' = f $ (a = g) * (b = h) * (c

Re: [Haskell-cafe] Optimal line length for haskell

2012-10-29 Thread Richard O'Keefe
On 30/10/2012, at 3:28 AM, Alexander Solla wrote: On Mon, Oct 29, 2012 at 6:52 AM, Michael Orlitzky mich...@orlitzky.com wrote: In any language, a line longer than 80 characters usually (but not always) suggests that you might want to stop and rethink your design. In many cases a

Re: [Haskell-cafe] forkProcess, forkIO, and multithreaded runtime

2012-10-16 Thread Richard O'Keefe
The problems with forkProcess really are not Haskell's fault. You will find warnings in the documentation for C's fork(): There are limits to what you can do in the child process. To be totally safe you should restrict yourself to only executing async-signal safe

Re: [Haskell-cafe] How to take a minimum sub list that only contain certain number of elements of certain type?

2012-09-25 Thread Richard O'Keefe
2012/9/25 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com On 25 September 2012 16:51, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi, For example, I have an array [0..]. Now I want to take a sub list that starts from index 0, and only contain 4 odds, and is minimum

Re: [Haskell-cafe] How to take a minimum sub list that only contain certain number of elements of certain type?

2012-09-25 Thread Richard O'Keefe
On 26/09/2012, at 5:56 AM, Gwern Branwen wrote: On Tue, Sep 25, 2012 at 1:42 PM, Rishabh Jain rishab...@live.com wrote: f x 0 = [] f (x:xs) y | x `mod` 2 == 0 = x : (f xs y) | otherwise = x : (f xs (y-1)) f [0..] 4 [0,1,2,3,4,5,6,7] Tsk, tsk. So ugly. How's this: let f x = take x .

Re: [Haskell-cafe] How to take a minimum sub list that only contain certain number of elements of certain type?

2012-09-25 Thread Richard O'Keefe
On 26/09/2012, at 12:28 PM, Gwern Branwen wrote: On Tue, Sep 25, 2012 at 8:17 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: Wrong. The original poster gave an explicit example in which even elements were *retained* in the output, they just weren't *counted*. You are at least the fourth

Re: [Haskell-cafe] [ANNOUNCE] Fmark markup language

2012-09-18 Thread Richard O'Keefe
On 19/09/2012, at 12:04 AM, José Lopes wrote: Hello Richard, When you say (for) some people (...) you special syntax is not natural that's a good thing. I want these people involved in the project. I want to understand what they find natural in order to weigh the options and make a proper

Re: [Haskell-cafe] [ANNOUNCE] Fmark markup language

2012-09-18 Thread Richard O'Keefe
On 19/09/2012, at 1:43 AM, Stefan Monnier wrote: The problem with that is that some people DO end some headings with a full stop; for them your special syntax is not natural. Markdown/ReST is already using the no syntax idea (e.g. compared to pre-wiki markup such a LaTeX or Texinfo), so

Re: [Haskell-cafe] [ANNOUNCE] Fmark markup language

2012-09-17 Thread Richard O'Keefe
On 18/09/2012, at 3:09 PM, José Lopes wrote: Fmark (Friendly Markup) is a very simple markup language without syntax and simple but sophisticated document styling, capable of producing PDF and XML files. Do you _really_ mean without syntax? Nope, thought not: Fmark relies merely on

Re: [Haskell-cafe] [ANNOUNCE] Fmark markup language

2012-09-17 Thread Richard O'Keefe
On 18/09/2012, at 3:57 PM, José Lopes wrote: The problem with Fmark is also its greatest feature. While other markup languages introduce special syntactic characters to give meaning to the document's elements, I would like to take a different approach: I want to use characters that

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-16 Thread Richard O'Keefe
On 15/09/2012, at 5:14 AM, Chris Heller wrote: You might want to have a look at the time-recurrence package: http://hackage.haskell.org/package/time-recurrence For your simple cases you would do something like: Each second: starting (UTCTime ...) $ recur secondly Each minute:

Re: [Haskell-cafe] Build regressions due to GHC 7.6

2012-08-30 Thread Richard O'Keefe
On 30/08/2012, at 5:26 PM, Bryan O'Sullivan wrote: The reasons for these problems fall into three bins: • Prelude no longer exports catch, so a lot of import Prelude hiding (catch) had to change. This could have been avoided if import module hiding (importables) were

[Haskell-cafe] Sliding Window functional data structure

2012-08-30 Thread Richard O'Keefe
Consider the following interface type Ord k = Sliding_Window k v entries :: Sliding_Window k v - [(k,v)] The cost is expected to be linear in the length of the result. The pairs are listed in increasing order of k. add :: Ord k = k -

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-13 Thread Richard O'Keefe
On 13/08/2012, at 11:26 PM, Alexander Kjeldaas wrote: This isn't that hard - a pipe shouldn't be needed anymore. Just require a post-2003 glibc. fexecve is a system call in most BSDs. It is also implemented in glibc using a /proc hack. fexecve is now in the Single Unix

Re: [Haskell-cafe] 3 level hierarchy of Haskell objects

2012-08-08 Thread Richard O'Keefe
On 9/08/2012, at 11:11 AM, wren ng thornton wrote: Notably, a type class instantiated with all its arguments is not itself a type! All the comparisons of Haskell typeclasses with Java classes answered in one brief lucid sentence. ___

Re: [Haskell-cafe] What Haskell Records Need

2012-08-02 Thread Richard O'Keefe
On 2/08/2012, at 5:34 PM, Jonathan Geddes wrote: Ouch! And that's not even very deeply nested. Imagine 4 or 5 levels deep. It really makes Haskell feel clunky next to `a.b.c.d = val` that you see in other languages. I was taught that this kind of thing violates the Law of Demeter and that an

Re: [Haskell-cafe] Capturing the parent element as I parse XML using parsec

2012-07-29 Thread Richard O'Keefe
On 29/07/2012, at 6:21 PM, C K Kashyap wrote: I am struggling with an idea though - How can I capture the parent element of each element as I parse? Is it possible or would I have to do a second pass to do the fixup? Why do you *want* the parent element of each element? One of the insanely

Re: [Haskell-cafe] COBOL-85 parser, anyone?

2012-07-24 Thread Richard O'Keefe
On 25/07/2012, at 1:47 AM, S D Swierstra wrote: You can find a CFG at: http://www.cs.vu.nl/~x/grammars/vs-cobol-ii/index.html Thank you. I see it's closer to COBOL-85 than I realised. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] COBOL-85 parser, anyone?

2012-07-20 Thread Richard O'Keefe
Does anyone have a parser for COBOL-85 written in Haskell, or written using some freely available tool that communicates easily with Haskell? I don't need it _yet_, but I'm talking with someone who is trying to get access to a real legacy site with a bunch of, well, basically COBOL 85, but there

Re: [Haskell-cafe] stripSuffix

2012-07-17 Thread Richard O'Keefe
On 18/07/2012, at 12:37 PM, Brandon Allbery wrote: On Tue, Jul 17, 2012 at 8:33 PM, Alvaro Gutierrez radi...@google.com wrote: Pardon me if this has been answered before: how come there's a stripPrefix in Data.List, but no matching stripSuffix? Probably because prefixes are easier to do,

Re: [Haskell-cafe] Haskell-Cafe Digest, Vol 106, Issue 38

2012-06-26 Thread Richard O'Keefe
On 27/06/2012, at 12:51 PM, John Lato wrote: data Tree a = Leaf a | Branch (Tree a) ( Tree a) deriving (Foldable, Show) While I am familiar with deriving (Show), I am not familiar with deriving (Foldable), which looks rather useful.

Re: [Haskell-cafe] Haskell-Cafe Digest, Vol 106, Issue 38

2012-06-26 Thread Richard O'Keefe
On 27/06/2012, at 3:18 PM, John Lato wrote: On Wed, Jun 27, 2012 at 9:15 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 27/06/2012, at 12:51 PM, John Lato wrote: data Tree a = Leaf a | Branch (Tree a) ( Tree a) deriving (Foldable, Show) While I am familiar with deriving (Show), I

Re: [Haskell-cafe] Why does Enum succ and pred functions throw exception

2012-06-21 Thread Richard O'Keefe
On 21/06/2012, at 9:11 PM, Rouan van Dalen wrote: I was hoping to have some functions like: safeSucc :: (Enum a) = a - Maybe a Types that are instances of Enum don't necessarily have bounds. It always struck me as odd that Enum doesn't extend Ord. There's a reason given for not having

Re: [Haskell-cafe] Tests by properties: origin?

2012-06-05 Thread Richard O'Keefe
As far as I'm aware: - property-based testing wasn't new (think 'assertions' and then think 'branch coverage') - randomly generated test cases weren't new (look up 'fuzz testing') and there were tools like DGL to generate random test cases in a controlled sort of way + the

Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-31 Thread Richard O'Keefe
It's difficult to imagine any kind of program that doesn't need testing; surely there is a role for Haskell in writing test data generators? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2012-05-29 Thread Richard O'Keefe
On 30/05/2012, at 10:16 AM, Eric Rasmussen wrote: One idea (contrived and silly though it is) is modeling a Courier that delivers message to Persons. There is a standard default reply for all Persons, some individuals have their own default reply, and there are conditional replies based on

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

2012-05-27 Thread Richard O'Keefe
On 26/05/2012, at 4:16 AM, David Turner wrote: I don't. I think the trouble is that classes don't add value in exercises of this size. This was the key point, I think. In this example, there wasn't any significant behaviour that could be moved to superclasses. For that matter, whether a

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

2012-05-23 Thread Richard O'Keefe
On 21/05/2012, at 5:33 AM, Andreas Pauley wrote: With this in mind I've created a programming exercise where I imagine an OO programmer would use an object hierarchy with subtype polymorphism as part of the solution. Being unfamiliar with git, I've submitted an AWK answer by e-mail. I've

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-23 Thread Richard O'Keefe
On 24/05/2012, at 4:39 AM, Isaac Gouy wrote: From: Richard O'Keefe o...@cs.otago.ac.nz Sent: Tuesday, May 22, 2012 7:59 PM But string processing and text I/O using the java.io.* classes aren't brilliant. Wait just a moment - Are you comparing text I/O for C programs that process

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-22 Thread Richard O'Keefe
On 23/05/2012, at 4:54 AM, Isaac Gouy wrote: There may be very little one can do about the I/O part. Maybe you could say how the Java I/O is being done. For 50,000 nodes and 8,385,254 edges, Java (first version) ran out of memory after 89.54 seconds (default heap) Java (2nd

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-21 Thread Richard O'Keefe
On 22/05/2012, at 4:15 AM, Isaac Gouy wrote: Actually, I/O bound is *good*. Why would that be good or bad? The context here is a UNIX-style topological sorting program. Being I/O bound means that the program is limited by how fast it can read the data. If 90% of the time goes into reading

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-20 Thread Richard O'Keefe
On 19/05/2012, at 5:51 AM, Isaac Gouy wrote: In the 'tsort' case, it turns out that the Java and Smalltalk versions are I/O bound with over 90% of the time spent just reading the data. My guess is that they could be written to do better than that - but it's idiotic of me to say so

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-20 Thread Richard O'Keefe
How much is hard to port a haskell program to C ? If it will become harder and harder, (i.e. for parallelizations) than it's fair to choose haskell for performance, but if it's not, I think it's hard to think that such a high level language could ever compile down to something running faster

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-17 Thread Richard O'Keefe
On 17/05/2012, at 10:07 PM, Roman Werpachowski wrote: No slide deck required. The task is generating alternating permutations. Method 1: generate permutations using a backtracking search; when a permutation is generated, check if it is alternating. Method 2: use the same

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-16 Thread Richard O'Keefe
In a lecture today I presented (for quite other reasons) a simple combinatorial enumeration problem where the difference between two algorithms was far larger than any plausible difference between programming languages. If a programming language makes it easier to explore high level

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-16 Thread Richard O'Keefe
On 17/05/2012, at 2:04 PM, Gregg Lebovitz wrote: Richard, Thank you. This is an example of what I had in mind when I talked about changing the playing field. Do you have a slide deck for this lecture that you would be willing to share with me? I am very interested in learning more. No

Re: [Haskell-cafe] MonadError vs Control.Exception

2012-05-06 Thread Richard O'Keefe
On 6/05/2012, at 8:09 AM, Albert Y. C. Lai wrote: Exceptions appeared as early as in ML and Ada in the 1980s, Oh they go back long before that. PL/I had them in the 1960s (manual 1965, compiler 1966) and Burroughs Extended Algol for the B6700 had them in the 1970s (maybe already in 1969 when

Re: [Haskell-cafe] MonadError vs Control.Exception

2012-05-06 Thread Richard O'Keefe
On 7/05/2012, at 10:17 AM, Richard O'Keefe wrote: The 'jumpout' function in Pop2 was basically an early adoption of the idea of continuations via Landin's J-functions; it was used as an exception handling mechanism and that was in the early 70s. Correction: apparently that should read

Re: [Haskell-cafe] Learn you

2012-05-02 Thread Richard O'Keefe
On 3/05/2012, at 5:18 AM, Brent Yorgey wrote: I am curious how the title was translated. Of course, the English title Learn You a Haskell for Great Good uses intentionally ungrammatical/unidiomatic English for humorous effect. Is the Japanese title also ungrammatical/unidiomatic Japanese?

Re: [Haskell-cafe] JSON library suggestions?

2012-04-25 Thread Richard O'Keefe
On 25/04/2012, at 9:51 AM, Alvaro Gutierrez wrote: For that reason, most standard (fixed size/binary) numeric types like double are a poor choice to contain numeric values specified in JSON; in particular, the mismatch means that conversion can be lossy in both directions. Note that the

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-19 Thread Richard O'Keefe
Signed multisets are unfamiliar to most of us, and I for one found the paper a little fast-paced. Can you put a bit more into the documentation? Just for starters, I found it confusing when the documentation talks about an element with multiplicity zero, because in the _paper_ a value that has

Re: [Haskell-cafe] Reconstructing a tree from a list of its paths (to leaves)

2012-04-10 Thread Richard O'Keefe
On 10/04/2012, at 7:55 PM, Arnaud Bailly wrote: I am manipulating labeled multiway trees, some kind of lightweight XML notation. One thing I would like to be able to do is manipulating a tree as a list of (Path, Value). Generating such a list is easy but I am a little bit surprised to find it

Re: [Haskell-cafe] Reconstructing a tree from a list of its paths (to leaves)

2012-04-10 Thread Richard O'Keefe
On 11/04/2012, at 4:23 PM, Arnaud Bailly wrote: You are right, of course. By sensible properties I simply meant the list of (Path, Value) is assumed to represent a tree (eg. it has been generated by a traversal of some original tree). By ordered I meant Path(s) segments are lexicographically

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

2012-03-28 Thread Richard O'Keefe
On 29/03/2012, at 3:08 PM, Doug McIlroy wrote: - without newtype toSeries f = f : repeat 0 -- coerce scalar to series instance Num a = Num [a] where (f:fs) + (g:gs) = f+g : fs+gs (f:fs') * gs@(g:gs') = f*g : fs'*gs + (toSeries f)*gs' - with newtype newtype Num

Re: [Haskell-cafe] Mathematics and Statistics libraries

2012-03-26 Thread Richard O'Keefe
On 26/03/2012, at 8:35 PM, Ketil Malde wrote: Just to clarify (since I think the original suggestion was mine), I don't want to copy R's data frame (which I never quite understood, anyway) A data.frame is - a record of vectors all the same length - which can be sliced and diced like a 2d

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

2012-03-26 Thread Richard O'Keefe
On 27/03/2012, at 5:18 AM, Jerzy Karczmarczuk wrote: But I don't care about using (+) = zipWith (+) anywhere, outside of a programming model / framework, where you keep the sanity of your data. In my programs I KNEW that the length of the list is either fixed, or of some minimal size (or

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

2012-03-25 Thread Richard O'Keefe
On 26/03/2012, at 1:01 AM, TP wrote: Hello, My primary problem may be reduced to adding elements of two lists: [1,2,3] + [4,5,6] = [5,7,9] zipWith (+) [1,2,3] [4,5,6] gets the job done. However, it seems it is not possible to do that: --- instance Num [Int] where

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

2012-03-25 Thread Richard O'Keefe
On 26/03/2012, at 12:51 PM, Chris Smith wrote: More concretely, it's not hard to see that the additive identity is [0,0,0...], the infinite list of zeros. But if you have a finite list x, then x - x is NOT equal to that additive identity! Said another way: if you do want [num] to support

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-20 Thread Richard O'Keefe
On 21/03/2012, at 2:14 AM, Jerzy Karczmarczuk wrote: The existence of standards is not an answer concerning their goodness. Whoever said it was? Not me! But the existence of implementations that conform to standards *IS* an answer concerning 'will this WORK?' I do appreciate that the latest

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-20 Thread Richard O'Keefe
On 21/03/2012, at 9:06 AM, Albert Y. C. Lai wrote: On 12-03-19 10:05 PM, Richard O'Keefe wrote: http://www.haskell.org/onlinereport/haskell2010/haskellch9.html#x16-1710009 Haskell 2010 is already beginning to be out of date. Was there any point in me pointing out that the latest release

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Richard O'Keefe
One problem with hooking functions into the Haskell numeric classes is right at the beginning: class (Eq a, Show a) = Num a where (+) (-) (*) negate abs signum fromInteger where functions are for good reason not members of Eq or Show. Look at

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Richard O'Keefe
On scoping the project: be clear about the actual goal. If you want to take existing Haskell libraries and use them in OCaml, then you pretty much have to deal with the full language. You should start by using as much as you can of an existing compiler, or by getting an unmodified compiler to

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Richard O'Keefe
On 20/03/2012, at 2:21 PM, Chris Smith wrote: On Mon, Mar 19, 2012 at 7:16 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: One problem with hooking functions into the Haskell numeric classes is right at the beginning: class (Eq a, Show a) = Num a This is true in base 4.4

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Richard O'Keefe
On 20/03/2012, at 2:27 PM, Jerzy Karczmarczuk wrote: Richard O'Keefe: class (Eq a, Show a) = Num a where (+) (-) (*) negate abs signum fromInteger where functions are for good reason not members of Eq or Show. This is an old song, changed several times. I have no intention

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-18 Thread Richard O'Keefe
On 19/03/2012, at 8:01 AM, Damien Desfontaines wrote: The project I suggest is mainly inspired by Ticket #1555 [1] : I think that would be a great idea to make it possible to call some Haskell code into OCamL. In particular, this would contribute to the spreading of Haskell in countries

[Haskell-cafe] Installing gloss

2012-02-28 Thread Richard O'Keefe
Gloss having been mentioned, I thought I'd look into it. m% cabal install gloss Resolving dependencies... cabal: cannot configure gloss-1.6.1.1. It requires base ==4.5.* For the dependency on base ==4.5.* there are these packages: base-4.5.0.0. However none of them are available. base-4.5.0.0 was

Re: [Haskell-cafe] Haskell development in Mac OS X after Gatekeeper

2012-02-20 Thread Richard O'Keefe
On 20/02/2012, at 5:53 PM, Brandon Allbery wrote: On Sun, Feb 19, 2012 at 23:27, Richard O'Keefe o...@cs.otago.ac.nz wrote: Now *that's* annoying. It turns out that the xattr command is *there*, but 'man xattr' is completely silent. There is nothing for it in /usr/share/man/man1 . I had

Re: [Haskell-cafe] Haskell development in Mac OS X after Gatekeeper

2012-02-19 Thread Richard O'Keefe
On 20/02/2012, at 1:01 PM, Tom Murphy wrote: Does anyone know what this will mean for the future of Haskell development in OS X?: http://www.apple.com/macosx/mountain-lion/security.html Quoting that document: Or you can install all apps from anywhere, just as you can today.

Re: [Haskell-cafe] Haskell development in Mac OS X after Gatekeeper

2012-02-19 Thread Richard O'Keefe
On 20/02/2012, at 3:04 PM, Jack Henahan wrote: What's your setup like that you can't even use gdb in your own directory? That sounds unusual. And you can turn off the warning, either globally or selectively.[3][4] My setup is Mac OS X 10.6.8, pretty much out of the box, plus a bunch of

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Richard O'Keefe
On 9/02/2012, at 3:16 AM, Steve Horne wrote: On 07/02/2012 22:56, Richard O'Keefe wrote: On 8/02/2012, at 2:11 AM, Steve Horne wrote: To be fair, field OF record isn't bad in that sense. However, it would defeat the purpose of TDNR - the record isn't first, and therefore cannot

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-08 Thread Richard O'Keefe
On 9/02/2012, at 1:26 PM, Evan Laforge wrote: How about § then? Surely at this late date we can allow ourselves *one* non-ASCII character? The very name of it (*section* sign) suggests taking a part; and if you are totally in love with dot, think of it as a dot with ponytails. I

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-07 Thread Richard O'Keefe
On 7/02/2012, at 1:41 PM, AntC wrote: Richard, now you're just being playful. Half fun and full earnest. I *do* regard 'field OF record' as far more readable, intuitive, c than 'record.field'. With the number of meanings '.' already has in Haskell, I *do* regard any attempt to overload it for

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-07 Thread Richard O'Keefe
On 8/02/2012, at 2:11 AM, Steve Horne wrote: On 06/02/2012 23:58, Richard O'Keefe wrote: On 4/02/2012, at 12:13 AM, Gábor Lehel wrote: All of this said, record.field is still the most readable, intuitive, and familiar syntax for selecting a field from a record that I know of. Having

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-06 Thread Richard O'Keefe
On 4/02/2012, at 12:13 AM, Gábor Lehel wrote: All of this said, record.field is still the most readable, intuitive, and familiar syntax for selecting a field from a record that I know of. Having learned COBOL and Algol 68 before Haskell was dreamed of, I regard field OF record as

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-01 Thread Richard O'Keefe
purposes). So the semantics for field 'selection' (whether or not you use dot notation) is just function application. So Type-Directed Name resolution is just instance resolution. So it all gets much easier. Richard O'Keefe wrote: ... Making f x and x.f the same is pretty appealing

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-01-31 Thread Richard O'Keefe
On 1/02/2012, at 11:38 AM, AntC wrote: As soon as you decide to make 'virtual record selectors' just ordinary functions (so they select but not update), then you can see that field names are also just ordinary functions (for selection purposes). So the semantics for field 'selection'

Re: [Haskell-cafe] [Haskell Cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Richard O'Keefe
On 31/01/2012, at 5:47 AM, Doug McIlroy wrote: Is there any document describing why there is no ghc --strict flag making all code strict by default? Wouldn't such a '--strict' flag turn Haskell/GHC into a better C/gcc compiler? I agree that a strict flag would turn Haskell into C--but

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-20 Thread Richard O'Keefe
On 21/12/2011, at 4:34 AM, Patrick Browne wrote: I have simplified the code using constructors and export. I can evalute the qualified expressions but I do not get the expected results. module MONKONMOVE (module MONKONMOVE)where When I see MONKONMOVE I think what's a MONKON? Even the

Re: [Haskell-cafe] [Alternative] summary of my understanding so far

2011-12-18 Thread Richard O'Keefe
On 17/12/2011, at 3:35 PM, Matthew Farkas-Dyck wrote: On 15/12/2011, Gregory Crosswhite gcrosswh...@gmail.com wrote: 1) Documentation really needs to be improved 2) some/many cannot be physically separated from Alternative, but there *might* be an advantage to creating a subclass for them

Re: [Haskell-cafe] [Alternative] summary of my understanding so far

2011-12-18 Thread Richard O'Keefe
On 19/12/2011, at 3:44 PM, Gregory Crosswhite wrote: So what do you all think about my own suggestion for the documentation? It is an improvement. Documentation for a library module needs to start by telling people what it is for. For a particular function, someone needs to know very quickly

Re: [Haskell-cafe] [Alternative] summary of my understanding so far

2011-12-18 Thread Richard O'Keefe
On 19/12/2011, at 5:46 PM, Gregory Crosswhite wrote: [improved Monoid documentation] I would go so far as to point out that mappend is a generalisation of Data.List.sum, Data.List.product, Data.List.and, and Data.List.or, where the initial value and combining rule are implied by the type.

Re: [Haskell-cafe] How to get a file path to the program invoked?

2011-12-15 Thread Richard O'Keefe
On 16/12/2011, at 11:55 AM, Brandon Allbery wrote: Note that exec -a is a bash-ism and not portable to POSIX shells Recent versions of ksh also support this, so it's not just bash. But there are certainly a lot of POSIX shells that don't, including the version of ksh on my main machine.

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread Richard O'Keefe
Suppose you have a typeclass C with operations x y z w and you decide that there's a real difference, that more things can support x y than can support z w. If you then split C' x y C z w then all existing *uses* of C are happy. But all the existing *instances* of C have to be

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-12 Thread Richard O'Keefe
Perhaps the most urgent change would simply be better documentation for what 'some' and 'many' are all about. Some examples would be nice. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How to get a file path to the program invoked?

2011-12-04 Thread Richard O'Keefe
On 4/12/2011, at 7:32 PM, wren ng thornton wrote: Part of the problem is that, as Alexey says, the first element of argv is just whatever is passed to exec, which is not guaranteed to be a complete path, a canonical path, or any other specific thing we'd desire. It's not at all

[Haskell-cafe] could not create compact unwind

2011-12-01 Thread Richard O'Keefe
I just did cabal install cabal-install on a Mac running Mac OS 10.6.8 and got the eventual response [44 of 44] Compiling Main ( Main.hs, dist/build/cabal/cabal-tmp/Main.o ) Linking dist/build/cabal/cabal ... ld: warning: could not create compact unwind for .LFB3: non-standard

[Haskell-cafe] Using Data,TypeLevel.Num

2011-11-30 Thread Richard O'Keefe
I'd like to write a small module using Data.TypeLevel.Num. It has type level constants, variables, addition, and maximum, which is pretty much all I need. But I've never used it before, and there's one thing I want to do that I don't understand how to do. val :: Nat t = t - Int

Re: [Haskell-cafe] Haskellers.com polls (specifically, the mascot question)

2011-11-27 Thread Richard O'Keefe
On 25/11/2011, at 11:01 PM, Michael Snoyman wrote: Hi all, I've just added the polls feature to Haskellers.com, and created an initial poll about mascots[1]. Let me know if there are any issues. You must be logged in to submit an answer. I don't know how many opinions you'll lose from

Re: [Haskell-cafe] A Mascot

2011-11-24 Thread Richard O'Keefe
On 23/11/2011, at 4:40 AM, Karol Samborski wrote: And what about a cat? The cat is associated with elegance and a kind of magic. Please take a look: http://origami.bieszczady.pl/images/kot.png I could never in my whole life draw as well as that. But they are *skittles*, just like Lamb Da.

Re: [Haskell-cafe] A Mascot

2011-11-21 Thread Richard O'Keefe
On 21/11/2011, at 9:22 PM, Karol Samborski wrote: Hi all, This is my sister's proposition: http://origami.bieszczady.pl/images/The_Lamb_Da.png What do you think? It looks like a skittle with a baby bonnet. C'est mignon, mais ce n'est pas la guerre as Pierre Bosquet almost said.

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

2011-10-02 Thread Richard O'Keefe
On 3/10/2011, at 7:15 AM, Du Xi wrote: I guess this is what I want, thank you all. Although I still wonder why something so simple in C++ is actually more verbose and requires less known features in Haskell...What was the design intent to disallow simple overloading? It's not SIMPLE

Re: [Haskell-cafe] Parameters and patterns

2011-10-02 Thread Richard O'Keefe
On 2/10/2011, at 3:27 AM, José Romildo Malaquias wrote: Hello. When studing programming languages I have learned that parameter is a variable (name) that appears in a function definition and denotes the value to which the function is applied when the function is called. Who told you that?

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

2011-09-26 Thread Richard O'Keefe
On 23/09/2011, at 4:06 PM, Chris Smith wrote: On Fri, 2011-09-23 at 11:02 +1200, Richard O'Keefe wrote: I do think that '..' syntax for Float and Double could be useful, but the actual definition is such that, well, words fail me. [1.0..3.5] = [1.0,2.0,3.0,4.0] Why did anyone ever

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

2011-09-26 Thread Richard O'Keefe
On 26/09/2011, at 11:08 AM, Daniel Fischer wrote: And: distinguish NaNs or identify them all? I lean towards identifying them all, I've never cared for whether they come from 0/0, Infinity - Infinity or what, but I could be convinced. There are very many bit patterns that count as NaNs,

  1   2   3   4   5   >