Re: backticks

2004-04-14 Thread Trey Harris
In a message dated Wed, 14 Apr 2004, David Storrs writes: > Actually, what I'd like to know is when it was decided that %hash{key} > meant %hash{key()}?? Was it in one of the Apocalypses? Perhaps it wasn't spelled out, but the implication was certainly there. Barewords are gone. Braces create a

Re: ICU data file location issues

2004-04-14 Thread Jeff Clites
On Apr 14, 2004, at 10:20 PM, Jarkko Hietaniemi wrote: Finding stuff relative to the executable/DLL would be coolest scheme, but that is admittedly somewhat tricky to get working cross-platform. Excellent idea. Pretty much every single resource in Cocoa applications and frameworks on Mac OS X is

Method Name Truncation in PIR

2004-04-14 Thread chromatic
Hi there, I'm seeing method name truncation when trying to run code of the form: .local pmc app .local int app_type find_type app_type, 'SDL::App' app = new app_type, app_args .local pmc main_screen main_screen = app.'surface'() surface() calls _new() on another object

Re: backticks

2004-04-14 Thread David Storrs
On Wed, Apr 14, 2004 at 10:06:23PM +0200, Juerd wrote: > > If on your keyboard ` is in a worse place than {}, I'd like to know > where it is. > > Juerd Very top row, one space right of the F12 key. Extremely awkward. (This is a US keyboard on a Dell Inspiron 5100 laptop.) Please put me down a

Re: ICU data file location issues

2004-04-14 Thread Jarkko Hietaniemi
> Just came across an interesting quirk with the current usage of > ICU--if you do it, you can't run parrot unless your current directory > is the base parrot directory. Trying it from elsewhere throws a > "string_set_data_directory: ICU data files not found" error. > > Symlinking parrot's blib

Re: Compatibility with perl 5

2004-04-14 Thread Gregor N. Purdy
Brent -- I think I missed your point. I'll refer to your two code chunks as (a) and (b). Maybe you are getting at a finer point, though... What you've said in (a) is pretty much what I hinted about Inline::Perl6 in my message. If you pass it to a Perl 6 interpreter, then it will probably use tha

Re: backticks

2004-04-14 Thread Dave Whipp
"Jonathan Scott Duff" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, Apr 14, 2004 at 10:31:23PM -0400, Joe Gottman wrote: > >And Perl 6 isn't? I use backticks quite a bit in Perl, and I don't see > > that changing if I upgrade to Perl 6. > > Me too, but I write my backti

Re: backticks

2004-04-14 Thread Jonathan Scott Duff
On Wed, Apr 14, 2004 at 10:31:23PM -0400, Joe Gottman wrote: > > [EMAIL PROTECTED] (Aaron Sherman) writes: > > > $ find . -name \*.pl | wc -l > > > 330 > > > $ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; | > wc -l > > > 123 > > > > > > `` gets

Re: ICU data file location issues

2004-04-14 Thread Jeff Clites
On Apr 14, 2004, at 7:49 AM, Dan Sugalski wrote: Just came across an interesting quirk with the current usage of ICU--if you do it, you can't run parrot unless your current directory is the base parrot directory. Trying it from elsewhere throws a "string_set_data_directory: ICU data files not f

Re: backticks

2004-04-14 Thread Joe Gottman
- Original Message - From: "Simon Cozens" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 14, 2004 5:04 PM Subject: Re: backticks > [EMAIL PROTECTED] (Aaron Sherman) writes: > > $ find . -name \*.pl | wc -l > > 330 > > $ find . -name \*.pl

Re: Compatibility with perl 5

2004-04-14 Thread Brent 'Dax' Royal-Gordon
Gregor N. Purdy wrote: #!/usr/bin/perl6 ... # Perl 6 stuff here use 5; # or, whatever # Perl 5 stuff here no 5; # or, whatever # More Perl 6 stuff here use python; # you get the idea Why conflate the two at all? Perl 5 has two separate syntaxes for forcing a version and embed

Re: Compatibility with perl 5

2004-04-14 Thread Gregor N. Purdy
Brent -- Clever points are relatively high here, but I find the idea of doing the notionally simultaneous parse uncomfortable. I really don't want my programs subject to a hidden double parse cost. Regards, -- Gregor On Wed, 2004-04-14 at 15:30, Brent 'Dax' Royal-Gordon wrote: > Aaron Sherman

Re: Compatibility with perl 5

2004-04-14 Thread Gregor N. Purdy
Lets try that again, since I think you parsed my email in a way I didn't intend (and its at least 50% my fault) -- In my opinion, starting a script with "#!/usr/bin/perl6" should force the interpreter to treat it like Perl 6, and if it does anything else that's just ugly. Similarly, start

Re: Dynclass issues list please?

2004-04-14 Thread Will Coleda
All of the easy differences are listed in dynclasses/README. The hard difference, Leo summed up - we need a way to deal with dynamic pmcs that depend on each other. If I had a bunch of unrelated pmc's (like the Foo example), I'd be done already. For simple dependencies, you could just force the

RE: backticks

2004-04-14 Thread Chris
Perhaps this is naive, but couldn't something like this be achieved in a manner similar to how I just implemented it in Ruby? Surely Perl will have similar capabilities to handle unknown methods. class Hash def method_missing(method_name) str = method.id2name if str =~ /^\w+$/ then

Re: backticks

2004-04-14 Thread Luke Palmer
Scott Walters writes: > Juerd, > > You'd do well to not remove the conclusion of my post when the conclusion > is that the I strongly support you. Otherwise, your reply, read out of > context, sounds like you're fending off an attacker ;) > > People would do well to seperate the merits of the ide

Re: Compatibility with perl 5

2004-04-14 Thread Brent 'Dax' Royal-Gordon
Aaron Sherman wrote: On Wed, 2004-04-14 at 09:29, Gregor N. Purdy wrote: So, we are moving in a more verbose direction, which is a bummer for people who like to write one-liners and other tiny programs. perl6 -i.bak -ple 'rule octet {\d{1,2}|<[01]>\d{2}|2[<[1-4]>\d|5<[1-5]>]} s:g/\b\.\.\

Re: backticks

2004-04-14 Thread Scott Walters
I propose we pretend that $$foo = 'bar' stills work and use that as a benchmark for hash subscripting ease. If it requires fewer keystrokes or neuron fires to write Perl 4 code, then Perl 6 might be succeding on the programming in the small but failing at programming in the large. ${'bar'} =

Re: backticks

2004-04-14 Thread Scott Walters
Juerd, You'd do well to not remove the conclusion of my post when the conclusion is that the I strongly support you. Otherwise, your reply, read out of context, sounds like you're fending off an attacker ;) People would do well to seperate the merits of the idea from the merits of the suggested

Re: backticks

2004-04-14 Thread Jarkko Hietaniemi
> hash slices aren't used much at all. People *always* overgeneralize.

Re: backticks

2004-04-14 Thread Matthijs van Duin
On Wed, Apr 14, 2004 at 01:36:21PM -0600, John Williams wrote: %hash`$key oops, you contradicted yourself here. "only be useable for \w+ keys" I guess you disliked his idea so much you didn't bother to read what exactly he said, right? "As with methods, a simple [...] scalar should be usable

