»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by masak on 28 November 2015.
00:00 rubio_terra joined, Psyche^ left 00:05 Peter_R left 00:09 snarkyboojum left
AlexDaniel ouch, something ate my newlines 00:10
00:13 rurban_ left
Zoffix AlexDaniel, BTW, I think my new IRC::Client API addresses all the concerns you've mentioned. See this example and one below it: github.com/zoffixznet/perl6-IRC-Cl...rc-command 00:15
(or at least, I assume you don't have to `await` a promise for it to complete) 00:16
You can start a Promise to do async stuff and give it the $irc object to respond whenever its done.
You can also do some setup using register method (e.g. setup some timed events)
dalek ecs: 9fe53ed | (Stéphane Payrard)++ | S99-glossary.pod:
some new entries
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.
(only the SYNOPSIS has been updated; not the rest of the docs) 00:18
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:19
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-inst-1/share/perl6/site/bin".IO␤»
jnthn Phew, advent post done \o/ 00:25
'night o/ 00:28
00:28 snarkyboojum joined, firstdayonthejob left 00:31 leont left, raiph left 00:32 znpy joined
AlexDaniel Zoffix: this sounds great! I'll check it out as soon as I have some free time (hopefully this Sunday) 00:33
Zoffix: thanks letting me know 00:34
for*
00:35 uruwi left
cognominal_ jnthn++ 00:35
AlexDaniel Zoffix: by checking it out I mean porting one of my bots to it :) 00:36
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:42
AlexDaniel Zoffix: what if I want to create a logging plugin? 00:44
00:44 znpy left
AlexDaniel Zoffix: let's say that there is one plugin that acts on .botsnack and another one that logs stuff 00:45
Zoffix: when .botsnack is received, this module will handle it and it will not return IRC_NOT_HANDLED 00:46
Zoffix: which means that another logging module will not receive that event
Zoffix: do I get it right?
Zoffix Right
AlexDaniel any possible solution to this?
Zoffix But you can put the logging plugin as the first one in the chain
use IRC::Client::Plugin; class IRC::Client::Plugin::Logging; method event ($irc, $e) { spurt 'log.txt', $e, :append; return IRC_NOT_HANDLED; }; 00:47
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
AlexDaniel yeah, that's going to work 00:48
Zoffix \o
/
00:51 uruwi joined
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:51
or something with 「callsame」 :) 00:52
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:55
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:56
Zoffix: callsame is like super() in other languages. Yeah, probably not so appropriate for that task 00:57
“Within a multiple dispatch, nextsame means to try the next best match, or next best default in case of tie.” 00:58
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␤»
AlexDaniel Zoffix: look!
m: multi sub foo(‘hello’) { say ‘one’; callsame }; multi sub foo($x) { say ‘two’ }; foo(‘hello’)
camelia rakudo-moar a342eb: OUTPUT«one␤two␤»
AlexDaniel so instead of doing 「return IRC_NOT_HANDLED;」 you just do 「nextsame」. 01:01
01:03 Actualeyes joined
Zoffix Actually, I'm not sure how to "add a method to some class" either :) 01:06
01:07 yeahnoob joined
AlexDaniel Zoffix: ^add_method perhaps? 01:09
Zoffix: doc.perl6.org/routine/add_method
Zoffix: doc.perl6.org/type/Metamodel::Metho...add_method
oh wow! Check out the type graph here 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.
But doing ^add_method stuff is more involved than just defining a method
AlexDaniel Zoffix: it could be done internally 01:12
Zoffix: but yeah, I'm not saying that you should do it. It's just an interesting thing to think about
Zoffix Perhaps, but it's beyond my current Perl 6 knowledge :)
01:25 kanishka joined 01:34 rubio_terra left, vendethiel left 01:36 ifim joined
dalek Heuristic branch merge: pushed 23 commits to rakudo/gsr by TimToady 01:39
01:43 rurban left 02:05 ugexe left 02:06 llfourn joined 02:13 TEttinger left 02:16 TEttinger joined 02:17 molaf_ joined 02:19 uruwi left 02:21 molaf left 02:22 lolisa joined 02:45 Ben_Goldberg joined 02:56 hoelzro joined 03:11 snarkyboojum left, vendethiel joined
diakopter perl6advent.wordpress.com/2015/12/...nous-data/ # truly great 03:16
03:22 lmmx left 03:23 kaare_ joined 03:26 dmc joined 03:28 dmc left, dmc joined, dmc left 03:31 noganex_ joined 03:32 vendethiel left 03:35 noganex left 04:05 kid51 left 04:10 BenGoldberg joined 04:11 Ben_Goldberg left 04:12 mohij joined, patrickz left 04:14 kaare_ left 04:27 BenGoldberg left 04:34 psy_ left, AlexDaniel left 04:37 geekosaur left, hoelzro left 04:38 geekosaur joined, hoelzro joined 04:44 yqt left 05:00 khw left 05:26 [Tux] joined, perl6-fan joined 05:27 molaf_ left 05:42 ugexe joined 05:43 adu left 05:44 perl6-fan left 05:46 adu joined
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]␤»
cognominal_ wonders if there is a shorter syntax for priming infix ops.
moritz camelia: * * 2 06:05
erm, meant cognominal_ :-) 06:06
06:11 xfix joined
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␤␤»
cognominal_ moritz: and it allows to prime the second parameter :) 06:14
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]␤»
llfourn can you use a different character for Whatever so it doesn't look so confusing?
06:19 snarkyboojum joined 06:20 snarkyboojum left 06:21 snarkyboojum joined, snarkyboojum left
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
llfourn skids: that's pretty cool 06:22
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:24
llfourn The code in .assuming scares me :) 06:25
06:25 simcop2387 joined
cognominal_ m: constant foo = *; (foo * 4)(5) 06:25
camelia ( no output )
cognominal_ m: constant foo = *; say (foo * 4)(5)
camelia rakudo-moar a342eb: OUTPUT«20␤»
06:25 snarkyboojum left
llfourn m: say Perl, so Cool with Whatever # Figured out this is valid Perl 6 the other day 06:26
camelia ( no output )
skids llfourn: It was mildly hairy, yes.
eek look at the time. 06:27
skids must sleep. 06:28
llfourn o/ skids
06:29 M-eternaleye left, M-eternaleye joined, M-eternaleye is now known as eternaleye
cognominal_ m: say Perl, not so Cool without Whatever 06:30
camelia rakudo-moar a342eb: OUTPUT«(Perl)True␤»
llfourn cognominal_: nice! 06:31
ahahaha
06:33 skids left
cognominal_ m: say Perl, so Cool with all * 06:34
camelia rakudo-moar a342eb: OUTPUT«(Perl)False␤»
llfourn haha 06:35
cognominal_++, you're pretty good at this
cognominal_ lifourn, only derivative, you gave the initial idea
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…»
llfourn hmmm almost
m: say Perl, so Cool and has class {} with Version,6 06:39
camelia rakudo-moar a342eb: OUTPUT«(Perl)False␤»
llfourn False, damn 06:40
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)␤»
llfourn hahaa
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:45
camelia rakudo-moar a342eb: OUTPUT«WARNINGS:␤Useless use of "so " in expression "so Whatever" in sink context (line 1)␤»
llfourn oh that doesn't wrok wither
work either*
m: Perl, so Cool and has class {} with Version, 6 - so Whatever # what about.. 06:46
camelia ( no output )
llfourn yes!
06:46 ifim left
llfourn m: say 6 - so Whatever 06:46
camelia rakudo-moar a342eb: OUTPUT«6␤»
llfourn haha
06:50 adu left, ninereasons joined 06:51 ninereasons left 06:55 adhoc left 06:58 adhoc joined
cognominal_ m: Perl, so Cool with any Version 06:59
camelia ( no output )
cognominal_ m: Mix and Match
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␤␤»
llfourn that's an awsome one
I'm going to use these in my p6 presentation
cognominal_ ur welcome
m: Instant, Perl 07:01
camelia ( no output )
07:01 baest_ is now known as baest
llfourn I want to use 'but' in some way 07:06
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␤␤»
grondilu m: say min("10", 12);
camelia rakudo-moar a342eb: OUTPUT«10␤»
llfourn m: 5 but Real # works 07:08
camelia ( no output )
cognominal_ m: Perl; CATCH { any Failure but so Cool }
camelia ( no output )
llfourn hahaa
cognominal_ with CATCH, one get away with any dynamic error 07:09
llfourn mm like with in 'has class {} with Version 6
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␤␤»
llfourn actually not :P
m: (any Failure but so Cool) with Version
camelia ( no output )
llfourn ah it was too tiggt
07:10 geraud left
llfourn tight* 07:10
grondilu m: "10" ~~ /\d+/; say min($/, 12); 07:11
camelia rakudo-moar a342eb: OUTPUT«「10」␤»
grondilu ah, can't reproduce an error I get locally
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␤␤»
cognominal_ m: CATCH { any Instant; BEGIN { with Perl, 6 { [and] 42 }} } 07:17
camelia ( no output )
llfourn I don't even.. lol 07:18
m: say .1 + .2; use v6; Perl but Cool when Rational 07:20
camelia rakudo-moar a342eb: OUTPUT«0.3␤»
cognominal_ m: CATCH { any Instant; BEGIN { with Perl, 6 { Cool but so Rational }} }
camelia ( no output )
llfourn ding!
haha 07:21
jinx :)
cognominal_ m: Perl, not so Complex
camelia ( no output )
llfourn gold!
m: BEGIN { now with Perl, 6 } 07:24
camelia ( no output )
07:27 domidumont joined
llfourn m: BEGIN { Real, Code; CONTROL {} } with v6 07:29
camelia ( no output )
cognominal_ m: start { Perl with any Linux => Distribution } 07:30
camelia ( no output )
llfourn niiice 07:31
07:31 firstdayonthejob joined 07:32 domidumont left, domidumont joined
cognominal_ m: CATCH { any Linux => Distribution and do Perl with all * } 07:33
camelia ( no output )
llfourn hahaha!
m: start { Perl, Mix with any Linux => Distribution } 07:36
camelia ( no output )
grondilu m: say map -> $/ { min($<num>, 10) }, "5".match: rx/ $<num> = [\d+] /;
camelia rakudo-moar a342eb: OUTPUT«(10)␤»
grondilu m: say map -> $/ { min(+$<num>, 10) }, "5".match: rx/ $<num> = [\d+] /;
camelia rakudo-moar a342eb: OUTPUT«(5)␤»
llfourn m: CATCH { any Rat or FatRat with Perl,v6 } 07:37
camelia ( no output )
grondilu m: say min("5" ~~ /\d+/, 10); 07:38
camelia rakudo-moar a342eb: OUTPUT«10␤»
grondilu m: say min(+("5" ~~ /\d+/), 10); 07:39
camelia rakudo-moar a342eb: OUTPUT«5␤»
grondilu ^isn't that suspicious?
I mean, am I right in expecting a match to be converted into a number when applied as a &min parameter? 07:40
llfourn m: BEGIN { Perl with v6 }; END { Code without Failure and Backtrace } # and I'm done 07:41
camelia ( no output )
grondilu m: say ("5" ~~ /\d+/) + 10;
camelia rakudo-moar a342eb: OUTPUT«15␤»
grondilu ^after all it's supposed to behave as a number when necessary
dalek kudo/gsr: 3cec89a | TimToady++ | src/Perl6/Actions.nqp:
change wanted/unwanted from procs to funcs

So we can more easily remap void nodes as soon as we know whether the value is wanted or not. (Doesn't do it yet, though.)
07:42
kudo/nom: f95c144 | TimToady++ | src/Perl6/ (3 files):
Great Sink Refactor

The actions now actively mark wanted nodes so that useless use errrors will be suppressed on those nodes. This marking is recursive on the last 7c4b456 | (Stefan Seifert)++ | src/core/CompUnit/RepositoryRegistry.pm: Remove some leftovers from language modules loaders
07:44
07:44 dalek left, dalek joined, ChanServ sets mode: +v dalek
TimToady .tell jnthn Merged the GSR, unfortunately doesn't fix 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 sno left, CIAvash joined 07:50 jack_rabbit joined 07:51 llfourn left
_nadim Good morning, 07:51
Woodi hi :)
grondilu m: say ("5" ~~ /\d+/) cmp 10; 07:52
camelia rakudo-moar 3cec89: OUTPUT«More␤»
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
yoleaux TimToady: I'll pass your message to also.
grondilu m: say +("5" ~~ /\d+/) cmp 10;
camelia rakudo-moar 3cec89: OUTPUT«Less␤»
grondilu m: say ("5" ~~ /\d+/) < 10;
camelia rakudo-moar 3cec89: OUTPUT«True␤»
grondilu m: say +("5" ~~ /\d+/) < 10;
camelia rakudo-moar 3cec89: OUTPUT«True␤»
nine TimToady: you forgot the "jnthn"
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.
TimToady thanks
07:56 FROGGS joined
grondilu m: say 1 cmp 2 07:57
camelia rakudo-moar 3cec89: OUTPUT«Less␤»
grondilu m: say "1" cmp 2
camelia rakudo-moar 3cec89: OUTPUT«Less␤»
grondilu m: say "5" cmp 10 07:58
camelia rakudo-moar 3cec89: OUTPUT«More␤»
grondilu ^does that make any sense to you?
m: say "5" cmp 100
camelia rakudo-moar 3cec89: OUTPUT«More␤»
grondilu m: say "5" cmp 1000000
camelia rakudo-moar 3cec89: OUTPUT«More␤»
masak theyäre compared as strings.
they're*
grondilu m: say 5 cmp 1000000
camelia rakudo-moar 3cec89: OUTPUT«Less␤» 07:59
masak there's no way to win in that situation
just don't compare types with heterogenous comparison semantics :P
grondilu now remmebers that <=> is the comparison operator for numeric values
moritz \o
08:00 Hagar_ joined, xfix left 08:01 Hagar_ left
FROGGS o/ 08:02
08:06 rurban joined, esh joined 08:08 lolisa left
nine Is there a reason for resolve_reposession_conflicts to do anything different than merge_globals? 08:10
08:11 darutoko joined, retupmoca left, luis left 08:15 lolisa joined 08:19 vytas joined
moritz fwiw I've submitted jnthn++'s advent post to HN: news.ycombinator.com/item?id=10729939 08:19
08:21 lolisa left 08:22 ChoHag joined
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
08:23 lolisa joined
_nadim Just reported this blockless try failing to catch exception nopaste.linux-dev.org/?881078&download 08:23
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«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␤»
moritz m: given a => 1 { when * eqv a => 2 { say "a => 2" }; when * eqv a => 1 { say "a => 1" }; default { say "what now?" } }
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)…»
moritz wtf is it printing all those QAST nodes?
ChoHag How does '* eqv' relate to (the implicit) '$_ ~~'? 08:26
I've not looked at eqv much.
moritz m: say (a => 1) ~~ * eqv (a => 1) 08:27
camelia rakudo-moar 3cec89: OUTPUT«WhateverCode.new␤»
moritz hm
08:27 Woodi joined
moritz I didn't expect the ~~ to curry here 08:27
kudo/nom: b384d8f | (Stefan Seifert)++ | src/ (2 files):
Fix resolve_reposession_conflicts not resolving anything

The code still iterated over $orig.FLATTENABLE_HASH as needed in NQP but which doesn't actually work in Perl 6. It also lacked recursive merging of stashes, i.e. with Foo::Bar::Baz and Foo::Bar::Qux we would lose the first one as we found a "Bar" in $current and assumed it was the same.
Both issues can be fixed by using merge-symbols which gives us the same semantics as during compilation, with the exception of our scoped functions. No idea how they could even conflict when they are in different packages like NativeCall's &mangle_cpp_symbol. But as it seems to work and unification of compilation and module loading semantics can only be a good thing, we adopt the
  "latest wins" semantics of resolve_reposession_conflicts in merge_globals for
now.
ChoHag Ooh curry. That's a good idea.
nine .tell jnthn Do you see anything glaringly wrong in my reasoning for github.com/rakudo/rakudo/commit/b384d8f777? 08:29
yoleaux nine: I'll pass your message to jnthn.
08:29 Ven joined
ChoHag I've had a bunch of beef waiting on me for weeks. 08:29
[Tux] still cannot run tests due to the run_alt issue 08:30
08:30 firstdayonthejob left
ChoHag Doesn't tell me how $_ ~~ compares to * eqv though. 08:30
moritz ChoHag: in generall, if ~~ finds something invokable on the right-hand side, it invokes it 08:31
08:31 bpmedley joined
moritz ChoHag: though that doesn't work here, because the ~~ here becomes part of the code object 08:31
ChoHag So eqv would be 'better' for comparing potentially-invokable things with each other without invoking them? 08:32
moritz no
eqv would be good for comparing pairs
ChoHag What have Pairs got to do with invokable things?
nine .tell jdv79 fixed the URI2 bug. 08:33
yoleaux nine: I'll pass your message to jdv79.
ChoHag Or: Why was (the implicit) $_ ~~ unsuitable in your code snippet above?
Getting rid of the '* eqv' has the same result...
08:33 uruwi joined
moritz ChoHag: smart-matching against a Pair has peculiar semantics, which doesn't simply compare the pairs of equality 08:34
ChoHag: which is why I wanted to use eqv
ChoHag Right. So removing the * eqv only works because the pairs happen to be simple?
moritz ChoHag: but given/when does smart-matching, so one needs to convert smart-matching to eqv somehow
m: say (a => 1) ~~ sub { $^x eqv (a => 1) } 08:35
camelia rakudo-moar 3cec89: OUTPUT«True␤»
moritz m: say (a => 1) ~~ sub { $^x eqv (a => 2) }
camelia rakudo-moar 3cec89: OUTPUT«False␤»
moritz but the idea with * eqv failed, so one can write it more verbose
m: say (a => 1) ~~ { $^x eqv (a => 2) }
camelia rakudo-moar 3cec89: OUTPUT«False␤»
moritz m: say (a => 1) ~~ { $^x eqv (a => 1) }
camelia rakudo-moar 3cec89: OUTPUT«True␤»
moritz with an explicit code object, for example
_nadim when a bug is reported, is there a place where one can follow up on it? 08:37
nine _nadim: rt.perl.org 08:38
ChoHag It only failed because your default wasn't in a block.
Hmm. But then you corrected that...
m: say $*PERL, $*VM
camelia rakudo-moar 3cec89: OUTPUT«Perl 6 (6.b)moar (2015.11.44.ge.7.edb.6)␤»
08:39 xinming joined
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)…»
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 }; }
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
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␤»
ChoHag Is it supposed to do that? My MOAR is straight 2015.11. 08:42
moritz looks like a bug to me
_nadim nine: thanks, would be nice it reporting by mail returned a link to the bug entry 08:44
dalek kudo/nom: 6494c1c | TimToady++ | src/Perl6/Actions.nqp:
enforce unwanted on postinc ops too
08:45
08:45 mk joined, mk is now known as Guest26091 08:47 Guest26091 left 08:48 pdcawley joined
ChoHag Huh. 08:48
"when 'foo' => *" and "when foo => *" are different.
08:49 ollej left 08:52 spider-mario left 09:00 Upasaka joined 09:03 abraxxa joined 09:06 RabidGravy joined
masak jnthn++ # perl6advent.wordpress.com/2015/12/...nous-data/ 09:06
09:10 sno joined
_nadim I enjoyed the three last entries, including jnthn's 09:11
09:13 zakharyas joined 09:16 sno left 09:21 dakkar joined, Peter_R joined 09:25 yeahnoob left
RabidGravy jnthn++ # nice article which reminds me that I ought to check that Net::AMQP is still working 09:28
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:29
FROGGS abraxxa: declare it outside of the loop? 09:30
or keep it globally
abraxxa FROGGS: it's not a single one but all sql bind variables
github.com/abraxxa/DBIish/blob/mas...e.pm6#L471 09:31
i was thinking about using a native typed CArray for ints and one for floats
TEttinger u: ELLIPSIS 09:33
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]"␤»
FROGGS abraxxa: hmmm, keeping an array (or carray) in the execute method before the for loop should be enough
09:34 jack_rabbit left
abraxxa FROGGS: still segfaults 09:34
FROGGS .u ELLIPSIS
yoleaux U+0EAF LAO ELLIPSIS [Lo] (ຯ)
U+1801 MONGOLIAN ELLIPSIS [Po] (᠁)
U+2026 HORIZONTAL ELLIPSIS [Po] (…)
FROGGS m: say "\c[LAO ELLIPSIS]"
camelia rakudo-moar 6494c1: OUTPUT«ຯ␤»
_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
abraxxa FROGGS: should i put the values or the pointers into the array?
FROGGS abraxxa: that does not matter I think... so, you can put whatever in the array which is easier to handle 09:36
abraxxa i've tried both 09:37
FROGGS hmmm
abraxxa: what gets collected exactly? I can't spot it 09:38
abraxxa $value/$valuep 09:39
FROGGS: but as nobody could tell me how I can debug NativeCall that's just a guess
09:40 snarkyboojum joined
FROGGS these can't be collected 09:41
they are kept because @params is alive
09:42 llfourn joined
abraxxa those are the Perl6-typed values, not the native typed $value's 09:43
FROGGS you are talking about $valuep, right? 09:44
abraxxa yes 09:45
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
abraxxa as p stands for pointer i've named them $value and generate a Pointer to it manually and don't use 'is rw'
the C function just stores the pointer but the memory is accessed only later when OCIStmtExecute is called
which is after the loop
i wasn't sure what happens when I push the native typed $valuep onto a perl Array 09:48
09:48 sno joined
abraxxa is that a copy in memory or not? 09:48
so I tried binding because if I understand the container docs correctly that won't make a container but use the existing one
FROGGS I dont know... depends if the OCIBindByName_* function makes a copy or not 09:49
abraxxa it doesn't
it just a pointer to a location in memory that will be accessed on execute
FROGGS and you *are* using 'is rw': github.com/abraxxa/DBIish/blob/mas...e.pm6#L184
abraxxa i need to make sure that the memory region contains a native typed value and isn't gced 09:50
not any more locally
Pointer[sword] $valuep,
FROGGS declare an array before the loop, and push the $valuep to it
abraxxa my $valuep := Pointer[sword].new($value);
FROGGS abraxxa: again, it does not help if I see code which is not the code you have problems with :/
abraxxa is an Array sufficient or does it need to be a CArray? 09:51
FROGGS an array will do
abraxxa the 'is rw' can't be used in this case, right?
FROGGS no, most likely not
abraxxa or should it be ok as long as I ensure that $value isn't gc-ed by pushing it onto an array?
FROGGS because it will create a pointer temporarily, which seems to be the problem as you say
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
we're freeing that pointer after making the call to the C function 09:53
moritz and reusing the memory for something else
possibly
FROGGS aye
abraxxa what does 'freeing a Pointer mean'?
the destination memory location?
even if a var is referencing it ($value)?
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
abraxxa the first is to get a native typed value
FROGGS: that would explain the segfault
FROGGS which means that we cannot access it again afterwards, even not from C
abraxxa which happens at home, here is just inserts random data
both 64bit Ubuntu 15.10 with 2015.11
FROGGS abraxxa: do it simple, push all stuff you pass to the OCIBindByName_* functions to an array 09:55
(a single array will do)
abraxxa ok 09:56
ChoHag m: multi a ($foo) { say "ina", callwith($foo, :adverb) }; multi a ($foo, :$adverb!) { return True }; say "out", a("123")
camelia rakudo-moar 6494c1: OUTPUT«inaNil␤outTrue␤»
abraxxa i've moved four vars out of the loop because for now they are always the same
but will do that for all others
ChoHag Is that right?
09:57 brrt joined
ChoHag I hope not, because it's weird. 09:57
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... 09:59
abraxxa is it planned to fix the error output bug before 6c release? 10:01
the 'Unhandled exception: Cannot unbox a type object' we've looked at some weeks ago already
using --ll-exception shows the correct error 10:02
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:03
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
and the invocant is simply the first argument, and plays ordinarily into the candidate sorting
abraxxa how can I get a pointer to a memory that's managed by a C lib? 10:06
profan abraxxa: you probably want to look at this: doc.perl6.org/language/nativecall 10:11
abraxxa profan: doesn't help, have it open all the time
profan so more specifically, what are you trying to do? 10:12
abraxxa pass the Oracle OCI library bind values 10:13
profan did you take a look at the examples in the zavolaj repo too?
abraxxa it works by binding native types vars to placeholder variables which are access on execute
none of the C libs I've found Perl 6 bindings for have such an API 10:14
profan ?
wops, wrong channel for that aone
FROGGS abraxxa: you usually get the memory addresses of stuff managed by C by calling a C function that exposes it 10:15
abraxxa FROGGS: the docs say that if NULL is passed OCI will allocate a bind struct and fill the void pointer 10:16
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
like in: void *struct_ptr; foo_init(&struct_ptr, a, b, c); /* struct_ptr is now initialized? */
i think you may want to use a CArray for that 10:19
of 1 element, and then read the pointer to the unitialized struct ot of it?
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:24
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
FROGGS abraxxa: see github.com/rakudo/rakudo/blob/nom/...args.t#L54 10:26
moritz ChoHag: that idiom is dangerous, because it'll stop for an empty line 10:27
ChoHag I see. 10:28
Well that explains why it's stopping for an empty line.
FROGGS what about this? $buf ~= $g while ($g = $s.get).defined
10:29 zakharyas left
moritz better 10:30
10:32 koo8 joined 10:34 integral_ left
brrt ooh, FROGGS++ 10:36
i had no idea nativecall was that powerful
abraxxa FROGGS: docker oracle-xe container works flawless here 10:39
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␤»
dalek kudo/nom: 90586ef | TimToady++ | src/Perl6/Actions.nqp:
force unwanted on statement-level while block

  (also fix copy-pasta)
