ENIGMA Forums

General fluff => Announcements => Topic started by: Josh @ Dreamland on March 19, 2012, 10:25:46 pm

Title: News points
Post 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.
Title: Re: News points
Post by: Josh @ Dreamland on March 19, 2012, 10:27:16 pm
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.
Title: Re: News points
Post by: Josh @ Dreamland on March 19, 2012, 11:32:29 pm
Okay, so maybe that isn't all. Going to try for syntax highlighting.

Code: [Select]
Basic code. Nothing special.

Code: (cpp) [Select]
// C++ code
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
  cout << "hi world";
  return 0;
}

Code: (yaml) [Select]
%YAML
---
yaml: aint
markup: language
Title: Re: News points
Post by: IsmAvatar on March 20, 2012, 12:59:42 am
Yay. Now I just gotta remember, snip, snip, snip, snip...
Title: Re: News points
Post by: Josh @ Dreamland on March 20, 2012, 01:52:28 am
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...

Code: (php) [Select]
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("/\&nbsp\;/"," ",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. <_<"
Title: Re: News points
Post by: polygone on March 20, 2012, 05:10:43 am
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.

Code: [Select]
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  :)
Title: Re: News points
Post by: Fede-lasse on March 20, 2012, 05:52:22 am
[bubble=red][bubble=orange][bubble=yellow][bubble=green][bubble=blue][bubble=purple][bubble=violet]GAY & PROUD[/bubble][/bubble][/bubble][/bubble][/bubble][/bubble][/bubble]
Title: Re: News points
Post by: Josh @ Dreamland on March 20, 2012, 10:57:34 am
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]

Code: (edl) [Select]
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 */
Title: Re: News points
Post by: IsmAvatar on March 20, 2012, 02:01:23 pm
[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.
Title: Re: News points
Post by: Josh @ Dreamland on March 20, 2012, 02:09:52 pm
I'm sorry, but it was just waaaaay too homo to read in that voice.
Title: Re: News points
Post by: Game_boy on March 20, 2012, 06:10:52 pm
[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)
Title: Re: News points
Post by: Josh @ Dreamland on March 20, 2012, 08:18:51 pm
No.
Title: Re: News points
Post by: DarkAceZ on March 20, 2012, 10:40:22 pm
No.


:P This is cool though.
Title: Re: News points
Post by: DarkAceZ on March 20, 2012, 10:42:40 pm
[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]
Title: Re: News points
Post by: Fede-lasse on March 21, 2012, 04:17:34 am
Quote from: Josh @ Dreamland
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.
Title: Re: News points
Post by: Josh @ Dreamland on March 21, 2012, 07:33:27 am
@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.
Title: Re: News points
Post by: Fede-lasse on March 23, 2012, 08:13:32 am
Hah, pyramids now? Looks even better.
Title: Re: News points
Post by: Josh @ Dreamland on March 23, 2012, 08:38:18 am
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]
Title: Re: News points
Post by: Fede-lasse on March 23, 2012, 09:47:34 am
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]
Title: Re: News points
Post by: DarkAceZ on March 24, 2012, 04:41:02 pm
[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].
Title: Re: News points
Post by: Josh @ Dreamland on March 25, 2012, 09:44:56 am
[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].
Title: Re: News points
Post by: Fede-lasse on March 26, 2012, 02:47:54 am
Let the edit wars commence.