Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-06-11

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | full mode

All times shown according to UTC.

Time Nick Message
00:03 * colomon seems to have broken roast on rakudo.  :(
00:06 colomon so I guess 1b0e1499bcb81605cd8f44134ada0505cedebb43 is the problem.
00:09 * colomon is going through keybag.t by hand, deleting tests and seeing if things run afterward.
00:27 diakopter double fudge.
00:27 colomon apparent result is putting the fudging program into an infinite loop
00:30 dalek roast: e669cdf | (Solomon Foster)++ | S02-types/keybag.t:
00:30 dalek roast: Try this new fudging for Rakudo.
00:33 dalek roast: d9c98ad | (Solomon Foster)++ | S02-types/keybag.t:
02:16 * lue doesn't immediately grasp the point of .tree
02:19 sorear r: say (1..10 Z 2..11).tree.perl
02:19 camelia rakudo b2072f: OUTPUT«([1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]).list␤»
02:21 lue Oh! It seems to make sense if I read "level-sensitive map" as "level-sensitive C<map>" instead (but then I don't understand how you can pass a closure that's not wrapped in {}, unless they meant s/closure/WhateverCode/ or I don't really know closures)
02:23 lue r: say (1, (2,3)).tree(*.Seq)
02:23 camelia rakudo b2072f: OUTPUT«No such method 'Seq' for invocant of type 'Int'␤  in block  at /tmp/2q1UsAy3gH:1␤␤»
02:26 lue Am I right in thinking that .tree(*.Seq) should work as advertised, only there's a rakudobug in the way here?
02:37 colomon I don't think Rakudo's tree is all there yet....
02:44 dalek specs: 5faf896 | lue++ | S02-bits.pod:
02:44 dalek specs: [S02] Small clarification about method .tree
04:42 breinbaas hi.  I'm trying to run perl6 with database access (Pg).   I installed perl6 in  $HOME/rakudo/bin , and now try to install DBIish from git.  make yields the error "Could not find NativeCall" -- how do I get that installed?
04:45 breinbaas ah! zavolaj -- that looks to be it
07:39 diakopter any professional designers (paid to do visual graphics/layout/art/design) around? looking for Perl-related work?
07:40 labster wait, so try throws a failure?
07:44 sorear fail doesn't throw an exception
07:44 sorear it returns a Failure object
07:45 sorear which dies in sink context
07:47 sorear you could stick a .sink on the end to force it to die early enough for try to notice
07:49 labster Well, I could, but the whole point of try blocks is to catch errors, not to cause them to pass through.
07:51 labster S04: unless the try itself is in a sink context, in which case the inside of try is also in sink context.
08:01 moritz what's the bug?
08:01 moritz oh, try not propagating sink context?
08:03 moritz labster: the real problem is much deeper
08:03 moritz labster: TimToady seems to want/think that sink context propagates inwards, but it doesn't in rakudo
08:05 moritz the problem is that not all architectures make it easy to sneak in an extra bit for the sink context in calls
08:06 * sorear remains unconvinced that Failure has *any* redeeming value
08:07 moritz labster: note that fail() aborts the current function
08:07 moritz labster: so its behavior will always be weird when you execute it outside a routine
08:07 moritz sorear: me too
08:08 labster Excluding that issue, my naive expectation is that try should catch thrown exceptions as well as failures.
08:11 dalek rakudo/nom: 33c5e82 | (Brent Laabs)++ | src/core/terms.pm:
08:11 dalek rakudo/nom: change $*CWD and $*TMPDIR to IO::Path objects
08:13 moritz labster: so you'd expect    my $x = try ...;  to never, ever put a Failure into $x?
08:14 labster Yes, exactly.
08:30 dalek roast: bc1a8f1 | (Brent Laabs)++ | S32-io/io-path (4 files):
08:30 dalek roast: make $*CWD stringy, since it's now already a path
09:11 dalek specs: ced138f | labster++ | S (2 files):
09:11 dalek specs: add $*TMPDIR to S16; update S28 to distinguish IO::Handle/IO::Path
10:17 yoleaux 09:19Z <sorear> jnthn: Am I correct to think that we always spill before a conditional branch to avoid a bad case where we spill in one half of the if but not the other?
10:17 yoleaux 09:22Z <sorear> jnthn: How is spilling handled for the InDy in the compilation of nqp::chain?
10:17 yoleaux 09:37Z <sorear> jnthn: What does noa stand for?
10:24 jnthn .tell sorear (conditional) partly that but also because the stack must be empty around a try/catch, which may also occur inside different branches of the conditional.
10:25 jnthn .tell sorear The lack of spilling in nqp::chain appears to be an oversight on my part. It should spill.
10:27 jnthn .tell sorear noa = "no optional arguments". It is possible to pass extra arguments to an indy bootstrap method. But I ran into a JVM bug when doing this. :( So went back to just passing those things on the stack...and trusting the JIT to be smart enough (which it probably is...)
10:58 sorear nqp syntax error messages: still confuse me
10:59 jnthn sorear: No highwater doesn't help...though there's no reason it couldn't be done, given that's tracked in Cursor...
10:59 sorear OHHH
11:19 sorear oh, I guess JVM doesn't do the CLR thing where all frame locals are initialized to null or zero...
11:20 jnthn No, it gets unhappy if something doesn't initialize it before first read, iirc
11:37 * sorear adds code to initialize locals at the beginning of a method
11:42 sorear ...block methods aren't static?!
11:46 jnthn sorear: No, they call stuff inherited from CompilationUnit, for example.
11:47 jnthn sorear: They all get a .bind(...) done before they get stored in the CodeRef, however, which is why usages of them don't need to pass the instance.
12:01 moritz JimmyZ: nice work on moarvm so far!
12:02 jnthn Indeed. JimmyZ++
12:02 JimmyZ moritz: thanks, you want -Ofun on bigint ops again? ;)
12:02 moritz JimmyZ: I don't have much hacking time currently; feel free to do them if you want
12:05 JimmyZ http://luajit.org/dynasm.html
12:19 dalek v5: d6553bc | (Tobias Leich)++ | / (4 files):
12:19 dalek v5: better support for indirect object syntax (at least a bit)
12:25 dalek nqp: 6213c10 | sorear++ | src/vm/jvm/ (4 files):
12:25 dalek nqp: Add code generator support for SaveStackException handling.
12:38 jnthn .tell sorear PushSelf confused me at first; I thought of Perl 6 "self", e.g. that it was pushing "this". Seems it pushes the handle of the current method...maybe there's a better name. JAST::PushCurMeth perhaps...
12:42 jnthn .tell sorear I'd initially planned to have one exception handler catching the save state exception per qb_NNN method, rather than one per call. That woulda involved keeping a local tracking the save index (updating it just before each call), probably giving smaller code (or at least, smaller exception tables). Maybe it breaks even on performance, though...hard to guess.
13:08 nwc10 how many of the core Perl 5 tests is v5 being run against? just the tests below t? ie t/*/*.t ?
13:09 FROGGS nwc10: no, there is a roast5 repo too
13:10 FROGGS nwc10: the tests in the rakudo-p5/v5 repo are from perlito
14:06 [Coke] jnthn: Any chance I could bum a few cycles off you to help me get partcl building again?
14:08 [Coke] https://gist.github.com/anonymous/5757131
14:12 FROGGS hmmm, is this kungfu still needed? https://github.com/partcl/partcl-nqp/blob/master/src/Partcl.pir
14:16 [Coke] it was originally PIR, then ported to nqp-rx, tring to finalize the port to nqp, esp. now that multiple backends are on teh way.
14:16 PerlJam [Coke]++  (herculean effort keeping partcl alive :)
14:26 [Coke] jnthn: I appreciate the effort, and promise I will make this work on windows now. :)
14:29 FROGGS [Coke]: gtg now, when looking at that codebase I feel a bit lost anyway
14:37 jnthn [Coke]: https://gist.github.com/jnthn/5757345
14:39 [Coke] yay, a build. now to fix the runtime. :)
14:39 * jnthn hides :)
14:46 [Coke] ./partcl -e 'puts 3'
14:46 [Coke] 3
14:46 moritz \o/
14:46 [Coke] jnthn++ jnthn++ jnthn++ jnthn++ jnthn++
14:46 nwc10 this is partcl on NQP?
14:46 nwc10 Does it work on the JVM yet? :-)
14:48 [Coke] nwc10: ack -cl "pir|parrot" src | awk -F: '{ SUM += $2} END {print SUM}'
14:48 [Coke] 188
14:49 jnthn [Coke]: Wow!
14:53 [Coke] also pmichaud++ as I suspect most of the working code in this version came from him a while back.
14:55 PerlJam [Coke]: what's the URL for the partcl repo?
14:56 [Coke] partcl/partcl-nqp
14:56 [Coke] latest dev is currently on nqp2 branch; once I get it passing tests again, will merge it back.
14:56 [Coke] The version that's out there needs jnthn's patch.
15:04 jnthn sorear: Good news, your changes to JNQP didn't bust the Rakudo build :)
15:28 daxim http://blog.64p.org/entry/2013/06/11/211555
15:31 benabik daxim: With MVMDEBUG you actually get a *.{moarvm,mvmdump,mastdump} per test in the file, not per file.  So if there's a test 'division by 0', you'll get files 'division by 0.*'
15:33 diakopter benabik: okay, now I'm curious how you know that :P
15:55 diakopter benabik: yeah.. but did you make a conclusion or assessment?
15:58 benabik MoarVM hits most/all of the "things I would do to rewrite Parrot", so I'm fairly interested.
15:58 masak benabik++
15:58 diakopter benabik: are you looking for something challenging but not spectacularly glamorous to work on? if so, you're in luck! bytecodeverify.c has a nice TODO list at the top that should be fairly straightforward
15:59 diakopter but fairly interesting to tackle, imho
16:00 diakopter wrong filename.
16:00 diakopter validation.c is the right one
16:04 diakopter benabik: there's a bunch of little->medium tasks that are fairly interesting but are "easy to delegate" and vary widely on the scale of how low their fruit hangs.. how would you suggest I organize/centralize such a helpwanted list?
16:04 diakopter I know. issues with HALPME in the title.
16:13 benabik I generally look for LHF, TODO, or similar docco.  I suppose ack 'TODO|XXX' is probably a good one.  Issues with LHF, newbie, etc tags are also not a bad way to do it.
16:33 FROGGS am I just a bit stupid or are p5's heredocs a pretty weird thing and hard to parse?
16:34 moritz FROGGS: they are indeed pretty weird and hard to parse
16:34 daxim but so useful for the programmer
16:34 FROGGS moritz: but rakudo's syntax is much saner
16:35 moritz FROGGS: marginally
16:39 jnthn Right, it's just using /.../ as the quoter.
16:40 FROGGS r: say(q:to<foo> , 42);␤42.say␤foo␤
16:40 camelia rakudo b2072f: OUTPUT«42.say␤42␤»
16:49 moritz r: say(q:to"foo" , 42);␤42.say␤foo␤
16:49 camelia rakudo b2072f: OUTPUT«42.say␤42␤»
16:50 moritz I guess I expected :to to parse like any other adverb
16:51 benabik I think :to is an adverb that makes the contents of the quote terminate the heredoc.
16:52 moritz sure, but the question is how the argument to :to are parsed
16:52 moritz and it seems that it's parsed as a quote, not as an expression
16:57 masak no, q:to"foo" simply means q:to("foo")
16:57 benabik That's not how it seems to be parsing.
16:59 masak oh, is this some kind of special syntax just for q and qq et al.?
17:00 masak I thought since we have syntax like :to[], we also had syntax like :to"" in Perl 6 itself. my bad.
17:14 jeff_s1 I made some minor revisions to Pugs and its dependencies to make it compile under the latest Haskell Platform. ANyone know if there is a current maintainer or mailing list I should talk to before I upload the cabal file to Hackage?
17:14 arnsholt I think [Coke] is the current Pugs caretaker
17:16 jeff_s1 I can probably make a diff or something if you want it. I think I only changed like 4 lines.
17:16 [Coke] I've got nothing to do with hackage.
17:18 arnsholt Oh. I thought it was you who did the Pugs maintenance/life-support. Sorry =)
17:21 jeff_s1 Hm, should I keep searching, or is it safe to say there's nobody really looking at Pugs these days?
17:22 [Coke] au is the only person who would care about it, and if you're improving it, I'm sure she's fine with it.
17:24 [Coke] require InnerModule:file($name) <quux>;
17:25 [Coke] that require statement above - is that syntax with the single colon real?
17:27 PerlJam Did we just accrete another pugs person?
17:28 PerlJam jeff_s1++
17:28 jeff_s1 Haskell is my #1 language, and I recently started working at a Perl shop, so I have some natural affinity for it.
17:29 masak jeff_s1++
17:29 masak jeff_s1: I've often wanted to get involved with Pugs, and fix a few LHFs. but the on-ramp seems too steep for me.
17:31 masak I'm moderately comfy with Haskell. what I've seen of the Pugs codebase, it's OK.
17:31 masak but I find the steps to get a working build off which to develop inscrutable.
17:32 diakopter the HF in pugs are low... if you climb th ebeanstalk for a few days
17:36 PerlJam pugs is what set off this whole "implement Perl 6 For Real" idea :)
17:37 dalek nqp: 5adf255 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/ (14 files):
17:37 dalek nqp: Kill initialize REPR function for JVM 6model.
17:37 masak PerlJam: that's only partly accurate.
17:37 dalek rakudo/nom: 978aeee | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/ (2 files):
17:37 dalek rakudo/nom: Updates to work on latest NQP.
17:38 masak PerlJam: at that point, the Parrot team, headed by pmichaud++, was busy building the underpinnings for Rakudo, but it wasn't called Rakudo then.
17:40 masak more illuminating perhaps to say that while Parrot/PGE was going at it bottom-up, Pugs came in and was the first to do it top-down.
17:40 masak timotimo_: Pugs is pre-MOP, pre-LTM, and pre-6model. so, yes.
17:56 masak PerlJam: Pugs and the Parrot efforts were simultaneous, but Pugs had all of the spotlght.
17:56 masak but yes, Pugs had enormous cultural significance.
17:56 masak without it, the Perl 6 project would probably have fizzled out into unrealized ambitions, and we wouldn't all be on this channel today.
17:58 masak the point where the Parrot team realized that that perl6 was a dead end was the point where they recruited pmichaud as the lead Perl 6 dev.
17:58 colomon I've never heard that there was anything workable at all from p6 on parrot at that point.
17:58 masak there was.
17:58 masak but it was completely abandoned.
17:58 masak if you count that project, then yes, Parrot was definitely before Pugs in having a running Perl 6.
17:59 jeff_s1 I uploaded my changes "cabal install Pugs" should work with the latest Haskell Platform.
18:01 colomon masak: I'm a bit dumbfounded at the notion that there was a usable p6 before pugs.  I mean, pugs was considered very exciting even when it was just the simplest of toys.  was that all just clever Haskell PR?
18:02 masak colomon: Pugs was *awesome*, man.
18:02 masak colomon: it's hard to explain now, 8 years later.
18:02 masak colomon: but it was like waking up each day, and one more bit of Perl 6 was available.
18:04 masak in fact, "I didn't know about the Perl 6 project that already existed on Parrot" http://strangelyconsistent.org/blog/happy-10th-anniversary-perl-6
18:07 colomon according to your post (with a link that no longer works) that original perl 6 on parrot was given up as unworkable in 2004.
18:07 masak colomon: right, that's when they found pmichaud. they put out an ad.
18:16 masak wow, and at that time 'perl6' was a Perl 5 program. :D
18:16 masak https://github.com/parrot/parrot/blob/RELEASE_0_3_0/languages/perl6/perl6
18:19 dalek nqp: 4e615b3 | jnthn++ | src/vm/jvm/ (3 files):
18:19 dalek nqp: Add op for looking up attribute access hints.
18:19 dalek nqp: Update bootstrap to get nqp::attrhintfor(...).
18:19 dalek nqp: b06dc41 | jnthn++ | src/vm/jvm/ (2 files):
18:19 dalek nqp: Generate hints for QAST::Var attribute accesses.
18:21 BinGOs MoarVM built okay (if a little slowly) on Raspberry Pi (Linux rasta 3.6.11+ #456 PREEMPT Mon May 20 17:42:15 BST 2013 armv6l GNU/Linux)
18:37 colomon rn: say <a b c> ~~ set <a b c>
18:37 camelia rakudo b2072f, niecza v24-72-g3cebbf8: OUTPUT«False␤»
18:38 * colomon thinks that one should be true
18:38 colomon rm: say (set <a b c>) ~~ set <a b c>
18:43 colomon I'm implementing Set.ACCEPTS as
18:43 colomon method ACCEPTS($other) { $other ⊆ self and self ⊆ $other }
18:43 colomon Bag as method ACCEPTS($other) { $other ≼ self and self ≼ $other }
18:44 colomon which does what you want, I think.
18:44 masak \o/
18:44 dalek niecza: b8dd516 | (Solomon Foster)++ | lib/CORE.setting:
18:44 dalek niecza: Add .ACCEPTS for Set, KeySet, Bag, and KeyBag.
18:45 masak or put differently, there's a forgetful functor from the category Bag to the category Set. but not the other way around.
18:45 colomon and if you want your Set to actually care about quantity, you just use .Bag to coerce it and it will.
18:48 masak .Bag is just the (universal) inclusion functor corresponding to the forgetful functor... :)
19:03 dalek niecza: d2580c9 | (Solomon Foster)++ | lib/CORE.setting:
19:03 dalek niecza: Fix .ACCEPTS for Set, KeySet, Bag, and KeyBag.
19:22 dalek roast: bbf6549 | (Solomon Foster)++ | S02-types/ (2 files):
19:22 dalek roast: Add tests for Set and KeySet smartmatching.
19:22 dalek roast: Tests for Bag.ACCEPTS and KeyBag.Accepts.
19:22 dalek niecza: 480a062 | (Solomon Foster)++ | lib/CORE.setting:
19:22 dalek niecza: I reckon multi-subset and -superset should work with anything.
19:25 masak well, to give some perspective, https://github.com/parrot/parrot/blob/RELEASE_0_3_0/languages/perl6/P6C/Builtins.pm defines a whopping 17 builtins: substr, length (!), reverse, join, index, time, sleep, print1 (?), print, exit, die, warn, grep, map, _setup (?), install_catch, and pop_catch.
19:40 * lee_ really wants JVM support for MapIter :D
19:43 jnthn lee_: I'm hoping to get that in tomorrow.
19:48 lue Ooh! I just found a bug concerning the two Twigils sections in S02 and the pod-to-html converter! [more]
19:49 lue Both "Twigils" entries in the ToC point to just the first Twigils header (because the anchors are #Twigils instead of #Section/Twigils) I've known this part of the bug for a while, but I just found the other part:
19:50 lue Both "Twigils" sections in the generated webpage include I<both> Twigils sections in the Pod, which is why they're carbon copies of each other in the html page.
19:55 lue (because parens and only parens supply arguments to quote adverbs)
19:56 labster okay, I was just reading S16 about $*CWD:  "It must check whether the path exists before changing its value"  Now, how the heck am I supposed to do that?
19:57 moritz labster: first of all, if you find this kind of API insane, remove it from the spec
19:58 moritz labster: I find it quite insane, because a program can have many $*CWD variables, but only one working directory)
19:59 yoleaux 12:38Z <jnthn> sorear: PushSelf confused me at first; I thought of Perl 6 "self", e.g. that it was pushing "this". Seems it pushes the handle of the current method...maybe there's a better name. JAST::PushCurMeth perhaps...
19:59 yoleaux 12:42Z <jnthn> sorear: I'd initially planned to have one exception handler catching the save state exception per qb_NNN method, rather than one per call. That woulda involved keeping a local tracking the save index (updating it just before each call), probably giving smaller code (or at least, smaller exception tables). Maybe it breaks even on performance, though...hard to guess.
19:59 moritz that said, if you absolutely love that feature, you can do something evil like flussence++ suggested by binding a Proxy to $*CWD
19:59 flussence (would it be better for $*CWD to be readonly then?)
20:00 moritz flussence: and what then? chdir changes all variables named $*CWD?
20:00 flussence I guess I'll just leave the decision up to someone with a good use case for having it work a certain way..
20:06 moritz lue: $*CWD would be cute if it worked as originally envisioned
20:07 moritz lue: but Perl 6 gives far too many options for scoping and control flow to keep the working directory and a dynamic variable in sync
20:08 sorear local *cwd = sub { 'FAKE' } ... :D
20:08 moritz well, except that it doesn't work in p6 :-)
21:04 snearch Hello #perl6, I try to write some  code which initializes a private attribute of an object and says its value, but the following code does not work (says "(Any)"), why? class a{ has $!x; method pr{ say $!x; } }; a.new( x => 124 ).pr();
21:07 benabik submethod BUILD, I think?
21:07 dalek nqp: 080f0bf | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque (3 files):
21:07 dalek nqp: Avoid reflection when allocating P6opaque.
21:07 dalek nqp: Dump rxtype of QAST::Regex.
21:07 dalek nqp: Use regionMatches, avoiding subString calls.
21:09 flussence some working BUILD code: https://github.com/flussence/perl6-XMMS2/blob/master/lib/XMMS2/Client.pm6#L6
21:09 colomon Woah, having to use BUILD is good enough reason in my mind never to use private attributes....
21:10 snearch I can't believe that there is no easy solution
21:11 snearch this is so easy in C++
21:12 benabik snearch: new won't initialize a private variable by default.  But if you define a BUILD submethod, you can do it.
21:12 benabik snearch: It's P6's version of a constructor.
21:13 dagurval snearch: I had the same frustration some days ago :)
21:14 benabik :$!x...  $ = sigil, ! = twigil, : = ?gil
21:15 flussence pregil?
21:15 masak "colon". :)
21:20 dagurval if it's non-frustrating is up to you to decide, see how I initialize $!img-path in this class: https://github.com/dagurval/perl6-image-resize/blob/master/lib/Image/Resize.pm6
21:21 dagurval it's basically what's already been sayd here
21:22 masak dagurval: not sure why you feel it's very important to not give $!img-path a public accessor in that case.
21:23 * masak is growing disenchanted with private attributes as he grows older
21:23 masak Perl 5 and JavaScript do fine without them (even as people sometimes go to great lengths to emulate them).
21:31 dagurval if constant works, I'll use that for now. Thanks for the tip
21:33 benabik I see nothing in spec wrt the exportability of variables.  However, my $0.02 is that it should either work or give an error when you try.  :-D
21:43 pmichaud to add a bit more to the pugs and p6 on parrot story....
21:44 pmichaud early versions of PGE started in late 2004.  Pugs started in early 2005.
21:44 pmichaud Pugs had a huge advantage in that it could use an already-built parser generator (Parsec) to parse the language; Parrot had no such parser tool at the time.  That's why Parrot's approach was "bottom-up"... it was that way by necessity.
21:45 pmichaud however, Pugs' advantage with Parsec also turned into a disadvantage... although it could parse Perl 6 code, Pugs had no native support for Perl 6 regular expressions or grammars.
21:46 pmichaud Indeed, for a long time its mechanism of providing Perl 6 regexes was to call out to PGE on Parrot.
21:47 pmichaud when it became clear that Pugs needed to have its own regular expression engine, several attempts were begun to build one... but afaict none of them got very far, and all were really slow.  (I might be mis-remembering reality here.)
22:10 diakopter http://www.youtube.com/watch?v=7nISwfLoAoU
23:41 [Coke] jnthn: I fixed the partcl build so it should work out of the box on windows.
23:46 [Coke] sadly, I think "puts" is the only thing that works right now. :)
23:52 shinobicl rakudo: my $x = 5; (0..$x).map(($x ** *)).say;
23:52 camelia rakudo b2072f: OUTPUT«1 5 25 125 625 3125␤»
23:52 shinobicl well this looks ok, is what i expected
23:52 shinobicl but when i add this factorial operator...
23:52 shinobicl rakudo: sub postfix:<!> { [*] 1..$^n }; my $x = 5; (0..$x).map(($x ** *)/*!).say;
23:52 camelia rakudo b2072f: OUTPUT«1 4.166667 5.208333␤»
23:53 shinobicl my list only has 3 elements...
23:54 shinobicl why is that? i don't understand.
23:56 shinobicl ahhhh ok... so i use 2 elements in each call
23:57 lue r: sub postfix:<!> { [*] 1..$^n }; my $x = 5; say (0..$x).map: {($x ** $^a)/$^a!}; # more readable form of what I just ran
23:57 camelia rakudo b2072f: OUTPUT«1 5 12.5 20.833333 26.041667 26.041667␤»
23:57 [Coke] nqp question: I'm trying to call HLL::Actions::string_to_int, but it's giving me an NQPMu error. top of the file has "use NQPHLL;". any pointers?
23:58 shinobicl the idea is to implement this http://keisan.casio.com/exec/system/1223447896
23:59 lue You just needed a space between the [+] and @r in the last one.

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | full mode

Perl 6 | Reference Documentation | Rakudo