Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

fglock (5723)

fglock
  (email not shown publicly)

Journal of fglock (5723)

Monday April 12, 2010
02:32 PM

Fun with "go routines" in Perl 6

I've just added experimental support to "go routines" to Perlito's Go backend:

$ perl mp6.pl -Bgo -e ' go sub { say 123; say "aaa" }; go sub { say 456; say "bbb" }; say "here"; say "now"; '

here123456

nowaaabbb

Go "Channels" are not supported yet.

Saturday March 20, 2010
04:38 AM

"Perlito" MiniPerl6 4.0 - string-eval, more bootstraps

Perlito is a subset of Perl 6, which was designed as a light bootstrapping language.

Changelog for version 4.0:

- Go backend bootstrap.

The Go backend was updated to the latest Go language spec.

- Perl5 backend optimized; 30% faster

- More library functions, added to all backends

- New 'Eval.pm' module - implements a MiniPerl6 interpreter in MiniPerl6.

This should add some debugging capabilities later on.

- New test suite. See README on how to use 'prove' for each backend.

- New compiler options to create binary executables

- Currently the stable backends are: Perl5, Javascript, JVM, Lisp, Go.

See README for bootstrapping instructions for all backends.

- Removed support for features that are not standard Perl6.

Thanks to pmurias++ for helping test this release.

Version 4.0 can be downloaded from

http://github.com/fglock/Perlito/tree/7f0ac392dfcf04d390ebefe5f4274bb37cbd7b6e

Enjoy!

- Flávio S. Glock (fglock)

Thursday January 21, 2010
10:11 AM

MiniPerl6 3.0 "Perlito" - Go lang, JVM backends

MiniPerl6 (mp6) is a subset of Perl 6, which was designed as a light bootstrapping language.

Changelog for version 3.0:

- Go language backend; using Go: http://golang.org/

- Java-class backend; using Rhino: http://www.mozilla.org/rhino

- util/mp6.pl - compiler command line script written in MiniPerl6

- new repository at http://github.com/fglock/Perlito

- new web page at http://www.perlito.org/ created by nferraz (Nelson Ferraz)

Enjoy!

- Flávio S. Glock (fglock)

Thursday December 03, 2009
04:23 PM

MiniPerl6 "Perlito" to Go language

I've been working on the "Go language" backend for Perlito miniperl6 for about 2 weeks now.

Yesterday I implemented functions and namespaces, and today I've got methods working. With some more work, Perlito should bootstrap in Go.

There is no command line script yet - I'm using this ugly line for tests (this compiles and runs the method tests):

$ perl mp6-go.pl < t/11-bind-method-param.t > x1.go && cat lib/MiniPerl6/Go/Runtime.go x1.go > x.go && time ( rm x.6 ; rm ./6.out ; 6g x.go ; 6l x.6 ; ./6.out )

New urls:

Perlito now has a site http://www.perlito.org, created and maintained by Nelson Ferraz (NFERRAZ).

Yesterday I created a github account. The new Perlito commits are now going to http://github.com/fglock/Perlito

Tuesday September 22, 2009
03:52 PM

"Perlito" MiniPerl6 runs in the browser

http://perlcabal.org/~fglock/perlito.html

Press the "Execute" button!

"Perlito" MiniPerl6 is an implementation of a small subset of Perl6. There is no error handling, and the web interface I wrote is very simple.

The compiler implements simple classes, grammars with 'token' only, variable binding with ':=' (no assignment), arrays, hashes, strings, integers.

The compiler is entirely written in MiniPerl6. The source code is in:

http://svn.pugscode.org/pugs/v6/v6-MiniPerl6/lib/MiniPerl6/

Saturday September 12, 2009
01:08 PM

Playing with V8 parser

I've downloaded V8 (the javascript compiler). I was planning to try it out as a MiniPerl6 backend, but I started to play with the parser instead:

  --- src/scanner.cc (revision 2877)
  +++ src/scanner.cc (working copy)
  @@ -858,6 +858,12 @@
      bool has_escapes = false;

      StartLiteral();
  +
  + if (c0_ == '$') {
  + AddChar(c0_);
  + Advance();
  + }

