| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 |

« April 2005 | Main | June 2005 »
Posted by audreyt at 05:03 AM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
<lathos> I'm actually *really* enjoying porting Maypole to Perl 6. SO much cleaner.
I relayed this news to #catalyst, only to discover that sri has already beginning a Perl 6 of Catalyst. I happily sent commitership invitation mails to both of them; it is an honour to have two such illustrious hackers on board.
Another big news today is iblech's evalbot.p6, an IRC bot providing ?eval command for all #perl6 folks to try out Perl 6 code with. To protect against system(), a safe mode is implemented to disable all IO primitives, when Pugs is started with a true value in the PUGS_SAFEMODE environment variable. The evalbot has already proven to be a very useful quick-checking tool during language discussions; iblech++ for getting it written!
iblech also added the $?PUGS_VERSION special variable to represent the revision number of Pugs.
eric256 and his wizard.p6 continued to drive more development:
.attr = 1 is no longer parsed as $_.attr(=1).use lib '/path'; now works correctly by calling::lib.import('/path').when .does(Foo), when $_.does(Foo) and when Foo are all implemented now.Some more work on the Pugs/Perl5 embedding front:
DBI.connect($x).do($y) now works properly.
broquaint wondered why $str.split(//) was parsed as split($str,. I fixed that specific case, but $x.split($y) still does not mean split($y, $x) yet; broquaint added various tests for them. Also at broquaint's request, iblech implemented &getc.
iblech added some information about using the Compose key under X11 to enter special characters. I followed the instruction with the Menu key, but it had no effect at all. Strange...
Aankhen ported HTTP::Headers::Util from Perl 5, along with its unit tests.
SamB started working on Pugs.Compile.Pugs to produce more readable output code.
hcchien, our Taipei.pm leader and one the first committers, returned to Pugs today and implemented a input method driver for lukhnos's OpenVanilla framework. He remarked that Pugs is not yet fast enough for a real-time imput method. This will likely change next week when I started working with Leo...
There have been a flurry of commits on util/perl6.vim syntax file from iblech, ninereasons, scw and me. With the improved highlighting, it's now much easier to edit OO modules in Perl 6.
That's it for today. See you tomorrow!
Posted by audreyt at 08:17 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
Stevan's life as the ChangeLog scribe would probably be much miserable, if I actually skipped all daily summaries for this week. So I'm back now to summarise the developmeng since Pugs 6.2.5's release:
foo($x, $y: $z) is no longer legal, according to Damian's new revelation. That broke &sub.goto for a while (since you can't re-appoint invocants anymore), but it's fixed now.Int.isa(Int) now returns true../SUPER::method() implemented at chromatic's request.pugs -MFoo now means use Foo instead of require Foo. That makes pugs -MDBI--perl5 -e '...' work correctly.DESTROYALL/DESTROY support with help from scook0 and SamB, taking advantage of GHC's fast generational GC system and System.Mem.Weak's support for adding finalisers. I also forced a GC run to always happen on program termination.^..,..^ and ^..^.[//] @foo to find the first defined value in @foo.coro support, adding a (not fully working) iterator interface to his Tree.pm module.ext/Perl-MetaModel to be more consistent; the beginning of a Perl 6 port of Pugs's source code is interesting.&reduce and &map accept n-ary functions, in a similar way as the for block.say [~] (-> @c is copy {gather { while @c[0] { for @c -> {take(.shift)} } }
}(['Joec','utrk','shle','te6r',' r.','a h.','nPa.'].map:{[split "",$_]}));
&escapeHTML and &unescapeHTML to CGI.pm, refactored CGI::Header to behave more like the Perl 5 counterpart, implemented full support for CGI::redirect, and ported over Perl 5's CGI::Util module.&eval_haskell is broken with newer hs-plugins. Old versions with non-hierarchical namespace is no longer supported.× now works on Win32 for real.die "abc\ndef\nghi" correctly align vertically.&Pipe::open (but known as &openpipe for now.[+]« are now parsed, thanks to iblech.&readline handle UTF-8 correctly, so svnbot6 can finally announce the commit messages as UTF-8."$hash<key>" in string interpolation.handles delegation support), hopefully he will finish it before the 6.2.6 release and move to ext/ where it belongs...perl6.vim. I wonder when will we see a perl6-mode for Emacs...¬hing and &evalfile.pair.t test that reflects Larry's ruling that => now assumes assignment precedence, so 1 => 2 ?? 3 :: 4 will construct a pair. I promptly implemented it.when .method() {...} now works.Posted by audreyt at 07:41 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
coro {...} to Perl 5 land too.
This also works:
#!/usr/bin/pugs
use v6;
use DBI--perl5;
# use perl5:DBI; # in Pugs 6.2.8+, write this instead
unlink 'test.db';
my $dbh = DBI.connect('dbi:SQLite:dbname=test.db');
$dbh.do("CREATE TABLE Test (Project, Pumpking)");
my $sth = $dbh.prepare("INSERT INTO Test VALUES (?, ?)");
$sth.execute(<Pugs Autrijus>);
$sth.execute(<Ponie Nicholas>);
$sth.execute(<Parrot Leo>);
my $res = $dbh.selectall_hashref('SELECT * FROM Test', 'Pumpking');
# Just another Pugs hacker
say "Just another $res<Autrijus><Project> hacker";
Still lots of things left to do -- I want to share runloop as much as possible, so $CALLER::x can see into Perl 5 lexicals, and maybe reify the control stack both ways via Coro.pm if it's installed. But this is already quite usable for real-world scripting... I'm so excited.
Posted by audreyt at 10:45 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
The canonical domain name for the machine is feather.perl6.nl, but I have also pointed perlcabal.org and dev.pugscode.org to it. The read-only darcs mirror has been moved there; we also have a shared SVK mirror in the new box.
I worked some more on Perl 5 embedding; the context from Perl 6 is now propagated to Perl 5, and AUTOLOAD etc are handled as well. I plan to give the existing eval_haskell() and eval_parrot() similar treatment, so you can say:
use DBI--perl5;
use SDL--parrot;
use Test::QuickCheck--haskell;
#... do lots of interesting things using those modules ...
I'm glad to see that clkao finally checked in his Benchmark.pm. He also gave me plenty of good ideas of representing Pugs thunks in embedded Perl 5, which will make coroutines and continuations available in Perl 5 land.
Oh, and clkao also threatened to port svk to Perl 6, after taking a look at Pugs's internals -- as seen on #svk:
<clkao> bad news. i like haskell
Posted by audreyt at 09:30 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
use Digest::SHA1--perl5;
my $cxt = Digest::SHA1.new;
$cxt.add('Pugs!');
# This prints: 66db83c4c3953949a30563141f08a848c4202f7f
say $cxt.hexdigest;
My full wishlist, ordered by descending importance, is reproduced below:
I think I can be excused of not doing the usual summary today.
Posted by audreyt at 11:04 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
Also of note is pugs.pm and Inline::Pugs, two Perl 5 modules that
lets you inline Perl 6 code in Perl 5 programs. The docs/quickref/
series of documents is also helpful as a companion to the Synopses.
You can download Pugs from a nearby CPAN mirror, or from pugscode.org:
A Pugs/Parrot live CD, contributed by iblech, is available as well:
Amazingly, the project's velocity is still increasing, with 680 new commits, compared to 507 from 6.2.3. The graph below shows the growth of number of commits and committers:
Again, my sincere gratitude to all lambdacamels for making this release as exciting and enjoyable as it is. See you next week!
Thanks,
Changes for 6.2.5 (r3794) - May 24, 2005
Bundled Modules
Set module.Changes for 6.2.4 (r3790) - May 24, 2005
Pugs Internals
Bundled Modules
Tests, Examples and Documentations
Posted by audreyt at 04:14 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
But it gets scarier when you mix hyper metaoperator with reduce metaoperators:pugs> (1,2,3) >>-<< (4,5,6)
(-3, -3, -3)
pugs> -<< (4,5,6)
(-4, -5, -6)
pugs> sub postfix:<!> { [*] 1..$_ }; (4, 5, 6) >>!
(24, 120, 720)
pugs> [+]<< ([1,2], [3,4]);
(3, 7)
pugs> [+]<<<< ([[1,2], [3,4]], [[5,6], [7,8]])
((3, 7), (11, 15))
iblech implemented FIRST {...} with trailing undef, INIT {...}, and CHECK {...}. Together with the existing support for BEGIN {...} and END {...}, we have a pretty good coverage of global closure traits now. Next in sight would be things like PRE and POST...
clkao is working on Benchmark.pm, which really wants times() support. I walked him through the implementation and testing in 30 minutes; Corion then ported the underlying getProcessTimes Haskell function to Win32.
clkao tweaked cmp_ok() from Test.pm to show the name of the comparison operator used. I hacked in &code.name to support this, as well as &code.arity.
Juerd added quickref/reduction for reduction metaoperators, and iblech contributed some more examples to it.
Backtrace in error messages is now much more legible:
$./pugs -e 'sub{ sub {die "Error!"}.() }.()'
*** Error!
at -e line 1, column 1-32
-e line 1, column 6-28
-e line 1, column 11-23
iblech added the ability of dumping raw AST structure to the interactive shell. Following that, I reorganised all commands in the shell to being with:. Hopefully this will eliminate the confusing situation of !1 evaluating to 1 in the shell.
Stevan continued to study metaclass koans, aiming for grokking the inner working of Perl 6's OO model. He recorded his current understanding in the Perl 6 Meta Meta Class Hierarchy document.
Also in the metamodel front, mugwump updated Perl 6 Meta Model with the latest insights.
asavige added some precedence tests, more todo tests to assign, and reported that 1..Inf as parsed as &.Inf(1). I fixed it a while later.
I also implemented the three "yada" literals: ??? that warns, !!! that dies, and... that fails -- i.e. dies when use fatal is in effect, otherwise return a delayed error that dies when actually evaluated.
gaal added missing signatures for the Win32-specific parts of source code. With this, Haddock will finally recognise all our toplevel functions.
knewt, our new committer, made the backend part in command line parsing case-insensitive, so pugs -Bparrot will also work.
Aankhen added support for stringifying cookies to CGI.pm, un-evalled passing OO tests, and cleaned up operator_overloading.t.
adehohum added many tests, ranging from OO, syntax, operators to rules. scook0 also added tests for exclusive-range operators.
eric256 improved the wizard.p6 game by adding rooms and more enemies -- it seems that the player doesn't stand a chance against the Skeleton -- but curiously, fleeing from the room made the enemy disappear. This bug would probably not last for long...
Posted by audreyt at 07:36 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
nothingmuch checked in the first part of Pugs Apocryphon 2 - Overview of Pugs Internals. There will be many parts (and many more interviews) to come.
iblech hacked a lot today:
fail primitive, temporarily known as fail_ to avoid clash with Test.pm.FIRST {...} works.state $x = 42 works.&::("infix:<+>") works.$::some::("var")::($bar) works.<=> etc caused by yesterday's symbolic ref code.
clkao was biten by index (1,2) not being parsed as index(1,2), so I added a more helpful error message at his request.
New committer chuck added a check to Makefile.PL to disable Parrot embedding with mixed MSVC/MinGW which is known to not work.
New committer japhy discussed his plans to port his Regexp::Parser to Perl 6, and make it understand Perl 6 Rules.
ninereasons revived cookbook and cleaned up strings docs in 01-00introduction.p6.
putter made time() into returning a fractional number. He and Juerd also worked on quickref/namespace.
Again, sorry for the omissions.
Posted by audreyt at 08:01 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
The Inline::Pugs hack inspired Ingy, so he implemented pugs.pm. To wit:
#!/usr/bin/perl
use pugs; # Here is some Perl 6 code...
sub postfix:<!> { [*] 1..$_ }
sub sum_factorial { [+] 0..$_! }
no pugs; # Here is some Perl 5 code...
print sum_factorial(3); # 21
A highly experimental implementation of coroutines has landed to Pugs, with semantics loosely borrowed from Perl 5's Coro::Cont:
coro flip_flop { yield 1; yield 0 }
print flip_flop() while 1;
# Output:
# 101010101010....
Here is a more interesting example, courtesy of integral:
my @generators = map -> $N { coro { yield $_ for 0..$N } } 0..3;
say "{ map { $_() }, @generators }" for 0..3;
# Output:
# 0 0 0 0
# 0 1 1 1
# 0 0 2 2
# 0 1 0 3
As the coroutine design in Perl 6 had not been finalised, this is merely an experimental feature for people to play with; suggestions are most welcome -- see my p6c post for details.
Limbic_Region asks whether gather/take has been implemented. I said no,
then promptly corrected myself 15 minutes later by implementing it.
The Haskell-fu is really strong with iblech nowadays:
Among the usual influx of tests and work on the p6explain script, he also implemented:<iblech> Yeah, I start to grok Haskell:)
<autrijus> iblech++ # demonstrating that the productivity is really not me, it's really Haskell:)
min, max and uniq as described by Damian.[.[]] and [.{}] for walking down a nested data structure by a list of keys.[or], [err] and the rest of logical reduction metaoperators$::("foo").[,] -- with two lines of code.Colin Paul Adams has successfully embedded Parrot in his XSLT processor, although he ran into some problems more-or-less the same with Pugs/Parrot embedding; however, this time around I have the committer bit, so with Leo's guidance, I've checked in an implementation for the missing string_to_cstring API.
Colin also asked on p6c about how to embed Pugs into the XSLT processor; I regretfully told him that Pugs does not yet handle Perl 5 programs, but gave a few pointers that are hopefully useful.
.pick.
There's much more, but I need to sleep (a lot) now.
Posted by audreyt at 03:23 PM in Recap | Permalink | Comments (0) | TrackBack (0)
Reblog (0) | | Digg This | Save to del.icio.us |
Recent Comments