»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
viki kyclark, well, "zero or more", so it matched zero 00:13
ugexe m: say "oobar" ~~ /o*/; # seems like a bug to me 00:13
camelia rakudo-moar 8c3548: OUTPUT«「oo」␤»
viki Doesn't to me. FWIW, there's a ticket for that, with a discussion.
seatek: there's nothing weird with that. Millions of schoolchildren do basic mathematics daily and know that power is done before the negative. 00:14
viki is unreasonably miffed with so many people realizing today that -2² is -4 and not 4. 00:15
viki is unreasonably miffed that so many people thing -2² being -4 is an artefact of a language or "everything is an object" 00:15
*think
MasterDuke viki: "zero or more" for sure, but greedily, so it seems odd to me. 'o*?' i would definitely expect to match zero 00:16
do you know the ticket #? 00:17
viki MasterDuke: but the first thing is not "o", it's "f", so it attempts to match zero, succeeeds, tries 1, fails, and returns nothing
I looked at a couple with REGEX tag but didn't find it. 00:18
ugexe m: say "fooooo" ~~ /o*$/; # if you let it be greedy until the end it captures them
camelia rakudo-moar 8c3548: OUTPUT«「ooooo」␤»
viki Sure, you anchored it. 00:19
m: say "fooooo" ~~ /'f' o*/;
camelia rakudo-moar 8c3548: OUTPUT«「fooooo」␤»
viki MasterDuke: fwiw, it was something about grammar tokens with * on them and then there was a much older ticket with a full discussion on this and how it differs from Perl 5 00:20
MasterDuke hmm, wonder how well RT's search handles '*' 00:21
viki MasterDuke: might be this one: rt.perl.org/Ticket/Display.html?id...et-history
m: say 'a' ~~ m/''*/
camelia rakudo-moar 8c3548: OUTPUT«Memory allocation failed; could not allocate 979304448 bytes␤»
viki eye 00:22
MasterDuke i've seen that ticket referenced before, don't remember why though... 00:23
ugexe m: say "fooooo" ~~ /f ** 0 o/; # how does this work? 00:32
camelia rakudo-moar 8c3548: OUTPUT«「o」␤»
ugexe work may or may not be surrounded by air quotes 00:33
hm, guess it must skip the f, *then* get the zero width match 00:34
seatek viki, ha! thanks :) I had no idea that's how actual math did it ;) 00:35
ugexe m: say WHAT 1..0; my @x = 1..0; say @x.perl; say "a" ~~ /a ** 1..0/; 00:42
camelia rakudo-moar 8c3548: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Empty range␤at <tmp>:1␤------> 031..0; say @x.perl; say "a" ~~ /a ** 1..07⏏5/;␤»
ugexe m: say WHAT 1..0; 00:42
camelia rakudo-moar 8c3548: OUTPUT«(Range)␤»
ugexe m: my $x = 1..2; say "aaaa" ~~ /a ** {$x}/ 00:46
camelia rakudo-moar 8c3548: OUTPUT«「aa」␤»
ugexe m: my $x = 1..0; say "aaaa" ~~ /a ** {$x}/
camelia rakudo-moar 8c3548: OUTPUT«「aaaa」␤»
ugexe possibly a bug
ugexe m: my $x = 2..1; say "aaaa" ~~ /a ** {$x}/ 00:59
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
ugexe 1..0 greedily matches all 'a', whereas 2..1 doesn't match anything
appears if the backwards range ends with a 0 it acts one way, and if it ends non-zero it acts another 01:02
AlexDaniel ugexe: this behavior is since 2014.08 01:04
AlexDaniel :/ 01:05
“Internal error: zeroed target thread ID in work pass” :(
ugexe m: say "aaaa" ~~ /a ** {Inf..0}/; # its at least aware of the Range's makeup inside {} in this instance 01:09
camelia rakudo-moar 8c3548: OUTPUT«Range minimum in quantifier (**) cannot be +Inf␤ in block <unit> at <tmp> line 1␤␤»
ugexe seems like it should catch {1..0} the same as 1..0 then 01:10
AlexDaniel j: say 'aaaa' ~~ /a ** {1..0}/ 01:16
camelia rakudo-jvm 8d357a: OUTPUT«「aaaa」␤» 01:17
AlexDaniel j: say 'aaaa' ~~ /a ** {2..1}/
camelia rakudo-jvm 8d357a: OUTPUT«Nil␤»
AlexDaniel m: say ‘aaaa’ ~~ /a ** {4..-5}/ 01:30
camelia rakudo-moar 8c3548: OUTPUT«「aaaa」␤»
AlexDaniel m: say ‘aaaa’ ~~ /a ** {5..-5}/
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
AlexDaniel another interesting thing 01:37
AlexDaniel ah no, it's fine 01:38
seatek cruel
AlexDaniel seatek: ok-ok 01:43
m: say ‘aaaa’ ~~ /a ** 1..3/
camelia rakudo-moar 8c3548: OUTPUT«「aaa」␤»
AlexDaniel m: say ‘aaaa’ ~~ /a ** 1..3.0/
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
AlexDaniel m: say ‘aaaa’ ~~ /a ** 1.0..3/
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
sufrostico hey there! 01:44
¿is there a way to do some web development in perl6?
if so, is there any tutorial in configure the apache? or just pure community knowledge? 01:45
AlexDaniel the amount of low-level hacks to make quantifiers work is amazing
seatek sufrostico, i think usually people proxy web servers back to a running perl instance 01:48
AlexDaniel benchable6: HEAD say ‘aaaa’ ~~ /a ** 0..5/ 01:49
benchable6 AlexDaniel, starting to benchmark the 1 given commit
AlexDaniel, ¦«HEAD»:0.1106
evalable6 AlexDaniel, rakudo-moar 5ac593e: OUTPUT«(exit code 1) ===SORRY!=== Error while compiling /tmp/OtSVtSs8xL␤Undeclared name:␤ HEAD used at line 1␤»
AlexDaniel ah, I remember
that's why it was shut down
bench: HEAD say ‘aaaa’ ~~ /a ** 0..5/
benchable6 AlexDaniel, starting to benchmark the 1 given commit
AlexDaniel, ¦«HEAD»:0.1107
AlexDaniel bench: HEAD say ‘aaaa’ ~~ /a ** 0..5000000/ 01:50
benchable6 AlexDaniel, starting to benchmark the 1 given commit
AlexDaniel, ¦«HEAD»:10.0005
AlexDaniel hehe 01:51
but don't worry, very large numbers are fast! 01:53
AlexDaniel bench: HEAD say ‘aaaa’ ~~ /a ** 0..9223372036854775296/ 01:53
benchable6 AlexDaniel, starting to benchmark the 1 given commit
AlexDaniel, ¦«HEAD»:0.1099
AlexDaniel ;)
sufrostico Just found P6W is that ready to run (very small non-critical web apps) 01:55
=
?
seatek m: say 'aaaa' ~~ /a ** 1.0.Int..3/ 01:56
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
seatek m: for 1.0.Int..3 -> $x { say $x } 01:57
camelia rakudo-moar 8c3548: OUTPUT«1␤2␤3␤»
seatek m: say 'aaaa' ~~ /a ** 1.0.Int..10/
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
seatek m: say 'aaaa' ~~ /a ** 1..10.Int/
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
seatek m: say 'aaaa' ~~ /a ** 1..10/ 01:58
camelia rakudo-moar 8c3548: OUTPUT«「aaaa」␤»
seatek sufrostico, I don't know - there are simpler ones there. I've been converting stuff to p6 to get to know it and haven't gotten to any web stuff yet. 02:00
sufrostico seatek, thanks... I'll try and come back :D 02:02
AlexDaniel ugexe: are you going to submit a bug report? 02:15
perlawhirl committable6: sub infix:<j>{$^l.comb.tail eq $^r.comb.head??(|$l,$r)!!|@};say [Xj] <te tt>,<fg et>,<wd td>; 02:32
committable6 perlawhirl, ¦«sub»: Cannot find this revision
perlawhirl committable6: 2016.04..2016.09 sub infix:<j>{$^l.comb.tail eq $^r.comb.head??(|$l,$r)!!|@};say [Xj] <te tt>,<fg et>,<wd td>; 02:33
committable6 perlawhirl, Too many commits (1206) in range, you're only allowed 1000
perlawhirl committable6: 2016.05..2016.09 sub infix:<j>{$^l.comb.tail eq $^r.comb.head??(|$l,$r)!!|@};say [Xj] <te tt>,<fg et>,<wd td>;
skids m: my $c = Channel.new; start { for (1,2,3) { sleep 1; "send".say; $c.send($_) }; $c.close }; my $w := $c.Array; $w.WHAT.say; for $w -> $a, $b? is raw { $a.say; with $b { $b.say; $b = 4 } }; $w.say; # When I read the code it looks like this should be lazy...but it ain't 02:35
camelia rakudo-moar 8c3548: OUTPUT«send␤send␤send␤(Array)␤1␤2␤3␤[1 4 3]␤»
skids m: my $c = Channel.new; start { for (1,2,3) { sleep 1; "send".say; $c.send($_) }; $c.close }; my $w := $c.list; $w.map: { $_.say; } 02:36
committable6 perlawhirl, «hit the total time limit of 180 seconds»
camelia rakudo-moar 8c3548: OUTPUT«send␤1␤send␤2␤send␤3␤»
skids m: my $c = Channel.new; start { for (1,2,3) { sleep 1; "send".say; $c.send($_) }; $c.close }; my $w := $c.Array; $w.map: { $_.say; }
camelia rakudo-moar 8c3548: OUTPUT«send␤send␤send␤1␤2␤3␤»
perlawhirl committable6: 2016.07..2016.09 sub infix:<j>{$^l.comb.tail eq $^r.comb.head??(|$l,$r)!!|@};say [Xj] <te tt>,<fg et>,<wd td>; 02:37
AlexDaniel committable6: 6c sub infix:<j>{$^l.comb.tail eq $^r.comb.head??(|$l,$r)!!|@};say [Xj] <te tt>,<fg et>,<wd td>; # usually you'll do this 02:39
it will run stuff on tags only
committable6 perlawhirl, «hit the total time limit of 180 seconds» 02:40
committable6 AlexDaniel, gist.github.com/87a587504017e4c580...78a038a626 02:40
AlexDaniel alright, well that's bisectable
AlexDaniel bisect: sub infix:<j>{$^l.comb.tail eq $^r.comb.head??(|$l,$r)!!|@};say [Xj] <te tt>,<fg et>,<wd td>; # usually you'll do this 02:40
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=5ac593e) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/e0ce811ab7e1be965e...efcaa34396
AlexDaniel, (2016-09-19) github.com/rakudo/rakudo/commit/96...8c22e356eb
AlexDaniel perlawhirl: is that what you wanted? :) 02:41
MasterDuke: 180 second limit for 1000 commits expects 0.18s per each commit, that's rather optimistic 02:42
skids wow does bisectable have lots of prebuilt trees? that was fast. 02:43
AlexDaniel skids: it has rakudo prebuilt on all commits since 2015.10 02:44
skids yikes.
perlawhirl AlexDaniel: ahh yes, i was confused
i wanted bisect
thanks
MasterDuke AlexDaniel: i thought 2015.07? 02:45
AlexDaniel ah yes, 2015.07 sorry
AlexDaniel it was actually much faster a few months ago, today we compress every build 02:45
MasterDuke and 180s for 1k commits is optimistic, think it should be longer? or fewer commits allowed? 02:46
AlexDaniel fewer commits allowed I think
like, half
dalek ateverable: 1dfa809 | MasterDuke17++ | Whateverable.pm6:
Reduce the number of commits allowed

