Sounds good to me. I've been thinking, for other reasons, about doing a tech report on Swift/T to serve as a reference for academic purposes, since we don't have anything we can readily cite. This would include formal semantics for Swift/T. <br>
<br>Aside from formal specifications, I think one major gap is concrete examples that illuminate the trickier points of semantics. I personally find well-constructed examples more helpful for most purposes than formal specifications, but I think that may come down to different learning styles. E.g. one example that I think is enlightening is the one below, which prints 10, 10 times. Really emphasises the point that Swift is declarative rather then imperative.<br>
<br>int A[];<br>foreach i in [1:10] {<br> A[i] = i;<br> trace(size(A));<br>}<br><br>- Tim<br><br><br><div class="gmail_quote">On Sun, Mar 10, 2013 at 4:28 PM, Michael Wilde <span dir="ltr"><<a href="mailto:wilde@mcs.anl.gov" target="_blank">wilde@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 All,<br>
<br>
We have an activity underway within the ExTENCI project to improve Swift's tutorial and documentation, in collaboration with Amy Apon (chair of Computer Science at Clemson and OSG collaborator) and Clemson graduate student Eric Skogen.<br>
<br>
I suggested that we use support questions on the swift-* email lists as one guide to where documentation needs improvement, citing a recent question from a new user who didn't understand what can go in an app() function.<br>
<br>
Amy recently suggested that we publish a syntax specification for Swift (which is a great idea and long overdue) and pointed out that the syntax spec could/would have made clear to this new user that you can't put an assignment in an app def.<br>
<br>
What I believe we need for Swift is a top-notch User Guide that can double as a hands-on tutorial, and a separate, concise but complete Reference Manual that precisely states language syntax and semantics, and can be used by both users (to answer questions not made clear in the User Guide) and developers (to discuss subtleties or proposed changes in semantics and to deal with implementation issues).<br>
<br>
While the User Guide needs to be organized in a reasonable order for exposing the language, the Reference Manual needs to be laid out more top-down (in terms of compilation units) and bottom-up (in terms of lexical issues).<br>
<br>
Eric, David, and Ketan are discussing and working on the User Guide. Ive asked Ketan to see if the informal BNF-like syntax of the classic K&R C book can be readily adapted to Swift, and also suggested that the concise compact style of the Swift/T User Guide is in fact more of a reference manual already, and could form the basis of a complete reference manual that ideally can serve both Swift/K and Swift/T.<br>
<br>
We'll need and be having a lot more discussion on both the User Guide and Reference Manual, but with this e-mail I wanted to move all such discussion to this list (swift-devel).<br>
<br>
- Mike<br>
<br>
----- Original Message -----<br>
> From: "Amy Apon" <<a href="mailto:aapon@clemson.edu">aapon@clemson.edu</a>><br>
> To: "Michael Wilde" <<a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a>><br>
> Cc: "Eric Skogen" <<a href="mailto:eskogen@g.clemson.edu">eskogen@g.clemson.edu</a>>, "David Kelly" <<a href="mailto:davidk@ci.uchicago.edu">davidk@ci.uchicago.edu</a>>, "Ketan Maheshwari"<br>
> <<a href="mailto:ketan@mcs.anl.gov">ketan@mcs.anl.gov</a>><br>
> Sent: Sunday, March 10, 2013 1:05:54 PM<br>
> Subject: Re: [Swift-user] Variable Declaration<br>
><br>
> Mike,<br>
><br>
><br>
> This is a good idea -- looking at support questions to understand<br>
> where the "pain points" are.<br>
><br>
><br>
> This particular question is related to our conversation on the last<br>
> call. If we could come up with a grammar or grammar-like description<br>
> of Swift, then explaining the concept below (that an app()<br>
> function's body is restricted to contain a single command line<br>
> template and nothing else),would be explained with a tutorial about<br>
> the grammar. Are we still looking at this?<br>
><br>
><br>
> I would like to schedule another call that includes you, me, and<br>
> Eric, I think, to keep in touch. How does your time look on<br>
> Wednesday afternoon this week?<br>
><br>
><br>
> Amy<br>
><br>
><br>
><br>
><br>
><br>
> Amy Apon, Ph.D.<br>
> Professor and Chair, Division of Computer Science, School of<br>
> Computing<br>
> Clemson University<br>
> 221 McAdams<br>
> Phone: <a href="tel:864-656-5769" value="+18646565769">864-656-5769</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> On Sun, Mar 10, 2013 at 12:30 PM, Michael Wilde < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br>
> wrote:<br>
><br>
><br>
> Eric, All,<br>
><br>
> I think we can gain a lot of insight into documentation/training<br>
> needs by observing the questions users come with when first using<br>
> Swift, such as this one.<br>
><br>
> - restrictions on what can be in an app() body, and how you code<br>
> around them<br>
><br>
> - guidance on the use of types and type names<br>
><br>
> In other words, we can look at support questions and ask "how can the<br>
> learning roadmap make such support questions less likely to happen".<br>
><br>
> Mike<br>
><br>
> ----- Forwarded Message -----<br>
> From: "Tim Armstrong" < <a href="mailto:tim.g.armstrong@gmail.com">tim.g.armstrong@gmail.com</a> ><br>
> To: "Michael Wilde" < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br>
> Sent: Saturday, March 9, 2013 5:56:39 PM<br>
> Subject: Re: [Swift-user] Variable Declaration<br>
><br>
> What Mike said. I was also going to say that your line:<br>
><br>
> type string;<br>
><br>
> may cause problems: string is a built-in type and you don't need to<br>
> define it.<br>
><br>
> - Tim<br>
><br>
><br>
> On Sat, Mar 9, 2013 at 5:55 PM, Michael Wilde < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br>
> wrote:<br>
><br>
><br>
> Jay,<br>
><br>
> An app() function's body is restricted to contain a single command<br>
> line template and nothing else. So instead of:<br>
><br>
><br>
> app (messagefile t) parse(messagefile n) {<br>
> string v = @regexp("abcdefghi", "c(def)g","monkey");<br>
> echo @extractint(n) stdout=@filename(t);<br>
> }<br>
><br>
> ...you need create a separate ("compound") function to do things like<br>
> string v=(). You can embed arbitrary expressions in the app() body,<br>
> but it can only have one semicolon-terminated command. Thats the<br>
> likely cause of the syntax error.<br>
><br>
> Also note that your statement "string v = ..." is creating a value<br>
> that as far as I can see is not used anywhere, so you may want to<br>
> re-examine that logic.<br>
><br>
> - Mike<br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> > From: "Jay Lee" < <a href="mailto:jlee734@gmail.com">jlee734@gmail.com</a> ><br>
> > To: <a href="mailto:swift-user@ci.uchicago.edu">swift-user@ci.uchicago.edu</a><br>
> > Sent: Saturday, March 9, 2013 5:48:17 PM<br>
> > Subject: [Swift-user] Variable Declaration<br>
> ><br>
> ><br>
> > Hello,<br>
> ><br>
> > I just started with swift today, so excuse my lack of knowledge. I<br>
> > have the following code:<br>
> ><br>
> > type messagefile;<br>
> > type string;<br>
> ><br>
> > app (messagefile t) parse(messagefile n) {<br>
> > string v = @regexp("abcdefghi", "c(def)g","monkey");<br>
> > echo @extractint(n) stdout=@filename(t);<br>
> > }<br>
> ><br>
> > app (messagefile t) greeting() {<br>
> > echo "Hello, world!" stdout=@filename(t);<br>
> > }<br>
> ><br>
> > messagefile outfile <"hello.txt">;<br>
> > messagefile input <"compile.txt">;<br>
> ><br>
> > outfile = parse(input);<br>
> ><br>
> ><br>
> ><br>
> > I get an error: Could not compile SwiftScript source: line 6:10:<br>
> > expecting a semicolon, found '='<br>
> ><br>
> > I found that there are mappers that can be used to declare<br>
> > variables<br>
> > (namely files), but are these required?<br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Swift-user mailing list<br>
> > <a href="mailto:Swift-user@ci.uchicago.edu">Swift-user@ci.uchicago.edu</a><br>
> > <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user</a><br>
> _______________________________________________<br>
> Swift-user mailing list<br>
> <a href="mailto:Swift-user@ci.uchicago.edu">Swift-user@ci.uchicago.edu</a><br>
> <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user</a><br>
><br>
><br>
><br>
_______________________________________________<br>
Swift-devel mailing list<br>
<a href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
<a 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>