buggable 🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 1 ballots submitted by 1 users! DRUM ROLL PLEASE!... 00:00
And the winning number is 23! Congratulations to jnthn! You win a can of WD40!
tony-o woop woop
00:01 mcmillhj left, mcmillhj joined
tony-o .tell zoffix - modules.zef.pm is repopulating now and should be up tomorrow 00:02
yoleaux tony-o: I'll pass your message to zoffix.
00:03 pilne joined 00:06 mcmillhj left 00:08 vendethiel joined 00:10 aindilis` joined 00:12 aindilis left 00:15 hythm left 00:16 mcmillhj joined 00:18 vendethiel- joined 00:19 vendethiel left 00:20 lookatme joined
lookatme morning 00:21
00:21 mcmillhj left 00:25 hythm joined 00:29 kerframil left 00:32 vendethiel- left
zengargoyle all hail jnthn slayer of ... things. 00:33
00:36 aindilis` left
lookatme Hmm, anyone know the last week report link? 00:37
geekosaur [31 21:22:26] <lizmat> and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/07/31/...r-smaller/ 00:39
lookatme geekosaur, yeah, that's it, thanks 00:40
00:45 Cabanossi left, Cabanossi joined 00:51 mcmillhj joined 00:52 aindilis joined 00:55 mcmillhj left
zengargoyle lizmat++ has is default 01:12
01:16 jeromelanteri left 01:22 mcmillhj joined 01:25 ChoHag left 01:27 mcmillhj left 01:30 jeromelanteri joined 01:34 astj left, astj joined 01:39 astj left
jeromelanteri zengargoyle, ok, well read, thank you 01:40
yoleaux 31 Jul 2017 22:43Z <zengargoyle> jeromelanteri: nicqrocks applied the pull-requests and Git::Wraper:ver<0.0.8> fixes the precomp thing. you don't *have* to use your own patched copy anymore.
31 Jul 2017 22:44Z <zengargoyle> jeromelanteri: and perlpilot confirms that the nicqrocks fork that's in the ecosystem is the one that should be used.
01:42 https_GK1wmSU joined 01:44 https_GK1wmSU left 01:45 ilbot3 left 01:51 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:53 astj joined 01:54 mcmillhj joined 01:57 astj left 01:59 mcmillhj left 02:02 lichtkind left 02:11 astj joined 02:14 pilne left 02:16 eliasr left 02:18 cpage_ left 02:21 cpage_ joined 02:26 skids joined 02:29 vendethiel joined 02:33 mcmillhj joined 02:38 mcmillhj left 02:41 MasterDuke joined 02:44 cpage_ left 02:47 audiatorix joined
audiatorix What's the best way to continually listen to a Channel until it's closed? I'd like to avoid using exceptions if possible 02:48
02:52 noganex_ joined 02:55 noganex left 02:59 Cabanossi left 03:01 Cabanossi joined
lookatme audiatorix, get a Supply on Channel ? 03:03
m: my Channel $ch .= new; my $p = start { supply { whenever $ch.Supply -> $msg { print "GOT $msg|"; }; }.tap }; ^10 .map({$ch.send($_)}); await $p; 03:04
camelia GOT 0|GOT 1|GOT 2|GOT 3|GOT 4|GOT 5|GOT 6|GOT 7|GOT 8|GOT 9|
lookatme m: my Channel $ch .= new; $ch.Supply.tap( { say $_; } ); ^10 .map({$ch.send($_)}); $ch.close() 03:05
camelia 0
lookatme m: my Channel $ch .= new; $ch.Supply.tap( { say $_; } ); ^10 .map({$ch.send($_)}); $ch.close(); sleep 1;
camelia 0
lookatme Last one need sleep.
audiatorix ah okay that works 03:07
lookatme audiatorix, or use poll, non-blocking receive method 03:08
There is a example about poll: docs.perl6.org/type/Channel#method_poll
^^ audiatorix
audiatorix Hmm, looks like I might be able to just use a Supply in the first place 03:09
Basically the structure I want is messages coming in from an arbitrary number of sockets and all being processed in the same place, regardless of source 03:10
But the processing needs to be decoupled from the receiving/sending
So it seems like Channel is appropriate 03:11
but maybe Supply works?
Am I right in saying that the two are the same other than the way they spit out values? 03:13
[Coke] ff 03:15
lookatme audiatorix, yeah, I think both works, you maybe need some flag mark the message and return value 03:24
03:27 Cabanossi left 03:29 Cabanossi joined 03:34 zakame left 03:36 vendethiel left, zakame joined
Geth doc: fdcab66da7 | (Will "Coke" Coleda)++ | 2 files
test Perl 6 code in python page

