Re: XML: fuck that.

1

Fucking Microsoft.


Posted by: ogged | Link to this comment | 01- 8-07 5:28 PM
horizontal rule
2

You know, the one thing that makes me mad about women is when they don't know about Linux. I mean, Windows XP is just not a stable environment!


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 5:30 PM
horizontal rule
3

Yeah, he was the first one kicked off.

So, seriously, what does a playlist do?


Posted by: ogged | Link to this comment | 01- 8-07 5:32 PM
horizontal rule
4

Is that a serious question? It tells a media player where to locate files, and in what order, as well as containing useful metadata so that the player doesn't have to open the files to get it itself. It is useful for organizing things. I, for instance, have a master playlist containing everything I have, and make subsidiary playlists when working on mixes or radio shows or whatnot. Some people have more, for accompanying different activities, iykwim, or moods or whatnot.

To think that I used to be able to get a list of all the filenames, in order, from a playlist with the simple command 'egrep '\.(mp3)|(ogg)|(wav)|(flac)$' "$1" | egrep -v "^#"', the better to auto-convert them to .wavs, the better to burn them to a CD, and that I never will be so innocent again!


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 5:43 PM
horizontal rule
5

Yeah, I was serious; I was confused by the shareability, because I don't understand how my playlist, which points to a folder on a windows drive would be useful to you, with your songs on whatever.


Posted by: ogged | Link to this comment | 01- 8-07 5:46 PM
horizontal rule
6

Yeah, he was the first one kicked off.

Thanks for ruining it for me.


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 5:46 PM
horizontal rule
7

Just passing it on.


Posted by: ogged | Link to this comment | 01- 8-07 5:48 PM
horizontal rule
8

the simple command 'egrep '\.(mp3)|(ogg)|(wav)|(flac)$' "$1" | egrep -v "^#"'

The simple trip to the moon.


Posted by: apostropher | Link to this comment | 01- 8-07 5:52 PM
horizontal rule
9

Point-n-shoot.


Posted by: ogged | Link to this comment | 01- 8-07 5:54 PM
horizontal rule
10

4 - I never will be so innocent again! s/b I cannot bother to learn XPath.


Posted by: snarkout | Link to this comment | 01- 8-07 6:41 PM
horizontal rule
11

I've actually used XPath for some stupid greasemonkey things. Is there a commandline xpath utility thing, similar to grep but for xml documents? (Actually, since the document is structured with each element on its own line, I could still use grep for things between <location> elements and decode the %-escapes, for which there presumably is some commandline itility.


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 6:54 PM
horizontal rule
12

I could swear I saw this here in the last week. "XML is like violence: if it doesn't solve your problem, it's because you aren't using enough."


Posted by: Nathan Williams | Link to this comment | 01- 8-07 7:00 PM
horizontal rule
13

Though honestly I do think that having to use XPath to query your music playlist is a little ridiculous. It's overkill.

I also think that this, from the format specification, is kind of ridiculous: The function of a playlist is not to communicate metadata about the composer, song title, etc. But it completely is. Without already having the metadata in a large playlist, going through it becomes very cumbersome, as the application has to open a bunch of files, or make a bunch of internet connections, in order to get the data itself.


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 7:06 PM
horizontal rule
14

I think XML::XPath installs a command line tool called (appropriately) xpath.


Posted by: snarkout | Link to this comment | 01- 8-07 7:13 PM
horizontal rule
15

Some people, when confronted with a problem, think I know, I'll use regular expressionsXML. Now they have two problems. — Jamie Xawinski.


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 7:44 PM
horizontal rule
16

That was an awfully long and gobbledygooked-laden post just to pimp your personal blog, w-lfs-n.


Posted by: M/tch M/lls | Link to this comment | 01- 8-07 7:58 PM
horizontal rule
17

bah, everyone knows that amarok is the one true linux music player

in other news, what real complaints (other than nonxmlity) exist for m3u playlists?


Posted by: MaxPolun | Link to this comment | 01- 8-07 8:58 PM
horizontal rule
18

I've always sort of liked XPath. XSLT is the thing I've never bothered to learn, and of which I'm consequently terrified.

I'm glad 15 has "regular expressions" crossed out, 'cuz they're GREAT (and Turing-complete!).


Posted by: tom | Link to this comment | 01- 8-07 9:26 PM
horizontal rule
19

U guys should try iTunes. It is sweet.


Posted by: NathanL | Link to this comment | 01- 8-07 9:29 PM
horizontal rule
20

(and Turing-complete!)

What? Really? You can't even balance parentheses!

I think XML::XPath installs a command line tool called (appropriately) xpath.

