▲ 231 ▼ Linux kernel goes full AI slop code, hides chatbot commits (pivot-to-ai.com) submitted 2 days ago by destructdisc@lemmy.world to c/fuck_ai@lemmy.world 137 comments fedilink hide all child comments Fucking traitorous scum
[–] raspberriesareyummy@lemmy.world 3 points 1 day ago (7 children) Perl has scope delimiters, so a sturdy glass house. permalink fedilink source parent hideshow 7 child comments replies: [–] nik9000@programming.dev 2 points 16 hours ago (3 children) I genuinely love the idea of the $1 after a match. It feels so natural in perl! So many things are text matching. But! But! But!! Those $ variables are dynamic scoped! If you call a method and it matches stuff you lose the variables! I'll bet there is a way around it. But it made me so sad. permalink fedilink source parent hideshow 3 child comments replies: [–] raspberriesareyummy@lemmy.world 1 point 5 hours ago (2 children) Yes, regex handling in Perl is the smoothest I have ever seen, and it matched the first description I heard of perl as "the best tool for text processing". I have done big things with that. Those $ variables are dynamic scoped! If you call a method and it matches stuff you lose the variables! My match scopes typically looked like so: if ($inString =~ /^([ \t]+)(.*)$/) { my $indent = $1; # store first match my $remainder = $2; # store second match # do stuff } (not tested, just edited by hand to anonymise) permalink fedilink source parent hideshow 2 child comments replies: [–] nik9000@programming.dev 1 point 5 hours ago (1 child) I think it came up more like if ($inString =~ /^([ \t]+)(.*)$/ && has_a_cow($2)) { For me. I dunno. I was never good at perl. I just wanted to hack something together. permalink fedilink source parent hideshow 1 child comment replies: [–] raspberriesareyummy@lemmy.world 1 point 5 hours ago I did bigger parsing tools in perl, so I often matched a lot of expressions and needed them all in variables. Not only to save the $N variables, but also for code readability, I would then store the matches in proper variable names permalink fedilink source parent [–] eskimofry@lemmy.world 3 points 1 day ago* perl accepts perlin noise as valid perl programs so scope delimiters don't mean much. permalink fedilink source parent [–] kunaltyagi@programming.dev 1 point 1 day ago (1 child) So does Python /s Just create a new file or a top level function permalink fedilink source parent hideshow 1 child comment replies: [–] raspberriesareyummy@lemmy.world 0 points 1 day ago except that it breaks my debugging strategy, where I left-align debug code so I can easily spot it and remove it later. permalink fedilink source parent
[–] nik9000@programming.dev 2 points 16 hours ago (3 children) I genuinely love the idea of the $1 after a match. It feels so natural in perl! So many things are text matching. But! But! But!! Those $ variables are dynamic scoped! If you call a method and it matches stuff you lose the variables! I'll bet there is a way around it. But it made me so sad. permalink fedilink source parent hideshow 3 child comments replies: [–] raspberriesareyummy@lemmy.world 1 point 5 hours ago (2 children) Yes, regex handling in Perl is the smoothest I have ever seen, and it matched the first description I heard of perl as "the best tool for text processing". I have done big things with that. Those $ variables are dynamic scoped! If you call a method and it matches stuff you lose the variables! My match scopes typically looked like so: if ($inString =~ /^([ \t]+)(.*)$/) { my $indent = $1; # store first match my $remainder = $2; # store second match # do stuff } (not tested, just edited by hand to anonymise) permalink fedilink source parent hideshow 2 child comments replies: [–] nik9000@programming.dev 1 point 5 hours ago (1 child) I think it came up more like if ($inString =~ /^([ \t]+)(.*)$/ && has_a_cow($2)) { For me. I dunno. I was never good at perl. I just wanted to hack something together. permalink fedilink source parent hideshow 1 child comment replies: [–] raspberriesareyummy@lemmy.world 1 point 5 hours ago I did bigger parsing tools in perl, so I often matched a lot of expressions and needed them all in variables. Not only to save the $N variables, but also for code readability, I would then store the matches in proper variable names permalink fedilink source parent
[–] raspberriesareyummy@lemmy.world 1 point 5 hours ago (2 children) Yes, regex handling in Perl is the smoothest I have ever seen, and it matched the first description I heard of perl as "the best tool for text processing". I have done big things with that. Those $ variables are dynamic scoped! If you call a method and it matches stuff you lose the variables! My match scopes typically looked like so: if ($inString =~ /^([ \t]+)(.*)$/) { my $indent = $1; # store first match my $remainder = $2; # store second match # do stuff } (not tested, just edited by hand to anonymise) permalink fedilink source parent hideshow 2 child comments replies: [–] nik9000@programming.dev 1 point 5 hours ago (1 child) I think it came up more like if ($inString =~ /^([ \t]+)(.*)$/ && has_a_cow($2)) { For me. I dunno. I was never good at perl. I just wanted to hack something together. permalink fedilink source parent hideshow 1 child comment replies: [–] raspberriesareyummy@lemmy.world 1 point 5 hours ago I did bigger parsing tools in perl, so I often matched a lot of expressions and needed them all in variables. Not only to save the $N variables, but also for code readability, I would then store the matches in proper variable names permalink fedilink source parent
[–] nik9000@programming.dev 1 point 5 hours ago (1 child) I think it came up more like if ($inString =~ /^([ \t]+)(.*)$/ && has_a_cow($2)) { For me. I dunno. I was never good at perl. I just wanted to hack something together. permalink fedilink source parent hideshow 1 child comment replies: [–] raspberriesareyummy@lemmy.world 1 point 5 hours ago I did bigger parsing tools in perl, so I often matched a lot of expressions and needed them all in variables. Not only to save the $N variables, but also for code readability, I would then store the matches in proper variable names permalink fedilink source parent
[–] raspberriesareyummy@lemmy.world 1 point 5 hours ago I did bigger parsing tools in perl, so I often matched a lot of expressions and needed them all in variables. Not only to save the $N variables, but also for code readability, I would then store the matches in proper variable names permalink fedilink source parent
[–] eskimofry@lemmy.world 3 points 1 day ago* perl accepts perlin noise as valid perl programs so scope delimiters don't mean much. permalink fedilink source parent
[–] kunaltyagi@programming.dev 1 point 1 day ago (1 child) So does Python /s Just create a new file or a top level function permalink fedilink source parent hideshow 1 child comment replies: [–] raspberriesareyummy@lemmy.world 0 points 1 day ago except that it breaks my debugging strategy, where I left-align debug code so I can easily spot it and remove it later. permalink fedilink source parent
[–] raspberriesareyummy@lemmy.world 0 points 1 day ago except that it breaks my debugging strategy, where I left-align debug code so I can easily spot it and remove it later. permalink fedilink source parent