Now I can use perl style var names:

  $ ./shell
  V8 version 1.3.10
  > $my_var = "hello, World!"; print($my_var);
  hello, World!

*update* - I've changed a few more things, and I've got some timings:

  $ time ./shell -e ' my $x = 0; for (my $i=1; $i < 10000000; $i++) { $x++ }; print($x);'
  9999999

  real 0m0.164s
  user 0m0.152s
  sys 0m0.008s

  $ time perl -e ' my $x = 0; for (my $i=1; $i < 10000000; $i++) { $x++ }; print($x);'
  9999999
  real 0m1.123s
  user 0m1.091s
  sys 0m0.008s

Friday August 28, 2009
02:57 PM

MiniPerl6 1.0 "Perlito" bootstrapped in SBCL Lisp

MiniPerl6 (mp6) was designed as a light bootstrapping language. The initial bootstrap used v6.pm and was then self-hosted in Perl 5.

MiniPerl6 is now self-hosted in SBCL Lisp. You can modify the source code and recompile without Perl 5.

MiniPerl6 can be downloaded from the Pugs repository:

$ svn checkout http://svn.pugscode.org/pugs pugs $ cd pugs/v6/v6-MiniPerl6

You can create an executable binary using these commands:

$ sh lisp-util/create-core-image.sh $ sbcl --load mp6-lisp-create-core-image.lisp $ chmod +x mp6-lisp $ ./mp6-lisp -e ' class Main { say "hello, World!" } ' ... lisp compiler warnings hello, World!

The bootstrapping procedure for both "perl" and "lisp" backends can be tested with:

$ sh perl5-util/bootstrap-perl5.sh $ sh lisp-util/bootstrap-lisp.sh ... lisp compiler warnings

Wednesday July 30, 2008
08:01 AM

v6.pm is back

v6.pm now passes a little more than 6000 tests from the Perl 6 test suite.

"v6" is a CPAN module that implements a Perl 6 compiler that runs in Perl 5.

It is compiling and running nearly 10 tests per second:

  Files=145, Tests=6210, 562 wallclock secs ( 1.41 usr 0.67 sys + 402.53 cusr 93.57 csys = 498.18 CPU)
  Result: PASS

Precompiled tests are running at 50 tests per second (running "make file" a second time execute the precompiled tests):

  Files=145, Tests=6210, 124 wallclock secs ( 0.88 usr 0.57 sys + 80.20 cusr 14.04 csys = 95.69 CPU)
  Result: PASS
Monday June 04, 2007
01:31 PM

"KindaPerl6" project roadmap

I finished the first version of the KindaPerl6 project roadmap, after a whole month of planning, prioritizing, and procrastination.

This version is a filtered out "main development track", extracted from the otherwise anarchistic development structure (somebody called it "genetic programming").

The goal of phases and milestones here is really just to break the project down into bite-sized pieces that regular hackers can get their heads around.

Specifically, the plan doesn't tell people what they should not to do. Small projects are much welcome. You might even get a Perl 6 Microgrant . I'm told that the TPF really wants to give out a couple of kp6/mp6/6STD grants!

The roadmap as html - http://moritz.faui2k3.org/pugs_pod/kp6-roadmap

The roadmap as pod - http://svn.pugscode.org/pugs/v6/docs/kp6-roadmap.pod

Tuesday February 27, 2007
07:11 AM

Project ideas

These are Perl 6 project ideas that I've been working on:

- Develop kp6-C (started)

- Develop kp6-Parrot, writing new PMCs as-needed

- Finish kp6 closure and coroutine implementation (perl5 backend)

- Implement a lazy Array PMC (is this SoC'able?); coordinate with particle++ work on generators

- Find out how to implement lazy Arrays for pugs; maybe learn some Haskell

- Fix Pugs::Compiler::Rule to current specifications

- Make v6.pm (or kp6?) use the Perl6-STD grammar

- Finish Pugs::Compiler::Rule p5-regex backend, using the new features implemented by dmq++

- Merge some of kp6 ideas to v6.pm; this would help making v6.pm feature-complete

- Help putter++ with pluggable v6.pm