It's completely not up to the task of parsing 13K document, and clutters its output with all sorts of extraneous crap. Yay! And apparently different libraries have different standards for … well, I don't even know what, but to get the same results that "//location/text()" gives for XML::XPath, you need to do "//{http://xspf.org/ns/0/}location/text()" with ElementTree, and I'm still not sure how to work it with 4suite. Something to do with this, I suppose.


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 9:33 PM
horizontal rule
21

Fuck nerds!


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 9:43 PM
horizontal rule
22

As part of my getting over my fear of admitting ignorance, can you explain what, if any, functionality I'm missing out on by using iTunes to organize and playback stored audio files? If the answer isn't about functionality, is it just about the disadvantages of using a GUI (in particular windowsXP) in general? Something else (possibly efficient usage of processing resources)?


Posted by: washerdreyer | Link to this comment | 01- 8-07 10:21 PM
horizontal rule
23

I'm really torn over whether this or the hosting post is the most boring unfogged post ever.


Posted by: bitchphd | Link to this comment | 01- 8-07 10:32 PM
horizontal rule
24

22 - I know people don't think iTunes' MP3 encoder is as nice as some other ones, such as LAME. More importantly, you don't get to have arguments about the niceties of demanding namespace binding in your XPath processing!


Posted by: snarkout | Link to this comment | 01- 8-07 10:37 PM
horizontal rule
25

So far no such argument has occurred here, either.


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 10:42 PM
horizontal rule
26

XML? Fuck that shit. PABST BLUE RIBBON!


Posted by: Fledermaus | Link to this comment | 01- 8-07 10:46 PM
horizontal rule
27

I have since discovered that if I put in entities in the &#nnn; form, things show up correctly.


Posted by: ben w-lfs-n | Link to this comment | 01- 8-07 11:52 PM
horizontal rule
28

This is one of the funniest Linux stories I have ever come across. (Hey, girls, wait till you hear this one!) How many songs are you talking about?


Posted by: nworb werdna | Link to this comment | 01- 9-07 1:13 AM
horizontal rule
29

This post put a huge smile on my face. I posted something in a similar vein in my LJ when I was teaching myself ruby; it's nice to know that I'm not the only one that succumbs to the urge to rant sarcastically about technology issues from time to time.


Posted by: Nbarnes | Link to this comment | 01- 9-07 1:34 AM
horizontal rule
30

22: iTunes won't run on Linux. It also, although I'm less sure of this these days, will detract from your geek cred. Other than that, if it's not pissing you off, don't worry about it.

But yeah, fuck XML. I can just about make ElementTree do what I want for the most basic of XML APIs, which is luckily all I need it for, but anything as sophisticated as SOAP, well... best of luck to whomever needs to dig around in that stuff. Those who do so voluntarily get a raised eyebrow.


Posted by: Jake | Link to this comment | 01- 9-07 2:06 AM
horizontal rule
31

18: That's not true, as regexps are computable by DFAs -- though they're usually computed by NFAs in practice -- and hence are significantly weaker than a Turing machine. In fact, IIRC they're pretty close to the bottom rung of anything considered "computable". Even if you pump up regexps with fancy backtracking and the like, I'm pretty sure you still end up well below Turing equivalency.


Posted by: Anarch | Link to this comment | 01- 9-07 4:24 AM
horizontal rule
32

My own music holy grail is a song database that can search by an individual musician and generate a playlist of every song on which that musician appears. For instance, "Eric Clapton" would produce a list of all of the appropriate Yardbirds, Cream, solo, Derek, Blind Faith, Howlin' Wolf London Sessions, "While My Guitar Gently Weeps", etc.

If you'd be kind enough to invent that, I'd be very grateful. I'll even give you a dollar.


Posted by: Mo MacArbie | Link to this comment | 01- 9-07 9:11 AM
horizontal rule
33

32: that doesn't need invention, it needs very thorough and boring cataloguing.

How many songs are you talking about?

29532.


Posted by: ben w-lfs-n | Link to this comment | 01- 9-07 10:03 AM
horizontal rule
34

24: there is a script available for importing to iTunes with lame, if you are going to use .mp3 it is probably worthwhile.

30: I suspect anyone who's `geek cred' is based on things like which mp3 player they use doesn't have much geek cred anyway (unless they wrote it, in haskell or something).


Posted by: soubzriquet | Link to this comment | 01- 9-07 10:18 AM
horizontal rule
35

31: You're right, I got my factoid wrong. PCREs are Turing-complete, but without those added features "classic" REs aren't.


Posted by: tom | Link to this comment | 01- 9-07 11:48 AM
horizontal rule
36

Recursive matching? Insanity!


Posted by: ben w-lfs-n | Link to this comment | 01- 9-07 11:53 AM
horizontal rule