IE7 And Office Outlook Incompatible with McAffe Virus Scan Buffer Overflow Detection

If you have installed the latest IE7 and use Outlook and McAffe Virus Scan, you may have noticed your Outlook mail client locking up quite often.

Seems that during normal operation IE7 is throwing buffer overflows, or doing something that looks like a buffer overflow (quack quack). This triggers McAffe Virus Scan which promptly kills the running thread.

Eventually Outlook gets deadlocked and freezes and you have no choice but to kill it and wait happily as it rebuilds your local mail cache.

Oh what fun.

 

Posted in Uncategorized | Leave a comment

Scrybe – Yet Another Calendar Application – But Its A Very Good Looking One

http://www.iscrybe.com/cal/index.html

The video alone is worth watching just to get an idea of what its possible to do in a browser nowadays.

I was hoping to be first to launch something with the “work offline now, sync to server later” idea – seems they beat me to it 🙂 

I also love the PaperSyncTM idea 🙂

Posted in AJAX, Web2.0 | 2 Comments

General News And IE7

I should start up developing and blogging again now. My grandmother passed away a few weeks ago and my Mother and her partner have been visiting for the last two weeks so I’ve not really had a chance to do anything codey.

I am working on one interesting JavaScript thing and have been bouncing ideas off Lelak.

I upgraded to IE7. Thanks to previous testing with earlier beta versions, none of my sites suffers any repercussions, but Office 2003 Outlook now crashes at least three times a day and takes out MSN as well. I suspect the new HTML renderer has some issues playing well with others.

Windows Media Center seems largely unaffected. The core engine is running under the IE7 browser, but I’ve not noticed anything negative yet.

Posted in Uncategorized | Leave a comment

The US Declares War On Australia

By banning Vegemite as “Unnatural“.

Seriously folks – after stealing our Ugg-boots and sending us Don Lane, this is the last straw.

Posted in Uncategorized | Leave a comment

A Brief History Of Parsing

 

The primary goal a parser is to organize a sequence of tokens based on the rules of a formal language. As the parser accepts a sequence of tokens, it determines, based on this information, when the grammar’s respective rules are complete and verifies the syntactic correctness of the token sequence. The end result of the process is a “derivation” which represents the token sequence organized following the rules of the grammar.

Typically, Backus-Naur Form is used to define the context free grammar used by the language. The entire language, as a whole, is represented through a single nonterminal called the “start symbol”. Often the parse information is stored into a tree, called a derivation tree, where the start symbol is the root node.

There are two distinct approaches currently used to implement parsers. Recursive Descent Parsers and LL parsers are examples of top-down parsers and LR parsers are examples of bottom-up parsers. Most parser generators, such as YACC, use one of the LR algorithm variants.

 

Grammar Embedded in the Code

The earliest compilers were written with the definition of the langauge buried deeply within the code. With these compilers it was very difficult to verify that the compiler accepted all of the langauge syntax and only the language syntax. This became especially difficult when the definition of the language was changed for later versions. All compilers before the early 1960’s were of this type because there wasn’t any uniform method of describing the language grammars.

Recursive Descent

With the advent of the BNF notation for describing the languages, compiler writers designed the structure of their subroutines and functions to correspond to the structure of the BNF definition of the language. To use our example grammar above, there would be seperate functions to handle EXP’s, TERM’s, and FACTOR’s. The EXP function would call itself and the TERM function, etc. This way, when it came time to update the language to meet changing standards, it would be easier to find where the changes should be made. It also made it much easier to verify that the language accepted all legal syntax and only the legal syntax.

The Recursive Descent does not guarantee that the program matches the grammar. It only aids in making it easier for the compiler writer to try to verify the accuracy of the parser. The search for better parsing methods continued with some that analyzed the grammars and attempted to automate the parsing methods. The first such method was called Top Down Parsing or LL Parsing.

Top Down Parsing

The top down parsing method, also called a predictive parse or LL parse, requires that we reorganize the grammar so that the first symbol of each rule defining a given Non-Terminal will indicate which rule to choose for the Non-Terminal. This transformation can be done to any grammar, but is sometimes awkward. There are also some cases that cannot be parsed correctly with Top Down Parsing methods.

Bottom UP Parsing

The bottom up parse, also called an LR parse is the most powerful parseing method. It also has the most complicated set of algorithms for building the parse tables. There are a set of algorithms for building LR parse tables. The same algorithm is used for all of the LR parse tables.

LR(0)

