Josh @ Dreamland
|
|
Posted on: March 19, 2012, 10:25:46 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Greetings, all; I have a few small pieces of news to report. First and foremost, recent parse progress is here. Lines 2-110 were read in by the program as input; lines 114 and forward are complete program output. It should be a completely capable C parser by the end of tomorrow. Note: I said "C" parser, not "C++" parser. The difference being massive. Second off, Gary is working on our mailserver issues. New members can't register at the moment because the server is incapable of sending mail. For those of you who have attempted to register, please hold tight, we will resend your emails once the mailserver is back up. Lastly, I have added two BBCode tags. The first is called "bubble." [bubble]This is the default bubble[/bubble]. You can also specify your own color [bubble=red]for maximum overkill[/bubble]. The second is called "snip." I introduced this tag in the past in a custom BBParser, but now I added it to SMF. The snip tag allows you to put snippets of code inline with the rest of your sentence. To demonstrate, I will give usage. The code [snip][bubble]Hello, world![/bubble][/snip] gives this: [bubble]Hello, world![/bubble] The code [snip][bubble=green]Hello, world![/bubble][/snip] gives this: [bubble=green]Hello, world![/bubble] The code [snip][snip]Hello, world![/snip ][/snip] gives this: [snip]Hello, world![/snip] And now you know everything. Perhaps later I will add syntax highlighting again and we can all live happily ever after. Perhaps.
|
|
« Last Edit: March 19, 2012, 10:35:23 pm by IsmAvatar »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Josh @ Dreamland
|
|
Reply #1 Posted on: March 19, 2012, 10:27:16 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
One quick rule:
[bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet]None of this faggotry.[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
That is all.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Josh @ Dreamland
|
|
Reply #2 Posted on: March 19, 2012, 11:32:29 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Okay, so maybe that isn't all. Going to try for syntax highlighting.
Basic code. Nothing special.
// C++ code #include <iostream> using namespace std; int main(int argc, char *argv[]) { cout << "hi world"; return 0; }
%YAML --- yaml: aint markup: language
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #4 Posted on: March 20, 2012, 01:52:28 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Well, this has been a productive night.
Syntax highlighting works, if you can't tell.
a2h, if you delete it this time, I swear to GOD...
array( 'tag' => 'code', 'type' => 'unparsed_content', 'content' => '$1', // !!! Maybe this can be simplified? 'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', ' global $txt; $data = \'<div class="codeheader">\' . $txt["code"] . \': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">\' . $txt["code_select"] . \'</a></div>\' . ($context["browser"]["is_gecko"] || $context["browser"]["is_opera"] ? \'<pre style="margin: 0; padding: 0;">\' : "") . \'<code class="bbc_code">\' . $data . \'</code>\' . ($context["browser"]["is_gecko"] || $context["browser"]["is_opera"] ? \'</pre>\' : ""); '), 'block_level' => true, ), array( 'tag' => 'code', 'type' => 'unparsed_equals_content', 'content' => '$1', // !!! Maybe this can be simplified? 'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', ' global $txt; global $context; $lang = $data[1]; $geshi = new GeSHi(rtrim(html_entity_decode(preg_replace("/\ \;/"," ",preg_replace("/\<br \/\>/","\n",$data[0])),ENT_QUOTES|ENT_HTML5)), $lang); echo "<style type=\"text/css\">".$geshi->get_stylesheet( false )."\n.$lang { margin: 0; overflow-x: auto; }</style>"; if($geshi->error() == GESHI_ERROR_NO_SUCH_LANG) { $data[0] = \'<div class="codeheader">\' . $txt["code"] . \': (\' . $data[1] . \') <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">\' . $txt["code_select"] . \'</a></div>\' . ($context["browser"]["is_gecko"] || $context["browser"]["is_opera"] ? \'<pre style="margin: 0; padding: 0;">\' : "") . \'<code class="bbc_code">\' . $data[0] . \'</code>\' . ($context["browser"]["is_gecko"] || $context["browser"]["is_opera"] ? \'</pre>\' : ""); } $hrname = $geshi->get_language_name(); $ndata = \'<div class="codeheader">\' . $txt["code"] . \': (\' . $hrname . \') <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">\' . $txt["code_select"] . \'</a></div>\' . ($context["browser"]["is_gecko"] || $context["browser"]["is_opera"] ? \'<pre style="margin: 0; padding: 0;">\' : "") . \'<code class="bbc_code" style="color:black;">\'; $geshi->set_encoding("UTF-8"); $geshi->enable_classes(); $geshi->set_overall_class("source-$lang"); $geshi->enable_keyword_links(false); $geshi->enable_line_numbers(false); // $geshi->start_line_numbers_at($args["start"]); $out = $geshi->parse_code(); $err = $geshi->error(); if($err) $ndata .= $data[0]; else $ndata .= preg_replace("/[\r\n]/","<br />",$out); $ndata .= \'</code>\' . ($context["browser"]["is_gecko"] || $context["browser"]["is_opera"] ? \'</pre>\' : ""); $data[0] = $ndata; '), 'block_level' => true, ), Also, added languages to snip tag. [snip=cpp]this->test(c++);[/snip] Was a pain in the ass because GeSHi insists on using <div> or <pre>. Wasn't even that rewarding, because you can't even tell anything in that snippet is being highlighted. <_<"
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
polygone
|
|
Reply #5 Posted on: March 20, 2012, 05:10:43 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Second off, Gary is working on our mailserver issues. New members can't register at the moment because the server is incapable of sending mail. For those of you who have attempted to register, please hold tight, we will resend your emails once the mailserver is back up.
People can register now because I turned off mail verification :p I think it's better having a bit extra spam as well as real people registering instead of nobody at all until it's fixed? Should have been turned off when you found out about it... Okay, so maybe that isn't all. Going to try for syntax highlighting.
Basic code. Nothing special.
Basic code should be something because that's the code tag most people use. But neat that we have code tags again
|
|
« Last Edit: March 20, 2012, 05:41:49 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
Post made March 20, 2012, 05:52:22 am was deleted at the author's request.
|
Josh @ Dreamland
|
|
Reply #7 Posted on: March 20, 2012, 10:57:34 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Fixed.
Now I'ma break it all again.
[bubble=red]So I broke it.[/bubble] [bubble=green]But then I fixed it.[/bubble] [bubble=blue]And now it's much cleaner.[/bubble] [snip=cpp]I also fixed these tags' CSS[/snip]. [snip=perl]Now they are less ugly when[/snip] squeezed together.
Everything works with them now.
[bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet]A[/bubble][bubble=violet]B[/bubble][/bubble][bubble=purple][bubble=violet]C[/bubble][bubble=violet]D[/bubble][/bubble][/bubble][bubble=blue][bubble=purple][bubble=violet]E[/bubble][bubble=violet]F[/bubble][/bubble][bubble=purple][bubble=violet]G[/bubble][bubble=violet]H[/bubble][/bubble][/bubble][/bubble][bubble=green][bubble=blue][bubble=purple][bubble=violet]I[/bubble][bubble=violet]J[/bubble][/bubble][bubble=purple][bubble=violet]K[/bubble][bubble=violet]L[/bubble][/bubble][/bubble][bubble=blue][bubble=purple][bubble=violet]M[/bubble][bubble=violet]N[/bubble][/bubble][bubble=purple][bubble=violet]O[/bubble][bubble=violet]P[/bubble][/bubble][/bubble][/bubble][/bubble][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet]Q[/bubble][bubble=violet]R[/bubble][/bubble][bubble=purple][bubble=violet]S[/bubble][bubble=violet]T[/bubble][/bubble][/bubble][bubble=blue][bubble=purple][bubble=violet]U[/bubble][bubble=violet]V[/bubble][/bubble][bubble=purple][bubble=violet]W[/bubble][bubble=violet]X[/bubble][/bubble][/bubble][/bubble][bubble=green][bubble=blue][bubble=purple][bubble=violet]Y[/bubble][bubble=violet]Z[/bubble][/bubble][bubble=purple][bubble=violet]A[/bubble][bubble=violet]B[/bubble][/bubble][/bubble][bubble=blue][bubble=purple][bubble=violet]C[/bubble][bubble=violet]D[/bubble][/bubble][bubble=purple][bubble=violet]E[/bubble][bubble=violet]F[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
global int a; ///< A random global variant b = "Mary had a little lamb"; // I LOVE THAT SONG with (instance_nearest(x,y,obj_0)) x = 50; /* weeeeeeeeee */ return 0 + 'a'; /** Random documentation **/ /* weeee */ /*! more docs */
|
|
« Last Edit: March 20, 2012, 02:34:23 pm by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #9 Posted on: March 20, 2012, 02:09:52 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
I'm sorry, but it was just waaaaay too homo to read in that voice.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Game_boy
|
|
Reply #10 Posted on: March 20, 2012, 06:10:52 pm |
|
|
Joined: Apr 2008
Posts: 228
|
[bubble=purple][bubble=blue][bubble=green][bubble=yellow][bubble=orange][bubble=red] RAINBOW DASH IS BEST PONY[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
|
|
« Last Edit: March 20, 2012, 06:14:57 pm by Game_boy »
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #11 Posted on: March 20, 2012, 08:18:51 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
No.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
DarkAceZ
|
|
Reply #12 Posted on: March 20, 2012, 10:40:22 pm |
|
|
Location: United States Joined: Dec 2011
Posts: 75
|
No. This is cool though.
|
|
|
Logged
|
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack! [edit]
|
|
|
DarkAceZ
|
|
Reply #13 Posted on: March 20, 2012, 10:42:40 pm |
|
|
Location: United States Joined: Dec 2011
Posts: 75
|
[bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet][bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet][bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet][bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet][bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet]Wait, am I missing a button for this or something? (Not the sstart button either)[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
|
|
|
Logged
|
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack! [edit]
|
|
|
Post made March 21, 2012, 04:17:34 am was deleted at the author's request.
|
|