Re: a practical question

2006-08-23 Thread Steffen Schwigon
Richard Nabil Hainsworth <[EMAIL PROTECTED]> writes: > But I want to start doing real things. Which for me requires gui > toolkits. > > I have used Tk with perl5 and I am looking at WxWidgets. > > WxWidgets (and the more commercial Qt) exist as C++ classes, > although WxPerl is a set of wrappers ar

[perl #40225] Making Makefiles...

2006-08-23 Thread via RT
# New Ticket Created by Will Coleda # Please include the string: [perl #40225] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40225 > I'd like to add a few features to the genfile() code when generating makefiles... 1)

Re: [perl #40225] Making Makefiles...

2006-08-23 Thread Will Coleda
This was not intended to be a bug report. I blame my mailer. =-) Feedback still welcome, might as well leave it as a ticket now.

Re: [perl #40225] Making Makefiles...

2006-08-23 Thread Leopold Toetsch
Am Mittwoch, 23. August 2006 16:38 schrieb Will Coleda: > I'd like to add a few features to the genfile() code when generating > makefiles... A general note: instead of inventing more and more custom make extensions, which all needs post-processing, I'm proposing to use a few needed gmake exten

Re: [perl #40225] Making Makefiles...

2006-08-23 Thread Will Coleda
On Aug 23, 2006, at 1:46 PM, Leopold Toetsch via RT wrote: Am Mittwoch, 23. August 2006 16:38 schrieb Will Coleda: I'd like to add a few features to the genfile() code when generating makefiles... A general note: instead of inventing more and more custom make extensions, which all needs p

Re: LLVM and HLVM

2006-08-23 Thread peter baylies
On 8/22/06, John Siracusa <[EMAIL PROTECTED]> wrote: Has anyone looked at LLVM lately? Yes, actually, I was looking at it just the other day. I couldn't get it to build on x86-64, but I talked to some of the developers over in their IRC channel, and they told me that this would be forthcoming

Same-named arguments

2006-08-23 Thread Michael Snoyman
Hi, I'm just starting with Perl 6. I was reading through "Perl 6 and Parrot Essentials" (finally arrived yesterday from Amazon; very happy) and I was wondering what would happen if you had a parameter list that included variables of a different type but the same name (ie, $foo, @foo). I wrote a

Re: Same-named arguments

2006-08-23 Thread Juerd
Michael Snoyman skribis 2006-08-23 12:10 (-0700): > sub mysub($foo, @foo, %foo) { I hope this is a compile time failure. If not, I'd expect a warning, at least. Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.

Re: Same-named arguments

2006-08-23 Thread Carl Mäsak
Juerd (>), Michael Snoyman (>>): > sub mysub($foo, @foo, %foo) { I hope this is a compile time failure. If not, I'd expect a warning, at least. Why? It looks reasonable IMHO. // Carl

Re: Same-named arguments

2006-08-23 Thread Juerd
Carl Mäsak skribis 2006-08-23 21:54 (+0200): > Juerd (>), Michael Snoyman (>>): > >> sub mysub($foo, @foo, %foo) { > >I hope this is a compile time failure. If not, I'd expect a warning, at > >least. > Why? It looks reasonable IMHO. Because arguments are passed without sigil, and here you'd be for

Re: LLVM and HLVM

2006-08-23 Thread peter baylies
On 8/23/06, Aaron Sherman <[EMAIL PROTECTED]> wrote: On 8/23/06, peter baylies <[EMAIL PROTECTED]> wrote: > On 8/22/06, John Siracusa <[EMAIL PROTECTED]> wrote: > > > > Has anyone looked at LLVM lately? [...] On the other hand, Parrot built quite nicely on x86-64, although I think I > like t

Re: LLVM and HLVM

2006-08-23 Thread Aaron Sherman
On 8/23/06, peter baylies <[EMAIL PROTECTED]> wrote: On 8/22/06, John Siracusa <[EMAIL PROTECTED]> wrote: > > Has anyone looked at LLVM lately? [...] On the other hand, Parrot built quite nicely on x86-64, although I think I like the 32-bit build (which also built just fine, albeit without

Re: [perl #40225] Making Makefiles...

2006-08-23 Thread Joshua Hoblitt
On Wed, Aug 23, 2006 at 02:24:45PM -0400, Will Coleda wrote: > > To sum up: for now, I'm working on being able to support: > > $(addprefix runtime/builtin,$(notdir $(wildcard languages/tcl/ > runtime/builtin/*.pir))) > > Which looks like gmake, but will be expanded at config time: once we >

Re: [perl #40225] Making Makefiles...

2006-08-23 Thread Will Coleda
On Aug 23, 2006, at 4:10 PM, Joshua Hoblitt wrote: On Wed, Aug 23, 2006 at 02:24:45PM -0400, Will Coleda wrote: To sum up: for now, I'm working on being able to support: $(addprefix runtime/builtin,$(notdir $(wildcard languages/tcl/ runtime/builtin/*.pir))) Which looks like gmake, but will

Re: LLVM and HLVM

2006-08-23 Thread John Siracusa
On 8/23/06 4:09 PM, Aaron Sherman wrote: > here's the problem with that: llvm is a very light layer, but it's yet another > layer. To put it between parrot and hardware would mean that parrot is JITing > to LLVM byte-code, which is JITing to machine code. Not really ideal. ...unless LLVM does a mu

pugs: rw block parameters

2006-08-23 Thread Mark J. Reed
Sorry if this is a known question, but I didn't see it mentioned in the recent archive or FAQ. for ($a, $b) { $_ = ... } gives me a "Can't modify constant item: VRef ". Making it explicitly rw doesn't help: for ($a, $b) -> $x is rw { $x = ... } Is this a "haven't gotten around to rw parameter

Ponie has been put out to pasture

2006-08-23 Thread Jesse Vincent
Over the past several years, one key aspect of the migration plan to Perl 6 has been the Ponie project, a fusion of the Perl 5 runtime with Parrot. Sponsored by Fotango, Artur Bergman and Nicholas Clark did a heroic job cleaning up Perl's internals to make it possible to replace some compon

Ponie has been put out to pasture

2006-08-23 Thread Jesse Vincent
Over the past several years, one key aspect of the migration plan to Perl 6 has been the Ponie project, a fusion of the Perl 5 runtime with Parrot. Sponsored by Fotango, Artur Bergman and Nicholas Clark did a heroic job cleaning up Perl's internals to make it possible to replace some compon

Pair of lists => list of pairs?

2006-08-23 Thread Mark J. Reed
Suppose I have two arrays @k and @v and I want to declare and initialize a hash %h such that %h.keys eqv @k and %h.values eqv @v. I could use a direct translation of the P5 idiom: my %h; [EMAIL PROTECTED] = @v; But is there an easy way in Perl6 to do it all in one go? Should this work? my %h

Re: Pair of lists => list of pairs?

2006-08-23 Thread Gaal Yahas
On Wed, Aug 23, 2006 at 05:43:48PM -0400, Mark J. Reed wrote: > But is there an easy way in Perl6 to do it all in one go? Should this work? > > my %h = @k [=>] @v; You want a zip: my %h = @k ¥ @v; my %h = @k Y @v; # ASCII fallback my %h = zip(@k, @v); # or maybe zip(@k; @v) this week? --

Re: Pair of lists => list of pairs?

2006-08-23 Thread Larry Wall
On Wed, Aug 23, 2006 at 05:43:48PM -0400, Mark J. Reed wrote: : Suppose I have two arrays @k and @v and I want to declare and initialize a : hash %h such that %h.keys eqv @k and %h.values eqv @v. : : I could use a direct translation of the P5 idiom: : : my %h; : [EMAIL PROTECTED] = @v; : : But i

Re: Pair of lists => list of pairs?

2006-08-23 Thread Juerd
Mark J. Reed skribis 2006-08-23 17:43 (-0400): > But is there an easy way in Perl6 to do it all in one go? Should this work? > my %h = @k [=>] @v; Hyper is not [], but >><<. And >>=><< works perfectly in Pugs, and does exactly what you describe. [] is for reduction, and is prefix: [+] 1,2,3 Ju

Re: Pair of lists => list of pairs?

2006-08-23 Thread Michael Snoyman
: my %h; : [EMAIL PROTECTED] = @v; : : But is there an easy way in Perl6 to do it all in one go? Should this work? : : my %h = @k [=>] @v; Reduce operators only turn infix into list operators. What you really want here is a hyper-fatarrow: my %h = @k »=>« @v; Gaal pointed out using zip

Re: Pair of lists => list of pairs?

2006-08-23 Thread Larry Wall
On Thu, Aug 24, 2006 at 12:51:04AM +0300, Gaal Yahas wrote: : On Wed, Aug 23, 2006 at 05:43:48PM -0400, Mark J. Reed wrote: : > But is there an easy way in Perl6 to do it all in one go? Should this work? : > : > my %h = @k [=>] @v; : : You want a zip: : : my %h = @k ¥ @v; : my %h = @k Y @v;

clarifying the spec for 'ref'

2006-08-23 Thread Mark Stosberg
I noticed in pugs, 'ref' does not return 'HASH' and 'ARRAY' as Perl5 does, but returns values including 'Hash', 'Array' and 'Array::Const'. I don't find meaningful mentions of 'HASH' and 'ARRAY' by grep'ing docs/Perl6 (or even "ref"!), so I wanted to check in here about the meaningfulness of this

Re: Pair of lists => list of pairs?

2006-08-23 Thread Mark J. Reed
> Reduce operators only turn infix into list operators. What you really > want here is a hyper-fatarrow: > > my %h = @k »=>« @v; Ah, right. Silly me. I got hyper and reduce confused. Thanks! Gaal pointed out using zip. What would be the difference then between a hyper-fatarrow an

Re: Pair of lists => list of pairs?

2006-08-23 Thread Larry Wall
On Wed, Aug 23, 2006 at 03:19:22PM -0700, Larry Wall wrote: : But I'd still probably use a hyper-fatarrow for this case rather than : relying on interleaving. Another reason for preferring hyper is that it makes promises about parallelizability, whereas the zip/each solutions would tend to assume

My first functional perl6 program

2006-08-23 Thread Mark J. Reed
To get my feet wet, I thought I'd translate my silly little cryptogram helper. It turned out like this: #!/usr/local/bin/pugs #== # Braindead cryptogram assistant with hard-coded key. #--

Re: My first functional perl6 program

2006-08-23 Thread Mark J. Reed
On 8/23/06, Mark J. Reed <[EMAIL PROTECTED]> wrote: my %trans = ('a'..'z') »=>« ('?' xx 26); Also, correct me if I'm wrong, but I should theoretically be able to use xx * there, thus creating a lazily-evaluated infinitely-long list of question marks? -- Mark J. Reed <[EMAIL PROTECTED]>

Re: clarifying the spec for 'ref'

2006-08-23 Thread Larry Wall
On Wed, Aug 23, 2006 at 06:20:55PM -0400, Mark Stosberg wrote: : I noticed in pugs, 'ref' does not return 'HASH' and 'ARRAY' as Perl5 : does, but returns values including 'Hash', 'Array' and 'Array::Const'. Well, first of all, ref is going away entirely, since there's no such thing as a reference

Re: My first functional perl6 program

2006-08-23 Thread Larry Wall
On Wed, Aug 23, 2006 at 06:49:06PM -0400, Mark J. Reed wrote: : On 8/23/06, Mark J. Reed <[EMAIL PROTECTED]> wrote: : >my %trans = ('a'..'z') »=>« ('?' xx 26); : : Also, correct me if I'm wrong, but I should theoretically be able to : use xx * there, thus creating a lazily-evaluated infinitely-lon

Re: My first functional perl6 program

2006-08-23 Thread Larry Wall
On Wed, Aug 23, 2006 at 06:39:52PM -0400, Mark J. Reed wrote: : It does sadden me somewhat that the say() requires the parens (or an : explicit $_ etc). But I'll live. :) Strange, this works for me: $_ = "foo"; say .uc FOO Seems to work with .uc() as well. Larry

Re: My first functional perl6 program

2006-08-23 Thread Mark J. Reed
On 8/23/06, Larry Wall <[EMAIL PROTECTED]> wrote: Strange, this works for me: $_ = "foo"; say .uc FOO Maybe that was fixed in 6.2.12, then. I'm still running 6.2.11, and at least on Cygwin, I get this: $ pugs -e '$_ = "foo"; say .uc' $ No output. And if I try .trans: $ pugs -e '$_

Re: LLVM and HLVM

2006-08-23 Thread Aaron Sherman
John Siracusa wrote: On 8/23/06 4:09 PM, Aaron Sherman wrote: here's the problem with that: llvm is a very light layer, but it's yet another layer. To put it between parrot and hardware would mean that parrot is JITing to LLVM byte-code, which is JITing to machine code. Not really ideal.

Re: clarifying the spec for 'ref'

2006-08-23 Thread Luke Palmer
On 8/23/06, Larry Wall <[EMAIL PROTECTED]> wrote: you really want: if $a ~~ Array { and that also matches Array::Const, assuming it's derived from Array. Well, actually Array would be a subtype of Array::Const, not t'other way round. That is a little bit disconcerting, because when you s

Re: My first functional perl6 program

2006-08-23 Thread Luke Palmer
On 8/23/06, Larry Wall <[EMAIL PROTECTED]> wrote: Yes, that should work eventually, given that hypers are supposed to stop after the longest *finite* sequence. Shudder xx * What the hell does that mean!? Let me posit this: @a = 0..42; @b = list_of_twin_primes(); (@a >>=><< @b).lengt

Announcing the Perl 6 and Parrot wiki workspaces

2006-08-23 Thread Andy Lester
I've created wiki workspaces for Perl 6 and Parrot on my home box at http://rakudo.org/ They are: http://rakudo.org/parrot http://rakudo.org/perl6 They are publicly readable, but to edit pages, you must create an account. This is a JFDI solution. At some point, these workspaces may move