Part of #1387
doc: a51de99156 | (Will "Coke" Coleda)++ | 2 files
test the code in phasers doc.

Part of #1387
04:04 raschipi joined
Geth doc: 78b789ceb4 | (Will "Coke" Coleda)++ | 2 files
Run the few p6 tests we can on modules.pod6

Part of #1387
doc: d357d88ecc | (Will "Coke" Coleda)++ | doc/Language/rb-nutshell.pod6
... exports are cumulative in the test suite.

This is a bug, but skip this for now.
Part of #1387
04:16 zakame left 04:23 zakame joined
ryu0 I'm considering learning Perl6. The books I thought looked interesting aren't released yet. Any suggestions for where I should start? 04:37
raschipi Which is your level of understanding? Noob? Already know a language? 04:38
ryu0 raschipi: I guess, already know. But it's mostly procedural that I have experience with.
04:39 feng joined
raschipi What do you know? There are texts targeted at people comming from specific languages... 04:39
ryu0 In order of familiarity? C, Shell, AWK, C++, ... 04:40
Though i also did a fair amount of reading on functional, namely the languages Common Lisp and SML.
No prior perl experience. 04:41
I did some dabbling with Tcl and Python though...
raschipi Perl is a mashup of C, shell, AWK and C++, mostly. So it won't be a strange language. 04:42
Can you run a program already? Hello world is just:
ryu0 Lisp is the strangest language I ever tried to use.
raschipi m: say "Hello World!"
camelia Hello World!
ryu0 Huh. Reminds me of REXX. 04:43
raschipi Do you have rakudo installed?
ryu0 raschipi: no, but I can probably get something installed.
raschipi Start here, then: perl6intro.com/ 04:44
ryu0 i have a background with Linux packaging.
mostly how I became so familiar with shell scripts. haha
raschipi You can ask anything here, and /msg camelia and she will run snippets for you. 04:45
ryu0 raschipi: this looks good, but is there anything i can reference later to learn every facet of Perl6? I did that with C way back when...
not including mastery of the standard library though.
just the language if anything.
raschipi The reference is here: docs.perl6.org/
ryu0 Ok. Thank you. 04:46
raschipi It's not complete, devs are still working on it.
The type reference is almost more important than the language reference. 04:47
ryu0 Does the static typing also apply to user defined types?
The samples I saw only showed it with what looked like builtin/primitive types.
raschipi Yep, there's no difference between built in and user-defined types in Perl6 04:48
ryu0 Well, that's good. I've seen that limit language extensibility before.
Go, for example, makes it very difficult to make real data structures due to no generics. The closest thing is the builtin collections. 04:49
raschipi Well, Perl6 is written in Perl6. If you go look at the definitions of the "built-in" types, they are just types.
04:51 skids left, zakame left
raschipi Look at the Int definition in Rakudo: github.com/rakudo/rakudo/blob/nom/...ore/Int.pm 04:52
ryu0 m: 2.WHAT;
camelia ( no output )
ryu0 m: say 2.WHAT;
camelia (Int)
raschipi Except for the nqp, it's just a normal calss. Same for Arrays, Hashes, etc. 04:53
ryu0 Lisp style return values?
raschipi What do you mean? Sorry, I'm not familiar with Lisp. 04:54
ryu0 Where the last expression determines the return value of a function.
raschipi Yes, important for lambdas 04:55
Or can be done explicitly
ryu0 I saw that first attributed to Lisp, but maybe someone else was first.
04:57 zakame joined
raschipi That comes from RPN, or any other stack based processing 04:59
There's nowhere to put values, so they are pushed into the stack. The caller can then pop it. 05:00
Makes sense? 05:04
ryu0: Reuired reding from the docs: docs.perl6.org/type/Signature docs.perl6.org/type/Capture 05:06
lookatme :)
raschipi s/Reuired/Required/
lookatme perl6.org/resources/ Also, there are some learn resources 05:10
05:13 BenGoldberg left 05:15 feng left 05:17 https___GK1wmSU joined, https__GK1wmSU joined 05:20 https___GK1wmSU left, https__GK1wmSU left 05:21 xtreak joined 05:27 Cabanossi left 05:29 Cabanossi joined
b2gills m: my %distribution = a=> 0.3, b=> 0.4, c=>0.1, d=>0.2; say %distribution.Mix.roll 05:33
camelia Type check failed in binding; expected Int but got Rat (0.2)
in block <unit> at <tmp> line 1
b2gills I'm fairly sure Mix.roll used to work 05:34
raschipi committable6: help 05:35
committable6 raschipi, Like this: committable6: f583f22,HEAD say ‘hello’; say ‘world’ # See wiki for more examples: github.com/perl6/whateverable/wiki/Committable
raschipi committable6: f583f22,HEAD my %distribution = a=> 0.3, b=> 0.4, c=>0.1, d=>0.2; say %distribution.Mix.roll 05:36
committable6 raschipi, ¦f583f22: «d» ¦HEAD(7fdbb49): «Type check failed in binding; expected Int but got Rat (0.2)␤ in block <unit> at /tmp/tepLfrVLcc line 1␤ «exit code = 1»» 05:37
05:38 avalenn joined
raschipi committable6: releases my %distribution = a=> 0.3, b=> 0.4, c=>0.1, d=>0.2; say %distribution.Mix.roll 05:38
committable6 raschipi, gist.github.com/713f2398cc18871a02...01f931a412
raschipi b2gills: Yep, used to work 05:39
Geth ecosystem: YellowApple++ created pull request #355:
Add GLFW to ecosystem
05:50 wamba joined 05:52 khw left 06:09 avalenn left 06:11 avalokite joined 06:12 avalenn joined 06:18 lowbro joined, lowbro left, lowbro joined 06:23 raschipi left 06:29 wigner joined 06:30 faraco joined 06:33 wigner left 06:35 faraco left 06:43 faraco joined 06:46 nadim_ joined
Geth ecosystem: 6c7f447424 | (Ryan S. Northrup)++ (committed using GitHub Web editor) | META.list
Add GLFW to ecosystem

