Re: "would you$please shut the door?"
On Wed, 14 Jan 2004 12:03, A. Pagaltzis wrote; > Of course there are also cases where you'd want more text than > just the please to dis-/appear depending on its presence, but they > we're zeroing in to something close to a fullblown templating > system, and we wouldn't want another one of those on CPAN.. :-) No, especially when Locale::Maketext is so very well suited to this task... -- Sam Vilain, [EMAIL PROTECTED] Give a small boy a hammer and he will find that everything he encounters needs pounding. ABRAHAM KAPLAN
Re: "would you$please shut the door?"
* david nicol <[EMAIL PROTECTED]> [2004-01-13 13:56]: > Acme::please is for randomly inserting " please" into your > output via a tied scalar. The string and printing percentage > are both configurable (see the documentation.) It would be nice if there were a way to correlate two instances of the variable. Along the lines of your example, I might do something like print "would you$please shut the door$please?"; but in your current version there's a chance that this might print " please" twice, which would be undesired. You could also have an array which would makes sure that once a "please" was printed for a certain index, it won't ever happen again. Then the above example would read print "would you$please[1] shut the door$please[1]?"; and there'd be no chance I'd ever get "would you please shut the door please?". Of course there are also cases where you'd want more text than just the please to dis-/appear depending on its presence, but they we're zeroing in to something close to a fullblown templating system, and we wouldn't want another one of those on CPAN.. :-) -- Regards, Aristotle "If you can't laugh at yourself, you don't take life seriously enough."
Re: "would you$please shut the door?"
* david nicol <[EMAIL PROTECTED]> [2004-01-13 13:56]: > Is this an appropriate post to module-authors or would it be > better taken to fun-with-perl? It's a module announcement... Both? Actually, proabably neither. Who knows? :-) -- Regards, Aristotle "If you can't laugh at yourself, you don't take life seriously enough."
Re: RFC: CGI::UploadDB
On Mon, Jan 12, 2004 at 09:38:27PM -0500, David Manura wrote: > Hi Mark, > > Taking a scan though this. The first issue concerns how the > documentation is is put forth. It's not quickly clear to me what the > module does. At first glance I thought "CGI::UploadDB - Manage CGI > uploads using SQL database" meant is was a module for automatically > uploading/replicating database tables from one database to a remote > database on your web site via CGI (probably because I recently wrote > that). The word "manage" itself in imprecise, especially when "using > SQL database" could modify either "CGI uploads" or the "management of > CGI uploads." Thanks for the thorough review David. I think I will add a "Tutorial" section to the documentation that will make the module easier to understand how it works and address many of your concerns. Mark
Re: "would you$please shut the door?"
[EMAIL PROTECTED] (Sam Vilain) writes: > > Acme::please is for randomly inserting " please" into > > your output via a tied scalar. The string and printing percentage > > are both configurable (see the documentation.) > > Surely this should be in Lang::Courtesy::Random::En? It certainly shouldn't in Acme, since this code would be really useful for INTERCAL code generation. -- DISCLAIMER: Use of this advanced computing technology does not imply an endorsement of Western industrial civilization.
Spreadsheet::Perl (was New User)
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.
Re: "would you$please shut the door?"
On Tue, 13 Jan 2004 18:25, david nicol wrote; > Is this an appropriate post to module-authors or would it > be better taken to fun-with-perl? It's a module announcement... > Acme::please is for randomly inserting " please" into > your output via a tied scalar. The string and printing percentage > are both configurable (see the documentation.) Surely this should be in Lang::Courtesy::Random::En? -- Sam Vilain, [EMAIL PROTECTED] Sarcasm is not the lowest form of wit. Sarcasm is the sour cream of wit. Puns are the lowest form of wit, for which someone should be drawn and quoted. - Fred Allen (adaptation)