Re: backticks

2004-04-14 Thread Simon Cozens
[EMAIL PROTECTED] (Aaron Sherman) writes: > $ find . -name \*.pl | wc -l > 330 > $ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; | wc -l > 123 > > `` gets used an awful lot But that's in Perl 5, which is a glue language. -- "Though a program

Re: backticks

2004-04-14 Thread Juerd
Randal L. Schwartz skribis 2004-04-14 13:56 (-0700): > > "Juerd" == Juerd <[EMAIL PROTECTED]> writes: > Juerd> readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses > Juerd> can be found. Most are in Debian's modules. > That's because they aren't particularly interesting in mo

Re: backticks

2004-04-14 Thread Matthijs van Duin
On Wed, Apr 14, 2004 at 01:56:35PM -0700, Randal L. Schwartz wrote: That's because they aren't particularly interesting in modules, but in 10 line scripts, they show up quite frequently. This undermines the rest of your request. No, actually, it doesn't. Juerd doesn't seem to like ``, but that poi

Re: backticks

2004-04-14 Thread Randal L. Schwartz
> "Juerd" == Juerd <[EMAIL PROTECTED]> writes: Juerd> readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses Juerd> can be found. Most are in Debian's modules. That's because they aren't particularly interesting in modules, but in 10 line scripts, they show up quite frequentl

Re: backticks

2004-04-14 Thread Juerd
Matthew Walton skribis 2004-04-14 21:23 (+0100): > >%foo<<$bar>> doesn't quite do the same as %foo{$bar}. > That's one method, really - <<>> being like {' '}, and really just > carrying on the very familiar idea of different kinds of quotes. Like ' > and ". The <<>> thing works as if there is an

Re: backticks

2004-04-14 Thread Aaron Sherman
On Wed, 2004-04-14 at 08:18, Juerd wrote: > Perl 5 has the qx// operator which does readpipe. I believe the function > for it was added later. (It doesn't handle a LIST as system does, > unfortunately.) qx// is also known as ``. Two backticks. > > readpipe/qx/`` isn't used much. In all my @INC, on

Re: backticks