10:42
kudo/nom: 1d96ed3 | TimToady++ | src/Perl6/Actions.nqp:
visit more blocks with wanted/unwanted

  (We still have a few that we don't get to, and so are relying on
the defaulting in the optimizer. All in good time.)
grondilu so the method a is defined by a call to foo? 10:43
m: class { method foo { method bar {} } }.new.^methods.say
camelia rakudo-moar 6494c1: OUTPUT«(bar foo)␤»
grondilu nope 10:44
cognominal_ grondilu: yea, I am wrong 10:45
abraxxa brrt: yes, i've used the one element array trick in the past 10:47
FROGGS: problem is I need a pointer to a pointer
docs.oracle.com/database/121/LNOCI/oci05bnd.htm 10:51
docs.oracle.com/database/121/LNOCI...tm#i456223
10:53 espadrine joined 10:54 Ven left
abraxxa FROGGS: if I declare $bindpp as OCIBind is rw and initialize it using my OCIBind $bindpp .= new; the execute fails 10:54
10:54 Ven_ joined
jnthn morning, #perl6 10:55
yoleaux 07:48Z <TimToady> jnthn: Merged the GSR, unfortunately doesn't fix rt.perl.org/Ticket/Display.html?id=125769 yet, which seems to be due to lex lowering on binding rather than sinking
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
08:29Z <nine> jnthn: Do you see anything glaringly wrong in my reasoning for github.com/rakudo/rakudo/commit/b384d8f777?
abraxxa jnthn: hi!
Ven_ o/ 10:56
11:02 RabidGravy left 11:03 DrForr left 11:05 RabidGravy joined
RabidGravy boo 11:05
abraxxa FROGGS: i've pushed what I have currently 11:09
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.
nine 11:14
yoleaux 11:12Z <jnthn> nine: It seems like a pleasing, and reasonable, unification, at first glance. :)
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?
nine jnthn: \o/
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?
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 docs.oracle.com/database/121/LNOCI...LNOCI16279
Zoffix nine, seems the run_alt issue is a precomp issue, if you're interested (see last comment): rt.perl.org/Public/Bug/Display.html?id=126832
jnthn nine: That is suspect, indeed.
m: say 1, |(2 xx 65534) 11:19
camelia rakudo-moar 1d96ed: OUTPUT«1222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222…»
jnthn Hm, that used to SEGV
moritz prefers the current semantics :-) 11:20
jnthn Me too ;) 11:21
Just built a debugging Moar to hunt the segfault and...it no longer dos
*does
moritz or was the segfault only on 32 bit systems?
jnthn I wonder if I accidentally fixed it when cleaning up args handling
moritz star-m: say 1, |(2 xx 65534)
camelia star-m 2015.09: OUTPUT«(signal SEGV)»
moritz ... nope.
jnthn It SEGV'd camelia; is camelia 32-bit?
moritz I don't think so. 11:22
jnthn (I now 'cus the bug report is a copy-paste from the channel)
abraxxa how can I debug segfaults?
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
ilmari m: say $*KERNEL.hardware
camelia rakudo-moar 1d96ed: OUTPUT«x86_64␤»
jnthn abraxxa: ASAN, valgrind...
brrt abraxxa: gdb :-) 11:23
or lldb
jnthn MSVC ;)
abraxxa ubuntu here
jnthn 65534
65535
Too many arguments in flattening array.
:)
abraxxa i'd need a guide as i have no C knowledge
or just very basic one
brrt hmmmm 11:24
that's going to be hard
if you can post a gist somewhere, maybe we can spot something 'obviously' wrong
abraxxa i've tried to check memory locations use .WHERE
brrt: github.com/abraxxa/DBIish/blob/mas...e.pm6#L471
jnthn Seems rather fixed.
abraxxa that's the current code
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
abraxxa jnthn++ 11:26
nine jnthn: I fear this is something, you will need to look at: 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:27
11:29 g4 joined, g4 left, g4 joined
FROGGS abraxxa: is there a guide how to set up that oracle-xe container? I've no docker experience whatsoever 11:30
11:30 koo8 left
abraxxa FROGGS: if you have docker installed it's as easy as hub.docker.com/r/wnameless/oracle-xe-11g/ 11:31
dalek ast: 3fe026d | jnthn++ | S06-signature/slurpy-and-interpolation.t:
Tests for RT #126212.
FROGGS abraxxa: k, will try
abraxxa FROGGS: i have a hard time finding out the OCI to C datatype mapping 11:32
11:32 hassoub joined, cognominal_ left
abraxxa FROGGS: docs.oracle.com/database/121/LNOCI...m#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
ChoHag Less elegantly though. 11:33
IMO.
dalek kudo/nom: 03cbe70 | jnthn++ | src/ (3 files):
Kill off has-accessor.

MOP objects consistently use _ rather than - in their names, and Attribute is decidedly MOP. Further, every other method on it uses the _ convention, and we still had has_accessor anyway.
11:36
11:36 hassoub left
dalek ast: 9aee198 | jnthn++ | S (2 files):
has-accessor -> has_accessor
11:36
abraxxa how can i compile rakudo in debug mode? 11:38
brrt i suppose you use --gen-moar or something like that abraxxa? 11:39
abraxxa brrt: rakudobrew
brrt hmmm
abraxxa rakudobrew build jvm|pre-glr|moar|all [tag|branch|sha-1] [--configure-opts=]
i guess something to --configure-opts
brrt no experience with rakudobrew here
yeah, i suspect something like moar-opts=--debug --nooptimize 11:40
and/or --asan
those things will generate a slow, slow moar, though :-)
abraxxa don't care as I find the source of the segfault 11:41
11:41 nanis joined
jnthn nine: That's a really bizzare one... :( 11:42
What's the smallest golf you have so far of it?
I'd probably start out by trying to golf it
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
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.
nine jnthn: rt.perl.org/Public/Bug/Display.htm...xn-1379948 is what I've tried so far and could reproduce. Will have a closer look in the evening
nanis in string literals on Windows.
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).
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.
Amarnath Now a days perl is waste from my friend perspective
what do you say
nanis Specifically, RT #126881 and www.nu42.com/2015/12/perl6-newline...esign.html 11:45
Amarnath where perl is used 11:46
jnthn nine: OK; good luck! These things tend to be horrible to hunt down, I'm afraid. :(
abraxxa brrt: i've recompiled perl6 with debug support but valgrind still just exits
jnthn nine: I'll be about this evening if you've questions once you dig into it.
Zoffix tries say 1, |(2 xx 65534) on a 32-bit box 11:47
works fine
brrt Anarnath; i personally think perl5is an excellent tool for developing everything from one-off scripts, to research prototypes, to production-quality complex systems
nine jnthn: ok, thanks!
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.
nanis: The RT in question has already been put in the list of "things to review"
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.
brrt Amarnath ^^ does that answer your question?
nanis jnthn: Regardless of autocrlf, this enforces "\r\n" on Windows to a much greater degree than Microsoft ever did.
11:50 koo8 joined, Amarnath left
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:51
abraxxa discovered perl6-valgrind-m from rakudobrew 11:52
nanis So, thank you for considering changing the behavior.
11:53 z8 joined
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.
f.Write("hello\nworld\n"); in C# does no translation at all on output 11:54
(where f is from using (var f = File.CreateText("foo")))
nanis jnthn: Exactly, it does not change "\n" to "\r\n".
in a literal string.
11:54 lolisa left
jnthn Going by C# semantics, we should simply not do translation at all, but that won't actually fix the tests in question. 11:55
11:56 z8 left
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
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.
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.
abraxxa how can I pass options to valgrind?
jnthn This is just one of many things that didn't really work out.
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.
_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
nanis Thank you!
moritz _nadim: github.com/moritz/json/blob/master...Grammar.pm and github.com/moritz/json/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". :-)
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"
jnthn nine: Yeah, but it's not working out as a good default.
(To have it \r\n on Windows)
_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.
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?
moritz abraxxa: that's just a shell script, so you can copy and modify it at will
jnthn abraxxa: Last time I just hacked the script ;)
abraxxa moritz: a perl 5 script and not easy to understand 12:08
because valgrind isn't contained anywhere, instead it extracts it from the progname
jnthn RabidGravy: I'm working on rt.perl.org/Ticket/Display.html?id=126541 ; any thoughts on the method name we use for exposing this? 12:09
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:14
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
brrt also, jnthn++ for advent post, very entertaining; also, wow, perl6 12:25
FROGGS abraxxa: just edit the last line of perl6-valgrind-m 12:29
abraxxa FROGGS: managed it by copying the whole line rakudobrew executes
FROGGS: I have no idea what to read from the valgrind output 12:30
jnthn brrt: Thanks. And yes, writing that in Perl 6 felt *really* nice. :) 12:31
FROGGS abraxxa: paste it, and we can maybe explain things 12:35
abraxxa it's HUGE
12:35 hassoub joined
FROGGS abraxxa: that's what I would expect :o) 12:36
abraxxa which paste site?
FROGGS abraxxa: an illegal read or illegal write is often a safe bet to look into
abraxxa: the one you like most
El_Che I am famous, there is perl6advent that starts with my name :) 12:37
abraxxa FROGGS: paste.scsys.co.uk/502713
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
abraxxa FROGGS: gist.githubusercontent.com/abraxxa...tfile1.txt 12:40
12:40 Skarsnik joined
moritz El_Che: welcome to your wonderful world of 5 minutes Internet fame :-) 12:40
Woodi maybe concept of logical \n is't a problem but execution/enforcement part is not precise ? 12:41
El_Che :)
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!
moritz let's quit this Unicode mess, I want Ponycode! 12:43
abraxxa isn't it called punycode? ;) 12:44
moritz abraxxa: no, punycode is a lie
FROGGS abraxxa: sadly there is nothing interesting in there 12:46
abraxxa FROGGS: are the valgrind options ok?
12:46 CIAvash left 12:47 Lucas_One joined
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
leak*
abraxxa ok
how is explicitly-manage implemented? 12:51
it works for strings, just not for ints and floats
12:51 cognominal_ left
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
FROGGS: is rw should work according to this test too: github.com/rakudo/rakudo/blob/nom/...args.t#L54
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
and you need to keep that pointer
abraxxa i see 12:55
so any idea what I can try or do to fix this?
Skarsnik Hello
FROGGS abraxxa: you need to get more information out of it.. somehow 12:57
abraxxa should this be valid syntax? .WHERE for @in-binds; 12:58
ah, i'm missing the say
.WHERE returns different values in the loop and after it when I print the mem locations using WHERE 12:59
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
moritz so that can happen
abraxxa sorry, my bad, looked at the wrong lines
FROGGS abraxxa: but you can 'say +$valuep'
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
abraxxa FROGGS: ok
where is this documented?
FROGGS abraxxa: as long as you keep references to it it wont get collected
13:01 xpen joined
abraxxa FROGGS: does that generate a reference? my $valuep := Pointer[num64].new($value); 13:02
FROGGS abraxxa: that's a pointer, yes
err, wait
that's nonsensical
there you are creating a pointer to a (most likely) illegal memory address 13:03
m: use NativeCall; say Pointer[num64].new(42.1)
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
abraxxa m: use NativeCall; my long $value = 42; my $valuep := Pointer[long].new($value); say $valuep;
camelia rakudo-moar 03cbe7: OUTPUT«NativeCall::Types::Pointer<0x2a>␤»
abraxxa so what should I do instead? 13:05
the CArray workaround?
13:05 colomon joined
FROGGS abraxxa: use either malloc or CArray, which does it for you 13:05
we should provide Pointer.malloc, really
brrt yes, we should 13:06
abraxxa yes, please!
FROGGS :o)
13:07 brabo left
abraxxa i like to have 'Unhandled exception: Cannot unbox a type object' for duplicate variable declarations fixed for the Christmas release 13:08
13:08 brrt left
Skarsnik hm, FROGGS, should I new a pointer returned by a function to be able to call deref on it? I tried github.com/Skarsnik/DBIish/blob/ma...e.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
FROGGS abraxxa: is this ticketed? 13:09
abraxxa not sure, we talked about it weeks ago
FROGGS Skarsnik: will mysql_fetch_field return a typed pointer? a Pointer[<something>] ? 13:10
Skarsnik yes Pointer[MYSQL_FIELD]
abraxxa FROGGS: it works!
FROGGS O.o
Skarsnik: then it should work in case it really returns that type 13:11
13:11 hassoub left
Skarsnik travis-ci.org/perl6/DBIish/builds/96278908 Invocant requires an instance of type NativeCall::Types::Pointer[DBDish::mysql::Native::MYSQL_FIELD], but a type object was passed. Did you forget a .new? 13:12
13:13 cognominal joined
FROGGS m: use NativeCall; say Pointer[int32].new.deref 13:15
camelia rakudo-moar 03cbe7: OUTPUT«(signal SEGV)»
FROGGS ohh, heh
well, kinda expected
m: use NativeCall; sub malloc(int32) returns Pointer[int32] { * }; say malloc(nativesizeof(int32))
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␤␤»
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::Pointer[int32]<0x7121580>␤»
FROGGS m: use NativeCall; sub malloc(int32) returns Pointer[int32] is native { * }; say malloc(nativesizeof(int32)).deref
camelia rakudo-moar 03cbe7: OUTPUT«-403544376␤»
FROGGS Skarsnik: see, it works in case the sub returns an instance
hmmm, though we could make it return a type object if not... 13:17
sadly native types don't really show up as type objects :/
Skarsnik I can't test this code sadly, mysql server does not want to work here ~~ 13:18
13:18 xpen left, kitesurf joined
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
FROGGS abraxxa: hmmm, no idea what this might be about 13:20
13:20 xpen joined
Skarsnik moritz, I will try on another VM, don't worry x) 13:21
It just annoying
moritz Skarsnik: wouldn't be any hassle; that's exactly what that host is for
Skarsnik I am off for a bit x)
13:21 leont joined 13:24 prammer joined
abraxxa FROGGS: fixed code pushed 13:24
13:26 ZoffixW joined
kitesurf Hi everyone 13:26
ZoffixW RabidGravy, I don't get what the difference is (re promises irclog.perlgeek.de/perl6/2015-12-14#i_11712496). Isn't throwing inside a promise same as .break()ing it? 13:27
kitesurf, hi
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: modules.perl6.org/#sort-col=5&sort-dir=d :)
dalek kudo-star-daily: db257da | coke++ | log/ (2 files):
today (automated commit)
rl6-roast-data: 5ecd22c | coke++ | / (7 files):
today (automated commit)
rl6-roast-data: 84ce574 | coke++ | / (7 files):
today (automated commit)
moritz kitesurf: I'd recommend to start with some modules; go to modules.perl6.org/ ... what ZoffixW said :-)
kitesurf Cool 13:29
ZoffixW kitesurf, there are also some open issues in perl6 repos: github.com/issues?utf8=%E2%9C%93&a...er%3Aperl6
RabidGravy ZoffixW, except one starts a new thread and the other doesn't
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:30 xpen left
ZoffixW got it 13:31
13:31 xpen joined 13:33 Ven_ left
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:33
13:34 xpen_ joined 13:36 xpen left, lucasb joined 13:37 prammer left, prammer joined, TEttinger left, Wittsy joined
ShimmerFairy Huh, I just came across www.nu42.com/2015/12/perl6-newline...tched.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:39
13:40 prammer left 13:41 prammer joined
Wittsy slaps Wittsy around a bit with a large fishbot 13:41
nine ShimmerFairy: well there's a bit of a controversy what "The Right Thing" actually is 13:42
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
nine: but yeah, I can definitely see the inconvenience that was brought up there.
13:44 prammer left 13:45 prammer joined
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:46
13:47 xpen_ left 13:48 xpen joined, prammer left
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:48
13:49 prammer joined
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
In the current lexical scope, of course, because perl's like that.
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
We love utf-8 here, right?
13:52 ZoffixW left 13:53 my-real-name left
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
13:53 kaare_ joined
leont is also used to i being dealt with at IO boundaries, this would surprise me too 13:54
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:56
ShimmerFairy also just realized n is an odd choice of letter for liNe feed 13:57
nine isn't it Newline?
ilmari the unicode name is line feed, but yes 13:58
13:58 shibly joined, shibly left
[Coke] lots of QAST diagnostic output in the last moarvm-jit test run. 13:58
lucasb m: say "a\rnb"
camelia rakudo-moar 03cbe7: OUTPUT«a
[Coke] (fewer actual failing tests, though, down to 25)
lucasb I didn't know about the \rn escape :) saw it in the mentioned commit 13:59
ShimmerFairy m: say "\c[NEL]".uniname
camelia rakudo-moar 03cbe7: OUTPUT«NEXT LINE (NEL)␤»
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:00
nine ShimmerFairy: which is why rakudo's current behavior makes so much sense. Too bad it doesn't survive contact with reality (TM). 14:01
ShimmerFairy (also, just remembered lisp is ~%, not ~n) 14:02
nine: I think my \f idea would be nice regardless. Guaranteed LINE FEED and get rid of another \v-like to boot! :)
.oO(maybe the default for use newline would always be :lf ?)
14:02 xpen left 14:03 xpen joined
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:04
14:07 jsimonet left
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:07
RabidGravy I have 14:08
jnthn nine: Didn't survive contact with reality is a pretty good summary :)
14:08 jsimonet joined
RabidGravy Remedy had (has?) a stupid thing where it stored notes in an Oracle text column separated by a form feed 14:09
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
14:10 xpen left
jnthn ShimmerFairy: I'm not sure fighting surprising behavior with more surprises is a great way to go :) 14:10
14:11 pippo joined
ShimmerFairy jnthn: who still uses \f and \v though? :P 14:11
pippo o/ #perl6!
jnthn People dealing with Oracle, apparently :P
ShimmerFairy \x[0C] should be good enough for FORM FEED users :P
geekosaur \f invites confusion between line feed and form feed, especially given its historical meaning (the latter)
perhaps \L ? 14:12
14:12 Ven joined
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
outcome
14:13 diana_olhovik_ left
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 Ven left
ShimmerFairy we could also go the lisp way and have a \% for "logical" newline, if we need \n to be liNe feed :) 14:17
dalek p: 436b4f2 | jnthn++ | / (2 files):
Map nqp::filenofh op on MoarVM.
14:19
p: cf246d6 | jnthn++ | src/vm/jvm/ (2 files):
Stub nqp::filenofh on JVM.
14:22 Ven joined 14:27 Ven left
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 colomon left
Skarsnik Zoffix, could you add a page(s) that list all modules issue on modules.perl.org? (if possible) 14:30
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 ast: ce74fd9 | jnthn++ | S32-io/native-descriptor.t:
Add tests for .native-descriptor on handles.
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 :)
dalek kudo/nom: a819231 | jnthn++ | / (3 files):
Implement native-descriptor on handles/sockets.

