posted on 2008-02-29 19:39:36
I finally finished SICP Section 1.2 last night. I'm tremendously excited because this means that next week I can start tackling Higher Order Functions and (I hope) Closures. At any rate, here is the last month's work:
posted on 2008-02-29 00:24:09
Living with Ben was pretty bad ass. We stayed up late arguing about stuff that only one of us really knew anything about (computers or philosophy), made crazy playlists, played smash bros, and generally had lots of fun. Dan was awesome too but he just hid in his room a lot and then popped out and surprised everybody with amazingness. You wouldn't know it from looking at the guy but he was totally the comic relief.posted on 2008-02-28 18:08:57
This is probably the most succinct way to put what I'm, in part, getting at. Make no mistake, I will flesh out that essay...it just might take a while. For now, I'm back to programming. More soon though guys.posted on 2008-02-27 05:27:22
Every now and then I see, hear, or read something that sets my brain on fire. I find some connection that I didn't notice before and go off exploring. It happened a week or two ago over lunch at work. Occasionally there are lunch meetings around work-related activities that you can voluntarily attend. This particular lunch had us watching Paul Hawken's speech at Greenbuild 2007. It set the old wheels turning and the dominos toppling over. This is what spilled out...
For me, I think this all started formally with Thoreau. He was the first person who promoted an idealogy that I both a) actually heard and b) identified with. This would've been in the 11th grade. Prior to this I was more or less an anarchist and held no ethos as my own. Long story short, I've moved on but the transcendentalists sort of hold a special place in my heart. And the thing is, while I've hung onto Walden like a treasure I haven't read it in too long. So when Paul Hawken started mentioning transcendentalists in his speech it was a moment of revelation for me as I came full circle.
There's a crystallization of my beliefs here that has taken years and is an ongoing journey so bear with me. The older I've grown the more interest I've taken in the notion of Historical Progress, or at the very least, of charting where the universe has been and where it's going. Particularly in the last two years or so, thinking about forms of social organization and things like Robert Wright's Nonzero and Ray Kurzweil's The Singularity is Near have been interesting brain food. Of course, I've also been following Open Source, flirting with the environmentalists, and trying to figure out the lispers. And I think I see what I identify with and agree with in it all.
You see, I have this 90% theory. The theory states that at least 90% of human labor is expended to maintain the status quo and that only a fraction of our energy can go to what we care about or to new and creative things. This has come about because of increasingly complex social strata emerging as political and economic forms cave under the growth of civilization. Not western civilization but all civilization. It's a growing interdependency as Robert Wright describes.
He's more or less nailed it. And this interdependency has occurred through large centralized institutions (particularly corporations and governments) that have driven forward economic progress at the price of independence. It's much harder in the 21st century to figure out how to completely sustain yourself in your basic survival needs without withdrawing from society altogether. The sort of experimentalism that was possible by providing for oneself outside of the traditional means is no longer a realistic goal. We have boxed ourselves in.
This seems to me an ethical issue. It is not an ethical issue because consumerism or capitalism is wrong but because one of the lauded premises (whether actual or not) of our nation was some increased degree of influence over one's destiny. In the present day, this influence is lacking if one wants to live in a social setting but with strong self-provision of needs. This frontier opportunity has gone missing on both the frontier of new societal forms and the independent pursuit of sustenance through life, liberty, and happiness.
This is not, it is important to note, the fault of capitalism or democracy. Rather, these are the limits of these systemic forms under burdens of complexity they are not equipped to handle. They have become our Golden Hammers. (A recent e-mail from a dear friend and former teacher of mine eloquently expresses distress over this fact.) In short, the promised revolutionary nature of America has been lost. The Internet is another thing that has been lauded as inherently free. And like the FSF and Open Source this meant free in the context of freedom, libre, not free as in beer.
Lawrence Lessig was the first to note to us that the internet is not inherently free. That being a man-made thing, like a government, the internet was subject to our control and thus could have its freedom removed. Whether or not that is occurring right underneath us remains a subject of debate. I contend, however, that is has already occurred with regards to our nation and, thanks to globalization, much of the "westernized" world. We are buried under the mountains of our own bureaucracy; democracy and capitalism have become organizational forms which limit our innovation and our efficiency. Most importantly, this has impeded our capacity to do what we love.
And I feel like that is what the transcendentalists realized so long ago. They saw it coming and just maybe saw some of the things we stood to lose. Paul Hawken says Emerson realized that "It's all connected". That's why Thoreau reasoned his way into jail, because if he paid taxes while Texas Rangers raped Mexican women he figured it made him a rapist. That's why my friend Alexa saw people in South America who lived in poverty and slept on the job and instead of asking why they weren't like us, asked why we weren't like them. And that's why Richard Stallman found ethics in software (namely a printer driver). It's why a British journalist decries college and lispers wage a near religious war on tedium and repitition.
These all seem like strange places to find ethics. And maybe they are. But this seems to be the strand that ties together article after article I read about why college is unnecessary or high school is drudgery or work is slavery. And I think if I had to give it a name, I could only call it Efficiency. Because we're just not as efficient as we'd like to be. We've finally lost the right to enough of our time that we're jealous about it. There's a recognition that there should be a way to keep society going without all of us dedicating all our time to make sure that it's still there tomorrow. And in come the environmentalists, shouting about the world we leave our children, talking about building to last.
And if there is one question I'm interested in answering it's this: Surely, there is a way for us to restructure society so that only 70% of human labor or 50% or less has to go to maintaining the status quo. Right? Then the rest could go to creativity or innovation or progress or us. I think there is and I'm not opposed to spending my life trying to answer the question. There do thankfully seem to be a number of revolutionary trends coming about, some of which are already well in swing. But it's late, I have work tomorrow, and much as I'd love to I have to call this a wrap for one night.
posted on 2008-02-26 21:50:16
as part of a getting things done streak. You know? Like, learn x y per z. Anyway, aside from reading SICP and writing code, getting it posted on here, and getting this essay up these are the other thing I've been lagging on:posted on 2008-02-26 17:42:19
and the NSA/Telcos lawsuits are still going. The Bush Administration is still saying it was necessary to wiretap the phones of hundreds of millions of Americans without warrants. The Government is still pushing to grant retroactive immunity. And it's generally a whole big mess. Doesn't anyone (in our Government) care about privacy or the violation of the Constitution?posted on 2008-02-15 18:44:31
I knew this day would come sooner or later. I finally ran up against a task that was perfect to use Unix Pipes for. I needed to rename 2335 MP3s and I did it in 1 minute and 40.686 seconds.
time find ./ -type f -exec rename 's/b-mtp-[0123456789]*/mp3/' {} ;
du -S / | sort -nr | head -n50 > /home/redline/Desktop/50large.txt
posted on 2008-02-14 04:18:01
Eduardo Galeano, Voices of Time, Soul in Plain Sight, pg.98:posted on 2008-02-07 03:25:28
A little over two weeks ago I came up against Exercise 1.12 in the venerable Structure and Interpretation of Computer Programs.
The exercise wants you to write a recursive program to compute elements of Pascal's Triangle.
This exercise has pretty much infuriated me and it's all my own fault. Upon first hearing the problem statement I got it in my head that the function should look something like "(define (pas n)...)". I always think of number series being described in terms of a single argument (i.e. the 12th element) so it seemed natural to me that the pascal's triangle function should be computed in this way even though it is not, in some sense, a traditional series.
After a while, I cracked and read the precursor text (but not the code) to Eli Bendersky's solution and noticing that he defined the function with two arguments (for columns and rows) arrived fairly quickly with that insight at what seems to be the more or less standard solution. I have had this much completed for a week but gotten stalled trying to figure out the problem of a pascal function that takes one argument.
As of today I've solved the problem though and hoped to share my results here. First, the throwaway code that ended up being good for nothing!
(define (is-one? element)
(define (is-one-iter ones count flag)
(cond ((< element 5) #t)
((= ones element) #t)
((> ones element) #f)
((= flag 1) (is-one-iter (+ ones 1) count (- flag 1)))
(else (is-one-iter (+ ones count) (+ count 1) (+ flag 1)))))
(is-one-iter 4 2 0))
;Value: is-one?
That code tests to see whether a given element equals one and it does take a single argument which is nice. I couldn't figure out a way to use it to compute the actual elements though.
After a little bit of experimenting I stumbled on this number sequence (OEIS #A080956) which when put in the following procedure would allow me to compute n from a given column and row.
EDIT: Corrected dyslexic mistake in my code (I'd replaced all instances of col with row and vice versa). See comments.
(define (n-from-rowcol row col)
(define (f x)
(- (/ (* (+ x 1) (- 2 x)) 2)))
(+ row col (f (- row 1))))
;Value: n-from-rowcol
Now all I had to do was find a way to reverse the function to give me the inputs if I gave it the output. I actually stumbled upon another number sequence (OEIS #A000124, also known as the Lazy Caterer's Sequence) which when put into the following procedure returns the correct column and row for a given element. At last, working code:
(define (pascal n)
(define (pas col row)
(cond ((= col 1) 1)
((= row 1) 1)
((= col row) 1)
(else (+ (pas (- col 1) row)
(pas (- col 1) (- row 1))))))
(define (colrow-from-n)
(define (col-iter count)
(define (f x)
(- (/ (+ (square x) x 2) 2) x))
(cond ((> (f count) n) (pas (- count 1) (- n (- (f (- count 1)) 1))))
((= (f count) n) (pas (f count) 1))
(else (col-iter (+ count 1)))))
(col-iter 1))
(colrow-from-n))
;Value: pascal
Any insights into cleaner code, better algorithms, or comparisons between the two number series are welcomed.
This blog covers 2015, Books, Butler, C, Dad, Discrete Math, Displays, Education, Erlang, Essay, Gaming, Gapingvoid, HTDP, Hardware, IP Law, LISP, Lecture, Lessig, Linkpost, Linux, Lists, MPAA, Milosz, Music, Neruda, Open Source, Operating Systems, Personal, Pics, Poetry, Programming, Programming Languages, Project Euler, Quotes, Reddit, SICP, Self-Learning, Uncategorized, Webcomic, XKCD, Xmas, \"Real World\", adulthood, apple, career, careers, choices, clones, coleslaw, consumption, creation, emulation, fqa, games, goals, haltandcatchfire, heroes, injustice, ironyard, linux, lisp, lists, math, melee, metapost, milosz, music, pandemic, personal, poetry, productivity, professional, programming, ragequit, recreation, reflection, research, rip, strangeloop, vacation, work, year-in-review
View content from 2024-09, 2024-06, 2024-03, 2024-01, 2023-12, 2023-07, 2023-02, 2022-12, 2022-06, 2022-04, 2022-03, 2022-01, 2021-12, 2021-08, 2021-03, 2020-04, 2020-02, 2020-01, 2018-08, 2018-07, 2017-09, 2017-07, 2015-09, 2015-05, 2015-03, 2015-02, 2015-01, 2014-11, 2014-09, 2014-07, 2014-05, 2014-01, 2013-10, 2013-09, 2013-07, 2013-06, 2013-05, 2013-04, 2013-03, 2013-01, 2012-12, 2012-10, 2012-09, 2012-08, 2012-06, 2012-05, 2012-04, 2012-03, 2012-01, 2011-10, 2011-09, 2011-08, 2011-07, 2011-06, 2011-05, 2011-04, 2011-02, 2011-01, 2010-11, 2010-10, 2010-09, 2010-08, 2010-07, 2010-05, 2010-04, 2010-03, 2010-02, 2010-01, 2009-12, 2009-11, 2009-10, 2009-09, 2009-08, 2009-07, 2009-06, 2009-05, 2009-04, 2009-03, 2009-02, 2009-01, 2008-12, 2008-11, 2008-10, 2008-09, 2008-08, 2008-07, 2008-06, 2008-05, 2008-04, 2008-03, 2008-02, 2008-01, 2007-12, 2007-11, 2007-10, 2007-09, 2007-08, 2007-07, 2007-06, 2007-05