Silver's Simple Site - Weblog

Open Rails 1.1

Open Rails 1.1 has been released!




  • Refuelling from water troughs added
  • Activity restricted speed zones added
  • Switching control to another train (AI and static) added
  • Auxiliary tender support added
  • Blended dynamic brakes support added
  • Improved sound cut-off distances
  • Additional sound triggers added
  • Multiple freight animations added
  • Loading/unloading animations for freight animations added
  • Join/split functionality with player and AI trains improved


  • Code has been re-factored to ease future developments
  • 3D cabs loaded by default when present
  • Quick access to documentation from the menu
  • Activity events can now dynamically change the weather
  • AI trains can now get permission to pass signals at danger
  • Super-elevation updated and harmonic-rocking improved
  • Manual signalling mode can be engaged while moving
  • Compressor information now shown in HUD
  • Additional locomotive's brake status now shown in HUD
  • Engine brakes extended to work with tender
  • Keyboard commands for cutting off power and setting brakes off added
  • EP brake partial release support added
  • Brake pipe pressure propagation improved
  • Bailoff on twin pipe airbrakes improved
  • Engine and independent brakes improved
  • 3D cab digital gauges improved
  • Train lights condition for "service" improved
  • Sound looping improved
  • Stereo/mono cab sounds improved compatibility
  • Gear cab view control added
  • Projected speed cab view control added
  • Friction braking cab view control improved
  • Night-switching of cab view in tunnels improved
  • "Variable1" in gearless diesels improved
  • "Variable2" in electrics improved
  • "Variable3" in diesels and electrics improved
  • Multiplayer can now connect to domain names in addition to IPs
  • Options to limit safe speed through curves, with penalties for breaches
  • Options for improved weather visuals on supported systems
  • Optimizated selection of track sounds
  • Correction of faulty engine parameters added


  • Activity event popup is larger and more responsive to lots of text
  • Messages for AI trains improved
  • Train Operations window updates at reversal points
  • Signal lights reliability improved
  • Save/Resume after train reversal improved
  • Fuel consumption calculations improved
  • Doors open correctly after reversal
  • "Include" directive for content improved

Important notes:

  • Open Rails develops features and bug fixes in public at
  • Open Rails is distributed under the GNU GPL v3 free software license

Permalink | Author: | Tags: Open Rails | Posted: 07:30PM on Sunday, 27 March, 2016 | Comments: 0

ChatZilla Plugin: Input Keys


This plugin for ChatZilla lets you type most text formatting commands with keyboard shortcuts.


  • Control-B for bold
  • Control-U for underline
  • Control-K for color
  • Control-O for reset (original)

Permalink | Author: | Tags: ChatZilla, Scripts | Posted: 09:00PM on Sunday, 13 March, 2016 | Comments: 0

ChatZilla Plugin: Activity in Title


This plugin for ChatZilla shows activity in channels and private messages in the title bar.

Display - Text

The textual display shows up to three groups, each containing a list of views in that state.

  • <...> indicates items with stalk events (e.g. mentions of your nickname, stalk words, and private messages).
  • [...] indicates items with chat events (e.g. all talking in channels).
  • (...) indicates items with superfluous events (e.g. joins, parts, topic changes).

Display - Symbol

