<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 5/4/14, 4:45 PM, Kamil Slowikowski
wrote:<br>
</div>
<blockquote
cite="mid:CALr_PqaP7C-cU9yG9qzKr=9tsV2KsaDkj==z1q8zkW=H-Eij6A@mail.gmail.com"
type="cite">
<pre wrap="">I cannot reproduce the example in the user guide:
<a class="moz-txt-link-freetext" href="http://swift-lang.org/guides/release-0.94/userguide/userguide.html#_structured_regular_expression_mapper">http://swift-lang.org/guides/release-0.94/userguide/userguide.html#_structured_regular_expression_mapper</a>
Please see the script and console output below.</pre>
</blockquote>
<br>
Kamil, thanks for reporting this.<br>
<br>
Im not yet certain, but I think the example should be recoded to
make the source (in addition to the dest) array be an array of type
file rather than of type string, and also to trace @filenames( ) of
the dest file array rather than the whole array:<br>
<br>
$ cat test2.swift<br>
<br>
type file;<br>
string s[] = ["picture.gif", "hello.gif", "world.gif"];<br>
<br>
file g[]<array_mapper; files=s>;<br>
file f[] <structured_regexp_mapper;<br>
source=g,<br>
match="(.*)gif",<br>
transform="\\1jpg">;<br>
trace(@filenames(f));<br>
<br>
$ swift test2.swift<br>
Swift 0.94.1 swift-r7114 cog-r3803<br>
<br>
RunID: 20140504-2309-rfdo9614<br>
Progress: time: Sun, 04 May 2014 23:09:21 +0000<br>
SwiftScript trace: {0 = picture.jpg, 1 = hello.jpg, 2 = world.jpg}<br>
Final status: Sun, 04 May 2014 23:09:21 +0000<br>
<br>
I filed a bug ticket (#1271) to fix the exception, determine the
(currently) desired behavior, and update the User Guide:<br>
<br>
<a class="moz-txt-link-freetext" href="https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1271">https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1271</a><br>
<blockquote
cite="mid:CALr_PqaP7C-cU9yG9qzKr=9tsV2KsaDkj==z1q8zkW=H-Eij6A@mail.gmail.com"
type="cite">
<pre wrap="">
1. Is Swift currently being developed?</pre>
</blockquote>
Yes, actively.<br>
<blockquote
cite="mid:CALr_PqaP7C-cU9yG9qzKr=9tsV2KsaDkj==z1q8zkW=H-Eij6A@mail.gmail.com"
type="cite">
<pre wrap="">
2. Are there plans to improve the documentation soon?</pre>
</blockquote>
Yes - this need is well-recognized. The User Guide improves but
rather slowly. I can't provide a date when this will start
accelerating.<br>
<blockquote
cite="mid:CALr_PqaP7C-cU9yG9qzKr=9tsV2KsaDkj==z1q8zkW=H-Eij6A@mail.gmail.com"
type="cite">
<pre wrap="">
3. Is it possible to move the documentation to a platform where your users
can contribute?</pre>
</blockquote>
Yes, that's a good idea. We are planning a move to GitHub. We were a
bit more focused on enabling users to contribute to code, but
enabling user documentation contributions more readily is a great
idea. Our docs are currently written in AsciiDoc; we'll look for
ways to do this, but for now, just mail improvement text to
swift-user. (Ideally, please join the swift-user list so that your
posts are not blocked for moderation).<br>
<blockquote
cite="mid:CALr_PqaP7C-cU9yG9qzKr=9tsV2KsaDkj==z1q8zkW=H-Eij6A@mail.gmail.com"
type="cite">
<pre wrap="">
4. Is the project well-funded and staffed?</pre>
</blockquote>
We're very grateful for the funding we have, but its barely enough
to support our user base. About 7 people work on Swift, under
relatively modest funding. Less than 1.5 FTE is available to support
of the Swift 0.9 -> 1.0 product trajectory; the rest of the team
is funded to do CS research or support specific science application
user groups. We're actively pursuing expanded funding and other
means of sustaining Swift, including working more aggressively to
grow a sustaining open source community.<br>
<br>
- Mike<br>
<blockquote
cite="mid:CALr_PqaP7C-cU9yG9qzKr=9tsV2KsaDkj==z1q8zkW=H-Eij6A@mail.gmail.com"
type="cite">
<pre wrap="">
Thanks,
Kamil
Here is the script: (copied from the guide verbatim)
- - -
$ cat test.swift
type file;
string s[] = ["picture.gif", "hello.gif", "world.gif"];
file f[] <structured_regexp_mapper;
source=s,
match="(.*)gif",
transform="\\1jpg">;
trace(f);
- - -
Here is the output:
- - -
$ swift test.swift
Swift 0.94.1 swift-r7114 cog-r3803
RunID: 20140504-1718-q5qk8b9a
Progress: time: Sun, 04 May 2014 17:18:24 -0400
Execution failed:
f, line 3 had mapping errors
Caused by:
java.lang.NullPointerException
at
org.griphyn.vdl.mapping.file.StructuredRegularExpressionMapper.map(StructuredRegularExpressionMapper.java:106)
at
org.griphyn.vdl.mapping.RootDataNode.addExisting(RootDataNode.java:173)
at
org.griphyn.vdl.mapping.RootDataNode.checkInputs(RootDataNode.java:128)
at
org.griphyn.vdl.mapping.RootArrayDataNode.checkInputs(RootArrayDataNode.java:104)
at
org.griphyn.vdl.mapping.RootArrayDataNode.innerInit(RootArrayDataNode.java:92)
at
org.griphyn.vdl.mapping.RootArrayDataNode.futureModified(RootArrayDataNode.java:113)
at
org.griphyn.vdl.karajan.ArrayIndexFutureList$1.run(ArrayIndexFutureList.java:156)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
- - -
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Swift-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Swift-user@ci.uchicago.edu">Swift-user@ci.uchicago.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user</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>