Skip to main content
Topic: [ADDON] Talk like a Pirate (Read 3207 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[ADDON] Talk like a Pirate


Talk like a Pirate

So ye scallywags be gettin' all excited fer th' annual International Talk Like A Pirate Day, on September 19 (held every year since 2002!), and who could blame ye, to be sure.

The problem be many dinna how t' properly speak like a Pirate, a clear problem Me hearties!

Fortunately that's whar this Pearl o' th' briny deep addon will help ye out.  Just enable it on th' 19th and it will display th' sites posts in pirate speak.  Sure this be just a cheap trick but its just fer fun.

Introduction
This adds a very basic English text t' pirate lexer and will convert yer sites posts in t' pirate speak which be bountifully bombastic me hearties!  The conversion be only fer th' display o' th' post, it does not change th' actual post, so once th' addon be disabled thin's will return t' normal.

License
Released under a GPL license.

Features
  • Displays post text (board index, topic listin', topic display) text as "Pirate Speak"
  • Intended fer use on international talk like a pirate day 9/19/2017, pass th' grog!
  • Ability t' enable / disable th' addon
  • English only ye scurvey dog!

Installation
Simply install th' package t' install this addon.

ETA: removed package due to performance :( so fer now it be be in Davy's grip
Last Edit: September 15, 2017, 04:31:08 pm by Spuds

Re: [ADDON] Talk like a Pirate

Reply #1

I think there's some performance issue with this:

Without:
Code: [Select]
Page created in 0.066 seconds with 21 queries

Installed, but not enabled:
Code: [Select]
Page created in 4.299 seconds with 26 queries

Edit: clarification.
Last Edit: September 15, 2017, 10:33:24 am by Frenzie

Re: [ADDON] Talk like a Pirate

Reply #2

Don't be such a scalawag, its fer one day o' fun, ye did not think it war a real lexer did ye :P

Re: [ADDON] Talk like a Pirate

Reply #3

Arr, there's a slight difference between inefficient and making me wonder if the server is having an outage. >_>

But anyway, that's without enabling it.

When enabled:
QuotePage created in 7.974 seconds with 22 queries

I think the problem is something other than regexp inefficiencies. I mean, surely I could run that thing on integrate_buffer and it wouldn't do anything remotely like that?

Edit: PS Tested on Elk 1.0.10.
Last Edit: September 15, 2017, 10:48:24 am by Frenzie

Re: [ADDON] Talk like a Pirate

Reply #4

LOL you're crazy xD

Re: [ADDON] Talk like a Pirate

Reply #5

I'll probably not have time t' look at it until next years talk like a pirate day, so I've taken that Son o' a Biscuit Eater t' walk th' plank, argh!

Code: [Select]
Page created in 0.228 seconds with 20 queries. w/pirate
Page created in 0.190 seconds with 20 queries. w/o pirate

So i'm not sure where its hanging up for you, just that it is (those are 1.1 numbers, so it could be a 1.0 thing)
Last Edit: September 15, 2017, 04:36:42 pm by Spuds

Re: [ADDON] Talk like a Pirate

Reply #6

Noooo....
I couldn't even see it once in action! xD
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Talk like a Pirate

Reply #7

I put it up on github in me area so ye can get a copy

Its a bit brutal fer sure, but I war not seein' th' performance flog that Frenzie found.  i be not sure I actually tested it on 1.0 either

Anyway a 7 second page render be sure t' have users thin' th' site snuffed it.   As such I did not want t' leave it available fer all ye scallywags until I (or anyone) get a chance t' determine what th' Son o' a Biscuit Eater code be doin' t' sink th' ship.

ye have me gratitude

Re: [ADDON] Talk like a Pirate

Reply #8

I think it just simply doesn't work on 1.0. But something about my non-testing setup makes it excruciatingly slow to boot. (Could be as simple as PHP 7 = fast vs. PHP 5.6 = slow or something.) At least, if I understand correctly a message like "Awesome. Hello." should be transformed in all kinds of ways and… well, it's not.

On my testing setup it's
Code: [Select]
Page created in 0.009 seconds with 21 queries. /installed and enabled
Just non-functional.

I don't think it was working on the live instance either (where I wanted to activate it in a couple of days), but I rushed to disable it for obvious reasons and didn't really bother to find out. :P

Re: [ADDON] Talk like a Pirate

Reply #9

Looks like 1.0 used a different hook name than 1.1 (at th' end o' parse_bbc) ...  so that be why it war not workin' on 1.0.  Still have no notion why ye be seein' a 5 second delay, especially when before this fix th' addon war doin' nothin', it war not bein' called. 

The fixed version on me 1.0 local gives me Page created in 0.094 seconds with 28 queries.   Still tryin' t' replicate th' delay ye be experiencin'.  Argh.

ETA: The 1.0 fix be in here me maties:  https://github.com/Spuds/Elk_Pirate
Last Edit: September 18, 2017, 10:01:27 am by Spuds

Re: [ADDON] Talk like a Pirate

Reply #10

Ye fixin's seem tah resolve the worst matey. Sometimes it's fast, sometimes it's 2-4 seconds. Mayhap opcache-related?