Live data from Hacker News

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

mcmillen.dev

131–140 of 170 posts

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

#131

Earlier quoted context omitted.

It started around two decades ago, but I would say the "use strict if at all possible or you're doing it wrong" consensus was reached at least as long ago as 2005, being conservative. Because backwards compatibility was always seen as paramount, it never became default , but if you opted into new version features by version number[1], those advanced to enabled both new features and to turn off or warn on use of what…

Thanks for that answer, very interesting to know as someone who feels like they got into perl pretty late in the game. I do appreciate it where it works for sure. I could definitely picture programming in perl in the 90s before people commonly implemented use strict; being a complete hellscape though

Yes, and it was exacerbated by mod_perl in Apache basically working by taking a Perl script/CGI and using eval to turn it into a sub, meaning any subs defined in that script (and not a module it included) to accidentally create closures easily, which really played havoc, and so people adopted... interesting workarounds[1], all in the name of performance.

1: https://news.ycombinator.com/item?id=11670454

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

#132

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…

Perl might be weird, but it's logic and it makes sense. References are not automagical, but explicit, so you don't get an inconsistent function calling model. If you call a sub like `something(%h)`, it will get a copy of the hash. If you use `something(\%h)` the sub will receive a reference to access the hash instead. This is way better than Python or Java where everything is "pass-by-reference" until it isn't, and the fact a function won't modify the arguments you passed to it is basically a gentleman's agreement.

Perl is complex, but it is also rewarding when you use it for those tasks it's good at (like gluing code together and text processing).

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

#134
post #24

Earlier quoted context omitted.

Don't take attacks on a tool you like as an attack on you. This is rarely ever the intention, and I'm 100% certain wasn't the intention of the poster here. The tools you use shouldn't be your identity. Chill.

One person’s tool is another person’s livelihood, the corner stone of their professional experience, and the basis by which other people will (apparently) judge their technical expertise

> the basis by which other people will (apparently) judge their technical expertise

You lost me here. Even if someone thinks that Perl is an unholy abomination to work with, it doesn't follow that those with expertise in it are less skilled. If anything, it seems like it implies the opposite: expertise in it is harder. The counterpart would be something like claiming that Python is a toy language, simple to use but not suitable for Real Work. This claim is the exact opposite as the Perl complaint, and it seems like _that_ would imply negative things about expertise in the language.

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

#135

Earlier quoted context omitted.

One person’s tool is another person’s livelihood, the corner stone of their professional experience, and the basis by which other people will (apparently) judge their technical expertise

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…

> 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 fascinated to hear this. I quite dislike Apple quite a bit as a company/entity, for a variety of pragmatic and philosophical reasons, but the idea that that would extend to their employees (let alone those working on their platform) is wild to me.

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

#136

Earlier quoted context omitted.

Why do people post nasty things like this?

Why does it feel like HN has become so incredibly sensitive? I have been reading comments here a while (13 years I think), and noticed that in the past couple of years is when critical of any piece of software, no matter how warranted or how tongue in cheek, results in comments like this. How would you have phrased the original sentiment that you wouldn’t think was nasty?

Are you interpreting chrisseaton's comment as being in response to the original comment denigrating Perl? It seems more like it's a response to the defensive comment from petereps

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

#137
post #38

Earlier quoted context omitted.

I’m sorry the code you produced made you so unhappy EDIT: verb tense changed

It's 2021, stop writing legacy code that others will have to maintain.

Code is never legacy at the time of writing. That's... Not what legacy means.

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

#138
post #99

In university, I learned Perl out of curiousity. It was the first scripting language I tried; I was only familiar with Java, C and Scheme at the time. After reading Programming Perl from cover-to-cover, I suddenly felt like I had superpowers. I probably would have felt the same if I'd taken the time to learn bash scripting, but that's not how it worked out. I tried to automate everything in my life with Perl. I'd wal…

That is what bash/pipeline programming felt like for me the first time I mastered it. I missed the Perl boat by a few years, riding the Python2/Java wave at Uni instead, but I did encounter it a few times in legacy (read: 5-years old) code and could only marvel at its string manipulation capabilities. I like to think of it as the extended bash that I never took the time to learn

I'm not super familiar with Perl, but I gather that it shares much of bash's, er, ergonomic hurdles.

Is there something about gaining scripting power that requires such poor usability? I resisted it for a while, but I just write all my workaday scripts in Python now, and I'm honestly a little baffled as to why I stuck with bash for so long.

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

#139
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…

This makes me wonder how many of Van Gogh's works are valid Perl. Perhaps he invented the language...

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

#140
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?

In a way aren't all vocational skills possibly fun, exciting and interesting? I don't really like the idea that there are "bad things" to teach. I can have fun cooking, woodworking, plumbing and even filling my taxes.
Post reply on HN