posted on 2009-08-25 20:04:17
I'm hoping to get back on track with my blogging (and following other folks blogs) in the next few days. I wanted to post this code real quick though before I forget about it. I've had a lot of fun playing with lisp lately and have written...4 silly, small scripts in the last week.
- The first goes through 12 months of CSV call logs from AT&T to find out the 5 people I spend the most minutes talking to.
- The second recurses through a directory running an external program to find the bpm on each one and logging the difference from the current BPM in id3 tag to a file. It's 90% done, I just have to clean up some of the output parsing from the external process. Very rarely, my cl-ppcre regex doesn't match. Silly corner cases.
- The third takes a directory of 20 or fewer *.ogg files, maps them to keystrokes and I'm working on a simple loop so that they play in a spawned "ogg123" whenever I press said keys. The main hold-up at present is that (read-char) blocks while waiting for a #\Newline and (read-char-no-hang) gave me some other error I forgot.
More on all that later. Some M3U files (playlists) I had laying around weren't importing into a different mp3 player. The reason? They weren't using absolute pathnames. My solution was hackish but I coded it, fixed them and moved on with my life in about 3-5 minutes. Hard to argue with that. And the code:
(defun fix-m3u (path)
(let ((new-m3u (make-array 16 :adjustable t :fill-pointer 0)))
(with-open-file (in path)
(loop for line = (read-line in nil) while line do
(let ((abspath (concatenate 'string "/home/redline/music/" line)))
(vector-push-extend abspath new-m3u))))
(with-open-file (out path :direction :output
(loop for line across new-m3u do
(format out "~a~%" line)))))
posted on 2009-08-20 21:46:18
Today has been better than the last few days. I may be coming out of my emotional coma which would be convenient since school starts next Monday. I got some lisp written and I'm sketching out some fun stuff to work on and talk about here soon.
A lot of my struggle lately has been feeling overwhelmed by how much I want to know and my failure to find the time and energy to absorb some of it.
I feel like I'm learning to learn at 23. I know a few things about that.
1. It's not going to be fun.
2. It's about being disciplined, setting measured goals and meeting them.
In the past, I'd gotten bogged down on personal programming\CS learning goals and tried to restart elsewhere or change the goals to regain momentum. No more resets. Persistence is the name of the game.
Though I'm smart, I spent most of the years between 12 and 22 not committing myself in academics and pursuits of the mind. In some regards, I feel like I'm playing catchup. That's what some
of this "I feel like I'm learning about learning" stuff is about. Picking the discipline back up. Because the fact is, the only way to really master Computer Science on the level I want to is to put in at least 10,000 quality hours
I'm not a genius and I don't want to be. I want a fair amount of work/play balance. Of course, CS is in many ways play for me. That said, I want to be more like
hackers like Slava Pestov, Luke Gorrie, Per Vogsnen, Edward Kmett and Wren Thornton. I respect each of them for different reasons but they all understand the field on a pretty broad level. I'll keep working in that direction because I want that breadth. It'll take a while...but it took them a while. Hell, aside from Slava I think all those folks are over 30. It's worth the investment though. Thinking about the issues is just too fun.
Note to self: Just remember, you don't know how brilliant you can be. You won't ever be von Neumann...but don't get convinced that you're stupid. Or a failure.
posted on 2009-08-13 20:49:05
I appear to have entered into a coma. I'm not depressed, sad or grieving but I am a victim of constant exhaustion and perpetually low energy. I expected to only need rest the two weeks after classes wrapped up and then be able to spend 3-4 weeks "playing". Playing meaning working on things that I like, Lisp, Haskell, reading CS books, weekly blogging and the like.
This has not come to pass. Instead, I'm on vacation and very blob-like. Some of this has to do with my father's passing. What I'm sure of is that I need this time and that growing as a person, learning more about code and so on, will disappointingly have to wait.
A lot has been happening (nerd news-wise) and the tabs in my browser have filled back up. It's not up to the record number of spring semester (200+?!?) but I hope to dump out a few linkposts and clean out the cruft over the next week or so. Before classes start back up. Oy vey.
In the meantime, I'm missing you folks.
PS: My berrics bracket
is totally f-ed
. Thanks a lot, Chris Haslam! ;)
posted on 2009-08-05 21:50:33
Tomorrow will be my 23rd birthday. Frankly, it's hard to believe that August has arrived. These summer weeks seem to be flying by. That said, I'm reasonably excited and much less stressed about my birthday than I was earlier this week. There are a host of reasons I stress over my birthday but I'll talk about that another time. Maybe tomorrow. :)
There will be a little get together at the apartment starting at 9 tomorrow evening. Nothing too particular, mostly video games but with the potential to include skateboarding, programming, music, movies and other nerdery.
Friday night Teresa and I see Devon
for the first time in a while and then Saturday we're going on a week long vacation to Charleston and Williamsburg. It should be awesomesauce. Hopefully, I'll get some more Common Lisp code written.
Tonight is sort of the last hurrah of my dear friend Burke
being in town. He's going back to Indiana to complete his studies at Purdue before Teresa and I will be back from vacation. He had been in town for a summer internship at McKesson. Tonight will likely involve: Sushi, Skateboarding, Music/Code/etc in that order. Good times.
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, careers, clones, coleslaw, consumption, creation, emulation, fqa, games, goals, heroes, injustice, ironyard, linux, lisp, math, melee, metapost, milosz, personal, poetry, programming, ragequit, recreation, research, rip, strangeloop, work
View content from 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