Older blog entries for brondsem (starting at number 43)

keychain gpg-agent pinentry problems

I use keychain to setup my ssh-agent and gpg-agent sessions so that it remembers my passphrases and I don't have to retype them every time I use them. But recently I was getting this error:

Error: Problem adding (is pinentry installed?); giving up

Digging into /usr/bin/keychain I found that it was having trouble running gpg --use-agent --no-tty --sign. Running that directly gave me this error:

gpg: problem with the agent - disabling agent use
gpg: Sorry, no terminal at all requested - can't get input

The problem turned out to be ~/.gnupg/gpg-agent.conf had an old entry pinentry-program /usr/bin/pinentry-gtk which didn't exist any more. Change that entry to /usr/bin/pinentry or delete it altogether. Note: you'll have to restart gpg-agent (killall gpg-agent && eval `gpg-agent --daemon`) for changes to gpg-agent.conf to take effect.

Hope this helps somebody, since none of my googling found this solution.

Syndicated 2007-02-07 02:26:54 from Dave Brondsema's Blog - Programming

19 Jan 2007 (updated 20 Jan 2007 at 19:05 UTC) »

Multi-threaded optimization?

At CodeMash today, the keynote was about Microsoft's upcoming LINQ technology that allows you to integrated SQL-ish query language into your .NET code. Or IronPython code. And query native objects (e.g. process) and query XML. Datasources are extensible, and functionality of the query engine is extensible. Pretty cool. I hope an RDF implementation is written, to bring RDF to all the .NET developers. I feel like there is probably a huge chasm between .NET developers and RDF advocates, however.

Update: Hartmut Maennel has developed a RDF driver for LINQ (see his previous two posts, too). After thinking about this more, a SPARQL driver would be better, except that there aren't many SPARQL servers.

One of the nice features about "declarative intent" programming in a query (as opposed to programmatically looping through a list and checking for matches), is that the query engine can do optimizations for you, like leveraging multiple processors/cores (which will be very important in the future, since that is the future of computing hardware). It made me wonder, though, if standard algorithms like Java's Collections algorithms take advantage of multithreading. Does anyone know? I sure hope it does or will soon.

Technorati tags: codemash

Syndicated 2007-01-19 18:35:18 (Updated 2007-01-20 18:39:47) from Dave Brondsema's Blog - Programming

CodeMash conference

Bruce Eckel is giving the lunchtime keynote right now :) And there is a challenge to get 500 CodeMash blog entries on technorati (blog post aggregrator) before the end of the conference. So here's my contribution to help get one of the coordinators to shave his head.

The first keynote was about Domain-Specific Languages. DSLs make it easier for end-users or business-analysts to read & verify your code, and maybe even right some. Dynamic languages that can support them pretty directly. In the statically-typed world (which I prefer), there are tool factories fro DSLs that are being developed. That means a tool to generate a language, AST tools for it, refactoring support, and content-assist in an editor. Sounds exciting.

Posts on politics & headlights later. I want to pay attention to this keynote :)

Technorati tags: codemash

Syndicated 2007-01-18 18:28:57 from Dave Brondsema's Blog - Programming

Re-search

Google indexes about 10 billion webpages. Maybe. It's hard to find a number. But it doesn't matter, because whether they index 10 billion or 2 million pages, I can't comprehend that number. I can read the number, but I don't really understand what it means.

But I'm starting to. I've been researching distributed trust networks on and off for a few years. Lately I've been doing more research in the area and finding tons of stuff that I hadn't seen before. Just by following links around and searching with slightly different phrases is revealing more and more stuff. My reading backlog is growing far too quickly :)

The most exciting things I've found are a mailing list for applied computational trust, and the T3 group which has lots of papers and event information available. I've been compiling most of my findings that are relevant to Konfidi (my distributed trust network project) at the Konfidi Research page.

Another way to try to comprehend it: if you looked at one page per second nonstop, it would take you 317 years to view 10 billion pages.

Syndicated 2006-12-19 12:56:32 (Updated 2006-12-19 17:25:27) from Dave Brondsema's Blog - Programming

Google shows interest in social trust networks

The Google Code blog announces the Net Trust project from Indiana University. L. Jean Camp, who wrote the blog post and is leading the work on Net Trust, presented at the Models of Trust for the Web workshop. I was at that workshop, also, presenting the Konfidi trust system.

It's not entirely clear how Google is involved with the Net Trust project, but it is great to see places like Google showing an interest in social trust networks.

After trying the Net Trust demo, and reading Camp's paper on it, it seems like a good start. There's room for improvement in the system architecture, and the UI. It's only a demo, and Camp is a strong advocate of GOOD user interfaces to help users deal with trust appropriately, so I'm sure it will improve. (Konfidi has lots of room for improvement too...) It'll be interesting to see how Google helps their project.

Technorati tags: googlekonfidimtw06trust

Syndicated 2006-12-02 16:52:50 from Dave Brondsema's Blog - Programming

Javascript RDFParser from Tabulator

David Sheets introduces himself and the new RDF/XML parser he added to the Tabulator all-javascript RDF browser. I've been using the RDF parser from Jim Ley in a generic JavaScript RDF Editor (to work with any OWL/schema files; no public release yet, but let me know if you're interested, especially in helping out). So recently I worked on using Tabulator's rdf parser to see if it was better. It seems to be designed a bit better (separate data store from parser from XML loading) and David's post says it is more accurate and often faster.

I had been hoping to find some additional functionality to use in my JsRdfEditor. Namely, modelling the RDF document instead of just getting all the triples. For example, knowing where a nodeID was used, and the XML arrangement of the triples. That way the JsRdfEditor could parse a file, add some triples, and output a new document that is arranged much like the one that was loaded. But no luck there; sounds like I'll have to add that capability to the parser myself, if I want to have elegant RDF/XML output.

