Author: C.J. Collier

  • Importing darcs into a git branch

    Maybe this will make it more google-able…

    Looks like you can export your darcs repo with darcs-fast-export and then import it with git-fast-import

    18:15 < wakko666> I have kind of an odd question that google doesn't seem to 
                      know. I'm converting a darcs repo to a git repo. i've already 
                      got the tool to export the darcs side.   however, i'd like to 
                      import the commits into a branch of an existing repository.  
                      is this possible?
    18:16 < cj> make a remote tracking branch referencing the exported darcs repo?
    18:17 < wakko666> cj: thanks for the clue. i'll try it.
    18:28 < cj> git remote add darcsthing git://moo/darcsthing.git ; git checkout 
                -b darcsthing darcsthing/master
    18:28 < cj> oh, there should probably be a git fetch darcsthing in there 
                somewhere
    18:31 < wakko666> cj: yup, that works. thanks for the help. :)
    18:31 < cj> yay.  glad I could help.
    
    
  • dlr-languages 20090805+git.e6b28d27+dfsg-1 in squeeze, -2 uploaded, nearly in lucid

    Yay! The dlr-languages package has been migrated to testing, which means that it will be included in squeeze, the next release of Debian. Jo has uploaded the -2 version and it is now in sid. This version addresses the issues brought up in the Ubuntu Feature Freeze exception (FFe) bug, so I expect that it will be accepted shortly. Still lots of “ifs”, but this is pretty exciting for me, since this is my first debian package, and I’ve been intending to get it in for over two years.

    I’m not just sitting on my hands while this happens. I’ve been working with Ivan, Ankit, Dino and Michael to get the next version of the package put together. I’m currently merging Ivan’s latest branch into the changes I’ve made for DFSG compliance. Dino recommended that the next release include IronRuby 1.0 and IronPython 2.6.1, which should be released by upstream around the middle of April.

  • I’ve disabled my user approve plugin

    Sorry for the inconvenience folks. I was annoyed by having to mark so many comments as spam, but the plugin interface was so klugy that I had no idea how to find the users who would contribute useful posts. So. Feel free to comment… Nao!

  • IronRuby continuous integration back online

    We haven’t done much work on keeping the continuous integration (CI) machines online, and there haven’t been any new builds since November of ’09. I should set Nagios to remind us when things get off track or something. The recent acceptance of the DLR into Debian and our intention to get the next release produced has inspired me (and maybe others) to get things back up.

    Ivan and I put a couple of Hudson instances up recently that you can reach via hudson-windows.colliertech.org and hudson-linux.colliertech.org. The linux instance is dropping new builds of IronRuby to http://dlrci.colliertech.org/ironruby/. I expect we can tweak the build script a bit and have it also produce IronPython builds. This would hypothetically drop the builds to http://dlrci.colliertech.org/ironpython/.

    Ivan mentioned that we may get CNAME records which would activate the windows-builds.ironruby.net and linux-builds.ironruby.net hosts as well.

    Note that these builds are being produced from the linux branch of git://github.com/casualjim/ironruby.git

    Thanks for your work on this, Ivan!

  • More DLR work

    Ivan put up a hudson server on our winders box. Ankit helped me figure out the IronRuby xbuild build problems. I should probably try it on IronPython, too. I sent the ironruby-core list a patch to fix some case sensitivity issues. Some time in the near future, I’m going to get together a bug report for the compiler and send it off to Marek. But I’m tired and Scarlet’s got a friend doing the sleep-over thing tonight.

    So. Later ;)

    P.S., can you believe that nobody registered a11y.com before now? Crazy talk.

    P.P.S., does anyone out there in gnome land have a ruby app they want to test for compatibility with IronRuby?

  • RIP Russell Alan Adams

    (Sourced from http://www.seacoastonline.com/)

    AMHERST, Mass. — Russell Alan Adams, 58, died Friday, March 12, 2010, at the Fisher Home in Amherst, after a brief illness.

    He was born Aug. 19, 1951, in Boston, the son of Norma Mary (Coggin) Adams. He was raised in Hampton, N.H., and graduated from Winnacunnet High School in 1969. After school, he moved to Boston, where he was employed as a sign painter before switching to the technology industry. He worked the last 10 years as a system architect at Mass Mutual in Springfield.

    Mr. Adams is survived by his daughter, India Adams of Boston; and his siblings, Peter Adams of North Hampton, N.H., Katharine Murta Adams of Los Angeles, Nathaniel Jonathon Adams of Hampton, and Hannah Hendren Adams-Collier of Seattle, Wash., and their families. He is also survived by his stepfather, James Richardson Adams Jr.

    He was predeceased by his son, Miles Dudley Adams, and his mother.

    WE REMEMBER: Russ enjoyed his family and friends, computer games and target shooting.

    Russ’ great sense of humor, sharp wit and intelligence will be sorely missed by his family and friends.

    SERVICES: A memorial service will be held Sunday, March 28, from 4 to 6 p.m. at the Look Park Garden House in Northampton, Mass. Burial will take place in Bridge Street Cemetery, in Northampton, Mass., and will be private and at the convenience of the family.

    In lieu of flowers, send donations to the Miles Dudley Adams Scholarship Fund for the Arts, Northampton High School, 380 Elm St., Northampton, MA 01060.

  • IronRuby on OS X

    We had a visitor on #ironruby today asking for help getting IR running on his mac. I gave him the following directions, and they seemed to work aside from one glitch. I tested them on my wife’s mac, and it worked for me, too.

    Install Mono

    You can grab the Mono .dmg from go-mono.com. This will install the framework and put the required programs (mono, xbuild) in your PATH.

    Fetch the IronRuby source

    Since Jim Deville likes macs, I’m sure more recent versions will work, but this is the one we’ve recently packaged up for Debian and tested on Ubuntu. If you want to be certain that the IronRuby code you write on Debian works on OS X, then you should probably build from the same version of the source. You should probably also install version 2.4.3 of Mono, but that may be more effort than it’s worth ;)

    http://github.com/mletterle/ironruby/tarball/20090805+git.e6b28d27

    Unpack the tarball

    Open up a terminal and unpack the thing you just downloaded:

    $ mkdir ~/src/
    $ cd ~/src/
    $ tar xfz ~/Desktop/mletterle-ironruby-e6b28d2.tar.gz
    $ cd mletterle-ironruby-e6b28d2/
    

    Build IronRuby

    At this point, you should be able to build the IronRuby assemblies using xbuild. I don’t recommend using rake, as it has some dependencies, and I’m not a fan of dependencies.

    $ xbuild /p:TreatWarningsAsErrors=false Merlin/Main/Languages/Ruby/Ruby.sln
    <snip/>
    Build succeeded.
    	 2817 Warning(s)
    	 0 Error(s)
    
    Time Elapsed 00:00:28.8378230
    

    Run the IronRuby interactive interpreter

    Our guest mentioned that he was using a terminal with a white background. Do note that the font color of the interactive interpreter (aka Read-Eval-Print Loop or REPL) is white, so if you’re using a white background, you might want to change it. IIRC, there is a way to change the font color using a configuration setting. Figuring it out is left as an exercise for the reader.

    $ mono Merlin/Main/Bin/Debug/ir.exe
    IronRuby 0.9.0.0 on 2.6.3 (tarball Wed Mar 10 18:18:12 MST 2010)
    Copyright (c) Microsoft Corporation. All rights reserved.
    
    >>> 1+2
    => 3
    >>> exit()
    

    Extra credit: IronPython

    The tarball you downloaded also included the source to IronPython. The procedure to build/run IronPython is pretty similar to IronRuby.

    Build IronPython

    Unlike IronRuby’s .sln, this version of IronPython’s .sln does not have a default configuration parameter, so we need to specify it with the /p:Configuration=Debug argument.

    $ xbuild /p:TreatWarningsAsErrors=false /p:Configuration=Debug Merlin/Main/Languages/IronPython/IronPython.sln
    <snip/>
    	 69 Warning(s)
    	 0 Error(s)
    
    Time Elapsed 00:00:38.8057450
    

    Run the IronPython interactive interpreter

    IronPython has a REPL interface like IronRuby’s. Or is it the other way around? Anyway, here’s an example.

    $ mono .//Merlin/Main/Bin/Debug/ipy.exe    
    IronPython 2.6 Beta 2 DEBUG (2.6.0.20) on .NET 2.0.50727.1433
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 1+2
    3
    >>> ^D
    
  • dlr-languages_20090805+git.e6b28d27+dfsg-1_amd64.changes ACCEPTED

    I’m happy to announce that after the filing of an Intent to Package and nearly 2 years of work, IronRuby 0.9, IronPython 2.6b2, and the DLR are now in Debian. To my knowledge, this is the first package in Debian with direct and active upstream support from Microsoft.

    Kudos for this release go to Jo Sheilds (package sponsorship & mentoring), Mirco Bauer (package sponsorship & mentoring), Matthias Klose (IronPython package review), Ivan Porto Carrero (IronRuby build/test support), Michael Letterle (IronRuby build/test support), Jim Deville (IronRuby build/test support), Jimmy Schementi (upstream point of contact @ Microsoft), Dino Viehland (IronPython build/test support), Michael Foord (IronPython build/test support), Marek Safar (mono c# compiler support), Ankit Jain (xbuild support), the folks on OFTC’s #debian-cli, Freenode’s #ironruby and GimpNet’s #mono, and the folks on the IronRuby and IronPython mailing lists.

    This is my first package in Debian, too. I’m pretty ecstatic ;)

  • Locale configuration post-Intrepid

    I was reminded this morning after a bit of chatter on #debian-cli that my previous write-up on setting one’s locale on Ubuntu is out-of-date. Instead of running dpkg-reconfigure locales and selecting your locale, the new incantation is as follows:

    Magic

    $ sudo locale-gen en_US.UTF-8
    

    Environment Variables

    You’ll also want to set some environment variables. Put something like the following in your ~/.bashrc:

    LANG=en_US.UTF-8
    LANGUAGE=en_US.UTF-8
    LC_CTYPE=en_US.UTF-8
    LC_MESSAGES=en_US.UTF-8
    LC_ALL=en_US.UTF-8
    
    export LANG LANGUAGE LC_CTYPE LC_MESSAGES LC_ALL
    

    You would of course replace en_US.UTF-8 with whichever locale you want to generate.

  • Connecting to MySQL with ODBC on Mono

    We had a visitor on #mono today who needed help with his homework. It seems that Reggie is happy to have forgotten everything about using ODBC to connect to MySQL. I was curious and feeling helpful, so I figured it out.

    Install the MySQL ODBC driver

    $ sudo apt-get install libmyodbc

    You can also grab the package directly from MySQL

    Configure the MySQL ODBC driver

    ODBC looks in /etc/odbcinst.ini for driver configuration. In order to let it know about the MySQL ODBC libraries, append the following to your /etc/odbcinst.ini file:

    [MySQL]
    Description	= MySQL driver
    Driver	= /usr/lib/odbc/libmyodbc.so
    Setup		= /usr/lib/odbc/libodbcmyS.so
    CPTimeout	=
    CPReuse	=	
    

    Configure your DSN

    If you expect that you will be using this database connection often, you may want to create a short name for it, so you don’t have to enter all of the parameters every time you want to connect. ODBC uses something called DSNs (Data Source Names, if I recall correctly) to make it easier on the user.

    If you want to create a DSN, append something like the following to your /etc/odbc.ini file:

    [myodbc3]
    Driver       = MySQL
    Description  = MySQL ODBC 3.51 Driver DSN
    Server       = mysql
    Port         =
    User         = testuser
    Password     = password
    Database     = test
    Option       = 3   
    Socket       = 
    

    You will also need to update the ODBC Data Sources list near the top of the file to mention the new DSN:

    [ODBC Data Sources]
    myodbc3     = MySQL ODBC 3.51 Driver DSN 
    

    C♯ ODBC connection example

    Here is some example code to get you connected:

    using System;
    using System.Data;
    using System.Data.Odbc;
    
    class ODBCTest {
      public static void Main(String[] args) {
        // Connection string using explicit parameters                              
        string ConStr = String.Format(
          "DRIVER={0};SERVER={1};DATABASE={2};UID={3};PWD={4}",
          "{MySQL}","mysql","test","testuser","password" );
    
        // Connection string using DSN                                              
    //  string ConStr = String.Format("DRIVER={0};DSN={1}",                         
    //                                "{MySQL}","myodbc3");                       
    
        //Create the connection object                                              
        var OdbcCon = new OdbcConnection( ConStr );
    
        try {
          Console.Write("Opening connection... ");
    
          //open the database connection                                            
          if (OdbcCon.State == ConnectionState.Closed)
            OdbcCon.Open();
    
          Console.WriteLine("connection opened!");
        } catch (OdbcException Ex) {
          Console.WriteLine(Ex.Message);
        } finally {
          //close the database connection                                           
          OdbcCon.Close();
        }
      }
    }