Provides a way to get the (platform-specific) file descriptor, HANDLE, etc.
kudo/nom: a22c412 | jnthn++ | t/spectest.data:
Run S32-io/native-descriptor.t.
14:35 adhoc left 14:36 rvchangue left
Woodi feature request: some key binding for image scaling in web browsers... 14:36
14:36 znpy joined, adhoc joined 14:39 Ven joined
jnthn is happy to be back under 20 xmas RTs again :) 14:40
nine jnthn++ # now when a file op is missing, we can work around that using NativeCall :) 14:41
Skarsnik good luck x)
[Coke] S10-packages/precompilation.t is dying before completion (and failing 2 tests)
RabidGravy jnthn, I'll do some PoC to test that later, when I've finished doing what I'm doing :)
14:41 rvchangue joined
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:42
14:44 andreoss joined 14:46 colomon joined
Ven jnthn++ :D 14:46
14:46 nanis left
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
14:47 muraiki joined
[Coke] TimToady: integration/advent2012-day21.t might be a result of your recent sink changes. 14:48
jnthn m: { my $f := Failure.new("bar"); }
camelia rakudo-moar 03cbe7: OUTPUT«bar␤ in block <unit> at /tmp/VCxUgiABK6:1␤␤Actually thrown at:␤ in block <unit> at /tmp/VCxUgiABK6:1␤␤»
jnthn m: { my $f = Failure.new("bar"); }
camelia ( no output )
jnthn hmm
[Coke] github.com/coke/perl6-roast-data/b....out#L4948
jnthn m: { my $f := my $ = Failure.new("bar"); }
camelia ( no output )
jnthn Odd 14:49
Skarsnik damn, there was improvment? Stage parse : 77.519 I remember that taking over 100 x)
TimToady [Coke]: yes, that's almost certainly gsr damage, though it should still run okay despite the spurious warning 14:51
14:51 decent joined
TimToady it just means something is relying on the optimizer to determine sink when it should be decided by actions 14:51
Woodi btw. R* 2015.11 have startup arount 1.5x node-js :) so it's standard industry like ? :) 14:52
Skarsnik x) 14:53
14:53 pippo left 14:54 rindolf joined
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.
Ven well, nodejs doesn't tout about its startup performance
it's pretty terrible for one-liners, tbh...
TimToady testing a fix for that one 14:57
14:57 sammers left
TimToady testing a different fix for that one :) 15:00
15:00 skingsbu joined
TimToady (first fix worked, but wasn't general enough) 15:01
Ven TimToady: what's wanted/WANTED? 15:02
15:02 pmurias joined
dalek p/js-cps: 9cbdb6e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
[js] Remove dead code.
15:02
p/js-cps: dd04b9e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
[js] partial if in CPS mode
kudo/nom: e62d9a7 | TimToady++ | src/Perl6/Actions.nqp:
xblock needs to want is argument
skingsbu does there happen to be an sftp/ssh module yet for perl 6? 15:03
Skarsnik modules.perl6.org/dist/Net::FTP
oh sftp
I don't think so 15:04
skingsbu thanks
Skarsnik ssl support is quite sparse
TimToady Ven: the actions know a lot more than the optimizer about what should be sunk, so we're moving that decision into actions
Ven okay, thanks :) 15:05
15:05 skids joined
TimToady but I left the final decision in the optimizer for now, so we can detect where there are mismatches 15:06
15:06 skingsbu left
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
TimToady I can also find all the final statements of blocks that don't happen to be marked by actions yet
FROGGS :S 15:08
andreoss masak: what do you call this lispy syntax in which 007 test cases are written?
15:08 robertle joined
TimToady though currently that information only shows up if I jack up optimization to level 4 15:08
which I'm using temporarily to turn on debugging in the optimizer 15:09
15:09 sammers joined
TimToady one benefit of the sink changes is that we now optimize native increments better, including when it can turn $++ into something better 15:10
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
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
timotimo o/ 15:14
lucasb TimToady: ah, ok. thanks
15:14 regreg joined 15:15 lichtkind joined
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
ShimmerFairy
.oO(double-oh theven)
15:16
ZoffixW Skarsnik, for what purpose? (re: add page with all issues)
dalek kudo/nom: de23614 | TimToady++ | src/Perl6/Optimizer.nqp:
do the ++ optimization for normal code now
Skarsnik have a quick way to say "Here some stuff to do" x) 15:17
El_Che Skarsnik: in case skinsbu is back: blogs.perl.org/users/aaron_baugher/...etssh.html
ZoffixW Skarsnik, here's a quick way. Start from the top :) modules.perl6.org/#sort-col=5&sort-dir=d
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
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?
moritz robertle: why do you "use" HTTP::Server::Async::Response when you want to instantiate HTTP::Server::Async? 15:19
diakopter robertle: do you need to `use` HTTP::Server::Async too? 15:20
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
timotimo m: say "which version am i?"
camelia rakudo-moar e62d9a: OUTPUT«which version am i?␤»
diakopter robertle: but did that make it work?
robertle diakopter: yes. sillyness on my side 15:22
timotimo m: my int $foo = 0; while $foo < 100000 { $foo++ }; say now - INIT now;
camelia rakudo-moar e62d9a: OUTPUT«0.0942434␤»
Skarsnik Zoffix, Oh yeah the git api limit call ~~
timotimo m: my int $foo = 0; while $foo < 10_000_000 { $foo++ }; say now - INIT now;
camelia rakudo-moar e62d9a: OUTPUT«6.8320756␤»
15:23 khw joined
timotimo m: my int $foo = 0; while $foo < 10_000_000 { ++$foo }; say now - INIT now; 15:23
TimToady wait 8 minutes
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
camelia rakudo-moar e62d9a: OUTPUT«7.641817␤»
timotimo i'm gathering before-the-change timings :)
diakopter m: my int $foo = 0; True while ++$foo < 100000; say now - INIT now;
camelia rakudo-moar e62d9a: OUTPUT«0.0618161␤»
TimToady I was gonna wait until a few seconds before the switch :)
timotimo probably not such a good idea to do it on camelia?
moritz I just want to stress that camelia is *not* a benchmarking platform
TimToady the difference will be unmistakable :)
15:23 cdg joined
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
and timings are rather jittery 15:24
TimToady 20 times faster is 20 times faster
diakopter most of a core is close enough
RabidGravy robertle, the message you got was probably because the HTTP::Server::Async got created as an intervening package rather than an actual class
moritz TimToady: might work in this case; I'm making a more general statement here :-)
timotimo it's a good point, moritz 15:25
especially since ++$foo is meant to be faster than $foo++, but in that little case it wasn't :)
also, n == 1 is *bad*
TimToady pre and post should now be equivalent in sink context
if not, it indicates a missing sink
well, a missing unwanted()
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␤»
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
Skarsnik m: my $a = 2; $a = Mu; say $a.defined;
lucasb missing the experimental feature/pragma
camelia rakudo-moar e62d9a: OUTPUT«False␤»
robertle RabidGravy: the source for it says "class HTTP::Server::Async does HTTP::Server {", not sure that helps.
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
Skarsnik m: my $a = 2; $a = Mu; say $a.defined || defined $a;
camelia rakudo-moar e62d9a: OUTPUT«False␤»
flussence ooh, that new error message in panda/bootstrap.pl is pretty
s/in/from 15:28
moritz lucasb: I can
lucasb: what version does it need?
RabidGravy robertle, no it's expected behaviour it's because you were doing:
m: class Foo::Bar::Baz {}; Foo::Bar.new
camelia rakudo-moar e62d9a: OUTPUT«You cannot create an instance of this type␤ in block <unit> at /tmp/0ob4yJQQxH:1␤␤»
15:29 g4 left
lucasb moritz: idk. 'use experimental :cached;' was added recently to htmlify.p6 and I think that's why it is not building. 15:30
15:31 zakharyas joined
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
TimToady timotimo: okay, refire test cases :)
hoelzro timotimo: thanks for reading the post! glad to see you liked it =)
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!
TimToady and diakopter
moritz lucasb: ok; so far I've tried to track rakudo releases with that rakudobrew
abraxxa FROGGS: starts to work 15:33
ZoffixW m: my int $foo = 0; while $foo < 10_000_000 { $foo++ }; say now - INIT now;
abraxxa fetching doesn't return rows although i don't get an error
camelia rakudo-moar de2361: OUTPUT«6.6579539␤»
TimToady m: my int $foo = 0; True while ++$foo < 10_000_000; say now - INIT now; # diakopter's test
camelia rakudo-moar de2361: OUTPUT«0.0550347␤»
andreoss Ven: i wanted to add more built-ins such as <, >. I wonder if their semantics on Arrays and Objects is defined somewhere
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
IIRC
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)
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
TimToady m: loop (my int $i; $i < 10000000; ++$i) {}; say $i; say now - INIT now
camelia rakudo-moar de2361: OUTPUT«10000000␤0.0609680␤»
TimToady m: loop (my int $i; $i < 10000000; $i++) {}; say $i; say now - INIT now
camelia rakudo-moar de2361: OUTPUT«10000000␤0.06008296␤»
ZoffixW m: say 0.0618161 - 0.0550347
camelia rakudo-moar de2361: OUTPUT«0.0067814␤»
TimToady that's noise 15:35
FROGGS abraxxa: you can only allocate a large enough CArray[uint8], and join it afterwards
abraxxa FROGGS: instead of passing Str?
ZoffixW What was meant to be 20 times faster? <TimToady> 20 times faster is 20 times faster
FROGGS abraxxa: is string is just a pointer to a piece of mem... just like a C array is 15:36
abraxxa: so, yes
abraxxa FROGGS: what about my Str $valuep = ' ' x (($datalen+1) * 2);
andreoss Ven: looks like they are just infix subs
ZoffixW Oh, I guess it was just a random number...
andreoss so it would be quite easy to add some more
FROGGS abraxxa: I don't think you will get your hands on the modified string in this example
TimToady m: my int $i = 0; $i++ while $i < 10000000; say $i; say now - INIT now
camelia rakudo-moar de2361: OUTPUT«10000000␤0.05941549␤»
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␤»
diakopter that's a 100x improvement
TimToady m: my int $i = 0; $i++ while $i < 1_000_000_000; say $i; say now - INIT now
camelia rakudo-moar de2361: OUTPUT«1000000000␤5.67746063␤»
ZoffixW Ohhhh
Wow. :D
timotimo i like that
abraxxa FROGGS: right, I'll do the same as in get_errortext 15:38
Skarsnik hm, there is no static variable in subroutine?
TimToady thought you would, but I'll have to figger out why the block form of while isn't sunkeded
_nadim 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:39
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
moritz: thanks, the JSON parser gave me just the right amount of data (lots)
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
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.
TimToady m: my int $i = 0; while $i < 10_000_000 { ++$i }; say $i; say now - INIT now
camelia rakudo-moar de2361: OUTPUT«10000000␤7.7058822␤»
TimToady maybe that's just block call overhead
FROGGS can't we get rid of lexical scopes when only outers are involved?
timotimo could be we can't inline that block because of its use of native refs?
diakopter yeah but the block should be eliminated since there are no lexicals or copied arguments
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
diakopter also, no EVAL, no labels 15:45
no variables invoked
etc
timotimo no pseudostashes
moritz lucasb: meh, rakudobrew failed, I guess I need to nuke some old stuff :(
masak andreoss: um, I just call it "the Lisp-y" syntax :) 15:46
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 15:49 jdrab joined
masak andreoss: what Ven++ said, irclog.perlgeek.de/perl6/2015-12-14#i_11713873 15:50
Ven \o/
robertle is this interesting?: moar: ../nptl/pthread_mutex_lock.c:80: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
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
andreoss: my only regret is that I must do it as dumb strings, rather than as a slang.
masak realizes as soon as he's said that that he can probably do it as a slang today
Skarsnik enum are not great to use with NC >< 15:52
masak Skarsnik: "NC"?
Ven masak: hey, that'd be a cool thing to do 15:53
Skarsnik nativecall
or it should be easier to use them as their value
15:53 CIAvash joined
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 :)
do we have some docs on them, or should I look at FROGGS++'s modules? 15:55
Skarsnik github.com/Skarsnik/DBIish/blob/ma...ve.pm6#L33 Like this does not work if I do %mysql-type-conv($enumvaluefrommysql)
15:55 adu left 15:56 domm joined
gfldex where could 'Type Array does not support associative indexing.' come from? 15:56
ZoffixW m: my @a; say @a<foo>
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␤␤»
masak Ven: the latter, I think.
Skarsnik interesting 15:57
masak Ven: I'd be instantly sold if we did AST interpolation somewhere -- but we don't :)
Skarsnik @a as .kv but
m: my @a = 1,2,3; say @a<1>;
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
timotimo for one, @a<1> isn't @a{1}, it's @a{'1'} 15:58
and .kv is on everything :P 15:59
ZoffixW m: my @a = 1,2,3; say @a{1};
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␤␤»
timotimo m: say "foobar".kv
camelia rakudo-moar de2361: OUTPUT«(0 foobar)␤»
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.
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>;
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␤␤»
ZoffixW heh
Woodi TimToady: in: True while ++$foo < 10_000_000; body is constants so 10m less ops to do; like in sbel.wisc.edu/Courses/ME964/Literat...ng1974.pdf on page7
pmurias jnthn: have you considered keeping the 6.c test suit in a branch?
masak .oO( General Rakudo Confusion is famous for winning the battle of Hash and Dis-Array )
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 )
jnthn pmurias: I'm not sure what that wins us, tbh 16:02
pmurias: We still want to run it on "make spectest"
masak today's autopun, courtesy of jnthn++: twitter.com/SilverVVulpes/status/6...0290092032
16:03 znpy left
ZoffixW heh 16:03
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:06 domm left
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 } }␤ …»
pmurias jnthn: if (when? ;) ) we encounter bugs and want to expand the test suit a bit where will we add the new tests?
Ven m: react { whener supply { emit 1 } -> $a {say $a; done}; }
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}; }␤ …»
RabidGravy it just occurred to me that the %*RESOURCES thingy makes doing an Alien::* thing really, really easy
Ven jnthn: ^ is that semantically wrong?
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
jnthn pmurias: Under future/ or so 16:09
Ven: Um, looks like typo?
Ven jnthn: ?
jnthn m: react { whenever supply { emit 1 } -> $a {say $a; done}; }
camelia rakudo-moar de2361: OUTPUT«1␤»
Ven nice, thanks :) 16:10
the error message made me thing the "supply" there was unexpected
16:10 domm joined
andreoss masak: also, if we use infix:«==» for strings, why not use "" 16:10
16:10 |Tux| joined
andreoss ... why not use infix:«+» for concatenation as well? 16:11
masak andreoss: heresy! :P
Ven andreoss: there's an explanation somewhere in the issues, I think :)
masak andreoss: to be fair, you have a point.
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.
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
[Coke] m: say "3" + "4";
camelia rakudo-moar de2361: OUTPUT«7␤»
lucs Grammar problem: 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
ZoffixW m: say "foo is " ~ 4+4
camelia rakudo-moar de2361: OUTPUT«foo is 8␤»
ZoffixW ^^ my strong -1 of having + as concat. JS does it and I hate it there 16:14
16:14 retupmoca joined
andreoss masak: is 007 meant to be more like ES or perl 6? 16:14
issues reference to ES7 a lot 16:15
16:19 FROGGS left, vividsnow left 16:20 dwarring left 16:21 brrt joined
masak the object syntax is straight from ES6. the rest is largely a mix of Perl 6 and Python. 16:23
16:23 koo8 left 16:25 xfix joined 16:26 Ven left
dakkar context for my coming questions: github.com/dakkar/p6-cstruct-tests 16:26
abraxxa does given when support a list of values?
like when Int, Num {
masak syntactically, yes
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?
masak abraxxa: but probably doesn't do what you think
abraxxa i want the same when block for multiple values of the given var 16:27
nine m: say "0" == "0.0"
camelia rakudo-moar de2361: OUTPUT«True␤»
abraxxa perl6intro.com/#_given doesn't show that
masak abraxxa: aha. `when Int | Num`
jnthn dakkar: I expect so, though you probably have to mark the subclass as repr('CStruct') also
abraxxa masak: thanks!
16:28 pmurias left
dakkar jnthn: yep, it's required, otherwise it fails to compile 16:28
now, 2nd question: inlined Str is immutable even if marked "is rw"
abraxxa YESSSS
i can fetch from Oracle!
ZoffixW \o/
dakkar I had to write a rw accessor returning a proky that binds on STORE
abraxxa that makes in and out-binds work!
Skarsnik Nice :) 16:29
dakkar is the current behaviour intended? why? how bad is what I did?
abraxxa i'll push this to github when rebase to the refactored DBIish
Skarsnik: you did the refactor, right?
Skarsnik depend, what refactor?
abraxxa split up in one file per class
Skarsnik seperate everything in lot of file is not me
abraxxa ok
16:31 khisanth_ joined
gtodd hmmm ... for first time in a while perl6 won't build here :-O ;) ..... compiling src/io/io.o 16:31
src/io/io.c:53:68: error: too many arguments provided to function-like macro invocation 16:32
MVMint64 ret = handle->body.ops->introspection->fileno(tc, handle);
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␤␤»
gfldex it's not General Rakudo Confusion. It's rather General gfldex Confusion 16:35
RabidGravy gtodd, very recent commit that
leont gtodd: first guess: is there a fileno macro involved? 16:36
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>};
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␤␤»
jnthn fileno is just a struct member
gfldex is there a Q-way to interpolate $foo but not $foo<bar> ?
brrt abraxxa++ for sticking with it
16:38 domm left
TimToady gtodd: did you reconfig 16:38
lucs Bugs or misunderstandings?: gist.github.com/lucs/4ecb7602b8e474a01c1e
flussence gfldex: backslash the \<
or use {$foo}<bar>
16:38 rindolf left
flussence or q:s{}, maybe 16:39
m: my $foo = 1; say q:s{$foo<bar>}
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␤␤»
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, domm joined
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␤»
masak \o/
flussence well there's q:c for only interpolating {} blocks, and q:e lets you embed \qq"" iirc
gfldex :c will do 16:41
TimToady but you could use that anyway here with ordinary qq 16:42
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
brrt well spent :-) 16:44
Woodi abraxxa++ ! :)
ZoffixW Is there a way to do chained attributes that's less involved than this: en.wikipedia.org/w/index.php?title...116#Perl_6 ? 16:45
abraxxa thanks!
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
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
timotimo that wikipedia article should be changed to remove the \ in front of the newlines
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
timotimo and didn't we actually get an ecosystem module that does the thing there?
jnthn You could hand-write the accessors and I guess maybe use --> self in the signature
ZoffixW timotimo, that's a version from history
timotimo oh, that's ... ah
flussence oh
test123 is perl6 production ready yet? 16:48
ZoffixW test123, no
TimToady lucs: at the moment <ident> is hard-wired in like <alpha> is
timotimo test123: depends.
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” :)
jnthn test123: People *are* using it in production. :)
gtodd src/io/io.c:53:18: warning: incompatible pointer to integer conversion initializing 'MVMint64' (aka 'long') with an
expression of type 'MVMint64 (*const)(MVMThreadContext *, MVMOSHandle *)' [-Wint-conversion]
MVMint64 ret = handle->body.ops->introspection->fileno(tc, handle);
leont: guess so
ZoffixW jnthn, but... but... TIMTOADY
jnthn test123: Doesn't matter what we say either way; folks who find it useful already will go ahead and use it in production. :)
ZoffixW TIMTOWTDI or however you spell it 16:49
timotimo gtodd: ugh, there's a function pointer being casted into n int there?
test123 ZoffixW, what else are we waiting to get perl6 to run at production?
flussence oh oh, I have a real answer for the question this time!
test123 LOL
flussence when it can be installed using distro package managers
ZoffixW test123, Christmas release of the spec, I suppose. Then... I'm not sure how many shaky bugs are there 16:50
flussence, but do people actually do fluent interface like that?
dakkar aaargh. how do I test destructors??
Skarsnik I will say 3 months after x-mas x)
dakkar as in, destructors called by the gc
gtodd timotimo: that's just so ... un-christmassy
dakkar grrr
16:50 domidumont left
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
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
I'm binding C libraries
ZoffixW test123, Perl 5 and Perl 6 are different languages...
dakkar I'd *really* like to avoid leaks, and double free, and segfaults
TimToady though we use <ident> for something in the p6 grammar without a problem
flussence destructors have never really worked in a predictable way
test123 yes, i need perl, if 6 not ready for production. whatelse i use?
5
brrt production is kind of vague. perl6 is probably unsuitable for things where you use highly optimized c
dakkar at the moment, I can not reliably bind *any* C library
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
test123 perl to run website
dakkar because I can't make sure memory allocated C-side gets de-allocated
gtodd test123: I'm goin gto use perl5 for a long time but possibly not forever ...
abraxxa when i want to push an undef to an array should I use Nill?
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
test123, use mojolicio.us/ It's Perl 5.
robertle ZoffixW: is ruby production ready? ;) 16:53
test123 no ruby
ZoffixW test123, and a very nice framework.
flussence
.oO( GC is torturing testers on behalf of the implementors )
test123 perl is better
gtodd flussence: hehe
ZoffixW test123, there are two perls :)
test123 yes, 5 and 6
16:54 prammer left
test123 i am stuck at 5 16:54
really want to change to use 6
but....
ZoffixW test123, what do you mean "stuck"? It's an actively developed language.
brrt i think production ready means 'people i think are authorative on such choices think using $_ for a valuable service is acceptable'
gtodd test123: use Moose; :-D otoh I just noticed p5-mop is working pretty well
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 mojolicio.us/ Then check back with Perl 6 in a year to see if it has Good Things(tm) to offer
test123 is p5-mop stable and better than moose?
gtodd test123: it even seems to work on perl-5.6
timotimo ZoffixW: a year? wow. you're not giving us enough credit :)
abraxxa oh great, Oracle sorts NULLs before non-nulls and the DBIish tests fail
ZoffixW timotimo, to be clear, I mean a year for a decent and competitive Perl 6 web framework to emerge
timotimo ah
yeah, that kind of thing surely takes time 16:56
ZoffixW Last I tried Bailador...
gtodd so ... perl-5.6 now can sport a perl6 inspired mop ... if you wanna toss the numbers 5 and 6 around
ZoffixW shivers
16:56 prammer joined
test123 i need a faster perl 16:56
16:56 pmurias joined
test123 like perl6 run at jvm 16:56
ZoffixW test123, than what?
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
brrt test123 'is $a better than $b' is not an engineering question
.hug test123
gtodd hmm surely it must be an astonishing proof of something that with a few dependencies p5-mop will work with perl-5.6 (?!)
brrt gtodd: yes 16:58
perl5++
gtodd truly ....
test123 i am not a troll
:(
timotimo non-trolls are allowed to get hugs, too
test123 troll won't know perl6
gtodd yoleaux: hug test123 16:59
test123 they only know money
gtodd .hug ??
16:59 domm left
brrt well we apologise 16:59
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
bye
ZoffixW laughs
17:00 test123 left, robertle left
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)'
0
brrt :-)
andreoss this should not work, right? 17:02
timotimo depends completely on whether or not 007 implements chaining ops
17:02 prammer left, raiph joined
gtodd test123: never say never Facebook is errm hacking on PHP .... 17:03
Hack-ing (cough cough)
andreoss timotimo: i can parse them surely, so it does it like (a==a)==a, which ends up wrong
brrt gtodd i think he's gone 17:04
timotimo andreoss: it's not about "being able to parse them"
17:04 pep_ joined
timotimo "chaining ops" are those that turn a == a == a into a == a && a == a behind the scenes 17:04
17:04 prammer joined
brrt i think false ir 0 is the right answer for (a==a)=÷a 17:04
timotimo m: say 0 == 0 == 0 17:05
camelia rakudo-moar de2361: OUTPUT«True␤»
timotimo ^- that's what you get with a language that does chaining ops for you
abraxxa can someone please answer my Nil question? 17:06
is Nil to Perl 6 what undef is for Perl 5?
andreoss i know that, i mean should it work at all with 007, in the future
timotimo m: say undef
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…»
Skarsnik Nil is a failure
timotimo ^- read this eror message :)
abraxxa Oracle has an indicator that tell me if the value is NULL in the Database 17:07
and i wonder what I should set the column variable to
Skarsnik oh same here with mysql x)
timotimo i'd say use the type object for what the column type is
abraxxa the docs say: class Nil Absence of a value
which sounds like exactly what NULL means
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
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…»
ZoffixW aww :(
RabidGravy abraxxa, yeah *but* the column is a Str or Int or Num or whatever and Nil isn't one of those
17:08 ZoffixW left
abraxxa RabidGravy: that sounds sane, thanks! 17:08
Skarsnik NULL is a type in Mysql 17:09
MYSQL_TYPE_NULLNULL-type field
timotimo a ... type?!
raiph abraxxa: Nil means "absence of value and i can't, or can't be bothered, to say any more"
RabidGravy :)
timotimo AFK
TimToady it usually means a failure you should have anticipated, such as a missing hash element
abraxxa and Oracle doesn't differentiate between '' and NULL 17:10
Skarsnik :(
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
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:15
andreoss: right now, the associativity of infix:<==> is 'left', just like all ops except for infix:<=> and the postfixes 17:17
17:17 rurban left
dakkar is it expected that chars(*) and *.chars do different things? 17:18
(as in, the first one doesn't compile)
17:18 brrt left
RabidGravy in that there isn't a sub version of chars, it's probably deliberate 17:18
lucasb m: say chars('abc') 17:19
camelia rakudo-moar de2361: OUTPUT«3␤»
RabidGravy hey, there is
flussence m: say &chars.signature; say *.WHAT
camelia rakudo-moar de2361: OUTPUT«($)␤(Whatever)␤»
gtodd :-D there did seem to be a pattern of differences between functions and methods re: defaults ...
flussence m: say chars(*)
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␤␤»
leont Whatever is something you apply operators on to get something else
gtodd errm there did seem to *me* that is
flussence m: say Whatever.^mro, Str.^mro; 17:20
camelia rakudo-moar de2361: OUTPUT«((Whatever) (Any) (Mu))((Str) (Cool) (Any) (Mu))␤»
lucasb oh, he meant the literal Whatever object, sorry :)
dakkar leont: it's also something you use to build WhateverCode
leont Yeah
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 ;)
flussence m: my $x = &chars.assuming(); say $x('abc')
camelia rakudo-moar de2361: OUTPUT«3␤»
nine flussence: why is precomp a no-go?
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
flussence ~ $ perl6 --version 17:22
This is perl6 version 2015.11 built on MoarVM version 2015.11
heeeeeey, it worked!
nine flussence: I even tested that scenario and it seemed to work just fine. 17:23
17:23 rurban_ left
dakkar jnthn: I noticed :) 17:25
jnthn: what's the rationale?
17:25 brrt joined
flussence nine: then I'm not entirely sure what's going on. I'll give it another try in a minute 17:25
stmuk I've attempted to write a GLR advent blog post for tomorrow which is in draft if anyone can check it 17:26
its fairly basic 17:27
17:28 Wittsy left, prammer left
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:28
dakkar fair enough 17:29
17:29 zakharyas left
brrt stmuk: would be happy to 17:29
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 $) { .... }"
dakkar RabidGravy: you're clearly not imaginative enough :)
RabidGravy actually not correct, five times in one file ;-) 17:31
|Tux| started afresh and removed .precomp. Now *some* tests run fine, others still fail with the run_alt problem 17:32
prove -j5 causes additional havoc
RabidGravy github.com/jonathanstowe/Chronic/b...ic.pm#L204 and friends
17:32 prammer joined, psy_ joined
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:32
(this may well be a case of "don't do that") 17:33
17:33 psy_ left, labster joined, psy_ joined
dalek osystem: 5a845f8 | RabidGravy++ | META.list:
Add Audio::Silan

  github.com/jonathanstowe/Audio-Silan