I'm new to this whole Perl 6 module thing. Please forgive me for anything I might've missed procedure-wise.
ecosystem: fd9e3c90c3 | lizmat++ (committed using GitHub Web editor) | META.list
Merge pull request #355 from YellowApple/patch-1

Add GLFW to ecosystem
lizmat clickbaits p6weekly.wordpress.com/2017/07/31/...r-smaller/ 06:52
06:54 nadim_ left
timotimo read it and can recommend 06:59
07:02 rindolf joined 07:07 wamba left 07:14 Cabanossi left, Cabanossi joined 07:20 mniip_ joined, mniip left 07:21 mniip_ is now known as mniip
faraco question, why rakudo praise the rational type it has? Compared to Perl 5's bigrat or Go Big, why having them as a native giving rakudo an edge over them in this aspect? 07:22
m: say 10 / 3 07:23
camelia 3.333333
faraco say 0.49 - 232
evalable6 -231.51
faraco m: say 0.49 - 232
camelia -231.51
faraco m: say .3 + .282
camelia 0.582
07:24 darutoko joined
faraco m: say (2/9 + 1/3 * 2 / 12).perl; 07:24
camelia <5/18>
07:24 jaldhar left 07:25 jaldhar joined
jeromelanteri nicqrocks Git::Wrapper remote repo choosed for follow perlpilot one (who has 35 commits more) has some bugs maybe for function "log". 07:26
lizmat www.reddit.com/r/perl/comments/6qs...to_perl_6/ # comments welcome :-) 07:30
07:35 zakharyas joined 07:57 zakharyas left, Cabanossi left 07:58 ChoHag joined 07:59 wamba joined, Cabanossi joined 08:03 jonas3 joined 08:06 xtreak left, xtreak joined 08:10 dakkar joined 08:11 xtreak left 08:20 domidumont joined 08:26 zakharyas joined
jeromelanteri what: |@x ?@x does ? i mean... what ? and | want to do when you see them in front of @x ? 08:26
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/XxP9KugSMC
Variable '@x' is not declared
at /tmp/XxP9KugSMC:1
------> 03|08⏏04@x ?@x does ? i mean... what ? and | wan
bisectable6 jeromelanteri, On both starting points (old=2015.12 new=15b2596) the exit code is 1 and the output is identical as well
jeromelanteri, Output on both points: «04===SORRY!04=== Error while compiling /tmp/L0wIqTeT5a␤Variable '@x' is not declared␤at /tmp/L0wIqTeT5a:1␤------> 03|08⏏04@x ?@x does ? i mean... what ? and | wan»
committable6 jeromelanteri, ¦6c (21 commits): «04===SORRY!04=== Error while compiling /tmp/704LwR9kbu␤Variable '@x' is not declared␤at /tmp/704LwR9kbu:1␤------> 03|08⏏04@x ?@x does ? i mean... what ? and | wan «exit code = 1»»
jeromelanteri hi hi 08:27
show_me: my @x = <a b c d e f>; say |@x;
m: my @x = <a b c d e f>; say |@x;
camelia abcdef
jeromelanteri m: my @x = <a b c d e f>; say ?@x; 08:28
camelia True
lizmat m: my @a = <a b c d e f>; dd @a; dd |@a
camelia Array @a = ["a", "b", "c", "d", "e", "f"]
Str @a = "a"
Str @a = "b"
Str @a = "c"
Str @a = "d"
Str @a = "e"
Str @a = "f"
jeromelanteri m: my @x = <a>; say ?@x;
camelia True
jeromelanteri m: my @x = <>; say ?@x;
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list
at <tmp>:1
------> 3my @x = <7⏏5>; say ?@x;
08:28 astj left
lizmat jeromelanteri: prefix | is the same as .Slip 08:28
08:29 Cabanossi left
jeromelanteri and... what is slip ? 08:29
08:29 astj joined, astj left, astj joined
zengargoyle m: my @x = < a b c >; my @y; @y.push: @x; say @y.perl; @y.push: |@x; say @y; 08:29
camelia [["a", "b", "c"],]
[[a b c] a b c]
08:29 Cabanossi joined
zengargoyle m: my @x = < a b c >; my @y; @y.push: @x; say @y.perl; @y.push: |@x; say @y.perl; 08:30
lizmat jeromelanteri: A Slip is a List that automatically flatten into an outer List (or other list-like container or iterable).
jeromelanteri: see docs.perl6.org/type/Slip
zengargoyle m: my @x = < a b c >; my @y; @y.push: @x; say @y.perl; @y.push: |@x; say @y.perl;
jeromelanteri so it is like .append for add a list to an other one list ?
camelia Resource temporarily unavailable
[["a", "b", "c"],]
[["a", "b", "c"], "a", "b", "c"]
jeromelanteri and ? is it for check if empty list or not ? 08:31
lizmat ? boolifies
its like !! in perl 5
jeromelanteri ok
08:31 domidumont left
jeromelanteri i'm reading th eGit::Wrapper module code.. 08:32
zengargoyle m: my @x = < a b c >; my @y; @y.push: @x; say @y.perl; @y.push: |@x; say @y.perl;say ?@x; say ?@y; my @z; say ?@z;
camelia [["a", "b", "c"],]
[["a", "b", "c"], "a", "b", "c"]
jeromelanteri ok 08:33
zengargoyle note second push did 3 items of @x, first push pushed whole @x as a single array.
jeromelanteri i see 08:34
zengargoyle also | is used a lot in function calls. foo(|%hash) or foo(|@args) makes like passing %hash or @array in perl 5. 08:35
perl 6 without the | would be like perl 5 foo(\%hash) foo(\@array) to pass as single item.
jeromelanteri zengargoyle, github.com/nicqrocks/p6-Git-Wrappe...rapper.pm6 08:38
method log has 2 arguments... 08:39
yes ?
github.com/nicqrocks/p6-Git-Wrapper but in the example, there is not.
does it mean that * go search for the one are in the run method ? but how? run method is not a constructor also... i missunderstand the logic. 08:41
zengargoyle jeromelanteri: the * before arguments means 'slurp'... log is like log(foo=>'bar', wiz=>'bang', 'something', 'else')
jeromelanteri ok 08:42
zengargoyle the foo=>'bar' and wiz=>'bang' go into *%n because they are named arguments. 'something' and 'else' go into *@p because they are not named arguments.
jeromelanteri so it is optional arguments?
it can be bothing. 08:43
zengargoyle pretty much. things inside function () are a little different meaning then outside. 08:44
08:45 faraco left
zengargoyle you can only have one *@ and one *%. the *% gets all foo=>'bar' or :foo('bar') or just :foo type arguments. 08:45
the *@ one 'slurps' up everything else...
jeromelanteri ok 08:46
zengargoyle the log() function doesn't really care about the args, it adds %n<date> to whatever you pass in, and then just sends them to the self.run('log', |@p, |%n) 08:47
08:47 vendethiel joined
zengargoyle so basically you pass log the same args you would pass to `git log` in the cli. `git log --pretty=yes` would be $git.log(pretty=>'yes') 08:49
something like that.
lookatme notice that foo => "bar" is a Pair 08:51
not a named argument
zengargoyle method run($subcommand, *@positionals, *%named) -- better names for arguments in this function, writer got lazy and used *@p and *%n in log() :)
jeromelanteri i'm trying to find how to see logs from a remote if you are not in a git directory.
lookatme so *%args won't work with (foo => "bar")
jeromelanteri --remotes option works, but from local git repo
zengargoyle really? 08:52
lookatme you have to write (:foo<bar>)
I found it when make my module
zengargoyle i thought it was the other way around and you had to do something special-ish to pass a Pair as a positional and not have it get slurped up into the named.... 08:53
lookatme m: sub f(*%args) { }; f(foo => "bar")
camelia ( no output )
lookatme m: sub f(*%args) { say %args.WHAT; }; f(foo => "bar")
camelia (Hash)
lookatme m: sub f(*%args) { say %args.WHAT; }; f(foo => "bar", fooz => "zyx")
camelia (Hash)
lookatme HMM ?
zengargoyle m: sub f(*%args) { say %args.foo; }; f(foo => "bar", fooz => "zyx") 08:54
camelia No such method 'foo' for invocant of type 'Hash'
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
lookatme It is not working on my pc
zengargoyle m: sub f(*%args) { say %args<foo>; }; f(foo => "bar", fooz => "zyx")
camelia bar
zengargoyle m: sub f(:$fooz, *%args) { say %args<foo>; say $fooz; }; f(foo => "bar", fooz => "zyx") 08:55
camelia bar
lookatme Oh, i know
it's "foo" => "bar"
m: sub f(*%args) { say %args.WHAT; }; f("foo" => "bar")
camelia Too many positionals passed; expected 0 arguments but got 1
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
lookatme yeah, not foo => "baz", sorry
zengargoyle ah, yeah. one of *those* types of gotcha... 08:56
lookatme But according the document docs.perl6.org/type/Pair#index-entry-%3D%3E_ 08:58
:foo<baz> is same as "foo" => "baz"
m: sub f(*%args) { say %args.WHAT; }; f(:foo<bar>)
camelia (Hash)
08:59 nadim_ joined
zengargoyle m: sub f(*%args) { say %args.WHAT; }; f("foo" => "bar",) 08:59
camelia Too many positionals passed; expected 0 arguments but got 1
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
zengargoyle m: sub f(*%args) { say %args.WHAT; }; f("foo" => "bar", "fooz" => "bar")
camelia Too many positionals passed; expected 0 arguments but got 2
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
lookatme And also, IDK what the different between foo => "baz" and "foo" => "baz"
I guess this is a bug
zengargoyle not sure if bug or just things inside () as function signarures or as paramater list when calling behave a little special. 09:00
lookatme m: sub f(*@ps) { say @ps>>.WHAT; }; f(:foo<bar>)
09:00 faraco joined
camelia Unexpected named argument 'foo' passed
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
lookatme m: sub f(*@ps) { say @ps>>.WHAT; }; f(foo => bar)
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
bar used at line 1. Did you mean 'VAR', 'bag'?
lookatme m: sub f(*@ps) { say @ps>>.WHAT; }; f(foo => "bar") 09:01
camelia Unexpected named argument 'foo' passed
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
lookatme m: sub f(*@ps) { say @ps>>.WHAT; }; f("foo" => "bar")
camelia (Array)
lookatme m: sub f(*@ps) { say @ps>>.&WHAT; }; f("foo" => "bar")
camelia [(Pair)]
lookatme m: sub f(*@ps) { say @ps>>.&WHAT; }; f(foo => "bar")
camelia Unexpected named argument 'foo' passed
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
09:01 rindolf left
lookatme I am confused 09:02
zengargoyle i think the 'named parameters' part of function define/call is special cased so things like multi-dispatch can be not-impossible. 09:03
09:03 faraco left
lookatme Or they just different in sub call ? 09:03
m: my \x = foo => "baz"; say x.WHAT; 09:04
camelia (Pair)
lookatme m: my \x = "foo" => "baz"; say x.WHAT;
camelia (Pair)
lookatme m: my \x = :foo<baz>; say x.WHAT;
camelia (Pair)
zengargoyle i sort of remember somebody explaining this to me once long ago... but don't remember the details. :/
09:05 xtreak joined
lookatme I would said, this is not a consistency design. 09:05
09:06 zakharyas left 09:13 zakame left 09:14 Cabanossi left
zengargoyle m: sub foo(:$foo,*@p) { say $foo; say @p; }; foo("foo"=>"bar"); 09:14
camelia (Any)
[foo => bar]
zengargoyle m: sub foo(:$foo,*@p) { say $foo; say @p; }; foo(foo=>"bar");
camelia bar
09:15 Cabanossi joined
zengargoyle m: sub foo(:$foo,*@p) { say $foo; say @p; }; foo((foo=>"bar")); 09:15
camelia (Any)
[foo => bar]
zengargoyle ^^ that's how you pass a foo=>"bar" but have it not be considered a named parameter....
lookatme yeah, that's what I mean, they should document that 09:17
09:18 eliasr joined
zengargoyle i think it's more that the 'skilled' p6 people just don't/wouldn't do it that way so it only comes up when somebody doesn't do it the common way that is documented. 09:19
but yeah, there are a few quirky things that need a "don't do this" in the docs. 09:21
lookatme This is the second thing I found they used same thing represent different syntax.
m: say 2(1); 09:24
camelia No such method 'CALL-ME' for invocant of type 'Int'
in block <unit> at <tmp> line 1
lookatme m: say :2(1);
camelia This call only converts base-2 strings to numbers; value 1 is of type Int, so cannot be converted!
in block <unit> at <tmp> line 1
zengargoyle i think that's a repurosing of an invalid thing into something useful. 09:26
09:26 kimmyleo joined
zengargoyle *repurposing 09:26
lookatme yeah, but not friendly to newbie 09:27
09:27 cpage_ joined
zengargoyle hrm, maybe not.. i guess it *could* be 2 => 1 .... 09:28
timotimo one reason that "foo" => "bar" isn't a named parameter is because names for parameters can only be identifiers and you could put anything between quotes, spaces for example
zengargoyle and :42nd *could* be '42nd' => True
lookatme zengargoyle, Hmm 09:29
zengargoyle guess timotimo logic also applies there.... :XXXX can't be "something" due to format of thing so is identifier and identifier can't start with number so :#XXX is most likely invalid. 09:31
09:31 xtreak left
zengargoyle and :XXX is really not a pair but a named, but outside of the () in calling, named just turns into pair, so it's convienent 09:32
zengargoyle thinks that's probably wrong... :) 09:33
09:34 kimmyleo left 09:45 zakharyas joined
zengargoyle i guess you could also argue that "foo" => "bar" can't be a named because it could be "foo$something". but :ident is fixed at compile time. 09:45
lookatme Hmm, I know that is construct a Pair 09:46
zengargoyle and foo => "bar" is fixed at compile time. well the key part.. 09:47
jnthn If the key is a syntactic identifier, and it's directly in an argument list, then it will be taken as a named argument. Otherwise it will be a Pair 09:48
"foo" => "bar" isn't a syntactic identifier, (foo => "bar") isn't directly in the argument list, nor is (:foo<bar>) 09:49
foo => "bar" and :foo("bar") are equivalent and, both have a key that is a syntactic identifier 09:50
zengargoyle does :ident<foo> promote to "ident"=>"foo" outside of an argument list. 09:53
jnthn That's the wrong way round 09:55
They're always a Pair, it's that they get promoted to named arguments when at the top level of an argument list 09:56
zengargoyle and does :2<> and :2nd not turn into pairs just for the convience?
ah, *nods* 09:57
jnthn :2nd is just :nd(2)
zengargoyle why not "2nd" => "True"
because not identifier?
jnthn Also because it'd not be very useful 09:58
Imagine trying to implement s:2nd/foo/bar/
zengargoyle that too...
jnthn Would have to take a slurpy hash and try to parse the number out of it
zengargoyle if the thing after the : can only be an identifer in the basic case, then it's all well and good to do things with the non-identifiers... :) 10:00
lookatme anyway, thanks
off work now
10:01 lookatme left
jnthn Yeah, anything non-identifier after it is a special form 10:01
zengargoyle puts sytatic identifier on the list of things. 10:11
10:12 Cabanossi left 10:13 TEttinger left 10:14 Cabanossi joined 10:18 mr-fooba_ left 10:25 mr-foobar joined 10:27 xtreak joined, xtreak left 10:28 xtreak joined 10:43 xtreak left 10:45 notbenh left, vendethiel left, xtreak joined 10:47 notbenh joined, xtreak_ joined 10:50 someuser joined 10:51 xtreak left 10:56 cpage__ joined, cpage_ left, cpage__ is now known as cpage_ 10:58 Cabanossi left 10:59 Cabanossi joined 11:12 xtreak_ left 11:15 robertle joined
lizmat I need inspiration for a Perl 6 presentation 11:15
what would *you* like me to give a Perl 6 presentation about? 11:16
AlexDaniel m: class Z { method foo($x) { say $x; say %_ } }; Z.new.foo(42, :25bar, :50baz)
camelia 42
{bar => 25, baz => 50}
AlexDaniel m: sub foo($x) { say $x; say %_ }; foo(42, :25bar, :50baz)
camelia 5===SORRY!5=== Error while compiling <tmp>
Placeholder variable '%_' cannot override existing signature
at <tmp>:1
------> 3sub7⏏5 foo($x) { say $x; say %_ }; foo(42, :25
sjn lizmat: "The speed nut's guide to making Perl 6 run faster"
AlexDaniel why is it different? ↑
sjn lizmat: stepping through an actual example on how to speed up something (which questions do you ask? what are you looking for? how do you profile it? how do you avoid common traps? when should you NOT optimize? etc.) 11:17
lizmat sjn: well, there's my dilemma 11:18
I'm cheating all of the time by using nqp
I'm not sure we want to have that wind up in user land minds
sjn lizmat: no worries; tell people how to cheat well. the goal is to create more people who can participate in the work :) 11:19
participate in a positive way, that is. 11:20
no point in teaching people how to leave behind a mess
11:20 Zoffix joined
Zoffix AlexDaniel: because methods already have %_ 11:21
lizmat: "The Iterables of Rakudo"
lizmat hmmm 11:25
Zoffix faraco, I'd say it's 'cause you don't need to know about floating point issues. The first time I was told to keep prices as Ints in another language, I said "what the hell?". 11:26
In Rakudo, you Do The Right thing by default 11:27
"The 3 most important things missing from Perl 6?": www.reddit.com/r/perl/comments/6qv..._name=perl
11:28 Cabanossi left 11:29 Cabanossi joined
tbrowder m: say 'a'.chr 11:32
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)
in block <unit> at <tmp> line 1
Zoffix .chr convers from number to character; you likely want .ord
timotimo m: say 'a'.ord
camelia 97
tbrowder say '00110011'.chr 11:33
evalable6 𚶻
Zoffix m: say +'00110011' 11:34
camelia 110011
moritz m: say :2('00110011') 11:35
camelia 51
tbrowder m: say '01100110'.chr
camelia 􌥎
Zoffix Looks like another item for my inconsistencies doc. .chr takes a Str and converts it to Numeric, but
base doesn't
moritz m: say 42.base('2') 11:37
camelia 101010
tbrowder m: say '00110011'.chr 11:38
camelia 𚶻
Zoffix m: say '42'.base: 2
camelia No such method 'base' for invocant of type 'Str'. Did you mean any of these?

