Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-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:00 TimToady I'm just not sure the feature is worth including on unique
00:00 TimToady it would have to come with a big note in the docs that says "DOES NOT SCALE"
00:02 TimToady and something that different should probably be spelled different, .unique-with or so
00:02 _edwin regarding squish: I might file a ticket tomorrow about the order of the arguments to &with, if i don't find any vetoes in the backlog :)
00:04 _edwin yes, a different name somehow feels right for a very different algorithm
00:04 * _edwin off to bed
00:04 TimToady well, with is supposed to be an == kind of op
00:04 TimToady so using it with <= is just wrong
00:06 _edwin hm, but squishing can be useful with non-symmetric predicates, I think
00:08 TimToady but the with is what you remove, not what you keep, so I dunno
00:08 RabidGravy Euclid/Björlud/Toussaint in p6 https://gist.github.com/jonat​hanstowe/ff0885b0841b39aeebed now to write the MIDI thing to make it useful to me
00:09 TimToady but if it makes more sense the other order, I guess
00:10 TimToady I think I'm fine with reversing 'em
00:11 TimToady "with" is just a terrible preposition to use in any case
00:13 TimToady "when" or "if" or "exclude" would make more sense
00:40 BenGoldberg joined #perl6
00:41 timotimo the documentation of Scheduler says cue 1) takes the code a sa named, which it doesn't; 2) doesn't have a &stop parameter
00:43 tinyblak joined #perl6
00:44 timotimo but Scheduler is a role that doesn't even restrict the parameter list
00:45 eli-se m: say 'x' x -1
00:45 camelia rakudo-moar 79bf15: OUTPUT«␤»
00:46 TimToady .oO(negative strings?)
00:47 timotimo i don't really understand why Scheduler.cue wouldn't allow times and every :\
00:48 tinyblak_ joined #perl6
00:50 eli-se m: say ('x' x -1) == 'x'i # <== should be this, TimToady
00:50 camelia rakudo-moar 79bf15: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏x' (indicated by ⏏)␤  in method Numeric at src/gen/m-CORE.setting:15837␤  in sub infix:<*> at src/gen/m-CORE.setting:5283␤  in sub postfix:<i> at src/gen/m-C…»
00:51 BenGoldberg m: say sqrt(-1)
00:51 camelia rakudo-moar 79bf15: OUTPUT«NaN␤»
00:51 BenGoldberg m: say sqrt(-1 + 0i)
00:51 camelia rakudo-moar 79bf15: OUTPUT«6.12323399573677e-17+1i␤»
00:53 timotimo .tell tony-o i have a problem with HTTP::Server::Async; if i set buffered to true, EventSource won't work because writing to the response will not give the browser any data
00:53 yoleaux timotimo: I'll pass your message to tony-o.
00:53 eli-se sleeptime, bye!
00:54 timotimo .tell tony-o but if i set it to false, waiting for a request's promise to signal that all the data has arrived takes a long time in which the server just waits ... maybe it doesn't handle content-length properly?
00:54 yoleaux timotimo: I'll pass your message to tony-o.
00:56 timotimo .tell tony-o i think i've switched the two around, though. but you know ...
00:56 yoleaux timotimo: I'll pass your message to tony-o.
00:58 timotimo .tell tony-o i don't expect making $.buffered rw on the response would be absolutely terrible. it was my first instinct to do that, but that caused an exception that didn't get printed due to SCHEDULER problems OSLT
00:58 yoleaux timotimo: I'll pass your message to tony-o.
01:05 jack_rabbit joined #perl6
01:07 |Tux| joined #perl6
01:09 timotimo well, i'm glad i'm trying to do stuff with this module
01:09 timotimo before someone else runs into problems :P
01:10 timotimo oh, great, now it crashes again ...
01:24 aborazmeh joined #perl6
01:24 aborazmeh joined #perl6
01:33 timotimo well, now it doesn't any more, but i can't tell how i fixed it, or if i fixed it at all ...
01:37 timotimo with just a usleep(50) in idle_handler we get drastically reduced cpu usage from idling
01:39 timotimo even though that's only 0.05ms, it makes a drastic difference
01:41 timotimo as in: you can't even see moar appear in htop any more :P
01:41 timotimo (that's not true)
01:45 timotimo also, the laptop no longer constantly runs its fan when i have the server run in the background
01:50 larion joined #perl6
01:52 timotimo .tell tony-o i'm wishing for something that'd let me know if the connection that belongs to a Response object gets terminated by the client
01:52 yoleaux ...
01:52 timotimo what's wrong, yoleaux?
01:52 raiph joined #perl6
01:56 laouji joined #perl6
02:02 flussence an idle handler that doesn't idle is kinda a problem...
02:03 sirdancealot joined #perl6
02:11 skids joined #perl6
02:21 noganex_ joined #perl6
02:23 bjz joined #perl6
02:28 dalek rakudo/nom: e6467a1 | TimToady++ | src/Perl6/Grammar.nqp:
02:28 dalek rakudo/nom: be more awesome on gobbled !!
02:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e6467a1130
02:47 laouji joined #perl6
02:50 larion joined #perl6
02:57 laouji joined #perl6
03:02 lustlife joined #perl6
03:04 aborazmeh joined #perl6
03:04 aborazmeh joined #perl6
03:06 lustlife rakudo: say "hello all."
03:06 camelia rakudo-moar e6467a: OUTPUT«hello all.␤»
03:17 laouji joined #perl6
03:25 laouji joined #perl6
03:32 adu joined #perl6
03:49 larion joined #perl6
03:55 labster joined #perl6
04:03 FROGGS_ joined #perl6
04:10 laouji joined #perl6
04:15 laouji joined #perl6
04:18 Sqirrel joined #perl6
04:26 kaare_ joined #perl6
04:32 vendethiel joined #perl6
04:44 Akagi201_ joined #perl6
04:58 ShimmerFairy joined #perl6
05:21 TimToady m: say 42 ?? print !! 43
05:21 camelia rakudo-moar e6467a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/10tt3a7iqN␤Your !! was gobbled by the expression in the middle; please use parens␤at /tmp/10tt3a7iqN:1␤------> 3say 42 ?? print !!7⏏5 43␤    expecting any of:␤        infix␤        infix stopp…»
05:40 telex joined #perl6
05:52 vendethiel joined #perl6
06:09 test joined #perl6
06:22 lustlife joined #perl6
06:24 lustlife` joined #perl6
06:44 vendethiel joined #perl6
06:49 laouji joined #perl6
06:50 larion joined #perl6
06:54 xfix joined #perl6
07:01 moritz perl6-all-modules is now at hash ff000fe
07:01 * moritz likes it
07:03 xprime joined #perl6
07:05 dalek rakudo/nom: 91958cf | TimToady++ | src/core/ (2 files):
07:05 dalek rakudo/nom: mustn't use assignment precedence inside ??!!
07:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/91958cfd1b
07:05 dalek rakudo/nom: 225a7e3 | TimToady++ | src/Perl6/Grammar.nqp:
07:05 dalek rakudo/nom: better messages on loose precedence inside ??!!
07:05 dalek rakudo/nom:
07:05 dalek rakudo/nom: (And fix off-by-one limit error; we don't allow assignment
07:05 darutoko joined #perl6
07:05 dalek rakudo/nom: in there either, since it's looser than ternary.)
07:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/225a7e3939
07:05 dalek rakudo/nom: c86f754 | TimToady++ | src/Perl6/Grammar.nqp:
07:05 dalek rakudo/nom: s/low/loose/
07:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c86f754608
07:05 dalek roast: e455d0e | TimToady++ | S03-operators/precedence.t:
07:05 dalek roast: test that assignops fail inside ??!!
07:05 dalek roast: review: https://github.com/perl6/roast/commit/e455d0e9b1
07:08 rindolf joined #perl6
07:16 moritz is github still/again slow?
07:18 vendethiel joined #perl6
07:22 TimToady m: say 42 ?? $_ = 'a' !! 43
07:22 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7FWWeNLd5o␤Precedence of = is too loose to use inside ?? !!; please parenthesize␤at /tmp/7FWWeNLd5o:1␤------> 3say 42 ?? $_ =7⏏5 'a' !! 43␤»
07:23 TimToady m: say 42 ?? print !! 43
07:23 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xwUOrNcXLJ␤Your !! was gobbled by the expression in the middle; please parenthesize␤at /tmp/xwUOrNcXLJ:1␤------> 3say 42 ?? print !!7⏏5 43␤    expecting any of:␤        infix␤        infix sto…»
07:25 dalek doc: e84e26a | moritz++ | META.info:
07:25 dalek doc: Add "provides" section to META.info"
07:25 dalek doc: review: https://github.com/perl6/doc/commit/e84e26aed4
07:26 TimToady there may be ecosystem fallout from disallowing assignops inside of ??!!
07:27 TimToady (they were supposed to be disallowed before, but there was an off-by-one precedence level error)
07:29 bartolin_ m: sub foo { 2 }; say 1 ?? foo !! 3 # RT 123115
07:29 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oSNBufOnW4␤Your !! was gobbled by the expression in the middle; please parenthesize␤at /tmp/oSNBufOnW4:1␤------> 3sub foo { 2 }; say 1 ?? foo !!7⏏5 3 # RT 123115␤    expecting any of:␤        in…»
07:30 bartolin_ nice, TimToady++
07:30 moritz TimToady: well, I guess that's small in comparison to the eleven branch merge fallout
07:35 laouji joined #perl6
07:56 dalek json: f889af3 | moritz++ | META.info:
07:56 dalek json: Add provides section
07:56 dalek json: review: https://github.com/moritz/json/commit/f889af3c6e
07:57 moritz FROGGS_: how can panda possibly work, when it needs JSON::Tiny, and JSON::Tiny didn't have a "provides" section in META.info?
08:04 Perl6_newbee joined #perl6
08:16 vendethiel joined #perl6
08:18 _edwin joined #perl6
08:21 azawawi joined #perl6
08:21 azawawi hi
08:21 yoleaux 25 Mar 2015 19:54Z <raydiak> azawawi: the url is https://github.com/raydiak/Git-PurePerl though it's far from working yet :)
08:21 RabidGravy joined #perl6
08:24 azawawi can someone please add https://github.com/azawawi/perl6-browser-open to the perl6 module ecoystem?
08:26 egrep joined #perl6
08:39 zby_home joined #perl6
08:41 dalek roast: 4ff2d87 | (Edwin Steiner)++ | S32-list/squish.t:
08:41 dalek roast: Add a couple of more realistic examples for the RT #124205 bug in squish.
08:41 dalek roast: review: https://github.com/perl6/roast/commit/4ff2d87fbc
08:41 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124205
08:51 laouji joined #perl6
08:51 RabidGravy joined #perl6
09:11 rindolf joined #perl6
09:15 vendethiel joined #perl6
09:29 vendethiel TimToady++ #better !! error message
09:31 FROGGS_ moritz: because of https://github.com/tadzik/panda/blob​/master/projects.json.bootstrap#L27
09:34 azawawi FROGGS_: any chance you could please add https://github.com/azawawi/perl6-browser-open to the perl6 module ecoystem?
09:34 azawawi FROGGS_: also is there a File::Which module or implementation in Perl 6?
09:39 dalek ecosystem: 1d7cafe | FROGGS++ | META.list:
09:39 dalek ecosystem: added azawawi/perl6-browser-open
09:39 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/1d7cafef08
09:40 FROGGS_ azawawi: done, and I've invited you to perl6... you've got now push access
09:42 FROGGS_ azawawi: and there does not seem to be a File::Which yet
09:48 Rounin joined #perl6
09:51 larion joined #perl6
09:55 Sqirrel joined #perl6
09:56 RabidGravy joined #perl6
09:59 Sqirrel joined #perl6
10:07 Sqirrel joined #perl6
10:23 coffee` joined #perl6
10:28 JimmyZ joined #perl6
10:30 JimmyZ joined #perl6
10:31 azawawi FROGGS_: thx
10:31 azawawi FROGGS++
10:42 RabidGravy joined #perl6
10:44 eli-se joined #perl6
10:50 jnthn .tell FROGGS_ MoarVM HEAD gives a bit more info in the "On object at index..." errors, which may help track down what's going on.
10:50 yoleaux jnthn: I'll pass your message to FROGGS_.
10:51 jnthn .tell FROGGS_ I also see the "it works on second attempt"; you can cheaply re-produce by nuking the install dir and "make install" in all of moar/nqp/rakudo build dirs, at least.
10:51 yoleaux jnthn: I'll pass your message to FROGGS_.
10:52 FROGGS_ ahh
10:52 yoleaux 10:50Z <jnthn> FROGGS_: MoarVM HEAD gives a bit more info in the "On object at index..." errors, which may help track down what's going on.
10:52 yoleaux 10:51Z <jnthn> FROGGS_: I also see the "it works on second attempt"; you can cheaply re-produce by nuking the install dir and "make install" in all of moar/nqp/rakudo build dirs, at least.
10:52 jnthn oh, you're here :)
10:52 jnthn I don't have much idea exactly what's going on.
10:52 jnthn Just figured this may help with hunting it :)
10:54 FROGGS_ thank you :o)
10:54 FROGGS moritz: panda now has a gen-meta target
10:55 jnthn FROGGS: Another oddity: when I run "panda" after the install it explodes, but "panda-m" works...
10:55 FROGGS jnthn: delete your panda.bat that was previously shipped with panda
10:56 jnthn ah, ok
10:56 FROGGS and then rebootstrap panda to get better batch files
10:56 FROGGS these are generated by CUR::Installation
10:56 jnthn Aww, Term::ANSIColor has no provides section
10:56 FROGGS I can PR it
10:56 jnthn ok, thanks
10:59 FROGGS jnthn: done
10:59 FROGGS and will do for many others...
10:59 jnthn Is http://cpandatesters.perl6.org/ no longer The Right Domain?
10:59 FROGGS tadzik: please merge https://github.com/tadzik/p​erl6-Term-ANSIColor/pull/3
10:59 FROGGS testers.perl6.org
11:00 jnthn oh, just...right ;)
11:00 jnthn I realized I can use this to get a list of my modules so I can see what I need to add a provides to :)
11:00 jnthn Aww, I can't :)
11:00 tadzik FROGGS: thank you!
11:01 jnthn Apparently nobody installs and tests my modules :P
11:01 FROGGS tadzik: if you have more modules without a provides section, just run `panda gen-meta --ver=foo` and copy the provides section from the META.info.generated to your own
11:02 FROGGS jnthn: same for you^^
11:02 lichtkind joined #perl6
11:02 FROGGS tadzik: lol, moritz++ already PR'd it :/
11:02 jnthn FROGGS: Oh, I do that in the module's directory?
11:02 FROGGS jnthn: aye
11:04 jnthn Odd, my panda doesn't see to know what gen-meta is...
11:04 jnthn oh
11:04 FROGGS jnthn: I added it just minutes ago
11:04 jnthn Right :)
11:05 tadzik FROGGS: PR'd what?
11:05 tadzik oh, ANSIColor?
11:05 tadzik I already merged yours
11:05 FROGGS yeah
11:06 FROGGS I did not check for open PRs before opening mine
11:07 tadzik ah, so moritz was faster, but your direct marketing made up for that :P
11:07 FROGGS :o)
11:08 tadzik 35 open bugs /o\
11:08 FROGGS btw, our getopt implementation does not seem to understand --foo="bar baz", when :$foo is a Str
11:08 jnthn FROGGS: After nuking my panda.bat and rebootstrap with latest, I get "Cannot call postcircumfix:<{ }>(Mu, "bin/panda"); none of these signatures match:"
11:09 jnthn FROGGS: Again panda-m works
11:09 FROGGS hmmm
11:09 FROGGS weird...
11:09 FROGGS I'll try to reproduce in a bit
11:09 jnthn huh...
11:10 tadzik hm, there's a bug and PR to remove parrot support from rakudobrew
11:10 jnthn I just did "panda update" then "panda install Term::ANSIColor" and it claims it still doesn't have a provides section...
11:10 tadzik I wonder if it'd be better to have rakudobrew warn loudly and install the last rakudo-parrot that worked
11:10 tadzik last time I checked there were still users of parrot (by choice)
11:11 FROGGS jnthn: I guess ecosystem-api.p6c.org is not updated yet
11:11 jnthn FROGGS: ah, ok
11:11 FROGGS jnthn: do `panda install .` for now
11:11 tadzik ,seen bbkr
11:11 tadzik .seen bbkr
11:11 yoleaux I saw bbkr 22 Mar 2015 15:13Z in #perl6: <bbkr> r: use Test; sub foo { my @a; return |@a;}; is foo, Nil
11:11 FROGGS in the Term::ANSIColor directory
11:11 jnthn Well, I don't have one :)
11:11 jnthn I was actually going to update one of my modules that depends on it :)
11:11 tadzik .tell bbkr hey, you guys still using Rakudo-Parrot in your business?
11:11 yoleaux tadzik: I'll pass your message to bbkr.
11:14 jnthn FROGGS: Um, iiuc this may be unfortunate...
11:14 jnthn panda-m --ver=v1 gen-meta
11:14 jnthn It seems the launcher steals the --ver
11:14 jnthn oh of course
11:14 FROGGS and when you put it at the end?
11:15 jnthn I have to put it after...right ;)
11:15 FROGGS yeah...
11:15 jnthn I'm so use to Perl 6 screwing up subcommand style...
11:15 tinyblak joined #perl6
11:15 FROGGS but, I can explain in more detail why the wrappers have to swallow certain things
11:15 FROGGS but not atm
11:15 jnthn FROGGS: Hmm, about the proposed META.info
11:15 jnthn It looks like this:
11:15 jnthn "depends" : [
11:15 jnthn "JSON::Tiny::Actions",
11:15 jnthn "JSON::Tiny::Grammar",
11:15 jnthn "JSON::Tiny"
11:15 jnthn ],
11:16 jnthn And similar in build-depends and test-depends
11:16 FROGGS yes
11:16 jnthn But will that actually work out OK?
11:16 FROGGS since that is 'depends', yes
11:16 jnthn build-depends and test-depends has the same
11:16 FROGGS that's used to tell panda what other dists need to be fetched and installed before this one
11:17 _edwin joined #perl6
11:17 FROGGS we can possibly strip these from test-depends
11:17 jnthn OK, but JSON::Tiny::Grammar isn't a dist?
11:17 jnthn JSON::Tiny is...
11:18 * jnthn is trying to re-build his mental model of the world :)
11:18 FROGGS depends is about namespaces, and that is why you provide what namespaces your dist provides
11:18 jnthn ah
11:18 FROGGS like a use statement is 'please give me any dist that provides this namespace'
11:19 FROGGS err, s/dist/cu of dist/
11:19 jnthn *nod*
11:19 jnthn Yeah, I was just surprised to see it picking up transitive things
11:19 jnthn Like, I don't have a "use JSON::Tiny::Grammar" anywhere in my code
11:19 FROGGS and that is also the reason that some modules have a lib/Utils.pm but do not provides 'Utils', but other namespaces that are in this file
11:19 jnthn Similarly it currently picks up a dependency on "nqp"
11:20 jnthn Because Test.pm has a "use nqp;"
11:20 FROGGS so this file appears several times under provides
11:20 FROGGS ahh, it was meant to strip indirect deps :/
11:20 jnthn oh.
11:21 jnthn OK, my entire confusion is that I'm seeing all the indirect deps in my META.info :)
11:21 jnthn So I'm correct to be surprised? :)
11:21 FROGGS yes
11:22 _edwin hi all! S32 specifies min/max for List, rakudo implements them for Any. should they be documented under List or under Any in perl6/doc?
11:22 abraxxa joined #perl6
11:22 FROGGS I guess a user wants to see them as directly defined in Any, but as inherited in List
11:23 abraxxa hi guys!
11:23 FROGGS hi abraxxa
11:23 tadzik hey abraxxa
11:24 jnthn _edwin: I'd make the docs match reality; I suspect map/grep etc are also in Any?
11:24 _edwin hm, does returning Inf/-Inf for ().min/max really make sense?
11:25 _edwin yes, map and grep are also implemented in Any
11:25 jnthn FROGGS: I gotta go for a bit, so that's my flood of issues for now ;) I'll have another go at it later :)
11:25 jnthn _edwin: And also documented there?
11:26 FROGGS jnthn: it should be in a better shape until then :o)
11:26 _edwin jnthn, no, they are documented under List
11:26 tinyblak joined #perl6
11:30 jnthn _edwin: Hm, OK. My guess would be they want documenting in Any, but moritz++ and others may have a reason why not
11:30 * jnthn bbiab
11:31 H2O1 joined #perl6
11:34 moritz yes, grep et al should be documented in Any
11:35 _edwin ok, will take a look at that today probably
11:35 virtualsue joined #perl6
11:36 _edwin the -Inf return value feels a bit strange in cases like < >.max(*.chars)
11:36 _edwin I'd have expected Nil, I think
11:37 moritz _edwin: the return value of an operator applied to an empty list should be the neutral element
11:37 moritz _edwin: and I don't think Nil is a neutral element of a max comparison
11:37 moritz m: say Nil max -3
11:37 camelia rakudo-moar c86f75: OUTPUT«-3␤»
11:37 H2O1 left #perl6
11:37 moritz huh, it is
11:38 grondilu joined #perl6
11:38 FROGGS perhaps it just vanishes?
11:39 moritz maybe
11:39 moritz m: my $x := Nil; say $x max -3
11:39 camelia rakudo-moar c86f75: OUTPUT«-3␤»
11:41 FROGGS m: say Nil + 3
11:41 camelia rakudo-moar c86f75: OUTPUT«use of uninitialized value of type Nil in numeric context  in block <unit> at /tmp/KMie6lJPiS:1␤␤3␤»
11:47 geever joined #perl6
11:47 bartolin_ m: say Capture(|(1,2)) ~~ \|(1,2)
11:47 camelia rakudo-moar c86f75: OUTPUT«True␤»
11:48 bartolin_ m: my $c = Capture(Int, |(1,2)); say $c # is there a way to achieve this with '\'?
11:48 camelia rakudo-moar c86f75: OUTPUT«\((Int), 1, 2)␤»
11:48 bartolin_ m: my $c = \(Int, |(1,2)); say $c
11:48 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vr9YMONAWF␤Variable '&prefix:<|>' is not declared␤at /tmp/vr9YMONAWF:1␤------> 3my $c = \(Int, 7⏏5|(1,2)); say $c␤»
11:49 dalek Inline-Perl5: 7bbdf61 | (Stefan Seifert)++ | t/p6_to_p5.t:
11:49 dalek Inline-Perl5: Remove unneeded workaround in test
11:49 dalek Inline-Perl5:
11:49 dalek Inline-Perl5: The unused 'main' parameter of the identity function comes from a time when
11:49 dalek Inline-Perl5: all P5 functions were actually called as methods.
11:49 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/7bbdf619fa
11:49 dalek Inline-Perl5: 18b6301 | (Stefan Seifert)++ | / (2 files):
11:49 dalek Inline-Perl5: Handle named arguments in $p5.call and $p5.invoke($package, ...)
11:49 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/18b630118c
11:49 dalek Inline-Perl5: 54a5789 | (Stefan Seifert)++ | / (2 files):
11:49 dalek Inline-Perl5: Support named arguments of Perl 5 methods.
11:49 dalek Inline-Perl5:
11:49 dalek Inline-Perl5: $p5.invoke('Foo', 'new').test_named(a => 1, b => 2) now passes
11:49 dalek Inline-Perl5: ('a', 1, 'b', 2) as arguments to the method.
11:49 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/54a578948b
11:49 dalek Inline-Perl5: 6ea4165 | (Stefan Seifert)++ | / (2 files):
11:49 dalek Inline-Perl5: Support named arguments of inherited P5 methods.
11:49 dalek Inline-Perl5:
11:49 dalek Inline-Perl5: class Bar does Inline::Perl5::Perl5Parent['Foo'] {
11:49 dalek Inline-Perl5: }
11:49 dalek Inline-Perl5:
11:49 dalek Inline-Perl5: Bar.new(perl5 => $p5).test_named(a => 1, b => 2);
11:49 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/6ea416554f
11:50 vendethiel joined #perl6
11:52 nine_ .tell PerlJam re http://irclog.perlgeek.de/p​erl6/2015-03-27#i_10352333 support for named arguments was rather more involved than just an additional multi method p6_to_p5 since I first need to handle named arguments at all and then flatten them into the P5 argument list. This is the only case where arguments are not a 1:1 mapping.
11:52 yoleaux nine_: I'll pass your message to PerlJam.
11:53 nine_ .tell muraiki foo(bar => 1, baz => 2) works now as intended in Inline::Perl5
11:53 yoleaux nine_: I'll pass your message to muraiki.
11:54 nine_ That one has bothered me a couple of times but never enough to actually fix it just for me. Users++ :)
11:56 _edwin joined #perl6
12:02 bartolin_ do I understand correctly that prefix:<|> can only be used in argument lists?
12:03 jnthn bartolin_: Yes
12:03 jnthn bartolin_: But \(...) is meant to behave like one
12:03 bartolin_ and has that changed at some time or has it ever been like this?
12:03 jnthn (and doesn't sufficiently yet; that's on my todo list to fix)
12:03 bartolin_ jnthn: oh, I see.
12:04 jnthn I don't think we've ever had \(...) handled quite right in Rakudo
12:04 jnthn Though I've a good idea how to fix it :)
12:04 FROGGS though that seems not that urgent
12:04 _edwin the problem I see with .max returning -Inf is that something like this does not work:
12:04 bartolin_ thanks, jnthn++
12:04 _edwin m: my Str @words; *; my Str $longest = @words.max(*.chars);
12:04 camelia rakudo-moar c86f75: OUTPUT«Type check failed in assignment to '$longest'; expected 'Str' but got 'Num'␤  in block <unit> at /tmp/SH6tAYVGWJ:1␤␤»
12:05 jnthn FROGGS: No, though I think one it woulda been annoying to fix and now it's probably easy :)
12:06 FROGGS ahh :o)
12:06 _edwin (the * being some code that either fills or does not fill @words)
12:06 jnthn *once
12:08 jnthn .ask TimToady is there a reason capterm doesn't use arglist to parse inside of the Capture? That'd make sure we get the processing of the two lined up...
12:08 yoleaux jnthn: I'll pass your message to TimToady.
12:09 erdic joined #perl6
12:17 psch m: my Str @words; *; my Str $longest = do { @words.max(*.chars) } if @words; say $longest
12:17 camelia rakudo-moar c86f75: OUTPUT«(Str)␤»
12:17 yqt joined #perl6
12:17 _edwin actually even when using the default smart "cmp" semantics, there is a kind of "type surprise" here:
12:17 psch _edwin: i think it's warranted to point out a possible failure mode somehow
12:18 _edwin m: my Str @words; @words.max.WHAT.say
12:18 camelia rakudo-moar c86f75: OUTPUT«(Num)␤»
12:18 _edwin psch, but isn't that what an undefined Str would be for?
12:18 psch i agree with that type confusion though
12:18 psch _edwin: yeah, i suppose a typed &max candidate would be sensible
12:19 psch (and &min for that matter)
12:19 psch i'm not sure if typed lists are in-place-enough for that
12:20 psch m: say so "0"; say so "0.0"; # i'm reminded the discussion around this behavior
12:20 camelia rakudo-moar c86f75: OUTPUT«False␤True␤»
12:23 Perl6_newbee joined #perl6
12:24 _edwin psch, if min/max returned Nil on empty lists, the Nil would become a properly typed undef value when it is assigned
12:26 FROGGS it would become trigger the default value to be exact
12:27 psch i think there's some math reason why min of an empty (numeric) list should be -Inf...
12:28 _edwin Inf you mean
12:28 psch and the minimal Str of an empty Str list would be ""
12:28 psch huh
12:29 psch yeah, i probably mean Inf
12:29 psch but then "" isn't the min Str of an empty list, or the reasoning is different
12:30 _edwin it's what moritz said: the idea is to return the neutral element of the binary min/max operator
12:30 psch m: say "a" min Str
12:30 camelia rakudo-moar c86f75: OUTPUT«a␤»
12:30 psch m: say "a" max Str
12:30 camelia rakudo-moar c86f75: OUTPUT«a␤»
12:31 psch m: say 5.0 min Num
12:31 camelia rakudo-moar c86f75: OUTPUT«5␤»
12:31 psch m: say 5.0 max Num
12:31 camelia rakudo-moar c86f75: OUTPUT«5␤»
12:31 psch well, the type object seems neutral
12:32 psch _edwin: i suppose you could implement and spectest, see if anything breaks except for tests that explicitly look for ±Inf
12:35 _edwin hm, that's interesting in S03: "All orderable object types must support +Inf and -Inf values as special forms of the undefined value."
12:36 _edwin m: Inf.defined.say
12:36 camelia rakudo-moar c86f75: OUTPUT«True␤»
12:36 psch _edwin++ # design digging
12:36 tinyblak joined #perl6
12:37 _edwin so it seems, from design perspective the problem is rather that Inf/-Inf do not behave as undefined values
12:39 _edwin my reading of S03 here is that "my Str $longest = -Inf" should make $longest an undefined Str, that would be fine
12:40 moritz that sounds rather unlikely to me
12:42 moritz this is more about ordering, not assignment
12:43 larion joined #perl6
12:43 _edwin there is even an assignment example in S03, although one that fails because a native "int" cannot support -Inf
12:45 _edwin for the .min/.max method forms, I'm quite convinced that Nil is the correct return value for an empty list. the question is, how well that goes with the binary forms of min/max and [min]/[max]
12:45 moritz _edwin: try it
12:47 vendethiel joined #perl6
12:48 _edwin I will. I guess one thing that is important is that whatever is returned can be further combined like e.g. $left.min min $right.min
12:50 bcode joined #perl6
12:53 eli-se how does temp work with threads?
12:53 eli-se e.g. if I have a global variable and I temp it
12:53 eli-se do other threads see it as well?
13:00 colomon joined #perl6
13:01 * colomon goes to Ambercon for the weekend, and FROGGS++ starts submitting pull requests to his repo adding panda stuff he’s never heard of…
13:02 _edwin what could I be doing wrong when perl6-m.bat gives me "Missing or wrong version of dependency 'src/gen/m-CORE.setting'"
13:03 psch _edwin: missing a «make clean» maybe.  or you might have to nuke your install/
13:03 _edwin to be more precise: the failing command is: .\perl6-m.bat --target=mbc --output=lib/Test.pm.moarvm lib/Test.pm
13:04 _edwin psch, thanks, will try
13:05 [ptc] _edwin: I've had that issue before; only had to remove install/ and then run 'make install' again
13:06 _edwin [ptc], thanks, doing that now
13:19 larion joined #perl6
13:19 FROGGS a reconfigure is needed to get a new makefile
13:24 jack_rabbit joined #perl6
13:35 eli-se joined #perl6
13:43 vendethiel eli-se: that's a good question. did you try it? :P
13:43 eli-se no
13:43 eli-se But I should.
13:43 BenGoldberg joined #perl6
13:44 eli-se Lexically scoped variables with dynamically scoped values tend to be useful.
13:45 arnsholt Yeah. Dynvars are one of those things you don't want too often, but when you need them, you really do need them
13:53 zakharyas joined #perl6
14:03 FROGGS k, created now 23 PRs to add "provides" sections...
14:07 vendethiel FROGGS++
14:09 colomon joined #perl6
14:09 rurban_ joined #perl6
14:11 brrt joined #perl6
14:12 dalek doc: bd0f1a3 | (Nathan Brown)++ | lib/Language/5to6.pod:
14:12 dalek doc: Fix sigil invariance in :delete example
14:12 dalek doc: review: https://github.com/perl6/doc/commit/bd0f1a34f3
14:12 dalek doc: 8e3bc38 | paultcochrane++ | lib/Language/5to6.pod:
14:12 dalek doc: Merge pull request #67 from nbrown/patch-1
14:12 dalek doc:
14:12 dalek doc: Fix sigil invariance in :delete example
14:12 dalek doc: review: https://github.com/perl6/doc/commit/8e3bc380df
14:13 raiph joined #perl6
14:17 kjs_ joined #perl6
14:23 _edwin hm, this seems to hang rakudo-m: 'one'..'two' minmax 'five'..'three'
14:23 FROGGS m: say 'one'..'two'
14:23 camelia rakudo-moar c86f75: OUTPUT«"one".."two"␤»
14:23 FROGGS m: say ('one'..'two').list
14:24 camelia rakudo-moar c86f75: OUTPUT«one onf ong onh oni onj onk onl onm onn ono onp onq onr ons ont onu onv onw onx ony onz ooa oob ooc ood ooe oof oog ooh ooi ooj ook ool oom oon ooo oop ooq oor oos oot oou oov oow oox ooy ooz opa opb opc opd ope opf opg oph opi opj opk opl opm opn opo opp …»
14:24 FROGGS m: say ('one'..'two').list.elems
14:24 camelia rakudo-moar c86f75: OUTPUT«3625␤»
14:24 FROGGS m: say ('five'..'three').list.elems
14:24 camelia rakudo-moar c86f75: OUTPUT«(timeout)»
14:24 FROGGS I guess minmax flattens
14:25 _edwin hm, I expected it to be smart with ranges
14:25 FROGGS I often think that we should add candidates for ranges...
14:26 _edwin background is that I wanted to add tests like these for minmax: https://github.com/perl6/roast/commit/a​77c2229a0cd8fedc699cafd8cee54cdadcca5e2
14:26 _edwin i.e. I wanted to test that you can do minmax on sublists and then combine the results with minmax
14:27 _edwin for Ints it works perfectly
14:28 _edwin for lists of Strs it explodes
14:29 colomon m: say (‘a’..’ba’)
14:29 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W7aRQlnBol␤Missing required term after infix␤at /tmp/W7aRQlnBol:1␤------> 3say (‘a’..7⏏5’ba’)␤    expecting any of:␤        prefix␤        term␤»
14:29 colomon grumble.
14:31 jnthn m: say (‘a’..‘ba’)
14:31 camelia rakudo-moar c86f75: OUTPUT«"a".."ba"␤»
14:32 _edwin aha, but it only worked for the Ints because I used very small ranges
14:33 jnthn eli-se: No, temp on a global from multiple threads won't end too well... Better to go with dynvars for such things.
14:34 jnthn eli-se: It's not a fresh variable, but rather a saving of what was in the variable, so it can be assigned back to the variable at LEAVE time.
14:34 grondilu m: say 'α'..'ω'
14:34 camelia rakudo-moar c86f75: OUTPUT«"α".."ω"␤»
14:34 eli-se jnthn: OK
14:35 grondilu m: say ('α'..'ω')[^10]
14:35 camelia rakudo-moar c86f75: OUTPUT«α β γ δ ε ζ η θ ι κ␤»
14:36 larion joined #perl6
14:42 abraxxa is there a way to find out how NativeCall passes a float to a C lib?
14:42 abraxxa i'm still stuck with Oracle OCI floating binds
14:42 FROGGS abraxxa: I can help you there
14:42 abraxxa FROGGS: great!
14:43 FROGGS abraxxa: that's where it is passed https://github.com/MoarVM/MoarVM/blo​b/master/src/core/nativecall.c#L684
14:44 _edwin the strange thing is that the minmax implementation looks as if it would be already smart about ranges
14:44 * _edwin confused
14:44 abraxxa FROGGS: can i print that somehow?
14:45 _edwin aha, only the .minmax method is smart about ranges
14:45 vendethiel oh, there's a p6-php module.
14:45 FROGGS abraxxa: sure, add: fprintf(stderr, "float value is %f\n", unmarshal_float(tc, value));
14:46 _edwin ...or not
14:46 masak as to those bugs about sqish with a :with named parameter: :with is not in S32, and -- as far as I'm concerned -- has been subsumed by :as
14:47 masak (and so :with should probably by deprecated in Rakudo)
14:47 vendethiel ah, that's not php >_>
14:48 FROGGS abraxxa: and then you just need to 'make install' in moarvm and then you can run your tests again
14:49 eli-se DID SOMEBODY SAY PHP??!
14:49 dalek perl6-examples: ec5ac2a | paultcochrane++ | t/004-website-basic.t:
14:49 dalek perl6-examples: Add missing descriptions to collect-metadata tests
14:49 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/ec5ac2af99
14:49 dalek perl6-examples: 365c159 | paultcochrane++ | / (2 files):
14:49 dalek perl6-examples: Convert p2h into a method on the Website class
14:50 dalek joined #perl6
14:50 zby_home_ joined #perl6
14:51 * [ptc] has heard that in php it is common to do pear-programming
14:51 FROGGS :P
14:51 _edwin I wonder whether the .minmax implementation inadvertently flattens ranges before doing the .isa(Range) check
14:53 sirdancealot joined #perl6
14:53 abraxxa FROGGS: brewing
14:55 abraxxa moritz: this blog post has a typo in the link to the Rakudo 2015.03 release notes, it says 2015.02: http://rakudo.org/2015/03/21/anno​unce-rakudo-star-release-2015-03/
14:56 telex joined #perl6
14:56 _edwin masak, given TimToady's comments about :with I tend to agree
14:56 _edwin RT #124204, however, also affects the squish with only :as
14:56 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124204
14:57 FROGGS abraxxa / moritz: fixed it
14:57 abraxxa FROGGS++
15:00 xinming joined #perl6
15:04 xfix joined #perl6
15:04 colomon joined #perl6
15:05 xfix Apparently, Perl 5.22 adds a new operator for numeric bitwise operations.
15:05 xfix new operators*
15:07 colomon joined #perl6
15:12 skids joined #perl6
15:13 _edwin I think .minmax is not working according to spec:
15:13 _edwin m: my $count = 0; (1..3, 2..40).minmax({$count++; $^a cmp $^b}).say; say $count
15:13 camelia rakudo-moar c86f75: OUTPUT«1..40␤82␤»
15:13 _edwin S32: "Range elements in @values are treated as if their minimum and maximum values were passed individually"
15:14 prime joined #perl6
15:14 prime joined #perl6
15:15 vendethiel joined #perl6
15:15 rudi_s joined #perl6
15:16 masak _edwin: not sure I see what you consider to be the discrepancy.
15:16 _edwin minimum and maximum values would be two values per range object
15:17 _edwin however the range object seems to be flattened and *all* the values in the range are iterated over
15:17 _edwin I think that's not the intention of the spec here
15:18 colomon joined #perl6
15:18 abraxxa FROGGS: done as you said but i don't see the print output when I run the test script via perl6 -Ilib t/45-oracle-common.t
15:18 FROGGS abraxxa: and you modified the file in the correct place?
15:19 abraxxa FROGGS: yes, tried before and after the call in line 684
15:19 larion joined #perl6
15:19 FROGGS abraxxa: I mean, there might be two MoarVM repositories... one build directory and one to clone from
15:19 FROGGS you should change things in the one that has a Makefile
15:19 abraxxa i'm in ~/.rakudobrew/moar-2015.03/nqp/MoarVM
15:19 _edwin the result may be the same theoretically with the flattening, but it does not scale
15:22 _edwin I think the problem is the @.list in https://github.com/rakudo/rakud​o/blob/nom/src/core/Any.pm#L414
15:22 abraxxa FROGGS: as make install works it should be the right one
15:23 abraxxa which file should get updated when I run make install?
15:23 FROGGS abraxxa: yes, 'make install' implies a Makefile
15:23 FROGGS src/core/nativecall.o I think
15:24 brrt joined #perl6
15:24 _edwin the code inside the for loop tries to do the right thing for Range objects, but at this point they do no longer exist, it seems
15:25 abraxxa FROGGS: compiling src/core/nativecall.o
15:25 abraxxa linking libmoar.so
15:25 abraxxa linking moar
15:25 abraxxa so should the 'moar' binary be updated?
15:25 FROGGS abraxxa: you can also print the type id of the argument
15:26 abraxxa because the one in my .rakudobrew/bin isn/t
15:26 FROGGS hmmm
15:26 FROGGS dunno
15:26 abraxxa cp moar ~/.rakudobrew/bin/ ;)
15:27 abraxxa still no difference
15:28 _edwin m: (1..3,2..4).elems
15:28 camelia rakudo-moar c86f75: ( no output )
15:28 _edwin m: (1..3,2..4).elems.say
15:28 camelia rakudo-moar c86f75: OUTPUT«2␤»
15:29 abraxxa rakudobrew build-panda fails for 2015.03 for me, is this a known problem?
15:29 abraxxa looks like Shell::Command is causing the failure
15:29 abraxxa No object at index 296
15:29 abraxxa t/02-shell-command.t ..
15:34 abraxxa FROGGS: rebuilt it, still nothing. I guess it doesn't bind a float!
15:35 abraxxa i'm using a num64
15:36 abraxxa and i'm calling .Num on the p6 var before passing it
15:39 moritz abraxxa: the current panda needs a newer rakudo than 2015.03
15:39 moritz abraxxa: if you want panda on 2015.03, use the star tarball
15:39 _edwin m: my $count = 0; ((1..3).item, (2..40).item).minmax({$count++; $^a cmp $^b}).say; say $count
15:39 camelia rakudo-moar c86f75: OUTPUT«1..40␤2␤»
15:39 abraxxa moritz: ok
15:39 _edwin ok, seems I was just too stupid to use it right :)
15:40 abraxxa FROGGS: added more prints, make install is sufficient to make it work
15:46 colomon joined #perl6
15:52 masak [Tux]: see my latest comments on RT #124191.
15:52 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124191
15:53 masak [Tux]: if you're really eager to see the bug gone, you should be able to run off of the branch 'revert-bho-sink' for the time being.
15:58 _edwin does the evalbot have a timeout for evaluations that blow up?
15:59 flussence m: sleep 50
15:59 camelia rakudo-moar c86f75: OUTPUT«(timeout)»
15:59 flussence 15 seconds ish
16:00 _edwin ok, thanks. then I can show my problem: I'm having a hard time protecting the range object from flattening. somehow I'm missing something:
16:00 _edwin m: (1..3).item minmax (2..10e12).item
16:00 camelia rakudo-moar c86f75: ( no output )
16:00 _edwin m: say (1..3).item minmax (2..10e12).item
16:00 camelia rakudo-moar c86f75: OUTPUT«1..10000000000000e0␤»
16:00 _edwin that works find
16:00 _edwin fine*
16:00 _edwin m: say [minmax] (1..3).item, (2..10e12).item
16:01 _edwin this blows up
16:01 camelia rakudo-moar c86f75: OUTPUT«(timeout)»
16:02 _edwin how can I pass a list of ranges to [minmax]?
16:03 abraxxa FROGGS: accoring the the arg_types[i] it's a MVM_NATIVECALL_ARG_INT
16:03 masak _edwin: re ranges in a list that you then .minmax on -- it is *my* expectation that those ranges should flatten.
16:04 masak (sorry for the late reply -- doing other things)
16:04 flussence _edwin: depending on what you're asking for, [minmax] @ranges».bounds might work fine
16:06 masak um, is it just me, or does this line look *wrong*? https://github.com/rakudo/rakudo/commit/a​398910b4a6a1bdd42cd5a3cc33d8dfad0e3501f#d​iff-9f05c41492341485af21ac5ddc675bfcR457
16:06 flussence yep...
16:06 bartolin_ masak++ # digging deep for bug
16:06 masak (the .release register happens right allocating the register, then we use it, then we release it again)
16:06 masak ok, gonna try building without that line.
16:07 brrt joined #perl6
16:08 _edwin flussence, the background is: I'd like to show that the results of several .minmax calls can be combined by another minmax operation in an analogous way as that works for min and max separately
16:09 FROGGS abraxxa: what does your subroutine signature look like?
16:09 _edwin and it almost works, except that my ranges are blowing up all over the place :(
16:10 _edwin the ».bounds construction you proposed would probably solve it, but my reading of S32 is that it should work out-of-the-box
16:11 abraxxa FROGGS: num64 is double, this is why I didn't see anything when printing the float
16:11 flussence hm, yeah. it seems like the sort of line that's unnecessarily surprising...
16:11 abraxxa FROGGS: looks like it's ok, I get arg type is 14, double value is 4.850000
16:11 abraxxa also printing the arg_types[i] value
16:11 FROGGS well, you said float :o)
16:11 FROGGS <abraxxa> is there a way to find out how NativeCall passes a float to a C lib?
16:12 abraxxa it's just that this sub is called more often than i thought so the last call is not the double one
16:12 FROGGS but yeah, num64 is correctly a double
16:12 abraxxa so that should be fine, right?
16:12 abraxxa still getting ORA-01024: invalid datatype in OCI call and no clue on the internet why
16:13 _edwin also S03 for minmax "Range elements in the input are treated as if their minimum and maximum values were passed individually"
16:13 FROGGS if you pass to a num64 param and land in the double case... then that's right
16:13 abraxxa that also happens when i try binding it as num32(float)
16:13 _edwin I might be misreading it, but to me it sounds exactly like the behavior you need to accumulate results of minmax operations
16:14 FROGGS but I can't tell why you get an error... since I cannot try your code on my box I dunno how to help right now
16:14 abraxxa FROGGS: ok, will search on
16:15 flussence m: say minmax (1..3).item, (2..10e12).item
16:15 camelia rakudo-moar c86f75: OUTPUT«1..10000000000000e0␤»
16:15 flussence okay, sub form of minmax works fine there...
16:15 flussence (but only with .item)
16:16 abraxxa FROGGS: the error description makes me think that i don't pass the dty param correctly
16:17 b2gills m: multi test ( Int(Cool) $ ){ say 'int' }; multi test ( Cool $ ){ say 'Cool' }; test '5'
16:17 camelia rakudo-moar c86f75: OUTPUT«Ambiguous call to 'test'; these signatures all match:␤:(Cool $)␤:(Cool $)␤  in sub test at /tmp/vmJsxnUffB:1␤  in block <unit> at /tmp/vmJsxnUffB:1␤␤»
16:17 flussence I think it makes sense that [minmax] $huge_range would explode, since the [] doesn't know that its contents can handle ranges directly.
16:17 _edwin flussence, aha, interesting that it works with minmax ... but not with [minmax] ...
16:18 flussence m: say $(1..10) minmax $(2..10e12)
16:18 camelia rakudo-moar c86f75: OUTPUT«1..10000000000000e0␤»
16:18 flussence yeah, it's the [] that causes it to explode.
16:19 psch m: say &minmax.signature; say &[minmax].signature
16:19 camelia rakudo-moar c86f75: OUTPUT«(*@args, :by(&by) = { ... })␤(Any |)␤»
16:21 abraxxa moritz: panda also fails on nom for me
16:27 _edwin m: say [~] <a b>.item, <c d>.item
16:27 camelia rakudo-moar c86f75: OUTPUT«a bc d␤»
16:28 _edwin m: say &[~].signature
16:28 camelia rakudo-moar c86f75: OUTPUT«($?, $?)␤»
16:30 psch m: say <a b>.item.Str.perl
16:30 camelia rakudo-moar c86f75: OUTPUT«"a b"␤»
16:30 _edwin with [~] the .item works to protect from flattening
16:31 BenGoldberg Could rakudo provide specialized versions of [op] thingies?
16:31 psch m: say [~] <a b>, <c d>
16:31 camelia rakudo-moar c86f75: OUTPUT«abcd␤»
16:32 psch m: say &[&infix:<~>].signature
16:32 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xO1Oek4REY␤Unable to parse expression in infix noun; couldn't find final ']' ␤at /tmp/xO1Oek4REY:1␤------> 3say &[&7⏏5infix:<~>].signature␤»
16:32 psch m: say &[infix:<~>].signature
16:32 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nD1cS97CCs␤Missing infix inside []␤at /tmp/nD1cS97CCs:1␤------> 3say &[7⏏5infix:<~>].signature␤    expecting any of:␤        argument list␤        infix␤        infix noun␤        infix st…»
16:33 BenGoldberg m: say [,] 1..5;
16:33 camelia rakudo-moar c86f75: OUTPUT«1 2 3 4 5␤»
16:33 BenGoldberg m: say [R,] 1..5;
16:33 camelia rakudo-moar c86f75: OUTPUT«Too many positionals passed; expected 2 arguments but got 5␤  in block  at src/gen/m-CORE.setting:21905␤  in sub  at src/gen/m-CORE.setting:22055␤  in block <unit> at /tmp/TavqbYOQcI:1␤␤»
16:34 spider-mario joined #perl6
16:35 _edwin grepping in rakudo, the signatures of infix:<minmax> and infix:<~> look quite differnt
16:36 BenGoldberg Suppose that the [] meta-operator was subject to multi-dispatch, with different versions working on different types of operators.
16:36 _edwin but understanding why that makes [minmax] flatten even the .item'ed ranges is beyond my current perl6-fu, I'm afraid
16:38 rudi_s Does perl6 support poll/select/epoll to handle many simultaneous network connections?
16:39 _edwin maybe it's the slurpiness in multi sub infix:<minmax>(*@args) { @args.minmax }
16:43 skids BenGoldberg: that probably reduces to the problem of how/when e.g. sub (int *@a) typechecks.
16:44 perigrin_ joined #perl6
16:44 perigrin_ anybody have a pointer on aio in perl6?
16:45 moritz perigrin: in general, you just do IO in another thread, which could feed a Supply or something like that
16:46 moritz perigrin: though we do have http://doc.perl6.org/type/Proc::Async for executing external commands asynchronously
16:47 perigrin moritz: I'm discussing a new Net::Twitter with semifor and he's pining for the lack of selection in async HTTP modules in perl 5
16:47 perigrin AnyEvnet::HTTP and Mojo::UA I think are the only choices
16:47 perigrin and both implement the full http stack on async sockets
16:48 larion joined #perl6
16:51 flussence masak: d'ya think that use-after-free is what's causing the current panda breakage too?
16:53 eli-se joined #perl6
16:56 mj41 joined #perl6
16:59 Psyche^ joined #perl6
17:02 mj41 Ahoj.
17:02 yoleaux 24 Mar 2015 21:54Z <hoelzro> mj41: I created a repo under github.com/perl6/docker; just waiting on word from the Docker folks
17:05 virtualsue joined #perl6
17:06 larion joined #perl6
17:07 yqt joined #perl6
17:09 abraxxa how can i enter hex in perl6?
17:10 _edwin abraxxa, do you mean for a literal constant in the code or from user input?
17:11 abraxxa constants
17:11 _edwin m: say 0xABCD
17:11 camelia rakudo-moar c86f75: OUTPUT«43981␤»
17:11 abraxxa i tried my ub4 constant OCI_COMMIT_ON_SUCCESS  = 0x00000020;
17:13 _edwin how does it fail? the hex syntax looks ok, maybe it is something else?
17:14 abraxxa with my favorite error messages which stacktrace doesn't include a pointer to my code: Unhandled exception: This type cannot unbox to a native integer
17:15 khisanth__ joined #perl6
17:15 _edwin is ub4 something you declare in your code?
17:16 abraxxa _edwin: yeah, OCI datatype aliases
17:16 abraxxa ub4 is unsigned byte 4
17:17 molaf joined #perl6
17:17 _edwin m: my uint32 constant TEST = 0x00000020; say TEST; say TEST.WHAT;
17:17 camelia rakudo-moar c86f75: OUTPUT«32␤(Int)␤»
17:18 abraxxa never mind, it seems to have something to do with where i'm using the constant
17:19 ugexe anyone know github:paultcochrane's irc handle?
17:20 colomon joined #perl6
17:20 raiph joined #perl6
17:20 psch ugexe: i think that's [ptc]
17:21 TimToady testing a fix for minmax
17:21 yoleaux 12:08Z <jnthn> TimToady: is there a reason capterm doesn't use arglist to parse inside of the Capture? That'd make sure we get the processing of the two lined up...
17:21 ugexe psch: thanks
17:22 FROGGS abraxxa: it is still hard to guess what might be wrong since you dont give me enough information
17:22 FROGGS abraxxa: like, what are the arguments for the call that fails? what is the exact signature?
17:23 _edwin abraxxa, BTW, it seems that constants do not really honor native types (yet?)
17:23 abraxxa FROGGS: i'm still to Perl5ish in my mind and wrote: $!dbh.AutoCommit ?? OCI_COMMIT_ON_SUCCESS :: OCI_DEFAULT, instead of $!dbh.AutoCommit ?? OCI_COMMIT_ON_SUCCESS !! OCI_DEFAULT,
17:24 abraxxa _edwin: FROGGS told my I can define them this way
17:24 FROGGS _edwin: it does not matter what the constant is, as long as it can unbox to the native type
17:25 xfix joined #perl6
17:25 ugexe shouldnt rakudo have told you what you did wrong if you used '?? ::'?
17:25 FROGGS abraxxa: your malformed ternary should be a syntax error though
17:25 FROGGS m: say 1 ?? 2 :: 3
17:25 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pWNGK1Zc_s␤Please use !! rather than ::␤at /tmp/pWNGK1Zc_s:1␤------> 3say 1 ?? 2 :7⏏5: 3␤    expecting any of:␤        colon pair␤»
17:26 abraxxa m: sub foo (1 ?? 'bar' :: 'baz');
17:26 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ws18dzJpLt␤Missing block␤at /tmp/ws18dzJpLt:1␤------> 3sub foo (1 7⏏5?? 'bar' :: 'baz');␤»
17:27 abraxxa m: sub foo ($foo); foo(1 ?? 'bar' :: 'baz');
17:27 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YDLHM_Lxqm␤Semicolon form of sub definitions not allowed except on MAIN subs;␤Please use the block form.␤at /tmp/YDLHM_Lxqm:1␤------> 3sub foo ($foo);7⏏5 foo(1 ?? 'bar' :: 'baz');␤»
17:27 abraxxa m: sub foo ($foo) {}; foo(1 ?? 'bar' :: 'baz');
17:27 camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eVe1E6OLLv␤Please use !! rather than ::␤at /tmp/eVe1E6OLLv:1␤------> 3sub foo ($foo) {}; foo(1 ?? 'bar' :7⏏5: 'baz');␤    expecting any of:␤        colon pair␤»
17:31 dalek Heuristic branch merge: pushed 44 commits to rakudo/moreinput by peschwa
17:32 psch current state of moreinput: statements need to be terminated with ';' or "\n\n", i.e. << say "hi" >> gives the secondary prompt once, but evals on empty line
17:32 psch +for the second prompt
17:32 psch << if 1 {\nsay "hi"\n}; >> also works now
17:33 psch i suspect some of TimToady++'s ws work played a part in that too
17:33 vendethiel joined #perl6
17:33 FROGGS what about if 1 {\nsay "hi"\n} ?
17:33 psch FROGGS: that also prompts for one more line iirc, lemme check
17:34 psch FROGGS: no, works
17:34 psch as in, enter after } prints "hi"
17:34 FROGGS that's what I had expected :o)
17:34 FROGGS nice
17:34 FROGGS I think that feels sane all in all
17:36 colomon joined #perl6
17:37 dalek rakudo/nom: 4254764 | TimToady++ | src/core/Any.pm:
17:37 dalek rakudo/nom: minmax should not try to flatten ranges
17:37 dalek rakudo/nom:
17:37 dalek rakudo/nom: (After ** binding, however, it does need to traverse Positionals.)
17:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4254764254
17:38 TimToady _edwin++ too
17:41 abraxxa FROGGS: the only difference of the OCIBindByName_Real from the _Str and_Int is that I use num64, a nativecall datatype in its definition instead of a Perl 6 type
17:42 abraxxa i do get a different error if I replace num64 with Num
17:42 dalek rakudo/nom: d24f300 | FROGGS++ | src/core/CompUnitRepo/Locally.pm:
17:42 dalek rakudo/nom: attempt to mkdir CUR::Installation locations
17:42 dalek rakudo/nom:
17:42 dalek rakudo/nom: We need to do this very early or we end up dropping a CUR::Installation
17:42 dalek rakudo/nom: from @*INC, which results in panda not finding installed distributions.
17:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d24f30015c
17:42 travis-ci joined #perl6
17:42 travis-ci Rakudo build errored. TimToady 'minmax should not try to flatten ranges
17:42 travis-ci http://travis-ci.org/rakudo/rakudo/builds/56317252 https://github.com/rakudo/rakudo/c​ompare/c86f75460879...425476425401
17:42 travis-ci left #perl6
17:43 FROGGS fatal: unable to access 'https://github.com/perl6/nqp.git/': Failed connect to github.com:443; Connection timed out
17:43 FROGGS just a github hickup
17:44 FROGGS abraxxa: what is the error message with Num?
17:44 abraxxa yes, github doesn't work for me too currently
17:44 geekosaur yep, other projects seeing that too
17:44 abraxxa ORA-01036: illegal variable name/number
17:46 travis-ci joined #perl6
17:46 travis-ci Rakudo build failed. Tobias Leich 'attempt to mkdir CUR::Installation locations
17:46 travis-ci http://travis-ci.org/rakudo/rakudo/builds/56317488 https://github.com/rakudo/rakudo/c​ompare/425476425401...d24f30015c31
17:46 travis-ci left #perl6
17:50 _edwin TimToady++, the binary infix:<minmax> works like a charm now!
17:50 colomon joined #perl6
17:52 jnthn masak: re https://github.com/rakudo/rakudo/commit/a​398910b4a6a1bdd42cd5a3cc33d8dfad0e3501f#d​iff-9f05c41492341485af21ac5ddc675bfcR457 it has to be wrong solely out of the fact that we double-release the $meth register
17:52 _edwin (still trying the other variants)
17:52 FROGGS abraxxa: what is the sql query that fails?
17:53 abraxxa FROGGS: https://github.com/abraxxa/DBIish​/blob/master/t/99-common.pl6#L94
17:53 timotimo the touchpad and stick mouse on my laptop are dead :(
17:54 abraxxa timotimo: which laptop do you have?
17:54 timotimo t440s
17:54 tadzik how many t440s? :D
17:54 timotimo this happened before and fixed "itself" a month or so ago ... i should probably get it fixed, as i have Thinkpad Protection on it still
17:55 _edwin [minmax] also works nicely now
17:56 _edwin the only form that still blows up without the '.item's is: (1..3, 2..10e12).minmax
17:58 FROGGS jnthn: is it possible that the 'is rw' magic on natives works for ints but not nums?
17:58 abraxxa FROGGS: are there tests for nativecall I could look at or extend?
17:59 abraxxa can I call a method on an object inside ""?
17:59 FROGGS m: "42.say()"
17:59 camelia rakudo-moar 425476: ( no output )
17:59 FROGGS m: say "42.chr()"
17:59 camelia rakudo-moar 425476: OUTPUT«42.chr()␤»
17:59 FROGGS err
18:00 FROGGS m: say "Bool.pick()"
18:00 camelia rakudo-moar 425476: OUTPUT«Bool.pick()␤»
18:00 abraxxa like say "$bar.foo";
18:00 FROGGS what am I doing wrong?
18:00 FROGGS abraxxa: parens are needed
18:00 abraxxa ah, yes
18:00 abraxxa just remembered it
18:00 FROGGS m: my $foo = "a"; say "$foo.uc()"
18:00 camelia rakudo-moar 425476: OUTPUT«A␤»
18:00 FROGGS ahh, must be a variable
18:01 abraxxa no, I don't want a method but an attr
18:01 FROGGS abraxxa: you still call the accessor method
18:01 FROGGS so, it is a method call
18:02 abraxxa hm...
18:02 abraxxa has $.dbh; means the attr is mutable, right?
18:02 * abraxxa wonders why the database handle of a statement handle should be allowed to change
18:02 larion joined #perl6
18:03 jnthn FROGGS: I know something is up with num32, though not related to "is rw" specifically
18:03 _edwin TimToady, what is your opinion on this?: my Str @words; #`[ some code that *may* push words ] my Str $longest = @words.max(*.chars);
18:04 jnthn FROGGS: And not native call or native array related either, more about lexical num32s.
18:04 FROGGS hmmm
18:04 FROGGS I get a segfault here...
18:05 FROGGS DLLEXPORT void SetFloat(float *flt) { *flt = 6.66; } /* in C */
18:05 FROGGS sub SetFloat(num32 is rw) is native('./14-rw-attrs') { * }
18:05 FROGGS my num32 $a; SetFloat($a); say $a;
18:05 _edwin I'd have expected to get a Str:U if there are no @words, but currently it gives "Type check failed in assignment to '$longest'; expected 'Str' but got 'Num'"
18:06 jnthn FROGGS: Um, does nativecall know what to do with "is rw" yet?
18:06 jnthn FROGGS: I sure didn't implement it doing so...did you? :)
18:06 colomon joined #perl6
18:07 FROGGS ohh
18:07 FROGGS dang
18:07 jnthn haha
18:07 FROGGS that is still in a branch, right?
18:07 jnthn I didn't work on native-ref/nativecall integration at all yet.
18:07 FROGGS O.o
18:07 jnthn It's on my "stuff to do soon" list :)
18:07 FROGGS hehe, so I dreamed it :o)
18:07 jnthn I was getting native arrays most of the way along first :)
18:08 abraxxa shouldn't that raise a compile time exception?
18:08 FROGGS it is not a compile time error
18:08 FROGGS it is just a noop atm
18:09 FROGGS abraxxa: so, you still cannot do that: https://github.com/abraxxa/DBIish/bl​ob/master/lib/DBDish/Oracle.pm6#L192
18:09 abraxxa FROGGS: can i install rakudo from a branch to support it?
18:09 FROGGS abraxxa: and I am under the impression that we already got to the point where we said you've to keep using CArrays for that
18:09 jnthn abraxxa: No, FROGGS and I were just discovering that neither of us have actually implemented the thing yet...
18:09 FROGGS abraxxa: no, jnthn has not started implementing it yet
18:10 abraxxa FROGGS: just to the case of CArray[Pointer]
18:10 abraxxa ah, so not even a branch, got it
18:10 FROGGS it is not CArray[Pointer] what you want, but either CArray[num32] or Pointer[num32]
18:10 jnthn I did the stuff to get "is rw" working on natives in Perl 6, just not the integration with NativeCall yet.
18:11 abraxxa yes, if you look here https://github.com/abraxxa/DBIish/bl​ob/master/lib/DBDish/Oracle.pm6#L185 you see that I'm not using 'is rw' for the Pointer to a Pointer stuff
18:11 FROGGS jnthn: hmmm, I can potentially make that work...
18:11 abraxxa this is a regular, mutable attribute with a default value, right? has $.AutoCommit is rw = 1;
18:11 FROGGS but I'll first check if a Pointer[num32] would do the trick
18:12 FROGGS right
18:12 abraxxa and this makes it passable to the constructor: submethod BUILD(:$!svchp!, :$!errhp!, :$!AutoCommit) { }
18:12 abraxxa why is ! used there and not . ?
18:12 abraxxa or is that an error in DBDish::Pg I've copied?
18:12 FROGGS because you usually dont talk to the attribute via its *public* accessor from inside of its class
18:13 abraxxa gah!
18:13 abraxxa i've mixed mutability with access
18:13 abraxxa $! works for all attributes, not just immutable ones
18:13 FROGGS the dot/bang is about publicity
18:13 FROGGS yes
18:13 abraxxa my brain translated ! to 'no'
18:13 FROGGS from inside the class you can just use $!
18:14 FROGGS well, it is 'no' for the outside
18:14 itz grrr github issues.. the DoS I guess?
18:14 FROGGS probably, yeah
18:14 _edwin is it ok to push a spectest that passes only with a very recent rakudo commit?
18:14 jnthn _edwin: yes
18:15 abraxxa what's the difference between has $.foo and $!foo then?
18:15 jnthn itz: Almost certainly
18:15 larion joined #perl6
18:15 rindolf joined #perl6
18:15 abraxxa http://doc.perl6.org/language/objects#Attributes describes it nicely
18:16 abraxxa so accessor generation or not
18:16 abraxxa but I'd still use $!foo inside the class and not call the accessor?
18:16 FROGGS yes
18:16 FROGGS as it should be faste
18:16 FROGGS r
18:16 jnthn Not only is it faster
18:16 jnthn It means you're not vulnerable to somebody writing a subclass and overriding the method
18:17 MilkmanDan Does anyone know of a project or document that tracks "Perl 6 Internals" in summary form?  http://www.perl6.org/archive/talks/tpc​5-internals/perl%206%20internals.html is nice but almost 15 years old and none of the perl.perl6.internals.* Usenet groups have seen posts in over 2 years (most >10).
18:17 jnthn Of course, sometimes you want to allow the overriding :)
18:17 FROGGS and you get compile time checks
18:17 abraxxa jnthn: depends on what I want, doesn't it?
18:17 jnthn abraxxa: Yes, of course. :)
18:17 jnthn MilkmanDan: It's quite a bit of detail but https://github.com/edumentab/ra​kudo-and-nqp-internals-course/
18:17 abraxxa it seems my default value isn't set
18:18 jnthn MilkmanDan: That doesn't count as summary form really though.
18:19 jnthn Though the opening bits are high level
18:19 FROGGS MilkmanDan: that might be a short intro: https://www.youtube.com/watch?v=XgPh5Li3k4g
18:19 MilkmanDan jnthn: It counts a lot more than "here is the archive of all the online work done through the Internals group; enjoy reading". :)
18:19 MilkmanDan And 2 years old is much better than 15.  :)
18:20 colomon joined #perl6
18:21 jnthn Yowser, Rakudo startup time almost doubled...
18:21 vendethiel that $*VM initializing?
18:21 jnthn No
18:22 jnthn That's "on latest, as compared to how it was a couple of days ago"
18:22 dalek roast: 13fb4a5 | (Edwin Steiner)++ | S32-list/minmax.t:
18:22 dalek roast: Add tests for combining the results of .minmax with further minmax operators.
18:22 dalek roast: review: https://github.com/perl6/roast/commit/13fb4a50c4
18:22 MilkmanDan FROGGS: Thanks, that might have what I'm looking for.
18:23 jnthn Well, my dinner is nearly done cooking, so I'll worry about finding it later :)
18:23 jnthn &
18:23 MilkmanDan Essentially, I'm just looking for a document or site that says things like "in Perl 6 all integers are stored as 64bit Floats so as to take advantage of FP-optimized compilers and FPUs." or "strings are copy-on-write objects; if you modify the contents of a string the following process takes place: ...."
18:23 colomon joined #perl6
18:23 FROGGS jnthn: that might be about slurping the module "database"
18:25 FROGGS MilkmanDan: you are looking for what is called "6model"... I think that highlights it a little: https://www.youtube.com/watch?v=J8K1JEQcfHs
18:25 abraxxa AutoCommit works ;)
18:26 abraxxa i wasn't passing the AutoCommit parameter here: https://github.com/abraxxa/DBIish/bl​ob/master/lib/DBDish/Oracle.pm6#L806
18:26 MilkmanDan FROGGS: Fantastic, thanks!
18:26 abraxxa but shouldn't that used the default value then?
18:26 MilkmanDan Knowing what to search for sure makes things easier...
18:27 abraxxa why does it call .bless and not .new?
18:29 psch huh
18:30 psch S19-command-line/repl.t segfaults on the moreinput branch
18:30 xinming_ joined #perl6
18:30 FROGGS psch: gdb it!
18:31 psch it also segfaults manually :(
18:31 psch if i ^D on the secondary prmpt
18:31 psch *prompt
18:31 psch FROGGS: can't i just blindly guess "something about readlinfh"? :)
18:31 psch err
18:31 psch or maybe readlineintfh
18:32 abraxxa m: class Foo { has $.AutoCommit is rw = 1; submethod BUILD( :$!AutoCommit ) { warn "AutoCommit: $!AutoCommit"; } } Foo.new();
18:32 camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/98WheFGvwH␤Strange text after block (missing semicolon or comma?)␤at /tmp/98WheFGvwH:1␤------> 3) { warn "AutoCommit: $!AutoCommit"; } }7⏏5 Foo.new();␤    expecting any of:␤        infix␤     …»
18:32 FROGGS psch: no, you not allowed to guess :P
18:33 FROGGS m: class Foo { has $.AutoCommit is rw = 1; submethod BUILD( :$!AutoCommit ) { warn "AutoCommit: $!AutoCommit"; } }; Foo.new();
18:33 camelia rakudo-moar 425476: OUTPUT«use of uninitialized value $!AutoCommit of type Any in string context  in submethod BUILD at /tmp/e8ZsNjEdhZ:1␤␤AutoCommit:   in submethod BUILD at /tmp/e8ZsNjEdhZ:1␤␤»
18:33 FROGGS m: class Foo { has $.AutoCommit is rw = 1; submethod BUILD( :$!AutoCommit = 1 ) { warn "AutoCommit: $!AutoCommit"; } }; Foo.new();
18:33 camelia rakudo-moar 425476: OUTPUT«AutoCommit: 1  in submethod BUILD at /tmp/jkBwWMH8YN:1␤␤»
18:33 FROGGS abraxxa: ^^
18:34 abraxxa FROGGS: can you describe to me what's going on?
18:34 FROGGS m: class Foo { has $.AutoCommit is rw = 1 }; say Foo.new.AutoCommit;
18:34 camelia rakudo-moar 425476: OUTPUT«1␤»
18:34 MilkmanDan FROGGS: Hmm, since that first video is about the JVM maybe before I dig much deeper I should ask, is there major difference in the internals like in-memory storage based on whether one is using Parrot, Moar, etc?  It seems like there would be...
18:35 FROGGS abraxxa: since you are intercepting the instantiation of the Foo object, you have to care yourself for what would normally happen in the BUILD methods
18:35 FROGGS MilkmanDan: yes, the VM (Parrot, MoarVM, JVM) is free to do the memory management as it wants to
18:35 abraxxa FROGGS: is there already a different way to specify which attrs have to be specified at instantiation time?
18:36 FROGGS MilkmanDan: but whet it comes to object types and memory layout, 6models comes with REPRs (representations), that define how objects work etc
18:37 FROGGS abraxxa: you could do:  submethod BUILD( :$!AutoCommit! )
18:37 psch ooh
18:37 psch SIGVSEGV [...] in MVM_string_concatenate ()
18:37 FROGGS abraxxa: or if you dont have a BUILD methods you'd do: has $.AutoCommit is rw = ...;
18:38 abraxxa FROGGS: that's already what I do
18:38 abraxxa FROGGS: the submethod BUILD is only there to make $!svchp and $!errhp mandatory
18:38 abraxxa i was hoping there is/will be an attribute definition syntax for that
18:39 colomon joined #perl6
18:40 FROGGS yes, has $.AutoCommit is rw = ...;
18:41 FROGGS this will explode if you dont supply that argument to .new
18:41 abraxxa what part of it? the 'is rw'?
18:42 FROGGS the ...
18:42 FROGGS m: say ...
18:42 camelia rakudo-moar 425476: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15857  (/home/camelia/rakudo-inst-1/share/p​erl6/runtime/CORE.setting.moarvm:s…»
18:42 abraxxa what I need is: $!svchp and $!errhp mandatory, $.AutoCommit optional with a default value of 1 if not specified
18:42 MilkmanDan Ah, so there are multiple 6model(s).
18:43 FROGGS MilkmanDan: no, 6model is the object system.... but there are quite some representations
18:43 FROGGS like P6bigint, P6num, P6str, VMArray etc
18:45 abraxxa m: class Connection { has $!.svchp = ...; has $!errhp = ...; has $.AutoCommit is rw = 1; }; Connection.new();
18:45 camelia rakudo-moar 425476: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15857  (/home/camelia/rakudo-inst-1/share/p​erl6/runtime/CORE.setting.moarvm:s…»
18:45 FROGGS m: class Foo { has $.AutoCommit is rw = 1; has $.svchp is rw = die 'Param $!svchp is mandatory' }; say Foo.new( :svchp(42) ).AutoCommit;
18:45 camelia rakudo-moar 425476: OUTPUT«1␤»
18:45 kaare_ joined #perl6
18:45 FROGGS m: class Foo { has $.AutoCommit is rw = 1; has $.svchp is rw = die 'Param $!svchp is mandatory' }; say Foo.new( ).AutoCommit;
18:45 camelia rakudo-moar 425476: OUTPUT«Param $!svchp is mandatory␤  in method  at /tmp/X4lfVA1IEP:1␤  in block  at src/gen/m-CORE.setting:1039␤  in method BUILDALL at src/gen/m-CORE.setting:994␤  in method bless at src/gen/m-CORE.setting:983␤  in method new at src/gen/m-CORE.setting:9…»
18:45 abraxxa m: class Connection { has $!.svchp = ...; has $!errhp = ...; has $.AutoCommit is rw = 1; }; Connection.new( svchp = 'foo' );
18:45 camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YvHOyTR6pq␤Preceding context expects a term, but found infix = instead␤at /tmp/YvHOyTR6pq:1␤------> 3it is rw = 1; }; Connection.new( svchp =7⏏5 'foo' );␤»
18:45 abraxxa m: class Connection { has $!.svchp = ...; has $!errhp = ...; has $.AutoCommit is rw = 1; }; Connection.new( svchp => 'foo' );
18:45 camelia rakudo-moar 425476: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15857  (/home/camelia/rakudo-inst-1/share/p​erl6/runtime/CORE.setting.moarvm:s…»
18:45 FROGGS abraxxa: see my two examples
18:46 FROGGS some prefer die(), some prefer ...
18:46 abraxxa i prefer die but i wish there was a more concise syntax for exactly this case
18:47 abraxxa which generates a useful exception message
18:47 vendethiel troo
18:49 abraxxa FROGGS: as those two shouldn't be rw does the = work without it too because I get the exception although the params are specified
18:49 flussence .oO( «has $!svchp!;» ... maybe not )
18:50 FROGGS abraxxa: you need the 'is rw' me thinks
18:51 FROGGS otherwise you are not allowed to set it at all
18:51 abraxxa there is a readonly trait
18:51 * abraxxa wonders why it isn't called 'ro'
18:52 abraxxa this looks like Perl 6 doesn't have a (good) way for immutable attributes
18:52 FROGGS because it might be too unimportant to spelled that short
18:52 FROGGS to be*
18:52 abraxxa useless use of 'is readonly' on $!svchp  in any  at src/Perl6/World.nqp:2047
18:52 FROGGS yes, as it is the default
18:53 abraxxa so define them as $.svchp instead of $!svchp?
18:53 abraxxa yes, that did it
18:55 yqt joined #perl6
18:59 colomon joined #perl6
19:02 abraxxa moritz: did you use submethod BUILD out of personal preference over the syntax described by FROGGS? https://github.com/perl6/DBIish/commit/b​9da926c7304c6c354b74fa3f1554f9612c861fa#​diff-685004acbf047b16c23f610735194f36R93
19:02 timotimo good news, i still have thinkpad protection and on-site service until the end of 2016
19:02 abraxxa Lenovo++
19:03 timotimo well, i paid quite a bit extra to have that
19:03 timotimo but yeah, it's nice to have the option
19:03 moritz abraxxa: over which syntax?
19:03 timotimo what i'm even happier about is how easy thinkpads are to self-service
19:05 abraxxa moritz: i'd replace submethod BUILD(:$!svchp!, :$!errhp!, :$!AutoCommit = 1) { } with has $.svchp = die 'Param svchp is mandatory'; has $.errhp = die 'Param errhp is mandatory'; has $.AutoCommit is rw = 1;
19:06 moritz abraxxa: you may do that, but in DBIish, I don't want the attributes to be public
19:06 moritz I mean, I don't have enough experience with this stuff to commit to a public API at this point
19:06 abraxxa moritz: even if they are read-only?
19:06 kjs_ joined #perl6
19:07 moritz abraxxa: yes. API is API.
19:07 abraxxa moritz: absolutely. it's just that there is no nice syntax is Perl 6 for that
19:07 moritz abraxxa: for what?
19:07 abraxxa ok, that's an argument, submethod BUILD then
19:08 abraxxa private attr that is mandatory at construction time
19:08 hoelzro mj41: btw, I filed a PR for the Docker image; still waiting on word from the docker devs
19:08 moritz abraxxa: you can always make the named argument in BUILD mandatory
19:08 abraxxa moritz: sure but default values defined on the attr definition get lost
19:09 abraxxa see scrollback
19:09 abraxxa you need to specify them for the submethod BUILD param instead
19:10 moritz yes
19:10 moritz I can live with that
19:10 moritz it's not quite as pretty, I know
19:10 abraxxa that's a pitfall as I've just shown
19:11 abraxxa what if a class specifies a default value for an attr and has no submethod BUILD and someone subclasses it and specifies one?
19:12 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } } Foo.new(); say Foo.AutoCommit;
19:12 camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7lP_ebfTYU␤Strange text after block (missing semicolon or comma?)␤at /tmp/7lP_ebfTYU:1␤------> 3w = 1; submethod BUILD( :$!svchp ) { } }7⏏5 Foo.new(); say Foo.AutoCommit;␤    expecting any of:␤ …»
19:12 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new(); say Foo.AutoCommit;
19:12 camelia rakudo-moar 425476: OUTPUT«Cannot look up attributes in a type object␤  in method AutoCommit at src/gen/m-CORE.setting:3983␤  in block <unit> at /tmp/_E6QzBroJl:1␤␤»
19:12 masak so, I just removed https://github.com/rakudo/rakudo/blo​b/nom/src/vm/moar/Perl6/Ops.nqp#L460 locally; RT #124191 is still present afterwards :/
19:12 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124191
19:13 masak so it's something deeper, then.
19:13 dalek rakudo/nom: ee7a375 | jnthn++ | src/vm/moar/Perl6/Ops.nqp:
19:13 dalek rakudo/nom: Remove dupe register free; masak++.
19:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ee7a3752d9
19:13 arnsholt I'm with moritz on required nameds to BUILD versus die() for the default value
19:13 masak oh, jnthn++ beat me to it.
19:13 masak was still spectesting.
19:13 arnsholt In particular, it exposes more information via introspection than the die() default value
19:13 masak jnthn: RT #124191 is still at large, even after that remove.
19:13 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124191
19:13 masak jnthn: so there is *something* wrong with that code.
19:13 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new(); say Foo.AutoCommit;
19:13 camelia rakudo-moar 425476: OUTPUT«Cannot look up attributes in a type object␤  in method AutoCommit at src/gen/m-CORE.setting:3983␤  in block <unit> at /tmp/SAvXZpTgrE:1␤␤»
19:14 masak jnthn: if you can't see it immediately, I'd recommend rolling back the original commit that created that op.
19:14 jnthn masak: That may fix *something*, but given the generated code works before dynamic optimization kicks in, it's fairly clear we're looking for a problem there.
19:14 jnthn masak: Nope, wrong approach.
19:14 masak if you say so.
19:14 abraxxa arnsholt: agreed as I also don't want to type the same error message over and over
19:14 jnthn masak: It's pretty obvious from what we know that the commit in question generates valid code.
19:15 masak we have a bug in the nom branch right now, and a way to make it go away until we learn what's going on.
19:15 masak jnthn: ah, so you're saying we should look at how it's optimized/speshed instead?
19:15 dalek rakudo/moreinput: 7110fdb | peschwa++ | src/Perl6/Grammar.nqp:
19:15 dalek rakudo/moreinput: NQPMu, not Nil. Also check if we actually want more input.
19:15 dalek rakudo/moreinput: review: https://github.com/rakudo/rakudo/commit/7110fdb62b
19:16 masak I agree with that, I just don't see why we wouldn't remove the source of the bug in the meantime. creating a more stable nom branch.
19:16 jnthn masak: Yes; presumably setting MVM_SPESH_DISABLE=1 makes it go away
19:16 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new();
19:16 camelia rakudo-moar 425476: ( no output )
19:16 masak very probably.
19:16 * masak tries
19:16 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new(); say Foo.AutoCommit();
19:16 camelia rakudo-moar 425476: OUTPUT«Cannot look up attributes in a type object␤  in method AutoCommit at src/gen/m-CORE.setting:3983␤  in block <unit> at /tmp/Lx28sBppz3:1␤␤»
19:16 jnthn masak: Because it's not like this just appeared; it was possible to hit it for O(months)
19:16 masak jnthn: yes, setting MVM_SPESH_DISABLE=1 makes it go away.
19:17 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; my $foo = Foo.new(); say $foo.AutoCommit;
19:17 camelia rakudo-moar 425476: OUTPUT«1␤»
19:17 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; my $foo = Foo.new( AutoCommit => 0); say $foo.AutoCommit;
19:17 camelia rakudo-moar 425476: OUTPUT«1␤»
19:17 jnthn masak: Right, so that narrows down where we're looking quite significantly.
19:17 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp, :$.AutoCommit ) { } }; my $foo = Foo.new( AutoCommit => 0); say $foo.AutoCommit;
19:17 camelia rakudo-moar 425476: OUTPUT«0␤»
19:17 moritz m: class Foo { has $!svchp; has $.AutoCommit is rw; submethod BUILD( :$svchp, :$AutoCommit = 1 ) { }; say Foo.new.AutoCommit
19:17 camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vIigUb64DN␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/vIigUb64DN:1␤------> 3Commit = 1 ) { }; say Foo.new.AutoCommit7⏏5<EOL>␤    expecting any of:␤        postfix␤  …»
19:17 masak jnthn: not gonna argue with you about reverting the commit -- if you prefer that it stay, it stays. but how do we find the optimize/spesh bug?
19:17 moritz m: class Foo { has $!svchp; has $.AutoCommit is rw; submethod BUILD( :$!svchp, :!$AutoCommit = 1 ) { }; say Foo.new.AutoCommit
19:17 camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7ZT1LFra_h␤Malformed parameter␤at /tmp/7ZT1LFra_h:1␤------> 3mmit is rw; submethod BUILD( :$!svchp, :7⏏5!$AutoCommit = 1 ) { }; say Foo.new.Auto␤    expecting any of:␤        formal parameter␤…»
19:18 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp, :$.AutoCommit ) { } }; my $foo = Foo.new( AutoCommit => 0); say $foo.AutoCommit;
19:18 camelia rakudo-moar 425476: OUTPUT«0␤»
19:18 abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp, :$.AutoCommit ) { } }; my $foo = Foo.new(); say $foo.AutoCommit;
19:18 camelia rakudo-moar 425476: OUTPUT«(Any)␤»
19:18 jnthn masak: Well, looking at the spesh log for one
19:18 abraxxa moritz: ^^ that's the suboptimal case
19:18 jnthn masak: Though we might try disabling other bits to narrow it further
19:18 moritz abraxxa: yes. Just avoid it.
19:18 abraxxa moritz: can we add a warning for it?
19:18 kjs_ joined #perl6
19:19 moritz abraxxa: can you?
19:19 masak jnthn: I don't have the skills to do that at present. hoping that someone else finds the tuits to do that.
19:19 Foxcool joined #perl6
19:19 abraxxa moritz: maybe if you point me at the right file(s)
19:20 jnthn masak: There's more env vars
19:20 jnthn masak: If you moar --help they're there
19:20 jnthn masak: Seems that they do help too...
19:20 moritz abraxxa: I guess the right place would be in method compose of ClassHOW
19:20 jnthn masak: Setting MVM_SPESH_INLINE_DISABLE=1 also makes it go away
19:20 moritz abraxxa: src/Perl6/Metamodel/ClassHOW.nqp
19:21 travis-ci joined #perl6
19:21 travis-ci Rakudo build passed. jnthn 'Remove dupe register free; masak++.'
19:21 travis-ci http://travis-ci.org/rakudo/rakudo/builds/56323164 https://github.com/rakudo/rakudo/c​ompare/d24f30015c31...ee7a3752d9d2
19:21 travis-ci left #perl6
19:21 abraxxa moritz: thanks
19:22 jnthn masak: Meaning that we can blame it on inlining busting...something.
19:23 jnthn masak: Further, you don't need a custom exception type for it
19:31 masak wow.
19:31 masak so I could've golfed it further?
19:31 masak fancy that :)
19:31 xfix Bitwise operators are so confusing. The one in Perl 5 is like opposite of one in Perl 6.
19:31 abraxxa moritz: maybe in compose_attributes?
19:31 xfix Perl 5.22 introduces numeric bitwise operators like &. - when in Perl 6 it is +&.
19:32 jnthn masak: Yeah, Exception.new
19:32 xfix (I wonder if there was a reason to not use Perl 6 operators, or if they just weren't considered)
19:33 masak m: for ^207 { die Exception.new(); CATCH { default {} } }
19:33 camelia rakudo-moar d24f30: ( no output )
19:33 masak m: for ^208 { die Exception.new(); CATCH { default {} } }
19:33 camelia rakudo-moar d24f30: OUTPUT«␤  in block  at /tmp/ZLP2WH1C3n:1␤␤»
19:33 masak jnthn++
19:34 masak xfix: surely numeric bitwise operators existed already before 5.22, though? spelled just `&`, etc.
19:34 xfix I mean, https://metacpan.org/pod/release/XSAWYERX/perl-​5.21.9/pod/perldelta.pod#New-bitwise-operators
19:34 xfix Although, looking at it, the reason may have been ~ operator.
19:34 masak oh, the `&.` treats it as a string.
19:35 xfix &. treats it as a number, to confuse things further
19:35 masak yeah, that's consistent from a p5 perspective, where the `.` operator means what it does.
19:35 masak xfix: no, you're reading it wrong.
19:35 xfix Oh.
19:35 masak xfix: it's `&` that treats it consistently as a number.
19:35 xfix Interesting.
19:35 abraxxa moritz: are the OO internals documented somewhere?
19:35 masak #123466
19:35 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123466
19:36 xfix Finally Perl 5 has consistent bitwise operators.
19:36 masak xfix: interesting discussion about it here: https://rt.perl.org/Ticket/Display.html?id=123466
19:37 xfix I complained before about $a + 1 making $a numeric, even if it shouldn't logically do anything.
19:37 moritz abraxxa: http://doc.perl6.org/language/mop#S​tructure_of_the_meta_object_system might be a good entry point
19:38 abraxxa moritz: i was just reading through that ;)
19:38 masak xfix: that's a very deep Perl (5 and 6) feature.
19:38 masak xfix: oh, you mean changing the $a itself.
19:38 xfix It still exists in Perl 6?
19:38 masak xfix: yeah, that's just p5 being weird.
19:39 masak no, I misunderstood you.
19:39 masak thought you were talking about the casting as such.
19:39 abraxxa moritz: so I'd need to check if there is a submethod BUILD, if yes inspect it's params and check each if there is an attr with the same name that has a default value?
19:39 zakharyas joined #perl6
19:39 xfix http://codepad.org/8R31X28Y
19:39 masak xfix: I was reading through that RT ticket discussion seeing if they had ever considered `.&`, which would be the more consistent one with Perl 6's `~&`. seems not.
19:39 abraxxa xfix: you'd normally do + 0 for numification in p5 ;)
19:40 flussence masak++ jnthn++ # panda install works again, didn't an hour ago
19:40 xfix I know, but this is not what I talk about.
19:40 jnthn flussence: FROGGS++ is largely/most/maybe entirely to thank for that, I think :)
19:40 masak flussence: I didn't have anything to do with that, I think :)
19:40 flussence well, FROGGS++ too :)
19:40 jnthn flussence: masak++ and I have tracking a diffrent bug
19:40 xfix I mean, if you do $fun + 1 that isn't used for anything, $fun changes internally into numeric variable.
19:41 xfix There is no loss of value, but bitwise operators and ++ can get confused.
19:41 jnthn masak: I've a feeling it is a much more general issue.
19:42 xfix http://codepad.org/v7wLqHOy
19:42 moritz abraxxa: something like that, yes
19:43 * masak adds the conversationg so far to the ticket
19:44 abraxxa moritz: at which point in method compose should that happen?
19:44 abraxxa moritz: i'm not sure if before or after compose_attributes
19:48 psch FROGGS: i have gdb'd, but i have no idea how to patch MVM_string_concatenate not to SEGV there
19:48 psch i suppose that means "golf and ticket to moarvm"
19:48 mj41 hoelzro: I saw the PR. hoelzro++
19:49 abraxxa what does the ^ mean in say A.^methods(:all); ?
19:50 moritz abraxxa: it means A.HOW.methods(A, :all)
19:50 vendethiel mop-y
19:50 b2gills xfix: actually it makes it so that $a in `$a + 0` *also* contains a numeric value if it was a string.
19:50 abraxxa moritz: similiar to what i guessed, thanks.
19:50 psch fwiw, nqp-m -e'nqp::say(nqp::readlineintfh(nqp::getstdin, "> "))' and hitting ^D is what i golfed it to
19:51 xfix When it logically shouldn't do anything (implementation details aside).
19:51 abraxxa moritz: so inside HOW self.methods(:local); should be sufficient?
19:51 b2gills logically it shouldn't have to do the conversion more than once
19:52 abraxxa why do i get an error when I add say .name for self.methods(:local); to ClassHOW.nqp on make install? does nqp not have say?
19:53 abraxxa i also tried warn without success
19:53 jnthn abraxxa: nqp doesn't have listops, so it has to be say(...)
19:54 jnthn masak: Think I've got it narrowed down to a bad interaction between inlining and exception handler search.
19:54 abraxxa jnthn: thanks!
19:55 psch jnthn: does the NULL handling of MVM_string_decode also belong to your NFG work?  because afaict that's what the readlineintfh SEGV comes down to
19:55 vendethiel "Total number of missing videos where recording did not succeed, sorry: 142", awww, fosdem :(
19:56 masak jnthn: cool.
19:57 abraxxa jnthn: should that me ok in NQP? say(self.methods(:local));
19:57 abraxxa because I get Too few positionals passed; expected 2 arguments but got 1
19:58 jnthn abraxxa: Well, what the error says: you need to pass another positional arg to .methods
19:58 jnthn abraxxa: Of note, the type object, probably available in $obj
19:58 jnthn abraxxa: But the other thing is that arrays don't stringify interestingly in NQP
19:59 jnthn psch: No, sounds orthogonal to NFG. What's up?
19:59 psch jnthn: SIGSEGV when stringifying EOF from readlineintfh
19:59 abraxxa jnthn: i thought self becomes $obj
20:00 jnthn abraxxa: When you're inside a meta-object, self is $obj.HOW
20:00 psch > nqp-m -e'nqp::say(nqp::readlineintfh(nqp::getstdin, "> "))' and hitting ^D is what i golfed it to
20:01 * abraxxa hates stack traces! they completely clutter the screen and are unreadable most of the time anyways
20:01 psch eh, might move that to #moarvm, might be about time i join :)
20:01 jnthn psch: What are we passing to the decode function at that point?
20:02 abraxxa jnthn: is submethod BUILD something special or should it be contained in the regular MethodContainer?
20:03 jnthn abraxxa: Just a normal submethod
20:04 abraxxa jnthn: i get 'cannot stringify this' for say(self.methods($obj, :local)); although type Method does Str
20:04 jnthn Sure, but self.methods returns an NQPArray
20:04 jnthn Which doesn't know how to stringify
20:05 jnthn abraxxa: What're you aiming to do, by the way?
20:05 abraxxa jnthn: http://doc.perl6.org/routine/metho​ds#role_Metamodel::MethodContainer doesn't say so
20:05 jnthn abraxxa: That's different
20:06 abraxxa jnthn: adding a warning for the case I described earlier when you have an attribute with a default value and also a submethod BUILD which makes the default value of the attr a no-op
20:06 _edwin joined #perl6
20:06 jnthn abraxxa: The NQP array is coerced to a Perl 6 array
20:06 jnthn abraxxa: When it's returned to Perl 6 code
20:07 abraxxa are there docs for NQP?
20:07 jnthn Well, there's the Rakudo/NQP internals course
20:07 jnthn I'm...dubious about that warning. Or rather, wondering exactly where it belongs.
20:08 abraxxa jnthn: http://paste.scsys.co.uk/470653
20:09 virtualsue joined #perl6
20:09 jnthn abraxxa: I told you, you can't stringify and array in NQP. You'll have to loop over the elements.
20:09 jnthn *an
20:09 jnthn I'm still a bit unsure whether putting said warning in the MOP is the way to go, though.
20:11 jnthn If you want to grab the curent class's BUILD then you'd be better calling submethod_table which gives you a hash you can look up BUILD in by name.
20:12 jnthn I guess at that point you end up having to introspect the signature and parameters of the method.
20:12 abraxxa jnthn: does that only give 'local' methods and not those of parent classes or composed roles?
20:12 jnthn abraxxa: You'll get those of composed roles
20:12 jnthn Not parent classes.
20:15 abraxxa works ;)
20:16 abraxxa jnthn: should I use find_method instead?
20:18 jnthn abraxxa: No, because that will search parent classes, etc.
20:18 jnthn And probably is overkill.
20:18 jnthn You care about BUILD in the current class I guess
20:19 abraxxa ok
20:22 abraxxa jnthn: what's wrong with that? %meths<BUILD>.signature.params
20:22 moritz you want submethod_table, I think
20:22 jnthn Well, I guess that's where he got %meths from
20:22 jnthn I don't know what's wrong with it
20:23 jnthn Except if BUILD doesn't exist in the class
20:23 jnthn So that'd need to be wrapped up in an nqp::existskey(%meths, 'BUILD')
20:23 jnthn uh, wrapped up in an 'if' conditioned on...
20:25 abraxxa jnthn: i have if nqp::existskey(%meths, 'BUILD') { before that
20:25 abraxxa the error message is Cannot find method 'params'
20:26 abraxxa http://doc.perl6.org/type/Method says there is a method 'signature' which returns the Signature object which according to http://doc.perl6.org/type/Signature#method_params should have params
20:28 ugexe did rakudo/moar get significantly faster in the last week? things seem to be building quicker
20:31 FROGGS ugexe: lazy deserialization was turned on again
20:34 eli-se awesome!
20:45 brrt joined #perl6
20:51 abraxxa jnthn: i can't find the class that signature returns, giving up for today
20:52 jnthn abraxxa: OK, I'm not sure what's going on there either, I'm afraid...
20:54 abraxxa FROGGS: i'll continue when 'is rw' support for NativeCall has landed
20:55 abraxxa at least I know now what's going on
20:55 eli-se jnthn: your talks are good.
20:58 abraxxa good night!
21:07 jnthn eli-se: :)
21:07 * jnthn has fun doing them
21:10 kjs_ joined #perl6
21:14 eli-se good!
21:16 sftp_ joined #perl6
21:19 eli-se joined #perl6
21:21 * psch &
21:29 rudi_s Does perl6 support poll/select/epoll to handle many simultaneous network connections?
21:30 masak 'night, #perl6
21:34 kjs_ joined #perl6
21:35 eli-se rudi_s: I hope it's a VM implementation detail. But there doesn't appear to be such a thing on doc.perl6.org
21:40 rudi_s eli-se: Hm. Too bad. - Just checked rakudo.org and it seems both threads and non-blocking I/O are still work in progress.
21:40 rudi_s I guess I'll have to wait a bit longer until I can use perl6.
21:41 timotimo rudi_s: we do have async I/O with sockets
21:41 timotimo but there's instabilities here and there
21:42 timotimo i stumbled over some not so nice things yesterday when i was working with HTTP::Server::Async
21:43 timotimo our async i/o is based on libuv, but currently we're not making full use of the ability to sleep
21:45 rudi_s timotimo: Could you give me some pointers how to use sockets with async I/O? Basically all I need is to get called when data is available on a socket.
21:46 timotimo sure, you'd build a IO::Socket::Async, connect that and then "tap" its bytes_supply or its chars_supply
21:46 timotimo names could slightly vary; i'm not touching sockets myself, just using them through HTTP::Server::Async
21:46 coffee` joined #perl6
21:48 rudi_s timotimo: Thanks. How do I wait until data is available?
21:48 timotimo you can coerce a Supply into a Channel or a List
21:49 timotimo you can .receive on a Channel to block or .poll to check
21:49 timotimo i'm not sure how well blocking on a regular socket in a start { ... } block works; it should work well
21:52 timotimo annoyingly, MoarVM will busy-wait rather than infinite-timeout on the thread that handles event-loopy things
21:55 rudi_s timotimo: How can I coerce a supply to a channel (pointer to doc is fine, still new to perl6).
21:55 rudi_s Hm, that doesn't sound good.
21:55 timotimo just .Channel on it
21:55 timotimo i think it'll be quite simple to fix; just need to figure out a design that doesn't suck :)
21:56 rudi_s Thanks. Can I get a list of all available functions of an object?
21:56 timotimo the reason why it's busy-waiting is that it needs to regularly check if other threads want to start a GC run
21:56 timotimo sure, say $foobar.^methods>>.name
21:58 timotimo ideally, the event-loop thread would wait for a signal from the GC and sleep until something happens or that signal gets triggered
21:58 timotimo for now, the event loop thread will max out a cpu; locally i just put a usleep(50) into the idle handler and the cpu usage has gone down to almost 0
21:58 rudi_s timotimo: Thanks. Where can I find doc about stuff like ^methods? - What does >>.name do?
21:59 timotimo >>.name is the same as .map({ $_.name })
21:59 timotimo almost the same
21:59 larion joined #perl6
21:59 timotimo "hyper operator"; the ^methods and stuff would be in the "meta-object protocol" language doc, hold on
21:59 timotimo http://doc.perl6.org/language/mop
21:59 nbrown joined #perl6
22:00 timotimo hm, actually
22:00 timotimo that's not that helpful for that, it seems
22:00 timotimo http://doc.perl6.org/langu​age/classtut#Introspection
22:02 rudi_s timotimo: Thank you.
22:02 timotimo you're welcome; always open for questions :)
22:03 timotimo (but right now i'm a bit distracted and it seems like most of the euro-people are AFK and/or asleep)
22:03 davido_ joined #perl6
22:04 larion joined #perl6
22:08 timotimo the async i/o stuff and multithreading stuff isn't battle-tested and there are known (but not necessarily properly located and identified) weak points where things may go explodey every now and then ;(
22:09 Vlavv_ joined #perl6
22:15 prime joined #perl6
22:15 prime joined #perl6
22:19 khisanth_ joined #perl6
22:21 eli-se Is there a bottom type?
22:21 timotimo we have Mu, from which everything derives
22:21 RabidGravy has anyone made anything over Supply that's sugar to make something like the Node.js EventEmitter?  It's quite obvious so I'm be surprised if not
22:22 timotimo what does EventEmitter do?
22:22 eli-se timotimo: that's the top type, not the bottom type.
22:22 timotimo oops
22:22 eli-se bottom derives from everything and has no values.
22:23 eli-se it's useful in certain covariant settings (I don't know whether roles support covariance) and as a return type for subroutines that never return
22:23 RabidGravy f.on('thing", function () {}); ....... f.emit("thing", { });
22:24 prime joined #perl6
22:24 prime joined #perl6
22:24 timotimo that seems exactly like giving f a Supply as an attribute named "thing" and tapping it to run that function
22:25 RabidGravy like I say obvious :)
22:26 RabidGravy with a sugar over Supply.grep on the "subscription"
22:26 colomon joined #perl6
22:28 RabidGravy actually yeah, bang on a hash of supplies in the object. Duh.
22:32 eli-se But perhaps, with Perl 6' powerful object model, the bottom type can be implemented. :)
22:36 colomon joined #perl6
22:42 davido_ joined #perl6
22:44 virtualsue_ joined #perl6
22:56 eli-se byebye!
23:00 * raydiak wonders if "method emit(Supply:D: msg)" could/should use "|msg" instead
23:01 colomon joined #perl6
23:04 * raydiak also wonders if failed dispatch to a tap should be silently ignored so we could write e.g. $s.tap: -> "event" { ... } as another way to do $s.grep("event").tap: -> { ... };
23:05 eiro joined #perl6
23:06 dalek rakudo-star-daily: 4893fee | coke++ | log/ (9 files):
23:06 dalek rakudo-star-daily: today (automated commit)
23:06 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/4893fee2ff
23:07 dalek perl6-roast-data: 505e810 | coke++ | / (9 files):
23:07 dalek perl6-roast-data: today (automated commit)
23:07 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/505e810eac
23:08 silug joined #perl6
23:12 telex joined #perl6
23:25 silug joined #perl6
23:41 ugexe i cant get panda to submit test reports
23:41 ugexe hasnt been working for about 1.5 weeks
23:42 ugexe i already nuked my installs and reinstalled
23:48 larion joined #perl6
23:52 tinyblak joined #perl6

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

Perl 6 | Reference Documentation | Rakudo