This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Scaladoc that is actually useful?

59 replies
Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scaladoc that is actually useful?
Dear Johannes,

To your list i would add something like a reference to context with -- if possible -- links to background information. As i mentioned in a previous post often times we employ algorithms that are really part of a family of algorithms. i used as example the GARCH or VAR families, but of course there are many, many many examples of this. When we provide some context like that it helps people who know the domain to quickly ascertain approximate good uses and potential caveats. It also provides people who don't know the domain a way in to develop a sense of how best to use the code.

Best wishes,

--greg

On Mon, Nov 16, 2009 at 9:47 AM, Johannes Rudolph <johannes [dot] rudolph [at] googlemail [dot] com> wrote:
On Mon, Nov 16, 2009 at 6:24 PM, Ricky Clarkson
<ricky [dot] clarkson [at] gmail [dot] com> wrote:
> Johannes,
>
> Real machines?  Oh, yes, right.  So why are you programming in a
> language more abstract than assembly?  I'd wager that it's because
> most if not all the time when programming, it's simpler not to think
> in terms of real machines, real registers, real processor-level
> caches, etc.

Are you arguing? If yes, I don't understand, sorry...

See, you posted your argument under the topic "Scaladoc that is
actually useful?". Scaladoc that describes "a mathematical relation
such that each element of a given set (the domain of the function) is
associated with an element of another" is not a documentation of
Scala's implementation of that mapping.

In reality, a useful documentation should at least feature these points:
 * When given a name, give me (the most concise?) description of what
the particular implementation does, that could include:
     * the signature
     * ScalaCheck conditions
     * a description of the runtime time/space complexity if non-obvious
     * prose or other means to describe other side-effects
 * when given a function(ality) e.g. by signature, give me the name of
the Scala function(s) which implement/adhere to this signature

Traditionally many expect the following from a documentation:
 * the ability to browse the namespace-hierarchy
 * some meta-information how the namespace hierarchy was constructed
 * some prose describing the big-architectural picture why the
namespace was created like it is

Actually, I was a little sad that I missed most of the argument while
being stuck on a train-ride on Thursday. I can appreciate Tony's
argument and I found most of the discussion entertaining, but it would
be nice if there would be gained something practical out of it.

--
Johannes

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net



--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com
ichoran
Joined: 2009-08-14,
User offline. Last seen 2 years 3 weeks ago.
Re: Re: Scaladoc that is actually useful?
On Mon, Nov 16, 2009 at 11:44 AM, Ricky Clarkson <ricky [dot] clarkson [at] gmail [dot] com> wrote:
Hi Meredith,

Moved to scala-debate.

Am I correct that there is only one *function* that inhabits that
signature?  There may be many procedures that you can perform, but
looking at the input types and return type, and assuming there's no
null, is there another function that the procedure could compute?

There is a whole class of routines that can be implemented by the JVM and are mathematically functions and terminate and so on, but which cannot be constructed using traditional type theory.  So, for example, a function that tried to cast to the algebraic type T in Greg's example, and did convolution when it succeeded, and composition when it failed, would completely obey the type signature.

I've given examples of these things (which have also been ignored once I fixed the syntax errors, for no apparent reason).

If you restrict yourself to constructive type theory alone, and you do not concern yourself with issues like time to compute or memory taken, then it appears to me to be true that there exists a unique function with the type (A => B) => (B => C) => A => C.

Otherwise, if you do *not* restrict yourself to constructive type theory, but instead insist that *functions must take any object that matches their input types and always return something of the output type*, or you *care about the run-time performance of your code*, there are piles of counterexamples.  Greg gave one on the performance/memory side.  I'll give another:

def compose[A,B,C](f: A => B, g: B => C): A => C = { (a:A) => (g(f(a))) }
def shortcut[A,B,C](f: A => B, g: B => C): A => C = {
  (a:A) => {
    try { g( a.asInstanceOf[B] ) }
    catch{ case _:ClassCastException => g(f(a)) }
  }
}

