ENIGMA Forums
General fluff => Announcements => Topic started by: Josh @ Dreamland on March 19, 2012, 10:25:46 pm
-
Greetings, all; I have a few small pieces of news to report.
First and foremost, recent parse progress is here (http://pastebin.com/jCvSszqk). 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.
-
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.
-
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
-
Yay. Now I just gotta remember, snip, snip, snip, snip...
-
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. <_<"
-
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 :)
-
[bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet]GAY & PROUD[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
-
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 */
-
[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]TITTY SPRINKLES[/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]
You just read that in Morgan Freeman's voice.
-
I'm sorry, but it was just waaaaay too homo to read in that voice.
-
[bubble=purple][bubble=blue][bubble=green][bubble=yellow][bubble=orange][bubble=red]RAINBOW DASH IS BEST PONY[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
(http://i.imgur.com/NqS5c.jpg)
-
No.
-
No.
:P This is cool though.
-
[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]
-
No.
I agree, Josh.
[bubble=purple][bubble=pink][bubble=purple][bubble=pink][bubble=purple][bubble=pink][bubble=purple][bubble=pink]Rarity is indeed best pony.[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
(http://static.tumblr.com/kvhqnvq/aWQlzgvh1/my_little_pony_friendship_is_magic_rarity.jpeg)
Of course, props to Game_boy for making me a brony.
-
@fede - No.
Ugh, secondpage'd
Yes, DarkAceZ, I've not yet installed a button. Probably won't, either, because they didn't unify that segment of the API.
-
Hah, pyramids now? Looks even better.
-
I figured it'd be useful for the rare case in which you might want to nest something.
For instance,
[bubble=black][bubble=blue][bubble=blue][bubble=red]Buffalo[/bubble][bubble=blue]buffalo[/bubble][/bubble][bubble=red][bubble=blue][bubble=red]Buffalo[/bubble] [bubble=blue]buffalo[/bubble][/bubble][bubble=lime]buffalo[/bubble][/bubble][/bubble][bubble=lime][bubble=lime]buffalo[/bubble][bubble=blue][bubble=red]Buffalo[/bubble][bubble=blue]buffalo[/bubble][/bubble][/bubble][/bubble].
Also, it's more fun.
[bubble=#F0F0F0][bubble=#E0E0E0][bubble=#D0D0D0][bubble=#C0C0C0][bubble=#B0B0B0][bubble=#A0A0A0][bubble=#909090][bubble=#808080][bubble=#707070][bubble=#606060][bubble=#505050][bubble=#404040][bubble=#303030][bubble=#202020][bubble=#101010][bubble=#000000]SUCK IT, BRONIES. AND ISMAVATAR.[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
-
Test.
[bubble=#F0F0F0][bubble=#E0E0E0][bubble=#D0D0D0][bubble=#C0C0C0][bubble=#B0B0B0][bubble=#A0A0A0][bubble=#909090][bubble=#808080][bubble=#707070][bubble=#606060][bubble=#505050][bubble=#404040][bubble=#303030][bubble=#202020][bubble=#101010][bubble=#000000](http://screenshooter.net/data/uploads/im/gi/fuhz.jpg)[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
-
[bubble=black][bubble=blue][bubble=blue][bubble=red]Buffalo[/bubble][bubble=blue]buffalo[/bubble][/bubble][bubble=red][bubble=blue][bubble=red]buffalo[/bubble] [bubble=blue]buffalo[/bubble][/bubble][bubble=lime]buffalo[/bubble][/bubble][/bubble][bubble=lime][bubble=lime]buffalo[/bubble][bubble=blue][bubble=red]buffalo[/bubble][bubble=blue]buffalo[/bubble][bubble=red]Bronies[/bubble][/bubble][/bubble][/bubble].
-
[bubble=black][bubble=blue][bubble=blue][bubble=red]Buffalo[/bubble][bubble=blue]bronies[/bubble][/bubble][bubble=red][bubble=blue][bubble=red]Buffalo[/bubble][bubble=blue]bronies[/bubble][/bubble][bubble=lime]buffalo[/bubble][/bubble][/bubble][bubble=lime][bubble=lime]buffalo[/bubble][bubble=blue][bubble=red]Buffalo[/bubble][bubble=blue]bronies[/bubble][/bubble][/bubble][/bubble].
-
Let the edit wars commence.