Monday, June 01, 2009
back from Google I/O, got a new laptop!
Anyway! I got back, and my Dell Mini 12 with Ubuntu preinstalled had arrived! It's really pretty. The keyboard is a little more cramped than I'd expected (especially with the punctuation keys) but it's got a nice clicky feel. I'm not super-impressed with the Ubuntu version Dell shipped -- it's a specialized distribution of Hardy (last year's version) with some Dell and Yahoo-specific goodies. But the built-in camera and suspend/resume work beautifully! And no Microsoft tax! Not bad, really!
I'm probably about to install a fresh new (9.04) Ubuntu Netbook Remix on it.
Update! There's a bit of a funky driver issue with running the stock Ubuntu instead of the one Dell provides, but it's very surmountable. Here's how to install Ubuntu "Jaunty" on your Dell Mini 12.
Wednesday, May 20, 2009
Scala article on the Scala site!
Here's the article! As of right now, it's linked from the front page on the Scala site.
In the article, we mention my Scala/GWT sudoku solver, which is now available on Google Code. It's also live on App Engine right now!
Tuesday, April 21, 2009
Further steps: Scala/GWT/App Engine/Eclipse
You can very easily have a mixed Scala and Java project, and make calls back and forth; Scala and Java packages sit in the same package hierarchy and compile to the same bytecode -- it all just works, pretty much seamlessly.
So, clearly, the right thing to do is hook Scala up to GWT RPC and run it on App Engine. Let's do that. This is as awesome as it's going to get, at least until the GWT compiler supports Scala and we can do our client side in Scala too.
I assume you've already installed both the Google Pluin for Eclipse and the Scala IDE for Eclipse. I'm using Eclipse 3.4.
Make a new "Web Application" project (with File > New, or just click the blue "g" icon). Click the boxes for both "Google Web Toolkit" and "App Engine" -- our client side will be in GWT, and the server on App Engine.
Right now, our new project has "Java" nature, but not the "Scala" nature. Add Scala by right-clicking the project and choosing Scala > Add Scala Nature. We're also going to make sure we have a copy of the Scala runtime library once we deploy to the server. Find out where
scala-library.jar sits (expand out the "Scala Library" container in your project) and copy it into the project's war/WEB-INF/lib.Now, down to business. There's a RemoteServiceServlet currently implemented in Java, and we're going to replace it with Scala code -- this is the thing that gets called on the server side when the client makes an RPC request. Find
GreetingServiceImpl.java and delete it.To replace it with a class implemented in Scala, right-click your "gwtscalademo.server" package and select New > Other > Scala Wizards > Scala Class. The class we deleted was a servlet and referenced by the web.xml, so give the Scala class the same name: GreetingServiceImpl.
Here's my version:
package gwtscalademo.server
import gwtscalademo.client.GreetingService
import com.google.gwt.user.server.rpc.RemoteServiceServlet
class GreetingServiceImpl
extends RemoteServiceServlet
with GreetingService {
def greetServer(input:String):String = {
return "Hello from Scala, " + input + "!"
}
}Note that while in Java, we'd have said
implements, in Scala we say with. As I understand it, this means that Java interfaces get mapped onto Scala traits. Hip!Now you should be able to run the app locally -- right-click your project and select Run As > Web Application. Once you've learned Scala and made it do something interesting (you're on your own there), you can deploy it to App Engine!
Woo!
Wednesday, February 11, 2009
HOWTO not get "/usr/bin/env: bad interpreter"
bash: ./my-script.py: /usr/bin/env: bad interpreter: Permission deniedThe partition your script lives on may be mounted with the "user" option set. "user" implies "noexec" (see the manpage for "mount"), which is going to keep you from running executables. And while running a binary executable from this kind of partition fails more clearly, trying to run a script with a shebang gives you this more confusing error message.
To fix! Add "exec" after your "user" flag in /etc/fstab. (again, see "man mount").
Saturday, January 17, 2009
Lisp insights from learning Logo
My first pass, once I found out how to return something from a function (Logo procedures aren't expressions -- you have to explicitly return) had a line like this:
if (stacks = []) (output [])Running the procedure gave me the helpful error message:
output didn't output to if in astep
[if (stacks = [] ) (output [] )]Pardon?
When I remembered that Logo's "if" wants a list of instructions, it clicked with my new nugget of knowledge that literal lists are quoted in Logo. Then I understood what was going on: this "if" is neither a macro (like in Scheme, or most languages) nor lazily evaluated (like Haskell). It's a regular function, but one that expects quoted code to evaluate on demand at runtime. Rubyists and Smalltalkers: this is something like how an if block works for you, yes?
Here's an analogy into Python, for the non-Lispers out there:
def myIf(tf, truecode, falsecode):
code = {True : truecode, False : falsecode}
return eval(code[tf])
>>> myIf(0 == 1, "'it was ' + 'true'", "'it was not true'.upper()")
'IT WAS NOT TRUE'
>>> myIf(0 == 0, "'it was ' + 'true'", "'it was not true'.upper()")
'it was true'
Also, apparently Logo in general has dynamic scope -- which shouldn't surprise me, since lexical scope is relatively new in Lisp. And Berkeley Logo in particular has macros. Maybe my little compiler project is going to be harder than I expected. Honestly, I was imagining I'd be done if I could just parse it, do some simple transformations on the tree and spit JavaScript.
Sunday, January 11, 2009
my code has a side effect: learning!
My earlier Haskell project had stalled out due to my not being very good at the language yet. What I want to do is build a compiler for Logo that produces JavaScript, with the turtle graphics on a canvas tag. Logo is an acceptable Lisp! I'd love to see it get more use.
Interestingly, though:
- There's already a beautiful Logo implementation that runs in javascript: papert.
- Mark is working on something like papert, but for Processing -- he wants to put your Processing sketches, how you say, in the cloud.
- There are some really nice (and free!) introductory CS texts that feature Logo. Brian Harvey has a pretty serious three-volume set. And there's a version of How to Think Like a Computer Scientist done in Logo.
Sunday, November 23, 2008
Fixing your Ubuntu suspend/resume problems
The fix! Mentioned tersely over here, and slightly more clearly over here, all I had to do was create a file /etc/pm/config.d/01-modules that contains this line:
SUSPEND_MODULES="forcedeth"
Apparently you can name the file something else, as long as it's in the same directory, but this one worked for me. And of course, if you're having trouble with a different driver, change "forcedeth" to the right module name.
It's 2008 -- why is power management still tricky on Linux? Users (like your non-technical family members) should never have to do this sort of thing.
Sunday, November 16, 2008
I could have just emailed them a photo of my shelf
Excellent design, Amazon dudes and dudettes. I don't begrudge you that training data at all.
Thursday, October 09, 2008
Debian on the OLPC
It was super-easy getting it installed (instructions here); you use the same command for updating to a new version of the standard olpc software and for installing Debian. Or Edubuntu, apparently.
For extra disk space, I blew away the default Sugar/Fedora install -- it's pretty easy to get back to a fresh state, just in case I want to set that up again later.
In 472 megs, I have the base Debian, X.org, subversion, vim, fluxbox, mzscheme, and the Glasgow Haskell Compiler, the install for which pulled in gcc, so was big.
Sunday, September 14, 2008
sudokudlx: Automatic Sudoku Solving with Dancing Links
http://sudokudlx.appspot.com/
Also, I've written a bit about how to use Dancing Links (DLX) to solve sudoku puzzles. Soon, I'll write up how to implement DLX.
Sunday, September 07, 2008
plats is Swedish for "locale".
Check it out: http://plats.appspot.com
Just include a script in your page and you get a variable or a meta tag (for GWT apps) to tell you which locale you should be in. Details here.
Thursday, September 04, 2008
figuring out the user's language preferences, client-side
So I'd like to do this on the client side. I had the bright idea that I would just build an XMLHttpRequest object and ask it what headers it was about to send (XHRs do send this field), but GWT's HTTP objects don't let you get at request headers that you haven't explicitly set. The very good reason for this is that XMLHttpRequest objects don't let you query their headers. Oh noes.
It may be that the way to do this is with a bit of server-side cleverness, but that's not the answer I want. Unless somebody happens to have a way to snag these settings from JavaScript...
Friday, August 29, 2008
GWT 1.5 release!
http://code.google.com/webtoolkit
What's new? Check check check it!
Monday, August 18, 2008
Firefox 3: you can drag tabs between windows!
I'd like a way to grab hold of a tab and drag it out into space, forming a new window, but this might be hard to implement -- some systems would make a link on the Desktop. Failing that, an "open this tab in new window" command would be nice.
I could put in a feature request, I suppose -- or even a patch! How hard could that be to implement?
Tuesday, July 08, 2008
Lisp snippets on a Tuesday night
(require srfi/n) to load up the nth SRFI; they're numbered. Particularly, I've been playing with the extended libraries for lists, strings, and hash tables.On the Common Lisp side of things; I just ran across the insanely useful
describe, which prints out what the system knows about a given object -- if it's a function with a docstring, the docstring will be in there. Also potentially useful: disassemble. Give it a function; it does what it sounds like!
Monday, June 09, 2008
reconsidering applets
So, a beefy, fast VM that runs inside the browser, coupled with a nice web UI, and no manual installs for your users -- big win? Maybe! On considering this, one of my first thoughts was to put Jython into an applet and build something akin to JES -- a little Jython IDE in the browser! The kids would love it! So I set out to make this happen, or at least build a proof-of-concept.
I ran into a serious snag, though -- the Jython interpreter works by compiling to bytecode and bringing it up with the class loader, the latter of which applets aren't typically allowed to do. Special permission can be granted with a Java policy file, but that's a very high barrier to entry. It's certainly not the sort of thing a person might do on a public terminal. Signing the applets may also be an option -- but that's also a pain, and anecdotally, I think signed applets may not always get the same rights, cross-platform.
Once I understood the permissions issue, I did get a little Jython repl going -- it just hooks "eval" up to some javascript for output. Nothing fancy, but kind of satisfying. For now, though, it doesn't look like Jython IDEs are coming to the browser. Until we rewrite it to not use of the class loader. Or just use some more modern approach.
Some other people have had similar thoughts!
- Interactive Jython Console: this one, for the exact same reasons that mine does, requires a java policy file.
- the ruby-in-browser project. It does exactly pretty much what it sounds like it does, also by means of an applet and LiveConnect. Interestingly, JRuby doesn't seem to use the class loader, it just works! Check out the demo! [thanks for the heads-up, Lindsey Kuper!]
Wednesday, May 28, 2008
GWT 1.5RC1 -- we're pretty pumped.
http://googlewebtoolkit.blogspot.com/2008/05/google-web-toolkit-15-release-candidate.html
Get the bits while they're hot.
http://code.google.com/webtoolkit/download.html
GWT 1.5 has a whole lot of wild improvements, detailed here -- but importantly, compiler now supports Java 5 features and produces even tighter code than before, and the UI library has had some pretty serious reworking -- there's a new API for working directly with the DOM in a typesafe way, and GWT apps now come with nice styling by default. We've been working pretty hard.
Oh, and don't miss the new documentation browser :) Much better than browsing the GWT wiki docs by hand.
Share and enjoy!
Thursday, May 01, 2008
Real World Haskell
Beta chapters are here.
(if you knew where to look, there was an announcement on LtU about being an alpha reviewer, to get at the pre-pre-release chapters...)
Wednesday, April 16, 2008
vim tip: don't mess up the indentation when you paste
:set pasteOkay, now paste.
:set nopastePerfect. I rated this tip "life-changing".
Tuesday, March 25, 2008
Penguin Parens: referenced by NLTK!
It turns out that they quoted my blog post for the "Quotes" page. Aw :)
I'm checking out their circumstance again, so to speak -- and it's grown so much. They've got most of a textbook (free online!) put together. And the API is gigantic, so much code! Amazing. I'm going to have to dig back into it.
Sunday, March 23, 2008
you need more retrocomputing: Mini vMac and old Apple software
And it works really well! You'll need a ROM image, y'know, taken from the Mac Plus that you personally own, and also an image from a "System" disk (available on that same page).
But! As the Mini vMac page points out, you can get old Macintosh System software from somewhere else -- Apple's own Older Software Downloads page, which features all sorts of outdated Apple software. System disks, drivers for bizarre old SCSI hardware... and Hypercard.
The Mini vMac page also links to this fantastic compendium of old macintosh software from third parties, which has even more wild old stuff, like vim 3, forgotten Lisps and MLs, games that you might remember.
I'm going to have to run this fullscreen on my Macbook Pro, woo!
Friday, March 07, 2008
more retrocomputing: procedural graphics languages!
But! The interesting thing about Prodigy was the graphics. It was clear, at the time, that it wasn't downloading "images" as such -- y'know, like raster graphics -- it was drawing in terms of commands that would build pictures out of shapes. This was kind of cool; the dialup link was slow enough that you could see it building the picture, usually bigger background shapes first, then the details would get filled in. It occurs to me now that it must have been somebody's job to work out how to draw pictures like this...
It turns out that Prodigy was using the standard language for this: NAPLPS, the North American Presentation Level Protocol Syntax. And there were several other services that used the same approach -- some of them sent the commands over modems, like Prodigy, but some went over TV, during that mystical vertical blanking interval that broadcast engineers talk about.
Speaking of sending non-raster graphics down the wire: did you know that there's a set of drawing commands understood by some DEC terminals? It's true. It's called ReGIS. At one point, Brett and I got our hands on some old DEC terminals and spent a few afternoons messing around with this on something that must've been a vt340 or vt420. You can find out all sorts of wonderful things about DEC terminals at the super-top-notch vt100.net. These things seem to be indestructable; I held on to the vt220 for years, passing the joy forward sometime in college; it was still chatting amiably over the serial port on my Linux box, and almost as old as I was.
That's all for now. Happy hacking!
Friday, February 29, 2008
in which alexr surprises you by linking to Microsoft software
Lindsey Kuper comes to our rescue, and points out this article: Using IE6 and IE7 together.
The first approach in that article was especially helpful for me: there's a version of IE6 bundled with all the libraries, ready to go even if the updates have installed IE7 for you. It works great, in as far as IE6 can be said to "work great".
What is surprisingly nice is the Internet Explorer Developer Toolbar. This is from those cats in Redmond, and I'm surprised it's not more widely publicized. It comes with a very functional DOM inspector that users of Firebug will figure out pretty quickly, and it works with that standalone IE6.
So! Now you can more easily and precisely diagnose just which inane and hateful things the IE rendering engine is doing to your app!
Happy hacking, and good luck :)
Tuesday, February 26, 2008
Today's viewing: Linus on git.
"There's a few of them in the room, I suspect -- you're stupid!"
-- Linus calls out the svn developers on hand
The Linux kernel team had previously been using the proprietary BitKeeper, which a number of kernel developers (including Alan Cox, with his Mighty Unix Beard) chose not to use. Before that, source control for the kernel was handled by sending patches around -- preferable to using centralized source control, according to Linus.
So let it be known that I haven't actually /used/ git yet, or in fact any distributed source control system -- but I like the idea so far. In this post, I'll outline the reasons Linus lays out for why we should be using git.
First off, the distributed nature of git also has performance and convenience benefits, from the simple fact that it doesn't need to make network roundtrips. Having your own repository on the local machine means that you're always set to go, even if the network is slow or unavailable.
Secondly, traditional source control makes branching and merging branches hard (Linus points out that many real-live software developers have never done it), so you don't want to commit your work until it's ready to be seen by others -- this means that you can't do much version control during the actual code-writing process. Contrastingly, in distributed source control, every checkout acts as its own branch, so each developer has at least one. This has the benefit that you can commit to your own repository whenever you want -- and then back up to previous versions whenever you like.
Centralized approaches to source control are particular drag when people are depending on your committed code as correct, or at least non-breaking -- you're not allowed to commit until your changes are ready for the rest of the team. As a project gets bigger, the associated test suite (hopefully) does as well, eventually leading to a pretty involved testing procedure that developers are supposed to complete before committing. And as Linus puts it, "... people make one-liner changes and ignore the test suite, because they know that those one-liners can't /possibly/, /possibly/ break." And then these breaking changes get pushed out to the rest of the team. The alternative approach, with git, is that you commit to your own version of the repository whenever you want, and when you're ready, your teammates can pull from you -- but in the mean time, you get all the benefits of having your own branch(es).
Thirdly -- social benefits! In his development process, Linus only pulls code from ten or fifteen other developers, whom he trusts to have filtered "up" appropriate changes from the people that they interact with. As he puts it, "if you have determined that somebody else is smarter than you -- go for it!" So the Linux kernel source control process mirrors the social networks of trust that make the whole thing happen. In the end, a lot of people end up only looking at the Linus branch, the defacto "official" one.
This dodges the social issue of giving out commit access to the central repository. Traditionally when managing a project, you create this class of people who are "ostensibly not morons", and typically, you make that group of people too small. Distributed model makes this go away, because everybody has his own branch. And if you happen to do good work in your own branch, then people start pulling from you! "That alone means that every single open-source project should use nothing but a distributed model."
So. That's what Linus said. Will everyone switch to git or some other distributed source control? We'll find out. Adoption would certainly be helped out if major project-hosting sites like Sourceforge or Google Code added git support. But sort of the point of the distributed model is that there's no one central hosting point...
Maybe I'll try it out. I'll let you know.
Monday, January 07, 2008
today's reading: Neighbourhood Components Analysis
I've been making an effort to read more academic papers. This one came up for one of the many reading groups at the Goog, and I picked it out of my stack a few days ago. Here's the abstract.
In this paper we propose a novel method for learning a Mahalanobis distance measure to be used in the KNN classification algorithm. The algorithm directly maximizes a stochastic variant of the leave-one-out KNN score on the training set. It can also learn a low-dimensional lin- ear embedding of labeled data that can be used for data visualization and fast classification. Unlike other methods, our classification model is non-parametric, making no assumptions about the shape of the class distributions or the boundaries between them. The performance of the method is demonstrated on several data sets, both for metric learning and linear dimensionality reduction.This is a very common, general problem for machine learning -- you want to build a classifier, and you think you might like to use K Nearest Neighbors; it's dead simple, and a lot of the time, it gets the job done. No complicated models to train up -- if you want to classify an instance (ooh, here's an animal -- is it a kitty?), you just find the k most similar instances in your bank of examples and let them vote it out. Four of the five most-similar things in your example set are kitties? Alright, we'll call the new one a kitty. You have to tune k as a parameter to work well with your dataset, of course, and you can get slightly more sophisticated by introducing weighted voting -- things that are less similar to the instance you're trying to classify are considered less important.
The remaining question, though -- how do you decide what counts as "similar"? Typically, you use some sort of distance metric (Euclidean or Manhattan, for example) -- plot all of your instances in some high-dimensional space and see what's close. What if some of your features are noisy or irrelevant, though? Well, you could do some feature selection and prune those features out. Worse! What if you have several informative features, but they happen to be on very different scales, such that distances in one overwhelm distances in another? Well, you could manually scale them until you get some good results...
This is starting to sound like maybe K-Nearest Neighbors isn't all that easy to use, out of the box.
This paper actually solves both of those cases. Goldberger et al harness the power of linear algebra and come up with a way to learn a projection -- just a matrix -- from the original feature space, where distance metrics might not be very useful for KNN, into a new feature space, where your distance metric does the right thing. In effect, this is the feature selection and the scaling, all in one go, and they do it in such a way as to minimize the Leave-One-Out error, all tuned for your particular data set.
That's kind of cool.
As an added bonus, if you restrict the transform to project into three or fewer dimensions (just make sure the matrix is the right shape, and you're good!), then the same algorithm produces what sounds like a very nice visualization of your data. Features that are informative in discriminating your classes will be stretched out, and instances in the same class will tend to clump -- otherwise, KNN wouldn't work very well.
Lovely paper, guys! Very well-written, clearly explained, and addresses a problem probably a lot of people have had. The only issue I can raise so far -- it's not clear how long it takes to learn the transformation. This might be a very slow process, and all we're given in the paper is something to the effect of "oh, just optimize this function and you're good..." ... the machine learning pros among us can probably just look at the formula and knock it out in a few lines of Matlab (or supposedly Lisp, if you're Charles Isbell), but I would've liked a little more discussion on the implementation side... maybe they posted some code somewhere.
Happy hacking :) alexr out!
Saturday, January 05, 2008
Design Patterns Ahoy: Violator Pattern
And while, so far, it seems like just good, solid advice about software design -- and at the risk of sounding uncritical, is it really so bad to have common names for commonly-occurring software structures? -- ... no "Violator" pattern is to be found in Gang of Four. Or on the C2 design patterns wiki.
And I wanted to work out for myself what this mysterious Violator Pattern could be. And I figured it out today. In GWT, you can use the JavaScript Native Interface to make calls from code written in JavaScript into methods written in Java. And when you do this, the compiler totally ignores the access modifiers on the methods you're calling. That's the Violator pattern.
A paragon of OO design, verily :)
Saturday, October 06, 2007
ye can't get ye flask
And it's pretty easy to sign up, and you get a fairly nice-looking avatar by default (mine was "city chic", which pretty much describes me in First Life as well), and you download the client, which they probably have one for your platform, and it all works. And you find yourself on this friendly-looking island and the tutorial tells you how to walk around and say things and stuff. And there are a few other virtual people standing around.
But it's not clear if they can hear you when you speak -- and if they're trying to chat with you, how would you find out? Maybe there's a "chat" window that you can pull up. I found a window that maybe wanted to be that one ("History"?) ... but only some of my utterances seemed to show up there.
So I walked around on that little island for a few minutes, trying to figure out how to get to another island -- and there's this "teleport" button, but how do I use it, and why is it grayed out?
... after a while, I found that I'd hit something that turned off my walking. My arrow keys would turn me in place, but I couldn't walk around anymore. And there's no clear "oh, you're in 'don't walk anymore' mode" indicator. Buh?
And that was enough to end my second foray into Second Life. There are only so many minutes in the day.
I think my experience was rather more anticlimactic than Drew's. He at least found out how to go places. But neither of us could figure out how to hit people.
Tuesday, September 11, 2007
possible upcoming projects
New Things To Build
- Sketch out and build an online community where kids can make stuff in code and share it with each other, like MOOSE Crossing only awesome and on the web and easy to use and linkable. Does this want to be made of Scratch, or similar to it? Can we include proper inheritance? Make it work for the OLPC.
- TEB. Make TEB awesome. Does TEB want to use/be part of/merge with gnoetry? Related: That horoscope remixer thing that never worked right.
- Some automated way to calculate Erdos numbers, probably with the help of DBLP.
- A Scrabble bot. I've been thinking about this a lot, actually, looking at different algorithms for permuting strings -- but I think I can do Scrabble without looking at permutations... maybe all you really care about is whether certain groups of letters constitute the same bag. If it turns out we don't have to permute things (in n!), then we can probably plan several turns ahead. This might be similar to playing Backgammon,, but maybe we can't do something like that kind of policy learning; your set of possible actions changes so much every turn, and you'd have to use probability estimates to look into future turns...
Interesting Exercises, way already done by other people
- Build a language and virtual machine. Educational for me, not very useful for other people. Recommended by Strick. Building a VM at a pretty high level of abstraction might not be that hard, just think about stack frames and returning things. At what level do things like the Python VM work? The JVM? Surely there are different approaches used for this; what are they? Would it be hard to build something with multithreading in mind from the bottom up? What about a purely functional lambda-calculus implementation?
- Write a checkers bot. Tree search, AB pruning, etc. are pretty well understood, even by me -- the hard thing would be an evaluation function.
- Build a MUD, or at least a MUD framework. But in Scheme. ynniv and I somehow never got around to that...
- Another Sudoku solver. But in Haskell.
Thursday, August 23, 2007
James Gosling, it turns out, thought harder about type inference than I did
The mighty Toby R, in a conversation with me and Strick, shed some light on the situation and led me to understand why this is not the case. The particular use-case is: when you're in the method that takes List<Thing>
(also, somehow I missed an anonymous comment, probably from my mother, well-respected for her work on type theory, which explained that exact case)
Now in a purely functional language, where you don't go around getting references to objects and modifying them, I'd like to posit that this wouldn't be a problem -- but perhaps there are other problematic situations? ...
Wednesday, August 22, 2007
typing about typing about types
As we make the push to handle Java 1.5 features in GWT (it's about time!) I'm having flashbacks to undergraduate Compilers. Perhaps this is unsurprising, considering what I'm working on. Part of the difficulty in the problem is that whether you're talking about types in the code that constitutes the compiler itself, types in the code that the user is going to put in, or types in the output code... we use the same word. Oh my. (much worse, I suppose, is the code you get with the Appel book, where half of the words on the screen are helpfully "ty" or "typ". Jebus.)But! All of this means that by the next GWT release, you'll likely have some code that I touched in your hands. Woo.
Sunday, August 12, 2007
this blog post: for you, $50.
A few links out, I ran into the Serials Crisis article. Apparently (and Wikipedia articles close to the "Library Science" one are never wrong), the costs of subscribing to scholarly journals keep on going up -- libraries only have so much money for subscriptions, but there are ever-more academics and subfields, thus more journals. And if a given library cancels its subscription from a particular journal, that publisher's fixed costs are still fixed, so prices increase for the remaining subscribers.
The traditional academic journal system had seemed pretty shaky, especially in light of the Web; upsetting publisher websites (Springer, ACM Portal, IEEE's site...) seem like their sole purpose is to keep the enterprising students from reading an article. In light of how most of the science behind the articles is publicly funded in the first place, the articles seem like they should be public as well.
I wouldn't mind seeing companies like Springer just going away; universities seem totally capable of hosting journals -- over the web especially! There may be some compelling reason for the current system, and I'll try to find it out... but for the short term, tools like Google Scholar could go a little further out of their way to help us find the full text of an article!
Also:
http://en.wikipedia.org/wiki/Open_access
http://en.wikipedia.org/wiki/Open_access_journal
http://en.wikipedia.org/wiki/Open_access_publishing
The Serials Crisis: A White Paper for the UNC-Chapel Hill Scholarly Communications Convocation
The Crisis in Scholarly Publishing
Friday, August 10, 2007
You get spoiled by languages with first-class functions
[fn for fn in fns if fn.endswith(".html")]
Or even:
filter( lambda x: x.endsWith(".html"), fns)
Or the equivalent Lisp. Y'know, with "loop" and "collect". (Common Lisp has, as they say, the Cadillac of loop syntax)
Or something to that extent. But then I remembered that I was writing in Java, and I ended up writing a for-loop. There's no clean, idiomatic way to say that in Java, is there? Do you have to build up the list procedurally? ...
Sunday, August 05, 2007
"If I knew the answer ahead of time, I wouldn't be writing this program!"
On the plane back from San Francisco to Atlanta, I read Thomas and Hunt's Pragmatic Unit Testing. It's a very quick read, about 120 pages plus appendices. And while it's very light, it has what seems like a lot of helpful advice for good design and development practice. To be honest, I've never done much unit testing in the past, thinking "oh, that's what those corporate software engineer guys do -- pssh." But! It turns out that these days, I am a corporate software engineer, and anyway one should always be looking out for new ways to hack more effectively.
There's a bunch of important principles to take away from Pragmatic Unit Testing. The one that stuck with me the most, though, is that when designing and writing code, you've got to think: "how am I going to test this?". The significance of this is not just "oh man, I'm going to have to write a unit test for my method"; it gets back to that generally-understood but oft-ignored idea that every logical unit of your code really wants to be its own method, a modular thing that you can use separately -- because you're going to have to use that same calculation again somewhere else. And Don't Repeat Yourself.
For example: if you have a method that calculates how to do something and then does it (say with a call to another library), maybe you want to make that two methods: the calculation and then a call to that calculation coupled with the library call. This will be easier to test -- you're not really interested in testing a third-party library, just your own calculations -- and as a happy side-effect, your code is now cleaner and more reusable!
Similarly, separating out the backend code from the GUI (two of the things that get my hackles up the most in this life are terms "business logic" and "MVC") lets you properly test the Stuff That Does Stuff on its own. One example in the book hit particularly close to home -- a small GUI application where all the caculations and I/O happened mixed in with the Swing code.
That example, and in fact the whole book, brought on flashbacks to a project I'd worked on recently. One of my friends and I (and he's one of the sharpest guys I know) inherited a fairly involved program and ended up sinking months trying to fix it up. This system suffered from pretty much every pitfall in the book: random silently-caught exceptions, real work happening mixed in with the GUI code, needlessly long, opaque, nigh-untestable (let alone "tested") methods, repetition all over the place. Worse! It was built by a guy who'd supposedly specialized in software engineering -- and he did pretty much everything that Thomaas and Hunt warn against! Not a pleasant situation. I'm sure you can relate.
Of course, I knew at the time that this was atrocious code. But now maybe I'll be a bit more principled in my development, working with a lean towards easy testability. Unit testing will probably be a good discipline to get into.
On the other hand, I've been reading about (and writing a bit of) Haskell. All this murky business of setting up and tearing down state, "proving" to yourself that each function does what you think it does "for the boundary cases" -- it all relies on the idea that you're going to be able to predict where you're going to make the bugs (by heuristic, habits, and mnemonics). And if you're smart enough to predict where the bugs are going to pop up, it seems like there's something better you could do to keep them from being introduced at all. In ML for the Working Programmer, L.C. Paulson suggests that a mark of the professional in the future will be writing functionally (in ML). The modularity practices seem like the Right Thing, useful for the functional programmer as well as the OO, but if your code could be formally verified, how much more confident would you be that it was correct for the general case? Simple testing is nothing like a proper proof.
But who ever writes proof-carrying code?
Saturday, August 04, 2007
further readings: one day, I'll have something coherent to say about type systems
The first finder of any error in my books receives $2.56; significant suggestions are also worth $0.32 each. If you are really a careful reader, you may be able to recoup more than the cost of the books this way.
However, people who have read the book Eats, Shoots & Leaves should not expect a reward for criticizing the ways in which I use commas. Punctuation is extremely important to me, but I insist on doing it my own way.
*laughs* We love you, Don.
Also: there's so much to read in this life. I've recently picked up books on proper C++ technique, security, and proper unit testing, and I'll probably give those some priority on my ever-growing Queue. Of course, there's all those books on statistical NLP that need to get read in the near future if I'm going to be of any help to anyone.
I've been in on a few conversations recently about C++ and pitfalls and bugs that can arise when using it. The more I think about these, particularly random language-specific casting rules and several different competing ways to represent strings, the more I think that Haskell is going to be a good idea. Or possibly SML.
Thursday, July 26, 2007
(ping)
But! In the last few months, I've graduated, got a paper accepted to a conference, taught six weeks of summer camps to enthusiastic middle- and highschool kids, and made all the preparations to start up work with the Goog. My first day is Monday.
Topics that I've been looking into and will hopefully post about soon:
- Haskell -- maybe one day I'll have a more consistent opinion about how I feel about static vs. dynamic typing. Writing here on the issue will probably help sort it out. Or just building something big with Haskell.
- Statistics. I went out and bought All of Statistics and I've been thumbing through it a bit.
- CS Education and edutech. Good goodness, education. I've spent most of my summer with the childrens, trying out different ways of convincing them they want to know what I think they should know. It's been going well, for the most part.
- GWT and associated topics in Javascript and Ajax. I'm joining the GWT team in just a few days, so I'm working pretty hard on learning it!
Friday, May 25, 2007
more exciting edutech!
It's really easy to figure out, especially if you've seen things like the LEGO mindstorms interface, or Alice -- commands snap together with a familiar building-blocks metaphor. This is to say that there's a fairly standard vocabulary for childrens programming environments, these days...
The Scratch intro "Facilitorial" video is here.
Also fairly interesting (and brand new on my radar as of today), is Greenfoot, which is another educational programming environment, perhaps for slightly older kids. It makes it easy to do simulations with different kinds of "actors" on these nice 2D worlds (they can be grid-worlds, but they don't have to be)... although you have to write some Java, it looks like, to build up your new behaviors. Maybe this is awesome too.
Wednesday, April 25, 2007
you'll probably tell me that Emacs already does this
How useful would that be for you?
Monday, April 23, 2007
retrocomputing from the other side of the pond
In the early 1980s, the BBC started an initiative called the BBC Computer Literacy Project, a major part of which was the production of the BBC Micro, a machine produced by Acorn Computers, complete with its own line of peripherals including expandable memory and various pluggable co-processors. There was an associated television show, The Computer Programme, which ran in various incarnations through the decade and featured music from Kraftwerk. The computers came with BBC BASIC, a rather more advanced system than the BASICs that were shipping stateside -- it had proper named subroutines and if/then/else, features most users on the MS-DOS side of things wouldn't see until QBASIC.
The mind-blowing part of the project was Telesoftware, whereby computer programs were sent embedded in the broadcast television signal, using Teletext, which is how the closed-captioning data was sent in Britain at the time. Analogue technology like broadcast TV feels so alien these days... but the Beeb was busy using it to send example programs to eager learners at home.
There seems to be a pretty active online community of BBC/Acorn enthusiasts out there, two and a half decades later.
You know how to use the Googles, of course, but here's another, more detailed overview of the BBC/Acorn system.
Wednesday, April 18, 2007
java 6: apparently even less of a loss than java 5!
Well, I'm excited anyway. The new Scripting API provides a standard interface for embedding other languages in Java and making calls between the two. See if there's already a project to handle your favorite language here -- there probably is, unless you like Common Lisp. There's even a mechanism for manipulating namespaces in the embedded language, pretty snappy.
Apparently recent releases of Jython already have hooks to support the new API. Maybe the next version of JES should be rewritten with that in mind, say once Jython 2.2 is stable. And perhaps we'll see ABCL ported to the new standard...
Also in Java 6, the built-in support for splash screens is kinda cute. And they're saying that the whole shebang is faster and prettier. Good job, guys!
Tuesday, April 17, 2007
tools for blogging and reading
Graham suggests that this would be better with online storage -- it could sync up with your del.icio.us bookmarks and keep track of what you've already blogged about. Perhaps someday soon I'll be cool enough to use del.icio.us.
Speaking of reading things on the web and managing one's reading -- please allow me to direct your attention to BibDesk and Skim, a pair of apps for the Mac designed with your reading pleasure in mind. The first is a bibliography manager that works with BibTeX format and has a lovely UI and lets you drag references around and whatnot, and the latter is for reading, highlighting, and annotating your papers, which is traditionally pretty difficult with a PDF.
The downside of these is that they're Cocoa apps and Mac-only, but they're pretty much what I'll want to build when I get around to putting together that cross-platform Python paper manager thing I've been thinking about...
Thursday, April 12, 2007
things that start with p
I've taken to using jar to deal with .zip files, so I can use consistent tar syntax and don't have to remember how to use the zip options. But! The bash_completion file for Ubuntu doesn't include ".zip" as an extension that it looks for when tab-completing files for jar, oh noes!
Easy enough to fix, right? I pop open /etc/bash_completion and start searching for "jar". There's a section near the second occurrence that looks like:
_filedir '?(e|j|w)ar'After some fiddling, I change that one line to " _filedir '?(ear|jar|war|zip)' ". And it works! For reference, that the _filedir function looks like this. It's painfully obvious to everyone what this does, yes?
To be totally fair, there's some explanatory comments right above it... but it's obtuse things like this that make we want to switch to a shell with a more sensible scripting language. bash is often line noise. We claim that allowing users to modify their environments to fit their needs is one of the major benefits of Free Software, but are we doing enough to encourage that? How is your mom supposed to pick up bash script? It seems like scsh isn't meant for interactive use as your daily shell, but what if your everyday environment had a more modern language embedded in it? Are things like that already out there?
Also: speaking of Scheme embedded in things, JScheme is a dialect of Scheme with a very simple interface to Java, called the Javadot notation . It's by Peter Norvig and crew, fairly recently updated and feature-complete. Also on Peter's (fantastic) site, you can find his older "mercilessly small, easily modifiable version". I very badly to embed this in JES. Media Computation in Scheme ahoy.
Monday, April 09, 2007
Alice wants him. Bob fears him. Charlie wants to be him.
My favorite so far: "Bruce Schneier writes his books and essays by generating random alphanumeric text of an appropriate length and then decrypting it." -- Bruce Schneier in the comments
Saturday, March 31, 2007
list comprehensions!
tenpercent = len(lines) / 10
testset = random.sample(lines, tenpercent)
trainingset = [line for line in lines if line not in testset]
Python makes me warm and fuzzy on the inside. Also, random.sample() is pretty sexy!
Wednesday, March 28, 2007
brains 'n' balancing training data
If building classifiers is your thing, you may be interested to take a look at these articles:
- Gustavo E. A. P. A. Batista , Ana L. C. Bazzan, and Maria Carolina Monard: Balancing Training Data for Automated Annotation of Keywords: a Case Study.
Three researchers, seven middle names, one novel technique for building balanced data sets out of unbalanced ones for training classifiers: generate new instances of your minority class by interpolating between examples actually in your dataset. I'm still trying to decide whether this approach should work for the general case -- does it make too many assumptions about the shape of the space? Particularly: can you arbitrarily draw lines (in higher-dimensional space) between positive instances? What if there are negative instances between those two? Which dimensions do you look at first, and how is this better than just adding some noise or weighting positive examples higher? (is that last option the same as simply counting them several times?)
- Foster Provost: Machine Learning from Imbalanced Data Sets 101.
A basic overview of the problem, examining the motivation for building classifiers at all and some different approaches to sampling. The award for Best Name Ever goes to Dr. Foster Provost.
Friday, March 23, 2007
reading feeds over the web
It is the future. We've got dynabooks and memexes, and we use them to distribute pictures of cats doing cute things.
O my vast readership, I address to you this question: how do you read news online? Do you have some separate feed reader program? Do you use your browser's RSS features? Google Reader? Your LiveJournal friends page? Something else?
And moreover: for the LiveJournal denziens, does anyone know of a good method for reading "friends-only" posts through Google Reader? There are a few posts out in the world on this topic, but nobody seems to have a decisive answer yet... perhaps we can answer the question definitively.
Monday, February 26, 2007
Ripping DVDs with Free Software!
But Apple's DVD player won't play DRM'd disk images, of course.
However! Here's a very nice howto for some very friendly software for Linux, Mac OS X, and BeOS (I know you've all got BeBoxes out there) that'll make video files from your DVDs, no sweat. Super-easy to use. Your mom could do it.
Thanks for the link, Cory Doctorow!
programmable tab completion: you may already have it!
It turns out that this is a feature known as Programmable Completion, available in modern versions of bash and enabled by default in Ubuntu! Who knew?
For example, the Ubuntu version of the programmable completion only fills in ".java" files when you're issuing a "javac" command, and it auto-completes class names (but not .class files) when you're trying to run a Java program from the command line. Flippin' sweet.
Monday, February 05, 2007
Programmatic poetry: oh noetry!
Anyway, it turns out that there are non-me people interested in this sort of thing, and the ever-helpful Graham has pointed out a bunch of interesting things happening in the field!
- The prosthetic imagination is a blog by a one Jim Carpenter, who's been working on Erica T. Carter (aka "the electronic text composition project", mentioned on GrandTextAuto here), which uses probabilistic grammars to generate free verse poems. I think the output is pretty convincing ("convincingly what?"); according to Mr. Carpenter, it's rather unnerving to readers who've been informed that they were composed by machine.
It's interesting how people react, when confronted with "creativity" from a non-human source; one is reminded of Douglas Hofstadter's surprising reaction to David Cope's lovely work with algorithmic music composition, which makes music, in a sense, in the style of other composers.
I'll have to read more, but I'm not entirely sure, if it's just using hierarchical grammars, how Erica is different from The Postmodernism Generator (the best-known use of the world-famous dada engine)... but I'll report back on this later.
- There is an Electronic Poetry Center at Buffalo. Interesting!
- Gnoetry is another system out there, and a very prolific one at that, apparently connected to this super-fascinating Beard of Bees publishing group. Language is a prosthesis of an ancient neuro-chemical regime; but now the chemical author is dead. Gnoetry places language at a remove from its typical sources: pre-conscious governance, psycho-historical flux, conscious-mind narration.
- At upenn, they have a series of readings, M^<4|\3, with all sorts of "literary uses of technology" things going on, including, next week, Flarf poetry (!) .
- Speaking of literary uses of technology, the GTR Language Workbench looks like something between Eclipse and a word processor... I'm not quite sure what to make of it yet.
I'm all excited. Let's get hacking.
Tuesday, January 30, 2007
begging the question, language composition and orthogonality
And I've come to the point in my life where this doesn't bother me anymore, despite the fact that I know the technical rhetorical sense of "begging the question" -- an argument presupposing what it's trying to prove, often implicitly. I prove that unicorns exist thus: all those magical one-horned horses out there are unicorns. I prove that there's an objectively extant material world by kicking a rock and hurting my foot.
This post, of course, begs the question: will I be secure enough as an armchair philosopher to start using the phrase in the vernacular sense? I'm torn: there are few things I like less in the world than prescriptive grammar, but few things I like quite as much as precise, expressive expression.
Wednesday, January 24, 2007
gmaps and quicksilver
Also: my ATLhack compatriot Erik introduced me to this really nice interface tweak for Mac OS X -- quicksilver. It lets you do a lot less mousing on the Mac, which is a pretty welcome change -- a quick key-tap, and it pops up a window where you type the first few letters of something, say an application or a folder or whatever, and it searches out what you probably mean! It seems like it's more efficient than reaching for the mouse, and for right now I've taken everything off my Dock to see if quicksilver is a viable replacement. Thanks, Erik!
Thursday, January 18, 2007
Run and jump on that gmaps bandwagon!
Maybe not as immediately useful as Gmaps Pedometer, but it'd be fun to put together. The API looks kinda neat, and I should learn this newfangled Web 2.0-AJAX-web-services schlock one of these days...
Wednesday, January 17, 2007
Mapping and reducing is like popping and locking for programmers
Previously, I'd thought about mapping functions onto lists as an operational thing, a set of steps to complete, but that's not the cleanest way to think about it. Mapping is actually a special case of "reduce", an operation where you just go through and replace the all the "cons" functions in a list expression with something else, then evaluate the expression again. "map" functions have a cons in the function they're reducing with, so the end result is another list.
For example: you might write, in lisp: "(mapcar #'(lambda(x) (* x 2)) '(1 2 3 4))", yielding (2 4 6 8).. and you might think of that procedurally... but a map is just a reduce where "cons composed with the mapped function" replaces every "cons". Append can be written similarly; it's all essentially just replacement, function composition and evaluation. The paper also goes into beautiful issues like lazy evaluation (the author says that if he wrote the paper now, the examples would be in Haskell!) and continues to do some lovely examples, some numerical and one very close to our heart: a bot that plays tic-tac-toe, optimally, with pruned game trees.
Years ago, Kurt Eiselt told me that the future of computing was going to be functional languages on very-parallel hardware; functional languages, at least in principle, make synchronization easier by limiting or removing-altogether side effects. (although reconciling this idea with stateful, event-driven end-user applications is another issue!) To an extent, it looks like he was right, and the future is here! MapReduce is the method Google is using to crunch super-giant datasets with enormously parallel clusters. It's not just for functional languages, of course, but the idea is there.
Friday, January 05, 2007
Possibly interesting, but almost definitely not useful!
- Self. It's been ported to Linux. It's one of those languages that one feels like one should learn more about. It has interesting family relationships with SmallTalk and Dylan and JavaScript...
- Thinking Meat celebrates the holidays. I just found this blog, but over at the Thinking Meat Project, she has a lovely article about taking part in the culture around the holidays and coming to terms with the cognitive dissonance from enjoying good Bach choral music while feeling like one shouldn't be participating in religious rites, for consistency's sake. It can hard to balance these things, particularly soon after giving up a faith.
Friday, December 15, 2006
Help me, Don Knuth, you're my only hope!
You can only use figures if they're in pdf format, but the error message for when you try to use eps is non-helpful.
Maybe this will help someone some day.
Monday, December 04, 2006
rapid-feedback poetry and lisp environments
Hey, speaking of development environments! On Lemonodor, I just found out that there's an Eclipse plugin for writing Lisp called Cusp. It uses SBCL and swank, like all right-thinking lispers, letting you do SLIME-like things without Emacs -- SLIME being the currently en-vogue common lisp development environment, and swank being the backend. There's a similar project out there that I've been watching too -- Slim-Vim, which is an attempt to make that same swank code work with vim. (the mailing list has been a little quiet, but it might pick up steam again)
Saturday, December 02, 2006
python generators and more live coding music!
- yield keyword from the Python docs
- a discussion of generator functions over at IBM Developerworks.
Also! Brett alerts us to Impromptu, another live coding environment for making music and stuff! From their site:
Impromptu is an OSX programming environment for composers, sound artists, VJ's and graphic artists with an interest in live or interactive programming. Impromptu is a Scheme language environment, a member of the Lisp family of languages.
Sunday, November 26, 2006
What, he keeps on posting about pluralism and that Sam Harris guy?
The Pluralism Project at Harvard
Interfaith Youth Core
IFYC was started in part by Dr. Eboo Patel, who gave a very nice interview on NPR, which I remember hearing on the radio when it was broadcast. He also wrote a This I Believe piece.
Sam Harris still isn't convinced, of course. But you'd think they could come up with a better debating partner for him than Dennis Prager? (there's a fairly interesting email debate between them on jewcy; he must not have read my previous post, Sam didn't, because he didn't address my concerns.)
Genetic algorithms for Dr. Mario Strategy!
The interesting thing about this -- he's hooked his evaluation function for evolutionary candidates into the NES emulator. Pretty clever stuff!
Saturday, November 25, 2006
"I know you don't know..."
But it might just be because I'm inclined to agree with what he's saying. I've been trying to work this out systematically. There are some very clear ways in which religion-inspired positions can be detrimental to people's health and happiness -- we've got the oft-cited condoms-in-Africa and the stem cell research and the homophobia... and all sorts of positions, say environmental ones, that you would rationally take if you thought that these were the End Times, that Jesus was coming to save the day in the next 50 years or so -- which supposedly almost half the country buys into. And that's just not a healthy belief for people to have, if the rest of us want to establish a sustainable living environment for people in the long-run.
And deep down inside, I think a property of people (for now) is that we want a holy war -- we need something to rally against, some sort of emergency situation to respond to. And we think, "well, this is wrong. These well-meaning people are misled, and it's so pervasive, particularly in this country, and you can't really talk about it..." So they're talking about it, Harris and Dawkins are.
However, I think where Dawkins and Harris fall down is in two major ways:
Firstly, not all religious people take all the purported beliefs of their religion to their logical extremes (and why not is an enormously interesting issue). This is a central point in Harris' argument, and I'm trying to work out what I think about it -- he says that religious moderation and pluralism essentially ropes off faith from rational discourse and makes it okay to believe whatever you want, and nobody's going to question it, which provides cover for extremists... and as moderately-minded folks, we have trouble believing that people really believe this schlock, but he assures us that they do -- and that genocides and jihads really aren't just about economics and education like we want to believe they are, but are honestly religiously motivated.
And yet the world is full of people who identify with one particular faith and still do wonderful things for the world. Many Christians feel the need to be good stewards of the planet, they save the water and the air and the narwhals, they feed the hungry, they provide medical attention all over the world. And many are full of love and hope and tolerance, and they stand up for their gay friends and make beautiful works of art and fill the world with music.
Of course, these people might do these exact same things without religion -- maybe they're just beautiful people. But then, in a world without faith, I wouldn't be writing this post. So it goes.
Secondly: the biblical god is perhaps not in the same class of entities as Zeus or Inari, and I think it's an oversimplification to put statements like "there is a giant diamond buried in my back yard" (an example from Harris) in the same class as statements about the nature of a more abstract deity -- at least without further examination. Now the idea that Jesus is physically coming to end the world soon, maybe that's in the same category as the giant diamond, but what about the proposition that there's an inherent moral structure to the universe, or that your dead friends and family aren't really gone? Or that things Will Ultimately Work Out? ... Of course "I wouldn't want to live in a world where X is not the case" isn't really a knock-down argument to convince us of any of these things.
So anyway, BG, as we'll call it, is something a little different, with a fluid identity somewhere between that of Zeus (the old-testament local sky-god, rooting up the local fertility cults and being mad at some people while briefly favoring others), a mythological sun-hero, and something like a Lucasian Force or the Tao or even identifying with all of the world, like you might find in Spinoza.
Richard Dawkins had quipped that everybody is atheist about most of the gods that have ever been dreamt up -- some of us just go that last step. And I think that's an oversimplification, because for a lot of people, god is just that abstract-orderliness-principle... if your view of god is, like this fellow RJ Eskow puts it, the sheet music of the universe, then this isn't all that different from believing in causality and some initial state of things, is it? And don't a lot of people hold beliefs like that?
I think what Sam Harris really gets at is that it's almost taboo to talk about faith as an absurdity in polite society. Many people get really defensive about their theology, if you bring it up. There's this weird feeling of guilt, at least for me, being an unbeliever bringing this topic up. I don't believe like you believe; in fact, I think you're wrong about some pretty fundamental things and I'm trying to gauge whether it's harmful. And that's where the guilt comes from, I think -- we're faced with the prospect of explaining to our loved ones that they and some large chunk of society hold possibly-destructive beliefs. It feels wrong because we know folks who are nicer people than us (and furthermore more devoted social activists) and it's hard to find fault with them and what they believe -- no harm, no foul, right? Is it so destructive to believe in a universe that has some sort of underlying order to it, that wants, in some sense, for you to be nice to people, wherein you identify the BG with a kind and loving parent?
I mean, it's Wrong, of course. And I still haven't addressed Sam Harris' idea that toleration and letting people believe what they want provides cover for fundamentalists. And the propositions that the wonderful and nice people hold true might even be largely the same as the ones that folks we might label as societally destructive believe in... this is a difficult and tangly problem. The mind is vast and greatly partitioned.
So at a higher level, do we believe in truth and the search for it, or is what we believe pretty much unrelated to any objective world that might be out there? And how can you possibly sit still when you know in your heart that you have this truth that's vitally important for everybody's eternal well-being that snot-nosed AI kids on the internet are calling schlock? Doesn't religious pluralism lead the way to trivializing religion as a whole? The idea that there's some abstract higher truth that's filtered into different societies in different ways is attractive to many, but I think it breaks down when you get into the specifics of what religions are actually saying. Unless everybody's just speaking in metaphors and hyperbole most of the time.
(This last cluster, the "abstract orderliness to the world" has its problems once you try to work out the details, of course. Particularly, it doesn't square with BG as well as many would like -- you start ascribing all of these perfections to BG, maybe with an aim to working out an ontological existence proof and then you're left with The Problem of Evil or justice anyway. Let's leave this to another post, or perhaps a book.)
(although many in Christian contexts have preached against the God-as-the-Force idea in favor of a more personalitied BG, Huston Smith interestingly characterizes Hinduism as encouraging whichever idea about Brahma one personally finds more worshipable)
Here are some interesting blog posts: alls I'm gonna say is that people who argue against Sam Harris seem to mostly rely on ad hominem attacks and the idea that he has a faulty moral compass.
- RJ Eskow: Reptiles of the Mind -- giving thanks for rational atheists
- RJ Eskow: The sad state of atheism today
- Sam Harris: In Defense of Torture (seriously, Sam, wtf?)
- Steven Pinker: Less Faith, More Reason
- Marty Kaplan: Atheists for Cheney
Wednesday, November 22, 2006
GWT and ChucK
But Google did, apparently! GWT lets you design webapps in terms of Java, running on your local machine for testing purposes. GWT then compiles them down to Javascript when you're ready to deploy for the rest of the world. I'm probably the last to find out. It's open source; you can go play with it if you want. Pretty crazy.
http://code.google.com/webtoolkit/
Also; after rather a while of hearing my friends work with and develop the music-programming language ChucK, I finally took the time to go play with it. At first I tried to use the Audicle -- which is a really pretty IDE, all done up in OpenGL -- but it crashed on my Mac, so I tried miniAudicle instead. That worked just fine, with a nicely intuitive, minimal interface. After just a few minutes, I was making some interesting bleeping-and-booping noises. It was very satisfying! I think I like the square-wave generator best.
ChucK definitely warrants checking out, if you have any sort of urge to make cool noises, or even cheesy music. Graham Coleman, who wrote said cheesy music tutorial and has in recent months been performing live with ChucK in Atlanta, was just now on the radio, and he proceeded to rock the airwaves pretty hard. Hooray!
Wednesday, November 15, 2006
The Enron Email Dataset!
The corpus is here!
(thanks, CMU!)
Sunday, November 05, 2006
"Here, lemme take a Pikachu..."
That wouldn't be that hard -- there's a pretty happenin' metric for finding rhymes, ready to go.
So you'd just have to have a list of the words for the domain you want to substitute in, make sure that you have phonetic descriptions of each of them (Bradley Buda's rhyme metric uses the CMU Pronouncing Dictionary's format)... then run through your input text searching for substrings that rhyme with words in your list with a score over some particular threshold. And hilarity ensues.
A similar technique could be used for generating phrases like "my feet are staying!" for "auf wiedersehen!" -- you could something hill-climbing-like (with a parser in the loop, so as to try to maintain grammaticality) to substitute out common phrases...
The only problem is -- what rhymes with "Psyduck"?