[Swift-user] a tutorial problem

David Kelly dk0966 at cs.ship.edu
Sun Oct 24 22:26:53 CDT 2010


Hello all,

I have made the following changes to the tutorial based on Daniel's feedback:

Section 3.6 reference to HELLOWORLD changed to "exercise in section 2"
Section 3.6 reference to ANONYMOUSFILE changed to "exercise in section 3.3"
TODO reminder removed until new content is added
Corrected filename in section 3.3 from greeting.txt to hello.txt
Added the full code from the prior example to section 3.3 with
appropriate changes
Changed the style of defining an app to the cleaner version, which
should give a more consistent presentation.
Modified examples/q5.swift, examples/manyparam.swift,
examples/second_procedure.swift, examples/restart.swift,
examples/iterate.swift, examples/types.swift, and
examples/parameter.swift to match this style. These are in revision

I do not have permissions to run a manual update on the documentation,
but I did modify the docbook file with the correct information. It
should hopefully update on the website within 24 hours. In the
meantime, here is a PDF file I generated which contains the updates.

Regards,
David

On Thu, Oct 21, 2010 at 12:12 PM, Michael Wilde <wilde at mcs.anl.gov> wrote:
> Thanks, Dan.
>
> David, can you comment on the problems Dan has reported (today and a few
> days back) on the tutorial, as I recall that you worked on it this summer?
>
> Thanks,
>
> Mike
>
> ----- "Daniel S. Katz" <dsk at ci.uchicago.edu> wrote:
>> Hi,
>>
> This is the first real error in the tutorial.  Section 3.3 is incomplete,
> and doesn't make any sense.
>>
> It refers to greeting.txt from the previous section, but there is no
> greeting.txt in the previous section.  There's a greeting procedure, but no
> greeting file.  It seems that this might refer to hello.txt.  Also, the line
> in the box refers to outfile, which wasn't defined.
>>
>>
> So, the text in section 3.3 should read:
>>
>>
>
> In the previous section, the file hello.txt is used only to store an
> intermediate result. We don't really care about which name is used for the
> file, and we can let Swift choose the name.
>
> To do that, omit the mapping entirely when declaring outfile:
>
>>
> And line in the box should read:
>>
> messagefile hellofile;
>>
>>
> For completeness, the code from the previous example could be restated with
> this change:
>>
>>
> type messagefile {}
>
> (messagefile t) greeting (string s) {
>     app {
>         echo s stdout=@filename(t);
>     }
> }
>
> (messagefile o) capitalise(messagefile i) {
>     app {
>         tr "[a-z]" "[A-Z]" stdin=@filename(i) stdout=@filename(o);
>     }
> }
>
> messagefile hellofile;
> messagefile final <"capitals.txt">;
>
> hellofile = greeting("hello from Swift");
> final = capitalise(hellofile);
>>
>>
> Dan
>>
>>
>>
>>
>>
>> --
>> Daniel S. Katz
>> University of Chicago
>> (773) 834-7186 (voice)
>> (773) 834-3700 (fax)
>> d.katz at ieee.org or dsk at ci.uchicago.edu
>> http://www.ci.uchicago.edu/~dsk/
>>
>
>
>>
>> _______________________________________________ Swift-user mailing list
>> Swift-user at ci.uchicago.edu
>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
>
> --
> Michael Wilde
> Computation Institute, University of Chicago
> Mathematics and Computer Science Division
> Argonne National Laboratory
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tutorial.pdf
Type: application/pdf
Size: 42515 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20101024/2f446579/attachment.pdf>


More information about the Swift-user mailing list