»ö« 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.
00:06 bjz joined 00:07 bjz left 00:08 bjz joined
SmokeMachine Should 'class C { method ^bla {...} }' create a method on the C's meta class? 00:15
Today it's giving error... 00:16
m: class C {method ^bla {...} }
camelia ( no output )
SmokeMachine Or not...
m: class C {method ^bla {...} }; C.new 00:17
camelia ( no output )
SmokeMachine m: class C {method ^bla {...} }; C.^bla
camelia rakudo-moar 266f34: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method bla at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
SmokeMachine 22:17 <SmokeMachine> m: class C {method ^bla(|) {...} }; C.new 00:18
m: class C {method ^bla(|) {...} }; C.new
camelia ( no output )
SmokeMachine m: class C {method ^bla(|) {...} }; C.^ bla 00:19
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3class C {method ^bla(|) {...} }; C.^7⏏5 bla␤»
SmokeMachine m: class C {method ^bla(|) {...} }; C.^bla
camelia ( no output )
SmokeMachine m: class C {method ^bla(|) {...} }; say C.^bla
camelia rakudo-moar 266f34: OUTPUT«Stub code executed␤ in method bla at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
SmokeMachine m: role R {method ^pun(|) {die "worked"} }; say R.^pun 00:21
camelia rakudo-moar 266f34: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in multi (did you mean 'my method pun'?)␤ at <tmp>:1␤ ------> 3role R {method7⏏5 ^pun(|) {die "worked"} }; say R.^pun␤(R)␤»
SmokeMachine That wasn't with class, but with role...
m: role R {method ^bla(|) {die "worked"} }; say R.^bla 00:22
camelia rakudo-moar 266f34: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in multi (did you mean 'my method bla'?)␤ at <tmp>:1␤ ------> 3role R {method7⏏5 ^bla(|) {die "worked"} }; say R.^bla␤No such method 'bla' for invocant of type 'Perl…»
SmokeMachine 22:21 <SmokeMachine> m: role R {method ^bla(|) {die "worked"} }
m: role R {method ^bla(|) {die "worked"} } 00:23
camelia rakudo-moar 266f34: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in multi (did you mean 'my method bla'?)␤ at <tmp>:1␤ ------> 3role R {method7⏏5 ^bla(|) {die "worked"} }␤»
SmokeMachine Should that work on roles? 00:29
00:31 Sgeo joined 00:33 pyrimidine left 00:34 pyrimidine joined 00:39 pyrimidine left 00:41 aindilis joined 00:43 kyan joined 00:56 ssotka left 00:57 ssotka joined 01:02 jraglin left, m0ltar joined 01:06 FiveBroDeepBook joined, FiveBroDeepBook left, aborazmeh joined, aborazmeh left, aborazmeh joined 01:21 ChoHag joined 01:32 bjz left 01:43 mspo joined
mspo has anyone tried using these dart benchmarks on moarvm? 01:44
dart seems to have a lot of superficial similarities (optional typing, at least) 01:45
01:46 AlexDaniel left 01:47 yqt left
mspo well a few 01:47
01:48 cdg joined 01:49 jeffythedragonsl joined
jeffythedragonsl hey 01:49
timotimo mspo: haven't seen the benchmarks from dart 01:50
jeffythedragonsl My pull request got merged!
mspo github.com/dart-lang/ton80
jeffythedragonsl: congrats 01:51
jeffythedragonsl Now that I know the process I wonder what else would be good to help with. There's that unit test and docs...
MasterDuke jeffythedragonsl: i think github.com/MoarVM/MoarVM/issues/513 would fix some rakudo bugs... 02:01
02:25 bjz joined, Actualeyes left 02:27 jeffythedragonsl left 02:36 pyrimidine joined 02:37 colomon_ joined 02:38 colomon_ left, colomon left 02:39 jeffythedragonsl joined, colomon joined 02:40 Actualeyes joined 02:41 pyrimidine left, CamdenLoch joined 02:43 CamdenLoch left, colomon left, bjz left 02:44 colomon joined
SmokeMachine m: multi trait_mod:<is>($role, :$punnable!) {say $role; say $role.HOW}; role R is punnable {}; say R; say R.HOW # why 2 different HOWs? 02:49
camelia rakudo-moar 266f34: OUTPUT«(R)␤Perl6::Metamodel::ParametricRoleHOW.new␤(R)␤Perl6::Metamodel::ParametricRoleGroupHOW.new␤»
SmokeMachine m: multi trait_mod:<is>($role, :$punnable!) {say $role; say $role.HOW; say $role.HOW.WHERE}; role R is punnable {}; say R; say R.HOW; say R.HOW.WHERE 02:51
camelia rakudo-moar 266f34: OUTPUT«(R)␤Perl6::Metamodel::ParametricRoleHOW.new␤140143513630816␤(R)␤Perl6::Metamodel::ParametricRoleGroupHOW.new␤140143485425656␤»
02:55 kalkin- left 02:56 kalkin- joined 02:57 pyrimidine joined 02:58 bjz joined
samcv is there much overhead to calling mysub(|Seq, $other_val) 02:59
it doesn't seem to be any faster than creating new variables and then sticking them in the function 03:00
apply-pv-to-range( |.split([';','#'], 3).».trim.head(2), True )
though it could be the head part is what is slowing it down
not sure. all i know it's slower than assigning to an array and then sticking @array[0] @array[1] in there 03:01
03:04 pyrimidine left 03:09 ssotka left 03:15 geekosaur left 03:16 geekosaur joined 03:21 cdg_ joined 03:22 aborazmeh left 03:23 cdg left 03:40 noganex joined, jeffythedragonsl left 03:43 noganex_ left 03:56 labster left
samcv is there a way to do `my ($var1, Nil, $var2) = .split(…)` 04:01
have like placeholder variables
like i don't want to assign it to anything, just to be padding since i don't want where i put Nil
geekosaur just use a sigil 04:04
m: my ($v1, $, $v2) = 1,2,3
camelia ( no output )
samcv ok thanks
will it assign anything to $+
err i mean $
m: my ($v1, $, $v2) = 1,2,3; say $; 04:05
camelia rakudo-moar 266f34: OUTPUT«(Any)␤»
samcv m: my ($v1, $, $v2) = 1,2,3 andthen say $;
camelia rakudo-moar 266f34: OUTPUT«(Any)␤»
timotimo every time you mention $ you get a different variable
m: say $++; say $++; say $++
camelia rakudo-moar 266f34: OUTPUT«0␤0␤0␤»
timotimo m: for ^5 {say $++; say $++; say $++}
camelia rakudo-moar 266f34: OUTPUT«0␤0␤0␤1␤1␤1␤2␤2␤2␤3␤3␤3␤4␤4␤4␤»
samcv so it does assign it somewhere? 04:06
timotimo anonymous state variables, those are
geekosaur no because $ is a special variable elsewhere
timotimo oh, in a signature bind it probably doesn't assign anything, yeah
and if it does, it should probably not do that for performance reasons
geekosaur each $ is an anonymous state variable bound to the place where it occurs, so each $ is independent of the others
samcv faster than my @parts = .split(…); my $whatever = @parts[2]; my $otherthing = @parts[1]
?
geekosaur and the one in the sigil does nothing
(except consume a value)
samcv kk
timotimo hopefully it's faster, but the way i know rakudo it's probably slower :P
benchable6: help 04:07
benchable6 timotimo, Like this: benchable6: f583f22,HEAD my $a = "a" x 2**16;for ^1000 {my $b = $a.chop($_)}
timotimo i think benchable also has a comparison mode?
aha! 04:09
04:09 jraglin joined
timotimo hm, or is compare about different versions? 04:09
ah, there it is! 04:12
benchable6: compare my ($a, $, $c) = "foo bar baz".words; ||| my ($a, $c); my \res := "foo bar baz".words; $a = res[0]; $c = res[2]; 04:13
benchable6 timotimo, ¦«my»:Cannot find this revision
timotimo benchable6: compare 2017.01 my ($a, $, $c) = "foo bar baz".words; ||| my ($a, $c); my \res := "foo bar baz".words; $a = res[0]; $c = res[2];
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/5b9456154012bf0a4c...bdda5f06d4
timotimo benchable6: compare 2017.01 for ^1000 { my ($a, $, $c) = "foo bar baz".words; } ||| for ^1000 { my ($a, $c); my \res := "foo bar baz".words; $a = res[0]; $c = res[2]; } 04:14
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/2f2c98661b80cab63a...9d4dbe0dfd
timotimo benchable6: compare 2017.01 for ^10000 { my ($a, $, $c) = "foo bar baz".words; } ||| for ^10000 { my ($a, $c); my \res := "foo bar baz".words; $a = res[0]; $c = res[2]; }
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/35ac6ed8a8220906b5...019bbff3a2
timotimo okay, so about a 30% difference between those two
but it seems like the first one is faster 04:15
so ... that's cool
04:16 cdg_ left
timotimo the QAST that comes out of it is pretty weird, though 04:17
it creates a scalar for the middle one that goes into a local variable 04:18
i wonder if the bindattr to the Scalar's $!value is actually needed at all?
gotta go sleep 04:19
maybe a more thorough analysis of this behaviour is warranted.
i mean the performance characteristics
not semantics or anything
samcv yeah 04:20
timotimo whateverable is cool. 04:21
nite! 04:23
04:25 ssotka joined 04:26 ssotka1 joined 04:30 ssotka left 04:33 sjohnson joined 04:35 Cabanoss- joined, pyrimidine joined 04:38 Cabanossi left, Cabanoss- is now known as Cabanossi 04:43 Juerd left, bjz left 04:46 Juerd joined 05:05 bjz joined 05:10 CIAvash joined 05:16 BenGoldberg joined, khw left 05:18 bjz left 05:20 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 05:22 aborazmeh joined, aborazmeh left, aborazmeh joined 05:26 Herby_ left 05:30 skids joined 05:37 faraco joined 05:54 FiveBroDeepBook joined, FiveBroDeepBook left 05:55 cibs left 05:57 cibs joined 06:15 ufobat joined 06:31 retupmoca joined 06:39 aborazmeh left 06:44 darutoko joined 06:45 wamba joined
masak today's neat trick: locally defining a `multi infix:<&&>(&l, &r)` that can AND together two predicates 06:45
m: multi infix:<&&>(&l, &r) { { &l($^x) && &r($x) } }; say True && 42; my &has-an-e = { so $^x ~~ /e/ }; my &five-chars = { $^x.chars == 5 }; say (&has-an-e && &five-chars)("perl6") 06:48
camelia rakudo-moar 266f34: OUTPUT«42␤True␤»
masak \o/
(in the code where I did this, I also overrode `prefix:<!>` in the same way. the result is wonderfully readable)
I love it when I go "gee, I wish this were possible", and Perl 6 rises to the challenge 06:49
06:53 llfourn left
BenGoldberg is thinking, I bet I could do that in C++, if I wanted. The code to accomplish that might be painful to look at, but the result would be cool. 07:05
faraco o/ 07:06
masak hm, something about it doesn't work, though
07:10 BenGoldberg left
masak oh; the above code doesn't actually distinguish a successful overriding from an unsuccessful one 07:15
I'm getting soft in later years <3
m: multi infix:<&&>(&l, &r) { { &l($^x) && &r($x) } }; say True && 42; my &has-an-e = { so $^x ~~ /e/ }; my &five-chars = { $^x.chars == 5 }; say (&has-an-e && &five-chars)("purl6") 07:17
camelia rakudo-moar 266f34: OUTPUT«42␤True␤»
masak yep; that means it didn't work :/
IMHO this is a bug we're seeing
07:20 Tonik joined
masak m: multi infix:<&&>(3, 4) { 42 }; say 3 && 4 07:28
camelia rakudo-moar 266f34: OUTPUT«4␤»
masak right.
that's probably pretty golf'd
ufobat what does $a === $b exactly mean? i think it is not checking wether it is the same "reference"? 07:36
m: my $a = 2; my $b=(4/2).Int; say so $a === $b
camelia rakudo-moar 266f34: OUTPUT«True␤»
masak ufobat: `==` means "same numerically"; `===` means "same type and value" 07:38
that is, `==` is tied to other numeric operations such as `+` and `>`
but `===` isn't; it tries to do a comparison based on type-and-value
ufobat i think == is clear to me 07:39
masak often it comes down to a reference comparison, but not in the case of Int, since Int is a value type
ufobat so === isnt working like is-deeply for objects?
masak nope
ufobat for objects ists basically is it the same object?
masak `eqv` works a bit like is-deeply, with caveats
faraco hmm, I don't really like "standards", but where can I find recommended Perl 6 coding style? 07:40
masak m: say [1, [2, 3], 4] eqv [1, [2, 3], 4]
camelia rakudo-moar 266f34: OUTPUT«True␤»
masak faraco: not sure such a style guide has ever been written; I could be wrong, though
ufobat can i say === is == or eq but without a numeric or stringy context?
masak faraco: maybe start with `perldoc perlstyle`? :) 07:41
ufobat: yeah, kinda
faraco oh, thanks
ufobat :D thanks!
masak ufobat: both `==` and `eq` do casting before comparison. `===` doesn't
faraco what is the equivalent of Perl `unlink $file if -f $file` in Perl 6? I'm stuck at f method not exist. 07:43
m: unlink 't' if -f 't' 07:44
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ f used at line 1␤␤»
ufobat m: "foo".IO.unlink 07:45
camelia ( no output )
ufobat .IO makes a "file" out of your string
faraco whoa nice, thank you.
ufobat so i'd say $file.IO.unlink if $file.IO.e 07:46
faraco I can't believe I missed this -docs.perl6.org/language/io 07:47
I keep searching for "file" instead..
thanks 07:48
07:52 faraco left 07:56 benjibenjibenji left, bjz joined 08:01 pyrimidine left, Wanderer68 left 08:02 Wanderer68 joined 08:07 BenGoldberg joined, ChoHag left 08:25 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 08:27 skids left 08:32 labster joined 08:41 BenGoldberg left 08:43 ssotka1 left 08:45 jjido joined 08:51 salv0 joined 09:03 ChoHag joined, rindolf joined
japhb masak: FWIW, IIRC the short-circuiting boolean operators && and || are coded at a "lower level", effectively acting as macros and not fully participating in (multi) dispatch. 09:08
09:40 jjido left 09:58 pyrimidine joined
ufobat i am so bad in writing README.md :/ 10:00
10:07 sena_kun joined 10:12 faraco joined 10:33 espadrine joined
masak japhb: yes, that quickly became clear to me too 10:48
japhb: what's not clear is where the imposibility rests, so to speak. is it by nature impossible to combine the short-circuiting semantics and ordinary multi dispatch/overriding? or is it a limitation in Rakudo as currently implemented? 10:49
also, thank you for not saying "macroish" :P 10:50
reflecting on it, it seems to be a conceptual impossibility 10:58
the two things at odds are
(a) default `infix:<&&>` codegens something that doesn't evaluate the rhs *at all* unless the lhs is truthy 10:59
(b) the user-defined multi assumes that we know the type of the rhs
11:02 TEttinger left
masak unrelatedly, today I found a use for the term `&` (anonymous undefined Callable) in some code :) 11:02
I belive I've used all of `$`, `@`, and `%` before
samcv i couldn't find any good documentation on giving subs as arguments to a routine 11:03
11:03 bjz_ joined
masak samcv: do you have a specific question? 11:03
samcv yes
Geth doc: 27931defe4 | Altai-man++ | doc/Type/UInt.pod6
Expand UInt example (fixes github.com/perl6/doc/issues/1173)
11:04 bjz left
masak samcv: great! 11:04
samcv idk i want to have a routine where i supply an anonymous sub as an argument, to process a sequence
and want to know the fastest optimized way to do it 11:05
masak m: sub foo(&c) { say "so fast!"; &c("optimized") }; foo { say "so $^attribute!" } 11:06
camelia rakudo-moar 266f34: OUTPUT«so fast!␤so optimized!␤»
masak m: sub foo(&c) { say "so fast!"; &c("optimized") }; foo sub { say "so $^attribute!" }
camelia rakudo-moar 266f34: OUTPUT«so fast!␤so optimized!␤»
masak m: sub foo(&c) { say "so fast!"; &c("optimized") }; sub named { say "so $^attribute!" }; foo &named
camelia rakudo-moar 266f34: OUTPUT«so fast!␤so optimized!␤»
masak m: sub foo(&c) { say "so fast!"; &c("optimized") }; sub named($attribute) { say "so $attribute!" }; foo &named 11:07
camelia rakudo-moar 266f34: OUTPUT«so fast!␤so optimized!␤»
samcv can that get inlined easily?
masak oh yes, very easily
11:07 ggoebel left
samcv great 11:07
masak practically inlined already
samcv very good
IOninja m: my %h := set <a b c>; dd %h
camelia rakudo-moar 266f34: OUTPUT«set("a","c","b")␤»
gfldex samcv: blocks are almost always inlined
IOninja m: sub foo(&c) is pure { say "so fast!"; &c("optimized") }; sub named($attribute) is pure { say "so $attribute!" }; foo &named 11:09
camelia rakudo-moar 266f34: OUTPUT«WARNINGS for <tmp>:␤Useless use of "foo &named" in expression "foo &named" in sink context (line 1)␤so fast!␤so optimized!␤»
masak .oO( performances of Starlight Express are almost always inlined ) :P
samcv i need the fastest way to do something like this sub slurp-lines2 ( Str $filename, &sub ) { 11:12
&sub($_) for "$UNIDATA-folder/$filename.txt".IO.lines; 11:13
}
don't want the sub called for every line
that doesn't seem the best way to do it
or it could be fine, idk 11:14
are there better ways to process sequences than a for loop
IOninja what do you mean you don't want the sub called for every line? 11:15
samcv well i sort of do, i mean i don't want overhead
i want to provide it with a sub to process a sequence
in the fastest possible way 11:16
SmokeMachine m: multi trait_mod:<is>($role, :$punnable!) {say $role; say $role.HOW}; role R is punnable {}; say R; say R.HOW # why 2 different HOWs?
camelia rakudo-moar 266f34: OUTPUT«(R)␤Perl6::Metamodel::ParametricRoleHOW.new␤(R)␤Perl6::Metamodel::ParametricRoleGroupHOW.new␤»
samcv since it's very performance sensitive
11:16 eroux joined
gfldex samcv: you could deal with the iterators yourself but that would upset roast 11:16
11:17 labster left
samcv upset roast? 11:17
IOninja iterators?
samcv: you could just read the file once and keep it in RAM
oh, the filename is also passed 11:18
samcv that's not really an issue with speed
showed about the same speed reading into ram then calling lines on that versus calling lines on the IO::Path
IOninja Yeah, I thought there was only one file. 11:19
11:19 ggoebel joined
IOninja You could try marking both subs as is pure and see if you still get right results. 11:21
IOninja &
11:22 sena_kun left 11:27 rindolf left
Geth ecosystem: ufobat++ created pull request #297:
Added XML::XPath
11:28
ecosystem: 4e0e9da7c6 | (Martin Barth)++ | META.list
Added XML::XPath (#297)
11:29
11:30 sena_kun joined 11:32 GauravArya joined
GauravArya Hi 11:32
IOninja SmokeMachine: roles are like multies. So you get the Group how handling group of individual roles. 11:33
GauravArya: hi
GauravArya Hey ninja..thanks.. how are you..
its my first time here, just checking it out.. i am too exicited about perl6 :D 11:34
IOninja SmokeMachine: it was you who were trying to wrap a sub, wasn't it? And you couldn't 'cuase you were calling it on sub {}.... instead of the name which gave you just that sub instead of the "group" or whatever it's called. Same effect with roles
m: my $x = sub foo {}; say $x; say &foo
camelia rakudo-moar 266f34: OUTPUT«sub foo () { #`(Sub|72719504) ... }␤sub foo () { #`(Sub|72719656) ... }␤»
11:35 mln joined 11:38 mln left
IOninja m: multi trait_mod:<is>($role, :$punnable!) {say $role; say $role.HOW}; role R is punnable {}; say R; say R.^candidates 11:38
camelia rakudo-moar 266f34: OUTPUT«(R)␤Perl6::Metamodel::ParametricRoleHOW.new␤(R)␤((R))␤»
IOninja m: role R {}; role R[Int] {}; say R.^candidates 11:39
camelia rakudo-moar 266f34: OUTPUT«((R) (R))␤»
11:42 AlexDaniel joined
samcv hmm i'm getting an error about "useless use of thechlachlrceherce" basically all the code in the block i gave to the sub. but it seems to work 11:44
IOninja m: my %set is SetHash = <a b c d>; 11:45
camelia rakudo-moar 266f34: OUTPUT«Cannot modify an immutable SetHash␤ in block <unit> at <tmp> line 1␤␤»
IOninja m: my %set is SetHash; %set<a b c d>»++; dd %set
camelia rakudo-moar 266f34: OUTPUT«SetHash.new("a","c","b","d")␤»
IOninja m: my %set := set <a b c d>; 11:46
camelia ( no output )
samcv well actually didn't work for all of them. weird 11:47
IOninja This reminds me. I think our docs are still outdated for the (^) operator. I don't recall them updated after this PR: github.com/rakudo/rakudo/pull/934 11:48
m: my $a = bag <a a a b c>; my $b = bag <a z y>; say [ ($a ∖ $b) ∪ ($b ∖ $a), $a (^) $b ] 11:49
camelia rakudo-moar 266f34: OUTPUT«[bag(a(2), c, b, y, z) bag(a(2), c, b, y, z)]␤»
11:50 faraco left
IOninja mc: my $a = bag <a a a b c>; my $b = bag <a z y>; say [ ($a ∖ $b) ∪ ($b ∖ $a), $a (^) $b ] 11:50
committable6 IOninja, ¦«2015.12»: [bag(a(2), c, b, y, z) set(c, b, y, z)]
IOninja Oh. The docs were wrong before the PR :P and now seem right
Geth doc: 895ddcb86d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Routine.pod6
we start headings with a capital
11:51
doc: d8c3b05601 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Routine.pod6
link to MMD
doc: b3be33c6d2 | (Wenzel P. P. Peppmeyer)++ | doc/Language/glossary.pod6
link to Sub and Method
gfldex IOninja: Geth seams not to translate realnames to nicks. Is that intentional? 11:52
IOninja gfldex: it just uses whatever GitHub gives it, whereas dalek used the CREDITS file 11:53
gfldex I found the latter useful.
IOninja Someone needs to add that feature. 11:54
Source: github.com/perl6/geth
gfldex Today that wont be me as I got a cold and will head back to bed soon.
IOninja is busy being the IOninja... 11:55
SmokeMachine IOninja: so how should it use meta methods? Should it?
gfldex IOninja: would a TODO.txt be welcome? 11:56
IOninja gfldex: with just a credits feature? Opening an Issue seems easier
gfldex I don't really like the dependence on github for keeping track of bugs and requests. It's not controlled by a foundation or any other public entity. 12:00
masak GauravArya: welcome! 12:01
12:01 FiveBroDeepBook joined, FiveBroDeepBook left
masak GauravArya: we're all excited about Perl 6! :D 12:02
12:02 RabidGravy joined 12:03 patrickz joined
IOninja m: sub x { .<a b c> = <1 2 3> with {} }; dd x 12:06
camelia rakudo-moar 266f34: OUTPUT«(IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"))␤»
IOninja Is there a way to somehow make an anon hash I can slice-assign to and return? 12:07
m: sub x { my %h; %h<a b c> = <1 2 3>; %h }; dd x
camelia rakudo-moar 266f34: OUTPUT«Hash %h = {:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c(IntStr.new(3, "3"))}␤»
IOninja ^ like that by without all the mys
m: sub x { %(<a b c> X=> <1 2 3>) }; dd x 12:08
camelia rakudo-moar 266f34: OUTPUT«Hash % = {:a(IntStr.new(3, "3")), :b(IntStr.new(3, "3")), :c(IntStr.new(3, "3"))}␤»
IOninja <3 Perl 6
Oh, I meant Z=> :)
AlexDaniel
.oO( what about perl 7 )
12:11
IOninja I'm finished with it :) 12:12
GauravArya Thanks masak
AlexDaniel but… shouldn't programming languages evolve over time or something? xS 12:13
IOninja Nah, it's eternally perfect now. 12:14
GauravArya the data dumper output of perl6 is very different.
what does :a, :b, :c signify
IOninja GauravArya: a => True, b => True, c => True
SmokeMachine IOninja: I'm just trying to fix the role {method ^its-not-multi{}} problem
samcv m: say (:a).perl
camelia rakudo-moar 266f34: OUTPUT«:a␤»
samcv m: say (:a).say
camelia rakudo-moar 266f34: OUTPUT«a => True␤True␤»
samcv err put two says in there
IOninja GauravArya: it's a different language from Perl 5.
SmokeMachine: wasn't following so not sure what problem that is :) 12:15
RabidGravy Moo!
IOninja m: if ("0") { print "Perl 6\n" } else { print "Perl 5\n" } 12:17
camelia rakudo-moar 266f34: OUTPUT«Perl 6␤»
IOninja GauravArya: ^ that would print "Perl 5" if ran in Perl 5 :)
So even such basics as whether "0" is true are different 12:18
gfldex GauravArya: see docs.perl6.org/language/glossary#i...Colon_Pair 12:19
GauravArya: colon pairs are mostly meant to be used as optional arguments but can be a shortcut to create a Pair too. 12:20
SmokeMachine m: role R {method ^bla(|) {say "worked"} } # IOninja: this
camelia rakudo-moar 266f34: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in multi (did you mean 'my method bla'?)␤ at <tmp>:1␤ ------> 3role R {method7⏏5 ^bla(|) {say "worked"} } # IOninja: thi␤»
GauravArya IOninja: yes. getting the hang of it.. :) 12:22
12:23 brabo joined
GauravArya gfldex: thanks for the doc link.. i came across this syntax, but it was in my pipeline to be looked up, one by one.. 12:23
must say, pretty neat shorthand.. 12:25
the colon pair..
IOninja Yup 12:26
samcv well i got it like 10% faster 12:27
IOninja m: dd [ :42posint, :num(65.3), :list<a b c>, :str<meows>, :hash{:42a}, :code{;} ]
camelia rakudo-moar 266f34: OUTPUT«[:posint(42), :num(65.3), :list(("a", "b", "c")), :str("meows"), :hash({:a(42)}), :code(-> ;; $_? is raw { #`(Block|52940440) ... })]␤»
samcv now in the for loop there's only one line, nested functions and such
apply-pv-to-range2( |$range-str.split('..').map( { hex $_ } ), ....
and that split can return either one or two values, depending on if it's a single value or a range 12:28
so i have a multi and redirects which it goes to
12:30 confundus joined
gfldex GauravArya: it's not just a shorthand. see docs.perl6.org/language/subscripts#:exists 12:30
GauravArya: here is the implementation github.com/rakudo/rakudo/blob/nom/...ice.pm#L69
samcv kind of overkill though 12:31
i gotta go to bed. night all! o/
12:32 llfourn joined, GauravArya left 12:38 GauravArya joined
timotimo samcv: any reason you can't .map(&hex) instead? 12:39
is that because hex is a multi that can take two arguments and map would grab two items from the iterator? 12:40
GauravArya gfldex: what does this mean? '%h<a b c> = <1 2 3>' 12:41
12:41 jraglin left
Geth doc: 27c280a81f | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6
doc ~~ on Set/Bag
12:41
gfldex GauravArya: the left side selects the pairs behind the keys <a b c> and the right side assigns values. The Hash will autovivify if needed. 12:42
IOninja m: class Foo {}; say Foo.new ~~ Foo.new 12:43
camelia rakudo-moar 266f34: OUTPUT«False␤»
IOninja m: say [1, 2] ~~ [1, 2]
camelia rakudo-moar 266f34: OUTPUT«True␤»
gfldex GauravArya: <foo bar> is a list literal, those can be used in quite a few spots
IOninja m: say [1, 2] === [1, 2] 12:44
camelia rakudo-moar 266f34: OUTPUT«False␤»
gfldex .oO( Some equal things are more equal then others. )
IOninja The "Any:D -> object identity" for smartmatch isn't accurate. I think value types are checked for equivalence, and that'd subsume Setties, Baggies, and Mixies, along with Lists and Maps (and Seqs?) 12:45
m: say (1, 2).Seq ~~ (1, 2).Seq
camelia rakudo-moar 266f34: OUTPUT«False␤»
12:45 eroux left
IOninja m: say (1, 2).Bag ~~ (1, 2).Mix 12:45
camelia rakudo-moar 266f34: OUTPUT«True␤»
IOninja And Bag is a degenerate Mix and Set is a degenerate Bag 12:46
m: say (1, 2).Bag ~~ (1, 2).MixHash
camelia rakudo-moar 266f34: OUTPUT«True␤»
IOninja hm
GauravArya gfldex: i see. i got the %h<a b c>=<1 2 3> part.. but why the sub is defined as my %h, then the populate part, and then %h again before sub ends. didn't understand this sequence.
timotimo the last part is because they want the hash itself to be returned by the sub 12:47
m: my %h; dd %h<a b c> = <1 2 3> 12:48
camelia rakudo-moar 266f34: OUTPUT«(IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"))␤»
timotimo when you just output the result of that whole assignment, it's just a list of the things you put in
rather than the hash that they got assigned into
gfldex GauravArya: In Perl * the last statement of a Block or Routine is the return value. We do have the explicite return and return-rw statements that fire control exceptions on top of returning a value. 12:50
timotimo i'm not sure "fire control exceptions" is a good way to explain that to someone who is new to the language :) 12:51
IOninja :)
12:52 GauravArya_ joined
IOninja वापसी पर स्वागत है 12:53
timotimo just know that "return" behaves like you'd expect - with the exception that it only returns from things with "sub" or "method"
12:53 GauravArya left
GauravArya_ IOninja: thanks man.. where did you learn that from.. 12:53
IOninja GauravArya_: google translate :} 12:54
GauravArya_ IOninja: hehe.. cool.. i was very surprised to see some hindi text as i was not expecting it.. :P
gfldex timotimo: it's not but it will put something in the back of his mind that might pop up when he needs it 12:55
GauravArya_ timotimo: i need to dig deeper.. its just that there are too many new things and I can't seem to stick to one and keep bobbing around all of them.. i now need to pick some and sit with them.. 12:56
timotimo yeah, i can imagine that :)
there are a whole lot of interconnections, and places where the same underlying concept shines through, though
that could make learning progress much quicker .. maybe 12:57
i haven't had to learn perl6 from scratch for a long time :(
GauravArya_ I mean i have been doing perl5 for some time, as I use it on a daily basis on my day job.. so for now, i am starting with looking to translate stuff which i like to do, but with perl6 12:58
gfldex in that last halve year about 50% of my doc commits read: link X to Y
and there is still plenty of work to do
IOninja Personally, I found Perl 6 very frustrating when I was trying to translate my Perl 5 into Perl 6. In particular trying to pass arguments to subs. I advocate forgetting Perl 5 entirely while learning Perl 6. 13:00
El_Che IOninja: I find the migration from Perl5/Moo(se) to Perl6 very gradual
13:00 confundus left
IOninja m: some-sub (1, 2, 3), (4, 5, 6), (7, 8, 9) <- 9 args in Perl 5, but only 3 args in Perl 6 13:01
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3sub (1, 2, 3), (4, 5, 6), (7, 8, 9) <- 97⏏5 args in Perl 5, but only 3 args in Per␤ expecting any of:␤ infix␤ infix stopper␤ …»
IOninja oops, didn't mean to m:
GauravArya_ we don't have rakudo star for solaris, do we? 13:02
El_Che IOninja: yeah, but perl5 is the odd duck here. Most other languages behave like perl6.
RabidGravy yeah nearly everything I have made which has an equivalent in Perl 5 has been a rewrite from the ground up
timotimo giving yourself selective amnesia is a thing that humanity needs to figure out with science. we want that stuff! for reasons!
El_Che GauravArya_: no, I gave it a go (rakudo, not star) but I got stuck on libuv
GauravArya_: libuv compiled, but tests failed
RabidGravy: rewrite is something one does when looking at the code after a long time 13:03
"refactoring" :)
13:03 cdg joined
timotimo i imagine changing perl5 code to perl6 is scary, because you will be deleting so much 13:04
RabidGravy no I'm more of a continuous refactoring kind of person
GauravArya_ guys, just one question. how do I make an account so that I can login automatically so that I could skip the robocop 13:06
timotimo for IRC?
GauravArya_ yed
IOninja GauravArya_: get a proper IRC client, like HexChat (google for it)
timotimo there's multiple stages to automatically getting logged in :)
if you're more the console type, i'd recommend weechat 13:07
IOninja the freenode web chat we have a link to on our docs site has a very annoying captcha that you always get when you're on a not-very-trusted network
timotimo and if you have a server somewhere where you often ssh into, you can run weechat in a tmux session on that
oh, that explains it
13:08 pyrimidi_ joined, pyrimidine left
El_Che s/weechat/irssi/ ; s/tmux/screen/ if you're slightly older :) 13:09
IOninja heh
IOninja runs weechat in a screen
El_Che middleage!
moritz is slightly annoyed that mosh doesn't have a good SSH agent forwarding approach 13:10
13:11 GauravArya_ left
timotimo El_Che: i see no reason why old people should use inferior software :) 13:11
El_Che timotimo: we are set in our ways and we don't know better :) 13:12
IOninja :)
El_Che I gave weechat a go not so long ago
13:12 GauravArya joined
El_Che I saw no reason to use it instead of irssi 13:12
GauravArya I will be back.. on Wee chat.. browser is notworking out..
See you later guys. And Thank you so much for answering my questions. I like it here. 13:13
El_Che see you
13:13 GauravArya left 13:14 retupmoca left
sena_kun anyone who is willing to review github.com/perl6/doc/pull/1187? 13:16
13:16 nhywyll joined
Geth doc: 1619a0683c | (Wenzel P. P. Peppmeyer)++ | doc/Language/list.pod6
fix example
13:17
doc: cdc953a23b | (Wenzel P. P. Peppmeyer)++ | doc/Language/list.pod6
link to Seq
13:19 Brumbazz joined
moritz lol I blug: perlgeek.de/blog-en/perl-6/2017-00...rrors.html 13:20
timotimo moritz: took me a second to realize that you don't blog about 007 :D
Brumbazz Hi guys :> I'm trying to install perl6 on my ubuntu machine. However no matter where I look, I see I have to install Parrot(VM). My question is, why is that nessecary ? Is perl6 run in a different way than previous versions ? Thanks in advance :> 13:21
moritz timotimo: :-)
masak moritz: I read the URL and went "huh! there are parse errors in the 007 book? waitjustaminute!" 13:22
timotimo well, for one, if you're required to install parrot, you're already getting a version that's far too outdated to be of any use
moritz Brumbazz: if you find installation instructions that talk about paart, they are outdated
robertle Brumbazz: github.com/tadzik/rakudobrew is what many people use, I guess the pages talking about parrot are jhust a bit outdated....
moritz these days, Rakudo Perl 6 runs on MoarmVM
timotimo but yeah, perl6 is run in a different way than previous perls. you can run it either with our own VM, which is MoarVM, or with JVM (though there are currently problems with that if i recall correctly)
Brumbazz ah ok, thanks :> So perl6 runs on a VM like Java ? 13:24
moritz timotimo, masak: just sequential numbering
Geth doc: 3cef368034 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6
fix example
doc: 02a3832889 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6
fix example
El_Che Brumbazz : I provide rakudo debs here: github.com/nxadm/rakudo-pkg/releases
moritz Brumbazz: basically all dynamic languages run on some sort of VM
Brumbazz: Perl 5, Python, Ruby, ... 13:25
Brumbazz El_Che: ahh that's awesome :D
moritz Brumbazz: they just start them on demand in the background, like Rakudo does too
El_Che Brumbazz: you can als install rakudo star (compile rakudo locally): rakudo.org/downloads/star/
moritz Brumbazz: and often the VM and the compiler are very intermingled
El_Che rakudo star compiles rakudo locally
13:26 cdg left
Brumbazz moritz: ahá, cool thanks :> 13:27
thanks El_Che :>
I'll try it out :>
13:27 nhywyll left 13:32 nhywyll joined
RabidGravy .seen tadzik 13:34
yoleaux I saw tadzik 7 Feb 2017 07:25Z in #perl6: <tadzik> samcv: hmm, I think it's the first time I see it and like it
13:37 nhywyll left, nhywyll joined, robertle left
RabidGravy .tell tadzik there may be a PR on JSON::Unmarshal later so that null in the JSON doesn't break assignment to a typed atrribute 13:43
yoleaux RabidGravy: I'll pass your message to tadzik.
13:43 mscha joined
mscha m: my @a = 2,3; my @b = 4,5; @a = @a X* @b; say @a; # This DWIM, but ... 13:44
camelia rakudo-moar 266f34: OUTPUT«[8 10 12 15]␤»
mscha m: my @a = 2,3; my @b = 4,5; @a X*= @b; say @a; # ... should't this do the same?
camelia rakudo-moar 266f34: OUTPUT«[40 60]␤»
timotimo why would it make @a bigger? 13:45
you're essentially running @a[0] *= @b
sorry
you're essentially running @a[0] *= @b[0]; @a[0] *= @b[1]; @a[1] *= @b[0]; @a[1] *= @b[1]
RabidGravy probably just "multi _unmarshal(Any:U, Mu:U $type) { $type }"
AlexDaniel I'm surprised it works, by the way! :) 13:46
mscha I was assuming that @a = @a op @b would be equivalent to @a op= @b. Why isn't it?
timotimo you're Xing that op
oh!
you're assuming a different bracketing from me
m: my @a = 2,3; my @b = 4,5; @a [X*]= @b; say @a;
camelia rakudo-moar 266f34: OUTPUT«[8 10 12 15]␤»
timotimo there you go 13:47
mscha Ah, that's it, thanks.
timotimo it was doing X[*=] instead
13:47 yqt joined 13:49 ufobat left, ufobat joined
Geth doc: 0add03ee51 | Altai-man++ | doc/Type/Str.pod6
Correct input types for some adverbs
13:49
moritz m: say (-5) % 256 13:51
camelia rakudo-moar 266f34: OUTPUT«251␤»
13:59 rindolf joined 14:02 lukaramu joined
Brumbazz . 14:02
14:02 Brumbazz left 14:03 cdg joined 14:06 cale2 joined
cale2 hey, whoever does the p6weekly, I wrote a quick script to scrape reddit.com/r/dailyprogrammer for perl6 solutions 14:07
14:08 mscha left
cale2 It might be worthwhile to show some of the solutions 14:08
moritz cale2: you should blog about those solutions, then the p6weekly editors can simply link to your blog :-)
timotimo that'd be nice :) 14:09
i'll be writing the weekly again tomorrow
moritz generates pretty tree maps in Perl 6, to visualize directory usage 14:10
timotimo neat :)
El_Che timotimo: can you mention syntatic-perl6 (vim syntax error checking)?
timotimo: the new part is that it uses the new JSON error output of rakudo 14:11
timotimo yup!
El_Che timotimo: I hope I get some input before I send it upstream to syntastic 14:12
cale2 Right now I'm just outputting the results to a markdown file 14:16
it seems there's only a couple users that use perl6 for solutions 14:17
here's one: www.reddit.com/r/dailyprogrammer/c...ng/dd8fd2i
and another: www.reddit.com/r/dailyprogrammer/c...th/ddezgqo
Geth doc/tilde-explanation: b6a62da38a | Altai-man++ | doc/Language/regexes.pod6
Draft of tilde character explanation
14:18
timotimo you could run it with cron and upload results to a github repository? :) 14:21
14:22 wamba left 14:23 pyrimidi_ left
moritz wow, my next blog post already has 22k characters, and isn't even finished yet 14:24
I guess I'll split it up into two
Geth doc: Altai-man++ created pull request #1190:
Draft of tilde character explanation
14:25
14:33 llfourn left, espadrine left
tbrowder hi, #perl6 14:37
moritz \o tbrowder
sena_kun tbrowder, hi. 14:38
tbrowder another day, another question: how do i use a regex with when? do i need to explicitly use the $_ and ~~?
moritz m: given 'foo' { when /.($0) / { say ~$/ } } 14:39
camelia ( no output )
tbrowder i try when /b/ { say "foo" } and get an error
AlexDaniel which error?
moritz m: given 'foo' { when /.($0) / { say ~$/ }; default { say "no match" } }
camelia rakudo-moar 266f34: OUTPUT«no match␤»
moritz m: given 'foo' { when /.. / { say ~$/ }; default { say "no match" } } 14:40
camelia rakudo-moar 266f34: OUTPUT«fo␤»
RabidGravy m: my @f = { class => class { has Int $.attr } },; say @f.perl
camelia rakudo-moar 266f34: OUTPUT«When invoking 2 '', provided outer frame 0x15a8640 (4 '<unit>') does not match expected static frame 0x15a8748 (3 '')␤ in block <unit> at <tmp> line 1␤␤»
Geth doc/contributing-examples-style: b3c4ed230b | Altai-man++ | CONTRIBUTING.md
Explain examples output style
AlexDaniel m: given 'foo' { when /(.)$0 / { say ~$/ }; default { say "no match" } }
camelia rakudo-moar 266f34: OUTPUT«oo␤»
RabidGravy yuk
AlexDaniel moritz: ;)
moritz AlexDaniel: thanks, I'm dumb
AlexDaniel RabidGravy: wow!
moritz RabidGravy: yes, looks like a nicely golf'd bug
AlexDaniel oh, by the way 14:42
mch: my @f = { class => class { has Int $.attr } },; say @f.perl
committable6 AlexDaniel, gist.github.com/c1f6dcebb689c9a8fa...20493cb4bb
AlexDaniel xD 14:43
c: all my @f = { class => class { has Int $.attr } },; say @f.perl
committable6 AlexDaniel, gist.github.com/8a9a8944dbb43fb40a...17332d83da
tbrowder well, i lied with my example. i think i forgot the regex adverb. but does the when require a given? the examples in the docs don't use it, they are in a for loop using when on the implicit $_ 14:44
AlexDaniel tbrowder: no, it simply works with $_
tbrowder: but you might want to use given to set $_ :)
Geth doc/contributing-examples-style: 46ffe0d035 | Altai-man++ | CONTRIBUTING.md
Explain examples output style
14:45
RabidGravy I think that it's just LTA for "I'm interpreting something as a code block"
tbrowder m: given 'goo' { when :i/^G/ { say "goo" }} 14:46
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at <tmp>:1␤------> 3given 'goo' { when :i/^G/ { say "goo" }7⏏5}␤Missing block (apparently claimed by expression)␤at <tmp>:1␤------> 3given 'goo' { when :i/^G/ { say "goo"…»
Geth doc: Altai-man++ created pull request #1192:
Contributing examples output style explanation
tbrowder that's the error i get
14:46 khisanth_ joined
tbrowder i haven't yet tried the adverb inside the slashes 14:47
AlexDaniel m:i perhaps? 14:48
moritz tbrowder: use rx:i/.../
AlexDaniel moritz: what would be the benefit over m:i?
tbrowder okay, i don't think that's clear in the docs 14:49
examples in regexs show the raw adverb ( but nothing for when examples. so is that an exceptional use? 14:50
moritz AlexDaniel: m// has "match immediately" semantics that I don't find really clear
timotimo garrrghhhh, why does this project need to be built with ironpython
14:50 mrdside_ joined
mrdside_ can anybody help me with grammar? 14:50
gist.github.com/mrDSide/99a925984e...960251c6f1 14:51
moritz AlexDaniel: which is why I avoid m// mostly
14:51 llfourn joined
RabidGravy I'll rakudobug that then, not quite sure how to describe it 14:51
[Coke] (docs) why does xt/examples-compilation run a makefile target instead of running the script directly?
mrdside_ No such method 'made' for invocant of type 'Array'
sena_kun [Coke], oh, I've missed it. I'll fix it right now. 14:52
timotimo oh, it's actually not built in ironpython, it's a c# program that allows scripting with python
tbrowder so is that a bug?
mrdside_ in regex TOP at right_the_way.p6 line 5
moritz mrdside_: [<crd>|<exp>]+ makes $<crd> and $<exp> an array
mrdside_: not a match
mrdside_ solution? 14:53
i'm understand
moritz mrdside_: what do you want to happen when <rd> matches multiple times?
mrdside_ but no idea
moritz well, that's the first step
find out what you want to happen
mrdside_ it sould happend multiple times, and for each will .made
moritz so $<exp>.map: *.made 14:54
mrdside_ for eash Match do .made
in method?
moritz instead of $<exp>.made
tbrowder m: given 'g' { when /:i ^G/ { say "g"}}
camelia rakudo-moar 266f34: OUTPUT«g␤»
mrdside_ moritx: thx 14:55
15:01 travis-ci joined
travis-ci Doc build passed. Altai-man 'Draft of tilde character explanation' 15:01
travis-ci.org/perl6/doc/builds/200870278 github.com/perl6/doc/commit/b6a62da38aa2
15:01 travis-ci left
Geth doc: 2abaecd747 | Altai-man++ | xt/examples-compilation.t
Run extraction script directly with shell
15:01
sena_kun [Coke], indirection is fixed.
[Coke] sena_kun: one last thing: instead of "perl6" use $*EXECUTABLE-NAME 15:08
sena_kun++
Geth doc: d11c913e3e | (Will "Coke" Coleda)++ | doc/Type/UInt.pod6
fix typo
sena_kun [Coke], sure, just a sec... 15:09
15:09 travis-ci joined
travis-ci Doc build passed. Altai-man 'Explain examples output style' 15:09
travis-ci.org/perl6/doc/builds/200874289 github.com/perl6/doc/commit/b3c4ed230bf0
15:09 travis-ci left 15:11 AlexDaniel left, wamba joined
Geth doc: c7b50526db | Altai-man++ | xt/examples-compilation.t
Use a variable instead of plain name
15:11
tadzik computer, messages 15:12
yoleaux 13:43Z <RabidGravy> tadzik: there may be a PR on JSON::Unmarshal later so that null in the JSON doesn't break assignment to a typed atrribute
tadzik oh, sweet
RabidGravy got sidetracked by yon freaky rakudobug 15:13
cognominal hi, there is a proliferation of bots in #perl6 and #perl6-dev. Is there a page that documents them and gives a pointer to their source code ? 15:14
I suppose that now, many or most of them are written in Perl 6
Geth doc: WildYorkies++ created pull request #1193:
add haskell-to-p6 file
MasterDuke cognominal: github.com/perl6/doc/issues/711
cognominal ho, I just found github.com/perl6/whateverable 15:15
thx, MasterDuke 15:16
[Coke] IOninja: I wouldn't bother removing [BUG] from things that are now tagged as testneeded in RT.
so many doc tickets closed since yesterday, but we're still at 215. *sadface* 15:19
15:19 travis-ci joined
travis-ci Doc build passed. Altai-man 'Explain examples output style' 15:19
travis-ci.org/perl6/doc/builds/200875272 github.com/perl6/doc/compare/b3c4e...ffe0d03568
15:19 travis-ci left 15:20 pyrimidine joined
RabidGravy that's gone in as RT #130763 if anyone fancies taking a look :) 15:20
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130763
15:22 cdg_ joined 15:24 cdg left 15:25 patrickz left
tbrowder ref when: is it a bug or a known (but undocumented) rule that a bare regex adverb in front of the first slash throws an exception? 15:32
either way, i'll update the when doc... 15:33
moritz tbrowder: if you have an adverb followed by regex, you simply have two terms in a row
or rather, the adverb is parsed as a term, and the next / then as the division operator
15:33 robertle joined
moritz so yes, updating the docs on proper application of regex adverbs sounds like a good idea 15:33
tbrowder so only one term is allowed with when before the braces? 15:34
cale2 does andthen and orelse only make sense in the context of promises? 15:35
I can't figure out when andthen would make sense
moritz tbrowder: perl 6 generally doesn't allow two terms in a row
CIAvash m: 'test' ~~ :i/test/
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3'test' ~~ :i/test/7⏏5<EOL>␤ expecting any of:␤ prefix␤ term␤»
CIAvash tbrowder: it has nothing to do with when, If I understood you correctly ↑ 15:36
tbrowder okay, i'll bite: how about the bare adverbs shown in the regex docs?
moritz tbrowder: where? 15:37
tbrowder okay let me find them...
mrdside_ moritz: got 'pu=()' for each match 15:39
gist.github.com/mrDSide/99a925984e...960251c6f1
IOninja m: my @f = %( class => class { has Int $.attr; } ),; say @f.perl 15:40
camelia rakudo-moar 266f34: OUTPUT«[{:class(<anon|80222704>)},]␤»
15:40 travis-ci joined
travis-ci Doc build errored. Altai-man 'Run extraction script directly with shell' 15:40
travis-ci.org/perl6/doc/builds/200878708 github.com/perl6/doc/compare/0add0...baecd747c6
15:40 travis-ci left
IOninja m: { class => class { } }() 15:41
camelia rakudo-moar 266f34: OUTPUT«When invoking 1 '', provided outer frame 0x29dc500 (3 '<unit>') does not match expected static frame 0x29dc608 (2 '')␤ in block <unit> at <tmp> line 1␤␤»
moritz mrdside_: I can't and won't debug a whole grammar for you. My advise is to test each regex individually
15:42 llfourn left
moritz because writing and debuggiing a single regex is much easier than doing it with a whole grammar 15:42
(and debugging a grammar without input data is impossible anyway, and not made easier by the use of an unfamiliar script) 15:44
Xliff Grammar::Tracer is your friend
mrdside_ moritz: whitout `.map` works everhyting, when i use `.made` in loop; like this - `my $people = $line<people>.made`
problem not with regexes 15:45
i get lines, but empty
moritz mrdside_: my impression is that the language barrier between us is simply too big 15:46
15:47 camelia left
tbrowder okay, i did not find an example. but one thing i think is misleading is the statement about the adverb can come before or after the start of the regex declaration...I don't have the line number at hand 15:47
moritz maybe somebody else has more experience or patience with that kind of thing
sena_kun mrdside_, I'm still here. :) 15:48
15:48 mrdside_ left
moritz tbrowder: find it, change it to say that adverbs outside the regex need to come after something that introduces the regexes, like 'rx' or 'm' 15:48
sena_kun Ah, he left already. :/
tbrowder WILCO
15:49 khw joined 15:53 colomon left, colomon_ joined 15:55 ufobat left 15:57 mrdside_ joined 15:58 pyrimidi_ joined, pyrimidine left
mrdside_ moritz: sorry, but maybe you can give me advice about what i need to do before parse new file, because errors happens after parsing first file 16:00
sena_kun mrdside_, hi! You can pm me once more if I'm appropriate person. 16:01
16:02 camelia joined 16:03 ChanServ sets mode: +v camelia
nine m: say "Hi from { $*DISTRO.name } {$*DISTRO.release}" 16:03
camelia rakudo-moar 266f34: OUTPUT«Hi from opensuse 42.2␤»
nine \o/
timotimo you done upgraded?
nine yep
Piece of cake compared to moving my sister's and her boyfriend's wordpress into a VM 16:04
timotimo oh, wordpress 16:06
moritz mrdside_: is it a problem with the contents of the second file? Or always with the second file, no matter the order in which you pass in the files?
timotimo it took me a few days, but i finally found a way to see all comments again from the wordpress dashboard
it turns out they hid every single interesting thing behind a "go to wp admin" button at the bottom left
nine Ah, of course! Need to install php5-mysql. No need to log any errors about that. Just return nothing at all, that's how we like our challenges
16:06 mrdside_ left
timotimo totally 16:06
RabidGravy .tell tadzik there you go matey github.com/tadzik/JSON-Unmarshal/pull/23 - it would be a great boon if you could look as I found it testing something else :) 16:08
yoleaux RabidGravy: I'll pass your message to tadzik.
nine Now it's telling me "Error establishing a database connection". No need to go into details there either...
timotimo yup, just mtrace it !!!kk
or is it called ltrace?
moritz strace?
timotimo i mean the other one
strace is for syscalls, the other one is for any library 16:09
nine Ok, it's finally up.
moritz oh
16:21 travis-ci joined
travis-ci Doc build errored. Altai-man 'Use a variable instead of plain name' 16:21
travis-ci.org/perl6/doc/builds/200880853 github.com/perl6/doc/compare/d11c9...b50526db0d
16:21 travis-ci left, FiveBroDeepBook joined, FiveBroDeepBook left 16:27 CIAvash left 16:28 lichtkind joined 16:29 TEttinger joined 16:31 espadrine joined 16:36 nhywyll left 16:38 llfourn joined 16:43 llfourn left, cibs left 16:44 cibs joined 16:50 FiveBroDeepBook joined
Geth perl6-most-wanted: 076e750247 | (Tom Browder)++ | most-wanted/modules.md
Update modules.md
16:51
16:52 kurahaupo__ joined 16:53 FiveBroDeepBook left 17:02 bpmedley left 17:03 cdg_ left 17:05 BenGoldberg joined, wamba left
RabidGravy tadzik++ # nice one cheers! 17:06
17:06 BenGoldberg left 17:07 BenGoldberg joined 17:10 someone123 joined, someone123 left
timotimo could i get some folk's opinion on github.com/MoarVM/MoarVM/pull/536 ? 17:26
IOninja has no opinions 17:28
gfldex since there is no need to doc that … :-> 17:29
none the less there shall be many hugs come your way 17:30
17:30 Actualeyes left 17:32 geekosaur left 17:33 cyphase left, geekosaur joined 17:38 cyphase joined 17:39 llfourn joined 17:42 AlexDaniel joined 17:45 llfourn left 17:51 mr-foobar left
IOninja m: my $x ="ab\x[308]c"; $x ~~ tr /:ignoremark <[a..c]>+ /XYZ/; say $x 17:51
camelia rakudo-moar 266f34: OUTPUT«Zb̈Y␤»
IOninja seems ignoremark is... ignored?
and regexes work? tr/// don't do regexes in Perl 5
m: my $x ="ab\x[308]c"; $x ~~ tr:i/<[A..C]>+ /XYZ/; say $x 17:54
camelia rakudo-moar 266f34: OUTPUT«ab̈c␤»
17:58 nine left 17:59 nine joined 18:00 camelia left 18:01 geekosaur left, camelia joined 18:02 geekosaur joined, ChanServ sets mode: +v camelia 18:05 dj_goku left
nine m: say "alive" 18:10
camelia rakudo-moar 266f34: OUTPUT«alive␤»
nine Excellent. Host system upgraded as well.
18:11 colomon joined
cale2 it's a start: github.com/WildYorkies/daily-progr...grammer.md 18:11
18:12 wamba joined, colomon_ left
sena_kun IOninja++ 18:16
18:16 colomon left, colomon joined 18:20 colomon left 18:21 colomon joined
TimToady m: my $x = ":ignoremark"; $x ~~ tr/:ignoremark/A..Z/; $x.say 18:24
camelia rakudo-moar 266f34: OUTPUT«ABCDEFGHIFK␤»
18:24 colomon left 18:26 colomon joined 18:31 girafe joined 18:33 mr-foobar joined
IOninja Oh 18:36
Geth doc/master: 21 commits pushed by Cale++
review: github.com/perl6/doc/compare/c7b50...e425ca4d19
18:38
18:39 llfourn joined 18:41 RabidGravy left 18:43 llfourn left 18:47 wamba left 19:05 travis-ci joined
travis-ci Doc build passed. Cale 'Merge pull request #1193 from WildYorkies/master 19:05
travis-ci.org/perl6/doc/builds/200924494 github.com/perl6/doc/compare/c7b50...25ca4d1954
19:05 travis-ci left 19:10 wictory[m] joined, BenGoldberg left 19:16 agentzh left 19:17 dj_goku joined 19:23 darutoko left 19:24 tadzik joined, M-Illandan joined, dp[m] joined, Matthew[m] joined, ilmari[m] joined, CIAvash[m] joined, Matias[m] joined, xui_nya[m] joined, mulk[m] joined, mienaikage joined
Geth doc: 8ac9a9cb5e | (Tom Browder)++ | doc/Language/regexes.pod6
emphasize proper syntax for regex adverbs
19:28
19:29 agentzh joined 19:32 colomon_ joined, colomon left, colomon_ is now known as colomon 19:33 BenGoldberg joined
Geth doc: 557090c2ef | (Tom Browder)++ | doc/Language/control.pod6
add a regex example, add missing newlines
19:33
doc: 67884406c2 | (Siavash Askari Nasr)++ | doc/Language/haskell-to-p6.pod6
Some modifications for haskell-to-p6

  - { * } doesn't become { $_ }, it returns a Whatever
  - Remove the explicit smartmatch
  - Mention the defined-or operator
19:37
19:39 agentzh left 19:40 llfourn joined 19:44 ale4L3 joined, llfourn left
gfldex cale2: I blame you for www.reddit.com/r/dailyprogrammer/c...i/ddnpv66/ 19:46
samcv good * perl6
moritz \o samcv 19:48
samcv: what time zone do you live in?
samcv -8 i think
19:49 ale4L3 left
moritz I'm in +1 ATM, that explains some of our relatively shifted rhythm :-) 19:50
moritz can't spell that word
samcv words
cale2 gfldex: nice! I'm gonna play around with that
19:51 ale4L3 joined
samcv hey cale2 19:51
cale2 hey
gfldex i wanted to show off with our multi-dim array subscripts for quite some time :) 19:52
19:52 ssotka joined 19:55 bjz joined
gfldex m: say 1 ≥ 2 19:55
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say 17⏏5 ≥ 2␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ statemen…»
19:55 bjz_ left
cale2 m: my $input = Q:to /EOH/; 140 190 1 8 5 140 150 1 150 160 0 160 170 7 170 180 6 180 190 2 EOH sub MAIN(){ # my $input = slurp; my ($min-x, $max-x, $min-y, $max-y) = $input.lines[0].split(' '); my $records = $input.lines[1]; for $max-y … 1 -> $y { print $y; for 1 … $records -> $x { my $data = $input.lines[$x+1].split(' ')[2]; print „ “; 19:59
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my $input = Q:to /EOH/; 1407⏏5 190 1 8 5 140 150 1 150 160␤ expecting any of:␤ infix␤ infix stopper␤ statement…»
cale2 lol
gfldex cale2: i will gist it
cale2 gfldex: I have a way to scrape all the answers, since the beginning of ever, but I don't know what to do with them once I get them. 20:00
gfldex cale2: gist.github.com/936fa016603f3b1d2f...a4563c151a 20:01
cale2: well you do `git clone gist.github.com/gfldex/936fa016603...4563c151a; cd 936fa016603f3b1d2fe7a7a4563c151a; perl6 5st2so.p6` 20:02
cale2 gfldex: Oh, I ran that in glot.io already :) I'm talking about this: github.com/WildYorkies/daily-progr...r-examples 20:03
Perhaps it would be better to write a bot so that it can actively listen for new updates all the time, and then push the solutions somewhere
20:04 ale4L3 left
samcv can you use zef to find which modules depend on another module? 20:10
gfldex samcv: you may be able to combine --depsonly with --dry (I didn't test) 20:11
IOninja star: use LWP::Simple; from-json(LWP::Simple.get("ecosystem-api.p6c.org/projects.json...ds>.any eq "HTTP::UserAgent"}}».<name>.say
camelia star-m 2016.10: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3ep({.<depends>.any eq "HTTP::UserAgent"}7⏏5}».<name>.say␤» 20:12
IOninja star: use LWP::Simple; from-json(LWP::Simple.get("ecosystem-api.p6c.org/projects.json...ds>.any eq "HTTP::UserAgent"})».<name>.say
camelia star-m 2016.10: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block at <tmp> line 1␤Use of uninitialized value of type Any in string context.␤Methods .^name, .…»
IOninja star: use LWP::Simple; quietly from-json(LWP::Simple.get("ecosystem-api.p6c.org/projects.json...ds>.any eq "HTTP::UserAgent"})».<name>.say
camelia star-m 2016.10: OUTPUT«(TelegramBot Selenium::WebDriver Questhub Crust WebService::GitHub JSON::Infer HTTP::Signature WebService::Soundcloud WebService::GoogleDyDNS Discord WebService::SOP Audio::Icecast Geo::Coder::OpenCage Task::Galaxy deredere Lumberjack::Application App::AizuOnl…»
20:12 wamba joined
moritz IOninja++ 20:13
samcv curl -s 'raw.githubusercontent.com/perl6/ec...META.list' | xargs -I '{}' curl -s '{}' | grep Foo
heh
gfldex zef would recurse tho 20:14
samcv i mean ecosystem modhules depend on each other so this should work I think
20:15 cale2 left 20:16 pyrimidine joined, pyrimidi_ left 20:17 ssotka left 20:22 BenGoldberg left 20:23 Tonik left 20:24 setty1 left, BenGoldberg joined 20:25 setty1 joined 20:28 kjk joined 20:29 agentzh joined
kjk hello, I'm trying to implement a >= operator like this: sub infix:< ≥ >(\a, \b) is assoc<chain> is equiv(&infix:<< >= >>) { a >= b } 20:30
but it doesn't work as expected: if 1 ≥ 2 ≥ 0 { say 'OMG!' } else { say "that's more like it." }
says 'OMG!'
what am I doing wrong? 20:31
gfldex kjk: you are trying to reinvent the wheel i suppose
m: my &infix:«≤» := &infix:«<=»; say 1 ≤ 2;
camelia rakudo-moar 266f34: OUTPUT«True␤»
kjk p6: say 1 ≥ 2; 20:32
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say 17⏏5 ≥ 2;␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ stateme…»
kjk ≥ doesn't seem to work? that's why I tried to implement it and to learn, of course 20:33
AlexDaniel kjk: but the idea is to bind it to >= intead of actually implementing it
s
m: my &infix:«≤» := &infix:«<=»; my &infix:«≥» := &infix:«>=»; say 1 ≤ 2; say 1 ≤ 2 ≥ 0; 20:34
camelia rakudo-moar 266f34: OUTPUT«True␤True␤»
kjk oh~ ic..., so that's how you bind it 20:36
but why my sub didn't work?
samcv because you're using an index operator much more complicatedy 20:37
though maybe assoc<chain> is supposed to work idk 20:38
AlexDaniel I remember there was some issue with it…
gfldex Rakudo seams not to care for assoc<chain> for => 20:40
>= even
if everything is bigger in Texas where is everything smaller? 20:41
20:41 llfourn joined
AlexDaniel in perl 6 20:41
20:42 rindolf left
gfldex i need a module name for unicode variants of quite a few things 20:42
kjk p6: my &infix:«≥» := &infix:«>=»; say 1 ≥ 2 ≥ 0; 20:43
camelia rakudo-moar 266f34: OUTPUT«True␤»
kjk looks like it's not chaining 20:44
AlexDaniel … let's just add ≥ to core. The rest can be in a module, fine. But please…
20:44 RabidGravy joined
kjk anyway, I don't really care about having ≥ (though it would be nice if it works), I was just playing with unicode and got curious if that would work. 20:45
gfldex ¬ ∧ ∨ ⊻ ≥ ≤ are all on my list
kjk thanks for looking it
AlexDaniel huggable: texas 20:46
huggable AlexDaniel, All of Perl 6's fancy Unicode operators have traditional ASCII symbol alternatives (aka Texas Variants): See doc.perl6.org/language/unicode_texas
AlexDaniel hmmm
gfldex: fwiw: gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c
20:46 llfourn left
AlexDaniel u: 🍦 20:48
unicodable6 AlexDaniel, U+1F366 SOFT ICE CREAM [So] (🍦)
AlexDaniel soft ice cream but no hard ice cream!
u: 🖪🖬 20:49
unicodable6 AlexDaniel, U+1F5AA BLACK HARD SHELL FLOPPY DISK [So] (🖪)
AlexDaniel, U+1F5AC SOFT SHELL FLOPPY DISK [So] (🖬)
AlexDaniel :|
IOninja kjk: basically > and friends are currently parsed specially in the grammar so you can't do them properly by just defining your own ops. 20:52
The chaining assoc will work, but that doesn't let you mix the chainees, so it's pretty useless.
sena_kun AlexDaniel, there are even worse cases. Like... 20:53
IOninja It is in the plans to make it work though, so... "check back later" :)
sena_kun u: 👯
unicodable6 sena_kun, U+1F46F WOMAN WITH BUNNY EARS [So] (👯)
sena_kun but no other variants of ears!
AlexDaniel just ZWJ it with other animals or whatever 20:54
IOninja m: "\c[men with bunny ears partying]".say
camelia rakudo-moar 266f34: OUTPUT«👯‍♂️␤»
AlexDaniel see!
sena_kun oh god
but. 20:55
tbrowder um, looking into the web world again: anyone had any experience with web server named "caddy?", programmed in go, referenced on the letsencrypt.org website as a client--its features look pretty slick!
sena_kun it is still incomplete - there is no fox ears. To connect nations Unicode should be extended! 20:57
IOninja "AlexDaniel │ … let's just add ≥ to core." 20:59
I recall TimToady mentioning wanting to make it possible to do in userspace first.
And if we're to add it to core then, we'd just make an op
AlexDaniel well, we've waited for a year now…
IOninja Well, Rakudo's opensource ;) Pop up your editor and start making things possible :) 21:00
AlexDaniel yea, that's a good idea
IOninja Insteresting... Can't search chat logs for "≥" 21:01
21:05 BenGoldberg left
kjk IOninja: gotcha, thanks. 21:06
21:07 BenGoldberg joined 21:16 kjk left 21:17 sena_kun left 21:22 girafe left 21:32 jraglin joined 21:33 bpmedley joined 21:36 bolangi joined 21:40 colomon_ joined 21:41 bjz left, colomon left, colomon_ is now known as colomon 21:42 llfourn joined, BenGoldberg left 21:44 BenGoldberg joined 21:45 bjz joined, colomon left 21:46 bolangi left 21:47 llfourn left, bolangi joined 22:10 RabidGravy left 22:21 ssotka joined 22:23 agentzh left 22:27 agentzh joined, jraglin left 22:29 bjz left 22:30 salv0 left 22:38 jraglin joined
moritz the IRC logs use a stemmed search index, and I guess that the stemming reduces ≥ to the empty string 22:38
22:44 llfourn joined 22:46 wamba left 22:49 llfourn left 22:51 bitmap left
TEttinger U+7F46F DOG WITH CAT EARS [So] (y) 22:54
IOninja m: "\c[7F46F]".uniname.say 22:56
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized \c character␤at <tmp>:1␤------> 3"\c[7⏏057F46F]".uniname.say␤ expecting any of:␤ double quotes␤ term␤»
IOninja m: "\x[7F46F]".uniname.say
camelia rakudo-moar 266f34: OUTPUT«<illegal>␤»
IOninja u lie
TEttinger :D
hence why the char was "y" 22:57
as in, "y u do dis"
22:57 BenGoldberg left
TEttinger U+7ED3C DOG WITH FLOOFY POOFAGE AND WIDDLE BITTY STUBBER STOMPERS [So] ( i.imgur.com/c85Wah7.jpg ) 22:59
23:03 kurahaupo_ joined, kurahaupo__ left, agentzh left 23:06 lichtkind left
timotimo cdn-images-1.medium.com/max/800/1*...4tQ3lw.png - neural-network generated nightmare-fuel "dog" 23:10
IOninja There is a weird dog one though: 🐶 U+D88F BEATEN DOG
timotimo: the one google AI makes are creepier: static5.businessinsider.com/image/5...ai%201.png 23:11
Or this one: www.slate.com/content/dam/slate/art...large2.jpg 23:12
TEttinger psychic-vr-lab.com/deepdream/pics/1166309.html 23:20
23:20 bpmedley left 23:23 BenGoldberg joined
TEttinger octocat is surprising, psychic-vr-lab.com/deepdream/pics/1166014.html 23:23
23:32 kurahaupo_ left 23:33 lep-delete left 23:38 lep-delete joined
Hotkeys is there an easy way to quote lone combining chars 23:43
m: say "̚"
camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3say7⏏5 "̚"␤Bogus postfix␤at <tmp>:1␤------> 3say 7⏏5"̚"␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ sta…»
Hotkeys m: say "\̚" 23:44
camelia rakudo-moar 266f34: OUTPUT«\̚␤»
Hotkeys doesn't work as I'd assume either
23:45 llfourn joined
timotimo you probably want to work with Uni 23:50
23:51 llfourn left 23:56 Actualeyes joined