<?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:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-22580833</id><updated>2009-11-08T01:38:20.405-08:00</updated><title type='text'>Laziness, impatience and hubris</title><subtitle type='html'>Laziness, impatience and hubris.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-22580833.post-4371816920318957578</id><published>2008-10-18T00:55:00.000-07:00</published><updated>2008-10-18T00:57:54.236-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code comment'/><category scheme='http://www.blogger.com/atom/ns#' term='tds'/><category scheme='http://www.blogger.com/atom/ns#' term='freetds'/><category scheme='http://www.blogger.com/atom/ns#' term='sybase'/><category scheme='http://www.blogger.com/atom/ns#' term='code rant'/><title type='text'>Righteous rant</title><content type='html'>&lt;pre&gt;
/*
&lt;rant&gt; Sybase does an awful job of this stuff, non null ints of size 1 2
and 4 have there own codes but nullable ints are lumped into INTN
sheesh! &lt;/rant&gt;
*/
&lt;/pre&gt;

- From comments in tds.h from &lt;a href=http://www.freetds.org&gt;FreeTDS&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-4371816920318957578?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='related' href='http://www.hackerz.ir/tools/SQL%20Injection/sqlat-src-1.0.0.tar/sqlat/include/tds.h' title='Righteous rant'/><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/4371816920318957578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=4371816920318957578' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/4371816920318957578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/4371816920318957578'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2008/10/righteous-rant.html' title='Righteous rant'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-4504286406889154842</id><published>2007-03-30T18:34:00.000-07:00</published><updated>2007-03-30T18:36:40.195-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='translator'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='grammar'/><category scheme='http://www.blogger.com/atom/ns#' term='converter'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='javacc'/><category scheme='http://www.blogger.com/atom/ns#' term='visitor'/><title type='text'>Java-to-Python converter</title><content type='html'>"Anything that can be done, could be done 'meta'" 
(&lt;a href=http://www.technologyreview.com/Infotech/17969/page3/&gt;&amp;copy; Charles Simonyi&lt;/a&gt;) is right up there with
"Laziness, impatience and hubris" (&lt;a href=http://xahlee.org/UnixResource_dir/writ/perl_laziness.html&gt;&amp;copy; Larry Wall&lt;/a&gt;) as pithy
description of my development philosophy. Also, unfortunately, there's
another one: "Once it's clear how to proceed, why bother to proceed" (or
something like that). 
So, with that in mind...
&lt;p/&gt;
I wanted a Python client library for GData (thankfully, they
&lt;a href=http://googledataapis.blogspot.com/2007/03/snakes-on-gdata-announcing-python.html&gt;released 
 one last week&lt;/a&gt;, so this is moot -- good!), so I thought of
automagically converting &lt;a href=http://code.google.com/p/gdata-java-client/&gt;the Java library&lt;/a&gt; to Python.
I tried &lt;A href=http://code.google.com/p/java2python/&gt;Java2Python&lt;/a&gt;,
but it's based on ANTLR grammar for Java 1.4, and
the library, of course, is in Java 5. As I was relearning ANTLR and writing all these
actions by hand (the pain!), I took a break and found
&lt;a href=https://javacc.dev.java.net/servlets/ProjectDocumentView?documentID=44514&amp;showInfo=true&gt;Java 1.5 parser with AST generation and visitor suport&lt;/a&gt; by Julio Gesser (&lt;a href=http://www.1tvrus.com/uploads/img7_gesser.jpg&gt;no relation&lt;/a&gt;,
&lt;a href=http://en.wikipedia.org/wiki/David_Livingstone&gt;I presume&lt;/a&gt;?) and Sreenivasa Viswanadha, based on JavaCC. Aha! Much easier... But then, of course, Google releases the Python version of the library
I needed in the first place, so I don't bother wrapping this project up... Here it
is for whoever wants it: &lt;a href=http://code.google.com/p/j2p/&gt;http://code.google.com/p/j2p/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-4504286406889154842?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/4504286406889154842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=4504286406889154842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/4504286406889154842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/4504286406889154842'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2007/03/java-to-python-converter.html' title='Java-to-Python converter'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-7004737922106928687</id><published>2007-03-19T01:09:00.000-07:00</published><updated>2007-03-19T01:12:46.182-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='continous integration'/><category scheme='http://www.blogger.com/atom/ns#' term='pyanttasks'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='code coverage'/><title type='text'>py-cover task is now in the main pyAntTasks project</title><content type='html'>The &lt;a href=http://debedb.blogspot.com/2007/01/continuous-integration-with-code.html&gt;&lt;code&gt;py-cover&lt;/code&gt;&lt;/a&gt; task is now &lt;a href=http://topico.com/roller/ron/entry/3&gt;integrated&lt;/a&gt; into the
&lt;a href=http://code.google.com/p/pyanttasks/&gt;project tree&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-7004737922106928687?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/7004737922106928687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=7004737922106928687' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7004737922106928687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7004737922106928687'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2007/03/py-cover-task-is-now-in-main-pyanttasks.html' title='py-cover task is now in the main pyAntTasks project'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-7718904936428177305</id><published>2007-02-27T09:31:00.000-08:00</published><updated>2007-03-29T10:40:02.412-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='cdt'/><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='reverse engineering'/><category scheme='http://www.blogger.com/atom/ns#' term='gdb'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Poor Man's Tracepoints and a call sequence of a C program</title><content type='html'>My C is quite rusty, so to help me figure out the flow of a program,
I thought I'd do with &lt;code&gt;gdb&lt;/code&gt; what 
&lt;a href=http://java.sys-con.com/read/36221.htm&gt;Tony Loton did with
JPDA&lt;/a&gt;. Quickly giving myself a refresher on &lt;code&gt;gdb&lt;/code&gt;, 
I thought &lt;a href=http://developer.apple.com/documentation/DeveloperTools/gdb/gdb/gdb_11.html&gt;tracepoints&lt;/a&gt;
are the easiest way to go. Except that they are available only for
remote targets, and
&lt;p/&gt;
&lt;ol&gt;
&lt;li&gt;There's &lt;a href=http://sourceware.org/ml/gdb/2003-04/msg00112.html&gt;no &lt;code&gt;gdbserver&lt;/code&gt; on my host platform (Cygwin)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The target platform &lt;a href=http://forum.openwrt.org/viewtopic.php?pid=29712&gt;does have it&lt;/a&gt; (good news!), but it doesn't support tracepoints (and 
some say, that &lt;a href=http://linux.web.cern.ch/linux/scientific4/docs/rhel-gdb-en-4/tracepoints.html&gt;few
if any stubs even support it&lt;/a&gt;... 
&lt;/ol&gt;
&lt;p/&gt;
So I wrote a &lt;a href=http://snippets.dzone.com/posts/show/3593&gt;silly Perl script&lt;/a&gt; to read &lt;code&gt;ctags&lt;/code&gt; information,
create breakpoints on every function entry, print the arguments and
resume. I haven't bothered to figure out where to use &lt;a href=http://sourceware.org/gdb/current/onlinedocs/gdb_25.html#SEC241&gt;pure MI&lt;/a&gt;
vs. CLI commands, and in general I have no clue...
&lt;p/&gt;
Now, what I think would be interesting is making this an add-on, 
using &lt;a href=http://www.eclipse.org/cdt/&gt;CDT&lt;/a&gt; (or,
&lt;a href=http://db-db.sourceforge.net/aup.html#_Toc143714931&gt;more generically&lt;/a&gt;, via &lt;a href=http://www.eclipse.org/articles/Article-Debugger/how-to.html&gt;Eclipse Debug
Framework&lt;/a&gt;) and &lt;a href=http://www.eclipse.org/gef/&gt;GEF&lt;/a&gt;... I envision
something like a call graph (with exclusions of course, because it will become
too big), which grows as you step through, displaying arguments. Could be a
quick way to get a picture of how a program works before just reading the
code and keeping stuff in your head...
&lt;hr/&gt;
In related news, upgrading to Eclipse 3.2.2 I lost the "Remote debugging"
launch configuration. (Ironically, the reason for the attempted upgrade was to
see whether &lt;a href=https://bugs.eclipse.org/bugs/show_bug.cgi?id=158784&gt;a bug with hardcoded remote port&lt;/a&gt; has been fixed (it appeared that it's always 4305, no matter what you put in; while the default one is 1234, which is 
&lt;A href=http://www.imdb.com/title/tt0094012/quotes&gt;the kind of thing an idiot would have on his luggage&lt;/a&gt;.). Which brings me to the "Zero information content"
of various blogs/articles out there (which this blog is trying not to
be). Thank you, Bill Graham, for &lt;a href=http://www.atcanewsletter.com/English/Newsletters/2006/Articles/200608_Article_ExtendingEclipse.html&gt;pointing out&lt;/a&gt; that "the 'vanilla' CDT from www.eclipse.org [...] doesn't support remote target debugging", thus leading
me in my Google search to your article which doesn't tell me how to fix it, 
nor does it tell me much of anything... There, I vented. (The answer, BTW,
is to get &lt;a href=http://download.eclipse.org/dsdp/tm/updates/&gt;Target Management&lt;/a&gt;,  
who knew...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-7718904936428177305?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/7718904936428177305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=7718904936428177305' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7718904936428177305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7718904936428177305'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2007/02/poor-mans-tracepoints-and-call-sequence.html' title='Poor Man&apos;s Tracepoints and a call sequence of a C program'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-557905457283427572</id><published>2007-02-25T23:38:00.000-08:00</published><updated>2007-02-25T23:40:52.262-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='overstream'/><title type='text'>Stalin and high tech</title><content type='html'>Since &lt;a href=http://www.overstream.net&gt;Overstream embedding&lt;/a&gt; is now fixed, here...
&lt;hr/&gt;
&lt;object width="402" height="377"&gt;&lt;param name="movie" value="http://www.overstream.net/swf/player/OverstreamPlayerLoader-X.swf?BasePath=http://www.overstream.net/swf/player/&amp;oid=i9i0m3ljrbrpikirmmim&amp;noplay=1"&gt;&lt;/param&gt;&lt;embed src="http://www.overstream.net/swf/player/OverstreamPlayerLoader-X.swf?BasePath=http://www.overstream.net/swf/player/&amp;oid=i9i0m3ljrbrpikirmmim&amp;noplay=1" type="application/x-shockwave-flash" width="402" height="377"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-557905457283427572?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/557905457283427572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=557905457283427572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/557905457283427572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/557905457283427572'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2007/02/stalin-and-high-tech.html' title='Stalin and high tech'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-7925197803891154094</id><published>2007-02-13T16:22:00.000-08:00</published><updated>2007-03-19T01:08:57.958-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='continous integration'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='continuum'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><category scheme='http://www.blogger.com/atom/ns#' term='code coverage'/><title type='text'>Continuous integration with code coverage in Python</title><content type='html'>&lt;blockquote&gt;
&lt;h4&gt;Update&lt;/h4&gt;
This code has been &lt;a href="http://topico.com/roller/ron/entry/3"&gt;integrated
into the main tree&lt;/a&gt;.
&lt;/blockquote&gt;
&lt;p/&gt;
I decided it would be good to have a coverage report of our Python code,
with nice visualization like &lt;a href="http://www.cenqua.com/clover/eg/ant/report/"&gt;Clover&lt;/a&gt;.
So I took &lt;a href="http://code.google.com/p/pyanttasks/"&gt;Ron Smith's
PyAntTasks&lt;/a&gt;, and added &lt;code&gt;py-cover&lt;/code&gt; task to them. This will
run coverage for every test, and a cumulative one. In other words, you can
see what code a particular test exercises, and what code all the tests
in your tree exercise.
&lt;/p&gt;&lt;p&gt;
This also modifies &lt;code&gt;py-test&lt;/code&gt; task to include
&lt;code&gt;packagedtests&lt;/code&gt; attribute - &lt;a href="#packagedtests"&gt;see below&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
The newly added &lt;code&gt;py-cover&lt;/code&gt; task runs &lt;a name="dlcover"&gt;&lt;/a&gt;&lt;a href="http://nedbatchelder.com/code/modules/coverage.html"&gt;Ned Batchelder's coverage.py&lt;/a&gt; (download it separately), and is specified as follows in
your &lt;code&gt;build.xml&lt;/code&gt;:
&lt;/p&gt;&lt;pre&gt;
&amp;lt;py-cover
packagedtests="false"
pythonpath="${pythonpath}"
reportsDir="${reports}"
coverage="${tools}/coverage.py"&amp;gt;
 
&amp;lt;tests dir="."&amp;gt;
    &amp;lt;include name="**Test.py"&amp;gt;
      &amp;lt;/tests&amp;gt;

&amp;lt;src dir="${quickRoot}"&amp;gt;
     &amp;lt;include name="**/*.py"&amp;gt;
     &amp;lt;include name="*.py"&amp;gt;
&amp;lt;/src&amp;gt;
&amp;lt;/py-cover&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
Here, &amp;lt;tests&amp;gt; is a &lt;a href="http://ant.apache.org/manual/CoreTypes/fileset.html"&gt;FileSet&lt;/a&gt; specifying tests to run, &amp;lt;src;&amp;gt; is a &lt;code&gt;FileSet&lt;/code&gt; specifying source code to cover.
The attributes are:&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt; &lt;code&gt;reportsDir&lt;/code&gt; - where the coverage reports go
&lt;p&gt;
&lt;/p&gt;&lt;/li&gt;&lt;li&gt; &lt;a name="packagedtests"&gt;&lt;code&gt;packagedtests&lt;/code&gt;&lt;/a&gt;
- this idiosyncrasy is prompted by our
tree setup. If this attribute is &lt;code&gt;true&lt;/code&gt; it means that
the test files reside in Python packages, &lt;code&gt;false&lt;/code&gt; otherwise.
(In our case, they do not; they are in the tree but are not packages. Note
that the original &lt;code&gt;py-test&lt;/code&gt; task assumed they are in packages,
I ahve changed this too).
&lt;p&gt;
&lt;/p&gt;&lt;/li&gt;&lt;li&gt; &lt;code&gt;coverage&lt;/code&gt; - path to &lt;code&gt;coverage.py&lt;/code&gt; on your system (which you &lt;a href="http://www2.blogger.com/post-edit.g?blogID=22580833&amp;amp;postID=7925197803891154094#dlcover"&gt;downloaded&lt;/a&gt; separately, right?)
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;
P.S. I know about the
&lt;a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/491274"&gt;colorize.py&lt;/a&gt; thingie, but I rolled my own (uglier, of course) for this one.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-7925197803891154094?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/7925197803891154094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=7925197803891154094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7925197803891154094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7925197803891154094'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2007/01/continuous-integration-with-code.html' title='Continuous integration with code coverage in Python'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-4189682150440156153</id><published>2007-02-12T19:01:00.001-08:00</published><updated>2007-02-12T19:26:23.327-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='xmlrpc'/><category scheme='http://www.blogger.com/atom/ns#' term='actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='contrib'/><title type='text'>XmlRpc for AS 3.0 HOWTO</title><content type='html'>Since people ask (in emails, at the short-lived &lt;a href=http://www.hrum.org/people/debedb/pro/blog/2006/12/xmlrpc_in_flex_2actionscript_3_1.html#comments&gt;MT version
of this blog&lt;/a&gt; and on &lt;A href=http://tech.groups.yahoo.com/group/flexcoders/message/64609&gt;flexcoders@yahoo&lt;/a&gt;), here is how
I use it. (DISCLAIMER: as &lt;A href=http://tech.groups.yahoo.com/group/flexcoders/message/58427&gt;I've mentioned&lt;/a&gt;, I hacked this from
the &lt;A href=http://xmlrpcflash.mattism.com/&gt;original&lt;/a&gt; when I was just starting with Flex 2,
so I gutted some code before I knew what the hell I was doing, 
but in this state it works for me...)
&lt;p/&gt;
I use Flex Builder. I have the contents of the &lt;a href=http://www.hrum.org/people/debedb/pro/ref/#xmlrpc&gt;zip file&lt;/a&gt; right in my
Flex Builder project. (NOTE: This was before I read that &lt;code&gt;flex&lt;/code&gt; should
not be a part of a package name per Adobe's license; change it, willya?)
&lt;p/&gt;
Then I choose have a simple facade like so:
&lt;pre&gt;
package com.qbf.flex.ct {
  // Insert correct imports here, of course...

  public class Utils {
    public static function serverCall(method:String, 
                                          params:Array,    
                                          handler:Function): void {
        SERVER_CALL.call(method, 
                         params, 
                         handler, 
                         DisplayObject(Application.application));
    }

    public static const SERVER_CALL:XmlRpcService = 
   new XmlRpcService("http://localhost:8081/", 
                        Application.application.url.indexOf("http://") == 0? null :
   null :
   // This is explained further below... 
   QbfFakeResponse.SINGLETON); 
}
&lt;/pre&gt;
&lt;p/&gt;
And from everywhere else in the code I use &lt;Code&gt;Utils.serverCall()&lt;/code&gt; as
follows:
&lt;p/&gt;
&lt;pre&gt;
var params:Array = [{value : resdefDataToServer, type: "struct"}, 
uri, server];
Utils.serverCall("doStuff", params,
        // This callback will be executed when the server 
        // call returns
 function(result:Object):void {
           process(result);
        });
&lt;/pre&gt;
&lt;p/&gt;
Notice that you only need to specify types for parameters if it's
not a string. If all your parameters are string, you can just
pass an array of their values to the &lt;code&gt;serverCall()&lt;/code&gt; -- 
a little sugar...
&lt;p/&gt;
Now about this &lt;code&gt;QbfFakeResponse.SINGLETON&lt;/code&gt; business (it's not
necessary, just use &lt;code&gt;null&lt;/code&gt; in its place if you don't
need it). The definition of 
&lt;code&gt;SERVER_CALL&lt;/code&gt; checks whether the application URL starts with
&lt;code&gt;http://&lt;/code&gt; -- in my case, it means that it's running "for real". If it is
running in Flex Builder's debugger, the URL will start with &lt;code&gt;file://&lt;/code&gt;,
and so I will use "fake" responses to simulate server calls (this is sometimes
useful for debugging, so that I don't have to run a server). This fake
response class is an implementation of &lt;code&gt;com.qbf.flex.util.xmlrpc.FakeResponse&lt;/code&gt; interface. All you need
to do is implement &lt;code&gt;getResponse()&lt;/code&gt; method and return
whatever you need by checking the method name and parameters provided.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-4189682150440156153?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='related' href='http://www.hrum.org/people/debedb/pro/blog/2006/12/xmlrpc_in_flex_2actionscript_3.html' title='XmlRpc for AS 3.0 HOWTO'/><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/4189682150440156153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=4189682150440156153' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/4189682150440156153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/4189682150440156153'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2007/02/xmlrpc-for-as-30-howto.html' title='XmlRpc for AS 3.0 HOWTO'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-7777212035262535199</id><published>2007-01-11T20:51:00.000-08:00</published><updated>2007-01-11T22:58:03.067-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>The King, the Jedi and the Prodigal Son walk into a bar...</title><content type='html'>So, earlier I tried to switch to Blogger &lt;a href="http://debedb.blogspot.com/2006/11/dbdb-jpda-based-single-stack-debugger.html"&gt;briefly&lt;/a&gt;, because my &lt;a href="http://fish37.livejournal.com"&gt;LiveJournal&lt;/a&gt; was &lt;a href=http://www.javablogs.com/ViewBlog.action?id=13675&gt;messing up javablogs feeds&lt;/a&gt;
(and I wanted something &lt;a href=http://gevkaffeegal.typepad.com/the_alliance/2005/12/bloggers_trackb.html&gt;trackback-like&lt;/a&gt;).
But then I missed this tag/label/category functionality thingie, so I had a
&lt;a href="http://www.hrum.org/people/debedb/pro/blog/"&gt;brief affair with Movable Type&lt;/a&gt;, but then, voila -- &lt;a href="http://buzz.blogger.com/2006/12/new-version-of-blogger.html"&gt;The New Version of Blogger&lt;/a&gt;. Good, I don't have to host the stupid thing then...
&lt;hr/&gt;
&lt;a href="http://www.osgi.org/blog/2006/01/eclipse-corona-project-distributed.html"&gt;Peter Kriens&lt;/a&gt; has been
working too much: "Today an interesting project proposal drew my attention: &lt;a href="http://www.eclipse.org/proposals/corona/"&gt;Corona&lt;/a&gt;.
Ok, the name is a bad start. The Apache model of names without a cause is becoming a trend."
Eh? I was with you until the last sentence -- but it's not an Apache model of names without a cause, it's a model of -- aw, geez, there must
be a pithier term for it -- names for things associated with main product that are in some ways puns on the original name (JavaBeans, Jakarta, etc.)
Get it? Sun - Eclipse, Eclipse - &lt;a href="http://en.wikipedia.org/wiki/Corona"&gt;Corona&lt;/a&gt;? (Things will really get out of hand --
&lt;a href="http://debedb.livejournal.com/94824.html"&gt;with horses!&lt;/a&gt; -- when a Corona-associated product will be called Dos Equis).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-7777212035262535199?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/7777212035262535199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=7777212035262535199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7777212035262535199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/7777212035262535199'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2007/01/king-jedi-and-prodigal-son-walk-into.html' title='The King, the Jedi and the Prodigal Son walk into a bar...'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22580833.post-116461381369254431</id><published>2006-11-26T23:23:00.000-08:00</published><updated>2007-02-28T02:13:30.908-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='dbdb'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='sourceforge'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><title type='text'>Dbdb - a JPDA-based single-stack debugger for mixed-language programming</title><content type='html'>&lt;a href="http://db-db.sourceforge.net/"&gt;Dbdb&lt;/a&gt; project is officially &lt;a href="http://sourceforge.net/people/viewjob.php?group_id=150446&amp;amp;job_id=26635"&gt;up  for adoption&lt;/a&gt;, because I have no plans for working on it (I am sick of it).

Dbdb is a proof-of-concept of a JPDA-based single-stack debugger for mixed-language programming, done as an Eclipse plugin (but doesn't have to be). It is based on Java  6 ("Mustang"). The proof-of-concept is allowing a developer to debug Java code that calls a PL/SQL stored procedure. The debugging session in Java proceeds normally, &lt;a href="http://www.imdb.com/title/tt0100519/quotes"&gt;nothing to write home about&lt;/a&gt;. When a &lt;code&gt;Statement.execute()&lt;/code&gt; (or similar) statement is executed, however, the debugger connects to the Oracle's VM and shows a combined call stack, from Java down into PL/SQL. (See &lt;a href="http://sourceforge.net/project/screenshots.php?group_id=150446"&gt;screenshot&lt;/a&gt;). The idea, of course, that it can be done with other combinations, but Java-into-Oracle-stored-proc is a very common scenario.

P.S. This is a rehash of an &lt;a href="http://fish37.livejournal.com/12328.html"&gt;older post&lt;/a&gt;. I am trying to see what Blogger is like vs. LJ (for instance, LJ &lt;a href="http://www.javablogs.com/ViewBlog.action?id=13675"&gt;breaks javablogs feeds&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22580833-116461381369254431?l=debedb.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debedb.blogspot.com/feeds/116461381369254431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22580833&amp;postID=116461381369254431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/116461381369254431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22580833/posts/default/116461381369254431'/><link rel='alternate' type='text/html' href='http://debedb.blogspot.com/2006/11/dbdb-jpda-based-single-stack-debugger.html' title='Dbdb - a JPDA-based single-stack debugger for mixed-language programming'/><author><name>debedb</name><uri>http://www.blogger.com/profile/11648278914960392938</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04289076030561313401'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>