The first of the LR parse generation algorithms is called LR(0) and it generates tables that are somewhat large. The LR(0) parse algorithm do not parse grammars with certain types of ambiguities.

LR(1)

The second algorithm, which handles all of the grammars correctly is LR(1). The LR(1) algorithm generates correct parse tables for grammars with all of the ambiguities that are found in most useful langauges. The biggest strike against LR(1) parse tables is the fact that the tables generated are much larger then the LR(0).

LR Parsing, or Left-to-right Right-derivation parsing, uses tables to determine when a rule is complete and when additional tokens must be read from the source string. LR parsers identify substrings which can be reduced to nonterminals. Unlike recursive descent parsers, LR parsers do very little “thinking” at runtime. All decisions are based on the content of the parse tables.

LR parser generators construct these tables by analyzing the grammar and determining all the possible “states” the system can have when parsing. Each state represents a point in the parse process where a number of tokens have been read from the source string and rules are in different states of completion. Each production in a state of completion is called a “configuration” and each state corresponds to a configuration set. Each configuration contains a “cursor” which represents the point where the production is complete.

SLR

The third algoritm attempts to handle some of the amiguities that LR(0) fails at and keeps the size of the parse tables the same as those generated by LR(0). It is called Simple LR.

LALR

The last algorithm, Look Ahead LR, generates parse tables that are the same size of LR(0), but handles all of the ambiguities that are handled by LR(1).

“LALR Parsing, or “Lookahead LR parsing”, is a variant of LR Parsing which most parser generators, such as YACC, implement. LR Parsing combines related “configuration sets” thereby limiting the size of the parse tables. As a result, the algorithm is slightly less powerful than LR Parsing but much more practical.

Grammars that can be parsed by the LR algorithm, might not be able to be parsed by the LALR algorithm. However, this is very rarely the case and real-world examples are few. The number of states eliminated by choosing LALR over LR is sometimes huge. The C programming language, for instance, has over 10,000 LR states. LALR drops this number to around 350.

Typically, the LR / LALR parsing algorithms, like deterministic finite automata, are commonly represented by using a graph – albeit a more complex variant. For each token received from the scanner, the LR algorithm can take four different actions: Shift, Reduce, Accept and Goto.

diagram-lalr-stateFor each state, the LR algorithm checks the next token on the input queue against all tokens that expected at that stage of the parse. If the token is expected, it is “shifted”. This action represents moving the cursor past the current token. The token is removed form the input queue and pushed onto the parse stack.

A reduce is performed when a rule is complete and ready to be replaced by the single nonterminal it represents. Essentially, the tokens that are part of the rule’s handle – the right-hand side of the definition – are popped from the parse stack and replaced by the rule’s nonterminal plus additional information including the current state in the LR state machine.

When a rule is reduced, the algorithm jumps to (gotos) the appropriate state representing the reduced nonterminal. This simulates the shifting of a nonterminal in the LR state machine.

Finally, when the start symbol itself is reduced, the input is both complete and correct. At this point, parsing terminates.”

 

http://www.devincook.com/goldparser/concepts/lalr.htm

 

Good Runthrough of parsing. http://www.cs.wpi.edu/~kal/courses/compilers/module3/mybuparsing.html

Posted in Parsing Theory, XPath | Leave a comment

Sydney Phone Photo Blogging #3 – Everything

A random sampling from my phone over the last six months.

Caution – Contains traces of roadkill.

IMAGE_293.jpg

Shadow Bitumen Angel

IMAGE_119.jpg

Old Poster

IMAGE_180.jpg

The perfect product for when a sordid affair between a mechanic and journalist goes horribly wrong…

 

IMAGE_199.jpg

Naked Car

 

IMAGE_198.jpg

Graffiti

 

IMAGE_201.jpg

Graffiti

 

IMAGE_136.jpg

Graffiti

 

IMAGE_137.jpg

Graffiti

 

IMAGE_138.jpg

Graffiti

 

IMAGE_166.jpg

Have A Dead Cat And Welcome to Marrickville

 

IMAGE_217.jpg

One Day Later – Here Is Another

 

IMAGE_106.jpg

Alas Poor Yorick

 

IMAGE_219.jpg

Rain, Power, Grief

IMAGE_236.jpg

Graffiti

IMAGE_237.jpg

Graffiti

IMAGE_238.jpg

Graffiti

IMAGE_239.jpg

Graffiti

IMAGE_256.jpg

