Re: NetMD::libomd created

2002-12-04 Thread Mark Fowler
Toby wrote:

 Can you think of a better name?

I haven't time to look at the tarball right now (and I don't have a NetMD
player anyhow,) but here's a quick suggestion on the name.

If it's a Tied interface, how about putting it in the Tie:: namespace.

Don't call it 'libomd', as lower case module names are normally reserved
for pragmatic modules (modules that change the way perl behaves like
'strict', 'warnings', 'base' and 'vars').  In fact, why not gloss over that
bit entirely and just call it Tie::NetMD.

Of course the definitive place to ask for advice for module names is on
the modules list : http://lists.perl.org/showlist.cgi?name=modules

(Aside: Isn't that description wrong? Isn't the list where people should
ask for CPAN ids and problems with module names too?)

Mark.

--
  Mark Fowler
  http://www.twoshortplanks.com/  The 2002 Perl Advent Calendar
  [EMAIL PROTECTED]   http://www.perladvent.org/2002/
 a different perl module featured every day




Re: NetMD::libomd created

2002-12-04 Thread Richard Clamp
On Wednesday, Dec 4, 2002, at 10:42 Europe/London, Mark Fowler wrote:

Toby wrote:

Can you think of a better name?

If it's a Tied interface, how about putting it in the Tie:: namespace.


How about not?  I have an old niggle, but I've come to treat it with 
some respect over time, and that's that modules should be named for 
what they do, not how they do it.  It's why I changed the name of 
Attribute::Parameters to Sub::Parameters, since that's more in keeping 
with what it does.

Don't call it 'libomd', as lower case module names are normally 
reserved
for pragmatic modules (modules that change the way perl behaves like
'strict', 'warnings', 'base' and 'vars').  In fact, why not gloss over 
that
bit entirely and just call it Tie::NetMD.

nitpickAll-lower case, one-word package names are reserved for 
pragmas.  When you get past the first :: it's a regular 
namespace./nitpick

As an example, threads is a pragma, but threads::shared is a utility 
module.  See also DBD::mysql.

Of course the definitive place to ask for advice for module names is on
the modules list : http://lists.perl.org/showlist.cgi?name=modules


I've also found module-authors useful in the past: 
http://lists.perl.org/showlist.cgi?name=module-authors

--
Richard Clamp [EMAIL PROTECTED]




Re: NetMD::libomd created

2002-12-04 Thread Chris Ball
 On Wed, 4 Dec 2002 10:42:18, Mark Fowler [EMAIL PROTECTED] said:

If it's a Tied interface, how about putting it in the Tie::
namespace.

I've done that before.  At the time, a housemate Perl-monger mentioned
that the user shouldn't have to be aware of how the module's implemented
to use it; I agreed, and I still do.  Many of the people who are used to
downloading and using CPAN modules might not have worked up to knowing
how tying data structures works yet.

Just a thought.  :-)

- Chris.
-- 
$a=printf.net;  Chris Ball | chris@void.$a | www.$a | finger: chris@$a





Re: NetMD::libomd created

2002-12-04 Thread Mark Fowler
Richard Clamp wrote:

 On Wednesday, Dec 4, 2002, at 10:42 Europe/London, Mark Fowler wrote:

Apple Mail's so funny ;-)

 I have an old niggle, but I've come to treat it with
 some respect over time, and that's that modules should be named for
 what they do, not how they do it.

A tied interface *is* what it does though.  From a module user point of
view it gives me a tied array.  That's what I see.  I'm not suggesting the
name of the module reflects how it's implemented (infact, I was suggesting
glossing over that by removing the 'libomd' part.)

 nitpickAll-lower case, one-word package names are reserved for
 pragmas.  When you get past the first :: it's a regular
 namespace./nitpick

Oooh confusing - though you're probably right.  It still doesn't gel with
me as a name with part of it being lower case.  It's just not the done
thing.

Mark.

--
  Mark Fowler
  http://www.twoshortplanks.com/  The 2002 Perl Advent Calendar
  [EMAIL PROTECTED]   http://www.perladvent.org/2002/
 a different perl module featured every day




Re: NetMD::libomd created

2002-12-04 Thread Paul Makepeace
On Wed, Dec 04, 2002 at 11:26:42AM +, Mark Fowler wrote:
 Richard Clamp wrote:
 
  I have an old niggle, but I've come to treat it with
  some respect over time, and that's that modules should be named for
  what they do, not how they do it.
 
 A tied interface *is* what it does though.  From a module user point of
 view it gives me a tied array.  That's what I see.  I'm not suggesting the

I agree with Richard - It's still naming-by-interface, if not
-by-implementation. If a module gives you an object [interface] should
it be in the Object:: namespace? And its non-OO brethren in Procedural:: ?
Even worse, if the module uses split should it be in Split:: ? I don't
see the need for putting tie on a pedestal - it was cool once, still is
cool, but we've got over that.

I think the Tie:: namespace should be for things that provide a
*language* variant of the general tie concept (e.g. sorted hash) rather
than an *application* usage, tie for a specific end (e.g. reading FooDB
v1.2).

The DBM stuff is inherently designed for tie'ing but is not in the Tie::
namespace, for example.

/2c,
Paul

-- 
Paul Makepeace ... http://paulm.com/

What is word? Makes a mess.
   -- http://paulm.com/toys/surrealism/




Re: NetMD::libomd created

2002-12-04 Thread Simon Wistow
On Tue, Dec 03, 2002 at 07:43:15PM -0800, Toby|Wintrmute said:
 NetMD::libomd.

Cool. I spurn these newfangles MP3 players (for various reasons) and
have been looking to get a NetMD so that I can transfer MP3s to MDs. I
knwo that Libomd can't upload music yet but this would still eb useful
for naming old MDs and things.

 Also, suggestions on the interface -- do you like the way it works, or is it
 confusing? Can you think of a better name?

Music::NetMD ?


There's already a music namespace





NetMD::libomd created

2002-12-03 Thread Toby|Wintrmute
Hi all,

I have finished version 0.1 of NetMD::libomd.

This is a Perl module which just simply presents your (NetMD connected)[1]
minidisc as a tied array. Currently it uses Pete Bentley's libomd library for
access, and in a rather inefficient manner too. I'll get a better version out
using proper perl XSUBs sooner or later, but its been awhile since I've coded
XS.

This upshot of this library is that you can now run regexes over tracks :)

eg:
Want to convert underscores to spaces? It's (almost) as easy as:
foreach (@track) {
s/_/ /g;
}   

Do you have compilations out of MP3s, where each track starts with a
number,which is (a) wrong and (b) redundant due to the MD track numbers?
(eg. 02. The running man/09. Careful with that axe eugene/01. Hyperform)
Well, just run a regex on them to fix it up:
foreach (@track) { s/^\d+\.\s*//; }

Anyway, its handy for a few things.


This module is available from:
http://wintrmute.net/software/

It's a little rough at the moment, and documentation could be better, but hey,
its a start. The tarball also includes libomd by Pete, it's a modified version
and excludes the Xmd GUI too. Further instructions are contained in NOTES and
README.

Let me know how you go, and if it works for you or not.
Also, suggestions on the interface -- do you like the way it works, or is it
confusing? Can you think of a better name?

Seeya

Toby


[1]: NetMD is a protocol that various MiniDisc recorders use, which allows you
to transfer music to them via USB, and also do titling, and other such things.
The Open/NMD project is attempting to reverse engineering this protocol, thus
allowing non-Windows systems to utilise it. See here for details:
http://gargoyles.monochromatic.net/cgi-bin/mailman/listinfo/netmd-dev