17:35
|Tux| test 50000 20.855 20.746
test-t 50000 13.856 13.747
csv-parser 50000 24.774 24.665
13.8! Holy cow
flussence oh wow
RabidGravy Harr
|Tux| don't know if I should be happy or sad now :)
timotimo holy fucking wat
that must be TimToadys work? 17:36
17:36 noganex_ left
nine Nice one! 17:36
RabidGravy so what was the high water mark? in the 70s wasn't it?
abraxxa dakkar: that sounds like what Oracle OCI does
|Tux| timotimo: that is the fastest run I ever measured
dakkar abraxxa: which one? testing destructors, or binding strings?
|Tux| the downlside is that my tests don't pass because of the run_alt thingy
andreoss m: sub infix:<<mod10==>>($a, $b) { $a % 10 == $b % 10 } ; say(13 mod10== 23 mod10== 33)
camelia rakudo-moar de2361: OUTPUT«False␤»
abraxxa dakkar: look at github.com/abraxxa/DBIish/blob/mas...e.pm6#L371 17:37
binding strings
masak |Tux|: the tests run really fast, but they don't pass? :P
17:37 pep_ left
masak |Tux|: maybe failing takes less time...? 17:37
andreoss how do i make chainable my own infixes?
|Tux| the timing test is not part of the test suite
RabidGravy they fail really quickly
masak |Tux|: ah, ok :)
stmuk very agile
dakkar abraxxa: ehm… not related to what I'm thinking. My explanation may have been a bit too succint
github.com/dakkar/p6-cstruct-tests...est.p6#L64 ← replacing an inlined Str in a CStruct via binding 17:38
17:38 domm joined
flussence andreoss: looks like in the core that's done with nqp code... 17:39
17:41 silug left 17:42 n0tjack joined
RabidGravy so anyway, that's another yak down on my path to world domination 17:45
17:49 japhb joined
japhb . 17:49
17:49 brrt left
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 andreoss left
muraiki hihi 17:50
RabidGravy harr!
17:51 japhb left 17:53 ZoffixW joined
ZoffixW What is the opposite of .first? 17:54
dalek c: d793b51 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Str.pod:
add Str::trans
c: 4a4055e | (Wenzel P. P. Peppmeyer)++ | doc/Type/Str.pod:
Merge pull request #242 from gfldex/master