val f: (String => Double) = (s:String) => (Math.sqrt(s.length.toDouble))
val g: (Double => Boolean) = (d:Double) => (d<2.0)
val h: (Double => Double) = (d:Double) => (-d)

println( compose(f,g)("Hi") + " versus " + shortcut(f,g)("Hi") )
println( compose(h,g)(2.5) + " versus " + shortcut(h,g)(2.5) )

In "shortcut" we don't bother using f if g already has the right type signature (i.e. f does not change the type, or we can coerce the type with asInstanceOf).  (One could make this even more powerful in a VM without erasure, also.)  Anyway, there are infinitely many other ways one could try to invent a b to pass to g, and as long as you catch the mistakes and resort to g(f(a)) when all else fails, the return will be in the set described by the type.

This suggests to me that you _at the very least_ need a "this function is consistent with constructive type theory" as a comment if, in fact, it is.  And something more transparent, such as "generates the composite function g(f(_))" would be even better.

  --Rex

runaro
Joined: 2009-11-13,
User offline. Last seen 32 weeks 2 days ago.
Re: Scaladoc that is actually useful?

Meredith Gregory writes:

>
>
> Dear Ricky,Are you saying that you take as your definition of a function a
mathematical relation? So, for you the product space, A x B is the same as the
function space A =>B? Here's a relation { (a, 1), (a, 2) }. Is this a function
in your view?Best wishes,--greg
> On Mon, Nov 16, 2009 at 9:25 AM, Ricky Clarkson
wrote:"(mathematics) a
mathematical relation such that each element of a
> given set (the domain of the function) is associated with an element
> of another"

Meredith,

Just dropped in to point out that while function implies mathematical relation,
mathematical relation does not imply function.

A circle is a conic section with an eccentricity of 0. Am I saying that my
definition of a circle is a conic section? A hyperbola is a conic section. Am I
saying that a hyperbola is a circle?

Runar

Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scaladoc that is actually useful?
Dear Rex,

Interesting examples!

For me one of the positive things that came out of the debate was thinking about the possibility of a shift in basis in terms of the representation of function. The "silly" example i gave before has a more serious counterpart if we think about different internal representations of function. For example, we can use a SECD-style representation or even further out we could imagine a representation of function that followed this chain of encodings
  • core representation of π-calculus processes, call it Core-π
  • Sangiorgi-style encoding of lambda calculus into π-calculus by factoring through a higher order π-calculus, call it HOπ, and then compiling higher order π-terms to ordinary π-calculus terms
So, we have compiler/interpreter of the form : compile_to_HOπ : lambda -> HOπ, compile_to_pi : HOπ -> Core-π

This is not just a theoretical construct, but might have practical benefit for someone like Ian Clarke who is looking at different ways to organize mobile computation but wants to restrict the programming model to just functions instead of processes.

There are lots of different possible internal representations, but the reason i mention these two is that the representation of composition is pretty different and has really different complexity characteristics. Specifically, composition in the Sangiorgi-style encoding of the lambda calculus turns into a parallel composition that might be subject to blocking input (again, think about the Internet as your computer).

So, the question i've be mulling over is whether we can associate measures to a change of basis (read change of internal representation of function) that we could observe in an effect system.

Best wishes,

--greg

On Mon, Nov 16, 2009 at 10:07 AM, Rex Kerr <ichoran [at] gmail [dot] com> wrote:
On Mon, Nov 16, 2009 at 11:44 AM, Ricky Clarkson <ricky [dot] clarkson [at] gmail [dot] com> wrote:
Hi Meredith,

Moved to scala-debate.

Am I correct that there is only one *function* that inhabits that
signature?  There may be many procedures that you can perform, but
looking at the input types and return type, and assuming there's no
null, is there another function that the procedure could compute?

There is a whole class of routines that can be implemented by the JVM and are mathematically functions and terminate and so on, but which cannot be constructed using traditional type theory.  So, for example, a function that tried to cast to the algebraic type T in Greg's example, and did convolution when it succeeded, and composition when it failed, would completely obey the type signature.

I've given examples of these things (which have also been ignored once I fixed the syntax errors, for no apparent reason).