in block <unit> at <tmp> line 1
Zoffix tbrowder: it's not parsing it as base 2 number. Just a normal decimal
tbrowder hi folks, just looking for method to convert ascii binary to char 11:39
moritz Zoffix: ah, that's because people used to confuse the method with its opposite
zengargoyle lizmat: audience? i wouldn't mind a "State of the Butterfly" that went over new things between 6.c and now and 6.d preview and in progress. 11:40
moritz tbrowder: :2($string).chr
Zoffix tbrowder: .parse-base(2).chr
moritz m: $string = '11011'; say :2($string)
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$string' is not declared. Did you mean 'Stringy'?
at <tmp>:1
------> 3<BOL>7⏏5$string = '11011'; say :2($string)
moritz m: my $string = '11011'; say :2($string)
camelia 27
moritz m: my $string = '11011'; say :2($string); say :2($string).chr
camelia 27
moritz m: my $string = '111011'; say :2($string); say :2($string).chr 11:41
camelia 59
Zoffix zengargoyle: that's gonna be a rather short talk, considering the vast majority of 6.d language features were implemented in 6.c compiler and are in use 11:42
like .parse-base I mentioned above
m: '111011'.parse-base(2).chr.say
camelia ;
tbrowder m: say :2('01000100').chr 11:43
camelia D
11:43 nattefrost joined
tbrowder thanks all! 11:43
Zoffix m: my $string = '0xDEADBEEF'; say :2($string) 11:44
camelia 3735928559
zengargoyle well, i'm thinking more in the whole... like the 'has is default' and the IO changes and the speed improvements, like jnth's dive into reading lines.
Zoffix Ah 11:45
lizmat Something like "2.5 years of Perl 6 Weekly"