4 ms·
Code golfing originated in perl. There was strong cultural pressure to be able to write perl in as few bytes as possible, ideally as a CLI one-liner. Books[1]
by syncsynchalt 10mo ago
Code golfing originated in perl.
There was strong cultural pressure to be able to write perl in as few bytes as possible, ideally as a CLI one-liner. Books[1] were written on the topic.
https://www.thriftbooks.com/w/perl-one-liners-130-programs-that-get-things-done_peteris-krumins/11276040/item/15741774/ https://www.thriftbooks.com/w/perl-one-liners-130-programs-t...
- creer 10mo agoOne-liners is one of the ways you can use perl. You can also use it as the embedded language in some larger project. As perl CGI. As mod_perl. etc. There is no "cultural pressure" to use any of these. You can choose to mess around with one-liners and you can choose to spend time shaving a few characters off your code. Or not. None of this is the one true way. This is not python.
- nocman 10mo ago> There was strong cultural pressure to be able to write perl in as few bytes as possible Hard disagree. Many Perl programmers enjoyed engaging in code golf (always just for fun, in my experience), but in my nearly 30 years of programming Perl, I never encountered anything that I would call pressure to do so -- not from anyone.
- boisterousness 10mo agoCode golfing originated in APL.