Caveat for for many of us overly rational thinkers: the powers that be deliberately are allowed to 'interpret' this code nondeterministically by many different means including its 'spirit,' admissibility of relevant information, manipulation of venue and participants, apparently even extrajudicial proceedings lately. In short, that allows a lawyer to answer almost any question with "it depends," and start billing.
You make this sound like a bad thing. Would you really prefer "black and white" laws that leave zero room for flexibility or interpretation in light of a given situation?
The entire US Code is now online in XML
91–100 of 244 posts
Re: The entire US Code is now online in XML
#92I'm really tempted to collect the XML files and put them on github, with periodic checkpoints to update it with the latest. Watching the evolution of law over time is a fascinating thing and using SW engineering tools to help would be really fun.
This is currently done via scraping: https://github.com/divegeek/uscode The diffs are huge.
I'd be surprised if we couldn't write a parser for bills to produce more efficient diffs.
Re: The entire US Code is now online in XML
#93Caveat for for many of us overly rational thinkers: the powers that be deliberately are allowed to 'interpret' this code nondeterministically by many different means including its 'spirit,' admissibility of relevant information, manipulation of venue and participants, apparently even extrajudicial proceedings lately. In short, that allows a lawyer to answer almost any question with "it depends," and start billing.
At least for me, accustomed to logic, determinism and mathematical models for laws of nature, this was actually a surprise. Instinctively I still find it distasteful, though I can't say I have anything better to offer other than the unrealistic ideal that all judges would be guaranteed to be truly impartial. I have never directly benefited nor been harmed by the nature of this 'code' either, unless you count getting…
Even this isn't necessarily a good thing. Part of the value of a judge is having an empathetic element in the position of final arbiter. Decisions aren't always "GUILTY / NOT GUILTY"; they're often long-form essays discussing the merits of the case, the factors under consideration, the logic and reasoning behind the ultimate conclusion and so on.
Math is nice because it can be reduced to a symbolic language. We're not at the point where we can reduce human beings to symbols yet.
Re: The entire US Code is now online in XML
#94For those of us who don't know anything about it, what are the uses of machine readable law?
The law can be interpreted as a set of rules matched against an action in a particular context to determine whether said action is legal. Right now lots of people do this manually. Maybe computers can do it better. If computers can do it better, maybe people could focus on writing new laws and refactoring old ones instead of repeatedly interpreting old laws for each case.
If we could invent a computer interpreter that acts as a judge, laws and contracts being its code might make it obvious to lawyers why it doesn't make sense to allow code to be patented.
Every time lawyers would write laws or contracts they would have to avoid using legal ideas that have already been patented subjecting them to the same legal difficulties software developers face every time they write code.
I guess I should patent that invention.
Re: The entire US Code is now online in XML
#95Earlier quoted context omitted.
Laws are essentially diffs against the US code. The diff (slip law) is canonical. They are continually compiled into the US code, which can involve deleting or changing text just like a diff, and periodically an edited, annotated code is published. After a certain amount of time, Congress enacts a portion of the published code, making it canonical and overriding any prior slip law. See: http://en.wikipedia.org/wiki/U…
What we need now is software that reads bills ("in section 123.abc the text 'blah blah' is replaced by 'bleh bleh') and compiles it into before/after views of what the resulting code would be.
Someone needs to take the plunge and start writing the program; throw it on Github and tell us all about it. I know people who are looking for such a tool.
Re: The entire US Code is now online in XML
#96I'm really tempted to collect the XML files and put them on github, with periodic checkpoints to update it with the latest. Watching the evolution of law over time is a fascinating thing and using SW engineering tools to help would be really fun.
Re: The entire US Code is now online in XML
#97Re: The entire US Code is now online in XML
#98This is awesome. They even have a stylesheet apparently. However though the file claims to be UTF-8, vim seems to disagree, at least for title 10. I can't tell what encoding it really is though, doesn't seem to be latin1 or windows-1252 either.
I did notice the section references look a little strange in vim, e.g. "act Aug. 10, 1956, ch. 1041, § 1" near the top; it consists of c2 a7 (section sign), which looks fine, followed by e2 80 af (narrow no-break space), which shows up as a box in vim.
Re: The entire US Code is now online in XML
#99I'm really tempted to collect the XML files and put them on github, with periodic checkpoints to update it with the latest. Watching the evolution of law over time is a fascinating thing and using SW engineering tools to help would be really fun.
Re: The entire US Code is now online in XML
#100does that mean these are all the current federal laws?..