Threads for domm

    1. 1

      There’s a few standard size tricks missing here. For example the apk index is left over, and the -dev packages are not removed after installing the ssl packages.

      1. 1

        Thanks, I’ll try to add these suggestions. Do you by chance have any pointers to Dockerfiles that do that? (I find it always easyer to steal^w learn from others…).

        1. 2

          There’s a lot of good examples at https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

          To verify your image and get a summary of things you can remove, check https://github.com/viraptor/cruftspy

    2. 3

      Python is really a shit language for obfuscating things. In the Perl community, obfuscated scripts that print “Just another Perl hacker” have been a tradition for decades, and the richness of the language really pays off when you’re trying to be a jerk.

      Fresh from 2009 or so, here’s my best take on the genre – this produces a rendering of my email sig at the time. I’m particularly proud of the base 26 conversion :)

      $q=q((pete gamache));$_=fpeoiaglclivdlcgglvqhcbwclemhcbwflclvqivcrgqhcbwafak
      ;sub A{for(($a=1)..pop){$a*=$a*=$a+$a*$a;$a%=999999}$a%128}sub b{@A=a..pop}$
      qq.=chr A(uc b($1))while s/(..)//;$qq="($qq)";&z;print"$q $qq 14 /Courier ";
      sub c{$x=$_[0];$x-=6.28until$x<6.28;my$a;for(0..10){$a+=($x**(2*$_)*(-1)**$_
      )/_(2*$_)}$a*2**(-$_[0]/8)}sub _{$_[0]<1?1:$_[0]*_($_[0]-1)}print join (' ',
      '66 666 translate 510 0 moveto 0 dup dup lineto 50 moveto',map{$_,c($_/8)*50
      ,'lineto'}(0..444)),' stroke findfont exch scalefont setfont 222 -30 moveto'
      ,' show 222 20 moveto show showpage';sub z{$q=~s/(g.+E)/$1, $1\@gmail.com/i}
      
      1. 3

        This has been my .signature for ages:

        #!/usr/bin/perl                             https://domm.plix.at
        for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
        
      2. 3
    3. 3

      I find it very amusing that this projects basically start with code that looks a lot like cgi-lib.pl, which gives me flashbacks to my first Perl/CGI scripts from the mid-90ies

      1. 2

        That’s great! That’s exactly the time I was thinking of when I wrote it. Glad it came through. Fun times, but I’m happy we don’t still have to write everything that way.

    4. 5

      I write scripts both in Python and Bash/ZSH but I feel like Perl 5 would be the sweet spot between those two languages for sys admin stuff.

      I don’t know if Perl 6 serves that spot as well, but it may be an interesting choice for sys admins if it does.

      1. 6

        I think Perl 6 serves that spot well in many senses except one: it doesn’t come preinstalled with virtually every real operating system.

      2. 6

        Perl 6 has been renamed to Raku: https://www.raku.org/

    5. 1

      I have never done much Perl, but I enjoyed playing with it one spring at university. Who here is using Perl regularly?

      1. 7

        I used to work at Booking.com, which has about a million lines of Perl in production. It was good times, I quite enjoyed working with it.

      2. 6

        It was my main language from about 1998-2008. I don’t write programs in Perl anymore, but I regularly use perl -ne, perl -pe, and perl -i -p -e on the command line and in scripts.

        1. 9

          Same here. Back in the days of “traditional sysadmin” I used Perl for most tasks, be it small processing scripts or CGI web apps. These days Perl has fallen out of fashion and as much as I still like writing things in Perl 5, none of my colleagues wants to touch Perl code, so I end up doing much more Go, or sometimes Python (but I’m not a huge fan of Python).

          That said, I did manage to semi-sneak some Perl 5 into production a while back, and recently replaced a complicated shell script which was doing all sorts of echo | grep | sed | xargs etc. - I put the Perl replacement up for review and most people said it was “surprisingly readable” and that no other language could have done it as well.

          Perl definitely still has its place, but there’s too much stigma around it now.

          1. 6

            It’s possible to write reasonable Perl, but it’s very easy to make unreadable Perl if one isn’t careful. Unfortunately, sysadmins under duress was the most significant Perl userbase, while not one known for taking time on scripts. (Not helping Perl’s reputation for readability also: JAPH)

            1. 7

              Agreed, TMTOWTDI is both good and bad. Perl lets you take shortcuts, so people take them. PHP is arguably just as bad for this (I guess because it evolved from Perl).

      3. 5

        Never tried perl5, but I’ve been using perl6 quite a bit lately and I really enjoy it.

      4. 5

        I use Perl regularly, as my “secret weapon” when consulting and/or writing API backends.

      5. 4

        I used perl from 2005-2010 on closed source code (a fastcgi ad-server, of all things). I remember going through the camel book(s) at the same time, and quite enjoy it. I’ll miss the Perl conferences more than the language though. :p I never got to an expert level though, so it can be that.

      6. 4

        I don’t use much Perl anymore but I really miss how well regular expressions were integrated into the language.

      7. 4

        2/3 of my regular clients are Perl shops (the third is teaching, and that’s mostly Python), so Perl is basically my dayjob :)

      8. 3

        I use Perl(5) for fun (personal projects, coding challenges etc).

        I’ve broken it out in anger at work for some ad-hoc log parsing stuff too .

      9. 2

        Not only is it the scripting language I usually reach for, and have since 4.036, but most of the externally facing services on Floodgap.com are written in Perl including the HTTP and gopher servers.

        1. 2

          I’d just like to take the opportunity to thank you for making TTYtter back in the day!

          I still use Oysttyer daily. Best Twitter client bar none.

      10. 2

        I believe The Register is still a perl shop :~)

    6. 1

      Paul Evans (‎LeoNerd‎) - ‎Full Stack in Five Minutes‎: https://www.youtube.com/watch?v=24cCjo6_sXc&t=4904s

    7. 2

      Maybe you can find some interesting tips here: “Perl Jam aims to collect together the knowledge and experience of organising some great Perl events, and order them in such a way that anyone wishing to do the same, can follow the footsteps of those who have gone before, and prepare themselves for what will hopefully become a great event.”

    8. 1

      Today I was at an information security “summit” and in the next ballroom over was a “PERL Meeting”

      I wandered over and it was a meeting for nephrologists discussing Preventing Early Renal Loss.

      1. 2

        Did you find the PERL meeting more interesting though?

      2. 1

        That’s why we call it “Perl” and never “PERL” :-)

      3. 1

        That’s a worthy goal though.