add Str::trans
timotimo ZoffixW: first( :end)
ZoffixW :|
timotimo um ...
doc.perl6.org/routine/first - the usage section there is *weird*
":FROM_END" ?!?!
ZoffixW m: my @a = <foo bar baz>; say @a.first :end, ' ', @a.tail 17:55
camelia rakudo-moar de2361: OUTPUT«baz (baz)␤»
ZoffixW hm, fair enough. Thanks, timotimo++
jnthn nine: o.O
17:55 dakkar left
abraxxa my num64 $value = 0; results in This type cannot unbox to a native number 17:55
why?
RabidGravy it's an int 17:56
gfldex m: say 0.WHAT;
camelia rakudo-moar de2361: OUTPUT«(Int)␤»
jnthn Need 0e0 for a num literal
RabidGravy try "my num64 $value = Num(0)"
or what jnthn said
[Coke] m: my num64 $v = e0e;
camelia rakudo-moar de2361: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8hCGxQSHBU␤Undeclared routine:␤ e0e used at line 1␤␤»
17:57 japhb joined
[Coke] m: my num64 $v = 0e0; #hee 17:57
camelia ( no output )
abraxxa ok
flussence nine: here you go: gist.github.com/flussence/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
abraxxa Undeclared routine: 17:57
e0e used at line 801
masak abraxxa: 0e0
abraxxa [Coke] mistyped
masak yes
and then typed it right :) 17:58
timotimo abraxxa: damn, my recent code doesn't seem to catch that!
m: my Num $v = 0;
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…»
abraxxa i have to go
masak abraxxa: \o
abraxxa Oracle returns SQLT_NUM which is it's internal NUMBER format
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.
i'm trying to rebind it as float
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␤␤»
abraxxa but enough for today, bye!
ZoffixW .last is just itching to exist :)
especially 'cause @a[*-1] is weird
timotimo well, .last is for matching stuff
abraxxa yes, please! 18:00
18:00 pmurias left
abraxxa i was wondering yesterday about that too 18:00
timotimo and .[*-1] is for getting the actual last element
ZoffixW Matching stuff?
abraxxa HAHA
it works
timotimo yeah, you give a matcher to .first
abraxxa if $dty eq SQLT_NUM { $dty = SQLT_FLT }
timotimo if you want the first element/s or the last element/s, you need to use .head and .tail
abraxxa eat your internal data format Oracle!
first and last reads better imho
but there is a first
that why you immediatly start looking for a last in the docs 18:01
at least i did
ZoffixW m: my @a = <foo bar baz>; say @a.first :end, ' ', @a.last.WHAT
camelia rakudo-moar de2361: OUTPUT«Method 'last' not found for invocant of class 'Array'␤ in block <unit> at /tmp/NmpspfteSg:1␤␤»
ZoffixW m: my @a = <foo bar baz>; say @a.first :end, ' ', @a.tail.WHAT
camelia rakudo-moar de2361: OUTPUT«baz (Seq)␤»
18:01 yqt left
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)␤»
ZoffixW m: sub foo { my @a = [<foo bar baz>, <foo bar baz>, <que foo mm>]; return @a }; say foo.tail[0].first
camelia rakudo-moar de2361: OUTPUT«que␤»
ZoffixW yeah, that's not as nice
timotimo ah 18:02
because .tail and .head always give lists, yeah
dalek ast: de38b0b | jnthn++ | S32-io/IO-Socket-Async-UDP.t:
Basic tests for UDP sockets.
timotimo i could kind of see a .only method that gives you "the only element" or dies if there's multiple
lucasb timotimo: interesting idea... unpacking a 1-elem list, you mean? 18:03
ZoffixW I could kind of see a non-destructive push/pop
timotimo jnthn: "used to check listener received data, and to make" ?
lucasb could also be named ".just"
timotimo lucasb: yeah
jnthn love!
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.
jnthn ...what on earth was I thinking :)
dalek ast: 2482f11 | jnthn++ | S32-io/IO-Socket-Async-UDP.t:
Finish a comment; timotimo++.
18:04
masak jnthn: dude, you wrote a UDP test, and the words ended up in the wrong order? :P 18:05
ZoffixW hahaha
18:05 domm left
masak jnthn: some words didn't arrive at all! 18:05
dalek p: ed362a9 | jnthn++ | / (2 files):
Map async UDP socket ops on Moar backend.
18:06
jnthn masak: lol
That's oddly appropriate :P
.oO( I'd tell you a UDP joke, but you wouldn't get it. )
ilmari and some letters
18:06 domm joined
ilmari "Unhelpful Dataloss Protocl" 18:06
jnthn hah 18:07
I'll call it an autopun rather than poor typing :P
masak just insist that you did send that letter
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.
masak ZoffixW: you can also get consistency by defining your own lexical subs. 18:08
jnthn .[*-1] is another option
leont appreciates UDP for some purposes, but it's usually used unnecessarily :-/
jnthn leont: Writing these tests is the first time I've used it :P
lucasb ZoffixW: I agree that the API is strange :(
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"
leont I wish SCTP had gotten popular, it combines many of the nice things about TCP with nice things about UDP
timotimo like OSC is almost always moved through UDP sockets
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
dalek kudo/nom: 78cfbc1 | jnthn++ | t/spectest.data:
Annotate test with moar.

Since it won't yet pass on JVM.
leont timotimo: why would it? Those routers only have to deal with IP, right? 18:11
Ah, I guess the multi-homing thing
timotimo i forgot why. it was long ago
ah, right, sctp has that, too
quite ambitious
18:11 domm left, znpy joined
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
packet
18:12 domm joined
timotimo yeah 18:13
i heard that in practice UDP is reliable enough for pretty much everything?
leont It depends
UDP over local ethernet is typically fine, yes
timotimo absolutely 18:14
18:14 brabo left
ZoffixW masak, not really. 18:15
Well... I guess I should say "that's not really a viable solution" 18:16
Especially since .last is currently not defined.
I see a nice symmetry of making .last be same as .first :end
lucasb and @a.last(:start) would mean the same as .first :D 18:17
18:17 mtj_ left
lucasb or maybe .last(:begin) 18:17
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:18
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
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
Wchester how install perl 6?
ZoffixW Wchester, see rakudo.org/how-to-get-rakudo/
Wchester tanks (y) 18:21
ZoffixW I mean, why in the world would I want a Seq of one element
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
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
18:24 FROGGS joined 18:25 espadrine left, prammer_ joined, prammer left, prammer_ is now known as prammer
ZoffixW I guess this kind'f harks back to the fact that Perl 6 is not fluent-interface-friendly 18:25
At least out of the box.
(and this API I'm porting is a fluent interface)
ZoffixW & # meeting 18:26
18:26 llfourn left 18:27 Wchester left, brabo joined
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:27
dalek kudo/nom: d2b89b1 | jnthn++ | / (2 files):
Add UDP support to IO::Socket::Async on Moar.
18:28
kudo/nom: fc24ca9 | jnthn++ | t/spectest.data:
Run S32-io/IO-Socket-Async-UDP.t.
18:29 Actualeyes left
RabidGravy I was going to say radius was one of the biggest udp things out there 18:30
stmuk and DNS
RabidGravy and dns
and syslog
timotimo i think todays advent calendar post deserves to be signal-boosted a bit more 18:31
jnthn And another xmas RT falls :)
RabidGravy jnthn++ # cooking on gas
lichtkind so perl 5 with all the modules loaded was slower than perl 6?
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*
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... :-) &
RabidGravy oh. I worked for an ISP for a *long* time 18:34
El_Che RabidGravy: did you move to radsec and the like? 18:35
RabidGravy nah 18:36
18:36 koo8 left, lucasb left
stmuk diameter was radius++ 18:37
I believe that's part of 4G
18:37 noganex joined
dalek kudo/nom: 219ec51 | TimToady++ | src/Perl6/Optimizer.nqp:
mark locationless messags as DISLOCATED
18:40
kudo/nom: 9e53fa9 | TimToady++ | src/Perl6/Actions.nqp:
audit of .ast calls for wantedness
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
RabidGravy but more importantly for me I can make the OSC library now without binding liblo :)
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
stmuk I'd expect ISPs still use radius
TimToady that should take care of most of the remaining spurious "Useless use" messages, but if you see one, please let me know
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
RabidGravy (except when the ascend goes on fire)
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.
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
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.
jdv79: no, there's just a couple of use statements missing 18:44
jdv79 oh?...
El_Che stmuk: radiator is non-threaded perl 5, so it needs a good architecture to be scalable
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
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
leont: doesn't sound like you're setting properties there?
leont ? 18:47
nine leont: ZoffixW's complain is that Perl 6 doesn't support Foo.new.property1('value').property2('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
(unless my understanding of fluent interface is wrong, which is quite possible 18:50
18:50 hankache joined
jdv79 nine: sorry bout that. jumped the gun. it seemed similar enough to be related at first glance. 18:50
good stuff. thanks!
18:52 CIAvash left, zacts|pi joined
nine jdv79: happened to me, too. That's how I knew what you meant :) 18:53
leont: Yes. but since it's probably methods, you wrote, the return self; at the end is not an issue. 18:55
gfldex m: my %h; %h{1,'a'} = 42; dd %h; 18:57
camelia rakudo-moar 9e53fa: OUTPUT«Hash $var = ${"1" => 42, :a(Any)}␤»
gfldex should dd know about multi-dim hashes?
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 19:01 ajs_ joined
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␤»
n0tjack m: my @ap = (name => 'value', name2 => 'another value', etc => '3rd'); my %h = @ap.hash; say %h;
camelia rakudo-moar 9e53fa: OUTPUT«etc => 3rd, name => value, name2 => another value␤» 19:02
RabidGravy so, 478 modules from 110 authors not bad 19:05
dalek p: a2fe8eb | TimToady++ | src/QAST/Node.nqp:
include annotations in dump
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
nine timotimo: and that would be much better than $foobar.update(:attr1<hey>, :attr2<boo>) 19:07
timotimo you think so? 19:08
nine timotimo: absolutely not :) 19:09
timotimo well, it's what fluent interface means
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
then the user that wonts it can decide they want it
19:11 rindolf joined 19:12 zacts|pi left 19:13 spider-mario joined
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:15
19:23 llfourn joined, cpage_ joined 19:24 cpage_ left 19:25 domm left 19:28 llfourn left
Skarsnik hm, how I can undef an array? @array = Mu put Mu in @array[0] x) 19:29
19:29 mtj_ joined
timotimo you can @array = Empty 19:29
m: my @arr = <hi there how are you>; say +@arr; @arr = Empty; say @arr.perl 19:30
camelia rakudo-moar 9e53fa: OUTPUT«5␤[]␤»
timotimo m: my @arr = <hi there how are you>; say +@arr; @arr = (); say @arr.perl
camelia rakudo-moar 9e53fa: OUTPUT«5␤[]␤»
Skarsnik m: my @arr = <hi there how are you>; say +@arr; @arr = Empty; say @arr.defined
camelia rakudo-moar 9e53fa: OUTPUT«5␤True␤»
FROGGS Skarsnik: it is always defined 19:31
at least when there is an @-sigil
Skarsnik m: my @arr; say @arr.defined
camelia rakudo-moar 9e53fa: OUTPUT«True␤»
Skarsnik m: my @arr; say @arr
camelia rakudo-moar 9e53fa: OUTPUT«[]␤»
RabidGravy m: my @a = <a b c>; @a := Array; say @a.defined
camelia rakudo-moar 9e53fa: OUTPUT«False␤»
RabidGravy cheating of course
FROGGS ohh, binding, yeah
Skarsnik m: my @arr; say "hello" if @arr; 19:32
camelia ( no output )
Skarsnik m: my @arr; @arr = (); say "hello" if @arr;
camelia ( no output )
19:33 jevin joined
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
camelia rakudo-moar 9e53fa: OUTPUT«[Any]␤»
vendethiel sanity++
El_Che ok, Empty then
timotimo vendethiel: if you want to have class names directly in a scope, you can still import them, no?
vendethiel timotimo: sorry? like my \X = A::B::C::X? 19:36
timotimo m: use Test; import Test;
camelia ( no output )
timotimo (not a good example)
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
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␤␤»
vendethiel m: module A { class B {}; }; use A; import A; say B.perl
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:37 cdg left
Skarsnik hm, did someone fix is-deeply? 19:38
19:38 ready_to_help left
Skarsnik in Test 19:38
RabidGravy m: module A { class B is export {}; }; import A; say B.perl
camelia rakudo-moar 9e53fa: OUTPUT«A::B␤»
timotimo what impact does nines commit that fixes "resolve_repossession_conflicts" have? is there some example i could put into the weekly? 19:39
nine timotimo: it fixed this: 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
ah, excellent!
lizmat ++timotimo # P6W
nine timotimo: JDV::Foo::Bar disappeared after loading JDV::Foo::Baz
Skarsnik RabidGravy, that will work with use too
lizmat contracted some bad flu in the UK and goes back to bed
timotimo ugh! flu is terrible
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 ;-)
timotimo i hope you'll recover much sooner than i did!
RabidGravy: if you install a Repo that DTRT, you can use with no file :)
RabidGravy sure, but too much typing for an example here ;-) 19:43
timotimo :)
with a custom repo, we can build a FatPacker quite easily, i think
maybe someone wants to do that and pump it out as an advent post for a day that already has another advent post 19:44
ZoffixW back 19:45
19:45 yqt joined
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
nine, leont, but my complaint is that I have to do $obj.item('foo').first.child-nodes.tail[0].content, which is inconsistent or $obj.item('foo').head[0].child-nodes.tail[0].content, which is silly. And this is similar to how the aforementioned given { } example is a recommended substitute for method chaining
But don't mind me much... I like to complain about things
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 labster left
RabidGravy and to my mind it militates somewhat against easy refactoring 19:52
ZoffixW I wrote chains more a screenful long 19:53
Skarsnik x)
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: metacpan.org/source/ZOFFIX/XTaTIK-...nder.t#L49
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
So my bad.
19:55 labster joined
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␤»
ZoffixW I can live with that
(Perl 6)++
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
camelia rakudo-moar 9e53fa: OUTPUT«baz␤baz␤»
ZoffixW ouch
lizmat jnthn: gist.github.com/lizmat/5645d9a47b2c3b112487 # UDP test fails on OS X
really off to bed &
Skarsnik oh self.first: end to have the last? 20:00
ZoffixW Yeah
or .tail[0]
20:00 darutoko left
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.
nine Is there something like dd for NQP? 20:03
20:04 ZoffixW left 20:06 prammer left, prammer_ joined 20:10 yqt left
FROGGS nine: not that I'm aware of 20:11
20:12 vendethiel- joined, prammer_ left
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
nine: and I've deleted all precomp things but it recreates the old version it seems
20:13 vendethiel left
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
<prefix>/install/share/perl6/sources/ contains both the new and the old source file! 20:16
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:17
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
aha
timotimo TimToady: maybe you want to have modulus arithmetic in a scope
nine FROGGS: you can remove install/share/perl6 and only need a make install afterwards 20:19
FROGGS nine: thank you
nine Of course we may revise that decision to use a git describe version...
20:20 hankache left
nine s/may/must/ 20:20
s/must/absolutely have to because it's insane/
20:20 raiph left
Skarsnik And I finished my work on DBIish :) 20:20
FROGGS damn, implementing Pointer.malloc isnt that easy 20:23
Skarsnik call it alloc so it can be changed? 20:24
FROGGS looks at the size_t PR
20:24 pdl joined
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
Skarsnik Oh right, you don't have it in NC itself? 20:25
20:26 balazs joined
nine Ah bootstrapping...always so much fun 20:26
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
timotimo: it is the new @*INC :o)
timotimo oh?
FROGGS I think so 20:28
timotimo so you don't just set $*REPO any more?
20:28 virtualsue joined
FROGGS shouldnt you use 'use lib' anyway? 20:28
timotimo if you want a custom VerySpecialRepo, you can't, right?
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'
camelia rakudo-moar 9e53fa: OUTPUT«===SORRY!===␤No CompUnit::Repository known by 'Foo::Bar'␤»
timotimo oh!
nice.
FROGGS dunno if there is a way to register the short-id
timotimo probably 20:30
nine FROGGS: not yet, but there's plans
FROGGS :o)
timotimo there's still many low-hanging fruits, eh?
FROGGS Skarsnik: sounds sane
timotimo m: use Unknown::Module
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…»
timotimo like the :ver<True>:auth<True>:api<True> thing
that could be kicked out
Skarsnik should it be use lib '#/tmp#Foo::Bar' ?
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
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.
timotimo: the plan is to move all module loading code out of there. That's the responsibility of the repository chain starting at $*REPO
RabidGravy ie 20:32
Useless use of "\\n\\t*$_" in expression "\\n\\t*$_" in sink context
- QAST::Op(call &infix:<~>) \\n\\t*$_
- QAST::Want
- QAST::WVal(Str)
- Ss
- QAST::SVal(\n\t*)
- QAST::Op(callmethod Stringy)
- QAST::Var(lexical $_) $_
Skarsnik There is in Panda?
20:32 test joined
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
20:33 test left
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
ajs_ That seems really bulky for creating an iterable return value. 20:34
timotimo RabidGravy: ah, yeah, TT must have left a bit of that in there by accident 20:35
he used optimization level 4 for "give out extra debugging info"
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
20:36 silug joined
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
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 :)
nine timotimo: that's what I hope for :)
Same with the annoying undefined value warning in panda ;) 20:39
RabidGravy where does that come from, I thought it was in run(...) or something but can't reproduce 20:40
timotimo nine: yeah, that is really annoying. 20:42
20:43 maddingu1 joined 20:45 maddingue left
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)]␤»
gfldex is => supposed to bind on such state variables?
20:46 domm joined
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)]␤»
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)]␤»
masak gfldex: you're probably pushing a container when you just write it like $i
gfldex: containers are very confusing. they lead to action at a distance :)
20:47 labster left
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:48 virtualsue left
gfldex i'm asking because i would like to know if i need to rakudobug or to rakudodoc 20:50
RabidGravy I'd say it would be the behaviour I would expect 20:51
but I may be in a minority
timotimo i'd say rakudodoc it
20:52 mohij left
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?
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
vendethiel-: Nothing further yet, so it still hangs in the balance :) 20:57
20:57 sno left 21:01 virtualsue joined
dalek c: 72fadc1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod:
document implicit binding of state variables
21:02
c: 33b41a6 | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod:
Merge pull request #243 from gfldex/master

