Helloworld.rb
-
= 1 = + = * + = * = [ *( + )+ , = * + , = * + - , , = + , * + + , * - * + + , , + + , , * , + + , ] puts .map(&:chr).join
seriously....
what the actual fuck?!
-
Looks like invisible characters that are accepted in identifiers.
-
Looks like invisible characters that are accepted in identifiers.
Sometimes even crappy software like Ruby manages to surprise me in a negative way.
Filed under: Thanks, mobile Discourse, for being "helpful" and autocorrecting to .
-
Looks like invisible characters that are accepted in identifiers.
.....
why is that even a thing that is possible?
-
So that finally you have an other choice between CamelCase en underscore_case. Actually full sentences as identifiers. This opens up a whole new range of s so more content for us to laugh about.
-
I just wrote this command:
docker run --rm -ti dwarfort bash -c 'echo ":rb_eval df.curview.breakdown_level = :QUIT" >> dfhack.init; ./dfhack; grep df-ai stderr.log'
And then I come to this forum and there's a more ruby script? I feel cheated.
-
A Real Programmer™ would have made that snippet look like a christmas tree 🎄.
-
Just think of all the fun you could have with an identifier named
if x
.
-
Replacing the characters with x and y:
x = 1 yy = x+x yyy = yy*yy+x yyyy = yyy*yy yyyyy = [yyyy *(yyy+yy)+yy, yyyyyyy = yyyy*yyyy+x, yyyyyyyy = yyyy*yyyy+yyyy-yy, yyyyyyyy, yyyyyyy = yyyyyyy+yyyy, yyyy*yy+yyyy+yy, yyyy*yyyy-yy*yyyy+yyy+yy, yyyyyyy, yyyyyyy+x+yy, yyyyyyyy, yyyy*yyyy, yyyy+x+yy, yyyy] puts yyyyy.map(&:chr).join
-
Or Case String
Btw how do I do back quotes on an iPad? Just got this damned thing from management.
-
Like the iPhone, I'm assuming... press and hold ' until it turns into `‘’'.
-
Actually full sentences as identifiers.
The only reason people who have that capability don't do it is they're lazy.