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 ]

moritz (8678)

moritz
  (email not shown publicly)
http://perlgeek.de/

Perl hacker since about 2003, currently tries to improve the Perl 6 test suite, and to promote Perl 6. Studies Physics in Germany.
+ -

  Comment: I voted "different" (Score 1) on 2010.08.05 10:40

by moritz on 2010.08.05 10:40 (#72257)
Attached to: Perl 6 and Perl 5 are different languages

... and "same" too.

It's not a binary decision, if you ask me.

Read More 22 comments
Comments: 22
+ -

  Comment: Re:It's OK (Score 1) on 2010.06.20 9:30

You can even now play with fakedbi, see http://github.com/mberends/fakedbi/

I know it supports mysql, and since parrot has postgresql bindings, I think it shouldn't be too hard to add a postgres backend.

If you do it yourself, you can actually make *sure* that Rakudo Star ships with postgres support :-)

Read More 4 comments
Comments: 4
+ -

  Comment: Re:A common workaround (Score 1) on 2010.05.10 4:14

by moritz on 2010.05.10 4:14 (#71981)
Attached to: The tests Rakudo doesn't run

This should work indeed, but currently suffers from a lack of list flattening in Rakudo. Specifically

my @a = <a b c>;
say (@a X 1).perl; # ("a", 1, "b", 1, "c", 1)
say (@a X 1).elems; # 3

And then the hash assignment complains about an odd number of elements.

One can explictly construct Pair objects though:

my %h = @a X=> 1;
say %h.perl; # {"a" => 1, "b" => 1, "c" => 1}

Which is maybe a bit prettier than colomon's solution, but we can argue about that :-)

Read More 5 comments
Comments: 5
+ -

  Comment: A common workaround (Score 1) on 2010.05.09 11:40

by moritz on 2010.05.09 11:40 (#71973)
Attached to: The tests Rakudo doesn't run

my %hash;
%hash{@array} = 1 xx @array;

Actually I like that better than the map, but I agree it sucks that the map version doesn't work right now.

Read More 5 comments
Comments: 5
+ -

  Comment: Perl 5 developers had such a generator (Score 1) on 2009.10.21 5:41

by moritz on 2009.10.21 5:41 (#70932)
Attached to: The joy of breaking stuff

In the early days of perl5, somebody wrote a markov chain random code generator and automatically looked for segfaults. It basically turned up one segfault in dozens of variations, and not much more.

But given that rakudo is easier to kill than perl 5, it might still be worth a try.

Read More 1 comments
Comments: 1
+ -

  Comment: Representation, not delegation or inheritance (Score 1) on 2009.10.08 4:48

by moritz on 2009.10.08 4:48 (#70815)
Attached to: Object Responsibilities versus Object Behavior

In a perfect Perl 6 world you'd implement an ORM not as a inheritance or delegation, but by providing a different low-level representation, which manages storage to a db.

The object doesn't have to be aware that it's stored, you just have to provide a constructor that allows injecting of a different representation.

Sadly Rakudo doesn't implement representation polymorphism yet, SMOP might do it already

Read More 7 comments
Comments: 7
+ -

  Comment: Help me to help you (Score 1) on 2009.10.04 13:05

by moritz on 2009.10.04 13:05 (#70780)
Attached to: Migrate from use.perl to ...?

Hi jjore, hi everybody else.

I wanted to set up a shared perl blogging for almost half a year now. I've got a nice domain name (perlblog.org), and soon I'll also have a decent server (4 cores, 2GB RAM, root access) at my disposal.

What I need is tuits, and an idea what to install. If you want to help me, please write me an email (moritz at faui2k3 dot org) so that we can discuss details, give you access to that server etc.

I'd really love to see a nice, central(ish) site for perl blogging - having everyone scattered in all four winds doesn't seem like a good alternative to me.

Read More 7 comments
Comments: 7
+ -

  Comment: Answered by e-mail (Score 1) on 2009.09.06 15:24

by moritz on 2009.09.06 15:24 (#70507)
Attached to: Struggles with Trig
Comments: 1
+ -

  Comment: What's wrong with "Capture"? (Score 1) on 2009.08.26 8:07

by moritz on 2009.08.26 8:07 (#70268)
Attached to: Translating Perl 6 terms

"Capture" is the name of a type, which you'll have to use literally in your Russian texts anyway - why not just use it everywhere?

I tried to translate parts of the Synopsis to German, and I found that translating all of the words would skew the meaning too far.

Anyway, if you insist on finding a translation, maybe something like "snapshot"? in my understanding a capture is a snapshot of a collection of things that can be passed to a subroutine...

Read More 13 comments
Comments: 13
+ -

  Comment: Re:very exciting; one request (Score 1) on 2009.08.20 3:32

by moritz on 2009.08.20 3:32 (#70193)
Attached to: Building a "useful Perl 6"

You'll be pleased to know that the ins2 branch has been merged into trunk, and that the August release of Rakudo can now be installed.

Read More 26 comments
Comments: 26
+ -

  Comment: Re:very exciting; one request (Score 1) on 2009.08.05 15:35

by moritz on 2009.08.05 15:35 (#69888)
Attached to: Building a "useful Perl 6"

I'm pretty sure that will be done, because we have a branch for that already.

If you want to help us, check out rakudo, then run 'git checkout ins2', and follow the usual build instructions. Then tell us if that worked for you, and if you can run a simple Perl 6 program with it (perl6 -e 'say "Hello, world"' or so).

(I checked that it works for me with an installed parrot, but I didn't try to install Rakudo itself)

Read More 26 comments
Comments: 26
+ -

  Comment: Some more background (Score 1) on 2009.08.05 3:30

by moritz on 2009.08.05 3:30 (#69875)
Attached to: (Something) to be released around October 2010

I thought and wrote a bit about both about "spring" the background, see here: http://perlgeek.de/blog-en/perl-6/rakudo-star-announced.html (nothing official really)

Read More 4 comments
Comments: 4
+ -

  Comment: JSON (Score 1) on 2009.07.31 6:35

by moritz on 2009.07.31 6:35 (#69818)
Attached to: Why I Don't Like YAML

JSON is much simpler, but to be fair it only supports a subset of what YAML does. For example it's not good for serialization, because you don't have any way to specify type names.

Anyway, JSON being much simpler is why I wrote a JSON parser and generator for Perl 6 (with some help from Johan Viklund), see http://github.com/moritz/json/. As far as I can tell it implements JSON to 100%.

Read More 11 comments
Comments: 11
+ -

  Comment: Elegant Perl 6 (Score 1) on 2009.07.30 4:20

by moritz on 2009.07.30 4:20 (#69777)
Attached to: Some Perlmonks password statistics

I'd like to draw some attention to the analyzing script.

Please notice how masak uses regexes and junctions of regexes as matchers, and doesn't need to distinguish them where he uses them.

Also note that the use of the cross operator 'X' means that he has to use only one loop (instead of two nested loops).

I really like that code. And I can't think of any Perl 6 feature (at least not off the top of my head) that would make that code even nicer, but is not yet implemented in Rakudo.

Read More 14 comments
Comments: 14
+ -

  Comment: Tests rewrite (Score 1) on 2009.07.28 1:38

by moritz on 2009.07.28 1:38 (#69710)
Attached to: A Commitment to Perl

First of all I noticed that you started to improve http://perl6-projects.org/ which is a nice first step.

Then I'd like to point you to the test suite, particularly to the file t/spec/TODO. It contains various tasks in the test suite; attacking any of them would be of great help.

If you have questions, feel absolutely free to ask on #perl6, usually somebody can answer, or highlight me, and I'll backlog and try to answer anything related to tests.

And don't feel bad if you can't follow most discussions in #perl6, it started much the same for, and there are still discussions that make my eyes glaze over. (I first joined #perl6 to report a broken link, nothing more ... ;-)

I hope your experiment works out; in the perl community (and as least as much in the Perl 6 subset of the community) we're so used to people doing their own thing that we are not used to have somebody to direct; it's very new feeling for me.

Read More 6 comments
Comments: 6