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.









RE: Spreadsheet::Perl (was New User)

2004-01-16 Thread Orton, Yves
Title: RE: Spreadsheet::Perl (was New User)






  What about 'B1:B*' 'B*:B10' 'B*:B*' ?


and what about 'A1:*10' or 'A*:**' or


 
 '*' might be ambiguous. Does it mean infinity? Does it mean the last 
 defined value in the column? 


I would say this is correct. Basically like pressing ctrl-cursor in excel on a given row or column.


 I don't know if Excel supports such functionality (I've looked before.)


In VBA it does for sure.


 (I also just noticed the method names are the of the 
 style GetFormulaText rather than of the more Perlish 
 get_formula_text.)


Which might be useful for VB types, but probably not real exciting for Perl types (for whom this is intended I would have thought).

 Of course, there's a variety of ways that might achive a 
 workable syntax 
 for that--tied variables, OO, source filtering, tricks with operator 
 overloading, callback functions, or writing a full parser/interpreter.


OO and operator overloading sounds to me the way to go. 


But im just kibitzing while eating a schoko-croissant. :-)


Yves





Re: Spreadsheet::Perl (was New User)

2004-01-16 Thread Terrence Brannon
khemir nadim wrote:

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.
 


Why don't you create a project for SS::P at:

   http://developer.berlios.de

Then we can discuss things on the project mailing list



Safe::World 0.09

2004-01-16 Thread Graciliano M. P.
I have just released Safe::World 0.09, and I would like to ask for some
tests of it

From version 0.08 to 0.09 I have added a XS module, due incompatibilities of
one of the dependences, Safe::Hole/0.08, since Safe::Hole 0.09 breaks *INC
behavior for Safe::World.

I'm asking for tests, since the enverioment that Safe::World creates is
complex, and need to work in any Perl version from Perl-5.6+, and OS.

Thanks in advance.

Regards,
Graciliano M. P.




New user: About this list style.

2004-01-16 Thread Graciliano M. P.
I have just subscribed to this list, and before start posting to it I want
to ask some things.

What is the style of the list?

* Is about help other authors to develope their modules?
* Help to test and give feedback about modules?
* Announce new modules?

Weel, this is what I hope that I can found here.

Regards,
Graciliano M. P.