With a default max time allowed of 180s, that only gave 0.18s for each commit.
02:48
AlexDaniel skids: it is actually not that surprising. Amount of space required is less than 50 GB. It takes less than a week to build it all from 2015.07 to current HEAD 02:50
AlexDaniel we can go all the way to the first days of rakudo on moar, but who wants to bisect that far? 02:51
we still build all the tags though
committable6: 2014.01 say 42
committable6 AlexDaniel, ¦«2014.01»: 42
AlexDaniel and you can use ‘all’ to run something on all releases and ‘6c’ to run something just from 2015.12 02:52
AlexDaniel committable6: all say ‘hello’ 02:52
committable6 AlexDaniel, gist.github.com/8a4caa7b404cc41188...53e5ce35e9
Herby__ o/ 04:09
m: our Str $key = 'ja123a'; say $key;
camelia rakudo-moar 8c3548: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot put a type constraint on an 'our'-scoped variable␤at <tmp>:1␤------> 3our Str $key7⏏5 = 'ja123a'; say $key;␤ expecting any of:␤ constraint␤»
Herby__ what's the reason for not allowing a type constraint on an 'our' scoped variable? 04:12
AlexDaniel Herby__: not relevant, but still: rt.perl.org/Ticket/Display.html?id=126449 04:28
Herby__ thanks 04:29
AlexDaniel in fact, the error message says that according to the parser it want a constraint in “where …” form (if I get it right) 04:30
m: our $key where { True } = 'ja123a'; say $key; 04:31
camelia rakudo-moar 8c3548: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot put a type constraint on an 'our'-scoped variable␤at <tmp>:1␤------> 3our $key where { True }7⏏5 = 'ja123a'; say $key;␤ expecting any of:␤ constraint␤ infix␤ …»
AlexDaniel but obviously that does not work too
b7j0c i can do a match in perl6 like: say so '123' ~~ m|\d+|; ... so why can't I do something like: say so '123' ~~ m|Int+|; 04:32
given that Int is a built in type and is something we could match (?) 04:33
related: is there a trait that can be used to make a built-in or user-defined type... "matchable" ? 04:34
geekosaur regex is a different language from perl6 04:35
Int is not defined in that language
AlexDaniel Herby__: this is the commit that added these messages github.com/rakudo/rakudo/commit/bf...fb6feb2b3d
geekosaur you can use `regex` and `token` to define new constructs in the regex language
AlexDaniel Herby__: given that it is May 2013, my guess is that there is no reason at all why that would have to work like this
Herby__: that is, nobody stumbled upon it before you 04:36
and that kind of makes sense, there is less need for “our” in perl 6
Herby__: so please submit a bug report
Herby__ AlexDaniel: thanks for digging into it. I stumbled onto it because I'm probably trying to use it incorrectly :)
b7j0c geekosaur: cool! I haven't looked into grammars so much yet, looks like I need to...thanks!
AlexDaniel well you can do crazy stuff like / (.*) <?{ try { Int.new($0); True } }>/ 04:39
I wonder if it works
m: say ‘25’ ~~ / (.+) <?{ try { Int.new($0); True } }>/ 04:40
camelia rakudo-moar 8c3548: OUTPUT«「25」␤ 0 => 「25」␤»
AlexDaniel m: say ‘abc’ ~~ / (.+) <?{ try { Int.new($0); True } }>/
camelia rakudo-moar 8c3548: OUTPUT«Nil␤»
AlexDaniel yeah, but I'd probably curse badly if I saw that in real code 04:41
Herby__ off for the night, thanks for info AlexDaniel 04:44
AlexDaniel but… but… a bug report? :)
Herby__ I've never submitted one, gotta look into how to do it :)
MasterDuke buggable: rakudobug 04:45
AlexDaniel huggable: rakudobug 04:46
huggable AlexDaniel, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs
kb_ Hi 05:08
I have a problem installing rakudo-star-2016.10
up to make it is OK
then "make install" fails on installing panda
more exactly at testing File::Find 05:10
or so:
cd modules/panda && sh -c "PATH=/opt/OSAGrakudostar/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/osix/bin /opt/OSAGrakudostar/bin/perl6-m bootstrap.pl" ==> Bootstrapping Panda ==> Installing panda from a local directory '/usr/src/packages/src/OSAGrakudostar/rakudo-star-2016.10/modules/panda' ==> panda depends on File::Find, Shell::Command, JSON::Fast, File::Which ==> Shell::Command depends on File::Find ==> Fetching File::Find ==> Building Fi
no such file or directory at gen/moar/m-CORE.setting:24539 (/opt/OSAGrakudostar/share/perl6/runtime/CORE.setting.moarvm:throw) from gen/moar/m-CORE.setting:36068 (/opt/OSAGrakudostar/share/perl6/runtime/CORE.setting.moarvm:result)
unfortunately it does not say what file it is missing :-( 05:12
geekosaur that got cut off. and please use some kind of pastebin. gits.github.com and dpaste.de are commonly used here 05:17
TEttinger gist.github.com 05:17
geekosaur whoops yes 05:20
(IRC has a 512 byte limit on messages, which is reduced by metadata like channel name and your nick. some clients are aware of this and split messages, others aren
kb_ Here you are: dpaste.de/zXoE 05:21
geekosaur t. yours, if it did split it, split it oddly
o.O I *think* that's a panda internal failure finding a test file? 05:23
huggable: rakudobug
huggable geekosaur, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs
geekosaur ^ file a bug please
the people who really know what's going on are mostly asleep right now, I think
kb_ OK, I will do so
Thanks!
geekosaur should really follow them... 05:24
kb_ the problem is there only if I do 05:51
perl Configure.pl --backend=moar --gen-moar --prefix /opt/OSAGrakudostar
--prefix
Do I need that
or can I simply move everything with cp? 05:52
moritz you can't 06:07
rakudo isn't relocatable :(
kb_ OK, thanks 06:21
masak has there been some movement in fixing the area that mst++ described, that we're doing installation stuff during configure? 06:47
andrzejku_ hello perl6 07:11
:)
DrForr Morning. 07:21
FROGGS_ masak: what's the reference? 07:34
masak FROGGS_: mst's YAPC::EU talk, IIRC. 07:35
it's on YouTube.
FROGGS_ ahh
will watch
FROGGS_ www.youtube.com/watch?v=j3r-lKlrrRg 07:48
FROGGS_ :S 08:01
masak FROGGS_: yes. pretty damning that a (very knowledgeable) Perl 5 dev looks at our toolchain and says "nope, don't do it that way, obviously" 08:09
DrForr w00t! 4/5 rating for my OSCON talk! (admittedly it's a sample size of one.) 08:19
FROGGS_ masak: well... it was obvious to us that we want only one installation path :o)
FROGGS_ masak: so when this is an assumption we have to give up, then the rest *is* obvious 08:20
masak I had kind of assumed that "only one installation path" was a design error that we had inherited from Parrot or something 08:24
FROGGS_ though it served as well for many years... 08:32
served us*
masak it has? I think I've only encountered it in the context of it causing people grief. 08:33
people who want to do non-trivial things with the installation. 08:34
pmurias masak: people being able to just 'cpanm Rakudo' instead of mess around with rakudobrew would be pretty sweat 09:00
FROGGS_ masak: but how many cases are these non-trivial things out of the infinite times the devs installed it without any problems? 09:42
masak: I'm just saying that was good doing it this way in the past... now we have users and not just devs so rakudo needs to change 09:43
viki LOUD NOISES! 10:48
FROGGS /ö\ 10:49
RubioTerra Hi, can anyone help me? What's the Perl6 equivalent to 'while (<>) { ... }'? 12:15
SmokeMachine____ I don't know if it's the right place to warn, but the download link to mac version of rakudo in rakudo.org page is broken... it points to rakudo.org/downloads/star/rakudo-st...016.10.dmg but the file is in rakudo.org/downloads/star/rakudo-st...Sierra.dmg
iH2O theres probably not enough mac users to make a difference anyway 12:16
lizmat RubioTerra: for lines { } 12:17
RubioTerra Thanks, lizmat! 12:18
lizmat stmuk_ : ^^^
RubioTerra: please note the default is to chomp
RubioTerra OK.
lizmat m: say for lines
lizmat oops: 12:19
m: .say for lines 12:20
viki SmokeMachine____: fixed (cc stmuk_)
lizmat hmm.... what happened to camelia ? 12:20
viki m: say 'lag' 12:20
viki Oh. The page link doesn't use the /latest URLs :/ 12:22
viki Fixed that too. But those (and anything else referring to latest releases) really should use the /latest URLs so we only have to update those in one place. 12:25
moritz stanley: it's too early for a prognoses; if you're curious, sign up to the mailing list for updates 12:26
iH2O perl on mac is doubly cultish 12:27
dalek c: 250d97c | coke++ | doc/Language/5to6-perlvar.pod6:
Avoid confusing confusingly.
12:29
c: 46bf352 | coke++ | doc/Language/ (2 files):
for #993 - fix instances of Perl[56]

that should have a non-breaking space.
viki iH2O: "cultish"? At least one of the core devs uses mac 12:30
iH2O wow 12:31
lizmat
.oO( guilty as charged )
12:31
viki :)
lizmat been using Apple machines since the Apple ][ 12:32
iH2O u proud of yourself, arent u
:)
lizmat no
it's just that I don't want to think about what I'm using to do my work 12:33
masak FROGGS: what you're saying (about devs installing it without any problems) is true, but I'm still a bit disappointed (or something) that we managed to disappoint mst, a high-level user who expected the configuration to be sane in a certain way
lizmat e.g. a car for me should bring me from A to B without hassles
don't care how it looks
MasterDuke .tell moritz i just tried to sign up for your book mailing list, but nothing happened when i clicked the 'Subscribe' button. should something have, or am i now subscribed?
yoleaux MasterDuke: I'll pass your message to moritz.
lizmat or what engine it uses 12:33
iH2O the end justifies the means of the computer 12:34
masak lizmat: perhaps better to recommend `for lines() {}` to people, not `for lines {}`, just in case they try the (non-modifier) for loop and have their block gobbled :)
FROGGS masak: true, that's why I welcome the heads-up
lizmat masak: noted :-)
FROGGS (could have been earlier though) 12:35
FROGGS on the other hand: if you use a software in a way it was not meant to, I mean, come on 12:36
FROGGS we expect that one installs it in a single dir 12:37
FROGGS if someone needs something else, we can make it work, surely 12:37
but it is not that I regret that we did it like we did
[Coke] masak - we just didn't have any mst-shaped volunteers at the time. now we do, and we can fix it. if we worried about every thing we didn't finish by christmas, where would we be?
moritz MasterDuke: something should happen, yes. Do you have javascript enabled?
yoleaux 12:33Z <MasterDuke> moritz: i just tried to sign up for your book mailing list, but nothing happened when i clicked the 'Subscribe' button. should something have, or am i now subscribed?
masak I'm sorry, I didn't mean for folks to get defensive
[Coke] is the opposite of that. :) 12:38
MasterDuke yes, but i do have ublock turned on 12:38
masak the main reason I asked whether there has been any movement is that it seemed like useful feedback to act on
MasterDuke moritz: FF 49.0.1 on arch linux 12:39
viki MasterDuke: it says " 12:43
Almost finished... We need to confirm your email address. To complete the subscription process, please click the link in the email we just sent you.
ugh
MasterDuke: it says that just above the "Submit" button after you click Submit.
While the form is still displayed; maybe it's just out of scroll view for you?
MasterDuke viki: nope, nothing new visible when i scroll around 12:44
viki shrugs 12:45
MasterDuke seemed to work in Chrome 54.0.2840.71 (still on arch linux) 12:46
viki Worked for me in Palemoon 26.5.0 on buntu 12:47
viki Call for Speakers from Toronto Perl Mongers, if anyone wants to do a talk: gist.github.com/zoffixznet/b374922...348aa90226 12:53
DrForr I don't think they'd pay for the flight :/ 12:54
viki Not unless you're Damian Conway :) 12:55
iH2O z... 13:08
moritz MasterDuke: has it worked for you? if not, I can add you manually 13:16
iH2O what is the estimated number of perl6 users? 13:33
viki 1,233,433,768 ±3
lizmat viki: that is incorrect: it's 1,233,433,666 :-) exactly! 13:34
iH2O i suppose this is also the number of rakudo downloads
viki :)
DrForr Well, that won't account for github downloads... 13:35
viki downloads != users :)
viki single-handedly cloned github.com/rakudo/rakudo over a thousand times 13:36
DrForr True, but a starting point would be nice :)
viki Then 1,233,433,768 ±3 should be good 'nuff :) 13:38
moritz DrForr: www.p6c.org/stats/ has some usage stats of the various perl6 websites 13:49
tl;dr perl6.org typically has between 40k and 100k visitors a month 13:50
doc.perl6.org around 30k 13:51
typically about 1% of users are part of the community; with about 100 to 200 folks in the community here, we might have 10k users
FROGGS that's a lot 13:52
viki 31916 unique visitors to docs.perl6.org in Sept
And seems to be roughly twice more visitors this year than last. 13:53
Growth \o/
DrForr Doing what I can :)
iH2O doubling each year is a good objective
jkramer m: "fooooo".subst(/o/, 'X', :nth(*)) 14:07
camelia ( no output )
jkramer m: say "fooooo".subst(/o/, 'X', :nth(*))
camelia rakudo-moar 1f76b1: OUTPUT«fooooX␤»
jkramer m: say 'foo.com/some-article-123/page-1.htm...(/\b\d\b/, '<PAGE>', :nth(*)) 14:08
camelia rakudo-moar 1f76b1: OUTPUT«foo.com/some-article-123/page-1.html␤»
jkramer Whut
m: say 'foo.com/some-article-123/page-1.htm...ubst(/\d/, '<PAGE>', :nth(*))
camelia rakudo-moar 1f76b1: OUTPUT«foo.com/some-article-123/page-<P...gt;.html␤»
lizmat star: say 'foo.com/some-article-123/page-1.htm...ubst(/\d/, '<PAGE>', :nth(*)) 14:08
camelia star-m 2016.04: OUTPUT«foo.com/some-article-123/page-<P...gt;.html␤»
jkramer Maybe my rakudo is outdated, locally I get: Attempt to retrieve before :1st match -- :nth(0) 14:09
m: say $*PERL 14:10
camelia rakudo-moar 1f76b1: OUTPUT«Perl 6 (6.c)␤»
jkramer Hmm
lizmat $ 6 'say "foo.com/some-article-123/page-1.htm...ubst(/\d/, "<PAGE>", :nth(*))'
foo.com/some-article-123/page-<PAGE>.html
blead ^^^
jkramer: which is what you expect, no ? 14:11
jkramer Yes
viki The error you get is the behaviour before the recent match rework 14:11
jkramer It works without the \b's, but with the \b's it crashes on my machnine and here it just does nothing, which confuses me :)
Ah
Ok, guess I should update then
lizmat jkramer: what does $*VM say ? 14:12
jkramer moar (2016.09)
lizmat yes, that doesn't have the fix
nor does 2016.10
viki committable6: 2016.09 m: say "fooooo".subst(/o/, 'X', :nth(*))
committable6 viki, ¦«2016.09»: fooooX
jkramer Alright
:D
viki committable6: 2016.10 m: say "fooooo".subst(/o/, 'X', :nth(*))
committable6 viki, ¦«2016.10»: fooooX
viki shrugs 14:13
jkramer This works for me too, just not with the \b
viki jkramer: you do realize \b is backspace, right?
jkramer Ooooooh
viki m: say 'foo.com/some-articl​e-123/page-1.ht...st(/«\d»/, '<PAGE>', :nth(*)) 14:14
camelia rakudo-moar e29e47: OUTPUT«foo.com/some-articl​e-123/page-<...gt;.html␤»
viki jkramer: yeah, there's plan to make it error out. Too common a mistake to make :)
jkramer Thank's a bunch, I didn't consider this could've changed :)
So <<>> is word bound now?
viki The << is the left boundary now and >> is the right one (Unicode versions: « and ») 14:15
jkramer Perfect, thanks :)
viki committable6: 2016.10 m: say 'foo.com/some-articl​e-123/page-1.ht...(/\b\d\b/, '<PAGE>', :nth(*))
committable6 viki, ¦«2016.10»: Attempt to retrieve before :1st match -- :nth(0)␤ in block <unit> at /tmp/XOdSlQeplo line 1␤ «exit code = 1»
viki committable6: 2016.10 m: say 'foo.com/some-articl​e-123/page-1.ht...st(/«\d»/, '<PAGE>', :nth(*))
committable6 viki, ¦«2016.10»: foo.com/some-articl​e-123/page-<PAGE>.html
viki Right. So before the .match rework, that version didn't match anything and the Whatever became zero, triggering the error 14:16
Bug fix before bug is found :}
jkramer \o/ :) 14:17
lizmat there's a lot of that going around lately :-)
timotimo rosettacode.org/wiki/Snake#Perl_6 - it would have been kinda nice to know before someone took the code and put it there so i could have had a chance to make the code a bit prettier ... 14:43
viki It's never too late :) 14:48
timotimo i don't really see how to make it any prettier :)
viki lol
dalek c: 8e154a1 | (Garrett Goebel)++ | doc/Type/List.pod6:
remove supplying explicit identity from produce examples. Prepending a zero
c: 0c3e273 | RabidGravy++ | doc/Type/List.pod6:
Merge pull request #995 from ggoebel/master

