Syntactic sugar was Module Name

2004-12-29 Thread khemir nadim
Hi Alberto,

Terrence Brannon [EMAIL PROTECTED] wrote in message news  RULES foo
  aa==bb
  cd==ef
  ENDRULES

 I don't get it. Are you just creating syntactics sugar for:

 my %rules =
( aa = 'bb',
  cd = 'ef'
  );

 Terrence Brannon wrote:
 your original post said something about regular expressions.
 RULES foo
 a(b+)c==c$1a!!length($1)5
 ENDRULES
 
 so, abbbc gets cbbba if the number of b greater than 5.

  I believe you can do everything that this module does using
  Parse::RecDescent.
 You can do everything any module does using Perl... don't get your point.
 Alberto.

I must admit I share Terrence's view.

In my opinion, Syntactic sugar that brings no new functionality is best
avoided (YMMV)
and if you need something for a specific application, the module shall not
be presented as
a module implementing some generic functionality. Read me right, I believe
it's OK to have
application specific modules but if the app is not generaly available, maybe
th emodule is
better kept out of CPAN.

Perl gives the possibility to ondent and present data in many ways, maybe
you should think
of letting perl do the dirty job for you.

Now this is not only theoretical chat, I have first hand experience I want
to share with you.
We have discussed build system and build tools together on another thread;
Instead for going
for a new syntax or writting a parser for a known syntax, I used perl  to
define rules.

Here are some example:

AddRule [VIRTUAL], 'project', [ 'all' = 'msf/all' ], BuildOk('Project
built.') ;

AddRule 'c_objects', [ '*/*.o' = '*.c' ] ,
   %CC %CFLAGS %CDEFINES ... %FILE_TO_BUILD -c %DEPENDENCY_LIST

Those look like make rules but are perl functions. Then I can do much more
complicated stuff
if I want to:

AddRule 'rule_3',
   [ AndMatch(qr\.c$, NoMatch(qr/xx/)) = '$path/$basename.h'] ;

Of course the AddRule function has to be written and maintained but I leave
the parsing _and_
error reporting to perl.

In the example bellow I forget a dot to concatenate strings

AddConfig 'EXTRA_LDFLAGS'= GetPerlEmbedConfig('LDFLAGS_INCLUDE')  .
GetPerlEmbedConfig('LDFLAGS') ;

I get:
String found where operator expected at './Pbsfile.pl' line 4, near )  
(Missing operator before  ?)

Had I written an own parser, I'd have to handle this too.

Here is another example (real life too):
I had a module that allowed me to have configs in this format:

SMED_FORMAT_CLASSES
olive_green 202 255 112 ...
grey 128 128 128
unwanted_separator black cyan
upper_case default olive_green

SMED_FORMAT_CLASSES

then the module did some magic to have all conversions done properly etc...

I now do it this way:

AddConfigTo  'colors' =
olive_green = [202, 255, 112]
grey= [128, 128, 128]
...

AddConfigTo  'colors_tuples' =
   unwanted_separator = ['black', 'cyan'] ,
   upper_case   = [[0, 0, 0] , 'olive_green']
  ...
NormalizeColorTupless('color_tupless') ;

Don't get fooled by the 'AddConfigTo' (It does configuration checking)
in a simpler case using a hash directely would have been best.

The setup time for writting a config files is longer but it takes very
little time
to _not_ write a module. Once setupn it doesn't take any longer to add
config.

One extra benefit I got from this is that the config can be real object
would I decide
so:

AddConfigTo  'colors' =
olive_green   = \GetRandomColor

I still would need to check what I get in the config but I do not need to
update any parser.

IMHO, if you are going to run something in perl, it's best to write it in
perl.

Cheers, Nadim.

PS: I agree that Parse::RecDescent is too slow to be usable but writtin a
proper parser
is often worth the time compare with an ad-hoc one.









Re: Getopt::Helpful - online help and options

2004-11-12 Thread khemir nadim
Hi, I haven't tested your code (will do this week-end) and I think it's a
good idea.

I already do what your module proposes to help with but I haven't had the
idea to make a module out of it.

my format looks like this:

