kwa is currently certified at Journeyer level.

Name: Kyle Ambroff
Member since: 2005-08-19 17:11:40
Last Login: 2008-11-10 06:27:47

FOAF RDF Share This

Homepage: http://www.codewalking.com

Projects

Recent blog entries by kwa

Syndication: RSS 2.0

28 Mar 2008 »

LRL Live USA

Brandon and I are going to Lugradio Live USA 2008 on April 11th and 12th. It is going to kick ass! If you are anywhere near California, you must go. You don’t have any excuses.

As an added birthday bonus, I’ll be attending as a new LindenLab employee! For those of you who might not have heard of them, LindenLab is the creator of the online virtual world Second Life. I was recently offered the position of Release Engineer, and my first day is on the 7th of April. Joy! I am so excited to start that I can hardly think about anything else. It looks like my new avitar is going to be Ambroff Linden, so come see me in-world!

PS: I can’t wait to see abock all oiled up in a thong.

Syndicated 2008-03-28 02:57:00 from Code walking

28 Mar 2008 »

Source code licencing == term paper policy

Something Luis Villa posted today reminded me of an experience I had recently with a group of students. I am reminded of a phrase that I heard while discussing software licensing. “If we change 60% of the code, it’s ours.”

I am about to graduate with a BS in Computer Science from CSU Sacramento, which means that I’m currently working on my senior project.

My department’s senior project course is a little different at other schools I suspect, since it is a group project with 3 to 6 members per team, and spans two semesters. Also, rather than just coming up with a proposal for an interesting problem to solve, students compete to get a fake contract with one of several local businesses and government agencies. It’s good I guess, but I’d rather be hacking on GNOME or some other free software than write yet-another-boring-crm for tracking form submissions :-). It usually feels more like an exercise in paper pushing than designing software anyway, since the projects are quite simple and boring.

Anyway, me and a fellow teammate were discussing plans for a rather complicated custom widget we needed to create for this project. He found an example that some Joe Schmo had posted on the Internet without any license information, and wanted to just start with that and modify it where necessary.

My first thought was to ask if he knew anything about the license that the code was released under. His first reaction was to stare blankly at me, which I can understand, but this next part shocked me. I said, “Well, if he didn’t explicitly grant any rights to use and redistribute this code, the safe thing to ask him to release it under MIT X11, GPL, or any other license compatible with our codebase.”

He responded, “Why do we need to do that. If we change more than 60% of it then the code is ours.”

My jaw hit the floor. I didn’t even know how to respond to this. After a discussion about U.S. Copyright law, licensing, Copyleft and the four freedoms, etc., we had things straightened out. But I was still troubled.

I think that he may have been confusing one of his instructor’s plagiarism policies with copyright law. I find this especially disturbing because as a computer science student, he is required to take a course that explicitly covers Copyright, Patent and Trademark law. What is even more disappointing is that he is not alone. From my experience, many, many students in this department make the same mistake.

Maybe a question involving this topic would be a good weed-out question when hiring developers who will be working on free software? I would love to see the responses.

Syndicated 2008-03-28 02:49:13 from Code walking

23 Mar 2008 »

Fun with Lisp on Python

I’ve been hacking on a useless little project lately. My friend Brandon and I have been toying with the idea of designing a new programming language over the last couple of years. We are both compiler nerds, and many of our conversations usually lead to to a discussion about why this feature is great and why that language
sucks.

I’m a pretty big Python fan, and have been using it for years. It is still my go-to language when I just want to get something done. Unfortunately, the more I learn about programming languages like Common Lisp, Scheme, Haskell, etc., the more I run up against the restrictions that Python has.

Unfortunately, many of these are deliberate. It seams that Guido and many others resist features like continuations, macros, non-broken lambdas and proper tail recursion because they like to think of Python as a single-paradigm language. Adding these features means that some Python code could seem foreign or unfamiliar for some programmers.

I understand this argument, but on the other hand I find it extremely frustrating when I have an elegant, easy to understand solution to a problem that I just can’t use because of a seemingly arbitrary restriction.

So I thought I would kill two birds with one stone. I could start designing a language for fun (not profit :-)), and when I am ready to write the compiler, I can just emit Python bytecodes, so that I will have a huge set of libraries to experiment with, and have something usable right away.

This turned out to be extremely easy. Within a few days I had a working compiler that was near feature parity with Python, and some nice features added on. It is still pretty basic at the moment, I don’t have many of the features implemented that I have planned. For now it’s just a simple lisp-like language with similar semantics to
Python. After a couple of afternoons work, I did a google search for similar projects, and it turns out that there are about 10 people that have done something similar. I don’t really care though, this is just for fun.

