<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>theorbtwo</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/theorbtwo/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/theorbtwo/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/theorbtwo//932</id>
    <updated>2013-03-23T21:23:29Z</updated>
    <subtitle>Adventures in eclectic geekery.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>Project notes: Prius hacking.</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/theorbtwo/2013/03/project-notes-prius-hacking.html" />
    <id>tag:blogs.perl.org,2013:/users/theorbtwo//932.4459</id>

    <published>2013-03-23T13:34:28Z</published>
    <updated>2013-03-23T21:23:29Z</updated>

    <summary>1: Reversing camera switch. - That is, a switch to lie to the display unit, telling it we are reversing, so the reversing camera displays without the car actually moving backward. 1.1: Disassemble dash to be able to get at...</summary>
    <author>
        <name>theorbtwo</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/theorbtwo/">
        <![CDATA[<p>1: Reversing camera switch.
  - That is, a switch to lie to the display unit, telling it we are reversing, so the reversing camera displays without the car actually moving backward.</p>

<p>1.1: Disassemble dash to be able to get at the display unit&#8217;s wiring.  DONE.</p>

<p>1.2: Put a connector inline to the existing wiring.  Should hold wires securely, have no visible changes to the car when external things aren&#8217;t connected.</p>

<p>1.2.1: Decide upon, and buy connector: DONE.  Have gone with a Molex Mini-Fit Jr, 20-pin.  This is the same connector as ATX power supplies (without the extra 4-pin connector), so are reasonably easy to find in general-commercial-availablity.</p>

<p>1.2.2: Figure out how to connect the connector, in the car, without major disasembly, or melting bits of the car.</p>

<p>1.2.3: Do so, at least for 12 V (accessory or always-on?) and REV.  Other lines can come later.</p>

<p>1.3: Measure current on both those lines.  12 V will be reasonably large, rev should be quite small.</p>

<p>1.4: Make the &#8220;new part&#8221; for the reversing switch.  20-pin connector male, 12v line goes straight through and to one of the inputs of DPST switch.  Other input of the switch is REV line from car.  Output is REV line to display.  Female ATX connector.</p>

<p>1.5: Insert in, hope it worked!</p>

<p>2: Likewise for the input from the display to the reversing camera.  Switch signal line from camera with composite video line from the Pi.  Should &#8220;ground&#8221; lines also be switched, or should they be connected?  Do I need to worry about the switch adding interference, or otherwise mucking up the signal?</p>

<p>3: Replace the switches with transistors connected to the pi&#8217;s GPIO lines, so it can &#8220;break in&#8217; to the display under it&#8217;s own control.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>post-yapc</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/theorbtwo/2012/08/post-yapc.html" />
    <id>tag:blogs.perl.org,2012:/users/theorbtwo//932.3732</id>

    <published>2012-08-24T11:19:51Z</published>
    <updated>2012-08-26T01:42:17Z</updated>

    <summary>So, I&#8217;m sitting in the car, while Jess is driving back to the UK (well, the chunnel &#8230; well, to Luxemberg to find cheap gas ) on the way back from the Perl reunification summit and YAPC::EU 2012, Frankfurt. I...</summary>
    <author>
        <name>theorbtwo</name>
        
    </author>
    
        <category term="android" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="java" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/theorbtwo/">
        <![CDATA[<p>So, I&#8217;m sitting in the car, while Jess is driving back to the UK (well, the chunnel &#8230; well, to Luxemberg to find cheap gas ) on the way back from the Perl reunification summit and YAPC::EU 2012, Frankfurt.  I figure this is a good time to do the blogging thing again, and give some of my throughts about Perl (the programming language), perl (the implementation of the programming language), Perl (the city^Wtown), and other such things, and possibly even my role in them in the future.</p>

<p>If Oxford is, as I like to say, a monument to a place where there used to be a city, then Frankfurt is it&#8217;s antithesis, a city which is proud of it&#8217;s past, but unafraid of it&#8217;s future.  It may not get it right all the time &#8212; there seems to be quite a bit of disagreement over construction right next to the cathedral (insert photo, with the city lives) &#8212; but it&#8217;s not prepared to rest on it&#8217;s laurels.  I see that sort of thing all over Europe, to the extent that I&#8217;ve seen all over Europe (on the first day of this trip, I was in the UK, France, Belgium, Luxembourg, and Germany &#8230; though most of those only in the car.  The thing is, in the UK, you see signs everywhere, you are now entering Fooville, mideval market town, ,<coat of arms>, twinned with&#8230;  The signs in Europe have name of the town, and a lovely drawing.  Sometimes, it&#8217;s of the old church, or villege hall, but sometimes it includes a wind turbine, or such.  They are more then their past.</p>

<p>Perl, too, the language and the implementation, needs to be more then it&#8217;s past.  It needs to look to the future, not as something that will get here eventually, but something that we can strive toward every day.  That, in a way, was the point of the perl reunification summit.  How can we make the transition smooth between perl 5 and 6?  How can we make it so that our past, our present, and our future can live together in peace, and we can keep our old along with our new?  A lot of techniques for bridging the gap were discused, and I think what will happen is that all of them will be worked on in parallel.  </p>

<p>Larry Wall is working on a perl 5 grammar for perl 6.  One of the cool things about perl 6 is that you can mutate the grammar of perl 6, in perl 6, at runtime.  As they say, all is fair if you predeclare.  So, you need to mutate the perl 6 grammar until it closely resembles the perl 5 grammar.  Then you need to figure out how the perl 5 semantics map onto the perl 6 semantics &#8212; fortunately, I think, the semantics of perl 6 are mostly a superset of those of perl 5.  For example, in perl 6, you can declare your argument list to be a list of aliases to your arguments, a copy of the list of aliases, or read-only (in which case, it doesn&#8217;t matter if  they are aliases or copies).  In perl 5, they are always aliases &#8212; so maping p5 to p6 there is easy, just pretend they were declared :rw.</p>

<p>Frew showed us a very cool thing called perlito, which allows you to compile perl 5 and perl 6 to javascript, perl 5, or perl 6.  I have very high hopes for that, though I haven&#8217;t found the time yet to look into it in any depth&#8230;</p>

<p>&#8230;because all the hack-time I&#8217;ve had recently has been going into some other things that I shall now attempt to share.</p>

<p>Recently, the skilful, evil, and batshit crazy Matt S. Trout, who I am honoured to call friend, has been hacking on something called Object::Remote.  The idea is that you can have two instances of perl, quite possibbly running as different users, on different machines, transparently create objects and use them on each-other.  The interesting thing is, there&#8217;s no real reason that both ends have to be running perl 5.  One end could be perl 6 (which Matt is now hacking on), or one end could be Java (which I am now working on).  Thus, perl becomes a glue language again, in this world where APIs are more likely to be in the form of libraries then in the form of processes, and a glue language between it&#8217;s own future and past.</p>

<p>Is perl 5 the past and perl 6 the future, anyway?  I don&#8217;t know.  I don&#8217;t think anybody else really knows either.  Perhaps they will be two alternate universes that have created a dimensional tunnel between each-other, and set up trade.  Perhaps perl 5 will become known as a great language, that gave birth to an even greater son, and became an honoured advisor to his son, once his son was ready to take up the mantle and mace of office.  Perhaps perl 5 will subsume the best bits of perl 6, and perl 6 will become known as a successful research project that never really finished.</p>

<p>I don&#8217;t know what the future will be, but I do not fear it.</p>

<p>Unfortunately, I have now come to a great last line, but still have more to say.</p>

<p>As often happens at such things, a fair number of people came up to me, and said hi, and I had no idea who they were&#8230; because they recognized me from when I was highly active on perlmonks.  I haven&#8217;t been active like that anywhere for a long time.  I shirk responsibility, and hack on great things without telling many people, and without soliciting, or responding to, feedback.  I have been afraid to try to shape the future.  I met, again, a highly interesting girl called Erin (also, Wraith, or Mordwerk).  (Again, because Jess and I interacted with her a fair bit at YAPC::NA 2011, Ashville.)  She mentioned that she hacks C, and I got her onto the private IRC channel where Matt and his friends hang out&#8230; and pointed her at <a href="http://github.com/theorbtwo/XSify">http://github.com/theorbtwo/XSify</a>, both because its always good to get more people who can go &#8220;I get this, and it&#8217;s brilliant&#8221;, and in the hopes that she can use it for something useful, package it, and take over the project from me, and that&#8217;d be a great fealing for me.  Even if she&#8217;s not willing to take it over, she&#8217;ll hopefully inspire me to get it into a better state.</p>

<p>Also, she&#8217;s interested in porting Perl to something which is apparently a modern descendent of the hoary, and dusty, old Amiga ST, from a time before time, or at least a time before the computing world was obsessed with backward compatability, and everything had to be DOS-compatable or Apple.  This fits in well, I think, with &#8230; well, we didn&#8217;t catch his name, but an Australian Opera guy who used to hack on an implementation of an OS which is mostly a reimplementation of the hory, dusty, old Amiga OS, of similar age (somewhat newer, I think &#8212; I&#8217;d check Wikipedia, but I have no network access, which is probably for the best).  That OS lacks the fork() syscall.  Jess has been working on another project along that vein &#8212; probably a more useful, if less epicly silly, project &#8212; with the monitary help of TPF.  (Thanks, Karen, Mark, and everybody working hard there.)  The Android is a modern, mostly-unix machine, which it would be nice to have perl on.  It&#8217;s not <em>that</em> difficult to compile for it, but it shouldn&#8217;t be not-that-hard, it should be <em>easy</em>.  It should be something that gets regular testing, and something that you can install as a regular application, on a regular android, without doing anything potentially dangerous, illegal, or warranty-voiding.</p>

<p>I&#8217;ve been helping Jess of late as a sort of Guru, and I think I&#8217;ve been fairly succesful in that role.
I&#8217;d like to continue my role as a guru, somebody you go to when you have a problem beyond your ken, and offers you the right vauge advice to get you past it, and hopefully, the student is enlightened, a shoulder for those who will see further to stand on&#8230; but more importantly, I&#8217;d like to become a developer again.  Somebody who makes things, says &#8220;I have made this for me, and for you, and for all of us.  This is ours now, this is a brick upon which we can build the future.&#8221;</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Introducing Java::Bridge (really, this time)</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/theorbtwo/2011/08/introducing-javabridge-really-this-time.html" />
    <id>tag:blogs.perl.org,2011:/users/theorbtwo//932.2059</id>

    <published>2011-08-07T17:11:47Z</published>
    <updated>2011-08-07T19:10:01Z</updated>

    <summary>So, a few days ago, I intended to post a paragraph of metablogging, and then get on with introducing a project. Then I was going to post a few paragraphs. Then I actually write it, decided it deserved it&#8217;s own...</summary>
    <author>
        <name>theorbtwo</name>
        
    </author>
    
        <category term="Java::Bridge" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="androidjavaperljavabridge" label="android java perl java-bridge" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/theorbtwo/">
        <![CDATA[<p>So, a few days ago, I intended to post a paragraph of metablogging, and then get on with introducing a project.  Then I was going to post a few paragraphs.  Then I actually write it, decided it deserved it&#8217;s own entry, and posted it &#8230; and decided that I deserved a break.  So here I am, a few days later&#8230;</p>

<p>Java::Bridge&#8217;s intent is to be a way to use and control any arbitrary Java API you want, from inside of Perl code, without requiring the author of Java::Bridge (IE me) to have considered your use case in advance, or having to have a Java compiler on the target system.  (Or, for that matter, a C compiler.  Preferably, at all.)</p>

<p>Why is this useful, you ask?  Well, a month or two ago, my wonderful girlfriend got a wonderful shiny new Android tablet.  Naturally, I want to hack on her new toy, like you do.  She will, however, very explicitly not allow me to root it.  And, despite Android being based on Linux, it&#8217;s APIs are not C, it&#8217;s APIs are Java.  There is hope: there is a perl implementation available, and even an Android.pm, which uses the Android Scripting Environment to allow you to be able to call Android APIs from perl-space!</p>

<p>So what&#8217;s wrong?  As I was reading the docs for the ASE, I realized that it only allows use of a very few APIs.  It had a lot of functionality <em>near</em> what I wanted, but not the specific bits I wanted.</p>

<p>So, Java::Bridge was started.  It&#8217;s not as complicated as it sounds.  Perl, of course, has a rich history of metaprogramming.  You can create an modify classes at runtime to your heart&#8217;s content, and in the last few years, things like mro, Moose, and Class::Meta have made it much easier to do it.  Java, it turns out, also has a (somewhat less nice, but not horrible) system for metaprogramming, called reflection.  It has some niggles &#8212; most annoyingly so far, the rules of getMethod do not match the rules of the Java language &#8212; but it&#8217;s not horrible, and since my focus is calling Java from Perl, the worst depredations of hackery happen on the Perl side.</p>

<p>So, it&#8217;s somewhat slow going, but <a href="http://github.com/theorbtwo/Java--Bridge/">http://github.com/theorbtwo/Java&#8212;Bridge/</a> has my code thus far.  Please, have a poke, ask me questions.</p>

<p>Surprisingly, like I said, it&#8217;s slow going &#8212; but there are very few points at which I went &#8220;oh, bleep, I don&#8217;t think this is possible&#8221;, it&#8217;s been more of &#8220;right, done, now only 10,000,000-1 things to do&#8221;.  This is much preferable.</p>

<p>The next big hurdle is going to be letting you subclass java classes from Perl code, then pass them about.  I&#8217;m afraid that&#8217;s going to be necessary for some stuff &#8212; it turns out that Java has a hack for dynamically creating a new class that implements arbitrary interfaces, but not that descend from arbitrary classes&#8230; but parts of the android API go &#8220;create a new subclass of <a href="http://developer.android.com/reference/android/app/Activity.html">android.app.Activity</a> and change these methods&#8221; and the like, which shall be &#8230; tricky.</p>

<p>Oh, and of course, it doesn&#8217;t actually run on Android yet.</p>

<p>My, it&#8217;s hard to get me going, but I do like to waffle once you do, eh?</p>

<p>So, to repeat: <a href="http://github.com/theorbtwo/Java--Bridge/">http://github.com/theorbtwo/Java&#8212;Bridge/</a> - play, extend, enjoy, tell me what I&#8217;ve got wrong, what you want to be able to do.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Introducing this blog</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/theorbtwo/2011/08/introducing-javabridge.html" />
    <id>tag:blogs.perl.org,2011:/users/theorbtwo//932.2049</id>

    <published>2011-08-04T12:23:34Z</published>
    <updated>2011-08-04T17:22:27Z</updated>

    <summary>Hello, everybody! (Hi, Doctor Nick!) This blog will, hopefully, keep you updated on my hackish projects. (Both those involving Perl and otherwise, despite the domain name. Hope you don&#8217;t mind overly much. Really, I think most of my hackish projects...</summary>
    <author>
        <name>theorbtwo</name>
        
    </author>
    
        <category term="metablog" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="metablog" label="metablog" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/theorbtwo/">
        <![CDATA[<p>Hello, everybody!  (Hi, Doctor Nick!)</p>

<p>This blog will, hopefully, keep you updated on my hackish projects.  (Both those involving Perl and otherwise, despite the domain name.  Hope you don&#8217;t mind overly much.  Really, I think most of my hackish projects will grow to include Perl at some point during their lifespan anyway.  It&#8217;s insidiously useful like that.)</p>

<p>Please, if at any point you find that I&#8217;m not updating enough, or I seem to have left behind a project that you are interested in hearing more about / seeing completed, <em>comment</em>.  One reason &#8212; possibly even the most important reason &#8212; I&#8217;m starting this is because I want to stop writing so much code that nobody ever sees or uses, and feeling like I never get anything <em>done</em>.  If I seem to have dropped a project without telling you why, call me on that, too.</p>

<p>Edit: sorry about the URL; this post was originally going to be about something completely different, which should be the subject of the next post, once I finish writing it.</p>
]]>
        

    </content>
</entry>

</feed>
