Extension talk:Foxway

About this board

85.26.186.141 (talkcontribs)

Hello, having date() would be very useful. Is there any plan to implement it in this extension?

85.26.186.141 (talkcontribs)

Never mind, i see it's on the To do list.

Pastakhov (talkcontribs)

Yes, it will be done in the next release. For solving performance issues had to rewrite the code. There's still a lot of work, so I can not tell time.

Pastakhov (talkcontribs)
Reply to "Date"

Performance (in comparison to Scribuntu/LUA)

6
Danwe (talkcontribs)

Interesting approach! I would be interested in performance comparison to Scribunto/LUA. Did you do any comparison so far?

Pastakhov (talkcontribs)

I am also very interested in the performance compared to Lua :-) but I did not do comparisons...

I try to provide a high performance, but the main emphasis is on simplicity and versatility. I have a few ideas with the management of caching that can greatly improve performance, but I have not been thinking seriously about it.

Danwe (talkcontribs)

Did you also think about implementing this as extension for Scribuntu? I did not really look into this much, but as I understand, it should be possible to implement support for other languages than LUA with Scribuntu. Could be an interesting approach.

Pastakhov (talkcontribs)

For working this extension does not need framework like Scribunto. Also, such a union reduce the performance and limit the opportunities of this extension, so I do not see the point in the implementation of this.

The main idea of this extension is to use PHP syntax, instead parser functions and like. This is great for me and has a high performance.

But that's not all I want to do. :-)

In the future I plan to add objects that will work like extensions Semantic Forms, Semantic Result Formats, Maps, CategoryTree, etc.

How will it work? something like this:

$bar = new Query();
$bar->getPages(['Namespace'=>'Extension', 'limit'=>10, 'category'='Parser extensions', 'properties'=>'Lasteditor']);
echo new Table($bar);
Pastakhov (talkcontribs)

I tried to compare performance Scribunto/LUA vs Foxway. It's like comparing warm vs soft :-)

Lua takes a step faster than Foxway, but Foxway can make big steps. Maybe I'm wrong, but that's what I think about it.

Foxway allows the use of a large number of functions PHP, especially for arrays that run very fast. Next I want to add objects, such as HTMLTable. This will avoid bottlenecks, such as the use of cycles in Foxway. This will allow foxway make giant steps and if lua will not give the same opportunity, will never catch up Foxway.

In general, it all depends on the implementation. This makes it impossible to make a fair test.

Pastakhov (talkcontribs)
Reply to "Performance (in comparison to Scribuntu/LUA)"

Configuration parameters

3
Christharp (talkcontribs)

Hi so I was going to test this extension and was wondering what the optimal configuration parameters are? What do you have them set at? Thanks

Pastakhov (talkcontribs)
Pastakhov (talkcontribs)

There is no any special parameters.

Now, PhpTags has only two parameters:

$wgPhpTagsMaxLoops
limits the number of loops
$wgPhpTagsNamespaces
limits the namespaces where PhpTags can be used

I'm going to make the time limit and limit of function groups. I think this will be enough for convenient and safe use.

Reply to "Configuration parameters"

Where is the 'Debug view'

3
85.26.184.152 (talkcontribs)

Where is this debug view? How do i reach it?

Reply to "Where is the 'Debug view'"

English grammar unclear in lead at least

2
Nick Levinson (talkcontribs)

The lead needs grammatical editing, especially a boldfaced sentence in which the second clause is either a warning against our doing something or is a declaration that the extension doesn't do it and I can't tell which was intended. Since editing the grammar requires knowing the intent and I don't know the intent, I'm not qualified to edit the page. I didn't read the rest of the page. If anyone knows what is meant, please edit. Thanks.

Pastakhov (talkcontribs)

Thank you for your comment. I tried to fix it.

Reply to "English grammar unclear in lead at least"

I like this idea, but...

4
Technical 13 (talkcontribs)

Hey, I would love to as my local admin to install this extension. He'll never go for it though due to security concerns. Now, "if" this extension only allowed php in a certain namespace that was only accessible/editable by people with a special user group right, then I could talk him into it. Something like the way that Extension:Widget allows special code to be entered in the "Widget:" namespace and requires editwidgets to edit in that namespace..

Pastakhov (talkcontribs)

Hi, thanks for the feedback!

Why are you concerned about the security with this extension? This extension does not allows run php code! It works the same way as other extensions like Extension:ParserFunctions, but instead of using wiki syntax, uses the syntax of PHP.

I try to make sure that the output of this extension was very similar to the output of PHP. I use own PHP interpreter and never use direct run custom code in PHP interpreter installed on your computer.

Extension:Widget allows the creation of raw HTML pages. Therefore, for safety reasons, are allowed to use this extension is just to name space with limited access. Foxway does not allow creation of raw HTML pages, because MediaWiki parser processes the foxway outputs like any other text.

In any case, I will add the ability to specify the namespaces, which enable the extension foxway.

Pastakhov (talkcontribs)

Hi, here's an example for giving permission to use Foxway extension is just a special user group:

(Place it in LocalSettings.php)

// Define new Namespace
define("NS_PHP", 1000);
define("NS_PHP_TALK", 1001);
$wgExtraNamespaces[NS_PHP] = "PHP";
$wgExtraNamespaces[NS_PHP_TALK] = "PHP_Talk";

// Protect this namespace
$wgNamespaceProtection[NS_PHP] = array( 'php_editor' );
$wgGroupPermissions['sysop']['php_editor'] = true;

// Allow Foxway only in this namespace
// Placing it AFTER the inclusion of Foxway!!!
$wgNamespacesWithFoxway = array( NS_PHP );
Reply to "I like this idea, but..."
There are no older topics
Return to "Foxway" page.