Guido undoubtedly had a strong, strong hatred of the number of ways braces are overloaded in Perl.
Do you really want an example?
subdoHref{ { do { ${someglobal{Href}} = {} }; last }; }
Every single pairing there serves a different syntactic purpose. Some are related purposes, and I’ve crowbarred a few in unnecessarily for the sake of an example, but different nonetheless.
The outer pair declares the sub, and the next pair is a free block that works as a once-through unlabelled loop, which is exited with the last. (Most other languages use break for this purpose.)
The next pair are for the do which doesn’t act as a loop like the free block does. The next innermost pairing wrap a variable and the inner, innermost pairing indicate that the variable is a member of a hash (associative array) and we’re accessing the record named Href.
The lone {} indicates a hash reference, so we’re assigning a reference to an empty, anonymous hash to that hash record.
This example is ridiculous of course. There’s no need for most of those braces and syntax to do what it actually does. Also assigning to global variables is generally frowned upon.
subdoHref{ $someglobal{Href} = {} }
… is equivalent and cuts out most of the guff. Still three different uses though.
Needs a 99% print too just before the 5 second sleep. Followed by a 99.9% and another 2 second sleep. Never print 100 and just run a traceroute in a loop.
Followed by a “we’re in” from the hacker as we’re made to believe he’s reading the console spam like he’s Neo from the matrix as he types faster and faster into an unresponsive terminal window.
I guess you could add some
sleep(1)
inbetweenThis is Python. It’s already show enough.
Ooof starting the day with violence I see
“One troll a day keeps the intelligent people away”
That’s not python
It’s valid Python code though, the semicolons will run but are unnecessary
I am so perplexed and horrified. I’m going to need several weeks to get over this. What is this?!
A way to have several statements on the same line?
It seems I had semicolons confused with braces:
if picture is broken, it’s this:
~ $ python -c "from __future__ import braces" File "<string>", line 1 SyntaxError: not a chance
Guido undoubtedly had a strong, strong hatred of the number of ways braces are overloaded in Perl.
Do you really want an example?
sub doHref { { do { ${someglobal{Href}} = {} }; last }; }
Every single pairing there serves a different syntactic purpose. Some are related purposes, and I’ve crowbarred a few in unnecessarily for the sake of an example, but different nonetheless.
The outer pair declares the
sub
, and the next pair is a free block that works as a once-through unlabelled loop, which is exited with thelast
. (Most other languages usebreak
for this purpose.)The next pair are for the
do
which doesn’t act as a loop like the free block does. The next innermost pairing wrap a variable and the inner, innermost pairing indicate that the variable is a member of a hash (associative array) and we’re accessing the record namedHref
.The lone
{}
indicates a hash reference, so we’re assigning a reference to an empty, anonymous hash to that hash record.This example is ridiculous of course. There’s no need for most of those braces and syntax to do what it actually does. Also assigning to global variables is generally frowned upon.
sub doHref { $someglobal{Href} = {} }
… is equivalent and cuts out most of the guff. Still three different uses though.
Python
Blasphemy!
Yeah but it wasnt intended to be python
Maybe we should call the meme police then
On xav?
Needs to be a
sleep(3)
andsleep(5)
between the last ones just to add suspensesleep $(( 1 + $RANDOM % 5 ))
No it has to be controlled suspense.
Needs a 99% print too just before the 5 second sleep. Followed by a 99.9% and another 2 second sleep. Never print 100 and just run a traceroute in a loop.
Followed by a “we’re in” from the hacker as we’re made to believe he’s reading the console spam like he’s Neo from the matrix as he types faster and faster into an unresponsive terminal window.