If you restrict yourself to constructive type theory alone, and you do not concern yourself with issues like time to compute or memory taken, then it appears to me to be true that there exists a unique function with the type (A => B) => (B => C) => A => C.

Otherwise, if you do *not* restrict yourself to constructive type theory, but instead insist that *functions must take any object that matches their input types and always return something of the output type*, or you *care about the run-time performance of your code*, there are piles of counterexamples.  Greg gave one on the performance/memory side.  I'll give another:

def compose[A,B,C](f: A => B, g: B => C): A => C = { (a:A) => (g(f(a))) }
def shortcut[A,B,C](f: A => B, g: B => C): A => C = {
  (a:A) => {
    try { g( a.asInstanceOf[B] ) }
    catch{ case _:ClassCastException => g(f(a)) }
  }
}

val f: (String => Double) = (s:String) => (Math.sqrt(s.length.toDouble))
val g: (Double => Boolean) = (d:Double) => (d<2.0)
val h: (Double => Double) = (d:Double) => (-d)

println( compose(f,g)("Hi") + " versus " + shortcut(f,g)("Hi") )
println( compose(h,g)(2.5) + " versus " + shortcut(h,g)(2.5) )

In "shortcut" we don't bother using f if g already has the right type signature (i.e. f does not change the type, or we can coerce the type with asInstanceOf).  (One could make this even more powerful in a VM without erasure, also.)  Anyway, there are infinitely many other ways one could try to invent a b to pass to g, and as long as you catch the mistakes and resort to g(f(a)) when all else fails, the return will be in the set described by the type.

This suggests to me that you _at the very least_ need a "this function is consistent with constructive type theory" as a comment if, in fact, it is.  And something more transparent, such as "generates the composite function g(f(_))" would be even better.

  --Rex




--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com
Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scaladoc that is actually useful?
Dear Runar,

Agreed! That's one of the very things i was hoping to get Ricky to clarify. i couldn't tell from his note if he was saying that he took as function a relation or a relation in which there are no pairs of pairs of the form (a,b), (a,c). That leaves aside questions about computability and the relationship of computability to observation and typing. There are lots and lots of sets of pairs with this property that have no representation in a computer. Are we to take these as functions? How are they related to types? How are they related to observations? How are these notions related to what we, as mere programmers who are simply trying to earn a living and write quality code, should and should not write in documentation?

Best wishes,

--greg

On Mon, Nov 16, 2009 at 10:22 AM, Runar Bjarnason <runarorama [at] gmail [dot] com> wrote:
Meredith Gregory <lgreg.meredith@...> writes:

>
>
> Dear Ricky,Are you saying that you take as your definition of a function a
mathematical relation? So, for you the product space, A x B is the same as the
function space A =>B? Here's a relation { (a, 1), (a, 2) }. Is this a function
in your view?Best wishes,--greg
> On Mon, Nov 16, 2009 at 9:25 AM, Ricky Clarkson
<ricky [dot] clarkson [at] gmail [dot] com> wrote:"(mathematics) a
mathematical relation such that each element of a
> given set (the domain of the function) is associated with an element
> of another"

Meredith,

Just dropped in to point out that while function implies mathematical relation,
mathematical relation does not imply function.

A circle is a conic section with an eccentricity of 0. Am I saying that my
definition of a circle is a conic section? A hyperbola is a conic section. Am I
saying that a hyperbola is a circle?

Runar







--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com
Tony Morris 2
Joined: 2009-03-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scaladoc that is actually useful?

They are not observably distinguishable under extensional equivalence.
Can you imagine if I'd said that up front? Yeah I'd be the "theorist"
from that "faction", which is rather ignorant given the facts, but I
digress. This is the kind of balance I must maintain with the few who
like learning, the few from whom I'd be preaching to the choir and the
many who resent learning from the Scala community. Perhaps it's an error
to start where I did or perhaps it's an error to even attempt it on the
mailing list. I didn't expect such blatant dishonesty, poor
comprehension and failure to understand such a basic fact, which is very
well documented (I won't bother posting the proof or the paper --
because none of you read it right?).