Glad its not that fake wood – that smells funny when I burn it…

 

IMAGE_258.jpg

Yes It Really Exists

 

IMAGE_279.jpg

Train Enthusiast Porn – Gotta Get Me Some of that UP and BNSF action baby…

 

 

 

Posted in Coolhunting, Just Kidding, Meta-Narrative, Music & Art | 2 Comments

MetaWrap TimeConverter, Build 7

New Version Is Avialable

Click Here for the latest version.

Here (download) is the latest version (Build 7) of the MetaWrap time converter which replaces the previous version (Build 6)

This build fixes some reported bugs in the timezone data.

mwtimeconverter-build3.jpg

To upgrade you can either,

Choose Uninstall on the tool-tip menu on your current version and run the new one

uninstall.png

or

Select Exit via the tool-tip menu and replace your current mwtimeconverter.exe executable, and then run it.

exit.png

 

Posted in TimeConverter | 1 Comment

NetWork Adapters I Have Known And Loved

While looking for USB 802.11 hardware for Linux with some particular features I did a lot of hardware hunting.

IMAGE_259.jpg

 

IMAGE_261.jpg

 

IMAGE_263.jpg

 

IMAGE_287.jpg

IMAGE_265.jpg

 

IMAGE_285.jpg

IMAGE_286.jpg

 

 

IMAGE_288.jpg

 

IMAGE_284.jpg

Posted in Hardware | 1 Comment

externalInterface Under FlashPlayer 9 Is Evil – The White Screen Of Death

In short – externalInterface is the work of the devil.

There are others that have a low opinion of it.

So far the issue I have found seems to affect the interaction between Windows Media Center, FlashPlayer 9.16.0  (FlashPlayer 8 does not have the issue) and Flash SWFs that use externalInterface.

But there is a solution.

externalInterface is much nicer than fsCommand but suffers from some of the same problems when it comes to adding Flash to a page dynamically. In a previous post I have outlined a workaround.

The issue with externalInterface is very different which seems to center on that fact that it injects its own JavaScript code into window.parent

If you have seen the movie Terminator, there is a scene where Arnie walks up to biker and punches him in a chest and pulls out his still beating heart. Imagine that played back in reverse and you have a fair idea of what FlashPlayer 9 does to the browser.

eg

  // Look for the 'standard' functions that flash adds to window.parent
  if (window.parent.__flash__toXML != null)
  {
   alert("window.parent.__flash__toXML exists");
  }
  else
  {
   alert("window.parent.__flash__toXML not there");
  }

Windows Media Center runs HTML applications in a shell of IE.  It’s IE plus a series of objects that you can script against to do MCE specific operations. It also behaves differently to IE in one critical aspect.

In WMC, when running an application, if you play a movie full screen or use one of the hot keys to browse forward, including the magic green button and then at a later time browse back to the application by hitting the “BACK” button, the BODY.onload event fires again.

In an application that has no embedded Flash SWFs this can be handled in JavaScript by setting a simple flag – but if your application embeds SWFs that use externalInterface and you have FlashPlayer 9 installed – your SWF dies. You get a white screen of “not really there”. The SWF is still running. It’s still able to call into JavaScript, but you can’t call it and there is no way to make it start displaying again.

This does not happen with the FlashPlayer 8. Something has changed. Either the window.parent fisting is broken, or FlashPlayer 9 listens to BODY.onload and is doing something extra that is just not kosher for WMC.

I suspect that in WMC, window.parent may be something other than what FlashPlayer9 is expecting. I’m still exploring the specifics of this.

The solution is to give Arnie a cardboard cutout to insert its giblets into and that can be achieved by embedding your SWF or even your whole application in an IFRAME. This guarantees that window.parent, if called from within the IFRAME is the document that embedded the IFRAME.

Arnie shoves his fist from the IFRAME into your parent document, and not somewhere unexpected.


I’m working on an addition to the MetaWrap JavaScript libraries that will include a lot of WMC support, in particular for remoting applications and dealing with flash. Will post and update when its released.

Posted in JavaScript | 5 Comments

Movietally.com – A del.icio.us For Movies

I just got sent a PR style blurb about this site. Wow – targeted PR marketing that didn’t try to sell me willy tablets – someone thinks I’m influential!

I’m not going to cut and paste the marketroid slab of text they sent me, but I will say that it looks promising – but the real test will be what emerges when they have a decent amount of content – at the moment it looks a little sparse.

movietally.com

Posted in Web2.0 | Leave a comment