Pat Gunn (dachte) wrote,
Pat Gunn

Glasses and Tape

I just figured out how to make MIME::Tools do my bidding, and not EVERproduce output files of any kind. It turns out that there's a poorlydocumented set of functions in MIME::Parser that turn off the (bloodystupid) default behavior to generate temp files whenever MIME getsparsed. For the curious, here's relevant code:

my $mparser = new MIME::Parser;$mparser->output_to_core(1);$mparser->tmp_to_core(1);$mparser->use_inner_files(1);

Of course, they're poorly documented for a reason -- the author of themodule doesn't want you to use them. Instead, he advocates using tempfiles because the memory usage of programs that parse things in memorycan be unpredictable. Dude, this is Perl. I know what I'm doing, anddon't get in my way, even if you think you're protecting me. I'm perfectlycapable of checking the size of a message before I mime-decode it, soI can reasonably handle memory concerns. Oh well. Using this knowledge,I started on a prototype of a new, MIME-aware version of the reader portionof my email program, and it proved to be so easy that it now does everythingpread did (the prototype, for now, is called pmime), and better. It nowdecodes MIME escapes down into the US-ASCII encoding (I might investigatespitting it out as Unicode later), and so some ugly code I wrote by hand todo this (ad-hoc off-the-cuff heuristics) can be tossed. I'm going to tryusing pmime instead of pread for awhile, and if it works out ok, I'llmake the commitment to MIME::Tools, and write utilities to nicely list andextract portions from the messages, as well as (uck) rewrite psend tomake it easier to send attachments (currently, I just uuencode). It mightalso be good to write a utility that can easily delete or otherwise manipulatethe contents of MIME messages, so I don't need to save everyone's attachmentsor HTML portions of messages they send. Anyhow, it's really nice to be able tosit down, and over the course of 2 hours, actually get something done.

Today, I had two interesting things happen on IM -- I had my first IMvariant on the typical Nigerian bank scam, with someone nagging me forabout half an hour trying to convince me to fall prey. Oddly, this onewasn't based in Nigeria -- this was based on Libya. Then, after I got here,I actually had a chat with a real person from Nigeria over IM, talkingabout a bunch of stuff. Funfun.

Oh, yeah, looks like Kasparov tied withFritz.

This friday, my registration window for classes opens, and I have a lot ofreally tricky choices to make. I only get to take two classes free(not like it'd really be sane to take any more -- even two tends to be quitea burden), and there are plenty of interesting courses beckoning me.Here's what I've narrowed it down to:Psych (85)MW 13:3-14:5 Psych414 - Cognitive NeuropsychTH 9:-10:2 Psych251 - PersonalityTH 13:3-14:5 Psych310 - Research Methods

Philosophy (80)TH 9:-10:2 Phil271 - Philosophy and PsychologyTH 12:-13:2 Phil236 - Philosophy of Law

It's not simply a matter of taking what's interesting -- each isreally interesting, and if I were an undergrad, I'd probably try to takethem all.. but those days are long gone, and I need to pay my waythrough life now.. I do appreciate my parents for giving me 5 years ofnot needing to think about money (very much, anyhow), to take classesas I pleased. Anyhow, a brief overview of each class...The neuropsych class is kind of a continuation of the cog psych class I'm takingright now, and is very much an academic class relating to my career inthe field. The course on personality is a mixed bag between being directlyrelevant to my plans and being fun -- it's at least of peripheral interest.The research methods is probably the most important class, and if I can getin, it's the thing I'm most certain to take. It's foundational for anyreal research I'll be able to do later. As for the philosophy, I'm looking atit on the thought that it's good to have some variety in what I take, andbecause I like philosophy and consider it recreation. The Philosophy andPsychology relates developments in psychology to philosophical schools, andvice versa, plumbing the relationship between the fields. It sounds interesting,but is pretty peripheral to my career interests, and so I likely won't takeit unless everything else is full. The Philosophy of Law class, based on itscourse description, would be pure fun. It's syllabus suggests that I wouldenjoy it immensely, and even though it's completely useless to my interests,there's a good chance I'll take it anyway. It happens to block nicely withthe research methods class too, which would be a big plus. Why is it soappealing? It goes through some actual court cases, and explains the legalthoughts behind them, and then the philosophy underlying those legalstructures. Apparently, the class involves debates, videos, and is otherwisemultimedia and interactive. Yum.

In case you haven't had your fill of oddness,HERE YOU GO, DUDE.I might've given you these links before...

Incidentally, in case you've never been there before, the IUMA isa great place to get music from unsigned artists. It's improved a lot froma few years ago, the last time I visited.

This seems to me to be a really bad thing. We have a responsibility,I think, not to get animals, especially intelligent ones, involved instupid human conflicts, especially when they have a good chance of gettingthemselves blown up. Just like with testing make-up on apes, it strikes me aswrong, and that human subjects, if anything, should be used in both cases,until and unless robotic systems, or other means, are used in these cases.

Interested in linguistics? -- Whistling languages .. how neat!

Finally, good techies know that MySQL sucks, and should simply never be used(postgres being superior in pretty much all areas of practice).Here's some reasons.

Tags: philosophy, tech

  • Still alive

    Been feeling a bit nostalgic. Not about to return to LiveJournal - their new ownership is unfortunate, but I wanted to briefly note what's been up…

  • Unplugging LJ

    It's about time I pulled the plug on the LJ version of my blog: 1) I'm much more active on G+ than I am with general blogging. I post many times a…

  • Mutual Trust

    I don't know which should be considered more remarkable: That a cat should trust a member of a far larger and stronger species that it can't…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded