<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 1/20/15 9:59 PM, Ketan Maheshwari
wrote:<br>
</div>
<blockquote
cite="mid:CAMUuvioVz=FRfeuCJEPDSJg9wSWAQ_ojvK0KkCvHif7GJ6tF2A@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div dir="ltr">Neat!
<div><br>
<div>Comments:</div>
<div><br>
</div>
<div>-- Statistical functions in a standard library seem out
of place to me. One may ask, why just stop with statistical
functions and not also include vector and matrix related
functions such as cross and dot products or fancier stuff
like finding eigen values, etc.</div>
</div>
</div>
</blockquote>
Important things like sum( ) were placed in this category. I think
this is a common need that's hard to do without an intrinsic library
function. I suspect there are other frequently encountered needs to
iterate through an array and select, count, or otherwise process
elements that match some criteria.<br>
<br>
I'd argue for moving such functions to the Array category instead of
the stats category. Do we need other types of array reduction
functions? min() / max()? General reduction seems to demand
function arguments, but I'm getting beyond my understanding of
functional programming here.<br>
<br>
I wonder what the minimal lowest common denominator intrinsic
functions of this nature are, which would enable any higher-level
set of stats functions to be implemented. I'm still trying to
understand if a necessary and sufficient set of such functions were
already included in the proposed set, or if these remain to be
defined.<br>
<br>
- Mike<br>
<blockquote
cite="mid:CAMUuvioVz=FRfeuCJEPDSJg9wSWAQ_ojvK0KkCvHif7GJ6tF2A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>-- sqrt and cbrt seem redundant as we already provide pow
with float exponent.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Ketan</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 20, 2015 at 6:56 PM, Mihael
Hategan <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:hategan@mcs.anl.gov" target="_blank">hategan@mcs.anl.gov</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I made a wiki page on github where we could discuss the
standard<br>
library: <a moz-do-not-send="true"
href="https://github.com/swift-lang/swift-k/wiki/StandardLibrary"
target="_blank">https://github.com/swift-lang/swift-k/wiki/StandardLibrary</a><br>
<br>
It's a draft and there are some rough edges. In particular:<br>
<br>
- regular expression support: substitutions can be done
either directly<br>
or with a combination between a function that returns
capture groups and<br>
a formatting function that replaces certain tokens with
elements of an<br>
array. One could overload the format() function to, in
addition to<br>
standard formatting specs, also support something like
%s[index]. Or<br>
have a separate formatting function that only deals with
this specific<br>
problem. I'm not sure.<br>
<br>
- some of the array functions may be difficult to implement
as<br>
specified, or there may be different functions that solve
the problems<br>
better. In particular when joining arrays of arrays, there
is some<br>
freedom in how to order the elements of the resulting array.<br>
<br>
- read and write: it may not be easy to implement a read
that can return<br>
any type in T. There is some precedent in other languages
that support<br>
serialization for this.<br>
<br>
Anyway, I added red exclamation marks and red question marks
where<br>
things aren't quite clear.<br>
<br>
I'm assuming that most of us will agree on most of the
things. However,<br>
if you have a wildly different proposal, it might be wise to
create<br>
another page instead of editing this one.<br>
<br>
Mihael<br>
<br>
_______________________________________________<br>
Swift-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
<a moz-do-not-send="true"
href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel"
target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Swift-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Wilde
Mathematics and Computer Science Computation Institute
Argonne National Laboratory The University of Chicago
</pre>
</body>
</html>