<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Dragonfly Networks</title>
	<atom:link href="http://www.dragonfly-networks.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dragonfly-networks.com</link>
	<description>small footprint. impressive optics. can hover overhead, if necessary.</description>
	<pubDate>Wed, 03 Dec 2008 12:15:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>OSDClub Tel Aviv Meeting: Ori Idan about the Semantic Web</title>
		<link>http://www.dragonfly-networks.com/2008/12/osdclub-tel-aviv-meeting-ori-idan-about-the-semantic-web-2/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/osdclub-tel-aviv-meeting-ori-idan-about-the-semantic-web-2/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:42 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/osdclub-tel-aviv-meeting-ori-idan-about-the-semantic-web-2/</guid>
		<description><![CDATA[Perlsphere: OSDClub Tel Aviv Meeting: Ori Idan about the Semantic Web
The Tel Aviv Open Source Developers Club (OSDClub) (formerly the Tel Aviv
Linux Club and other clubs such as Perl-Israel) will hold a meeting on
21/September (next Sunday). Ori Idan will deliver a presentation about
the Semantic Web.
Ori is the director of the Israeli branch of the World-Wide-Web
Consortium [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://use.perl.org/~Shlomi+Fish/journal/37483?from=rss">OSDClub Tel Aviv Meeting: Ori Idan about the Semantic Web</a></p>
<p>The Tel Aviv Open Source Developers Club (OSDClub) (formerly the Tel Aviv<br />
Linux Club and other clubs such as Perl-Israel) will hold a meeting on<br />
21/September (next Sunday). Ori Idan will deliver a presentation about<br />
the Semantic Web.</p>
<p>Ori is the director of the Israeli branch of the World-Wide-Web<br />
Consortium (W3C), and is a very good presenter, so it is recommended to<br />
attend.</p>
<p>The meeting will take place at 18:30 in the Schreiber Maths and Computer<br />
Science building of Tel Aviv University, room 008. Attendance is free of<br />
charge and everyone are welcome.</p>
<p><a href="http://use.perl.org/~Shlomi+Fish/journal/37483?from=rss">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/osdclub-tel-aviv-meeting-ori-idan-about-the-semantic-web-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A grammar for (pseudo) XML</title>
		<link>http://www.dragonfly-networks.com/2008/12/a-grammar-for-pseudo-xml-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/a-grammar-for-pseudo-xml-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:38 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/a-grammar-for-pseudo-xml-9/</guid>
		<description><![CDATA[Perlsphere: A grammar for (pseudo) XML
NAME
&#8220;Perl 5 to 6&#8243; Lesson 20 - A grammar for (pseudo) XML
SYNOPSIS
    grammar XML {
        token TOP   { ^  $ };
        token xml   {
 [ 
 ]* };
 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-5-to-6/20-a-grammar-for-xml.writeback">A grammar for (pseudo) XML</a></p>
<p>NAME</p>
<p>&#8220;Perl 5 to 6&#8243; Lesson 20 - A grammar for (pseudo) XML</p>
<p>SYNOPSIS</p>
<p>    grammar XML {<br />
        token TOP   { ^ <xml> $ };<br />
        token xml   {
<plain> [ <tag>
<plain> ]* };<br />
        token plain {  <-[<>&#038;]>* };<br />
        rule tag   {<br />
            &#8216;<'(\w+) <attributes>*<br />
            [<br />
                | '/>'                 # a single tag<br />
                | '>'<xml>'</' $0 '>'  # an opening and a closing tag<br />
            ]<br />
        };<br />
        token attributes { \w+ &#8216;=&#8221;&#8216; <-["<>]>* &#8216;&#8221;&#8216; };<br />
    };</p>
<p>DESCRIPTION</p>
<p>So far the focus of these articles has been the Perl 6 language,<br />
independently of what has been implemented so far. To show you that it&#8217;s<br />
not a purely fantasy language, and to demonstrate the power of grammars,<br />
this lesson shows you the development of a grammar that parses basic XML,<br />
and that runs with rakudo todo. I used revision 30633 for this, so in<br />
order to reproduce it reliably, you should check out the same revision.</p>
<p>On a Unix like OS, this might look like this:</p>
<p>    svn co -r 30633 https://svn.perl.org/parrot/trunk parrot<br />
    cd parrot<br />
    perl Configure.pl &#038;&#038; make<br />
    cd languages/perl6/ &#038;&#038; make perl6</p>
<p>Windows users have to build perl6.exe in the last step instead.</p>
<p>Now run make spectest_regression, and if you get any failures, please<br />
send a mail to rakudobug@perl.org.</p>
<p>Our idea of XML</p>
<p>For our purposes XML is quite simple: it consists of plain text and<br />
nested tags that can optionally have attributes. So here are few tests<br />
for what we want to parse as valid &#8220;XML&#8221;, and what not:</p>
<p>    my @tests = (<br />
        [1, 'abc'                       ],      # 1<br />
        [1, '<a></a>'                   ],      # 2<br />
        [1, '..<ab>foo</ab>dd'          ],      # 3<br />
        [1, '<a><b>c</b></a>'           ],      # 4<br />
        [1, '<a href="foo"><b>c</b></a>'],      # 5<br />
        [1, '<a empty="" ><b>c</b></a>' ],      # 6<br />
        [1, '<a><b>c</b><c></c></a>'    ],      # 7<br />
        [0, '<'                         ],      # 8<br />
        [0, '<a>b</b>'                  ],      # 9<br />
        [0, '<a>b</a'                   ],      # 10<br />
        [0, '<a>b</a href="">'          ],      # 11<br />
        [1, '<a/>'                      ],      # 12<br />
        [1, '<a />'                     ],      # 13<br />
    );</p>
<p>    my $count = 1;<br />
    for @tests -> $t {<br />
        my $s = $t[1];<br />
        my $M := $s ~~ XML::TOP;<br />
        if !($M  xor $t[0]) {<br />
            say &#8220;ok $count - &#8216;$s&#8217;&#8221;;<br />
        } else {<br />
            say &#8220;not ok $count - &#8216;$s&#8217;&#8221;;<br />
        }<br />
        $count++;<br />
    }</p>
<p>This is a list of both &#8220;good&#8221; and &#8220;bad&#8221; XML, and a small test script that<br />
runs these tests by matching against XML::TOP. By convention the rule<br />
that matches what the grammar should match is named TOP.</p>
<p>(As you can see from test 1 we don&#8217;t require a single root tag, but it<br />
would be trivial to add this restriction).</p>
<p>Developing the grammar</p>
<p>The examples can be downloaded from<br />
http://perlgeek.de/static/xml-grammar-01.tar.gz</p>
<p>The essential of XML is surely the nesting of tags, so we&#8217;ll focus on the<br />
second test first. Place this at the top of the test script:</p>
<p>    grammar XML {<br />
        token TOP   { ^ <tag> $ };<br />
        token tag   {<br />
            &#8216;<' (\w+) '>&#8216;<br />
            &#8216;</' $0   '>&#8216;<br />
        };<br />
    };</p>
<p>(All tokens end with a ;. This is not required in Perl 6, but a<br />
limitation of Rakudo).</p>
<p>Now run the script:</p>
<p>    $ ./perl6 xml-01.pl<br />
    not ok 1 - &#8216;abc&#8217;<br />
    ok 2 - &#8216;<a></a>&#8216;<br />
    not ok 3 - &#8216;..<ab>foo</ab>dd&#8217;<br />
    not ok 4 - &#8216;<a><b>c</b></a>&#8216;<br />
    not ok 5 - &#8216;<a href="foo"><b>c</b></a>&#8216;<br />
    not ok 6 - &#8216;<a empty="" ><b>c</b></a>&#8216;<br />
    not ok 7 - &#8216;<a><b>c</b><c></c></a>&#8216;<br />
    ok 8 - &#8216;<'<br />
    ok 9 - '<a>b</b>&#8216;<br />
    ok 10 - &#8216;<a>b</a'<br />
    ok 11 - '<a>b</a href="">&#8216;<br />
    not ok 12 - &#8216;<a/>&#8216;<br />
    not ok 13 - &#8216;<a />&#8216;</p>
<p>So this simple rule parses one pair of start tag and end tag, and<br />
correctly rejects all four examples of invalid xml.</p>
<p>The first test should be easy to pass as well, so let&#8217;s try this:</p>
<p>   grammar XML {<br />
       token TOP   { ^ <xml> $ };<br />
       token xml   { <text> | <tag> };<br />
       token text  { <-[<>&#038;]>*  };<br />
       token tag   {<br />
           &#8216;<' (\w+) '>&#8216;<br />
           &#8216;</' $0   '>&#8216;<br />
       }<br />
    };</p>
<p>(Remember, <-[...]> is a negated character class.)</p>
<p>And run it:</p>
<p>    $ ./perl6 xml-02.pl<br />
    Null PMC access in type()<br />
    current instr.: &#8216;parrot;XML;xml&#8217; pc 975 (EVAL_17:282)<br />
    called from Sub &#8216;parrot;XML;TOP&#8217; pc 778 (EVAL_17:202)<br />
    called from Sub &#8216;parrot;Code;ACCEPTS&#8217; pc 5559 (src/gen_builtins.pir:3700)<br />
    called from Sub &#8216;_block87&#8242; pc 1621 (EVAL_17:535)<br />
    &#8230;</p>
<p>Bad surprise, it dies. Let&#8217;s try to find out where and why.</p>
<p>The stack trace shows that it was in an anonymous block, which doesn&#8217;t<br />
really help, because we don&#8217;t know which. Code;ACCEPTS points us to the<br />
regex match: the smartmatch ~~ internally calls ACCEPTS, and regexes are<br />
compiled down to Code object. It calls XML::TOP, then XML::xml, and then<br />
dies. Since we haven&#8217;t changed the tag token, it must be text that&#8217;s<br />
causing the problem.</p>
<p>Playing around a bit, asking on #perl6 on irc.freenode.org or digging<br />
through the bug tracker reveals that, due to some weird limitation, you<br />
can&#8217;t call a regex text in Rakudo. So changing the name from text to<br />
plain makes it work again, with this result:</p>
<p>    $ ./perl6 xml-03.pl<br />
    ok 1 - &#8216;abc&#8217;<br />
    not ok 2 - &#8216;<a></a>&#8216;<br />
    (rest unchanged)</p>
<p>Why in the seven hells did the second test stop working? The answer is<br />
that Rakudo doesn&#8217;t do longest token matching yet, but matches<br />
sequentially.
<plain> matches the empty string (and thus always), so</p>
<plain> | <tag> never even tries to match <tag>.</p>
<p>But we don&#8217;t just want to match either plain text or a tag anyway, but<br />
random combinations of both of them:</p>
<p>    token xml   {
<plain> [ <tag>
<plain> ]*  };</p>
<p>([...] are non-capturing groups, like (?: &#8230; ) is in Perl 5).</p>
<p>And low and behold, the first two tests pass both.</p>
<p>The third test, .<ab>foo</ab>dd, has text between opening and closing<br />
tag, so we have to allow that next. But not only text is allowed between<br />
tags, but arbitrary xml, so let&#8217;s just call <xml> there:</p>
<p>    token tag   {<br />
        &#8216;<' (\w+) '>&#8216;<br />
        <xml><br />
        &#8216;</' $0   '>&#8216;<br />
    }</p>
<p>    ./perl6 xml-05.pl<br />
    ok 1 - &#8216;abc&#8217;<br />
    ok 2 - &#8216;<a></a>&#8216;<br />
    ok 3 - &#8216;..<ab>foo</ab>dd&#8217;<br />
    ok 4 - &#8216;<a><b>c</b></a>&#8216;<br />
    not ok 5 - &#8216;<a href="foo"><b>c</b></a>&#8216;<br />
    (rest unchanged)</p>
<p>We can now focus attributes (the href=&#8221;foo&#8221; stuff):</p>
<p>    token tag   {<br />
        &#8216;<' (\w+) <attribute>* &#8216;>&#8217;<br />
        <xml><br />
        &#8216;</' $0   '>&#8216;<br />
    };<br />
    token attribute {<br />
        \w+ &#8216;=&#8221;&#8216; <-["<>]>* \&#8221;<br />
    };</p>
<p>But this doesn&#8217;t make any new tests pass. The reason is the blank between<br />
the tag name and the attribute. Instead of adding \s+ or \s* in many<br />
places we&#8217;ll switch from token to rule, which implies the :sigspace<br />
modifier:</p>
<p>    rule tag   {<br />
        &#8216;<'(\w+) <attribute>* &#8216;>&#8217;<br />
        <xml><br />
        &#8216;</'$0'>&#8216;<br />
    };<br />
    token attribute {<br />
        \w+ &#8216;=&#8221;&#8216; <-["<>]>* \&#8221;<br />
    };</p>
<p>Now all tests pass, except the last two:</p>
<p>    ok 1 - &#8216;abc&#8217;<br />
    ok 2 - &#8216;<a></a>&#8216;<br />
    ok 3 - &#8216;..<ab>foo</ab>dd&#8217;<br />
    ok 4 - &#8216;<a><b>c</b></a>&#8216;<br />
    ok 5 - &#8216;<a href="foo"><b>c</b></a>&#8216;<br />
    ok 6 - &#8216;<a empty="" ><b>c</b></a>&#8216;<br />
    ok 7 - &#8216;<a><b>c</b><c></c></a>&#8216;<br />
    ok 8 - &#8216;<'<br />
    ok 9 - '<a>b</b>&#8216;<br />
    ok 10 - &#8216;<a>b</a'<br />
    ok 11 - '<a>b</a href="">&#8216;<br />
    not ok 12 - &#8216;<a/>&#8216;<br />
    not ok 13 - &#8216;<a />&#8216;</p>
<p>These contain un-nested tags that are closed with a single slash /. No<br />
problem to add that to rule tag:</p>
<p>    rule tag   {<br />
        &#8216;<'(\w+) <attribute>* [<br />
            | '/>'<br />
            | '>' <xml> '</'$0'>'<br />
        ]<br />
    };</p>
<p>All tests pass, we&#8217;re happy, our first grammar works well.</p>
<p>More hacking</p>
<p>Playing with grammars is much more fun that reading about playing, so<br />
here&#8217;s what you could implement:</p>
<p>  * plain text can contain entities like &amp;</p>
<p>  * I don&#8217;t know if xml tag names are allowed to begin with a number, but<br />
    the current grammar allows that. You might look it up in the XML<br />
    specification, and adapt the grammar if needed.</p>
<p>  * plain text can contain <![CDATA[ ... ]]&gt; blocks, in which xml-like<br />
    tags are ignored and < and the like don't need to be escaped</p>
<p>  * Real xml allows a preample like <?xml version="0.9"<br />
    encoding="utf-8"?> and requires one root tag which contains the rest<br />
    (You&#8217;d have to change some of the existing test cases)</p>
<p>  * You could try to implement a pretty-printer for XML by recursively<br />
    walking through the match object $/. (This is non-trivial; you might<br />
    have to work around a few Rakudo bugs, and maybe also introduce some<br />
    new captures).</p>
<p>(Please don&#8217;t post solutions to this as comments in this blog; let others<br />
have the same fun as you had ;-).</p>
<p>Have fun hacking.</p>
<p>MOTIVATION</p>
<p>It&#8217;s powerful and fun</p>
<p>SEE ALSO</p>
<p>Regexes are specified in great detail in S05:<br />
http://perlcabal.org/syn/S05.html.</p>
<p>More working (!) examples of regexes and grammars can be found in the<br />
November project, a wiki engine written in Perl 6. See<br />
http://github.com/viklund/november/.</p>
<p><a href="http://perlgeek.de/blog-en/perl-5-to-6/20-a-grammar-for-xml.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/a-grammar-for-pseudo-xml-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Summer of Code Mentor Recap</title>
		<link>http://www.dragonfly-networks.com/2008/12/google-summer-of-code-mentor-recap-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/google-summer-of-code-mentor-recap-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:34 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/google-summer-of-code-mentor-recap-9/</guid>
		<description><![CDATA[Perlsphere: Google Summer of Code Mentor Recap
Eric Wilhelm asked the mentors of the Google Summer of Code projects 2008
to share their thoughts on the program and their project, so here is my
blah.
I mentored Adrian Kreher&#8217;s project Flesh Out the Perl 6 Test Suite, and
overall I&#8217;m very pleased.
After being talked into becoming a mentor by Jerry [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-6/gsoc-mentor-recap.writeback">Google Summer of Code Mentor Recap</a></p>
<p>Eric Wilhelm asked the mentors of the Google Summer of Code projects 2008<br />
to share their thoughts on the program and their project, so here is my<br />
blah.</p>
<p>I mentored Adrian Kreher&#8217;s project Flesh Out the Perl 6 Test Suite, and<br />
overall I&#8217;m very pleased.</p>
<p>After being talked into becoming a mentor by Jerry &#8220;particle&#8221; Gay I was a<br />
a little nervous and not really sure if I was up to the task. So I did<br />
what my student would be doing later on: write new tests, review old<br />
ones, move them to the &#8220;official&#8221; part of the test suite, and adapt them<br />
so that Rakudo can run them (which basically means selectively disabling<br />
tests).</p>
<p>On The perl soc mentor&#8217;s list I found a few links to guides on how to be<br />
a good mentor, which I read and which boil down to &#8220;communicate with your<br />
student, run his code and give him some feedback&#8221;.</p>
<p>So we (my student and I) made contact, scheduled regular meetings on IRC,<br />
I answered a few questions of his, and thus the project began.</p>
<p>Adrian&#8217;s work was very good in terms of quality, and after a few minor<br />
corrections and nits from my part I made myself mostly superfluous, he<br />
worked on his own. I continued to monitor his commits, filled out the mid<br />
term and end of term surveys, and thusly passed the project for me.</p>
<p>Assessing the work on the test suite is a bit harder than with other<br />
project, because most projects had rather clear goals, whereas in this<br />
project the goal was &#8220;clean up the test suite as much as possible&#8221;. It<br />
was clear from the beginning that Adrian wouldn&#8217;t be able to make it<br />
through the whole test suite (roughly 900 files, 20k+ tests), so the<br />
quantitative goal was to create and mofify 1000 tests, which was met, as<br />
far as measurable.</p>
<p>As stated before I am very pleased both with Adrian&#8217;s work (which<br />
actually helped the Rakudo developers a lot), and with the whole<br />
infrastructure; there was very little administrative work to do and<br />
everybody I dealt with was friendly and helpful.</p>
<p>So if all works well (enough free time, and proposals which fit my<br />
abilities) I&#8217;ll surely offer to mentor again.</p>
<p><a href="http://perlgeek.de/blog-en/perl-6/gsoc-mentor-recap.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/google-summer-of-code-mentor-recap-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Changes to Perl 5 Operators</title>
		<link>http://www.dragonfly-networks.com/2008/12/changes-to-perl-5-operators-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/changes-to-perl-5-operators-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:31 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/changes-to-perl-5-operators-9/</guid>
		<description><![CDATA[Perlsphere: Changes to Perl 5 Operators
NAME
&#8220;Perl 5 to 6&#8243; Lesson 11 - Changes to Perl 5 Operators
SYNOPSIS
    # bit wise operators
    5   +&#124; 3;       # 7
    6   +^ 3        [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-5-to-6/11-basic-operators.writeback">Changes to Perl 5 Operators</a></p>
<p>NAME</p>
<p>&#8220;Perl 5 to 6&#8243; Lesson 11 - Changes to Perl 5 Operators</p>
<p>SYNOPSIS</p>
<p>    # bit wise operators<br />
    5   +| 3;       # 7<br />
    6   +^ 3        # 6<br />
    5   +& 3;       # 1<br />
    &#8220;b&#8221; ~| &#8220;d&#8221;      # &#8216;f&#8217;</p>
<p>    # string concatenation<br />
    &#8216;a&#8217; ~ &#8216;b&#8217;       # &#8216;ab&#8217;</p>
<p>    # file tests<br />
    if &#8216;/etc/passwd&#8217; ~~ :e { say &#8220;exists&#8221; }</p>
<p>    # repetition<br />
    &#8216;a&#8217; x 3         # &#8216;aaa&#8217;<br />
    &#8216;a&#8217; xx 3        # &#8216;a&#8217;, &#8216;a&#8217;, &#8216;a&#8217;</p>
<p>    # ternary op<br />
    $a == $b ?? 2 * $a !! $b - $a</p>
<p>    # chained comparisons<br />
    if 0 <= $angle < 2 * pi { ... }</p>
<p>DESCRIPTION</p>
<p>All the numeric operators (+, -, /, *, **, %) remain unchanged.</p>
<p>Since |, ^ and &#038; now construct junctions, the bit wise operators have a<br />
changed syntax. They now contain a data prefix, so for example +| is bit<br />
wise OR with numeric context, and ~^ is one's complement on a string. Bit<br />
shift operators changed in the same way.</p>
<p>String concatenation is now ~, the dot . is used for method calls.</p>
<p>File tests are now formulated in Pair notation, Perl 5 -e is now :e. If<br />
something other than $_ should be used as the file name, it can be<br />
supplied via $filename ~~ :e.</p>
<p>The repetition operator x is now split into two operators: x replicates<br />
strings, xx lists.</p>
<p>The ternary operator, formerly $condition ? $true : $false, is now<br />
spelled $condition ?? $true !! $false.</p>
<p>Comparison operators can now be chained, so you can write $a < $b < $c<br />
and it does what you mean.</p>
<p>MOTIVATION</p>
<p>Many changes to the operators aim at a better Huffman coding, ie give<br />
often use things short names (like . for method calls) and seldomly used<br />
operators a longer name (like ~&#038; for string bit-wise AND).</p>
<p>The chaining comparison operators are another step towards making the<br />
language more natural, and allowing things that are commonly used in<br />
mathematical notation.</p>
<p>SEE ALSO</p>
<p>http://perlcabal.org/syn/S03.html#Changes_to_Perl_5_operators</p>
<p><a href="http://perlgeek.de/blog-en/perl-5-to-6/11-basic-operators.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/changes-to-perl-5-operators-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Junctions</title>
		<link>http://www.dragonfly-networks.com/2008/12/junctions-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/junctions-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:27 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/junctions-9/</guid>
		<description><![CDATA[Perlsphere: Junctions
NAME
&#8220;Perl 5 to 6&#8243; Lesson 07 - Junctions
SYNOPSIS
    if $x eq 3&#124;4 {
        say &#8216;$x is either 3 or 4&#8242;
    }
    say ((2&#124;3&#124;4)+7).perl        # (9&#124;10&#124;11)
DESCRIPTION
Junctions are superpositions of unordered values. Operations [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-5-to-6/08-junctions.writeback">Junctions</a></p>
<p>NAME</p>
<p>&#8220;Perl 5 to 6&#8243; Lesson 07 - Junctions</p>
<p>SYNOPSIS</p>
<p>    if $x eq 3|4 {<br />
        say &#8216;$x is either 3 or 4&#8242;<br />
    }<br />
    say ((2|3|4)+7).perl        # (9|10|11)</p>
<p>DESCRIPTION</p>
<p>Junctions are superpositions of unordered values. Operations on junctions<br />
are executed for each item of the junction separately (and maybe even in<br />
parallel), and the results are assembled in a junction of the same type.</p>
<p>The junction types only differ when evaluated in boolean context. The<br />
types are any, all, one and none.</p>
<p>    Type    Infix operator<br />
    any     |<br />
    one     ^<br />
    all     &#038;</p>
<p>1 | 2 | 3 is the same as any(1..3).</p>
<p>    my Junction $weekday = any <Monday Tuesday Wednesday<br />
                                Thursday Friday Saturday Sunday><br />
    if $day eq $weekday {<br />
        say &#8220;See you on $day&#8221;;<br />
    }</p>
<p>In this example the eq operator is called with each pair $day, &#8216;Monday&#8217;,<br />
$day, &#8216;Tuesday&#8217; etc. and the result is put in an any-Junction again. As<br />
soon as the result is determined (in this case, as soon as one comparison<br />
returns True) it can abort the execution of the other comparisons.</p>
<p>This works not only for operators, but also for subs:</p>
<p>    if 2 == sqrt(4 | 9 | 16) {<br />
        say &#8220;YaY&#8221;;<br />
    }</p>
<p>To make this possible, junctions stand outside the normal type hierarchy<br />
(a bit):</p>
<p>                    Object<br />
                   /      \<br />
                 Any     Junction<br />
               /  |  \<br />
            All other types</p>
<p>If you want to write a sub that takes a junction and doesn&#8217;t autothread<br />
over it, you have to declare the type of the parameter either as Object<br />
or Junction</p>
<p>    sub dump_yaml(Object $stuff) {<br />
        # we hope that YAML can represent junctions <img src='http://www.dragonfly-networks.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />         &#8230;.<br />
    }</p>
<p>A word of warning: Junctions can behave counter-intuitive sometimes. With<br />
non-junction types $a != $b and !($a == $b) always mean the same thing.<br />
If one of these variables is a junction, that might be different:</p>
<p>    my Junction $b = 3 | 2;<br />
    my $a = 2;<br />
    say &#8220;Yes&#8221; if   $a != $b ;       # Yes<br />
    say &#8220;Yes&#8221; if !($a == $b);       # no output</p>
<p>2 != 3 is true, thus $a != 2|3 is also true. On the other hand the $a ==<br />
$b comparion returns a single Bool value (True), and the negation of that<br />
is False.</p>
<p>MOTIVATION</p>
<p>Perl aims to be rather close to natural languages, and in natural<br />
language you often say things like &#8220;if the result is $this or $that&#8221;<br />
instead of saying &#8220;if the result is $this or the result $that&#8221;. Most<br />
programming languages only allow (a translation of) the latter, which<br />
feels a bit clumsy. With junctions Perl 6 allows the former as well.</p>
<p>It also allows you to write many comparisons very easily that otherwise<br />
require loops.</p>
<p>As an example, imagine an array of numbers, and you want to know if all<br />
of them are non-negative. In Perl 5 you&#8217;d write something like this:</p>
<p>    # Perl 5 code:<br />
    my @items = get_data();<br />
    my $all_non_neg = 1;<br />
    for (@items){<br />
        if ($_ < 0) {<br />
            $all_non_neg = 0;<br />
            last;<br />
        }<br />
    }<br />
    if ($all_non_neg) { ... }</p>
<p>Or if you happen to know about List::MoreUtils</p>
<p>    use List::MoreUtils qw(all);<br />
    my @items = get_data;<br />
    if (all { $_ >= 0 } @items) { &#8230;  }</p>
<p>In Perl 6 that is short and sweet:</p>
<p>    my @items = get_data();<br />
    if all(@items) >= 0 { &#8230; }</p>
<p>SEE ALSO</p>
<p>http://perlcabal.org/syn/S03.html#Junctive_operators</p>
<p><a href="http://perlgeek.de/blog-en/perl-5-to-6/08-junctions.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/junctions-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Magic ARGV (considered harmful)</title>
		<link>http://www.dragonfly-networks.com/2008/12/magic-argv-considered-harmful-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/magic-argv-considered-harmful-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:23 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/magic-argv-considered-harmful-9/</guid>
		<description><![CDATA[Perlsphere: Magic ARGV (considered harmful)
A bunch of threads on the perl5-porters mailing list made me aware of a
rather obscure perl 5 feature.
I was quite familiar with the basic form, which goes like this:
while (  ) {
    print;
}
This either reads from all files in turn that were given on the command
line, or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-tips/magic-argv.writeback">Magic ARGV (considered harmful)</a></p>
<p>A bunch of threads on the perl5-porters mailing list made me aware of a<br />
rather obscure perl 5 feature.</p>
<p>I was quite familiar with the basic form, which goes like this:</p>
<p>while ( <> ) {<br />
    print;<br />
}</p>
<p>This either reads from all files in turn that were given on the command<br />
line, or from STDIN if no file name was provided.</p>
<p>Now <> actually uses open internally, specifically the 2 argument form.<br />
Which means that anything that is valid as the second argument to open<br />
also works in @ARGV:</p>
<p>local @ARGV = (&#8217;fortune |&#8217;);<br />
priint while <>;</p>
<p>Instead of trying to open a file called fortune |, it actually executes<br />
the command fortune and uses it output for the <> &#8220;diamond operator&#8221;.</p>
<p>This feature can be used for quite some tricky and shiny stuff, but it&#8217;s<br />
also dangerous. If your perl program uses <>, it is vulnerable to the<br />
command line argument rm -rf * | and similar things, also known as<br />
&#8220;arbitrary code execution&#8221;.</p>
<p>Therefore the perl porters are discussing about disabling this feature,<br />
and making the old, magic behaviour available with a command line switch<br />
or a pragma.</p>
<p>For me the consequence is &#8220;don&#8217;t use <> with possibly untrusted input&#8221;.</p>
<p><a href="http://perlgeek.de/blog-en/perl-tips/magic-argv.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/magic-argv-considered-harmful-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building a Huffman Tree With Rakudo</title>
		<link>http://www.dragonfly-networks.com/2008/12/building-a-huffman-tree-with-rakudo-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/building-a-huffman-tree-with-rakudo-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:19 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/building-a-huffman-tree-with-rakudo-9/</guid>
		<description><![CDATA[Perlsphere: Building a Huffman Tree With Rakudo
15 months ago I wrote a blog post about Building a Huffman Tree with Perl
6 (German). Back then I used pugs to test it.
Now I tried it with Rakudo Perl revision 29736, and to my delight I
discovered that it worked nearly without modification.
(Actually it needed a small modification because [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-6/huffman-tree-with-rakudo.writeback">Building a Huffman Tree With Rakudo</a></p>
<p>15 months ago I wrote a blog post about Building a Huffman Tree with Perl<br />
6 (German). Back then I used pugs to test it.</p>
<p>Now I tried it with Rakudo Perl revision 29736, and to my delight I<br />
discovered that it worked nearly without modification.</p>
<p>(Actually it needed a small modification because I made a mistake in the<br />
testing originally, I compared hashes with string semantics. That works<br />
in pugs even though it is not specified; in rakudo it doesn&#8217;t).</p>
<p>I updated my script a bit to do the testing correctly, and used a few<br />
more typical Perl 6 idioms:</p>
<p>use Test;<br />
plan 6;<br />
# number of occurencesmy @fr = (<br />
    ['a', 45],<br />
    ['b', 13],<br />
    ['c', 12],<br />
    ['d', 16],<br />
    ['e', 9 ],<br />
    ['f', 5 ],<br />
);<br />
# That&#8217;s what we expectmy %expected = (<br />
    a => &#8216;0&#8242;,<br />
    b => &#8216;101&#8242;,<br />
    c => &#8216;100&#8242;,<br />
    d => &#8216;111&#8242;,<br />
    e => &#8216;1101&#8242;,<br />
    f => &#8216;1100&#8242;);<br />
my @c = @fr;<br />
# build the huffman treewhile @c > 1 {<br />
    @c = sort { $^a[1] <=> $^b[1] }, @c;<br />
    my $a = shift @c;<br />
    my $b = shift @c;<br />
    unshift @c, [[$a[0], $b[0]], $a[1] + $b[1]];<br />
}<br />
my %res;<br />
# recursively traverse the tree to build the codesub traverse ($a, Str $code = &#8220;&#8221;){<br />
    if $a ~~ Str {<br />
        %res{$a} = $code;<br />
    } else {<br />
        traverse($a[0], $code ~ &#8216;0&#8242;);<br />
        traverse($a[1], $code ~ &#8216;1&#8242;);<br />
    }<br />
}</p>
<p>traverse(@c[0][0]);<br />
# now compare with the expected code:#say %res;#say %expected;for %res.keys -> $k {<br />
    is %res{$k}, %expected{$k}, &#8220;Huffman code for letter $k&#8221;;<br />
}</p>
<p><a href="http://perlgeek.de/blog-en/perl-6/huffman-tree-with-rakudo.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/building-a-huffman-tree-with-rakudo-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Containers and Values</title>
		<link>http://www.dragonfly-networks.com/2008/12/containers-and-values-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/containers-and-values-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:16 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/containers-and-values-9/</guid>
		<description><![CDATA[Perlsphere: Containers and Values
NAME
&#8220;Perl 5 to 6&#8243; Lesson 10 - Containers and Values
Synopsis
    my ($x, $y);
    $x := $y;
    $y = 4;
    say $x;             # 4
    if $x [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-5-to-6/10-containers-and-values.writeback">Containers and Values</a></p>
<p>NAME</p>
<p>&#8220;Perl 5 to 6&#8243; Lesson 10 - Containers and Values</p>
<p>Synopsis</p>
<p>    my ($x, $y);<br />
    $x := $y;<br />
    $y = 4;<br />
    say $x;             # 4<br />
    if $x =:= $y {<br />
        say &#8216;$x and $y are different names for the same thing&#8217;<br />
    }</p>
<p>DESCRIPTION</p>
<p>Perl 6 distinguishes between containers, and values that can be stored in<br />
containers.</p>
<p>A normal scalar variable is a container, and can have some properties<br />
like type constraints, access constraints (for example it can be read<br />
only), and finally it can be aliased to other containers.</p>
<p>Putting a value into a container is called assignment, and aliasing two<br />
containers is called binding.</p>
<p>    my @a = 1, 2, 3;<br />
    my Int $x = 4;<br />
    @a[0] := $x;     # now @a[0] and $x are the same variable<br />
    @a[0] = &#8216;Foo&#8217;;   # Error &#8216;Type check failed&#8217;</p>
<p>Types like Int and Str are immutable, ie the objects of that type can&#8217;t<br />
be changed; but you can still change the variables (the containers, that<br />
is) which hold these values:</p>
<p>    my $a = 1;<br />
    $a = 2;     # no surprise here</p>
<p>Binding can also be done at compile time with the ::= operator.</p>
<p>You can check if two things are bound together the =:= comparison<br />
operator.</p>
<p>MOTIVATION</p>
<p>Exporting and importing subs, types and variables is done via aliasing.<br />
Instead of some hard-to-grasp typeglob aliasing magic, Perl 6 offers a<br />
simple operator.</p>
<p>SEE ALSO</p>
<p>http://perlcabal.org/syn/S03.html#Item_assignment_precedence</p>
<p><a href="http://perlgeek.de/blog-en/perl-5-to-6/10-containers-and-values.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/containers-and-values-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Twigils</title>
		<link>http://www.dragonfly-networks.com/2008/12/twigils-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/twigils-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:12 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/twigils-9/</guid>
		<description><![CDATA[Perlsphere: Twigils
NAME
&#8220;Perl 5 to 6&#8243; Lesson 15 - Twigils
SYNOPSIS
  class Foo {
      has $.bar;
      has $!baz;
  }
  my @stuff = sort { $^b[1]  $^a[1]}, [1, 2], [0, 3], [4, 8];
  my $block = { say &#8220;This is the named &#8216;foo&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/perl-5-to-6/15-twigils.writeback">Twigils</a></p>
<p>NAME</p>
<p>&#8220;Perl 5 to 6&#8243; Lesson 15 - Twigils</p>
<p>SYNOPSIS</p>
<p>  class Foo {<br />
      has $.bar;<br />
      has $!baz;<br />
  }</p>
<p>  my @stuff = sort { $^b[1] <=> $^a[1]}, [1, 2], [0, 3], [4, 8];<br />
  my $block = { say &#8220;This is the named &#8216;foo&#8217; parameter: $:foo&#8221; };<br />
  $block(:foo<bar>);</p>
<p>  say &#8220;This is file $?FILE on line $?LINE&#8221;</p>
<p>  say &#8220;A CGI script&#8221; if %*ENV.exists(&#8217;DOCUMENT_ROOT&#8217;);</p>
<p>DESCRIPTION</p>
<p>Some variables have a second sigil, called twigil. It basically means<br />
that the variable isn&#8217;t &#8220;normal&#8221;, but differs in some way, for example it<br />
could be differently scoped.</p>
<p>You&#8217;ve already seen that public and private object attributes have the .<br />
and ! twigil respectively; they are not normal variables, they are tied<br />
to self.</p>
<p>The ^ twigil removes a special case from perl 5. To be able to write</p>
<p>  # beware: perl 5 code<br />
  sort { $a <=> $b } @array</p>
<p>the variables $a and $b are special cased by the strict pragma. In Perl<br />
6, there&#8217;s a concept named self-declared positional parameter, and these<br />
parameters have the ^ twigil. It means that they are positional<br />
parameters of the current block, without being listed in a signature. The<br />
variables are filled in lexicographic (alphabetic) order:</p>
<p>  my $block = { say &#8220;$^c $a $^b&#8221; };<br />
  $block(1, 2, 3);                # 3 1 2</p>
<p>So now you can write</p>
<p>  @list = sort { $^b <=> $^a }, @list;<br />
  # or:<br />
  @list = sort { $^foo <=> $^bar }, @list;</p>
<p>Without any special cases.</p>
<p>And to keep the symetry between positional and named arguments, the :<br />
twigil does the same for named parameters, so these lines are roughly<br />
equivalent:</p>
<p>  my $block = { say $:stuff }<br />
  my $sub   = sub (:$stuff) { say $stuff }</p>
<p>The ? twigil stands for variables and constants that are known at compile<br />
time, like $?LINE for the current line number (formerly __LINE__), and<br />
$?DATA is the file handle to the DATA section.</p>
<p>Global variables can be accessed with the * twigil, so %GLOBAL::ENV can<br />
be abbreviated to %*ENV, the command line arguments are stored in @*ARGS,<br />
the current process number is in $*PID and so on.</p>
<p>A pseudo twigil is <, which is used in a construct like $<capture>, where<br />
it is a shorthand for $/<capture>, which accesses the Match object after<br />
a regex match.</p>
<p>MOTIVATION</p>
<p>When you read Perl 5&#8217;s perlvar document, you can see that it has far too<br />
many variables, most of them global, that affect your program in various<br />
ways.</p>
<p>The twigils try to bring some order in these special variables, and at<br />
the other hand they remove the need for special cases. In the case of<br />
object attributes they shorten self.var to $.var (or @.var or whatever).</p>
<p>So all in all the increased &#8220;punctuation noise&#8221; actually makes the<br />
programs much more consistent and readable.</p>
<p><a href="http://perlgeek.de/blog-en/perl-5-to-6/15-twigils.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/twigils-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Diploma Thesis: Spin Transport in Mesoscopic Systems</title>
		<link>http://www.dragonfly-networks.com/2008/12/my-diploma-thesis-spin-transport-in-mesoscopic-systems-9/</link>
		<comments>http://www.dragonfly-networks.com/2008/12/my-diploma-thesis-spin-transport-in-mesoscopic-systems-9/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 12:15:08 +0000</pubDate>
		<dc:creator>Mark Beihoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dragonfly-networks.com/2008/12/my-diploma-thesis-spin-transport-in-mesoscopic-systems-9/</guid>
		<description><![CDATA[Perlsphere: My Diploma Thesis: Spin Transport in Mesoscopic Systems
Sometimes people ask me what I&#8217;m doing right now, and I tell them &#8220;I&#8217;m
writing my diploma thesis on mesoscopic spin transport&#8221;, and they know
just as much as before. So here I want to explain what that means.
Mesoscopic systems
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
A mesoscopic system is one that is larger than a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perlsphere.net/">Perlsphere</a>: <a href="http://perlgeek.de/blog-en/meso.writeback">My Diploma Thesis: Spin Transport in Mesoscopic Systems</a></p>
<p>Sometimes people ask me what I&#8217;m doing right now, and I tell them &#8220;I&#8217;m<br />
writing my diploma thesis on mesoscopic spin transport&#8221;, and they know<br />
just as much as before. So here I want to explain what that means.</p>
<p>Mesoscopic systems<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>A mesoscopic system is one that is larger than a few nanometers, but<br />
still small enough that you have to care about quantum effects.</p>
<p>That&#8217;s not a very precise definition, so I&#8217;ll try again: Consider a<br />
metallic wire. For macroscopic systems (ie the ones that we are used to<br />
in day-to-day live) you might know that the electrical resistance of such<br />
a wire increases linearly as you increase its length, and decreases<br />
linearly if you increase its cross section.</p>
<p>This is very intuitive, because electrical resistance describes how hard<br />
it is for an electron to travel through our wire. If the wire is longer,<br />
it sees more obstacles, so the resistance is higher. If the wire has a<br />
larger cross section, it&#8217;s easier for the electron to find a way that&#8217;s<br />
not blocked, so the resistance is smaller. That&#8217;s called Ohm&#8217;s law.</p>
<p>These relations aren&#8217;t true anymore for rather small systems. If you have<br />
a very thin wire, say 20 nanometers, and increase its diameter by another<br />
nanometer, the resistance might not change at all. Then you increase its<br />
diameter by another nanometer, the resistance suddenly jumps down by a<br />
few percent.</p>
<p>All these systems that are too small for Ohm&#8217;s law to apply are called<br />
mesoscopic. All mesoscopic effects have to be explained with quantum<br />
physics, at least at some point.</p>
<p>Electron Spin<br />
&#8212;&#8212;&#8212;&#8212;-</p>
<p>Electrons have something called Spin. Everybody knows that it has a<br />
charge, and it acts as if it rotated around its own axis very fast. So it<br />
looks like a current which runs in a circle, and that creates a small<br />
magnetic field.</p>
<p>If you try to measure the magnetic field of one electron, you will only<br />
ever get two possible values, which we call spin up and spin down.</p>
<p>Topics of Interest<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>It&#8217;s clear that my diploma thesis will either have to do with spin<br />
optics, or with the Spin Hall Effect, so I&#8217;ll describe the two here.</p>
<p>Spin Optics</p>
<p>In a semiconductor, one can split up a beam of electrons into two beams<br />
of spin-up and spin-down electrons, just like in optics with polarized<br />
light. That splitting can be influenced by an external voltage, like a<br />
classical transistor.</p>
<p>So one of my possible topics could very roughly be described as<br />
&#8220;calculate some properties of a spin beam transistor&#8221;.</p>
<p>Spin Hall Effect</p>
<p>In the classic Hall effect a current is driven through a conductor, and a<br />
magnetic field generates a voltage perpendicular to both the magnetic<br />
field and the current, and a charge is accumulated.</p>
<p>Now through some complicated mechanism a similar setup can lead to a spin<br />
charge, ie a region in the conductor where there are more spin-up<br />
electrons than spin-down electrons.</p>
<p>That&#8217;s a pretty new effect, the first papers about it are from 1997 or<br />
1998, and there&#8217;s a lot of things that can be calculated.</p>
<p><a href="http://perlgeek.de/blog-en/meso.writeback">Read more from Perlsphere.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonfly-networks.com/2008/12/my-diploma-thesis-spin-transport-in-mesoscopic-systems-9/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
