ASCII Art in .NET Code
mattwarren.org
mattwarren.org
https://github.com/ReactiveX/rxjs/blob/master/docs_app/conte...
I've loved it so much that when I saw it for the first time (some 5 years ago) I had to port it to JavaScript (original is C#) and you can see it here: https://github.com/selectnull/stacktraceart
If you're interested in story of how the idea was born, read about it in these blog posts:
* http://thehumbleprogrammer.com/stack-trace-art/
* http://thehumbleprogrammer.com/his-majesty-hangul-the-filler...
Are there serious interactive image editors that don't require a mouse? For symmetry's sake.
It's true I haven't seen any IDEs with similar capabilities, so I imagine it is harder for other people. At what point does it become permissible to say "It's not my problem you choose to use a text editor that isn't capable of editing this style of text"? We're certainly well beyond that point in most other areas, e.g., indentation, capitalization, or renaming.
Interesting, I'd not thought about that 'side-effect', but you're right, it does guard against that
"/\*" - literal forward slash followed by literal asterisk
"(.*?)" - followed by zero or more of any character, captured non-greedy
"\*" - and another literal asterisk
"|" - all of the above, or the following
"//(.*?)" - literal two forward slashes and another non-greedy anything
"\r?\n" - a possible carriage return followed by a newline
"|" - or
the following pattern in double quotes:
"(\\[^\n]|[^"\n])*" - a backslash followed by one character that is not a newline, OR anything that is not a double quote or a newline. this sequence can occur zero or more times, and both the matching sequence and all of the matching sequence are captured
"|" - or
"@("[^"]\*")+" - a literal at sign, followed by one or more of anything that is not double quotes, enclosed by double quotes.
All it's doing is sniffing segments that look like they might be comment blocks, sections in double quotes, and... I'm not actually sure what the last segment would be, it seems to capture @"whatever"? Regardless, this doesn't actually sniff for ASCII art as much as comments themselves.Yeah you're right. The regex just finds comments. I then wrote some very simple code that analysed the text inside the comments to find potentially interesting ASCII Art. I then looked through these manually to get the ones for the post.