One of the decisions that I made early on is that Python’s modules are a good idea. I think the module and namespace semantics are extremely well thought out in Python, and have encouraged a lot of really great patterns and idioms. So this language is definitely going to mirror that behavior.

One of the things I struggled with was under what circumstances should I allow myself to add syntactic sugar. I’m usually not a fan of such features, but there is one case where I made a compromise, and that is accessing attributes of an object. I tried to avoid this for as long as I could, but I tended to write a lot of code like this:

(set (getattr (getattr someobject 'propertya) 'propertyb) value)

In this case, I ended up settling for:

(set someobject:propertya:propertyb value)

I’m not really satisfied with that at the moment, but at least it is about the only such compromise I’ve made.

Another thing that is pretty important to me is avoiding any special operators. This is something that really bugs me about common lisp, I hate having to write code like this:

(reduce #'(lambda (x y) (* x y)) '(1 2 3))

Why can’t ‘*’ be a function? Scheme gets this right in most cases, but there are still around 10 special operators. I want zero special operators, or at least as few as possible. I ended up accomplishing this by allowing special operators to behave like functions in contexts where that made sense, and otherwise treating them like special operators. For example, the situations below would generate very different code:

(reduce * '(1 2 3))

This would simply map to a built in function for multiplication, that is only used when ‘*’ is used as a symbol. Otherwise:

(* 1 2)

This emits a normal BINARY_MULTIPLY instruction. This way it appears to have no special operators, but the code that is generated is as efficient as possible. I’ve tried to do this where ever I can.

At this point, it is possible to write just about any program you would write with Python, with a few minor exceptions that would be trivial to fix. Here is a simple pygtk program:

(import gtk)
(set my-window (gtk:Window))
(my-window:set_title "Hello, World!")
(my-window:connect "delete-event"
                   (lambda (w event)
                     (println "Goodbye, world!")
                     (gtk:main_quit)))
(my-window:show)
(gtk:main)

It really is remarkable how much Python resembles a Lisp internally. In some cases, what I thought would take days of hacking turned out to only take 1/2 hour. An example was loops. I wanted to implement something like the Common Lisp loop macro, only not as terrifying :-). It turns out that the behavior isn’t much different from Python list comprehensions, so implementing something like this was pretty trivial:

(loop
  for x in (range 10)
  for y in (range 10 20)
  if (not (= x y))
  collect (x y))

Although in the end I simplified loop a great deal, it was fun to see it work with so little effort.

I don’t know if I will actually release this code. It isn’t really that useful, it’s just a fun little project to tinker with and an easy way to try out new experimental language features. But if you want to play with what I have now, you can get it from my Bazaar branch.

bzr branch http://codewalking.com/bzr/sketchy.dev

My plan is to continue experimenting with this, and eventually weed out all of the unnecessary features. At some point I imagine having something that would be worth rewriting, maybe targeting another VM with a JIT like the LLVM, the CLR or Java, or writing my own JIT (that would be fun!).

Syndicated 2008-03-23 01:24:29 from Code walking

7 Dec 2007 »

GUADEC 2007 videos available


<p>Awesome, <a href="http://ftp.gnome.org/pub/GNOME/teams/guadec/2007/videos/">videos</a> from <a href="http://www.guadec.org">GUADEC</a> 2007 are <a href="http://ftp.gnome.org/pub/GNOME/teams/guadec/2007/videos/">available</a>! Guess I'm not going to get any sleep tonight. </p>

Syndicated 2007-12-07 11:12:16 from Codewalking.Com

28 May 2006 (updated 28 May 2006 at 22:49 UTC) »

Well, I spent most of my Saturday trying to figure out how to use the mono bindings for Avahi. They aren't that complicated, but no one has written any documentation yet. Today I've been experimenting with a Zeroconf plugin for beagled.

Currently beagled will publish its index, and will keep track of any remote indexes it finds in the log file. It's a start!

5 older entries...

 

kwa certified others as follows:

  • kwa certified kwa as Apprentice
  • kwa certified sri as Journeyer
  • kwa certified jdub as Master
  • kwa certified harold as Master
  • kwa certified dmarti as Master
  • kwa certified rms as Master
  • kwa certified mjg59 as Master

Others have certified kwa as follows:

  • kwa certified kwa as Apprentice
  • zx80user certified kwa as Apprentice
  • aicra certified kwa as Apprentice
  • richdawe certified kwa as Apprentice
  • Zaitcev certified kwa as Journeyer

[ Certification disabled because you're not logged in. ]

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page