Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-12-29

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 cognominal joined #perl6
00:16 SmokeMachine Why .list isn’t a .Positional? Is it because it’s a role and not a class?
00:49 xcm joined #perl6
00:50 raiph joined #perl6
01:00 Geth ¦ ecosystem: 4e00ad22d6 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
01:00 Geth ¦ ecosystem: Implementation of alerts.perl6.org API
01:00 Geth ¦ ecosystem:
01:00 Geth ¦ ecosystem: https://github.com/zoffixznet/perl6-WWW-P6lert
01:00 Geth ¦ ecosystem: (N.B.: alerts.perl6.org is not up yet; just entering the module so it
01:00 Geth ¦ ecosystem: percolates through things in time for announce blog post)
01:00 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/4e00ad22d6
01:04 Cabanossi joined #perl6
01:48 devmikey joined #perl6
01:52 AlexDaniel and perl 6 wins again! https://code-golf.io/
01:52 AlexDaniel π and τ are still not there though
01:54 notbenh_ joined #perl6
01:58 akagi201___ joined #perl6
02:38 cdg joined #perl6
02:39 Geth ¦ ecosystem: f1eaca293f | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
02:39 Geth ¦ ecosystem: Add p6lert to eco
02:39 Geth ¦ ecosystem:
02:39 Geth ¦ ecosystem: "Command line utility to fetch alerts.perl6.org alerts"
02:39 Geth ¦ ecosystem: https://github.com/zoffixznet/perl6-p6lert
02:39 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/f1eaca293f
02:42 aindilis joined #perl6
02:56 setty1 joined #perl6
02:58 ilbot3 joined #perl6
02:58 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:59 Zoffix :| fresh rakudo build on hack and zef install dies with "Failed to find dependencies: "; no mention of any missing ones :/
03:04 Zoffix That's with zef --depsonly --serial --debug install . in https://github.com/perl6/alerts checkout
03:06 timotimo c: releases say 0xabcdefabcdef12 «+>« (8, 16, 24, 32, 40, 48, 56)
03:07 committable6 timotimo, ¦releases (26 commits): «(188900977659375 737894443981 2882400171 11259375 43981 171 0)␤»
03:09 Zoffix If relevant: (from changelog):     + Added big int support for `+<` and `+>` ops [6409ee58][ef29bb9f][66e8e72c]
03:09 Zoffix In 2017.05
03:09 Zoffix And there was some breakage IIRC, but it was fixed before release
03:17 unicodable6 joined #perl6
03:17 benchable6 joined #perl6
03:19 Zoffix Worked fine after installing IRC::Client and Cro separately. Perhaps there's a clash when you got too many deps that it doesn't resolve some of them properly :/.
03:41 Zoffix Anyone got commands I could copy-paste to make alerts severt and bot start as a service? I don't know systemd
03:42 Zoffix .... and geth... I see there's /etc/systemd/system/geth.service but it doesn't start automagically
03:45 Zoffix ZofBot: the humans abandoned me!
03:45 ZofBot Zoffix, I would love to dive into the POD stuff deeper, but unfortunately I only have just the right amount of time to do the release and the advent post, that's it for this year :) I feel like there should be some connection between pod and pandoc but dunno what I would feel like / be able to, work on in
03:46 Actualeyes joined #perl6
03:47 Zoffix I think I may have managed...
03:48 Zoffix ZOFsystemd: make a "service file" in /etc/systemd/system/ then run `sudo systemctl enable TehService`
03:49 Zoffix hm or maybe not. Geth never came back :P
03:50 Geth joined #perl6
03:51 Zoffix gah
03:51 Geth joined #perl6
03:51 Zoffix looks like `WorkingDirectory=/home/geth/geth/` needed to have the last slash on it
03:53 p6lert joined #perl6
03:53 Zoffix \o/
03:54 Zoffix p6lert: add 6.d-proposed method Str.parse-names was renamed to .uniparse. .parse-names will warn in 6.d and will be removed in 6.e
03:54 p6lert Zoffix, Added alert ID 1: https://alerts.perl6.org/alert/1
03:54 Zoffix I love you, robots. You never fail me <3
03:54 * Zoffix starts churning out a blog
04:57 Cabanossi joined #perl6
05:26 titsuki joined #perl6
05:51 Geth ¦ doc: 2a28c82a76 | (Alex Chen)++ | doc/Type/Signature.pod6
05:51 Geth ¦ doc: Fix #1724
05:51 Geth ¦ doc:
05:51 Geth ¦ doc: Provide valid example of Type/Signature.pod6,
05:51 Geth ¦ doc: X«Constraining signatures of Callables|Callable (constrain)»
05:51 synopsebot Link: https://doc.perl6.org/type/Signature
05:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2a28c82a76
05:58 wander joined #perl6
05:59 wander \o
06:26 piojo star: use LWP::Simple; use JSON::Fast;
06:26 camelia star-m 2017.07: OUTPUT: «===SORRY!===␤P6M Merging GLOBAL symbols failed: duplicate definition of symbol INET␤»
06:26 piojo m: use LWP::Simple; use JSON::Fast;
06:26 camelia rakudo-moar 418fc068f: OUTPUT: «===SORRY!===␤Could not find LWP::Simple at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUn…»
06:30 piojo There's something wrong with my rakudo. It can't include LWP::Simple, then JSON::Fast. But it works in the other order.
06:30 aindilis` joined #perl6
06:31 piojo I'm sure it's just my current build, but I can't figure out why this started happening.
06:35 aindilis joined #perl6
06:38 jeromelanteri joined #perl6
06:40 piojo Oh, looks like zef installed JSON::Fast twice. Lovely. I guess that's why the --upgrade flag says "BETA"
06:41 geekosaur which suggests those two have different JSON::Fast deps, and if the older one is loaded first then the newer one conflicts
06:42 geekosaur but if the newer one is loaded first then it satisfies the dependency for the other as well?
06:42 geekosaur (although technically they shouldn't do that, I think. not sure how that case is supposed to work.)
06:54 khisanth_ joined #perl6
06:57 piojo geekosaur: I might have actually installed a downgrade as an upgrade (zef upgrade .), so that probably screwed things up.
06:57 piojo but it's fixed now, and I'm debugging a more serious Rakudo problem
06:59 piojo I'm debugging type errors, but this is a little out of my league
07:01 geekosaur perl6  supports multiple versions of modules installed, and versioned importes
07:01 geekosaur what happens if two modules require different versions, I don't know
07:04 piojo geekosaur: I'm actually looking into this now, but understanding rakudo's core is pretty hard at first: https://rt.perl.org/Public/Bug/Display.html?id=128287
07:05 piojo I think the comment in the bug report will be highly useful: "It's as if we end up with two "instances" of the same parameterized type, and the type check gets confused about which one to check against."
07:05 piojo maybe one type gets created in precomp, the other at runtime, and they aren't merged/combined?
07:14 darutoko joined #perl6
07:20 sena_kun joined #perl6
08:17 dct joined #perl6
08:29 wamba joined #perl6
09:04 scimon joined #perl6
09:05 rindolf joined #perl6
09:21 domidumont joined #perl6
09:27 domidumont joined #perl6
09:29 FROGGS joined #perl6
09:34 darutoko- joined #perl6
09:37 eikef joined #perl6
09:53 dct joined #perl6
10:17 darutoko joined #perl6
10:33 Sm4rkey joined #perl6
10:39 Summertime p6: Set.new((1,2,3),(1,2,3))
10:39 camelia rakudo-moar 418fc068f: ( no output )
10:39 Summertime p6: put Set.new((1,2,3),(1,2,3));
10:39 camelia rakudo-moar 418fc068f: OUTPUT: «1 2 3␤»
10:41 Summertime huh, so that got changed from 6.c I guess
11:12 Zoffix mc: put Set.new((1,2,3),(1,2,3));
11:12 committable6 Zoffix, ¦2015.12: «1 2 3 1 2 3␤»
11:12 Zoffix c: 2015.12,HEAD dd Set.new((1,2,3),(1,2,3));
11:12 committable6 Zoffix, ¦2015.12: «set($(1, 2, 3),$(1, 2, 3))␤» ¦HEAD(418fc06): «Set.new((1, 2, 3))␤»
11:13 Zoffix Summertime: a lot of setty/baggy behaviour was unspecced in 6.c and was clarified around August. I guess this is one of the differences.
11:15 piojo_ joined #perl6
11:15 Zoffix c: 2015.12,2017.12,HEAD dd Set.new((1,2,3),(1,2,3));
11:15 committable6 Zoffix, ¦2015.12: «set($(1, 2, 3),$(1, 2, 3))␤» ¦2017.12: «Set.new((1, 2, 3),(1, 2, 3))␤» ¦HEAD(418fc06): «Set.new((1, 2, 3))␤»
11:15 Zoffix Ohhh
11:16 Zoffix Summertime: this is actually the result of the List type being made a value type if it only has value types.
11:18 Zoffix And it's still new on HEAD, not in any release. This is the only change I see due to it in 6.d-proposals spec: https://github.com/perl6/roast/commit/5670acf676d65167e892515a42b71c81984f39f2
11:19 Zoffix Looks like both are part of 6.c spec too
11:20 Zoffix .tell lizmat looks like the value-type-list thing violates 6.c spec. Is there a way of making that change a 6.d-only change? https://irclog.perlgeek.de/perl6/2017-12-29#i_15631590
11:20 yoleaux Zoffix: I'll pass your message to lizmat.
11:20 eliasr joined #perl6
11:22 Zoffix Gonna do more 6.d-proposals review this long weekend, so we could get it outta the door sooner than later.
11:22 Zoffix Also, if someone has ideas for fixing R#1289 .. comment on it
11:22 synopsebot R#1289 [open]: https://github.com/rakudo/rakudo/issues/1289 [severe] [6.d BLOCKER] Implement a Way to Know Caller's Language
11:24 Zoffix Announcing P6lert: Perl 6 Alerts Directly From Core Developers: https://rakudo.party/post/Announcing-P6lert-Perl-6-Alerts-Directly-From-Core-Developers
11:41 rindolf joined #perl6
11:58 Zoffix left #perl6
12:15 markong joined #perl6
12:41 wander joined #perl6
12:42 leont joined #perl6
12:42 leont Anyone an idea why one of my users could be observing a «Cannot flush handle: Failed to flush filehandle: Input/output error» error on Windows? https://github.com/perl6/tap-harness6/issues/22
12:44 leont I could put the flush in a try block or something, but I don't like suppressing errors I don't understand
12:49 eikef joined #perl6
13:02 Zoffix joined #perl6
13:03 Zoffix leont: similar symptom is described in RT#131700
13:03 synopsebot RT#131700 [new]: https://rt.perl.org/Ticket/Display.html?id=131700 [IO] prompt not working on bash-on-ubuntu on win10
13:03 Zoffix Gonna try to debug it tonight
13:03 Zoffix |12h https://rt.perl.org/Ticket/Display.html?id=131700
13:03 ZofBot Zoffix, Will remind you on 2017-12-29T20:03:34.519417-05:00 about https://rt.perl.org/Ticket/Display.html?id=131700
13:06 leont Zoffix: thanks
13:23 natrys joined #perl6
13:23 manchicken joined #perl6
13:25 bdmatatu joined #perl6
13:26 leont How do I get the version of a module/package/whatever programmatically?
13:33 bdmatatu There was a discussion about this here: http://colabti.org/irclogger/irclogger_log/perl6?date=2017-09-08#l529
13:44 manchicken Anybody with Travis-CI experience know how to get Travis to stop rebuilding Perl 6 every time I run a thing?
13:45 Zoffix manchicken: that's the default script that just brews latest perl6 on each run. You'd need to set custom options to avoid that. Try https://gfldex.wordpress.com/2017/04/14/speeding-up-travis/
13:48 manchicken My biggest issue is the OSX image. Still trying to resolve this stupid `dlopen()` problem where it can't find the image, despite all of the environment variables pointing right at it.
13:50 manchicken Do you think I can just cache ~/.rakudobrew?
13:52 Zoffix Don't know. You could just toss it and build without it
13:52 Zoffix huggable: sauce
13:52 huggable Zoffix, Install untested latest development version of Rakudo from source: https://github.com/zoffixznet/r#table-of-contents
13:52 manchicken This is killing me: https://travis-ci.org/manchicken/perl6-Fcntl
13:53 manchicken I want to have OSX in the CI... but I just can't get dlopen to find my symbol.
14:03 manchicken It looks like the modules which use `NativeCall` have no problem... but for some reason my module which only uses it for tests is having a problem.
14:10 Zoffix manchicken: don't know anything about it, but FWIW I see you're setting -I things here https://github.com/manchicken/perl6-Fcntl/blob/master/.travis.yml#L23   Awhile back, I had issues with setting -I things and had to change them to `'-Ilib', |('-I' «~« $*REPO.repo-chain.map: *.path-spec)` because zef builds in some special place or something:
14:10 Zoffix https://github.com/zoffixznet/perl6-LN/commit/bfa894f3c408ca077ae92922024269e87682c4e4
14:10 Zoffix Perhaps you could add something that tells you whether the stuff is really up in there vOv
14:10 Zoffix \o
14:10 Zoffix left #perl6
14:13 manchicken Are there ways to get `NativeCall` to respond to paths that I set in Perl 6 code?
14:13 manchicken The documentation only seems to indicate how you can point it to a specific file, which doesn't seem like what I want to do.
14:14 manchicken I just want to add lookup paths.
14:20 manchicken Off, I just looked at the Most Wanted list again.
14:20 manchicken The POSIX module is going to be a beat.
14:21 manchicken Beast*
14:21 manchicken I wonder if half of the reason it hasn't been started is because of how huge it is.
14:25 manchicken It's dirty tricks time with Travis...
14:28 setty1 joined #perl6
14:35 manchicken If I started implementing the POSIX module, how likely do y'all think it would be for others to start joining in ?
14:35 manchicken Also, I wonder if maybe it makes sense to break such a dense module up.
14:35 manchicken `POSIX::FileHandling` and `POSIX::Signals`, that type of stuff.
14:35 manchicken Dunno...
14:35 manchicken It's just so big.
14:45 manchicken SUCCESS!
14:52 manchicken Woot! I have uploaded perl6-Fcntl to CPAN.
14:58 buggable New CPAN upload: perl6-Fcntl-0.0.1.tar.gz by MSTEMLE https://cpan.metacpan.org/authors/id/M/MS/MSTEMLE/Perl6/perl6-Fcntl-0.0.1.tar.gz
14:58 manchicken I guess I now add the line to https://github.com/perl6/ecosystem ?
14:58 manchicken In the META.list?
15:02 Geth ¦ ecosystem: 3994b3a97e | (Michael D. Stemle, Jr)++ | META.list
15:02 Geth ¦ ecosystem: Adding Fcntl
15:02 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/3994b3a97e
15:04 cdg joined #perl6
15:04 Geth ¦ perl6-most-wanted: 0b230d839e | (Michael D. Stemle, Jr)++ | most-wanted/modules.md
15:04 Geth ¦ perl6-most-wanted: Removing Fcntl from the list now that I've pushed it.
15:04 Geth ¦ perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/0b230d839e
15:19 jferrero joined #perl6
15:21 manchicken joined #perl6
15:23 Possum joined #perl6
15:27 timotimo m: Blob.new(1, 2, 3, 4).subbuf(10..1)
15:27 camelia rakudo-moar 418fc068f: OUTPUT: «From argument to subbuf out of range. Is: 10..1, should be in 0..4␤  in block <unit> at <tmp> line 1␤␤»
15:27 timotimo m: Blob.new(1 xx 100).subbuf(10..1)
15:27 camelia rakudo-moar 418fc068f: OUTPUT: «Unable to allocate an array of 18446744073709551608 elements␤  in block <unit> at <tmp> line 1␤␤»
15:29 manchicken Oof, I suppose one of the hardest bits for POSIX is going to be the volume of platforms it has to account for.
15:30 manchicken It might make the most sense to break POSIX up...
15:34 manchicken Then there's the question of whether I should pick POSIX next, or dig into some l10n stuff.
15:34 manchicken It would be nice to have a good ICU implementation.
15:39 vichib joined #perl6
15:40 troys joined #perl6
15:47 cdg joined #perl6
15:51 khw joined #perl6
15:53 statisfiable6 joined #perl6
15:53 konsolebox joined #perl6
15:57 Zoffix joined #perl6
16:05 nativecallable6 joined #perl6
16:05 quotable6 joined #perl6
16:05 releasable6 joined #perl6
16:05 cdg joined #perl6
16:05 committable6 joined #perl6
16:18 cdg joined #perl6
16:38 leont joined #perl6
16:54 Zoffix left #perl6
16:56 FROGGS joined #perl6
16:58 tony-o does metacpan not show perl6 modules in search?
17:00 timotimo i don't think it does
17:26 piojo_ joined #perl6
17:29 ilmari tony-o: https://modules.perl6.org/ indexes perl6 modules on cpan
17:31 tony-o so does modules.zef.pm :-)
17:31 tony-o was just curious about metacpan's status
17:34 tony-o modules.zef.pm now has the readmes working again
17:34 ilmari I don't think there are any plans for indexing perl6 modules on metacpan
17:46 tony-o ah
17:47 tony-o bummer
17:58 cdg joined #perl6
18:10 xinming joined #perl6
19:01 lelf joined #perl6
19:29 lelf hi. you do ‘use X’. After that, how do you know what has changed and what is X? (e.g.: foo is in scope now, X is a package, X.WTF will tell me that info)
19:38 bisectable6 joined #perl6
19:38 bloatable6 joined #perl6
19:38 squashable6 joined #perl6
19:38 coverable6 joined #perl6
19:38 greppable6 joined #perl6
19:47 timotimo m: use Test; say Test::.keys
19:47 camelia rakudo-moar 5f48c0695: OUTPUT: «(&todo_output EXPORT &failure_output &output)␤»
19:47 timotimo m: use Test; say Test::EXPORT::Default::.keys
19:47 camelia rakudo-moar 5f48c0695: OUTPUT: «Could not find symbol '&Default'␤  in block <unit> at <tmp> line 1␤␤»
19:47 timotimo m: use Test; say Test::EXPORT::DEFAULT::.keys
19:47 camelia rakudo-moar 5f48c0695: OUTPUT: «(&does-ok &like &eval-lives-ok &pass &cmp-ok &subtest &flunk &dies-ok &unlike &todo &skip &use-ok &isnt &skip-rest &diag &eval-dies-ok &is-deeply &throws-like &ok &is &done-testing &bail-out &is-approx &lives-ok &MONKEY-SEE-NO-EVAL &plan &nok &is_appr…»
19:48 timotimo m: use Test; say ::.keys
19:48 camelia rakudo-moar 5f48c0695: OUTPUT: «($=pod &eval-lives-ok &like &does-ok $_ $/ &dies-ok &flunk &subtest &cmp-ok &pass !UNIT_MARKER &unlike $=finish EXPORT &use-ok &skip &todo $! &throws-like &is-deeply &eval-dies-ok &diag &skip-rest &isnt ::?PACKAGE GLOBALish &done-testing &is &ok &live…»
19:50 tony-o m: class X { }; say GLOBAL::.keys;
19:50 camelia rakudo-moar 5f48c0695: OUTPUT: «(X)␤»
19:58 pnov2017 joined #perl6
20:00 lelf m: use Test; say Test.HOW
20:00 camelia rakudo-moar 5f48c0695: OUTPUT: «Perl6::Metamodel::ModuleHOW.new␤»
20:00 lelf ^ any better way?
20:00 tony-o what information are you trying to get, exactly?
20:01 tony-o what subs were imported, if there is a new class available to your code, what methods are in the class, what the class name is?
20:02 tony-o timotimo's code shows for modules what subs were imported into scope, what are exported by default - mine shows for a class
20:03 lelf I'm interested in everything :) but last question is about whether it's a unit class/module/grammar/...?
20:04 tony-o m: use Test; class X {}; say Mu ~~ X; say Mu ~~ Test;
20:04 camelia rakudo-moar 5f48c0695: OUTPUT: «False␤False␤»
20:04 tony-o oops
20:12 tony-o m: use Test; class X {}; say X.HOW; say Test.HOW;
20:13 camelia rakudo-moar 5f48c0695: OUTPUT: «Perl6::Metamodel::ClassHOW.new␤Perl6::Metamodel::ModuleHOW.new␤»
20:15 tony-o a little better, with grammar lelf:
20:15 tony-o m: sub x($t) { $t.HOW.^name }; use Test; class X {}; grammar Y { }; say x(X); say x(Test); say x(Y);
20:15 camelia rakudo-moar 5f48c0695: OUTPUT: «Perl6::Metamodel::ClassHOW␤Perl6::Metamodel::ModuleHOW␤Perl6::Metamodel::GrammarHOW␤»
20:16 cog_ joined #perl6
20:25 stmuk joined #perl6
20:27 lelf m: say (1..5)».WHAT
20:27 camelia rakudo-moar 5f48c0695: OUTPUT: «(Range)␤»
20:27 lelf why?
20:28 timotimo WHAT is special and won't do things like hyper method calls
20:28 timotimo m: say (1..5)>>.^name
20:28 camelia rakudo-moar 5f48c0695: OUTPUT: «Range␤»
20:28 timotimo apparently neither will that
20:29 lelf m: say .^name for 1..2
20:29 camelia rakudo-moar 5f48c0695: OUTPUT: «Int␤Int␤»
20:34 s0me0n3-unkn0wn joined #perl6
20:34 stmuk_ joined #perl6
20:36 tony-o what were you expecting from that timotimo ?
20:37 timotimo call .^name on each element of what Range.list gives you
20:37 timotimo m: say (1..5)>>.uniname
20:37 camelia rakudo-moar 5f48c0695: OUTPUT: «(<control-0001> <control-0002> <control-0003> <control-0004> <control-0005>)␤»
20:37 timotimo m: say (1..5)>>.Str>>.uniname
20:37 camelia rakudo-moar 5f48c0695: OUTPUT: «(DIGIT ONE DIGIT TWO DIGIT THREE DIGIT FOUR DIGIT FIVE)␤»
20:37 tony-o ah
20:43 dugword joined #perl6
20:58 evalable6 joined #perl6
20:58 reportable6 joined #perl6
21:00 pilne joined #perl6
21:02 pnov2017 what's perldoc equivalent in 6?
21:15 teatime p6doc
21:15 teatime https://docs.perl6.org/programs/02-reading-docs
21:16 leont joined #perl6
21:22 geospeck joined #perl6
21:30 AlexDaniel joined #perl6
21:33 lelf joined #perl6
21:34 Summertime m: my $total = 0;  put do for 0..5 {$total += $_};
21:34 camelia rakudo-moar 5f48c0695: OUTPUT: «15 15 15 15 15 15␤»
21:34 Summertime what would be the best way to avoid that "issue"?
21:35 Summertime m: my $total = 0;  put do for 0..5 {($total += $_).clone}; # its a way around it but... it seems a bit cumbersome?
21:35 camelia rakudo-moar 5f48c0695: OUTPUT: «0 1 3 6 10 15␤»
21:36 jnthn m: put [\+] 0..5
21:36 camelia rakudo-moar 5f48c0695: OUTPUT: «0 1 3 6 10 15␤»
21:36 yoleaux 28 Dec 2017 20:29Z <Zoffix> jnthn: would you be able to clarify what is a ".list"? https://github.com/rakudo/rakudo/issues/1344
21:36 yoleaux 09:21Z <piojo> jnthn: Could you please take a look at this bug? I've debugged it some but it's really out of my league: https://rt.perl.org/Ticket/Display.html?id=128287&amp;results=3c39a5462e0b203df4fa2850f25eb6ab
21:36 yoleaux 09:28Z <piojo> jnthn: I added comments that I hope will be useful, but the next step requires understanding how how MVMObjects are created (or looked up) as modules are parsed after (not during) compilation.
21:37 jnthn m: my $total = 0;  put do for 0..5 {item $total += $_}; # also this :)
21:37 camelia rakudo-moar 5f48c0695: OUTPUT: «0 1 3 6 10 15␤»
21:37 Herby_ joined #perl6
21:37 Herby_ o/
21:38 Summertime ah, that seems to be it, thank you!
21:42 Ven`` joined #perl6
21:48 timotimo m: my $total = 0;  put do for 0..5 { ($total += $_)<> }
21:48 camelia rakudo-moar 5f48c0695: OUTPUT: «0 1 3 6 10 15␤»
21:48 timotimo decontainerization postfix operator
21:48 lizmat yes, because that's really what you need
21:51 pmurias joined #perl6
21:52 Summertime hmm, is there a reason that op isn't in the docs? just hasn't been doc'd yet, or is it that troublesome?
21:52 pmurias tony-o: re metacpan showing Perl 6 modules even once it supports Perl 6 modules I guess the main metacpan.org site will only show Perl 5 modules as that's what people search for when writing Perl 6
21:53 Summertime oh, nevermind, found it
21:54 lelf joined #perl6
22:16 comborico1611 joined #perl6
22:16 lelf joined #perl6
22:17 eliasr joined #perl6
22:24 espadrine joined #perl6
22:35 Zoffix joined #perl6
22:37 lelf joined #perl6
22:41 pecastro joined #perl6
22:43 stmuk joined #perl6
22:58 lelf joined #perl6
23:02 comborico1611 joined #perl6
23:12 Zoffix nqp: say(QAST::WVal.new(:value(42), :ann('foo', 1)).ann('foo'))
23:12 camelia nqp-moarvm: OUTPUT: «This representation (VMArray) cannot unbox to a native string (for type NQPArray)␤   at gen/moar/stage2/QASTNode.nqp:204  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QASTNode.moarvm:ann)␤ from gen/moar/stage2/QASTNode.nqp:128  (/home/camelia/rakudo-m-inst-2…»
23:13 Zoffix Is there a way to set .annotate('foo', 'bar') directly via a named arg?
23:18 Zoffix nm; read the sauce for QAST::Node; there ain't one.
23:18 comborico1611 joined #perl6
23:27 tony-o pmurias: can't tell if you're joking
23:38 teatime Q: is there a type constraint that will accept: Int 4, int/int32/int64 4, Num 4e0, Rat 4.0, but reject: 4.3 and 4.00000000000000000000003 etc. ?
23:39 jnthn No, but I figure you can define a subset Integerish of Numeric where $_ == .round; or so
23:39 timotimo m: say 4.narrow == 4
23:39 camelia rakudo-moar 38897d19c: OUTPUT: «True␤»
23:39 leont joined #perl6
23:39 jnthn Uh, .narrow is perhaps better :)
23:40 timotimo m: say 4.narrow ~~ Int; say 4.3.narrow ~~ Int
23:40 camelia rakudo-moar 38897d19c: OUTPUT: «True␤False␤»
23:40 jnthn Or .floor
23:40 timotimo m: say 4e0.narrow ~~ Int;
23:40 camelia rakudo-moar 38897d19c: OUTPUT: «True␤»
23:40 jnthn Don't use .round, it'll get false negs
23:52 TEttinger m: say 16/4.narrow ~~ Int;
23:52 camelia rakudo-moar 38897d19c: OUTPUT: «False␤»
23:53 TEttinger not sure of the precedence there
23:53 TEttinger or if 16/4 is the syntax for a ratio
23:54 jnthn m: say (16/4).narrow ~~ Int;
23:54 camelia rakudo-moar 38897d19c: OUTPUT: «True␤»
23:55 jnthn Method calls are very tight
23:55 jnthn In fact, they're as tight as it gets :)
23:56 TEttinger but is (16/4) a ratio or is it dividing 16 by 4 as an operation?
23:57 TEttinger m: say (16/4).what;
23:57 camelia rakudo-moar 38897d19c: OUTPUT: «No such method 'what' for invocant of type 'Rat'. Did you mean any of these?␤    Rat␤    flat␤␤  in block <unit> at <tmp> line 1␤␤»
23:57 TEttinger I guess
23:57 jnthn It's an operation
23:57 jnthn Though it will be constant-folded at compile time
23:57 TEttinger I am probably misunderstanding what a Rat is
23:58 TEttinger that said (16/4) is a Rat I think
23:58 comborico1611 joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo