About

Random musings from danvk

8 Comments »

  1. Steve Madancy said,

    June 29, 2008 at 11:22 am

    Hi Dan,

    Just wanted to drop you a note to let you know how much I appreciate your iTunes track parser script (which I downloaded from Doug’s Applescripts for iTunes). I consider it an absolute necessity for creating any kind of large-scale iTunes music library.

    Although I see that it’s been more than 3 years from your last update, I’m hoping that you’re still interesting in maintaining the script. If so, I have a feature that I’d love to see incorporated into the script: support for the “sort” parameters such as “sort name”, “sort composer”, etc. that were introduced into iTunes 7. There is no easy way to access these fields in an automated way, and using your track parser on those fields would speed up the process immensely.

    All the best,

    – Steve Madancy

  2. Stefan Nowak said,

    February 3, 2009 at 5:22 am

    Bug Report: Perl expressions in Track Parser 1.3 result in AppleScript Error

    Goeden dag (Good day) Mr Vanderkam! :-)

    I am using your iTunes Track Parser 1.3, and stumbled across a problem.
    Using the scanf style regular expression on song names works fine!
    But using the perl regular expression on song names does not work, both your predefined ones and also my attempts to create new ones.
    I always get the AppleScript error:

    Cant get every item of “”

    As the quotation marks often matter quite strongly in programming languages, it is important that I tell you the correct quotation marks. Unfortunately I cannot copy the error text, but at least I can attach a screenshot, but also there it is hard to really see which kind of quotation marks there are. I hope you can read it properly.

    I have about 80 clips (from a humor radio show) which are all named in the scheme:

    Show Name DDMMYY

    and I wanted to rename them to:

    Show Name YYMMDD

    so that they properly sort by date.

    So I developed this RegEx:

    s/Show Name (\d\d)(\d\d)(\d\d)/Show Name $3$2$1/g

    My software environment:

    Track Parser 1.3
    Mac OS X 10.5.5
    iTunes 8.0.2
    Applescript, installed Editor version is 2.2.1, don’t know how to find out the version of the interpreter.
    perl (revision 5 version 8 subversion 8)

    Attachment:

    Originally I sent this bugreport to you via email, but it bounced, therefore I now try it through a website comment. In case you need the attachment, please request it at the email address, which I specified (hidden to the public).

  3. saLOUt said,

    June 8, 2009 at 1:49 pm

    Hi,

    hope this isnt be misplaced here…

    I tried the python and ruby code from http://danvk.org/josephus.html
    with these results on my linux system with an up-to-date opensuse:

    RUBY, n= 200 !!!, m = 3:
    Winner:
    Person #128, alive

    PYTHON, same parameters:

    File “python.py”, line 21, in kill
    if self.alive == 0: return self.succ.kill(pos,nth,remaining)
    RuntimeError: maximum recursion depth exceeded

    Things changed… you can chose the new winner.

    Greets saLOUt

  4. onetimejunk1 said,

    August 5, 2009 at 12:58 am

    I have feedback for your Track Parser 1.3.1 script I want to email you however your readme listed email address and other simple logical possibilities bounce – please email me back and I’ll resend my feedback.

  5. Vitit Kantabutra said,

    November 17, 2009 at 8:16 pm

    Thanks for your post comparing Perl/Ruby/Python. I’ve run into the same problem with Ruby’s puts as you have. I tried to find documentation on puts that would explain this but haven’t found it so far. Here, however, is my best guess… Ruby is a strongly-typed language, and since it expects only strings to be concatenated with other strings, it doesn’t allow concatenating a String with a Person, or whatever non-String object you were trying to concatenate with a String. However, if you were to pass a Person object directly to puts, that may be OK. It is quite imaginable that puts first tests its argument by calling the “.class” method, then convert the object into a String if it isn’t already one. Just my guess though.

  6. Spencer Bliven said,

    December 9, 2009 at 2:53 pm

    Yet another Track Parser comment:

    I ran into the same problem with regular expressions as Stefan Nowak, and wrote a patch for your script that seems to fix it. This doesn’t seem the place to say more, but feel free to contact me if you’re still updating it.

    Twitter: antidemagogue

  7. Dave Inman said,

    January 27, 2010 at 5:11 pm

    I liked your Ruby, Perl, Python examples of the Josephus problem.

    I ran each myself under Scientific Linux 5 with n=100
    for the number of soldiers. Neither Ruby 1.8.5 nor 1.9.1p243 died of stack ailments. Perl 5.8.8, too, ran fine. Python 2.4.3, however, died of stack ailments. With n=85 Python ran. All but Ruby 1.9.1p243 were 64-bit executables.

    I suspect some time has passed since your own tests were made and things changed. Thought you might
    like to know.

  8. Richard said,

    August 3, 2010 at 9:47 am

    Hi Dan;

    I’m very impressed with your high resolution Buddhabrot render as I have just completed my own as well. I wanted to ask you what three RGB iterations you used for the high res one so that I can try to reproduce something similar.

    You can read more about mine at: http://www.richardrosenman.com/project/?cid=224

    Again, great work!

    Cheers,
    -Richard

Leave a Comment