The symbolic display shows a single symbol for each view, in the same order as the textual display groups.

  • ! indicates an item with stalk events (e.g. mentions of your nickname, stalk words, and private messages).
  • + indicates an item with chat events (e.g. all talking in channels).
  • - indicates an item with superfluous events (e.g. joins, parts, topic changes).


  • display.symbol boolean (default false)

    When enabled, the display is just status symbols (!, + and -). Otherwise, the display is (possibly truncated) names.

  • display.crop integer (default 0)

    Specifies how much of the view name to include, in characters. A value of 0 turns off truncation.

  • titlebar.event boolean (default false)

    When enabled, the title bar includes superfluous events.

  • boolean (default true)

    When enabled, the title bar includes chat events.

  • titlebar.stalk boolean (default true)

    When enabled, the title bar includes stalk events.


  • <UserA, UserB> [#channelA] (#channelB) ChatZilla!

    In this example, UserA and UserB have stalk events, #channelA has chat events, and #channelB has superfluous events. Superfluous events are hidden by default.

  • !!+-ChatZilla!

    This is the same as the example above, but with display.symbol set to true.

Permalink | Author: | Tags: ChatZilla, Scripts | Posted: 09:00PM on Sunday, 28 February, 2016 | Comments: 0

ChatZilla Plugin: Topic Diff


This plugin for ChatZilla shows you the changes made to a channel's topic.


=-= Nickname has changed the topic to “ChatZilla topic diff test”
=-= Nickname has changed the topic to “ChatZilla diff test”
=-= Nickname deleted "topic ".
=-= Nickname has changed the topic to “ChatZilla diff testing!”
=-= Nickname added "ing!".
=-= Nickname has changed the topic to “ChatZilla topic diffing”
=-= Nickname added "topic ", deleted " test", deleted "!".

Permalink | Author: | Tags: ChatZilla, Scripts | Posted: 08:00PM on Sunday, 21 February, 2016 | Comments: 0

ChatZilla Plugin: Network Trace


This plugin for ChatZilla allows you to see the incoming and outgoing network messages easily.


  • /network-trace [<toggle>]

    Without any arguments, displays the tracing status for the current network.

    With the toggle argument, controls the tracing status for the current network. "true", "on", "yes" and "1" will enable tracing. "false", "off", "no" and "0" will disable tracing.


[<<] PING
[>>] PONG
[>>] JOIN #channel
[<<] :Nickname!chatzilla@hostname JOIN :#channel
[<<] 353 Nickname = #channel :@Nickname
[<<] 366 Nickname #channel :End of /NAMES list.
[>>] MODE #channel
[<<] 324 Nickname #channel +nt
[<<] 329 Nickname #channel 1454711109
[>>] PART #channel :
[<<] :Nickname!chatzilla@moz-eif.ga4.155.217.IP PART #channel :""


If you have ChatZilla build 0.9.92 2016-02-08 19:00 or later, you can do:


Otherwise, due to a bug, you will need to download the master archive and extract it in to a new subfolder of the "scripts" folder. This can be found inside the path shown by the command "/pref profilePath".


[INFO] Preference “profilePath” is “C:\Users\James\AppData\Roaming\Mozilla\Firefox\Profiles\\chatzilla”.

means the best place to extract the archive is


Permalink | Author: | Tags: ChatZilla, Scripts | Posted: 09:30PM on Sunday, 14 February, 2016 | Comments: 0

Offline London Underground routing on your phone

There are probably a number of apps available for this as well, but none that I've found for Windows Phone are any good. Even desktop routing via Google Maps or Bing Maps has not been very good at estimating journey times for me.

So I made a website which does it, just how I like it, with the following features:

  • Uses Application Cache to remain available even with no data connection
  • Browse lines, stations and routes
  • Show all possible routes with duration and stops
  • Entirely front-end code, using Angular JS

Offline Tube:

Permalink | Author: | Tags: Offline, Tube | Posted: 08:00PM on Sunday, 07 February, 2016 | Comments: 0

Cloning a git-svn repository without re-downloading everything

This is a problem I've been having for a few weeks now, since I started using git and the git-svn plug-in to operate on a Subversion repository. Today I figured out the solution.

When you git clone a repository which has been used with Subversion and git-svn, none of the extra metadata is cloned with it. That's expected, so you have to do git svn init again to configure git-svn in this new repository. However, this does not save you from git-svn then downloading everything from Subversion! This can easily take hours, if not days, on a large repository.

The trick is simple enough: git update-ref refs/remotes/git-svn master. Note that you might need to use a different branch name in place of "master", depending on your git repository's set up. All this does is tell git-svn that the latest Subversion commit is the latest git commit on branch "master".

Now when you do git svn fetch, the worst it'll do is "Rebuilding ...rev_map..." which should only take a minute or two and is entirely local.

$ git clone
normal clone stuff

$ git svn init

$ git update-ref refs/remotes/git-svn master

$ git svn fetch
Rebuilding .git/svn/refs/remotes/git-svn/.rev-map.guid ...
r1 = sha1
Done rebuilding .git/svn/refs/remotes/git-svn/.rev-map.guid


Permalink | Author: | Tags: Git, Subversion, Version control | Posted: 08:45PM on Tuesday, 22 December, 2015 | Comments: 0

Mixing jQuery and Underscore.js nicely

Working on a new project, with both jQuery and Underscore.js, I found myself with a problem. Using Underscore.js on jQuery objects felt somewhat dirty/messy:

   // With $ and _ both in scope...
   // Typical code:
       .each(function(element) {
           element = $(element);
           // Run some jQuery on 'element'.
       .filter(function(element) {
           element = $(element);
           // Test some jQuery on 'element'.
       .each(function(element) {
           element = $(element);
           // Run some jQuery on 'element'.

The two key problems I had were:

  1. The initial "_($('..." and "_.chain($('..." bugged my sense of clean code.
  2. I had to re-wrap every element in jQuery inside each filter() or each() or any other Underscore.js iterator function.

The solution I found is pretty simple and also in two parts:

  1. Add a new mix-in to Underscore.js: the jQuery $() function.
  2. Use the map() method from Underscore.js directly with jQuery's $() function. (This also meant an increased use of the chain() method.)

   // With $ and _ both in scope...
   // One-time set-up:
   _.mixin({$: $});
   // Typical code:
       .$()     // This uses jQuery to select the elements matching the selector.
       .map($)  // This uses Underscore.js to wrap every matched element in jQuery.
       .filter(function(element) {
           // Test some jQuery on 'element'.
       .each(function(element) {
           // Run some jQuery on 'element'.

Much cleaner!

Addendum: It was pointed out to me that you can avoid the chain() methods of Underscore.js by replacing that library with Lo-Dash, which has much the same API, but with better performance and more intuitive method chaining (i.e. more like jQuery). Thanks tom!

Permalink | Author: | Tags: JavaScript, jQuery, Underscore.js | Posted: 06:00PM on Thursday, 31 October, 2013 | Comments: 0

Getting good MiniDumps from processes WER has already grabbed

If you've got a crashed process that WER has handled but you either know the JIT debugger is set wrong or you haven't got one set up at all (so no "Debug" button on the crash dialog), you can leave the dialog open and attach any debugger of your choice to the suspended, crashed process.

However, there's a problem. By attaching the debugger to the suspended process, the process' last-exception information has been lost; this is because the way the debugger sucessfully attaches to a suspended (or hung) process is to inject a new, running thread and have that thread crash. So your debugger, and any minidumps it generates with .dump, will not be able to find the original program's exception information. Oops!

The solution is very similar to Raymond Chen's post on Sucking the exception pointers out of a stack trace. The difference is how we find the pointers and what we do with them.

Starting with the stack trace from kb:

RetAddr           : Args to Child                                                           : Call Site
000007f9`d88212d2 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!NtWaitForMultipleObjects+0xa
000007f9`dae8d20e : 00000000`02300000 000007f6`96e75000 00000000`00000000 00000000`000001dc : KERNELBASE!WaitForMultipleObjectsEx+0xe5
000007f9`dae8cfd2 : fffff8a0`00000080 00000000`80004005 00000000`000001ec 00000000`00000000 : KERNEL32!WerpReportFaultInternal+0x1fa
000007f9`d889fc87 : 00000000`00000000 00000000`00195c30 00000000`00000030 00000000`00195c30 : KERNEL32!WerpReportFault+0x42
000007f9`db56a43d : 00000001`00000000 00000000`00196990 00000000`0019f620 00000000`003441d0 : KERNELBASE!UnhandledExceptionFilter+0x1d7
000007f9`db4b4ad4 : 000007f9`d8eeabdd 00000000`00196990 00000000`00000000 00000000`00000000 : ntdll!LdrpLogFatalUserCallbackException+0x4d
000007f9`db4d464d : 00000000`00000000 00000000`00195de8 00000000`00195da0 000007f9`d8f7f000 : ntdll!KiUserCallbackDispatcherHandler+0x20
000007f9`db4d567c : 000007f9`d8ee0000 00000000`0019f5c0 000007f9`0000e4f0 00000000`00000000 : ntdll!RtlpExecuteHandlerForException+0xd
000007f9`db4b4bba : 00000000`00000000 00000000`00000000 000007f6`96e7e300 00000000`00000000 : ntdll!RtlDispatchException+0x392
000007f9`db4b2acd : 000007f9`d8bbc36c 00000000`00360f00 00000000`00360f00 00000000`00360f00 : ntdll!KiUserExceptionDispatch+0x2e
000007f9`d8bbc36c : 00000000`00360f00 00000000`00360f00 00000000`00360f00 00000000`00000000 : ntdll!memcpy+0x21a

The EXCEPTION_POINTERS structure address seems[1] to be passed as arguments 2 and 4 of the call to "KERNEL32!WerpReportFault". From this, the exception and context records can be displayed - but we only really need to include the EXCEPTION_POINTERS address in the minidump, since adding this one address will allow the !analyze command to work.

Create the minidump using the command ".dump /ma /xp 00195c30 dump.dmp" and you're done. (Apart from all of the actual debugging - have fun!)

[1] This is on Windows 8 64bit running the 64bit WinDbg debugging a 32bit executable. YMMV.

Permalink | Author: | Tags: Windows, WinDbg, Debugging | Posted: 09:00PM on Monday, 25 February, 2013 | Comments: 0

HTTP Archive Difference tool

When measuring website performance, comparing two different page loads is a common and useful operation. However, there isn't much available to do it; some tools, like Fiddler, let you export the timeline waterfall as an image, allowing a visual inspection of two page loads to be done, but this lacks the ability to easily compare things such as when a particular request was made in each page.

A good intermediate solution is to save HTTP Archive files of each page load; these are JSON files containing the request and response timing information, headers, cookies and (depending on tool) contents. HTTP Archive (HAR) files can be exported natively from Chrome and Fiddler, and via the NetExport extension for Firebug in Firefox. Internet Explorer can export an XML transcription of the official JSON HAR format.

But what about comparing the exported HAR data? There is an online HAR Viewer but nothing to compare two HAR files. This particular issue came to light for me a few months back, when I was working on page load performance at work, but it really hit home when, at the WebPerfDays on Friday, "HAR diff" appeared on a list of tools that web performance people wanted.

Putting the two together, I have put my HAR difference tool online for all to use. Just paste in two HAR files (or just one to view it alone) and hit "Compare!". The tool summarises the differences, both in which requests were made, their timing information, and how the browser utilised its connections. The precise level of details depends on whether a proxy (like Fiddler) or browser tool (like Firebug) was used to collect the information, but most of the information is generally available from anything that exports HAR files.

Permalink | Author: | Tags: HAR, Tools | Posted: 08:30PM on Monday, 08 October, 2012 | Comments: 0

Powered by the Content Parser System, copyright 2002 - 2017 James G. Ross.