Re: PDD 2, vtables

2001-02-08 Thread Jarkko Hietaniemi
> > I didn't put UTF-8 in on purpose, because I'd just as soon not deal with it > > internally. Variable length character data's a pain in the butt, and if we > > can avoid having the internals deal with it except as a source that gets > > converted to UTF-32, that's fine with me. > > I agree

Re: assign to magic name-of-function variable instead of "return"

2001-02-08 Thread Jarkko Hietaniemi
On Tue, Feb 06, 2001 at 05:01:03AM +1100, Damian Conway wrote: >> Really? Are lexicals in the sub visible in the post handler? > > No. Only the original arguments and the return value. > >> (Of course I realize *F does not illustrate this...) > > Exactly. ;-) > > Actually, I do agr

Perl 5.6: Linux Threading

2001-02-08 Thread Jiten Goel
Hi, I have problem with Perl Threading on Linux. I compiled 5.6 on Linux and trying to create threads. Sample program: #!/usr/bin/perl -w #file : test.pl use Thread; $thr = new Thread \&foo; sub foo() { print "hi"; } == $./test.pl Error: No threads in this perl at ./t

Re: POST blocks (like END, but in a sub or sub-like scope)

2001-02-08 Thread John Porter
David L. Nicol wrote: > > Do you agree that they shouldn't get tacked on until execution passes their > definition, unlike END blocks which get appended when they are parsed? Yes, absolutely; that is an important point. END blocks are different because there is only ever one activation record f

Re: Closures and default lexical-scope for subs