document implicit binding of state variables
jnthn .tell lizmat Wish you a swift recovery!
yoleaux jnthn: I'll pass your message to lizmat.
masak .tell lizmat aye; de-flu soon! 21:04
yoleaux masak: I'll pass your message to lizmat.
21:04 geraud joined
masak .oO( does structural relationships between .tells mean that they form an enriched category? ) 21:05
21:05 snarkyboojum_ joined 21:06 patrickz joined
timotimo hyper + grep are still broken, right? 21:07
m: (^20).hyper.grep(* %% 2).say 21:08
camelia rakudo-moar 9e53fa: OUTPUT«()␤»
timotimo m: (^20).hyper.map(* %% 2).say
camelia rakudo-moar 9e53fa: OUTPUT«HyperSeq.new␤»
timotimo m: (^20).hyper.map(* %% 2).list.say
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 21:09 rindolf left
timotimo i'm having a hard time coming up with a succinct description of TimToadys work on "thunkyreduce" 21:11
RabidGravy play that thunky music white boy 21:12
21:13 mohae joined 21:15 hudo joined 21:17 raiph joined
timotimo looking at the tests in roast helps a bit 21:18
masak timotimo: probably hard because "thunks" are not in the common vocabulary. 21:20
timotimo: perhaps a very brief (and mostly inaccurate) description of thunks would help set the stage?
jnthn "The compiler writes the curly braces so you don't have to!"
masak jnthn++
FROGGS I always thought "thunk" is about a kind of sound :o) 21:21
21:22 bjz_ left, snarkyboojum_ left
FROGGS probably what a tee bag does when you drop it 21:22
21:22 labster joined, aindilis joined
timotimo masak: sure 21:22
masak FROGGS: is a "tee bag" something that one uses in golf? :P 21:23
FROGGS hehe
masak .oO( oh my god, it's full of balls )
FROGGS sorry, that was germish 21:24
21:24 kaare_ left
masak ich suspected das 21:24
FROGGS clearly I need a sandwich (for brain powers)
"ich suspectete das" (past tense) :P
21:25 muraiki left
RabidGravy thunk would be between donk and powm 21:25
FROGGS exactly
dalek kudo-star-daily: d5c01cc | coke++ | log/ (10 files):
today (automated commit)
21:26
timotimo i gave the examples of xx re-evaluating its LHS every time and && and friends short-circuiting
[Coke] think, thank, thunk. </grinch> 21:28
grondilu tried to improve permutations with some nqp code. gist.github.com/grondilu/18a2f01d76677de1a7e3 A bit disappointing. Not much faster. 21:29
masak ah, "suspectete" -- main bad.
mein*
21:29 pmurias joined
timotimo grondilu: if you use my int @permutations; and _i variants of atpos and bindpos, maybe that helps? 21:30
21:31 prammer joined
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
21:31 rurban joined, molaf left
grondilu could nto quite use _i variant. Got some weird error. 21:32
I shoudl use nqp::bitxor_i though
timotimo did you try my int @permutations, though?
oh
i mean
did you use nqp::list_i() ?
21:32 Skarsnik left
grondilu I basically tried to copy what is done in combinations 21:33
It is clearly faster though. But not as much as I hoped.
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␤␤»
timotimo how much faster?
yeah, nqp::list_i is a very, very basic type
it doesn't have (support?) methods
grondilu let me run both versions for n = 7 21:35
timotimo that'll be over much too quickly to measure, no?
grondilu not on my Pi :)
timotimo ugh!
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
timotimo jaw drops
grondilu well, feel free to try it on your machine: gist.github.com/grondilu/18a2f01d76677de1a7e3 21:37
without nqp: real 0m50.872s
TimToady is going nuts right now trying to prevent "{$stuff}" from thinking it's a bare block and declaring itself sunk prematurely...
grondilu so as I said, disappointing.
21:37 domm left 21:38 domm joined
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.
dalek p: 94047ba | (Sylvain Colinet)++ | src/vm/ (2 files):
Add size_t and bool native type, bool is standard in C99
p: a51569c | FROGGS++ | src/vm/ (2 files):
Merge branch 'master' of github.com/Skarsnik/nqp into Skarsnik-master
p: c0a52db | FROGGS++ | src/vm/jvm/ (2 files):
handle size_t and bool on jvm
p: 30d8359 | FROGGS++ | tools/build/MOAR_REVISION:
bump moar for size_t/bool
timotimo nqp::bindpos($!permutation, $i, +$i) <- that line looks suspect 21:39
the + is just left over from putting the ++$i outside the bindpos?
grondilu no I think the + is to avoid passing a reference. 21:40
timotimo oh
dalek kudo/nom: fa1842c | (Sylvain Colinet)++ | / (5 files):
Add native bool and size_t type, bool is in C99 standard
kudo/nom: 0447386 | FROGGS++ | / (5 files):
Merge branch 'nom' of github.com/Skarsnik/rakudo into Skarsnik-nom
kudo/nom: 61f085c | FROGGS++ | / (3 files):
map bool/size_t, and bump nqp/moar
21:40 bjz joined
timotimo returning a clone of a nqp::list isn't quite right, either. i suppose it has to be at least hllized 21:40
though our codegen may do that for you already
21:41 domm left
grondilu you have to return a clone, otherwise all your permutations will be the last one in the end. 21:41
timotimo yes
i agree on the clone, i don't agree on returning an nqp::list
grondilu I don't know. Combinations does that. 21:42
timotimo oh?
then i suppose it's right; sorry for complaining :)
you could activate MVM_SPESH_LOG=foo.txt and look for 'permutations' in there 21:43
and see if there's many suspect pieces of bytecode that we emit
[Coke] hurls news.perlfoundation.org/2015/12/per...t-gra.html for the community to comment on.
timotimo i'm still in the middle(*) of writing the advent post
21:43 rindolf joined, bjz left
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' : gist.github.com/usev6/480ef340281ab3fb8df2 21:44
21:44 zengargoyle left
bartolin_ is that (no '.' in $REPO in the 2nd case) a known bug? 21:44
21:45 zengargoyle joined, bjz joined
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 :/
TimToady: at least I don't see such a warning ... 21:47
jnthn TimToady: I guess you already ran across the bare_block annotation?
We handle it up in statement
(action method)
TimToady: You may want to add the "yes sink it" there or so
21:51 pdl left, prammer left
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
jnthn: I mean, it needs to be adopted to not expect a 6.\d.\d version I guess, but besides that it should work
jnthn: so you can use it to e.g. mark tests/files as conjectural 21:53
21:53 virtualsue left
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:53
21:55 bjz left
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
moritz nine: that way you can use the same test harness, but run fewer test files
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
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
nine moritz: oooh..thanks! 21:59
FROGGS jnthn: github.com/perl6/roast/blob/master/fudge#L86
nine bartolin_: does the error go away for you on repeated runs? That was the behavior I've seen previously
bartolin_ nine: oh, you're right 22:00
FROGGS jnthn: a "#?v6+ * skip 'conjectural'" would do
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"?
bartolin_ nine: changing behaviour with second run reminds me of RT #126823
jnthn FROGGS: Once we declare tests part of 6.c they should be immutable.
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, skids left
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
jnthn: btw, I've broken the moarvm windows build and am working on it
jnthn FROGGS: Cool, hopefully it works by the morning ;) 22:04
bartolin_ nine: yes, it's the other way around with RT #126823
jnthn won't be doing anything more tonight :)
FROGGS jnthn: it will :o)
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.
FROGGS jnthn: do you envision a tool that highlights things? 22:06
bartolin_ nine: do you have an idea what's wrong here: gist.github.com/usev6/480ef340281ab3fb8df2 (2nd evaluation seems to miss a dir from $*REPO)
22:07 leat1 joined
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
then let's fudge it, and keep that state in a branch 22:09
so we can run it later to check conformance
_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)␤»
nine bartolin_: I may have
jnthn FROGGS: That'd be another way to handle it, yes
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 Zoffix left
bartolin_ nine++ 22:11
22:11 Zoffix joined
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), } ;
camelia rakudo-moar 9e53fa: OUTPUT«1␤2␤3␤»
jnthn Want to .list rather than .flat really 22:13
A hash, like an array, holds values in Scalar containers
_nadim jnthn: I expected the element to already be a list
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
jnthn So they're items
No, it's an itemized list
_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
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…»
nine That's the short version ^^^
bartolin_ nine: ah!
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.
jnthn o/
nine Good night jnthn!
FROGGS gnight jnthn
bartolin_ . o O ( fixing that bug twice already: drei sind alle guten Dinge!? ) 22:16
FROGGS aller* :o) 22:17
bartolin_ nine: thanks for looking and explaining
timotimo gnite jnthn!
bartolin_ FROGGS++ *g*
22:18 snarkyboojum_ joined
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:18
22:19 espadrine joined 22:20 lichtkind left
_nadim m: sub S(%o) { for %o<x>.list -> $x { $x.perl.say } } ; S { } ; 22:20
camelia rakudo-moar 9e53fa: OUTPUT«Any␤»
dalek p: 60b9e20 | FROGGS++ | tools/build/MOAR_REVISION:
bump moar to unbreak build
22:21
_nadim Bleahhh! ^^, seriously, P6 is full of surprises, and it's fun, but sometimes one wonders!
dalek kudo/nom: 3b4964b | FROGGS++ | tools/build/NQP_REVISION:
bump nqp/moar to unbreak build
22:22 TEttinger joined
_nadim Does anyone know why a list that doesn't exist has an element? 22:22
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
_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?
FROGGS m: say Any.elems
camelia rakudo-moar 9e53fa: OUTPUT«1␤»
Zoffix :S 22:25
Oh right
22:25 regreg left, jnthn left
_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
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"
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: en.wikipedia.org/wiki/List_of_mult...s#December 22:27
FROGGS _nadim: do you care about type objects? 22:28
_nadim as a metaphysical question or as something in the code I write? 22:29
FROGGS _nadim: the code you've shown
_nadim yes, the elements are roles 22:30
nine _nadim: ($match.hash // {}).elems
_nadim nine: thanks, better than having to write (1 == $a.keys && $a{$a.keys[0]} ~~ Nil) || 0 == $a.keys
FROGGS m: my %o; say %o<x>.list; say %o<x>.grep(*.defined).list 22:31
camelia rakudo-moar 9e53fa: OUTPUT«((Any))␤()␤»
FROGGS though, if you have roles (type objects) in there that won't work out
_nadim still a good thing to know
FROGGS because these are not defined by definition
nine m: my %o; say (%o<x> // ()).elems; 22:32
camelia rakudo-moar 9e53fa: OUTPUT«0␤»
nine m: my %o = x => (1,2); say (%o<x> // ()).elems;
camelia rakudo-moar 9e53fa: OUTPUT«2␤»
FROGGS m: my %o; $o<x> = IO; say (%o<x> // ()).elems;
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;␤»
FROGGS m: my %o; %o<x> = IO; say (%o<x> // ()).elems;
camelia rakudo-moar 9e53fa: OUTPUT«0␤»
FROGGS see
_nadim then // it is 22:33
FROGGS m: my %o; say %o<x>.list; say %o<x>.grep({ $_ =:= Any }).list # ugly but most accurate
camelia rakudo-moar 9e53fa: OUTPUT«((Any))␤((Any))␤»
_nadim one ugly line less, the day ends well
FROGGS err
m: my %o; say %o<x>.list; say %o<x>.grep({ $_ !=:= Any }).list # ugly but most accurate
masak /o/
camelia rakudo-moar 9e53fa: OUTPUT«((Any))␤()␤»
FROGGS gnight #perl6 22:34
22:34 FROGGS left
stmuk timotimo: I've more or less finished if you have feedback 22:34
_nadim night!
22:34 brabo left
timotimo stmuk: i don't have lots of feedback yet 22:35
not on the draft :)
just that it looks unfinished
Zoffix: you were trolling, right? of course i meant perl6 development related stuff :) 22:36
Zoffix timotimo, oh, sorry
timotimo :)
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 :/
timotimo nah
just wanted to point out anything important at the end of my weekly post
22:38 ajs_ left 22:39 sno joined
stmuk I can add the single arg rule I guess 22:40
timotimo oh, that would be important
22:41 snarkyboojum_ left, brabo joined
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
GAH
22:43 xfix left
stmuk hmmm append isn't in S07 I don't think 22:43
Zoffix timotimo, fwiw, the font size seems outta whack: i.imgur.com/KxbZWu0.png 22:45
timotimo p6weekly.wordpress.com/2015/12/14/...mutations/ - now you can give me feedback
Zoffix aha :)
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
>:(
El_Che are lizmat's slides up from the LPW? 22:47
22:47 lucasb joined
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
Zoffix timotimo, so is "finish line of todays advent calendar " should be "today's" on the line blow
*below
timotimo, erm... advent calendar? :)
Zoffix does a double-take at the URL
22:51 vendethiel- left
timotimo hum? 22:53
Zoffix: huh? i've been training myself to not put an apostrophe for genitives ... 22:54
does it turn out that it's right for german and wrong for english and i'm just doing it perfectly in reverse!?
Zoffix: double tack at the url? 22:55
what's wrong?
oh!
Zoffix :D
lucasb oh... /2015/12/14/2015-51-... :) 22:56
wait, it's not this. that is just like the other urls
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
s/which two camps/with two camps/
22:57 cdg left 22:58 rindolf left
Zoffix lucasb, I meant I did a double take to see that I was indeed reading the Weekly and not the Advent blogs 22:59
timotimo and here i thought "'s is always a contraction" was some kind of rule or something 23:00
lucasb Zoffix: ah, ok :)
Zoffix timotimo, well, technically it still is: en.wikipedia.org/wiki/English_poss...ve#History 23:02
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
or rather yes to Zoffix nah to timotimo 23:04
jdv79 Zoffix, our very own grammar nazi:)
RabidGravy a contraction of <thing> is usually 23:05
Zoffix \o/
RabidGravy nighty night 23:06
Zoffix night
23:07 Zoffix left 23:09 hudo left 23:10 RabidGravy left
jdv79 timotimo: that is slightly amusing that you reversed the german and english posessive. everyone understands though. 23:11
timotimo++ 23:12
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
jdv79 :) 23:14
23:15 khisanth_ is now known as Khisanth 23:16 cdg joined 23:18 cdg left 23:25 spider-mario left
masak 'night, #perl6 23:35
23:50 espadrine left, jsimonet left 23:52 raiph left
lucasb m: say (while $++ < 5 { 42 }) 23:53
camelia rakudo-moar 9e53fa: OUTPUT«5␤»
lucasb m: say (42 while $++ < 5)
camelia rakudo-moar 9e53fa: OUTPUT«5␤»
lucasb ^^ Were these supposed to be list comprehensions? 23:54
23:54 skids joined
lucasb m: say (rand while $++ < 5) 23:55
camelia rakudo-moar 9e53fa: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|62516800>}|67840856) ... }␤»
lucasb ^^ strange that if you change the expression, it returns the "<" operator
23:56 Psyche^ joined
stmuk OK I've published a GLR post on perl6advent.wordpress.com/ 23:56
23:57 pmurias left
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
or tomorrow morning
jdv79 a glr post or the glr post? 23:59
stmuk uh?