I haven't even proposed an argument, merely stated an absolute,
provable, proven, falsifiable, unfalsified, absolute, undeniable,
you-look-like-holocaust-deniers,
yes-evolution-is-supported-by-a-mountain-of-evidence fact that has been
misrepresented repeatedly. I'm flabbergasted that so many programmers
cannot grasp this, but on the other hand, I'm not really. But I am even
more flabbergasted that it came from you Greg.

I know a lot of you care about how you to appear to others (I don't give
a flying fish -- I'm more interested in reality), so I might inform you
that there are lots of people laughing at the ignorance of a basic fact
by the Scala community right now. They have far less sympathy than I do

Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scaladoc that is actually useful?
Dear Tony,

If i put words in your mouth, then i humbly apologize. i thought you were saying something about only needing the type signatures as documentation. My first note said i found the position troubling and thought you would correct it. i guess the thread spun out of control. Anyway, we are in agreement.

As for avoiding technical language -- you know where i stand. i use it when i feel it
  • clarifies a point that must be clarified
  • provides a portal to someone who wants a way in
and avoid it if i can make the point more directly without the risk of confusion. It's a tough call in most situations with a group as delightfully diverse as the scala community. The community is -- however -- remarkably tolerant, patient and diligent and full of good will.

Best wishes,

--greg

On Mon, Nov 16, 2009 at 12:50 PM, Tony Morris <tonymorris [at] gmail [dot] com> wrote:
They are not observably distinguishable under extensional equivalence.
Can you imagine if I'd said that up front? Yeah I'd be the "theorist"
from that "faction", which is rather ignorant given the facts, but I
digress. This is the kind of balance I must maintain with the few who
like learning, the few from whom I'd be preaching to the choir and the
many who resent learning from the Scala community. Perhaps it's an error
to start where I did or perhaps it's an error to even attempt it on the
mailing list. I didn't expect such blatant dishonesty, poor
comprehension and failure to understand such a basic fact, which is very
well documented (I won't bother posting the proof or the paper --
because none of you read it right?).

I haven't even proposed an argument, merely stated an absolute,
provable, proven, falsifiable, unfalsified, absolute, undeniable,
you-look-like-holocaust-deniers,
yes-evolution-is-supported-by-a-mountain-of-evidence fact that has been
misrepresented repeatedly. I'm flabbergasted that so many programmers
cannot grasp this, but on the other hand, I'm not really. But I am even
more flabbergasted that it came from you Greg.

I know a lot of you care about how you to appear to others (I don't give
a flying fish -- I'm more interested in reality), so I might inform you
that there are lots of people laughing at the ignorance of a basic fact
by the Scala community right now. They have far less sympathy than I do
Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: Re: Scaladoc that is actually useful?
Tony -

You have taken this way too far. The contents of your last email are pretty disgraceful.

May I remind you that the original poster on the thread made a point about the general lack of documentation in scala. You responded with an obscure point about *one single function's type signature*, did not clarify that you were only talking about that one function and neither did it clarify that you were talking about it in the purely functional sense, as opposed to the scala method sense.

Your response as you intended it was hence almost completely irrelevant to the original question - as you did not clarify your terms, plenty misunderstood what you were saying. It has taken others to come to this thread to educate as by that stage you had degenerated into passive-aggressive abuse.

Chris


> Date: Tue, 17 Nov 2009 06:50:39 +1000
> From: tonymorris [at] gmail [dot] com
> To: lgreg [dot] meredith [at] gmail [dot] com
> CC: ricky [dot] clarkson [at] gmail [dot] com; dmclean62 [at] gmail [dot] com; scala-user [at] listes [dot] epfl [dot] ch
> Subject: Re: [scala-user] Re: Scaladoc that is actually useful?
>
> They are not observably distinguishable under extensional equivalence.
> Can you imagine if I'd said that up front? Yeah I'd be the "theorist"
> from that "faction", which is rather ignorant given the facts, but I
> digress. This is the kind of balance I must maintain with the few who
> like learning, the few from whom I'd be preaching to the choir and the
> many who resent learning from the Scala community. Perhaps it's an error
> to start where I did or perhaps it's an error to even attempt it on the
> mailing list. I didn't expect such blatant dishonesty, poor
> comprehension and failure to understand such a basic fact, which is very
> well documented (I won't bother posting the proof or the paper --
> because none of you read it right?).
>
> I haven't even proposed an argument, merely stated an absolute,
> provable, proven, falsifiable, unfalsified, absolute, undeniable,
> you-look-like-holocaust-deniers,
> yes-evolution-is-supported-by-a-mountain-of-evidence fact that has been
> misrepresented repeatedly. I'm flabbergasted that so many programmers
> cannot grasp this, but on the other hand, I'm not really. But I am even
> more flabbergasted that it came from you Greg.
>
> I know a lot of you care about how you to appear to others (I don't give
> a flying fish -- I'm more interested in reality), so I might inform you
> that there are lots of people laughing at the ignorance of a basic fact
> by the Scala community right now. They have far less sympathy than I do
> -- I'm not laughing.
>
> Meredith Gregory wrote:
> > Dear Ricky,
> >
> > i have responded to this argument repeatedly. i'm not sure why people
> > are not getting this. Tony's argument is blatantly false. There are
> > countably infinitely many inhabitants of the type (A => B) => (B => C)
> > => A => C. They are observably distinguished by running time and space
> > consumption. Here is one infinite subset of that set: for each k in
> > the natural numbers we have
> >
> > Compose_k( f, g ) = { ( x ) => { var d = computeKthDigitOfPi( k ); g(
> > f( x ) ) } : (A => B) => (B => C) => A => C
> >
> > There are lots more infinite subsets where that one came from. The
> > differences in complexity are not just manifest by silliness of the
> > kind above. There are materially relevant differences that have to do
> > with the internal representation of function and evaluation.
> >
> > Beyond that, consider the following function
> >
> > // provided A, B, C <: T with T supporting a certain algebraic structure
> > Convolution_tau( f, g ) = { ( t ) => { integrate( f( t ) * g( tau - t
> > ), posInf, negInf ) } } : (A => B) => (B => C) => A => C
> >
> > For the subset of types supporting a certain algebraic structure --
> > i.e. we restrict the universe of quantification in the original
> > theorem -- this is a useful example of a way of getting functions from
> > pairs of functions that is not a composition. Convolution is a useful
> > notion that arises in physical sciences as well as in computation.
> >
> > The important point in all of this is that Scala's type system doesn't
> > see certain aspects of computation that are still materially relevant
> > to working programmers. The stuff that falls into this category can
> > make practically useful documentation.
> >
> > Best wishes,
> >
> > --greg
> >
> > On Mon, Nov 16, 2009 at 6:53 AM, Ricky Clarkson
> > <ricky [dot] clarkson [at] gmail [dot] com <mailto:ricky [dot] clarkson [at] gmail [dot] com>> wrote:
> >
> > I put it to you that my wife, who has never[1] programmed in her life,
> > will be able to tell what the signature we have been discussing means.
> > She might need it rephrasing, as she's not familiar with Scala's
> > syntax. Here's how I might rephrase it:
> >
> > There's a converter called f. It takes in a value of type A, and
> > returns a value of type B.
> > There's a converter called g. It takes in a value of type B, and
> > returns a value of type C.
> >
> > If I have f and g, and a value of type A, how would I get a value
> > of type C?
> >
> > We might draw boxes on paper too, I don't know yet.
> >
> > I don't mind pandering to morons, to use your terms, not least as I am
> > one in many contexts. I'm not dismissing anyone. I see no harm in
> > documenting signatures, even obvious ones, but I don't see it as
> > necessary. It's ok to me if Scala cannot be used in organisations
> > that place so much emphasis on documenting obvious things, rather than
> > having their staff understand fundamental concepts. Note that I'm not
> > even a committer though, and neither is Tony, to my knowledge. If
> > you're unhappy with the documentation, I've never heard of a
> > documentation-adding patch being rejected.
> >
> > [1] I got her doing a little bit of Scheme a couple of years ago, just
> > to keep her awake in a boring job. She picked Ruby after I showed her
> > code snippets from 13 languages, so she'll be learning that (as will
> > I) soon.
> >
> > 2009/11/16 Donald McLean <dmclean62 [at] gmail [dot] com
> > <mailto:dmclean62 [at] gmail [dot] com>>:
> > > While there seems to be a strong "let us not pander to the morons"
> > > faction, please keep in mind that many of the people that you are so
> > > casually dismissing do have real power to prevent the adoption of
> > > Scala in their organizations. Failure to provide Scaladoc that is
> > > genuinely useful to people like me who are reasonably bright and
> > > competent developers but not strong theorists is a potentially fatal
> > > mistake. The Scala community will not, in many cases, get a second
> > > chance to prove that their product is NOT a toy dreamed up by
> > > insufferable academic elitists.
> > >
> > > On Mon, Nov 16, 2009 at 8:27 AM, Ricky Clarkson
> > > <ricky [dot] clarkson [at] gmail [dot] com <mailto:ricky [dot] clarkson [at] gmail [dot] com>> wrote:
> > >>> I agree with you, Andrew, and disagree with Tony, in that English
> > >>> documentation must be associated with the signature above to
> > describe the
> > >>> semantics of the function. If one has a mathematical
> > inclination then
> > >>> perhaps some sort of formal specification language could be
> > used (Z?).
> > >>> However the interface needed by the compiler is not sufficient
> > to describe
> > >>> the function's (possibly complex and non-obvious) internal
> > operation.
> > >>
> > >> Where possible, the function should be simple and obvious, and
> > types
> > >> should be sufficient to describe it. As I said in another post, I
> > >> agree with Tony, except that a good English description is required
> > >> wherever one departs from the simple, obvious implementation.
> > > --
> > > Family photographs are a critical legacy for
> > > ourselves and our descendants. Protect that
> > > legacy with a digital backup and recovery plan.
> > >
> > > Join the photo preservation advocacy Facebook group:
> > >
> > http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
> > >
> >
> >
> >
> > --
> > Ricky Clarkson
> > Java and Scala Programmer, AD Holdings
> > +44 1565 770804
> > Skype: ricky_clarkson
> > Google Talk: ricky [dot] clarkson [at] gmail [dot] com
> > <mailto:ricky [dot] clarkson [at] gmail [dot] com>
> > Google Wave: ricky [dot] clarkson [at] googlewave [dot] com
> > <mailto:ricky [dot] clarkson [at] googlewave [dot] com>
> >
> >
> >
> >
> > --
> > L.G. Meredith
> > Managing Partner
> > Biosimilarity LLC
> > 1219 NW 83rd St
> > Seattle, WA 98117
> >
> > +1 206.650.3740
> >
> > http://biosimilarity.blogspot.com
>
> --
> Tony Morris
> http://tmorris.net/
>
>

New! Receive and respond to mail from other email accounts from within Hotmail Find out how.
Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: Re: Scaladoc that is actually useful?
Apologies for posting in wrong thread

From: oxbow_lakes [at] hotmail [dot] com
To: tonymorris [at] gmail [dot] com; lgreg [dot] meredith [at] gmail [dot] com
CC: ricky [dot] clarkson [at] gmail [dot] com; dmclean62 [at] gmail [dot] com; scala-user [at] listes [dot] epfl [dot] ch
Subject: RE: [scala-user] Re: Scaladoc that is actually useful?
Date: Tue, 17 Nov 2009 08:40:58 +0000

.ExternalClass .ecxhmmessage P {padding:0px;} .ExternalClass body.ecxhmmessage {font-size:10pt;font-family:Verdana;} Tony -

You have taken this way too far. The contents of your last email are pretty disgraceful.

May I remind you that the original poster on the thread made a point about the general lack of documentation in scala. You responded with an obscure point about *one single function's type signature*, did not clarify that you were only talking about that one function and neither did it clarify that you were talking about it in the purely functional sense, as opposed to the scala method sense.

Your response as you intended it was hence almost completely irrelevant to the original question - as you did not clarify your terms, plenty misunderstood what you were saying. It has taken others to come to this thread to educate as by that stage you had degenerated into passive-aggressive abuse.

Chris


> Date: Tue, 17 Nov 2009 06:50:39 +1000
> From: tonymorris [at] gmail [dot] com
> To: lgreg [dot] meredith [at] gmail [dot] com
> CC: ricky [dot] clarkson [at] gmail [dot] com; dmclean62 [at] gmail [dot] com; scala-user [at] listes [dot] epfl [dot] ch
> Subject: Re: [scala-user] Re: Scaladoc that is actually useful?
>
> They are not observably distinguishable under extensional equivalence.
> Can you imagine if I'd said that up front? Yeah I'd be the "theorist"
> from that "faction", which is rather ignorant given the facts, but I
> digress. This is the kind of balance I must maintain with the few who
> like learning, the few from whom I'd be preaching to the choir and the
> many who resent learning from the Scala community. Perhaps it's an error
> to start where I did or perhaps it's an error to even attempt it on the
> mailing list. I didn't expect such blatant dishonesty, poor
> comprehension and failure to understand such a basic fact, which is very
> well documented (I won't bother posting the proof or the paper --
> because none of you read it right?).
>
> I haven't even proposed an argument, merely stated an absolute,
> provable, proven, falsifiable, unfalsified, absolute, undeniable,
> you-look-like-holocaust-deniers,
> yes-evolution-is-supported-by-a-mountain-of-evidence fact that has been
> misrepresented repeatedly. I'm flabbergasted that so many programmers
> cannot grasp this, but on the other hand, I'm not really. But I am even
> more flabbergasted that it came from you Greg.
>
> I know a lot of you care about how you to appear to others (I don't give
> a flying fish -- I'm more interested in reality), so I might inform you
> that there are lots of people laughing at the ignorance of a basic fact
> by the Scala community right now. They have far less sympathy than I do
> -- I'm not laughing.
>
> Meredith Gregory wrote:
> > Dear Ricky,
> >
> > i have responded to this argument repeatedly. i'm not sure why people
> > are not getting this. Tony's argument is blatantly false. There are
> > countably infinitely many inhabitants of the type (A => B) => (B => C)
> > => A => C. They are observably distinguished by running time and space
> > consumption. Here is one infinite subset of that set: for each k in
> > the natural numbers we have
> >
> > Compose_k( f, g ) = { ( x ) => { var d = computeKthDigitOfPi( k ); g(
> > f( x ) ) } : (A => B) => (B => C) => A => C
> >
> > There are lots more infinite subsets where that one came from. The
> > differences in complexity are not just manifest by silliness of the
> > kind above. There are materially relevant differences that have to do
> > with the internal representation of function and evaluation.
> >
> > Beyond that, consider the following function
> >
> > // provided A, B, C <: T with T supporting a certain algebraic structure
> > Convolution_tau( f, g ) = { ( t ) => { integrate( f( t ) * g( tau - t
> > ), posInf, negInf ) } } : (A => B) => (B => C) => A => C
> >
> > For the subset of types supporting a certain algebraic structure --
> > i.e. we restrict the universe of quantification in the original
> > theorem -- this is a useful example of a way of getting functions from
> > pairs of functions that is not a composition. Convolution is a useful
> > notion that arises in physical sciences as well as in computation.
> >
> > The important point in all of this is that Scala's type system doesn't
> > see certain aspects of computation that are still materially relevant
> > to working programmers. The stuff that falls into this category can
> > make practically useful documentation.
> >
> > Best wishes,
> >
> > --greg
> >
> > On Mon, Nov 16, 2009 at 6:53 AM, Ricky Clarkson
> > <ricky [dot] clarkson [at] gmail [dot] com <mailto:ricky [dot] clarkson [at] gmail [dot] com>> wrote:
> >
> > I put it to you that my wife, who has never[1] programmed in her life,
> > will be able to tell what the signature we have been discussing means.
> > She might need it rephrasing, as she's not familiar with Scala's
> > syntax. Here's how I might rephrase it:
> >
> > There's a converter called f. It takes in a value of type A, and
> > returns a value of type B.
> > There's a converter called g. It takes in a value of type B, and
> > returns a value of type C.
> >
> > If I have f and g, and a value of type A, how would I get a value
> > of type C?
> >
> > We might draw boxes on paper too, I don't know yet.
> >
> > I don't mind pandering to morons, to use your terms, not least as I am
> > one in many contexts. I'm not dismissing anyone. I see no harm in
> > documenting signatures, even obvious ones, but I don't see it as
> > necessary. It's ok to me if Scala cannot be used in organisations
> > that place so much emphasis on documenting obvious things, rather than
> > having their staff understand fundamental concepts. Note that I'm not
> > even a committer though, and neither is Tony, to my knowledge. If
> > you're unhappy with the documentation, I've never heard of a
> > documentation-adding patch being rejected.
> >
> > [1] I got her doing a little bit of Scheme a couple of years ago, just
> > to keep her awake in a boring job. She picked Ruby after I showed her
> > code snippets from 13 languages, so she'll be learning that (as will
> > I) soon.
> >
> > 2009/11/16 Donald McLean <dmclean62 [at] gmail [dot] com
> > <mailto:dmclean62 [at] gmail [dot] com>>:
> > > While there seems to be a strong "let us not pander to the morons"
> > > faction, please keep in mind that many of the people that you are so
> > > casually dismissing do have real power to prevent the adoption of
> > > Scala in their organizations. Failure to provide Scaladoc that is
> > > genuinely useful to people like me who are reasonably bright and
> > > competent developers but not strong theorists is a potentially fatal
> > > mistake. The Scala community will not, in many cases, get a second
> > > chance to prove that their product is NOT a toy dreamed up by
> > > insufferable academic elitists.
> > >
> > > On Mon, Nov 16, 2009 at 8:27 AM, Ricky Clarkson
> > > <ricky [dot] clarkson [at] gmail [dot] com <mailto:ricky [dot] clarkson [at] gmail [dot] com>> wrote:
> > >>> I agree with you, Andrew, and disagree with Tony, in that English
> > >>> documentation must be associated with the signature above to
> > describe the
> > >>> semantics of the function. If one has a mathematical
> > inclination then
> > >>> perhaps some sort of formal specification language could be
> > used (Z?).
> > >>> However the interface needed by the compiler is not sufficient
> > to describe
> > >>> the function's (possibly complex and non-obvious) internal
> > operation.
> > >>
> > >> Where possible, the function should be simple and obvious, and
> > types
> > >> should be sufficient to describe it. As I said in another post, I
> > >> agree with Tony, except that a good English description is required
> > >> wherever one departs from the simple, obvious implementation.
> > > --
> > > Family photographs are a critical legacy for
> > > ourselves and our descendants. Protect that
> > > legacy with a digital backup and recovery plan.
> > >
> > > Join the photo preservation advocacy Facebook group:
> > >
> > http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
> > >
> >
> >
> >
> > --
> > Ricky Clarkson
> > Java and Scala Programmer, AD Holdings
> > +44 1565 770804
> > Skype: ricky_clarkson
> > Google Talk: ricky [dot] clarkson [at] gmail [dot] com
> > <mailto:ricky [dot] clarkson [at] gmail [dot] com>
> > Google Wave: ricky [dot] clarkson [at] googlewave [dot] com
> > <mailto:ricky [dot] clarkson [at] googlewave [dot] com>
> >
> >
> >
> >
> > --
> > L.G. Meredith
> > Managing Partner
> > Biosimilarity LLC
> > 1219 NW 83rd St
> > Seattle, WA 98117
> >
> > +1 206.650.3740
> >
> > http://biosimilarity.blogspot.com
>
> --
> Tony Morris
> http://tmorris.net/
>
>

New! Receive and respond to mail from other email accounts from within Hotmail Find out how.
Add other email accounts to Hotmail in 3 easy steps. Find out how.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland