<?xml version="1.0"?>
<rss version="2.0">

<channel>
	<title>Planet Parrot</title>
	<link>http://planet.parrotcode.org/</link>
	<language>en</language>
	<description>Planet Parrot - http://planet.parrotcode.org/</description>

<item>
	<title>Patrick Michaud: Rakudo Star 2010.08 released</title>
	<guid>http://use.perl.org/~pmichaud/journal/40518?from=rss</guid>
	<link>http://use.perl.org/~pmichaud/journal/40518?from=rss</link>
	<description>&lt;p&gt;[This announcement was made last week on rakudo.org -- I'm reposting to use.perl.org so it will show up in the various Perl aggregators. --Pm]&lt;/p&gt;&lt;p&gt;On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the August 2010 release of &quot;Rakudo Star&quot;, a useful and usable distribution of Perl 6. The tarball for the August 2010 release is available from &lt;a href=&quot;http://github.com/rakudo/star/downloads&quot;&gt;http://github.com/rakudo/star/downloads&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Rakudo Star is aimed at &quot;early adopters&quot; of Perl 6. We know that it still has some bugs, it is far slower than it ought to be, and there are some advanced pieces of the Perl 6 language specification that aren't implemented yet. But Rakudo Perl 6 in its current form is also proving to be viable (and fun) for developing applications and exploring a great new language. These &quot;Star&quot; releases are intended to make Perl 6 more widely available to programmers, grow the Perl 6 codebase, and gain additional end-user feedback about the Perl 6 language and Rakudo's implementation of it.&lt;/p&gt;&lt;p&gt;In the Perl 6 world, we make a distinction between the language (&quot;Perl 6&quot;) and specific implementations of the language such as &quot;Rakudo Perl&quot;. The August 2010 Star release includes release #32 of the Rakudo Perl 6 compiler [1], version 2.7.0 of the Parrot Virtual Machine [2], and various modules, documentation, and other resources collected from the Perl 6 community.&lt;/p&gt;&lt;p&gt;This release of Rakudo Star adds the following features over the previous Star release:&lt;br /&gt;* Nil is now undefined&lt;br /&gt;* Many regex modifiers are now recognized on the outside of regexes&lt;br /&gt;* Mathematic and range operations are now faster (they're still slow, but they're significantly faster than they were in the previous release)&lt;br /&gt;* Initial implementations of .pack and .unpack&lt;br /&gt;* MAIN can parse short arguments&lt;br /&gt;* Removed a significant memory leak for loops and other repeated blocks&lt;/p&gt;&lt;p&gt;This release (temporarily?) omits the Config::INI module that was included in the 2010.07 release, as it no longer builds with the shipped version of Rakudo. We hope to see Config::INI return soon.&lt;/p&gt;&lt;p&gt;There are some key features of Perl 6 that Rakudo Star does not yet handle appropriately, although they will appear in upcoming releases. Thus, we do not consider Rakudo Star to be a &quot;Perl 6.0.0&quot; or &quot;1.0&quot; release. Some of the not-quite-there features include:&lt;br /&gt;* nested package definitions&lt;br /&gt;* binary objects, native types, pack and unpack&lt;br /&gt;* typed arrays&lt;br /&gt;* macros&lt;br /&gt;* state variables&lt;br /&gt;* threads and concurrency&lt;br /&gt;* Unicode strings at levels other than codepoints&lt;br /&gt;* pre and post constraints, and some other phasers&lt;br /&gt;* interactive readline that understands Unicode&lt;br /&gt;* backslash escapes in regex  character classes&lt;br /&gt;* non-blocking I/O&lt;br /&gt;* most of Synopsis 9&lt;br /&gt;* perl6doc or pod manipulation tools&lt;/p&gt;&lt;p&gt;In many places we've tried to make Rakudo smart enough to inform the programmer that a given feature isn't implemented, but there are many that we've missed. Bug reports about missing and broken features are welcomed.&lt;/p&gt;&lt;p&gt;See &lt;a href=&quot;http://perl6.org/&quot;&gt;http://perl6.org/&lt;/a&gt; for links to much more information about Perl 6, including documentation, example code, tutorials, reference materials, specification documents, and other supporting resources. An updated draft of a Perl 6 book is available as  in the release tarball.&lt;/p&gt;&lt;p&gt;The development team thanks all of the contributors and sponsors for making Rakudo Star possible. If you would like to contribute, see &lt;a href=&quot;http://rakudo.org/how-to-help&quot;&gt;http://rakudo.org/how-to-help&lt;/a&gt;, ask on the perl6-compiler@perl.org mailing list, or join us on IRC channel #perl6 on freenode.&lt;/p&gt;&lt;p&gt;Rakudo Star releases are created on a monthly cycle or as needed in response to important bug fixes or improvements. The next planned release of Rakudo Star will be on September 28, 2010.&lt;/p&gt;&lt;p&gt;[1] &lt;a href=&quot;http://github.com/rakudo/rakudo&quot;&gt;http://github.com/rakudo/rakudo&lt;/a&gt;&lt;br /&gt;[2] &lt;a href=&quot;http://parrot.org/&quot;&gt;http://parrot.org/&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Wed, 01 Sep 2010 12:36:56 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: Parrot Foundation Board</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-3327671209738057979</guid>
	<link>http://wknight8111.blogspot.com/2010/08/parrot-foundation-board.html</link>
	<description>Today at the weekly Parrotsketch meeting there was also a meeting of members of the Parrot Foundation, with the aim of electing board members for the coming year. All but one of the current board members chose not to run for re-election, so it was a pretty open field.&lt;br /&gt;&lt;br /&gt;Four candidates were nominated, and today all of them were elected by simple majority: Jerry Gay (particle), Jim Keenan (kid51), Jonathan Leto (dukeleto), and myself.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here's a brief discussion of what I want to do this year as a Parrot Foundation board member:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Re-read and re-reread the foundation bylaws. I've read through them a while ago back when the foundation was first forming, but don't think I've looked at them since. Plus, I've read through so many sets of bylaws for so many young organizations in my time, the details all run together in my mind.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Money&lt;/b&gt;. The foundation doesn't have a whole ton of money, of course I can't think of too many non-profits of this size which do. There are lots of things that can be done with money: grants and bounties being two that immediately come to mind, but there are plenty of other things. Finding ways to raise money and increase the PaFo coffers should probably be a pretty big priority for us.&lt;/li&gt;&lt;li&gt;Create a proper membership committee. Parroteer &quot;smash&quot; has been running the elections and doing a fantastic job, but some problems have been exposed in the membership process. Many people do not know whether they are members or not, and many people are confused by how a person becomes a member. Clearing up confusion in this area will help everybody.&lt;/li&gt;&lt;li&gt;Recruit new people. People are the fuel that runs an open-source project, and you can never have too many people. Parrot is by no means a small open source project, but it is far from being a big one. More developers create more/better software, which attracts more end users, which increases the prestige of the project, which attracts more developers, which.... It's a feedback loop that we should be trying much harder to feed.&lt;/li&gt;&lt;/ol&gt;These are just four things that I would like to focus on this term, however this is not a definitive list. I am hoping to get, within the next few days, some information from the current board members about what kinds of tasks they have left unfinished, or what kinds of things they would try to accomplish if given another term.  Since there is so much new blood on the committee, we need to make sure to thoroughly pick the brains of the current board so that we can get this coming year off to a running start. &lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-3327671209738057979?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Wed, 01 Sep 2010 00:56:41 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: PAST Optimization: GSoC is over</title>
	<guid>http://www.parrot.org/213 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/past-optimization-gsoc-over</link>
	<description>&lt;p&gt;The Google Summer of Code pencils-down date was last Monday. GSoC is now over, but I don't plan to stop working on my project.&lt;/p&gt;
&lt;p&gt;The initial goals listed in my project proposal were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A library for PAST traversal.&lt;/li&gt;
&lt;li&gt;A framework for PAST optimization and analysis tools.&lt;/li&gt;
&lt;li&gt;A regular-expression-like pattern matching library for PASTs.&lt;/li&gt;
&lt;li&gt;An optimization to turn tail-calls in PAST into PIR &quot;.tailcall&quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/past-optimization-gsoc-over&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 24 Aug 2010 20:43:29 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: PLA Planning: Next Steps</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-1210372532633804853</guid>
	<link>http://wknight8111.blogspot.com/2010/08/pla-planning-next-steps.html</link>
	<description>I did a little bit more infrastructure work on &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra&quot;&gt;Parrot-Linear-Algebra&lt;/a&gt; this weekend. I wasn't able to get a lot done because we spent Saturday with family, but I got some nice groundwork laid for important future developments.&lt;br /&gt;&lt;br /&gt;I started thinking about bindings for the &lt;a href=&quot;http://netlib.org/lapack/&quot;&gt;LAPACK library&lt;/a&gt;, and much of the work I did this weekend was in preparation for that work. LAPACK is particularly tricky because it's written in &lt;a href=&quot;http://adaptiveoptics.blogspot.com/2007/05/fortran-sucks-balls.html&quot;&gt;FORTRAN&lt;/a&gt; and unlike the &lt;a href=&quot;http://math-atlas.sourceforge.net/&quot;&gt;ATLAS library&lt;/a&gt; I use for my &lt;a href=&quot;http://www.netlib.org/blas/&quot;&gt;BLAS&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Implementations&quot;&gt;implementation&lt;/a&gt;, there aren't any good C bindings to LAPACK around that I can find. Yes there is the &lt;a href=&quot;http://www.netlib.org/clapack/&quot;&gt;CLAPACK library&lt;/a&gt;, but I am not a particular fan of the way that library is generated and there &lt;a href=&quot;http://packages.ubuntu.com/search?keywords=clapack&amp;amp;searchon=names&amp;amp;suite=lucid&amp;amp;section=all&quot;&gt;aren't any premade packages for CLAPACK on Ubuntu&lt;/a&gt;. In installing PLA on Linux, I would like users to be able to get all prerequisites from their distribution's package manager and not have to compile these other prerequisites manually. This is a good thing since some of these can be extremely tricky to compile.&lt;br /&gt;&lt;br /&gt;I've decided that, in the foreseeable future, we will be linking to the LAPACK library directly. This does mean that we are going to need to write our own bindings and wrappers for the functions we want to call, but that's not a huge issue. Plus, I can start moving forward on something I've wanted to have for a while now: more flexible and configurable interfaces to BLAS and LAPACK. There are several implementations of each of these libraries (BLAS especially), and I want PLA to support as many of them as possible.&lt;br /&gt;&lt;br /&gt;To get these kinds of flexible interfaces, we're going to need to support large swaths of conditionally-compiled code. This will get extremely unweildy if we try to keep all the logic in the few monolithic PMC files I've been writing, so I decided that we're going to need to upgrade our build machinery to support linking in additional C library files into the dynpmc build. This weekend &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/commit/4e23a2f7854e32641b6aba606976c01220eddc0b&quot;&gt;I added that machinery&lt;/a&gt;, and started the process of factoring out some of the supporting routines from the various PMC types into those files. With common functions defined in one place, I can go through and make sure all my types are making consistent use of them. Plus, I can start writing up complicated library bindings without worrying about making my large PMC files any larger.&lt;br /&gt;&lt;br /&gt;BLAS doesn't actually supply too many routines that the PLA matrix types need. The most important, and only one I call so far, is the &lt;a href=&quot;http://en.wikipedia.org/wiki/GEMM&quot;&gt;GEMM routine&lt;/a&gt;, which performs the generalized matrix multiply/addition operation:&lt;br /&gt;&lt;br /&gt;Y = αAB + βC&lt;br /&gt;&lt;br /&gt;Where α and β are scalar values (FLOATVAL in NumMatrix2D and Complex in ComplexMatrix2D), and A, B, and C are matrices of compatible dimension. This is a very powerful operation, and really the only one from BLAS that I need. Other routines from BLAS are more highly optimized versions of this same routine for specific types of matrices (diagonal, triangular, etc), and operations between matrices and vectors which I really don't support yet. Because there is really only this one routine, and because it's so powerful and common, I've included it as a method directly in the PMC types themselves. I may rethink that decision later, but for now it seems like a decent fit where it is.&lt;br /&gt;&lt;br /&gt;LAPACK is a little bit different, however. LAPACK contains hundreds of routines, all of which are named in an idiosyncratic and difficult-to-understand way. These routines are broken up into &lt;b&gt;drivers&lt;/b&gt;, &lt;b&gt;computational routines&lt;/b&gt;, and &lt;b&gt;auxiliary routines&lt;/b&gt;. The driver routines perform the most important operations and typically call sequences of the lower-level computational and auxiliary routines to perform their work. Driver routines include calculating linear least squares, finding eigenvalues and eigenvectors, and singular value decomposition.These are the ones that PLA is going to target first, though access to other, lower-level routines might be nice to have as well, later down the road.&lt;br /&gt;&lt;br /&gt;I am torn as to how I want to provide LAPACK bindings in Parrot. The obvious thing I could do is write them all up as methods on the PLA matrix types. This is a system that provides the easiest access, but also starts to get bloated and unweildy very quickly. Plus, if you don't need LAPACK routines for your program, I would be forcing you to load the LAPACK library and create Sub PMCs for all those methods. That can get to be a pretty large cost to pay. I really don't like this idea because it adds huge bloat to my PMC files and adds extra runtime overhead of adding in all sorts of extra method PMCs when we load PLA. Plus, it doesn't scale well, any time we want to add a new LAPACK-based routine we need to add a new method to several PMC types present and future.&lt;br /&gt;&lt;br /&gt;One alternative is to provide a separate library of functions and dynamically load it using Parrot's NCI tools. I don't know what the current status of the NCI system is, but without significant improvement there, attempting to load a complex library like LAPACK, even if I provided some simplified Parrot-specific wrappers, would be a nightmare. This option does provide a little bit more flexibility because we can load in the methods that we want without having to deal with ones that we don't. Also, I don't think the distutils library that PLA is using supports creating standalone shared libraries that aren't dynpmc or dynops libraries, so I would have to write all that machinery myself. I'm not sure I really like this option either, for all these reasons.&lt;br /&gt;&lt;br /&gt;I'm also torn about whether I want to make some prerequisites for PLA  optional. &lt;a href=&quot;http://gitorious.com/kakapo/kakapo&quot;&gt;Kakapo&lt;/a&gt;, for instance, is only used for the test suite. If you  don't have Kakapo installed you can still build and use PLA, you just  can't run the test suite. BLAS is currently required because it's used  to implement the GEMM method but also the various multiply vtables. I  suppose I could make it optional, but I think it would be a little  sneaky if different builds of PLA supported a different list of VTABLEs  and METHODs for core types, including for something as fundamental as  multiplication. LAPACK is a little bit different, because even without  it we do have a pretty solid amount of core functionality. I am strongly  looking into an ability to make LAPACK an optional prerequisite, and  only include bindings for it if we have the library installed. If I wrote a dynamic library wrapper for LAPACK and had the user include that file manually to get those routines, you could still use the core library.&lt;br /&gt;&lt;br /&gt;I had also considered the idea (though I've been fighting it) of building some kind of PLALibrary singleton PMC type which would control this kind of stuff. In addition to providing information about library version and configuration options, a PLALibrary PMC could allow dynamic loading of methods, and could forcibly inject those methods into the necessary PMC types if requested. This would allow me to build everything together into a single dynamic library without forcing me to define all the methods upfront which I don't need. I may like this idea the best, though I've been resisting creating a library singleton PMC until now.&lt;br /&gt;&lt;br /&gt;There's a lot to consider, and I probably won't make any hard decisions about future plans for the next few days. In the interim I do want to put together some proof-of-concept wrappers for some common LAPACK routines, and start playing with those. If I could get routines to calculate Eigenvalues, Eigenvectors, Inverses, and Singular Value Decompositions, I think that would be a pretty great start.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-1210372532633804853?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 23 Aug 2010 21:00:00 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: GSoC Threads: Chandon's Results</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-6242513867170954402</guid>
	<link>http://wknight8111.blogspot.com/2010/08/gsoc-threads-chandons-results.html</link>
	<description>The pencil's down date for the 2010 GSoC program has come and gone, and now we're starting the process of sorting through the rubble and seeing what all got accomplished this summer. I have been purposefully trying not to provide too many of my own status updates for Chandon's project this summer, instead wanting him to post &lt;a href=&quot;http://parrot.org/blog/836&quot;&gt;his own updates&lt;/a&gt; as he went without me getting in the way. It's his project after all, and I wanted him to get all the credit for all the good work he was doing.&lt;br /&gt;&lt;br /&gt;The project is now over, and he's &lt;a href=&quot;http://parrot.org/content/hybrid-threads-gsoc-project-results&quot;&gt;posted a nice final review&lt;/a&gt; of what he managed to accomplish this summer. While it isn't everything that he mentioned in his proposal, it still is quite a nice step in the right direction and a lot of the necessary framework is now available to bring threading to Parrot in a real and usable way.&lt;br /&gt;&lt;br /&gt;So what did he manage to do? In his branch there is now a more-or-less working implementation of green threads, which means Parrot is getting onto the same level of capability as modern Python or Ruby implementations. You can schedule multiple independent tasks to run and, while they cannot run truly in parallel on separate OS threads or even on multiple processor cores, you can get the illusion of concurrency. It also gives you the ability to run multiple tasks together without having to explicitly schedule them one after the other, or having to manually switch back and forth between them. In a later post I may go into some detail about how this all works, and how it can be used by programs.&lt;br /&gt;&lt;br /&gt;This is a pretty significant step forward, and once a few of the final nits get worked out I think we will be able to merge this into Parrot trunk and start making use of the new functionality immediately. However, green threads is only one half of the promised &quot;hybrid threads&quot; that Chandon's proposal hoped to achieve. The other half is the ability to run Parrot code in true parallel on separate OS threads. This was the larger part of the project and definitely the more difficult piece. Today I would like to talk a little bit about why it didn't get done, and maybe motivate some people to look into help completing the work as we move forward.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's take a look at a small snippet of normal object-oriented code:&lt;br /&gt;&lt;br /&gt;foo.bar();&lt;br /&gt;foo.bar();&lt;br /&gt;&lt;br /&gt;Extremely simple, we have an object &quot;foo&quot; and we are calling the &quot;bar&quot; method on it. In a very naive staticly-typed language this would be a simple operation. The compiler would determine the type of foo, calculate the location of the bar routine in memory and would simply call that address twice. This would be extremely fast to execute too, which everybody likes. This would basically be converted to this low-level pseudo-code:&lt;br /&gt;&lt;br /&gt;call bar(foo)&lt;br /&gt;call bar(foo)&lt;br /&gt;&lt;br /&gt;Now let's move up to a slightly more complicated example: a statically-typed language which allows subclassing and method overriding. Now, the compiler doesn't necessarily know which function in memory corresponds to &quot;foo.bar()&quot;, since foo could be of type Foo, or of type FooSubclass, or even FooSubSubclass, and the location of the appropriate bar function would change with each different type. However, for each type, the value of bar does not change. It can be overridden by subclasses, but it cannot be changed for the class itself. Now, the compiler needs to ask foo to get the appropriate method first:&lt;br /&gt;&lt;br /&gt;method _bar = get_method(typeof(foo), &quot;bar&quot;)&lt;br /&gt;call _bar(foo)&lt;br /&gt;call _bar(foo)&lt;br /&gt;&lt;br /&gt;Assuming foo does not change type inside the call to _bar, this code works just fine. Next let's look at a more complicated example still, the case of a dynamic language like Perl or Python. In these languages the class MyFooClass is an object of type Class, and foo is an object of type MyFooClass. Also bar is not a compiled-in constant property of the Class, but is instead a mutable property of it. Inside the call to bar, maybe we change the definition of bar itself inside the class object. Likewise, the definition of routines like &quot;find_method&quot; inside Class can change. Accounting for all this dynamicism,  our code changes to look like this:&lt;br /&gt;&lt;br /&gt;class fooclass = find_class(foo)&lt;br /&gt;method _get_method = find_method(fooclass, &quot;bar&quot;)&lt;br /&gt;call _bar(foo)&lt;br /&gt;class fooclass = find_class(foo)&lt;br /&gt;method _get_method = find_method(fooclass, &quot;bar&quot;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;call _bar(foo) &lt;br /&gt;&lt;br /&gt;Keep in mind that everything can change inside each call to bar. We can:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Modify the inheritance hierachy of MyFooClass to add or remove parent classes&lt;/li&gt;&lt;li&gt;Add or remove methods in MyFooClass, and any item in it's inheritance hierarchy&lt;/li&gt;&lt;li&gt;Add or remove methods on the object foo itself (like in javascript where foo.bar = function() {...})&lt;/li&gt;&lt;li&gt;Change the class of foo&lt;/li&gt;&lt;/ul&gt;Let's bring this back to the idea of threading before I go too far off topic. Every time we call a method, or attempt to access a field on an object, we need to look those up in the associated Class object first. Those Class objects need to be global, because all code on all threads need to be able to lookup methods on any object, because we can pass objects between threads and we need to be able to work with them.&lt;br /&gt;&lt;br /&gt;If classes are global, and need to be accessible from multiple threads, we inevitably run into the idea of contention: If one thread is changing the definition of foo.bar() at the same time that another thread is attempting to look it up, the thread doing the reading may end up with incomplete, corrupted, or incorrect information.&lt;br /&gt;&lt;br /&gt;Global data is the enemy of good multithreading. Global data is a necessity for highly dynamic object systems like those supported by Parrot. Ergo, multithreading on Parrot is hard.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Look at all the global data in Parrot: there's the interpreter object itself, the packfiles, the list of Classes (and the methods/properties that they contain), the list of Namespaces (and the global values they contain), the context graph (and the contents of all registers in those contexts), the opcode table and the MMD signature cache. This is a hell of a lot of globally-available data, and we're going to need to find a sane way to limit corruptive concurrent access to these things. Not only that, but if we have to lock every single access to a global value, which means we need to obtain a lock every time we want to do a method call, our performance is going to be &lt;i&gt;terrible&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;By convention I think we can all agree that things like the opcode table should really not be modified when we have multiple threads running. But it's harder to make such a convention that class/method definitions should be treated as constant when multiple threads are running.&lt;br /&gt;&lt;br /&gt;What we can do to alleviate some of the performance problems is to create short-term caches for things like Classes and Methods in local threads, with the understanding that without explicit synchronization, the exact ordering of read/write operations between threads cannot be guaranteed and can be scheduled for maximum benefit. If the relative execution times of two operations on separate threads cannot be guaranteed, then it makes no difference to functionality for the user whether those operations happen at random times with respect to each other and whether Parrot manually orders them to improve caching.&lt;br /&gt;&lt;br /&gt;Think about it this way: We have two threads, one is writing a global value and one is reading it. These threads are operating in true parallel on two separate processor cores. If we run this program a million times, sometimes the read will randomly occur before the write, sometimes the write will occur before the read, and sometimes they will happen at the exact same moment and cause corruption. Depending on a simple matter of random timing, we could get three very different results from our program. Now, if Parrot implements a heuristic that if a write and a read happen within a very short period of time, Parrot will manually order them so that the read occurs before the write. And, if the read always happens before the write, maybe we don't read at all, but instead use a cached version. Then, only when the write has complete, we update the cache.&lt;br /&gt;&lt;br /&gt;Another thing to think about is that we could disallow direct lookups of data in global variables, and give each thread a local copy of global values. Considering the principal I mentioned above, we can be a little bit liberal with the way we handle writes and reads. If a thread modifies its copy of a Class, those changes could be propagated to a global reference copy at a convenient time, and then propagated down to the local copies later, only when it's convenient to do so. Remember, if things are happening at random times compared to each other, it makes no substantive difference to the thread whether it's copy of a global variable is exactly up-to-date or whether it's a little bit lagged behind. That is, the reading thread doesn't know whether the writing thread had a legitimate delay before writing, or whether Parrot manually scheduled the write at a different time.&lt;br /&gt;&lt;br /&gt;To get a complete Hybrid Threads implementation in Parrot like what Chandon was envisioning, we are going to have a few steps to take:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;We have to break the &lt;a href=&quot;http://trac.parrot.org/parrot/wiki/GSOC_ThreadsInterpreterSplit&quot;&gt;Interpreter structure up into two parts&lt;/a&gt;: One which is truly global and contains data which all threads need, and one which is local for each thread and contains data that the thread needs. The local interpreter may contain a cache or a mirror of data in the global interpreter.&lt;/li&gt;&lt;li&gt;We need to come up with a good sane scheme (which will likely consist of both technical solutions and programmer conventions) to manage access to global values&lt;/li&gt;&lt;li&gt;We need to come up with a good sane scheme for sharing values between threads.Creating a local variable and passing a reference to it to another thread essentially turns it into a global variable and opens up problems with contention. We need a good way to manage this without slowing everything down.&lt;/li&gt;&lt;/ol&gt;All of these problems are solvable, and if we put forward a concerted effort we could have a decent hybrid threading system in Parrot within the next few months. We almost have a complete working Green Threads system ready to merge now, and hopefully that will be enough for our users while we get the rest of the details of the hybrid system worked out and implemented.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-6242513867170954402?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sat, 21 Aug 2010 12:00:06 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: PLA: More New Methods</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-5121899035634591844</guid>
	<link>http://wknight8111.blogspot.com/2010/08/pla-more-new-methods.html</link>
	<description>In a previous post I discussed some of the &lt;a href=&quot;http://wknight8111.blogspot.com/2010/08/pla-status-updates.html&quot;&gt;common behaviors&lt;/a&gt; that the matrix types in Parrot-Linear-Algebra implement. Recently, I've added a few more which I think are pretty cool and worth discussing.&lt;br /&gt;&lt;br /&gt;First and foremost, I've finally added some methods to convert between type. There are now methods for &lt;b&gt;convert_to_number_matrix&lt;/b&gt;, &lt;b&gt;convert_to_complex_matrix&lt;/b&gt;, and &lt;b&gt;convert_to_pmc_matrix&lt;/b&gt;. Every type implements all of these methods, even when it would be a no-op. This is so you can take a PMC and if it &quot;does 'matrix'&quot; you can cast it to the type you want to deal with without worrying about spending too much expense. These methods always return a new matrix, so you can keep a copy of the matrix in it's original form and also have a new copy to play with. In the case where the matrix is already in the target format, I create a clone.&lt;br /&gt;&lt;br /&gt;Unfortunately, these conversion operations can be a little bit expensive when you're actually converting types. The problem is that the data for the matrices is stored internally in a very dense format. For the Number and Complex matrices, the data is stored internally in the format required by the BLAS library routines. For the number matrix, the values are basically stored together in a single large buffer. For complex matrices, the real and imaginary values are stored together also, alternating positions. Converting one to the other is not easy, since I have to allocate a completely new buffer and iterate over each space individually. So, too many conversion operations can get expensive quickly.&lt;br /&gt;&lt;br /&gt;Using these new conversion methods, I have updated some previous methods, like gemm(), the routine which performs the &lt;a href=&quot;http://en.wikipedia.org/wiki/GEMM&quot;&gt;GEMM&lt;/a&gt; operation from the &lt;a href=&quot;http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms&quot;&gt;BLAS library&lt;/a&gt;. You can now pass any matrix types to this method, and it will perform conversions internally to ensure the types match. Here's a fun little NQP example that shows some of the capabilities of this library today:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;INIT { pir::load_bytecode(&quot;pla_nqp.pbc&quot;); }&lt;br /&gt;&lt;br /&gt;my $A := NumMatrix2D.new();&lt;br /&gt;$A.initialize_from_args(2, 2, 1, 2.0, &quot;3&quot;, 4);&lt;br /&gt;$A.transpose();&lt;br /&gt;pir::say(&quot;A: &quot; ~ $A);&lt;br /&gt;&lt;br /&gt;my $B := ComplexMatrix2D.new();&lt;br /&gt;$B.initialize_from_array(2, 2, [1, 2.0, &quot;3+3i&quot;, &quot;7+5i&quot;]);&lt;br /&gt;$B.conjugate();&lt;br /&gt;pir::say(&quot;B: &quot; ~ $B);&lt;br /&gt;&lt;br /&gt;my $C := PMCMatrix2D.new();&lt;br /&gt;$C.fill(4.4, 2, 2);&lt;br /&gt;pir::say(&quot;C: &quot; ~ $C);&lt;br /&gt;&lt;br /&gt;my $D := $B.gemm(0.5, $A, $B, &quot;1+2i&quot;, $C);&lt;br /&gt;pir::say(&quot;D: &quot; ~ $D);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can try it yourself, or you can take my word for it that the result is correct. I've verified it this morning in Octave, and the results are the same (though the Octave script to produce this result is considerably shorter).&lt;br /&gt;&lt;br /&gt;PLA is finally starting to get the kind of basic functionality and test coverage that I've been hoping for. With a few more finishing touches on this base, I'm going to start adding new functionality like LAPACK bindings. Specifically, I'm hoping to add in support for some common matrix decompositions, matrix reductions, inverses and eigenvalues. I'm also hoping to get started on the module for Rakudo sometime soon.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-5121899035634591844?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 20 Aug 2010 21:00:02 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: PLA Test Suite Redux</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-7369903067145452664</guid>
	<link>http://wknight8111.blogspot.com/2010/08/pla-test-suite-redux.html</link>
	<description>I've been doing a hell of a lot of work on the Parrot-Linear-Algebra test suite in the past few days, and the results are quite spectacular. I've completely reworked the way the suite works, and broke a small handful of monolithic test files into a series of smaller, focused test files. Instead of describing it, I'll just show the results:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;t/sanity.t .............................................. ok&lt;br /&gt;t/pmc/pmcmatrix2d.t ..................................... ok&lt;br /&gt;t/pmc/nummatrix2d.t ..................................... ok&lt;br /&gt;t/pmc/complexmatrix2d.t ................................. ok&lt;br /&gt;t/methods/nummatrix2d/convert_to_complex_matrix.t ....... ok&lt;br /&gt;t/methods/nummatrix2d/row_scale.t ....................... ok&lt;br /&gt;t/methods/nummatrix2d/get_block.t ....................... ok&lt;br /&gt;t/methods/nummatrix2d/mem_transpose.t ................... ok&lt;br /&gt;t/methods/nummatrix2d/convert_to_number_matrix.t ........ ok&lt;br /&gt;t/methods/nummatrix2d/initialize_from_args.t ............ ok&lt;br /&gt;t/methods/nummatrix2d/row_swap.t ........................ ok&lt;br /&gt;t/methods/nummatrix2d/iterate_function_inplace.t ........ ok&lt;br /&gt;t/methods/nummatrix2d/fill.t ............................ ok&lt;br /&gt;t/methods/nummatrix2d/initialize_from_array.t ........... ok&lt;br /&gt;t/methods/nummatrix2d/iterate_function_external.t ....... ok&lt;br /&gt;t/methods/nummatrix2d/transpose.t ....................... ok&lt;br /&gt;t/methods/nummatrix2d/item_at.t ......................... ok&lt;br /&gt;t/methods/nummatrix2d/gemm.t ............................ ok&lt;br /&gt;t/methods/nummatrix2d/row_combine.t ..................... ok&lt;br /&gt;t/methods/nummatrix2d/resize.t .......................... ok&lt;br /&gt;t/methods/nummatrix2d/convert_to_pmc_matrix.t ........... ok&lt;br /&gt;t/methods/nummatrix2d/set_block.t ....................... ok&lt;br /&gt;t/methods/complexmatrix2d/convert_to_complex_matrix.t ... ok&lt;br /&gt;t/methods/complexmatrix2d/row_scale.t ................... ok&lt;br /&gt;t/methods/complexmatrix2d/get_block.t ................... ok&lt;br /&gt;t/methods/complexmatrix2d/mem_transpose.t ............... ok&lt;br /&gt;t/methods/complexmatrix2d/convert_to_number_matrix.t .... ok&lt;br /&gt;t/methods/complexmatrix2d/initialize_from_args.t ........ ok&lt;br /&gt;t/methods/complexmatrix2d/row_swap.t .................... ok&lt;br /&gt;t/methods/complexmatrix2d/iterate_function_inplace.t .... ok&lt;br /&gt;t/methods/complexmatrix2d/fill.t ........................ ok&lt;br /&gt;t/methods/complexmatrix2d/initialize_from_array.t ....... ok&lt;br /&gt;t/methods/complexmatrix2d/conjugate.t ................... ok&lt;br /&gt;t/methods/complexmatrix2d/iterate_function_external.t ... ok&lt;br /&gt;t/methods/complexmatrix2d/transpose.t ................... ok&lt;br /&gt;t/methods/complexmatrix2d/item_at.t ..................... ok&lt;br /&gt;t/methods/complexmatrix2d/gemm.t ........................ ok&lt;br /&gt;t/methods/complexmatrix2d/row_combine.t ................. ok&lt;br /&gt;t/methods/complexmatrix2d/resize.t ...................... ok&lt;br /&gt;t/methods/complexmatrix2d/convert_to_pmc_matrix.t ....... ok&lt;br /&gt;t/methods/complexmatrix2d/set_block.t ................... ok&lt;br /&gt;t/methods/pmcmatrix2d/convert_to_complex_matrix.t ....... ok&lt;br /&gt;t/methods/pmcmatrix2d/get_block.t ....................... ok&lt;br /&gt;t/methods/pmcmatrix2d/mem_transpose.t ................... ok&lt;br /&gt;t/methods/pmcmatrix2d/convert_to_number_matrix.t ........ ok&lt;br /&gt;t/methods/pmcmatrix2d/initialize_from_args.t ............ ok&lt;br /&gt;t/methods/pmcmatrix2d/iterate_function_inplace.t ........ ok&lt;br /&gt;t/methods/pmcmatrix2d/fill.t ............................ ok&lt;br /&gt;t/methods/pmcmatrix2d/initialize_from_array.t ........... ok&lt;br /&gt;t/methods/pmcmatrix2d/iterate_function_external.t ....... ok&lt;br /&gt;t/methods/pmcmatrix2d/transpose.t ....................... ok&lt;br /&gt;t/methods/pmcmatrix2d/item_at.t ......................... ok&lt;br /&gt;t/methods/pmcmatrix2d/resize.t .......................... ok&lt;br /&gt;t/methods/pmcmatrix2d/convert_to_pmc_matrix.t ........... ok&lt;br /&gt;t/methods/pmcmatrix2d/set_block.t ....................... ok&lt;br /&gt;PASSED 356 tests in 55 files&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I factored out all tests to delegate matrix creation and matrix population routines into a series of type-specific factory objects. With these factories, creation of tests goes extremely quickly:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Write tests using a few methods and values from the factory instead&lt;/li&gt;&lt;li&gt;Create a short stub test for each Matrix type, subclassing the common tests and add a proper factory&lt;/li&gt;&lt;li&gt;There is no step 3.&lt;/li&gt;&lt;/ol&gt;It's really become quite simple, and  I'm much happier with the test suite now. Plus, I've added plenty of new features lately (complete with tests!) and I'm going to talk about that plenty in a later post.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-7369903067145452664?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 20 Aug 2010 02:05:29 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: Hybrid Threads: GSoC Project Results</title>
	<guid>http://www.parrot.org/208 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/hybrid-threads-gsoc-project-results</link>
	<description>&lt;p&gt;I proposed a pretty ambitious Google Summer of Code project this year. Although I didn't manage to do everything I hoped, I did manage to get a useful subset of threading functionality working in the gsoc_threads branch. In this blog post I will describe what I have working and what more needs to be done.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/hybrid-threads-gsoc-project-results&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 20 Aug 2010 01:15:25 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Parrot 2.7.0 &quot;Australian King&quot; Released!</title>
	<guid>http://www.parrot.org/207 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/news/parrot-2.7.0-australian-king-released</link>
	<description>&lt;pre&gt;Never worry about theory as long as the machinery does what it's supposed to do. 
    —Robert A. Heinlein 
&lt;/pre&gt;&lt;p&gt;
On behalf of the Parrot team, I'm proud to announce Parrot 2.7.0 &quot;Australian King&quot;&lt;/p&gt;
&lt;p&gt;Parrot is a virtual machine aimed at running all dynamic languages.&lt;/p&gt;
&lt;p&gt;Parrot 2.7.0 is available on Parrot's FTP site, or follow the download instructions. For those who would like to develop on Parrot, or help develop Parrot itself, we recommend using Subversion on our source code repository to get the latest and best Parrot code.&lt;/p&gt;
&lt;p&gt;SHA digests for this release are:&lt;/p&gt;
&lt;pre&gt;&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/news/parrot-2.7.0-australian-king-released&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;&lt;/pre&gt;</description>
	<pubDate>Wed, 18 Aug 2010 04:20:56 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: PLA Status Updates</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-5434604396199333838</guid>
	<link>http://wknight8111.blogspot.com/2010/08/pla-status-updates.html</link>
	<description>On Friday night we dropped the kid off with his grandparents for a sleepover. With the apartment to ourselves, my wife and I did what we've been wanting to do for months: she went to bed early and I stayed up to program. I started making some real progress in Parrot-Linear-Algebra, and also uncovered some interesting bugs which needed to be fixed.&lt;br /&gt;&lt;br /&gt;I added a short file for adding PLA support to programs written in NQP. The file, &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/blob/master/src/nqp/pla.nqp&quot;&gt;pla.nqp&lt;/a&gt;, can be included into an NQP program like this once it's installed:&lt;br /&gt;&lt;pre&gt;INIT { pir::load_bytecode(&quot;pla.pbc&quot;); }&lt;br /&gt;&lt;/pre&gt;That file loads the PLA binary library, stores a global reference to the library, and registers the type names with P6metaclass. That done, you can start writing more natural-looking programs in NQP. I updated the &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/commit/5ec59719855c180505526d21148836a14bd6a461&quot;&gt;Gaussian Elimination &lt;/a&gt;example I wrote a few weeks ago to use this new bootstrap file (and some new methods I added), which means the example can now run without Kakapo or any other dependencies.&lt;br /&gt;&lt;br /&gt;Next up, I started prototyping bindings for the library for Rakudo. These are still preliminary, but I also have a working example of using numerical matrices in Rakudo. Within the next few days I will probably create a complete module for Rakudo (Math::LinearAlgebra, or something like that). I'll post more details as I do more work on it.&lt;br /&gt;&lt;br /&gt;I added a new item_at method which returns and optionally sets a value at given coordinates in a matrix. This method is common to all my core matrix types. The list of common methods for these matrix types is:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;resize() : pre-allocate size for the matrix, growing (never shrinking) it to hold a certain size&lt;/li&gt;&lt;li&gt;fill() : Fill a matrix, or a region of a matrix, with a constant value. Automatically resize if necessary&lt;/li&gt;&lt;li&gt;transpose() : Transpose (swap rows with columns) the matrix lazily&lt;/li&gt;&lt;li&gt;mem_transpose() : Eagerly transpose the actual memory contents&lt;/li&gt;&lt;li&gt;iterate_function_inplace() : Execute a function for every element of the matrix, replacing that element with the function result&lt;/li&gt;&lt;li&gt;iterate_function_external() : Execute a function for every element of the matrix, creating a new matrix with the results. This is similar to Perl's map function.&lt;/li&gt;&lt;li&gt;initialize_from_array() : Insert values into the matrix from an array&lt;/li&gt;&lt;li&gt;initialize_from_args() : Similar to the _from_array variant, but initializes the matrix using elements from a slurpy argument list&lt;/li&gt;&lt;li&gt;get_block() : Return a block, or &quot;submatrix&quot; from the matrix&lt;/li&gt;&lt;li&gt;set_block() : Set a block in the matrix&lt;/li&gt;&lt;li&gt;item_at() : New this weekend, gets or sets a value in the matrix at the specified coordinates&lt;/li&gt;&lt;/ul&gt;There are maybe a handful of other methods I would like to add, but in terms of the core types, this is the standard API (plus a series of VTABLE calls, which are standard). For mathematics types I also have GEMM (the BLAS-based matrix multiply operation), and elementary matrix operations (add rows, swap rows, scale rows). This is not a shabby interface at all, and can start to be used for some real-world applications.&lt;br /&gt;&lt;br /&gt;This weekend I also started seeing some very weird errors in the PLA test suite. Tests were running fine, but I was seeing exceptions (and, in one case, a segfault) occur after all tests had passed. This sounded very &lt;a href=&quot;http://wknight8111.blogspot.com/2009/07/bugs.html&quot;&gt;similar to another problem I've seen&lt;/a&gt; in the past. Here's the test that set it off. Can you spot the problem?&lt;br /&gt;&lt;pre&gt;method test_METHOD_iterate_function_inplace_TRANSPOSE() {&lt;br /&gt;    my $m := self.fancymatrix2x2();&lt;br /&gt;    $m.transpose();&lt;br /&gt;    my $n := self.matrix2x2(self.fancyvalue(0) * 2, self.fancyvalue(2) * 2,&lt;br /&gt;                            self.fancyvalue(1) * 2, self.fancyvalue(3) * 2);&lt;br /&gt;    my $sub := -&amp;gt; $matrix, $value, $x, $y {&lt;br /&gt;        return ($value * 2);&lt;br /&gt;    };&lt;br /&gt;    $m.iterate_function_inplace($sub);&lt;br /&gt;    assert_equal($m, $n, &quot;external iteration does not respect transpose&quot;);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What's maddening is that this test has been a problem for &lt;i&gt;months&lt;/i&gt;, but never caused a failure. It was silently wrong, probably since the day I wrote it.&lt;br /&gt;&lt;br /&gt;See it yet?&lt;br /&gt;&lt;br /&gt;The problem is that return statement. What should happen is this: The pointy block creates an anonymous subroutine, which I pass to the iterate_function_inplace method. The method should loop over ever element in our matrix and call that pointy block for each one. The result should be the same matrix with every element multiplied by two.&lt;br /&gt;&lt;br /&gt;What actually happens is this: the iterate_function_inplace method, in order to call the callback, must recurse on the C stack into a new runloop function. The pointy block executes in this &lt;i&gt;inferior runloop&lt;/i&gt;. However, where things get weird is that return statement. In NQP, returns are performed by constructing and throwing control exceptions. In the case of the pointy block (and I'm not sure whether or not this is a bug), the return statement jumps to the return handler for the test_METHOD_iterate_function_inplace_TRANSPOSE() function, not the anonymous sub.&lt;br /&gt;&lt;br /&gt;The sub executes after having only called the callback once, it never hits the final assertion (which, it turns out, would have failed). Control flow continues inside the inner runloop until the end of the test program, then the C runloop function returns, tries to continue executing from that point, and things go to hell.&lt;br /&gt;&lt;br /&gt;The solution is really quite simple. Change this:&lt;br /&gt;&lt;pre&gt;my $sub := -&amp;gt; $matrix, $value, $x, $y {&lt;br /&gt;    return ($value * 2);&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;into this:&lt;br /&gt;&lt;pre&gt;my $sub := sub ($matrix, $value, $x, $y) {&lt;br /&gt;    return ($value * 2);&lt;br /&gt;}; &lt;br /&gt;&lt;/pre&gt;Problem solved, and now more tests are legitimately passing.&lt;br /&gt;&lt;br /&gt;It's been a productive couple of days in PLA, and I'm hoping I can keep this momentum up in the days ahead. I need to finish implementing my GEMM wrapper for ComplexMatrix2D, and then get started on the Linear Algebra module for Rakudo.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-5434604396199333838?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 17 Aug 2010 11:49:56 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: Kakapo Fixed!! (Mostly)</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-7655421144280678942</guid>
	<link>http://wknight8111.blogspot.com/2010/08/kakapo-fixed-mostly.html</link>
	<description>The lovable Austin Hastings has gotten Kakapo mostly working as of yesterday. It's not 100%, but I'm able to use it for some purposes such as getting the PLA test suite passing again.&lt;br /&gt;&lt;br /&gt;When I tried to build PLA last night, for the first time in a long time, the build failed. Some of the string handling functions I was using in the get_string VTABLEs were using old, deprecated functions in the string API. I took this as my opportunity to &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/commit/444238a4a1746b3f5291f8687a11aed6660888a4&quot;&gt;rewrite a lot of the logic&lt;/a&gt; to use the new &lt;a href=&quot;http://trac.parrot.org/parrot/browser/trunk/src/pmc/stringbuilder.pmc&quot;&gt;StringBuilder&lt;/a&gt; type instead. This should improve performance and bring PLA up to some of the modern best-practices of the Parrot community.&lt;br /&gt;&lt;br /&gt;When I tried to run the tests, however, KABLAMO. Kakapo wasn't happy and the tests wouldn't run. I tracked down a small series of problems, and put together a hasty patch. Austin pointed out that this wasn't the real solution, so he didn't want me to push it to the master at Gitorious. Instead, &lt;a href=&quot;http://github.com/Whiteknight/kakapo/commit/a249c7709ee3fc21bb1431faf24a9693ee0ca982&quot;&gt;I pushed to my mirror at Github&lt;/a&gt;. This fix out of the way, the vast majority of the PLA test suite runs, and most tests were passing. This morning, I pushed another patch to my Kakapo mirror. After that, I'm proud to say, the PLA test suite passes 100% of important tests. That means I can start making preparations for &lt;a href=&quot;http://wknight8111.blogspot.com/2010/07/kakapo-and-parrot-linear-algebra.html&quot;&gt;an official release&lt;/a&gt;, and then begin development on cool new features.&lt;br /&gt;&lt;br /&gt;Some people have asked me why I've gone through all this hassle; if I had just rewritten my testsuite without Kakapo it could have been working a long time ago. The answer to that question is pretty simple: I want the abstraction and insulation that Kakapo provides.&lt;br /&gt;&lt;br /&gt;To look at it another way, consider this: NQP has a test suite of it's own that needs to pass before it can make a release. If I'm using NQP, I know that the behavior NQP provides will be a little more stable than the underlying Parrot VM. However, NQP isn't a perfect overlay for Parrot: There are some features that Parrot provides that NQP doesn't cleanly wrap. To get an abstraction layer over those features, I need a framework like Kakapo. This is all not to mention that several other high-profile projects use NQP, so even if it's test suite isn't all-encompassing, the test suites of projects which build on top of NQP probably cover more ground.&lt;br /&gt;&lt;br /&gt;Kakapo likewise has a test suite, and that needs to pass before Kakapo gets released. If I'm using Kakapo, I can be certain that the API that it and NQP provide together should be relatively stable and are tested to work before they are released. Since we are talking about &lt;a href=&quot;http://wknight8111.blogspot.com/2010/06/parrot-linear-algebra-change-of-course.html&quot;&gt;tracking Parrot trunk&lt;/a&gt; with PLA development, this stability is very welcome.&lt;br /&gt;&lt;br /&gt;What we've run into recently is a rare confluence of events where highly disruptive changes in Parrot caused major breakages in Kakapo. When Kakapo got fixed, the PLA test suite ran perfectly without any changes to the suite itself. Considering the magnitude of changes to Parrot recently, the ability for me to continue running the test suite without alterations is a pretty big and important aspect. Sure there was some down-time, but once our dependencies were fixed, our stuff worked again like magic.&lt;br /&gt;&lt;br /&gt;Kakapo isn't 100% yet, but Austin is still working on it and I'll be lending a hand. I'm also going to start making some progress in PLA, and see what I can do to help out with some of the performance improvements and other big tasks that are going on in Parrot too. Expect to see many more updates on things in the coming days and weeks.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-7655421144280678942?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 12 Aug 2010 11:50:41 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Khairul: Almost there.</title>
	<guid>http://parrot.mangkok.com/?p=133</guid>
	<link>http://parrot.mangkok.com/?p=133</link>
	<description>&lt;p&gt;I’ve been spending the past few weeks cleaning up and finalising the interface used to instrument Parrot. So here’s a recap of the major changes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Refactored Instrument.pmc&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Previously, Instrument.pmc serves as the interface to instrument the ops and to attach probes into the various components of Parrot. Refactoring the runcore-related functions out into InstrumentRuncore.pmc allows me to make Instrument.pmc the main interface to create and attach the probes. As of now, it has the following methods:&lt;span id=&quot;more-133&quot;&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;instrument_op&lt;/strong&gt; : Returns an Instrument::Probe instance that can be used to inspect ops being executed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;instrument_gc&lt;/strong&gt;: Returns an Instrument::Event::GC instance that can be used to get notifications whenever a GC function is called through the interpreter’s GC_Subsystem interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;instrument_class&lt;/strong&gt;: Returns an Instrument::Event::Class instance that is tied to a particular class allowing instrumenting the class’ VTABLE entries and methods.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;instrument_object&lt;/strong&gt;: Returns an Instrument::Event::Object instance that is tied to a particular object allowing instrumenting the object’s VTABLE entries and methods.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An example of usage will be as follows:&lt;/p&gt;
&lt;pre&gt;# Instrument the ops.
$P0 = new ['Instrument']
$P1 = $P0.'instrument_op'()
$P1.'callback'('some_sub')
$P1.'inspect'('op_name')
$P0.'attach'($P1)
&lt;/pre&gt;
&lt;p&gt;with similar usages for the other methods listed above. Instrument.pmc also takes over the function of actually calling the callbacks, a function previously handled by EventDispatcher. For this task, it has 3 methods:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;register_eventhandler(event, probe)&lt;/li&gt;
&lt;li&gt;remove_eventhandler(event, probe)&lt;/li&gt;
&lt;li&gt;raise_event(event, data)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;whose functions are rather self explanatory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Post execution callbacks&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Previously, most of the callbacks are called before execution, with no way to define whether the callback is to be called pre or post execution of the op/function/etc. With this refactor, all callbacks are called pre-execution, but can now return an invokable, be it a Sub or an NCI instance that will be called post-execution. An example will be as follows:&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;.sub pre
    # This is called before execution.
    # ...
    .param pmc data
    .param pmc instrument
    .param pmc probe
    $P0 = get_global 'post'
    .return($P0)
.end

.sub post
    # This is called after execution.
    # ...
    .param pmc data
    .param pmc instrument
    .param pmc probe
.end
&lt;/pre&gt;
&lt;p&gt;Along with this change, all callbacks are now passed 3 parameters, with data being a PMC that is an instance of InstrumentOp for op probes or a Hash for other kinds of probes, instrument being the Instrument instance itself and probe the instance that the callback associated with.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With all that done, I’m now focusing on documentation and dealing with the bugs I’ve uncovered in my code, some new, some old and some not yet known.&lt;/p&gt;</description>
	<pubDate>Fri, 06 Aug 2010 20:06:20 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Moving to multiple OS threads</title>
	<guid>http://www.parrot.org/202 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/moving-multiple-os-threads</link>
	<description>&lt;p&gt;Now that I have the basic green threads (Task) API basically working, it's time to start mixing in OS threads. I plan to do that in two steps: First I'm going to use OS threads to solve the key issue with the green threads implementation - blocking IO. The result of this will be basically equivilent to CPython threads-with-GIL. The second step - real parallel thread execution - will have to wait for after GSoC pencils down.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/moving-multiple-os-threads&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Thu, 05 Aug 2010 00:12:53 +0000</pubDate>
</item>
<item>
	<title>parrot.org: PAST Optimization: plans for the final weeks of GSoC</title>
	<guid>http://www.parrot.org/201 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/past-optimization-plans-final-weeks-gsoc</link>
	<description>&lt;p&gt;I spent this last week working on Tree::Optimizer (and getting distracted by Rakudo *).&lt;/p&gt;
&lt;p&gt;I've got the functionality described in my blog post last week mostly finished. The only thing remaining is making sure that recursive passes correctly handle nulls, which I'm about to work on.&lt;/p&gt;
&lt;p&gt;The Google Summer of Code is almost over. Next Monday is the &quot;suggested 'pencils down'&quot; date. The following Monday is the &quot;firm 'pencils down'&quot; date. After that are final evaluations.&lt;/p&gt;
&lt;p&gt;Here's my plan for the remainder of GSoC:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Merge the pass-manager branch of my project's repo into master.&lt;/li&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/past-optimization-plans-final-weeks-gsoc&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;&lt;/ol&gt;</description>
	<pubDate>Wed, 04 Aug 2010 02:23:12 +0000</pubDate>
</item>
<item>
	<title>parrot.org: The extra pointer has to go.</title>
	<guid>http://www.parrot.org/200 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/extra-pointer-has-go</link>
	<description>&lt;p&gt;I reached the midterms mostly as scheduled, and NFG is pretty much feature complete now. There's still some stuff to do here and there, but the 'big ticket' items are done. So, I have been looking at what needs to be done before the gsoc_nfg branch can be merged back into trunk.  And that means giving a hard look at all of the places where I've cut corners and see if they can be made better.  It's mostly minor stuff, like leaving out a cast, or not paying attention to const mismatches in a few places. Most of it is just a matter of code cleanup.  Until you see the extra pointer I added to string headers.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/extra-pointer-has-go&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 30 Jul 2010 22:37:28 +0000</pubDate>
</item>
<item>
	<title>Patrick Michaud: Rakudo Star - an &quot;early adopter&quot; distribution of Perl 6</title>
	<guid>http://use.perl.org/~pmichaud/journal/40469?from=rss</guid>
	<link>http://use.perl.org/~pmichaud/journal/40469?from=rss</link>
	<description>&lt;p&gt;On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the July 2010 release of &quot;Rakudo Star&quot;, a useful and usable distribution of Perl 6.  The tarball for the July 2010 release is available from &lt;a href=&quot;http://github.com/rakudo/star/downloads&quot;&gt;http://github.com/rakudo/star/downloads&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Rakudo Star is aimed at &quot;early adopters&quot; of Perl 6.  We know that it still has some bugs, it is far slower than it ought to be, and there are some advanced pieces of the Perl 6 language specification that aren't implemented yet.  But Rakudo Perl 6 in its current form is also proving to be viable (and fun) for developing applications and exploring a great new language.  These &quot;Star&quot; releases are intended to make Perl 6 more widely available to programmers, grow the Perl 6 codebase, and gain additional end-user feedback about the Perl 6 language and Rakudo's implementation of it.&lt;/p&gt;&lt;p&gt;In the Perl 6 world, we make a distinction between the language (&quot;Perl 6&quot;) and specific implementations of the language such as &quot;Rakudo Perl&quot;.  &quot;Rakudo Star&quot; is a distribution that includes release #31 of the Rakudo Perl 6 compiler [1], version 2.6.0 of the Parrot Virtual Machine [2], and various modules, documentation, and other resources collected from the Perl 6 community.  We plan to make Rakudo Star releases on a monthly schedule, with occasional special releases in response to important bugfixes or changes.&lt;/p&gt;&lt;p&gt;Some of the many cool Perl 6 features that are available in this release of Rakudo Star:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Perl 6 grammars and regexes&lt;/li&gt;&lt;li&gt;formal parameter lists and signatures&lt;/li&gt;&lt;li&gt;metaoperators&lt;/li&gt;&lt;li&gt;gradual typing&lt;/li&gt;&lt;li&gt;a powerful object model, including roles and classes&lt;/li&gt;&lt;li&gt;lazy list evaluation&lt;/li&gt;&lt;li&gt;multiple dispatch&lt;/li&gt;&lt;li&gt;smart matching&lt;/li&gt;&lt;li&gt;junctions and autothreading&lt;/li&gt;&lt;li&gt;operator overloading (limited forms for now)&lt;/li&gt;&lt;li&gt;introspection&lt;/li&gt;&lt;li&gt;currying&lt;/li&gt;&lt;li&gt;a rich library of builtin operators, functions, and types&lt;/li&gt;&lt;li&gt;an interactive read-evaluation-print loop&lt;/li&gt;&lt;li&gt;Unicode at the codepoint level&lt;/li&gt;&lt;li&gt;resumable exceptions&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There are some key features of Perl 6 that Rakudo Star does not yet handle appropriately, although they will appear in upcoming releases.  Thus, we do not consider Rakudo Star to be a &quot;Perl 6.0.0&quot; or &quot;1.0&quot; release.  Some of the not-quite-there features include:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;nested package definitions&lt;/li&gt;&lt;li&gt;binary objects, native types, pack and unpack&lt;/li&gt;&lt;li&gt;typed arrays&lt;/li&gt;&lt;li&gt;macros&lt;/li&gt;&lt;li&gt;state variables&lt;/li&gt;&lt;li&gt;threads and concurrency&lt;/li&gt;&lt;li&gt;Unicode strings at levels other than codepoints&lt;/li&gt;&lt;li&gt;pre and post constraints, and some other phasers&lt;/li&gt;&lt;li&gt;interactive readline that understands Unicode&lt;/li&gt;&lt;li&gt;backslash escapes in regex &amp;lt;[...]&amp;gt; character classes&lt;/li&gt;&lt;li&gt;non-blocking I/O&lt;/li&gt;&lt;li&gt;most of Synopsis 9&lt;/li&gt;&lt;li&gt;perl6doc or pod manipulation tools&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In many places we've tried to make Rakudo smart enough to inform the programmer that a given feature isn't implemented, but there are many that we've missed.  Bug reports about missing and broken features are welcomed.&lt;/p&gt;&lt;p&gt;See &lt;a href=&quot;http://perl6.org/&quot;&gt;http://perl6.org/&lt;/a&gt; for links to much more information about Perl 6, including documentation, example code, tutorials, reference materials, specification documents, and other supporting resources.&lt;/p&gt;&lt;p&gt;Rakudo Star also bundles a number of modules; a partial list of the modules provided by this release include:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;  Blizkost - enables some Perl 5 modules to be used from within Rakudo Perl 6&lt;/li&gt;&lt;li&gt;  MiniDBI - a simple database interface for Rakudo Perl 6&lt;/li&gt;&lt;li&gt;  Zavolaj - call C library functions from Rakudo Perl 6&lt;/li&gt;&lt;li&gt;  SVG and SVG::Plot - create scalable vector graphics&lt;/li&gt;&lt;li&gt;  HTTP::Daemon - a simple HTTP server&lt;/li&gt;&lt;li&gt;  XML::Writer - generate XML&lt;/li&gt;&lt;li&gt;  YAML - dump Perl 6 objects as YAML&lt;/li&gt;&lt;li&gt;  Term::ANSIColor - color screen output using ANSI escape sequences&lt;/li&gt;&lt;li&gt;  Test::Mock - create mock objects and check what methods were called&lt;/li&gt;&lt;li&gt;  Math::Model - describe and run mathematical models&lt;/li&gt;&lt;li&gt;  Config::INI - parse and write configuration files&lt;/li&gt;&lt;li&gt;  File::Find - find files in a given directory&lt;/li&gt;&lt;li&gt;  LWP::Simple - fetch resources from the web&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These are not considered &quot;core Perl 6 modules&quot;, and as module development for Perl 6 continues to mature, future releases of Rakudo Star will likely come bundled with a different set of modules. Deprecation policies for bundled modules will be created over time, and other Perl 6 distributions may choose different sets of modules or policies.  More information about Perl 6 modules can be found at &lt;a href=&quot;http://modules.perl6.org/&quot;&gt;http://modules.perl6.org&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Rakudo Star also contains a draft of a Perl 6 book -- see &quot;docs/UsingPerl6-draft.pdf&quot; in the release tarball.&lt;/p&gt;&lt;p&gt;The development team thanks all of the contributors and sponsors for making Rakudo Star possible.  If you would like to contribute, see &lt;a href=&quot;http://rakudo.org/how-to-help&quot;&gt;http://rakudo.org/how-to-help&lt;/a&gt;, ask on the perl6-compiler@perl.org mailing list, or join us on IRC #perl6 on freenode.&lt;/p&gt;&lt;p&gt;Rakudo Star releases are created on a monthly cycle or as needed in response to important bug fixes or improvements.  The next planned release of Rakudo Star will be on August 24, 2010.&lt;/p&gt;&lt;p&gt;[1] &lt;a href=&quot;http://github.com/rakudo/rakudo&quot;&gt;http://github.com/rakudo/rakudo&lt;/a&gt; &lt;br /&gt;[2] &lt;a href=&quot;http://parrot.org/&quot;&gt;http://parrot.org/&lt;/a&gt; &lt;/p&gt;</description>
	<pubDate>Thu, 29 Jul 2010 12:28:04 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: Kakapo and Parrot-Linear-Algebra</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-2814449459857351</guid>
	<link>http://wknight8111.blogspot.com/2010/07/kakapo-and-parrot-linear-algebra.html</link>
	<description>&lt;a href=&quot;http://www.parrot.org/news/2010/Parrot-2.6.0&quot;&gt;Parrot's 2.6 release is out&lt;/a&gt; and now everybody is holding their breath in anticipation of the new &lt;a href=&quot;http://github.com/rakudo/star&quot;&gt;Rakudo Star &lt;/a&gt;release tomorrow. I'm still fighting with my own release project: &lt;a href=&quot;http://www.gitorious.com/kakapo/kakapo&quot;&gt;Kakapo&lt;/a&gt;.Kakapo got broken pretty severely when Parrot was changed to &lt;a href=&quot;http://trac.parrot.org/parrot/ticket/389&quot;&gt;no longer store methods in namespaces&lt;/a&gt;, and I have been unable in several weeks to make it work again. Austin has been busy with other projects during this time too, so it's been me by my lonesome to try and get this thing working again.&lt;br /&gt;&lt;br /&gt;The problems are three-fold: First, Austin's plan for Kakapo was ambitious and the framework does a hell of a lot of things, not all of which I fully understand. Second, NQP and P6object have progressed in some significant ways since Kakapo was originally inked out, and much of the workaround code that Austin wrote to bypass some missing features no longer seems necessary. Third, we have this issue with methods not working nicely with NameSpaces anymore, which makes all of Kakapo's method-injection logic break.Without method injection happening, and happening early enough, all the code in Kakapo which relies on the new methods is broken.&lt;br /&gt;&lt;br /&gt;Tene put together a &lt;a href=&quot;http://github.com/perl6/nqp-rx/commit/96bc19114a3962c356304c11b20768ef11fe91ba&quot;&gt;patch for NQP&lt;/a&gt; which allows methods marked &quot;our&quot; to be stored in NameSpaces again. This should simplify some of the new logic in Kakapo though I've been too busy in the past few days to test it. Hopefully this patch of his represents a large portion of the fix to get Kakapo working again. I doubt it will be everything that's necessary, but it will be a nice start.&lt;br /&gt;&lt;br /&gt;Without working Kakapo I haven't done any work whatsoever on &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra&quot;&gt;Parrot-Linear-Algebra&lt;/a&gt;. PLA uses Kakapo to implement all it's unit tests, and I'm happy enough with the new testing framework that I do not want to move it to use anything besides Kakapo. In the worst case I would consider trying to break out a testing sub-framework from Kakapo if we can't fix the entire framework, but I haven't gotten to that point yet and likely won't have the time for it in the near future. I would much rather fix the framework as a whole first, and then maybe talk about splitting out the unit test stuff into a separate sub-library later, if I still feel like that's a beneficial path to take.&lt;br /&gt;&lt;br /&gt;What I would really like to be doing is getting back into PLA development. I had hoped to get some wrappers together to make it work with Rakudo Star, but without working tests I haven't cut a suitable release and without a release it won't be included in the Rakudo Star bundle anyway. &lt;br /&gt;&lt;br /&gt;My hope is that within the next few days I can get Kakapo working again. At least I need it working enough that I can get the unit tests for PLA going. With Tene's fix, some hard work, and some trial-and-error I think it will be possible.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-2814449459857351?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Wed, 28 Jul 2010 22:00:01 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: Documentation and information collection</title>
	<guid>http://www.parrot.org/198 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/scratch/documentation-and-information-collection</link>
	<description>&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://coolnamehere.com/geekery/parrot/learn/&quot;&gt;Tutorial to learn the basics of the PIR syntax and beginner's introduction to Parrot&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;NQP - Not Quite Perl&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://coolnamehere.com/geekery/parrot/nqp/index.html&quot;&gt;Example&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://en.wikibooks.org/wiki/Parrot_Virtual_Machine/Not_Quite_Perl&quot;&gt;wikibook&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://docs.parrot.org/parrot/latest/html/docs/book/pct/ch05_nqp.pod.html&quot;&gt;Parrot NQP documentation&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;The target Lorito&lt;/h2&gt;
&lt;ul&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/scratch/documentation-and-information-collection&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;&lt;/ul&gt;</description>
	<pubDate>Wed, 28 Jul 2010 02:14:43 +0000</pubDate>
</item>
<item>
	<title>Khairul: Method madness</title>
	<guid>http://parrot.mangkok.com/?p=131</guid>
	<link>http://parrot.mangkok.com/?p=131</link>
	<description>&lt;p&gt;Well, the past two weeks haven’t been very productive. Other than the usual addition of tests, I’m slightly stuck on how I’m approaching instrumenting methods and this post is meant to be a sounding board.&lt;/p&gt;
&lt;p&gt;In Parrot, methods of a class can be defined in a few ways. First is by defining a sub in a namespace with the same name as the class and annotating the sub with :method. Second is through the use of the addmethod op. Lastly, it seems all PMCs are classes and PMCs can define methods in C. So at the very least, methods can be either Sub or NCI instances (or rather, invokables), and through the use of the addmethod op, an invokable can be a method to more than one class. So the past week I added support to instrument methods of a class, raising an event whenever any instances of the class invokes the method. What I did not foresee was that due to the ability to “share” methods, an event would also be raised for another class that did not instrument the “shared” method. And this unintended consequence is further exacerbated when the instances themselves are instrumented (I added the ability to instrument on a per-object basis too, although it seems like it’s not working too well now).&lt;/p&gt;
&lt;p&gt;So a step back to reflect is in order. I would need to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Keep a list of classes and instances that instrument any given method.&lt;/li&gt;
&lt;li&gt;When the method is invoked, check the invocant against this list and raise the event if required.
&lt;ol&gt;
&lt;li&gt;The invocant can be found in the CURRENT_CONTEXT (I think)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It sounds like a plan, albeit not very fleshed out. Time to find out if it works.&lt;/p&gt;</description>
	<pubDate>Tue, 27 Jul 2010 22:06:11 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Cleaning up and speeding up optimizations with Tree::Optimizer</title>
	<guid>http://www.parrot.org/197 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/cleaning-and-speeding-optimizations-treeoptimizer</link>
	<description>&lt;p&gt;After a false start earlier this week, I've begun implementing something like LLVM's PassManager. It can be found in the &lt;a href=&quot;http://github.com/ekiru/tree-optimization/tree/pass-manager&quot;&gt;pass-manager branch&lt;/a&gt; of my project's git repository.&lt;/p&gt;
&lt;p&gt;Today, I'm going to talk about adding optimizations to compilers using my GSoC project without Tree::Optimizer and with it. Note that most of the features of Tree::Optimizer that I describe here are not yet implemented.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/cleaning-and-speeding-optimizations-treeoptimizer&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Sun, 25 Jul 2010 04:10:14 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Green Threads: A Classic Example</title>
	<guid>http://www.parrot.org/196 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/green-threads-classic-example</link>
	<description>&lt;p&gt;Now that I have green threads basically working with the API functionality I discussed in my last blog post, I've been working on coming up with tests/examples that clearly demonstrate both how green threads in Parrot work and that they work as advertised. With that goal in mind, this blog post is about a classic concurrent programming example: The Sieve of Eratosthenes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/green-threads-classic-example&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 23 Jul 2010 04:18:40 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Parrot 2.6.0 &quot;Red-rumped&quot; supported release.</title>
	<guid>http://www.parrot.org/194 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/news/2010/Parrot-2.6.0</link>
	<description>&lt;pre&gt;What we call the beginning is often the end
And to make an end is to make a beginning.
The end is where we start from.
   —T. S. Eliot, &lt;i&gt;Four Quartets&lt;/i&gt;
&lt;/pre&gt;&lt;p&gt;
On behalf of the Parrot team, I'm happy to announce Parrot 2.6.0&lt;br /&gt;
&quot;Red-rumped.&quot; Parrot (&lt;a href=&quot;http://parrot.org/&quot; title=&quot;http://parrot.org/&quot;&gt;http://parrot.org/&lt;/a&gt;) is a virtual machine aimed&lt;br /&gt;
at running all dynamic languages.&lt;/p&gt;
&lt;p&gt;Parrot 2.6.0 is available on Parrot's FTP site, or follow the&lt;br /&gt;
download instructions at &lt;a href=&quot;http://parrot.org/download&quot; title=&quot;http://parrot.org/download&quot;&gt;http://parrot.org/download&lt;/a&gt;.  For those who would like to&lt;br /&gt;
develop on Parrot, or help develop Parrot itself, we recommend using Subversion&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/news/2010/Parrot-2.6.0&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Wed, 21 Jul 2010 03:53:39 +0000</pubDate>
</item>
<item>
	<title>parrot.org: The uneventful mid-term week and the future of PAST/Tree Optimization</title>
	<guid>http://www.parrot.org/193 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/uneventful-mid-term-week-and-future-pasttree-optimization</link>
	<description>&lt;p&gt;This has been an uneventful week in my GSoC work.&lt;/p&gt;
&lt;p&gt;Parrot's 2.6 release is Tuesday, and I've taken on the task of updating Squaak to modern NQP-rx prior to it. Because of that and my GSoC midterm evaluations, I haven't spent much time hacking on Tree::Pattern or on optimizations using it this week. I plan to finish working on Squaak tonight or tomorrow, commit my fixes to trunk, and finally get back to work on my GSoC project. I'm a little behind schedule now because of that, but I plan to work hard on optimization for the rest of GSoC.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/uneventful-mid-term-week-and-future-pasttree-optimization&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Sun, 18 Jul 2010 23:07:10 +0000</pubDate>
</item>
<item>
	<title>Jonathan Worthington: Last Post</title>
	<guid>http://use.perl.org/~JonathanWorthington/journal/40450?from=rss</guid>
	<link>http://use.perl.org/~JonathanWorthington/journal/40450?from=rss</link>
	<description>&lt;p&gt;Well, on use.perl.org, anyway. I'd like to thank those who run this place for doing so, as it's been the place I've blogged about my Perl 6 stuff for the last couple of years. However, I've found the user experience of WordPress a lot more enjoyable - it was great for the Perl 6 Advent Calendar - and figure I'll blog more if I more enjoy doing so.&lt;/p&gt;&lt;p&gt;So, from now you'll be able to read my Rakudo news and other Perl 6 related ramblings from my &lt;a href=&quot;http://6guts.wordpress.com/&quot;&gt;shiny new blog&lt;/a&gt;. For those reading through Planet Six, no action required - I'll arrange for my new blog to be aggregated there.&lt;/p&gt;&lt;p&gt;See you &lt;a href=&quot;http://6guts.wordpress.com/&quot;&gt;over there&lt;/a&gt;.&lt;/p&gt;</description>
	<pubDate>Sun, 18 Jul 2010 02:58:24 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Green Threads: The Task API</title>
	<guid>http://www.parrot.org/191 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/green-threads-task-api</link>
	<description>&lt;p&gt;Now that I have pre-emptive task switching between green threads basically working, I need to figure out what the API to interact with them wants to look like. Additionally, I need to clean up this scheduler thing that I've mauled in order to make the API and terminology consistent.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/green-threads-task-api&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Thu, 15 Jul 2010 00:32:45 +0000</pubDate>
</item>
<item>
	<title>Khairul: Week 7: Refactor refactor</title>
	<guid>http://parrot.mangkok.com/?p=129</guid>
	<link>http://parrot.mangkok.com/?p=129</link>
	<description>&lt;p&gt;Done this week:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Added in generator scripts.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
cotto suggested it would be a good idea to put the scripts I used to generate the stubs in tools/build, so that got done. That done, I added a way to get at the parameters passed to the vtable and GC functions. The example below show’s what I mean:&lt;br /&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;test-invoke.pir&lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;.sub '' :anon :load :init
    load_bytecode 'Instrument/InstrumentLib.pbc'
.end

.sub main :main
    .param pmc args
    $S0 = shift args

    $P0 = new ['Instrument']

    $P2 = get_hll_global ['Instrument';'Event'], 'Class'
    $P1 = $P2.'new'()
    $P1.'callback'('class_handler')
    $P1.'inspect_class'('Sub')
    $P1.'inspect_vtable'('invoke')

    $P0.'attach'($P1)

    $S0 = args[0]
    $P0.'run'($S0, args)
.end

.sub class_handler
    .param pmc data

    $I0 = data['line']
    $P0 = data['parameters']
    $I1 = $P0
    $P1 = $P0[1]

    print 'Line: '
    print $I0
    print ' with '
    print $I1
    say ' parameters.'
    print 'address: '
    say $P1
.end
&lt;/pre&gt;
&lt;p&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;test-script.pir&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;.sub main :main
    test()

    say 'Done'
.end

.sub test
    say 'Invoke!'
.end
&lt;/pre&gt;
&lt;p&gt;Which yields the following output:&lt;/p&gt;
&lt;pre&gt;Line: 3 with 2 parameters.
address: 0
Line: 25 with 2 parameters.
address: 1006b0050
Invoke!
Done
&lt;/pre&gt;
&lt;p&gt;Along the way, I discovered a small bug in src/pmc/pointer.pmc, in line 162:&lt;/p&gt;
&lt;pre&gt;return Parrot_sprintf_c(INTERP, &quot;%s&quot;, PARROT_POINTER(SELF)-&amp;gt;pointer);
&lt;/pre&gt;
&lt;p&gt;Subtle, innocuous looking code, until you realise that it’s supposed to print an address, not a string.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Partially implemented Instrument::Event::Class&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
The code above shows that it is somewhat working. What is missing is instrumenting methods, removing the hooks, and instrumenting dynamically loaded classes.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Massive refactoring of InstrumentGC and InstrumentVtable&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Both InstrumentGC and InstrumentVtable work pretty much the same way. So by refactoring the common code out into InstrumentStubBase, most of the remaining code in InstrumentGC and InstrumentVtable are generated by the scripts tools/build/gen_gc_stubs.pl and tools/build/gen_vtable_stubs.pl. Refactoring the code was somewhat in the back of my mind, and cotto also mentioned it in last week’s meeting with him. Trying to complete Instrument::Event::Class was the thing that spurred this refactoring, as I found out more and more how similar both InstrumentGC and InstrumentVtable is. Along with the refactoring, I took a step back and reevaluated how my mappings for various items were done, well, that got changed too. So did the event dispatcher, again.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Not as massive refactoring of EventDispatcher&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
So this is the second week that EventDispatcher got refactored again. So now it can pass events such as Class::Sub::vtable::main::invoke, so that’s category, class name, vtable, vtable group and the item itself, which is more flexible that the previous case which was to split it into 3 components.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;What did not get done was most of last week’s goals. I got sidetracked into refactoring and ended up not doing the goals. Furthermore, I found out that I need to take into account inheritance when instrumenting the vtable. As an example, EventHandler extends Sub, so when I instrument Sub’s vtable, the stub entries got imported into EventHandler, leading to fireworks that I least expected. Ah well, at least while figuring it out I discovered how to use XCode’s debugger on parrot. So long command line gdb! And good riddance.&lt;/p&gt;
&lt;p&gt;Goals this week will be to complete last week’s goals, since this week, week 8 is supposed to be code review, and most of that got covered last week.&lt;/p&gt;</description>
	<pubDate>Mon, 12 Jul 2010 17:55:23 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Tail-call elimination and moving to github</title>
	<guid>http://www.parrot.org/190 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/tail-call-elimination-and-moving-github</link>
	<description>&lt;p&gt;My main goals this week have been getting a tail-call elimination optimization to work in NQP-rx and moving my GSoC project to an external repository to make it easier for other projects to use it. Both of these goals have been successful. You can find the tail-call elimination optimization &lt;a href=&quot;http://github.com/ekiru/nqp-rx/blob/optimizations/src/NQP/Optimizer.pm#L23&quot;&gt;here&lt;/a&gt;. My GSoC project can now be found on &lt;a href=&quot;http://github.com/ekiru/tree-optimization&quot;&gt;github&lt;/a&gt; or installed via Plumage with &lt;kbd&gt;./plumage install tree-optimizations&lt;/kbd&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/tail-call-elimination-and-moving-github&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Mon, 12 Jul 2010 06:15:17 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: Lorito: A Design</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-1502440153493497713</guid>
	<link>http://wknight8111.blogspot.com/2010/07/lorito-design.html</link>
	<description>Cotto has been putting together a really great &lt;a href=&quot;http://trac.parrot.org/parrot/wiki/LoritoRoadmap&quot;&gt;checklist for Lorito&lt;/a&gt;, the new microcoding approach that the Parrot developers are hoping to implement soon. The first step on the checklist, creating a proper compiler for our ops code &lt;a href=&quot;http://en.wikipedia.org/wiki/Domain_Specific_Language&quot;&gt;DSL&lt;/a&gt; is already complete. Today at #parrotsketch &lt;a href=&quot;http://irclog.perlgeek.de/parrotsketch/2010-07-06#i_2523352&quot;&gt;Allison also mentioned some things &lt;/a&gt;about Lorito, and how we should start focusing more effort on it. I, for one, am very happy about that.&lt;br /&gt;&lt;br /&gt;In this post I'm going to play architect and spell out a vision for Lorito. At the very least, this will be a good play-excercise. I don't expect everybody to like all the things I say here, but I do expect this post to generate some thought and discussion.&lt;br /&gt;&lt;br /&gt;On the ground floor, Lorito needs to be able to do what C code does now. Actually, it really needs to be able to do much of what the underlying hardware machine does now. C is just a useful abstraction over the hardware, one that people are familiar with. What we don't want to be doing is creating our own &lt;a href=&quot;http://en.wikipedia.org/wiki/Application_binary_interface&quot;&gt;ABI&lt;/a&gt;, or creating new low-level calling conventions or anything like that. Those kinds of problems are already resolved and if we want to be able to tap into the myriad of existing libraries we will want to stay compatible with existing conventions.&lt;br /&gt;&lt;br /&gt;We want Lorito to interact with raw integers and pointers, including pointer dereferences and pointer arithmetic. This is important so that we can easily work with C-level arrays and pointers. I can't think of a modern architecture where pointers and integers are different sizes and are treated differently, but I can't say I'm familiar with every architecture in current use. I don't foresee any huge problems with creating an opset that works transparently with integers and pointers.  We also want Lorito to be able to call &lt;a href=&quot;http://en.wikipedia.org/wiki/X86_calling_conventions#cdecl&quot;&gt;C-level functions&lt;/a&gt;, including indirect calls through a function pointer. There's no hard requirement yet stated that Lorito needs to be binary compatible with compiled C code, but I think we can all agree that such would be a major benefit. In fact, if we had a utility that could compile Lorito directly into C code, that would be the best intermediate step we could take. As I will discuss next, such a tool would make the conversion of Parrot to using Lorito easier in the long run. We probably don't want Lorito-to-C conversion to be a permanent part of our build, but it does get us moving now.&lt;br /&gt;&lt;br /&gt;The PASM ops are currently written in C. If Lorito does everything that C can do, eventually they could all be rewritten in Lorito instead. That raises the interesting idea that groups of Lorito ops can be composed into more complex higher-level ops. PASM then becomes little more than a set of predefined convenience compositions, though it certainly does not represent the complete set of possible compositions. Dynops would just be custom predefined Lorito compositions and, since they wouldn't be defined in machine-code libraries, their definitions could be included directly in bytecode for later use.&lt;br /&gt;&lt;br /&gt;In fact, while we are moving down this though path, we get to the idea that we could identify repeated patterns of Lorito ops at compile time, and define custom compositions on the fly. This allows us to compress packfiles for size without really adding all the overhead of general-purpose compression algorithms. When optimizing code, if we can apply an optimization to any composed op, even those identified on the fly, those optimizations can be immediately used anywhere the composition op is. This allows us to prune branches out of the parse tree when optimizing quickly.&lt;br /&gt;&lt;br /&gt;Any language for which a compiler exists to convert it to Lorito can be considered an &quot;overlay&quot; language for Lorito. We can then use any overlay language any place where we can use Lorito. For instance, if NQP is converted to output Lorito (and composition ops) directly, we can then use NQP to define all the PASM ops, all the core PMCs, and several parts of Parrot's core. That would be quite the turnaround from how NQP is used currently.&lt;br /&gt;&lt;br /&gt;Conversely, almost any C code can be rewritten in Lorito, so long as we have a step in the build to preprocess Lorito back into valid C code. In fact, I see no reason why we cannot interleave code written in both languages, in a manner analogous to how the Q:PIR construct allows PIR code to be written in NQP source. If we had a preprocessor that scanned code files and converted Lorito ops into equivalent C code line-by-line, we could start slowly rewriting much of Parrot, if not all of it, in Lorito. Then, once we have converted all the code over that we need, we could change the build process to convert those code files to bytecode instead of machine code, and run large parts of Parrot's code through the runcore.&lt;br /&gt;&lt;br /&gt;Alternatively, instead of writing core code in Lorito directly, we could write core code in any Lorito overlay language. NQP comes to mind here. &lt;br /&gt;&lt;br /&gt;The huge benefit to be had is that if user programs are written in a Lorito overlay, and Parrot itself is written primarily in Lorito or an overlay, our eventual JIT can record traces across the API boundary, and optimize hot sections of the Parrot core on the fly at runtime. &lt;br /&gt;&lt;br /&gt;Here ends the part of the blog post concerned with overarching architecture discussions. Let's get down to the nitty-gritty details.&lt;br /&gt;&lt;br /&gt;Lorito is going to want some basic arithmetic operations: addition, subtraction, multiplication and division on integers (pointers) and floating point numbers. We're also going to want modulus, address-of (C &amp;amp;) and pointer dereference (C unary *) for integer/pointer types, int-to-float and float-to-int cast operations. Logical operations are probably essential as well: and, or, xor, not. Logical inversion (C unary !) would probably be necessary as well. Assuming we can find a way to share ops for int/pointer and float operands (which I doubt we can do in an elegant way), that's still about 20 ops we're going to want to even perform basic manipulations on numbers. I can't imagine any modern, robust, mature virtual machine which doesn't perform these operations readily.&lt;br /&gt;&lt;br /&gt;On top of basic mathematical operations, we're going to need some important operations for calling subroutines: Passing and retrieving arguments, calling subroutines, returning with values. I don't know how low-level Lorito intends to get, but let's face the reality of the world: Hardware machines are stack-based. Every library function we want to call is probably going to be passing arguments on the system stack. If we want to be defiant and call these ops &quot;pass_arg&quot; and &quot;retrieve_arg&quot; to hide the fact that Parrot is using the system stack, that's fine by me. The &quot;stacks are evil&quot; mantra, while occasionally misguided, is definitely firmly ingrained in Parrot culture.&lt;br /&gt;&lt;br /&gt;In a minimalist world, the only ops we would really need are ops to call functions with passed arguments. We could implement every other op as a huge library of functions to call. Of course this would be extremely sub-optimal, but it does open a new possible avenue: Any operation which is sufficiently uncommon could be turned into a function call instead of having a dedicated op. We could encapsulate the call in a composite op. There are lots of options here, we have to weigh the desire to have a smaller op set against the need to have ready access to a huge myriad of low-level operations.&lt;br /&gt;&lt;br /&gt;Having ops to do basic ops is necessary but not sufficient. I don't think we can sit back on our laurels and be happy with an op set that only does a subset of what C can do. That's worthless. Parrot needs to provide access to it's PMC and STRING types, and also to its interpreter. We want ops to load registers with values from the constants table in the bytecode file. We want to treat PMCs and STRINGs as opaque pointers at the user-level. They aren't like other pointers which can be manipulated, they are GCable objects that Parrot treats specially. We don't, for instance, want to be passing a PMC pointer willy-nilly to an arithmetic operation. We also don't want such a mistake to imply a call to one of the addition VTABLEs.&lt;br /&gt;&lt;br /&gt;That said, we want to be able to get the VTABLE structure from a PMC, introspect information about that, and be able to call the various VTABLE interface functions there without having to calculate pointer offsets. This might make a good use of composite ops, where we can still do the pointer derefs in Lorito, but hide the nonsense behind some PASM-levle composite ops. We already have most of these ops already, but I think we're going to want to rework some of them. We definitely need to radically reduce the number of VTABLE interface functions, or else interacting with all of them from Lorito will be extremely ungainly.&lt;br /&gt;&lt;br /&gt;So far as we are talking about a major redesign of the system, maybe it's time to start considering an idea chromatic has been talking about with making all vtables into methods so we can share a common lookup mechanism, common dispatch mechanism, common MMD behaviors, common inheritance behaviors, etc. That's not a bad idea, but we either need dramatic improvements to PCC performance, or we need to create a PCC fast-path for calls which are made without constructing a call object and without doing too many marshalling operations to get arguments where they need to be.&lt;br /&gt;&lt;br /&gt;In fact, on a tangentially-related topic, I definitely think PCC should have a fast-path for functions which do not participate in MMD and which have fixed argument lists containing only positional args (no :optional, no :slurpy, no :named, no :call_sig, etc). This is, I think, an extremely common case and there are plenty of optimizations to be had here if we want them.&lt;br /&gt;&lt;br /&gt;To round out the low-level opset, we need ops to move data between registers, between registers and memory, and maybe even ops to move data between memory locations directly, without moving them to a register first.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's my conception for Lorito: probably 64 ops or less, a capability to add composite ops, treating PASM as a series of common composite ops, and the ability to write low-level code interchangably in C or Lorito. I think this plan for it provides a great development path without too many abrupt stops or course changes. We are quickly going to find ourselves in desperate need of a robust, modern JIT. We are going to be able to move to a proper precise GC since all the Lorito code will be using Parrot's registers to store working values, not relying on stack space which will need to be traced.&lt;br /&gt;&lt;br /&gt;I am highly interested in hearing what other people have to say about Lorito, and what changes Parrot should be considering so long as we are writing this blank check for a massive refactor.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-1502440153493497713?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sat, 10 Jul 2010 22:42:09 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Khairul: Week 6: Vtable madness</title>
	<guid>http://parrot.mangkok.com/?p=122</guid>
	<link>http://parrot.mangkok.com/?p=122</link>
	<description>&lt;p&gt;Done the past week:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Finished up instrumenting GC.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
GC events are now fully instrumented, with the exception of the following 3 functions (is_blocked_mark, is_blocked_sweep, get_gc_info). An example of how to use this is shown below:&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;
gc_do_gc_mark.pir:&lt;/strong&gt;&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;.sub '' :anon :init :load
    load_bytecode 'Instrument/InstrumentLib.pbc'
.end

.sub 'main' :main
    .param pmc args
    $S0 = shift args

    # Create an Instrument::Event::GC object.
    $P0 = get_hll_global ['Instrument';'Event'], 'GC'
    $P1 = $P0.'new'()
    $P1.'callback'('do_gc_mark_callback')
    $P1.'inspect'('do_gc_mark')

    $P2 = new ['Instrument']
    $P2.'attach'($P1)

    $S0 = args[0]
    $P2.'run'($S0, args)
.end

.sub 'do_gc_mark_callback'
    .param pmc data

    $I0 = data['line']
    $S0 = data['file']
    $S1 = data['type']

    print '('
    print $S1
    print ') at line '
    print $I0
    print ' in file '
    say $S0
.end
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;gc_sample.pir:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;.sub main :main
    meh()

    sweep 1
    collect

    say &quot;End main&quot;
.end

.sub meh
    $P0 = new ['Hash']

    $I0 = 0
    LOOP:
      $P0 = new ['String']
      inc $I0
    unless $I0 &amp;gt; 1 goto LOOP

    sweep 1
    collect

    say &quot;End&quot;
.end
&lt;/pre&gt;
&lt;p&gt;Running the command: “./parrot gc_do_mark_sweep.pir gc_sample.pir” will yield the following output:&lt;/p&gt;
&lt;pre&gt;(do_gc_mark) at line 19 in file gc_sample.pir
End
(do_gc_mark) at line 4 in file gc_sample.pir
End main
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Refactored EventDispatcher.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Previously, my implementation of EventDispatcher only allows registered handlers for specific events, such as ‘Instrument::Event::GC::administration::do_gc_mark’. With the implementation of InstrumentGC, this design was rather inadequate, as I found out when I wanted to register a handler for all GC events, or a certain subset of GC events.&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So refactoring and changing the internals of EventDispatcher came as a natural consequence of that. For what I wanted to do, I found that splitting the event type into 3 parts, namely Category, Group and Specific would do nicely for all cases that I could think of. To give an example, ‘GC::allocate::allocate_pmc_header’. If I’m only interested in the specific event, I can just register a handler for ‘GC::allocate::allocate_pmc_header’. If I’m only interested in events in the ‘allocate’ group, I can register a handler for ‘GC::allocate’. Similarly, for all GC events, I can register a handler for ‘GC’.&lt;/p&gt;
&lt;p&gt;Thinking ahead for what I want to do in week 7, this dovetails nicely with Classes. As an example, ‘Class::ResizablePMCArray::push’, ‘Vtable::ResizablePMCArray::push_pmc’. On hindsight, maybe refactoring it again to handle more levels would be better, as looking above for the Vtable example, adding 1 more level would allow catching of push_* vtable entries as a group, ie. ‘Vtable::ResizablePMCArray::push::push_pmc’.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Added tests for EventDispatcher.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Rather self-explanatory.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Added tests for InstrumentGC.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Rather self-explanatory too.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Initial cut of InstrumentVtable.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
As of now, all vtable entries have a working stub that can be attached and removed at will. What is missing is getting the information about the arguments to the vtable entry. As an example, VTABLE_push_pmc(INTERP, obj, pmc), currently, only the information ‘push_pmc’ can be obtained, with obj and pmc on the way. As an example:&lt;strong&gt;&lt;p&gt;&lt;/p&gt;
&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;vtable_push_pmc.pir&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;.sub '' :anon :load :init
    load_bytecode 'Instrument/InstrumentLib.pbc'
.end

.sub main :main
    .param pmc args
    $S0 = shift args

    $P0 = new ['Instrument']
    $P1 = new ['InstrumentVtable'], $P0
    $P2 = $P0['eventdispatcher']

    # Register a handler
    $P3 = get_global 'class_handler'
    $P2.'register'('Class', $P3)

    # Instrument push_pmc of class ResizablePMCArray
    $P1.'attach_to_class'('ResizablePMCArray')
    $P1.'insert_vtable_hook'('push_pmc')

    $S0 = args[0]
    $P0.'run'($S0, args)
.end

.sub class_handler
    .param pmc data

    $I0 = data['line']

    print 'Line: '
    say $I0
.end
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;vtable_test.pir&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;.sub main :main

    $I0 = 0

    LOOP:
      if $I0 &amp;gt; 5 goto DONE

      $P0 = new ['ResizablePMCArray']
      $P1 = box $I0
      push $P0, $P1
      inc $I0

      goto LOOP
    DONE:

    say 'Done'
.end
&lt;/pre&gt;
&lt;p&gt;Running the command: “./parrot vtable_push_pmc.pir vtable_test.pir” yields the following output:&lt;/p&gt;
&lt;pre&gt;Line: -1
Line: 8
Line: 8
Line: 8
Line: 8
Line: 10
Line: 10
Line: 10
Line: 10
Line: 10
Line: 10
Done
&lt;/pre&gt;
&lt;p&gt;Since I have not implemented the appropriate Instrument::Event class for Vtable events, the code in ‘vtable_push_pmc.pir’ is rather lower-level than I would have preferred. But it will do for now.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With that, this week I would like to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Finish up InstrumentVtable&lt;/strong&gt;&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;Implement the Instrument::Event class&lt;/li&gt;
&lt;li&gt;Add a way to get at the vtable arguments&lt;/li&gt;
&lt;li&gt;Documentation + Tests&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Do InstrumentClass, InstrumentObject&lt;/strong&gt;&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;Build on InstrumentVtable to add support for methods.&lt;/li&gt;
&lt;li&gt;Add ability to instrument a single object.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Start on user documentation.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
There is currently no tutorial or anything on how to use the framework. Write something to show the simple stuff, instrumenting the ops.&lt;/li&gt;
&lt;/ol&gt;</description>
	<pubDate>Mon, 05 Jul 2010 18:27:56 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Seven days of PIRATE and Tree::Pattern hacking</title>
	<guid>http://www.parrot.org/188 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/seven-days-pirate-and-treepattern-hacking</link>
	<description>&lt;p&gt;Last week, I generalized PAST::Pattern to Tree::Pattern. This week, I put that to use.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/seven-days-pirate-and-treepattern-hacking&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Sun, 04 Jul 2010 09:52:04 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 30 June 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40433?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40433?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 30 June 2010.  Allison, Patrick, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;working on Parrot packages for Debian experimental&lt;/li&gt;&lt;li&gt;seems like a good idea to do that before the 2.6 supported release&lt;/li&gt;&lt;li&gt;there was also a request for Rakudo packages&lt;/li&gt;&lt;li&gt;not sure if I'm the best person to do it&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I'm sure we should package Rakudo Star&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Debian had a packager for those, but I haven't looked at the packages&lt;/li&gt;&lt;li&gt;this'd be an early run of what we'll do with Rakudo Star&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we're not quite ready for packaging that yet&lt;/li&gt;&lt;li&gt;maybe a couple of weeks&lt;/li&gt;&lt;li&gt;finished the &lt;code&gt;List&lt;/code&gt; and &lt;code&gt;Iterator&lt;/code&gt; types for the #30 release&lt;/li&gt;&lt;li&gt;adjusted Rakudo's &lt;code&gt;Associative&lt;/code&gt; and &lt;code&gt;Positional&lt;/code&gt; roles&lt;/li&gt;&lt;li&gt;much cleaner implementation now&lt;/li&gt;&lt;li&gt;that'll require a few small spec changes&lt;/li&gt;&lt;li&gt;redid Rakudo's container types&lt;/li&gt;&lt;li&gt;more robust&lt;/li&gt;&lt;li&gt;preparing for autovivification of hashes and arrays&lt;/li&gt;&lt;li&gt;expect to finish those in the next couple of days&lt;/li&gt;&lt;li&gt;there was no container model previously; the code was consequently crufty&lt;/li&gt;&lt;li&gt;lots of cleanup of incorrect assumptions&lt;/li&gt;&lt;li&gt;Rakudo lists are now properly lazy&lt;/li&gt;&lt;li&gt;comment syntax fixed&lt;/li&gt;&lt;li&gt;ROADMAP updated&lt;/li&gt;&lt;li&gt;fixed the meaning of &lt;code&gt;Nil&lt;/code&gt;; it's defined, not undefined&lt;/li&gt;&lt;li&gt;added the sink prefix (?)&lt;/li&gt;&lt;li&gt;fixed setting of &lt;code&gt;$!&lt;/code&gt; &lt;/li&gt;&lt;li&gt;started fixing bugs and closing tickets on Monday, did 15 or 20&lt;/li&gt;&lt;li&gt;mostly already fixed in the previous couple of weeks&lt;/li&gt;&lt;li&gt;looking at the implementation of the series operator&lt;/li&gt;&lt;li&gt;spec is self-contradictory or ambiguous or both&lt;/li&gt;&lt;li&gt;waiting for Larry's clarification&lt;/li&gt;&lt;li&gt;fixed a bug in &lt;code&gt;$*ARGFILES&lt;/code&gt; &lt;/li&gt;&lt;li&gt;had a nice contribution of that implementation last week&lt;/li&gt;&lt;li&gt;that behavior works on any set of files, not just those on the command line&lt;/li&gt;&lt;li&gt;working on autoviv&lt;/li&gt;&lt;li&gt;have some regex backtracking bugs to fix&lt;/li&gt;&lt;li&gt;will work on closures after that&lt;/li&gt;&lt;li&gt;put together three new YAPC presentations&lt;/li&gt;&lt;li&gt;the Rakudo Star presentation will become a video cast or a blog post or both&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;worked on a slew of Parrot optimizations for Rakudo&lt;/li&gt;&lt;li&gt;have a few more to go&lt;/li&gt;&lt;li&gt;might have to create a Rakudo branch temporarily&lt;/li&gt;&lt;li&gt;will try to help merge the new GC&lt;/li&gt;&lt;li&gt;working on a metamodel for Parrot objects, informed by Perl 6 and Moose&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Sat, 03 Jul 2010 08:13:30 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Green Threads and Sleeping</title>
	<guid>http://www.parrot.org/187 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/green-threads-and-sleeping</link>
	<description>&lt;p&gt;I've spent my Parrot time for the last week working on something I call Alarms. Alarms are like Timers, except instead of specifying a delay the user specifies when they want the Alarm to fire. This is a pretty simple concept. If the Scheduler did what I wanted, I'd be done long ago.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/green-threads-and-sleeping&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Thu, 01 Jul 2010 21:24:16 +0000</pubDate>
</item>
<item>
	<title>Jonathan Leto: Rakudo Perl 6 in Your PostgreSQL Database!</title>
	<guid>tag:leto.net,2010:/dukeleto.pl//9.225</guid>
	<link>http://leto.net/dukeleto.pl/2010/06/rakudo-perl-6-in-your-postgresql-database.html</link>
	<description>&lt;p&gt;
It has been a very exciting few weeks in the &lt;a href=&quot;http://perl6.org/&quot;&gt;Perl 6&lt;/a&gt; world with regard to database access. 
&lt;a href=&quot;http://blogs.perl.org/users/martin_berends/&quot;&gt;mberends++&lt;/a&gt; just wrote
a nice &lt;a href=&quot;http://blogs.perl.org/users/martin_berends/2010/06/rakudo-perl-6-gets-into-databases.html&quot;&gt;blog post&lt;/a&gt; about how Perl 6 
support for DBI is ramping up with work on &lt;a href=&quot;http://github.com/mberends/MiniDBI&quot;&gt;MiniDBI&lt;/a&gt; (formerly FakeDBI). Multiple developers recently made great progress
on &lt;a href=&quot;http://postgresql.org&quot;&gt;PostgreSQL&lt;/a&gt; drivers and have been improving the &lt;a href=&quot;http://parrot.org&quot;&gt;Parrot&lt;/a&gt; interface to 
&lt;a href=&quot;http://www.postgresql.org/docs/8.4/static/libpq.html&quot;&gt;libpq&lt;/a&gt;, 
&lt;a href=&quot;http://trac.parrot.org/parrot/browser/trunk/runtime/parrot/library/Pg.pir&quot;&gt;Pg.pir&lt;/a&gt; .
&lt;/p&gt;

&lt;p&gt;
I have also been dutifully hacking on PL/Perl6, which embeds &lt;a href=&quot;http://rakudo.org&quot;&gt;Rakudo Perl 6&lt;/a&gt; into
your PostgreSQL datbase via &lt;a href=&quot;http://pl.parrot.org&quot;&gt;PL/Parrot&lt;/a&gt;, and just recently merged the plperl6
branch, which adds the first basic support for PL/Perl 6. Here is how it
currently works:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You must first install a recent version of Parrot and Rakudo Perl 6. I develop
with Parrot trunk and Rakudo master because I often need very recent changes/bugfixes&lt;/li&gt;
&lt;li&gt;You will need a moderately recent version of PostgreSQL. PL/Parrot has been
known to work with versions as old as 8.3.8, but I mostly develop on the master branch,
so 9.x will probably work best&lt;/li&gt;
&lt;li&gt;When you type &quot;make install&quot; for Rakudo Perl 6, you will see that it installs a file
called &quot;perl6.pbc&quot; into the lib/$version/languages/perl6 directory of the Parrot installation
that Rakudo was configured with. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
To tell PL/Parrot that you would also like PL/Perl6, you
set the environment variable PERL6PBC to the full path of perl6.pbc like so:
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;
export PERL6PBC=/Users/leto/git/rakudo/parrot_install/lib/2.5.0-devel/languages/perl6/perl6.pbc
&lt;/b&gt;
&lt;/p&gt;

&lt;p&gt;
A PBC file is &lt;a href=&quot;http://docs.parrot.org/parrot/devel/html/docs/parrotbyte.pod.html&quot;&gt;Parrot bytecode&lt;/a&gt;,
and the perl6.pbc file basically bundles all of Rakudo Perl 6 into
a single file. You can play around with the Rakudo Perl 6 REPL by running:
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;
$ parrot $PERL6PBC
&lt;/b&gt;
&lt;/p&gt;

&lt;p&gt;
which is pretty much the exact same thing as running the perl6 binary in your $PATH.
&lt;/p&gt;

&lt;p&gt;
When you compile PL/Parrot with the $PERL6PBC environment variable set, it automatically creates
a separate Parrot interpreter with the perl6.pbc bytecode loaded, so that Perl 6 code can be executed.
&lt;/p&gt;

&lt;p&gt;
To run PL/Parrot tests, you type &quot;make test&quot;. You can also do this the
PostgreSQL way with &quot;make installcheck&quot;, which will run the tests and verify
that the output matches a certain, known output. &quot;make tests&quot; just generates
the TAP output.
&lt;/p&gt;

&lt;p&gt;
Currently PL/Perl 6 tests are not run by default, they have their own Makefile target:
&lt;b&gt;test_plperl6&lt;/b&gt;
&lt;a href=&quot;http://gist.github.com/459421&quot;&gt;This&lt;/a&gt; is what the output of &quot;make test_plperl6&quot; looks like currently, on
&lt;a href=&quot;http://github.com/leto/plparrot/commit/44a985f123309783b43304bc4268cde93aba1ef3&quot;&gt;commit 44a985f123&lt;/a&gt; of the perl6_args
branch.
&lt;/p&gt;

&lt;p&gt;
We run a total of 9 tests, 6 of which correctly run Perl 6 code and pass. You will notice that all the
failing tests are relating to passing arguments into Rakudo from PostgreSQL, which is what I am 
currently trying to get to work. Currently I am passing a 
&lt;a href=&quot;http://docs.parrot.org/parrot/devel/html/src/pmc/resizablepmcarray.pmc.html&quot;&gt;Parrot ResizablePMCArray&lt;/a&gt; of the arguments
to a Rakudo function and executing it, but the function can't seem to see it. My guess is that 
Rakudo wants native datatypes and not Parrot datatypes. If you know how to create Rakudo datatypes
from &lt;a href=&quot;http://en.wikipedia.org/wiki/Parrot_intermediate_representation&quot;&gt;PIR&lt;/a&gt;, please let me know :) I promise you will &lt;a href=&quot;http://perlgeek.de/blog-en/perl-6/optimized-for-fun.html&quot;&gt;-Ofun&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
What does PL/Perl 6 look like? Here is a nice example of a PL/Perl6 function which calculates the sum
of all &lt;a href=&quot;http://en.wikipedia.org/wiki/Fibonacci_number&quot;&gt;Fibonacci numbers&lt;/a&gt; &amp;lt;= 100:
&lt;/p&gt;&lt;p&gt;
CREATE FUNCTION test_fibonacci_plperl6(integer) RETURNS int LANGUAGE plperl6 AS $$&lt;br /&gt;
[+] (1, 1, *+* ... 100)&lt;br /&gt;
$$;
&lt;/p&gt;

You will notice three spiffy new Perl 6 operators in there, the summation
operator &lt;b&gt;[+]&lt;/b&gt;, the new range operator &lt;b&gt;...&lt;/b&gt; (which used to be &lt;b&gt;..&lt;/b&gt; in Perl 5), and the &lt;b&gt;*+*&lt;/b&gt; operator. What
exactly is the &lt;b&gt;*+*&lt;/b&gt; operator? pmichaud++ jokingly referred to it as the
&quot;cheerleading plus&quot;, but it is actually just a plain old infix &quot;+&quot; operator,
sandwiched by two &quot;*&quot; (a.k.a Whatever) operands. It basically takes the
previous two elements in a list, sums them together and returns the sum,
which is exactly how the Fibonacci sequence is defined.
&lt;p&gt;&lt;/p&gt;

&lt;p&gt;
If you are interested in hacking on PL/Perl 6, PL/Parrot or anything related, come
join us in #plparrot on freenode, join the
&lt;a href=&quot;http://groups.google.com/group/plparrot/&quot;&gt;mailing list&lt;/a&gt; and fork us on 
&lt;a href=&quot;http://github.com/leto/plparrot&quot;&gt;github&lt;/a&gt; !
&lt;/p&gt;</description>
	<pubDate>Thu, 01 Jul 2010 01:27:34 +0000</pubDate>
</item>
<item>
	<title>Khairul: Week 5: Unforseen troubles.</title>
	<guid>http://parrot.mangkok.com/?p=118</guid>
	<link>http://parrot.mangkok.com/?p=118</link>
	<description>&lt;p&gt;Due to unforseen personal circumstances, I did not manage to do much this week. However, I did manage to finish instrumenting the GC subsystem. So, here’s a short recap:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Updated InstrumentOp.pmc&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
After discussion with cotto, I changed the interface slightly, combining 4 methods into 1 as getting the context information again and again is not very efficient.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Added tests for Instrument::Probe&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
This is self-explanatory. Tests instrumenting the core ops, dynops, op family and ensuring that the callbacks are really called.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Instrumented GC&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Creating the stub functions for each GC_Subsystem entry was rather tedious, as there was quite a few of them. As of right now, all the GC_Subsystem entries except for is_blocked_mark, is_blocked_sweep and get_gc_info has their own corresponding stubs.&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Each stub does the following,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Call the respective GC function.&lt;/li&gt;
&lt;li&gt;Gather the data to send as part of the event to be raised.&lt;/li&gt;
&lt;li&gt;Raise the event.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Furthermore, in addition to inspecting each individual GC_Subsystem entry, I have also grouped the entries into the following categories: allocate, reallocate, free, administration. This grouping is based on what each function is supposed to do, using the Mark and Sweep GC as the basis. The leftover functions are grouped under administration.&lt;/p&gt;
&lt;p&gt;What is not done yet however is the interface for these events, which I’m currently in the midst of. My current problem is getting the EventDispatcher to recognise and dispatch to catchall event handlers, such as Instrument::Event::GC::*. This is needed as for example, wanting to only instrument the PMC related entries of the GC_Subsystem. What I have currently doesn’t allow this. So a rework is in order.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This week I’ll be continuing on the following tasks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Finish up the event interface for the GC.&lt;/li&gt;
&lt;li&gt;Instrument the PMC vtables.&lt;/li&gt;
&lt;/ol&gt;</description>
	<pubDate>Tue, 29 Jun 2010 20:24:08 +0000</pubDate>
</item>
<item>
	<title>parrot.org: A report from the (NFG) front lines.</title>
	<guid>http://www.parrot.org/185 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/report-front-lines</link>
	<description>&lt;p&gt;After taking some time off GSoC work to pay the parrot Upgrade Tax that plumage had accumulated in the months since 2.3 shipped, and watching the World Cup this hasn't been an awfully productive week, code-wise. However, there's been quite a bit of work and planing done anyway.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/report-front-lines&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 29 Jun 2010 18:56:40 +0000</pubDate>
</item>
<item>
	<title>chromatic: Modern Perl: The (Draft) Book</title>
	<guid>http://use.perl.org/~chromatic/journal/40423?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40423?from=rss</link>
	<description>&lt;p&gt;This took longer than I expected, but &lt;a href=&quot;http://www.modernperlbooks.com/mt/2010/06/modern-perl-the-book-the-draft.html&quot;&gt;the draft of the Modern Perl book is available for review&lt;/a&gt;.  I'm especially interested in hearing from people who don't consider themselves expert Perl 5 programmers.  The goal of the book is to explain how Perl 5 works (and how to write Perl 5 effectively) to help novices become adepts.&lt;/p&gt;</description>
	<pubDate>Mon, 28 Jun 2010 23:43:33 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Generalization: Tree::Pattern, Tree::Transformer, and Tree::Walker</title>
	<guid>http://www.parrot.org/184 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/generalization-treepattern-treetransformer-and-treewalker</link>
	<description>&lt;p&gt;Earlier this summer, when I was considering what sort of interface would be best for the PAST pattern matching and transformation I've been building, Bacek suggested an XPath-like syntax. XPath is, nominally, a language for pattern matching on XML, but it is applicable to any tree-like data structure where each node may have both attributes and children. It's a general-purpose tree-matching language.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/generalization-treepattern-treetransformer-and-treewalker&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Sun, 27 Jun 2010 08:48:14 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 16 June 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40419?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40419?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 16 June 2010.  Larry, Allison, Patrick, Will, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;documented &lt;code&gt;TOP&lt;/code&gt; (again), and explained how parsing is initiated and how it actually works&lt;/li&gt;&lt;li&gt;series operator (&lt;code&gt;...&lt;/code&gt;) now picks a monotonic function when using single characters as endpoints&lt;/li&gt;&lt;li&gt;STD can now catch duplicates involving &lt;code&gt;proto&lt;/code&gt;s as well as &lt;code&gt;only&lt;/code&gt;s&lt;/li&gt;&lt;li&gt;STD no longer advises removal of parens on spaceless &lt;code&gt;sub()&lt;/code&gt; declaration&lt;/li&gt;&lt;li&gt;mostly advised sorear and pmichaud&lt;/li&gt;&lt;li&gt;Stefan is finishing the boostrap of the STD parser&lt;/li&gt;&lt;li&gt;also working on adding a parallel NFA and DFA engine&lt;/li&gt;&lt;li&gt;no, he doesn't want to generate all the states in advance&lt;/li&gt;&lt;li&gt;it works faster lazily&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;working on chroot environments with something more secure than chroot&lt;/li&gt;&lt;li&gt;relevant to building Parrot packages&lt;/li&gt;&lt;li&gt;looking at some bugs for Will&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Rakudo developers decided not to make extra special effort to make a June release of Rakudo Star&lt;/li&gt;&lt;li&gt;the calendar works against us&lt;/li&gt;&lt;li&gt;the new date for the release is July 29&lt;/li&gt;&lt;li&gt;we're I comfortable with hitting that target&lt;/li&gt;&lt;li&gt;we won't be happy with the results of moving heaven and earth to release in June&lt;/li&gt;&lt;li&gt;there are lots of advantages&lt;/li&gt;&lt;li&gt;one disadvantage is not having Rakudo Star at YAPC::NA&lt;/li&gt;&lt;li&gt;one big advantage is using the supported Parrot 2.6 release as the basis&lt;/li&gt;&lt;li&gt;I'll write a post outlining the plan in the next couple of days&lt;/li&gt;&lt;li&gt;otherwise working on lists and interators in Perl 6 and Rakudo&lt;/li&gt;&lt;li&gt;after deciding to make iterators immutable, Larry and I realized that solves many problems&lt;/li&gt;&lt;li&gt;everything works out as plain as day after that&lt;/li&gt;&lt;li&gt;very happy with that design&lt;/li&gt;&lt;li&gt;the incorrect assumptions of the old model were pervasive&lt;/li&gt;&lt;li&gt;replacing the old pieces is taking a while, which is no surprise&lt;/li&gt;&lt;li&gt;this approach feels right though&lt;/li&gt;&lt;li&gt;the new branch does things no previous version could do&lt;/li&gt;&lt;li&gt;slices work much better, for example&lt;/li&gt;&lt;li&gt;metaoperators work properly&lt;/li&gt;&lt;li&gt;map is lazy&lt;/li&gt;&lt;li&gt;slurpy arguments in lists are lazy by default&lt;/li&gt;&lt;li&gt;no weird binding or action at a distance problems&lt;/li&gt;&lt;li&gt;plenty of changes to &lt;code&gt;Associative&lt;/code&gt; and &lt;code&gt;Positional&lt;/code&gt; roles&lt;/li&gt;&lt;li&gt;those are now super clean and may be lazy&lt;/li&gt;&lt;li&gt;more features work&lt;/li&gt;&lt;li&gt;~30 failing tests (not test files, just tests) now, ~500 last night&lt;/li&gt;&lt;li&gt;most of the current failures are minor&lt;/li&gt;&lt;li&gt;will try to merge the branch before the release&lt;/li&gt;&lt;li&gt;replacing lots of ugly code with fewer lines of elegant code&lt;/li&gt;&lt;li&gt;Jonathan and others have worked on lots of other pieces&lt;/li&gt;&lt;li&gt;adding plenty of new features&lt;/li&gt;&lt;li&gt;looking forward to tomorrow's release&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;editing the Rakudo book&lt;/li&gt;&lt;li&gt;moving the Rakudo release date may let us have a printed book available about the same time&lt;/li&gt;&lt;li&gt;depends on how much there is left to write&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Sat, 26 Jun 2010 17:07:30 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 09 June 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40415?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40415?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 09 June 2010.  Larry, Allison, Patrick, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;not much spec change this week&lt;/li&gt;&lt;li&gt;figured out a syntax for a regex block to return more than one cursor&lt;/li&gt;&lt;li&gt;based on &lt;code&gt;gather&lt;/code&gt;/&lt;code&gt;take&lt;/code&gt; &lt;/li&gt;&lt;li&gt;in STD hacking, continued to assist Stefan O'Rear in getting STD bootstrapped via viv&lt;/li&gt;&lt;li&gt;now that it's bootstrapped, we're refactoring things that make sense now&lt;/li&gt;&lt;li&gt;we're now starting to move bits of Cursor code from Perl 5 into Perl 6&lt;/li&gt;&lt;li&gt;refactoring the grammar for sanity of design&lt;/li&gt;&lt;li&gt;started upgrading STD to normal Perl 6 syntax where it previously catered to &lt;code&gt;gimme5&lt;/code&gt;'s limitations&lt;/li&gt;&lt;li&gt;for example, switched STD's old &lt;code&gt;.&amp;lt;_from&amp;gt;&lt;/code&gt; and &lt;code&gt;.&amp;lt;_pos&amp;gt;&lt;/code&gt; hash lookups to using &lt;code&gt;.from&lt;/code&gt; and &lt;code&gt;.pos&lt;/code&gt; accessors&lt;/li&gt;&lt;li&gt;started the prep work for moving &lt;code&gt;EXPR&lt;/code&gt; out of &lt;code&gt;STD&lt;/code&gt; to make it generally available to any grammar wanting operator precedence&lt;/li&gt;&lt;li&gt;in STD parsing, made Perl 5 &lt;code&gt;$&amp;lt;&lt;/code&gt; detection have a longer token to avoid confusion with match variables&lt;/li&gt;&lt;li&gt;STD no longer attempts two-terms detection on &lt;code&gt;infix_circumfix_meta_operator&lt;/code&gt; &lt;/li&gt;&lt;li&gt;STD now parses &lt;code&gt;&amp;gt;&amp;gt;R~&amp;lt;&amp;lt;&lt;/code&gt; correctly, or at least dwimmily&lt;/li&gt;&lt;li&gt;STD doesn't complain about P5isms in &lt;code&gt;printf&lt;/code&gt; formats like &lt;code&gt;&quot;%{$count}s&quot;&lt;/code&gt; &lt;/li&gt;&lt;li&gt;STD was parsing &lt;code&gt;/m&lt;/code&gt; and &lt;code&gt;/s&lt;/code&gt; with the opposite semantics&lt;/li&gt;&lt;li&gt; &lt;code&gt;termish&lt;/code&gt; now localizes &lt;code&gt;$*MULTINESS&lt;/code&gt; in its scope so that inner declarations aren't accidentally multified&lt;/li&gt;&lt;li&gt;STD now carps about &lt;code&gt;package Foo;&lt;/code&gt; as a Perl 5 construct&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;talked to Chris Shiflett, a PHP developer, on someone from the PHP community to sit on the Parrot board&lt;/li&gt;&lt;li&gt;will be in the US for a few weeks&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;working on list simplification&lt;/li&gt;&lt;li&gt;had a couple of breakthrough ideas on Monday&lt;/li&gt;&lt;li&gt;working on the implementation now&lt;/li&gt;&lt;li&gt;worked out inversion lists for character class matching in regexes&lt;/li&gt;&lt;li&gt;will make them faster, especially with long ranges of character classes&lt;/li&gt;&lt;li&gt;fixed a half-dozen tickets in RT&lt;/li&gt;&lt;li&gt;fixed Rakudo hash constructors&lt;/li&gt;&lt;li&gt;fixed an intermittent bug with colon-pair signatures&lt;/li&gt;&lt;li&gt;two possible parses exist in STD, but we removed an unneeded one in Rakudo&lt;/li&gt;&lt;li&gt;fixed a bug with Parrot's &lt;code&gt;exit&lt;/code&gt; opcode&lt;/li&gt;&lt;li&gt;NQP and PAST needed an update not to cheat with PASM constants&lt;/li&gt;&lt;li&gt;I fixed that too&lt;/li&gt;&lt;li&gt;Vasily added multisub and multimethod support to NQP, that was a big plus&lt;/li&gt;&lt;li&gt;fixed the &lt;code&gt;**&lt;/code&gt; quantifier in regexes to understand surrounding whitespace&lt;/li&gt;&lt;li&gt;regex engine tried to match beyond the end of a string, so I added guards for that&lt;/li&gt;&lt;li&gt;will work on lists furiously before the next release&lt;/li&gt;&lt;li&gt;I don't think it'll take long&lt;/li&gt;&lt;li&gt;closures are next, hope to have those in place by the weekend&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;released a new version of Pod::PseudoPod::LaTeX to support the various books in progress&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Thu, 24 Jun 2010 12:24:33 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: Parrot-Linear-Algebra: Change of Course</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-164633329631455407</guid>
	<link>http://wknight8111.blogspot.com/2010/06/parrot-linear-algebra-change-of-course.html</link>
	<description>I've added a lot of functionality to PLA in the last few days, including a large boost to the test suite this evening. Since Kakapo doesn't have a release that targets Parrot 2.3.0, I decided to refocus my efforts on Parrot 2.6.0. However, with all the changes in Parrot since 2.3.0 came out, the upgrade path was much harder than I anticipated. Luckily I have some superstars like &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/commit/1f0d9f839cf3060fe5b4befe98206401c29cc507&quot;&gt;darbelo and NotFound&lt;/a&gt; on my side, otherwise I would still be fighting with things.&lt;br /&gt;&lt;br /&gt;After talking to darbelo I've decided PLA is not going to attempt to track supported releases, at least not for normal development. It's too much of a pain in the ass, and nobody else is doing it. Sure it's best practice, but it's the kind of thing the whole ecosystem really needs to do together. If the HLL compiler is tracking Parrot HEAD because of a desperate need of new features and improved performance, then it doesn't make any sense for libraries not to be keeping up pace.&lt;br /&gt;&lt;br /&gt;Darbelo made one particularly good point:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;If we track HEAD the we'll run on 2.6 when it's released. We branch on the release day and do whatever 'release engineering' we need to do on the branch and tag a release when we're done.&lt;/blockquote&gt;&lt;br /&gt;That's it, in a nutshell: If we track trunk closely enough, we will always be ready with a release following Parrot's release. Spend a few days to prepare the necessary accouterments, then cut a tag and continue on with normal development. Our releases can be tied to Parrot's supported releases, but our ongoing development will target trunk as closely as possible. I don't anticipate that we will want to cut a PLA release every time Parrot does, but if we follow a 4-month schedule and follow supported releases that should be just fine. At least, fine for now.&lt;br /&gt;&lt;br /&gt;PLA is going to track Parrot trunk and hopefully be prepared to cut a release following Parrot 2.6.0. That gives us about 4 weeks to get all our ducks in a row (and our Kakapos too!).&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-164633329631455407?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 24 Jun 2010 01:10:10 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: Cleaning up the Scheduler</title>
	<guid>http://www.parrot.org/183 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/cleaning-scheduler</link>
	<description>&lt;p&gt;In my work on Timers, I've concluded that the scheduler really is the right place for scheduling things (who would have guessed?). How the scheduler *should* work is described in &lt;a href=&quot;http://docs.parrot.org/parrot/latest/html/docs/pdds/pdd25_concurrency.pod.html&quot;&gt;pdd25&lt;/a&gt;. How the scheduler actually works is a bit different, and how I want the scheduler to work to implement green threads is a bit different from that...&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/cleaning-scheduler&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 22 Jun 2010 21:00:38 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: BLAS, LAPACK, and Parrot-Linear-Algebra</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-5412529727912985922</guid>
	<link>http://wknight8111.blogspot.com/2010/06/blas-lapack-and-parrot-linear-algebra.html</link>
	<description>Last night I got back to work on Parrot-Linear-Algebra, my matrix package for Parrot. I'm really starting to get happy with the functionality it provides and am looking to start moving the project to the next level of functionality and usability.&lt;br /&gt;&lt;br /&gt;I hadn't touched it in a while, for a variety of reasons. Austing Hastings has been very busy with other projects and hasn't cut an &quot;official&quot; release of &lt;a href=&quot;http://www.gitorious.com/kakapo/kakapo&quot;&gt;Kakapo&lt;/a&gt; that works with the last supported Parrot release, 2.3. I've applied some hotfixes that make Kakapo build and pass tests on 2.3, but that's not quite good enough. When I make a PLA release I don't want &quot;clone the Kakapo repository from Gitorious&quot; in the instructions, because then the instructions get out of date when Kakapo is updated to be incompatible. What I want is to say &quot;Download Kakapo version X from this URL&quot;, which will be invariant. &lt;br /&gt;&lt;br /&gt;Last night I added some prototype new features to the NumMatrix2D PMC, the basic numeric matrix type. I'm going to mirror the majority of those changes to the two other general-purpose types; ComplexMatrix2D and PMCMatrix2D. I &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/blob/471954c9223f57cdedc4aa48cab5b68a908ef58c/src/pmc/nummatrix2d.pmc#L1025&quot;&gt;added methods&lt;/a&gt; to do basic &lt;a href=&quot;http://en.wikipedia.org/wiki/Elementary_row_operations&quot;&gt;elementary row operations&lt;/a&gt; (swap two rows, add a multiple of one row to another, and multiply the contents of a row by a non-zero constant), and used those operations to put together an example program to &lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/commit/471954c9223f57cdedc4aa48cab5b68a908ef58c#diff-0&quot;&gt;calculate both the Row Echelon and Reduced Row Echelon&lt;/a&gt; forms of a matrix. Those methods, combined with block manipulation methods I added previously and the new &lt;a href=&quot;http://en.wikipedia.org/wiki/GEMM&quot;&gt;GEMM&lt;/a&gt; method I added&lt;a href=&quot;http://github.com/Whiteknight/parrot-linear-algebra/commit/c84ff7596f5dc2bae4d1bdf5bb5a8124ea913cbc&quot;&gt; last night as well&lt;/a&gt;, create a basis for us to create a comprehensive library of linear algebra routines.&lt;br /&gt;&lt;br /&gt;But that brings me to my next concern: How to implement the remainder of the fundamental algorithms a linear algebra pack is going to want to provide? Obviously I would love to wrap the LAPACK library up and call the routines it provides directly. LAPACK provides a huge number of routines for doing things like singular value decomposition, QR, LU, and other types of decomposition, solving the eigen probem, solving systems of equations in two variables, etc. In fact, LAPACK provides almost all of the functionality I would want PLA to have in the next few months.&lt;br /&gt;&lt;br /&gt;The problem, however, is that LAPACK is not nearly as accessible from C code as I would like. In fact, there is no &quot;standard&quot; for C-bindings to the library, and several lame attempts are available that tend to be incompatible with each other. The reference version, and only reliably-available version, of LAPACK is written in FORTRAN. The standard CLAPACK library is just a machine-lead translation of the FORTRAN sourcecode, with a few points in the code needing to be manually tweaked after conversion. It has a few problems, including the fact that every single function parameter (even basic ints and floats) must be passed by reference. The ATLAS library, which PLA currently prefers to provide BLAS bindings, provides some LAPACK C bindings of it's own, but only a very very small subset of all LAPACK functions are provided, and the ones it does have hardly support all the operations PLA is going to want to provide.&lt;br /&gt;&lt;br /&gt;CLAPACK, being more or less the standard could be made to work, except that it doesn't come as any sort of user-friendly package. There are no CLAPACK packages for Debian (Ubuntu) or RedHat that I have seen, and that raises the barrier to entry significantly, something that I want to avoid.&lt;br /&gt;&lt;br /&gt;I could use the LAPACK library directly, and&lt;a href=&quot;http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html&quot;&gt; twist my code to match the FORTRAN calling conventions&lt;/a&gt; and data alignments. That's not unthinkable, though it would require some more work on the part of PLA developers than any other solution.&lt;br /&gt;&lt;br /&gt;I could skip LAPACK entirely, and instead rely on something like GSL with proper C bindings built-in. GSL does provide &lt;a href=&quot;http://www.gnu.org/software/gsl/manual/html_node/Linear-Algebra.html&quot;&gt;several important matrix operations and decompositions&lt;/a&gt;, though I would need to do more research into the capabilities of that library.. What I don't want is to lose focus and have this project grow to try and become a general wrapper for all of GSL. I want PLA to stay focused on Linear Algebra only. We could maybe create sister projects to encapsulate more of the GSL functionality and use PLA under the hood to implement the basic data structures, of course.&lt;br /&gt;&lt;br /&gt;Maybe we will get lucky, and the new NCI system will have support for calling FORTRAN routines from shared libraries. I don't think we can just anticipate this kind of functionality, at least not during the GSoC program. &lt;br /&gt;&lt;br /&gt;A &quot;nuclear&quot; option, perhaps, would be to not rely on any external library for these things and instead brew up all the basics myself. I'm not against such work &lt;i&gt;per se&lt;/i&gt;, but it would be a huge investment in time and the case cannot be made that it's the best use of my limited development time. I did put together a Gauss-Jordan elimination routine last night, it wouldn't be too too much effort to put together a generalized QR decomposition algorithm and a singular-value decomposition algorithm, followed by routines to calculate eigenvalues, eigenvectors, and matrix inverses from those things. If PLA had a larger team of active developers who wanted to participate in this kind of work it would be an easier decision to make, but if it's primarily me and a handful of occasional-contributors, this really isn't a doable task.&lt;br /&gt;&lt;br /&gt;My plan for PLA in the near future is this: After the 2.6 release I want to push for a stable release of Kakapo, and then using that I want to cut a release of PLA. From that point forward, PLA will target the 2.6 version of Parrot at least until 2.9 and maybe later. The first release of PLA is going to provide three basic matrix types: A 2D matrix of floats, a 2D matrix of complex numbers, and a 2D matrix of PMCs. These three matrix types will have a large base of common functionality and each type will have some additional functionality too, as required by that type. Everything provided will be well-tested (including error cases, which I haven't exercised nearly enough so far) and some example programs will be provided in both PIR and NQP.&lt;br /&gt;&lt;br /&gt;There are a few projects I am envisioning to start in the future that will rely on PLA, so I really am hoping to create a nice, stable, functional release within the next few months. I'll post more information about any other projects as they arise.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-5412529727912985922?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 22 Jun 2010 21:00:00 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 02 June 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40410?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40410?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 02 June 2010.  Larry, Allison, Patrick, Will, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;mostly, I supported sorear in bootstrapping STD to use &lt;code&gt;viv&lt;/code&gt; instead of &lt;code&gt;gimme5&lt;/code&gt; &lt;/li&gt;&lt;li&gt;his stage 2 and stage 3 now output identical Perl 5 versions of STD&lt;/li&gt;&lt;li&gt;produces a huge amount of warnings&lt;/li&gt;&lt;li&gt;appears to require Perl 5.12 at the moment&lt;/li&gt;&lt;li&gt;working on both of those&lt;/li&gt;&lt;li&gt;S03 refines hyper dwimminess to be more like APL, with modular semantics&lt;/li&gt;&lt;li&gt;S02 refines &lt;code&gt;Blob&lt;/code&gt;s to simply be immutable &lt;code&gt;Buf&lt;/code&gt;s, with similar generic characteristics&lt;/li&gt;&lt;li&gt;S02 now describes native &lt;code&gt;blob&lt;/code&gt; types&lt;/li&gt;&lt;li&gt;implemented post-declaration checks for &lt;code&gt;BEGIN&lt;/code&gt; and &lt;code&gt;use&lt;/code&gt;, since those can't wait for end of file&lt;/li&gt;&lt;li&gt;STD no longer loses existing bindings when we go to a sublanguage&lt;/li&gt;&lt;li&gt;STD now uses &lt;code&gt;$*GOAL&lt;/code&gt; variable only as informative, never as a &quot;stopper&quot;&lt;/li&gt;&lt;li&gt;instead, we create a &lt;code&gt;&amp;lt;stopper&amp;gt;&lt;/code&gt; rule for &lt;code&gt;$*GOAL&lt;/code&gt; if necessary&lt;/li&gt;&lt;li&gt;can check for that only, instead of that or &lt;code&gt;$*GOAL&lt;/code&gt; &lt;/li&gt;&lt;li&gt;answering lots of questions on how STD and &lt;code&gt;viv&lt;/code&gt; work besides that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;did a lot of research on graph color algorithms for register usage algorithms&lt;/li&gt;&lt;li&gt;will finish my finals on Monday&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;trying to herd the discussion of dynop libraries&lt;/li&gt;&lt;li&gt;a recent branch to close an old ticket broke a lot of assumptions&lt;/li&gt;&lt;li&gt;some bugs have become more visible because of these changes&lt;/li&gt;&lt;li&gt;hope to get that cleaned up this week&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I liked your suggestion of bringing back the &lt;code&gt;getstderr&lt;/code&gt; and related opcodes&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;trying to resurrect Partcl&lt;/li&gt;&lt;li&gt;stuck on a TT #389 closing issue&lt;/li&gt;&lt;li&gt;not sure how to fix that, the way things are now&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;working on the iterator and list design&lt;/li&gt;&lt;li&gt;brainstorming the implementation&lt;/li&gt;&lt;li&gt;will implement somethine one way or another this week&lt;/li&gt;&lt;li&gt;people keep implementing workarounds for the current system&lt;/li&gt;&lt;li&gt;they'll bite us eventually&lt;/li&gt;&lt;li&gt;Moritz and I worked on making the regex engine returning real Perl 6 objects&lt;/li&gt;&lt;li&gt;that mostly works&lt;/li&gt;&lt;li&gt;exposes some places where lists don't work exactly right&lt;/li&gt;&lt;li&gt;the workarounds there made me replan the list and iterator implementation&lt;/li&gt;&lt;li&gt;answered some questions online&lt;/li&gt;&lt;li&gt;Jonathan added a better backtrace algorithm for Rakudo&lt;/li&gt;&lt;li&gt;reports Perl 6 source lines instead of PIR lines&lt;/li&gt;&lt;li&gt;I'll review his code&lt;/li&gt;&lt;li&gt;think I can borrow it for NQP for all HLLs&lt;/li&gt;&lt;li&gt;Jonathan reports that it was a lot easier in NQP than PIR&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;trying to answer a few Parrot design questions&lt;/li&gt;&lt;li&gt;looking at the continuation of design from Perl 1 - 4 to Perl 5 and Perl 6&lt;/li&gt;&lt;li&gt;hope to have coding time soon&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Tue, 22 Jun 2010 01:12:29 +0000</pubDate>
</item>
<item>
	<title>Khairul: Week 4 Synopsis</title>
	<guid>http://parrot.mangkok.com/?p=110</guid>
	<link>http://parrot.mangkok.com/?p=110</link>
	<description>&lt;p&gt;Progress this week was not bad. To recap, here’s what I got done this week:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Handle exit/unhandled exceptions.&lt;/strong&gt;&lt;/span&gt;Whenever the exit opcode is found, Parrot will throw a CONTROL_EXIT exception which will propogate up the exception handler stack to the first exception handler which can handle it. In most cases, this will be the C exception handler created before entering the runloop in the function runops (see src/call/ops.c), and trigger the interpreter cleanup routines. Exiting in this manner will not allow the instruments to be finalized. So by inserting another C exception handler after this point, such exceptions can be caught and the runloop can exit normally, allowing the instruments to be finalized. As a plus point, since C handlers act as a catchall for exceptions, any unhandled exceptions will also be caught, again, allowing the instruments to be finalized.To this end, I also modified the Parrot_runloop struct (see include/parrot/call.h) and the appropriate routines to have a reference to the thrown exception, allowing the C exception handler to know what was thrown.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Cleanup the hook tables on destroy&lt;/strong&gt;&lt;/span&gt;This was listed as todo in the source, so I did it by first creating a new function to delete a list and then calling that function for each hook list.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Update the op callback interface.&lt;/strong&gt;&lt;/span&gt;Previously, on calling the callback, 3 parameters were passed. The parameters were, the current relative PC (Program Counter), a ResizablePMCArray containing the op number and its arguments, and the Instrument object itself. This wasn’t very convenient, as to get the information about the op, one has to get the OpLib instance and then obtain the OpCode instance for the op in question.So I reworked it instead, creating an InstrumentOp dynpmc which conveniently allows looking up most of the information required from it, along with the file, line and namespace the op is in (accuracy of this is subject to the core’s ability to obtain the info). Getting the file, line and namespace wasn’t particularly hard. With the initial guidance from cotto, I managed to trace it all the way to Parrot_Context_get_info (see src/sub.c), which conveniently is already marked PARROT_EXPORT and provides the information I wanted in the form of the Parrot_Context_info struct.
&lt;p&gt;Additionally, in the process of fleshing out the InstrumentOp dynpmc, I also removed a todo item with regards to the special ops which have variable arguments (set_args_pc, get_results_pc, get_params_pc, set_returns_pc), which up until then, were simply ignored.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Hooks on dynops.&lt;/strong&gt;&lt;/span&gt;This was listed as todo in runtime/parrot/library/Instrument/Probe.nqp previously. In the process of designing tests for the class Instrument::Probe, I got sidetracked into revisiting this todo. Now, upon detection of any dynop libraries, all probes that have pending op hooks are disabled and reenabled, and in the process attaching hooks to the relevant dynop if found. The tests for Probe.nqp and EventLibrary.nqp are still pending, as I’m looking at whether I can improve on the Instrument::Probe and Instrument::Event interface more, namely adding methods to get the current state of the objects.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With reference to the previous post, I did not manage to complete the following two tasks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adding tests for Probe.nqp and EventLibrary.nqp&lt;/li&gt;
&lt;li&gt;New events (sub call, class events, exception events)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I hope to be able to complete these two tasks by Thursday (June 24th).&lt;/p&gt;
&lt;p&gt;For this week, I would like to complete the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Add events for GC.&lt;/strong&gt;&lt;/span&gt;This is mostly replacing the entries of interp-&amp;gt;gc_sys with appropriate stub methods that will raise an event. Hopefully it shouldn’t take that long (Prays for no crashes, since raising the event will invoke the GC itself, methinks).&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: line-through;&quot;&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Dynamically remap dynops (Internally, nothing to do with the dynop_mapping branch).&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-decoration: line-through;&quot;&gt;To date, I have not been able to successfully run tracer.nqp on perl6.pbc, at least as far as getting to the REPL prompt. This is mostly due to dynops (I think), since dynops used the perl6.pbc are dependent on the order that the dynop libraries are loaded during the compilation of that PBC. I have somewhat of an idea on how to approach this, but have not probed enough to know more details of it (namely in what order were the dynop libraries loaded, and how to remap the dynops to the op table). Hopefully it will be successful.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Prepare to instrument the PMC Vtables.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
After discussing with cotto, it would be better if I do this first while waiting for the dynop_mapping branch to merge.&lt;/li&gt;
&lt;/ol&gt;</description>
	<pubDate>Mon, 21 Jun 2010 16:27:17 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 26 May 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40408?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40408?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 26 May 2010.  Larry, Allison,
Patrick, Will, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt; &lt;code&gt;:()&lt;/code&gt; syntax is now always signature&lt;/li&gt;&lt;li&gt;we now use &lt;code&gt;foofix:[...]&lt;/code&gt; as the general op form instead of &lt;code&gt;foofix:(...)&lt;/code&gt; &lt;/li&gt;&lt;li&gt;refactored the sematics of &lt;code&gt;:nth&lt;/code&gt; and &lt;code&gt;:x&lt;/code&gt; &lt;/li&gt;&lt;li&gt; &lt;code&gt;:nth()&lt;/code&gt; now only ever takes a monotonically increasing list&lt;/li&gt;&lt;li&gt;S03 now explains how &quot;not-raising&quot; works on &lt;code&gt;!=&lt;/code&gt; and &lt;code&gt;ne&lt;/code&gt; &lt;/li&gt;&lt;li&gt;it now basically matches the intuitions of an English speaker via HOP definition of negate metaop&lt;/li&gt;&lt;li&gt;STD sometimes didn't require semi between statements&lt;/li&gt;&lt;li&gt;statement modifiers are expression terminators but not valid statement terminators&lt;/li&gt;&lt;li&gt;an unexpected statement modifier word like &lt;code&gt;if&lt;/code&gt; could terminate one statement and start another&lt;/li&gt;&lt;li&gt;fixed up backslashes in character classes to allow &lt;code&gt;\s&lt;/code&gt; etc and reject &lt;code&gt;\u&lt;/code&gt; etc&lt;/li&gt;&lt;li&gt;STD was accidentally using the same lexpad for different multis&lt;/li&gt;&lt;li&gt;Cursor now treats &lt;code&gt;:()&lt;/code&gt; on name extension as a signature always, never as a categorical&lt;/li&gt;&lt;li&gt;we shouldn't introduce the stopper for circumfix until we're in the circumfix, or we can't use the same char on both ends&lt;/li&gt;&lt;li&gt;placeholder messages error messages are now much more informative and correct&lt;/li&gt;&lt;li&gt;we now disallow use of placeholder after same variable has been used as a non-placeholder, even for an outer reference&lt;/li&gt;&lt;li&gt;renamed add_macro (which it doesn't) to add_categorical (which it does)&lt;/li&gt;&lt;li&gt;participating frequently in discussions on semantics both on irc and p6l&lt;/li&gt;&lt;li&gt;working closely with sorear++ as he brings viv closer to bootstrapping, yay!&lt;/li&gt;&lt;li&gt;soon can bootstrap past gimme5&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;worked on Pynie this week in my limited spare time&lt;/li&gt;&lt;li&gt;one goal is to generate the parser directly from the Python grammar&lt;/li&gt;&lt;li&gt;wrote a small, lightweight PEG parser which generates a match tree from the Python 3 grammar&lt;/li&gt;&lt;li&gt;can generate a lexer directly&lt;/li&gt;&lt;li&gt;right now it creates a parse tree&lt;/li&gt;&lt;li&gt;looks similar to the match nodes of NQP-rx&lt;/li&gt;&lt;li&gt;dumps out a tree to the PIR parser&lt;/li&gt;&lt;li&gt;working on PaFo elections for next year, but trying to delegate those&lt;/li&gt;&lt;li&gt;will have more time after June 7&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;working on Perl 6 advent tests&lt;/li&gt;&lt;li&gt;many more people are doing more work than me&lt;/li&gt;&lt;li&gt;liasing with Rakudo folks for any important Parrot bugs before the Rakudo Star release&lt;/li&gt;&lt;li&gt;my current direction there is &quot;don't break anything&quot;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;sorear added hash flattening to NQP&lt;/li&gt;&lt;li&gt;lots of work on closures in PAST and NQP&lt;/li&gt;&lt;li&gt;they properly clone&lt;/li&gt;&lt;li&gt;fixes some lexical problems&lt;/li&gt;&lt;li&gt;need to get that to work in Rakudo&lt;/li&gt;&lt;li&gt;that's tougher; Rakudo has to wrap Parrot subs&lt;/li&gt;&lt;li&gt;wrapper object needs cloning as well, along with its attributes&lt;/li&gt;&lt;li&gt;we'll add a new PAST node type to help&lt;/li&gt;&lt;li&gt;that node understands contexts&lt;/li&gt;&lt;li&gt;essentially a way to add void context optimizations to your AST&lt;/li&gt;&lt;li&gt;that solves many problems in Rakudo beyond closures&lt;/li&gt;&lt;li&gt;added a setting into NQP along with its test suite&lt;/li&gt;&lt;li&gt;not automatically loaded, but available&lt;/li&gt;&lt;li&gt;contains standard hash and array methods&lt;/li&gt;&lt;li&gt;Parrot's ops2c project uses those&lt;/li&gt;&lt;li&gt;other people can update and enhance that setting as necessary&lt;/li&gt;&lt;li&gt;NQP also has the ability to parse type names&lt;/li&gt;&lt;li&gt;NQP doesn't do anything with them yet&lt;/li&gt;&lt;li&gt;eventually they'll allow the use of multis&lt;/li&gt;&lt;li&gt;cleaning up some NQP bugs regarding lexicals and package storage of subs&lt;/li&gt;&lt;li&gt;Bruce Keeler enabled variable interpolations in regexes&lt;/li&gt;&lt;li&gt;working on some refactorings to simplify that approach&lt;/li&gt;&lt;li&gt;works in NQP and Rakudo now&lt;/li&gt;&lt;li&gt;that's a feature we've never had before&lt;/li&gt;&lt;li&gt;Rakudo's REPL now works better, thanks to sorear&lt;/li&gt;&lt;li&gt;HLLCompiler now written more in NQP as part of that&lt;/li&gt;&lt;li&gt;NQP now can do &lt;code&gt;eval&lt;/code&gt; &lt;/li&gt;&lt;li&gt;NQP remembers lexicals in interactive mode now&lt;/li&gt;&lt;li&gt;adding that to Rakudo is more complex&lt;/li&gt;&lt;li&gt;working on that&lt;/li&gt;&lt;li&gt;pleased with the progress on #perl6&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;reviewing long term plans for GC and Lorito&lt;/li&gt;&lt;li&gt;should have more time free soon&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Sun, 20 Jun 2010 19:40:02 +0000</pubDate>
</item>
<item>
	<title>Patrick Michaud: Rakudo Star (a &quot;usable Perl 6&quot;) to be released by July 29</title>
	<guid>http://use.perl.org/~pmichaud/journal/40407?from=rss</guid>
	<link>http://use.perl.org/~pmichaud/journal/40407?from=rss</link>
	<description>&lt;p&gt;As many of you know, last summer we announced that we would be releasing
a &quot;&lt;a href=&quot;http://use.perl.org/~pmichaud/journal/39411&quot;&gt;usable release of Rakudo Perl 6&lt;/a&gt;&quot; to be called &quot;Rakudo Star&quot; in the
second quarter of 2010.  We later refined our target release date to
be April 2010.&lt;/p&gt;&lt;p&gt;Until March of this year we were well on track to meet the April
2010 release date, but then I had an
&lt;a href=&quot;http://use.perl.org/~pmichaud/journal/40248&quot;&gt;family
medical emergency&lt;/a&gt;
that took me away from Perl 6 development.  As a result of my situation,
the Rakudo and Perl 6 team met online in early March and decided that
an April release date would be unrealistic, and we instead
focused our efforts on trying to make a June release for Rakudo
Star, to keep with our original &quot;second quarter 2010&quot; goal.&lt;/p&gt;&lt;p&gt;Ultimately it ended up being twelve weeks before I was able to return
to active Perl 6 development (i.e., late May).  During my absence the
others on the Rakudo and Perl 6 team made incredible progress on
Rakudo Perl 6; I think their progress shows that a truly capable (and
growing) team of developers has coalesced around Rakudo Perl.  Thanks
to their efforts, as of late May the compiler had nearly everything
we identified as critical for Rakudo Star in the ROADMAP, with only a
few key features blocking on my personal participation.  We therefore
felt we still had a good likelihood of meeting the June 2010 target,
and continued to work with that goal in mind.&lt;/p&gt;&lt;p&gt;As part of planning this week's Parrot and Rakudo releases,
we all met online to solidify our plans for the Rakudo Star release.
After much discussion, we decided that although we could likely make some
sort of Rakudo Star release in June, there was too much risk that
releasing in June would fall well short of our vision of what
we want Rakudo Star to be.&lt;/p&gt;&lt;p&gt;Therefore, we've decided to to let the release date slip one more
month and release Rakudo Star not later than July 29, 2010.
We are firmly committed to the July 29 date; whatever we have
available then, that's what we release.  I know that another delay
will be frustrating to many (it is very frustrating to me),
and that some will undoubtedly cite this delay as yet more &quot;evidence&quot;
that there will never be a release of Perl 6.  But given the
circumstances, I think we feel that we promote Perl 6 better by
moving the release date by a month than we would by releasing
something less than our vision.

&lt;/p&gt;&lt;p&gt;For those who might claim that we should &quot;release early&quot;, we
&lt;i&gt;are&lt;/i&gt; still continuing to make regular monthly compiler releases.
The most recent release
(&lt;a href=&quot;http://rakudo.org/node/72&quot;&gt;#30, &quot;Kiev&quot;&lt;/a&gt;)
comes with a lot of improvements
over previous releases, and I truly expect the next release
(#31, &quot;Atlanta&quot;) to continue the trend.  As always, we continue to
invite people to try out the compiler releases and to visit the
&lt;a href=&quot;http://perl6.org/&quot;&gt;Perl 6 website&lt;/a&gt; to see what
Perl 6 is already doing today.&lt;/p&gt;&lt;p&gt;Finally, on a personal note, my wife and I sincerely appreciate
the ongoing support, prayers, and understanding we have received from
the Perl community (and especially the Rakudo and Perl 6 teams) during
these difficult times.  While my wife is still not &quot;out of the woods&quot; yet,
things are far better now than they were in the Spring, and we
continue to work towards and pray for her full recovery.&lt;/p&gt;&lt;p&gt;More details about the Rakudo Star release will be forthcoming
over the next couple of weeks.&lt;/p&gt;&lt;p&gt;Pm&lt;/p&gt;</description>
	<pubDate>Sat, 19 Jun 2010 17:04:21 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: Parrot's Deprecation Policy</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-7302838359471348057</guid>
	<link>http://wknight8111.blogspot.com/2010/06/parrots-deprecation-policy.html</link>
	<description>Parrot user kthakore sent a &lt;a href=&quot;http://lists.parrot.org/pipermail/parrot-dev/2010-June/004423.html&quot;&gt;very interesting email&lt;/a&gt; to the Parrot developers list this week to criticize the current deprecation policy. After taking some time off from development, he returned to find that his extension no longer built on Parrot HEAD and he couldn't quite figure out why. There &lt;a href=&quot;http://trac.parrot.org/parrot/changeset/47190/trunk/DEPRECATED.pod&quot;&gt;was a deprecation notice for the feature that changed&lt;/a&gt;, but the notice was so vaguely worded and so short on explanation that it offered very little help to the beleaguered extension developer.&lt;br /&gt;&lt;br /&gt;When we're talking about code, there are only a handful of things that we really need to worry about: utility, performance, security, stability and maintainability. Well-written code, for the most part, can satisfy all these requirements. Sometimes trade-offs are made, such as trading a certain amount of maintainability to optimize for performance, but in those cases some well-placed comments can help alleviate or minimize any regressions. Code, while technical and deep, is often pretty easy: we follow rules and policies, make changes, measure results, wash, rinse, repeat.&lt;br /&gt;&lt;br /&gt;Not so easy are the softer sides of open source software: the people. People come in varieties: core developers, extension developers, testers, documenters, end-users and well-wishers of varying levels of technical competency. Keeping all these groups of people working together nicely and happily can be quite a difficult challenge, and there is likely no way for all groups to be 100% happy 100% of the time. The tradeoffs here are harder to understand, harder to manage, and a misstep can have huge negative consequences for the project.&lt;br /&gt;&lt;br /&gt;I've long been a detractor of Parrot's &lt;a href=&quot;http://trac.parrot.org/parrot/browser/trunk/docs/project/support_policy.pod&quot;&gt;current deprecation policy&lt;/a&gt;: It's too rigid, too narrow, and doesn't really do anything to help the people who need helping. It also doesn't really take into account Parrot's current stage in the development life cycle. Parrot, as I've mentioned on occasion, has &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/bright-blue-yonder.html&quot;&gt;plenty of warts&lt;/a&gt; and has suffered many &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/fitness-of-parrot-as-target-platform.html&quot;&gt;growing pains&lt;/a&gt;. It is folly to think that we should be making blanket guarantees about what &lt;a href=&quot;http://wknight8111.blogspot.com/2010/01/parrot-20-personal-retrospective.html&quot;&gt;will or will not be present in various releases&lt;/a&gt;, or how quickly we can or cannot make changes.&lt;br /&gt;&lt;br /&gt;When there's a problem or a bug or a misfeature, people want those things fixed quickly. A good example of this were the &lt;a href=&quot;http://wknight8111.blogspot.com/2009/10/pcc-branch-lands.html&quot;&gt;PCC refactors a few months ago&lt;/a&gt;. Even though those refactors created some backwards-incompatible behavior our users (who the deprecation policy was at least nominally designed to protect) were trying to &lt;a href=&quot;http://wknight8111.blogspot.com/2009/10/pcc-hackathon-day.html&quot;&gt;rush them through&lt;/a&gt;. Rakudo developers specifically were blocking on the PCC improvements and having to wait for months and months would have been bad for them. The PCC refactors were high priority and high need.&lt;br /&gt;&lt;br /&gt;The deprecation of several core ops and their conversion to dynops recently is an example from the other end of the spectrum (and the source of kthatkore's frustration). While we followed the letter of the deprecation policy, these things didn't &lt;i&gt;need&lt;/i&gt; to be removed with haste and created a bit of hassle for users who weren't expecting it. I'm not saying they shouldn't have been removed (I'm always &lt;a href=&quot;http://wknight8111.blogspot.com/2010/03/lean-and-mean-parrot.html&quot;&gt;a proponent of removing cruft&lt;/a&gt;), but it does expose some short-comings of our deprecation policy and process.&lt;br /&gt;&lt;br /&gt;What we have is a series of conflicting motivations, even for individual groups. Consider:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Core Developers&lt;/b&gt;: Core developers want to remove bad features, want not to maintain bad features, want to add new good features and want to create the best software for the users. Developers need to work on fun new features, but also need their work to be used and appreciated. Take away either of those pieces, and many volunteer developers will simply walk away. Moving too quickly alienates the users and creates a huge disconnect between what the developers are developing and what the users are actually using. Moving too slowly is boring and developers start to leave for greener pastures.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Extension Developers&lt;/b&gt;: Want to add new extensions to the Parrot ecosystem for the benefit of users, but have to deal with binary compatibility at the C level which changes much more frequently than the &quot;normal&quot; user-visible interfaces like PIR. Parrot has a lousy extension API right now, so necessary improvements there require extension developers to stay up-to-date with current core development. At the same time, all sorts of other changes break things in new versions, even when necessary features are fixed. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Users&lt;/b&gt;: For stability, it's good for users not to upgrade. To fix bugs and get new features, it's good t upgrade. Upgrading brings rewards but also hassles:  Core features disappear, new bugs are added, and extensions are broken by binary incompatibilities. Upgrading Parrot means needing to upgrade (or, at least, rebuild) extensions too.&lt;/li&gt;&lt;/ul&gt;It's difficult to tell an extension developer to stick to the supported releases because the extending API is so lousy and incomplete. Having to wait 3 months or more for a necessary change is hard for these small projects, and their developers can quickly lose interest and motivation. Until we reach some basic level of usability, we have to expect that extension developers are going to be tracking Parrot HEAD more or less closely. I think it's a little disingenuous to simultaneously expect fully that developers will be tracking the repository HEAD but also write in our deprecation policy that they should only track the stable releases, and you really need to ask who exactly that policy is designed to protect in this case.&lt;br /&gt;&lt;br /&gt;We really need to account for different levels of user and different levels of feature. End-users shouldn't be using Parrot directly. Joe Schmoe at home is not and definitely &lt;a href=&quot;http://wknight8111.blogspot.com/2010/01/problem-with-pir.html&quot;&gt;should not be writing his tools in PIR&lt;/a&gt;. If he's writing his code in a higher-level language like Rakudo Perl 6, NQP, or Winxed, he's buffered from disruptive changes made to the Parrot core VM. It's the developers of HLL compilers and extensions that need to worry about these kinds of changes.&lt;br /&gt;&lt;br /&gt;Likewise, we need to differentiate between issues of multiple severities.When a big issue is blocking development in extensions and HLL compilers, it behooves Parrot to ignore the mandatory wait period and to make those fixes post haste. Alternatively, a change which is not necessary and would cause a block or a slow-down for extension developers should be put off for longer and made with more care.&lt;br /&gt;&lt;br /&gt;What we need, in a nutshell, is a policy that actually does what we claim the current deprecation policy does now: &lt;b&gt;Protect our users from disruptive changes&lt;/b&gt;, but also &lt;b&gt;enable forward progress to be made without being forever tied to every bad decision ever made&lt;/b&gt;. I suggest these changes to policy and process:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Deprecation should be added before a disruptive change is made &lt;/li&gt;&lt;li&gt;The deadline for the deprecation shouldn't be blindly tied to the next stable release, but &lt;b&gt;intelligently selected with input from the affected parties&lt;/b&gt;. We do have weekly planning meetings where these kinds of things can be decided. If we need to regularly schedule additional meetings with other parties (HLL compiler devs, extension devs, etc) we should do that as well.&lt;/li&gt;&lt;li&gt;Deprecations should be well-documented and publicized. Information about the deprecation should include what exactly is changing, how users of those features can work around the changes, and who to contact when/if problems arise.&lt;/li&gt;&lt;li&gt;Information about the deprecation should be sent to the users, not just dumped in DEPRECATED.pod where we expect people to be looking regularly. An email list for this purpose was suggested and I like that idea (other ideas were also suggested that I also like). Any way to send the information directly to the user is a good thing. &lt;/li&gt;&lt;li&gt;Where possible, both old and new versions should &lt;a href=&quot;http://lists.parrot.org/pipermail/parrot-dev/2010-June/004430.html&quot;&gt;be provided simultaneously&lt;/a&gt; for a period of time while users transition. This is most important in the C-level API where function wrappers can easily be provided to translate old calls into new ones.&lt;/li&gt;&lt;/ol&gt;I'm still a big proponent of the idea that the deprecation policy should be opt-in, in the sense that only features that we've put a stamp of approval onto should be covered under the deprecation policy and anything else should not be relied upon. You &lt;i&gt;can&lt;/i&gt; use a feature that we haven't approved, but then you're responsible for paying the price when that feature changes or disappears completely. You would also be responsible for sending the core developers feedback about which features you would like to see be added and approved.&lt;br /&gt;&lt;br /&gt;Having a deprecation policy is a good thing and a necessary part of a mature software project. However, the policy we have currently fails on a number of counts and requires some serious re-thinking if we want to make it better. I sincerely hope, and I know several other people also hope, that we do make it much better in the future.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-7302838359471348057?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sat, 19 Jun 2010 13:24:00 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: ParrotTheory: Locks and Synchonization</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-8448603728564444292</guid>
	<link>http://wknight8111.blogspot.com/2010/06/parrottheory-locks-and-synchonization.html</link>
	<description>I've talked a good amount in the past and recently about threading, so today I'm going to talk about some of the small bits that make threading and concurrency work. I'm thinking that we're also going to need to implement some of these primitives in Parrot eventually, so consider this blog post an extremely verbose way of planning for that.&lt;br /&gt;&lt;br /&gt;Let's start the discussion by looking at two small code snippets; a structure definition and a routine that uses that structure:&lt;br /&gt;&lt;pre&gt;typedef struct _array {&lt;br /&gt;  int length;&lt;br /&gt;  int *values;&lt;br /&gt;} array;&lt;br /&gt;&lt;br /&gt;void push( array *ary, int x) { &lt;br /&gt;  array-&amp;gt;length++; &lt;br /&gt;  realloc(array-&amp;gt;values, newlen * sizeof(int));&lt;br /&gt;  array-&amp;gt;values[array-&amp;gt;length - 1] = x;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;This isn't nearly as contrived an example as it may seem initially, though I purposefully made the code a little bit naive. It's worth noting here that the idea of a structure which contains both an array and the integer length of that array is very common. It's how Parrot implements it's STRING type and several of its array PMC types as well. In fact, the push_int VTABLE method for the ResizableIntegerArray PMC probably looks extremely similar to this example code.&lt;br /&gt;&lt;br /&gt;Astute observers, and veterans of threading trench warfare will see a problem with this code: There are no locks and no concurrency safeguards, so this code isn't thread safe. Let's take a short walkthrough of this code where we have a preemptive thread switch in the middle to another thread also attempting to access this same method on the same object:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;We have an array object with length 5 and items {1, 2, 3, 4, 5}&lt;/li&gt;&lt;li&gt;Thread A attempts to push the number 6 to the array, Thread B attempts to push the number 7.&lt;/li&gt;&lt;li&gt;Thread A enters the function. We set length to 6 and realloc to gain a sixth slot. The array now contains values {1, 2, 3, 4, 5, ?}, because the last value isn't initialized by realloc.&lt;/li&gt;&lt;li&gt;At this point, there is a preemptive thread switch and Thread B takes over control.&lt;/li&gt;&lt;li&gt;Thread B enters the function and sets length to 7 and reallocs again. The array now contains values {1, 2, 3, 4, 5, ?, ?}.&lt;/li&gt;&lt;li&gt;Thread B sets the sixth element to 7. The array is now {1, 2, 3, 4, 5, ?, 7}&lt;/li&gt;&lt;li&gt;Thread B gets preempted, Thread A takes over.&lt;/li&gt;&lt;li&gt;In thread A, the value of length is still 7, so [ary-&amp;gt;length - 1] is still 6. When we add x to the array, we now have {1, 2, 3, 4, 5, ?, 6}&lt;/li&gt;&lt;/ol&gt; There are some things we could try here, such as saving the values we need from the structure to local variables, so that even if we preempt in the middle of the functions the length field will be an accurate index. Or, we can try to rearrange the order of operations so some errors appear less frequently or less obviously.  The real problem here is that we have three operations that need to stay coupled: Increasing the known length of the array, reallocating array storage, and assigning an item to that storage. Any break between a set of coupled operations causes a problem. We call these areas of code where operations are sensitive to cross-thread interference &lt;b&gt;critical sections&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;As another example of a very small critical section, consider this one line of code:&lt;br /&gt;&lt;pre&gt;foo = i++;&lt;br /&gt;&lt;/pre&gt;This seems pretty simple, but in fact it is not. This line of code requires several assembly language instructions, especially when we are talking about a non-optimized build:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Fetch the value of i from memory into a processor register&lt;/li&gt;&lt;li&gt;Copy the value of i to the variable foo&lt;/li&gt;&lt;li&gt;Increment the register containing the value for i&lt;/li&gt;&lt;li&gt;Copy the value of the register back to memory where i is located.&lt;/li&gt;&lt;/ol&gt;A preemptive thread switch can happen in between any of these steps. Consider the case where we break between steps 2 and 3 to another thread performing the same operation: If i is 5, Thread 1 foo is 5, Thread 2 Foo is 5, and at the end of the code snippet i is 7! If this code snippet is, for instance, in an SQL database generating unique integer keys for rows in a particular table, we've just generated non-unique keys and created a world of hurt for ourselves.&lt;br /&gt;&lt;br /&gt;To get around these kinds of problems, one solution is to use a &lt;b&gt;synchronization primitive&lt;i&gt;. &lt;/i&gt;&lt;/b&gt;A synchronization primitive is any of a class of algorithms and objects that are designed to synchronize and limit access to shared resources. In this sense, a &lt;b&gt;resource&lt;/b&gt; is anything that multiple threads might want to access: An IO stream, a global variable, a shared pointer, even a sensitive sequence of instructions,  etc. Any time we have a critical section of code that is sensitive to sharing we want to find a way to limit access to a finite number of simultaneous threads (usually one). There are several ways to do this.&lt;br /&gt;&lt;br /&gt;A &lt;b&gt;mutex&lt;/b&gt;, short for &quot;mutual exclusion&quot;, object is a type of &lt;b&gt;lock&lt;/b&gt; that helps to prevent access to a critical section. To pick a pertinent example, think of a mutex like a basketball. Only the one person in the game with the basketball can do things: shoot, pass and dribble. Other players on the team can do other stuff like running, covering, or posting, but they cannot do ball stuff without the ball. You cannot shoot the ball if you do not have the ball, you cannot pass the ball if you do not have the ball. This is a convention of the sport. If we were playing Calvinball instead, maybe we could do these things without looking preposterous. By convention also, if we as programmers declare that a certain shared resource can only be accessed by a thread (player) with the mutex (ball), the those are the rules for our system (game) and things can move along smoothly. Here's an example of that convention in action:&lt;br /&gt;&lt;pre&gt;Mutex *m;&lt;br /&gt;AQUIRE_MUTEX(m);&lt;br /&gt;// critical section code&lt;br /&gt;RELEASE_MUTEX(m);&lt;br /&gt;&lt;/pre&gt;The power in this code is that the AQUIRE_MUTEX() function will attempt to gain ownership of the mutex, and will wait indefinitely for the mutex to become available if some other thread already owns it. ACQUIRE_MUTEX is like waving your arms in the air, shouting &quot;I'm open&quot; until the current ball carrier passes the ball to you. Until you get the ball, you just have to stand with your arms in the air until you get it. Because of that behavior, no two threads can enter the same critical section, assuming of course that the programmer (you) has properly protected that critical section with the mutex. Keep in mind that there is no intrinsic property of the critical section itself that prevents multiple threads from running it simultaneously and corrupting data. The exclusion comes from the proper and pervasive use of locks like our mutex to keep the critical section safe. Here's another example:&lt;br /&gt;&lt;pre&gt;Mutex m;&lt;br /&gt;&lt;br /&gt;int pop(array* a) {&lt;br /&gt;  ACQUIRE_MUTEX(m);&lt;br /&gt;  int item = a-&amp;gt;values[a-&amp;gt;length - 1];&lt;br /&gt;  a-&amp;gt;length--;&lt;br /&gt;  RELEASE_MUTEX(m);&lt;br /&gt;  return item;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void push(array* a, int item) {&lt;br /&gt;  a-&amp;gt;values[a-length] = item; &lt;br /&gt;  a-&amp;gt;length++;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;In this example we can see that we aren't properly using the mutex everywhere, so we can't guarantee that we won't get corrupt data. Multiple threads could just as easily enter the push function simultaneously as could attempt to enter the pop function. If you don't use mutexes everywhere, it's almost as good as not using them anywhere. This is a convention that the coder must decide upon beforehand and follow diligently.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are multiple ways to implement locks and mutexes. One idea is a &lt;b&gt;spinlock&lt;/b&gt;, which attempts to access a flag and enters an endless while-loop until it can. An empty while-loop can be very inefficient on a processor, but if we call a sleep command inside the loop to allow other threads to run while we wait it isn't such a big problem. Spinlocks implemented by the OS inside the kernel event loop can be very efficient indeed. In fact, as a general rule, if the OS implements locking primitives they tend to be much better to use than anything you can write in userspace.&lt;br /&gt;&lt;br /&gt;Another type of lock primitive is a &lt;b&gt;semaphore&lt;/b&gt;, though it is subtly different. A semaphore allows a finite number of threads to access a finite number of shared resources at a time. Where a normal mutex, like a spinlock, allows only one thread to enter at a time the semaphore may allow one or more. Consider a case where we have five worker threads in a web server, and 100 incoming connections. A semaphore uses a first-come-first-served method to assign incoming connections to available threads. Each incoming connection attempts to access the semaphore. As requests are completed, threads signal their availability and the semaphore assigns the next connection in the list to that thread. A semaphore with only one shared object acts like a normal mutex or spinlock.&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;overhead&lt;/b&gt; of a lock is the amount of effort it takes to acquire and manage the lock. In a uniprocessor system the lock may be very simple to obtain: First disable interrupts so we cannot be preempted by another thread, check the status of the lock, obtain the lock if it's available, and re-enable interrupts. In a multiprocessor system, especially one with shared memory, the overhead and error-checking involved can be much higher. In these systems the performance gain from using threads can be much higher too, so it's a trade-off.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Granularity&lt;/b&gt; is the amount of stuff in your critical section protected by a lock. &lt;b&gt;Course Granularity&lt;/b&gt; means that we have lots of code inside our critical section. This is good because we need fewer locks and therefore experience lower overhead. Plus, it's easier as a programmer to make sure we acquire fewer locks over large swaths of our program. The downside is that the larger our protected critical section is, the more likely other threads are going to be blocked waiting to enter it. This, in turn, can create problems like high &lt;b&gt;latency.&lt;/b&gt; &lt;b&gt;Fine Granularity&lt;/b&gt; is the opposite, where we lock as little code as possible. The upside is that we don't have to worry about multiple threads blocking for long on small bits of code. The downside is that acquiring more locks means more lock overhead, and more programmer effort to implement all the locks consistently and safely. Fine granularity can also lead to &lt;b&gt;deadlock&lt;/b&gt;, where multiple threads are stuck waiting for locks that other threads own.&lt;br /&gt;&lt;br /&gt;The Python interpreter, as an example, implements a single &lt;b&gt;Global Interpreter Lock&lt;/b&gt;, which is a lock to govern the entire Python interpreter. Only one operating system thread can be running the interpreter at once, to prevent corruption of global data. I think new versions of Ruby do this too.&lt;br /&gt;&lt;br /&gt;There are other methods of synchronizing access to shared resources. One method is to make all data immutable; If you can't modify data, you can't corrupt it. Since Parrot's strings are immutable, you shouldn't ever need a lock when working with them. You may still need to worry about playing with a mutable container PMC which holds strings, or the mutable registers which point to strings, however.&lt;br /&gt;&lt;br /&gt;Parrot is definitely going to want to make use of OS-supplied locks in some fashion. Maybe we want to make a PMC wrapper around system lock primitives, or we want to create some kind of lock manager that uses a single system mutex to distribute a series of immutable tokens to worker threads. The exact details of locking are certainly up for debate, but the fact that we don't want to brew our own should be obvious.&lt;br /&gt;&lt;br /&gt;Since locks need to be used consistently for them to be of use at all strongly hints at the fact that Parrot should probably do the locking internally. We probably don't want to apply locks to every single operation, since the common case programs are single-threaded applications and we don't want to apply the performance penalty of lock overhead to programs which don't need it. If Parrot can identify only those PMCs which are shared, it can apply locks selectively to those PMCs only, limiting overhead to only the places where it is necessary. For instance, if we add a synchronize op:&lt;br /&gt;&lt;pre&gt;$P0 = syncronize $P1&lt;br /&gt;&lt;/pre&gt;We can create some kind of wrapper PMC type whose vtables enter a lock, call the vtable of the synchronized PMC, and then release the lock. In this example, if everybody used $P0 when they wanted to modify $P1, all operations would be safe. The onus would be on the programmer to explicitly mark the PMC as synchronized, of course, and many programmers will probably forget to do that.&lt;br /&gt;&lt;br /&gt;Maybe instead of passing PMC references between threads directly we create and pass clones and modify them separately on different threads. Then, when we want our changes from one thread appear in another thread, we would call some kind of propagate op:&lt;br /&gt;&lt;pre&gt;propagate thread, obj&lt;br /&gt;&lt;/pre&gt;This would pause the specified thread, update the object contents, and then unpause the thread. This would be very similar to the message passing that languages like Erlang use (not exactly the same, because Erlang wouldn't pause the recipient for this, but you get the idea).&lt;br /&gt;&lt;br /&gt;Maybe we have a system where we only share read-only copies. So thread A would own the PMC, but thread B could get a read-only copy of it. This would completely obviate the need to lock the PMC since only one thread could write to it, but then we need some kind of mechanism where thread B could make modifications back if necessary, or maybe B could gain the writable copy and make A's copy read-only. This system could get very complicated very quickly, however.&lt;br /&gt;&lt;br /&gt;We could also avoid most locks if we used a transactional memory system to avoid memory corruption, but that could still add overhead to the single-threaded common case and then we would still want a system of locks for other operations that don't require locking a PMC.&lt;br /&gt;&lt;br /&gt;These are only a handful of the many potential options that Parrot has ahead of it, and I can go into greater detail about any of them that people are interested in thinking about. I think Parrot is going to want at least some kind of locking mechanism, so we could start prototyping those things immediately if we wanted. How these mechanisms get implemented and applied within Parrot is obviously the bigger issue that we can ignore for now.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-8448603728564444292?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 18 Jun 2010 13:54:28 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: A first optimization with PAST::Pattern, in detail</title>
	<guid>http://www.parrot.org/182 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/first-optimization-pastpattern-detail</link>
	<description>&lt;p&gt;In my &lt;a href=&quot;http://www.parrot.org/content/adding-optimizations-hll-compilers-pastpattern&quot;&gt; previous post&lt;/a&gt;, I described in tutorial form how to implement a very simple constant folding optimization for Integer addition. In this very brief post, I describe in greater detail how that optimization works.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/first-optimization-pastpattern-detail&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 18 Jun 2010 07:10:40 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 19 May 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40401?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40401?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 19 May 2010.  Larry, Will, and
chromatic attended.  Patrick added his notes later.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;S03 makes more explicit that doctrine that &lt;code&gt;~~&lt;/code&gt; topicalizes, and removes smartmatch table fossils that automatically fall out from that&lt;/li&gt;&lt;li&gt;S05 renames 'accent' to 'mark' for better Unicode conformance&lt;/li&gt;&lt;li&gt; &lt;code&gt;:a&lt;/code&gt; and &lt;code&gt;:aa&lt;/code&gt; changed to &lt;code&gt;:m&lt;/code&gt; and &lt;code&gt;:mm&lt;/code&gt; &lt;/li&gt;&lt;li&gt;S05 disrequires retroactive semantics on &lt;code&gt;:samecase&lt;/code&gt; and &lt;code&gt;:samemark&lt;/code&gt; &lt;/li&gt;&lt;li&gt;the method form must now explicitly add case or mark modifiers to the pattern&lt;/li&gt;&lt;li&gt;regularized &lt;code&gt;mm//&lt;/code&gt; to &lt;code&gt;ms//&lt;/code&gt; to avoid confusion with new &lt;code&gt;:m&lt;/code&gt; ignoremark option&lt;/li&gt;&lt;li&gt;STD now does a bit better at diagnosing bogus &lt;code&gt;??!!&lt;/code&gt; constructs of various sorts&lt;/li&gt;&lt;li&gt;STD now correctly adds operators to symbol tables as subs&lt;/li&gt;&lt;li&gt; &lt;code&gt;CORE.setting&lt;/code&gt; now has protos of all the operators so they can be recognized as subs too&lt;/li&gt;&lt;li&gt;Cursor now canonicalize operator names in the symbol table&lt;/li&gt;&lt;li&gt;btw, not quite like specced&lt;/li&gt;&lt;li&gt;STD now reads user's mind on '&lt;code&gt;Str $toto&lt;/code&gt;' to intuit missing declarator&lt;/li&gt;&lt;li&gt;STD now properly diagnoses a typename between routine declarator and sub name&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;working on code for Carl Masak, trying to get his poker code example running on Rakudo&lt;/li&gt;&lt;li&gt;both fun and frustrating&lt;/li&gt;&lt;li&gt;some stuff doesn't quite work yet&lt;/li&gt;&lt;li&gt;going through the Advent examples&lt;/li&gt;&lt;li&gt;adding them to spectests&lt;/li&gt;&lt;li&gt;make sure we won't regress on such public examples&lt;/li&gt;&lt;li&gt;other people are helping with that now&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;will get back to editing the Rakudo book soon&lt;/li&gt;&lt;li&gt;hope to have it in print by YAPC, but no guarantee&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;fixed closures in NQP, as a precursor for fixing them in Rakudo&lt;/li&gt;&lt;li&gt;worked with sorear on REPL in Rakudo and PCT in general&lt;/li&gt;&lt;li&gt;ported the NQP &quot;standard library&quot; done by japhb++, bacek++, and many others into the nqp-rx repository and made it part of the standard build sequence for nqp and Parrot&lt;/li&gt;&lt;li&gt;decided we need a new &quot;context sensitive&quot; node type in PAST, will be used to create proper closures and to handle sink context&lt;/li&gt;&lt;li&gt;worked with bacek on adding better multimethod support to PAST and nqp-rx&lt;/li&gt;&lt;li&gt;discovered a problem with lexical subs in NQP being automatically entered into the package namespace (and some existing code relying on this behavior)&lt;/li&gt;&lt;li&gt;did some initial fixes to at least get things entered properly, but a complete fix may require a deprecation cycle&lt;/li&gt;&lt;li&gt;plan to review others' patches this week&lt;/li&gt;&lt;li&gt;plan to fix REPL, closures, and sink context in Rakudo (since those are currently large pain points)&lt;/li&gt;&lt;li&gt;plan to work on loops and iterators after that&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Wed, 16 Jun 2010 21:38:09 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 12 May 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40400?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40400?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 12 May 2010.  Larry, Allison, Patrick, and Will attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;clarified usage of brackets around infixes&lt;/li&gt;&lt;li&gt;added various 128-bit types to the spec; we might make them arbitrarily extensible via role&lt;/li&gt;&lt;li&gt;at least LLVM could support this, even to non-powers-of-two sizes&lt;/li&gt;&lt;li&gt;modernized the paleolithic grammatical category description in S02&lt;/li&gt;&lt;li&gt;STD now uses double-quote rules for interpolating &lt;code&gt;@foo[]&lt;/code&gt; into regex&lt;/li&gt;&lt;li&gt;STD now gives better message on &lt;code&gt;1__3&lt;/code&gt; &lt;/li&gt;&lt;li&gt;added the specced 128-bit types to CORE.setting&lt;/li&gt;&lt;li&gt;added &lt;code&gt;minmax&lt;/code&gt; function to CORE.setting&lt;/li&gt;&lt;li&gt;implemented &lt;code&gt;circumfix:«X Y»&lt;/code&gt; as grammar derivation&lt;/li&gt;&lt;li&gt;currently only allows a &lt;code&gt; &amp;gt;&amp;gt; inside&lt;/code&gt;&lt;/li&gt;&lt;li&gt;now also recognizes &lt;code&gt;foofix:(&quot;\x[face]&quot;)&lt;/code&gt; and &lt;code&gt;foofix:(&quot;\c[YOUR CHARACTER HERE]&quot;)&lt;/code&gt; without actually evaluating&lt;/li&gt;&lt;li&gt;playing with factoring &lt;code&gt;yaml&lt;/code&gt; out of &lt;code&gt;gimme5&lt;/code&gt;, since &lt;code&gt;viv&lt;/code&gt; is not likely to go that route.&lt;/li&gt;&lt;li&gt;mostly just answered a lot of questions on irc&lt;/li&gt;&lt;li&gt;egged people on about concurrency issues&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;thought on handling closures properly&lt;/li&gt;&lt;li&gt;have a solution, just need some time to implement&lt;/li&gt;&lt;li&gt;discussion on changes to CodeString&lt;/li&gt;&lt;li&gt;work on compiler toolkit to avoid CodeString, using StringBuilder instead where possible, in PCT, NQP, and rakudo. Pretty easy, no downstream projects block on a deprecation issue&lt;/li&gt;&lt;li&gt;after that, lists&lt;/li&gt;&lt;li&gt;also been answering questions on interactive mode (REPL) for rakudo et al. (the issue with losing lexicals)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;resolved the git conversation pretty well (for Parrot's repo migration)&lt;/li&gt;&lt;li&gt;worked on a pure PEG parser (following the paper), straight PIR, single day; now self-parsing. Interesting project, is lightweight. currently has memoization, but that might not be right for us because of backtracking.  With some more effort, could probably handle EBNF form (useful for python)&lt;/li&gt;&lt;li&gt;could be setup for developer status for Debian which will improve our packaging status for Debian and Ubuntu&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Parrot CodeString performance improvements&lt;/li&gt;&lt;li&gt;we're definitely faster in branch, but some feedback from pmichaud should help us clean up the API a bit as well, look for those to hit trunk in the next few days&lt;/li&gt;&lt;li&gt;Parrot makefile deps cleanup&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Wed, 16 Jun 2010 01:47:02 +0000</pubDate>
</item>
<item>
	<title>parrot.org: A New Design for Timers</title>
	<guid>http://www.parrot.org/181 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/new-design-timers</link>
	<description>&lt;p&gt;The next step in green threads is to make them preemptive: after one thread has run for a while, it needs to be stopped so a waiting thread can have a turn. Parrot has a mechanism for doing things after a set time called Timers which would be perfect for this. Unfortunately, they don't really work.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/new-design-timers&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 15 Jun 2010 21:30:39 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Progress, refactorings and tests.</title>
	<guid>http://www.parrot.org/180 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/progress-refactorings-and-tests</link>
	<description>&lt;p&gt;    Since my last post I haven't spent as much time as I'd like coding, since getting a win32 development environment setup was a bigger time sink than I expected, but I've still managed to stay pretty close to the schedule. The main feature for the next week, once I'm done with the charset-level stuff will be Iterators, which will finally enable NFG 'literals' in PIR source, for which I have added, failing, tests the past week.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/progress-refactorings-and-tests&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 15 Jun 2010 17:11:28 +0000</pubDate>
</item>
<item>
	<title>parrot.org: GSOC NCI Updates</title>
	<guid>http://www.parrot.org/179 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/gsoc-nci-updates</link>
	<description>&lt;p&gt;The NCI updates using the libffi are coming along. I ran into a bit of an annoyance when I found out that there are places internally where signatures are not specified for some functions, but luckily it was easy to remedy once I had figured out the problem. All of those cases used the same signature (&quot;vJP&quot;), it was only hard to find the right place to add that.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/gsoc-nci-updates&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 15 Jun 2010 15:15:13 +0000</pubDate>
</item>
<item>
	<title>Jonathan Worthington: Perl Mova + YAPC::Russia</title>
	<guid>http://use.perl.org/~JonathanWorthington/journal/40399?from=rss</guid>
	<link>http://use.perl.org/~JonathanWorthington/journal/40399?from=rss</link>
	<description>&lt;p&gt;On Friday I flew from rainy Sweden to scorching hot Kiev to attend a combined Perl Mova + YAPC::Russia. The passport queue wasn't overly long, and I'd happily managed to be hand luggage only, so I wasn't too long in the airport. I planned to take the &quot;official&quot; bus, but before it appeared I heard a lady shouting about a mashrutka going to the center, so I took that instead. Understanding basic Russian - well, it coulda been Ukrainian too - sure comes in helpful. I was dropped by a metro station, leaving the 15 euro-cent (yes, really) metro ride a few stops to where I was staying - a hotel right on the main Independence Square. I was a little bemused as I checked in to be spoken to in a mixture of Russian and Ukrainian, by the same person in the same conversation.&lt;/p&gt;&lt;p&gt;My plane had been slightly late, so I was also slightly late joining the pre-workshop dinner. After I'd filled up on a tasty dish of borsch, we wandered on to a pub that offered no less than 22 different beers. I was...happy. :-) Some beer later, it was time for a little stroll, which terminated in a Japanese restaurant, where I had my first encounter with wasabi vodka. All in all, a very fun start to my visit here.&lt;/p&gt;&lt;p&gt;I was worried I'd sleep badly in my room since it was a little hot, but I actually slept really quite well and was nicely refreshed for the hack meet. There were a lot of people there hacking on all kinds of different projects. Some folks were interested in contributing to Rakudo, and so we gathered around on a table and I helped each of them find and get started on a task. It went extremely well - everyone in attendance contributed Rakudo patches or code that allowed us to close an RT ticket right there on the day, or that will after I apply patches. Of note, people who were new to Rakudo hacking:&lt;/p&gt;&lt;ul&gt;
  &lt;li&gt;Located and unfudged tests for \e that was recently fixed, allowing the ticket about that to be closed.&lt;/li&gt;&lt;li&gt;Implemented .all, .any, .one and .none method versions of junction constructors and added tests for them, allowing that ticket to be closed.&lt;/li&gt;&lt;li&gt;Debugged and then wrote a patch that fixed a bug in range iteration, plus added tests, allowing an RT ticket to be closed.&lt;/li&gt;&lt;li&gt;Implemented .cando and did some related refactors in the area that I suggested and also located some tests to unfudge. Due to network issues that one didn't get applied on the day, though I have it and have just applied it locally, so it'll be in soon.&lt;/li&gt;&lt;li&gt;Tracked down what was wrong with forming colon pairs from variables involving twigils, patched it and made sure we had some test coverage of that; again, we closed a ticket.&lt;/li&gt;&lt;li&gt;Wrote a patch to fix a bug in the series operator that had been reported in RT, along with some test cases for it.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I think it goes without saying that this is really quite impressive, especially given they had to share one Rakudo core hacker between them for guidance. In fact, I even had time to cook up a few patches myself amongst guiding others! It was great fun to hack alongside such pepole. I handed three spectest repo commit bits out that day, and I think they were all used. It's experiences like the one at this hack meet that make me really glad that we're writing most of Rakudo in Perl 6 or a restricted dialect of it - all of the above tasks required (apart from a one line change in one of them) no PIR or C knowledge at all. Some of those at the hackmeet said they may find time for a bit more Rakudo hacking in the future, which would be really great. :-) After the hack meet, there was more nice food - including a Chicken Kiev - and some lovely beer at prices I've become rather unacustomed to in Sweden.&lt;/p&gt;&lt;p&gt;Day two was talks day. I had one 40 minute talk on Perl 6 signatures which went well. I received some great questions, and I hope I answered them all to people's satisfaction. Later on, I gave a lightning talk about Rakudo * and what it would contain, and showed off a &lt;a href=&quot;http://pivo.jnthn.net/&quot;&gt;simple little example site&lt;/a&gt; that used Rakudo Perl 6, including the modules JSON::Tiny by moritz++ and FakeDBI by mberends++ along with Blizkost (sorear++ for that) to get at the Perl 5 CGI module (though I'll refactor it to use Web.pm in the near future - I just wanted an excuse to show off Blizkost). The evening was, of course, more food and beer, and a lot of fun.&lt;/p&gt;&lt;p&gt;The final day of the workshop was a bit different - a river cruise! It was very relaxing, and gave me yet another way to enjoy this beautiful city. Certainly good for unwinding after a workshop. Most people left either after that or were flying home today; I on the other hand used &quot;no direct flight on a Tuesday&quot; as an excuse to get another day to potter around Kiev, and today I've enjoyed doing exactly that, gently strolling between my favorite sights and stopping in the odd open air cafe in a park to keep myself refreshed in the somewhat stuffy weather. Soon it'll be time to take my last dinner here, an evening stroll and maybe find some outdoor place to sit and nurse a final beer before it's time to get some sleep before my flight home tomorrow.&lt;/p&gt;&lt;p&gt;Beautiful Kiev. It gets harder to leave each time I come. :-)&lt;/p&gt;</description>
	<pubDate>Tue, 15 Jun 2010 15:11:09 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Parrot 2.5.0 &quot;Cheops&quot; Released!</title>
	<guid>http://www.parrot.org/178 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/news/2010/Parrot-2.5.0</link>
	<description>&lt;p&gt;On behalf of the Parrot team, I'm proud to announce Parrot 2.5.0&lt;br /&gt;
&quot;Cheops&quot;. &lt;a href=&quot;http://parrot.org/&quot;&gt;Parrot&lt;/a&gt;&lt;br /&gt;
is a virtual machine aimed at running all dynamic languages.&lt;/p&gt;
&lt;p&gt;Parrot 2.5.0 is available on &lt;a href=&quot;ftp://ftp.parrot.org/pub/parrot/releases/devel/2.5.0/&quot;&gt;Parrot's FTP&lt;br /&gt;
site&lt;/a&gt;, or &lt;a href=&quot;http://parrot.org/download&quot;&gt;follow the download&lt;br /&gt;
instructions&lt;/a&gt;.  For those who would like to develop on Parrot, or help&lt;br /&gt;
develop Parrot itself, we recommend using&lt;br /&gt;
&lt;a href=&quot;http://subversion.apache.org/&quot;&gt;Subversion&lt;/a&gt;  on &lt;a href=&quot;https://svn.parrot.org/parrot/trunk/&quot;&gt;our&lt;br /&gt;
source code repository&lt;/a&gt; to get the latest and best Parrot code.&lt;/p&gt;
&lt;p&gt;Parrot 2.5.0 News:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; Core&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt; Added ByteBuffer PMC to allow direct byte manipulation&lt;/li&gt;
&lt;li&gt; Modified some PMC vtable functions to reduce complexity, simplifying coverage.&lt;/li&gt;
&lt;li&gt; Modified PAST to generate symbolic PASM constants in PIR output.&lt;/li&gt;
&lt;li&gt; General STRING API cleanups&lt;/li&gt;
&lt;li&gt; Increased test coverage of core PMCs&lt;/li&gt;
&lt;li&gt; Fixed up 'exit' opcode, added CONTROL_EXIT exception type.&lt;/li&gt;
&lt;li&gt; Experimental 'unroll' opcode renamed to 'finalize'&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt; NQP-rx
&lt;ul&gt;
&lt;li&gt; Added proper support for multisubs and multimethods&lt;/li&gt;
&lt;li&gt; Fixed sigspace handling ** quantifier in regexes&lt;/li&gt;
&lt;li&gt; Added \e strings&lt;/li&gt;
&lt;li&gt; Added use of inversion lists for charclass lists in regexes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;&lt;li&gt; Platforms&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt; EPEL (Extra Packages for Enterprise Linux) packages for RHEL6.beta are available
  &lt;/li&gt;&lt;/ul&gt;
&lt;li&gt; Begin moving towards Lorito, the ops refactor to enable pervasive self-hosting and JIT compilation.
&lt;ul&gt;
&lt;li&gt; All ops are now built with the self-hosted opsc compiler.
&lt;/li&gt;&lt;li&gt; For more Information about Lorito see:
  &lt;/li&gt;&lt;/ul&gt;
&lt;ul&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.parrot.org/parrot/wiki/Lorito&quot;&gt;http://trac.parrot.org/parrot/wiki/Lorito&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://trac.parrot.org/parrot/wiki/LoritoRoadmap&quot;&gt;      http://trac.parrot.org/parrot/wiki/LoritoRoadmap&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/news/2010/Parrot-2.5.0&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Tue, 15 Jun 2010 13:12:21 +0000</pubDate>
</item>
<item>
	<title>Khairul: Week 2 + Week 3 Synopsis: Dynlib Digressions</title>
	<guid>http://parrot.mangkok.com/?p=106</guid>
	<link>http://parrot.mangkok.com/?p=106</link>
	<description>&lt;p&gt;The process of loading a dynop library is seemingly straightforward. Simply using the “.loadlib” directive or the “loadlib” opcode in PIR will result in the library being loaded and integrated into the interpreter environment. That is, until you have more than 1 interpreter in play, or, the bytecode that you load has different opcode numberings that what is currently reflected in the interpreter.&lt;/p&gt;
&lt;p&gt;Parrot’s solution to the former is to simply disallow loading dynop libraries when there is more than one interpreter in play. There exists a certain assumption on how interpreters are created, in that, there is only one main interpreter, and additional interpreters are spawned as ParrotThreads (at least that is how I understand the code). Creating interpreters in the model above will yield the expected behaviour, in that everything works normally when the main interpreter will preload everything that is needed by the threads, thus obviating the need to load of dynop libraries in the threads. However, if one creates an additional interpreter outside this model, it breaks the assumption and one can load dynops in the second interpreter. The main reason for this is that only the first interpreter is registered in the “interpreter_array”, while the second is not. Since the code to detect if there is more than 1 interpreter depends on the “interpreter_array” and the associated “n_interpreters” count, the second interpreter is non-existent in the point of view of the core.&lt;/p&gt;
&lt;p&gt;With regards to dynops, in the process of updating the core op tables, there is a high possibility that pointers to the various op tables change to point to new locations in memory. With 1 interpreter, everything is fine, as the op table references of that interpreter is updated accordingly. Adding a second interpreter to the mix will result in a segmentation fault when the second interpreter tries to access the outdated references to the op tables. There has to be a way to detect or notify any changes to the op tables to all interpreters currently existing.&lt;/p&gt;
&lt;p&gt;Trying to change the code in the core to achieve this is an exercise of frustration. After trying out a few things, namely forcibly registering all interpreters by modifying Parrot_cx_init_scheduler and broadcasting messages in dynop_register by using Parrot_cx_broadcast_message and trying to make sense of the failures I’m getting (mostly assertion failures), I discovered a few things. First, I discovered that there are no GC runs after a thread is created (if I understand correctly, see src/pmc/threadinterpreter.pmc). Apparently its not really stop the world, more like stop the GC and I don’t see anywhere where the GC is reenabled. Second, there is no simple way to halt a thread and know that it is halted. I can broadcast messages to all interpreters for all I want, but unless I know for sure that all interpreters have stop, it is dangerous to go ahead with updating the op tables. One way I wanted to try out was to use pt_thread_wait and pt_thread_signal, but that got blocked as I can’t get those symbols exported (putting them in thread.h doesn’t help, marking them as PARROT_EXPORT also doesn’t help). Since that didn’t work, I’m stopping this experiment as it has taken way too much time and its not part of my objectives.&lt;/p&gt;
&lt;p&gt;All that effort is not wasted though. Now that I understand more of how the internals work, I could do my own DIY dynlib detection. In the same vein, I found the reason for  a segmentation fault that I encountered when I try to run “tracer.nqp” against “examples/pir/io.pir”. I worked around that by simply making the child interpreter’s vtables point to the parent’s instead. Digging into the internals these past week, I think I figured out why. So apparently, NQP loads the OS dynpmc. “examples/pir/io.pir” also loads in the OS dynpmc. So at this point, there are two different entries in two different vtables with different base_type numbers. For normal dynpmcs, this is fine as each interpreter will only look at their own vtable entries. However, the OS dynpmc is a singleton. Thus, when NQP loads it, an instance is created and stored. When io.pir loads it again, the stored instance is then saved in the MRO (method resolution order) list of io.pir’s copy of the OS vtable entry. So, io.pir’s OS vtable entry’s index is around 85, but the one in its MRO list is about 101, and this difference leads to a segfault when trying to invoke a method of OS.&lt;/p&gt;
&lt;p&gt;Back on track, I do my dynlib detection in the Instrument dynpmc itself, in the form of the function detect_loadlib. Since I discovered that each interpreter stores a hash of the dynlibs it has loaded in the iglobals hash, detecting newly loaded dynlibs is simply comparing an old list of loaded dynlibs with the current list. So, now the Instruments dynpmc can detect all dynlibs loaded through “.loadlib” directives and “loadlib” opcodes, and creates the task/event “Instrument::Event::Internal::loadlib” which can then be handled in PIR. With that in place, I can now proceed to go on and implement more events to raise.&lt;/p&gt;
&lt;p&gt;Currently, I have three events, which are Instrument::Event::Internal::loadlib, Instrument::Event::Class::instantiate, Instrument::Event::Class::callmethod. An example script to use these events is shown below (in NQP):&lt;/p&gt;
&lt;pre&gt;Q:PIR {
	load_bytecode 'Instrument/InstrumentLib.pbc'
};

sub loadlib_cb ($task) {
	my $data := Q:PIR {
		find_lex $P0, '$task'
		%r = getattribute $P0, 'data'
	};

	say('Library loaded: ' ~ $data[0]);
};

sub class_cb ($task) {
	my $data := Q:PIR {
		find_lex $P0, '$task'
		%r = getattribute $P0, 'data'
	};

	say('Class instantiated: ' ~ $data[0]);
};

my $args := pir::getinterp__p()[2];
$args.shift();

my $loadlib_evt := Instrument::Event::Internal::loadlib.new();
$loadlib_evt.set_callback(loadlib_cb);

my $class_evt := Instrument::Event::Class::instantiate.new();
$class_evt.set_callback(class_cb);

my $instr := Q:PIR { %r = new ['Instrument'] };
$instr.attach($loadlib_evt);
$instr.attach($class_evt);

$instr.run($args[0], $args);
&lt;/pre&gt;
&lt;p&gt;Running this against “./examples/pir/io.pir” yields:&lt;/p&gt;
&lt;pre&gt;Library loaded: io_ops
test4
test5
test1
test2
test3
Library loaded: os
Class instantiated: OS
&lt;/pre&gt;
&lt;p&gt;Well, it’s not much but its a start. Not too mention I’ve fixed most of my crashes already.&lt;/p&gt;
&lt;p&gt;4th Weeks Tasks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rethink the callback interface: Passing so many things to the callback is not very fun.&lt;/li&gt;
&lt;li&gt;Class events: Add ability to inspect per class.&lt;/li&gt;
&lt;li&gt;Internal events: Exceptions, per sub calls.&lt;/li&gt;
&lt;li&gt;Tests for Probe, EventLibrary: Now that the interface is mostly settled, start writing those tests.&lt;/li&gt;
&lt;li&gt;File, line information: Figure out how to get file and line number information. Look at the profiling runcore/unhandled exceptions/etc. I think those print out that info.&lt;/li&gt;
&lt;/ul&gt;</description>
	<pubDate>Mon, 14 Jun 2010 18:43:13 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Adding Optimizations to HLL Compilers with PAST::Pattern</title>
	<guid>http://www.parrot.org/177 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/adding-optimizations-hll-compilers-pastpattern</link>
	<description>&lt;p&gt;Parrot Abstract Syntax Trees(PASTs) are one of the forms code being compiled in a PCT-based compiler takes before being evaluated or compiled to bytecode. With PAST::Pattern, you can find all the sub-trees of a PAST that match a certain pattern and transform them. This can be used to perform optimizations at the PAST level.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/adding-optimizations-hll-compilers-pastpattern&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Mon, 14 Jun 2010 04:48:32 +0000</pubDate>
</item>
<item>
	<title>parrot.org: It's Finally Time to Write Some Optimizations (Almost)</title>
	<guid>http://www.parrot.org/176 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/its-finally-time-write-some-optimizations-almost</link>
	<description>&lt;p&gt;Wherein I dash your hopes of spending the weekend hacking on making your favorite HLL compiler generate better code only to give you hope at the end that it will not be long at all before you can:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/its-finally-time-write-some-optimizations-almost&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Sat, 12 Jun 2010 08:43:49 +0000</pubDate>
</item>
<item>
	<title>parrot.org: The Last Week and a Half in PAST Optimization</title>
	<guid>http://www.parrot.org/175 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/last-week-and-half-past-optimization</link>
	<description>&lt;p&gt;I noticed yesterday that I forgot to post a blog post last week. I'll try to make up for that with double the blog post goodness this week(expect a second post Thursday or Friday).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/last-week-and-half-past-optimization&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Mon, 07 Jun 2010 20:56:42 +0000</pubDate>
</item>
<item>
	<title>Khairul: Square one + a bit.</title>
	<guid>http://parrot.mangkok.com/?p=94</guid>
	<link>http://parrot.mangkok.com/?p=94</link>
	<description>&lt;p&gt;During my meeting with cotto on Tuesday (my time), he suggested looking into replacing entries within the op_func_table on the instrumented interpreter (CHILD). So the past few days, I’ve been working on it. The initial plan was to create a copy of that table, replacing ops that have hooks attached with a stub function that will fire the hooks before executing the op itself. The operation itself went swimmingly, until the monster known as “dynops” popped up to say “OHAI!”.&lt;/p&gt;
&lt;p&gt;Before I go into the problems I face with dynops my initial approach, I have to say that cotto was right in that this approach will have better performance characteristics that what I was doing earlier, which was to store the hooks in a ResizablePMCArray which holds the hooks in a Hash. That was a bit of a cop-out on my part, as that was the path of least resistance in terms of adding new  and removing hooks. Doing it in that manner simplifies the code for adding and removing hooks, at a cost of going through more levels of VTABLEs. With that, I’ve changed the data structure to hold the probes. It is now an array of linked lists, with a 1-1 mapping between each linked list and op. With this major change, running the example code [0] against examples/pir/mandel.pir yields approximately 5% performance increase (user 16.077s vs user 17.001s previously).&lt;/p&gt;
&lt;p&gt;Back on topic, so the plan is to create a copy of the op_func_table, instrument it and change CHILD’s to refer to it instead of the core op_func_table. This was rather easy. Then, dynops dropped by.&lt;/p&gt;
&lt;p&gt;With dynops in the equation, it did not turn out easy. Problem is, if the instrumented table is not switched back to the core table, the core table will end up pointing to the instrumented table instead at the end of dynops_register (see &lt;a href=&quot;https://svn.parrot.org/parrot/branches/gsoc_instrument/src/runcore/main.c&quot;&gt;src/runcore/main.c&lt;/a&gt;). Also, how is the supervising interpreter (PARENT) supposed to know when new dynops are loaded in the CHILD? The PARENT has to know when the core op_func_table is changed, so that it can update its own references accordingly. Currently, dynops_register gets around this problem by prohibiting loading dynops when there is more than 1 interpreter in play.&lt;/p&gt;
&lt;p&gt;So, hold on. “more than 1 interpreter in play”. But there are two interpreters, PARENT and CHILD! Apparently, creating interpreters through Parrot_new will only register the first interpreter in the list of interpreters held by core. Thus,&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Parrot_Interp PARENT = Parrot_new(NULL);&lt;br /&gt;
Parrot_Interp CHILD    = Parrot_new(PARENT);&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;PARENT will be registered, as traced through Parrot_new -&amp;gt; Parrot_cx_init_scheduler -&amp;gt; pt_add_to_interpreters (I might have missed some steps in between).&lt;/p&gt;
&lt;p&gt;However, CHILD is not, as in Parrot_cx_init_scheduler (see &lt;a href=&quot;https://svn.parrot.org/parrot/branches/gsoc_instrument/src/scheduler.c&quot;&gt;src/scheduler.c&lt;/a&gt;), since CHILD has a parent interpreter, pt_add_to_interpreters (see &lt;a href=&quot;https://svn.parrot.org/parrot/branches/gsoc_instrument/src/thread.c&quot;&gt;src/thread.c&lt;/a&gt;) is not called. So, as far as core is concerned, there is only 1 interpreter in play, and that interpreter is PARENT. Thus that is why the check “n_interpreters &amp;gt; 1″ in dynop_register fails, and how I inadvertently was able to run 2 interpreters and have dynops loading, although it segfaults later on when PARENT tries to access its outdated tables. If CHILD is manually registered by calling pt_add_to_intepreters, then that is a no go, as then both PARENT and CHILD cannot load any dynop libraries. Given that CHILD has to be able to load dynop libraries, I’m at an impasse.&lt;/p&gt;
&lt;p&gt;To recap, this is the problem at this juncture, if CHILD loads a dynop library, the instrumented table must be swapped out and replaced with the core table. After loading is complete, the instrumented table is then updated and swapped back in. After all that, PARENT must be notified of this loading so that it itself can update its own table references.&lt;/p&gt;
&lt;p&gt;In my previous post, I mentioned making use of the events system to detect when CHILD is going to execute a “loadlib” op and to raise an event that PARENT can handle and do the necessary stuff. But that won’t work for “.loadlib” directives (see &lt;a href=&quot;http://irclog.perlgeek.de/parrot/2010-06-01#i_2391934&quot;&gt;[1]&lt;/a&gt;), as that is not an op. So scratch that idea for now (although, I think it is a good idea for normal “loadlib” ops). Digging into the events system, I noticed that it already does some of what I was doing, in that, to check for events, a copy of the core op_func_table is made (see &lt;a href=&quot;https://svn.parrot.org/parrot/branches/gsoc_instrument/include/parrot/interpreter.h&quot;&gt;include/parrot/interpreter.h&lt;/a&gt; , interp-&amp;gt;evc_func_table), and all entries in that table points to the “check_events__” op. This table is also helpfully taken care of in dynop_register, in that it helpfully extends it whenever new dynops are added.&lt;/p&gt;
&lt;p&gt;Then I realised something, I’m going to create a copy of the op_func_table, and replace each entry with a stub function. This table will then be used for op lookup and execution by the runcore. And I control CHILD’s runcore. Why don’t I move the call to the stub function in the runcore itself. So that’s where I’m at now, square one + a bit.&lt;/p&gt;
&lt;p&gt;To get around the problem brought about by dynops temporarily, I simply add a check in the runcore to update PARENT’s op tables whenever it does not match CHILD’s op tables. I did some thinking on this, maybe make dynop loading a STOP THE WORLD event, just like GC. This I think can be done in dynops_register, broadcasting to all to halt and when all is halted, proceed to load the dynop library before broadcasting again to do the necessary updates before resuming itself. This I will revisit again later, seeing that I’m running out of time for this week’s tasks, which is, to recap, bug hunting and squashing of tracer.nqp, implementing the event notifications library and tests.&lt;/p&gt;
&lt;p&gt;So bug hunting. Apparently I did something and now I can obtain and print out the STRING KEY constants. But the segfault with example/pir/io.pir remains when I try to trace it using tracer.nqp. Running it under a debugger shows that it segfaults when trying to access INTERP-&amp;gt;vtables[SELF-&amp;gt;vtable-&amp;gt;base_type]-&amp;gt;_namespace (in &lt;a href=&quot;https://svn.parrot.org/parrot/branches/gsoc_instrument/src/pmc/default.pmc&quot;&gt;src/pmc/default.pmc&lt;/a&gt; line 549). Before this line, control is in find_method_direct_1 (in &lt;a href=&quot;https://svn.parrot.org/parrot/branches/gsoc_instrument/src/oo.c&quot;&gt;src/oo.c&lt;/a&gt; line 1051), where the variable _class is being queried for its namespace. Only problem is, the base_type of _class is 101, which is not a valid number given that at that point in time, there is only about 87 pmc types.&lt;/p&gt;
&lt;p&gt;Running simple-tracer.pir [0] on it has no problems, of which I can only suspect that a GC run happened and the object got cleaned up, so bad data was being read. This would make sense given tracer.nqp is written in NQP and it does lots of string concatenations, so that should cause the GC to run more frequently. Now, if there’s a tool that I can use to confirm this… Oh wait, I’m supposed to be making those tools.. GAH!&lt;/p&gt;
&lt;p&gt;[0] Simple-tracer.pir (Edited 13/06/2010)&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;.sub '' :load :init :anon
    load_bytecode 'Instrument/Instrument.pbc'
    load_bytecode 'Instrument/Probe.pbc'
.end

.sub 'main' :main
    .param pmc args

    $P0 = shift args

    .local pmc pr, in, probe_class
    probe_class = get_hll_global ['Instrument'], 'Probe'
    pr = new probe_class
    pr.'make_catchall'()
    pr.'set_callback'('cb')

    in = new ['Instrument']
    in.'attach'(pr)

    $S0 = args[0]
    in.'run'($S0, args)
.end

.sub 'cb'
    .param int pc
    .param pmc op
    .param pmc instr

    print 'Op: '
    $I0 = op[0]
    say $I0
.end&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;[1] &lt;a href=&quot;http://irclog.perlgeek.de/parrot/2010-06-01#i_2391934&quot;&gt;http://irclog.perlgeek.de/parrot/2010-06-01#i_2391934&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 04 Jun 2010 12:09:26 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: ParrotTheory: Green Threads</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-1873078366056520426</guid>
	<link>http://wknight8111.blogspot.com/2010/06/parrottheory-green-threads.html</link>
	<description>This summer I'm mentoring GSoC student Chandon in his project to bring Hybrid Threads to Parrot. Today I'm going to talk a little bit about that, and maybe give some information about what Parrot needs to do to properly support a full and robust threading system in the long term. I've &lt;a href=&quot;http://wknight8111.blogspot.com/2010/02/parrottheory-threading.html&quot;&gt;written about threads previously on this blog&lt;/a&gt;, so I won't cover all the nitty-gritty details again.&lt;br /&gt;&lt;br /&gt;At the risk of over simplicity there are basically two types of threads to consider: &lt;a href=&quot;http://green%20threads/&quot;&gt;OS Threads&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Green_threads&quot;&gt;Green Threads&lt;/a&gt;. OS Threads or &quot;native threads&quot; are what most people are probably familiar with: These are the threads managed by your operating system kernel. Native threads represent a flow of execution of native machine code on a single processor core, and multiple native threads can run simultaneously on multiple processor cores. On a single core, they run sequentially but in time slices so short it appears to the human observer that things are happening at the same time. This appearance of simultaneity is extremely important for computer users, especially for graphical interfaces, because people don't like waiting and don't like it when the computer &quot;freezes&quot; or &quot;locks up&quot; during periods of heavy computation.&lt;br /&gt;&lt;br /&gt;A native thread represents a system context: A separate call stack and a snapshot of the processor state at any given time. By saving the processor state and call stack away, we can switch to a different task and later resume our original task as if nothing has happened.&lt;br /&gt;&lt;br /&gt;I don't know where they were originated, although Green Threads were probably most famously implemented in early versions of the &lt;a href=&quot;http://en.wikipedia.org/wiki/JVM&quot;&gt;JVM&lt;/a&gt;.  Instead of being managed by the OS, they are managed by the VM. Green threads are scheduled onto OS threads in the same way that OS threads are scheduled onto processor hardware. The VM saves it's current state into a VM context object, moves to a different task, and then reinvokes that context object to resume the original task.&lt;br /&gt;&lt;br /&gt;Green threads are very interesting tools, when they are available. They tend to be extremely inexpensive compared to native OS threads. They are managed by the VM, and if they all execute sequentially on a single OS thread the risk of lock contention and data corruption drops almost to zero. The down-side to green threads is that they are all multiplexed onto a single OS thread, so they each get a smaller share of the processor's time.&lt;br /&gt;&lt;br /&gt;To help enforce that green threads in the VM may only execute on a single OS thread at a time, the VM may implement a global interpreter lock (GIL). Famous examples of this occur in Python and Ruby. A GIL helps with integration to C libraries which are not thread-safe, and also helps to prevent things like callback functions from executing in a different OS thread and causing unprotected data corruption. The downside to the GIL approach is that  extra overhead must be spent to perform locking/unlocking and checking of the GIL.&lt;br /&gt;&lt;br /&gt;Chandon's Hybrid Threads idea tries to combine the two models of OS and Green threads. Parrot will maintain a pool of OS &quot;worker&quot; threads, based on user settings and the number of available processor cores. Parrot will then be able to schedule a queue of green threads onto the available OS threads. Yesterday on his blog he actually posted an example of using Parrot's existing continuations to form a system of cooperative green threads. Instead of happening at any time, green thread switches in his example are manually triggered by calling the functon th_resched(). If we move the call to th_resched into the interpreter's scheduler object so it can be called when the scheduler runs, we gain a proper preemptive green threads system without too much effort. &lt;br /&gt;&lt;br /&gt;There are some difficulties with this model, especially since Parrot currently has no mechanism to manage data contention across OS threads, and also considering that each OS thread ill have it's own interpreter object, which will need to be created at some runtime expense. Parrot is also going to need to add new mechanisms and policies for dealing with data which is considered &quot;global&quot;: namespaces and class definition metaobjects, etc.&lt;br /&gt;&lt;br /&gt;We're also going to need to start answering some very difficult questions: If a continuation created in interpreter A is passed to interpreter B and invoked, what do we do? If an exception is thrown by interpreter A and is caught by a handler defined in interpreter B, what do we do? If an object's vtable override is preempted by a green thread switch and the object is in an inconsistent state when it is attempted to be accessed in a different green thread, what do we do? How do we even detect when any of these things happen? What mechanism are we going to need to write to allow sharing PMCs between OS threads? Do we use &lt;a href=&quot;http://en.wikipedia.org/wiki/Software_transactional_memory&quot;&gt;STM&lt;/a&gt; again? If so, do we write STM ourselves or try to use a pre-existing and proven library? Considering that we now have immutable strings (which don't need to be locked because they can't be written), do we maybe want to consider a system where shared PMCs are either read-only in other threads or maybe are &lt;a href=&quot;http://en.wikipedia.org/wiki/Copy-on-write&quot;&gt;COW&lt;/a&gt; to prevent corruption? How do we deal with long-running operations, such as blocking IO and calls to long-running library functions?&lt;br /&gt;&lt;br /&gt;For Chandon's project to be a success I think we need just two things: a robust green threads system, and a prototype OS threads system with a scheduler that can intelligently assign green threads to OS threads. Once we have that system in place, along with some rules or algorithms against sharing writable data until we sort out the details for how that becomes possible, we can add new mechanisms piece-wise to enable new features and functionality. If he has time sure he can do more, but if we can get the basics in place we will be in a much better state than we were before he started.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-1873078366056520426?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Wed, 02 Jun 2010 13:30:17 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: Threads are continuations</title>
	<guid>http://www.parrot.org/172 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/threads-are-continuations</link>
	<description>&lt;p&gt;Parrot has Continuations. In fact, Parrot is *based* on Continuations: rather than having a call stack and stack frames, each sub call has a return continuation - a pointer back to the call frame and bytecode position to return to after the sub completes.&lt;/p&gt;
&lt;p&gt;As the Scheme and Ruby users keep telling us, continuations are pretty neat stuff. In fact they're so neat that they give us light weight cooperative threads &quot;for free&quot;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/threads-are-continuations&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 01 Jun 2010 20:46:06 +0000</pubDate>
</item>
<item>
	<title>parrot.org: NFG is (somewhere in the vincinity of...) here</title>
	<guid>http://www.parrot.org/173 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/nfg-somewhere-vincinity-...-here</link>
	<description>&lt;p&gt;&quot;N̈&quot; (Or &quot;n̈&quot; if you don't like caps) is a grapheme from several minor extended Latin alphabets. It occurs in the orthographies of the Jacaltec Mayan dialect, Cape Verdean Creole, and in the &lt;em&gt;rockumentary&lt;/em&gt; &quot;This is Spın̈al Tap&quot;.  Today I want to talk about the injustices this symbol has faced in the past and how, starting today, parrot can right them.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/nfg-somewhere-vincinity-...-here&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 01 Jun 2010 17:49:42 +0000</pubDate>
</item>
<item>
	<title>Khairul: Week 1 Synopsis</title>
	<guid>http://parrot.mangkok.com/?p=83</guid>
	<link>http://parrot.mangkok.com/?p=83</link>
	<description>&lt;p&gt;Last week marked the start of the GSoC coding period. Prototyping during the bonding period helped me in creating an initial version of my framework and currently, I’m focusing on creating an interface to inspect each opcode that is being executed. This interface is the class Instrument::Probe [0]. Initially, this class was written in PIR. It quickly became rather untenable, with labels and jumps all over the place. My mentor, cotto, suggested implementing it in NQP instead, and that suggestion has proven to be a godsend. The code is cleaner, and it’s easier to follow, not to mention adding new features to it.&lt;/p&gt;
&lt;p&gt;As of now, the class Instrument::Probe allows the creation of probes that inspect the opcodes being executed. Each probe has its associated callback and a list of opcodes that it is inspecting. Whenever the runcore encounters any of these opcodes, it will call the associated callback. This system is rather flexible in that probes can be enabled or disabled dynamically, and multiple callbacks can be associated with a single opcode. With that in mind, each probe also has an associated finalize callback which is called only at the end of execution and only if the probe is enabled at that point.&lt;/p&gt;
&lt;p&gt;With that in mind, I’ve implemented a simple tracer example (examples/library/tracer.nqp [1]) that tries to mimic the output of the tracing runcore. It mostly works alright and is rather slow, which is a given seeing how much work it is doing per op, both at the PIR (or rather NQP) and the runcore levels. Not to mention its tendency to segfault every now and then, which I’m still in the process of tracking down. One current segfault happens when running it against examples/pir/io.pir, and it doesn’t happen when a simpler tracer that only prints the op number is used. Further testing shows that it seems to happen on the opcodes “get_results” and “set_results”, although I’m not quite certain why, probably because I’m accessing something the wrong way. Bug squashing is not a fun activity.&lt;/p&gt;
&lt;p&gt;For this week, I’m working on to solve a few problems in addition to tracking down the segfaults above. First of which are dynops. This past week has seen major changes to the op libraries within parrot, due to “ops_massacre”. These changes made me think about dynops and how it will affect my project. Currently, the runtime library does op lookups using the OpLib and OpCode pmcs, and this lookup is done before the code is loaded/compiled. Due to this, the opcodes contained in the dynop libraries will be non-existent from the point of view of the library . One way i’m thinking of to solve this is to defer registering hooks for dynops, trying whenever new dynlibs are loaded. This can be done with a simple probe that looks for the opcode “loadlib” and raises an event when that opcode is encountered (I’m assuming “.loadlib” and “loadlib” works the same way). Which brings me to the question of is there an event system I can use? Simple tests and some digging (t/pmc/scheduler.t and PDD-24) showed me how to use Parrot’s event system and I think I can utilise this to implement the above and to serve as the basis for the other events such as PMC creation and GC mark cycle, barring any unforeseen issues.&lt;/p&gt;
&lt;p&gt;To recap, I spent most of this week learning just enough NQP to reimplement the runtime library in NQP and chasing down bugs uncovered by the simple tracer example. This coming week will be spent on squashing the segfaults the tracer produces and make it faster and implementing events and a runtime library to abstract it away. And I should start on the tests too.&lt;/p&gt;
&lt;p&gt;[0] https://svn.parrot.org/parrot/branches/gsoc_instrument/runtime/parrot/library/Instrument/Probe.nqp&lt;br /&gt;
[1] https://svn.parrot.org/parrot/branches/gsoc_instrument/examples/library/tracer.nqp&lt;/p&gt;</description>
	<pubDate>Sun, 30 May 2010 17:14:55 +0000</pubDate>
</item>
<item>
	<title>parrot.org: call for Parrot foundation members applications</title>
	<guid>http://www.parrot.org/171 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/news/call-parrot-foundation-members-applications</link>
	<description>&lt;p&gt;We're coming up on the annual Parrot Foundation member's meeting. Which includes the nomination and election of the next Parrot Foundation board of directors. And being so, the foundation is inviting everyone eligible for membership to apply. To be eligible for becoming a member of the Parrot Foundation you must:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;be nominated by two current members&lt;/li&gt;
&lt;li&gt;have made at least two contributions to the project (or a language implementation targeting the project)&lt;/li&gt;
&lt;li&gt;sign a contributor agreement&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/news/call-parrot-foundation-members-applications&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Sat, 29 May 2010 13:30:41 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: The AOT Advantage</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-4832539926026353662</guid>
	<link>http://wknight8111.blogspot.com/2010/05/aot-advantage.html</link>
	<description>In my previous blog post I briefly mentioned PHP, &lt;a href=&quot;http://github.com/facebook/hiphop-php&quot;&gt;HipHop&lt;/a&gt;, and AOT. For readers coming late to the party, HipHop is a native code compilation system for PHP, created by Facebook. The idea is that compiling down a relatively large subset of PHP (basically everything besides eval) to C++ code and passing it to an optimizing compiler can produce a much more efficient program than interpretation alone or even compiling to bytecode in advance and executing that.&lt;br /&gt;&lt;br /&gt;Let's look at this same idea, but in relation to Parrot's intended LLVM backend system.&lt;br /&gt;&lt;br /&gt;We can start off with a basic PHP compiler. The compiler doesn't need to be particularly fast since compilation happens once in advance. Sure, we don't want compilation to take forever because that slows down development, but it doesn't have the same kind of speed mandate we would have in an interpreted environment where we compile the script every single time we run it.&lt;br /&gt;&lt;br /&gt;Our basic, feature-light compiler compiles the PHP code down to PAST. From there we kick in a series of optimization stages. Again, if we know we're doing ahead-of-time compilation, we can add more optimization stages up front and take a little more time to compile. For a release build of a high-throughput application, maybe we really want to swing for the fences with this one and enable every optimization in the book. Let's hope it's a long, well-written book.&lt;br /&gt;&lt;br /&gt;We compile the PAST down to Parrot bytecode, after all the optimizations have run their course. At this point, we hand off the bytecode to the LLVM backend. LLVM converts the Parrot bytecode into LLVM IR, and passes that through it's own impressive suite of optimizations. At the end, LLVM spits out a native executable which is screaming fast.&lt;br /&gt;&lt;br /&gt;The converse side is a case where we want to shorten the turnaround time, such as when we are doing direct interpretation, or even making executables for debugging purposes and don't want our developers sitting around for a long time &lt;a href=&quot;http://xkcd.com/303/&quot;&gt;waiting for the thing to compile&lt;/a&gt;. We don't want to completely avoid optimizations, because after compilation the developers have huge and expensive test suites to run which can take much much longer.&lt;br /&gt;&lt;br /&gt;What we do in this case is compile the code to PAST, maybe run a handful of &quot;good bang for the buck&quot; (GBFTB) optimizations like constant folding, and compile the PAST down to bytecode. We'll avoid the last step and just execute the bytecode directly, since this is a debug build. When we run it, the JIT engine will kick in to do basic runtime compilation of detected hot spots, giving us nice speedups for programs with tight loops. The JIT compiler will likewise use a few of the GTFTB optimizations, but won't go crazy; we're doing this at runtime now and we have a user waiting.&lt;br /&gt;&lt;br /&gt;There are some people in the world of scripting languages who view the complete lack of native executable support as a virtue. After all, they say, the nature of these languages is fast turnaround; We can make changes and run them directly without needing to invoke a separate compiler to produce a separate executable. Plus, the immediate availability of human-readable source code furthers the common goals of open source software and knowledge sharing.&lt;br /&gt;&lt;br /&gt;Fast turnaround, from script to execution, certainly is a virtue--in development. Once we're ready to cut that release however, things change pretty dramatically. At my job, I write some applications in C#. During development, I keep things in &quot;Debug&quot; mode, and do lots of tests very quickly. When it's time to cut that release I change the VisualStudio configuration to &quot;Release&quot; and then click &quot;Build All&quot;. Where I was doing incremental debug builds, now I'm doing a full release build with optimizations turned on and debugging symbols stripped out. I also build a separate installer project, and to test everything I need to install the software first and run it from it's installed location. This is a lot of extra cost, but I don't do it frequently. I go from about a 10 second compile time turnaround to almost 10 minutes worth of compilation and installation work. The net result is a faster, better executable for my end users.&lt;br /&gt;&lt;br /&gt;In the case of Facebook, using HipHop to compile PHP down to native machine code improves throughput performance by 30%, which translates into lower server load, lower wait times for users and, at the end of the day, real money. Say what you want to about obfuscation of the source code, 30% is nothing to ignore.&lt;br /&gt;&lt;br /&gt;I like to think that the Parrot infrastructure will support any workflow that our end users want. Having speedy interpretation around for people who want that is a very good thing, and we do it already. But, having the ability to employ tiered libraries of optimizations and create native machine binaries for fast execution is a very very good thing as well. This is why I keep pushing for our eventual JIT system to also support AOT as well. LLVM will already handle all the nitty-gritty, so the amount of scaffolding we'll have to provide in Parrot is minimal in comparison.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-4832539926026353662?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sat, 29 May 2010 11:50:48 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: Compilers Targetting Parrot</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-3914014113871240240</guid>
	<link>http://wknight8111.blogspot.com/2010/05/compilers-targetting-parrot.html</link>
	<description>I got to thinking today about Parrot and came to an interesting conclusion: Writing our own parsers for various existing languages is nice, but if we could get the language communities involved it would be even better. There's a symbiotic relationship that could form from such an arrangement and I would like to talk about that here for a little bit.&lt;br /&gt;&lt;br /&gt;Let's take PHP as an interesting example. The PHP community has been talking about some kind of rewrite of their core engine to support Unicode from the ground-up. I'm not really involved in those discussions, so I don't know what the current state of the discussion is. I couldn't even tell you if work has started on such a rewrite. However, I do know one thing: If the next version of the PHP compiler targeted Parrot as the backend, it would have built-in Unicode support for free.&lt;br /&gt;&lt;br /&gt;There are some reasons why PHP people might not like this option, considering PHP's niche in the web server world and Parrot's current issues with performance and memory consumption. But, as I'll describe here, those are relatively small issues.&lt;br /&gt;&lt;br /&gt;Pulling an extremely wrong number out of a hat, let's say that it takes 10,000 man-hours to construct a modern, though bare-bones, dynamic language interpreter from the ground-up. You would have some features like GC, but wouldn't have others like JIT. Unicode support but a small or even non-existant library of built-in optimizations. You build a compiler, you build the interpreter runtime, and then you build a language library runtime so the programs you write don't have to reinvent every wheel from scratch. It's a daunting task, but it's very doable and has been done many times before.&lt;br /&gt;&lt;br /&gt;Now, let's say you take that same developer pool of 10,000 man-hours and instead build a compiler on top of Parrot instead of writing a new VM from the ground up. You do get a whole bunch of the really tricky features immediately: GC, Exceptions, IO, JIT (to come), Threads (to come), Unicode, Continuations, Closures, a library of Optimizations (to come), and all sorts of other goodies. You also get a nicer environment to write your parser in than bare lex/yacc (though, I think, you could still use lex/yacc if you really wanted). You get some libraries already, though you would likely need to write wrappers at least to get things into the proper semantics of your language. You really do get a hell of a lot and you could easily have a working compiler, at least the basics of one, up and running within a few weeks.&lt;br /&gt;&lt;br /&gt;Let's even be conservative and say that your team can't build the compiler front-end in less than 1,000 man-hours on Parrot.  Even then, you still have 9,000 man-hours left. You could spend some of that making a gigantic runtime library, but I like to think you could devote some of that effort back to Parrot too. If you spent even 5,000 hours making Parrot faster, or adding new features, or whatever you need, you'll still be spending less effort overall and getting a comparable result, if not a better one.&lt;br /&gt;&lt;br /&gt;Keep in mind, on Parrot, you're going to get all the features that other people add, in addition to the ones you added yourself. Parrot really is a symbiosis: You hack Parrot to add what you need, and in turn Parrot gives you all sorts of other things for free.&lt;br /&gt;&lt;br /&gt;Parrot has plenty of stuff around to get you started, even if it's not perfect right now. Remember that Parrot is extremely actively developed. You can do your development now, build your compiler and get your language ready and grow your regression test suite. When you decide that you need things improved, you can make targetted improvements incrementally. If you want a better GC, for instance, you can go in and just add that part. But, you have the benefit of knowing that Parrot already has one and your test suite team doesn't have to wait for your GC team to finish writing their first GC. That's good, because those damned GCs can take a while.&lt;br /&gt;&lt;br /&gt;My point, in a nutshell, is this: Parrot has some really cool features, but the coolest is that it provides a standard base level, a standard toolbox, that you and your compiler team can take and use immediately if you want it. You can get started right now with the kinds of high-powered features and tools that it would take you years to get right by yourselves. Yes there are improvements needed and some features yet to be desired, but adding them to Parrot represents smaller, more incremental improvements than trying to write an entire interpreter yourself.&lt;br /&gt;&lt;br /&gt;Parrot is adding some really cool features this year too. I fully expect by the 3.0 release we will these new things:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A new, fully-featured robust threading system&lt;/li&gt;&lt;li&gt;A pluggable optimization library, with optimizations able to be written (likely with some bootstrapping) in the high-level language of your choice&lt;/li&gt;&lt;li&gt;A new GC with radically improved performance characteristics&lt;/li&gt;&lt;li&gt;An extremely powerful instrumentation and analysis framework (again, with tools able to be written in the language of your choice, possibly with some bootstrapping)&lt;/li&gt;&lt;li&gt;A flexible native function call interface for interacting with existing libraries&lt;/li&gt;&lt;/ol&gt;If you can wait a little later, I fully expect by 3.6 or 3.9 that we will be rolling out a powerful LLVM-based native code compilation core which will support JIT and (I hope!) AOT. You don't have to look much further than Facebook's HipHop project to see that compilation of dynamic languages down to native executables will be a big benefit, especially if we can aggressively optimize all the way down. I'll talk about that particular issue in a later post.&lt;br /&gt;&lt;br /&gt;Parrot does have some problems now, like performance. I can certainly understand the criticism on that point. However, for a fraction of the effort it will take you to write a new interpreter or virtual machine from the ground up you can target Parrot instead, get a bunch of free features, and maybe spend some of your free time helping us add the optimizations and improvements that you need. I really and truly believe that it's a win-win proposition for everybody involved.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-3914014113871240240?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 28 May 2010 21:56:29 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: PAST::Transformer and the Foundation for PAST Optimization</title>
	<guid>http://www.parrot.org/170 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/pasttransformer-and-foundation-past-optimization</link>
	<description>&lt;p&gt;Coding for GSoC officially began this Monday, but I decided to get a head start and started working on PAST::Walker Thursday. PAST::Walker is the foundation for the rest of what I will be doing regarding PAST Optimization, and the foundation is largely laid. There have been a few complications, and a few decisions remain to be made(and implemented) before I can say that PAST::Walker and PAST::Transformer are finished, but implementing PAST::Walker has gone smoothly and quickly for the most part.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/pasttransformer-and-foundation-past-optimization&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Thu, 27 May 2010 01:14:08 +0000</pubDate>
</item>
<item>
	<title>parrot.org: Dynamic code points, the grapheme tables and not getting your services denied.</title>
	<guid>http://www.parrot.org/169 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/dynamic-code-points-grapheme-tables-and-not-getting-your-services-denied</link>
	<description>&lt;p&gt;One of the features of NFG I've mentioned before is that it solves our problems with variable width characters without taking additional storage space over UCS-4, on top of which it's defined.  The artifact that allows us to pull off that trick is called the 'grapheme table' and today, I'll try to explain how it works.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/dynamic-code-points-grapheme-tables-and-not-getting-your-services-denied&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 25 May 2010 01:15:44 +0000</pubDate>
</item>
<item>
	<title>parrot.org: How do threads fit into parrot?</title>
	<guid>http://www.parrot.org/168 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/how-do-threads-fit-parrot</link>
	<description>&lt;p&gt;(This post is to show my thinking on my GSoC project. Sorry in advance if it's not especially coherent or interesting out of context.)&lt;/p&gt;
&lt;p&gt;Over the past week I've been examining the Parrot code to figure out how hybrid threads are going to fit in. First, if I'm going to make Parrot do stuff concurrently, I have to figure out what Parrot is actually doing at all.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/how-do-threads-fit-parrot&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 25 May 2010 00:54:53 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: The Fitness of Parrot as a Target Platform</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-2802260404555382380</guid>
	<link>http://wknight8111.blogspot.com/2010/05/fitness-of-parrot-as-target-platform.html</link>
	<description>In response to the &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/bright-blue-yonder.html&quot;&gt;blog post I wrote the other day&lt;/a&gt;, I received &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/bright-blue-yonder.html?showComment=1274442384238#c4576637928891075936&quot;&gt;a very poignant question&lt;/a&gt; regarding Parrot's stability as a target for HLL compilers. Since the comment was anonymous and I can't ask permission, I'm going to repost a portion of it here:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;However to be honest, its scary that over the last 10 years so much was  done and discarded and is being rewritten. I agree with the &quot;throw away  the first&quot; reasoning but that is something I would expect in a 2-3 year  project not a 10 year old project.&lt;br /&gt;&lt;br /&gt;Could you comment on the risk  associated with for a HLL project that starts to build on Parrot with an  ETA of say 1 year? Can it be said with a reasonably level of certainity  that whatever sub-projects (JIT, treads etc.) are added to Parrot now,  they will take an evolutionary approach rather than being scrapped and  rewritten?&lt;br /&gt;&lt;br /&gt;My intent is not to put down Parrot as I really want  to use it but I want to voice my fears and hope to understand the  parrot-dev perspective on making Parrot a stable (for some definition of  stable) platform to build on.&lt;/blockquote&gt;This really is two questions rolled into one:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Parrot has been in development for about 10 years, why are these big changes being made so late in the project? &lt;/li&gt;&lt;li&gt;Are these big changes going to affect the stability of the external API, and is Parrot a stable, reliable platform for HLL designers?&lt;/li&gt;&lt;/ol&gt;I'll try to tackle these two separately.&lt;br /&gt;&lt;br /&gt;The 0.0.1 release of Parrot was cut in September 2001, according to &lt;a href=&quot;http://trac.parrot.org/parrot/browser/trunk/docs/parrothist.pod&quot;&gt;documentation in our repository&lt;/a&gt;. I don't know much about the early history of the project; I've only been a Parrot contributor for about &lt;a href=&quot;http://wknight8111.blogspot.com/2008/02/yay-im-being-helpful.html&quot;&gt;two and a half years now&lt;/a&gt;, about one fifth of the total life of the project. Looking through the &lt;a href=&quot;http://trac.parrot.org/parrot/browser/trunk/NEWS&quot;&gt;NEWS&lt;/a&gt; entries starting back at 0.0.2, it does look like things were moving at a rapid pace back in 2001 and so maybe Parrot should be a lot further along than it is now.&lt;br /&gt;&lt;br /&gt;There are a few responses to this. The obvious ones: Volunteer developers are a limited resource, and Parrot is an enabling technology so many developers have been focusing their efforts outside the core (HLL compilers, libraries, programs written using both of those, etc). Core development effort and HLL compiler development effort are  certainly not directly transferable, but in the early years there was a  lot of cross-work among the central developers, and this did play a factor.  There are less obvious reasons, such as attempts to support various platforms (Parrot has supported or attempted to support several architecture and compiler combinations, some of which were exotic even 10 years ago), attempts to improve performance throughout (sometimes prematurely), and the fact that the NEWS file is misleading because the early &quot;action-packed&quot; releases that seem to show a high development velocity were not time-based releases and often represent several months of work. Hell, there were only 6 releases in all of 2003 and 2004 combined, but the NEWS entries for those releases don't look any more impressive than the &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/parrot-240-sulfur-crest-released.html&quot;&gt;news release for 2.4&lt;/a&gt;. The pace of development is certainly not constant (though I would say it is increasing) and while 10 years looks like a lot, it's 10 years of inconsistent development time from contributors with other things going on as well. &lt;br /&gt;&lt;br /&gt;The biggest factor to keep in mind is that Parrot development from 2001 until 2010 &lt;i&gt;didn't happen in a straight line&lt;/i&gt;. Parrot started out as simply the internals engine for the Perl6 compiler and grew to become larger than that. Along the way a lot of designs and plans were hammered out, then thrown away entirely. As I mentioned last time however, there isn't a whole hell of a lot of prior art in the area of dynamic language VMs; guesses were made and some of them ended up being wrong. &lt;br /&gt;&lt;br /&gt;We could have declared Parrot more or less &quot;complete&quot; some time ago and shipped a program that was known to have some serious flaws. Instead what we've been doing, and what I think is the more responsible course of action: fix it until it is correct. So to answer the first question: yes it's been 10 years, but Parrot isn't perfect yet and we are going to continue working on it until it is, &lt;i&gt;however long that takes&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;The second question can itself be decomposed into several parts: Will things that I rely on change? If so, how quickly will they change? Will the work I do now need to be thrown out when the next big feature set lands? Is Parrot mature enough for me to build on top of it a software project that I want to lead into maturity? These are all good questions, and very concerning for HLL developers. The answer isn't clear-cut, but I will try to explain it as well as I can.&lt;br /&gt;&lt;br /&gt;The most important point I can raise when tackling this question is to mention &lt;a href=&quot;http://trac.parrot.org/parrot/browser/trunk/docs/project/support_policy.pod&quot;&gt;our support policy&lt;/a&gt;. Our support policy, which I have complained about as being too strong, goes something like this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;We have 4 supported releases per year, every 3 months. We support these releases, including bug fixes, until the next supported release comes out. HLL compilers and other external projects are highly encouraged to target these supported releases (many do not, but they do so at their own risk).&lt;/li&gt;&lt;li&gt;We have a defined external API which cannot be changed without notice. A deprecation notice for any change to any externally-visible feature or behavior must be included in a supported release before that interface can be changed or removed. Assuming you target supported releases as suggested in #1 above, this means you have 3 months of prior warning to prepare your project before disruptive changes to Parrot are made.&lt;/li&gt;&lt;li&gt;New features that are added will be tagged &quot;experimental&quot; so projects can examine them, provide feedback, and get an idea of where things will be going in the future. If people start relying on experimental features and new problems aren't created, they tend to stay around. &lt;/li&gt;&lt;li&gt;Not quite part of the policy, but still relevant: When we cut releases, or change features, we try to do extensive testing in HLLs and external projects. Where problems are found, we typically try to either offer fixes or workarounds.&lt;/li&gt;&lt;/ol&gt;It's interesting to note that many of our most disruptive changes in recent months were actually driven by the HLLs and external projects themselves, as fixes to bugs or longstanding problems. It's also worth mentioning that when the question is raised most HLL developers seem to want Parrot to make fixes and improvements more rapidly than it has been doing.&lt;br /&gt;&lt;br /&gt;Another part of the question is whether the new features and things that we will be adding/changing in coming months will be gradual and be able to be inserted non-disruptively into existing software projects. Let's give a quick rundown of some systems that could be seeing major changes in the next couple months:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;GC&lt;/b&gt;: GC is a very internal thing, when it works properly, you don't even need to know it exists. Any changes here, so long as they don't introduce bugs, will be invisible to the HLL developer, and will only serve to improve performance (or, improve it under certain workloads, depending on algorithm).&lt;/li&gt;&lt;li&gt;&lt;b&gt;JIT&lt;/b&gt;: In the past the JIT system was separate, and you needed a separate command-line switch to activate it. In the future, I'm hoping we get a trace-based system that kicks in automatically when a need is detected. JIT, like GC, shouldn't change execution behavior, only performance, so changes here should be invisible to the HLL developer.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Threads&lt;/b&gt;: We don't really have a good, working, reliable threads implementation now and HLLs are generally not using them. Anything we add/change/fix will be as good as a newly-implemented feature and can be added post-facto by HLL developers with no stress.&lt;/li&gt;&lt;li&gt;&lt;b&gt;NCI&lt;/b&gt;: This mostly affects users of external libraries, and writers of interfaces to those projects. Improved NCI gives us improved access to more libraries. The interface here may change in a disruptive way but, I hope, this won't be a huge issue to most projects&lt;/li&gt;&lt;li&gt;&lt;b&gt;Packfiles&lt;/b&gt;: Packfiles aren't really portable now, so people haven't been using them to their potential. In any case, Packfile structure and handling are mostly transparent to the HLL developer. In the future what we will see are better usage patterns, improved performance and decreased bug volume, at no expense to the HLL developer.&lt;/li&gt;&lt;li&gt;&lt;b&gt;PCC&lt;/b&gt;: We have a pretty extensive library of tests for PCC behavior and a defined standard inferface that won't be changing any time soon. Sure, the internals may change (hopefully become faster) and new features will be added, but exising code will not notice.&lt;/li&gt;&lt;li&gt;&lt;b&gt;PASM&lt;/b&gt;: We're looking to add a suite of optimizations to PASM. These optimizations will likely be opt-in initially, so absolutely nothing changes for HLL developers who don't want them. If you do want them, your programs will probably only get faster at runtime at the cost of some additional processing in the compiler. This is a standard and non-exciting trade-off that most good compilers offer to their users.&lt;/li&gt;&lt;/ol&gt;In summary, Parrot is a good, stable platform for HLL developers to use. Yes there are big changes planned to the internals of the VM, but most of them are going to bring big improvements to the compilers and library projects that run on top of Parrot, without affecting the externally-visible interface much and without bringing new problems. That really is one of the driving benefits of a VM system like Parrot: Write the improvement once and get the benefits everywhere. The interface is in flux, but changes happen slowly and with plenty of prior warning (and support, where support is needed). As the big systems in Parrot get fixed, things will get even more stable and the benefits will become even more apparent.&lt;br /&gt;&lt;br /&gt;I hope that helps answer some concerns.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-2802260404555382380?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 21 May 2010 14:05:37 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: Parrot 2.4.0 &quot;Sulfur Crest&quot; Released!</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-5061561537336116781</guid>
	<link>http://wknight8111.blogspot.com/2010/05/parrot-240-sulfur-crest-released.html</link>
	<description>&lt;blockquote&gt;&quot;So there me was beating boulder into powder because me couldn't eat it, and magic ball land in lap. Naturally me think, &quot;All right, free egg.&quot; because me stupid and me caveman. So me spent about three days humping and bust open with thigh bone so me could eat it good. Then magic ball shoot Oog with beam, and next thing me know me go out and invent wheel out of dinosaur brain. Magic dino wheel rolls for three short distance until me eat it. The point is, me get smarter. Soon me walk upright, me feather back dirty, matted hair into wings for style, and me stop to use bathroom as opposed to me just doing it as me walk. &quot; -- Oog, Aqua Teen Hunger Force&lt;/blockquote&gt;&lt;br /&gt;On behalf of the Parrot team, I'm proud to announce Parrot 2.4.0 &quot;Sulfur Crest.&quot; &lt;a href=&quot;http://parrot.org/&quot;&gt;Parrot&lt;/a&gt; is a virtual machine aimed at running all dynamic languages.&lt;br /&gt;&lt;br /&gt;Parrot 2.4.0 is available on &lt;a href=&quot;ftp://ftp.parrot.org/pub/parrot/releases/devel/2.4.0/&quot;&gt;Parrot's FTP site&lt;/a&gt;, or &lt;a href=&quot;http://parrot.org/download&quot;&gt;follow the download instructions&lt;/a&gt;.  For those who would like to develop on Parrot, or help develop Parrot itself, we recommend using &lt;a href=&quot;http://subversion.apache.org/&quot;&gt;Subversion&lt;/a&gt;  on &lt;a href=&quot;https://svn.parrot.org/parrot/trunk/&quot;&gt;our source code repository&lt;/a&gt; to get the latest and best Parrot code.&lt;br /&gt;&lt;br /&gt;Parrot 2.4.0 News:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;- Core&lt;br /&gt;  + Various long-standing bugs in IMCC were fixed&lt;br /&gt;  + STRINGs are now immutable.&lt;br /&gt;  + use STRINGNULL instead of NULL when working with strings&lt;br /&gt;  + Fixed storage of methods in the NameSpace PMC&lt;br /&gt;  + Added :nsentry flag to force method to be stored in the NameSpace&lt;br /&gt;  + Added StringBuilder and PackfileDebug PMCs&lt;br /&gt;  + Added experimental opcodes find_codepoint and unroll&lt;br /&gt;- Compilers&lt;br /&gt;  + Fixed reporting of line numbers in IMCC&lt;br /&gt;  + Removed deprecated NQP compiler, replaced with new NQP-RX&lt;br /&gt;  + Removed NCIGen compiler&lt;br /&gt;- Deprecations&lt;br /&gt;  + Tools to distribute on CPAN were removed&lt;br /&gt;  + Deprecated dynpmcs have been removed to external repositories&lt;br /&gt;  + Removed RetContinuation PMC&lt;br /&gt;  + Removed CGoto, CGP, and Switch runcores&lt;br /&gt;- Tests&lt;br /&gt;  + Many tests for the extend/embed interface were added&lt;br /&gt;  + done_testing() is now implemented in Test::More&lt;br /&gt;- Tools&lt;br /&gt;  + The fakexecutable tapir is renamed parrot-prove&lt;br /&gt;  + Performance fixes to the pbc_to_exe tool&lt;br /&gt;  + Fix data_json to work outside of trunk&lt;br /&gt;  + The dynpmc GzipHandle (zlib wrapper) was added&lt;br /&gt;  + The library Archive/Tar.pir was added.&lt;br /&gt;  + The library Archive/Zip.pir was added.&lt;br /&gt;  + The libraries LWP.pir, HTTP/Message.pir &amp;amp; URI.pir were added.&lt;br /&gt;- Miscellaneous&lt;br /&gt;  + Six Parrot-related projects accepted to GSoC&lt;br /&gt;  + Improve use of const and other compiler hints&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Thanks to all our contributors for making this possible, and our sponsors for supporting this project.  Our next release is 15 June 2010.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-5061561537336116781?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 21 May 2010 13:56:01 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: GSoC Project: NCI and Stack Frame Improvements</title>
	<guid>http://www.parrot.org/167 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/gsoc-project-nci-and-stack-frame-improvements-0</link>
	<description>&lt;p&gt;My Google Summer of Code (2010) objectives are to integrate libffi into the NCI framework and to build a new Stack Frame builder that takes advantage of the llvm.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/gsoc-project-nci-and-stack-frame-improvements-0&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Thu, 20 May 2010 18:55:15 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: Bright Blue Yonder</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-4114836344040099802</guid>
	<link>http://wknight8111.blogspot.com/2010/05/bright-blue-yonder.html</link>
	<description>Yesterday &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/parrot-240-sulfur-crest-released.html&quot;&gt;I released 2.4, &quot;Sulfur Crest&quot;&lt;/a&gt;. It's a cooler, more succinct name than &quot;&lt;a href=&quot;http://en.wikipedia.org/wiki/Sulfur-crested_Cockatoo&quot;&gt;Sulfur-Crested Cockatoo&lt;/a&gt;&quot;. Every time I do a Parrot release I find myself searching through Wikipedia to look for interesting Parrot names (and colorful pictures too!).&lt;br /&gt;&lt;br /&gt;I picked an &lt;i&gt;interesting&lt;/i&gt; quote for the release announcement. Amid the broken grammar and colorful imagery was a key point that I wanted to express: Parrot is getting smarter.&lt;br /&gt;&lt;br /&gt;If you had told me two years ago, or even a year ago, that Parrot would have the features it has now, or that it would be on the verge of adding the features that we are currently planning, I might have been incredulous. Parrot has matured a lot recently, and I really think all that effort is going to start paying off. &lt;br /&gt;&lt;br /&gt;Parrot had a lot of features when I first joined the project. Many of these were first drafts and prototypes which have since been ripped out or reimplemented. This is a normal, natural, healthy part of the software development process, and nobody should be surprised or upset about it. Pop quiz: Name for me one other dynamic language virtual machine, open-source or otherwise, that aims to support the same number of programming languages and runtime environments that Parrot aims to support? Smalltalk comes to mind as a virtual machine for a dynamic language, but that VM backend was never intended to support anything besides Smalltalk. At least, not well. .NET supports a few languages, but is certainly not dynamic.&lt;br /&gt;&lt;br /&gt;There's a great rule in programming that we always throw the first one away. The first draft is never the final manuscript, the first stab in the dark never hits the target. The original Parrot designers and developers didn't have a whole hell of a lot of prior art to copy from. They made some guesses, but there was no way they could have gotten everything right the first time, no way they could have forseen all the problems that the project would run into over time. But that lack of information and that uncertainty can't hold people back. You grit your teeth, you write a prototype, and you resolve to yourself that &lt;i&gt;you always throw the first one away&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Let's take JIT for an example. In a basic JIT system, you have a snippet of code with a runtime cost of &lt;i&gt;E&lt;/i&gt;. A JIT attempts to compile that code into a piece of machine code with a runtime:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;OE &amp;lt; E&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Where &lt;i&gt;O&lt;/i&gt; is some sort of optimization factor. Of course, there is some kind of overhead &lt;i&gt;H&lt;/i&gt;, in compiling the code at runtime:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;H + OE &amp;lt; E&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;H&lt;/i&gt; involves constructing the machine code and performing optimizations. The more optimizations we perform, the larger &lt;i&gt;H&lt;/i&gt; gets, but the smaller &lt;i&gt;O&lt;/i&gt; can get. If &lt;i&gt;E&lt;/i&gt; is large enough and if we tune &lt;i&gt;H&lt;/i&gt; properly, eventually we cross a threshold and the left side of the inequality becomes smaller than the right side of the equation. At this point, JIT is a net performance win for the application. Simple, right?&lt;br /&gt;&lt;br /&gt;Anyway, I'll skip the rest of the theory lesson. The point is this: Parrot's original JIT didn't really have anything a modern compiler system would recognize as &quot;optimization passes&quot;, so it wasn't really tunable. It also didn't readily support code generation on any platform besides x86. These things weren't going to be easy (or, even possible) to add either. When the burden of maintenance became too high, and when it was clear that the old prototype system was doing more harm than good, &lt;a href=&quot;http://wknight8111.blogspot.com/2009/09/jit-first-project-challenge.html&quot;&gt;we ripped it out&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There were a number of such systems in early Parrot, prototype code that got Parrot up to the first plateau but needed to be redesigned and reimplemented for Parrot to move up to the next one.  There are several projects either going on right now, or about to get started to work on these systems. When you look at the list, you realize that while it's ambitious, with the current team and the current state of the VM it is entirely plausible that they will all succeed. A quick overview:&lt;br /&gt;&lt;br /&gt;Allison, Bacek and chromatic are talking about several ideas for implementing new, more efficient GC algorithms to replace our first GC prototype.&lt;br /&gt;&lt;br /&gt;Plobsing has been hard at work redoing our freeze/thaw serialization system and, along with NotFound and others is working to fix several long-standing bugs in the PBC system.&lt;br /&gt;&lt;br /&gt;Nat Tuck is preparing a GSoC project to&lt;a href=&quot;http://www.parrot.org/content/hybrid-threads&quot;&gt; implement a new threading system&lt;/a&gt; to replace the first prototype version of that system.&lt;br /&gt;&lt;br /&gt;Tyler Curtis is preparing a GSoC project to implement a first prototype of a &lt;a href=&quot;http://www.parrot.org/content/past-optimization&quot;&gt;PAST optimization system&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Daniel Arbelo is preparing his GSoC project to implement a first prototype of the &lt;a href=&quot;http://www.parrot.org/content/what-nfg-why-you-want-parrot-have-it&quot;&gt;NFG string normalization form&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Muhd Khairul Syamil Hashim Is putting together a GSoC project to implement an &lt;a href=&quot;http://www.parrot.org/content/instrumenting-parrot&quot;&gt;instrumentation framework&lt;/a&gt; for Parrot so we can get some high-quality analysis and debugging tools for Parrot.&lt;br /&gt;&lt;br /&gt;John Harrison is preparing his GSoC project to develop a new NCI frame builder with LLVM, which will replace the old prototype frame builder and (hopefully) lay the groundwork to start replacing our prototype JIT system. &lt;br /&gt;&lt;br /&gt;...and there are even other projects that I can't think of off the top of my head right now too.&lt;br /&gt;&lt;br /&gt;If you had told me a year or two ago that all these projects would be on the table, or that we would have such high chances of them all succeeding, I would have called you crazy. But after all the work we've put in between then and now, and considering the high caliber of our development team, I'm feeling pretty confident that we will be successful and Parrot is going to gain some of these awesome new features. Cross  your fingers!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-4114836344040099802?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 20 May 2010 01:04:09 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>parrot.org: UCS-4, NFG and how the grapheme table makes it awesome.</title>
	<guid>http://www.parrot.org/165 at http://www.parrot.org</guid>
	<link>http://www.parrot.org/content/ucs-4-nfg-and-how-grapheme-tables-makes-it-awesome</link>
	<description>&lt;p&gt;After laying down the foundations of what NFG does in previous blog posts I've started implementing, as part of my work in this Summer of Code, a new Unicode encoding for parrot, UCS-4.  In this post I'll try to explain what it is and how it makes NFG easier to achieve.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.parrot.org/content/ucs-4-nfg-and-how-grapheme-tables-makes-it-awesome&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 18 May 2010 21:06:26 +0000</pubDate>
</item>
<item>
	<title>Khairul: Ops</title>
	<guid>http://parrot.mangkok.com/?p=77</guid>
	<link>http://parrot.mangkok.com/?p=77</link>
	<description>&lt;p&gt;In Parrot, opcodes are currently implemented as a standalone piece of code that is invoked whenever its corresponding opcode number is encountered in the bytecode. Each opcode is described internally through the use of an op_info_t struct, which, taking from &amp;lt;parrot/op.h&amp;gt; is the following:&lt;/p&gt;
&lt;pre class=&quot;syntax c&quot;&gt;typedef struct op_info_t {
    const char    *name;
    const char    *full_name;
    const char    *func_name;
    unsigned short jump;
    short          op_count;
    arg_type_t     types[PARROT_MAX_ARGS];
    arg_dir_t      dirs[PARROT_MAX_ARGS];
    char           labels[PARROT_MAX_ARGS];
} op_info_t;
&lt;/pre&gt;
&lt;p&gt;These descriptions are stored as an array, with the index of each entry being the opcode’s own opcode number. This array is pointed to by a field within the interpreter struct, the field being “op_info_table”. This is just for the descriptions of the opcodes. In Parrot, currently each opcode is defined in a C-ish language that gets parsed into C source code, with each opcode constituting a function that satisfies the following function prototype:&lt;/p&gt;
&lt;pre class=&quot;syntax c&quot;&gt;typedef opcode_t *(*op_func_t)(opcode_t *, PARROT_INTERP);&lt;/pre&gt;
&lt;p&gt;Similar to the opcode descriptions, these opcode function pointers are stored as an array, with the opcode’s number being the index to the position of the opcode’s function pointer. This table is pointed to by the field “op_func_table” within the interpreter’s struct.&lt;/p&gt;
&lt;p&gt;So what happens during execution? A pointer, which is the program counter (PC), is passed to the runcore’s runops function. This runops function is the one that looks up the function pointer for the current op pointed to by the PC and calls that function for execution.&lt;/p&gt;
&lt;p&gt;The code for an opcode will do a number of things. First, it will grab the current context of the interpreter. The current context consists of a number of items, but chief and most important is that the current context holds the current values of the registers (Parrot being a register-based VM). With this context, it will then grab the required values from certain registers and after performing the required logic, will write values to a certain register. After that, it will advance the PC by a certain number, which generally is (PC + 1 + NO_OF_PARAMS)).&lt;/p&gt;
&lt;p&gt;So how would you know which registers the parameters are in? The PC actually points to somewhere within the bytecode. Generally, the PC will point to the start of an opcode. If an opcode has no parameters, advancing the PC by 1 will get us to the next opcode to execute. However, if the opcode has parameters, advancing the PC by 1 will get us the register or INTVAL constant for the first parameter. Similarly, advancing by 2 will yield the register or INTVAL constant for the second parameter.&lt;/p&gt;
&lt;p&gt;This is all well and good except for the fact that Parrot allows the loading of dynamic op libs, which extends the capabilities of the VM by providing additional ops, similar to how MMX/SSE/SSE2/etc extends the capabilities of an x86 processor. Parrot also shares the two tables “op_info_table” and “op_func_table” between interpreters, which does make sense, as having duplicates of these tables can be expensive memorywise, given that Parrot already has more than 1000 core opcodes.&lt;/p&gt;
&lt;p&gt;Handling these two issues won’t be trivial. With regards to dynamic op libs, there needs to be a way to detect when the library being loaded is a dynop library. One way is to trap loadlib opcodes and then peek to check if the op tables change. It would also be good to investigate if we can duplicate any shared tables such that the interpreter running the instruments has its own private tables that will be untouched by any changes to the tables of other interpreters.&lt;/p&gt;</description>
	<pubDate>Mon, 17 May 2010 15:08:49 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: Immutable Strings branch performance</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-9195218358735026361</guid>
	<link>http://wknight8111.blogspot.com/2010/05/immutable-strings-branch-performance.html</link>
	<description>Parrot now uses immutable strings internally for it's string operations. In a lot of ways this was a real improvement in terms of better code and better performance for many benchmarks. However, many HLL compilers, specifically NQP and Rakudo suffered significant performance &lt;i&gt;decreases&lt;/i&gt; with immutable strings. Why would this be?&lt;br /&gt;&lt;br /&gt;It turns out that Immutable strings are great for many operations. Copy operations are cheap, maybe creating a new STRING header to point to an existing buffer. There's no sense to actually copy the buffer because nobody can change it. Substrings are likewise very cheap, consisting of only a new STRING header pointing into the middle of an existing immutable buffer.&lt;br /&gt;&lt;br /&gt;Some operations however are more expensive. A great example of that is string appends. When we append two strings, we need to allocate a new buffer, copy both previous buffers into the new buffer (possibly translating charset and encoding to match) and creating a new header to point to the new buffer. With the older system of COW strings, appends were far less expensive, and many pieces of code--especially NQP and PCT code generators--used them in large numbers.After the switch to immutable strings, any code that was optimized to use lots of cheap appends began to take huge amounts of time and waste lots and lots of memory.&lt;br /&gt;&lt;br /&gt;The solution to these problems is not to use many bare append operations on native strings, but instead to create a new StringBuilder PMC type. StringBuilder stores multiple chunks of strings together in an array or tree structure, and only coalesces them together into a single string buffer when requested. This allows StringBuilder to calculate the size of the allocated string buffer only once, only perform a single set of copies, not create lots of unnecessary temporary STRING headers, etc.&lt;br /&gt;&lt;br /&gt;Several contributors have worked on a branch, &quot;codestring&quot;, for this purpose, and some results I saw this morning are particularly telling about the performance improvements it brings. Here's numbers from the benchmark of building the Rakudo compiler:&lt;br /&gt;&lt;pre&gt;JimmyZ: trunk with old nqp-rx real:8m5.546s user:7m37.561s sys:0m10.281s&lt;br /&gt;JimmyZ: trunk with new nqp-rx real:7m48.292s user:7m11.795s sys:0m10.585s&lt;br /&gt;JimmyZ: codestring with new nqp-rx real:6m58.873s user:6m22.732s sys:0m6.356s&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The &quot;new nqp-rx&quot; he's talking about there is nqp-rx modified to make better use of the new CodeString and StringBuilder PMCs in the branch. The numbers are quite telling, build time is down about 12%. I think the finishing touches are being put on, and the branch will be merged back to trunk soon.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-9195218358735026361?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 13 May 2010 12:35:11 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 05 May 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40351?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40351?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 05 May 2010.  Larry, Allison, Patrick, Will, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;various spec updates, some major&lt;/li&gt;&lt;li&gt;removed &lt;code&gt;p5=&amp;gt;&lt;/code&gt; description because it's not supported in core&lt;/li&gt;&lt;li&gt;deleted &lt;code&gt;self:sort&lt;/code&gt; construct because self isn't a real syntactic category&lt;/li&gt;&lt;li&gt;explained Perl patterns in terms of PEGs, and spec'ed tiebreaking rules explicitly&lt;/li&gt;&lt;li&gt;last but not least, finally purveyed the long-threatened revamp of proto to keep routine and method semantics similar&lt;/li&gt;&lt;li&gt;they all now work much more like the multiple dispatch semantics currently used by STD, where we always call the proto first&lt;/li&gt;&lt;li&gt;the proto is then always in charge of the actual multiple dispatch; it can of course delegate that&lt;/li&gt;&lt;li&gt;and the default for a null body corresponds closely to current semantics&lt;/li&gt;&lt;li&gt;in hacking news, the lexer generator mislaid any alternative that was a bare &lt;code&gt;.&lt;/code&gt; pattern, so cursor_fate never called its alternative, oops&lt;/li&gt;&lt;li&gt;took me a long time to run that one down, because it resulted in a horrendous backtrack causing mysterious misplaced errors&lt;/li&gt;&lt;li&gt;revamped character class parsing to be more helpful and correct&lt;/li&gt;&lt;li&gt;STD now check a normal regex bracket's innards for old-school character class, and warns if found&lt;/li&gt;&lt;li&gt;added a &lt;code&gt;.looks_like_cclass&lt;/code&gt; method to Cursor to detect most accidental uses of P5 ranges&lt;/li&gt;&lt;li&gt;some valid P6 brackets will complain, but the workarounds are easy&lt;/li&gt;&lt;li&gt;just put whitespace on both ends is one way&lt;/li&gt;&lt;li&gt;removed a few of these old-school-ish character classes from STD&lt;/li&gt;&lt;li&gt;changed &lt;code&gt;:tr&lt;/code&gt; language to &lt;code&gt;:cc&lt;/code&gt; language since character classes share it&lt;/li&gt;&lt;li&gt;(translation pays more attention to ordering, but the language is the same)&lt;/li&gt;&lt;li&gt;turned out parsing character classes discovered issues in STD; various character classes needed to backslash &lt;code&gt;#&lt;/code&gt; that would otherwise be a comment&lt;/li&gt;&lt;li&gt;to that end, we now allow &lt;code&gt;\#&lt;/code&gt; in character classes instead of misparsing as unspace&lt;/li&gt;&lt;li&gt;if we find an invalid &lt;code&gt;-&lt;/code&gt; in a regex, we now presume we're in an old-school character class and fail with a sorry instead of a panic to give the character class code a shot at it&lt;/li&gt;&lt;li&gt;STD now uses &lt;code&gt;~&lt;/code&gt; syntax for regex brackets to set &lt;code&gt;$*GOAL&lt;/code&gt; correctly&lt;/li&gt;&lt;li&gt;cleaned up recursive panic detection; it was possible to get both false positives and negatives before&lt;/li&gt;&lt;li&gt;STD shouldn't use 'note' to emit a panic inside a suppose because that leaks the message that should be trapped&lt;/li&gt;&lt;li&gt;STD now suppresses duplicate &lt;code&gt;sorry&lt;/code&gt; messages more correctly&lt;/li&gt;&lt;li&gt; &lt;code&gt;sorry&lt;/code&gt; no longer uses &lt;code&gt;panic&lt;/code&gt; in a supposition, but dies directly to throw the exception to the suppose's try block&lt;/li&gt;&lt;li&gt;STD now allows subscripts on regex variables so &lt;code&gt;$x[0]&lt;/code&gt; isn't taken as a character class; still needs speccing&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;can we make them consistent?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;historically S05 has allowed bare arrays to mean interpolation&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we've never had a working implementation of that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;a bare &lt;code&gt;@&lt;/code&gt; would be illegal&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;it's currently illegal&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;you'd have to backslash it to match part of an email address&lt;/li&gt;&lt;li&gt;it's not like the &lt;code&gt;@&lt;/code&gt; alternations are a big deal one way or another&lt;/li&gt;&lt;li&gt;that'd be a little more consistent&lt;/li&gt;&lt;li&gt;I forced it to think of the sigil as &lt;code&gt;$&lt;/code&gt; than what it really is&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;after seeing how Jonathan et all did interpolation for quoted strings, I thought we should do the same thing in regexes&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;STD now has a partial fix to prevent leakage of &lt;code&gt;::T&lt;/code&gt; from role signatures&lt;/li&gt;&lt;li&gt;unfortunately, the current fix will lose signatures of file-scoped generic roles&lt;/li&gt;&lt;li&gt;this probably has to do with not knowing whether we're really going to want a new pad; unfortunately we'd have to look ahead to know that currently&lt;/li&gt;&lt;li&gt;various other minor tweaks and bug fixes in STD and Cursor&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;mostly responding to messages and reports&lt;/li&gt;&lt;li&gt;should be able to get back to coding full-time and online for the next week&lt;/li&gt;&lt;li&gt;plan to resolve the list and closure issues with NQP and Rakudo&lt;/li&gt;&lt;li&gt;will answer other questions and try to keep other people productive&lt;/li&gt;&lt;li&gt;planning for the Rakudo Star release on June&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;busy with the last week of classes&lt;/li&gt;&lt;li&gt;spent most of it writing a little language with PCT&lt;/li&gt;&lt;li&gt;it was easy to use and easy to swap the stages of PCT&lt;/li&gt;&lt;li&gt;I remembered what Patrick did with LOLCODE&lt;/li&gt;&lt;li&gt;also had a discussion of source code control systems&lt;/li&gt;&lt;li&gt;next week should be more productive&lt;/li&gt;&lt;li&gt;need to work more closely with Debian packagers to get packages into Debian&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;cleaning out as many deprecations in Parrot as possible&lt;/li&gt;&lt;li&gt;trying to improve the speed of CodeString after the immutable STRINGs merge&lt;/li&gt;&lt;li&gt;bundling lots of little concats helps&lt;/li&gt;&lt;li&gt;hope to merge in an optimization branch for that by the weekend&lt;/li&gt;&lt;li&gt;want to make that faster or less memory intensive&lt;/li&gt;&lt;li&gt;may require the use of a new StringBuilder for Parrot&lt;/li&gt;&lt;li&gt;hopefully will result in a faster Rakudo build&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I've never seen CodeString take a long time&lt;/li&gt;&lt;li&gt;unless you run into memory problems&lt;/li&gt;&lt;li&gt;&lt;p&gt;

* discussion of the StringBuilder PMC *&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;still working on optimizations, particularly CodeString&lt;/li&gt;&lt;li&gt;looking at more PBC and PBC-building optimizations&lt;/li&gt;&lt;li&gt;PBC size went down dramatically and startup improved for Rakudo&lt;/li&gt;&lt;li&gt;should have that much faster for the 2.4 release&lt;/li&gt;&lt;li&gt;will poke at GC tasks starting next week&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Mon, 10 May 2010 06:07:34 +0000</pubDate>
</item>
<item>
	<title>Khairul: Instrumenting Parrot</title>
	<guid>http://parrot.mangkok.com/?p=4</guid>
	<link>http://parrot.mangkok.com/?p=4</link>
	<description>&lt;p&gt;Having an instrumentation framework opens the doors to having many different tools that can help to diagnose problems within a piece of code. One main example of this is Valgrind. Valgrind provides an interface for making many different tools that help to diagnose and identify certain specific problems, ranging from memory leaks to multithreaded data races between threads. Furthermore, the framework is also used to provide profiling tools, such as Callgrind and Cachegrind, to determine useful information such as call graphs and execution times of functions. As such,  given a good framework to work with, a whole new world of performance and error analysis tools is opened up.&lt;/p&gt;
&lt;p&gt;In the case of Parrot, which aims to be the virtual machine for many different kinds of languages, having such a framework can assist in creating debugging tools that cater to each languages’ idiosyncrasies or be general enough to apply to all. With proper hooks in place, such a framework can also provide the ability to inspect on the inner workings of the virtual machine itself, introspection that is more in depth that what is currently offered in the various PMCs offered by Parrot.&lt;/p&gt;
&lt;p&gt;Thus, over the summer I will be working on creating such a framework for Parrot. In general terms, I would be looking to create an interface for various user-generated tools to hook into a Parrot program. Such tools can be written in PIR, and are run in a separate interpreter from the code to instrument against. There will be three layers that I hope to be able to provide an interface for instrumenting, which are the opcode layer, PMC layer and the GC layer. Explanations for these three layers are given below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Opcode layer&lt;/strong&gt;&lt;br /&gt;
This layer allows the tools to profile and inspect the code on an opcode level. Abstractions can be made such that the tools can inspect on subroutine, class or file levels.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PMC layer&lt;/strong&gt;&lt;br /&gt;
This layer allows the tools to observe the creation, deletion and accesses of the various PMCs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GC layer&lt;/strong&gt;&lt;br /&gt;
This layer allows the tools to observe the behavior of the GC, seeing when it is invoked, what gets freed and etcetera.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I intend to implement the interfaces in the order shown above and as each layer gets implemented, create tools that serve specific purposes such as call graphing, I/O monitoring and more. Tentatively, the API for the tools should look like the following:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;$P0 = new ['Instrument']&lt;br /&gt;
$P0.’attach’(‘ops’, ‘catchall’, ’sub_callback)&lt;br /&gt;
$P0.’finalize’(‘finalize_sub’)&lt;br /&gt;
$P0.’run’(args)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;In the example shown above, the ‘:main’ subroutine of the tool will perform the required initialization, creating an Instrument instance that it then registers callbacks into before executing the code to instrument against.&lt;/p&gt;
&lt;p&gt;During this Community Bonding period, I will be prototyping the instrumenting framework as a PMC and will be looking at ways on how to insert hooks into the various PMCs and the GC subsystem in a safe manner. I would be posting more information on the project based on my prototyping efforts here and at the following blog, http://parrot.mangkok.com, and would welcome any feedback regarding this project on #parrot or through email at khairulsyamil@gmail.com.&lt;/p&gt;</description>
	<pubDate>Sun, 09 May 2010 16:13:18 +0000</pubDate>
</item>
<item>
	<title>Andrew Whitworth: The Merits of a Distributed Workflow</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-4152059276838835007</guid>
	<link>http://wknight8111.blogspot.com/2010/05/merits-of-distributed-workflow.html</link>
	<description>Long-time Parrot contributor &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/svn-or-git.html?showComment=1273113716110#c856831411754526027&quot;&gt;kid51 posted a nice comment&lt;/a&gt; on &lt;a href=&quot;http://wknight8111.blogspot.com/2010/05/svn-or-git.html&quot;&gt;my previous post about Git and SVN&lt;/a&gt;. He had some issues with the proposed distributed workflow I suggested. As my reply started to grow far too long for the stupid little blogger comment edit box, I realized I should turn it into a full blog post.&lt;br /&gt;&lt;br /&gt;I've been pretty conflicted myself over the idea of a release manager. On one hand releases are boring which means anybody can do them and they don't require a huge time commitment. On the other hand, there is hardly a lot of &quot;management&quot; that goes on in a release: The release manager has some authority to declare a feature freeze and has some ability to select which revision becomes the final release; but that's it. Sure release managers also try to motivate people to perform the regular tasks like updating the NEWS and PLATFORM files, but my experience is that the release manager ends up doing the majority of those tasks herself. I really feel like we need more direction and vision than this most months, and the release manager is a good person (though not the only possible person) to do it.&lt;br /&gt;&lt;br /&gt;Our releases, especially supported releases, have had certain taglines stemming back to PDS in 2008. The 1.0 release was famously labeled &quot;Stable API for developers&quot; and the 2.0 release was labeled &quot;&lt;a href=&quot;http://www.mail-archive.com/parrot-dev@lists.parrot.org/msg00234.html&quot;&gt;ready for production use&lt;/a&gt;&quot;, when even a &lt;a href=&quot;http://wknight8111.blogspot.com/2010/01/parrot-1x-months-and-beyond.html&quot;&gt;cursory review&lt;/a&gt; shows that these two releases hardly met their respective goals. A release manager with more authority to shape that release, and more authority to shape previous releases as well might have done more to change that. A development focus, be it for weekly development between #ps meetings or for a monthly release, only matters if somebody is focusing on it and motivating the rest of the community to focus as well. That person either needs to be the architect or some other single authority (though playing cheerleader and chief motivator constantly would be quite a drain on that person) or the release manager. The benefit to using the release manager to motivate the team and shape the release is--even though it's more of a time commitment for the release manager--that we share the burden and no one person gets burnt out month after month.&lt;br /&gt;&lt;br /&gt;A tiered development system has a number of benefits. Bleeding edge development can occur unfettered (as it happens now in branches). From there we can pull features into integration branches where we assure all the assorted changes and new additions work well together. Development releases can be cherry-picked to represent the stable baseline features that we want people to play with and rely on, and long-term supported releases would represent only those features which are tested, documented, and worthy of being included under our deprecation policy. I don't think end-users of our supported releases should ever be exposed to features marked &quot;experimental&quot;, for instance, or any feature at all that we don't want covered by our long-term deprecation policy. If any feature included in a supported release must be deprecated and cannot be removed or fundamentally altered for at least three more months, we should be particularly careful about including new things in a supported release, and there should be some level of gatekeeper who is able to say &quot;this thing isn't ready for prime time yet&quot;. That person, I think, should be the release manager.&lt;br /&gt;&lt;br /&gt;Compare our system for dealing with new experimental features (Goes into trunk, maybe with mention in #ps but with very little fanfare, and is then automatically included in the next release unless somebody removes it), to a system where features are added to a development branch, vetted, tested, documented, and then pulled into a release candidate branch only when it's known by the community to pass muster. I think that's a much better system and would lead us to releases with higher overall quality and stability.&lt;br /&gt;&lt;br /&gt;All this sort of ignores your point, which is an extremely valid one, that switching to Git represents more than just a small change in the commands that a developer types in to the console. Yes, it's a small difference to say &quot;git commit -a&quot; instead of saying &quot;svn commit&quot;. Yes, it's a small personal change for me to commit locally and then push. The far bigger issues are the community workflow and even the communtity culture changes that will occur because of Git. These things don't need to change, we could lock Git down and use it exactly the way we use SVN now, but I don't think any of the Git proponents in the debate want it that way.&lt;br /&gt;&lt;br /&gt;I would much rather plan for the changes in work flow and even build enthusiasm for them primarily than sell the small changes in tooling and then be swept up in larger culture changes that nobody is prepared for. I think we should want these changes and embrace them, in which case Git is just the necessary vehicle, and not he end in itself.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-4152059276838835007?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 06 May 2010 12:51:01 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: SVN or Git</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-1221685109461480583</guid>
	<link>http://wknight8111.blogspot.com/2010/05/svn-or-git.html</link>
	<description>As I mentioned in my last post, the discussion about whether we move to Git from SVN has been raging pretty hard in the past few days, and while the general opinion seems to be one in favor of a move, there certainly isn't concensus on the point just yet.&lt;br /&gt;&lt;br /&gt;I'm in favor of Git, although I certainly wouldn't list my bent as a &quot;passion&quot; as some opinions in the community have been described. In Parrot world I use SVN exclusively. I could use git-svn, or I could try to use dukeleto's Git mirror on Github, but I don't. As far as I am concerned those add an additional layer of complexity, an additional abstraction that layer that I can ignore most of the time until something goes wrong. It simply isn't worth it to me to try and force a Git interface onto Parrot's SVN repository.&lt;br /&gt;&lt;br /&gt;Let me tell a short story.&lt;br /&gt;&lt;br /&gt;When I was a graduate student I was given a &quot;computer&quot; for my &quot;desk&quot; in my &quot;office&quot; that I could use to do my normal school work and also to develop my thesis. This computer was a complete beast of a performance machine. At least, it had been several years earlier when it was first purchased. By the time I got it, circa 2006, it's 12Gb hard drive and screaming 128Mb RAM weren't quite as impressive comparatively.&lt;br /&gt;&lt;br /&gt;I was paranoid about data integrity, considering I was working on the most important academic project of my whole life on the least qualified machine on campus. So, I took some steps to help shore up my defenses. First thing, I scrounged together several other small harddrives from other dusty computer carcasses. I removed the CDROM drive and jammed four HDDs into my case. Two of them were just hanging inside because there wasn't enough space to physically mount them all. I also had a shared network drive supplied by the university, a flash drive, and a personal laptop.&lt;br /&gt;&lt;br /&gt;I set up SVN on the computer, and backed up my work as follows: On the second drive was where my work was (the first drive was barely large enough to hold Windows XP and the other software I needed). I had a script that I used to simultaneously svn co my work to the third drive and xcopy my working directory to the fourth. I had an hourly task that would then backup my svn repo from the third drive and an xcopy of the directory on the fourth drive to the network shared drive. At the end of each day, I would xcopy my working directory to my flash drive, go home, and store a copy on my personal laptop. About once a week I would email myself a copy of my thesis paper, in hopes that if all else failed, at least Google could safeguard the all-important final deliverable.&lt;br /&gt;&lt;br /&gt;This may all sound excessive, but by the end of the year I had lost two hard drives (one of which actually caught on fire), my flash drive got crushed, and the network drive has experienced several outages.&lt;br /&gt;&lt;br /&gt;Story aside, the idea that there is only one copy of the entire history of the Parrot repository (or even two copies, assuming the server has a tape backup plan) is hardly reassuring to me. This is why I really like the Git idea that everybody has a complete copy of the entire history of the repository.&lt;br /&gt;&lt;br /&gt;Let's look at things from a different angle: Git is a distributed version control system. While it certainly supports it, there is no true need for a single, central, &quot;master&quot; repository to work from. We could, as a community, radically change our workflow if we had Git. If we were going to use it exactly the same way as we currently use SVN, there really isn't enough of a reason to switch.&lt;br /&gt;&lt;br /&gt;What we have now is a single master trunk, which is where most of the action takes place. People make branches, do work, merge them to trunk. Then, on the second Tuesday of every month, somebody copies trunk to a tag, calls it a release, and we continue on with our normal development.&lt;br /&gt;&lt;br /&gt;So let's imagine a different workflow. I'll posit one example, but this certainly isn't the only choice. With Git, everybody has their own local branch where they do work and make commits. Hell, &quot;everybody&quot; here can be a much larger group than the committers we have now: Anybody can make a fork and do work on their own local branches. We could have something like a master integration branch where trusted committers could pull changes from the entire ecosystem. The integration branch would be more like a testbed and less like a master reference copy.&lt;br /&gt;&lt;br /&gt;From the integration branch, a monthly release manager would cherry pick the good stable features of the integration branch into a release master branch. At the end of the cycle, the release manager's master branch would get tagged as a release, and would become the new baseline integration branch. Remaining changes from the previous integration branch could be pulled in if they were worthy or if they gained more maturity. At that point, the old integration branch could disappear, and the cycle starts again.&lt;br /&gt;&lt;br /&gt;This idea is more complex than our current system, but it does have a few nice features. First, we can strive for higher-quality releases by keeping closer track of what ends up in the release branch. Second, we can try to get more people involved by allowing everybody to create a development branch to do &quot;real&quot; work, not just our designated committers. Third, the release manager has more control over releases, including being able to shift the focus on the release and be able to drive it in a way that is not possible now.&lt;br /&gt;&lt;br /&gt;I like Git, I like the idea of it and I like the things that it makes possible. I don't dislike SVN, but it doesn't have any compelling features that make me want to stay with it. SVN is good but not great, and there's one usage pattern for SVN that works but is limiting. SVN isn't hurting Parrot, but it's not lifting us up to the next level either.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-1221685109461480583?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Wed, 05 May 2010 22:21:46 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>Andrew Whitworth: Been away for a while</title>
	<guid>tag:blogger.com,1999:blog-4146794174400139442.post-5959340511496840590</guid>
	<link>http://wknight8111.blogspot.com/2010/05/ive-been-quite-absent-from-all-things.html</link>
	<description>I've been quite absent from all things Parrot in recent weeks. Work and other engagements have been keeping me occupied, and the advent of spring has motivated my family and myself to spend more time outdoors. My son, who has started teething, has the same threshold for deciding to put things into his mouth as the Perl 6 language designers have for putting features into their language: &quot;Doesn't matter what it is, jam it in there!&quot;. But I jest.&lt;br /&gt;&lt;br /&gt;A lot has happened in Parrot-land since I fell off the edge of the world. Parrot 2.3 was released to much fanfare, as always. Allison fixed TT #389, though her strategy was different from what chromatic and I thought was necessary. So long as it works and there are no more bugs, I'm happy to see it closed by any means. TT #389 is one of our older bugs, stemming all the way back to the first Parrot Developer Summit in 2008. It has certainly been a large pain to Rakudo developers in particular.&lt;br /&gt;&lt;br /&gt;Bacek and chromatic also put together an implementation of immutable strings, and following the 2.3 release merged it into trunk. Immutable strings have some performance advantages, but also as was quickly found, some performance drawbacks. Specifically, string append operations can be a little bit more expensive because a new buffer needs to be allocated instead of resizing one of the argument buffers in place. A strategy to get around that, which many of our developers have been pursuing is to reduce the number of append operations.&lt;br /&gt;&lt;br /&gt;The issue of version control software has been bubbling up to the surface again, and a long thread appeared on the mailing list yesterday after some lengthy chats on IRC. If I can continue clawing my way out of my little isolation hole and make another post this week, I would like to discuss that topic a little bit more.&lt;br /&gt;&lt;br /&gt;GSoC students also got selected this week. I'll have plenty to post about that in the coming days and week.&lt;br /&gt;&lt;br /&gt;I'm the release manager for 2.4 coming out on May 18th.  Hopefully it's going to be a good one!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/4146794174400139442-5959340511496840590?l=wknight8111.blogspot.com&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 04 May 2010 23:28:25 +0000</pubDate>
	<author>noreply@blogger.com (Whiteknight)</author>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 28 April 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40338?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40338?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 28 April 2010.  Larry, Allison,
Jerry, Will, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;caught up on a week's worth of backlog&lt;/li&gt;&lt;li&gt;made a few spec tweaks&lt;/li&gt;&lt;li&gt;discussed them with other people&lt;/li&gt;&lt;li&gt;trying to make error messages more awesome in STD&lt;/li&gt;&lt;li&gt;working on the ability to parse the insides of character classes&lt;/li&gt;&lt;li&gt;STD doesn't like parsing itself recursively there&lt;/li&gt;&lt;li&gt;need to iron out a few things&lt;/li&gt;&lt;li&gt;enum names can now be variables&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Debian packages ready to ship to Debian sponsors&lt;/li&gt;&lt;li&gt;putting together a list of GC tasks&lt;/li&gt;&lt;li&gt;cleaned out the existing page, have the big things listed&lt;/li&gt;&lt;li&gt;trying to decide which tasks to do first&lt;/li&gt;&lt;li&gt;doing a lot of reading and research&lt;/li&gt;&lt;li&gt;my little language project is due on Monday&lt;/li&gt;&lt;li&gt;HLLCompiler was enormously useful&lt;/li&gt;&lt;li&gt;will start working on the GC stuff next week&lt;/li&gt;&lt;li&gt;should also start a fresh pass through the ticket queue&lt;/li&gt;&lt;li&gt;added a workaround for the final remaining TT #389 bug&lt;/li&gt;&lt;li&gt;Jonathan had a test case&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;tried to focus on getting Rakudo blockers removed&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;spent some time getting Rakudo to work with trunk&lt;/li&gt;&lt;li&gt;will need a Rakudo guts hacker for the last part&lt;/li&gt;&lt;li&gt;worked on the compact_string revamp branch with Vasily&lt;/li&gt;&lt;li&gt;merged now&lt;/li&gt;&lt;li&gt;that makes trunk about 12% faster than the 2.3.0 release&lt;/li&gt;&lt;li&gt;will work on a few Rakudo profiles once it works with trunk again&lt;/li&gt;&lt;li&gt;expect at least a 5% performance improvement there&lt;/li&gt;&lt;li&gt;have some other ideas, but won't do them without profiling first&lt;/li&gt;&lt;li&gt;came up with a scheme to reduce PBC size by coalescing strings&lt;/li&gt;&lt;li&gt;Peter Lobsinger is exploring that&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Sun, 02 May 2010 00:27:42 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 21 April 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40332?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40332?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 21 April 2010.  Larry, Allison, Patrick, Will, Jerry, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;been under the weather, so didn't get much done other than keeping up with questions&lt;/li&gt;&lt;li&gt;S05 now allows negative quantifier ranges on reversible patterns&lt;/li&gt;&lt;li&gt;S02 now defines the term &lt;code&gt;now&lt;/code&gt; to return the current instant&lt;/li&gt;&lt;li&gt;like &lt;code&gt;rand&lt;/code&gt; and &lt;code&gt;self&lt;/code&gt;, it does not parse as a function, since it never takes arguments&lt;/li&gt;&lt;li&gt;we now specify what kinds of math are allowed on instants and durations&lt;/li&gt;&lt;li&gt;improved error message on attempt to use old-school backreferences in regexes&lt;/li&gt;&lt;li&gt;STD now implements the &lt;code&gt;now&lt;/code&gt; term and several other time-related names&lt;/li&gt;&lt;li&gt;we now allow enum names to be &quot;constant variables&quot; so that a class enum can declare an accessor&lt;/li&gt;&lt;li&gt;thinking alot about a better unification of the semantics of protos&lt;/li&gt;&lt;li&gt;this may also solve the current ambiguity in the meaning of postfix parens&lt;/li&gt;&lt;li&gt;in any case, this is for post Rakudo *&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;mainly worked on packaging for Debian and Ubuntu before the release&lt;/li&gt;&lt;li&gt;closed TT #389, no methods in namespaces&lt;/li&gt;&lt;li&gt;collecting thoughts on what we need next from the GC&lt;/li&gt;&lt;li&gt;we've done a lot of small cleanups&lt;/li&gt;&lt;li&gt;now we need to solve some persistent problems&lt;/li&gt;&lt;li&gt;might need to make some fundamental changes, like reducing copying&lt;/li&gt;&lt;li&gt;coming up on my final week of classes, so lots of work there coming up&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;updated a spectest&lt;/li&gt;&lt;li&gt;minor ticket wrangling in Rakudo's RT queue&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Jerry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;GSoC will make its acceptance announcements soon&lt;/li&gt;&lt;li&gt;expect TPF will get 10 slots&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;reviewing Rakudo's current state&lt;/li&gt;&lt;li&gt;made a couple of minor NQP patches&lt;/li&gt;&lt;li&gt;reviewing patches, especially from Moritz and Bruce Keeler&lt;/li&gt;&lt;li&gt;should check them in, probably with some refactorings&lt;/li&gt;&lt;li&gt;hope to work on the &lt;code&gt;List&lt;/code&gt; implementation, especially laziness and context&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;fixed as much of line numbering as I found broken&lt;/li&gt;&lt;li&gt;working on branch merges&lt;/li&gt;&lt;li&gt;still looking at optimizations&lt;/li&gt;&lt;li&gt;will focus most energy this month on the sweep-free GC&lt;/li&gt;&lt;li&gt;hope to encourage other people to work on identified optimizations&lt;/li&gt;&lt;li&gt;will review Solomon Foster's Mandlebrot example, especially with regard to performance&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Wed, 28 Apr 2010 22:20:35 +0000</pubDate>
</item>
<item>
	<title>Patrick Michaud: More Perl 6 Anti-FUD</title>
	<guid>http://use.perl.org/~pmichaud/journal/40326?from=rss</guid>
	<link>http://use.perl.org/~pmichaud/journal/40326?from=rss</link>
	<description>&lt;p&gt;More Perl 6 Anti-FUD here:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.perlmonks.org/?node_id=836533&quot;&gt;http://www.perlmonks.org/?node_id=836533&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.perlmonks.org/?node_id=836564&quot;&gt;http://www.perlmonks.org/?node_id=836564&lt;/a&gt;&lt;/p&gt;&lt;p&gt;and thoughts on the name &quot;Perl 6&quot;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.perlmonks.org/?node_id=836626&quot;&gt;http://www.perlmonks.org/?node_id=836626&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Pm&lt;/p&gt;</description>
	<pubDate>Fri, 23 Apr 2010 23:38:22 +0000</pubDate>
</item>
<item>
	<title>Patrick Michaud: A wholly inadequate reply to an Anonymous Monk</title>
	<guid>http://use.perl.org/~pmichaud/journal/40322?from=rss</guid>
	<link>http://use.perl.org/~pmichaud/journal/40322?from=rss</link>
	<description>[Reposted from &lt;a href=&quot;http://www.perlmonks.org/?node_id=836349&quot;&gt;http://www.perlmonks.org/?node_id=836349&lt;/a&gt;.  Normally I wouldn't repost but I'd like it to appear in my normal Perl 6 journal and rss feeds as well as on PerlMonks.  --Pm]

&lt;p&gt;An Anonymous Monk on perlmonks.org recently started a discussion on
&quot;&lt;a href=&quot;http://www.perlmonks.org/?node_id=835419&quot;&gt;The current state of Perl 6&lt;/a&gt;&quot; in which he (she? they?) offers his
views on various aspects of Perl 6 development.  Personally, I
find nearly all of Anonymous Monk's comments in the thread to be
so devoid of logic and so far removed from reality/facts that it's
hard to imagine providing an adequate reply to them.&lt;/p&gt;&lt;p&gt;Beyond that, I have other priorities in my life right now.
Uppermost is that my family is going through a very difficult
period at present -- I need to take care of them first.  Rakudo and
Perl 6 come in at a somewhat distant second to that.  Responding to
garbage being spouted by anonymous person(s) probably ought
to not even be anywhere on my radar.&lt;/p&gt;&lt;p&gt;But at least one post in the thread bugs me sufficiently that
I'd like to respond, even if it's an inadequate response.
And I don't want my response buried in a thread somewhere, so it
gets its own post.&lt;/p&gt;&lt;p&gt;Anonymous Monk &lt;a href=&quot;http://www.perlmonks.org/?node_id=835737&quot;&gt;writes&lt;/a&gt;:&lt;/p&gt;&lt;blockquote&gt;&lt;div&gt;&lt;p&gt; &lt;em&gt;
Oh I'll tell you how you do that [write a grammar engine capable
of supporting Perl 6]. It's very simple. You get people skilled
for this exact task ! Those skills are acquired in
universities(preferably good ones) where professors teach
courses like &quot;Formal Languages and Automata&quot; or &quot;Compiler
theory&quot;. If you have a bunch of people who are open-source
contributors but don't have the knowledge or haven't studied
the right things ... &lt;strong&gt;[t]hey don't know it in theory
and they're trying to put it in practice!
&lt;/strong&gt; &lt;/em&gt; (emphasis in original)&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;Who does Anonymous Monk think is working on Perl 6?  Personally, I
have a Ph.D. in Computer Science and taught university language
courses for nearly 14 years.  Damian Conway certainly also
has a fairly strong university background (Monash University) and
understands the theory and practice of language and compiler design.
Jonathan Worthington has a degree from the University of Cambridge,
where he specialized in compiler construction and formal languages.
Larry Wall has a degree in Natural and Artificial Languages
with two years of graduate work in Linguistics at U.C. Berkeley.
Many of our other key contributors also have degrees and backgrounds
in language theory and practice.  I'd be willing to compare the
academic credentials of this group against any other dynamic
language team Anonymous Monk might care to postulate.&lt;/p&gt;&lt;blockquote&gt;&lt;div&gt;&lt;p&gt; &lt;em&gt;If you can't get &lt;strong&gt;real&lt;/strong&gt; compiler people
to use Perl6 and help with it, the average open-source rookie
won't be able to deal with this.&lt;/em&gt;&lt;/p&gt;&lt;/div&gt; &lt;/blockquote&gt;&lt;p&gt;Somehow I have trouble classifying Larry, Damian, Allison, etc. as
being &quot;not real compiler people&quot;.  And they along with many other
Perl 6 contributors have a lot of experience in nurturing open
source developers and projects.  If you feel Larry et al. are
indeed unqualified to be working in the field of programming
language design and implementation, you probably don't want to
be using Perl at all, much less Perl 6.&lt;/p&gt;&lt;p&gt;People like Anonymous Monk spew lots of opinions about how long
they think Perl 6 development should take, and then speculate on
the reasons why it has taken longer than they estimate it should
be taking.  The speculations that crop up most often are things
like &quot;the people involved are clueless about language
design/implementation&quot; (see above), &quot;the design process itself
is flawed&quot;, &quot;they're building on an inadequate toolset like Parrot&quot;,
etc.  For such people it's easy to toss out random thoughts about
&quot;the problems with Perl 6&quot; without bothering to look at
the obvious evidence to the contrary, as Anonymous Monk
does above.  Indeed, I'm often amused when people suggest that
we should be doing things
&lt;em&gt; &lt;a href=&quot;http://use.perl.org/comments.pl?sid=43556&amp;amp;cid=70194&quot;&gt;that we're already doing&lt;/a&gt; &lt;/em&gt;.&lt;/p&gt;&lt;p&gt;Returning to the topic of developing a grammar engine, which
Anonymous Monk claims above as &quot;very simple&quot; and just needing
&quot;people skilled for this exact task&quot;, it's interesting to contrast
his opinions with the actual development of the Perl 6 standard grammar
(&lt;a href=&quot;http://svn.pugscode.org/pugs/src/perl6/STD.pm6&quot;&gt;STD.pm6&lt;/a&gt;).
I think STD.pm6 is also indicative of the challenges confronting all
Perl 6 implementors.  Consider:

&lt;/p&gt;&lt;ul&gt; &lt;li&gt;Larry is the primary implementor for the standard grammar.&lt;/li&gt;&lt;li&gt; The standard grammar doesn't need a frozen specification
  to be implemented, because its implementation is considered
  part of the spec.&lt;/li&gt;&lt;li&gt;The implementation is built entirely on top of Perl 5 -- there
  are no &quot;unproven virtual machines&quot; involved or holding things
  back.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I think one could consider this to be an almost perfect situation
for developing a new language implementation -- an experienced language
designer/implementor working without significant external
restrictions on top of an advanced programming platform like
Perl 5.  Yet it's been three years since Larry started working
on this implementation of the standard grammar and parser, and
while STD.pm6 is very powerful, it's also certainly not &quot;finished&quot;,
and has been through a number of significant refactors in its
development.  This says to me that the amount of time and effort
involved is more likely due to the sheer audacity and ambition of what
Perl 6 seeks to accomplish.&lt;/p&gt;&lt;p&gt;(Some will undoubtedly look at the above and knee-jerk respond
with something like &quot;If it's taken three years just to create
the parser, then finishing a compiler will take far longer still
and therefore Perl 6 will never see the light of day.&quot;
This argument ignores the fact that other pieces
are being implemented in parallel with Larry's work, that
software development is not a strictly sequential process, and
the obvious fact that there are already &quot;working&quot; Perl 6
implementations available.)&lt;/p&gt;&lt;p&gt;Anyone who thinks that Perl 6 is fundamentally based on
traditional compiler construction techniques taught in
universities frankly has no clue as to what a fundamental
paradigm shift Perl 6 represents to language design and
implementation.  It's this fundamental change that ultimately
gives Perl 6 its power, but it's also why Perl 6 development
is not a trivial exercise that can be done by a few
dedicated undergraduates.  As
&lt;a href=&quot;http://irclog.perlgeek.de/perl6/2010-04-22#i_2253574&quot;&gt;TimToady on #perl6 says&lt;/a&gt;,
&quot;We already have lots of those kinds of languages.&quot; &lt;/p&gt;&lt;p&gt;Personally, I'm impressed and honored to be associated with
the people who are working on Rakudo and Perl 6.  I understand
that people are frustrated (and even feel burned by) the long
wait for something as cool as Perl 6; I share the frustration
and like to think that I'm doing something constructive about it.
But I also find the vast majority of suggestions, comments, and
conclusions coming from Perl 6's anonymous detractors to be
(1) things we've already done or are doing, (2) ungrounded in
reality, (3) in direct contradiction to reasonably observable
facts, or (4) attempts to discredit a product they have little
interest in ever using themselves.  And far too many of the
comments, like the ones I've highlighted in this post, are
so easily refuted with just a little bit of fact digging and
common sense, it's often hard to believe anyone can be seriously
making them in the first place.  Yet there they are.&lt;/p&gt;&lt;p&gt;Returning to my original theme, I think my response here is
inadequate because it leaves so many other of Anonymous Monk's
claims in the thread unrefuted.  I could undoubtedly spend many
more hours analyzing and responding to the many fallacies and untruths
in the thread, but frankly I don't believe that's the best use of
my time.  People such as Moritz Lenz, chromatic, Michael Schwern,
and others are
also writing extremely well-reasoned posts refuting the garbage, for
which I'm grateful, but it's far easier for Anonymous Monk and his like
to spin garbage than it is for a small number of us to clean up after
it.  And it does need to be cleaned up, otherwise it festers and
results in even more public garbage &lt;a href=&quot;http://arstechnica.com/open-source/news/2010/04/perl-5-development-resumes-version-512-released.ars?comments=1#comment-20189196&quot;&gt;that someone has to clean up&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I hope that this post will at least encourage more people in the
Perl community to critically examine the things they hear and
read regarding Perl 6, especially when coming from sources with
no apparent standing or reputation within the community.  And
maybe a few more people will even assist in publicly refuting
the garbage (&quot;many hands make light work&quot;), so that the sloppy
thinking, analysis, and dialogue that people like Anonymous Monk
post doesn't spread to infect all of Perl.&lt;/p&gt;&lt;p&gt;Pm&lt;/p&gt;&lt;p&gt;P.S.: Some may reasonably conclude from what I've written
above that Perl 6 is somehow &quot;aiming too high&quot;, that our goals
should be scaled back to make something ready &quot;right now&quot;.
I have two responses to this: (1) we &lt;em&gt;are&lt;/em&gt; making things
ready 'right now', just grab any of the available packages and
start working and reporting bugs, and (2) there are already
'scaled back' versions of Perl 6 appearing and being used,
such as NQP or even the components that execute the standard
grammar.  Some of these other projects, like NQP, are being
used for &quot;real&quot; programs and applications today; they're not
simply theoretical exercises or research projects.&lt;/p&gt;&lt;p&gt;Others often claim that all this effort on Perl 6 would be
better spent on improving Perl 5.  In my experience, those of us
working on Perl 6 have absolutely no qualms with seeing Perl 5
improve and continue to grow -- we welcome it.  Indeed,
many of the features appearing in Perl 5 today come directly
from ideas and things first attempted in Perl 6, and we're
genuinely happy to see that.  But just because Perl 6 developers
also like Perl 5 doesn't mean that doing Perl 5 core development is
interesting to us, or that (in my case at least) we'd even be
qualified to do Perl 5 core changes.  We aren't commodity programmers
that are interested in simply being unplugged from one project and
into some other project that others think is more worthwhile.
Personally, I'd prefer to see people who are really into Perl 5
improvements continue to work to make them happen, and that
the surrounding ecosystem continue to evolve to enable that
to happen more easily for more people.  Indeed, this is my wish
for all open-source projects, even the ones I don't find
interesting or otherwise disagree with.&lt;/p&gt;</description>
	<pubDate>Thu, 22 Apr 2010 21:47:27 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 14 April 2010</title>
	<guid>http://use.perl.org/~chromatic/journal/40318?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/40318?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 14 April 2010.  Larry, Allison, Patrick, Will, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;on p6l, did a bit of bikeshed paint removal with regard to hyphens vs underscores&lt;/li&gt;&lt;li&gt;S02 now explicitly disallows both whitespace and unspace in top level of an interpolation&lt;/li&gt;&lt;li&gt;per spec change, when STD is parsing an interpolation inside quotes and looking for a possible postfix, we now presume that a backslash belongs to the quotes and is not an unspace&lt;/li&gt;&lt;li&gt;in the src/perl6 directory, renamed all Perl 6 &lt;code&gt;.pm&lt;/code&gt; files to &lt;code&gt;.pm6&lt;/code&gt; to avoid confusion&lt;/li&gt;&lt;li&gt;this was necessary because the implementation of STD translates Perl 6 back to the corresponding Perl 5&lt;/li&gt;&lt;li&gt;the ambiguity was causing problems with tools such as &lt;code&gt;NYTProf&lt;/code&gt; &lt;/li&gt;&lt;li&gt; &lt;code&gt;Cursor.pmc&lt;/code&gt; now prefers &lt;code&gt;.pm6&lt;/code&gt; over &lt;code&gt;.pm&lt;/code&gt; in any particular directory when searching for Perl 6 code&lt;/li&gt;&lt;li&gt;as usual lately, most of my hacking work was in improving the human interface of the parser&lt;/li&gt;&lt;li&gt;STD now distinguishes two final messages: &quot;&lt;code&gt;Parse failed&lt;/code&gt;&quot; vs &quot;&lt;code&gt;Check failed&lt;/code&gt;&quot;&lt;/li&gt;&lt;li&gt;STD now warns on attempts to smartmatch with &lt;code&gt;True&lt;/code&gt; or &lt;code&gt;False&lt;/code&gt; &lt;/li&gt;&lt;li&gt;STD now distinguishes continuable-but-fatal &quot;sorry&quot; messages from immediately fatal &quot;panic&quot; messages&lt;/li&gt;&lt;li&gt;sorry messages will eventually fail at check time&lt;/li&gt;&lt;li&gt;changed many of STD's semantic errors to use sorry messages when the parse state is not affected&lt;/li&gt;&lt;li&gt;modified moritz++'s conflict marker patch to be more like the Clang compiler's behavior&lt;/li&gt;&lt;li&gt;conflict markers now emit a &quot;sorry&quot; message and continues parsing one side of the conflict&lt;/li&gt;&lt;li&gt;also fixed a buglet that prevented it from  processing the conflict marker if first thing in the file&lt;/li&gt;&lt;li&gt;while fixing the vws (vertical white space) rule for that, also changed it so that extra lines are now eaten with &lt;code&gt;\V*\v&lt;/code&gt; for consistency&lt;/li&gt;&lt;li&gt;it had be using &lt;code&gt;\N*\v&lt;/code&gt; &lt;/li&gt;&lt;li&gt;gimme5 now supports pointing to both ends of missing goal message&lt;/li&gt;&lt;li&gt;STD's &quot;&lt;code&gt;Couldn't find final ...&lt;/code&gt;&quot; messages now use that capability to point to both ends of the error&lt;/li&gt;&lt;li&gt;standard quotes now also use the ~ compositor to set the goal and get that behavior&lt;/li&gt;&lt;li&gt;STD will now dwim &lt;code&gt;&amp;lt;&amp;lt;op&amp;gt;&amp;gt;&lt;/code&gt; (&quot;Texas hypers&quot;) better even if &lt;code&gt;op&lt;/code&gt; contains angles&lt;/li&gt;&lt;li&gt;suppressed confusing backtracking on &lt;code&gt;~&amp;lt;&amp;lt;&lt;/code&gt; that produced a misleading quotewords error&lt;/li&gt;&lt;li&gt;some other patches&lt;/li&gt;&lt;li&gt;CORE.setting now recognizes the '&lt;code&gt;note&lt;/code&gt;' function&lt;/li&gt;&lt;li&gt;gimme5 now translates &lt;code&gt;note&lt;/code&gt; to &lt;code&gt;print STDERR&lt;/code&gt; &lt;/li&gt;&lt;li&gt;cleaned up some unneeded locmesses&lt;/li&gt;&lt;li&gt;Actions.pm now handles prefix metaops without spewing spurious yaml dumps&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;worked on TT #389&lt;/li&gt;&lt;li&gt;the actual fix was about two lines&lt;/li&gt;&lt;li&gt;spent a lot of time fixing tests around it&lt;/li&gt;&lt;li&gt;didn't like the original two-line fix&lt;/li&gt;&lt;li&gt;fixed it in IMCC by passing along the &lt;code&gt;:nsentry&lt;/code&gt; flag&lt;/li&gt;&lt;li&gt;NQP-rx still depends on that feature&lt;/li&gt;&lt;li&gt;I understood from Patrick that NQP-rx doesn't need that feature&lt;/li&gt;&lt;li&gt;don't want to launch that before the 2.3 release&lt;/li&gt;&lt;li&gt;worked on a lot of smaller issues&lt;/li&gt;&lt;li&gt;worked on the Parrot Developer Virtual Summit&lt;/li&gt;&lt;li&gt;will talk about some process changes more, as there are details to work out&lt;/li&gt;&lt;li&gt;will work on GC as the next priority&lt;/li&gt;&lt;li&gt;useful for Rakudo in general and Parrot concurrency&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;catching up on mail and tickets&lt;/li&gt;&lt;li&gt;should get back to coding in the next couple of days&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;worked on the immutable strings branch&lt;/li&gt;&lt;li&gt;need a couple of changes in the Rakudo binder&lt;/li&gt;&lt;li&gt;now it's time to convince everyone else it's a worthwhile design change&lt;/li&gt;&lt;li&gt;going to work on bugfixes&lt;/li&gt;&lt;li&gt;will try to land the constant string cache&lt;/li&gt;&lt;li&gt;otherwise, added some optimizations&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;worked on Partcl&lt;/li&gt;&lt;li&gt;fixed a Parrot bug that broke Rakudo&lt;/li&gt;&lt;li&gt;does Rakudo need TT #389 in 2.3?&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Wed, 21 Apr 2010 04:09:26 +0000</pubDate>
</item>
<item>
	<title>Jonathan Worthington: Perl 6 talk in Malmö</title>
	<guid>http://use.perl.org/~JonathanWorthington/journal/40316?from=rss</guid>
	<link>http://use.perl.org/~JonathanWorthington/journal/40316?from=rss</link>
	<description>&lt;p&gt;Recently I moved to Sweden to join startup company &lt;a href=&quot;http://www.edument.se/&quot;&gt;Edument&lt;/a&gt;. They are, happily, very open to and supportive of my involvement in the Perl 6 project, and are organizing and sponsoring me to give a &lt;a href=&quot;http://natverk.dfs.se/node/19602&quot;&gt;talk on Perl - both 5 and 6&lt;/a&gt; for the &lt;a href=&quot;http://www.dfs.se/&quot;&gt;Dataföreningen&lt;/a&gt; in Malmö on Tuesday 27th April. I believe this is only open to those who are members of the user group; if you are, feel free to come along though.&lt;/p&gt;</description>
	<pubDate>Tue, 20 Apr 2010 09:55:36 +0000</pubDate>
</item>
<item>
	<title>Jonathan Leto: PL/Parrot Flies</title>
	<guid>tag:leto.net,2010:/dukeleto.pl//9.218</guid>
	<link>http://leto.net/dukeleto.pl/2010/04/plparrot-flies.html</link>
	<description>&lt;a href=&quot;http://github.com/leto/plparrot&quot;&gt;PL/Parrot&lt;/a&gt; recently started passing all tests and marshalling three basic data types of integers, floats and strings, between&lt;a href=&quot;http://www.postgresql.org/&quot;&gt; PostgreSQL&lt;/a&gt; and &lt;a href=&quot;http://parrot.org/&quot;&gt;Parrot Virtual Machine&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;One of the important next steps for PL/Parrot is to improve the security subsystem, which will require changes to Parrot core. Parrot has only a high-level &lt;a href=&quot;http://docs.parrot.org/parrot/latest/html/docs/pdds/pdd18_security.pod.html&quot;&gt;Parrot Developer Doc (PDD) that describes how security should work&lt;/a&gt;, but still lacks an implementation. Thus, PL/Parrot finds itself in the situation of being able to drive the development of security features in Parrot. This is very exciting and I am researching various hardening solutions. Various ideas have been thrown around, but removing or replacing certain opcodes at the lowest level is the most secure solution. How to do this, properly at run-time, is the fun part.&lt;br /&gt;&lt;br /&gt;I will be talking about PL/Parrot at &lt;a href=&quot;http://www.pgcon.org/2010/&quot;&gt;PGCon 2010&lt;/a&gt;, which will be very exciting. I am hoping to meet many people in the PostgreSQL community and show some PostgreSQL internals hackers why hacking on PL/Parrot is so fun and so important.&lt;br /&gt;&lt;br /&gt;PL/Parrot is so important because PL's are hard to write and maintain. My vision is that most of the hard work goes into PL/Parrot, and then languages built on top of Parrot (HLL's), will have a very simple time piggy-backing on top of that infrastructure. Currently, only PL/PIR exists. Stored procedures can be written in &lt;a href=&quot;http://en.wikipedia.org/wiki/Parrot_intermediate_representation&quot;&gt;PIR&lt;/a&gt;. The next steps will be getting a HLL working on PL/Parrot, such as &lt;a href=&quot;http://en.wikibooks.org/wiki/Parrot_Virtual_Machine/Not_Quite_Perl&quot;&gt;NotQuitePerl (NQP)&lt;/a&gt; or &lt;a href=&quot;http://rakudo.org/&quot;&gt;Rakudo Perl 6&lt;/a&gt;. If you want to get your favorite HLL working on PL/Parrot, I surely won't stop you.&lt;br /&gt;&lt;br /&gt;There are also many benefits to writing stored procedures in PIR. PIR will have the closest possible speed to C than any HLL run on Parrot, so if speed is your main concern, you will want PL/PIR. Parrot has a garbage collector, so you don't have to do memory management in PL/PIR. This prevents crashing the server instance due to double-free errors and fun stuff like that. PIR is also platform-independent: no more need to figure out how to get your stored procedures written in C compiling on a new platform. &lt;br /&gt;&lt;br /&gt;If you have tuits or ideas for implementing PL/NQP or PL/Rakudo or any other comments about PL/Parrot, I would love to hear them. Feel free to&lt;a href=&quot;http://github.com/leto/plparrot&quot;&gt; fork the github repo&lt;/a&gt;, join us in #plparrot on irc.freenode.net or &lt;a href=&quot;http://groups.google.com/group/plparrot&quot;&gt;on our mailing list&lt;/a&gt;. We also need a website and mascot. There are many ways to help, but patches are always welcome :)&lt;br /&gt;</description>
	<pubDate>Tue, 20 Apr 2010 02:55:57 +0000</pubDate>
</item>

</channel>
</rss>