my @flags_and_help =
 (
   'h|help'  = \$pbs_config-{DISPLAY_HELP}
   'Displays this help.',
  '',

 'hs|help_switch=s'= \$pbs_config-{DISPLAY_SWITCH_HELP},
  'Displays help for the given switch.',
  '' ,

 'c|colorize'  = \$PBS::Output::colorize,
  'Colorize output.',
  EOT ,
If Term::AnsiColor is installed on your system, use this switch to
colorize PBS output.

PBS has default colors but colorization is not turned on by default.

Colors can be defined through switches (try pbs -h | grep color) or

Check 'Term::AnsiColor' for more information.
EOT

So I have a short help which I use like this:
$ pbs -h | grep what_I_am_looking_for
which is very useful to remember some switch (I have well over 150 of those)

and a long help used like this:
$pbs -hs colorize

lately I have added, to the application,  a self search feature that extract
and display information embeded in pod.

I believe it would be good to let the users of you module define what , how
many types and how they want the help. So even my format is limiting.

You could still have some default values and types for the user that is
happy with what comes standard with the module.

Searching within the switch help is very usefull and should be supported.

I'll contribute a patch if you wish.

Cheers, Nadim.

Please CC me at [EMAIL PROTECTED] as I don't have news at home.




Re: Which namespace for a build system?

2004-08-27 Thread khemir nadim
I agree with you. A build system is no more than a dependency system with
some fluff around.

The fluff, in this case, is 10% of the code.

Say I put those 10% under PBS as it is an application. I still have a
problem finding out where to put the 90% left because some smart guy decided
that Devel is for perl development (rule that is broken half a million
times) and that there is no other top level place for this kind of module.
I'd start a new space but I'd rather start something that is going to be
used bu other (or PBS is as good)

So my question boild down to this. Where do we put development,
dependencies, dev tools, build systems. What ever is suggested I'll have
hell of a time going through all the code and change it (yes I do have a
bunch of PBS::XX::YY::Sub() because I don't specialy like the, very absurd,
poluting policy modules have)

Cheers, Nadim.

A. Pagaltzis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...

  A build system is an app but a dependency system is not. Even

  if it was to be classified as an app, I think we should have a

  root for build systems as there are at least three or four

  modules that would fit there.



 Well, quite a few applications or module suites ended up on CPAN

 as a set of generic, regularly named modules, besides those

 specific to the app, which got their own TLNS.



 So you might abstract your dependency management code into a (set

 of) module(s) used by your app, where the app goes in its own

 TLNS but the modules go wherever appropriate.



 This seems to apply to any application going on CPAN which

 actually tackles problems not previously solved (as opposed to

 apps which mainly glue together existing modules).




Re: Namespace for EUI related modules

2004-08-24 Thread khemir nadim
Hi,

Suresh Govindachar [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 I defined the concept of an Editable User Interface (EUI)
 on www.sonic.net/~suresh/eui and illustrated it with
 an extensive application
 on www.vim.org/scripts/script.php?script_id=1052 .

Any other app you are aware of?

Cheers, Nadim.




Re: Perspectives on a Namespace

2004-08-20 Thread khemir nadim
Hi,

What about DB_File::Clean instead? Either you have a function to which you
can give diffrent types of cleaning operations or you may have multiple
modules to do the different operations. As an example (certainly incorrect
as I don't have the slightess clue of what you can clean in a DB file), you
could have DB_File::Clean::HashKeys, DB_File::Clean::HashData,
DB_File::Clean::Something.
You could also have this type of interface if you wish to:

use DB_File::Clean ;
DB_Clean( $handle to db, qw(DB_File::Clean::Hash Data
DB_File::Clean::Something)) ;
or
DB_Clean( $handle to db, qw( HashData Something)) ;

and your module would automaticaly load the special cleaning modules passed
as parameters. This is what I do in one of my modules.

# loads Data-TreeDumper-Renderer-DHTML automatically.
DumpTree($tree, 'Tree', RENDERER = 'DHTML');

Cheers, Nadim.

Luis Tello [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,
 My name is Luis.  I have been using a
 module called DB_File::Lock for the past year on a
 project.  I was asked by my employeer to develop a way
 to remove data not associated with a hash in a dbm
 file.  The objective was to streamline a dbm file
 because using the remove function only removes the
 hash and not the data associated to the hash.
 I was successful in creating the module and now I
 want to prepare it for distribution.  Under the advice
 of the PAUSE page, I am asking for your perspective on
 a namespace.  I was think DB_File::GarbageRemoval or
 DBM::GarbageRemoval.  What do you think?

 thanks,

 Luis




 __
 Do you Yahoo!?
 Yahoo! Mail is new and improved - Check it out!
 http://promotions.yahoo.com/new_mail




Re: Which namespace for a build system?

2004-08-19 Thread khemir nadim
I'm going to polute witha new top level namespace! PBS::

Don't anyone have any idea of where we should put this type of modules?

Devel::
Devel::Build::
Build::
App::BuildSystem

I'd appreciate some input.

Cheers, Nadim.




Where do people learn how to document a module?

2004-08-16 Thread khemir nadim
Hi,

It seems to me that few documents describe what to put in a documentation or
in which form. I haven't found any inteligent or complete description on
CPAN. There are a few heros that wrote some tips but looking at the new
modules coming into CPAN. I'd say we are lacking one standard document. If
I missed it please point me to it. I sometimes mail module authors to point
some info I am missing and sometimes my module users (not that they are
many) mail me with even gramatical corrections (which many need since not
all have english as their mother tongue).

What strikes me lately is that some modules that have very exciting names
and even documentation completely fail to inform me about _what_ the module
is for. Isn't that crazy? I read the module, think yeah, that's cool then
immediately after euu, when will I ever use this. Am I the only one?


Cheers, Nadim.




Re: Perl's Sacrifice Stone

2004-07-14 Thread khemir nadim

Andrew savige [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 khemir nadim wrote:
  I'd love to review the second module that is offered for sacrifice ;-)
  Anything to offer?

 How about Apache::MVC? It was posted for review on Simon's code review
 ladder mailing list in February but didn't get any response AFAICT.
 What has been harming this list, IMHO, is selfish people asking for their
 module to be reviewed -- and then disappearing without reviewing someone
 else's module in return. Maybe there should be a convention that you
 should first review someone else's before posting yours (?).
This is a good idea but to do that you must have a list of modules to pick
from and to have
your module added to the llist you to have tested a module that should come
from the list.

:-) it's a good idea anyhow.

About Apache::MVC, I'm unfortunately the wrong guy for that one. It would
take me ages
to get anything having something to do with web to work (yeah I'm that
good). I'm more on
system module side. But I'll find something to grind soon, promised.


 BTW, I think the code review ladder mailing list is exactly what you are
 looking for. Unless you are prepared to create an account and start by
 posting on PerlMonks Discussion seeking feedback re your Perl Sacrifice
 Stone idea, I don't think Perl Monks will work for you. There is nothing
 stopping you posting a review of your favourite module/s on Perl Monks --
 doing that may give you more credibility at that site, so your ideas may
 then be better received.

 /-\


 Find local movie times and trailers on Yahoo! Movies.
 http://au.movies.yahoo.com




Re: Perl's Sacrifice Stone

2004-07-13 Thread khemir nadim

Andrew savige [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 So far this node has been ignored and downvoted.
I saw that, well that's life.

 I suggest you start by creating a perl monks account (rather than
 posting anonymously). Then hang around for a while to get a feel
 for how the place works.
Not being active or registred doesn't mean I don't hang around. I rather
dislike to register, I have memory holes and all my password are remmebered
as 123TEST.

 If you want someone to review your module, it seems best to start
 by first reviewing someone else's module.
I'd love to review the second module that is offered for sacrifice ;-)
Anything to offer?

Nadim.




Re: Perl's Sacrifice Stone

2004-07-13 Thread khemir nadim

Randy W. Sims [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 wrote:
 Hmm, we have:

 1) Simon's code review ladder:
 http://lists.netthink.co.uk/listinfo/code-review-ladder
Seems rather dead to me. A very interresting link anyhow. Let's see if we
can get more life there

 2) Ask's CPAN Ratings: http://cpanratings.perl.org/
We had a long discussion about this. As long the rating are not more visible
and people are not actively ask to rate, there will be no real effect
which is a pity because it's also a very good idea.


 3) Perl Monks' Reviews: http://www.perlmonks.org/index.pl?node=Reviews
That did work so well. Maybe I should have done it in another way but I've
done my best. I can't seriously review my own modules (remember it's the
only vonlontary review module so far) or it will be no better than module
authors that rate their own modules.

 Each has a slightly different focus, but there is some overlap. A part
 of me wonders if they should be at least loosely linked together instead
 of remaining 3 independant but related review tools for authors  users;
 maybe one review site with two faces, one to help module users find
 modules and the other to help module authors improve their modules.
Amen.





CPAN Rating Wrap up

2004-07-06 Thread khemir nadim
Hi all,

I though I'd write a wrap up for the Rating discussion we started 2 weeks
ago. Please post correction
if I missinterpreted something.

CPAN Rating:

- Most were positive to the changes I and other proposed. only two people
wrote that
it wouldn't get done before even discussing it (a world breaking record)

- We all agreed that the Rating system we have today was good enough (with
some people
suggesting ameliorations) but that it was not used or visible enough.If the
current system was to be more
 widely used, most would feel satisfied. Eric would have like to see a Told
me to (TM) rate the modules

- We have troubles finding out who is holding onto the code, were it is and
how to change it. Some
suggested starting another site to try but it was not taken as a very good
idea (though still an idea)

- The quality of the documentation for CPAN modules was either find to be
lacking or people just
didn't care. It seems to me that all would gladely have more/better
documentation anyhow.

- An alternative Selected CPAN was named. Something in the same spirit as
a moderated mailing list.

Other subjects we talked about:

-Module dependencies; should be listed or automatically generated.

-Auto-generated Readme: we questioned the fact of having a completely
useless auto generated Readme
or  a competely useless 0 bytes Readme.

-PerlForge was named and some ideas germinated from it, ex:  the
possibility to discuss a module
without having to subscribe, providing a web page for the module, etc.. Some
thought that there was
 too much dependency on SourceForge.

I hope this wraps it up. I still don't know where/how/when to help to get
some changes in place.

Cheers, Nadim.

Khemir Nadim [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi all,

 I can live with buggy modules (I write some of them).

 I can live with non existant maintainers.

 I can almost live with idiots that think releasing open source code means
 that they take no responsibility over it or that they are GOD.

 I can live with 13 years old module authors with whom it's impossible to
 have an adult conversation.

 I can live with pedantic worthless modules that get big coverage while
 having very little use (IMHO).

 But I can't live anymore with the low quality and release process that
CPAN
 has!!!

 Modules are born, grow, die but not all are born equal!

 How many CPAN modules are properly documented? how many are not documented
 or have documentation that doesn't give a bloody clue about what it is
for?

 I won't talk about tests, maintenance, etc ... because I suck too and I'd
 very much like someone to enlight me by telling me that it's wrong and
maybe
 how to do it right.

 I look at new modules almost everyday, I mirror CPAN just to have it close
 in case of  network failure. I sometimes rate modules but most often when
I
 think they are good (I won't talk about the modules having a single
rating,
 5 stars, written by the author ;-)

 What I propose is:

 - Introduce negative rating, ex: the documentation sucks, minus five
start.
 - Rating should be show by search.cpan.org, anywhere a module name
 (including recent) is show as well as  how many have rated

 I would of course prefer not letting badly documented or tested modules
get
 into CPAN at all but that would certainly eliminate 99,99% of the modules
 (including mine) and hurt joe hacker little ego (which is hugely bigger
than
 his module documentation).

 Now, I'm asking for someone else to do the job (I don't even know who he
is)
 but I'd gladely help if I can, I'd definitively rate more.

 I may just need to become as blazé as CPAN users and just accept the sate
of
 things but I'd rather not.


 I like very much the perl advant calender (a system very popular with my
 kids) and I wouldn't like to cut grass under their feet but couldn't we
test
 a module a week and rate it. That would make 50 seriously rated modules
a
 year. it's more than the total amount of modules I use and it might help
 people getting started with perl (or the modules)

 Cheers, Nadim.

 PS: I know this kind of discussion comes back again and again. If you
don't
 have an input about what I propose we do, please don't bother answering
 about why I want to do it or do it privately.







Re: CPAN Rating

2004-06-21 Thread khemir nadim

A. Pagaltzis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 * khemir nadim [EMAIL PROTECTED] [2004-06-16 13:53]:
  I once wrote that it would be great to have the equivalent of
  sourceforge for perl module, the answer I got was use
  sourceforge. Hmm talk about not answering the question.

 Maybe because it was the wrong question. CPAN is the
 Comprehensive Perl ARCHIVE Network.

I think you missunderstood. I didn't ask for CPAN to become a perl
sourceforge. I asked if other wanted to have a source forge that specilizes
in perl  like Rubyforge for ruby.

  The most disturbing thing is that perl is Huge, lots of
  developpers, modules and projects but Ruby that is so small
  does have a rubyforge.

 Right, and how large is it?

What does this have to do with my question? How large was CPAN when it
started? how large was Sourceforge when it started? why do we have Savanna,
Rubyforge and other? I ofound stuff in Rubyforge, I even had dinner with one
of the guy having a module there so if I can't find software I can still
have good times :-)

In fact the most disturbing thing with Sourceforge is that it's too big and
it's difficult to find the perl gems in the software bazaar.

Cheers, Nadim.




Re: Can't contact author. Abandoned module?

2004-06-21 Thread khemir nadim
Hi David,

It's just 10 days ago. The author might be on holidays or is too buisy to
answer you right now.

In the worst case, release you module under a different name for the time
being. What about:

Benchmark::Timer::Sampling.

Cheers, Nadim.

David Coppit [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Greetings all,

 Back in Aug 2003, I talked with Andrew Ho [EMAIL PROTECTED] about
 expanding his Benchmark::Timer module to support statistical sampling.
 (The new feature would be to apply statistics to determine when to stop
 timing something, based on user-specified confidence intervals and error.)

 At the time, he seemed to like my changes, and said that he would consider
 adding them to the next version of the module. In the meantime, I
 distributed my modified version of Benchmark::Timer along with my own
 modules.

 I've since sent email to him in Feb 2004, and Jun 11, with no response.
 There have been no releases to the module, and in my last email I offered
 to take over maintenance if he's not interested in supporting the module
 any more. I'm worried that the module has been abandoned (or worse, that
 something has happened to the author).

 Should I wait longer? Or is it time to get the module maintainer gurus
 involved in order to determine the module's disposition? I'd rather not
 distribute an unofficial version of Benchmark::Timer with my code...




Re: New module: CGI::Tooltip

2004-06-21 Thread khemir nadim
My two modest cents,

It seems to me that we'll never find __THE__ perfect name. The proposed
names all have something right. Isn't the problem somewhere else? Why can't
we name the same module differently? or (this might exist already) where do
we put description strings for the module (like at the library)?

Cheers, Nadim.




Re: New module: CGI::Tooltip

2004-06-21 Thread khemir nadim
This is exactly wht I wanted to say in my previous post but my post was not
phrased as good.

I also think the abstract/real hierarchy is a good idea.

My last point would be about the library that is used. Is it JavaCscript or
something more specific?

Cheers, Nadim.

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 This has been one of the best examples I've seen on the difficulties of
 module naming. Many of the suggestions have valid reasons, and precidence
 to back up the theory.

 Seems like a really good example of a module that could benifit from meta
 data, and multi-category placement. If it weren't for existing categories,
 and still needed a category structure, I'd personally think something like
 the following would be more suitable:
 UI::ToolTip
 With UI::ToolTip::HTML::JavaScript implementing a UI::ToolTip class.

 It seems that the problem is that you could have ToolTip's implemented for
 an HTML, or SVG, or Java, or GTK, or whatever type of display toolkit, and
 they could be implemented using some other technology like JavaScript,
 CSS, etc. Personally, I'm more a fan of listing the interface the tooltip
 applies to first. If I were looking for a ToolTip module for GTK, I'd
 expect to find GTK::ToolTip or ToolTip::GTK, not Python::ToolTip::GTK or
 JavaScript::ToolTip::GTK.
 But, to each his own.

 This has been an interesting thread. My vote's for HTML::ToolTip. If
 possible, it'd be nice if it was an abstract class, and
 HTML::ToolTip::Javascript was an implementation of that class.

 --
 Josh I.





Re: failures that aren't failures

2004-06-17 Thread khemir nadim

Fergal Daly [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi all,

 One of my modules has a failure noted against it that was caused by the
 tester's wonky Perl installation. How can this be removed?

I don't have this problem but my modules sometimes fail on windows platform
when theyr  are not supposed to work there at all.





Re: CPAN Rating

2004-06-17 Thread khemir nadim

Eric Wilhelm [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 FORBID any module without a meaningful readme with all its (possibly
 recursive) dependencies, its pod and any other relevant information
 inside.

 I don't think it is in the spirit of CPAN to FORBID anything.

OK. but a module without a readme with meaning ful content, a minimum of
documentation is not anything it's nothing so I'd say it's OK to not
allow nothing to get into CPAN. We, of course, want to avoid waisting our
time but I think all want to help the module author to get the a chance to
be used.

I would also forbid (yes that's forbid this time) modules without makefile
to make it into CPAN.

There is unfortunately no system to check if meaningful documentation
exists in the distribution or not (some AI guru may want to look at this :-)

The spirit of CPAN is quite straighforwardly described when it come to
documentation but unfortunately a dummy (dumb) readme is generated instead
for forcing the user to write one.

The access to CPAN is not moderated in any way (my anarchist side likes
that) but maybe a minimum of control wouldn't hurt (my fascite side like
that)

Cheers, Nadim

PS: I wouldn't  like to find commercial modules on CPAN either




Re: New module: CGI::Tooltip

2004-06-17 Thread khemir nadim
OK that was the first part of my proposal (and I find your explication for
its dismissa fine) but as was explained in the original posting, this module
needs a library to be installed. Wouldn't it be nice for the people browsing
around to get that information right away?

Would CGI::Tooltip::Whateverlibrary be acceptable?

N.


Martyn Pearce [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am not convinced of this.  As I read it, the developer using
CGI::Tooltip
 needs no Javascript knowledge; I think I would see
CGI::Javascript::Tooltip
 and immediately exclude it as I have no knowledge of Javascript.  It
should
 be made clear in the docs of the module that javascript is required at the
 client end, but clearly tooltips are meaningless without a gui, and very
few
 GUI browsers are not javascript-enabled.  I'm all for meaningful names,
but
 they don't have to carry all the documentation in one line.

 -Original Message-
 From: khemir nadim [mailto:[EMAIL PROTECTED]
 I think it would be appropriate to further catalogue the
 module name under Java or the name od the specific library
 you interface with.




Re: CPAN Rating

2004-06-16 Thread khemir nadim
Amen.

Today that work is left to the module writer, setup a web site, setup a
mailling list etc ...

I once wrote that it would be great to have the equivalent of sourceforge
for perl module, the answer I got was use sourceforge. Hmm talk about not
answering the question. The most disturbing thing is that perl is Huge, lots
of developpers, modules and projects but Ruby that is so small does have a
rubyforge.

Cheers, Nadim.

Gabor Szabo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

  What I propose is:


 My wish is to have a web forum where each module has its own category
 and people can discuss the module, get help etc. without subscribing
 to the specific mailing list of the module.
 Especially that most of the modules don't even have a mailing list.

 Gabor






Re: CPAN Rating

2004-06-16 Thread khemir nadim

Michael Peppler [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Personally I think the current rating system should be enough - only not
 enough people use it (for example my modules have only one or two
 ratings, yet they are used by a lot of people, and have been for many
 years).

I would have gladely rated your modules but they unfortunately provide
functionality that I don't need (yet).

I might have expressed myself wrongly. I like the rating system that we have
and I think it's a great tool. I propose to have a tougher rating system.
And I think that would let people rate negatively as well as positively.

What I would have like is to make the rating more visible. I have to go into
the module's page to see it's rating. I'd rather see it beside the modules
name. Hell, I'd like to see nice rating beside my modules so someone uses
them (guys go and rate my modules, I'll rate yours. Data::TreeDumper is of
use to anyone who has ever used Data::Dumper)

 Why don't you start by rating those modules that you feel are horribly
 lacking with 0 stars?
Good question indeed and I am not the only one rating positively only
because it's not part of our culture. I believe that it's because of:

1/ We know it's tough to write free software and we want to encourage more
than we want to make modules better with positive criticism.

2/ There are two many bozos that as soon as you criticize there work, flame
back (a bad reflex) or tell you to patch or write the damn thing yourself or
that they do it in their free time and that one should be greatfull for
their extravagant generosity (to stfu in one word). As if those who
criticize them are not their pairs but some 3rd rank imbeciles that know
nothing.

I push it a bit here, of course not all projects are like that (check the
arch-tla list for an example) and sometimes the users are real pain where it
hurts but I've seen and had those discussion too much. I used to think that
it was cultural (I'm from the mediteranean, we can insult each others great
great ancestor and be brothers 5 minutes later) but I gave up that theory;
it's the open source culture without the open source responsibility and
adulthood that is the cause(my new theory at least).

There is another reason why I  don't rate zero starts, most of the time I
get frustrated by the documentation. It's non existant or empty or not worth
much. An API listing is no documentation some people should understand that.
Just getting to use the module is a more a detective job than a programmer's
one. How can I rate the module when the documentation to help me understand
the module is not even there? The only thing I can rate is the documentation
I can't (well I could) rate the rest of the module zero when it might have a
great potential (which quite a lot of modules have)

Lastly, taking one module a week and rate it would be a great help to other
perl developers.

Cheers, Nadim.





Re: Application framework namespaces

2004-05-17 Thread khemir nadim

Lincoln A. Baxter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Tue, 2004-05-11 at 14:29, Michael A Nachbaur wrote:
  I'm working on a web application that is almost 100% perl (the styling
is
  handled in XSL).  The entire application's test and installation
procedure is
  managed with a Makefile.PL, and the entire package is very CPAN-ish.  I
 Comments anyone?
  .. very long mail contents here
 Lincoln

I prefere technology sorted modules. The monster framework structures some
distributions have, hide those nifty modules that you would like to use now
and then. I also don't like to have simple modules part of a framework
because more often than not they become very dependent on the framework
architecture and since no one is going to refactor it, it's lost to the
framework.

Let me give a little example, I have a build system (make like) written in
perl. There's quite a lot that could be made generic and have more value
than within the build system. I got tired of Data::Dumper output so I
sprinkled code around to get the output I wanted. I did refactor it in a
module (because I was forced to not because I was smart) that was left
within the framework structure. Because the build system is not out on CPAN,
I couldn't reuse the dumper module simply. Arghhh. So I finaly made a module
that I can re-use as well as other perl devlopers (Data::TreeDumper, you'll
like it or tell me why you don't).

I don't think that any other sorting than technological can work. In fact,
next time Ill write some kind of framework I'd see that I (seriously) write
the technology modules before I do any framework work.

Nadim.




Re: advice needed on Lingua::Identification

2004-02-27 Thread khemir nadim
Hi,
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 One possibility would be to force each known language to become a module
 (Lingua:Identification::EN for English, etc)... the downside of this
 solution is that once I have 50 languages, I'll have 51 modules... :-|
1 or 100, it doesn't realy matter as long as everything is installed in one
swoop.
Now you should test the load time. if having 50 modules add 3 seconds load
time, no one is going
to use your module (IMHO)

 Another possibility is to have everything in a single file, and allow
 the user to set up a configuration file himself, which may contain other
 languages...
I, as a user, wouldn't care which of the above methods you, the author, use
if I can:

1/override yours
2/ define mine

Hope this helps.

Cheers, Nadim.




Re: Reshaping the modules list: a starting point, help remove the bias.

2004-02-26 Thread khemir nadim
Hi, within the development cathegory, I think it would be good to separate
modules that are for the perl interpreter (debugging, profiling, ...) and
other development tools. As an example, I have a module called Devel::Cpp
which I put tin the Devel root because I foun no better place (and I didn't
ask either :-(  but later on I understood that Devel was not for this kind
of devlopment tools (I'm still wondering why). Now, there is a new pure perl
preprocessor module that I want to use instead for 'cpp', I still don't know
where to put it!

Cheers, Nadim.





Re: [RFC] Text-Balanced 1.96 proposed interface changes: return failure in list context

2004-02-17 Thread khemir nadim
Hi,

David [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 There's not really much a module author can to do help a user like that.
 
 yes there is, it's the custom VERSION subroutine.  Your legacy program
 dies with the error message
 until it is edited, after the module upgrade.

David, Could you please tell us what you think about the only.pm module,
which seems to fix the problem rather well, and how it compares with your
solution.
Cheers, Nadim.




Re: Module lists: defining the problem, restating the goals [was Re: OK, so we've decided...]

2004-02-16 Thread khemir nadim

Michel Rodriguez [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Generating the doc (from the POD) for each module (with a link to the
 tarfile or to the CPAN search page for the lates release of the module),
 and putting it on CPAN in something like cpan.org/docs/module name.

 Does this make sense?
Yes and that's what search.cpan.org already does.

Cheers, Nadim.




Re: [RFC] Text-Balanced 1.96 proposed interface changes: return failure in list context

2004-02-16 Thread khemir nadim

Vagn Johansen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 How do you avoid breaking old programs when the interface changes?
You don't. IMHO it's the users responsibility to check for what version they
are using not the module author. With Module Build you can ask for a
specific version. It's debilitating for a module author to not be able to
change interface because someone is using the module. I've seen (and
couldn't find it again) some discussion about having multiple versions of a
module installed (link someone?)

Cheers, Nadim.




Re: OK, so we've decided that the right modules are too hard to find.

2004-02-16 Thread khemir nadim
Sam Vilain [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

   - encourage curators to step forward, or groups of curators, for
 each category; possibly even create mailing lists for people with
 a general interest in the technology in that category; to field
 questions about naming for new modules to fit into each category.
 These curators must have the power to update the contents of the
 relevant portions of the www.cpan.org site.

Hi all,

Everything that was said in this thread was very interresting and I, too,
belive things should get better and I encourage those that want to do things
_now_.

I see few problems with CPAN, you might find them directly related to the
need for curators:

- Any one can start whatever hierarchy
- Anyone can load whatever piece of code to CPAN, good or bad
- Documentation level is a catastrophy, check how many readme are those
generated by h2xs
- The document about how to use CPAN is not clear enough or I haven't found
the right one yet
- 25 versions of the same module do no make it easy to look around in CPAN
- Authors don't answer or have given up on maintaining there modules
- The same day, the same module can be uploaded to CPAN multiple times

I mirror CPAN at home and I check for new modules everyday. Guess how many
times I think what the Hell is this for???

Far from me the idea to refuse uploading of modules to CPAN but 3 years from
now, we'll have a useless module heap.  If there is a need for curators, I
believe it does, then those should be given a mandat and power to apply it
or it will be useless. They must be able to say to a module author: Sorry
but this is not the quality level we expect, write some documentation and
come back later for your upload. This is exactly what is done for moderated
mailling lists.

The net result would be (IMO):
- No half baked idea, modules on CPAN (could be a good idea to go through
what we have today in CPAN and throw away things)
- Better quality in the documentation and test (hmm, I'd have to work on my
own modules too)
- More people involved in this mailling list (which has less than 20 active
users) since it would be the way in to CPAN

Around 15 new, or updates, modules are uploaded to CPAN everyday.

This might sound drastic but it is not as bad as it sounds, I would have
appreciated if someone said 'No' to something I write and that is not good
enough for the community. This is not for discouraging module authors but,
on the contrary, make them feel that their work is appreciated and that they
must commit themselves to generate something good enough.

Moderators rights should be:
- Create new hierarchy roots
- Refuse a module name
- Refuse a module because its quality is too low
- Refuse a module because of lack of documentation or tests or examples (or
VERSION!!!)
- Give maintenance rights
- Try to merge modules by asking module authors to co-operate
- Write public review or accept public reviews
- Coordinate with module testers
- etc ...

I am whilling to have my modules filtered, I hope other do too. I'll also
help if I can.

Cheers, Nadim.

PS: PPM modules vs plain module problems should be fixed too.









Re: OK, so we've decided that the right modules are too hard to find.

2004-02-16 Thread khemir nadim
Simon, Can you please give us serious answers. Writting to this list take
valuable time from me and from those reading the mails.

  - Authors don't answer or have given up on maintaining there modules
 THEY ARE VOLUNTEERS.

Please don't shout if it's note to show you're happy. Check the discussion
we had about Roman.pm a few weeks ago. My point is not to force anyone to
develop anything but that when a module is released and the author can't
maintain it, the curators job would be to design a new maintainer. Period.

Now, surf to: http://search.cpan.org/recent

and check:

Haver-Server-0.02 -- Perl extension for blah blah blah

You might think it's OK but I don't.

Here is an example of what changed from version 0.07 to 0.08 for a module
(loaded 10 mn after 0.07)

0.08Sun Feb 16 16:21:00 2004
Fixed MANIFEST for test.pl

Everybody makes mistakes. I just would like to help people not do this kind
of mistakes.

Since I have missed the document, you might be able to point to it instead
for telling me that I have missed it. And no, sear.cpan.org isn't a silver
bullet though I use it more than cpan.org.

Cheers, Nadim.

Simon Cozens [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 [EMAIL PROTECTED] (Khemir Nadim) writes:
  Everything that was said in this thread was very interresting and I,
too,
  belive things should get better and I encourage those that want to do
things
  _now_.

 None of these ideas are new.

  - Any one can start whatever hierarchy

 This is not a problem, now we have search.cpan.org.

  - Anyone can load whatever piece of code to CPAN, good or bad

 I don't agree that this is a problem.

  - Documentation level is a catastrophy, check how many readme are those
  generated by h2xs

 But the generation was added to h2xs because people weren't putting in
 READMEs, and so an autogenerated one is better than nothing!

  - The document about how to use CPAN is not clear enough or I haven't
found
  the right one yet

 You haven't found the right one yet.

  - 25 versions of the same module do no make it easy to look around in
CPAN

 This is not a problem now we have search.cpan.org.

  - Authors don't answer or have given up on maintaining there modules

 THEY ARE VOLUNTEERS.

  - The same day, the same module can be uploaded to CPAN multiple times

 Yes, module authors can fix bugs quickly. How terrible!

  Far from me the idea to refuse uploading of modules to CPAN but 3 years
from
  now, we'll have a useless module heap.  If there is a need for
curators, I
  believe it does, then those should be given a mandat and power to apply
it
  or it will be useless.

 *We have been through this*. Innumerable times. Still nothing happened.

 The people most likely to act as curators got together (as they do
 periodically) and decided that better metadata would be the best
short-term
 goal. I'll try and get some of them to write up the latest set of
proposals.

 -- 
 The best index to a person's character is a) how he treats people who
can't
 do him any good and b) how he treats people who can't fight back.
 -- Abigail Van Buren




Re: Testing output to STDOUT and STDERR

2004-02-10 Thread khemir nadim

Andy Lester [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  Because:
  a) I wasn't happy with the API
  b) I'm a lazy SOB and couldn't find the time to sort it out

 I'll be glad to help with the second part.  Mail me the parts and I'll
 bundle it up all nice for ya.

Hi, I also have a lot of stuff to bundle! I can even arrange to produce
unbundled code so you can practice your bundling skills. You can make a
reputation as Lester the Bundler.

;-)

Nadim.




Re: VERSION as (interface,revision) pair and CPAN++

2004-01-30 Thread khemir nadim
Hi Fergal and other,

 The difference is that Module::Build forces the Foo::Bar's author to work
 out what current versions of Some::Module and Other::Module are suitable
and
 to try to predict what future version will still be compatible. This is
time
 consuming and error prone (predicting the future isn't easy) and it has to
...

What I meant is that we shouldn't have two ways (and 2 places) of telling
what we need for our modules to work.

Other have pointed some problems with your scheme so I won't repeat them
here. I understand what you want to achieve and I think it's good but please
keep it in one place. Can't you coordinated your efforts with Module::Build
so

# old example
   my $build = Module::Build-new
 (
  module_name = 'Foo::Bar',
  license = 'perl',
  requires = {
   'perl'   = '5.6.1',
   'Some::Module'   = '1.23',
   'Other::Module'  = '= 1.2, != 1.5,  2.0',
  },
 );

...
 requires = {
  'perl'   = '5.6.1',
  'Some::Module'   = 'COMPATIBLE_WITH 1.23', # or the like
  'Other::Module'  = '= 1.2, != 1.5,  2.0',
 },

Instead for drawing in a new module that most _won't_ use, you make it in
the main stream new installer.

IMO, Module::Build has some problems (which I am sure will be fixed soon)
and your proposed module also have some problems. It would be nice if the
versionning /installation questions where handled in a coordinated way.
Module devlopers are lazy snakes, they want to sun bath on one stone only!

Cheers, Nadim.







Re: Need feedback on module namespaces

2004-01-28 Thread khemir nadim

   grepmail : grep program for mailboxes. Currently only supports mbox
   format.

 Not sure about the last one. Do/can we register namespaces for scripts?

what about grepmbox instead? you can always go to grepmail when you
support other formats (like mail spool for instance)

Cheers,Nadim.




Re: Spreadsheet::Perl (was New User)

2004-01-19 Thread khemir nadim
Version 0.04 is out. Check out the documentation at:

http://search.cpan.org/src/NKH/Spreadsheet-Perl-0.04/README

http://search.cpan.org/~nkh/Spreadsheet-Perl-0.04/Perl.pm

I still need your input and I still need some help if any brave soul is
available.

Nadim.




Re: Spreadsheet::Perl (was New User)

2004-01-16 Thread khemir nadim

David Manura [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 khemir nadim wrote:

  I agree that a way of describing a range without naming one of the
limits
  should exist, I just don't know how to make it visually clear. What
about
  'B1:B*' 'B*:B10' 'B*:B*' ?

 '*' might be ambiguous.  Does it mean infinity? Does it mean the last
 defined value in the column?  The latter seems more useful, so if you
 state B1:B* and the only defined cells in the B column are B1:B10, then
 you could infer B1:B* to mean B1:B10.  What then if the only defined
 values in the B column are B1:B10 and B20:B30?  Would B5:B* mean B5:B10
 and B25:B* mean B25:B30?  I don't know if Excel supports such
 functionality (I've looked before.)
Excel doe support this but it has meaning in the context of a formula only
while we also have the assignement context.

I completely agree with you. I have implemented this but I don't release
it since I don't know the semantics myself ( '*' is A or 1 as of today :-)

Your guess is as good as mine. I can even give another example, what do
$ss{'*'} or $ss{B*} mean? In the TODO there is the question about
cell/row/spreadsheet default value. We may need diffrent syntaxes for 'last'
and 'infinity'. And need to know if we need infinity and what we mean with
it.

 One thing I noticed is that the OO interface can be long-winded:
$ss{A3} = Spreadsheet::Perl::Formula('$ss-AddOne(A5) + $ss{A5}') ;
This is patialy fixed.
$ss{A3} = Formula('$ss-AddOne(A5) + $ss{A5}') ;

I don't know if I have done that yet the following might be a good thing

$ss-Formula
(
A1 = '',
A2 = '',
A3 = '',
A4 = '',
) ;


 With some reimplementation work and some string parsing, this might be
 simplified to
$ss{A3} = '=AddOne(A5) + A5';
No, No and Yes. No because I want  SS::P to be perl and the formula should
be valid perl. No because I want to be able to store the string '=AddOne(A5)
+ A5' as a value and keep general. Yes, because many people may want to do
this. If someone is whiling to write a lexer/sub_builder  (or a converter)
for those formulas, I can think about this syntax:

$ss{A3} = XXX('=AddOne(A5) + A5') ; #name may vary

 Just a few ideas.  (I also just noticed the method names are the of the
 style GetFormulaText rather than of the more Perlish get_formula_text.)
Thats the man's coding style. I don't want to be dissolved into the age old,
ugly and unreadable KR style. You can always define an alias module.

 For a module with similar functionality but which does not flatten the
 problem onto a 2D grid, the psuedo-code for its usage might look like
I'll look at that separately

There is a new release in the pipeline (0.04); somewhere around sunday night
but you can get a beta if you'd like to.
I have partially fixed the mapping to spreadsheet, and back, problem:

$ss{A1} = Ref(\$my_variable) ;
or
$ss-Ref(A1 = \$x, B5 = \($struct-{xxx}), 'A2:A3' = ..) ;

$ss{A1} = 25 ; # set the scalar

We can now:
- Read the spreadsheet formulas
- Map our structures
- Recalculate()
- Go on with the perl structures

Changing the scalar directly doesn't change anything in the spreadsheet.
That would be a cool trick to have this work but I can't say that it's an
easy programming model but it seriously cool and difficult to debug.

The usual fixes and the documentation are going forward too.

I am looking at defining a standard (that's one function name) for database
connectivity (using DBI as interface).

I also have some discussion with another guy (I'll ask him to join here or
I'll CC) who wants to use SS::P for a web
based application.

I also think that the question of the format of the files generated by SS:P
as well as a real read and write are going to get important soon. IMO the
canonical format is perl, like in the setup example (in the tests
directory).

Thanks a lot for your input, Nadim.









Spreadsheet::Perl (was New User)

2004-01-13 Thread khemir nadim
Hi David, Thank you for your answer.

 -Original Message-

 From: David Manura

 Nadim,

 This module looks neat. The way speadsheets automatically

 update data  on dependencies, like a continually running makefile,

 seem to  be their  main benefit, but they do have some limitations

 since the data in a  problem must be flattened onto a two-dimensional

 grid. Being a  programmer, I feel that the structure, size, and type of
the

 data gets  lost. For example, if cell C5 contains the average of cells

 B5:B10, and  then you append a new value to cell B11, you have to correct

 the formula  in C5 to cover the new range B5:B11. Software like Mathcad

 offers the best of both worlds by preserving the concept of data

 structures while  also having the spreadsheet-like data-update
dependencies.

 That makes me wonder whether something similar could be done in Perl,

 and if so how  useful it would be.



About your concerns,

 For example, if cell C5 contains the average of cells

 B5:B10, and then you append a new value to cell B11,

 you have to correct the formula in C5 to cover the new

 range B5:B11. Software like Mathcad 

I don't know how MathCAD handles the problem you described (at the user
input level) so if you could flesh it up a bit, I'll try to see what is
possible. There is a way of doing something similar in S:P. If you name your
input range, you just need to update that lookup.

$ss-SetRangeName

(

'input_to_sum' = 'B1:B10'

, 'addresses' = ...

, 'ss_numbers' = ...

) ;

# as of 0.03, range and cell naming use different functions but I'll change
that tonight.

$ss{A1} = Formula($ss-Sum('input_to_sum') ;

I agree that a way of describing a range without naming one of the limits
should exist, I just don't know how to make it visually clear. What about
'B1:B*' 'B*:B10' 'B*:B*' ?

 ... but they do have some limitations since the data in a

 problem must be flattened onto a two-dimensional grid. Being a

 programmer, I feel that the structure, size, and type of the

 data gets lost.

I see this as a different problem and I do agree with you that we shouldn't
have to flatten and reconstruct structures.

SP has 'Fetch Functions'.

my $structure = ... something very complicated ...

$ss{A9} = NoCache() ; # don't use the cached value, call fetch function at
each access

$ss{A9} = FetchFunction(sub{$structure-{...}[...]{...}}) ;

There is a similar way to store data, this lets us manipulate data in place.

I can think about a neater syntax:

$ss{A9} = FetchFunction(sub-{$structure{...}[...]{...}}) ;

vs.

$ss{A9} = NoCache() ;

$ss{A9} = Ref($structure-{...}[...]{...}) ;

or

$ss{A9} = RefNoCache($structure-{...}[...]{...}) ;

You can still have a formula attached to the cell.

This takes me to another problem (that I thought I had decided over). The
formulas are executed in the Spreadsheet package not the callers. This is
IMO the neatest but we have to go through loops to get the data in to the
spreadsheet. Here is an example (all this is in working condition and open
to suggestions)

# as of 0.03

my $data ;

$ss{A1} = Formula($ss-Sum('$data') ; # error

my $data ;

sub MySub{}

$ss{A1} = Formula($ss-Sum('MySub()') ; # error

1/ It possible to use Ref and DefineFunction to make it work as intended

2/ It possible to make these two example work right away but I think it
opens doors to nasty debugging sessions

Please keep coming with your suggestions, the module is still small enough
to allow for drastic changes :-)

Cheers, Nadim.

PS. I hope the mail looks normal on your side. I still have problems
making Outbreak (tm) work as I want it it to.




New User

2004-01-12 Thread khemir nadim
Hi All, this seems to be the group I have been looking for (and missed  for
few years).

The module I am working on lately is a Spreadsheet (Spreadsheet::Perl),
There is also a Data::TreeDumper that can be of interrest wich is very good
at filtering data, it looks good and is easier to follow relationship. I
have an unreleased build system written in perl (+/- 350 Kb) that is quite
fun to use.

I'll try to be a bit active. Nice to be here

Nadim. (NKH)