2004-04-14 Thread Juerd
Scott Walters skribis 2004-04-14 13:12 (-0700): > Second, autovivication is impossible for the same reason. We can't tell > from parsing this lone expression whether baz should be converted to numbers > or strings automatically. I want ` for hashes in the first place. Having it for arrays too wou

Re: backticks

2004-04-14 Thread Matthew Walton
Juerd wrote: chromatic skribis 2004-04-14 12:32 (-0700): That's exactly my objection to this idea. I think it goes too far to make simple things simpler while making complex things impossible. Absolutely false. This is an addition to the already existing {}, which should stay. %foo{ something

Re: backticks

2004-04-14 Thread Scott Walters
When I announced that I fixed a version of Perl6::Variables to do <<>>, crickets chirped. I dislike having to place a lot of matching quotes, brackets, parenthesis, and braces in my code. You must stop and visually inspect code to make sure it balances out and even then is a common source of bug c

Re: backticks

2004-04-14 Thread Juerd
John Williams skribis 2004-04-14 13:36 (-0600): > On Wed, 14 Apr 2004, Juerd wrote: > > I propose to use ` as a simple hash subscriptor, as an alternative to {} > > and <<>>. It would only be useable for \w+ keys or perhaps -?\w+. > > As with methods, a simple "atomic" (term exists only in perlreft

Re: Compatibility with perl 5

2004-04-14 Thread Aaron Sherman
On Wed, 2004-04-14 at 09:29, Gregor N. Purdy wrote: > So, we are moving in a more verbose direction, which is a bummer for > people who like to write one-liners and other tiny programs. perl6 -i.bak -ple 'rule octet {\d{1,2}|<[01]>\d{2}|2[<[1-4]>\d|5<[1-5]>]} s:g/\b\.\.\.\b/IP ADDR/;' *

Re: backticks

2004-04-14 Thread Juerd
chromatic skribis 2004-04-14 12:32 (-0700): > That's exactly my objection to this idea. I think it goes too far to > make simple things simpler while making complex things impossible. Absolutely false. This is an addition to the already existing {}, which should stay. %foo{ something } will stil

Re: backticks

2004-04-14 Thread John Williams
On Wed, 14 Apr 2004, Juerd wrote: > I propose to use ` as a simple hash subscriptor, as an alternative to {} > and <<>>. It would only be useable for \w+ keys or perhaps -?\w+. As > with methods, a simple "atomic" (term exists only in perlreftut, afaix, > but I don't know another word to describe a

Re: backticks

2004-04-14 Thread chromatic
On Wed, 2004-04-14 at 12:24, Juerd wrote: > chromatic skribis 2004-04-14 12:07 (-0700): > > > I think %hash`key makes sense. But I'd like to find out if more people > > > like this idea. > > How do you request a hash slice with backticks? > You don't. There are %foo<> and %foo{'foo', 'bar'} alrea

Re: backticks

2004-04-14 Thread Juerd
Jonathan Scott Duff skribis 2004-04-14 14:21 (-0500): > On Wed, Apr 14, 2004 at 12:07:18PM -0700, chromatic wrote: > > On Wed, 2004-04-14 at 05:18, Juerd wrote: > > > I think %hash`key makes sense. But I'd like to find out if more people > > > like this idea. > > How do you request a hash slice wit

Re: Attribute questions

2004-04-14 Thread Dan Sugalski
At 7:42 AM +0100 4/13/04, Piers Cawley wrote: Dan Sugalski <[EMAIL PROTECTED]> writes: At 6:53 PM +0100 4/8/04, Mark Sparshatt wrote: I've got a couple of questions about Atrributes in Parrot. PDD15 says that both classes and objects have a list of attributes and it is possible to add or remov

Dynclass issues list please?

2004-04-14 Thread Dan Sugalski
Seems we've some issues with static vs dynamic pmcs. Could someone take a few minutes (nudge, nudge, Will :) and list out the issues? I'd like to have the build process for static and dynamic PMCs be identical which we're not at yet, so this'd seem to be a good time to do what we have to to mak

Re: backticks

2004-04-14 Thread Juerd
chromatic skribis 2004-04-14 12:07 (-0700): > > I think %hash`key makes sense. But I'd like to find out if more people > > like this idea. > How do you request a hash slice with backticks? You don't. There are %foo<> and %foo{'foo', 'bar'} already and hash slices aren't used much at all. The prop

Re: backticks

2004-04-14 Thread Jonathan Scott Duff
On Wed, Apr 14, 2004 at 12:07:18PM -0700, chromatic wrote: > On Wed, 2004-04-14 at 05:18, Juerd wrote: > > > I think %hash`key makes sense. But I'd like to find out if more people > > like this idea. > > How do you request a hash slice with backticks? I think you wouldn't. For that the more verb

Re: Plans for string processing

2004-04-14 Thread Aaron Sherman
On Tue, 2004-04-13 at 18:23, Leopold Toetsch wrote: > Aaron Sherman <[EMAIL PROTECTED]> wrote: > > For example, in Perl5/Ponie: > > > @names=; > > print "Phone Book: ", sort(@names), "\n"; > > > In this example, I don't see why I would care that NAMES might be a > > pseudo-handle

Re: backticks

2004-04-14 Thread chromatic
On Wed, 2004-04-14 at 05:18, Juerd wrote: > I think %hash`key makes sense. But I'd like to find out if more people > like this idea. How do you request a hash slice with backticks? -- c

Re: Plans for string processing

2004-04-14 Thread Dan Sugalski
At 1:39 PM +0200 4/14/04, Michael Scott wrote: On 13 Apr 2004, at 23:43, Dan Sugalski wrote: I've been assuming it's a left-side wins, as you're tacking onto an existing string, so you'd get English in all cases. Alternately you could get an exception. The end result of a mixed-language operati

Re: backticks

2004-04-14 Thread Matthijs van Duin
On Wed, Apr 14, 2004 at 02:18:48PM +0200, Juerd wrote: I propose to use ` as a simple hash subscriptor, as an alternative to {} and <<>>. It would only be useable for \w+ keys or perhaps -?\w+. As with methods, a simple "atomic" (term exists only in perlreftut, afaix, but I don't know another word

Re: Plans for string processing

2004-04-14 Thread Larry Wall
On Wed, Apr 14, 2004 at 01:39:17PM +0200, Michael Scott wrote: : : On 13 Apr 2004, at 23:43, Dan Sugalski wrote: : : >I've been assuming it's a left-side wins, as you're tacking onto an : >existing string, so you'd get English in all cases. Alternately you : >could get an exception. The end res

Re: new libraries

2004-04-14 Thread Jarkko Hietaniemi
Tim Bunce wrote: > On Sat, Apr 10, 2004 at 01:49:37PM +0300, Jarkko Hietaniemi wrote: > >>>(We've learnt the hard way with Perl5 modules names that more words are good. >> >>And more words that mean something... "Data" ranks right up there as the >>worst possible names for anything. > > > (Nah,

Re: [perl #28531] [PATCH] C++ comment fix

2004-04-14 Thread Leopold Toetsch
Adam Thomason <[EMAIL PROTECTED]> wrote: > A handful of // comments are lingering around the tree. Patch fixes > them to use /* ... */. Thanks, applied. leo

ICU data file location issues

2004-04-14 Thread Dan Sugalski
Just came across an interesting quirk with the current usage of ICU--if you do it, you can't run parrot unless your current directory is the base parrot directory. Trying it from elsewhere throws a "string_set_data_directory: ICU data files not found" error. Symlinking parrot's blib/ dir into t

Re: [perl #28426] Failed test on Fedora linux

2004-04-14 Thread Leopold Toetsch
Walter G <[EMAIL PROTECTED]> wrote: > t/pmc/object-meths..dubious > Test returned status 1 (wstat 256, 0x100) > Scalar found where operator expected at (eval 157) > line 1, near "'int' $__val" > (Missing operator before $__val?) > DIED. FAILED test 17 Strange. This is AFAIK

Re: Plans for string processing

2004-04-14 Thread Michael Scott
On 13 Apr 2004, at 23:43, Dan Sugalski wrote: I've been assuming it's a left-side wins, as you're tacking onto an existing string, so you'd get English in all cases. Alternately you could get an exception. The end result of a mixed-language operation could certainly be the Dunno language or the

backticks

2004-04-14 Thread Juerd
Perl 5 has the qx// operator which does readpipe. I believe the function for it was added later. (It doesn't handle a LIST as system does, unfortunately.) qx// is also known as ``. Two backticks. readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses can be found. Most are in Debia

Re: Compatibility with perl 5

2004-04-14 Thread Gregor N. Purdy
So, we are moving in a more verbose direction, which is a bummer for people who like to write one-liners and other tiny programs. Assuming only Perl 6 is installed on your system, if your script started with: #!/usr/bin/perl all the stuff about trying to figure out what version you are using w

Re: new libraries

2004-04-14 Thread Jens Rieks
On Saturday 10 April 2004 12:42, Tim Bunce wrote: > Perhaps Data::DeepReplacePMC What do you think about: PMC::DeepReplace (Data::Replace) PMC::Printable (Data::Escape) PMC::Sort (Data::Sort) PMC::Dumper (Data::Dumper) > (We've learnt the hard way with Perl5 modules names that more words are > go