• 0 Posts
  • 97 Comments
Joined 1 year ago
cake
Cake day: June 24th, 2025

help-circle
  • A bit of Perl code from the late 90s/early 2000s that worked something like this (working from memory, untested):

    my $hits = `grep $search_string $file`;
    my @lines = split /\n/, $hits;
    my @real_hits;
    for( my $i = 0; $i < scalar(@lines); $i++ ) {
        my $line = $lines[0];
        if( $line =~ /$search_string/ ) {
            push @real_hits, $line;
        }
    }
    

    Let me explain a bit about what this does. Instead of reading a file line-by-line and using Perl’s regex engine to match, it uses backticks to call out to the shell for grep. Those are split up by line. Then go through those lines (in a C-style for loop, not the perfectly good foreach version that Perl has had for a long time) and now we use a regex to match that line. You know, just in case shell grep didn’t do its one job.

    If anything, I’m probably making this code look better by declaring variables with my and following use strict standards.

    This was written by a guy who was the main programmer before I was hired. I was told he was a real piece of shit. He often had some checks in his code that, if not passed, threw messages to the client like “WE HAVE DETECTED YOUR HACKING AND LOGGED YOUR IP ADDRESS WE’RE GOING TO GET YOU”. Never met him personally, but his code is a pretty good example of why everyone came to hate Perl.














  • Definitely.

    The first time I tried to setup IPv6 on OPNsense, Android phones thought they couldn’t connect to the Internet after getting on WiFi. Something about the endpoint they check for Internet access wasn’t going through. I backed out some settings, and something fixed it, but I’m still not sure what.


  • The good news is that the amount of traffic hitting Google that’s connecting over IPv6 is just about at the 50% mark:

    https://www.google.com/intl/en/ipv6/statistics.html

    We need to start talking about IPv6 as something that is here and now, not some far off future.

    IMHO, the biggest issue is setup for SOHO users. Routers for that market have gotten the IPv4 setup wizard process down pretty good. With IPv6, there’s like three different ways your ISP might have set it up, and you need to tell your router which way to go. It’s complicated enough that even people with a solid understanding of IPv4 can be confused trying to figure out what works.