Re: [Haskell-cafe] Dynamic Programming with Data.Vector

2012-09-18 Thread Roman Leshchinskiy
Myles C. Maxfield wrote: Aha there it is! Thanks so much. I didn't see it because it's under the Unfolding section instead of the Construction section. You're quite right, having a separate Unfolding section isn't the best idea. I'll fix this. Roman On Mon, Sep 17, 2012 at 6:07 AM, Roman

[Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread oleg
There has been a recent discussion of ``Church encoding'' of lists and the comparison with Scott encoding. I'd like to point out that what is often called Church encoding is actually Boehm-Berarducci encoding. That is, often seen newtype ChurchList a = CL { cataCL :: forall r. (a - r - r)

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Ivan Lazar Miljenovic
On 18 September 2012 18:27, o...@okmij.org wrote: There has been a recent discussion of ``Church encoding'' of lists and the comparison with Scott encoding. I'd like to point out that what is often called Church encoding is actually Boehm-Berarducci encoding. That is, often seen newtype

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Kim-Ee Yeoh
Oleg, Let me try to understand what you're saying here: (1) Church encoding was discovered and investigated in an untyped setting. I understand your tightness criterion to mean surjectivity, the absence of which means having to deal with junk. (2) Church didn't give an encoding for

Re: [Haskell-cafe] Either Monad and Laziness

2012-09-18 Thread Malcolm Wallace
On 12 Sep 2012, at 16:04, Eric Velten de Melo wrote: The behaviour I want to achieve is like this: I want the program when compiled to read from a file, parsing the PGM and at the same time apply transformations to the entries as they are read and write them back to another PGM file. Such

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

2012-09-18 Thread José Lopes
Hello Ivan, I agree with your point: if you want a heading that ends with a punctuation sign then you cannot do it in Fmark (for now). That gives me something to think about. However, I will still look for a way that avoids (as much as possible) special syntax. Do you have any suggestion? I

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

2012-09-18 Thread José Lopes
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 decision. On the README file in the github page you

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

2012-09-18 Thread Ivan Lazar Miljenovic
On 18 September 2012 21:53, José Lopes jose.lo...@ist.utl.pt wrote: Hello Ivan, I agree with your point: if you want a heading that ends with a punctuation sign then you cannot do it in Fmark (for now). That gives me something to think about. However, I will still look for a way that avoids

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

2012-09-18 Thread José Lopes
Hi, Like I said it's a tradeoff. I will try to use this philosophy as much as possible. But it's also important not to be fundamentalist. We'll see as it goes. I like that strikethrough. You are right about the quotes, but we can leave for quoting and use the ' for something else. Cheers,

[Haskell-cafe] foldl vs. foldr

2012-09-18 Thread Jan Stolarek
Hi list, I have yet another question about folds. Reading here and there I encountered statements that foldr is more important than foldl, e.g. in this post on the list: http://www.haskell.org/pipermail/haskell-cafe/2012-May/101338.html I want to know are such statements correct and, if so,

Re: [Haskell-cafe] cost-centre names

2012-09-18 Thread Marco Túlio Pimenta Gontijo
Hi Felipe. On Sun, Sep 16, 2012 at 1:57 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Sun, Sep 16, 2012 at 7:57 AM, Marco Túlio Pimenta Gontijo marcotmar...@gmail.com wrote: I have a question about cost-centre names, as shown on .hp files produced by +RTS -hc. They have the form

Re: [Haskell-cafe] Type error with Type families

2012-09-18 Thread Marco Túlio Pimenta Gontijo
On Mon, Sep 17, 2012 at 6:27 PM, Alexander Solla alex.so...@gmail.com wrote: On Mon, Sep 17, 2012 at 10:59 AM, Ryan Ingram ryani.s...@gmail.com wrote: The problem is that the function 'element' is ambiguous, for the reasons MigMit pointed out. The standard solution to this problem is to

Re: [Haskell-cafe] foldl vs. foldr

2012-09-18 Thread Miguel Mitrofanov
Hi Jan! foldl always traverses the list to the end; in particular, if there is no end, it would hang forever (unless the compiler is smart enough to detect an infinite loop, in which case it can throw an error). On the other hand, if the first argument is lazy enough, foldr would stop before

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

2012-09-18 Thread Stefan Monnier
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 he's simply trying to push this idea further. I suspect

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

2012-09-18 Thread José Lopes
Hello Stefan, Thank you for the input. Cheers, José On 18-09-2012 14:43, 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

Re: [Haskell-cafe] foldl vs. foldr

2012-09-18 Thread Chaddaï Fouché
18.09.2012, 16:32, Jan Stolarek jan.stola...@p.lodz.pl: Hi list, I have yet another question about folds. Reading here and there I encountered statements that foldr is more important than foldl, e.g. in this post on the list:

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

2012-09-18 Thread Brandon Allbery
On Tue, Sep 18, 2012 at 1:05 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: to it (though I agree that Markdown has some odd choices; in particular, the ability to use both _ and * for italics whilst requiring ** for bold). The odd thing is, I've found that I use those

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

2012-09-18 Thread José Lopes
Hey, Why do you say that _italics_ and *italics* are semantically different? What do you mean? Cheers, José On 18-09-2012 15:30, Brandon Allbery wrote: On Tue, Sep 18, 2012 at 1:05 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com mailto:ivan.miljeno...@gmail.com wrote: to it (though

[Haskell-cafe] ANNOUNCE: MFlow-0.1.5

2012-09-18 Thread Alberto G. Corona
Hi haskellers and specially the web developers. http://hackage.haskell.org/package/MFlow-0.1.5.3 MFlow is a is a Web framework with some unique, and I mean unique, characteristics that I find exciting: - It is a Web application server that start and restart on-demand stateful web server

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

2012-09-18 Thread Brandon Allbery
On Tue, Sep 18, 2012 at 10:34 AM, José Lopes jose.lo...@ist.utl.pt wrote: Why do you say that _italics_ and *italics* are semantically different? What do you mean? The parenthetical hinted at it: (I tend to use the former for titles and such) There's a convention at work here, namely that

[Haskell-cafe] Fwd: [Haskell] ANNOUNCE: MFlow-0.1.5

2012-09-18 Thread Alberto G. Corona
Oh, I´m stupid. You mean web pages with multiple tabs I have not tested it. but each tab can be handled easily by a different server process.. or it can be handled in a single server process, like in a menu. For example, this code present different options, and the process renders different

Re: [Haskell-cafe] Choosing color of the track

2012-09-18 Thread Eugene Kirpichov
Hi Manish, The meaning of @ is not what you think it is. It merely draws colored bars, it does NOT control the color of other kinds of charts. Here's how what you want can be achieved: * Remove the @ lines * Append a common prefix to the input tracks you want to be displayed on the same output

Re: [Haskell-cafe] Choosing color of the track

2012-09-18 Thread Manish Trivedi
Thanks a ton Eugene. that worked like a charm :) Appreciate you looking into this and suggesting me the correct approach. I have another question that if I had single track storing response time of each request, how could I get 95th percentile of the response time. I know TimePlot wiki has

Re: [Haskell-cafe] Fwd: [Haskell] ANNOUNCE: MFlow-0.1.5

2012-09-18 Thread Jake McArthur
Actually, I meant users that spawn multiple tabs from a single root session. You mentioned that you have some special support for the back button. What happens if I open a couple new tabs in which I may or may not go forward and backward. Do they all share the same state? Different states (how?)?

Re: [Haskell-cafe] Choosing color of the track

2012-09-18 Thread Eugene Kirpichov
Hi, Suppose you have data like this: 2012-09-18 00:10:48,166 =responseTime 53 ... Then you should just use -dk 'quantile 0.95' and you'll see a graph of stacked bars like [][Y] (but vertical) where XXX is min..95% and YYY is 95%..max. On Tue, Sep 18, 2012 at 11:44 AM, Manish Trivedi

Re: [Haskell-cafe] Fwd: [Haskell] ANNOUNCE: MFlow-0.1.5

2012-09-18 Thread Alberto G. Corona
Hi Jake, right, it depends on the identification of the session: iAll the tabs share the same state because they share the same cookies. so if in one tab the use continue the interaction then the other tabs are out of sync. If the user goes to these other tabs and press any widget, the

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

2012-09-18 Thread Tillmann Rendel
Hi, José Lopes wrote in an earlier email: I want to find a natural way of not burdening the user with the task of having to learn some special syntax in order to write a document. And then: [...] we can leave for quoting and use the ' for something else. That sounds like 'some special

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

2012-09-18 Thread José Lopes
Hey Tillmann, That is a good point. What would you suggest for emphasis ? Cheers, José On 18-09-2012 21:00, Tillmann Rendel wrote: Hi, José Lopes wrote in an earlier email: I want to find a natural way of not burdening the user with the task of having to learn some special syntax in order

Re: [Haskell-cafe] Fwd: [Haskell] ANNOUNCE: MFlow-0.1.5

2012-09-18 Thread Alberto G. Corona
However if in a tab out of sync the user press refresh, the tab will refresh to the current state. I took care not to try to synchronize back as a consequence of a page that is in a forward state in one tab, as a consequence of navigating back in other tab. However I may have not considered all

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Ryan Ingram
Oleg, do you have any references for the extension of lambda-encoding of data into dependently typed systems? In particular, consider Nat: nat_elim :: forall P:(Nat - *). P 0 - (forall n:Nat. P n - P (succ n)) - (n:Nat) - P n The naive lambda-encoding of 'nat' in the untyped lambda-calculus

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Dan Doel
This paper: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.26.957 Induction is Not Derivable in Second Order Dependent Type Theory, shows, well, that you can't encode naturals with a strong induction principle in said theory. At all, no matter what tricks you try. However, A Logic

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-18 Thread José Lopes
Hey Richard, Regarding the languages, I think it is better to start with English and see how successful Fmark is. There's no point in trying to tackle lots of languages if we cannot solve the problem for one of them. But then again, keeping everything Unicode. In fact, in this matter, I think

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

2012-09-18 Thread José Lopes
Hello Richard, I made a first draft of your letter example. It is not exactly as you had written but I think you might like it. It is the combination of a content document (letter) and a style document (letter.style). You can see the results in the PDF, which was created using the Latex backend

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Ryan Ingram
Fascinating! But it looks like you still 'cheat' in your induction principles... ×-induction : ∀{A B} {P : A × B → Set} → ((x : A) → (y : B) → P (x , y)) → (p : A × B) → P p ×-induction {A} {B} {P} f p rewrite sym (×-η p) = f (fst p) (snd p) Can you somehow define

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Dan Doel
On Tue, Sep 18, 2012 at 11:19 PM, Ryan Ingram ryani.s...@gmail.com wrote: Fascinating! But it looks like you still 'cheat' in your induction principles... ×-induction : ∀{A B} {P : A × B → Set} → ((x : A) → (y : B) → P (x , y)) → (p : A × B) → P p ×-induction {A}

Re: [Haskell-cafe] Church vs Boehm-Berarducci encoding of Lists

2012-09-18 Thread Ryan Ingram
On Tue, Sep 18, 2012 at 8:39 PM, Dan Doel dan.d...@gmail.com wrote: On Tue, Sep 18, 2012 at 11:19 PM, Ryan Ingram ryani.s...@gmail.com wrote: Fascinating! But it looks like you still 'cheat' in your induction principles... ×-induction : ∀{A B} {P : A × B → Set} → ((x :