2001-02-08 Thread John Porter
Branden foobar wrote: > I expect Perl 6 will have some way to define its variables as being > lexical-scoped in the sub they are used as default, either by the language > default, or by a pragma, as `use scope "subs"; ', as it's proposed in RFC > 64. > If that's the case, I wonder how closures w

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Clayton Scott
Peter Scott wrote: > > Eh? I thought PPM was simply "perl -MCPAN -e install" for Windows users, > pointed to a set of modules which have XS content that they'd had to fiddle > with to port to Win32. Not by far. It is a replacment for CPAN that builds and maintains its own local databas

Re: PDD 2, vtables

2001-02-08 Thread Edwin Steiner
Dan Sugalski wrote: > > At 11:57 AM 2/8/2001 +0100, Edwin Steiner wrote: > >Dan Sugalski wrote: > > > At 04:02 PM 2/7/2001 +, David Mitchell wrote: > > > > > >Please see my previous post on the subject. As I pointed there, > > > > implementing > > > > > >|| and && like that breaks short-circu

Re:

2001-02-08 Thread Bryan C . Warnock
On Wednesday 31 December 1969 18:59, Branden wrote: > Yes. Packaging is what's important. I actually expect to not have to install > the `par' and have perl6's magic filehandles decompress a file from the > package `on-the-fly'. I think zip is the way to go! Is there any > platform/license or an

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Dan Sugalski
At 05:49 PM 2/8/2001 -0200, Branden wrote: >Peter Scott wrote: > > Eh? I thought PPM was simply "perl -MCPAN -e install" for Windows users, > > pointed to a set of modules which have XS content that they'd had to >fiddle > > with to port to Win32. > > > >Sorry for the mistake... I've never actual

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Branden
Peter Scott wrote: > Eh? I thought PPM was simply "perl -MCPAN -e install" for Windows users, > pointed to a set of modules which have XS content that they'd had to fiddle > with to port to Win32. > Sorry for the mistake... I've never actually used PPM, only read about it in the web. I guess the

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Peter Scott
At 05:00 PM 2/8/01 -0200, Branden wrote: >I wrote: > > I think zip is the way to go! Is there any > > platform/license or any other restricting issues we should care about zip? > > Is it ported to all platforms Perl currently runs on? Is there a Perl >module > > for handling zips? > >Aren't we re-

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Branden
I'm writing a PDD on the subject, as suggested by Dan, and I intend to post it by tomorrow. In the lack of a better list, I think we stick with -language. If someone can suggest a better one, please do it. - Branden

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Branden
I wrote: > I think zip is the way to go! Is there any > platform/license or any other restricting issues we should care about zip? > Is it ported to all platforms Perl currently runs on? Is there a Perl module > for handling zips? Aren't we re-inventing the wheel here? It strikes me now that Act

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Branden
Dan Sugalski wrote: > At 05:58 PM 2/8/2001 +, Nicholas Clark wrote: > >\zip's better in that it allows easy random access to a compressed file, > >[without having to compress everything else first] but worse for the > >same reason because you don't get as good a compression ratio by > >compres

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Dan Sugalski
At 05:49 PM 2/8/2001 +, Michael G Schwern wrote: >On Thu, Feb 08, 2001 at 12:31:25PM -0500, Dan Sugalski wrote: > > Not unless you strip the bytecode. I want to optionally package the source > > in the bytecode, since otherwise you can't do some optimizations after the > > fact on the generate

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Dan Sugalski
At 05:58 PM 2/8/2001 +, Nicholas Clark wrote: >On Thu, Feb 08, 2001 at 12:41:34PM -0500, Dan Sugalski wrote: > > At 05:39 PM 2/8/2001 +, Nicholas Clark wrote: > > > >Do we really want to use tar format (over say cpio) as tar rounds files > > >up to 512 block boundaries, and has some arbitr

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Nicholas Clark
On Thu, Feb 08, 2001 at 12:41:34PM -0500, Dan Sugalski wrote: > At 05:39 PM 2/8/2001 +, Nicholas Clark wrote: > >Do we really want to use tar format (over say cpio) as tar rounds files > >up to 512 block boundaries, and has some arbitrary restrictions on filename > >lengths in the headers? >

Re: PDD 2, vtables

2001-02-08 Thread Dan Sugalski
At 11:57 AM 2/8/2001 +0100, Edwin Steiner wrote: >Dan Sugalski wrote: > > At 04:02 PM 2/7/2001 +, David Mitchell wrote: > > > > >Please see my previous post on the subject. As I pointed there, > > > implementing > > > > >|| and && like that breaks short-circuits. > > > > > > > > No, it doesn't

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Michael G Schwern
On Thu, Feb 08, 2001 at 05:39:01PM +, Nicholas Clark wrote: > Do we really want to use tar format (over say cpio) as tar rounds files > up to 512 block boundaries, and has some arbitrary restrictions on filename > lengths in the headers? First cut will be tar. Why? Its simple, its common, a

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Michael G Schwern
On Thu, Feb 08, 2001 at 12:31:25PM -0500, Dan Sugalski wrote: > Not unless you strip the bytecode. I want to optionally package the source > in the bytecode, since otherwise you can't do some optimizations after the > fact on the generated bytecode stream. Clever dog! > > 2) You have to m

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Dan Sugalski
At 05:39 PM 2/8/2001 +, Nicholas Clark wrote: >On Thu, Feb 08, 2001 at 12:26:59PM -0500, Dan Sugalski wrote: > > This is an excellent reason, and one I hadn't considered. I withdraw any > > objections. Care to put together a PDD on how it should be handled? > > (Including Archive::Tar as part

Re: PDD 2, vtables

2001-02-08 Thread Dan Sugalski
At 12:12 PM 2/8/2001 +, Nicholas Clark wrote: >On Wed, Feb 07, 2001 at 01:24:27PM -0500, Dan Sugalski wrote: > > At 06:12 PM 2/7/2001 +, Nicholas Clark wrote: > > > >But I don't like the thought of going in and out of a lot of generic > > >routines for > > > > > >$a = 3; > > >$a += 2; > >

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Nicholas Clark
On Thu, Feb 08, 2001 at 12:26:59PM -0500, Dan Sugalski wrote: > This is an excellent reason, and one I hadn't considered. I withdraw any > objections. Care to put together a PDD on how it should be handled? > (Including Archive::Tar as part of the base perl distribution's not > inappropriate, a

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Dan Sugalski
At 02:43 PM 2/8/2001 -0200, Branden wrote: >Dan Sugalski wrote: > > > > I'm not sure this is all necessary. Wouldn't we be reasonably better off >if > > we instead just shipped off bytecode compiled versions of the scripts? > > Seems easier to ship that way than as an archive of stuff. (We can, if

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Dan Sugalski
At 11:52 AM 2/8/2001 +, Michael G Schwern wrote: >On Thu, Feb 08, 2001 at 11:21:17AM -0500, Dan Sugalski wrote: > > I'm not sure this is all necessary. Wouldn't we be reasonably better > off if > > we instead just shipped off bytecode compiled versions of the scripts? > >Sure, except... >

Re: Closures and default lexical-scope for subs

2001-02-08 Thread Michael G Schwern
On Thu, Feb 08, 2001 at 02:18:14PM -0200, Branden wrote: > I expect Perl 6 will have some way to define its variables as being > lexical-scoped in the sub they are used as default, either by the language > default, or by a pragma, as `use scope "subs"; ', as it's proposed in RFC > 64. I believe t

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Michael G Schwern
On Thu, Feb 08, 2001 at 11:21:17AM -0500, Dan Sugalski wrote: > I'm not sure this is all necessary. Wouldn't we be reasonably better off if > we instead just shipped off bytecode compiled versions of the scripts? Sure, except... 1) You lose your readable source code (discussions of B::Depar

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Branden
Dan Sugalski wrote: > > I'm not sure this is all necessary. Wouldn't we be reasonably better off if > we instead just shipped off bytecode compiled versions of the scripts? > Seems easier to ship that way than as an archive of stuff. (We can, if its > deemed useful, define the bytecode format in a

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Dan Sugalski
At 01:44 PM 2/8/2001 -0200, Branden wrote: >Michael G Schwern wrote: > > On Thu, Feb 08, 2001 at 12:07:18PM -0200, Branden wrote: > > > The issue is actually not auto-downloading modules and their >prerequisites, > > > but actually packaging several scripts and modules in one file, so as >Java's >

Closures and default lexical-scope for subs

2001-02-08 Thread Branden
I expect Perl 6 will have some way to define its variables as being lexical-scoped in the sub they are used as default, either by the language default, or by a pragma, as `use scope "subs"; ', as it's proposed in RFC 64. If that's the case, I wonder how closures will be done, since having lexica

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Branden
Michael G Schwern wrote: > On Thu, Feb 08, 2001 at 12:07:18PM -0200, Branden wrote: > > The issue is actually not auto-downloading modules and their prerequisites, > > but actually packaging several scripts and modules in one file, so as Java's > > jar do. I think supporting this would be neat. >

Re: POST blocks (like END, but in a sub or sub-like scope)

2001-02-08 Thread John Porter
Bart Lateur wrote: > The idea is inspired, not just by the existing BEGIN and END blocks > syntax, but also by the fact that in 5.6.0, you can put a sub definition > inside another sub. You can nest them. The effect is that nested sub is > only visible from within the outer sub. That seems rather

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Michael G Schwern
On Thu, Feb 08, 2001 at 12:07:18PM -0200, Branden wrote: > The issue is actually not auto-downloading modules and their prerequisites, > but actually packaging several scripts and modules in one file, so as Java's > jar do. I think supporting this would be neat. I thought about making a "par" uti

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Branden
Michael G Schwern wrote: > > Oddly enough, Perl does handle this... mostly. The CPAN shell can > automatically download and install prerequisites for modules, provided > the module explicitly declares the prereqs. Class::DBI ultimately > needs something like 9 other CPAN modules, which would be

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Michael G Schwern
On Thu, Feb 08, 2001 at 08:53:07AM -, Filipe Brandenburger wrote: > Branden wrote: > >When I download a module from Internet, say module Foo, then I install > >it and try to use it, it promptly breaks when it tries to `use Bar' > >and sees that Bar is not installed on my system. So I have to g

Re: PDD 2, vtables

2001-02-08 Thread Nicholas Clark
On Wed, Feb 07, 2001 at 01:24:27PM -0500, Dan Sugalski wrote: > At 06:12 PM 2/7/2001 +, Nicholas Clark wrote: > >But I don't like the thought of going in and out of a lot of generic > >routines for > > > >$a = 3; > >$a += 2; > > > >when the integer scalar ought to know what the inside of anot

Re: POST blocks (like END, but in a sub or sub-like scope)

2001-02-08 Thread Bart Lateur
On Wed, 7 Feb 2001 23:41:32 +, Nicholas Clark wrote: >[on the other hand, I'll argue the other side that > >{ > my $flag > open FOO, " ... >} >post { > close FOO if $flag; >} > >is clearer because the tidy up doesn't visually get in the way of the flow >of what you're doing, and you can s

Re: POST blocks (like END, but in a sub or sub-like scope)

2001-02-08 Thread Nicholas Clark
On Wed, Feb 07, 2001 at 10:59:00PM -0600, David L. Nicol wrote: > Nicholas Clark wrote: > > > on the other hand, I'll argue the other side that > > > > { > > my $flag > > open FOO, " > ... > > } > > post { > > close FOO if $flag; > > } > > > > is clearer because the tidy up doesn't visu

Re: PDD 2, vtables

2001-02-08 Thread Edwin Steiner
Dan Sugalski wrote: > At 04:02 PM 2/7/2001 +, David Mitchell wrote: > > > >Please see my previous post on the subject. As I pointed there, > > implementing > > > >|| and && like that breaks short-circuits. > > > > > > No, it doesn't. Just because you pass in two PMCs doesn't mean that they >

Re: Auto-install (was autoloaded...)

2001-02-08 Thread Nicholas Clark
On Thu, Feb 08, 2001 at 08:53:07AM -, Filipe Brandenburger wrote: > The solution I propose to this problem is borrowed (copied) from what Java > did in version 1.1 with jars (did wrong, of course), and somewhat like > RedHat's rpms. What I suggest is having a kind of archive that would be li

Auto-install (was autoloaded...)

2001-02-08 Thread Filipe Brandenburger
Branden wrote: >When I download a module from Internet, say module Foo, then I install >it and try to use it, it promptly breaks when it tries to `use Bar' >and sees that Bar is not installed on my system. So I have to go on >to Internet again, find Bar, install it, so on, until I find Bar needs