Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-17

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:00 AlexDaniel zostay: right
00:01 AlexDaniel star: my $a = 0..2; my $b = 0..2; for cross($a, $b) -> ($x, $y) { say ++$ }
00:01 camelia star-m 2015.09: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
00:01 AlexDaniel m: my $a = 0..2; my $b = 0..2; for cross($a, $b) -> ($x, $y) { say ++$ }
00:01 camelia rakudo-moar 3259ba: OUTPUT«1␤»
00:01 skids jvcakg: Hello
00:01 AlexDaniel zostay: you are right, that's how it was before GLR
00:01 cpage_ joined #perl6
00:02 scz joined #perl6
00:02 zostay even if i wasn't, my mental map got all messed up by that... eventually i will recover
00:02 RabidGravy heads up to anyone who cares, there may be a "slight" infelicity in doing a subsequent .grep on a Supply that is the result of a previous grep
00:05 zostay is @$a still safe if $a = 0 .. 10**15? i think it will lazily evaluate, but it will start filling up memory, won't it?
00:06 zostay not important to me for what i'm working on now, but to help me rebuild my mental map...
00:06 vendethiel m: say (@(my $a = 15)).perl
00:06 camelia rakudo-moar 3259ba: OUTPUT«(15,)␤»
00:06 leont Why would that not be safe?
00:07 zostay i just meant it would create an array with 10**15 elements over time, right?
00:07 zostay or not?
00:07 vendethiel no, it's only a one-element array
00:07 zostay i'm trying to understand
00:08 zostay what? i missed something
00:09 leont List context doesn't do much
00:10 leont And you probably mean ... not ..
00:10 jvcakg anyone here has a free time on making me a site? we can be partners, must be talented =)
00:10 leont .. is a range, ... a sequence
00:10 zostay okay, i'll RTFM again
00:10 masak 'night, #perl6
00:11 jvcakg I only know C++ =/
00:11 ely-se why can't you pass environment variables to Proc::Async?
00:12 jvcakg hobbyist?
00:12 jvcakg passionateist? is that a word
00:14 vendethiel jvcakg: no one knows C++ //cc El_Che
00:14 vendethiel ely-se*. sorry El_Che :s
00:14 jvcakg =P
00:14 ely-se I'm going crazy
00:14 ely-se stupid deadlocks
00:15 jvcakg Yea I would take on Perl
00:15 jvcakg but sooooo big
00:15 jvcakg I reallly like the modules
00:15 pmqs_ zip
00:16 jvcakg remember the zip drives? that went obsolete fast!
00:16 leont ely-se: good point!
00:29 zacts joined #perl6
00:30 jvcakg Perl ftw
00:33 zacts joined #perl6
00:59 TEttinger joined #perl6
01:03 newbie joined #perl6
01:21 mspo why is http://doc.perl6.org/language/nativecall using { * } (whatever code, I think) in all of the examples?
01:21 mspo instead of using ... or !!!
01:22 colomon joined #perl6
01:25 skids mspo: that syntax is an "onlystar" whereas { ... } is "stub code"
01:26 skids One is a prototype, the other is a die-if-you-ever-fallback-to-this
01:27 Juerd m: sub foo { * }; foo()
01:27 camelia rakudo-moar 3259ba: ( no output )
01:28 Juerd Dunno, having a stub might make debugging easier :)
01:28 Juerd m: sub foo { ... }; foo()
01:28 camelia rakudo-moar 3259ba: OUTPUT«Stub code executed␤  in sub foo at /tmp/ZjHWcpLeh5 line 1␤  in block <unit> at /tmp/ZjHWcpLeh5 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/ZjHWcpLeh5 line 1␤␤»
01:29 skids m: ...; # The stub is generic, so it would have to be aalyzed out of the code by the compiler.
01:29 camelia rakudo-moar 3259ba: OUTPUT«Stub code executed␤  in block <unit> at /tmp/sycFqYvCMG line 1␤␤»
01:29 skids Also, there are NYI ways to treat onlystars with wrapping IIRC.
01:31 colomon joined #perl6
01:32 mspo well in my case
01:33 mspo * segv and ... works ;)
01:33 skids Huh, does { 1 } work?
01:45 AlexDaniel { ‘it should’ }
01:46 skids I would think an "is nativecall" sub with actual code in the body should probably warn.
01:46 colomon joined #perl6
01:47 skids *is native
01:48 skids (Warn as NYI, that is, until we have the S06 wrapping stuff, and definitely not run the native code without the {*} somewhere in there)
01:50 pierre-vigier joined #perl6
01:54 mspo I think { * } must be expanding to something
01:55 skids What it's supposed to expand to is in S06, but I don't think it's quite implemented that way yet.
01:56 mspo okay I think this is some other kind of bug
02:00 mspo this is amazing
02:04 mspo it's really just a sometimes kind of situation
02:06 mspo https://gist.github.com/msporleder/2e59371765812a3c1cd6
02:06 mspo just reordering the file is enough to make it segv vs not
02:06 skids heisenbugs--
02:07 mspo it's consistent
02:07 mspo the ones that work always work :)
02:08 mspo oh a bunch of cached stuff is landing in ~/.perl6 ?
02:09 vendethiel joined #perl6
02:09 gfldex do i understand https://github.com/rakudo/rakudo/blob/nom/src/Perl6/World.nqp#L636 right, that the tags are never handed over to the to be imported package?
02:16 colomon joined #perl6
02:17 scz joined #perl6
02:20 mspo skids: I added "use v6;" to all foo's and now they all work
02:26 bjz joined #perl6
02:28 dalek doc: 03c2f46 | skids++ | doc/Language/traps.pod:
02:28 dalek doc: Add a caveat about tricky precedence on ranges
02:28 dalek doc: review: https://github.com/perl6/doc/commit/03c2f464e8
02:43 Spryttan joined #perl6
02:46 vendethiel joined #perl6
02:46 protium joined #perl6
02:48 skids gfldex: I don't think any code in the to-be-imported package is called -- just the EXPORT hash is used.
02:54 gfldex the calling of EXPORT in the imported package is called here https://github.com/rakudo/rakudo/blob/nom/src/Perl6/World.nqp#L664
02:54 sortiz joined #perl6
02:55 gfldex my $result := &EXPORT(|@positional_imports, |@to_import); # or somesuch is on my v6.d wishlist
02:57 skids Maybe the EXPORT hash could do some fancy AT-POS stuff :-)
03:02 gfldex i just need the tags as named parameters in &EXPORT
03:03 gfldex EXPORT as it is, is a nice flexible ways to react to the wishes of a modules user. As soon as you start to do that, tags become pretty much useless. You have to provide them in is export but you can't devide what symbols to return from &EXPORT based on those tags.
03:04 gfldex so you either hava tags or positionals for use
03:17 scz joined #perl6
03:31 scz joined #perl6
03:51 noganex joined #perl6
03:56 pierre-vigier joined #perl6
04:00 scz joined #perl6
04:05 pierre-vigier joined #perl6
04:38 mohae joined #perl6
04:46 autarch hmm, I just said this in #perl6-toolchain but there's more folks here so I'll repeat it ...
04:47 autarch I think I have a more or less working Test::Stream
04:47 autarch and by more I mean it has events, a Test.pm6-alike sub exporter, and it has a context system for making sure that test events appear to come from the place where you call ok() rather than inside the ok() sub or elsewhere
04:47 autarch and by less I mean no built-in IPC support and it could probably use more tests
04:47 autarch and it has no docs yet
04:47 autarch https://github.com/autarch/perl6-Test-Stream
04:53 skids autarch++ though I don't know much about TAP etc.
04:53 autarch actually, the whole point of this system is that it's not tied to TAP at all
04:53 autarch though the distro does include a TAP formatter
04:53 autarch but it'd be very easy to output other test formats too
04:57 skids Have you taken a look at the specialized roast/packages/Test/ modules? -- some of them get a little deep in the weeds.
04:58 autarch I don't really expect this to replace anything in the core
04:58 revhippie left #perl6
04:59 autarch We talked about making the Test.pm6 in core an internal-only thing and recommend this distro (probably renamed to Test) for the ecosystem to use
04:59 autarch it's actually really important that everyone use an event based test system as soon as possible in order to make it easier to build testing tools (and to test the testing tools)
05:00 autarch but I don't know that there's any desire to actually put the thing I wrote into core, and my understanding is that p6 is aiming for a lightweight core to avoid the p5 "why do we have this ancient piece of junk in core?!" problem
05:01 skids Certainly parallelizing tests is good.  Is there any predictability built in, so that we only get spurious failures due to weird scheduling when we want to?
05:04 MadcapJake lol the github perl6 syntax highlighter catches my method «is-before» as two keywords seperated by a minus op :P
05:05 autarch skids: what I'm working on has very iittle to do with parallelization
05:06 pierre-vigier joined #perl6
05:06 autarch it's just an abstraction of testing from "spit out some TAP to stdout" to "send an abstract event describing the thing (Plan, Test, Skip) to a bunch of listeners and let the listeners do what they want (and one of those listeners may be a TAP formatter that prints to stdout)"
05:07 autarch what is possible under this system is to implement an IPC layer so events can be passed from one thread or process to a central monitoring process - so it provides a reasonable toolset for parallelization, and I'd like to add an actual IPC mechanism to the distro
05:20 vendethiel joined #perl6
05:25 Psyche^_ joined #perl6
05:37 sammers joined #perl6
05:39 pierre-vigier joined #perl6
05:53 Cabanossi joined #perl6
05:58 abraxxa joined #perl6
05:59 kaare_ joined #perl6
06:00 raiph joined #perl6
06:45 protium joined #perl6
07:01 scz joined #perl6
07:02 CIAvash joined #perl6
07:31 scz joined #perl6
07:46 daotoad joined #perl6
07:50 sjoshi joined #perl6
08:10 psy_ joined #perl6
08:12 darutoko joined #perl6
08:21 daotoad joined #perl6
08:27 pierre-vigier joined #perl6
08:32 gfldex m: https://gist.github.com/57bb505e41eb7649b1ba
08:32 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GHw2wy1jJc␤Confused␤at /tmp/GHw2wy1jJc:1␤------> 3https:7⏏5//gist.github.com/57bb505e41eb7649b1ba␤    expecting any of:␤        colon pair␤»
08:33 gfldex what am i doing wrong? ^^^
08:37 moritz camelia doesn't seem to recognize the gist URL
08:43 dustinm` joined #perl6
08:54 _nadim joined #perl6
08:55 bpmedley joined #perl6
08:56 firstdayonthejob joined #perl6
08:59 perl6newbee joined #perl6
09:05 daotoad joined #perl6
09:11 lokien_ joined #perl6
09:12 gfldex ===SORRY!=== Error while compiling /home/dex/projekte/perl6/tmp/import/export.pod.p6
09:12 gfldex Error while importing from 'ParametrisedLib':
09:12 gfldex no EXPORT sub, but you provided positional argument in the 'use' statement
09:12 gfldex at /home/dex/projekte/perl6/tmp/import/export.pod.p6:57
09:12 gfldex ------> arametrisedLib NewBaseClass, {:consumer}⏏;
09:12 gfldex that's the error that gist produces and leaves me confused
09:13 gfldex any ideas why it cant see the &EXPORT?
09:14 rindolf joined #perl6
09:20 sortiz gfldex, Try: import ParametrizedLib { NewBaseclass, :consumer}; # Just guessing
09:20 moritz gfldex: I think EXPORT must be outside the module
09:21 RabidGravy joined #perl6
09:27 gfldex sortiz: no luck
09:31 _nadim joined #perl6
09:35 RabidGravy m: my $supp-a = Supply.from-list(<foo bar baz>); $supp-a.tap( { say "original $_" }); my $supp-b = $supp-a.grep(/bar/ ).map({ $_.uc }); $supp-b.tap( { say "B: $_" }); $supp-b.grep({ /foo/ }).tap({ say "C: $_" });
09:35 camelia rakudo-moar 3259ba: OUTPUT«original foo␤original bar␤original baz␤B: BAR␤C: FOO␤»
09:36 RabidGravy ^ I'm pretty damned sure that it's not supposed to do that
09:38 rurban joined #perl6
09:38 RabidGravy If someone thinks that it is expected behaviour and I'd be all ears as to why they think so
09:38 sortiz m: package Foo { our sub EXPORT(|a) { say  |a; } }; import Foo Any, Int, <:flags &gol>;
09:38 camelia rakudo-moar 3259ba: ( no output )
09:39 RabidGravy as it stands it's totally broken Net::AMQP as it uses that pattern all over the place
09:40 sortiz m: package Foo { our sub EXPORT(|a) { say  |a; } }; Foo::EXPORT(Any, Int, <:flags &gol>);
09:40 camelia rakudo-moar 3259ba: OUTPUT«(Any)(Int)(:flags &gol)␤»
09:40 sortiz Seems that import extra args is NYI
09:41 dalek specs: 2168554 | (Sterling Hanenkamp)++ | S04-control.pod:
09:41 dalek specs: [S04] Add missing parenthesis in zip() example
09:41 dalek specs: review: https://github.com/perl6/specs/commit/2168554941
09:41 dalek specs: 21525aa | niner++ | S04-control.pod:
09:41 dalek specs: Merge pull request #105 from zostay/zip-parens
09:41 dalek specs:
09:41 dalek specs: [S04] Add missing parenthesis in zip() example
09:41 dalek specs: review: https://github.com/perl6/specs/commit/21525aab69
09:41 gfldex sortiz: it does work when the modules are put into individual files
09:41 dalek ecosystem: 8767ce6 | pmqs++ | META.list:
09:41 dalek ecosystem: Update META.list
09:41 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8767ce6e0e
09:41 dalek ecosystem: 43517bd | niner++ | META.list:
09:41 dalek ecosystem: Merge pull request #126 from pmqs/patch-3
09:41 dalek ecosystem:
09:41 dalek ecosystem: Aded Archive-SimpleZip
09:41 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/43517bdfbf
09:44 sortiz Maybe that EXPORT handling is per compunit
09:45 nine sortiz: do you mean "import" specifically or EXPORT in general?
09:51 * RabidGravy wonders whether it is worth bisecting the above as there have been several opportunities to break it
09:51 sortiz Both, see:
09:52 sortiz m: module Foo { sub bar is export {} }; module Bar { sub foo is export {} }; UNIT::EXPORT::DEFAULT::.keys.say
09:52 camelia rakudo-moar 3259ba: OUTPUT«(&foo &bar)␤»
09:52 sortiz I.e. un the same compunit, both modules uses the same UNIT.
09:53 RabidGravy yes
09:53 sortiz s/un/in
09:56 RabidGravy I don't suppose anyone knows the commit where the GLR branch got merged?
09:58 [ptc] joined #perl6
09:58 sortiz So, when use or import search for an EXPORT sub, they expect only one per UNIT. I'm just speculating.
09:59 RabidGravy yes that is currently the case
10:00 burnersk joined #perl6
10:00 pierre-vigier joined #perl6
10:02 sortiz Make sense, that way we can have many packages (classes, emums, etc.) per compunit, all sharing the same import/export machinery.
10:06 nine RabidGravy: commit 9622594885a50a761887a7bb451102ad2adeb9c1
10:07 nine sortiz: yes, module management is all about comp units
10:08 RabidGravy I'm pretty certain that the offending commit for the Supply.grep badness is a8231f14 but I'll do the full bisect anyway
10:08 RabidGravy nine, cheers
10:09 moritz RabidGravy: 9622594885a50a761887a7bb451102ad2adeb9c1 seems to have been the GLR merge
10:09 RabidGravy cool
10:09 RabidGravy that's the last time I know that Net::AMQP was tested
10:10 vendethiel joined #perl6
10:12 RabidGravy actually this an even more succinct example, with no map involved
10:12 RabidGravy m: Supply.from-list(<foo bar baz>).grep(/foo/).grep(/baz/).tap({say $_}
10:12 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/I8aBuHgh0K␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/I8aBuHgh0K:1␤------> 3z>).grep(/foo/).grep(/baz/).tap({say $_}7⏏5<EOL>␤    expecting any of:␤        post…»
10:12 RabidGravy m: Supply.from-list(<foo bar baz>).grep(/foo/).grep(/baz/).tap({say $_})
10:12 camelia rakudo-moar 3259ba: OUTPUT«baz␤»
10:13 [ptc] joined #perl6
10:13 RabidGravy that is, it appears that a subsequent grep on a supply derived by grep goes back to the original supply
10:14 RabidGravy and I really, really can't think of any plausible reason why that might be intentional
10:15 moritz yes, bug
10:16 burnersk joined #perl6
10:16 sortiz m: use NativeCall; class Foo is repr('CStruct') { }; sub foo(Pointer[Foo]) is native('bar') { };
10:16 camelia rakudo-moar 3259ba: ( no output )
10:17 sortiz m: use NativeCall; class Foo is repr('CStruct') { sub foo(Pointer[Foo]) is native('bar') { }; } # Bug ?
10:17 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EbcMCANe5k␤An exception occurred while parameterizing Pointer␤at /tmp/EbcMCANe5k:1␤Exception details:␤  Cannot call infix:<===>(Foo, Str); none of these signatures match:␤      ($?)␤      ($a, $b)…»
10:20 pierre-vigier joined #perl6
10:37 masak good antenoon, #perl6
10:39 vendethiel joined #perl6
10:39 sortiz o/ masak
10:41 Hotkeys good early morning masak :p
10:44 RabidGravy good quarter to eleven GMT
10:46 RabidGravy bisecting over four months of commits is really rather tedious
10:47 RabidGravy nearly every step requires a make distclean && rm -rf install
10:48 moritz RabidGravy: if you suspect one commit, you can simply build it and the previous commit; if the previous succeeds and the one fails, you've found the offending commit
10:50 RabidGravy I'm pretty sure I know which commit already to be honest (a8231f14) but it seems too obvious
10:51 moritz RabidGravy: then it's easier to test that hypothesis than to find for that in the vast space of possible offenders
10:54 RabidGravy indeed, but not enough coffee yet
10:54 RabidGravy it is does throw something interesting up
10:55 RabidGravy that is that the parse stage varies wildly over time
11:00 [Tux] UNDER 12!
11:00 [Tux] csv-ip5xs            50000    18.119    12.488
11:00 [Tux] test                 50000    23.267    22.634
11:00 [Tux] test-t               50000    12.603    11.717
11:00 [Tux] csv-parser           50000    51.006     0.912
11:02 [Tux] abaugher, leading v fixed. Try again
11:03 nine RabidGravy: do you use git bisect run?
11:03 RabidGravy no
11:04 RabidGravy does that help?
11:04 masak I'm curious, is someone actively using Tux++'s benchmarks to optimize Rakudo?
11:04 [Tux] Text::CSV requires Perl version 6.0.0. Cannot continue.
11:04 moritz it helps you to automate the bisects
11:04 [Tux] that is without the v. I need guidance I think
11:04 RabidGravy I think it's the 6.c or whatever
11:04 moritz [Tux]: use v6.c;
11:04 RabidGravy or just plain 6 will do
11:05 azawawi joined #perl6
11:05 azawawi hi
11:05 nine RabidGravy: well it makes git do all the tedious work, so you can do something else :) As long as you can automate the testing
11:06 moritz \o azawawi
11:06 masak RabidGravy: `git bisect run` takes a shell command as arguments, and considers exit code 0 to be "good" and other exit codes to be "bad"
11:06 nine [Tux]: there's no 6.0.0. It's always 6.c: use v6.c; and in the META6.json "perl": "6.c", # without the v
11:07 RabidGravy oh okay
11:07 hackworth joined #perl6
11:07 azawawi what's the best way to *depend* on a specific module under platform X in META.info?
11:07 RabidGravy I think it's time to flip Test::META to use always fail for a v
11:08 jdv79 hola *
11:08 yoleaux 11 Jan 2016 12:15Z <Zoffix> jdv79: How is work on the P6 variant of PAUSE/CPAN/MetaCPAN going? Maybe the repo should be moved under the perl6 GitHub organization, so it'd be easier for potential volunteers to finds and contribute to?
11:08 yoleaux 11 Jan 2016 12:18Z <Zoffix> jdv79: we also now have #perl6-toolchain you may be interested in joining.
11:08 masak azawawi: you mean you want the dependency to be different, depending on platform?
11:09 azawawi masak: yup
11:09 masak hola jdv79
11:09 masak azawawi: no idea. is that even possible?
11:09 virtualsue joined #perl6
11:09 azawawi masak: e.g. on windows, i want to depend on Alien::OpenCV::Windows to install the DLL . On unix, i need LibraryMake but not on windows
11:10 azawawi masak: otherwise OpenCV will be bloated given that the openv (static) DLL is like 3.24MB
11:10 azawawi masak: the zipped tarball from github that is
11:10 jdv79 anything extraordinarily interesting happen in the last few weeks?
11:11 masak azawawi: this might be something to ask about in #perl6-toolchain
11:11 masak jdv79: ...Christmas? :)
11:12 jdv79 i ducked out just after new years so i caught that part
11:12 [Tux] Hmm, it wasn't under 12. I looked at the wrong column :( sorry
11:13 azawawi masak: done
11:14 azawawi jdv79: https://github.com/azawawi/perl6-opencv/blob/master/examples/02-drawing.p6 :)
11:15 Actualeyes joined #perl6
11:25 pierre-vigier joined #perl6
11:26 jdv79 masak: i meant a couple weeks.  my bad.  thanks.
11:26 pierre-vigier p6: <121 200 333 392 605 684 707 944 909 320 1221 1296 1404 1414 1080>.map( * / ++$ ).map(*.chr).join.flip.say
11:26 camelia rakudo-moar 3259ba: OUTPUT«Hello everybody␤»
11:29 lucs m: unit class A; class B::C { }; say A::B::C.perl;
11:29 camelia rakudo-moar 3259ba: OUTPUT«A::B::C␤»
11:30 lucs m: unit class A; class Test::C { }; say A::Test::C.perl;
11:30 camelia rakudo-moar 3259ba: OUTPUT«A::Test::C␤»
11:30 lucs m: unit class A; class X::C { }; say A::X::C.perl;
11:30 camelia rakudo-moar 3259ba: OUTPUT«Could not find symbol '&C'␤  in block <unit> at /tmp/ZCdm_oTPlE line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/ZCdm_oTPlE line 1␤␤»
11:30 lucs Why does the last one fail?
11:32 pierre-vigier i might be totally wrong, however
11:32 pierre-vigier say A.WHAT
11:32 pierre-vigier p6: say A.WHAT
11:32 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared name:␤    A used at line 1␤␤»
11:33 pierre-vigier A is unkonw in core
11:33 pierre-vigier where X is not
11:33 pierre-vigier say X.WHAT
11:33 pierre-vigier p6: say X.WHAT
11:33 camelia rakudo-moar 3259ba: OUTPUT«(X)␤»
11:33 lucs Hmm...
11:33 lucs p6: say Test.WHAT
11:33 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared name:␤    Test used at line 1␤␤»
11:34 lucs Okay, makes sense I guess.
11:34 z8 joined #perl6
11:34 pierre-vigier X might be reserverd only for Exception
11:35 pierre-vigier p6: unit class A; A::X.WHAT.say
11:35 camelia rakudo-moar 3259ba: OUTPUT«Could not find symbol '&X'␤  in block <unit> at /tmp/tmpfile line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/tmpfile line 1␤␤»
11:35 pierre-vigier but that is strange
11:36 lucs What's 'p6:' as opposed to 'm:'?
11:36 pierre-vigier i don't know if there is any
11:36 lucs Oh, right, according to the output, they do look the same.
11:37 pierre-vigier rakudo: "test".say
11:37 camelia rakudo-moar 3259ba: OUTPUT«test␤»
11:37 lucs That too :)
11:37 geekosaur I think they're currently the same becaase rakudo-moar's the only one that works right now. but notionally p6: runs in every working backend?
11:37 jdv79 .tell Zoffix absolutely nothing.  i fell off the grid for two weeks.  sure, i can move them over.
11:37 yoleaux jdv79: I'll pass your message to Zoffix.
11:46 pmurias joined #perl6
11:48 RabidGravy .tell pierre-vigier yes X is implicitly at least created in the setting because that's where all the exceptions live
11:48 yoleaux RabidGravy: I'll pass your message to pierre-vigier.
11:49 lucs m: unit class A; class X::C { }; say X::C.perl;   # This is why I'm confused.
11:49 camelia rakudo-moar 3259ba: OUTPUT«A::X::C␤»
11:49 lucs m: unit class A; class X::C { }; say A::X::C.perl;
11:49 camelia rakudo-moar 3259ba: OUTPUT«Could not find symbol '&C'␤  in block <unit> at /tmp/khvZqzkGHL line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/khvZqzkGHL line 1␤␤»
11:50 RabidGravy because you're still in A
11:50 RabidGravy m: class A {  class X:::C { } }; say A::X::C.perl;
11:50 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tnh3fiXN29␤Cannot use adverb C on a type name (only 'ver' and 'auth' are understood)␤at /tmp/tnh3fiXN29:1␤------> 3class A {  class X:::C7⏏5 { } }; say A::X::C.perl;␤    expecting any of:␤      …»
11:51 RabidGravy m: class A {  class X::C { } }; say A::X::C.perl;
11:51 camelia rakudo-moar 3259ba: OUTPUT«Could not find symbol '&C'␤  in block <unit> at /tmp/Q0ULrbn43G line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Q0ULrbn43G line 1␤␤»
11:51 RabidGravy eh?
11:52 lucs m: unit class A; class B::C { }; say A::B::C.perl;
11:52 camelia rakudo-moar 3259ba: OUTPUT«A::B::C␤»
11:53 RabidGravy I'm confused now as well
11:55 mort96 left #perl6
11:57 azawawi tadzik: ping
11:57 spider-mario joined #perl6
11:58 azawawi .tell tadzik Shell::Command is now failing to install on windows after the which command was added. Please consider using File::Which
11:58 yoleaux azawawi: I'll pass your message to tadzik.
11:58 RabidGravy I can only think that the 'X' is actually special cased somewhere
12:00 lucs Actually, it appears to fail in the same way for all built-in types (the one I've tried anyway).
12:00 lucs m: unit class A; class Bag::C { }; say A::Bag::C.WHAT
12:00 camelia rakudo-moar 3259ba: OUTPUT«Could not find symbol '&C'␤  in block <unit> at /tmp/dFjuudGQvw line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/dFjuudGQvw line 1␤␤»
12:00 lucs m: unit class A; class Bag::C { }; say Bag::C.WHAT
12:00 camelia rakudo-moar 3259ba: OUTPUT«(C)␤»
12:00 lucs m: unit class A; class Bag::C { }; say Bag::C.perl
12:00 camelia rakudo-moar 3259ba: OUTPUT«A::Bag::C␤»
12:01 RabidGravy I cannot comment on whether it is intentional or not, but I can hypothesize a failure mode
12:02 azawawi zef/panda both fail at different things... zef works but you cant --force it :) panda will ignore your --force with the famous "Sorry.. already installed" ... :)
12:02 RabidGravy time for a new one
12:02 RabidGravy ;-)
12:03 azawawi I declare opencv to be working on windows but not when installed through panda or zef.... :)
12:04 pierre-vigier joined #perl6
12:06 * azawawi wonders where is rakudo star 2015.12 (http://rakudo.org/downloads/star)
12:07 RabidGravy azawawi++ coolio I can't think of a use I may have for it quite yet but cool nonetheless
12:08 azawawi RabidGravy: I want to make a demo script where camelia flies around and then eats a python :)
12:09 azawawi another pet project to start later for Arduino with Perl 6 .... Implementing https://github.com/firmata/protocol :)
12:11 RabidGravy Ooh, then you'll be wanting to do some serial port thingy :)  I've been putting it off myself, but will need it to drive a PiLite
12:11 azawawi and then try to remote control an arduino board through firmata over a bluetooth connection in Perl 6
12:12 RabidGravy I think I've got a bluetooth shield around somewhere
12:13 azawawi i bought an HC-06 bluetooth chip
12:13 azawawi pretty cheap
12:14 RabidGravy I was going to have a play with the MQTT thing Arduino -> RabbitMQ -> Perl 6 at some point but seem to have got totally bogged down in fixing Net::AMQP
12:14 sena_kun joined #perl6
12:15 azawawi cool
12:16 azawawi also http://simplecv.org/ is now another project for OpenCV::Simple :)
12:17 * azawawi windows reboot... brb &
12:21 lucs m: class A { class X::Meh { }; }; class B { class X::Meh { }; }; die X::Meh.new;
12:21 camelia rakudo-moar 3259ba: OUTPUT«B::X::Meh<140541024946368>␤  in block <unit> at /tmp/aenCLaASRp line 1␤␤»
12:21 lucs m: class A { class X::Meh { }; }; class B { class X::Meh { }; }; die B::X::Meh.new;
12:21 camelia rakudo-moar 3259ba: OUTPUT«Could not find symbol '&Meh'␤  in block <unit> at /tmp/SwAvDhVyFE line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/SwAvDhVyFE line 1␤␤»
12:21 kid51 joined #perl6
12:22 lucs How can I be sure to avoid name collisions in the X namespace?
12:23 lucs Do you folks do something like this in your modules?  class X::MyModule::Meh  ?
12:23 RabidGravy yes, but I always only use them in the module
12:23 RabidGravy so it isn't a problem
12:24 azawawi joined #perl6
12:24 lucs Ah, I hit the problem when testing exceptions (from another file, eh).
12:25 RabidGravy m: class A { class X::Meh { }; method foo() { die X::Meh.new } }; class B { class X::Meh { };  method foo() { die X::Meh.new }}; A.foo
12:25 camelia rakudo-moar 3259ba: OUTPUT«A::X::Meh<140617387570104>␤  in method foo at /tmp/o27asXUoVa line 1␤  in block <unit> at /tmp/o27asXUoVa line 1␤␤»
12:25 RabidGravy m: class A { class X::Meh { }; method foo() { die X::Meh.new } }; class B { class X::Meh { };  method foo() { die X::Meh.new }}; B.foo
12:25 camelia rakudo-moar 3259ba: OUTPUT«B::X::Meh<139659739210712>␤  in method foo at /tmp/Eo708hzNdL line 1␤  in block <unit> at /tmp/Eo708hzNdL line 1␤␤»
12:28 lucs Well, that works, but I was trying to pass around the exceptions with throws-like(), and tripping all over myself with these failures.
12:29 RabidGravy throw-like will match the short name fine
12:29 lucs Hmm... I'll revise my code...
12:30 RabidGravy infact
12:31 RabidGravy m: use Test; class A { class X::Meh { }; method foo() { die X::Meh.new } }; throws-like { A.foo }, X::Meh, "there";
12:31 camelia rakudo-moar 3259ba: OUTPUT«    1..2␤    ok 1 - code dies␤    not ok 2 - right exception type (A::X::Meh)␤    ␤# Failed test 'right exception type (A::X::Meh)'␤# at /home/camelia/.perl6/2015.12-212-g3259ba3/precomp/6F03C0411DF045AC18E1EFD65118CA6D717A8AA5.1452723027.09182/3…»
12:32 RabidGravy m: use Test; class A { class X::Meh { }; method foo() { die X::Meh.new } }; throws-like { A.foo }, A:X::Meh, "there";
12:32 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZxGhuoRVG0␤Invalid type smiley 'X' used in type name␤at /tmp/ZxGhuoRVG0:1␤------> 3:Meh.new } }; throws-like { A.foo }, A:X7⏏5::Meh, "there";␤    expecting any of:␤        pair value␤»
12:32 RabidGravy m: use Test; class A { class X::Meh { }; method foo() { die X::Meh.new } }; throws-like { A.foo }, A::X::Meh, "there";
12:32 camelia rakudo-moar 3259ba: OUTPUT«Could not find symbol '&Meh'␤  in block <unit> at /tmp/qJXa0wWa_G line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/qJXa0wWa_G line 1␤␤»
12:32 RabidGravy m: use Test; class A { class X::Meh { }; method foo() { die X::Meh.new } }; throws-like { A.foo }, X::Meh, "there";
12:32 camelia rakudo-moar 3259ba: OUTPUT«    1..2␤    ok 1 - code dies␤    not ok 2 - right exception type (A::X::Meh)␤    ␤# Failed test 'right exception type (A::X::Meh)'␤# at /home/camelia/.perl6/2015.12-212-g3259ba3/precomp/6F03C0411DF045AC18E1EFD65118CA6D717A8AA5.1452723027.09182/3…»
12:32 RabidGravy okay that'll be weird right there
12:32 RabidGravy I have tests that do exactly that
12:34 lucs Yeah, that looks like what I was trying.
12:38 lucs RabidGravy: Are you saying that you have tests that don't work (anymore?) as expected?
12:38 RabidGravy no
12:38 RabidGravy m: use Test; module A { class X::Meh is Exception { }; class C { method foo() { X::Meh.new.throw } } }; throws-like { A::C.foo }, X::Meh, "there";
12:38 camelia rakudo-moar 3259ba: OUTPUT«    1..2␤    ok 1 - code dies␤    ok 2 - right exception type (A::X::Meh)␤ok 1 - there␤»
12:39 RabidGravy it was just a bad example
12:39 lucs Oh.
12:40 RabidGravy If the class isn't an Exception it will never work
12:41 lucs With throws-like()? It better not, eh.
12:41 lucs I'll revise my code, see if I can fix it.
12:42 RabidGravy no, but the example I ran first it wasn't which confused me
12:42 RabidGravy (doing ten things at once)
12:46 rurban left #perl6
12:48 azawawi joined #perl6
12:50 pierre-vigier joined #perl6
12:55 pierre-vigier Is there any way to get the private methods added by a role?
12:55 yoleaux 11:48Z <RabidGravy> pierre-vigier: yes X is implicitly at least created in the setting because that's where all the exceptions live
12:56 pierre-vigier p6: role A { method A() {}; method !B() { } };say A.^methods;
12:56 camelia rakudo-moar 3259ba: OUTPUT«(A)␤»
12:56 pierre-vigier p6: role A { method A() {}; method !B() { } };say A.^private_methods;
12:56 camelia rakudo-moar 3259ba: OUTPUT«Method 'private_methods' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at /tmp/tmpfile line 1␤␤»
12:56 pierre-vigier i found nothing in the doc
12:57 RabidGravy m: role A { method A() {}; method !B() { } };say A.^methods(:all)
12:57 camelia rakudo-moar 3259ba: OUTPUT«(A)␤»
12:58 RabidGravy oh I did an example yesterday but I forgot
12:59 SCHAAP137 joined #perl6
12:59 pierre-vigier i checked as well the rakudo source for ParametricRoleHOW and ParametricRoleGroupHOW
12:59 pierre-vigier but did not found anything
13:04 moritz : role A { method A() {}; method !B() { } }; say A.^private_method_table().keys
13:04 moritz m: role A { method A() {}; method !B() { } }; say A.^private_method_table().keys
13:04 camelia rakudo-moar 3259ba: OUTPUT«Method 'private_method_table' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at /tmp/M1IGwJHW4z line 1␤␤»
13:04 RabidGravy ah yes, that was it
13:05 moritz m: role A { method A() {}; method !B() { } }; say A.^candidates(0).private_method_table(A).keys
13:05 camelia rakudo-moar 3259ba: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in any candidates at gen/moar/m-Metamodel.nqp line 2653␤  in block <unit> at /tmp/M0rCSTafDD line 1␤␤»
13:05 moritz m: role A { method A() {}; method !B() { } }; say A.^candidates(0).private_method_table().keys
13:05 camelia rakudo-moar 3259ba: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in any candidates at gen/moar/m-Metamodel.nqp line 2653␤  in block <unit> at /tmp/CB_scRG3gp line 1␤␤»
13:05 moritz m: role A { method A() {}; method !B() { } }; say A.^candidates(0).perl
13:05 camelia rakudo-moar 3259ba: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in any candidates at gen/moar/m-Metamodel.nqp line 2653␤  in block <unit> at /tmp/xW1R_yOfeM line 1␤␤»
13:05 timotimo o/
13:05 moritz m: role A { method A() {}; method !B() { } }; say A.^candidates[0].private_method_table().keys
13:05 camelia rakudo-moar 3259ba: OUTPUT«Method 'private_method_table' not found for invocant of class 'A'␤  in block <unit> at /tmp/nZrIOjOXtu line 1␤␤»
13:06 moritz m: role A { method A() {}; method !B() { } }; say A.^candidates[0].private_methods()
13:06 camelia rakudo-moar 3259ba: OUTPUT«Method 'private_methods' not found for invocant of class 'A'␤  in block <unit> at /tmp/X3UocRFlCG line 1␤␤»
13:06 moritz m: role A { method A() {}; method !B() { } }; say A.^candidates[0].^private_methods()
13:06 camelia rakudo-moar 3259ba: OUTPUT«Method 'private_methods' not found for invocant of class 'Perl6::Metamodel::ParametricRoleHOW'␤  in block <unit> at /tmp/kfy25A_Gro line 1␤␤»
13:06 moritz m: role A { method A() {}; method !B() { } }; say A.^candidates[0].^private_method_table().keys
13:06 camelia rakudo-moar 3259ba: OUTPUT«(B)␤»
13:07 moritz ok, that was a tough ride :-)
13:07 moritz \o timotimo
13:08 pierre-vigier hum, i'm confused
13:08 moritz don't worry; for some of us, that's quite normal.
13:09 pierre-vigier in core, it seems that role is first applied to a strawman to check for collisions
13:09 pierre-vigier and after, that "dummy" class is introspected
13:11 pierre-vigier m: role A { method A() {}; method !B() { } }; say A.^candidates
13:11 camelia rakudo-moar 3259ba: OUTPUT«((A))␤»
13:11 pierre-vigier m: role A { method A() {}; method !B() { } }; say A.^candidates[0]
13:11 camelia rakudo-moar 3259ba: OUTPUT«(A)␤»
13:12 RabidGravy .tell jnthn I don't believe you intended for https://rt.perl.org/Ticket/Display.html?id=127297 to happen :-\
13:12 yoleaux RabidGravy: I'll pass your message to jnthn.
13:16 pierre-vigier m: role A { method A() {}; method !B() { } }; say A.^candidates[0].HOW
13:16 camelia rakudo-moar 3259ba: OUTPUT«Perl6::Metamodel::ParametricRoleHOW.new␤»
13:16 pierre-vigier m: role A { method A() {}; method !B() { } }; say A.HOW
13:16 camelia rakudo-moar 3259ba: OUTPUT«Perl6::Metamodel::ParametricRoleGroupHOW.new␤»
13:17 pierre-vigier that explains
13:18 pierre-vigier m: role A { method A() {}; method !B() { } }; say A.new.^private_method_table
13:18 camelia rakudo-moar 3259ba: OUTPUT«B => B␤»
13:18 pierre-vigier m: role A { method A() {}; method !B() { } }; say A.new.^private_method_table.keys
13:18 camelia rakudo-moar 3259ba: OUTPUT«(B)␤»
13:20 pmqs Is DESTROY for a class always invoked?
13:20 pmqs m:class c { method DESTROY() { say "destroy"; } }; { my  $x = c.new ; }
13:20 pmqs m: class c { method DESTROY() { say "destroy"; } }; { my  $x = c.new ; }
13:20 camelia rakudo-moar 3259ba: ( no output )
13:20 pmqs I see it invoked sometimes, but mostly not
13:20 pmqs Am I missing something obvious?
13:21 bowtie joined #perl6
13:21 RabidGravy it is called when the garbage collector gets to the object
13:21 RabidGravy so if the program is exiting anyway then it may not be
13:22 xpen joined #perl6
13:22 pmqs any way to reliably tidy up on object destruction?
13:23 pmqs if DESTROY doesn't seem to get called all the time
13:23 nine pmqs: LEAVE or END phasers, depending on what you want to do during destruction
13:24 nine end _when_ you need it done obviously
13:24 Skarsnik joined #perl6
13:24 pmqs nine, really want it when the object goes out of scope
13:24 nine then LEAVE is what you need
13:25 pmqs nine, ta. Will have a play with that
13:25 nine { my $obj = Obj.new; LEAVE $obj.cleanup; }
13:26 arnsholt pmqs: In case you're wondering *why* destructors aren't called reliably, it's because guaranteeing reliable destructors (as well as the order they're called in) more or less forces you to do some kind of refcounting GC
13:26 Skarsnik Hello
13:27 Skarsnik hey pmqs, why no read support in your zip module? x)
13:27 dalek Inline-Perl5: d64121b | (Stefan Seifert)++ | META.info:
13:27 dalek Inline-Perl5: Fix warning about the leading "v" in Perl 6 version in META.info
13:27 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/d64121b734
13:27 dalek Inline-Perl5: b71be5a | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
13:27 dalek Inline-Perl5: Replace "native" sub by standard "is native" traits
13:27 dalek Inline-Perl5:
13:27 dalek Inline-Perl5: Now that the whole mechanism for finding the bundled native library is provided
13:27 dalek Inline-Perl5: by NativeCall and Perl 6, we can use a plain constant for simplifying the code.
13:27 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/b71be5af2c
13:27 dalek Inline-Perl5: 9bd89e4 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
13:27 dalek Inline-Perl5: Replace baroque OpaquePointer by just Pointer
13:27 dalek Inline-Perl5:
13:27 dalek Inline-Perl5: Now that we require Perl 6.c, we can be sure it supports the shorter "Pointer".
13:27 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/9bd89e4ec2
13:29 pmqs Skarsnik, there's already a module that does that File::Zip (I think)
13:29 pmqs arnsholt, aah yes. remember reading that
13:29 Skarsnik Yes, but I don't want to use 2 modules with different interface for the the "same" thing
13:30 pmqs Skarsnik, I hear you :-)
13:34 rindolf joined #perl6
13:39 rurban1 joined #perl6
13:41 gfldex m: sub f(::T) { class :: is T {} }; f(class {});
13:41 camelia rakudo-moar 3259ba: OUTPUT«Unhandled exception: Method 'item' not found for invocant of class 'T'␤   at <unknown>:1  (/home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm:print_exception:4294967295)␤ from gen/moar/m-CORE.setting:20403  (/home/camelia/rakudo-m-in…»
13:41 bpmedley joined #perl6
13:42 RabidGravy yeah, I saw that one the other day, can't remember what I was trying to do
13:42 gfldex i got a complete (i think) list of things that do work with EXPORT and type captures
13:43 RabidGravy gfldex++
13:44 bpmedley joined #perl6
13:46 molaf joined #perl6
13:46 gfldex https://gist.github.com/gfldex/e0c398175941d094958a
13:46 gfldex if you happen to another one that works, please let me know
13:46 gfldex i want to propaganda this
13:46 gfldex s/to/to know/
13:47 jnthn RabidGravy: Certainly a bug; thanks for reporting
13:47 yoleaux 13:12Z <RabidGravy> jnthn: I don't believe you intended for https://rt.perl.org/Ticket/Display.html?id=127297 to happen :-\
13:48 RabidGravy had me tearing my (metaphorical) hair out, I was postulating all sorts of weird interactions with the target supply before I golfed it :)
13:51 FROGGS_ joined #perl6
13:51 dalek rakudo/nom: 770d109 | jnthn++ | src/core/Supply.pm:
13:51 dalek rakudo/nom: Fix scoping bug in Supply.grep.
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/770d109738
13:51 jnthn RabidGravy: ^^
13:52 jnthn And yes, please add a test to S17-supply/grep.t
13:53 RabidGravy will do, just re-testing
13:54 nine jnthn: so I _was_ on the right track there :)
13:58 jnthn :)
13:58 jnthn My first Rakudo commit of 2016 \o/
14:00 RabidGravy and the first one by anyone since Wednesday apparently
14:00 RabidGravy jnthn++
14:00 nine .seen lizmat
14:00 yoleaux I saw lizmat 13 Jan 2016 21:26Z in #perl6: <lizmat> mspo: no pb
14:09 xdoctor joined #perl6
14:10 pierre-vigier Thank to all the help i had here on Metamodel, Trait and Role, i finally have something "showable" for AttrX::PrivateAccessor
14:10 pierre-vigier https://github.com/pierre-vigier/Perl6-AttrX-PrivateAccessor
14:10 pierre-vigier I love Perl6 :)
14:17 bpmedley joined #perl6
14:17 masak lol, I blogged! http://strangelyconsistent.org/blog/macros-what-the-faq-are-they
14:21 lucasb joined #perl6
14:21 bpmedley joined #perl6
14:29 mspo masak: a lot of formatting issues
14:29 avs_ joined #perl6
14:30 masak oh :/
14:30 * masak looks
14:30 mspo the first few questions, anyway
14:30 mspo they go to the next line
14:31 masak yes
14:31 masak will fix immediately
14:31 mspo markdown?
14:32 mspo ditto Q: Ok, final question: is there something that you've omitted from the
14:32 masak fix'd
14:32 masak should be able to F5 now and see the fix'd version
14:32 masak apologies for the inconvenience
14:32 masak and yes, markdown
14:33 masak I do know that ATX headers can't break lines
14:33 masak but somehow I forgot and overeagerly formatted them in vim when converting from a gist :)
14:33 mspo markdown without live preview is hard :)
14:34 mspo I haven't found a good drop-in js live-preview widget either
14:35 masak I've seen plenty of libraries for it
14:35 masak dunno about widgets
14:35 masak but you're right -- I would like something like that for editing my posts
14:37 mspo most of the libs I've seen are part of larger systems
14:37 Actualeyes joined #perl6
14:37 mspo so if your edit page isn't structured just so..
14:42 average joined #perl6
14:42 average http://blog.garage-coding.com/2016/01/17/automatic-building-of-distributed-teams.html
14:42 average does anyone here understand this blogpost ?
14:43 dalek roast: 696d50a | RabidGravy++ | S17-supply/grep.t:
14:43 dalek roast: Check subsequent grep only gets the results of the first
14:43 dalek roast:
14:43 dalek roast: Per https://rt.perl.org/Ticket/Display.html?id=127297
14:43 dalek roast: review: https://github.com/perl6/roast/commit/696d50a932
14:54 RabidGravy I'm wondering looking at that whether the Test::Tap merits being given a life in the ecosystem
14:55 jme_ joined #perl6
14:56 orbus joined #perl6
14:58 jme` joined #perl6
14:59 orbus good morning sixers
14:59 orbus got another puzzle to figure out, if anyone's around
14:59 awwaiid joined #perl6
15:02 orbus so say I want to loop on polling a channel, and stop as soon as no more values are available
15:02 orbus m: my $c=Channel.new; for 1..3 {$c.send($_)}; while $c.poll -> $x { put $x }
15:02 camelia rakudo-moar 770d10: OUTPUT«1␤2␤3␤»
15:02 orbus but while $c.poll -> $x actually apparently test the value of $x
15:03 orbus m: my $c=Channel.new; for 0..3 {$c.send($_)}; while $c.poll -> $x { put $x }
15:03 camelia rakudo-moar 770d10: ( no output )
15:03 orbus if there's a 0 on the channel, the loop ends prematurely
15:03 orbus poll returns Nil if it fails to get a value, but I can't figure out a good way to test for that
15:04 orbus if I assign the result of poll to a variable and then test it, Nil evaporates on assignment
15:04 bpmedley joined #perl6
15:04 AlexDaniel joined #perl6
15:05 lokien_ joined #perl6
15:05 RabidGravy m: my $c=Channel.new; for 0..3 {$c.send($_)}; $c.close; for $c.list -> $x { put $x }
15:05 camelia rakudo-moar 770d10: OUTPUT«0␤1␤2␤3␤»
15:06 orbus no, don't want to do that
15:06 orbus that will only work on one thread
15:06 RabidGravy well, you have to signal the end of the channel
15:06 orbus I don't think I want to do that either :p
15:07 Zero_Dogg joined #perl6
15:07 Zero_Dogg joined #perl6
15:07 orbus m: my $c=Channel.new; for 0..3 {$c.send($_)}; loop { my $x = $c.poll; if defined $x { put $x } else { last } }
15:07 camelia rakudo-moar 770d10: OUTPUT«0␤1␤2␤3␤»
15:07 orbus that seems to work
15:07 orbus thought I tried that before
15:07 jnthn You generally don't want to loop on .poll
15:07 jnthn Because it's busy waiting.
15:08 orbus well, not really if I stop and go do something else as soon as I don't get a value back
15:08 jnthn Ah, OK. So there's a bit more to it than your example showed :)
15:08 orbus yes - it was a naive example
15:08 brrt joined #perl6
15:08 orbus also I'm trying to figure out how Nil works
15:08 jnthn If you didn't already know, you can use whenever with a Channel also.
15:09 orbus hmmm
15:09 orbus haven't looked at whenever yet
15:09 jnthn Nil, when assigned to a Scalar, resets it to its default value
15:09 jnthn Which is Any for an untyped Scalar.
15:09 orbus yeah, I was trying to figure out how to reliably test for that
15:09 orbus I guess defined
15:10 orbus or ! defined
15:10 orbus i.e. first I tried $x === Nil but that was no good
15:10 jnthn with $c.poll -> $x { put $x } # maybe neater
15:10 jnthn Right, after the assignment the Nil is gone.
15:10 orbus as I discovered :)
15:12 orbus more generally, it seems like it would be nice if there were a "while defined" loop
15:12 orbus that also allowed assignment
15:15 orbus m: my $c=Channel.new; for 0..3 {$c.send($_)}; loop { with $c.poll -> $x { say $x } else { last }}
15:15 camelia rakudo-moar 770d10: OUTPUT«0␤1␤2␤3␤»
15:15 orbus yeah, that works and is slightly neater - thanks
15:17 orbus I've just been messing around with concurrency stuff a lot over the last week or two
15:17 orbus still haven't totally wrapped my head around all the things you can do with Supply
15:18 jnthn Me either :D
15:18 orbus haha
15:18 orbus actually the other day I was trying to implement atomic compare and swap
15:18 orbus didn't go so well
15:19 orbus and then I tried to make a bounded channel that would block if you tried to put more than $limit elements into it until slots freed up
15:19 orbus also didn't go so well
15:19 orbus apparently I'm worse at concurrency than I believed
15:21 funrep "my $conn = IO::Socket::INET.new(listen => $server, localport => $port);" this just crashes without any error message or anything, any ideas?
15:22 RabidGravy "crashes" ?
15:22 orbus $server and $port aren't declared...
15:22 orbus try putting my on them
15:22 orbus runs fine for me if I do that...
15:22 jnthn orbus: Yeah, I'm kinda pondering whether there'd be a market for a Perl 6 concurrency cookbook at some point :)
15:23 jnthn But want to work lots of polishing up the implementation first :)
15:23 jnthn *lots on
15:23 orbus definitely
15:23 pochi does 'listen' take server?
15:23 RabidGravy no it doesn't
15:23 orbus jnthn: actually I've been meaning to ask you if you've done a writeup anywhere on exactly what is and is not atomic
15:24 orbus like
15:24 orbus scalar assignment seems to be
15:24 orbus usually
15:24 orbus unless you're assigning like an object constructor - object construction definitely seems not to be
15:24 jnthn orbus: No, that plus a "memory model" doc is really needed.
15:24 RabidGravy funrep, please examine the example in http://doc.perl6.org/type/IO::Socket::INET
15:25 moritz please use https:// URLs to doc.perl6.org :-)
15:25 orbus mostly just trying to figure out where the mines are so I don't step on them
15:25 orbus jnthn: okay, that's kind of what I figured
15:26 jnthn Hm, looks like I'd better go for my afternoon stroll now if I want it before dark falls. :)
15:26 jnthn bbl :)
15:26 orbus enjoy
15:26 RabidGravy already nearly dark here
15:26 orbus it's morning here
15:27 orbus time for breakfast actually
15:27 orbus bbl
15:27 skaji joined #perl6
15:33 jvcakg what does bbl mean?
15:34 nine be back later
15:34 jvcakg ty
15:34 jvcakg psyke =P
15:35 zakharyas joined #perl6
15:45 RabidGravy Well, it appears that Net::AMQP is nearly working again
15:55 tadzik Computer, messages
15:55 yoleaux 11:58Z <azawawi> tadzik: Shell::Command is now failing to install on windows after the which command was added. Please consider using File::Which
15:55 tadzik ... There's a which command now?
15:55 lucasb .oO( which command are you talking about? )
15:56 nine tadzik: do you know the feeling, when you wake up and don't know your software anymore? ;)
15:56 tadzik Yes! :)
15:57 tadzik But I wake up and don't know who writes my software :P
15:57 Skarsnik yay the first type I define my own operator in a perl 6 program x)
15:57 Skarsnik *time
15:58 khw joined #perl6
16:02 RabidGravy If anyone's bored you can take a poke at https://github.com/retupmoca/P6-Net-AMQP one thing left broken now
16:10 funrep RabidGravy: oh i never closed it, may that have to do with it? i forgot to say i have a loop { } after
16:10 lucs Can I make something like this work?:  "Foo::Bar".new
16:10 lucs That is, instantiate a class given its name in a string.
16:10 RabidGravy lucs, :("Foo::Bar").new
16:11 RabidGravy er ::() rather
16:11 lucs I wish I knew how to find that stuff in the docs :)
16:11 lucs Thanks
16:11 RabidGravy funrep, no.  listen is a Bool
16:12 DrForr The docs are still in flux :)
16:12 lucs That too :)
16:12 funrep RabidGravy: im writing a client
16:13 RabidGravy right
16:13 funrep oh shit
16:13 funrep hah, thanks!
16:14 funrep okey, now i get this error "Socket is already bound or connected"
16:15 RabidGravy yeah, you just need to close it
16:15 RabidGravy but see http://doc.perl6.org/type/IO::Socket::INET
16:15 RabidGravy you don't use listen for a client
16:16 funrep yes doing that now
16:17 funrep but how can i close a connection from a closed program? xd
16:18 pochi you have to wait till the kernel releases the socket I think
16:18 funrep okey
16:18 Skarsnik interesting I managed to have a sigseg on the compile x)
16:18 AlexDaniel Skarsnik: out of curiosity, which character did you pick and what is it for?
16:18 pochi or maybe you can turn on SO_REUSE or something
16:19 RabidGravy It doesn't matter with a client
16:20 Skarsnik I used the string 'type-eq' to compare C Type in gptrixie, to avoid writing stuff like $type ~~ PointerType and $type.ref-type ~~ FundamentalType and $type.ref-type.name eq 'char'; I write $type type-eq <Ptr char>;
16:21 mspo for NativeCode should I just use int32 for uint32_t ?
16:22 RabidGravy uint32
16:23 mspo not mentioned http://doc.perl6.org/language/nativecall ?
16:23 Skarsnik uint32_t does not exist x)
16:24 mspo oh they have an example with it, but it's missing from the little table
16:24 mspo Skarsnik: ?
16:25 Skarsnik nvm I read or instead of for
16:26 Skarsnik damn I get a sigseg that I can't gold
16:26 Skarsnik *golf
16:32 Skarsnik unsigned int type should probably be added in this table yes x)
16:32 sftf joined #perl6
16:35 colomon does Proc.run actually work in current Rakudo?
16:36 colomon my simple experiment hung in OS X and core dumped in Linux
16:37 nine colomon: if it didn't work, loading modules would crash as precompilation is "run"
16:37 autarch colomon: :merge causes a core dump, but it otherwise works, I think
16:37 colomon oh, well I used :merge
16:37 autarch there's a bug filed for that
16:38 colomon indeed, removing :merge fixes everything
16:40 bpmedley joined #perl6
16:40 Skarsnik Ok I am confused. I try to run a perl6 script and it sigsev before doing anything (it was not doing that some time ago and even putting a say in a BEGIN block do nothing); I tried a perl6 -e and use the stuff it included that does not sigsev
16:41 colomon autarch++
16:41 domidumont joined #perl6
16:42 Skarsnik whelp
16:42 Skarsnik root@testperl6:~/piko/gptrixie# perl6 --stagestats  -I lib/ bin/gptrixie
16:42 Skarsnik Stage start      :   0.000
16:42 Skarsnik Stage parse      : Erreur de segmentation
16:42 colomon oooo, this is officially brilliant for my purposes.  turns out including :out just makes it silly noisy anyway
16:44 domidumont joined #perl6
16:45 nine Skarsnik: I guess your installation is somehow screwed up
16:45 brrt joined #perl6
16:45 Skarsnik perl6 -e run stuff x)
16:47 nine First step of packing for vacation: my better half - evening dress, me - charging all battery powered devices
16:50 Zero_Dogg Can MAIN be made to handle "--key value" in addition to "--key=value" ?
16:50 mcmillhj joined #perl6
16:50 nine Zero_Dogg: it does already
16:50 Zero_Dogg nine: it does? How did I miss that
16:50 nine Zero_Dogg: you just have to give the parameter a non-Bool data type
16:51 nine sub MAIN(Str :$key)
16:52 Zero_Dogg nine: it doesn't here, it outputs the help message
16:53 Zero_Dogg perl6 -e 'sub MAIN(:$key!) { say "key=$key" }' --key test # doesn't work, --key=test works
16:54 RabidGravy nine. absolutely, I'm always left in charge of making sure we have all the chargers and adaptors and Mrs Gravy packs the clothes ;-)
17:00 Skarsnik x)
17:01 nine Zero_Dogg: indeed...it's missing from src/core/Main sub process-cmd-args
17:02 Skarsnik not in spec test? x)
17:03 BenGoldberg joined #perl6
17:04 rurban joined #perl6
17:04 Zero_Dogg nine: need me to file a bug?
17:19 erdic joined #perl6
17:21 ugexe Zero_Dogg: https://rt.perl.org/Public/Bug/Display.html?id=124664
17:23 drrho joined #perl6
17:25 MadcapJake Would you ever have a :: in a sub or method declaration?
17:27 Skarsnik ::?
17:28 espadrine joined #perl6
17:29 Zero_Dogg ugexe: thanks
17:30 ely-se joined #perl6
17:31 MadcapJake Skarsnik: like would you ever have «sub Foo::Bar($baz) { ... }»
17:32 mst MadcapJake: subs are basically lexical so that doesn't make a lot of sense to me
17:32 Skarsnik m: sub Foo::bar() {say "heelo"}; Foo::bar();
17:32 camelia rakudo-moar 770d10: OUTPUT«Could not find symbol '&bar'␤  in block <unit> at /tmp/Q4jcoRCVFS line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Q4jcoRCVFS line 1␤␤»
17:33 MadcapJake ok I just needed to make sure that it could never be the case that a `::` would appear in a sub/method declaration
17:33 Skarsnik m: module Foo {sub Foo::bar() {say "heelo"} }; Foo::bar();
17:33 camelia rakudo-moar 770d10: OUTPUT«Could not find symbol '&bar'␤  in block <unit> at /tmp/N9LRJ_CD9D line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/N9LRJ_CD9D line 1␤␤»
17:33 MadcapJake m: module Foo {sub Foo::bar() {say "heelo"} }; Foo::Foo::bar();
17:33 camelia rakudo-moar 770d10: OUTPUT«Could not find symbol '&bar'␤  in block <unit> at /tmp/gy54DuwdcJ line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/gy54DuwdcJ line 1␤␤»
17:34 Skarsnik m: module Foo {our sub Foo::bar() {say "heelo"} }; Foo::bar();
17:34 camelia rakudo-moar 770d10: OUTPUT«Could not find symbol '&bar'␤  in block <unit> at /tmp/F2clBsui0m line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/F2clBsui0m line 1␤␤»
17:34 rodi joined #perl6
17:36 ugexe m: class Foo { method foo::bar () { say 665; }; }; Foo.new."foo::bar"();
17:36 camelia rakudo-moar 770d10: OUTPUT«665␤»
17:37 MadcapJake ugexe: lol alrighty then!
17:38 MadcapJake ugexe: so is that because any character is acceptable for a name though you'll have to use quotes to access it?
17:38 RabidGravy okay if I have a slurpy positional how do I pass an empty hash as one positional?
17:39 RabidGravy m: sub foo(*@foo) { say @foo }; foo("a","b",{}); # doesn't
17:39 camelia rakudo-moar 770d10: OUTPUT«[a b]␤»
17:39 MadcapJake m: class Foo { method foo«bar () { say 665; }; }; Foo.new."foo«bar"();
17:39 camelia rakudo-moar 770d10: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Dbfup3bjnG␤Missing block␤at /tmp/Dbfup3bjnG:1␤------> 3class Foo { method foo7⏏5«bar () { say 665; }; }; Foo.new."foo«ba␤»
17:40 MadcapJake m: class Foo { method foo*bar () { say 665; }; }; Foo.new."foo*bar"();
17:40 camelia rakudo-moar 770d10: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hmRE4RBMsm␤Missing block␤at /tmp/hmRE4RBMsm:1␤------> 3class Foo { method foo7⏏5*bar () { say 665; }; }; Foo.new."foo*ba␤»
17:40 MadcapJake ok i guess just the `::` get special priviledges :P
17:41 funrep are there tuples in perl6?
17:42 MadcapJake is there even a good reason to use a `::` in a method/sub decl? I don't see how that would be anything other than confusing :P
17:43 MadcapJake funrep: do you mean like an immutable list?
17:44 funrep yeah kinda, maybe tuples are reduntant immutable lists :)
17:45 ugexe not ::, :. so foo:bar and foo:::bar also work
17:46 MadcapJake well containers are mutable, so `my @tuple = 1, 2, 3;` will allow you to mutate.  But `my \tuple = (1, 2, 3) gives you an immutable list
17:46 MadcapJake ugexe: what's the point of being able to do that?
17:47 MadcapJake funrep: http://doc.perl6.org/language/list#Immutability
17:49 ugexe well, whats the point of not?
17:49 MadcapJake because it's confusing, it looks like package syntax but it isn't and you have to use quotes to access it.
17:51 rurban joined #perl6
17:51 MadcapJake you can't even use it on bare names, it has to be nested in a module/class
17:54 ugexe should it not be allowed to be done at all because its confusing for normal use then?
17:56 lucasb IMO, method foo::bar should be a syntax error
17:57 MadcapJake I'm just reading S02 names, and the `::` is a package sigil.  If it's used just as a regular character in a sub/method declaration, that is terribly confusing
17:58 MadcapJake not only would you instantly think, "oh that preceding bit is a package" (which it's not) but you'd then try to access it as such and find a strange error that *doesn't* say "to use this method you need to enclose it in quotes"
17:59 lokien_ joined #perl6
18:00 MadcapJake what actual purpose does it serve? No where in S02 names does it say "in method names you can use `::` and it doesn't have any syntactic meaning"
18:02 mspo sub mysql_affectied_rows( .. ) returns int32 is native(LIB)
18:03 mspo sub mysql_affectied_rows( .. ) returns int32 is native(LIB)
18:03 mspo does LIB mean something?
18:03 Skarsnik Not reall, are you playing with gptrixie? x)
18:07 Skarsnik It's just 'common' to have a constant LIB = ('foo', v1) or other stuff;
18:07 RabidGravy KISS MY HAIRY GIBBON AMQP!
18:09 Skarsnik I don't even know what amqp is, but have fun x)
18:10 MadcapJake I've created an issue for colons in method names: https://github.com/perl6/specs/issues/106
18:12 mspo MadcapJake: there's the Foo::Bar.method() call?
18:15 Skarsnik There is some Core::.keys and weird stuff like that with ::
18:17 MadcapJake mspo: how does that work?
18:18 MadcapJake Skarsnik: ahh ok
18:19 funrep does perl6 have enum? cant find any in perl6intro or docs
18:19 mst Skarsnik: it's the protocol via which one hates things like RabbitMQ
18:20 lucasb funrep: the syntax is 'enum Foo <A B C>'
18:20 funrep awesome, thanks!
18:20 MadcapJake funrep: http://design.perl6.org/S12.html#Enumerations
18:20 funrep oh nice (y)
18:22 dwarring joined #perl6
18:27 RabidGravy right that's Net::AMQP working properly for the first time since September :)
18:33 skids joined #perl6
18:34 leont joined #perl6
18:36 dalek roast: 4b689b3 | RabidGravy++ | S17-supply/grep.t:
18:36 dalek roast: Make the test more explicit
18:36 dalek roast:
18:36 dalek roast: Slight modification to 696d50a932328d9e0e69185c0f900a0b2588f86b
18:36 dalek roast: review: https://github.com/perl6/roast/commit/4b689b3c9c
18:38 Kristien joined #perl6
18:41 orbus joined #perl6
18:41 ugexe m: package foo { our sub bar is export { 1; }; }; sub foo::bar () { 2 }; say &foo::bar(); say ::<&foo::bar>()
18:41 camelia rakudo-moar 770d10: OUTPUT«1␤2␤»
18:43 ugexe i wont claim to know if thats good or bad
18:46 nine it's good
18:46 AlexDaniel m: sub foo::bar() { say ‘hello’ } # how can I call this?
18:46 camelia rakudo-moar 770d10: ( no output )
18:47 [Tux] is there a timeframe for utf8-c8 fixes? (just curious)
18:51 AlexDaniel [Tux]: Hmm… somehow it feels like it depends on how soon you'll do it :)
18:52 [Tux] AlexDaniel, if that was within my reach I might have taken a stab, but I know it is waaaaaaaay beyond what I am capable of
18:52 AlexDaniel [Tux]: common misconception :)
18:52 AlexDaniel [Tux]: I believe in you
18:53 [Tux] even if lizmat says it is beyong her knowledge?
18:53 [Tux] beyond
18:55 nine [Tux]: seems like you could use a little more hubris :)
18:55 [Tux] <gulp />
18:56 AlexDaniel [Tux]: well, the thing about contributing to free software projects is that it's not about being geniuses in all questions but about contributing your time and focus into some small specific issue that you care about. With enough effort anyone could do it
18:57 [Tux] :) I think I score rather well in that area
18:57 * [Tux] goes watch the news
18:58 AlexDaniel :D
18:59 abaugher [Tux], thanks for making that META.info change for Text::CSV. panda still complains, so I think it must have it cached already or something, because I can see you changed it. But I commented out that line in panda, so the install proceeds successfully.
19:00 nine abaugher: takes a while for the ecosystem to pick up changes to META files. Then you still need to do panda update to get the changes from the ecosystem
19:01 abaugher nine, yeah, I figured it was something like that. It says "fetching Text::CSV", but clearly it's not fetching a fresh copy of everything from github.  No big deal.
19:04 abaugher 'panda update' does eliminate it, so I'll have to keep that in mind, that that updates META.info files.  Makes sense, now that I think about it, since those contain info about sources.
19:08 DrForr Wow. Don't invoke Perl6 core rules from inside your role.
19:08 _nadim joined #perl6
19:09 masak no?
19:09 DrForr Practically locks up my VM.
19:12 ugexe m: sub foo::bar () { 2 }; say ::<&foo::bar>() # AlexDaniel
19:12 camelia rakudo-moar 770d10: OUTPUT«2␤»
19:15 AlexDaniel ugexe: in other words colons are also allowed in sub names?
19:15 geekosaur aren't they somewhat special, though? infix:, trait_mod:, etc.
19:16 Zero_Dogg joined #perl6
19:16 Zero_Dogg joined #perl6
19:16 AlexDaniel m: sub foo::bar { 2 }; say ::<&foo::bar>.name
19:16 camelia rakudo-moar 770d10: OUTPUT«foo::bar␤»
19:29 ely-se why is Promise.then not called map?
19:29 ely-se like Supply.map
19:29 moritz because it is only ever executed once
19:30 moritz it's more like if/then or given/when than for/map
19:30 mst ely-se: because that would be a completely inaccurate name?
19:31 ely-se mst: no, it wouldn't
19:31 mst ely-se: map maps a list. a Promise is equivalent to a scalar.
19:32 mst it would be sensible to call .map(then => ...) on a stream of promises, or whatever
19:32 * mst does that quite a lot in perl5, although Future is what ours are called
19:33 hankache joined #perl6
19:34 ely-se I don't see why the name map is only suitable for list-like structures
19:35 ely-se and not any structure-preserving operation (which includes Promise.then), like in Haskell
19:35 moritz ely-se: in Perl, we care about singular vs. plural
19:35 moritz as we do in many human languages, English among them
19:36 moritz also, Perl has the philosophy of using a name only for one operation
19:36 moritz and .map is a synchronous operation
19:36 MadcapJake moritz: that explains why `.chars` and `.elems` aren't just called `.length`.  I've been wondering that!
19:37 ely-se "length" on strings is too ambiguous
19:37 mst MadcapJake: after the number of times I've seen people call .length on the wrong sort of object in other languages and get really confused, I -so- like that decision
19:38 MadcapJake I definitely like that they are different, but it's one of those go-to methods in JS that you get really used to using
19:38 mst not being able to immediately tell whether you're getting number-of-chars-in-string or number-of-elements-in-array is just sadface making
19:41 MadcapJake for sure, but it definitely is a strong JS idiom nonetheless X)
19:42 marmay_ joined #perl6
19:48 MadcapJake Definitely something to add to the JS-to-P6 pod when that exists.
19:48 mst oh, I'm aware. also a strong python idiom. but we're still allowed to do better than them :)
19:48 masak I guess that decision in JS comes from Java originally
19:49 masak though in Java it's .length() for String and .length for Array
19:49 mst also java wasn't an influence on the JS design process really
19:49 MadcapJake masak: lovely xP
19:49 masak because brain damage, apparently
19:49 masak mst: oh, I think it was
19:49 masak mst: all the wrapper types were basically lifted directly from Java
19:49 mst wrapper types?
19:50 masak object types holding methods for native types
19:50 masak Java has int and Integer
19:50 masak JavaScript has native numbers and Number
19:52 MadcapJake JavaScript Origin Story: http://www.computer.org/csdl/mags/co/2012/02/mco2012020007.html
19:52 mst ISTR it was primarily based on scheme and self
19:52 mst except m-expressions
19:53 MadcapJake Smalltalk, C[++], and LISP apparently
19:53 masak Scheme and Self were the "hidden" influences
19:53 masak Java was the explicit influence, syntax-wise and with some of the semantics
19:54 MadcapJake But he was under marketing orders to make it look like Java also
19:54 masak the infix:<+> operator doing both string concat and math -- that decision is from Java. doesn't make as much sense in a loosely typed language, though. :/
19:54 mst aha
19:54 * mst stands corrected
19:54 masak Perl was an influence, too. regular expressions.
19:55 masak Modula/Python was another influence, but I forget what for.
19:55 masak er, Modula/Pascal...
19:55 leont regular expressions weren't in Javascript 1.0
19:56 masak that rings a bell, yes
19:57 MadcapJake «Eich built a simplified object model that combined structs from the C language, patterns from SmallTalk, and the symmetry between data and code offered by LISP. The Hypercard event model inspired the pattern for adding events to the HTML document. Object-oriented patterns were possible but via runtime semantics with prototypes (as in Self) instead of compiler-supported class syntax (as in Java and C++).»
19:57 _nadim joined #perl6
20:03 ugexe my $chain = @promises.reduce: {$^a.then($^b)}
20:19 ely-se joined #perl6
20:25 mspo okay mdb is a little too advanced for a fist try at nativecall ;)
20:25 RabidGravy mdb?
20:25 mspo MDB_env is a struct with like 50 members, most of which are other structs/unions
20:25 mspo sorry- lmdb
20:26 mspo http://symas.com/mdb/
20:26 RabidGravy where's your spirit of adventure ;-)
20:27 mspo RabidGravy: indeed
20:27 bartolin .tell [Coke] looks like you have about 100 processes (some of them a few days old) running on hack. no real problem so far, just got some notifications (we're monitoring the number of procs on hack)
20:27 yoleaux bartolin: I'll pass your message to [Coke].
20:34 musiKk joined #perl6
20:34 avs__ joined #perl6
20:34 kid51 joined #perl6
20:35 Skarsnik mspo, gptrixie does not manage to get them?
20:36 mspo Skarsnik: didn't try it
20:36 dalek specs/meta-v1: 73ff494 | (Anthony Parsons)++ | S22-package-format.pod:
20:36 dalek specs/meta-v1: META doesn't need an entire glossary to itself
20:36 dalek specs/meta-v1:
20:36 dalek specs/meta-v1: There's a document-level one right above it. Merged the two.
20:36 dalek specs/meta-v1: review: https://github.com/perl6/specs/commit/73ff494a2b
20:37 mspo Skarsnik: let's try
20:38 mspo Skarsnik: I saw you talking about it yesterday but thought you were talking to someone else :)
20:44 mspo wow panda actually installed something
20:44 musiKk hello! i have a small question: what does "Int(Cool)" mean in a signature? why would the extra "(Cool)" be necessary?
20:46 RabidGravy it constrains the coercion to those types that inherit from Cool
20:46 RabidGravy so:
20:47 RabidGravy m: class F { method Int() { 1; }};  sub foo(Int(Cool) $a) { say $a };  foo(F.new);
20:47 camelia rakudo-moar 770d10: OUTPUT«Type check failed in binding $a; expected Cool but got F␤  in sub foo at /tmp/Ebn4d1XhUu line 1␤  in block <unit> at /tmp/Ebn4d1XhUu line 1␤␤»
20:48 RabidGravy m: class F { method Int() { 1; }};  sub foo(Int() $a) { say $a };  foo(F.new); #without the cool
20:48 camelia rakudo-moar 770d10: OUTPUT«1␤»
20:49 RabidGravy or alternatively
20:49 b2gills 「sub example ( Int(Cool) $a ) {...}」 can be thought of as being short for two subs 「multi example ( Int $a ) {...}; multi example ( Cool $a ) { samewith $a.Int }」
20:49 RabidGravy m: class F is Cool { method Int() { 1; }};  sub foo(Int(Cool) $a) { say $a };  foo(F.new);
20:49 camelia rakudo-moar 770d10: OUTPUT«1␤»
20:50 RabidGravy b2gills++ nice explaining ;-)
20:50 mohae joined #perl6
20:50 musiKk very helpful, thanks. now i try to under stand why.
20:51 musiKk for example IO::Socket's read() method does this. why would it care that the number of bytes given is Cool? isn't Int enough?
20:51 ugexe can Int contain Inf?
20:51 RabidGravy well it could be a string
20:51 leat joined #perl6
20:51 RabidGravy m: say "10".Int
20:51 camelia rakudo-moar 770d10: OUTPUT«10␤»
20:52 RabidGravy Cool guarantees an Int method that can be called for the coercion, it may blow up if the conversion isn't possible but it will always be there
20:53 AlexDaniel ugexe: not yet
20:53 AlexDaniel ugexe: and possibly it will never be so
20:53 RabidGravy Cool basically defines an interface that all the builtin  simple types share
20:53 ugexe yes, it was rhetorical
20:56 musiKk RabidGravy: so i only need to require it in a signature if i intend to call one of the many methods or subs defined by Cool?
20:58 musiKk don't know if that questions makes sense. i'm well versed in perl5 but super new to perl6. :)
20:58 RabidGravy yeah basically,   a  (Foo() $a) in a signature is a coercion, if the argument isn't already a Foo then it will try to call the Foo method on it, so specifying Int(Cool) there guaranteed there will be a an Int method on an object that inherits from Cool
20:58 RabidGravy so e.g
20:58 revhippie joined #perl6
20:59 RabidGravy m: class Foo {};  sub bar(Foo() $a) { say "foo" };  foo("bar");
20:59 camelia rakudo-moar 770d10: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qHkGOa6LSr␤Undeclared routine:␤    foo used at line 1␤␤»
20:59 RabidGravy m: class Foo {};  sub bar(Foo() $a) { say "foo" };  bar("bar");
20:59 camelia rakudo-moar 770d10: OUTPUT«Method 'Foo' not found for invocant of class 'Str'␤  in sub bar at /tmp/3uWF3C9a0R line 1␤  in block <unit> at /tmp/3uWF3C9a0R line 1␤␤»
21:01 RabidGravy specifying a constraint for the coercion prevents that sort of thing happening (though it may die for other reasons)
21:01 bpmedley joined #perl6
21:01 musiKk oh, i just noticed i did not know that "Foo()" is a coercion in the first place. i always thought it has something to do with lists.
21:01 RabidGravy ah
21:01 flussence signatures are a weird sub-language
21:02 raiph joined #perl6
21:04 musiKk i still don't get it completely but you sure helped a lot.
21:04 musiKk unfortunately i can't try stuff out right now b/c i did something and now rakudo does nothing but core dump due to "illegal instruction". lol
21:05 RabidGravy oops
21:05 masak oh, right. forgot about the Hypercard influence for the event model. MadcapJake++
21:05 musiKk psa: don't do "sub rec() { rec() } rec()" :(
21:06 lucs Else you will curse! And recurse!
21:06 musiKk it's super cool that rakudo has tail recursion but somehow this filled all my swap in two seconds and now the core dump thing does not go away.
21:07 masak musiKk: did you meant tail recursion *optimization*? and are you sure Rakudo has it?
21:07 marmay_ Is there a way to provide a named parameter to a sub just in case it accepts it? I try to pass a parameter $request to a sub that does not take any parameters and I get an error: "Unexpected named parameter 'request' passed   in sub"
21:08 RabidGravy yes
21:08 avs_ joined #perl6
21:08 RabidGravy or for methods that just works
21:08 sjn \o
21:09 * sjn wonders if there's a JSON formatted list of a the modules at modules.perl6.org somewhere
21:09 RabidGravy m: class F { method bar() { say %_ } }; Foo.new.bar(bumble => "goat");
21:09 camelia rakudo-moar 770d10: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iQSY6oyf5a␤Undeclared name:␤    Foo used at line 1␤␤»
21:09 RabidGravy m: class F { method bar() { say %_ } }; F.new.bar(bumble => "goat");
21:09 camelia rakudo-moar 770d10: OUTPUT«bumble => goat␤»
21:10 musiKk masak: now that you ask, i'm not positive anymore due to the problems i mentioned. i'll reboot and see if that fixes something. otherwise it's back to compiling rakudo.
21:10 RabidGravy sjn, yes, the project.json is at http://ecosystem-api.p6c.org/projects.json
21:11 jcallen joined #perl6
21:12 nine Rakudo doesn't have tail recursion optimization.
21:15 marmay_ RabidGravy: Ah, that's interesting. But is there a way to make subs behave more like methods in this case?
21:16 flussence m: sub foo(*%) { 'bar' }; say foo(:whatever(999))
21:16 camelia rakudo-moar 770d10: OUTPUT«bar␤»
21:16 sortiz joined #perl6
21:17 ely-se can I do exec without fork?
21:18 RabidGravy marmay_, but for subroutines it doesn't have a defaiult '*%_' in the signature so you would have to specify it explicitly
21:18 RabidGravy where '*%_' means any other named parameters that haven't been specified
21:18 [dpk] joined #perl6
21:19 RabidGravy you can't make someone else's sub behave like it though
21:19 jcallen joined #perl6
21:19 musiKk joined #perl6
21:19 flussence ely-se: that's called &runinstead in perl 6
21:19 marmay_ Ok, thank you.
21:20 flussence (or at least, it was in the specs. doesn't look implemented)
21:20 ely-se flussence: aha! obscure :)
21:21 musiKk masak: it seems rakudo does not limit the stack or something. i cannot provoke a stack overflow.
21:21 ely-se runinstead is not implemented in rakudo though
21:24 geraud joined #perl6
21:25 lsm-desktop joined #perl6
21:25 linuxuser9000 joined #perl6
21:26 masak 'night, #perl6
21:28 sjohnson` joined #perl6
21:28 bowtie joined #perl6
21:30 ely-se goodbye masak
21:33 rurban joined #perl6
21:47 btyler left #perl6
21:48 Sgeo joined #perl6
21:48 ely-se m: for (1, 2) Z ('a', 'b') -> $n, $a {  }
21:48 camelia rakudo-moar 770d10: ( no output )
21:48 ely-se hmm
21:48 ely-se m: for (1, 2) Z ('a', 'b') -> $n, $a { say "$n $a" }
21:48 camelia rakudo-moar 770d10: OUTPUT«1 a 2 b␤»
21:49 RabidGravy joined #perl6
21:50 RabidGravy ah there you all are
21:50 ely-se on my machine it says too few positionals are passed
21:50 geekosaur [17 21:29] * RabidGravy has quit (*.net *.split)
21:51 geekosaur fwiw
21:51 moritz ely-se: -> ($n, $a) fixes it
21:51 RabidGravy yeah I saw but I was left with a version of the channel with 14 people
21:51 moritz m: for (1, 2) Z ('a', 'b') -> ($n, $a) { say "$n $a" }
21:51 camelia rakudo-moar 770d10: OUTPUT«1 a␤2 b␤»
21:51 ely-se moritz: why does it work for this example though?
21:51 moritz ely-se: which one?
21:51 ely-se m: for (1, 2) Z ('a', 'b') -> $n, $a { say "$n $a" }
21:51 camelia rakudo-moar 770d10: OUTPUT«1 a 2 b␤»
21:52 ely-se hey there is only one newline
21:53 geekosaur yeh, that happens when the server is still up but its connection with the collective is lost. sometimes called "split brain"
21:53 RabidGravy yeah if you change it you'll see what is happening
21:53 RabidGravy m: for (1, 2) Z ("a", "b") -> $n, $a { say "$n -> $a" }'
21:53 camelia rakudo-moar 770d10: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1jwlCUoIDn␤Strange text after block (missing semicolon or comma?)␤at /tmp/1jwlCUoIDn:1␤------> 3 ("a", "b") -> $n, $a { say "$n -> $a" }7⏏5'␤»
21:53 RabidGravy m: for (1, 2) Z ("a", "b") -> $n, $a { say "$n -> $a" }
21:53 camelia rakudo-moar 770d10: OUTPUT«1 a -> 2 b␤»
21:54 moritz ely-se: it produces two elements which are sublists
21:54 moritz ely-se: so it only "works"
21:54 ely-se ooh
21:54 ely-se I see
21:54 RabidGravy or you can do it one the other side with:
21:54 RabidGravy m: for ((1, 2) Z ("a", "b")).flat -> $n, $a { say "$n -> $a" }
21:54 camelia rakudo-moar 770d10: OUTPUT«1 -> a␤2 -> b␤»
21:55 TEttinger joined #perl6
21:55 lokien_ joined #perl6
22:05 apejens joined #perl6
22:05 ranguard joined #perl6
22:05 jast joined #perl6
22:05 jantore joined #perl6
22:05 gfldex joined #perl6
22:06 raydiak joined #perl6
22:06 sm0x joined #perl6
22:06 uruwi joined #perl6
22:06 cbk__ joined #perl6
22:06 balazs joined #perl6
22:06 jervo joined #perl6
22:06 musca joined #perl6
22:08 llfourn_ joined #perl6
22:10 avar joined #perl6
22:10 literal joined #perl6
22:10 avar joined #perl6
22:10 wtw joined #perl6
22:10 crux joined #perl6
22:17 AndyDee joined #perl6
22:20 mephinet joined #perl6
22:27 yurivish_ joined #perl6
22:28 dpk joined #perl6
22:28 nebuchadnezzar joined #perl6
22:28 matt_ joined #perl6
22:28 eiro joined #perl6
22:28 yurivish_ hi everyone! quick question – is http://docs.parrot.org/parrot/latest/html/docs/pdds/pdd28_strings.pod.html an accurate description of how rakudo's current string implementation works, or is Parrot's approach different?
22:29 yurivish_ I'm interested specifically in the way unicode is handled. The Julia programming language is currently working out an improved approach towards string and character handling, and I pointed them towards Perl 6's approach to use as possible inspiration: https://github.com/JuliaLang/julia/pull/14383
22:31 flussence that sounds vaguely like how MoarVM implements it, yes
22:33 geekosaur I think that support was contributed to them back when rakudo-parrot development was active?
22:33 yurivish_ joined #perl6
22:33 geekosaur I vaguely recall some of it got rethought afterward though
22:33 geekosaur whoops
22:33 geekosaur helps to reply when they're in the channel >.>
22:33 yurivish_ (sorry, disconnected. caught up on the irc logs :)
22:34 diakopter pdd28 was always aspirational
22:35 diakopter yurivish_: your link to jnthn's talk is much more appropriate; good job
22:35 yurivish_ :)
22:35 diakopter simonbyrne's link should be removed
22:36 diakopter the one to the parrot doc
22:36 AlexDaniel m: sub infix:<\> { $^b / $^a }; say 5 \ 35
22:36 camelia rakudo-moar 770d10: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jDjUMJEep5␤Unable to parse expression in quote words; couldn't find final '>'␤        ␤at /tmp/jDjUMJEep5:1␤------> 3sub infix:<\> { $^b / $^a }; say 5 \ 357⏏5<EOL>␤    expecting any of:␤     …»
22:36 AlexDaniel m: sub infix:<\\> { $^b / $^a }; say 5 \\ 35
22:36 camelia rakudo-moar 770d10: OUTPUT«7␤»
22:36 yurivish_ diakopter: I can leave a comment to that effect, or you might be able to provide a bit more clarity than I can on the current situation
22:37 diakopter I commented
22:48 llfourn joined #perl6
22:49 nowan_ joined #perl6
22:52 cognominal joined #perl6
22:52 Cabanossi joined #perl6
22:53 leont joined #perl6
22:53 tadzik joined #perl6
22:53 RabidGravy joined #perl6
22:53 grassass joined #perl6
22:54 PotatoGim joined #perl6
22:57 brabo joined #perl6
22:58 balazs joined #perl6
22:58 Praise joined #perl6
22:58 mspo joined #perl6
22:58 pnu joined #perl6
22:58 Spot__ joined #perl6
22:58 FatalNIX joined #perl6
22:58 funrep joined #perl6
22:58 Humbedooh joined #perl6
22:58 krunen joined #perl6
22:58 flussence joined #perl6
22:58 AW3i joined #perl6
22:58 avenj joined #perl6
22:58 solarbunny joined #perl6
22:59 felher joined #perl6
22:59 FatalNIX joined #perl6
23:00 pRiVi joined #perl6
23:00 stux|RC-only joined #perl6
23:02 bakedb joined #perl6
23:23 yurivish_ joined #perl6
23:32 vendethiel joined #perl6
23:33 azawawi joined #perl6
23:33 azawawi hi
23:34 Skarsnik Hello
23:35 azawawi just woke up :)
23:36 Skarsnik work on my pg array!
23:38 telex joined #perl6
23:38 azawawi :)
23:38 * azawawi is reading http://doc.perl6.org/language/modules#EXPORT
23:40 Sgeo joined #perl6
23:48 bowtie joined #perl6
23:48 kid51 joined #perl6
23:49 azawawi so what's the advantage of versioning a module if panda/zef is not going to install the newer version?
23:50 Skarsnik it's look corporate?
23:50 Skarsnik ni idea
23:51 azawawi :)
23:52 orbus maybe it eventually will
23:53 orbus or panda will be replaced with something that does handle versions - cpan6 or whatever
23:54 orbus not sure what the plan is, but I assume versioning will be useful at some point
23:54 azawawi oh well, time will only tell :)
23:55 * orbus is working on a module right now
23:55 orbus suppose I'd better version it
23:57 orbus actually
23:57 orbus here's a question
23:57 Skarsnik I think the plan is to wait for a tool that handle version for you, aka fix a github release and upload on cpan x)
23:57 orbus yeah, I'm assuming there will be either cpan integration or cpan6 at some point
23:58 orbus so here's a question
23:58 orbus I'm writing a class
23:58 orbus that inherits from another class
23:58 orbus the parent class has a method foo
23:58 orbus and I'm adding a method in my class called bar
23:59 orbus which I want to do some stuff and then call back to foo in the parent class
23:59 orbus in java I guess that would just be like super.foo
23:59 orbus so far the only way I see to do it in perl6 is with WALK
23:59 orbus which works but is a bit cumbersome
23:59 orbus wondering if there's any easier way

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

Perl 6 | Reference Documentation | Rakudo