user-pic

moritz

  • Website: perlgeek.de/
  • About: I use Perl, and develop Perl 6
  • Commented on Using Role as Partial Classes
    To me, those roles sounds like a degenerate case of the normal "roles for code reuse" approach. Degenerate, because they are only composed into one class. But who knows, maybe in future there's something other than a character that does...
  • Commented on A small puzzle for you
    Here's my solution: https://gist.github.com/moritz/4421c5e9ab0e5d994bac...
  • Commented on Creating an MMORPG in Perl
    Question: do you want to hear more about my attempts to create an MMORPG in Perl, even if posts are not Perl-related? Doesn't quite fit the "RPG" part, but it fits the "MMO" part: http://www.lacunaexpanse.com/ the backend is mostly...
  • Commented on European Perl Tour 2014, getting real
    Hi brian, when you visit Frankfurt, be sure to drop by at Erlangen.pm (200km to the south-east). I'm sure we can organize a place for you to crush (in doubt at my place, though we have 2 small kids, so...
  • Commented on YAPC::Europe 2013 in Kiev, week minus 42. Food
    Please serve lunch right at the venue; it means attendants have to worry much less about where to get lunch, and it makes it much easier to converse with other people during lunch. I for one attend YAPC mostly for...
  • Commented on No Accepted Perl 6 Talks at YAPC::EU 2012?
    Thanks for looking into it. While you are at it, could you please send emails to those who have rejected talks too? It feels very weird to notify only speakers who have accepted talks....
  • Posted No Accepted Perl 6 Talks at YAPC::EU 2012? to moritz

    The YAPC::EU blog says "Our final voting round ends on Friday." So, Friday has gone by, does that mean that all talks that have not been accepted now have been rejected?

    And if so, are we really not going to have a single talk on Perl 6? I k…

  • Commented on Yet Another Friday the 13th
    Here's a Perl 6 one-liner: http://irclog.perlgeek.de/perl6/2012-07-18#i_5825055 say (2012..2017 X 1..12).map(-> $y, $m { Date.new($y, $m, 13) }).grep(*.day-of-week == 5)...
  • Commented on Perl first world problems #1
    About perlbrew being slow, if you have multiple cores you could try MAKEFLAGS=-j4 perlbrew ... to compile with 4 jobs in parallel....
  • Commented on Core Modules add/remove quick reference
    FWIW the data is all in Module::CoreList, getting it out isn't very hard....
  • Commented on How (not) To Load a Module or Bad Interfaces Make Good People Do Bad Things
    You are totally right, using a module is too much "black box" in Perl 5. And while require_module is certainly a start in the right direction, it might make more sense to start exposing the more low-level operations to the...
  • Commented on What are your environment settings for Unicode?
    FWIW I wrote http://perlgeek.de/en/article/set-up-a-clean-utf8-environment a while ago, but it probably needs to consider many more aspects and systems....
  • Commented on Perl Helps Save Endangered Languages
    I just downloaded the Perl client, and --list only shows to languages (Italian and Dutch). Is that normal? If not, where can I submit a bug report?...
  • Commented on Let's add Git userdiff defaults for Perl and Perl 6
    For Perl 6, instead of just 'sub', it's probably good to use multi|sub|submethod|method|macro Not sure if it's also a good idea to include BEGIN|END|INIT|CHECK etc., probably not....
  • Commented on Perl6 modules in Rakudo baby-steps, part 1
    For the record, you can also use the PERL6LIB environment variable on the outside of the program, just like PERL5LIB in p5....
  • Commented on Is 230 % 5 == 4? Sometimes it is.
    Output in Perl 6: 0. The reason is that 1.25 is represented as a rational number with integer numerator and denominator, so the identity 200 * 1.15 == 230 actually holds. Put another way: 15:47 <@pmichaud> I'd simply say that...
  • Commented on Grepping exact values
    In Perl 6 this form works already, because each list item is simply smart-matched against the first argument (aka matcher). If the matcher is a block/closure, the smart-matching executes the block, handing the list item as a parameter. If it's...
  • Posted Contribute to Perl 6, without huge startup costs to moritz

    Do you find Perl 6 interesting, but maybe not very accessible? Would you like to contribute half an hour of your time, if it doesn't involve learning a few new languages and weird parrot assembler langauges?

    Then participate in the ="http://perlgeek.de/blog-en/perl-6/contribute-now-…

  • Commented on Improve My Perl 6!
    You can force coercion to a hash with return %( gather for %preds.kv ...) But I'm not sure if you like that bettter. Also a perfect Perl 6 implementation wouldn't need %!freqs{$item1}{$item2} //= 0; and similar lines. I'm pretty sure...
Subscribe to feed Recent Actions from moritz

  • Sid Burn commented on Using Role as Partial Classes

    This is not true. I have no other need for movement at this time, so solving a problem I don't have is a very bad practice.

    That you can re-use it, is more a side-effect. Movement is a single responsibility, so it should be its own class. The benefit of it is that you create small classes that are easy to understand. And because it is a class you also can better test them. Actually, you can't really test a Role. Sure, you can ignore that principle, but those principles doesn't exists to be a burden on you, those are principles that especially helps you to write better c…

  • Ovid commented on Using Role as Partial Classes

    Movement is a single responsibility, so it should be its own class.

    No. A movement is an action. It's an abstract thing which doesn't stand on its own, like a character or a space station. It has to be attached to something concrete to exist.

    The idea that a class only should represent abstract things like "Customer", "People", "Car" or other things is not really right. A class represents something specific. In a full object oriented language even something simple like an "int", "float", "string" is already represented as a class. A class should represent one sp…

  • Sid Burn commented on Using Role as Partial Classes

    No. A movement is an action. It's an abstract thing which doesn't stand on its own, like a character or a space station. It has to be attached to something concrete to exist.

    The idea that something has to be stand on its own absolutly is wrong. And additionally a Movement stand on its own, a number does not.

    A number on its own has no meaning at all. You always give meaning to a number. For example you can say a number represents "meters" or "miles". Just "5" on its own does absolutly represents nothing. And we still use int, float etc. as full classes. Because…

  • Sid Burn commented on Using Role as Partial Classes

    Nah, some characters and formating has gone wrong. It's sad that MovableType has no way of edit a comment. But another thing what i wanted to say. You mentioned YAGNI.

    Actually what i say doesn't invalidated YAGNI at all. YAGNI says that you only should implement what you need. If you don't need movement, then you also should not implement it.

    But if you need Movement, then you implement it. YAGNI doesn't say: "Hey, put everything into one giant class".

    I think what you see mean is: This doesn't mean you should avoid building flexibility into your code. It means yo…

  • pru-mike commented on A small puzzle for you

    Yet another solution http://pastebin.com/7HSB8YTW

Subscribe to feed Responses to Comments from moritz

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.