<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2225054266370213079</id><updated>2024-09-09T10:51:22.721+01:00</updated><category term="projects"/><category term="xml"/><category term="javascript"/><category term="lua"/><category term="parser"/><category term="cross platform"/><category term="digg api"/><category term="adobe air"/><category term="blog news"/><category term="blogger"/><category term="c"/><category term="html"/><category term="offtopic"/><category term="relevant"/><category term=".net"/><category term="boo"/><category term="c++"/><category term="digg"/><category term="diggs"/><category term="extensions"/><category term="feedburner"/><category term="feeds"/><category term="firefox"/><category term="greasemonkey"/><category term="humour"/><category term="linux"/><category term="origami"/><category term="phait"/><category term="popular culture"/><category term="prototype framework"/><category term="syntax highlighter"/><category term="video"/><category term="webcomic"/><category term="yoda"/><title type='text'>Netting.NET</title><subtitle type='html'>My [mis]adventures in programming and the .NET Framework.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-6177689016702015705</id><published>2008-01-06T13:18:00.001+00:00</published><updated>2008-01-06T14:42:08.825+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c"/><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="cross platform"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="lua"/><category scheme="http://www.blogger.com/atom/ns#" term="projects"/><title type='text'>Moonshine core interpreter</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;img alt=&quot;xkcd rockband&quot; src=&quot;http://img504.imageshack.us/img504/2031/rockbandjs8.png&quot; /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Today I will show you a demonstration of the Mooshine core interpreter running two different Lua programs which utilise the Firefox browser.&lt;br /&gt;&lt;br /&gt;The first program as outlined below tests the standard module:&lt;br /&gt;&lt;code class=&quot;lua&quot;&gt;&lt;pre&gt;&lt;br /&gt;-------------------------------&lt;br /&gt;-- test standard module&lt;br /&gt;-------------------------------&lt;br /&gt;print(&quot;\n&quot; .. std.version() .. &quot;\n&quot;) -- print version&lt;br /&gt;std.msg(&quot;Hello from Moonshine!&quot;) -- display message&lt;br /&gt;local ans = std.prompt(&quot;Enter number:&quot;) -- display prompt&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;It does the following...&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Prints the version of the standard module in the interpreter&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Displays a message box in the browser&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Displays a prompt for user input&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;The second program retrieves the latest XKCD comic panel (a example of which is in this post) from the XKCD atom feed and displays it in a new browser window...&lt;br /&gt;&lt;code class=&quot;lua&quot;&gt;&lt;pre&gt;&lt;br /&gt;----------------------------------&lt;br /&gt;-- display latest xkcd web&lt;br /&gt;-- comic from the xkcd atom feed&lt;br /&gt;-- in a new browser window&lt;br /&gt;----------------------------------&lt;br /&gt;-- make a request for xkcd comic feed&lt;br /&gt;feed = net.httpreq(&quot;http://xkcd.com/atom.xml&quot;)&lt;br /&gt;-- match comic panel&lt;br /&gt;img = string.match(feed, &lt;br /&gt;&quot;http\:\/\/imgs.xkcd.com\/comics\/[%w%_]+.png&quot;)&lt;br /&gt;-- display comic panel in a new window&lt;br /&gt;std.window(img)&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;The current version of the Moonshine core interpreter is an executable written in C with embedded Lua. Most of the functionality itself comes from the included modules.&lt;br /&gt;&lt;br /&gt;To properly work as part of my extension, I will rewrite the core intepreter in C++ as an XPCOM component (which use classes).&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;See the &lt;a target=&quot;_blank&quot; href=&quot;http://img87.imageshack.us/img87/2336/mshineprotoep3.gif&quot;&gt;demonstration&lt;/a&gt; &lt;small&gt;(animated GIF)&lt;/small&gt;&lt;br/&gt;&lt;br /&gt;&lt;small&gt;&lt;i&gt;Image courtesy of &lt;a target=&quot;_blank&quot; href=&quot;http://xkcd.com/&quot;&gt;xkcd&lt;/a&gt; (&lt;a target=&quot;_blank&quot; href=&quot;http://creativecommons.org/licenses/by-nc/2.5/&quot;&gt;CC-BY-NC&lt;/a&gt;)&lt;/i&gt;&lt;/small&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://digg.com/submit?phase=2&amp;amp;url=http://nettingdotnet.blogspot.com/2008/01/moonshine-core-interpreter.html&quot;&gt;&lt;br /&gt;&lt;img alt=&quot;Digg This Story&quot; src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/6177689016702015705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/6177689016702015705' title='101 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/6177689016702015705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/6177689016702015705'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2008/01/moonshine-core-interpreter.html' title='Moonshine core interpreter'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>101</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-2872975742253987717</id><published>2007-12-23T14:17:00.000+00:00</published><updated>2008-01-06T13:26:46.776+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c"/><category scheme="http://www.blogger.com/atom/ns#" term="extensions"/><category scheme="http://www.blogger.com/atom/ns#" term="firefox"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="lua"/><category scheme="http://www.blogger.com/atom/ns#" term="parser"/><category scheme="http://www.blogger.com/atom/ns#" term="projects"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>Moonshine</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;img alt=&quot;pa loved his ol&#39; moonshine.&quot; src=&quot;http://img518.imageshack.us/img518/5734/4412293364fc787467cag6.jpg&quot;/&gt;&lt;br/&gt;&lt;br /&gt;I&#39;ve been working on a project to integrate Lua with the Firefox web browser, in the form of an extension which adds support for the language to write background services or on-demand applications to run directly in the browser.&lt;br /&gt;&lt;br /&gt;I have yet to write more code to get the integration working. I will enter this project into the Mozilla Lab&#39;s extend Firefox Contest. So hopefully, I&#39;ll have enough implemented by the deadline.&lt;br /&gt;&lt;br /&gt;For more information, please see the &lt;a href=&quot;http://mshine.googlecode.com&quot;&gt;Google code project page&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;small&gt;&lt;i&gt;Image courtesy of &lt;a target=&quot;_blank&quot; href=&quot;http://www.flickr.com/photos/dancingdeer/441229336/&quot;&gt;ladyphoenixx_1999&lt;/a&gt; (&lt;a target=&quot;_blank&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/deed.en&quot;&gt;CC-BY-NC-ND&lt;/a&gt;)&lt;/i&gt;&lt;/small&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a target=&#39;_blank&#39; href=&#39;http://digg.com/submit?phase=2&amp;amp;url=http://nettingdotnet.blogspot.com/2007/12/moonshine.html&#39;&gt;&lt;br/&gt;&lt;img border=&#39;0&#39; alt=&#39;Digg This Story&#39; src=&#39;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&#39;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/2872975742253987717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/2872975742253987717' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2872975742253987717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2872975742253987717'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/12/moonshine.html' title='Moonshine'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-2239081534465146354</id><published>2007-11-26T12:44:00.000+00:00</published><updated>2007-12-04T18:13:36.304+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lua"/><category scheme="http://www.blogger.com/atom/ns#" term="parser"/><category scheme="http://www.blogger.com/atom/ns#" term="projects"/><category scheme="http://www.blogger.com/atom/ns#" term="video"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>XML parser demonstration</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;object height=&quot;350&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://youtube.com/v/4uigNjdDeFw&quot;&gt;&lt;embed src=&quot;http://youtube.com/v/4uigNjdDeFw&quot; type=&quot;application/x-shockwave-flash&quot; height=&quot;350&quot; width=&quot;425&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;small&gt;&lt;a href=&quot;http://youtube.com/watch?v=4uigNjdDeFw&quot; target=&quot;_blank&quot;&gt;Video on YouTube.&lt;/a&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;I managed to get the parser to handle attributes and tags with attributes.&lt;br /&gt;&lt;code&gt;xml.stag&lt;/code&gt; is no longer necessary and has been replaced with the more vesatile &lt;code&gt;xml.tag&lt;/code&gt; .&lt;br /&gt;Above is an approximately 8 minute video demonstrating use of the parser within the Lua interpreter. I apologise for the poor quality.&lt;br /&gt;&lt;br /&gt;The next step for the parser now is to implement handling a specific occurrence of tag for the specified functions.&lt;br/&gt;&lt;br /&gt;&lt;small&gt;&lt;i&gt;This video is licenced under same licence as the rest of this blog contents, except third party stuff of course (such as featured images).&lt;/i&gt;&lt;/small&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a target=&#39;_blank&#39; href=&#39;http://digg.com/submit?phase=2&amp;amp;url=http://nettingdotnet.blogspot.com/2007/11/xml-parser-demonstration.html&#39;&gt;&lt;br/&gt;&lt;img border=&#39;0&#39; alt=&#39;Digg This Story&#39; src=&#39;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&#39;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='enclosure' type='application/x-shockwave-flash' href='http://www.youtube.com/v/4uigNjdDeFw' length='0'/><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/2239081534465146354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/2239081534465146354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2239081534465146354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2239081534465146354'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/11/xml-parser-demonstration.html' title='XML parser demonstration'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-4299208430808153359</id><published>2007-11-20T21:44:00.000+00:00</published><updated>2007-11-21T12:17:42.447+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lua"/><category scheme="http://www.blogger.com/atom/ns#" term="parser"/><category scheme="http://www.blogger.com/atom/ns#" term="projects"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>Lua XML Parser - so far, so good.</title><content type='html'>&lt;div&gt;&lt;br /&gt; &lt;p&gt;&lt;img src=&quot;http://img235.imageshack.us/img235/2681/xmllicenseplateie9.jpg&quot; alt=&quot;California XML licence plate.&quot;/&gt;&lt;br/&gt;&lt;br /&gt;As mentioned in my last posting, I have been developing a simple &lt;a href=&quot;http://www.w3schools.com/xml/xml_parser.asp&quot; target=&quot;_blank&quot;&gt;XML parser&lt;/a&gt; for use with the &lt;a href=&quot;http://www.lua.org&quot; target=&quot;_blank&quot;&gt;Lua programming languge&lt;/a&gt;. It will most likely be a very basic parser, that is not one on terms with more advanced parsers.&lt;br/&gt;&lt;br /&gt;So far I have implemented 2 basic functions for my parser:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Loading XML documents&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Parsing short tags (e.g. Something like &lt;code class=&quot;xml&quot;&gt;&amp;lt;tag&amp;gt;value&amp;lt;/tag&amp;gt;&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br/&gt;&lt;br /&gt;To include the functionality of the parser (which is a Lua module) into a new Lua program, I include the line:&lt;br/&gt;&lt;br /&gt;&lt;code class=&quot;lua&quot;&gt;&lt;pre&gt;&lt;br /&gt;xml = require &quot;xmlparser&quot;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;This gives the program access to the two functions (I have so far) provided by my parser.&lt;br/&gt;&lt;br /&gt;These are:&lt;br/&gt;&lt;br /&gt;&lt;code class=&quot;lua&quot;&gt;&lt;pre&gt;&lt;br /&gt;xml.load(file as str)&lt;br /&gt;xml.stag(xml as str, tag as str [, occur as int])&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;I have written this simple program to test my parser as it stands so far:&lt;br/&gt;&lt;br /&gt;&lt;code class=&quot;lua&quot;&gt;&lt;pre&gt;&lt;br /&gt;--------------------------------------------------&lt;br /&gt;-- Example program using XML Parser&lt;br /&gt;-- Copyright (c) 2007 Sam Saint-Pettersen&lt;br /&gt;-- Released under the GNU General Public License&lt;br /&gt;-- http://creativecommons.org/licenses/GPL/2.0/&lt;br /&gt;--------------------------------------------------&lt;br /&gt;&lt;br /&gt;-- include xmlparser module&lt;br /&gt;xml = require &quot;xmlparser&quot;&lt;br /&gt;&lt;br /&gt;-- load xml file&lt;br /&gt;file = xml.load(&quot;employees.xml&quot;)&lt;br /&gt;&lt;br /&gt;-- display name&lt;br /&gt;print(&quot;Name: &quot; .. xml.stag(file, &quot;last&quot;) .. &quot;, &quot; .. &lt;br /&gt;xml.stag(file, &quot;first&quot;)) -- &lt; this should be on above line&lt;br /&gt;-- display position&lt;br /&gt;print(&quot;Position: &quot; .. xml.stag(file, &quot;position&quot;))&lt;br /&gt;-- display e-mail addresss&lt;br /&gt;print(&quot;E-mail: &quot; .. xml.stag(file, &quot;email&quot;))&lt;br /&gt;-- display home page&lt;br /&gt;print(&quot;Home page: &quot; .. xml.stag(file, &quot;homepage&quot;))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;Below is my test XML file: &lt;br /&gt;&lt;code class=&quot;xml&quot;&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;employees&amp;gt;&lt;br /&gt; &amp;lt;employee&amp;gt;&lt;br /&gt;  &amp;lt;first&amp;gt;Phoenix&amp;lt;/first&amp;gt;&lt;br /&gt;  &amp;lt;last&amp;gt;Lightfoot&amp;lt;/last&amp;gt;&lt;br /&gt;  &amp;lt;position&amp;gt;Lead Programmer&amp;lt;/position&amp;gt;&lt;br /&gt;  &amp;lt;email&amp;gt;p.lightfoot@pathetecsys.com&amp;lt;/email&amp;gt;&lt;br /&gt;  &amp;lt;homepage&amp;gt;http://www.pathetecsys.com/~lightfoot&amp;lt;/homepage&amp;gt;&lt;br /&gt;  &amp;lt;telephone type=&quot;office&quot;&amp;gt;001 222 222&amp;lt;/telephone&amp;gt;&lt;br /&gt;  &amp;lt;telephone type=&quot;mobile&quot;&amp;gt;777 222 333&amp;lt;/telephone&amp;gt;&lt;br /&gt; &amp;lt;/employee&amp;gt;&lt;br /&gt; &amp;lt;employee&amp;gt;&lt;br /&gt;  &amp;lt;first&amp;gt;Hugo&amp;lt;/first&amp;gt;&lt;br /&gt;  &amp;lt;last&amp;gt;Jacob-Jones&amp;lt;/last&amp;gt;&lt;br /&gt;  &amp;lt;position&amp;gt;Chief Executive Officer&amp;lt;/position&amp;gt;&lt;br /&gt;  &amp;lt;email&amp;gt;h.jacobjones@pathetecsys.com&amp;lt;/email&amp;gt;&lt;br /&gt;  &amp;lt;homepage&amp;gt;http://www.pathetecsys.com/~jacobjones&amp;lt;/homepage&amp;gt;&lt;br /&gt;  &amp;lt;telephone type=&quot;office&quot;&amp;gt;001 222 200&amp;lt;/telephone&amp;gt;&lt;br /&gt;  &amp;lt;telephone type=&quot;mobile&quot;&amp;gt;577 242 321&amp;lt;/telephone&amp;gt;&lt;br /&gt; &amp;lt;/employee&amp;gt;&lt;br /&gt;&amp;lt;/employees&amp;gt;&lt;/pre&gt;&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;Here is the console output from running my test program under the Lua interpreter:&lt;br /&gt;&lt;br /&gt;&lt;code class=&quot;console&quot;&gt;&lt;pre&gt;&lt;br /&gt;Name: Lightfoot, Phoenix&lt;br /&gt;Position: Lead Programmer&lt;br /&gt;E-mail: p.lightfoot@pathetecsys.com&lt;br /&gt;Home page: http://www.pathetecsys.com/~lightfoot&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;So far, so good. :)&lt;br/&gt;&lt;br /&gt;I have yet to add the capability to specify an occurrence of a tag, based on its index and functions for parsing tags which contain attributes such as &lt;code class=&quot;xml&quot;&gt;&lt;pre&gt;&amp;lt;tag attribute=&quot;value&quot;&amp;gt;anothervalue&amp;lt;/tag&amp;gt;&lt;/pre&gt;&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;I should have that done soon enough.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br/&gt;&lt;br /&gt;&lt;small&gt;&lt;i&gt;Featured image courtesy of &lt;a href=&quot;http://flickr.com/photos/lambdageek/40535379/&quot; target=&quot;_blank&quot;&gt;lambdageek&lt;/a&gt; (&lt;a href=&quot;http://creativecommons.org/licenses/by-nc/2.0/&quot; target=&quot;_blank&quot;&gt;CC-BY-NC&lt;/a&gt;)&lt;/i&gt;&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a target=&#39;_blank&#39; href=&#39;http://digg.com/submit?phase=2&amp;amp;url=http://nettingdotnet.blogspot.com/2007/11/as-mentioned-in-my-last-posting-i-have.html&#39;&gt;&lt;br/&gt;&lt;img border=&#39;0&#39; alt=&#39;Digg This Story&#39; src=&#39;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&#39;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/4299208430808153359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/4299208430808153359' title='61 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/4299208430808153359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/4299208430808153359'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/11/as-mentioned-in-my-last-posting-i-have.html' title='Lua XML Parser - so far, so good.'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>61</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-3075596014468350744</id><published>2007-11-15T22:39:00.000+00:00</published><updated>2007-11-20T22:28:11.354+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lua"/><category scheme="http://www.blogger.com/atom/ns#" term="parser"/><category scheme="http://www.blogger.com/atom/ns#" term="projects"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>An XML + Lua Project</title><content type='html'>&lt;div&gt;&lt;br /&gt; &lt;p&gt;&lt;img src=&quot;http://img225.imageshack.us/img225/3603/3095372594cd50b0ca7vx7.jpg&quot; alt=&quot;Ah... XML. Nicely structured data.&quot;/&gt;&lt;br/&gt;&lt;br /&gt; &lt;p&gt;There&#39;s been a few too many political posts lately. Not wanting to disappoint my (most probable) only reader, &lt;a href=&quot;http://www.itcrowd.be&quot; target=&quot;_blank&quot;&gt;Tim&lt;/a&gt;, I&#39;ve decided to get back on topic.&lt;br /&gt;&lt;br /&gt; &lt;br/&gt;I will be using &lt;a href=&quot;http://www.lua.org&quot; target=&quot;_blank&quot;&gt;Lua&lt;/a&gt; to work on an upcoming project.&lt;br /&gt; The project in question is a simple &lt;a href=&quot;http://en.wikipedia.org/wiki/Parsing&quot; target=&quot;_blank&quot;&gt; XML parser&lt;/a&gt;,     which I will need later. &lt;small&gt;&lt;br/&gt;(Well, not need exactly. But it would be very helpful to have).&lt;/small&gt;&lt;br /&gt;&lt;br /&gt; &lt;br/&gt;Here is a small snippet of code for the purpose of getting used to &lt;a href=&quot;http://www.wowwiki.com/HOWTO:_Use_Regular_Expressions&quot; target=&quot;_blank&quot;&gt;pattern matching&lt;/a&gt; &lt;small&gt;(No, I&#39;m not a World of Warcracker; but that is a very good reference).&lt;/small&gt;&lt;br/&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;function main()&lt;br /&gt;    local string = &quot;&lt;tag&gt;tagvalue&lt;/tag&gt;&quot;&lt;br /&gt;    local match = string.gsub(string, &quot;&amp;lt;/?%a+&amp;gt;&quot;, &quot;&quot;)&lt;br /&gt;    print(match)  -- prints tagvalue&lt;br /&gt;end&lt;br /&gt;main()&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Very simple stuff - here&#39;s the deal:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Look in string for matches for start and end tags.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Replace these tags with nothing.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Print out the value contained within the pair of tags.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;That will pretty much handle (with some modification of course) getting a value from within a specified pair of tags. But of course, I have to consider more advanced tags such as those with attributes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But I will be working on this stuff shortly.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br/&gt;&lt;br /&gt;&lt;small&gt;&lt;i&gt;Featured image courtesy of &lt;a href=&quot;http://www.flickr.com/photos/hub19/309537259/&quot; target=&quot;_blank&quot;&gt;hub19&lt;/a&gt; (&lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.0/&quot; target=&quot;_blank&quot;&gt;CC-BY-NC-SA&lt;/a&gt;)&lt;/i&gt;&lt;/small&gt;&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a target=&#39;_blank&#39; href=&#39;http://digg.com/submit?phase=2&amp;amp;url=http://nettingdotnet.blogspot.com/2007/11/image-courtesy-of-hub19-theres-been-few.html&#39;&gt;&lt;br/&gt;&lt;img border=&#39;0&#39; alt=&#39;Digg This Story&#39; src=&#39;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&#39;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/3075596014468350744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/3075596014468350744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/3075596014468350744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/3075596014468350744'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/11/image-courtesy-of-hub19-theres-been-few.html' title='An XML + Lua Project'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-3453929627191204000</id><published>2007-10-29T22:09:00.001+00:00</published><updated>2007-11-15T21:13:41.266+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blog news"/><category scheme="http://www.blogger.com/atom/ns#" term="blogger"/><category scheme="http://www.blogger.com/atom/ns#" term="digg"/><category scheme="http://www.blogger.com/atom/ns#" term="relevant"/><title type='text'>Digg intergration</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;img src=&#39;http://img366.imageshack.us/img366/3913/32x32diggguykh6.png&#39; algin=&#39;left&#39; alt=&#39;Digg&#39;/&gt;  &lt;br/&gt;&lt;br/&gt;I&#39;ve now added Digg submission capability to this blog. To add a post you like to Digg, just click the Digg This Story button. ;)&lt;/div&gt;&lt;br/&gt;&lt;div&gt;&lt;a target=&#39;_blank&#39; href=&#39;http://digg.com/submit?phase=2&amp;amp;url=http://nettingdotnet.blogspot.com/2007/10/digg-intergration.html&#39;&gt;&lt;br/&gt;&lt;img border=&#39;0&#39; alt=&#39;Digg This Story&#39; src=&#39;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&#39;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/3453929627191204000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/3453929627191204000' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/3453929627191204000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/3453929627191204000'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/digg-intergration.html' title='Digg intergration'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-7881584950038390633</id><published>2007-10-17T14:26:00.001+01:00</published><updated>2007-10-29T22:47:38.326+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blog news"/><category scheme="http://www.blogger.com/atom/ns#" term="blogger"/><category scheme="http://www.blogger.com/atom/ns#" term="feedburner"/><category scheme="http://www.blogger.com/atom/ns#" term="feeds"/><category scheme="http://www.blogger.com/atom/ns#" term="relevant"/><title type='text'>Click icon for Feedburner feed</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;img src=&quot;http://img84.imageshack.us/img84/9642/feedburnerlogofz1.jpg&quot; alt=&quot;FeedBurner&quot; /&gt;&lt;br /&gt;&lt;br /&gt;I have created a &lt;a href=&quot;http://www.feedburner.com/&quot; target=&quot;_blank&quot;&gt;FeedBurner&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/nettingdotnet&quot; target=&quot;_blank&quot;&gt;feed&lt;/a&gt; for this blog. However there seems to be an issue somewhere that if I choose to add an external feed provider as Blogger allows users to, it creates some sort of error in the blog mark-up, which in turns means I get errors when I try to publish to this blog via &lt;a href=&quot;http://www.scribefire.com/&quot; target=&quot;_blank&quot;&gt;ScribeFire&lt;/a&gt; via the Blogger API.&lt;br /&gt;&lt;br /&gt;Anyhow to fix the issue,  to subscribe to the feed provided by FeedBurner, just click the  &lt;img src=&quot;http://img141.imageshack.us/img141/55/feedicon16x16kr3.gif&quot; alt=&quot;Blog feed icon&quot; /&gt; icon under the About Netting.NET section. Thanks.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;a href=&quot;http://digg.com/submit?phase=2&amp;url=http://nettingdotnet.blogspot.com/2007/10/click-for-feedburner-feed.html&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/7881584950038390633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/7881584950038390633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/7881584950038390633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/7881584950038390633'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/click-for-feedburner-feed.html' title='Click icon for Feedburner feed'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-5414850044456289250</id><published>2007-10-15T23:41:00.000+01:00</published><updated>2008-01-06T13:25:57.044+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe air"/><category scheme="http://www.blogger.com/atom/ns#" term="cross platform"/><category scheme="http://www.blogger.com/atom/ns#" term="digg api"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="projects"/><category scheme="http://www.blogger.com/atom/ns#" term="prototype framework"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>Digg API on AIR</title><content type='html'>&lt;div&gt;&lt;img src=&quot;http://img100.imageshack.us/img100/8905/diggapiappairvf0.png&quot; alt=&quot;Digg API on AIR&quot; /&gt;&lt;br/&gt;&lt;br /&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://www.flickr.com/photos/14013676@N05/1581176653&quot;&gt;Larger screenshot on Flickr.&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;p&gt;Hey, everyone. I do have a programming related post today.&lt;/p&gt;&lt;p&gt;I have been coding in JavaScript, XML/HTML and CSS to create the above simple Digg API &lt;span class=&quot;adobe air&quot;&gt;AIR&lt;/span&gt; application, which retrieves the top (e.g. newest) story for each category on Digg.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I have as good as finished it and will be releasing the AIR installation package (*.air) and source code (*.zip) for anyone who is interested in the AIR platform to look at.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Although I could have done an XmlHttp request without any additional framework, I did use the &lt;a target=&quot;_blank&quot; href=&quot;http://www.prototypejs.org/&quot;&gt;Prototype JavaScript framework&lt;/a&gt; for this project.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Here is a quick rundown of the files used in my application and their purpose:&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;b&gt;DiggAPI.xml&lt;/b&gt; - This is the file which specifies the name, copyright information and file to use for content, etc. An XML file such as this is a standard requirement in any AIR application.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DiggAPI.html&lt;/b&gt; - The application content. This contains all of the HTML code for my application and calls to the neccessary JavaScript functions in my external *.js files.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sampleCert.pfx&lt;/b&gt; - The certificate used to sign the AIR application. All AIR applications must be signed to be built, even if not by a recognised body such as VeriSign.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;script/AIRAliases.js&lt;/b&gt; - JavaScript file containing code used by the AIR runtime. Referencing this file provides convenient aliases for use in  your code. Included with AIR SDK.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;script/prototype.js&lt;/b&gt; - JavaScript file containing code for the Prototype framework. I used the cross-browser &lt;code&gt;new Ajax.request&lt;/code&gt; provided by Prototype in my application.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;script/DiggAPI.js&lt;/b&gt; - JavaScript file containing my code used by the application.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;style/DiggAPI.css&lt;/b&gt; - Style sheet used to format my links and text colours, etc in my application.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;style/digg.png&lt;/b&gt; - Digg guy logo image used in my application.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;Check back soon for included AIR package and source code. Happy coding. :)&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://digg.com/submit?phase=2&amp;url=http://nettingdotnet.blogspot.com/2007/10/digg-api-on-air.html&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/5414850044456289250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/5414850044456289250' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/5414850044456289250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/5414850044456289250'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/digg-api-on-air.html' title='Digg API on AIR'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-3469012830369707275</id><published>2007-10-09T20:39:00.001+01:00</published><updated>2007-11-15T21:21:59.891+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="syntax highlighter"/><title type='text'>Syntax highlighter script</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;I have been trying to write a simple script in JavaScript to highlight source code in a element such as the &lt;b&gt;code&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Here is the code:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;/*&lt;br /&gt; Syntax highlighter for source code&lt;br /&gt; Copyright (c) 2007 Samuel Saint-Pettersen&lt;br /&gt; This script is licensed under the GPL&lt;br /&gt; http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;function syntaxHighlight()&lt;br /&gt;{      &lt;br /&gt;    var element = &quot;code&quot;;    // element for source code&lt;br /&gt;    var attrib = &quot;class&quot;;    // attibute for language&lt;br /&gt;&lt;br /&gt;    // count all code elements&lt;br /&gt;    var codes = document.getElementsByTagName(element);&lt;br /&gt;&lt;br /&gt;    // get contents and class value for each code element&lt;br /&gt;    for(var a = 0; a &amp;amp;lt; codes.length; a++)&lt;br /&gt;    {&lt;br /&gt;        var code = codes[a];&lt;br /&gt;        var contents = code.innerHTML;&lt;br /&gt;        var language = code.className;&lt;br /&gt;&lt;br /&gt;        if(language == &quot;boo&quot;)&lt;br /&gt;        {&lt;br /&gt;            // define first keywords&lt;br /&gt;            var keyw1 = new Array();&lt;br /&gt;            keyw1[0] = &quot;def&quot;;&lt;br /&gt;            keyw1[1] = &quot;print&quot;;&lt;br /&gt;            keyw1[2] = &quot;if&quot;;&lt;br /&gt;&lt;br /&gt;            // colour first keywords&lt;br /&gt;            for(var b = 0; b &amp;amp;lt; keyw1.length; b++)&lt;br /&gt;            {&lt;br /&gt;                var regex = new RegExp(keyw1[i], &quot;ig&quot;);&lt;br /&gt;                var matched = contents.match(regex);&lt;br /&gt;                var keyword = matched.toString();&lt;br /&gt;                var repl = keyword.fontcolor(&quot;blue&quot;);&lt;br /&gt;                codes[i].innerHTML = contents.replace(regex, repl);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Problem I have with this code is that after the first keyword is coloured, the loop does not seem to continue. Hmmm... If anyone knows what I&#39;m doing wrong, please leave a comment. Thanks.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://digg.com/submit?phase=2&amp;url=http://nettingdotnet.blogspot.com/2007/10/syntax-highlighter-script.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/3469012830369707275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/3469012830369707275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/3469012830369707275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/3469012830369707275'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/syntax-highlighter-script.html' title='Syntax highlighter script'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-456770216615276281</id><published>2007-10-08T20:47:00.001+01:00</published><updated>2008-12-09T01:24:04.609+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="diggs"/><category scheme="http://www.blogger.com/atom/ns#" term="offtopic"/><category scheme="http://www.blogger.com/atom/ns#" term="origami"/><category scheme="http://www.blogger.com/atom/ns#" term="popular culture"/><category scheme="http://www.blogger.com/atom/ns#" term="yoda"/><title type='text'>Yoda Origami: Destroy the scissors, we must.</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;img border=&#39;0&#39; align=&#39;right&#39; id=&#39;BLOGGER_PHOTO_ID_5119053556264604402&#39; alt=&#39;yoda in origami&#39; src=&#39;http://1.bp.blogspot.com/_64_mcI1RQiA/RwqIFmdaEvI/AAAAAAAAACE/gOQPz9THcyo/s320/yodaorigami.png&#39;/&gt;&lt;br/&gt; &lt;a href=&quot;http://www.geekstir.com/yodaorigami.html&quot; target=&quot;_blank&quot;&gt;This is one of the most interesting things I&#39;ve found on Digg&lt;/a&gt;. Check it out. Yes, I know it isn&#39;t programming related. But I am working on a coding project and I will be sure to post about it here shortly.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://digg.com/offbeat_news/Yoda_Origami_Destroy_the_scissors_we_must_PIC&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/456770216615276281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/456770216615276281' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/456770216615276281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/456770216615276281'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/yoda-origami-destroy-scissors-we-must_08.html' title='Yoda Origami: Destroy the scissors, we must.'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_64_mcI1RQiA/RwqIFmdaEvI/AAAAAAAAACE/gOQPz9THcyo/s72-c/yodaorigami.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-623495619997230871</id><published>2007-10-07T18:33:00.001+01:00</published><updated>2007-12-05T13:00:55.546+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="humour"/><category scheme="http://www.blogger.com/atom/ns#" term="offtopic"/><category scheme="http://www.blogger.com/atom/ns#" term="phait"/><category scheme="http://www.blogger.com/atom/ns#" term="webcomic"/><title type='text'>Fnordography, a 3D Realmer web comic</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;img alt=&quot;fnordography by phait&quot; src=&#39;http://img214.imageshack.us/img214/2669/phaitfnodographymi3.png&#39;/&gt; Okay. Not a programming related post tonight.&lt;br/&gt;But if you are a &lt;a target=&quot;_blank&quot; href=&quot;http://forums.3drealms.com/vb&quot;&gt;3D Realms forum&lt;/a&gt; user (as I am - Samji);&lt;br/&gt;you might want to check out this web comic being produced by my pal Justin Self or as he is better known on the Realms, Phait.&lt;br/&gt;&lt;br/&gt;The comics are a lighthearted  jab at some of the users we&lt;br/&gt;   have over there. Phait describes it as such himself...&lt;br/&gt;   &lt;br/&gt;&lt;blockquote&gt;   Rather than having to think up my own characters and backgrounds, I thought the online personas of several members&lt;br/&gt;   themselves each exuded a type of character that was ripe for parody or playful exploitation - not excluding myself &lt;br/&gt;   (Phait). As this strip is mostly intended for the community, some of it&#39;s attempted humor might only be effective &lt;br/&gt;   for the members themselves. Though, I have tried to keep it fair to members and non-members alike.&lt;br/&gt;   &lt;/blockquote&gt;&lt;br/&gt;   So don&#39;t cry at his quips :).&lt;br/&gt;   Unless he starts putting you in situations involving &#39;net shock memes you would rather not be part of. Goatse or Tubgirl, anyone?&lt;br/&gt;   &lt;br/&gt;   Anyway, &lt;a target=&#39;_blank&#39; href=&#39;http://fnordography.isgreat.org&#39;&gt;be sure to check out Fnordography!&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://digg.com/submit?phase=2&amp;url=http://nettingdotnet.blogspot.com/2007/10/fnordography-3d-realmer-webcomic.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/623495619997230871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/623495619997230871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/623495619997230871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/623495619997230871'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/fnordography-3d-realmer-webcomic.html' title='Fnordography, a 3D Realmer web comic'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-2985477284026962849</id><published>2007-10-02T21:43:00.001+01:00</published><updated>2008-12-09T01:24:04.746+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe air"/><category scheme="http://www.blogger.com/atom/ns#" term="cross platform"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>Adobe AIR</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;img border=&#39;0&#39; id=&#39;BLOGGER_PHOTO_ID_5116841171365794530&#39; alt=&#39;helloworld application for AIR&#39; src=&#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWQ4d5arCZimjaer9J378TATH1CLPpqiZhLwDDHnMN6_MxY88tM6Eb764pmOvvKJexEmlN9Fnsg7IRq30xJMbn_4fcgvJnvvAqKksdemAgRPk4TpZkhp1gOEhvH_CONRDjFxKFQKcyj-L_/s320/airapp.png&#39; style=&#39;margin: 0pt 10px 10px 0pt; float: left;&#39;/&gt;&lt;br/&gt;Today I decided to check out  &lt;a target=&#39;_blank&#39; href=&#39;http://labs.adobe.com/technologies/air&#39;&gt;Adobe AIR&lt;/a&gt;.&lt;br/&gt;AIR (Adobe Integrated Runtime) is a runtime platform / environment which allows the creation of desktop applications which use existing web technologies such as &lt;a target=&#39;_blank&#39; href=&#39;http://en.wikipedia.org/wiki/HTML&#39;&gt;HTML&lt;/a&gt; and &lt;a target=&#39;_blank&#39; href=&#39;http://en.wikipedia.org/wiki/AJAX&#39;&gt;AJAX&lt;/a&gt;.&lt;br/&gt;Since it is Adobe, unsurprisingly, it also has support for Flash.&lt;br/&gt;&lt;br/&gt;To develop an AIR application, all you need is the AIR SDK (which is freely available from Adobe Labs) and your exisiting development tools. E.g. your text editor for your code.&lt;br/&gt;&lt;br/&gt;Following the  &lt;a target=&#39;_blank&#39; href=&#39;http://livedocs.adobe.com/labs/air/1/devappshtml/&#39;&gt;tutorial for developing for AIR with HTML and AJAX&lt;/a&gt;, I coded the customary Hello World application.&lt;br/&gt;&lt;br/&gt;The tutorial, you follow for its output is complicated. But I think this is due to the demonstration of how a more complex AIR application should be coded. E.g. You use an XmlHttpRequest to display the message to the user.&lt;br/&gt;&lt;br/&gt;Development of the AIR application was quite straightforward, so maybe I&#39;ll develop something which uses the Digg or YouTube APIs in it.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://digg.com/submit?phase=2&amp;url=http://nettingdotnet.blogspot.com/2007/10/adobe-air.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/2985477284026962849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/2985477284026962849' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2985477284026962849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2985477284026962849'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/adobe-air.html' title='Adobe AIR'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWQ4d5arCZimjaer9J378TATH1CLPpqiZhLwDDHnMN6_MxY88tM6Eb764pmOvvKJexEmlN9Fnsg7IRq30xJMbn_4fcgvJnvvAqKksdemAgRPk4TpZkhp1gOEhvH_CONRDjFxKFQKcyj-L_/s72-c/airapp.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-2166291021024552927</id><published>2007-10-02T21:15:00.001+01:00</published><updated>2007-10-29T21:23:39.212+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="digg api"/><category scheme="http://www.blogger.com/atom/ns#" term="greasemonkey"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Digg API and Greasemonkey</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;br /&gt;I wrote this straightforward &lt;a href=&#39;http://www.greasespot.net&#39; target=&#39;_blank&#39;&gt; Greasemonkey&lt;/a&gt; user script in JavaScript using Greasemonkey&#39;s implementation of an XmlHttpRequest:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;// Digg API script&lt;br /&gt;// version 1.0&lt;br /&gt;// Copyright (c) 2007 Samuel Saint-Pettersen&lt;br /&gt;// Released under the GPL licence&lt;br /&gt;// http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;// ---------------------------------------------------------------------&lt;br /&gt;// This is a Greasemonkey user script.&lt;br /&gt;// To install it, you need Greasemonkey:&lt;br /&gt;// http://greasemonkey.mozdev.org&lt;br /&gt;// ---------------------------------------------------------------------&lt;br /&gt;// ==UserScript==&lt;br /&gt;// @name Digg API script&lt;br /&gt;// @version 1.0&lt;br /&gt;// @author Samuel Saint-Pettersen&lt;br /&gt;// @description Utilise the Digg API&lt;br /&gt;// @include *&lt;br /&gt;// ==/UserScript==&lt;br /&gt;(function() {&lt;br /&gt;    GM_xmlhttpRequest({&lt;br /&gt;    method: &#39;GET&#39;,&lt;br /&gt;    url: &quot;http://services.digg.com/stories/topic/gadgets?count=1&amp;amp;&lt;br /&gt;    appkey=http://apidoc.digg.com&amp;amp;type=xml&quot;,&lt;br /&gt;&lt;br /&gt;    onload: function(responseDetails) {&lt;br /&gt;    var response = responseDetails.status;&lt;br /&gt;    var returned = responseDetails.responseText;&lt;br /&gt;    if(response != &quot;200&quot;)&lt;br /&gt;    {&lt;br /&gt;        // if the request fails, display error message&lt;br /&gt;        alert(&quot;Error retrieving Digg Data&quot;);&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        // display Digg data in message box&lt;br /&gt;        alert(returned);&lt;br /&gt;    }&lt;br /&gt;  }});&lt;br /&gt;})();&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;The Greasemonkey script request returned fine.&lt;br /&gt;I wonder what it is with my .NET application which meant it didn&#39;t work?&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://digg.com/submit?phase=2&amp;url=http://nettingdotnet.blogspot.com/2007/10/digg-api-and-greasemonkey_02.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/2166291021024552927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/2166291021024552927' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2166291021024552927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/2166291021024552927'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/digg-api-and-greasemonkey_02.html' title='Digg API and Greasemonkey'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2225054266370213079.post-7392025562816431898</id><published>2007-10-01T22:37:00.001+01:00</published><updated>2007-10-29T16:50:03.824+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="boo"/><category scheme="http://www.blogger.com/atom/ns#" term="digg api"/><title type='text'>Digg API and .NET</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;br /&gt;I have being trying to develop a simple console application, which utilises &lt;a target=&#39;_blank&#39; href=&#39;http://apidoc.digg.com&#39;&gt;Digg API&lt;/a&gt; in the Boo programming language.&lt;br /&gt;&lt;br /&gt;This is the source code I have for my application:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;/*&lt;br /&gt;     Simple application to access the Digg API&lt;br /&gt;     Version: 1.0&lt;br /&gt;     Language: Boo&lt;br /&gt;     Environment: SharpDevelop&lt;br /&gt;     Author: Samuel Saint-Pettersen&lt;br /&gt;     ---------------------------------------------------------------------&lt;br /&gt;     Prerequisites:&lt;br /&gt;      * Boo libraries (included with)&lt;br /&gt;      * Microsoft .NET 2.0 Framework&lt;br /&gt;     ---------------------------------------------------------------------&lt;br /&gt;*/&lt;br /&gt;namespace DiggAPI&lt;br /&gt;&lt;br /&gt;import System&lt;br /&gt;import System.Collections&lt;br /&gt;import System.IO&lt;br /&gt;import System.Net&lt;br /&gt;import System.Text&lt;br /&gt;import System.Xml&lt;br /&gt;import System.Web&lt;br /&gt;&lt;br /&gt;print &quot;Digg API application\n&quot;&lt;br /&gt;&lt;br /&gt;// base request url &lt;br /&gt;burl = &quot;http://services.digg.com/stories/topic/gadgets?count=3&amp;amp;appkey=&quot;&lt;br /&gt;&lt;br /&gt;// encode appkey &lt;br /&gt;appkey = HttpUtility.UrlEncode(&quot;http://apidoc.digg.com&quot;)&lt;br /&gt;&lt;br /&gt;// full request url&lt;br /&gt;address = burl + appkey + &quot;&amp;amp;type=xml&quot;&lt;br /&gt;&lt;br /&gt;// create request&lt;br /&gt;request = cast(HttpWebRequest, WebRequest.Create(address))&lt;br /&gt;&lt;br /&gt;// method&lt;br /&gt;request.Method = &quot;GET&quot;&lt;br /&gt;&lt;br /&gt;// get reponse&lt;br /&gt;response = cast(HttpWebResponse, request.GetResponse())&lt;br /&gt;&lt;br /&gt;// get response stream into reader&lt;br /&gt;reader = StreamReader(response.GetResponseStream(), Encoding.UTF8)&lt;br /&gt;&lt;br /&gt;// print response &lt;br /&gt;print reader.ReadToEnd()&lt;br /&gt;print &quot;\n&quot;&lt;br /&gt;&lt;br /&gt;// clean up&lt;br /&gt;reader.Close()&lt;br /&gt;&lt;br /&gt;// wait for key press&lt;br /&gt;print &quot;Press any key to continue...\n&quot;&lt;br /&gt;Console.ReadKey(true)&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For some reason, when I run this application I always get a Forbidden (403) error returned.&lt;br /&gt;&lt;br /&gt;Weird? I&#39;m sure I&#39;ve got the the request URL correct. I get this error whether or not I encoded the appkey.&lt;br /&gt;&lt;br /&gt;I&#39;m sure this is some sort of odd behaviour on .NET&#39;s part, so I decided to try using the Digg API with something else.&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;If you know what the the problem is with the .NET application, please leave me a comment or e-mail &lt;span class=&quot;email&quot;&gt;s dot stpettersen at yahoo dot com&lt;/span&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;EDIT 10/03/2007:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://blogs.homelinux.org&quot; target=&quot;_blank&quot;&gt;Timothy Parez&lt;/a&gt; helped me out. The solution was to specify the&lt;br /&gt;UserAgent. So I used:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;request.UserAgent = appkey;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I used my encoded appkey for the the user agent string. However, in&lt;br /&gt;the Digg API&#39;s current state it does not seem to matter whether or not&lt;br /&gt;the appkey is encoded. But I might as well encode it in case they&lt;br /&gt;change this.&lt;br /&gt;&lt;br /&gt;Thanks, Timothy.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://digg.com/submit?phase=2&amp;url=http://nettingdotnet.blogspot.com/2007/10/digg-api-and-net_9166.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img505.imageshack.us/img505/4648/100x20diggbuttonhb9.png&quot; alt=&quot;Digg This Story&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nettingdotnet.blogspot.com/feeds/7392025562816431898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2225054266370213079/7392025562816431898' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/7392025562816431898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2225054266370213079/posts/default/7392025562816431898'/><link rel='alternate' type='text/html' href='http://nettingdotnet.blogspot.com/2007/10/digg-api-and-net_9166.html' title='Digg API and .NET'/><author><name>Sam Saint-Pettersen</name><uri>http://www.blogger.com/profile/05537652378351583613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>