wtf « Perl
Perl ads here
Wednesday 7 April 2010 @ 6:53 am

There ads on this blog. Really. You probably do not see it, if you use adblock for firefox or similar solution.

Turn AdBlock off and look at right column. First, there are ads about perl – form Gabor – I wrote about it here. Then a few adsense (from Google). They should match the content of this blog. And then is a link to one particular book I like very much.

And guess what? No one clicks the ads from Google. I see that in my stats. Even though those ads are matched to site content – as you can see. I doubt if anyone clicks the ads from Gabor either (by analogy – beside, I guess, most geeks use adblock and similar solutions – so they do not even see it – and those ads are intended for THEM). If you have clicked and ad here – either from Gabors perl ad server, or google – raise your hand (add a comment).

Comments (4) - Posted in wtf by Lech  



Perl Ironman – what is going on?
Wednesday 24 March 2010 @ 6:40 am

Did someone forgot about perl ironman competition and neglects it?

See http://jquelin.blogspot.com/2010/02/ironman-challenge-status.html and http://www.lowlevelmanager.com/2010/01/perl-iron-man-challenge-is-cron-still.html

wtf?

Comments (1) - Posted in wtf by Lech  



Nice people I met at YAPC::EU
Wednesday 18 November 2009 @ 6:55 am

On the YAPC::EU this summer I met a few nice people.Here is a short list, just a few form many nice people:

I was honoured to meet Larry Wall, who told me to have “appropiate amount of fun” on my presentation about WTFs.

A few minutes earlier I met Damian Conway, whom I helped with aplying last-minute changes to conference schedule and putting in on conference room door, before I realised who he was.

Paul Fenwick dressed as Star Trek hero did presentation about klingon Perl programming. A bit earlier this day, Damian Conway did completely different presentation about klingon Perl programming, making with his voice sounds that soon made him thirsty.

to be continued…

Comments (0) - Posted in yapc by Lech  



My presentation at YAPC::EU::2009 was graded
Wednesday 4 November 2009 @ 6:54 am

I received feedback from conference attendees about my presentation at YAPC::EU. And it was very good :)

After the conference attendees are encouraged to express their opinions on presentations they attended and grade them. Then the aggregated grades and opinions are sent to speaker.

I was a bit nervous, but fortunately presentation about WTFish side of using Perl was graded between 7 and 10 (on a scale from 1 to 10), mostly 8-9.

There were also opinions – good and bad.

Bad: I could have been speaking louder and with better intonation and gestures. Slides also could be a bit better. Someone even wrote “Poor guy, it is hard to present in another language. I hope he isnt disheartened, his presentation is good” :-)

Good opinions (quoted from the feedback I got):

  • Covered well some common but not obvious traps in Perl for newbies. The material was good.
  • Good title and subject – humourous way to present this sid of Perl. As a total beginner some parts I knew of and felt the same WTFness and it is nice to feel that it is as mad as I thought!
  • This presentation pin pointed some of the things that regularly “bite” newbies, so it was most valuable. It had many examples, and I hope I can remember them all. [ note: there are slides available to download at this blog, so you don't have to remeber all :)   - Lech ]
Poor guy, it is hard to present in another language.	I hope he isnt
  disheartened, his presentation is good

Thanks for good opinions :) and also for bad – those taught me something about presentations. Next time it will be better :)

Comments (1) - Posted in yapc by Lech  



Perl 5.10.1
Wednesday 14 October 2009 @ 6:52 am

Well, the perl 5.10.1 was released some time ago. It includes some nice features and some strange features.
I’m osting it in “future” category, as I do not intend to use it now. Neither 5.10. Why? It is being changed, and I like language I develop in to be more constant  :-)

Nice:

  • bug-fixes, optimisations, tuning. Runs faster.
  • autodie pragma :-)

Strange:

  • “..” operator is interpretedin boolean context when used inside a when statement – yet another WTF. So, the behaviour of “..” is not less consistent. On the other hand it may be usefull.
  • Change of smart match behavior in comaprison to 5.10
    1. better encapsulation
    2. ordering matters – $key ~~ %hash is OK, while %hash ~~ $key is not.
    3. distributive – applies itself recursively across data structures.  Isn’t it getting too smart? And too complex to understand in real code? And too WTFish? I’ll quote the fragment of perl tips newsletter from http://perltraining.com.au/

      following expression is *true* when evaluated under 5.10.1, but *false*
      under 5.10.0:

      ‘bar’ ~~ [ 'foo', [ 'bar', 'baz' ], ‘qux’ ]

      In the same vein, given the following code:

      [ 'foo', 'bar', 'baz' ] ~~ \&subroutine

      Perl 5.10.1 will call the subroutine *three* times (once for each
      element), and the whole expression will be considered true if *all* the
      results are true. On the other hand, Perl 5.10.0 would call the
      subroutine only once, passing in the whole data structure.

Comments (0) - Posted in future by Lech  



More on foreach localisation
Wednesday 9 September 2009 @ 6:47 am

This was first time I encountered the strange foreach localisation.

One day I was using global var in script (lame, I know). I wanted to use it in foreach. And its value magically disappeared when called other subroutine. This was strange.

This was a script to make reports for customers. The code looked like this (many parts taken out for brevity and to protect the innocent ;) ) :

read more…

Comments (1) - Posted in wtf by Lech  



WTFish side of using Perl talk at YAPC::EU 2009 – slides
Wednesday 26 August 2009 @ 6:52 am

I did my talk about WTF in Perl at YAPC::EU 2009 at Monday, August 3rd. It was a bit stresfull experience for me. Especially that my laptop did not want to show presentation on the projector. I turned out that I do not know my own laptop. Right, I use it rarely. Hopefully presentation was not bad, I received some positive feedback. People were clapping too. Nice :) One person asked me for slides. So here they are:

Feedback about my talk is appreciated, use comment field below :)

Comments (1) - Posted in wtf, yapc by Lech  



Perl WTFs – last in function
Monday 27 July 2009 @ 10:17 pm

Imagine you have a loop – and in that loop you call a function (sub) – your, or from some module. And imagine that someone by mistake left there “last” statement. What would it do? it will terminate your loop.

for … {

something…;

function();

something… that would not be executed…

};

sub function {

something something…

last; # by mistake, maybe it should be a “return”?

}

For some people it is a WTF, for some it is very logical way , that it should work like.

What do you think about it?

Comments (0) - Posted in wtf, yapc by Lech