Remove supplying explicit identity from produce examples.
viki m: constant W = 1280; dd W 14:49
camelia rakudo-moar e29e47: OUTPUT«1280␤»
viki TIL you don't need sigils for constants :o
timotimo you almost always use constant without sigils, i thought
lizmat timotimo: not if you want to be able to interpolate it into a string easily :-) 14:50
viki m: constant say = 42; say.say
camelia rakudo-moar e29e47: OUTPUT«42␤»
viki hehe
[Coke] m: constant W = 1280; say "{W}" 14:51
camelia rakudo-moar e29e47: OUTPUT«1280␤»
viki m: constant constant = 42; constant say = "put"; constant."{say}"() 14:52
camelia rakudo-moar e29e47: OUTPUT«42␤»
viki That's just wrong :}
lizmat m: sub danger(\a) { say a }; constant danger = "Danger, Danger, Will Robinson!"; danger(danger)
camelia rakudo-moar e29e47: OUTPUT«Danger, Danger, Will Robinson!␤»
viki :o
lizmat m: sub danger(\danger) { say danger }; constant danger = "Danger, Danger, Will Robinson!"; danger(danger) # even more dangerous 14:53
camelia rakudo-moar e29e47: OUTPUT«Danger, Danger, Will Robinson!␤»
timotimo lizmat: that's quite true 14:54
viki m: constant constant = constant constant = &say; (constant)(constant) 14:56
camelia rakudo-moar e29e47: OUTPUT«sub say (| is raw) { #`(Sub|53455448) ... }␤»
lizmat aw 14:57
timotimo wow, that allows you to slip between declaration and value evaluation so it doesn't actually count as re-declaration? 14:58
viki m: constant constant = my \constant = &say; (constant)(constant) 15:01
camelia rakudo-moar e29e47: OUTPUT«sub say (| is raw) { #`(Sub|77417000) ... }␤»
viki m: constant constant = my \constant = my \constant = &say; (constant)(constant) 15:02
camelia rakudo-moar e29e47: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol 'constant'␤at <tmp>:1␤------> 3t constant = my \constant = my \constant7⏏5 = &say; (constant)(constant)␤ expecting any of:␤ new term to be defined␤»
viki m: constant constant = 2 + my \constant = 42; say constant 15:03
camelia rakudo-moar e29e47: OUTPUT«44␤»
viki To me it looks like the redeclaration checker isn't doing its job in all the cases :) 15:03
viki m: constant constant = 1.say && 1 + constant constant = 2.say && 2 + constant constant = 3.say && + constant constant = 42; say constant 15:07
camelia rakudo-moar e29e47: OUTPUT«3␤2␤1␤45␤»
nicq201 viki: What is even happening there? 0.o
viki :)
[Coke] docs folks - why don't we require Inline::Python as a dep, since we already have other modules we rely on? we could then simplify the syntax highlighting code. 15:10
timotimo do we have http request libraries that also handle PUT, DELETE, PATCH requests? 15:29
FROGGS timotimo: did you check HTTP::UserAgent? 15:31
timotimo nope :S
FROGGS I'm not sure it supports it, but it should be easily implementable
viki HTTP::Tiny should support them, but it shells out to curl 15:33
sufrostico Hi there, anyone knows how to fix this on debian (unstable branch, official perl6 and panda packages) --> Could not find Shell::Command at line 2 in 15:47
ilmari bugs.debian.org/cgi-bin/bugreport....bug=818926 15:49
sufrostico: ^^
sufrostico thanks 15:52
kyclark if I have a list of pairs, how can I pattern match on the pair? 16:02
m: for 'foo'.comb.pairs -> $i, $l { say "$i: $l" }
camelia rakudo-moar f22f89: OUTPUT«0 f: 1 o␤Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
kyclark m: for 'foo'.comb.pairs -> ($i, $l) { say "$i: $l" }
camelia rakudo-moar f22f89: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤ in block <unit> at <tmp> line 1␤␤»
kyclark m: for 'foo'.comb.pairs -> $p { say "{$p.key}: {$p.value}” } 16:03
camelia rakudo-moar f22f89: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3irs -> $p { say "{$p.key}: {$p.value}” }7⏏5<EOL>␤ expecting any of:␤ horizontal whitespace…»
kyclark m: for 'foo'.comb.pairs -> $p { say join ": ", $p.key, $p.value }
camelia rakudo-moar f22f89: OUTPUT«0: f␤1: o␤2: o␤»
viki m: for 'foo'.comb.pairs -> :$key, :$value { say join ": ", $key, $value } 16:04
camelia rakudo-moar f22f89: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
kyclark m: for 'foo'.comb.pairs -> $i => $l { say "$i: $l" }
camelia rakudo-moar f22f89: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix > instead␤at <tmp>:1␤------> 3for 'foo'.comb.pairs -> $i =>7⏏5 $l { say "$i: $l" }␤»
viki m: for 'foo'.comb.pairs -> (:$key, :$value) { say join ": ", $key, $value }
camelia rakudo-moar f22f89: OUTPUT«0: f␤1: o␤2: o␤»
kyclark Ah, interesting viki.
viki m: for "foo".comb.pairs { say join ": ", $:key, $:value } 16:07
camelia rakudo-moar f22f89: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
viki too bad :(
nicq201 for "foo".comb.pairs { say join ": ", $^key, $^value } 16:08
oops
m: for "foo".comb.pairs { say join ": ", $^key, $^value }
camelia rakudo-moar f22f89: OUTPUT«0 f: 1 o␤Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
viki That just gives you two pairs at a time 16:10
nicq201 Yeah. :/
viki m: for "foo".comb.kv { say join ": ", $^k, $^v } 16:11
camelia rakudo-moar 0dc6f7: OUTPUT«0: f␤1: o␤2: o␤»
viki kyclark: ^ another option, if you don't care for them actually being Pairs
kyclark Very cool! 16:12
dalek c: cb323d5 | (Zoffix Znet)++ | doc/Language/variables.pod6:
Include actual example of '<', ahem, "twigil"
16:15
viki Interesting how some folks viewed it as a twigil. To me it always looked like a key lookup on an anonymous $ 16:16
m: "foo" ~~ /$<bar>=\w+/; say .<bar> given $ 16:20
camelia rakudo-moar 0dc6f7: OUTPUT«(Any)␤»
viki m: "foo" ~~ /$<bar>=\w+/; $.<bar>
camelia rakudo-moar 0dc6f7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of $. variable; in Perl 6 please use the .kv method on e.g. .lines␤at <tmp>:1␤------> 3"foo" ~~ /$<bar>=\w+/; $.7⏏5<bar>␤»
nicq201 Is there some way to grab the signature from a method? I know a sub needs to have the '&' prefix, but how would someone do that for a method? 16:32
[Coke] you can introspect signatures on callables. 16:33
ilmari m: say Str.^can("encode")[0].signature
camelia rakudo-moar 0dc6f7: OUTPUT«(Str $: | is raw)␤»
ilmari m: say Str.^can("encode")».signature 16:34
camelia rakudo-moar 0dc6f7: OUTPUT«((Str $: | is raw))␤»
[Coke] there ya go
viki m: say Str.^lookup("encode").signature 16:35
camelia rakudo-moar 0dc6f7: OUTPUT«(Str $: | is raw)␤»
ilmari hm, that's showing the signature of the proto method, not any of the multis 16:35
ilmari s: Str.encode 16:35
SourceBaby ilmari, Something's wrong: ␤ERR: Cannot unbox a type object (Str) to a str.␤ in block <unit> at -e line 6␤␤
ilmari s: Str ^encode
viki s: Str, 'encode'
SourceBaby ilmari, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ encode used at line 6␤␤
viki, Sauce is at github.com/rakudo/rakudo/blob/0dc6...r.pm#L1972
viki s: Str, 'encode', \()
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/0dc6...r.pm#L1979
viki s: "foo", 'encode', \() 16:35
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/0dc6...r.pm#L1979
moritz m: say Str.^lookup("encode").candidates>>.signature
camelia rakudo-moar 0dc6f7: OUTPUT«((Str $: Str:D $encoding = "utf8", Bool:D :$replacement, *%_) (Str $: Str:D $encoding = "utf8", Str :$replacement, *%_))␤»
lizmat blogs.perl.org/users/ken_youens-cla.../pick.html :-) 16:36
moritz ilmari: ^^ better
ilmari moritz: ah
viki m: say Str.^lookup("encode").cando(\(Str))[0].signature
camelia rakudo-moar 0dc6f7: OUTPUT«(Str $: Str:D $encoding = "utf8", Str :$replacement, *%_)␤»
[Coke] zoffix: I'd like to rewrite that so it doesn't call it a twigil as all - that ok with you? 16:37
viki [Coke]: definitely
[Coke] (guessing so from commit message)
[Coke] viki: opened a ticket, assigned it to myself. 16:45
viki m: my $x = +"423343dasdfas" 17:26
camelia ( no output )
viki m: my Int $x = +"423343dasdfas"
camelia rakudo-moar 0dc6f7: OUTPUT«Earlier failure:␤ Cannot convert string to number: trailing characters after number in '03423343⏏5dasdfas' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Final error:␤ Type check failed in assignment to $x; expected Int but got Failur…»
viki never mind :) 17:27
viki m: my @colors = <b g r x b g r x b g r x>; @colors .= map: {|($^r, $^g, $^b, $^x)}; dd @colors 17:50
camelia rakudo-moar 0dc6f7: OUTPUT«Array @colors = ["r", "g", "b", "x", "r", "g", "b", "x", "r", "g", "b", "x"]␤»
viki (Perl 6)++
sufrostico can someone help me with this error? 18:32
pastebin.com/ciBRpN1x
RabidGravy looks like an error to me 18:34
viki sufrostico: it's pretty hard to help without having the code that generates that error.
sufrostico viki is a minimal example of the Hiker module 18:37
pastebin.com/ku252UEe
skids suspects a symbolic lookup gone bad because the code expects "Grammar" but gets "Template::Mustache::Grammar" and then prepends "Template::Mustache". And that's abouty as helpful as I can be.
sufrostico ls 18:38
viki sufrostico: is Template::Mustache installed?
moritz no such file or directory
sufrostico moritz: jaja
viki: yes
sufrostico skids: I'look int that 18:40
RabidGravy eugh, that code in Hiker is scaring me
skids "smells like templating... I'm outta here!" :-)
sufrostico RabidGravy: Any other recomendation to a webapp ? 18:41
viki Template::Mustache::Template::Mustache::Grammar is right. 18:42
sufrostico: what's your perl6 -v ? 18:46
never mind 18:47
sufrostico: I've no idea how you got Hiker, but it's failing on installation. And it's failing on Travis. 18:48
RabidGravy let me replicate that locally
viki m: say "foo":defined
camelia rakudo-moar 0dc6f7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤You can't adverb "foo"␤at <tmp>:1␤------> 3say "foo":defined7⏏5<EOL>␤ expecting any of:␤ pair value␤»
viki I'm guessing this syntax hasn't existed for some time
RabidGravy I noticed it was failing in Travis earlier
viki No updates since Oct 15, 2015 18:49
viki does the Mythbusters voice
Well there's your problem!
dalek c: 21c9fa9 | (Tom Browder)++ | doc/Language/syntax.pod6:
correct grammar
18:50
viki committable6: 2015.07 m: say "foo":defined
committable6 viki, ¦«2015.07»: ===SORRY!=== Error while compiling /tmp/PCopQG2iw6␤You can't adverb that␤at /tmp/PCopQG2iw6:1␤------> m: say "foo":defined⏏<EOL>␤ expecting any of:␤ pair value «exit code = 1»
RabidGravy can't be having not working modules
viki shrugs
RabidGravy plus I spent half the day doing Scala, and the other half doing the stupidest meeting ever so I need something to fix 18:51
viki \o/
RabidGravy++
RabidGravy well for starters HTTP::Server::Async isn't working either 18:52
viki heh 18:53
harmil_wk Question for the Perl 6 historians in the room: It's my memory that one of the very first design decisions in terms of a syntax for a new feature was smart-match and given/when. Is that just my memory playing tricks on me?
viki RabidGravy: funny enough, I'm currently hunting a bug in Proc::Async :) The failures run dep 18:54
*deep
moritz harmil_wk: they were among the first features ported to p5
geekosaur harmil_wk, you can check, see the Apocalypses at design.perl6.org/
moritz harmil_wk: dunno if they were actually among the first p6 syntax features
geekosaur not sure if you can pull the repo (they may be in the pugs repo?) and search their history 18:56
harmil_wk Apocalypses were after a lot of the post-RFC discussion, though... and some syntax was settled before them.
viki I mean.. in IO::Socket::Async >_<> 19:11
RabidGravy ah just remembered why I didn't try to fix HTTP::Server::Async before 19:22
viki Why? 19:24
Whyy? :) 19:30
RabidGravy because unfortunately there is some namespace clashage between the HTTP::Response of HTTP::Server and the HTTP::Response of HTTP::UserAgent 19:38
but never fear, fully quilified names work now
seatek RabidGravy++ 19:51
seatek anyone know? Passing named arguments to method through a hash -- this works: meth(|%CFG«keyname») -- however, if I make "keyname" into a variable instead, it doesn't work using |%CFG«$.keyname» but does using |%CFG{$.keyname} 20:24
geekosaur «» is implicit quoting 20:25
foo«x» is the same as foo{"x"}, and it probably doesn't expand $.keyname the way you expect when quoted 20:26
likewise foo<x> is foo{'x'} 20:27
FROGGS I'd think that this should work: |%CFG«$.keyname()» 20:29
because $.keyname is a method call, and these need parenthesis to interpolate, right? 20:30
m: my $a = "foo"; say "$a.uc"; say "$a.uc()" 20:31
camelia rakudo-moar 0dc6f7: OUTPUT«foo.uc␤FOO␤»
FROGGS like in here^^
geekosaur but it's different for $.
seatek doesn't seem to when I try FROGGS
FROGGS geekosaur: why? 20:32
geekosaur m: class A {has $.foo = "bar"; method x {my %h = :1bar; %h«$.foo»}}; my A $a .= new; say $a.x;
camelia rakudo-moar 0dc6f7: OUTPUT«(1)␤»
geekosaur this works... ?
m: class A {has $.foo = "bar"; method x {my %h = :6bar; %h«$.foo»}}; my A $a .= new; say $a.x;
camelia rakudo-moar 0dc6f7: OUTPUT«(6)␤»
seatek it doesn't allow the hash to be interpreted as "named arguments" ;) 20:33
it only does when i use %CFG{$.keyname}
it only does when i use |%CFG{$.keyname}
it only does when i use |%CFG«$.keyname()» error is )contsturctor only takes named arguments 20:34
geekosaur oh
seatek yeah
geekosaur I bet this is that business where it expands in the wrong context again
seatek yeah it seemed strange so i thought i'd mention it 20:35
geekosaur s/expands/interpolates/ 20:37
FROGGS I dont understand....
m: sub foo(*%h) { say %h }; my %x = bar => 'baz', quux => 'qaax'; my $bar = 'bar'; foo |%x{$bar}
camelia rakudo-moar 0dc6f7: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
FROGGS m: sub foo(*%h) { say %h }; my %x = bar => 'baz', quux => 'qaax'; my $bar = 'bar'; foo |%x
camelia rakudo-moar 0dc6f7: OUTPUT«{bar => baz, quux => qaax}␤»
FROGGS I'd like to see a one-liner here where |%CFG{$.keyname} does something...
RabidGravy eugh travis-ci.org/sergot/http-useragen.../171489441 20:37
don't like the look of that 20:38
seatek FROGGS, I'll try to recreate an example of it without having to using all the class/method stuff that surrounds it
FROGGS seatek: that'd be awesome :o) 20:39
RabidGravy: precomp isnt happy, but I can't even guess what my be wrong 20:40
seatek FROGGS: I'll need coffee first though ;)
RabidGravy yeah, but I can't see anything changed that would provoke it 20:41
RabidGravy restarts the build
ugexe m: sub foo(*%h) { say %h.perl }; class Bar { has $.keyname = "key"; method cfg { my %CFG = a => 1, key => 2 => 3; foo(|%(%CFG<<$.keyname>>)) }; }; say Bar.new.cfg 20:43
camelia rakudo-moar 0dc6f7: OUTPUT«{"2" => 3}␤True␤»
ugexe s/|%CFG<<...>>/|%(%CFG<<...>>)/ 20:44
RabidGravy FROGGS, on a second attempt it passed, often see weird like that on travis 20:53
FROGGS a hiccup then... 20:55
seatek ugexe: didn't work with preceding |%(%CFG... either... so far only |%CFG{$.keyname} works 20:56
RabidGravy well now, after fixing the syntax error in Hiker::Router I can now replicate the previous error 20:57
seatek FROGGS: ok got it for you 21:01
class C { has $.name; has $.pass; }; class D { method try(){ my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $c = C.new(|%CFG<<cfg1>>); return $c;}}; my $c = D.new.try; 21:02
m: class C { has $.name; has $.pass; }; class D { method try(){ my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $c = C.new(|%CFG<<cfg1>>); return $c;}}; my $c = D.new.try;
camelia ( no output )
seatek works fine
use a variable inside «» -- doesn't work fine
m: class C { has $.name; has $.pass; }; class D { method try(){ my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $key = 'cfg1'; my $c = C.new(|%CFG<<$key>>); return $c;}}; my $c = D.new.try; 21:03
camelia rakudo-moar f50e39: OUTPUT«Default constructor for 'C' only takes named arguments␤ in method try at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
seatek only named arguements
BUT if you use the {} notation with a variable, it works fine
m: class C { has $.name; has $.pass; }; class D { method try(){ my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $key = 'cfg1'; my $c = C.new(|%CFG{$key}); return $c;}}; my $c = D.new.try;
camelia ( no output )
geekosaur ah, that's another difference 21:04
you are interpolating a hash and I was interpolating a string. so this is probably tripping over the ambiguity between hashes/Pairs and named params :/ 21:05
seatek yes
FROGGS m: my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $key = 'cfg1'; dd %CFG<<$key>>
camelia rakudo-moar f50e39: OUTPUT«(${:name("myname"), :pass("mypass")},)␤»
FROGGS that's a List
m: my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $key = 'cfg1'; dd %CFG<<cfg1>>
camelia rakudo-moar f50e39: OUTPUT«Hash %CFG = ${:name("myname"), :pass("mypass")}␤»
geekosaur but it's being |d
FROGGS and this is not 21:06
see?
seatek yeah -- i see
FROGGS m: my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $key = 'cfg1'; dd %CFG<<$key>>.hash 21:07
camelia rakudo-moar f50e39: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw: ${:name("myname"), :pass("mypass")}␤ in block <unit> at <tmp> line 1␤␤»
FROGGS m: my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $key = 'cfg1'; dd %CFG<<$key>>».hash
camelia rakudo-moar f50e39: OUTPUT«({:name("myname"), :pass("mypass")},)␤»
FROGGS m: class C { has $.name; has $.pass; }; class D { method try(){ my %CFG = cfg1 => { name => 'myname', pass => 'mypass'}; my $key = 'cfg1'; my $c = C.new(|%CFG<<$key>>».hash.hash); return $c;}}; my $c = D.new.try; 21:08
camelia ( no output )
FROGGS there might be a less ugly solution out there 21:09
seatek yeah just use {} -- they work ;)
FROGGS true
seatek but it's certainly not obvious 21:11
FROGGS aye 21:14
RabidGravy if the guy who asked about Hiker earlier shows up I just fixed it :)
if tony-o shows up tell him he has incoming :)
ugexe m: class C { has $.name; has $.pass; }; class D { method try(){ my %CFG = cfg1 => { name => "myname", pass => "mypass"}; my $key = "cfg1"; my $c = C.new(|%CFG<<"$key">>); return $c;}}; say D.new.try; 21:17
camelia rakudo-moar 4034f7: OUTPUT«C.new(name => "myname", pass => "mypass")␤»
ugexe s/<<$key>>/<<"$key">>/
seatek ugexe: oddly that works! but that's just 1 more bit of insanity i'm unwilling to go down. ;) 21:21
MasterDuke .tell moritz i'm good, it worked with Chrome 21:32
yoleaux MasterDuke: I'll pass your message to moritz.
TimToady waves from Puerto Vallarta 21:45
smartmatching was starting to come into focus in about 2006, Apocalypse 4 was written 21:46
TimToady is done with his opening keynote, so can pay attention to Real Life™ again 21:47
ugexe seatek: get the best of all worlds and use C.new(|%CFG<<"{$key}">>) 21:54
geekosaur oyyyy 21:55
Herby_ o/ 21:56
viki \o
harmil_wk TimToady: Thanks for the context 22:02
I guess it was much later than I thought.
seatek ugexe: if i didn't just finish working on the well, i'd have jumped down in it. :) 22:04
TimToady harmil_wk: yes, back then we though Perl 6 could be much more like Perl 5, until we actually started trying to mesh many different concepts while also simplifying 22:09
*thought 22:10
geekosaur smartmatching was an early train wreck in that regard. perl 5 imported the original smartmatching, which turned out to be broken in the same way it is in perl 5 (duh) 22:11
it was redesigned in perl 6 to be type-based
TimToady well, it was already type-based when P5 borrowed it, but they had to fake types, so it didn't work so well 22:12
TimToady also, it was symmetrical when they borrowed it, and later we decided that was a mistake 22:12
if it's symmetrical, you can't ever optimize when 1...when 2...when 3 into a jump table 22:13
imcsk8 TimToady: hello, i'm the guy that asked you the daemon stuff
TimToady because some type on the left could always ask for a different interpretation
imcsk8: howdy! 22:14
I'm so far away!
El_Che_ TimToady: www.oreilly.com/programming/free/fi...survey.pdf <-- page 52: Perl 6 in mentioned in FUTURE PROGRAMMING LANGUAGES
(INTENT TO LEARN) 22:15
TimToady well, I should hope so :)
viki Note to self: ensure IRC::Client problem got resolved before you go and update Perl 6 and restart all the bots on three different boxes, to get the latest Rakudo :(
TimToady but it's also in the present :)
viki heh, oreilly.com? More like "Future books O'Reilly wants to turn profit on" survey :) 22:16
El_Che_ maybe we need to raise DrForr bonus. He maybe enough people at FOSDEM to give Perl6 a try (or he did fill a lot of questionaire) ;)
imcsk8 TimToady: yeah!! unreachable :P
TimToady imcsk8: unfortunately DNS does not seem to be feeling well, so it will be difficult to give links to anything 22:18
TimToady well, difficult for me; other people shouldn't have any trouble... 22:19
imcsk8 TimToady: the network here is not that good 22:20
TimToady I'm on the irc here because I have a hardwired IP address to my home server, where I actually run irssi 22:21
imcsk8 yup me too 22:27
japhb TimToady: Does 8.8.8.8 work for you? 22:31
It's Google's external DNS 22:32
geekosaur ob xkcd.com/1361/
viki heh 22:33
TimToady yeah, 8.8.8.8 works better, thanks
notostraca TimToady: AT&T U-Verse service was having some bizarre maintenance they were doing in my area. half of all websites were non-load-able
TimToady I even knew that...
TimToady well, I'm in Puerto Vallarta at the moment... 22:34
notostraca also, 4.2.2.1 through 4.2.2.6 are Level3's public DNS servers
TimToady so could just be hotel's DNS is overwhelmed, as often happens when a bunch of computer geeks descend on an unsuspecting hotel
notostraca :)
geekosaur most of them are pretty craptacular, yeh 22:35
japhb From the PDF El_Che posted: "Four coefficients are associated with 22:37
past languages: Bash (+$6,322), Clojure
(+$12,549), Objective-C (–$3,869) and
Perl 6 (+$14,743)."
So if Perl 6 is a *past* language for you, you make $15K a year more? 22:38
Maybe because you own a time machine?
viki :D
El_Che they meant perl5 probably
viki I stand by my original statement. They're just generating customers for upcoming books. 22:39
TimToady seatek: note that when you use a pattern like /a ** 1..10.Int/ it really means /a ** 1..10 . 'Int'/ 22:45
those are not general expressions
that's why we require {} for anything fancier than an integer range
seatek TimToady: ok that makes sense. Yeah, in playing with that, it "felt" like ranges were their own object -- one thing, rather than 2 things working on a defined operation 22:48
TimToady we had to draw the line somewhere, and that seemed like a reasonable place :) 22:49
basically, we wanted a direct translation for p5's {1,3} notation, but nothing fancier (without {}) 22:50
seatek yeah there must have been tons of decisions like that. and what trips you up in one place, makes another place seem like perfect sense. 22:51
TimToady it's tradeoffs, all the way down, when it isn't turtles 22:52
seatek :)
so far I've been loving exploring it. I've been translating stuff from p5 into it, and doing a couple new little things, to start becoming familiar. 22:56
there have been a few quirks. and i think it's probably just as hard a call to determine what is a quirk that needs to be fixed to behave how people might expect it to, vs that's just a quirk of the language that people will have to learn in order to cope 22:58
TimToady most of those we've run into already, and decided one way or another, but occasionally someone finds a new one :) 22:59
seatek that's what i've been trusting in to control my rage ;) 23:00
TimToady it's okay to ragequit as long as you come back later :) 23:01
seatek naw the good BY FAR outweighs irritations with little quirks here and there 23:02
seatek at least so far. i haven't done any long-running rewrites of things yet ;) 23:02
TimToady well, looks like things are going all social here, so I'd better sign off for now 23:04
not to mention battery life...
afk &
timotimo o/
seatek bye bye
BenGoldberg m: dd 1..0 23:33
camelia rakudo-moar 627a77: OUTPUT«1..0␤»
BenGoldberg m: dd 0..1
camelia rakudo-moar 627a77: OUTPUT«0..1␤»
BenGoldberg m: 0..1.say
camelia rakudo-moar 627a77: OUTPUT«WARNINGS for <tmp>:␤Useless use of ".." in expression "0..1.say" in sink context (line 1)␤1␤»
BenGoldberg m: (0..1).say
camelia rakudo-moar 627a77: OUTPUT«0..1␤»
BenGoldberg m: (0..1).perl.say
camelia rakudo-moar 627a77: OUTPUT«0..1␤»
BenGoldberg m: (0..1).gist.say
camelia rakudo-moar 627a77: OUTPUT«0..1␤»
BenGoldberg m: (0..1).WHAT.say
camelia rakudo-moar 627a77: OUTPUT«(Range)␤»
BenGoldberg m: (0..1).WHY.say
camelia rakudo-moar 627a77: OUTPUT«(Any)␤»
BenGoldberg m: (1..0).WHAT.say 23:34
camelia rakudo-moar 627a77: OUTPUT«(Range)␤»
BenGoldberg m: (1..0).[&+].say
camelia rakudo-moar 627a77: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3(1..0).[&+7⏏5].say␤ expecting any of:␤ prefix␤ term␤»
timotimo m: say (5..7.say)
camelia rakudo-moar 627a77: OUTPUT«7␤5..Bool::True␤»
timotimo :P
it gives you the return value of "say" as the end point of the range
when you do 0..1.say
BenGoldberg m: say( 7..5 ); 23:35
camelia rakudo-moar 627a77: OUTPUT«7..5␤»
BenGoldberg m: ( 7..5 ).WHAT.say;
camelia rakudo-moar 627a77: OUTPUT«(Range)␤»
BenGoldberg m: ( 7..5 ).elems.say;
camelia rakudo-moar 627a77: OUTPUT«0␤»
BenGoldberg m: ( 7...5 ).elems.say;
camelia rakudo-moar 627a77: OUTPUT«3␤»
BenGoldberg m: ( 7...5 ).say; 23:36
camelia rakudo-moar 627a77: OUTPUT«(7 6 5)␤»
BenGoldberg m: ( 7...5 ).WHAT.say;
camelia rakudo-moar 627a77: OUTPUT«(Seq)␤»
BenGoldberg m: ( 5...7 ).WHAT.say;
camelia rakudo-moar 627a77: OUTPUT«(Seq)␤»
BenGoldberg m: ( 5...7 ).dd.say; 23:37
camelia rakudo-moar 627a77: OUTPUT«No such method 'dd' for invocant of type 'Seq'␤ in block <unit> at <tmp> line 1␤␤»
timotimo do we have anything that has a dd method? 23:39
dalek c: 86f110c | (Francis Grizzly Smit)++ | doc/Language/operators.pod6:
fixed >= doc to say greater than or equal instead of less than
23:44