Pages: 1 2 »
  Print  
Author Topic: News points  (Read 6429 times)
Offline (Male) Josh @ Dreamland
Posted on: March 19, 2012, 10:25:46 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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." This is the default bubble. You can also specify your own color for maximum overkill.
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 [bubble]Hello, world![/bubble] gives this: Hello, world!

The code [bubble=green]Hello, world![/bubble] gives this: Hello, world!

The code [snip]Hello, world![/snip ] gives this: Hello, world!

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
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: March 19, 2012, 10:27:16 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
One quick rule:

None of this faggotry.

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
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: March 19, 2012, 11:32:29 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
Okay, so maybe that isn't all. Going to try for syntax highlighting.

Code: [Select]
Basic code. Nothing special.

Code: (C++) [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
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
Offline (Female) IsmAvatar
Reply #3 Posted on: March 20, 2012, 12:59:42 AM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Yay. Now I just gotta remember, snip, snip, snip, snip...
Logged
Offline (Male) Josh @ Dreamland
Reply #4 Posted on: March 20, 2012, 01:52:28 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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. this->test(c++); 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
Offline (Male) polygone
Reply #5 Posted on: March 20, 2012, 05:10:43 AM

Contributor
Location: England
Joined: Mar 2009
Posts: 803

View Profile
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  :)
« 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.
Offline (Male) Josh @ Dreamland
Reply #7 Posted on: March 20, 2012, 10:57:34 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
Fixed.

Now I'ma break it all again.

So I broke it.
But then I fixed it.
And now it's much cleaner.
I also fixed these tags' CSS.
Now they are less ugly when squeezed together.

Everything works with them now.


ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF

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 */
« 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
Offline (Female) IsmAvatar
Reply #8 Posted on: March 20, 2012, 02:01:23 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
TITTY SPRINKLES
You just read that in Morgan Freeman's voice.
« Last Edit: March 20, 2012, 02:03:12 PM by IsmAvatar » Logged
Offline (Male) Josh @ Dreamland
Reply #9 Posted on: March 20, 2012, 02:09:52 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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
Offline (Unknown gender) Game_boy
Reply #10 Posted on: March 20, 2012, 06:10:52 PM
Member
Joined: Apr 2008
Posts: 228

View Profile
RAINBOW DASH IS BEST PONY

« Last Edit: March 20, 2012, 06:14:57 PM by Game_boy » Logged
Offline (Male) Josh @ Dreamland
Reply #11 Posted on: March 20, 2012, 08:18:51 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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
Offline (Male) DarkAceZ
Reply #12 Posted on: March 20, 2012, 10:40:22 PM

Member
Location: United States
Joined: Dec 2011
Posts: 75

View Profile
No.


:P This is cool though.
Logged
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack!

[edit]
Offline (Male) DarkAceZ
Reply #13 Posted on: March 20, 2012, 10:42:40 PM

Member
Location: United States
Joined: Dec 2011
Posts: 75

View Profile
Wait, am I missing a button for this or something? (Not the sstart button either)
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.
Pages: 1 2 »
  Print