So here's how you can use Tabulator's RDF Parser in your own projects:

  
// depends on:
//  dig.csail.mit.edu/2005/ajar/ajaw/rdf/term.js
//  dig.csail.mit.edu/2005/ajar/ajaw/uri.js
//  dig.csail.mit.edu/2005/ajar/ajaw/rdf/rdfparser.js

// TestStore implementation from dig.csail.mit.edu/2005/ajar/ajaw/test/rdf/rdfparser.test.html
// see also RDFIndexedFormula from dig.csail.mit.edu/2005/ajar/ajaw/rdf/identity.js
//  (extends RDFFormula from dig.csail.mit.edu/2005/ajar/ajaw/rdf/term.js no indexing and smushing)
// for the real implementation used by Tabulator which uses indexing and smushing
var store = new TestStore()
var parser = new RDFParser(store);
parser.reify = parser.forceRDF = true;
// forceRDF isn't used??


var url = 'http://something.or/other';

// get the XML
var xhr = XMLHTTPFactory(); // returns a new XMLHttpRequest, or ActiveX XMLHTTP object
if (xhr.overrideMimeType) {
    xhr.overrideMimeType("text/xml");
}
// the "data/" path and encoding is just how I store files locally
xhr.open("GET", "data/" + encodeURIComponent(encodeURIComponent(url)), false);
xhr.send("");
var nodeTree = xhr.responseXML;
if (nodeTree === null && xhr.responseText !== null) {
    // Only if the server fails to set Content-Type: text/xml AND xmlhttprequest doesn't have the overrideMimeType method
    console.debug("no responseXML, parsing responseText");
    nodeTree = (new DOMParser()).parseFromString(xhr.responseText, 'text/xml');
}
// must be an XML document node tree
parser.parse(nodeTree,url);

// use FireBug extension to inspect console.debug'd objects
// Using TestStore you can access store.triples
console.debug('store',store);

Technorati tags: javascriptparserrdftabulator

Syndicated 2006-11-25 23:43:01 (Updated 2006-11-25 23:43:43) from Dave Brondsema's Blog - Programming

Great Lakes Software Excellence Conference; and not doing TDD


Last week I got to go to the Great Lakes Software Excellence Conference. It was a very good one-day conference (plus workshops the day before), especially since it was local. There was a developers track, a process track, and a testing track. All had good presentations; lots of them focused on agile methods and many emphasized the value in good people and good relationships. Thanks to the organizers: XP West Michigan and the American Society for Quality! It was fun to see fellow Calvin CS alumni at the conference :)

I'd like to use more agile methods and test-driven development at work, but our department is very very small so we each already wear many hats and we don't overlap much. That makes pair programming difficult. The presentation on pairing suggested that you could pair on other tasks too, like writing the requirements doc, or testing, which I think we could do effectively. For test driven development, this may be heresy, but I don't think it's worth doing for many of our projects. The processes & data for which we write software are not critical to our organization. Sure they're useful, but their not critical. (We used purchased software to do all our core business functionality). All the software that we develop are very useful but are not critical. In fact they are so far from critical that virtually all bugs in "production" are actually acceptable. The cost to do TDD does not offset the cost of not doing it.

Technorati tags: glsecTDD

Syndicated 2006-11-03 02:28:31 from Dave Brondsema's Blog - Programming

URI structure

Non-nerdy abstract: some folks like to do all sorts of crazy things with what you simply know as a URL or website address. We abstract them to be names with no content, or internationalize them, etc, etc and call them URIs, IRIs, XRIs, etc. This is about the semantic structure of a URI.

A while ago there was some discussion started by Norm Walsh on the use of URIs using schemes other than http: . One direction the discussion took was that specifications for other schemes provided a human-readable description of how the URI was to be constructed. For example, the URN:ISBN specification has a "Declaration of syntactic structure" explaining the four parts it contains. Using the http: scheme for all our URIs means (at best) we'd have non-normative descriptions of the URI structure.

Today, however, I came across Marc Hadley's URI Templating post, which includes a link to a draft specification for URI Templates. This would mean machine-readable URI structure declarations (better than human-readable spec documents, on many levels). I think it's a great start.

The trouble still lies in how to discover a URI Template, given a URI. For URIs used in web apps, a WADL document you already have could reference the template. And I bet WSDL 2.0 can do something with URI syntax, since it supports descriptions of REST APIs. But URIs can be used in so many other contexts (even offline) where discovery would be probably impossible. URI Templates may be provided by a 3rd party, so even having the template located at some special URL (e.g. robots.txt) or referenced in a URL document (e.g. favicon) would not necessarily be ideal.

Technorati tags: httpURIuri templateURL

Syndicated 2006-10-06 22:08:32 from Dave Brondsema's Blog - Programming

alternative to logging

log4j and it's siblings are really nice. Aaron Farr discusses a few problems with it and IoC (Inversion of Control) and references some other blogs & Avalon stuff. I haven't yet read the Patterns book, so I don't exactly know what IoC or a Monitor means. However the Avalon wiki page referenced from his post makes an interesting point that logs are often used as stringified callbacks. return values are useful too.

So here's my question: can we some use Aspect-oriented solution and reflection to automatically log all method calls and their return values? Perhaps with a (x)doclet to give some fine-grained control over the logging. 80% of my logging is for debugging to get a "trace" of the code execution without connecting a debugger. This could pretty much automate that.

Comments | TrackBack

forrest: I always make my task bar two rows high. i suppose if even that gets too cluttered you can make it three rows high.

34 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

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!