Fwd: [perl #112676] SUPER does not seem to work
Hi, I have tried most of the examples in the Wrap Chapter in S6, and I kept gettting a Not enough positional parameters passed; got 0 but expected 1 error message. Try the following code: sub thermo ($t) { say t is $t in thermo; } thermo.wrap( { callwith( ($^t-32)/1.8 ) } ); say thermo(12); Furthermore, temp is treated as a sub (!) (could not find sub 'temp'). For instance, sub thermo ($t) { say t is $t in thermo; } #thermo.wrap( { callwith( ($^t-32)/1.8 ) } ); temp thermo.wrap( { callwith($^t + 273.16) } ); say thermo(12); Regards, Philippe - Mail transféré - De: phi...@free.fr À: perl6-bugs-follo...@perl.org Envoyé: Lundi 30 Avril 2012 11:34:51 Objet: Re: [perl #112676] SUPER does not seem to work Hi, the S6 and S12 docs are not very clear on how to use nextsame to call super methods, etc. Could you please provide examples of how to call the superclass's constructor? Furthermore, I can't get the below code to work. Many thanks. Best regards, Philippe - class cell { has Int $.contents = 0; } class reCell is cell { has Int $.backup = 0; method new(Int $contents) { backup = $contents; contents = $contents; } } my $reCell = reCell.new(contents = 2); print $reCell.contents; - Mail original - De: Moritz Lenz via RT perl6-bugs-follo...@perl.org À: phi...@free.fr Envoyé: Lundi 30 Avril 2012 09:44:48 Objet: [perl #112676] SUPER does not seem to work There is no SUPER. And the WALK syntax you are using is purely imaginary, and not backed by the spec. See S06 for nextsame and friends about how to do the stuff you want to do.
Re: [perl #112676] SUPER does not seem to work
Hi, the S6 and S12 docs are not very clear on how to use nextsame to call super methods, etc. Could you please provide examples of how to call the superclass's constructor? Furthermore, I can't get the below code to work. Many thanks. Best regards, Philippe - class cell { has Int $.contents = 0; } class reCell is cell { has Int $.backup = 0; method new(Int $contents) { backup = $contents; contents = $contents; } } my $reCell = reCell.new(contents = 2); print $reCell.contents; - Mail original - De: Moritz Lenz via RT perl6-bugs-follo...@perl.org À: phi...@free.fr Envoyé: Lundi 30 Avril 2012 09:44:48 Objet: [perl #112676] SUPER does not seem to work There is no SUPER. And the WALK syntax you are using is purely imaginary, and not backed by the spec. See S06 for nextsame and friends about how to do the stuff you want to do.
Re: [perl #112716] [BUG] lines() isn't lazy in Rakudo
On Tue, May 01, 2012 at 09:11:22AM -0700, Carl Mäsak wrote: tadzik r: for $*IN.lines - $line { say $line.lc } p6eval rakudo 4c241c: OUTPUT«land der berge, land am strome, [...] goraki tadzik: masak: when I run either I don't get any output until I hit ctrl-d to end the input. masak goraki: let my try locally. masak my gosh, you're right! * masak submits rakudobug [...] masak lines() is supposed to be lazy. Actually, as implemented lines() is already lazy: pmichaud@kiwi:~/p6/rakudo$ ./perl6 my @a := $*IN.lines().map( { .lc.say } ); 1; 1 say @a[0] HELLO hello True The problem is actually in the .map code itself (I suspect a misoptimization) -- when map is attempting to reify multiple elements, it's batching up the required number of elements before processing any of them: @a[3] WORLD GOODBYE WORLD world goodbye world The problem line is in src/core/MapIter.pm: my $munched := $!list.munch($argc * $count); This causes all of the requested elements of the source $!list to be reified before any of them are processed, thus .map isn't properly lazy. This line was added as an optimization to make some .map operations faster, but lost some of the lazy aspects of map (as well as other things). The correct approach is to make .munch sufficiently performant over repeated calls (avoiding repeated shifts of the underlying list structures), which I plan to take care of shortly. Pm
[perl #112724] Use of uninitialized value of type Any in string context does not report line number
# New Ticket Created by Siddhant Saraf # Please include the string: [perl #112724] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112724 sisar r: my @a; @a[1] = 42; say @a; +p6eval rakudo 7836d2: OUTPUT«use of uninitialized value of type Any in string context in method Str at src/gen/CORE.setting:670 42» sisar moritz: this ^ does not report the line no. Is this bug already filed ? sisar moritz: RT #67808 was a similar bug. moritz sisar: I'ma aware of it. Not sure if it's in RT
Updated: parrot-4.3.0-1 and rakudo-star-201204-1
I updated the Cygwin distributions of parrot-4.3.0-1, rakudo-201204.1-1 (aka perl6) and rakudo-star-201204-1 These are stable, a so-called supported releases. Canonical homepages: http://www.parrot.org/ http://www.rakudo.org/ Canonical downloads: http://www.parrot.org/release/current http://github.com/rakudo/rakudo/downloads http://github.com/rakudo/star/downloads Packaging Details: * blizkost (perl5 in perl6) is gone. * winxed and nqp is new, parrot-nqp is an old version unfortunately required to bootstrap. maybe we'll add a new nqp package somewhen. * you need at least 2GB free RAM and an initialized rebase database to rebuild New in parrot See http://parrot.org/news/2012/Parrot-4.3.0 - Core + Winxed snapshot updated to 1.7.0 + Add type introspection to lexical variables. + New 'tools/release/parrot_github_release.pl' script to automate updates to the 'parrot.github.com' and 'parrot-docsx' repositories. + Numerous casting and consting fixes thanks to GCC 4.8 . - Documentation + Updated 'docs/projects/release_manager_guide.pod' + Updated 'docs/projects/release_parrot_github_guide.pod' + Improved function documentation. - Tests - Community - Platforms + Fixed alignment issues on ia64, sparc and mipsel. + Fixed a platform-specific issue with dlclose(). rakudo release announcement: http://rakudo.org/2012/04/26/announce-rakudo-star-2012-04-a-useful-usable-early-adopter-distribution-of-perl-6/ * much improved startup time * much more robust module precompilation * autovivification for arrays and hashes is implemented again * many phasers like PRE, POST and REDO are now implemented * improved support for calling C functions and modelling structs and arrays via NativeCall.pm6 * now includes modules URI, LWP::Simple, jsonrpc and Bailador (a Perl 6 port of Dancer) This release also contains a range of bug fixes, improvements to error reporting and better failure modes. Many more exceptions are thrown as typed exceptions. notable incompatible changes from the previous releases: * the ‘lib’ directory is not included in the default module search path anymore. You can manipulate the search path with the PERL6LIB environment variable = To update your installation, click on the Install Cygwin now link on the http://cygwin.com/ web page. This downloads setup.exe to your system. Once you've downloaded setup.exe, run it and select Editors or Text and then click on the appropriate fields until the above announced version numbers appear if they are not displayed already. If your mirror doesn't yet have the latest version of this package after 24 hours, you can either continue to wait for that site to be updated or you can try to find another mirror. Please send questions or comments to the Cygwin mailing list at: cyg...@cygwin.com If you want to subscribe go to: http://cygwin.com/ml/cygwin/ I would appreciate if you would use this mailing list rather than emailing me directly. This includes ideas and comments about the setup utility or Cygwin in general. If you want to make a point or ask a question the Cygwin mailing list is the appropriate place. -- Reini Urban http://cpanel.net/ http://www.perl-compiler.org/