SwiftlyTilting: revisionist reality

Thursday, November 1, 2007

Winter 2.1.1

Just a quick bugfix for Winter.

  • fixed NOTICE of undefined variable
  • fixed count command which would return the incorrect value

And snce it’s been a while since I posted these links:
Winter Homepage on Mediawiki.org
Winter Documentation

Download Winter 2.1.1
Downloaded 241 times

Sunday, September 2, 2007

Winter 2.1.0

One thing that has been bugging me about Winter is that code must be left aligned or else MediaWiki will format it with some HTML. This made it impossible to write neat code, especially in longer programs. I finally hit upon a decent workaround and now program code is much more readable.

Before:

{{#function | formatNum ||
{{#if | {{#1}} | {{#1}} | no more }} bottle{{#if | {{#1 == 1}} | | s }}
}}

{{#for | {{#i = 99}} || {{#i >= 0}} || {{#i --}} ||
{{#bottles | @= | {{#formatNum | {{#i}} }} }}
{{#ucfirst | {{#bottles}} }} of beer on the wall, {{#bottles}} of beer.
{{#if | {{#i}} |
Take one down and pass it around, {{#formatNum| {{#i - 1}} }} |
Go to the store and buy some more, 99 bottles
}} of beer on the wall

}}

After

{{#function | formatNum ||
   {{#if | {{#1}} || {{#1}} || no more }} bottle{{#if | {{#1 == 1}} || || s}}
}}

{{#for | {{#i @= 99}} || {{#i >= 0}} || {{#i --}} ||
   {{#bottles | @= | {{#formatNum | {{#i}} }} }}
   {{#ucfirst | {{#bottles}} }} of beer on the wall, {{#bottles}} of beer.
   {{#if | {{#i}} ||
      Take one down and pass it around, {{#formatNum| {{#i - 1}} }}
   ||
      Go to the store and buy some more, 99 bottles
   }} of beer on the wall.

}}

I’ve also added features to access the various template parameter variables used on a page, as well as various other upgrades and bug fixes.

  • changed syntax so that carriage returns are ignored if followed by a space
  • added template variable access
  • added time, microtime, date, urlencode, explode, implode, request_var, template_var, to_str, to_int, show_page_text, version, wordwrap, keep_nl
  • added ^. escape char
  • added <winterprewiki> tag which allows winter to be used before mediawiki processes it
  • added addVar for external user functions to add variables
  • added WinterBeforeProcess and WinterAfterProcess hooks
  • added various information available at runtime such as user name, page name, etc
  • fixed bug with nowinter tag
  • fixed bug when using foreach with noexistent array
  • fixed bugs with & and ? operators (they’re turned into html entities)
  • fixed bug caused by pipes being returned in error messages
  • updated error messages

Download Winter 2.1.0
Downloaded 137 times

Sunday, August 12, 2007

Winter 2.0.2

A user left a comment notifying me about a warning message which would appear if allow_call_time_pass_reference was set to off in PHP settings. I’ve fixed the problem along with a few other minor bugs for this release. I also added a new comment syntax {{#| You comment here }}

Change log:

* Fixed allow_call_time_pass_reference bug
* Fixed bug with <nowinter> tag
* Fixed bug when undefined variables were referenced
* Added alternative comment syntax

Download Winter 2.0.2
Downloaded 104 times

Friday, August 10, 2007

Winter 2.0.1 and Winter manual updated

I finished up the initial stages of the Winter 2.0 documentation today, so now you should be able to fully take advantage of all the new features. I noticed a few minor issues as I was documenting the code so I corrected them and have released the changes as Winter 2.0.1.

Change log:

  • Fixed some bugs with #eval
  • Changed the | (bitwise or) operator to ? since | is a reserved symbol in Winter (can’t believe I missed that one before!)
  • Improved #comment so that it does not evaluate code
  • Improved the escape character system

Download Winter 2.0.1
Downloaded 67 times

Saturday, August 4, 2007

Winter 2.0.0

It’s been over a year since I last released an update for Winter. Since then MediaWiki introduced support for parser function extensions, which provide some of the same basic functionality as Winter. Winter code does not interfere with parser functions, and they can be used on the same page, though care must be taken when combining both types of code together.

This new version of Winter has been in the works for a few months now. Many new features and functions have been added, and some bugs have been corrected as well. The program code has increased in size by nearly 80% since 1.5.0!

Download
Homepage on Mediawiki.org
Documentation

About Winter:

Winter is the Wiki Interpreter, a complete programming language plug-in for MediaWiki, the software which powers Wikipedia and many other wikis across the internet.

Change log:

  • Added installation settings $wgWinterMaxNesting, $wgWinterMaxOperations, $wgWinterMaxIterations, $wgWinterNotAllowed
  • fixed bug in operation count which severely under counted operations
  • fixed bug when trying to loop inside of a function
  • added external function definition support
  • improved tag
  • improved error messages
  • added - and $ to acceptable function and variable name characters, explicitly defined _
  • depreciated #define in favor of #str_replace_all
  • added @ modifier for variable assignment operators
  • added < - and <=> variable assignment operators
  • added & | xor < < >> bitwise operators
  • added ^ arithmetic operator
  • added #add, #subtract, #multiply, #divide arithmetic functions
  • added #strtoupper, #strtolower, #ucfirst, #trim, #ltrim, #rtrim, #strip_tags string functions
  • depreciated #default in favor of #set_param_default
  • added #comment as another name for #null
  • added #debug for easy debugging stub display
  • added #rand function
  • added #html_to_xml and #xml_xpath xml function
  • added array variable type (2 dimensions maximum)
  • added #foreach loop construct for traversing arrays
  • added []= and [][]= operators for array assignment
  • added #count, #array_rand, #array_rand_value, #sort, #rsort, #asort, #arsort, #natsort, #ksort, #krsort array functions

Download Winter 2.0.0
Downloaded 95 times

Tuesday, March 7, 2006

phc-win 0.2.1 - bugfixes

As expected, there were some bugs with the first release of phc-win. The biggest problem occured whenever the path of the program file or any code contained a space: it simply wouldn’t compile the code. That has been fixed in this version. Some other minor bug fixes as well.

phc-win 0.2.1 rar archive
Downloaded 2488 times
phc-win 0.2.1 upgrade rar archive
Downloaded 378 times
For the latest version, check the phc-win category.

Monday, March 6, 2006

phc-win: A PHP compiler for Windows

PHC-WIN is a windows application that allows one to create EXEs from PHP code. The PHP code is first converted to PHP bytecode using bcompiler, and then embedded into an EXE using embeder. Compiling the code into bytecode has two benefits: it speeds up load times since the PHP code doesn’t have to be interpreted, and it obfuscates the code so that it cannot be easily reverse engineered.

PHC-WIN itself is written in PHP and utilizes wbObjects, my object oriented layer for WinBinder to create windows controls.

PHC-WIN Wiki page with documentation

Download:
phc-win 0.2.0 rar archive
Downloaded 483 times
phc-win 0.2.0 self extracting exe
Downloaded 559 times
For the latest version, check the phc-win category.
keywords: php to exe, php2exe

Monday, February 13, 2006

wbObjects: Easy Windows Programming in PHP

wbObjects is an object oriented interface for WinBinder, a native Windows API for PHP. WinBinder is a great tool, but unfortunately its current lack of an object oriented interface makes writing applications harder than it needs to be. wbObjects has been created to simply the coding process so WinBinder applications can be developed more rapidly.

wbObjects Home
Documentation
Download: wbObjects 0.7.0
Downloaded 537 times

Sample code:

include_once('../wbObjects.php5');

$window = $wbSystem->createWindow( AppWindow,  'thewindow', 'Hello World!', WBC_CENTER, WBC_CENTER, 300, 100);
$textbox = $window->createControl( EditBox,    'thetext',   '',             5, 10, 280, 22, WBC_LEFT);
$button = $window->createControl(  PushButton, 'thebutton', 'Click Me!',    5, 30, 280, 22);

$button->onMainEvent = 'didClick';
$window->onClose = 'didClose';

$wbSystem->start();

function didClick($params)
{
   $params['wbSystem']->thewindow->messageBox('Hello World!  You typed:'. $params['wbSystem']->thetext->text);
}

function didClose($params)
{  exit;
}

Wednesday, January 18, 2006

Winter 1.5.0

* Added new shortcut syntax: {{#command param1 param2 … paramN}} is the same as {{#command| #param1 | #param2 | … | paramN }}. Each span of whitespace is converted to a pipe character. This is especially useful for math operations: {{#op 1 + 1}} = {{#op| 1 | +| 1}}
* #op can now accept any amount of operations. However, the order of operations is only left to right. ie {{#op 2 - 2 * 3}} will return 0 and not -4.
* Added #formula command
* Added #eval command
* Added #repeat command
* fixed some bugs in #strpos

Download Winter 1.5.0
Downloaded 455 times

Monday, January 2, 2006

Winter 1.4.1

* Added <nowinter> tag to allow Winter code to be displayed without being evaluated.
* Reworked escape character code. Escape characters are now only translated inside of a Winter command instead of anywhere on the page. This ensures that users who are unaware Winter is installed are not confused.
* #define actually works now.
* Switched to x.y.z version numbering system.

Download Winter 1.4.1
Downloaded 156 times

Sunday, January 1, 2006

The Tao Te Ching for your iPod

I bought a new video iPod the other day with some Christmas money. It’s a pretty fun toy. My biggest complaint is that it doesn’t play divx/xvid videos but overall I’m very pleased with my buy. I had looked at other media players but none of them could rival the elegance of the iPod, nor could they offer 30gb of storage space with video support.

While playing with all of the features, I found the iPod supported text files with some simple HTML tags and a few custom meta tags which allows one to create guides, ebooks, or other small documents. At first I had visions of converting Wikipedia over to the iPod, but I unfortunately found that only 1000 files at a maximum 4kb each are supported. This means small bits of information, like perhaps news and weather pulled from RSS feeds.

For now though, it means the Tao Te Ching. More specifically, Ron Hogan’s Tao Te Ching, which is a particularly creative interpretation and I think perhaps one of the most accessible to those who are unfamiliar with Taoism.

To install on your iPod, download the archive, and unzip it in a convenient place. Then copy the The Tao Te Ching folder to the Notes folder on your iPod. (You may need to enable disk mode to access the Notes folder). Then go to Extras > Notes > The Tao Te Ching on your iPod to find the Way.

Download The Tao Te Ching for iPod
Downloaded 1268 times

Tuesday, December 6, 2005

Winter v1.3

More bugfixes and other stuff.. added mod operator

Download Winter 1.3
Downloaded 207 times

Thursday, November 24, 2005

Winter v1.2

Released a new version of winter.. this one allows for a new variable syntax that should save some typing.

Download Winter 1.2
Downloaded 167 times

Thursday, November 17, 2005

Winter bug fixes

As expected, some bugs were discovered in Winter v1.0. I’ve fixed them and released a new version.

Download Winter 1.1
Downloaded 150 times

Wednesday, November 16, 2005

Introducing the Winter scripting language for WikiMedia

Recently I started playing around with MediaWiki, the software that powers Wikipedia and other similar wikis. The software has a useful template system, but as a programmer, I wasn’t satisified with the lack of basic useful features like conditional statements and looping.

I discovered MediaWiki is pretty easy to create extensions for, and so I set out to create useful scripting language that was easy to understand and matched the syntax of other WikiMedia commands. What I ended up with was a full fledged scripting language, with if statements, for and while loops, and even function declarations.

For more information, please see the Winter documentation over on MetaWiki.

Download Winter 1.0
Downloaded 190 times

Sunday, October 30, 2005

phpABC 2.2

This is a security upgrade. All users need to upgrade to this version as soon as possible.

Download phpABC 2.2

Downloaded 4776 times

Tuesday, April 19, 2005

phpABC 2.1

Soon after I released phpABC 2.0, I realized there was a much better way of handling the multi language support. A way that would only take a few minutes to implement and wouldn’t require any language files, which basically meant a lot of work I did for 2.0 was pointless. Oh well. At least the package size is smaller; those language files doubled the size of the release, to a whopping 50K! :D

Also in 2.1 I updated the templates so they display the field names in the language ABC is using.

Unpack into a new directory.

Download phpABC 2.1

Monday, April 18, 2005

phpABC 2.0 - Multilanguage support & more

Quite a few changes in this update. Most notable is the multilanguage support. phpABC will now work if ABC is using another language besides English. English, French, and Norwegian support is include by default; if your ABC uses another language, you’ll need to upload the .lang file you use for ABC via the form, and phpABC will convert it for quicker loading.

Also included in this update is the ability to upload .torrent files so they can be added to phpABC. This is useful for adding torrents from private trackers or any .torrent that ABC is unable to download directly.

There were also some small changes and bug fixes. Unpack rar in a new directory

Download phpABC 2.0

I’ve created an actual homepage for this project, as opposed to just blog entries. phpABC Homepage

Thursday, April 7, 2005

phpABC 1.5

Another day, another update. Fixed up the cookies support so it doesn’t save anything to the server. Using cookies should now be a viable option if you do not have permission to update local files with PHP.

Download phpABC 1.5

Tuesday, April 5, 2005

phpABC v1.41 - Cookie support

With v1.41 you can now save your config settings in a browser cookie and/or on the phpABC server. Saving your settings in a cookie increases security since it will only be possible to access phpABC from your browser.

phpABC 1.41
For users of phpABC 1.32 and lower. Unpack phpABC 1.41 into a new directory.

phpABC 1.41 upgrade
For users of phpABC 1.4 . Unpack in your existing phpABC folder.

Friday, April 1, 2005

phpABC 1.4: Set ABC’s preferences remotely

Version 1.4 of phpABC supports ABC 3.0’s new “SETPARAM” and “GETPARAM” commands and uses them to recreate the preferences screen in ABC. You’ll need to have Get Parameters and Set Parameters enabled in your ABC permissions to update your preferences remotely.

Other new features include the ability to set torrent priority and a streamlined installation process. Overall quite a few files changed so install into a fresh directory for best results, though you may be able to simply overwrite your existing files. Be sure to overwrite the config file as it’s changed slightly.

Download phpABC 1.4

Sunday, March 27, 2005

phpABC 1.32

Fixes some minor problems with IE and stylesheets.

phpABC 1.32
For users of phpABC 1.2 and lower. Unpack phpABC 1.32 into a new directory.

phpABC 1.32 upgrade
For users of phpABC 1.3 and up . Unpack in your existing phpABC folder.

Saturday, March 26, 2005

phpABC 1.31

This update adds the message field to the details screen.

phpABC 1.31phpABC 1.31
For users of phpABC 1.2 and lower. Unpack phpABC 1.31 into a new directory.

phpABC 1.31 upgrade
For users of phpABC 1.3 . Unpack in your existing phpABC 1.3 folder.

Thursday, March 24, 2005

phpABC 1.3 for ABC v3.0

A new version of ABC came out the other day, and it appears the web service got a few more information fields as well as the ability to stop torrents in addition to pausing them. There was also some renaming which broke existing versions of phpABC, so a new release has been created. It works with both PHP4 and 5. You’ll want to install it in a new folder.

Download phpABC 1.3

Update: This old version gets a lot more downloads than other outdated versions; I suspect it is because the blog entry has ABC 3.0 in the name. In case you have arrived here via search engine, phpABC is at version 2.1 as of October 2005 . Find out more at the phpABC homepage.

Wednesday, March 23, 2005

PHC update

Well it looks like there was a major problem with the first release of PHC; it only worked correctly in Windows 98! I’ve fixed it to work correctly in WinXP, and also streamlined the console/window program type selection.

PHC-SDK v0.11

[UPDATE: PHC has been obsoleted by phc-win]

Validate XHTML | Word Press