Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-12-14

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 rubio_terra joined #perl6
00:10 AlexDaniel ouch, something ate my newlines
00:15 Zoffix AlexDaniel, BTW, I think my new IRC::Client API addresses all the concerns you've mentioned. See this example and one below it: https://github.com/zoffixznet/perl6-IRC-Clien​t/tree/bleed#basic-response-to-an-irc-command
00:16 Zoffix (or at least, I assume you don't have to `await` a promise for it to complete)
00:16 Zoffix You can start a Promise to do async stuff and give it the $irc object to respond whenever its done.
00:16 Zoffix You can also do some setup using register method (e.g. setup some timed events)
00:17 dalek specs: 9fe53ed | (Stéphane Payrard)++ | S99-glossary.pod:
00:17 dalek specs: some new entries
00:17 dalek specs: review: https://github.com/perl6/specs/commit/9fe53edd1d
00:17 Zoffix And you can return IRC_NOT_HANDLED constant for the event to propagate further through the chain or return IRC_HANDLED constant (this happens automatically by default) to stop the chain.
00:18 Zoffix (only the SYNOPSIS has been updated; not the rest of the docs)
00:19 * flussence fumbles around blindly to figure out what to replace %*CUSTOM_LIB<site>~'/bin' with in $PATH... unsure if it's safe to go back to hardcoding it yet
00:22 flussence m: say $*REPO.repo-chain[1].writeable-path.child('bin') # am I doing it right?
00:22 camelia rakudo-moar a342eb: OUTPUT«"/home/camelia/rakudo-m-i​nst-1/share/perl6/site/bin".IO␤»
00:25 jnthn Phew, advent post done \o/
00:28 jnthn 'night o/
00:28 snarkyboojum joined #perl6
00:32 znpy joined #perl6
00:33 AlexDaniel Zoffix: this sounds great! I'll check it out as soon as I have some free time (hopefully this Sunday)
00:34 AlexDaniel Zoffix: thanks letting me know
00:34 AlexDaniel for*
00:35 cognominal_ jnthn++
00:36 AlexDaniel Zoffix: by checking it out I mean porting one of my bots to it :)
00:42 Zoffix AlexDaniel, k. just remember the new version is in the "bleed" branch for now :) This week I'll be making my New Years bot and if it goes well, then I'll merge into master
00:44 AlexDaniel Zoffix: what if I want to create a logging plugin?
00:45 AlexDaniel Zoffix: let's say that there is one plugin that acts on .botsnack and another one that logs stuff
00:46 AlexDaniel Zoffix: when .botsnack is received, this module will handle it and it will not return IRC_NOT_HANDLED
00:46 AlexDaniel Zoffix: which means that another logging module will not receive that event
00:46 AlexDaniel Zoffix: do I get it right?
00:46 Zoffix Right
00:46 AlexDaniel any possible solution to this?
00:46 Zoffix But you can put the logging plugin as the first one in the chain
00:46 Zoffix use IRC::Client::Plugin; class IRC::Client::Plugin::Logging; method event ($irc, $e) { spurt 'log.txt', $e, :append; return IRC_NOT_HANDLED; };
00:47 Zoffix So the Logging plugin runs (and logs) it returns IRC_NOT_HANDLED; so the event continues to go through the plugin chain, and reaches to your .botsnack handler that responds to botsnack
00:47 AlexDaniel yeah, that's going to work
00:48 Zoffix \o
00:48 Zoffix /
00:51 uruwi joined #perl6
00:51 AlexDaniel Zoffix: by the way, have you thought about abusing some of the Perl 6 features to get this thing working? It is not necessarily the best solution, but it is kinda an interesting thing to think about. For example, what if each handler adds a new method to some class, and then you just let multiple dispatch to handle it? :)
00:52 AlexDaniel or something with 「callsame」 :)
00:55 Zoffix Not sure what callsame does. But adding methods to some class and doing multiple dispatch sounds.. complicated... How do multiple plugins handle the same event? Say, a factoid plugin and a google search plugin, where if a factoid is not found your bot does a google search, when responding to a !foo command?
00:56 AlexDaniel good question! If multiple dispatch called some particular multi method, is there any way to say “OK I can't handle it, find some other alternative”? :)
00:57 AlexDaniel Zoffix: callsame is like super() in other languages. Yeah, probably not so appropriate for that task
00:58 AlexDaniel “Within a multiple dispatch, nextsame means to try the next best match, or next best default in case of tie.”
01:00 AlexDaniel m: multi sub foo(‘hello’) { say ‘one’; nextsame }; multi sub foo($x) { say ‘two’ }; foo(‘hello’)
01:00 camelia rakudo-moar a342eb: OUTPUT«one␤two␤»
01:00 AlexDaniel Zoffix: look!
01:00 AlexDaniel m: multi sub foo(‘hello’) { say ‘one’; callsame }; multi sub foo($x) { say ‘two’ }; foo(‘hello’)
01:00 camelia rakudo-moar a342eb: OUTPUT«one␤two␤»
01:01 AlexDaniel so instead of doing 「return IRC_NOT_HANDLED;」 you just do 「nextsame」.
01:03 Actualeyes joined #perl6
01:06 Zoffix Actually, I'm not sure how to "add a method to some class" either :)
01:07 yeahnoob joined #perl6
01:09 AlexDaniel Zoffix: ^add_method perhaps?
01:09 AlexDaniel Zoffix: http://doc.perl6.org/routine/add_method
01:09 AlexDaniel Zoffix: http://doc.perl6.org/type/Metamo​del::MethodContainer#add_method
01:11 AlexDaniel oh wow! Check out the type graph here http://doc.perl6.org/type/​Metamodel::MethodContainer
01:11 Zoffix Well, if that's involved, right away I see making plugins more annoying. 'cause right now you could just write, say,  method private-me ($irc, $e) { $irc.privmsg: $e<who><nick>, "Leave me alone"; } in your class and your client will now rudely respond to all private /msg to it.
01:11 Zoffix But doing ^add_method stuff is more involved than just defining a method
01:12 AlexDaniel Zoffix: it could be done internally
01:12 AlexDaniel Zoffix: but yeah, I'm not saying that you should do it. It's just an interesting thing to think about
01:12 Zoffix Perhaps, but it's beyond my current Perl 6 knowledge :)
01:25 kanishka joined #perl6
01:36 ifim joined #perl6
01:39 dalek Heuristic branch merge: pushed 23 commits to rakudo/gsr by TimToady
02:06 llfourn joined #perl6
02:16 TEttinger joined #perl6
02:17 molaf_ joined #perl6
02:22 lolisa joined #perl6
02:45 Ben_Goldberg joined #perl6
02:56 hoelzro joined #perl6
03:11 vendethiel joined #perl6
03:16 diakopter https://perl6advent.wordpress.com/2015/1​2/14/day-14-a-nice-supplies-syntactic-re​lief-for-working-with-asynchronous-data/   # truly great
03:23 kaare_ joined #perl6
03:26 dmc joined #perl6
03:28 dmc joined #perl6
03:31 noganex_ joined #perl6
04:10 BenGoldberg joined #perl6
04:12 mohij joined #perl6
04:38 geekosaur joined #perl6
04:38 hoelzro joined #perl6
05:26 [Tux] joined #perl6
05:26 perl6-fan joined #perl6
05:42 ugexe joined #perl6
05:46 adu joined #perl6
06:04 cognominal_ m: sub map( @subs where { all(@subs) ~~ Code } , *@v is copy) { @v .=map: $_ for @subs; @v }; say map [ &[+].assuming(4), &[*].assuming(2) ], < 1 2 3 >
06:04 camelia rakudo-moar a342eb: OUTPUT«[10 12 14]␤»
06:04 * cognominal_ wonders if there is a shorter syntax for priming infix ops.
06:05 moritz camelia: * * 2
06:06 moritz erm, meant cognominal_ :-)
06:11 xfix joined #perl6
06:13 cognominal_ m: sub map( @subs where { all(@subs) ~~ Code } , *@v is copy) { @v .=map: $_ for @subs; @v }; say map [ &[+].assuming(:b(4)), &[*].assuming(2) ], < 1 2 3 >
06:13 camelia rakudo-moar a342eb: OUTPUT«Unexpected named parameter 'b' passed␤  in sub trybind at EVAL_1:1␤  in block <unit> at EVAL_1:1␤  in block <unit> at /tmp/mNgZ_XQjv8:1␤␤»
06:13 cognominal_ moritz: and it allows to prime the second parameter :)
06:18 llfourn m: sub map( @subs, *@v is copy) { @v .=map: $_ for @subs; @v }; say map [ * + 4, * * 2 ], < 1 2 3 >
06:18 camelia rakudo-moar a342eb: OUTPUT«[10 12 14]␤»
06:18 llfourn can you use a different character for Whatever so it doesn't look so confusing?
06:19 snarkyboojum joined #perl6
06:20 snarkyboojum left #perl6
06:20 snarkyboojum joined #perl6
06:21 snarkyboojum left #perl6
06:21 skids m: m: sub map( @subs where { all(@subs) ~~ Code } , *@v is copy) { @v .=map: $_ for @subs; @v }; say map [ &[+].assuming(*,1), &[/].assuming(*,2) ], < 1 2 3 > # assuming can prime the second as well, FWIW
06:21 camelia rakudo-moar a342eb: OUTPUT«[1 1.5 2]␤»
06:21 snarkyboojum joined #perl6
06:22 llfourn skids: that's pretty cool
06:24 skids Yeah though whatever currying is probably currently much more efficient -- I used EVAL to implement .assuming, it'll eventually need a refresh to not do that... though with constant folding who knows.
06:25 simcop2387 joined #perl6
06:25 llfourn The code in .assuming scares me :)
06:25 cognominal_ m: constant foo = *; (foo * 4)(5)
06:25 camelia rakudo-moar a342eb: ( no output )
06:25 cognominal_ m: constant foo = *; say (foo * 4)(5)
06:25 camelia rakudo-moar a342eb: OUTPUT«20␤»
06:26 llfourn m: say Perl, so Cool with Whatever # Figured out this is valid Perl 6 the other day
06:26 camelia rakudo-moar a342eb: ( no output )
06:26 skids llfourn: It was mildly hairy, yes.
06:27 skids eek look at the time.
06:28 * skids must sleep.
06:28 llfourn o/ skids
06:29 M-eternaleye joined #perl6
06:30 cognominal_ m: say Perl, not so Cool without Whatever
06:30 camelia rakudo-moar a342eb: OUTPUT«(Perl)True␤»
06:31 llfourn cognominal_: nice!
06:31 llfourn ahahaha
06:34 cognominal_ m: say Perl,  so Cool with all *
06:34 camelia rakudo-moar a342eb: OUTPUT«(Perl)False␤»
06:35 llfourn haha
06:35 llfourn cognominal_++, you're pretty good at this
06:35 cognominal_ lifourn, only derivative, you gave the initial idea
06:38 llfourn m: say Perl, so Cool and has class {} after Version,6
06:38 camelia rakudo-moar a342eb: OUTPUT«(Perl)False␤Use of uninitialized value of type <anon|67528416> in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/krgDpXER7t:1␤Use of uninitialized value of type Version in strin…»
06:38 llfourn hmmm almost
06:39 llfourn m: say Perl, so Cool and has class {} with Version,6
06:39 camelia rakudo-moar a342eb: OUTPUT«(Perl)False␤»
06:40 llfourn False, damn
06:43 cognominal_ m:  Perl, so Cool and has class {} with Version, 6; so True
06:43 camelia rakudo-moar a342eb: OUTPUT«WARNINGS:␤Useless use of "so " in expression "so True" in sink context (line 1)␤»
06:43 llfourn hahaa
06:44 cognominal_ it works in the REPL
06:44 llfourn m:  Perl, so Cool and has class {} with Version, 6; so Whatever # if you are trying to fling off criticism for lack of OO constructs in p5
06:44 camelia rakudo-moar a342eb: OUTPUT«WARNINGS:␤Useless use of "so " in expression "so Whatever" in sink context (line 1)␤»
06:45 llfourn oh that doesn't wrok wither
06:45 llfourn work either*
06:46 llfourn m:  Perl, so Cool and has class {} with Version, 6 - so Whatever # what about..
06:46 camelia rakudo-moar a342eb: ( no output )
06:46 llfourn yes!
06:46 llfourn m: say 6 - so Whatever
06:46 camelia rakudo-moar a342eb: OUTPUT«6␤»
06:46 llfourn haha
06:50 ninereasons joined #perl6
06:58 adhoc joined #perl6
06:59 cognominal_ m: Perl, so Cool with any Version
06:59 camelia rakudo-moar a342eb: ( no output )
06:59 cognominal_ m: Mix and Match
06:59 camelia rakudo-moar a342eb: OUTPUT«Invocant requires an instance of type Mix, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/N6aeYE0r2r:1␤␤»
06:59 llfourn that's an awsome one
06:59 llfourn I'm going to use these in my p6 presentation
06:59 cognominal_ ur welcome
07:01 cognominal_ m: Instant, Perl
07:01 camelia rakudo-moar a342eb: ( no output )
07:06 llfourn I want to use 'but' in some way
07:07 masak m: Perl but not Instant
07:07 camelia rakudo-moar a342eb: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/BII1yF8X2U:1␤␤»
07:07 grondilu m: say min("10", 12);
07:07 camelia rakudo-moar a342eb: OUTPUT«10␤»
07:08 llfourn m: 5 but Real # works
07:08 camelia rakudo-moar a342eb: ( no output )
07:08 cognominal_ m: Perl; CATCH { any Failure but so Cool  }
07:08 camelia rakudo-moar a342eb: ( no output )
07:08 llfourn hahaa
07:09 cognominal_ with CATCH, one get away with any dynamic error
07:09 llfourn mm like with in 'has class {} with Version 6
07:10 llfourn m: any Failure but so Cool with Version, 6
07:10 camelia rakudo-moar a342eb: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/joeivZ4RMV:1␤␤»
07:10 llfourn actually not :P
07:10 llfourn m: (any Failure but so Cool) with Version
07:10 camelia rakudo-moar a342eb: ( no output )
07:10 llfourn ah it was too tiggt
07:10 llfourn tight*
07:11 grondilu m: "10" ~~ /\d+/; say min($/, 12);
07:11 camelia rakudo-moar a342eb: OUTPUT«「10」␤»
07:11 grondilu ah, can't reproduce an error I get locally
07:13 cognominal_ m: BEGIN  with Perl, 6 { take Whatever, gather Cool }
07:13 camelia rakudo-moar a342eb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qi4Dfu8pSj␤An exception occurred while evaluating a BEGIN␤at /tmp/qi4Dfu8pSj:1␤Exception details:␤  take without gather␤    in code  at /tmp/qi4Dfu8pSj:1␤␤»
07:17 cognominal_ m: CATCH { any Instant; BEGIN  { with Perl, 6 { [and] 42 }} }
07:17 camelia rakudo-moar a342eb: ( no output )
07:18 llfourn I don't even.. lol
07:20 llfourn m: say .1 + .2; use v6; Perl but Cool when Rational
07:20 camelia rakudo-moar a342eb: OUTPUT«0.3␤»
07:20 cognominal_ m: CATCH { any Instant; BEGIN  { with Perl, 6 {  Cool but so Rational }} }
07:20 camelia rakudo-moar a342eb: ( no output )
07:20 llfourn ding!
07:20 llfourn haha
07:21 llfourn jinx :)
07:21 cognominal_ m: Perl, not so Complex
07:21 camelia rakudo-moar a342eb: ( no output )
07:21 llfourn gold!
07:24 llfourn m: BEGIN { now with Perl, 6 }
07:24 camelia rakudo-moar a342eb: ( no output )
07:27 domidumont joined #perl6
07:29 llfourn m: BEGIN { Real, Code; CONTROL {} } with v6
07:29 camelia rakudo-moar a342eb: ( no output )
07:30 cognominal_ m: start { Perl with any Linux => Distribution }
07:30 camelia rakudo-moar a342eb: ( no output )
07:31 llfourn niiice
07:31 firstdayonthejob joined #perl6
07:32 domidumont joined #perl6
07:33 cognominal_ m: CATCH { any Linux => Distribution and do Perl with all * }
07:33 camelia rakudo-moar a342eb: ( no output )
07:33 llfourn hahaha!
07:36 llfourn m: start { Perl, Mix with any Linux => Distribution }
07:36 camelia rakudo-moar a342eb: ( no output )
07:36 grondilu m: say map -> $/ { min($<num>, 10) }, "5".match: rx/ $<num> = [\d+] /;
07:36 camelia rakudo-moar a342eb: OUTPUT«(10)␤»
07:36 grondilu m: say map -> $/ { min(+$<num>, 10) }, "5".match: rx/ $<num> = [\d+] /;
07:36 camelia rakudo-moar a342eb: OUTPUT«(5)␤»
07:37 llfourn m: CATCH { any Rat or FatRat with Perl,v6 }
07:37 camelia rakudo-moar a342eb: ( no output )
07:38 grondilu m: say min("5" ~~ /\d+/, 10);
07:38 camelia rakudo-moar a342eb: OUTPUT«10␤»
07:39 grondilu m: say min(+("5" ~~ /\d+/), 10);
07:39 camelia rakudo-moar a342eb: OUTPUT«5␤»
07:39 grondilu ^isn't that suspicious?
07:40 grondilu I mean, am I right in expecting a match to be converted into a number when applied as a &min parameter?
07:41 llfourn m: BEGIN { Perl with v6 }; END { Code without Failure and Backtrace } # and I'm done
07:41 camelia rakudo-moar a342eb: ( no output )
07:41 grondilu m: say ("5" ~~ /\d+/) + 10;
07:41 camelia rakudo-moar a342eb: OUTPUT«15␤»
07:41 grondilu ^after all it's supposed to behave as a number when necessary
07:42 dalek rakudo/gsr: 3cec89a | TimToady++ | src/Perl6/Actions.nqp:
07:42 dalek rakudo/gsr: change wanted/unwanted from procs to funcs
07:42 dalek rakudo/gsr:
07:42 dalek rakudo/gsr: So we can more easily remap void nodes as soon as we know whether
07:42 dalek rakudo/gsr: the value is wanted or not.  (Doesn't do it yet, though.)
07:42 dalek rakudo/gsr: review: https://github.com/rakudo/rakudo/commit/3cec89a92b
07:44 dalek rakudo/nom: f95c144 | TimToady++ | src/Perl6/ (3 files):
07:44 dalek rakudo/nom: Great Sink Refactor
07:44 dalek rakudo/nom:
07:44 dalek rakudo/nom: The actions now actively mark wanted nodes so that useless use errrors
07:44 dalek rakudo/nom: will be suppressed on those nodes.  This marking is recursive on the last
07:44 dalek joined #perl6
07:48 TimToady .tell jnthn Merged the GSR, unfortunately doesn't fix https://rt.perl.org/Ticket/Display.html?id=125769 yet, which seems to be due to lex lowering on binding rather than sinking
07:48 yoleaux TimToady: I'll pass your message to jnthn.
07:48 CIAvash joined #perl6
07:50 jack_rabbit joined #perl6
07:51 _nadim Good morning,
07:51 Woodi hi :)
07:52 grondilu m: say ("5" ~~ /\d+/) cmp 10;
07:52 camelia rakudo-moar 3cec89: OUTPUT«More␤»
07:52 TimToady .tell also tried to preselect the [0] or [2] on v Want nodes, but that ran into grief for some reason, and in fact made it largely impossible to $ast.dump without all sorts of random weirdnesses
07:52 yoleaux TimToady: I'll pass your message to also.
07:52 grondilu m: say +("5" ~~ /\d+/) cmp 10;
07:52 camelia rakudo-moar 3cec89: OUTPUT«Less␤»
07:52 grondilu m: say ("5" ~~ /\d+/) < 10;
07:52 camelia rakudo-moar 3cec89: OUTPUT«True␤»
07:52 grondilu m: say +("5" ~~ /\d+/) < 10;
07:52 camelia rakudo-moar 3cec89: OUTPUT«True␤»
07:52 nine TimToady: you forgot the "jnthn"
07:53 TimToady .tell jnthn also tried to preselect the [0] or [2] on v Want nodes, but that ran into grief for some reason, and in fact made it largely impossible to $ast.dump without all sorts of random weirdnesses
07:53 yoleaux TimToady: I'll pass your message to jnthn.
07:53 TimToady thanks
07:56 FROGGS joined #perl6
07:57 grondilu m: say 1 cmp 2
07:57 camelia rakudo-moar 3cec89: OUTPUT«Less␤»
07:57 grondilu m: say "1" cmp 2
07:57 camelia rakudo-moar 3cec89: OUTPUT«Less␤»
07:58 grondilu m: say "5" cmp 10
07:58 camelia rakudo-moar 3cec89: OUTPUT«More␤»
07:58 grondilu ^does that make any sense to you?
07:58 grondilu m: say "5" cmp 100
07:58 camelia rakudo-moar 3cec89: OUTPUT«More␤»
07:58 grondilu m: say "5" cmp 1000000
07:58 camelia rakudo-moar 3cec89: OUTPUT«More␤»
07:58 masak theyäre compared as strings.
07:58 masak they're*
07:58 grondilu m: say 5 cmp 1000000
07:58 camelia rakudo-moar 3cec89: OUTPUT«Less␤»
07:59 masak there's no way to win in that situation
07:59 masak just don't compare types with heterogenous comparison semantics :P
07:59 * grondilu now remmebers that <=> is the comparison operator for numeric values
07:59 moritz \o
08:00 Hagar_ joined #perl6
08:02 FROGGS o/
08:06 rurban joined #perl6
08:06 esh joined #perl6
08:10 nine Is there a reason for resolve_reposession_conflicts to do anything different than merge_globals?
08:11 darutoko joined #perl6
08:15 lolisa joined #perl6
08:19 vytas joined #perl6
08:19 moritz fwiw I've submitted jnthn++'s advent post to HN: https://news.ycombinator.com/item?id=10729939
08:22 ChoHag joined #perl6
08:22 ChoHag Can I check both halves of a Pair simultaneously in a given/when block? And how do I format the when clause[s]?
08:23 lolisa joined #perl6
08:23 _nadim Just reported this blockless try failing to catch exception http://nopaste.linux-dev.org/?881078&amp;download
08:24 moritz m: given a => 1 { when * eqv a => 2 { say "a => 2" }; when * eqv a => 1 { say "a => 1" }; default say "what now?" }
08:24 camelia rakudo-moar 3cec89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TikpJ0jbCt␤Missing block␤at /tmp/TikpJ0jbCt:1␤------> 3n * eqv a => 1 { say "a => 1" }; default7⏏5 say "what now?" }␤    expecting any of:␤        scoped block␤»
08:25 moritz m: given a => 1 { when * eqv a => 2 { say "a => 2" }; when * eqv a => 1 { say "a => 1" }; default { say "what now?" } }
08:25 camelia rakudo-moar 3cec89: OUTPUT«Useless use of "eqv" in expression "* eqv a => 2 " in sink context␤- QAST::Op(chain &infix:<eqv>) eqv␤  - QAST::Var(lexical $whatevercode_arg_1)␤  - QAST::Op(callmethod new)␤    - QAST::Var(lexical Pair)␤    - QAST::Want␤      - QAST::WVal(Str)…»
08:25 moritz wtf is it printing all those QAST nodes?
08:26 ChoHag How does '* eqv' relate to (the implicit) '$_ ~~'?
08:26 ChoHag I've not looked at eqv much.
08:27 moritz m: say (a => 1) ~~ * eqv (a => 1)
08:27 camelia rakudo-moar 3cec89: OUTPUT«WhateverCode.new␤»
08:27 moritz hm
08:27 Woodi joined #perl6
08:27 moritz I didn't expect the ~~ to curry here
08:28 dalek rakudo/nom: 7c4b456 | (Stefan Seifert)++ | src/core/CompUnit/RepositoryRegistry.pm:
08:28 dalek rakudo/nom: Remove some leftovers from language modules loaders
08:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7c4b456f07
08:28 dalek rakudo/nom: b384d8f | (Stefan Seifert)++ | src/ (2 files):
08:28 dalek rakudo/nom: Fix resolve_reposession_conflicts not resolving anything
08:28 dalek rakudo/nom:
08:28 dalek rakudo/nom: The code still iterated over $orig.FLATTENABLE_HASH as needed in NQP but which
08:28 dalek rakudo/nom: doesn't actually work in Perl 6. It also lacked recursive merging of stashes,
08:28 dalek rakudo/nom: i.e. with Foo::Bar::Baz and Foo::Bar::Qux we would lose the first one as we
08:28 dalek rakudo/nom: found a "Bar" in $current and assumed it was the same.
08:28 dalek rakudo/nom:
08:28 dalek rakudo/nom: Both issues can be fixed by using merge-symbols which gives us the same
08:28 dalek rakudo/nom: semantics as during compilation, with the exception of our scoped functions.
08:28 dalek rakudo/nom: No idea how they could even conflict when they are in different packages like
08:28 dalek rakudo/nom: NativeCall's &mangle_cpp_symbol. But as it seems to work and unification of
08:28 dalek rakudo/nom: compilation and module loading semantics can only be a good thing, we adopt the
08:28 dalek rakudo/nom: "latest wins" semantics of resolve_reposession_conflicts in merge_globals for
08:28 dalek rakudo/nom: now.
08:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b384d8f777
08:28 ChoHag Ooh curry. That's a good idea.
08:29 nine .tell jnthn Do you see anything glaringly wrong in my reasoning for https://github.com/rakudo/​rakudo/commit/b384d8f777?
08:29 yoleaux nine: I'll pass your message to jnthn.
08:29 Ven joined #perl6
08:29 ChoHag I've had a bunch of beef waiting on me for weeks.
08:30 * [Tux] still cannot run tests due to the run_alt issue
08:30 ChoHag Doesn't tell me how $_ ~~ compares to * eqv though.
08:31 moritz ChoHag: in generall, if ~~ finds something invokable on the right-hand side, it invokes it
08:31 bpmedley joined #perl6
08:31 moritz ChoHag: though that doesn't work here, because the ~~ here becomes part of the code object
08:32 ChoHag So eqv would be 'better' for comparing potentially-invokable things with each other without invoking them?
08:32 moritz no
08:32 moritz eqv would be good for comparing pairs
08:32 ChoHag What have Pairs got to do with invokable things?
08:33 nine .tell jdv79 fixed the URI2 bug.
08:33 yoleaux nine: I'll pass your message to jdv79.
08:33 ChoHag Or: Why was (the implicit) $_ ~~ unsuitable in your code snippet above?
08:33 ChoHag Getting rid of the '* eqv' has the same result...
08:33 uruwi joined #perl6
08:34 moritz ChoHag: smart-matching against a Pair has peculiar semantics, which doesn't simply compare the pairs of equality
08:34 moritz ChoHag: which is why I wanted to use eqv
08:34 ChoHag Right. So removing the * eqv only works because the pairs happen to be simple?
08:34 moritz ChoHag: but given/when does smart-matching, so one needs to convert smart-matching to eqv somehow
08:35 moritz m: say (a => 1) ~~ sub { $^x eqv (a => 1) }
08:35 camelia rakudo-moar 3cec89: OUTPUT«True␤»
08:35 moritz m: say (a => 1) ~~ sub { $^x eqv (a => 2) }
08:35 camelia rakudo-moar 3cec89: OUTPUT«False␤»
08:35 moritz but the idea with * eqv failed, so one can write it more verbose
08:35 moritz m: say (a => 1) ~~ { $^x eqv (a => 2) }
08:35 camelia rakudo-moar 3cec89: OUTPUT«False␤»
08:35 moritz m: say (a => 1) ~~ { $^x eqv (a => 1) }
08:35 camelia rakudo-moar 3cec89: OUTPUT«True␤»
08:35 moritz with an explicit code object, for example
08:37 _nadim when a bug is reported, is there a place where one can follow up on it?
08:38 nine _nadim: http://rt.perl.org
08:38 ChoHag It only failed because your default wasn't in a block.
08:38 ChoHag Hmm. But then you corrected that...
08:38 ChoHag m: say $*PERL, $*VM
08:38 camelia rakudo-moar 3cec89: OUTPUT«Perl 6 (6.b)moar (2015.11.44.ge.7.edb.6)␤»
08:39 xinming joined #perl6
08:39 ChoHag m: given a => 1 { when * eqv a => 2 { say "a => 2" }; when * eqv a => 1 { say "a => 1" }; default { say "what now?" } }
08:39 camelia rakudo-moar 3cec89: OUTPUT«Useless use of "eqv" in expression "* eqv a => 2 " in sink context␤- QAST::Op(chain &infix:<eqv>) eqv␤  - QAST::Var(lexical $whatevercode_arg_1)␤  - QAST::Op(callmethod new)␤    - QAST::Var(lexical Pair)␤    - QAST::Want␤      - QAST::WVal(Str)…»
08:40 ChoHag Interesting. That's copy pasta from it having worked in my shell.
08:40 moritz m: given a => 1 { when { $_ eqv (a => 2) } { say 2 } }; when { $_ eqv (a => 1) } { say 1  }; }
08:40 camelia rakudo-moar 3cec89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DnYdn6rwLe␤Unexpected closing bracket␤at /tmp/DnYdn6rwLe:1␤------> 3}; when { $_ eqv (a => 1) } { say 1  }; 7⏏5}␤»
08:41 bjz_ joined #perl6
08:41 moritz m: given a => 1 { when { $_ eqv (a => 2) } { say 2 }; when { $_ eqv (a => 1) } { say 1  }; }
08:41 camelia rakudo-moar 3cec89: OUTPUT«1␤»
08:42 ChoHag Is it supposed to do that? My MOAR is straight 2015.11.
08:42 moritz looks like a bug to me
08:44 _nadim nine: thanks, would be nice it reporting by mail returned a link to the bug entry
08:45 dalek rakudo/nom: 6494c1c | TimToady++ | src/Perl6/Actions.nqp:
08:45 dalek rakudo/nom: enforce unwanted on postinc ops too
08:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6494c1c934
08:45 mk joined #perl6
08:48 pdcawley joined #perl6
08:48 ChoHag Huh.
08:48 ChoHag "when 'foo' => *" and "when foo => *" are different.
08:49 ollej left #perl6
09:00 Upasaka joined #perl6
09:03 abraxxa joined #perl6
09:06 RabidGravy joined #perl6
09:06 masak jnthn++ # https://perl6advent.wordpress.com/2015/1​2/14/day-14-a-nice-supplies-syntactic-re​lief-for-working-with-asynchronous-data/
09:10 sno joined #perl6
09:11 _nadim I enjoyed the three last entries, including jnthn's
09:13 zakharyas joined #perl6
09:21 dakkar joined #perl6
09:21 Peter_R joined #perl6
09:28 RabidGravy jnthn++ # nice article which reminds me that I ought to check that Net::AMQP is still working
09:29 abraxxa i finally found out why the Oracle OCI binds don't work. The bind call passes a pointer to the value to OCI which is executed when execute is called. I need a way to prevent perl to garbage collect the native typed variables I'm generating in a loop. I've tried an array but failed. Any pointers how to solve this?
09:30 FROGGS abraxxa: declare it outside of the loop?
09:30 FROGGS or keep it globally
09:30 abraxxa FROGGS: it's not a single one but all sql bind variables
09:31 abraxxa https://github.com/abraxxa/DBIish/bl​ob/master/lib/DBDish/Oracle.pm6#L471
09:31 abraxxa i was thinking about using a native typed CArray for ints and one for floats
09:33 TEttinger u: ELLIPSIS
09:34 TEttinger m: say "\c[ELLIPSIS]"
09:34 camelia rakudo-moar 6494c1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ADY3gLvefC␤Unrecognized character name ELLIPSIS␤at /tmp/ADY3gLvefC:1␤------> 3say "\c[ELLIPSIS7⏏5]"␤»
09:34 FROGGS abraxxa: hmmm, keeping an array (or carray) in the execute method before the for loop should be enough
09:34 abraxxa FROGGS: still segfaults
09:34 FROGGS .u ELLIPSIS
09:34 yoleaux U+0EAF LAO ELLIPSIS [Lo] (ຯ)
09:34 yoleaux U+1801 MONGOLIAN ELLIPSIS [Po] (᠁)
09:34 yoleaux U+2026 HORIZONTAL ELLIPSIS [Po] (…)
09:34 FROGGS m: say "\c[LAO ELLIPSIS]"
09:34 camelia rakudo-moar 6494c1: OUTPUT«ຯ␤»
09:35 _nadim Could someone clarify why a Grammar returns a Match object with keys corresponding to tokens when a regexp match return a Match with one key (0) set to Nil? why is that key there?
09:35 FROGGS abraxxa: then you potentially have to store more stuff outside of the loop
09:35 abraxxa FROGGS: should i put the values or the pointers into the array?
09:36 FROGGS abraxxa: that does not matter I think... so, you can put whatever in the array which is easier to handle
09:37 abraxxa i've tried both
09:37 FROGGS hmmm
09:38 FROGGS abraxxa: what gets collected exactly? I can't spot it
09:39 abraxxa $value/$valuep
09:39 abraxxa FROGGS: but as nobody could tell me how I can debug NativeCall that's just a guess
09:40 snarkyboojum joined #perl6
09:41 FROGGS these can't be collected
09:41 FROGGS they are kept because @params is alive
09:42 llfourn joined #perl6
09:43 abraxxa those are the Perl6-typed values, not the native typed $value's
09:44 FROGGS you are talking about $valuep, right?
09:45 abraxxa yes
09:46 abraxxa sorry, my local code has changed a bit
09:46 FROGGS this is declared in the block where you make the call to the C function, so this one cannot have been collected either
09:46 abraxxa as p stands for pointer i've named them $value and generate a Pointer to it manually and don't use 'is rw'
09:46 abraxxa the C function just stores the pointer but the memory is accessed only later when OCIStmtExecute is called
09:46 abraxxa which is after the loop
09:48 abraxxa i wasn't sure what happens when I push the native typed $valuep onto a perl Array
09:48 sno joined #perl6
09:48 abraxxa is that a copy in memory or not?
09:48 abraxxa so I tried binding because if I understand the container docs correctly that won't make a container but use the existing one
09:48 FROGGS I dont know... depends if the OCIBindByName_* function makes a copy or not
09:49 abraxxa it doesn't
09:49 abraxxa it just a pointer to a location in memory that will be accessed on execute
09:49 FROGGS and you *are* using 'is rw': https://github.com/abraxxa/DBIish/bl​ob/master/lib/DBDish/Oracle.pm6#L184
09:49 abraxxa i need to make sure that the memory region contains a native typed value and isn't gced
09:50 abraxxa not any more locally
09:50 abraxxa Pointer[sword]      $valuep,
09:50 FROGGS declare an array before the loop, and push the $valuep to it
09:50 abraxxa my $valuep := Pointer[sword].new($value);
09:50 FROGGS abraxxa: again, it does not help if I see code which is not the code you have problems with :/
09:51 abraxxa is an Array sufficient or does it need to be a CArray?
09:51 FROGGS an array will do
09:51 abraxxa the 'is rw' can't be used in this case, right?
09:51 FROGGS no, most likely not
09:51 abraxxa or should it be ok as long as I ensure that $value isn't gc-ed by pushing it onto an array?
09:51 FROGGS because it will create a pointer temporarily, which seems to be the problem as you say
09:52 abraxxa the pointer in Perl 6 land getting gc-ed should be ok as the C library will still hold it, no?
09:52 FROGGS no
09:53 FROGGS we're freeing that pointer after making the call to the C function
09:53 moritz and reusing the memory for something else
09:53 moritz possibly
09:53 FROGGS aye
09:53 abraxxa what does 'freeing a Pointer mean'?
09:53 abraxxa the destination memory location?
09:53 abraxxa even if a var is referencing it ($value)?
09:54 abraxxa what I'm doing is: my sword $value = $v; my $valuep := Pointer[sword].new($value);
09:54 FROGGS abraxxa: we're giving up ownership of that memory so that the OS can use it
09:54 abraxxa the first is to get a native typed value
09:54 abraxxa FROGGS: that would explain the segfault
09:54 FROGGS which means that we cannot access it again afterwards, even not from C
09:54 abraxxa which happens at home, here is just inserts random data
09:54 abraxxa both 64bit Ubuntu 15.10 with 2015.11
09:55 FROGGS abraxxa: do it simple, push all stuff you pass to the OCIBindByName_* functions to an array
09:55 FROGGS (a single array will do)
09:56 abraxxa ok
09:56 ChoHag m: multi a ($foo) { say "ina", callwith($foo, :adverb) }; multi a ($foo, :$adverb!) { return True }; say "out", a("123")
09:56 camelia rakudo-moar 6494c1: OUTPUT«inaNil␤outTrue␤»
09:56 abraxxa i've moved four vars out of the loop because for now they are always the same
09:56 abraxxa but will do that for all others
09:56 ChoHag Is that right?
09:57 brrt joined #perl6
09:57 ChoHag I hope not, because it's weird.
09:59 ChoHag Hmm even weirder, when I had a similar construct in a class the adverbial function actually got called, but it didn't there and it didn't in my reduced version just now...
10:01 abraxxa is it planned to fix the error output bug before 6c release?
10:01 abraxxa the 'Unhandled exception: Cannot unbox a type object' we've looked at some weeks ago already
10:02 abraxxa using --ll-exception shows the correct error
10:03 ChoHag Well I can't get callwith to re-call a multi with different arguments on the command line, so I've no idea why it is in code, but I take it that means callwith is _only_ for stepping up the inheritence hierarchy?
10:05 moritz ChoHag: multis are topologically sorted by narrowness; callwith only lets you re-dispatch to wider multi candidates than the one you're in
10:05 moritz and the invocant is simply the first argument, and plays ordinarily into the candidate sorting
10:06 abraxxa how can I get a pointer to a memory that's managed by a C lib?
10:11 profan abraxxa: you probably want to look at this: http://doc.perl6.org/language/nativecall
10:11 abraxxa profan: doesn't help, have it open all the time
10:12 profan so more specifically, what are you trying to do?
10:13 abraxxa pass the Oracle OCI library bind values
10:13 profan did you take a look at the examples in the zavolaj repo too?
10:13 abraxxa it works by binding native types vars to placeholder variables which are access on execute
10:14 abraxxa none of the C libs I've found Perl 6 bindings for have such an API
10:14 profan ?
10:14 profan wops, wrong channel for that aone
10:15 FROGGS abraxxa: you usually get the memory addresses of stuff managed by C by calling a C function that exposes it
10:16 abraxxa FROGGS: the docs say that if NULL is passed OCI will allocate a bind struct and fill the void pointer
10:17 brrt oh, that is a pain
10:17 FROGGS abraxxa: btw, is it still horrible to set up the oracle client stuff so that one could try out DBIish with oracle databases?
10:18 brrt abraxxa: am i to understand you have a foo_init(void **foo, int arg1, ...); and that foo_init writes to *foo with the address of the function
10:18 brrt like in: void *struct_ptr; foo_init(&struct_ptr, a, b, c); /* struct_ptr is now initialized? */
10:19 brrt i think you may want to use a CArray for that
10:19 brrt of 1 element, and then read the pointer to the unitialized struct ot of it?
10:24 ChoHag I'm attempting to use panda with its makeshift HTTP::Tiny and for some reason it stops adding to $buf ($buf ~= $g while $g = $s.get) after the headers.
10:25 ChoHag I can't see any reason for it to do that. $s.get ($s is a IO::Socket::INET) should just get the entire stream, no?
10:25 FROGGS abraxxa: a CArray or a 'Pointer is rw' will do here
10:26 diana_olhovik_ joined #perl6
10:26 FROGGS abraxxa: see https://github.com/rakudo/rakudo/blob​/nom/t/04-nativecall/15-rw-args.t#L54
10:26 moritz ChoHag: that idiom is dangerous, because it'll stop for an empty line
10:28 ChoHag I see.
10:28 ChoHag Well that explains why it's stopping for an empty line.
10:28 FROGGS what about this?  $buf ~= $g while ($g = $s.get).defined
10:30 moritz better
10:32 koo8 joined #perl6
10:36 brrt ooh, FROGGS++
10:36 brrt i had no idea nativecall was that powerful
10:39 abraxxa FROGGS: docker oracle-xe container works flawless here
10:41 cognominal_ m:  class C { method foo($a) {  method a { $a }};  }; my $c = C.new(); $c.foo(42); say $c.a; $c.foo(666); say $c.a # a weird take on lexical variable behaving as attributes. Embedding method in another because why not  :)
10:41 camelia rakudo-moar 6494c1: OUTPUT«42␤666␤»
10:42 dalek rakudo/nom: 90586ef | TimToady++ | src/Perl6/Actions.nqp:
10:42 dalek rakudo/nom: force unwanted on statement-level while block
10:42 dalek rakudo/nom:
10:42 dalek rakudo/nom: (also fix copy-pasta)
10:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/90586efc2e
10:42 dalek rakudo/nom: 1d96ed3 | TimToady++ | src/Perl6/Actions.nqp:
10:42 dalek rakudo/nom: visit more blocks with wanted/unwanted
10:42 dalek rakudo/nom:
10:42 dalek rakudo/nom: (We still have a few that we don't get to, and so are relying on
10:42 dalek rakudo/nom: the defaulting in the optimizer.  All in good time.)
10:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d96ed3466
10:43 grondilu so the method a is defined by a call to foo?
10:43 grondilu m: class { method foo { method bar {} } }.new.^methods.say
10:43 camelia rakudo-moar 6494c1: OUTPUT«(bar foo)␤»
10:44 grondilu nope
10:45 cognominal_ grondilu: yea, I am wrong
10:47 abraxxa brrt: yes, i've used the one element array trick in the past
10:47 abraxxa FROGGS: problem is I need a pointer to a pointer
10:51 abraxxa https://docs.oracle.com/data​base/121/LNOCI/oci05bnd.htm
10:51 abraxxa https://docs.oracle.com/database/​121/LNOCI/oci16rel003.htm#i456223
10:53 espadrine joined #perl6
10:54 abraxxa FROGGS: if I declare $bindpp as OCIBind is rw and initialize it using my OCIBind $bindpp .= new; the execute fails
10:54 Ven_ joined #perl6
10:55 jnthn morning, #perl6
10:55 yoleaux 07:48Z <TimToady> jnthn: Merged the GSR, unfortunately doesn't fix https://rt.perl.org/Ticket/Display.html?id=125769 yet, which seems to be due to lex lowering on binding rather than sinking
10:55 yoleaux 07:53Z <TimToady> jnthn: also tried to preselect the [0] or [2] on v Want nodes, but that ran into grief for some reason, and in fact made it largely impossible to $ast.dump without all sorts of random weirdnesses
10:55 yoleaux 08:29Z <nine> jnthn: Do you see anything glaringly wrong in my reasoning for https://github.com/rakudo/​rakudo/commit/b384d8f777?
10:55 abraxxa jnthn: hi!
10:56 Ven_ o/
11:05 RabidGravy joined #perl6
11:05 RabidGravy boo
11:09 abraxxa FROGGS: i've pushed what I have currently
11:12 jnthn .tell nine It seems like a pleasing, and reasonable, unification, at first glance. :)
11:12 yoleaux jnthn: I'll pass your message to nine.
11:14 nine
11:14 yoleaux 11:12Z <jnthn> nine: It seems like a pleasing, and reasonable, unification, at first glance. :)
11:14 RabidGravy a quick style/taste question if I have a method that will return a Promise but it can detect that it just won't work up front is it best to create a new Promise and break it with an exception or do the Promise.start anyway and throw the exception in there?
11:14 nine jnthn: \o/
11:16 nine jnthn: though I think I should dig a bit more into why we actually need to make an exception for subs. I don't get why NativeCall::Compiler::GNU::mangle_cpp_symbol should conflict with NativeCall::Compiler::MSVC::mangle_cpp_symbol
11:16 Zoffix RabidGravy, aren't those two the same thing?
11:17 jnthn RabidGravy: Interesting question. Things having consistent return types is usually good. On the other hand, most of the time you await a Promise, and the same code will end up catching the exception whichever side you put it on.
11:17 abraxxa FROGGS: that looks interessting too https://docs.oracle.com/database/​121/LNOCI/oci03typ.htm#LNOCI16279
11:17 Zoffix nine, seems the run_alt issue is a precomp issue, if you're interested (see last comment): https://rt.perl.org/Public/​Bug/Display.html?id=126832
11:17 jnthn nine: That is suspect, indeed.
11:19 jnthn m: say 1, |(2 xx 65534)
11:19 camelia rakudo-moar 1d96ed: OUTPUT«12222222222222222222222222222222222222​222222222222222222222222222222222222222222222​222222222222222222222222222222222222222222222​222222222222222222222222222222222222222222222​222222222222222222222222222222222222222222222​22222222222222222222222222222222222222…»
11:19 jnthn Hm, that used to SEGV
11:20 * moritz prefers the current semantics :-)
11:21 jnthn Me too ;)
11:21 jnthn Just built a debugging Moar to hunt the segfault and...it no longer dos
11:21 jnthn *does
11:21 moritz or was the segfault only on 32 bit systems?
11:21 jnthn I wonder if I accidentally fixed it when cleaning up args handling
11:21 moritz star-m: say 1, |(2 xx 65534)
11:21 camelia star-m 2015.09: OUTPUT«(signal SEGV)»
11:21 moritz ... nope.
11:21 jnthn It SEGV'd camelia; is camelia 32-bit?
11:22 moritz I don't think so.
11:22 jnthn (I now 'cus the bug report is a copy-paste from the channel)
11:22 abraxxa how can I debug segfaults?
11:22 jnthn Well, currently running a loop from 32768 args .. * to make sure it doesn't SEGV and at some point does give the "too many" error
11:22 ilmari m: say $*KERNEL.hardware
11:22 camelia rakudo-moar 1d96ed: OUTPUT«x86_64␤»
11:22 jnthn abraxxa: ASAN, valgrind...
11:23 brrt abraxxa: gdb :-)
11:23 brrt or lldb
11:23 jnthn MSVC ;)
11:23 abraxxa ubuntu here
11:23 jnthn 65534
11:23 jnthn 65535
11:23 jnthn Too many arguments in flattening array.
11:23 jnthn :)
11:23 abraxxa i'd need a guide as i have no C knowledge
11:23 abraxxa or just very basic one
11:24 brrt hmmmm
11:24 brrt that's going to be hard
11:24 brrt if you can post a gist somewhere, maybe we can spot something 'obviously' wrong
11:24 abraxxa i've tried to check memory locations use .WHERE
11:24 abraxxa brrt: https://github.com/abraxxa/DBIish/bl​ob/master/lib/DBDish/Oracle.pm6#L471
11:24 jnthn Seems rather fixed.
11:24 abraxxa that's the current code
11:25 abraxxa FROGGS: i hope the @in-binds is what you suggested
11:25 * jnthn adds regression tests and is happy the first xmas RT of the day seems to have worked out easy
11:26 abraxxa jnthn++
11:27 nine jnthn: I fear this is something, you will need to look at: https://rt.perl.org/Public/​Bug/Display.html?id=126832 A precomp related heisenbug involving the regex engine. I would need at least a pointer into some direction just to get started.
11:29 g4 joined #perl6
11:29 g4 joined #perl6
11:30 FROGGS abraxxa: is there a guide how to set up that oracle-xe container? I've no docker experience whatsoever
11:31 abraxxa FROGGS: if you have docker installed it's as easy as https://hub.docker.com/r/wnameless/oracle-xe-11g/
11:31 dalek roast: 3fe026d | jnthn++ | S06-signature/slurpy-and-interpolation.t:
11:31 dalek roast: Tests for RT #126212.
11:31 dalek roast: review: https://github.com/perl6/roast/commit/3fe026db4b
11:31 FROGGS abraxxa: k, will try
11:32 abraxxa FROGGS: i have a hard time finding out the OCI to C datatype mapping
11:32 hassoub joined #perl6
11:32 abraxxa FROGGS: https://docs.oracle.com/database​/121/LNOCI/oci03typ.htm#LNOCI039 says that >11.2 support 64bit ints
11:32 ChoHag Hmm my panda bug's already been fixed in git.
11:32 cognominal_ joined #perl6
11:33 ChoHag Less elegantly though.
11:33 ChoHag IMO.
11:36 dalek rakudo/nom: 03cbe70 | jnthn++ | src/ (3 files):
11:36 dalek rakudo/nom: Kill off has-accessor.
11:36 dalek rakudo/nom:
11:36 dalek rakudo/nom: MOP objects consistently use _ rather than - in their names, and
11:36 dalek rakudo/nom: Attribute is decidedly MOP. Further, every other method on it uses
11:36 dalek rakudo/nom: the _ convention, and we still had has_accessor anyway.
11:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03cbe70384
11:36 dalek roast: 9aee198 | jnthn++ | S (2 files):
11:36 dalek roast: has-accessor -> has_accessor
11:36 dalek roast: review: https://github.com/perl6/roast/commit/9aee1986f5
11:38 abraxxa how can i compile rakudo in debug mode?
11:39 brrt i suppose you use --gen-moar or something like that abraxxa?
11:39 abraxxa brrt: rakudobrew
11:39 brrt hmmm
11:39 abraxxa rakudobrew build jvm|pre-glr|moar|all [tag|branch|sha-1] [--configure-opts=]
11:39 abraxxa i guess something to --configure-opts
11:39 brrt no experience with rakudobrew here
11:40 brrt yeah, i suspect something like moar-opts=--debug --nooptimize
11:40 brrt and/or --asan
11:40 brrt those things will generate a slow, slow moar, though :-)
11:41 abraxxa don't care as I find the source of the segfault
11:41 nanis joined #perl6
11:42 jnthn nine: That's a really bizzare one... :(
11:42 jnthn What's the smallest golf you have so far of it?
11:42 jnthn I'd probably start out by trying to golf it
11:42 jnthn I'd also see if I could instrument the code calling run_alt to see what type of object it actually has at that point instead of the NFA it expects
11:43 Amarnath joined #perl6
11:43 nanis I am trying to understand why "\n" is being replaced with "\r\n"
11:43 jnthn Also, I'd stick an MVM_dump_backtrace into the code that does repossessions, and see if any of them look suspicious.
11:43 nine jnthn: https://rt.perl.org/Public/Bug/Di​splay.html?id=126832#txn-1379948 is what I've tried so far and could reproduce. Will have a closer look in the evening
11:43 nanis in string literals on Windows.
11:43 ChoHag The debugger aborts with 'Unhandled exception: ctxlexpad needs an MVMContext' when it tries to run code that plain perl6 is happy with (and works).
11:44 Amarnath why perl is not developed like java
11:44 ChoHag ISTR having this before due to having installed Panda myself and lacking modules, but I'm not sure if or what.
11:44 Amarnath Now a days perl is waste from my friend perspective
11:44 Amarnath what do you say
11:45 nanis Specifically,  RT #126881 and https://www.nu42.com/2015/12/perl​6-newline-behavior-by-design.html
11:46 Amarnath where perl is used
11:46 jnthn nine: OK; good luck! These things tend to be horrible to hunt down, I'm afraid. :(
11:46 abraxxa brrt: i've recompiled perl6 with debug support but valgrind still just exits
11:46 jnthn nine: I'll be about this evening if you've questions once you dig into it.
11:47 * Zoffix tries say 1, |(2 xx 65534) on a 32-bit box
11:47 Zoffix works fine
11:47 brrt Anarnath; i personally think perl5is an excellent tool for developing everything from one-off scripts, to research prototypes, to production-quality complex systems
11:47 nine jnthn: ok, thanks!
11:48 brrt i think perl6 is shaping up to be an excellent tool for the first two of these, and with time we'll reach the third of those
11:48 jnthn nanis: Well, largely the thinking was that \n is logical in regexes, so we can make it so in strings also. Note that I don't see the various spectest failures in question on Windows, thanks to having autocrlf set in git config.
11:48 jnthn nanis: The RT in question has already been put in the list of "things to review"
11:49 brrt java on the other hand, i think may be an excellent tool for building production-quality systems, but i find that it works best when you know already very well what you want to do; i wouldn't say it is good for scripts or experiments
11:49 jnthn nanis: I'd suspect we may either switch to doing it on I/O for everything except sockets, or go back to doing nothing special at all.
11:49 brrt Amarnath ^^ does that answer your question?
11:49 nanis jnthn: Regardless of autocrlf, this enforces "\r\n" on Windows to a much greater degree than Microsoft ever did.
11:50 koo8 joined #perl6
11:51 nanis My 2 cents: Accepting both styles of EOL on file input, and producing \r\n for output to files opened in text mode contradicts what every other programming language does.
11:52 * abraxxa discovered perl6-valgrind-m from rakudobrew
11:52 nanis So, thank you for considering changing the behavior.
11:53 z8 joined #perl6
11:53 nanis Having the literal string "Hello World!\n" generate the same MD5 in Java, C#, C++, Perl etc vs Perl6 is not something people expect.
11:53 jnthn nanis: If you want to talk about Microsoft, then we should probably talk about modern Microsoft languages.
11:54 jnthn f.Write("hello\nworld\n"); in C# does no translation at all on output
11:54 jnthn (where f is from using (var f = File.CreateText("foo")))
11:54 nanis jnthn: Exactly, it does not change "\n" to "\r\n".
11:54 nanis in a literal string.
11:55 jnthn Going by C# semantics, we should simply not do translation at all, but that won't actually fix the tests in question.
11:56 RabidGravy Zoffix, re Promises - there is a difference "method foo() returns Promise { my Promise $p;  if $some-bad-thing { $p = Promise.new; $p.break(X::Something.new) } else { $p = start { ... } }; return $p }" vs "method foo() returns Promise { return start { if $some-bad-thing { X::Something.new.throw; } else { .... } }}"
11:56 nanis Is there a programming language environment that changes literal strings in a program? If there is translation, it happens at IO boundaries.
11:57 RabidGravy both return a Promise granted
11:58 jnthn nanis: No, but if we went with "what does everyone else already do" in Perl 6 we'd not have got new regex syntax, grammars, NFG, nice async syntax... :)
11:58 nanis I am pointing out that mandating "\n" mean "\r\n" everywhere is something I have never encountered in the Microsoft world, and I have been using Microsoft products for 30 years.
11:59 jnthn Anyway, I think the \n being logical in strings is generally causing too much confusion, so I suspect it'll probably have to go away.
11:59 nanis I understand your point about all the nice things, but they are in a different category.
12:00 jnthn Well, not really. You can't know how something will work out without actually trying.
12:00 abraxxa how can I pass options to valgrind?
12:00 jnthn This is just one of many things that didn't really work out.
12:00 nanis In any case, I don't want to waste time. Perl6 developers must be under a lot of pressure right now. I just wanted to make sure I got the message to the right people.
12:00 _nadim Cna someone point at a Grammar with a few lines and some textx it matches, I need some test data but don't have time to look into Grammars right now
12:00 nanis Thank you!
12:03 moritz _nadim: https://github.com/moritz/json/blo​b/master/lib/JSON/Tiny/Grammar.pm and https://github.com/moritz/js​on/blob/master/t/01-parse.t has strings that it parses
12:03 nanis jnthn: I mean "I don't want to waste *your* time". :-)
12:05 jnthn nanis: Yes, took it that way. Anyway, relax; I'm already convinced the logical \n in strings isn't going to really fly.
12:05 nine nanis: "\n" meaning "\r\n" is not even mandatory. there is "use newline"
12:05 jnthn nine: Yeah, but it's not working out as a good default.
12:05 jnthn (To have it \r\n on Windows)
12:06 _nadim moritz: great, trying to make the dumper dump Match
12:06 nanis jnthn: Yup, I understood you understood, and that's why I thought I should avoid generating too much noise.
12:07 jnthn nanis: Thanks. And yes, things are fairly crazily busy at the moment :)
12:07 abraxxa tadzik: how can I pass options to valgrind using rakudobrews perl6-valgrind-m?
12:07 moritz abraxxa: that's just a shell script, so you can copy and modify it at will
12:07 jnthn abraxxa: Last time I just hacked the script ;)
12:08 abraxxa moritz: a perl 5 script and not easy to understand
12:08 abraxxa because valgrind isn't contained anywhere, instead it extracts it from the progname
12:09 jnthn RabidGravy: I'm working on https://rt.perl.org/Ticket/Display.html?id=126541 ; any thoughts on the method name we use for exposing this?
12:14 RabidGravy jnthn, :-*, no real preference - native-descriptor or some such perhaps - P5s fileno might do but there may be places where it isn't actually a number ;-)
12:15 jnthn RabidGravy: I'll suspect we'll go with pretending it is, in so far as a pointer can hide in a 64-bit int just fine :)
12:15 RabidGravy it is fileno in P5 isn't it?  If you're cool with that, then probably that as it gives the P5 people some familiarity
12:21 rurban_ joined #perl6
12:25 brrt also, jnthn++ for advent post, very entertaining; also, wow, perl6
12:29 FROGGS abraxxa: just edit the last line of perl6-valgrind-m
12:29 abraxxa FROGGS: managed it by copying the whole line rakudobrew executes
12:30 abraxxa FROGGS: I have no idea what to read from the valgrind output
12:31 jnthn brrt: Thanks. And yes, writing that in Perl 6 felt *really* nice. :)
12:35 FROGGS abraxxa: paste it, and we can maybe explain things
12:35 abraxxa it's HUGE
12:35 hassoub joined #perl6
12:36 FROGGS abraxxa: that's what I would expect :o)
12:36 abraxxa which paste site?
12:36 FROGGS abraxxa: an illegal read or illegal write is often a safe bet to look into
12:36 FROGGS abraxxa: the one you like most
12:37 El_Che I am famous, there is perl6advent that starts with my name :)
12:37 abraxxa FROGGS: http://paste.scsys.co.uk/502713
12:38 Woodi so why \n\r on Windows is a problem ? it should work in moust cases. when it is problematic ?
12:38 abraxxa FROGGS: i think i've crashed it
12:40 my-real-name joined #perl6
12:40 abraxxa FROGGS: https://gist.githubusercontent.com/abraxx​a/3f6cf84c676180bb7407/raw/a18f8175d70bd4​5927d5903c987261e763a5744d/gistfile1.txt
12:40 Skarsnik joined #perl6
12:40 moritz El_Che: welcome to your wonderful world of 5 minutes Internet fame :-)
12:41 Woodi maybe concept of logical \n is't a problem but execution/enforcement part is not precise ?
12:41 El_Che :)
12:42 moritz the problem is that everybody wants a newline pony, and we only have \n, crlf and lf, no pony
12:42 abraxxa time for a new unicode grapheme!
12:43 moritz let's quit this Unicode mess, I want Ponycode!
12:44 abraxxa isn't it called punycode? ;)
12:44 moritz abraxxa: no, punycode is a lie
12:46 FROGGS abraxxa: sadly there is nothing interesting in there
12:46 abraxxa FROGGS: are the valgrind options ok?
12:47 Lucas_One joined #perl6
12:47 FROGGS abraxxa: well, you dont need the leek check when it crashes, also you often dont need verbose mode or the --track-origins option
12:47 FROGGS leak*
12:47 abraxxa ok
12:51 abraxxa how is explicitly-manage implemented?
12:51 abraxxa it works for strings, just not for ints and floats
12:53 FROGGS abraxxa: strings are just pointers, ints and floats are not so you cannot tag it taht way
12:53 abraxxa FROGGS: but i'm passing a pointer to a int and float
12:53 abraxxa FROGGS: is rw should work according to this test too: https://github.com/rakudo/rakudo/blob​/nom/t/04-nativecall/15-rw-args.t#L54
12:54 abraxxa that's the same as my $bindpp
12:54 FROGGS abraxxa: yes, though the temporary pointer that gets created when the call to SetPtrToPtr() is made gets freed right after the call
12:54 FROGGS and you need to keep that pointer
12:55 abraxxa i see
12:55 abraxxa so any idea what I can try or do to fix this?
12:55 Skarsnik Hello
12:57 FROGGS abraxxa: you need to get more information out of it.. somehow
12:58 abraxxa should this be valid syntax? .WHERE for @in-binds;
12:58 abraxxa ah, i'm missing the say
12:59 abraxxa .WHERE returns different values in the loop and after it when I print the mem locations using WHERE
13:00 moritz we have a compacting/moving GC
13:00 FROGGS .WHERE does not tell you the memory location of the pointer you pass to C
13:00 moritz so that can happen
13:00 abraxxa sorry, my bad, looked at the wrong lines
13:00 FROGGS abraxxa: but you can 'say +$valuep'
13:01 abraxxa moritz: is there a way to pass pointers to a C lib using NativeCall that aren't gc-ed
13:01 FROGGS this will give you the memory location
13:01 abraxxa FROGGS: ok
13:01 abraxxa where is this documented?
13:01 FROGGS abraxxa: as long as you keep references to it it wont get collected
13:01 xpen joined #perl6
13:02 abraxxa FROGGS: does that generate a reference? my $valuep := Pointer[num64].new($value);
13:02 FROGGS abraxxa: that's a pointer, yes
13:02 FROGGS err, wait
13:02 FROGGS that's nonsensical
13:03 FROGGS there you are creating a pointer to a (most likely) illegal memory address
13:03 FROGGS m: use NativeCall; say Pointer[num64].new(42.1)
13:04 camelia rakudo-moar 03cbe7: OUTPUT«Default constructor for 'NativeCall::Types::Pointer[num64]' only takes named arguments␤  in block <unit> at /tmp/mX5ydGK_io:1␤␤»
13:04 FROGGS also that
13:04 abraxxa m: use NativeCall; my long $value = 42; my $valuep := Pointer[long].new($value); say $valuep;
13:04 camelia rakudo-moar 03cbe7: OUTPUT«NativeCall::Types::Pointer<0x2a>␤»
13:05 abraxxa so what should I do instead?
13:05 abraxxa the CArray workaround?
13:05 colomon joined #perl6
13:05 FROGGS abraxxa: use either malloc or CArray, which does it for you
13:05 FROGGS we should provide Pointer.malloc, really
13:06 brrt yes, we should
13:06 abraxxa yes, please!
13:06 FROGGS :o)
13:08 abraxxa i like to have 'Unhandled exception: Cannot unbox a type object' for duplicate variable declarations fixed for the Christmas release
13:08 Skarsnik hm, FROGGS, should I new a pointer returned by a function to be able to call deref on it? I tried https://github.com/Skarsnik/DBIish/blob/mast​er/lib/DBDish/mysql/StatementHandle.pm6#L100 but it does not seen to work accorded to travis build x)
13:08 abraxxa if someone guides me I'd like to try to fix it myself
13:09 FROGGS abraxxa: is this ticketed?
13:09 abraxxa not sure, we talked about it weeks ago
13:10 FROGGS Skarsnik: will mysql_fetch_field return a typed pointer? a Pointer[<something>] ?
13:10 Skarsnik yes Pointer[MYSQL_FIELD]
13:10 abraxxa FROGGS: it works!
13:10 FROGGS O.o
13:11 FROGGS Skarsnik: then it should work in case it really returns that type
13:12 Skarsnik https://travis-ci.org/perl6/DBIish/builds/96278908 Invocant requires an instance of type NativeCall::Types::Pointer[DBDis​h::mysql::Native::MYSQL_FIELD], but a type object was passed.  Did you forget a .new?
13:13 cognominal joined #perl6
13:14 FROGGS m: use NativeCall; say Pointer[int32].new.deref
13:15 camelia rakudo-moar 03cbe7: OUTPUT«(signal SEGV)»
13:15 FROGGS ohh, heh
13:15 FROGGS well, kinda expected
13:15 FROGGS m: use NativeCall; sub malloc(int32) returns Pointer[int32] { * }; say malloc(nativesizeof(int32))
13:15 camelia rakudo-moar 03cbe7: OUTPUT«Type check failed for return value; expected NativeCall::Types::Pointer[int32] but got Whatever␤  in sub malloc at /tmp/eoMsDHr9EZ:1␤  in block <unit> at /tmp/eoMsDHr9EZ:1␤␤»
13:16 FROGGS m: use NativeCall; sub malloc(int32) returns Pointer[int32] is native { * }; say malloc(nativesizeof(int32))
13:16 camelia rakudo-moar 03cbe7: OUTPUT«NativeCall::Types::P​ointer[int32]<0x7121580>␤»
13:16 FROGGS m: use NativeCall; sub malloc(int32) returns Pointer[int32] is native { * }; say malloc(nativesizeof(int32)).deref
13:16 camelia rakudo-moar 03cbe7: OUTPUT«-403544376␤»
13:16 FROGGS Skarsnik: see, it works in case the sub returns an instance
13:17 FROGGS hmmm, though we could make it return a type object if not...
13:17 FROGGS sadly native types don't really show up as type objects :/
13:18 Skarsnik I can't test this code sadly, mysql server does not want to work here ~~
13:18 kitesurf joined #perl6
13:19 moritz Skarsnik: I can give you access to a hack.p6c.org on which a mysql server runs
13:19 abraxxa FROGGS: num32 for float fails with 'ORA-01438: value larger than specified precision allowed for this column' while num64 works
13:19 brabo joined #perl6
13:20 FROGGS abraxxa: hmmm, no idea what this might be about
13:20 xpen joined #perl6
13:21 Skarsnik moritz, I will try on another VM, don't worry x)
13:21 Skarsnik It just annoying
13:21 moritz Skarsnik: wouldn't be any hassle; that's exactly what that host is for
13:21 Skarsnik I am off for a bit x)
13:21 leont joined #perl6
13:24 prammer joined #perl6
13:24 abraxxa FROGGS: fixed code pushed
13:26 ZoffixW joined #perl6
13:26 kitesurf Hi everyone
13:27 ZoffixW RabidGravy, I don't get what the difference is (re promises http://irclog.perlgeek.de/p​erl6/2015-12-14#i_11712496). Isn't throwing inside a promise same as .break()ing it?
13:27 ZoffixW kitesurf, hi
13:28 kitesurf Wondering if there's any coding I can help with. I'm new to perl6, and figured a good way to start would be to fix some bugs or provide implementation for stubs
13:28 ZoffixW kitesurf, there's plenty of open Issues on the ecosystem modules: http://modules.perl6.org/#​sort-col=5&amp;sort-dir=d :)
13:28 dalek rakudo-star-daily: db257da | coke++ | log/ (2 files):
13:28 dalek rakudo-star-daily: today (automated commit)
13:28 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/db257da240
13:28 dalek perl6-roast-data: 5ecd22c | coke++ | / (7 files):
13:28 dalek perl6-roast-data: today (automated commit)
13:28 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/5ecd22cd68
13:28 dalek perl6-roast-data: 84ce574 | coke++ | / (7 files):
13:28 dalek perl6-roast-data: today (automated commit)
13:28 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/84ce5749ef
13:28 moritz kitesurf: I'd recommend to start with some modules; go to http://modules.perl6.org/ ... what ZoffixW said :-)
13:29 kitesurf Cool
13:29 ZoffixW kitesurf, there are also some open issues in perl6 repos: https://github.com/issues?utf8=%E2%9C%93​&amp;q=is%3Aopen+is%3Aissue+user%3Aperl6
13:29 RabidGravy ZoffixW, except one starts a new thread and the other doesn't
13:30 ZoffixW RabidGravy, ah, I see
13:30 RabidGravy it's more "is there any point starting the thread only to break the promise anyway"
13:31 ZoffixW got it
13:31 xpen joined #perl6
13:33 jnthn Well, it's not "start a thread" so much as "schedule to be run on a thread", but yeah, it's of course got cost.
13:34 xpen_ joined #perl6
13:36 lucasb joined #perl6
13:37 prammer joined #perl6
13:37 Wittsy joined #perl6
13:39 ShimmerFairy Huh, I just came across https://www.nu42.com/2015/12/perl6​-newline-translation-botched.html , and it's interesting. Wasn't the whole point of the change relating to 'use nl' and stuff to make "\n" Do The Right Thing? Or is the complaint actually unintended behavior?
13:40 prammer joined #perl6
13:41 * Wittsy slaps Wittsy around a bit with a large fishbot
13:42 nine ShimmerFairy: well there's a bit of a controversy what "The Right Thing" actually is
13:43 ShimmerFairy nine: perhaps we should introduce a \f for a literal LF :P (after all, Windows technically did the right thing by choosing CRLF, as I understand their original meanings)
13:43 ShimmerFairy nine: but yeah, I can definitely see the inconvenience that was brought up there.
13:45 prammer joined #perl6
13:46 ShimmerFairy Ah, I see \f is already taken for form feed (...whatever that means). So either \l or substitute the meaning of \f (to match with \r's use of the second letter in CR)
13:48 xpen joined #perl6
13:48 ChoHag Weightless as it is, my vote goes for not fucking with what any existing escapes do, including \n, but distinguishing between "a literal 0x0a" and "a newline, whatever that means".
13:49 prammer joined #perl6
13:49 ChoHag With a "I [don't] know what I'm doing and I'm going to be naughty anyway" pragma to change what \n in ""'s does.
13:49 ChoHag In the current lexical scope, of course, because perl's like that.
13:51 ChoHag And while we're adding new escapes, use \<something-in-ascii> as well as \↵, because ↵ is what I get by pressing the enter key in keycap mode.
13:51 ChoHag We love utf-8 here, right?
13:53 ShimmerFairy My feeling is that I like \n being treated The Right Way™, but I would also appreciate having a just-as-terse way of saying "no, really a line feed", e.g. \f :)
13:53 kaare_ joined #perl6
13:54 * leont is also used to i being dealt with at IO boundaries, this would surprise me too
13:56 ShimmerFairy FWIW, both Java with its %n and lisp with ~n (I believe) have ways of doing newlines without implying a specific kind. We just happen to be doing it beyond printf-y constructs :P
13:57 * ShimmerFairy also just realized n is an odd choice of letter for  liNe feed
13:57 nine isn't it Newline?
13:57 ilmari the unicode name is line feed, but yes
13:58 shibly joined #perl6
13:58 shibly left #perl6
13:58 [Coke] lots of QAST diagnostic output in the last moarvm-jit test run.
13:58 lucasb m: say "a\rnb"
13:58 camelia rakudo-moar 03cbe7: OUTPUT«a
13:58 [Coke] (fewer actual failing tests, though, down to 25)
13:59 lucasb I didn't know about the \rn escape :) saw it in the mentioned commit
13:59 ShimmerFairy m: say "\c[NEL]".uniname
13:59 camelia rakudo-moar 03cbe7: OUTPUT«NEXT LINE (NEL)␤»
14:00 ShimmerFairy nine: arguably \n would better fit NEL, the point is that \n is a shoddy name to give to anything but a logical concept of "new line" in my opinion :P
14:01 nine ShimmerFairy: which is why rakudo's current behavior makes so much sense. Too bad it doesn't survive contact with reality (TM).
14:02 ShimmerFairy (also, just remembered lisp is ~%, not ~n)
14:02 ShimmerFairy nine: I think my \f idea would be nice regardless. Guaranteed LINE FEED and get rid of another \v-like to boot! :)
14:02 ShimmerFairy .oO(maybe the default for  use newline  would always be :lf ?)
14:03 xpen joined #perl6
14:04 lucasb ShimmerFairy: sorry, but I don't think your "\f" suggestion is reasonable. form feed has some uses. some tools recognize it as a page separator thing
14:07 ShimmerFairy lucasb: seriously? I've never seen a single use of \f in my life (just as often as \v , really). Does it really justify a shortcut over \x[whatverthehexcodeis] ?
14:08 RabidGravy I have
14:08 jnthn nine: Didn't survive contact with reality is a pretty good summary :)
14:08 jsimonet joined #perl6
14:09 RabidGravy Remedy had (has?) a stupid thing where it stored notes in an Oracle text column separated by a form feed
14:10 ShimmerFairy jnthn: how 'bout my suggestion to repurpose \f ? Or at least get rid of it? Feels like the same kind of fossil done away with in \v , now that it's come up
14:10 jnthn ShimmerFairy: I'm not sure fighting surprising behavior with more surprises is a great way to go :)
14:10 pippo joined #perl6
14:11 ShimmerFairy jnthn: who still uses \f and \v though? :P
14:11 pippo o/ #perl6!
14:11 jnthn People dealing with Oracle, apparently :P
14:11 ShimmerFairy \x[0C] should be good enough for FORM FEED users :P
14:11 geekosaur \f invites confusion between line feed and form feed, especially given its historical meaning (the latter)
14:12 geekosaur perhaps \L ?
14:12 Ven joined #perl6
14:12 RabidGravy I don't think changing an escape that has been established by convention for forty odd years to mean something else is going to have a good outcode
14:12 RabidGravy outcome
14:16 leont RabidGravy: I'd agree, but that'd mean \n would become line-feed again
14:16 ShimmerFairy RabidGravy: didn't hurt \v for the however-many-years we've removed that, fwiw
14:17 ShimmerFairy we could also go the lisp way and have a \% for "logical" newline, if we need \n to be liNe feed :)
14:19 dalek nqp: 436b4f2 | jnthn++ | / (2 files):
14:19 dalek nqp: Map nqp::filenofh op on MoarVM.
14:19 dalek nqp: review: https://github.com/perl6/nqp/commit/436b4f2d4a
14:19 dalek nqp: cf246d6 | jnthn++ | src/vm/jvm/ (2 files):
14:19 dalek nqp: Stub nqp::filenofh on JVM.
14:19 dalek nqp: review: https://github.com/perl6/nqp/commit/cf246d6597
14:22 Ven joined #perl6
14:29 * ShimmerFairy also has a hard believing there's any P6 code out there actually using f, but would love to be proven wrong :)
14:29 Woodi um, post from nu43.com is mentioned 3rd time here. esentially it says: hey, Windows can use '\n' without problems (except Notepad) :>  so Unix win this one :)
14:30 Skarsnik Zoffix, could you add a page(s) that list all modules issue on modules.perl.org? (if possible)
14:31 ShimmerFairy Woodi: fair point, though I wonder if other things beyond text editors (e.g. the default Windows console) are equipped to handle plain line feed as well.
14:31 dalek roast: ce74fd9 | jnthn++ | S32-io/native-descriptor.t:
14:31 dalek roast: Add tests for .native-descriptor on handles.
14:31 dalek roast: review: https://github.com/perl6/roast/commit/ce74fd9137
14:33 RabidGravy jnthn++ # now at least I have a chance of opening a serial port and using it :)
14:33 Woodi ShimmerFairy: so so far problem looks like this: 1) Windows don't like \r\n; 2) Windows also don't like \n :)
14:33 dalek rakudo/nom: a819231 | jnthn++ | / (3 files):
14:33 dalek rakudo/nom: Implement native-descriptor on handles/sockets.
14:33 dalek rakudo/nom:
14:33 dalek rakudo/nom: Provides a way to get the (platform-specific) file descriptor, HANDLE,
14:33 dalek rakudo/nom: etc.
14:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a819231646
14:33 dalek rakudo/nom: a22c412 | jnthn++ | t/spectest.data:
14:33 dalek rakudo/nom: Run S32-io/native-descriptor.t.
14:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a22c4120f5
14:36 Woodi feature request: some key binding for image scaling in web browsers...
14:36 znpy joined #perl6
14:36 adhoc joined #perl6
14:39 Ven joined #perl6
14:40 * jnthn is happy to be back under 20 xmas RTs again :)
14:41 nine jnthn++ # now when a file op is missing, we can work around that using NativeCall :)
14:41 Skarsnik good luck x)
14:41 [Coke] S10-packages/precompilation.t is dying before completion (and failing 2 tests)
14:41 RabidGravy jnthn, I'll do some PoC to test that later, when I've finished doing what I'm doing :)
14:41 rvchangue joined #perl6
14:42 nine [Coke]: That one slipped through when I merged curli. I know, I promised to fix that. Have just prioritized end user problems over spec test problems in the past few weeks.
14:44 andreoss joined #perl6
14:45 colomon joined #perl6
14:46 Ven jnthn++ :D
14:47 TimToady jnthn: I don't know if I understand enough to fix #125769; my golfed form is { my $f := Failure.new("bar"); }, but it doesn't fix the bug to sink the block, diffing against an assignment gets (lexical $f) for the assignment but (local __lowered_lex_1) for binding
14:47 muraiki joined #perl6
14:47 [Coke] TimToady: integration/advent2012-day21.t might be a result of your recent sink changes.
14:48 jnthn m: { my $f := Failure.new("bar"); }
14:48 camelia rakudo-moar 03cbe7: OUTPUT«bar␤  in block <unit> at /tmp/VCxUgiABK6:1␤␤Actually thrown at:␤  in block <unit> at /tmp/VCxUgiABK6:1␤␤»
14:48 jnthn m: { my $f = Failure.new("bar"); }
14:48 camelia rakudo-moar 03cbe7: ( no output )
14:48 jnthn hmm
14:48 [Coke] https://github.com/coke/perl6-roast-data/blob​/master/log/rakudo.moar-jit_summary.out#L4948
14:48 jnthn m: { my $f := my $ = Failure.new("bar"); }
14:48 camelia rakudo-moar 03cbe7: ( no output )
14:49 jnthn Odd
14:49 Skarsnik damn, there was improvment? Stage parse      :  77.519 I remember that taking over 100 x)
14:51 TimToady [Coke]: yes, that's almost certainly gsr damage, though it should still run okay despite the spurious warning
14:51 decent joined #perl6
14:51 TimToady it just means something is relying on the optimizer to determine sink when it should be decided by actions
14:52 Woodi btw. R* 2015.11 have startup arount 1.5x node-js :)  so it's standard industry like ? :)
14:52 Skarsnik x)
14:53 rindolf joined #perl6
14:54 Woodi of course node-js is 56x slover then perl5 :)  and i lied... that's Hallo World! times...
14:55 [Coke] TimToady: there were ... 2 or 3 instances of that in the last test run I saw.
14:55 Ven well, nodejs doesn't tout about its startup performance
14:55 Ven it's pretty terrible for one-liners, tbh...
14:57 TimToady testing a fix for that one
15:00 TimToady testing a different fix for that one :)
15:00 skingsbu joined #perl6
15:01 TimToady (first fix worked, but wasn't general enough)
15:02 Ven TimToady: what's wanted/WANTED?
15:02 pmurias joined #perl6
15:02 dalek nqp/js-cps: 9cbdb6e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:02 dalek nqp/js-cps: [js] Remove dead code.
15:02 dalek nqp/js-cps: review: https://github.com/perl6/nqp/commit/9cbdb6ea96
15:02 dalek nqp/js-cps: dd04b9e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:02 dalek nqp/js-cps: [js] partial if in CPS mode
15:02 dalek nqp/js-cps: review: https://github.com/perl6/nqp/commit/dd04b9efed
15:02 dalek rakudo/nom: e62d9a7 | TimToady++ | src/Perl6/Actions.nqp:
15:02 dalek rakudo/nom: xblock needs to want is argument
15:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e62d9a76dc
15:03 skingsbu does there happen to be an sftp/ssh module yet for perl 6?
15:03 Skarsnik http://modules.perl6.org/dist/Net::FTP
15:03 Skarsnik oh sftp
15:04 Skarsnik I don't think so
15:04 skingsbu thanks
15:04 Skarsnik ssl support is quite sparse
15:04 TimToady Ven: the actions know a lot more than the optimizer about what should be sunk, so we're moving that decision into actions
15:05 Ven okay, thanks :)
15:05 skids joined #perl6
15:06 TimToady but I left the final decision in the optimizer for now, so we can detect where there are mismatches
15:07 TimToady a bogus "Useless use" message is a sign of that skew
15:07 Skarsnik I wish my api version patch for NC was merged so I don't have to install all the -dev package xD
15:07 TimToady I can also find all the final statements of blocks that don't happen to be marked by actions yet
15:08 FROGGS :S
15:08 andreoss masak: what do you call this lispy syntax in which 007 test cases are written?
15:08 robertle joined #perl6
15:08 TimToady though currently that information only shows up if I jack up optimization to level 4
15:09 TimToady which I'm using temporarily to turn on debugging in the optimizer
15:09 sammers joined #perl6
15:10 TimToady one benefit of the sink changes is that we now optimize native increments better, including when it can turn $++ into something better
15:12 lucasb iiuc, only Strs, Ints and Nums get these "Useless use" warnings. With this WANTED thing, does it mean objects of any kind will be able to get these warnings?
15:12 TimToady at the moment that only turns on at optimize=3, mebbe it wants to be 2
15:13 Ven andreoss: "007-lisp" :P
15:13 TimToady lucasb: there's now code to do that in the optimizer, but it's not triggering for some reason, probably under the wrong node type
15:14 timotimo o/
15:14 lucasb TimToady: ah, ok. thanks
15:14 regreg joined #perl6
15:15 lichtkind joined #perl6
15:15 andreoss Ven: why it's used for tests?
15:16 Ven andreoss: because it's easier to build an AST that way
15:16 ZoffixW joined #perl6
15:16 ShimmerFairy .oO(double-oh theven)
15:16 ZoffixW Skarsnik, for what purpose? (re: add page with all issues)
15:16 dalek rakudo/nom: de23614 | TimToady++ | src/Perl6/Optimizer.nqp:
15:16 dalek rakudo/nom: do the ++ optimization for normal code now
15:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/de23614e3c
15:17 Skarsnik have a quick way to say "Here some stuff to do" x)
15:17 El_Che Skarsnik: in case skinsbu is back: http://blogs.perl.org/users/aaron_baugher/​2015/11/my-first-perl-6-module-netssh.html
15:17 ZoffixW Skarsnik, here's a quick way. Start from the top :) http://modules.perl6.org/#​sort-col=5&amp;sort-dir=d
15:18 Skarsnik It was just an idea ^^
15:18 robertle hi folks, p6 noob here. I do a "panda --notests install HTTP::Server::Async", which seems to work ok. but a "use HTTP::Server::Async::Response; my $s = HTTP::Server::Async.new;" gives "You cannot create an instance of this type". I then cat the source file for that module/class into a file, and replace the "use", et voila, works. So the source for that module is ok, my code is, but something goes wrong if
15:18 robertle it is read from the panda-created repo, as oposed to my own folder. any ideas? where can I read up on the way these source repos work and how classes/modules are located?
15:19 moritz robertle: why do you "use" HTTP::Server::Async::Response when you want to instantiate HTTP::Server::Async?
15:20 diakopter robertle: do you need to `use` HTTP::Server::Async too?
15:21 ZoffixW Skarsnik, I'm -1 on that for these reasons: 1) I doubt many will find it useful; I think it makes more sense to find a module in an area you're competent in and fix it than look at a random list of issues. (2) We would also require making more GitHub API requests. Right now we can process at most 1660 dists per hour and adding a single request would decrease that to 1250 dists.
15:21 robertle moritz, diakopter: oh man. so stupid... I was mucking around with it for a bit, at some point I must have tried something... thanks! still: I want to understand how that lookup works
15:21 timotimo m: say "which version am i?"
15:21 camelia rakudo-moar e62d9a: OUTPUT«which version am i?␤»
15:21 diakopter robertle: but did that make it work?
15:22 robertle diakopter: yes. sillyness on my side
15:22 timotimo m: my int $foo = 0; while $foo < 100000 { $foo++ }; say now - INIT now;
15:22 camelia rakudo-moar e62d9a: OUTPUT«0.0942434␤»
15:22 Skarsnik Zoffix, Oh yeah the git api limit call ~~
15:22 timotimo m: my int $foo = 0; while $foo < 10_000_000 { $foo++ }; say now - INIT now;
15:22 camelia rakudo-moar e62d9a: OUTPUT«6.8320756␤»
15:22 khw joined #perl6
15:23 timotimo m: my int $foo = 0; while $foo < 10_000_000 { ++$foo }; say now - INIT now;
15:23 TimToady wait 8 minutes
15:23 robertle diakopter: it's an interesting error message though, if I do not "use" any of this, I get a "Could not find Symbol", which kinda makes sense
15:23 camelia rakudo-moar e62d9a: OUTPUT«7.641817␤»
15:23 timotimo i'm gathering before-the-change timings :)
15:23 diakopter m: my int $foo = 0; True while ++$foo < 100000; say now -  INIT now;
15:23 camelia rakudo-moar e62d9a: OUTPUT«0.0618161␤»
15:23 TimToady I was gonna wait until a few seconds before the switch :)
15:23 timotimo probably not such a good idea to do it on camelia?
15:23 moritz I just want to stress that camelia is *not* a benchmarking platform
15:23 TimToady the difference will be unmistakable :)
15:23 cdg joined #perl6
15:23 timotimo TimToady: hm. but then you may see a performance impact from compilation?
15:23 moritz it runs in a VM with lots of stuff both on the hypervisor and in the VM
15:24 moritz and timings are rather jittery
15:24 TimToady 20 times faster is 20 times faster
15:24 diakopter most of a core is close enough
15:24 RabidGravy robertle, the message you got was probably because the HTTP::Server::Async got created as an intervening package rather than an actual class
15:24 moritz TimToady: might work in this case; I'm making a more general statement here :-)
15:24 timotimo it's a good point, moritz
15:25 timotimo especially since ++$foo is meant to be faster than $foo++, but in that little case it wasn't :)
15:25 timotimo also, n == 1 is *bad*
15:25 TimToady pre and post should now be equivalent in sink context
15:25 TimToady if not, it indicates a missing sink
15:25 TimToady well, a missing unwanted()
15:26 diakopter m: my int $foo = 0; True while ++$foo < 10_000_000; say now -  INIT now;
15:26 camelia rakudo-moar e62d9a: OUTPUT«5.10045020␤»
15:26 lucasb moritz: do you know who can upgrade the rakudo that the doc site is using to be built? it seems the doc site is not getting updated because of a old rakudo
15:26 Skarsnik m: my $a = 2; $a = Mu; say $a.defined;
15:26 lucasb missing the experimental feature/pragma
15:26 camelia rakudo-moar e62d9a: OUTPUT«False␤»
15:26 robertle RabidGravy: the source for it says "class HTTP::Server::Async does HTTP::Server {", not sure that helps.
15:27 andreoss Ven: these expression use the same parser as the rest of language?
15:27 Ven andreoss: no, the parser is in 007/Test.pm
15:27 Skarsnik m: my $a = 2; $a = Mu; say $a.defined || defined $a;
15:27 camelia rakudo-moar e62d9a: OUTPUT«False␤»
15:27 flussence ooh, that new error message in panda/bootstrap.pl is pretty
15:28 flussence s/in/from
15:28 moritz lucasb: I can
15:28 moritz lucasb: what version does it need?
15:28 RabidGravy robertle, no it's expected behaviour it's because you were doing:
15:28 RabidGravy m: class Foo::Bar::Baz {}; Foo::Bar.new
15:28 camelia rakudo-moar e62d9a: OUTPUT«You cannot create an instance of this type␤  in block <unit> at /tmp/0ob4yJQQxH:1␤␤»
15:30 lucasb moritz: idk. 'use experimental :cached;' was added recently to htmlify.p6 and I think that's why it is not building.
15:31 zakharyas joined #perl6
15:31 robertle RabidGravy: ok, thanks! do you know where I can learn about the repo structures and how module lookup works?
15:31 lucasb the doc site uses a rakudobrew instance, doesn't it? I think just building a new rakudo there would work
15:31 TimToady timotimo: okay, refire test cases :)
15:31 hoelzro timotimo: thanks for reading the post! glad to see you liked it =)
15:31 yoleaux 12 Dec 2015 19:58Z <timotimo> hoelzro: i enjoyed your post and am looking forward to having the performance be better in the future (no matter who fixes it). good work golfing it!
15:31 TimToady and diakopter
15:31 moritz lucasb: ok; so far I've tried to track rakudo releases with that rakudobrew
15:33 abraxxa FROGGS: starts to work
15:33 ZoffixW m: my int $foo = 0; while $foo < 10_000_000 { $foo++ }; say now - INIT now;
15:33 abraxxa fetching doesn't return rows although i don't get an error
15:33 camelia rakudo-moar de2361: OUTPUT«6.6579539␤»
15:33 TimToady m: my int $foo = 0; True while ++$foo < 10_000_000; say now -  INIT now;  # diakopter's test
15:33 camelia rakudo-moar de2361: OUTPUT«0.0550347␤»
15:33 andreoss Ven: i wanted to add more built-ins such as <, >. I wonder if their semantics on Arrays and Objects is defined somewhere
15:34 TimToady ZoffixW: looks like that one isn't properly optimized yet
15:34 Ven andreoss: well, actually, it's not quite an operator yet, look at the grammar instead
15:34 Ven IIRC
15:34 abraxxa FROGGS: can i allocate a Str which gets filled by the C lib? the NativeCall tests only has a test for a single char (int8)
15:34 RabidGravy robertle, it's not really that documented as it is in the last throes of being changed at the moment.  If you're really interested look at the stuff called CompUnit* in the source
15:34 TimToady m: loop (my int $i; $i < 10000000; ++$i) {}; say $i; say now - INIT now
15:34 camelia rakudo-moar de2361: OUTPUT«10000000␤0.0609680␤»
15:34 TimToady m: loop (my int $i; $i < 10000000; $i++) {}; say $i; say now - INIT now
15:34 camelia rakudo-moar de2361: OUTPUT«10000000␤0.06008296␤»
15:34 ZoffixW m: say 0.0618161 - 0.0550347
15:34 camelia rakudo-moar de2361: OUTPUT«0.0067814␤»
15:35 TimToady that's noise
15:35 FROGGS abraxxa: you can only allocate a large enough CArray[uint8], and join it afterwards
15:35 abraxxa FROGGS: instead of passing Str?
15:35 ZoffixW What was meant to be 20 times faster? <TimToady> 20 times faster is 20 times faster
15:36 FROGGS abraxxa: is string is just a pointer to a piece of mem... just like a C array is
15:36 FROGGS abraxxa: so, yes
15:36 abraxxa FROGGS: what about my Str $valuep = ' ' x (($datalen+1) * 2);
15:36 andreoss Ven: looks like they are just infix subs
15:36 ZoffixW Oh, I guess it was just a random number...
15:36 andreoss so it would be quite easy to add some more
15:36 FROGGS abraxxa: I don't think you will get your hands on the modified string in this example
15:36 TimToady m: my int $i = 0; $i++ while $i < 10000000; say $i; say now - INIT now
15:36 camelia rakudo-moar de2361: OUTPUT«10000000␤0.05941549␤»
15:37 diakopter m: my int $foo = 0; True while ++$foo < 10_000_000; say now -  INIT now;
15:37 camelia rakudo-moar de2361: OUTPUT«0.05646742␤»
15:37 diakopter that's a 100x improvement
15:37 TimToady m: my int $i = 0; $i++ while $i < 1_000_000_000; say $i; say now - INIT now
15:37 camelia rakudo-moar de2361: OUTPUT«1000000000␤5.67746063␤»
15:37 ZoffixW Ohhhh
15:37 ZoffixW Wow. :D
15:37 timotimo i like that
15:38 abraxxa FROGGS: right, I'll do the same as in get_errortext
15:38 Skarsnik hm, there is no static variable in subroutine?
15:38 TimToady thought you would, but I'll have to figger out why the block form of while isn't sunkeded
15:39 _nadim https://transfer.sh/1ecSbc/json.p6.txt for those who want to see the difference when rendering a large structure with  .perl and Data::Dump::Tree
15:40 diakopter I wonder if it's actually being jitted
15:40 _nadim the DDT is in the second half. formated to 120 chars width, needed for such a large structure
15:40 _nadim moritz: thanks, the JSON parser gave me just the right amount of data (lots)
15:42 moritz _nadim: you're welcome
15:42 TimToady m: my int $i = 0; while $i < 10_000_000 { $i++ }; say $i; say now - INIT now
15:43 camelia rakudo-moar de2361: OUTPUT«10000000␤6.7826736␤»
15:43 flussence huh, if I run panda t/tester.t as «perl6 -I. t/tester.t» it complains about undefined %ENV, but without the -I it's fine.
15:43 TimToady m: my int $i = 0; while $i < 10_000_000 { ++$i }; say $i; say now - INIT now
15:43 camelia rakudo-moar de2361: OUTPUT«10000000␤7.7058822␤»
15:43 TimToady maybe that's just block call overhead
15:43 FROGGS can't we get rid of lexical scopes when only outers are involved?
15:43 timotimo could be we can't inline that block because of its use of native refs?
15:43 diakopter yeah but the block should be eliminated since there are no lexicals or copied arguments
15:44 timotimo oh, it doesn't define its own lexicals. yeah.
15:44 TimToady the ++$i form shouldn't care about sink to do the $i = $i + 1 optimization
15:45 diakopter also, no EVAL, no labels
15:45 diakopter no variables invoked
15:45 diakopter etc
15:45 timotimo no pseudostashes
15:45 moritz lucasb: meh, rakudobrew failed, I guess I need to nuke some old stuff :(
15:46 masak andreoss: um, I just call it "the Lisp-y" syntax :)
15:47 lucasb moritz: ok, thank you for taking a look at it!
15:47 masak andreoss: it's literally just a way to map nested lists onto Qtree constructors.
15:48 adu joined #perl6
15:49 jdrab joined #perl6
15:50 masak andreoss: what Ven++ said, http://irclog.perlgeek.de/p​erl6/2015-12-14#i_11713873
15:50 Ven \o/
15:50 robertle is this interesting?: moar: ../nptl/pthread_mutex_lock.c:80: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
15:50 masak andreoss: the Lisp-y syntax could be replaced with explicit Qtree constructor calls all over. but it'd be longer and not as pretty. so the Lisp-y syntax is a DSL for hiding lots of .new calls
15:51 masak andreoss: my only regret is that I must do it as dumb strings, rather than as a slang.
15:51 * masak realizes as soon as he's said that that he can probably do it as a slang today
15:52 Skarsnik enum are not great to use with NC ><
15:52 masak Skarsnik: "NC"?
15:52 Ven masak: hey, that'd be a cool thing to do
15:53 Skarsnik nativecall
15:53 Skarsnik or it should be easier to use them as their value
15:53 CIAvash joined #perl6
15:54 masak Ven: I have a hard time telling whether the fains would be slight, or well worth it.
15:54 Ven masak: I'd like it just to get to know better perl6 slangs :)
15:55 Ven do we have some docs on them, or should I look at FROGGS++'s modules?
15:55 Skarsnik https://github.com/Skarsnik/DBIish/blob​/master/lib/DBDish/mysql/Native.pm6#L33 Like this does not work if I do %mysql-type-conv($enumvaluefrommysql)
15:56 domm joined #perl6
15:56 gfldex where could 'Type Array does not support associative indexing.' come from?
15:56 ZoffixW m: my @a; say @a<foo>
15:56 camelia rakudo-moar de2361: OUTPUT«Type Array does not support associative indexing.␤  in block <unit> at /tmp/w1UZZas8My:1␤␤Actually thrown at:␤  in block <unit> at /tmp/w1UZZas8My:1␤␤»
15:56 masak Ven: the latter, I think.
15:57 Skarsnik interesting
15:57 masak Ven: I'd be instantly sold if we did AST interpolation somewhere -- but we don't :)
15:57 Skarsnik @a as .kv but
15:57 Skarsnik m: my @a = 1,2,3; say @a<1>;
15:57 camelia rakudo-moar de2361: OUTPUT«Type Array does not support associative indexing.␤  in block <unit> at /tmp/wnA0qkB5yq:1␤␤Actually thrown at:␤  in block <unit> at /tmp/wnA0qkB5yq:1␤␤»
15:58 yqt joined #perl6
15:58 timotimo for one, @a<1> isn't @a{1}, it's @a{'1'}
15:59 timotimo and .kv is on everything :P
15:59 ZoffixW m: my @a = 1,2,3; say @a{1};
15:59 camelia rakudo-moar de2361: OUTPUT«Type Array does not support associative indexing.␤  in block <unit> at /tmp/IQ1LDC69mk:1␤␤Actually thrown at:␤  in block <unit> at /tmp/IQ1LDC69mk:1␤␤»
15:59 timotimo m: say "foobar".kv
15:59 camelia rakudo-moar de2361: OUTPUT«(0 foobar)␤»
15:59 gfldex ZoffixW: looks like General Rakudo Confusion. Sadly I trigger this with dd. Pretty tricky to get hold of that data that is actually causing it that way.
16:00 pmurias jnthn: the "Proposal for 6.c release and beyond" seems sane
16:00 ZoffixW m: my @a = 1,2,3; say @a.kv<1>;
16:00 camelia rakudo-moar de2361: OUTPUT«Type Seq does not support associative indexing.␤  in block <unit> at /tmp/unmdetTiPB:1␤␤Actually thrown at:␤  in block <unit> at /tmp/unmdetTiPB:1␤␤»
16:00 ZoffixW heh
16:00 Woodi TimToady: in: True while ++$foo < 10_000_000;   body is constants so 10m less ops to do; like in  http://sbel.wisc.edu/Courses/ME964/​Literature/knuthProgramming1974.pdf  on page7
16:00 pmurias jnthn: have you considered keeping the 6.c test suit in a branch?
16:00 * masak .oO( General Rakudo Confusion is famous for winning the battle of Hash and Dis-Array )
16:01 gfldex o.0 it's not dd, it's actually qq
16:01 * masak .oO( have you considered sending the test suit to the dry cleaners )
16:02 jnthn pmurias: I'm not sure what that wins us, tbh
16:02 jnthn pmurias: We still want to run it on "make spectest"
16:02 masak today's autopun, courtesy of jnthn++: https://twitter.com/SilverVVul​pes/status/643474990290092032
16:03 ZoffixW heh
16:06 Ven m: whenever supply { emit 1 } -> $a {say 1;};
16:06 camelia rakudo-moar de2361: OUTPUT«Cannot have a 'whenever' block outside the scope of a 'supply' block␤  in block <unit> at /tmp/g3w2_11yc7:1␤␤»
16:07 ilmari m: react { whenver supply { emit 1 } -> $a { say $a; done } }
16:07 camelia rakudo-moar de2361: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tZOhQG4l8d␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/tZOhQG4l8d:1␤------> 3react { whenver supply { emit 1 }7⏏5 -> $a { say $a; done } }␤  …»
16:07 pmurias jnthn: if (when? ;) ) we encounter bugs and want to expand the test suit a bit where will we add the new tests?
16:07 Ven m: react { whener supply { emit 1 } -> $a {say $a; done}; }
16:07 camelia rakudo-moar de2361: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zfHO9FF_Hs␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/zfHO9FF_Hs:1␤------> 3react { whener supply { emit 1 }7⏏5 -> $a {say $a; done}; }␤    …»
16:07 RabidGravy it just occurred to me that the %*RESOURCES thingy makes doing an Alien::* thing really, really easy
16:07 Ven jnthn: ^ is that semantically wrong?
16:08 andreoss masak: may i add some auxiliary roles for Val and use them to implement < and >? Or you think Val::Ord would be unnecessary ?
16:08 RabidGravy if the thing you want isn't present then you build with a prefix of resources and have it installed with the module
16:09 jnthn pmurias: Under future/ or so
16:09 jnthn Ven: Um, looks like typo?
16:09 Ven jnthn: ?
16:09 jnthn m: react { whenever supply { emit 1 } -> $a {say $a; done}; }
16:09 camelia rakudo-moar de2361: OUTPUT«1␤»
16:10 Ven nice, thanks :)
16:10 Ven the error message made me thing the "supply" there was unexpected
16:10 domm joined #perl6
16:10 andreoss masak: also, if we use infix:«==» for strings, why not use ""
16:10 |Tux| joined #perl6
16:11 andreoss ... why not use infix:«+» for concatenation as well?
16:11 masak andreoss: heresy! :P
16:11 Ven andreoss: there's an explanation somewhere in the issues, I think :)
16:11 masak andreoss: to be fair, you have a point.
16:12 geekosaur I think + for concat runs into people expecting a Perl-ish autoconversion between number and string
16:12 [Coke] while perl 6 would let us safely use the same operators for different objects, perl has a history of having different operators for different things.
16:12 masak andreoss: but notice that I can see bugs happen because of strings and numbers being mixed up with +, but no additional bugs happening from a (strict) == between numbers and strings
16:12 [Coke] m: say "3" + "4";
16:12 camelia rakudo-moar de2361: OUTPUT«7␤»
16:13 lucs Grammar problem: https://gist.github.com/lucs/4ecb7602b8e474a01c1e
16:13 Skarsnik moritz, did you work/write the mysql part of dbiish? I think there is a bug calling execute if you don't fetch everything
16:13 ZoffixW m: say "foo is " ~ 4+4
16:13 camelia rakudo-moar de2361: OUTPUT«foo is 8␤»
16:14 ZoffixW ^^ my strong -1 of having + as concat. JS does it and I hate it there
16:14 retupmoca joined #perl6
16:14 andreoss masak: is 007 meant to be more like ES or perl 6?
16:15 andreoss issues reference to ES7 a lot
16:21 brrt joined #perl6
16:23 masak the object syntax is straight from ES6. the rest is largely a mix of Perl 6 and Python.
16:25 xfix joined #perl6
16:26 dakkar context for my coming questions: https://github.com/dakkar/p6-cstruct-tests
16:26 abraxxa does given when support a list of values?
16:26 abraxxa like when Int, Num {
16:26 masak syntactically, yes
16:26 dakkar is it expected that subclassing a repr(CStruct) will match the C idiom of embedding the parent struct as the first member of the derived struct?
16:26 masak abraxxa: but probably doesn't do what you think
16:27 abraxxa i want the same when block for multiple values of the given var
16:27 nine m: say "0" == "0.0"
16:27 camelia rakudo-moar de2361: OUTPUT«True␤»
16:27 abraxxa http://perl6intro.com/#_given doesn't show that
16:27 masak abraxxa: aha. `when Int | Num`
16:27 jnthn dakkar: I expect so, though you probably have to mark the subclass as repr('CStruct') also
16:27 abraxxa masak: thanks!
16:28 dakkar jnthn: yep, it's required, otherwise it fails to compile
16:28 dakkar now, 2nd question: inlined Str is immutable even if marked "is rw"
16:28 abraxxa YESSSS
16:28 abraxxa i can fetch from Oracle!
16:28 ZoffixW \o/
16:28 dakkar I had to write a rw accessor returning a proky that binds on STORE
16:28 abraxxa that makes in and out-binds work!
16:29 Skarsnik Nice :)
16:29 dakkar is the current behaviour intended? why? how bad is what I did?
16:29 abraxxa i'll push this to github when rebase to the refactored DBIish
16:29 abraxxa Skarsnik: you did the refactor, right?
16:29 Skarsnik depend, what refactor?
16:29 abraxxa split up in one file per class
16:29 Skarsnik seperate everything in lot of file is not me
16:29 abraxxa ok
16:31 khisanth_ joined #perl6
16:31 gtodd hmmm  ... for first time in a while perl6 won't build here :-O ;)  ..... compiling src/io/io.o
16:32 gtodd src/io/io.c:53:68: error: too many arguments provided to function-like macro invocation
16:32 gtodd MVMint64 ret = handle->body.ops->introspection->fileno(tc, handle);
16:34 gfldex m: my $index-display = 'foo'; qq{$index-display</a>};
16:34 camelia rakudo-moar de2361: OUTPUT«Type Str does not support associative indexing.␤  in block <unit> at /tmp/RHq43wjLTP:1␤␤Actually thrown at:␤  in block <unit> at /tmp/RHq43wjLTP:1␤␤»
16:35 gfldex it's not General Rakudo Confusion. It's rather General gfldex Confusion
16:35 RabidGravy gtodd, very recent commit that
16:36 leont gtodd: first guess: is there a fileno macro involved?
16:37 flussence gfldex: I can see the "HTML error" becoming a very-F AQ in the next 2 weeks, maybe it ought to have a better message...
16:37 gfldex m: my $index-display = 'foo'; dd Q:scalar{$index-display</a>};
16:37 camelia rakudo-moar de2361: OUTPUT«Type Str does not support associative indexing.␤  in block <unit> at /tmp/eBQdWdzxYc:1␤␤Actually thrown at:␤  in block <unit> at /tmp/eBQdWdzxYc:1␤␤»
16:37 jnthn fileno is just a struct member
16:37 gfldex is there a Q-way to interpolate $foo but not $foo<bar> ?
16:37 brrt abraxxa++ for sticking with it
16:38 TimToady gtodd: did you reconfig
16:38 lucs Bugs or misunderstandings?: https://gist.github.com/lucs/4ecb7602b8e474a01c1e
16:38 flussence gfldex: backslash the \<
16:38 flussence or use {$foo}<bar>
16:39 flussence or q:s{}, maybe
16:39 flussence m: my $foo = 1; say q:s{$foo<bar>}
16:39 camelia rakudo-moar de2361: OUTPUT«Type Int does not support associative indexing.␤  in block <unit> at /tmp/VmE2rLYV9d:1␤␤Actually thrown at:␤  in block <unit> at /tmp/VmE2rLYV9d:1␤␤»
16:39 gfldex would be nice if there would be a Q without $foo<bar>, quite a lot of typing that would save
16:40 molaf joined #perl6
16:40 domm joined #perl6
16:40 masak m: sub d($date) { return "dopparedan" if $date == Date.new(2015, 12, 24); return "dan före " ~ d($date + 1) }; say d(Date.today)
16:40 camelia rakudo-moar de2361: OUTPUT«dan före dan före dan före dan före dan före dan före dan före dan före dan före dan före dopparedan␤»
16:40 masak \o/
16:40 flussence well there's q:c for only interpolating {} blocks, and q:e lets you embed \qq"" iirc
16:41 gfldex :c will do
16:42 TimToady but you could use that anyway here with ordinary qq
16:43 * lucs would -- will, in the future, he hopes :-) -- love to interpolate «» closures in his LaTeX heredocs.
16:43 abraxxa brrt: took me half a year
16:44 brrt well spent :-)
16:44 Woodi abraxxa++ ! :)
16:45 ZoffixW Is there a way to do chained attributes that's less involved than this: https://en.wikipedia.org/w/index.php?title=​Fluent_interface&amp;oldid=681159116#Perl_6 ?
16:45 abraxxa thanks!
16:46 ZoffixW i.e. $obj.foo('bar').ber('beer').baz; where foo/ber/baz are attributes. When you give them a value they set it and return the invocant and when you don't give them the value, they return the value of the attribute?
16:46 jnthn That's not really idiomatic Perl 6
16:46 test123 joined #perl6
16:47 flussence ZoffixW: the last time this was brought up, that code was a 3 line given {} block and someone said it was wrong... so I guess this is the "fixed" version
16:47 jnthn Yeah, using given and .foo = ...; .bar = ...; fits better
16:47 timotimo that wikipedia article should be changed to remove the \ in front of the newlines
16:47 ZoffixW flussence, no, the most recent version of that page is the given {} block, which is not a fluent interface at all, but use of topicalizer under the guise of the fluent interface
16:47 timotimo and didn't we actually get an ecosystem module that does the thing there?
16:47 jnthn You could hand-write the accessors and I guess maybe use --> self in the signature
16:47 ZoffixW timotimo, that's a version from history
16:47 timotimo oh, that's ... ah
16:47 flussence oh
16:48 test123 is perl6 production ready yet?
16:48 ZoffixW test123, no
16:48 TimToady lucs: at the moment <ident> is hard-wired in like <alpha> is
16:48 timotimo test123: depends.
16:48 flussence well then just make this the current version and add a 3 line note under it saying “this is how we actually do it” :)
16:48 jnthn test123: People *are* using it in production. :)
16:48 gtodd src/io/io.c:53:18: warning: incompatible pointer to integer conversion initializing 'MVMint64' (aka 'long') with an
16:48 gtodd expression of type 'MVMint64 (*const)(MVMThreadContext *, MVMOSHandle *)' [-Wint-conversion]
16:48 gtodd MVMint64 ret = handle->body.ops->introspection->fileno(tc, handle);
16:48 gtodd leont: guess so
16:48 ZoffixW jnthn, but... but... TIMTOADY
16:48 jnthn test123: Doesn't matter what we say either way; folks who find it useful already will go ahead and use it in production. :)
16:49 ZoffixW TIMTOWTDI or however you spell it
16:49 timotimo gtodd: ugh, there's a function pointer being casted into n int there?
16:49 test123 ZoffixW, what else are we waiting to get perl6 to run at production?
16:49 flussence oh oh, I have a real answer for the question this time!
16:49 test123 LOL
16:49 flussence when it can be installed using distro package managers
16:50 ZoffixW test123, Christmas release of the spec, I suppose. Then... I'm not sure how many shaky bugs are there
16:50 ZoffixW flussence, but do people actually do fluent interface like that?
16:50 dakkar aaargh. how do I test destructors??
16:50 Skarsnik I will say 3 months after x-mas x)
16:50 dakkar as in, destructors called by the gc
16:50 gtodd timotimo: that's just so ... un-christmassy
16:50 dakkar grrr
16:50 test123 so, we are continue using perl 5.<forever>
16:50 flussence dakkar: you don't, that's something I figured out the hard way 5 years ago
16:51 lucs TimToady: Okay, I'll steer away from using (accidentally, it turned out, but there it is) the predefined ones.
16:51 dakkar flussence: eh
16:51 dakkar I'm binding C libraries
16:51 ZoffixW test123, Perl 5 and Perl 6 are different languages...
16:51 dakkar I'd *really* like to avoid leaks, and double free, and segfaults
16:51 TimToady though we use <ident> for something in the p6 grammar without a problem
16:51 flussence destructors have never really worked in a predictable way
16:51 test123 yes, i need perl, if 6 not ready for production. whatelse i use?
16:51 test123 5
16:51 brrt production is kind of vague. perl6 is probably unsuitable for things where you use highly optimized c
16:51 dakkar at the moment, I can not reliably bind *any* C library
16:52 ZoffixW test123, what do you mean "you need perl"?
16:52 flussence there might be a way to force them to run using nqp-voodoo, but then you're dependent on nqp
16:52 test123 perl to run website
16:52 dakkar because I can't make sure memory allocated C-side gets de-allocated
16:52 gtodd test123: I'm goin gto use perl5 for a long time but possibly not forever ...
16:52 abraxxa when i want to push an undef to an array should I use Nill?
16:52 ZoffixW test123, Perl 5 and Perl 6 are different languages. Perl 5 existed for ages and is production ready. Perl 6 is not yet production ready. You may as well ask whether you should use Ruby
16:52 ZoffixW test123, use http://mojolicio.us/ It's Perl 5.
16:53 robertle ZoffixW: is ruby production ready? ;)
16:53 test123 no ruby
16:53 ZoffixW test123, and a very nice framework.
16:53 flussence .oO( GC is torturing testers on behalf of the implementors )
16:53 test123 perl is better
16:53 gtodd flussence: hehe
16:53 ZoffixW test123, there are two perls :)
16:53 test123 yes, 5 and 6
16:54 test123 i am stuck at 5
16:54 test123 really want to change to use 6
16:54 test123 but....
16:54 ZoffixW test123, what do you mean "stuck"? It's an actively developed language.
16:54 brrt i think production ready means 'people i think are authorative on such choices think using $_ for a valuable service is acceptable'
16:54 gtodd test123: use Moose;  :-D  otoh I just noticed p5-mop is working pretty well
16:55 timotimo brrt: i use $_ for all my valuable services!
16:55 ZoffixW test123, at the current state of things, your best bet is to use Perl 5's http://mojolicio.us/ Then check back with Perl 6 in a year to see if it has Good Things(tm) to offer
16:55 test123 is p5-mop stable and better than moose?
16:55 gtodd test123: it even seems to work on perl-5.6
16:55 timotimo ZoffixW: a year? wow. you're not giving us enough credit :)
16:55 abraxxa oh great, Oracle sorts NULLs before non-nulls and the DBIish tests fail
16:55 ZoffixW timotimo, to be clear, I mean a year for a decent and competitive Perl 6 web framework to emerge
16:55 timotimo ah
16:56 timotimo yeah, that kind of thing surely takes time
16:56 ZoffixW Last I tried Bailador...
16:56 gtodd so ... perl-5.6 now can sport a perl6 inspired mop  ... if you wanna toss the numbers 5 and 6 around
16:56 * ZoffixW shivers
16:56 prammer joined #perl6
16:56 test123 i need a faster perl
16:56 pmurias joined #perl6
16:56 test123 like perl6 run at jvm
16:56 ZoffixW test123, than what?
16:57 timotimo perl6 is only faster than perl5 in some cases nowadays. but for most things web-devs need it's usually slower than perl5
16:57 * ZoffixW starts to suspect test123 is just a troll
16:57 brrt test123 'is $a better than $b' is not an engineering question
16:57 brrt .hug test123
16:57 gtodd hmm surely it must be an astonishing proof of something that with a few dependencies p5-mop will work with perl-5.6 (?!)
16:58 brrt gtodd: yes
16:58 brrt perl5++
16:58 gtodd truly ....
16:58 test123 i am not a troll
16:58 test123 :(
16:58 timotimo non-trolls are allowed to get hugs, too
16:58 test123 troll won't know perl6
16:59 gtodd yoleaux: hug test123
16:59 test123 they only know money
16:59 gtodd .hug ??
16:59 brrt well we apologise
17:00 brrt its just that we do get some trolls on the same topic
17:00 test123 btw... perl forever. no ruby! no php. i go now
17:00 test123 bye
17:00 * ZoffixW laughs
17:00 robertle left #perl6
17:01 * flussence settles for trying to get this 2015.11 installable via distro, since precomp is a complete no-go
17:01 andreoss $ perl6 -Ilib bin/007 -e='say(4 == 4 == 4)'
17:01 andreoss 0
17:01 andreoss
17:01 brrt :-)
17:02 andreoss this should not work, right?
17:02 timotimo depends completely on whether or not 007 implements chaining ops
17:02 raiph joined #perl6
17:03 gtodd test123: never say never Facebook is errm hacking on PHP ....
17:03 gtodd Hack-ing (cough cough)
17:03 andreoss timotimo: i can parse them surely, so it does it like (a==a)==a, which ends up wrong
17:04 brrt gtodd i think he's gone
17:04 timotimo andreoss: it's not about "being able to parse them"
17:04 pep_ joined #perl6
17:04 timotimo "chaining ops" are those that turn a == a == a into a == a && a == a behind the scenes
17:04 prammer joined #perl6
17:04 brrt i think false ir 0 is the right answer for (a==a)=÷a
17:05 timotimo m: say 0 == 0 == 0
17:05 camelia rakudo-moar de2361: OUTPUT«True␤»
17:05 timotimo ^- that's what you get with a language that does chaining ops for you
17:06 abraxxa can someone please answer my Nil question?
17:06 abraxxa is Nil to Perl 6 what undef is for Perl 5?
17:06 andreoss i know that, i mean should it work at all with 007, in the future
17:06 timotimo m: say undef
17:06 camelia rakudo-moar de2361: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s_FgNxgVTP␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ an undefined type object such as Any or Int,␤   :!defined as a matcher,␤        Any:U as a type constraint,␤    Nil a…»
17:06 Skarsnik Nil is a failure
17:06 timotimo ^- read this eror message :)
17:07 abraxxa Oracle has an indicator that tell me if the value is NULL in the Database
17:07 abraxxa and i wonder what I should set the column variable to
17:07 Skarsnik oh same here with mysql x)
17:07 timotimo i'd say use the type object for what the column type is
17:07 abraxxa the docs say: class Nil Absence of a value
17:07 abraxxa which sounds like exactly what NULL means
17:07 timotimo if the colums is defined to be a Text or Varchar or something, use Str. if it's an integer or something, use Int
17:08 ZoffixW m: say 5÷2
17:08 camelia rakudo-moar de2361: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Z9ZFeIXRoZ␤Bogus postfix␤at /tmp/Z9ZFeIXRoZ:1␤------> 3say 57⏏5÷2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modif…»
17:08 ZoffixW aww :(
17:08 RabidGravy abraxxa, yeah *but* the column is a Str or Int or Num or whatever and Nil isn't one of those
17:08 abraxxa RabidGravy: that sounds sane, thanks!
17:09 Skarsnik NULL is a type in Mysql
17:09 Skarsnik MYSQL_TYPE_NULLNULL-type field
17:09 timotimo a ... type?!
17:09 raiph abraxxa: Nil means "absence of value and i can't, or can't be bothered, to say any more"
17:09 RabidGravy :)
17:09 timotimo AFK
17:09 TimToady it usually means a failure you should have anticipated, such as a missing hash element
17:10 abraxxa and Oracle doesn't differentiate between '' and NULL
17:10 Skarsnik :(
17:11 abraxxa i like it but I'm used to it since 15 years
17:11 leont Skarsnik: C++11 also moved in that direction (a constant nullptr, of type nullptr_t), it's wonderful
17:15 masak andreoss: 007 does not have chaining associativity. it might have it in the future. it's not on my priority list. I wouldn't complain if someone sent a PR to implement it.
17:17 masak andreoss: right now, the associativity of infix:<==> is 'left', just like all ops except for infix:<=> and the postfixes
17:18 dakkar is it expected that chars(*) and *.chars do different things?
17:18 dakkar (as in, the first one doesn't compile)
17:18 RabidGravy in that there isn't a sub version of chars, it's probably deliberate
17:19 lucasb m: say chars('abc')
17:19 camelia rakudo-moar de2361: OUTPUT«3␤»
17:19 RabidGravy hey, there is
17:19 flussence m: say &chars.signature; say *.WHAT
17:19 camelia rakudo-moar de2361: OUTPUT«($)␤(Whatever)␤»
17:19 gtodd :-D  there did seem to be a pattern of differences between functions and methods re: defaults ...
17:19 flussence m: say chars(*)
17:19 camelia rakudo-moar de2361: OUTPUT«Cannot call chars(Whatever); none of these signatures match:␤    (Cool $x)␤    (Str:D $x)␤    (str $x --> int)␤  in block <unit> at /tmp/PMozdITFa_:1␤␤»
17:19 leont Whatever is something you apply operators on to get something else
17:19 gtodd errm there did seem to *me* that is
17:20 flussence m: say Whatever.^mro, Str.^mro;
17:20 camelia rakudo-moar de2361: OUTPUT«((Whatever) (Any) (Mu))((Str) (Cool) (Any) (Mu))␤»
17:20 lucasb oh, he meant the literal Whatever object, sorry :)
17:20 dakkar leont: it's also something you use to build WhateverCode
17:20 leont Yeah
17:20 masak andreoss: oh, and one more thing: the fact that Perl 6 and Python *agree* on infix:<==> being chaining is a signal that it should be in 007, too ;)
17:20 flussence m: my $x = &chars.assuming(); say $x('abc')
17:20 camelia rakudo-moar de2361: OUTPUT«3␤»
17:20 nine flussence: why is precomp a no-go?
17:21 flussence nine: it wants to write to root-owned paths during and after install
17:21 jnthn whatever-currying doesn't happen to sub call arguments
17:22 koo8 joined #perl6
17:22 flussence ~ $ perl6 --version
17:22 flussence This is perl6 version 2015.11 built on MoarVM version 2015.11
17:22 flussence heeeeeey, it worked!
17:23 nine flussence: I even tested that scenario and it seemed to work just fine.
17:25 dakkar jnthn: I noticed :)
17:25 dakkar jnthn: what's the rationale?
17:25 brrt joined #perl6
17:25 flussence nine: then I'm not entirely sure what's going on. I'll give it another try in a minute
17:26 stmuk I've attempted to write a GLR advent blog post for tomorrow which is in draft if anyone can check it
17:27 stmuk its fairly basic
17:28 jnthn dakkar: Well, more generally it doesn't in argument lists. It'd mean you would never pass * to things that should interpret it.
17:29 dakkar fair enough
17:29 brrt stmuk: would be happy to
17:30 dakkar going back to testing destructors… seems like my best bet is to call $obj.DESTROY explicitly, instrument the destructors with some logging, then test that things got logged
17:30 RabidGravy I have precisely once written "multi sub foo(Whatever $) { .... }"
17:30 dakkar RabidGravy: you're clearly not imaginative enough :)
17:31 RabidGravy actually not correct, five times in one file ;-)
17:32 |Tux| started afresh and removed .precomp. Now *some* tests run fine, others still fail with the run_alt problem
17:32 |Tux| prove -j5 causes additional havoc
17:32 RabidGravy https://github.com/jonathanstowe/Chr​onic/blob/master/lib/Chronic.pm#L204 and friends
17:32 prammer joined #perl6
17:32 psy_ joined #perl6
17:32 dakkar hmm. still CStruct: I have a class is repr('CStruct') { has Str $.foo }; the C library allocates the string; I then $obj!str := "newstr"; what happens to the memory allocated by the C library?
17:33 dakkar (this may well be a case of "don't do that")
17:33 labster joined #perl6
17:33 psy_ joined #perl6
17:35 dalek ecosystem: 5a845f8 | RabidGravy++ | META.list:
17:35 dalek ecosystem: Add Audio::Silan
17:35 dalek ecosystem:
17:35 dalek ecosystem: https://github.com/jonathanstowe/Audio-Silan
17:35 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/5a845f802e
17:35 |Tux| test             50000    20.855    20.746
17:35 |Tux| test-t           50000    13.856    13.747
17:35 |Tux| csv-parser       50000    24.774    24.665
17:35 |Tux| 13.8! Holy cow
17:35 flussence oh wow
17:35 RabidGravy Harr
17:35 |Tux| don't know if I should be happy or sad now :)
17:35 timotimo holy fucking wat
17:36 timotimo that must be TimToadys work?
17:36 nine Nice one!
17:36 RabidGravy so what was the high water mark? in the 70s wasn't it?
17:36 abraxxa dakkar: that sounds like what Oracle OCI does
17:36 |Tux| timotimo: that  is the fastest run I ever measured
17:36 dakkar abraxxa: which one? testing destructors, or binding strings?
17:36 |Tux| the downlside is that my tests don't pass because of the run_alt thingy
17:36 andreoss m: sub infix:<<mod10==>>($a, $b) { $a % 10 == $b % 10 } ;  say(13 mod10== 23 mod10== 33)
17:36 camelia rakudo-moar de2361: OUTPUT«False␤»
17:37 abraxxa dakkar: look at https://github.com/abraxxa/DBIish/bl​ob/master/lib/DBDish/Oracle.pm6#L371
17:37 abraxxa binding strings
17:37 masak |Tux|: the tests run really fast, but they don't pass? :P
17:37 masak |Tux|: maybe failing takes less time...?
17:37 andreoss how do i make chainable my own infixes?
17:37 |Tux| the timing test is not part of the test suite
17:37 RabidGravy they fail really quickly
17:37 masak |Tux|: ah, ok :)
17:37 stmuk very agile
17:37 dakkar abraxxa: ehm… not related to what I'm thinking. My explanation may have been a bit too succint
17:38 dakkar https://github.com/dakkar/p6-cstr​uct-tests/blob/master/test.p6#L64 ← replacing an inlined Str in a CStruct via binding
17:38 domm joined #perl6
17:39 flussence andreoss: looks like in the core that's done with nqp code...
17:42 n0tjack joined #perl6
17:45 RabidGravy so anyway, that's another yak down on my path to world domination
17:49 japhb joined #perl6
17:49 japhb .
17:49 nine jnthn: what should be a QRegex::NFA in $nfa seems to be an NQPArray with random content (changing with recompilation of the compiler)
17:49 japhb Morning, all!
17:50 muraiki hihi
17:50 RabidGravy harr!
17:53 ZoffixW joined #perl6
17:54 ZoffixW What is the opposite of .first?
17:54 dalek doc: d793b51 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Str.pod:
17:54 dalek doc: add Str::trans
17:54 dalek doc: review: https://github.com/perl6/doc/commit/d793b5132c
17:54 dalek doc: 4a4055e | (Wenzel P. P. Peppmeyer)++ | doc/Type/Str.pod:
17:54 dalek doc: Merge pull request #242 from gfldex/master
17:54 dalek doc:
17:54 dalek doc: add Str::trans
17:54 dalek doc: review: https://github.com/perl6/doc/commit/4a4055ec8d
17:54 timotimo ZoffixW: first( :end)
17:54 ZoffixW :|
17:54 timotimo um ...
17:54 timotimo http://doc.perl6.org/routine/first  -  the usage section there is *weird*
17:54 timotimo ":FROM_END" ?!?!
17:55 ZoffixW m: my @a = <foo bar baz>; say @a.first :end, ' ', @a.tail
17:55 camelia rakudo-moar de2361: OUTPUT«baz (baz)␤»
17:55 ZoffixW hm, fair enough. Thanks, timotimo++
17:55 jnthn nine: o.O
17:55 abraxxa my num64 $value = 0; results in This type cannot unbox to a native number
17:55 abraxxa why?
17:56 RabidGravy it's an int
17:56 gfldex m: say 0.WHAT;
17:56 camelia rakudo-moar de2361: OUTPUT«(Int)␤»
17:56 jnthn Need 0e0 for a num literal
17:56 RabidGravy try  "my num64 $value = Num(0)"
17:56 RabidGravy or what jnthn said
17:56 [Coke] m: my num64 $v = e0e;
17:56 camelia rakudo-moar de2361: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8hCGxQSHBU␤Undeclared routine:␤    e0e used at line 1␤␤»
17:57 japhb joined #perl6
17:57 [Coke] m: my num64 $v = 0e0; #hee
17:57 camelia rakudo-moar de2361: ( no output )
17:57 abraxxa ok
17:57 flussence nine: here you go: https://gist.github.com/flu​ssence/eb0ce344a24f8f909099 -- there's a bunch of error messages, including most of the sanity tests failing. Similar things happen if I try building rakudo in my userdir with system-installed nqp/moar
17:57 vendethiel joined #perl6
17:57 abraxxa Undeclared routine:
17:57 abraxxa e0e used at line 801
17:57 masak abraxxa: 0e0
17:57 abraxxa [Coke] mistyped
17:57 masak yes
17:58 masak and then typed it right :)
17:58 timotimo abraxxa: damn, my recent code doesn't seem to catch that!
17:58 timotimo m: my Num $v = 0;
17:58 camelia rakudo-moar de2361: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6yGmR2sCJj␤Cannot assign a literal of type Int (0) to a variable of type Num. You can declare the variable to be of type Real, or try to coerce the value with 0.Num or Num(0), or just write the value as 0e0…»
17:58 abraxxa i have to go
17:58 masak abraxxa: \o
17:58 abraxxa Oracle returns SQLT_NUM which is it's internal NUMBER format
17:58 abraxxa You should not need to use NUMBER as an external data type.  If you do use it, Oracle Database returns numeric values in its  internal 21-byte binary format and expects this format on input.
17:58 abraxxa i'm trying to rebind it as float
17:59 ZoffixW m: my @a = <foo bar baz>; say @a.first :end, ' ', @a.last
17:59 camelia rakudo-moar de2361: OUTPUT«Method 'last' not found for invocant of class 'Array'␤  in block <unit> at /tmp/5dybbPKV35:1␤␤»
17:59 abraxxa but enough for today, bye!
17:59 ZoffixW .last is just itching to exist :)
17:59 ZoffixW especially 'cause @a[*-1] is weird
17:59 timotimo well, .last is for matching stuff
18:00 abraxxa yes, please!
18:00 abraxxa i was wondering yesterday about that too
18:00 timotimo and .[*-1] is for getting the actual last element
18:00 ZoffixW Matching stuff?
18:00 abraxxa HAHA
18:00 abraxxa it works
18:00 timotimo yeah, you give a matcher to .first
18:00 abraxxa if $dty eq SQLT_NUM { $dty = SQLT_FLT }
18:00 timotimo if you want the first element/s or the last element/s, you need to use .head and .tail
18:00 abraxxa eat your internal data format Oracle!
18:00 abraxxa first and last reads better imho
18:00 abraxxa but there is a first
18:01 abraxxa that why you immediatly start looking for a last in the docs
18:01 abraxxa at least i did
18:01 ZoffixW m: my @a = <foo bar baz>; say @a.first :end, ' ', @a.last.WHAT
18:01 camelia rakudo-moar de2361: OUTPUT«Method 'last' not found for invocant of class 'Array'␤  in block <unit> at /tmp/NmpspfteSg:1␤␤»
18:01 ZoffixW m: my @a = <foo bar baz>; say @a.first :end, ' ', @a.tail.WHAT
18:01 camelia rakudo-moar de2361: OUTPUT«baz (Seq)␤»
18:01 ZoffixW m: sub foo { my @a = [<foo bar baz>, <foo bar baz>, <que foo mm>]; return @a }; say foo.tail.first
18:01 camelia rakudo-moar de2361: OUTPUT«(que foo mm)␤»
18:01 ZoffixW m: sub foo { my @a = [<foo bar baz>, <foo bar baz>, <que foo mm>]; return @a }; say foo.tail[0].first
18:01 camelia rakudo-moar de2361: OUTPUT«que␤»
18:01 ZoffixW yeah, that's not as nice
18:02 timotimo ah
18:02 timotimo because .tail and .head always give lists, yeah
18:02 dalek roast: de38b0b | jnthn++ | S32-io/IO-Socket-Async-UDP.t:
18:02 dalek roast: Basic tests for UDP sockets.
18:02 dalek roast: review: https://github.com/perl6/roast/commit/de38b0b002
18:02 timotimo i could kind of see a .only method that gives you "the only element" or dies if there's multiple
18:03 lucasb timotimo: interesting idea... unpacking a 1-elem list, you mean?
18:03 ZoffixW I could kind of see a non-destructive push/pop
18:03 timotimo jnthn: "used to check listener received data, and to make" ?
18:03 lucasb could also be named ".just"
18:03 timotimo lucasb: yeah
18:03 jnthn love!
18:03 ZoffixW Maybe I've just used this API I'm porting too often that I'm disappointed that it doesn't map to Perl 6 nicely at all.
18:03 jnthn ...what on earth was I thinking :)
18:04 dalek roast: 2482f11 | jnthn++ | S32-io/IO-Socket-Async-UDP.t:
18:04 dalek roast: Finish a comment; timotimo++.
18:04 dalek roast: review: https://github.com/perl6/roast/commit/2482f11fd2
18:05 masak jnthn: dude, you wrote a UDP test, and the words ended up in the wrong order? :P
18:05 ZoffixW hahaha
18:05 masak jnthn: some words didn't arrive at all!
18:06 dalek nqp: ed362a9 | jnthn++ | / (2 files):
18:06 dalek nqp: Map async UDP socket ops on Moar backend.
18:06 dalek nqp: review: https://github.com/perl6/nqp/commit/ed362a9deb
18:06 jnthn masak: lol
18:06 jnthn That's oddly appropriate :P
18:06 jnthn .oO( I'd tell you a UDP joke, but you wouldn't get it. )
18:06 ilmari and some letters
18:06 domm joined #perl6
18:06 ilmari "Unhelpful Dataloss Protocl"
18:07 jnthn hah
18:07 jnthn I'll call it an autopun rather than poor typing :P
18:07 masak just insist that you did send that letter
18:07 ZoffixW This is really eating at me... You can get consistency by using  .head[0] / .tail[0], but adding the [0] is annoying and especially so since .first exists.
18:08 masak ZoffixW: you can also get consistency by defining your own lexical subs.
18:08 jnthn .[*-1] is another option
18:08 * leont appreciates UDP for some purposes, but it's usually used unnecessarily :-/
18:08 jnthn leont: Writing these tests is the first time I've used it :P
18:08 lucasb ZoffixW: I agree that the API is strange :(
18:09 flussence leont: UDP's gaining popularity... as a workaround for terrible hardware TCP implementations :(
18:09 timotimo UDP is also how some protocols "just work"
18:09 leont I wish SCTP had gotten popular, it combines many of the nice things about TCP with nice things about UDP
18:09 timotimo like OSC is almost always moved through UDP sockets
18:10 lucasb doc site error changed. now it is 'Could not find Pod::To::HTML:ver<True>:auth<True>:api<True> in ...'
18:10 timotimo leont: a friend who knows a lot of stuff about networking and kernel internals and such once told me that SCTP gaining popularity would have a disasterous effect on the big routers that Make The Internets
18:10 dalek rakudo/nom: 78cfbc1 | jnthn++ | t/spectest.data:
18:10 dalek rakudo/nom: Annotate test with moar.
18:10 dalek rakudo/nom:
18:10 dalek rakudo/nom: Since it won't yet pass on JVM.
18:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/78cfbc1887
18:11 leont timotimo: why would it? Those routers only have to deal with IP, right?
18:11 leont Ah, I guess the multi-homing thing
18:11 timotimo i forgot why. it was long ago
18:11 timotimo ah, right, sctp has that, too
18:11 timotimo quite ambitious
18:11 znpy joined #perl6
18:12 leont Even without that, having a multi-channeled sequential/reliable packat semantics would make lots of things a lot less complicated to implement
18:12 leont packet
18:12 domm joined #perl6
18:13 timotimo yeah
18:13 timotimo i heard that in practice UDP is reliable enough for pretty much everything?
18:13 leont It depends
18:13 leont UDP over local ethernet is typically fine, yes
18:14 timotimo absolutely
18:15 ZoffixW masak, not really.
18:16 ZoffixW Well... I guess I should say "that's not really a viable solution"
18:16 ZoffixW Especially since .last is currently not defined.
18:16 ZoffixW I see a nice symmetry of making .last be same as .first :end
18:17 lucasb and @a.last(:start) would mean the same as .first :D
18:17 lucasb or maybe .last(:begin)
18:18 ZoffixW Reading the docs, I see why .last is not .first :end, but... that's not intuitive to me at all that there's a .first but no .last
18:19 ZoffixW Or rather, there's a .first I can call without any args to get the first element, but there's no .last to mirror such behaviour
18:19 timotimo yeah, .last would be .first(*negated matcher*, :end)
18:20 Wchester joined #perl6
18:20 ZoffixW I think instead of .last, .tail/.head should return just the element (and not a Seq) when called without arguments
18:20 n0tjack "synergies", plural, has to be among my least-favorite buzzwords
18:20 Wchester how install perl 6?
18:20 ZoffixW Wchester, see http://rakudo.org/how-to-get-rakudo/
18:21 Wchester tanks (y)
18:21 ZoffixW I mean, why in the world would I want a Seq of one element
18:22 ZoffixW Might as well reach for .[*-1] than call .tail[0]
18:22 flussence ZoffixW: the code that consumes it might care, so it can know whether to continue being lazy or not
18:24 ZoffixW Well, ATM I have a real-life code that consumes it and it expects to operate on the last element than on a Seq composed of the last element.
18:24 FROGGS joined #perl6
18:25 prammer_ joined #perl6
18:25 ZoffixW I guess this kind'f harks back to the fact that Perl 6 is not fluent-interface-friendly
18:25 ZoffixW At least out of the box.
18:25 ZoffixW (and this API I'm porting is a fluent interface)
18:26 * ZoffixW & # meeting
18:27 brabo joined #perl6
18:27 El_Che timotimo: leont: we use a perl Radius application (UDP) and I don't think tcp would be a good fit for that kind of traffic
18:28 dalek rakudo/nom: d2b89b1 | jnthn++ | / (2 files):
18:28 dalek rakudo/nom: Add UDP support to IO::Socket::Async on Moar.
18:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d2b89b1501
18:28 dalek rakudo/nom: fc24ca9 | jnthn++ | t/spectest.data:
18:28 dalek rakudo/nom: Run S32-io/IO-Socket-Async-UDP.t.
18:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fc24ca9ec3
18:30 RabidGravy I was going to say radius was one of the biggest udp things out there
18:30 stmuk and DNS
18:30 RabidGravy and dns
18:30 RabidGravy and syslog
18:31 timotimo i think todays advent calendar post deserves to be signal-boosted a bit more
18:31 jnthn And another xmas RT falls :)
18:31 RabidGravy jnthn++ # cooking on gas
18:31 lichtkind so perl 5 with all the modules loaded was slower than perl 6?
18:32 * flussence agrees with ZoffixW's sentiment, it's strange that in a lanugage so big on immutability, only the mutating access to ends of a list is huffmanized and nice to read
18:32 El_Che RabidGravy: *is*
18:33 El_Che RabidGravy: the protocol has been replaced on paper but in real life it's the only player in town
18:33 jnthn Talking of cooking... :-) &
18:34 RabidGravy oh. I worked for an ISP for a *long* time
18:35 El_Che RabidGravy: did you move to radsec and the like?
18:36 RabidGravy nah
18:37 stmuk diameter was radius++
18:37 stmuk I believe that's part of 4G
18:37 noganex joined #perl6
18:40 dalek rakudo/nom: 219ec51 | TimToady++ | src/Perl6/Optimizer.nqp:
18:40 dalek rakudo/nom: mark locationless messags as DISLOCATED
18:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/219ec512c0
18:40 dalek rakudo/nom: 9e53fa9 | TimToady++ | src/Perl6/Actions.nqp:
18:40 dalek rakudo/nom: audit of .ast calls for wantedness
18:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e53fa91de
18:40 El_Che stmuk: "One of the largest barriers to having Diameter replace RADIUS is that switches and Access Points typically implement RADIUS, but not Diameter." (wikipedia): amen
18:40 RabidGravy but more importantly for me I can make the OSC library now without binding liblo :)
18:41 leont ZoffixW: I'm not sure how Perl 6 isn't fuent interface friendly
18:41 El_Che stmuk: radsec is radius over tcp+ssl
18:41 stmuk I'd expect ISPs still use radius
18:41 TimToady that should take care of most of the remaining spurious "Useless use" messages, but if you see one, please let me know
18:42 RabidGravy yeah, lots of hardware out there, redback, ascend all those things that don't get changed
18:42 stmuk in fact one of the best radius servers was written in perl "radiator" .. I did some coding using it
18:42 RabidGravy (except when the ascend goes on fire)
18:43 jdv79 nine: sadly looks like there is another similar bug in further tests in URI2:(
18:43 yoleaux 08:33Z <nine> jdv79: fixed the URI2 bug.
18:43 El_Che stmuk: I recently redesigned the radius setup of a big university (e.g. about 120k potential wifi users). I use radiator with custom hooks, radiator software proxies and netscaler hardware proxies
18:43 nine ZoffixW: Perl 6 is quite fluent interface friendly. There's just no need to use a "fluent" interface for constructing objects in a language that has proper named arguments support.
18:44 nine jdv79: no, there's just a couple of use statements missing
18:44 jdv79 oh?...
18:44 El_Che stmuk: radiator is non-threaded perl 5, so it needs a good architecture to be scalable
18:44 leont nine: actually, I do have such a need in one of my projects (Path::Iterator), where the order of the named things is relevant
18:46 nine jdv79: use URI2::Path::Segment; in lib/URI2/LDAP/Path/Segment.pm6 lib/URI2/MailTo/Path/Segment.pm6 lib/URI2/Tel/Path/Segment.pm6 lib/URI2/URN/Path/Segment.pm6
18:46 nine leont: doesn't sound like you're setting properties there?
18:47 leont ?
18:49 nine leont: ZoffixW's complain is that Perl 6 doesn't support Foo.new.property1('value').prop​erty2('foo').property3('bar'); out of the box. If order matters in your case, I guess you're not talking about plain object properties?
18:49 leont Correct, but it's still a fluent interface AFAIK
18:50 leont (unless my understanding of fluent interface is wrong, which is quite possible
18:50 hankache joined #perl6
18:50 jdv79 nine: sorry bout that.  jumped the gun.  it seemed similar enough to be related at first glance.
18:50 jdv79 good stuff.  thanks!
18:52 zacts|pi joined #perl6
18:53 nine jdv79: happened to me, too. That's how I knew what you meant :)
18:55 nine leont: Yes. but since it's probably methods, you wrote, the return self; at the end is not an issue.
18:57 gfldex m: my %h; %h{1,'a'} = 42; dd %h;
18:57 camelia rakudo-moar 9e53fa: OUTPUT«Hash $var = ${"1" => 42, :a(Any)}␤»
18:57 gfldex should dd know about multi-dim hashes?
18:58 gfldex m: my %h; %h{1,'a'} = 42; dd %h.perl;
18:58 camelia rakudo-moar 9e53fa: OUTPUT«Str $var = "\{\"1\" => 42, :a(Any)}"␤»
18:59 firstdayonthejob joined #perl6
19:01 ajs_ joined #perl6
19:01 n0tjack m: my @ap =: (name => 'value', name2 => 'another value', etc => '3rd'); my %h = @ap.hash; say %h;
19:01 camelia rakudo-moar 9e53fa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z_PW29GfBJ␤Malformed initializer␤at /tmp/z_PW29GfBJ:1␤------> 3my @ap =:7⏏5 (name => 'value', name2 => 'another val␤    expecting any of:␤        colon pair␤»
19:01 n0tjack m: my @ap = (name => 'value', name2 => 'another value', etc => '3rd'); my %h = @ap.hash; say %h;
19:01 camelia rakudo-moar 9e53fa: OUTPUT«etc => 3rd, name => value, name2 => another value␤»
19:05 RabidGravy so, 478 modules from 110 authors not bad
19:06 dalek nqp: a2fe8eb | TimToady++ | src/QAST/Node.nqp:
19:06 dalek nqp: include annotations in dump
19:06 dalek nqp: review: https://github.com/perl6/nqp/commit/a2fe8eb022
19:06 timotimo i imagine a module that gives you $foobar.asFluid().attr1('hey').attr2('boo').get() would be very easy to build
19:07 Sqirrel joined #perl6
19:07 nine timotimo: and that would be much better than $foobar.update(:attr1<hey>, :attr2<boo>)
19:08 timotimo you think so?
19:09 nine timotimo: absolutely not :)
19:09 timotimo well, it's what fluent interface means
19:09 RabidGravy I'm not sure it's worth it
19:10 timotimo "worth it" is null and void if you put it into an ecosystem module
19:10 timotimo then the user that wonts it can decide they want it
19:11 rindolf joined #perl6
19:13 spider-mario joined #perl6
19:15 RabidGravy I'm not going to make it, but it's generate multis for the "publics" where if called with an arg returns the object, class trait or something
19:23 llfourn joined #perl6
19:23 cpage_ joined #perl6
19:29 Skarsnik hm, how I can undef an array? @array = Mu put Mu in @array[0] x)
19:29 mtj_ joined #perl6
19:29 timotimo you can @array = Empty
19:30 timotimo m: my @arr = <hi there how are you>; say +@arr; @arr = Empty; say @arr.perl
19:30 camelia rakudo-moar 9e53fa: OUTPUT«5␤[]␤»
19:30 timotimo m: my @arr = <hi there how are you>; say +@arr; @arr = (); say @arr.perl
19:30 camelia rakudo-moar 9e53fa: OUTPUT«5␤[]␤»
19:30 Skarsnik m: my @arr = <hi there how are you>; say +@arr; @arr = Empty; say @arr.defined
19:30 camelia rakudo-moar 9e53fa: OUTPUT«5␤True␤»
19:31 FROGGS Skarsnik: it is always defined
19:31 FROGGS at least when there is an @-sigil
19:31 Skarsnik m: my @arr; say @arr.defined
19:31 camelia rakudo-moar 9e53fa: OUTPUT«True␤»
19:31 Skarsnik m: my @arr; say @arr
19:31 camelia rakudo-moar 9e53fa: OUTPUT«[]␤»
19:31 RabidGravy m: my @a = <a b c>; @a := Array; say @a.defined
19:31 camelia rakudo-moar 9e53fa: OUTPUT«False␤»
19:31 RabidGravy cheating of course
19:31 FROGGS ohh, binding, yeah
19:32 Skarsnik m: my @arr; say "hello" if @arr;
19:32 camelia rakudo-moar 9e53fa: ( no output )
19:32 Skarsnik m: my @arr; @arr = (); say "hello" if @arr;
19:32 camelia rakudo-moar 9e53fa: ( no output )
19:33 jevin joined #perl6
19:35 vendethiel mmh, it's true I sometimes don't like perl 6's "use" not bringing class names to scope, but then I remember nightmarish ruby on rails autoloading...
19:35 El_Che m: my @arr = Nil; say @arr.perl
19:35 camelia rakudo-moar 9e53fa: OUTPUT«[Any]␤»
19:35 vendethiel sanity++
19:35 El_Che ok, Empty then
19:35 timotimo vendethiel: if you want to have class names directly in a scope, you can still import them, no?
19:36 vendethiel timotimo: sorry? like my \X = A::B::C::X?
19:36 timotimo m: use Test; import Test;
19:36 camelia rakudo-moar 9e53fa: ( no output )
19:36 timotimo (not a good example)
19:37 vendethiel m: module A { class B }; import A; say B.perl
19:37 camelia rakudo-moar 9e53fa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7fdQNm_tTw␤Unable to parse class definition␤at /tmp/7fdQNm_tTw:1␤------> 3module A { class B 7⏏5}; import A; say B.perl␤    expecting any of:␤        generic role␤»
19:37 ready_to_help joined #perl6
19:37 vendethiel m: module A { class B {}; }; import A; say B.perl
19:37 camelia rakudo-moar 9e53fa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8xV88nNKPl␤Undeclared name:␤    B used at line 1␤␤»
19:37 vendethiel m: module A { class B {}; }; use A; import A; say B.perl
19:37 camelia rakudo-moar 9e53fa: OUTPUT«===SORRY!===␤Could not find A:ver<True>:auth<True>:api<True> in:␤    /home/camelia/.perl6/2015.11-550-g9e53fa9␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst…»
19:38 Skarsnik hm, did someone fix is-deeply?
19:38 Skarsnik in Test
19:38 RabidGravy m: module A { class B is export {}; };  import A; say B.perl
19:38 camelia rakudo-moar 9e53fa: OUTPUT«A::B␤»
19:39 timotimo what impact does nines commit that fixes "resolve_repossession_conflicts" have? is there some example i could put into the weekly?
19:41 nine timotimo: it fixed this: https://gist.github.com/niner/fbacfa535a8bd8f8104e
19:41 timotimo TimToady: it looks like your code to optimize postfix- and prefix-++ into add_i doesn't bail when a user has their own postfix:<++> or prefix:<++> defined
19:41 timotimo ah, excellent!
19:41 lizmat ++timotimo  # P6W
19:41 nine timotimo: JDV::Foo::Bar disappeared after loading JDV::Foo::Baz
19:41 Skarsnik RabidGravy, that will work with use too
19:41 * lizmat contracted some bad flu in the UK and goes back to bed
19:41 timotimo ugh! flu is terrible
19:42 timotimo you have all my sympathies. a flu-like thing made me pretty much unable to work properly for almost a month
19:42 RabidGravy Skarsnik, yeah but can't do "use" with no file ;-)
19:42 timotimo i hope you'll recover much sooner than i did!
19:42 timotimo RabidGravy: if you install a Repo that DTRT, you can use with no file :)
19:43 RabidGravy sure, but too much typing for an example here ;-)
19:43 timotimo :)
19:43 timotimo with a custom repo, we can build a FatPacker quite easily, i think
19:44 timotimo maybe someone wants to do that and pump it out as an advent post for a day that already has another advent post
19:45 * ZoffixW back
19:45 yqt joined #perl6
19:48 ZoffixW leont, that was mostly based on the guts' hacker's comments that method chaining is not idiomatic Perl 6 and the ridiculous example of the fluent interface in the wiki getting the stamp of approval.
19:48 ZoffixW nine, leont, but my complaint is that I have to do $obj.item('foo').first.chi​ld-nodes.tail[0].content, which is inconsistent or $obj.item('foo').head[0].ch​ild-nodes.tail[0].content, which is silly. And this is similar to how the aforementioned given { } example is a recommended substitute for method chaining
19:48 ZoffixW But don't mind me much... I like to complain about things
19:51 RabidGravy I only ever chain as far as the right margin anyway
19:51 TimToady timotimo: why would you redefine those on a native int?
19:52 RabidGravy and to my mind it militates somewhat against easy refactoring
19:53 ZoffixW I wrote chains more a screenful long
19:53 Skarsnik x)
19:54 Skarsnik I do that with XML: $xml.lookfor(somme seach).lookfor(other filter on this)[0][0].text x)
19:54 ZoffixW Well, depending on the screen size: https://metacpan.org/source/ZOFFIX/XTaTI​K-0.005002/t/10-product-pic-finder.t#L49
19:55 ZoffixW Well, I guess I misinterpreted jnthn's comments. They did refer to the attribute setting using a method chain, not method chaining in general...
19:55 ZoffixW So my bad.
19:55 labster joined #perl6
19:58 ZoffixW m: class Foo { use MONKEY-TYPING; augment class Array { method last { self.first :end; } }; method foo { my @a = <foo bar baz>; return @a } }; say Foo.new.foo.last
19:58 camelia rakudo-moar 9e53fa: OUTPUT«baz␤»
19:58 ZoffixW I can live with that
19:58 ZoffixW (Perl 6)++
19:58 ZoffixW m: class Foo { use MONKEY-TYPING; augment class Array { method last { self.first :end; } }; method foo { my @a = <foo bar baz>; return @a } }; say Foo.new.foo.last; my @a = <foo bar baz>; say @a.last
19:58 camelia rakudo-moar 9e53fa: OUTPUT«baz␤baz␤»
19:58 ZoffixW ouch
19:58 lizmat jnthn: https://gist.github.com/li​zmat/5645d9a47b2c3b112487   # UDP test fails on OS X
19:58 lizmat really off to bed &
20:00 Skarsnik oh self.first: end to have the last?
20:00 ZoffixW Yeah
20:00 ZoffixW or .tail[0]
20:01 RabidGravy ZoffixW, rather than augment the whole array, maybe make it a role and "my @a = .... but Role' in your method
20:01 ZoffixW Thanks, I'll read up on how to do that.
20:03 nine Is there something like dd for NQP?
20:06 prammer_ joined #perl6
20:11 FROGGS nine: not that I'm aware of
20:12 vendethiel- joined #perl6
20:13 FROGGS nine: I've got a weird situation here... I've changed NativeCall/Types.pm6, but somehow after installing it uses the old precomped version
20:13 FROGGS nine: and I've deleted all precomp things but it recreates the old version it seems
20:15 nine FROGGS: funny thing...you know. I'm not sure anyone has ever tried if rakudo actually loads the newest version of an installed distribution.
20:15 FROGGS ahh, now I see
20:16 FROGGS <prefix>/install/share/perl6/sources/ contains both the new and the old source file!
20:17 nine because tools/build/install-core-dist.pl uses git describe to create a version for the dist. So after a git pull make install will install a different version instead of overwriting an installed one
20:18 nine Comes from before we had the :force option of install
20:18 FROGGS now I cleared that directory but it seems I need to recompile rakudo
20:18 FROGGS aha
20:18 timotimo TimToady: maybe you want to have modulus arithmetic in a scope
20:19 nine FROGGS: you can remove install/share/perl6 and only need a make install afterwards
20:19 FROGGS nine: thank you
20:19 nine Of course we may revise that decision to use a git describe version...
20:20 nine s/may/must/
20:20 nine s/must/absolutely have to because it's insane/
20:20 Skarsnik And I finished my work on DBIish :)
20:23 FROGGS damn, implementing Pointer.malloc isnt that easy
20:24 Skarsnik call it alloc so it can be changed?
20:24 * FROGGS looks at the size_t PR
20:24 pdl joined #perl6
20:24 Skarsnik You should merge the size_t part it's quite free comparing to bool
20:24 FROGGS Skarsnik: no, problem is that Pointer is in a module that NativeCall uses, but I need the 'is native' trait to implement it
20:24 yqt joined #perl6
20:25 Skarsnik Oh right, you don't have it in NC itself?
20:26 balazs joined #perl6
20:26 nine Ah bootstrapping...always so much fun
20:27 timotimo nine: i didn't follow what the reason for the RepositoryRegistry was; can you give me a one- or two-sentence description?
20:27 FROGGS Skarsnik: right
20:27 FROGGS timotimo: it is the new @*INC :o)
20:27 timotimo oh?
20:28 FROGGS I think so
20:28 timotimo so you don't just set $*REPO any more?
20:28 virtualsue joined #perl6
20:28 FROGGS shouldnt you use 'use lib' anyway?
20:28 timotimo if you want a custom VerySpecialRepo, you can't, right?
20:29 Skarsnik FROGGS, the idea of being able to change the alloc, I was thinking of stuff like glib that give a glib_new or Gstreamer that force you do ref/unref stuff (because thread)
20:29 FROGGS m: use lib 'Foo::Bar#/tmp'
20:29 camelia rakudo-moar 9e53fa: OUTPUT«===SORRY!===␤No CompUnit::Repository known by 'Foo::Bar'␤»
20:29 timotimo oh!
20:29 timotimo nice.
20:29 FROGGS dunno if there is a way to register the short-id
20:30 timotimo probably
20:30 nine FROGGS: not yet, but there's plans
20:30 FROGGS :o)
20:30 timotimo there's still many low-hanging fruits, eh?
20:30 FROGGS Skarsnik: sounds sane
20:30 timotimo m: use Unknown::Module
20:30 camelia rakudo-moar 9e53fa: OUTPUT«===SORRY!===␤Could not find Unknown::Module:ver<True>:auth<True>:api<True> in:␤    /home/camelia/.perl6/2015.11-550-g9e53fa9␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia…»
20:30 timotimo like the :ver<True>:auth<True>:api<True> thing
20:30 timotimo that could be kicked out
20:30 Skarsnik should it be use lib '#/tmp#Foo::Bar' ?
20:31 RabidGravy I take it that what's in nom right now isn't  fit for use as there is debugging output
20:31 Skarsnik I mean, if I understand you want to use Foo::Bar from /tmp
20:31 nine timotimo: RepositoryRegistry's sole responsibility is to manage CompUnit::Repository subclasses and instances. You ask it for example for the repository representing file#/tmp/lib or the 'site' repository.
20:31 nine timotimo: the plan is to move all module loading code out of there. That's the responsibility of the repository chain starting at $*REPO
20:32 RabidGravy ie
20:32 RabidGravy Useless use of "\\n\\t*$_" in expression "\\n\\t*$_" in sink context
20:32 RabidGravy - QAST::Op(call &infix:<~>) \\n\\t*$_
20:32 RabidGravy - QAST::Want
20:32 RabidGravy - QAST::WVal(Str)
20:32 RabidGravy - Ss
20:32 RabidGravy - QAST::SVal(\n\t*)
20:32 RabidGravy - QAST::Op(callmethod Stringy)
20:32 RabidGravy - QAST::Var(lexical $_) $_
20:32 Skarsnik There is in Panda?
20:32 test joined #perl6
20:33 nine Skarsnik: Foo::Bar#/tmp means a Foo::Bar object (should do the CompUnit::Repository role) that handles the path /tmp (meaning it loads modules from there)
20:33 ajs_ Looking around in src it looks like there's a lot of code that does this: "Seq.new(class :: does Iterator {...}.new(...))"
20:33 nine Skarsnik: right now we have file# which is short for CompUnit::Repository::FileSystem which is usually what you use with use lib 'lib'; and inst# which is CompUnit::Repository::Installation which is what panda installs modules to
20:34 ajs_ That seems really bulky for creating an iterable return value.
20:35 timotimo RabidGravy: ah, yeah, TT must have left a bit of that in there by accident
20:35 timotimo he used optimization level 4 for "give out extra debugging info"
20:36 nine jnthn: $nfa is actually when it's wrong always one of two NQPArrays. Either 2 Parameters or 8 NQPArrays and they come from self.HOW.cache_get(self, $name); with $name being something like alt_nfa__14_1450122851.79873
20:36 silug joined #perl6
20:37 nine timotimo: yeah I'm amazed that still no one has been annoyed enough to remove the :ver<True>:auth<True>:api<True> when they're True anyway :) Not even me ;)
20:37 RabidGravy timotimo, this is just the default optimisation level
20:37 AndyDee joined #perl6
20:38 AndyDee hi
20:38 timotimo nine: let someone else use that as an excuse to look a bit deeper into your code and perhaps start contributing :)
20:38 nine timotimo: that's what I hope for :)
20:39 nine Same with the annoying undefined value warning in panda ;)
20:40 RabidGravy where does that come from, I thought it was in run(...) or something but can't reproduce
20:42 timotimo nine: yeah, that is really annoying.
20:43 maddingu1 joined #perl6
20:45 gfldex m: my @a; sub f () { state $i; $i++; @a.push: "k$i" => $i }; f for 1..10; dd @a;
20:45 camelia rakudo-moar 9e53fa: OUTPUT«Array $var = $[:k1(10), :k2(10), :k3(10), :k4(10), :k5(10), :k6(10), :k7(10), :k8(10), :k9(10), :k10(10)]␤»
20:45 gfldex is => supposed to bind on such state variables?
20:46 domm joined #perl6
20:46 masak m: my @a; sub f () { state $i; $i++; @a.push: "k$i" => 0+$i }; f for 1..10; dd @a
20:46 camelia rakudo-moar 9e53fa: OUTPUT«Array $var = $[:k1(1), :k2(2), :k3(3), :k4(4), :k5(5), :k6(6), :k7(7), :k8(8), :k9(9), :k10(10)]␤»
20:47 gfldex m: my @a; sub f () { state $i; $i++; @a.push: "k$i" => $i.clone }; f for 1..10; dd @a; # worked for me
20:47 camelia rakudo-moar 9e53fa: OUTPUT«Array $var = $[:k1(1), :k2(2), :k3(3), :k4(4), :k5(5), :k6(6), :k7(7), :k8(8), :k9(9), :k10(10)]␤»
20:47 masak gfldex: you're probably pushing a container when you just write it like $i
20:47 masak gfldex: containers are very confusing. they lead to action at a distance :)
20:48 gfldex i guess as much. Should it or should it not bind?
20:48 timotimo i think we rely on binding to make return values of Set.pairs and Hash.pairs mutable, eh?
20:50 gfldex i'm asking because i would like to know if i need to rakudobug or to rakudodoc
20:51 RabidGravy I'd say it would be the behaviour I would expect
20:51 RabidGravy but I may be in a minority
20:51 timotimo i'd say rakudodoc it
20:55 gfldex lucky me in that i wrote a advent post about binding or i would have been very confused :)
20:55 vendethiel- jnthn, TimToady: was there a discussion on ==> / ==>> / backwards, or do you want to postpone that?
20:56 masak gfldex: yes, please doc it.
20:56 jnthn ajs_: gather blocks are the idiomatic way; the Seq/custom iterator pattern is mostly squeezing performance out on the built-ins
20:57 jnthn vendethiel-: Nothing further yet, so it still hangs in the balance :)
21:01 virtualsue joined #perl6
21:02 dalek doc: 72fadc1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod:
21:02 dalek doc: document implicit binding of state variables
21:02 dalek doc: review: https://github.com/perl6/doc/commit/72fadc1d70
21:02 dalek doc: 33b41a6 | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod:
21:02 dalek doc: Merge pull request #243 from gfldex/master
21:02 dalek doc:
21:02 dalek doc: document implicit binding of state variables
21:02 dalek doc: review: https://github.com/perl6/doc/commit/33b41a6ae7
21:02 jnthn .tell lizmat Wish you a swift recovery!
21:02 yoleaux jnthn: I'll pass your message to lizmat.
21:04 masak .tell lizmat aye; de-flu soon!
21:04 yoleaux masak: I'll pass your message to lizmat.
21:04 geraud joined #perl6
21:05 * masak .oO( does structural relationships between .tells mean that they form an enriched category? )
21:05 snarkyboojum_ joined #perl6
21:06 patrickz joined #perl6
21:07 timotimo hyper + grep are still broken, right?
21:08 timotimo m: (^20).hyper.grep(* %% 2).say
21:08 camelia rakudo-moar 9e53fa: OUTPUT«()␤»
21:08 timotimo m: (^20).hyper.map(* %% 2).say
21:08 camelia rakudo-moar 9e53fa: OUTPUT«HyperSeq.new␤»
21:08 timotimo m: (^20).hyper.map(* %% 2).list.say
21:08 camelia rakudo-moar 9e53fa: OUTPUT«(True False True False True False True False True False True False True False True False True False True False)␤»
21:08 cpage_ joined #perl6
21:11 timotimo i'm having a hard time coming up with a succinct description of TimToadys work on "thunkyreduce"
21:12 RabidGravy play that thunky music white boy
21:13 mohae joined #perl6
21:15 hudo joined #perl6
21:17 raiph joined #perl6
21:18 timotimo looking at the tests in roast helps a bit
21:20 masak timotimo: probably hard because "thunks" are not in the common vocabulary.
21:20 masak timotimo: perhaps a very brief (and mostly inaccurate) description of thunks would help set the stage?
21:20 jnthn "The compiler writes the curly braces so you don't have to!"
21:20 masak jnthn++
21:21 FROGGS I always thought "thunk" is about a kind of sound :o)
21:22 FROGGS probably what a tee bag does when you drop it
21:22 labster joined #perl6
21:22 aindilis joined #perl6
21:22 timotimo masak: sure
21:23 masak FROGGS: is a "tee bag" something that one uses in golf? :P
21:23 FROGGS hehe
21:23 * masak .oO( oh my god, it's full of balls )
21:24 FROGGS sorry, that was germish
21:24 masak ich suspected das
21:24 FROGGS clearly I need a sandwich (for brain powers)
21:24 FROGGS "ich suspectete das" (past tense) :P
21:25 RabidGravy thunk would be between donk and powm
21:25 FROGGS exactly
21:26 dalek rakudo-star-daily: d5c01cc | coke++ | log/ (10 files):
21:26 dalek rakudo-star-daily: today (automated commit)
21:26 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/d5c01cc48b
21:26 timotimo i gave the examples of xx re-evaluating its LHS every time and && and friends short-circuiting
21:28 [Coke] think, thank, thunk. </grinch>
21:29 * grondilu tried to improve permutations with some nqp code.  https://gist.github.com/gro​ndilu/18a2f01d76677de1a7e3   A bit disappointing.  Not much faster.
21:29 masak ah, "suspectete" -- main bad.
21:29 masak mein*
21:29 pmurias joined #perl6
21:30 timotimo grondilu: if you use my int @permutations; and _i variants of atpos and bindpos, maybe that helps?
21:30 prammer joined #perl6
21:31 timotimo grondilu: it'll at least make it very clear to the compiler that you have integers there and it'll potentially choose better candidates of +^ and such
21:31 rurban joined #perl6
21:32 grondilu could nto quite use _i variant.  Got some weird error.
21:32 grondilu I shoudl use nqp::bitxor_i though
21:32 timotimo did you try my int @permutations, though?
21:32 timotimo oh
21:32 timotimo i mean
21:32 timotimo did you use nqp::list_i() ?
21:33 grondilu I basically tried to copy what is done in combinations
21:33 grondilu It is clearly faster though.  But not as much as I hoped.
21:34 grondilu m: use nqp; say nqp::list_i();
21:34 camelia rakudo-moar 9e53fa: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤  in block <unit> at /tmp/VtgDDKgVAK:1␤␤»
21:34 timotimo how much faster?
21:34 timotimo yeah, nqp::list_i is a very, very basic type
21:34 timotimo it doesn't have (support?) methods
21:35 grondilu let me run both versions for n = 7
21:35 timotimo that'll be over much too quickly to measure, no?
21:35 grondilu not on my Pi :)
21:35 timotimo ugh!
21:36 timotimo well, on a raspberry pi you're also not getting JIT at all, so if you make the code more jit-friendly you won't notice until you run it on an x86_64 machine
21:36 grondilu with nqp:  real 0m47.205s
21:36 * timotimo jaw drops
21:37 grondilu well, feel free to try it on your machine:  https://gist.github.com/gro​ndilu/18a2f01d76677de1a7e3
21:37 grondilu without nqp:  real    0m50.872s
21:37 * TimToady is going nuts right now trying to prevent "{$stuff}" from thinking it's a bare block and declaring itself sunk prematurely...
21:37 grondilu so as I said, disappointing.
21:38 domm joined #perl6
21:38 timotimo quite :(
21:38 grondilu on the other hand one might think it's a good thing we don't have to resort to nqp for performance.
21:38 dalek nqp: 94047ba | (Sylvain Colinet)++ | src/vm/ (2 files):
21:38 dalek nqp: Add size_t and bool native type, bool is standard in C99
21:38 dalek nqp: review: https://github.com/perl6/nqp/commit/94047ba5ab
21:38 dalek nqp: a51569c | FROGGS++ | src/vm/ (2 files):
21:38 dalek nqp: Merge branch 'master' of https://github.com/Skarsnik/nqp into Skarsnik-master
21:38 dalek nqp: review: https://github.com/perl6/nqp/commit/a51569c2c7
21:38 dalek nqp: c0a52db | FROGGS++ | src/vm/jvm/ (2 files):
21:38 dalek nqp: handle size_t and bool on jvm
21:38 dalek nqp: review: https://github.com/perl6/nqp/commit/c0a52db0a6
21:38 dalek nqp: 30d8359 | FROGGS++ | tools/build/MOAR_REVISION:
21:38 dalek nqp: bump moar for size_t/bool
21:38 dalek nqp: review: https://github.com/perl6/nqp/commit/30d8359fba
21:39 timotimo nqp::bindpos($!permutation, $i, +$i)  <- that line looks suspect
21:39 timotimo the + is just left over from putting the ++$i outside the bindpos?
21:40 grondilu no I think the + is to avoid passing a reference.
21:40 timotimo oh
21:40 dalek rakudo/nom: fa1842c | (Sylvain Colinet)++ | / (5 files):
21:40 dalek rakudo/nom: Add native bool and size_t type, bool is in C99 standard
21:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fa1842c3f0
21:40 dalek rakudo/nom: 0447386 | FROGGS++ | / (5 files):
21:40 dalek rakudo/nom: Merge branch 'nom' of https://github.com/Skarsnik/rakudo into Skarsnik-nom
21:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0447386319
21:40 dalek rakudo/nom: 61f085c | FROGGS++ | / (3 files):
21:40 dalek rakudo/nom: map bool/size_t, and bump nqp/moar
21:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/61f085ca92
21:40 bjz joined #perl6
21:40 timotimo returning a clone of a nqp::list isn't quite right, either. i suppose it has to be at least hllized
21:40 timotimo though our codegen may do that for you already
21:41 domm left #perl6
21:41 grondilu you have to return a clone, otherwise all your permutations will be the last one in the end.
21:41 timotimo yes
21:41 timotimo i agree on the clone, i don't agree on returning an nqp::list
21:42 grondilu I don't know.  Combinations does that.
21:42 timotimo oh?
21:42 timotimo then i suppose it's right; sorry for complaining :)
21:43 timotimo you could activate MVM_SPESH_LOG=foo.txt and look for 'permutations' in there
21:43 timotimo and see if there's many suspect pieces of bytecode that we emit
21:43 * [Coke] hurls http://news.perlfoundation.org/2015/1​2/perl-6-release-goals-first-gra.html for the community to comment on.
21:43 timotimo i'm still in the middle(*) of writing the advent post
21:43 rindolf joined #perl6
21:44 bartolin_ I was looking at the aborting test file S11-modules/require.t. it seems to be related to combined use of 'use lib <. lib>' and '-Ilib' : https://gist.github.com/usev6/480ef340281ab3fb8df2
21:44 bartolin_ is that (no '.' in $REPO in the 2nd case) a known bug?
21:45 zengargoyle joined #perl6
21:45 bjz joined #perl6
21:46 TimToady if it's failing due to a "Useless use" warning, I have a patch for that
21:46 * bartolin_ removed a 'use lib "."' from said test file yesterday because it that made it fail on JVM. the test file passed with "perl t/harness --fudge --moar" afterwards -- but it failed in the spectest today :/
21:47 bartolin_ TimToady: at least I don't see such a warning ...
21:47 jnthn TimToady: I guess you already ran across the bare_block annotation?
21:47 jnthn We handle it up in statement
21:47 jnthn (action method)
21:47 jnthn TimToady: You may want to add the "yes sink it" there or so
21:52 FROGGS jnthn: just read you grant report and wanna ask: you do know about the Perl 6 language version fudging mechanism built into fudge?
21:52 FROGGS jnthn: I mean, it needs to be adopted to not expect a 6.\d.\d version I guess, but besides that it should work
21:53 FROGGS jnthn: so you can use it to e.g. mark tests/files as conjectural
21:53 nine t/spec/S10-packages/precompilation.rakudo.moar really really only fails when run in make spectest. I just can't reproduce it with a plain prove
21:57 moritz nine: pro tip: add it (and a few other files) to t/localtest.data and run "make localtest"
21:57 bartolin_ nine: if I run it with 'PERL6LIB=lib ./perl6-m t/spec/S10-packages/precompilation.rakudo.moar' it complains that 22 tests were planned, but 21 ran
21:57 moritz nine: that way you can use the same test harness, but run fewer test files
21:58 jnthn FROGGS: Is there a write-up somewhere of how that mechanism would work and, importantly, how it can help us to be really sure we don't go changing tests that we declared "part of 6.c"?
21:58 bartolin_ nine: don't you get that error? (the reason seems to be that the first test returns 2 instead of 3 elements and then looping over those does not match the planned tests
21:58 jnthn FROGGS: Part of my motivation for such a clean separation is that it'll be really, really obvious if we go changing a test file we considered part of the 6.c spec
21:59 nine moritz: oooh..thanks!
21:59 FROGGS jnthn: https://github.com/perl6/r​oast/blob/master/fudge#L86
21:59 nine bartolin_: does the error go away for you on repeated runs? That was the behavior I've seen previously
22:00 bartolin_ nine: oh, you're right
22:00 FROGGS jnthn: a "#?v6+ * skip 'conjectural'" would do
22:01 nine Oh, precompilation.rakudo.moar seems to reproduce the run_alt bug!
22:01 FROGGS jnthn: what do you mean by "changing a test file we considered part of"?
22:01 bartolin_ nine: changing behaviour with second run reminds me of RT #126823
22:01 jnthn FROGGS: Once we declare tests part of 6.c they should be immutable.
22:02 FROGGS jnthn: you can skip those that should be not part of and you can mark the others as v6+ so they get run (but they will anyway)
22:02 nine bartolin_: #126832 test usually worked on the first run and failed with repeated runs for me
22:02 cdg joined #perl6
22:03 FROGGS jnthn: I was thinking that the files get fudged accordingly, and then we run the fudge script to extract something to make a tarball
22:03 FROGGS jnthn: btw, I've broken the moarvm windows build and am working on it
22:04 jnthn FROGGS: Cool, hopefully it works by the morning ;)
22:04 bartolin_ nine: yes, it's the other way around with RT #126823
22:04 * jnthn won't be doing anything more tonight :)
22:04 FROGGS jnthn: it will :o)
22:04 jnthn FROGGS: I guess I'm concerned with how we'll make it easy to see when we change/remove tests that woulda gone in that tarball.
22:06 FROGGS jnthn: do you envision a tool that highlights things?
22:06 bartolin_ nine: do you have an idea what's wrong here: https://gist.github.com/usev6/480ef340281ab3fb8df2 (2nd evaluation seems to miss a dir from $*REPO)
22:07 leat1 joined #perl6
22:08 jnthn FROGGS: Well, it's more that if we see a commit to roast touching things under 6.c/ then it'd be really obvious :)
22:08 FROGGS hmmm
22:09 FROGGS then let's fudge it, and keep that state in a branch
22:09 FROGGS so we can run it later to check conformance
22:10 _nadim m: sub S(%o) { for %o<x> -> $x { $x.perl.say } } ; S {x => (1, 2, 3), } ;
22:10 camelia rakudo-moar 9e53fa: OUTPUT«$(1, 2, 3)␤»
22:10 nine bartolin_: I may have
22:10 jnthn FROGGS: That'd be another way to handle it, yes
22:11 jnthn So long as we have some way to keep us honest about this.
22:11 _nadim I expected ^^ to loop three times not just one, why?  I can .flat it but i have a list with elements and I do a for on it, I expect one element at the time.
22:11 bartolin_ nine++
22:11 Zoffix joined #perl6
22:12 nine bartolin_: indeed, I see the reason right there :) Helps that I had to fix the same bug twice already with @INC
22:12 jnthn m: sub S(%o) { for %o<x>.list -> $x { $x.perl.say } } ; S {x => (1, 2, 3), } ;
22:12 camelia rakudo-moar 9e53fa: OUTPUT«1␤2␤3␤»
22:13 jnthn Want to .list rather than .flat really
22:13 jnthn A hash, like an array, holds values in Scalar containers
22:13 _nadim jnthn: I expected the element to already be a list
22:13 nine bartolin_: the cause is simple: CompUnit::RepositoryRegistry.repo-for-spec gives you the same repo object for a given spec. As you add 'lib' twice, you'll get the same object. But that object is already part of the $*REPO chain. So when we set $*REPO to this object, we lose the part before it in the chain. Namely the 'file#.' repo
22:13 jnthn So they're items
22:13 jnthn No, it's an itemized list
22:14 _nadim OK, I get it but it looks one way but is in another way.
22:14 nine m: use lib <lib . lib>; say $*REPO.repo-chain
22:14 camelia rakudo-moar 9e53fa: OUTPUT«(file#/home/camelia/lib inst#/home/camelia/.perl6/2015.11-550-g9e53fa9 inst#/home/camelia/rakudo-​m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m​-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::NQP.new(ne…»
22:14 nine That's the short version ^^^
22:14 bartolin_ nine: ah!
22:15 * jnthn goes for some rest, after staying up too late doing advent writing last night :)
22:15 nine The fix will be to check if the repo is already in the chain, and not add it again.
22:15 jnthn o/
22:15 nine Good night jnthn!
22:15 FROGGS gnight jnthn
22:16 bartolin_ . o O ( fixing that bug twice already: drei sind alle guten Dinge!? )
22:17 FROGGS aller* :o)
22:17 bartolin_ nine: thanks for looking and explaining
22:17 timotimo gnite jnthn!
22:17 bartolin_ FROGGS++ *g*
22:18 snarkyboojum_ joined #perl6
22:18 nine bartolin_: thanks for giving me the only bug I could actually make real progress on this evening :) Have been a couple of quite frustrating hours so far.
22:19 espadrine joined #perl6
22:20 _nadim m: sub S(%o) { for %o<x>.list -> $x { $x.perl.say } } ; S { } ;
22:20 camelia rakudo-moar 9e53fa: OUTPUT«Any␤»
22:21 dalek nqp: 60b9e20 | FROGGS++ | tools/build/MOAR_REVISION:
22:21 dalek nqp: bump moar to unbreak build
22:21 dalek nqp: review: https://github.com/perl6/nqp/commit/60b9e20f7e
22:21 _nadim Bleahhh! ^^, seriously, P6 is full of surprises, and it's fun, but sometimes one wonders!
22:21 dalek rakudo/nom: 3b4964b | FROGGS++ | tools/build/NQP_REVISION:
22:21 dalek rakudo/nom: bump nqp/moar to unbreak build
22:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3b4964b6d4
22:22 TEttinger joined #perl6
22:22 _nadim Does anyone know why a list that doesn't exist has an element?
22:23 timotimo stmuk: you're still working on the advent post? i see your draft that's been last-modified 5 hours ago ...
22:23 FROGGS _nadim: %o<x> does not exist right? so it tells you Any when you ask
22:24 FROGGS _nadim: now, Any is a thing, a type object, so it is *one* thing you can iterate over
22:24 timotimo between now and the 21st will there be a significant date related to the christmasing?
22:24 FROGGS m: say Any.elems
22:24 camelia rakudo-moar 9e53fa: OUTPUT«1␤»
22:25 Zoffix :S
22:25 Zoffix Oh right
22:26 _nadim non sense if you ask me! I was wondering all afternoon why empty Match.hash had stuff in it when it shouldn't
22:26 _nadim so what's the way to write "give me all the elements and none if you don't have any exxcept yourself by some kind of weird magic"
22:27 Zoffix timotimo, doesn't seem to be. I see "Las Posanas" in the 'Christianity' list here that lasts 16-24, but it doesn't seem to be anything concrete: https://en.wikipedia.org/wiki/List_of_mult​inational_festivals_and_holidays#December
22:28 FROGGS _nadim: do you care about type objects?
22:29 _nadim as a metaphysical question or as something in the code I write?
22:29 FROGGS _nadim: the code you've shown
22:30 _nadim yes, the elements are roles
22:30 nine _nadim: ($match.hash // {}).elems
22:30 _nadim nine: thanks, better than having to write (1 == $a.keys && $a{$a.keys[0]} ~~ Nil) || 0 == $a.keys
22:31 FROGGS m: my %o; say %o<x>.list; say %o<x>.grep(*.defined).list
22:31 camelia rakudo-moar 9e53fa: OUTPUT«((Any))␤()␤»
22:31 FROGGS though, if you have roles (type objects) in there that won't work out
22:31 _nadim still a good thing to know
22:31 FROGGS because these are not defined by definition
22:31 nine m: my %o; say (%o<x> // ()).elems;
22:32 camelia rakudo-moar 9e53fa: OUTPUT«0␤»
22:32 nine m: my %o = x => (1,2); say (%o<x> // ()).elems;
22:32 camelia rakudo-moar 9e53fa: OUTPUT«2␤»
22:32 FROGGS m: my %o; $o<x> = IO; say (%o<x> // ()).elems;
22:32 camelia rakudo-moar 9e53fa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TaPm99gHA9␤Variable '$o' is not declared. Did you mean '%o'?␤at /tmp/TaPm99gHA9:1␤------> 3my %o; 7⏏5$o<x> = IO; say (%o<x> // ()).elems;␤»
22:32 FROGGS m: my %o; %o<x> = IO; say (%o<x> // ()).elems;
22:32 camelia rakudo-moar 9e53fa: OUTPUT«0␤»
22:32 FROGGS see
22:33 _nadim then // it is
22:33 FROGGS m: my %o; say %o<x>.list; say %o<x>.grep({ $_ =:= Any }).list # ugly but most accurate
22:33 camelia rakudo-moar 9e53fa: OUTPUT«((Any))␤((Any))␤»
22:33 _nadim one ugly line less, the day ends well
22:33 FROGGS err
22:33 masak /o/
22:33 FROGGS m: my %o; say %o<x>.list; say %o<x>.grep({ $_ !=:= Any }).list # ugly but most accurate
22:33 camelia rakudo-moar 9e53fa: OUTPUT«((Any))␤()␤»
22:34 FROGGS gnight #perl6
22:34 stmuk timotimo: I've more or less finished if you have feedback
22:34 _nadim night!
22:35 timotimo stmuk: i don't have lots of feedback yet
22:35 timotimo not on the draft :)
22:35 timotimo just that it looks unfinished
22:36 timotimo Zoffix: you were trolling, right? of course i meant perl6 development related stuff :)
22:36 Zoffix timotimo, oh, sorry
22:36 timotimo :)
22:37 Zoffix I thought you were looking for some special date before christmas for some announcement or something :P
22:37 stmuk I sort of ran out of steam :/
22:37 timotimo nah
22:37 timotimo just wanted to point out anything important at the end of my weekly post
22:39 sno joined #perl6
22:40 stmuk I can add the single arg rule I guess
22:40 timotimo oh, that would be important
22:41 brabo joined #perl6
22:42 timotimo i don't know what to point out about the coming week, so i'll just publish the post and wait for the thing to happen, so i can report instead of announce :)
22:42 timotimo GAH
22:43 stmuk hmmm append isn't in S07 I don't think
22:45 Zoffix timotimo, fwiw, the font size seems outta whack: http://i.imgur.com/KxbZWu0.png
22:45 timotimo https://p6weekly.wordpress.com/2015/12/14/201​5-51-upd-dup-pud-dpu-and-other-permutations/ - now you can give me feedback
22:45 Zoffix aha :)
22:46 Zoffix Looks fine now
22:46 timotimo Zoffix: yeah. copy-pasted from the advent blog. all <li> were given a class, all links were given a rel and there were <span class="byline"> as well as <span class="author-vcard"> in there still
22:46 timotimo >:(
22:47 El_Che are lizmat's slides up from the LPW?
22:47 lucasb joined #perl6
22:50 Zoffix timotimo, "if Jonathans grant should be extended" should be "Jonathan's"
22:50 _nadim Apropos Advent Calendar entries, if there is room and you want an entry from someone who just started experiencing P6, just let me know and I'll write one
22:50 Zoffix timotimo, so is "finish line of todays advent calendar " should be "today's" on the line blow
22:50 Zoffix *below
22:50 Zoffix timotimo, erm... advent calendar? :)
22:50 * Zoffix does a double-take at the URL
22:53 timotimo hum?
22:54 timotimo Zoffix: huh? i've been training myself to not put an apostrophe for genitives ...
22:54 timotimo does it turn out that it's right for german and wrong for english and i'm just doing it perfectly in reverse!?
22:55 timotimo Zoffix: double tack at the url?
22:55 timotimo what's wrong?
22:55 timotimo oh!
22:55 Zoffix :D
22:55 lucasb oh... /2015/12/14/2015-51-... :)
22:56 lucasb wait, it's not this. that is just like the other urls
22:57 Zoffix timotimo, I think you're doing it perfectly in reverse :) "Jonathans" is completely incorrect, it should be "Jonathan's". What I think you might be thinking of is when the name ends in "s", in which case both q/Gaus'/ and q/Gaus's/ are correct, which two camps arguing on which one is preferred (/me being in the latter one that adds an extra "s" and avoids confusion with the plural possessives)
22:57 Zoffix s/which two camps/with two camps/
22:59 Zoffix lucasb, I meant I did a double take to see that I was indeed reading the Weekly and not the Advent blogs
23:00 timotimo and here i thought "'s is always a contraction" was some kind of rule or something
23:00 lucasb Zoffix: ah, ok :)
23:02 Zoffix timotimo, well, technically it still is: https://en.wikipedia.org/wik​i/English_possessive#History
23:03 Zoffix The ending is "es" with "e" being silent and thus contracted by apostrophe :P
23:03 RabidGravy nah, the 's is either a possessive or a contraction except fora few irregular cases where the possessive doesn't have an apostrophe
23:04 RabidGravy or rather yes to Zoffix nah to timotimo
23:04 jdv79 Zoffix, our very own grammar nazi:)
23:05 RabidGravy a contraction of <thing> is usually
23:05 Zoffix \o/
23:06 RabidGravy nighty night
23:06 Zoffix night
23:11 jdv79 timotimo: that is slightly amusing that you reversed the german and english posessive.  everyone understands though.
23:12 jdv79 timotimo++
23:13 jdv79 something i'd prolly do if i was frazzled
23:13 leont Dutch is like German, English doing things the other way was highly confusing to me for quite some time too
23:14 jdv79 :)
23:16 cdg joined #perl6
23:35 masak 'night, #perl6
23:53 lucasb m: say (while $++ < 5 { 42 })
23:53 camelia rakudo-moar 9e53fa: OUTPUT«5␤»
23:53 lucasb m: say (42 while $++ < 5)
23:53 camelia rakudo-moar 9e53fa: OUTPUT«5␤»
23:54 lucasb ^^ Were these supposed to be list comprehensions?
23:54 skids joined #perl6
23:55 lucasb m: say (rand while $++ < 5)
23:55 camelia rakudo-moar 9e53fa: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|62516800>}|67840856) ... }␤»
23:55 lucasb ^^ strange that if you change the expression, it returns the "<" operator
23:56 Psyche^ joined #perl6
23:56 stmuk OK I've published a GLR post on https://perl6advent.wordpress.com/
23:57 stmuk I'm hoping there is nothing too misleading there .. but if there is contact me in the next hour and I can fix
23:57 stmuk or tomorrow morning
23:59 jdv79 a glr post or the glr post?
23:59 stmuk uh?

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

Perl 6 | Reference Documentation | Rakudo