This page renders best in Firefox (or Safari, or Chrome)
Programming Projects
Posts about Programming Projects
READIN
READIN started out as a place for me
to keep track of what I am reading, and to learn (slowly, slowly)
how to design a web site.
There has been some mission drift
here and there, but in general that's still what it is. Some of
the main things I write about here are
reading books,
listening to (and playing) music, and
watching the movies. Also I write about the
work I do with my hands and with my head; and of course about bringing up Sylvia.
The site is a bit of a work in progress. New features will come on-line now and then; and you will occasionally get error messages in place of the blog, for the forseeable future. Cut me some slack, I'm just doing it for fun! And if you see an error message you think I should know about, please drop me a line. READIN source code is PHP and CSS, and available on request, in case you want to see how it works.
See my reading list for what I'm interested in this year.
READIN has been visited approximately 236,737 times since October, 2007.
Here's a neat trick: let's say you forgot to close a code block somewhere in a large C source file, and you can't figure out where, and the compiler is not helping you. Try putting a } character at the very end of the file, placing the cursor on it, and presing the % key -- vim will jump to the most recent { which was not matched by a }. (Note: this will not work if you have unmatched {'s inside conditional compilation blocks, which is generally a bad habit anyway.)
posted afternoon of February 13th, 2008: Respond ➳ More posts about Programming
A good thing to keep in mind when you are trying to write a TCP server that will support thousands of simultaneous connections: the default ulimit for maximum number of open files on a Linux system appears to be 1024. A further thing to keep in mind once you figure out how to adjust that upwards: there is a reason the default maximum is 1024!
See, if you use select() to multiplex your I/O (like I do), you will be passing structures of type fd_set around. These structures can only deal with file descriptors less than or equal to 1023. Try and set bit 1024, and you will break your program. But fear not! There is a solution; that solution is to use poll() instead of select(); apparently poll() is the new standard. First I ever heard of it! Switching from one to the other seems like it's not too hard, though I've just now started.
posted afternoon of February 13th, 2008: Respond ➳ More posts about Projects
Cool! I found and fixed a bug today using gdb's watchpoint feature, which I have never tried before. (Not cool: the bug was a careless typo that I should never have introduced.)
If I have an AVI file that is 128bit, 29 frame/sec, and I want to copy a clip from it into a new AVI file, what is the best tool to use? I am trying to use AVITrimmer, but the output file doesn't look any good. It still claims to be 29 frame/sec, but the video is wrong. It is not synchronized with the audio any longer.
Hmm... wait, that might be wrong... Yeah -- that was just weirdness from Windows Media Player.
posted evening of January 9th, 2008: Respond ➳ More posts about The site
I think I am not going to do any more Songs posts until I buy a microphone and an audio processor. I have been planning to do this sometime soon -- I think I will feel much better about the music I am posting if the audio quality is a little better. What I have been doing up till now counts as a sort of a proof of concept -- the concept is pretty well proven.
If any of you have got advice about what sort of mics and audio converter I ought to buy, please leave them in comments, or e-mail me if you prefer. I will be most grateful.
This afternoon I thought of a short tune. Played around with it on my violin and I came to realize that it integrates really well with "After Midnight".
I came up with guitar chords to accompany "Creepy Charlie" -- I am looking forward to recording the piece with viola and guitar, and maybe to writing a "b" part as well. (In the recording I posted the other day, there is something that sounds like it might be a "b" part but I think it is actually just a second voice on the "a" part. This is something I don't know how to figure out.)
Update: bullet two is no longer operative; I have ordered an Edirol E-MU EM8740 audio interface (which I will call "emu") and a pair of Behringer C2 microphones.
posted evening of January 7th, 2008: Respond ➳ More posts about Guitar
Wow, look! This is my nine-hundred and ninety-ninth post to this blog. The counter's about to roll over. Fun! Just in time for the new year.
So I came up with a little air for viola; I am inaugurating my new policy of giving my songs titles, by calling this one "Sally's Sleeping"; as Mr. Fritz observed in comments a few days ago, fiddlers name their tunes "after any damn thing". This is my first song (a) in 12/8 meter and (b) for which I was able to correctly work out notating the rhythm without help from ABCEdit's playback feature.
I found a streaming music player which is not dependent on Windows MediaPlayer, so I am going to try using it. Please let me know if either you were not able to play my music files before, and now you are, or you were able to play them before and now you are not. Thanks!
Here is the music for it, ABC format and PDF. Note that I didn't play exactly the same fourth bar that is written down; the whole point is to play a different variation every time.
posted morning of December 30th, 2007: Respond ➳ More posts about Fiddling
So it seems like people using Macintosh computers will not be able to play the streaming audio in my Songs posts, but will instead get a "This playlist format is not recognized" error. I'm trying to figure out why; in the meantime I will put links to download the mp3 files next to the streaming objects.
Update: If you can't play the songs embedded in my site, could you try the two players I posted here and let me know if either of them works for you? Thanks.
posted morning of December 28th, 2007: 5 responses
So I have a letter in the in-box this morning from Network Solutions, letting me know that my domain name is expiring in a year. This seems like a good time to ask: what's the story with other domain name registries besides NS? I understand there are some, and that they are cheaper -- do they do the same thing? NS is charging $100 for a 5-year registration which seems a little steep -- seems like it was less than that last time I renewed. I'll pay it if switching is a big hassle; but I reckon it's probably not a hassle. If you have any experience with this please let me know.
posted afternoon of December 11th, 2007: 2 responses
Martha comments a few posts down that the media players are starting up automatically when she loads the page. This is not what I was wanting to have happen -- does anybody know what I should change? I have <PARAM NAME="autoStart" VALUE="false"> inside the <OBJECT> definition for each of them. They do not autostart when I load the page. Is anybody else seeing this behavior?
posted afternoon of December 9th, 2007: 2 responses