Live data from Hacker News

93% of Paint Splatters Are Valid Perl Programs (2019)

mcmillen.dev

101–110 of 170 posts

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#101
post #54
post #23

Earlier quoted context omitted.

Why are TikTok and YouTube excluded from "kids being kids" activities? If that's what all the kids are doing then it seems that's what a kids activity has become. I used to play with neighborhood kids quite a bit when I was younger. Now my nephew plays Fortnite almost every day with 5ish different friends. He gets way more experience socializing than I ever did. Ultimately (I think) kids need to learn to socialize wi…

I don't know about TikTok well enough but as far as YouTube goes ... the race for eyeballs, views, even money and etc. produces some pretty skewed results / activity and carries a lot of negatives with the drive to just pump out continuous content, produce youtube drama, etc. And now all that content is out there with all the mistakes a kid will make, for the world to see, possibly forever. Granted if a kid were to j…

>for the world to see, possibly forever.

When I was 10 or so, I uploaded some dumb little skits with my friends to YouTube. The videos accumulated about 2k views total, and are all gone now, and no one will ever recognize me from them.

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#102
post #68

I feel bad about upvoting this given that I kind of agree with the tweet that this sort of responds in an inappropriate tone to (if you resonated with the message).

Is programming a purely vocational skill to you? Do you not find it fun? Exciting? Interesting?

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#103

That's a fun read. I once wrote an entire CMS in Perl. I still wake up, screaming, sometimes. [UPDATE] It appears as if my flippant remark caused upset. I am sincerely sorry that this was the case. No offense was meant. @peteretep, you have my sincere apology. It was a flippant remark. At the time I wrote it (mid-1990s), Perl was the best way to write portable server-side code. I took the time to learn it, and got fa…

The dreaded words, "your job is to write a CMS"

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#104
post #91

Most of this appears to be Perl's tolerance for "barewords" if you don't "use strict;". I suspect this dates back to the Perl4 -> Perl5 transition, when they removed the requirement to call a subroutine using an ampersand, like &somesub could just be somesub. Unlike, say Python, Perl doesn't require subroutines to be defined before they are called. For reasons I don't fully understand, barewords preceded by '-' are s…

> For reasons I don't fully understand, barewords preceded by '-' are still allowed, even with "use strict".

This - the fact, rather than any justification - is documented in `perldoc perlop`:

Unary "-" performs arithmetic negation if the operand is numeric, including any string that looks like a number. If the operand is an identifier, a string consisting of a minus sign concatenated with the identifier is returned. Otherwise, if the string starts with a plus or minus, a string starting with the opposite sign is returned. One effect of these rules is that -bareword is equivalent to the string "-bareword".

Typically Perlish, that means you can do stuff like the following because, I dunno, reasons?

   $ perl -E ' use strict; use warnings; say - -foo' # or -(-foo)
   +foo
> Also allowed as hash keys like $foo{bar}=1 or (foo => "bar").

Quoting `perldoc perlop` again:

The "=>" operator (sometimes pronounced "fat comma") is a synonym for the comma except that it causes a word on its left to be interpreted as a string if it begins with a letter or underscore and is composed only of letters, digits and underscores. This includes operands that might otherwise be interpreted as operators, constants, single number v-strings or function calls. If in doubt about this behavior, the left operand can be quoted explicitly.

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#105

Can we talk about the original tweet some? How DO we let kids be kids in this age where all the other kids wanna do is be on YouTube and TikTok?

I have kids of my own, and I think it's absolutely possible to do both. My daughter is 4 now, and loves to splash in mud and do all of that stuff. At the same time, she loves doing puzzles and art, which is still normal kid stuff. I think the problem is that the original tweet seems to think that "coding" is only a vocational skill, and it's definitely not. When you're that age, coding is just another form of express…

That lady probably thinks programmers are the way they're depicted in Dilbert lol.

Anyways, I agree. It's another form of expression. Just like Math or Music.

But I do also agree, in part with her point, that kids should explore possibilities and be kids instead of having to worry about their vocation so young and being put on a track to become something.

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#107
post #45

Earlier quoted context omitted.

Booking.com also

tbh, I'm still sad that Python won against Perl during the heyday. Perl was and is still a fun language.

Perl is cool but it's got a hell of a lot of cryptic operators for its syntax. They make sense after you learn them but for beginners it's clear why python gets picked up way easier. They're not having to think in symbols and stuff, it just looks more like a list of instructions rather than a mess of dollar signs and 'my' (my what? just not retrospectively intuitive...)

That said I like perl (And lately, awk/sed) a lot more for things that python is just SLOW at. Plus for systems-level scripts, considering that most linux/BSD installs you encounter on anything at all will have perl installed, let's say you encounter a router or something like that you need to work on somehow internally -- Do you even have room for another interpreter on there? Better be at least initiated in using perl if you want to hack on that. I've also recently found it really useful for rescuing an ancient database file format from the 1980s which was super handy considering other tools choked on it.

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#108
post #8

This is obviously just a bit of fun, but looking at the output examples, I think the OCR used may be flawed in that it's heavily optimised to produce characters used in natural language (alpha & spaces) rather than to produce e.g. operators common in code. The number of "special characters" output is extremely small. This will bias it heavily toward producing identifiers, which will be valid in most common programmin…

what got me is the actual unrecognized text on one of the images in the bottom corner

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#109

Earlier quoted context omitted.

Exactly. I feel your pain. I write software for Apple systems. It’s modern, high-quality code, but it’s for Apple. There are people that have never met me, and have never had any prior interactions with me, that hate (and that’s not hyperbole) me; simply because of that one fact. I’m constantly reading stuff about Apple, and people that use/like/support/develop for Apple, that is intentionally insulting and demeaning…

Chris, we’re good. As others have pointed out, sometimes an edgy joke gets an edgy response.

Honest question. When did:

use strict;

Become more commonplace usage?

Re: 93% of Paint Splatters Are Valid Perl Programs (2019)

#110

Earlier quoted context omitted.

tbh, I'm still sad that Python won against Perl during the heyday. Perl was and is still a fun language.

Perl is cool but it's got a hell of a lot of cryptic operators for its syntax. They make sense after you learn them but for beginners it's clear why python gets picked up way easier. They're not having to think in symbols and stuff, it just looks more like a list of instructions rather than a mess of dollar signs and 'my' (my what? just not retrospectively intuitive...) That said I like perl (And lately, awk/sed) a l…

> Plus for systems-level scripts

I still tend to use it for that.

Post reply on HN