Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-10-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:07 AndyDee joined #perl6
00:08 llfourn joined #perl6
00:12 tokuhirom_ joined #perl6
00:21 iv joined #perl6
00:22 dalek rakudo-star-daily: eedd1b6 | coke++ | log/ (8 files):
00:22 dalek rakudo-star-daily: today (automated commit)
00:22 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/eedd1b690f
00:22 dalek perl6-roast-data: 309c546 | coke++ | / (9 files):
00:22 dalek perl6-roast-data: today (automated commit)
00:22 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/309c546e77
00:26 hartenfels Hey y'all, could someone give me some hints on this failure thing?
00:26 hartenfels m: my Int $x = fail 'important error message';
00:26 camelia rakudo-moar fae01f: ( no output )
00:27 hartenfels Huh, that's a different output. I get ``Type check failed in assignment to $x; expected Int but got Failure'', without telling me what or where the failure occurred.
00:28 hartenfels Am I using that failure wrong or does the message just get eaten?
00:30 Akagi201 joined #perl6
00:30 pink_mist (note: I won't be able to help you no matter your answer to this question, but if your answer is no, maybe try upgrading) are you on the latest git commit?
00:33 hartenfels pink_mist Upgrading right now, gonna try it again.
00:33 hartenfels Nope, still the same.
00:33 Akagi201 joined #perl6
00:33 hartenfels m: my Int $x = fail 'important error message'; say $x
00:33 camelia rakudo-moar fae01f: ( no output )
00:35 hartenfels m: say 'something'
00:35 camelia rakudo-moar fae01f: OUTPUT«something␤»
00:36 hartenfels Seems like error output is being eaten entirely?
00:40 telex joined #perl6
00:41 SuzieQueue joined #perl6
00:42 Hor|zon joined #perl6
00:46 aborazmeh joined #perl6
00:46 aborazmeh joined #perl6
00:51 [Sno] joined #perl6
00:54 hartenfels Okay, I guess the REPL made the output different.
00:54 hartenfels So my question again:
00:54 hartenfels m: sub s { fail 'important error message' }; my $x = s; say $x;
00:54 camelia rakudo-moar fae01f: OUTPUT«important error message␤  in sub s at /tmp/Ary_QWBF0l:1␤  in block <unit> at /tmp/Ary_QWBF0l:1␤␤Actually thrown at:␤  in block <unit> at /tmp/Ary_QWBF0l:1␤␤»
00:54 hartenfels sub s { fail 'important error message' }; my Int $x = s; say $x;
00:55 hartenfels m: sub s { fail 'important error message' }; my Int $x = s; say $x;
00:55 camelia rakudo-moar fae01f: OUTPUT«Type check failed in assignment to $x; expected Int but got Failure␤  in block <unit> at /tmp/wR8nS70PqD:1␤␤»
00:55 hartenfels Am I using failures wrong, with the Int type check? It seems to eat my error message.
01:10 [Coke] m: say "\c[GREEK QUESTION MARK]" eq "\c[SEMICOLON]"
01:10 camelia rakudo-moar fae01f: OUTPUT«True␤»
01:12 [Coke] m: sub s { fail 'important error message' }; my Int $x = +s; say $x;
01:12 camelia rakudo-moar fae01f: OUTPUT«important error message␤  in sub s at /tmp/_6ymSC4C5H:1␤  in block <unit> at /tmp/_6ymSC4C5H:1␤␤Actually thrown at:␤  in block <unit> at /tmp/_6ymSC4C5H:1␤␤»
01:12 [Coke] assigning it doesn't count as using it.
01:16 tokuhiro_ joined #perl6
01:18 hartenfels [Coke] Thanks, that works for numbers and such.
01:20 hartenfels But I'm hesitant to use types if it means that exceptions get eaten on assignment.
01:20 ShimmerFairy Well, arguably it should tell you what the Failure's message is, (and arguably assigning it to a variable is, in fact, using it :P)
01:21 hartenfels I guess I might should file a bug report against Rakudo then.
01:22 hartenfels And let it be rejected if it's intentional that way.
01:22 ShimmerFairy Maybe it could be solved by printing the Failure's message whenever a Failure pops up in an exception? e.g. q[expected Int but got Failure ("important error message")] as the error message?
01:22 hartenfels It sure would.
01:22 hartenfels And the failure location too.
01:31 yeahnoob joined #perl6
01:34 Akagi201 joined #perl6
01:45 hartenfels Filed a bug for it, thanks for y'all's help.
01:45 Hor|zon joined #perl6
01:45 ribasushi joined #perl6
01:45 SHODAN joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:56 kaare_ joined #perl6
02:01 Zoffix joined #perl6
02:10 llfourn joined #perl6
02:11 [Sno] joined #perl6
02:13 noganex joined #perl6
02:30 tokuhirom_ joined #perl6
02:40 llfourn joined #perl6
02:43 et09 joined #perl6
02:44 et09 hi - i have very loose perl experience but strong experience in a few other languages (haskell/ruby/python/js/etc)... my perl experience boils down to "regexes" and "reading about @ vs $" and "there are a lot of variables that are one character and start with $"
02:44 et09 where should i start with perl 6 if i want to learn it
02:44 Hor|zon joined #perl6
02:54 llfourn et09: I'd say just play around with it, seeing as you have a lot of languages under your belt I'd say http://rosettacode.org/wiki/Rosetta_Code would be a great place to start
02:55 llfourn compare the Perl 6 examples with what you are used to :)
02:56 llfourn also if you find one that doesn't work anymore -- tell us about it :)
02:58 tokuhiro_ joined #perl6
03:00 dalek doc: e711b93 | (Ben Noordhuis)++ | doc/Language/syntax.pod:
03:00 dalek doc: Fix typos in syntax documentation.
03:00 dalek doc: review: https://github.com/perl6/doc/commit/e711b935e9
03:00 dalek doc: 07c82ec | (Ben Noordhuis)++ | doc/Language/syntax.pod:
03:00 dalek doc: Remove blob literal section.
03:00 dalek doc:
03:00 dalek doc: Blob literals are described in S02 but the section in syntax.pod uses
03:00 dalek doc: the wrong syntax and blob literals don't appear to be implemented in
03:00 dalek doc: Rakudo or tested for in Roast.  Avoid confusion, remove the section.
03:00 dalek doc: review: https://github.com/perl6/doc/commit/07c82ec31c
03:00 dalek doc: 8eb6d9d | LLFourn++ | doc/Language/syntax.pod:
03:00 dalek doc: Merge pull request #170 from bnoordhuis/blob-literals
03:00 dalek doc:
03:00 dalek doc: Remove blob literal section.
03:00 dalek doc: review: https://github.com/perl6/doc/commit/8eb6d9daf7
03:10 tokuhiro_ Is there a 'sub import' equivalent for perl6?
03:10 tokuhiro_ I want to do some DSL-ish work on Perl6
03:12 hartenfels tokuhiro_ There's EXPORT: http://doc.perl6.org/language/modules#EXPORT
03:12 tokuhiro_ oh!
03:13 tokuhiro_ Thanks!
03:41 [Coke] m: 756 X/ ( gather for (1,2,3,4,6).combinations(3) { take [+] |$_ })).grep:{$_.narrow ~~ Int} # perl6, great for solving ken ken puzzles.
03:41 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FBA1V8Kju7␤Unexpected closing bracket␤at /tmp/FBA1V8Kju7:1␤------> 3,4,6).combinations(3) { take [+] |$_ })7⏏5).grep:{$_.narrow ~~ Int} # perl6, great␤»
03:41 [Coke] m: (756 X/ ( gather for (1,2,3,4,6).combinations(3) { take [+] |$_ })).grep:{$_.narrow ~~ Int} # perl6, great for solving ken ken puzzles.
03:41 camelia rakudo-moar fae01f: ( no output )
03:41 [Coke] m: say (756 X/ ( gather for (1,2,3,4,6).combinations(3) { take [+] |$_ })).grep:{$_.narrow ~~ Int} # perl6, great for solving ken ken puzzles, dammit
03:41 camelia rakudo-moar fae01f: OUTPUT«(126 108 84 84 63)␤»
03:42 [Sno] joined #perl6
03:45 Hor|zon joined #perl6
03:46 [Coke] (1,2,3,4,6).combinations(3)
03:46 [Coke] ww.
03:47 llfourn [Coke]: you can remove the gather/take
03:47 llfourn m: say (756 X/ ( for (1,2,3,4,6).combinations(3) {  [+] |$_ })).grep: { .narrow ~~ Int }
03:47 camelia rakudo-moar fae01f: OUTPUT«(126 108 84 84 63)␤»
03:49 [Coke] ah. without the parens, the gather take was needed.
03:49 [Coke] (also missing a sort/unique, but that's fine)
03:50 khw joined #perl6
03:57 [Coke] (and there's a typo in there, whoops)
03:58 xinming_ joined #perl6
03:58 llfourn m: 9 X/ (1,2,3)
03:58 camelia rakudo-moar fae01f: ( no output )
03:59 llfourn m: say 9 X/ (1,2,3)
03:59 camelia rakudo-moar fae01f: OUTPUT«(9 4.5 3)␤»
03:59 llfourn m: say (9 X/ (1,2,3)).map: { .narrow }
03:59 camelia rakudo-moar fae01f: OUTPUT«(9 4.5 3)␤»
04:00 llfourn m: say (9 X/ (1,2,3)).map: { .WHAT,.narrow }
04:00 camelia rakudo-moar fae01f: OUTPUT«(((Rat) 9) ((Rat) 4.5) ((Rat) 3))␤»
04:00 llfourn m: say (9 X/ (1,2,3)).map: { .WHAT,.narrow.WHAT }
04:00 camelia rakudo-moar fae01f: OUTPUT«(((Rat) (Int)) ((Rat) (Rat)) ((Rat) (Int)))␤»
04:01 tokuhirom_ joined #perl6
04:01 * llfourn is beggining to understand
04:03 Celelibi joined #perl6
04:15 PsuzeannePsy joined #perl6
04:15 Suzeanne joined #perl6
04:36 xfix joined #perl6
04:42 et09 why would you store a sub as a variable in p6
04:42 llfourn et09: same reason you might store a function as a variable in JS
04:42 et09 gotcha
04:42 et09 to emulate OOP ;)
04:43 et09 (scratches head)
04:43 llfourn et09: well...maybe. OOP is very flexible in p6 so you can usually get the objects classes to do what you want.
04:44 llfourn et09: but you could store a sub in a variable and pass it as an argument for later use
04:44 et09 i was just trying to think of a use case...since p6 has actual classes
04:45 et09 http://learnxinyminutes.com/docs/perl6/ reading this, 15% down... looks great
04:45 Elyan joined #perl6
04:46 Hor|zon joined #perl6
04:47 llfourn et09: yeah I mean callbacks are just useful. Often you don't use subs but blocks {} or pointy blocks -> {}.
04:48 et09 i see
04:48 llfourn m: my $filter = { $_ %% 2 }; grep $filter,^20;
04:48 camelia rakudo-moar fae01f: ( no output )
04:48 et09 are they like lambdas?
04:48 llfourn m: my $filter = { $_ %% 2 }; say grep $filter,^20;
04:48 camelia rakudo-moar fae01f: OUTPUT«(0 2 4 6 8 10 12 14 16 18)␤»
04:48 llfourn et09: yes
04:48 et09 $_ is like $@ in zsh?
04:49 et09 or $1?
04:49 llfourn good question
04:49 llfourn m: say { 'a block' }
04:49 camelia rakudo-moar fae01f: OUTPUT«-> ;; $_? is raw { #`(Block|70668824) ... }␤»
04:49 et09 uhh
04:49 llfourn so a block is just a bit of code with one argument which is $_
04:49 et09 ohh.
04:50 llfourn in perl5 it was a bit different
04:50 et09 and that grep thing...a range ?
04:50 llfourn m: 0..20 ~~ ^20
04:50 camelia rakudo-moar fae01f: ( no output )
04:51 llfourn m: say 0..20 ~~ ^20
04:51 camelia rakudo-moar fae01f: OUTPUT«False␤»
04:51 llfourn m: say 0..5; say ^5
04:51 camelia rakudo-moar fae01f: OUTPUT«0..5␤0..^5␤»
04:51 llfourn m: say (0..5 ~~ ^5)
04:51 camelia rakudo-moar fae01f: OUTPUT«False␤»
04:52 llfourn ok I thought that would be true. But yeh 0..5 is the same as ^5.
04:52 et09 wow
04:52 llfourn (that might be a bug)
04:53 llfourn m: say 0..5 ~~ 0..5
04:53 camelia rakudo-moar fae01f: OUTPUT«True␤»
04:53 et09 m: my $filter = {$_.uc}; say grep $filter,'A'..'Z';
04:53 camelia rakudo-moar fae01f: OUTPUT«(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)␤»
04:54 et09 phew, first guess !
04:54 llfourn et09: yes that works though what you wrote doesn't make much sense :)
04:55 llfourn m: say map { .uc }, 'a'..'z';
04:55 camelia rakudo-moar fae01f: OUTPUT«(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)␤»
04:55 et09 m: my $filter = {ord $_ %% 2 == 0 ?? $_ !! $_.uc}; say grep $filter,'A'..'Z';
04:55 camelia rakudo-moar fae01f: OUTPUT«Earlier failures:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5A' (indicated by 7⏏)␤  in block <unit> at /tmp/cSDBJoqur0:1␤␤Final error:␤ Cannot call Real(Failure: ); none of these signature…»
04:55 llfourn m: say 'a'.ord
04:55 camelia rakudo-moar fae01f: OUTPUT«97␤»
04:55 et09 how would grep not add something onto the filter then?
04:56 et09 m: my $filter = {$_.ord %% 2 == 0 ?? $_ !! $_.uc}; say grep $filter,'A'..'Z';
04:56 camelia rakudo-moar fae01f: OUTPUT«(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)␤»
04:56 et09 what am i doing wrong
04:56 et09 want it to alternate every other capitalized
04:56 llfourn map { .ord %% 2 ?? $_ !! .uc },'a'..'z';
04:56 llfourn m: map { .ord %% 2 ?? $_ !! .uc },'a'..'z';
04:56 camelia rakudo-moar fae01f: ( no output )
04:56 llfourn m: say map { .ord %% 2 ?? $_ !! .uc },'a'..'z';
04:56 camelia rakudo-moar fae01f: OUTPUT«(A b C d E f G h I j K l M n O p Q r S t U v W x Y z)␤»
04:57 llfourn is that what you are trying to do?
04:57 et09 ohh yes, the dot method
04:57 et09 man that's cool
04:57 et09 m: my $filter = {$_.ord %% 2 == 0 ?? $_ !! $_.uc}; say grep $filter,'a'..'z';
04:57 camelia rakudo-moar fae01f: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)␤»
04:57 et09 m: my $filter = {.ord %% 2 == 0 ?? $_ !! .uc}; say grep $filter,'a'..'z';
04:57 camelia rakudo-moar fae01f: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)␤»
04:58 llfourn do map :)
04:58 et09 m: my $filter = {.ord %% 2 ?? $_ !! .uc}; say grep $filter,'a'..'z';
04:58 camelia rakudo-moar fae01f: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)␤»
04:58 llfourn grep is like shell grep
04:58 et09 is that causing the problem?
04:58 llfourn grep is simply a filter
04:58 llfourn it doesn't change values
04:58 et09 oh...
04:58 et09 ohh
04:58 et09 hah, ok
04:58 llfourn so your filter returns true for each element so it passes the original value through :\
04:59 et09 whoops
05:00 et09 is there equiv to ruby .times do ?
05:00 et09 or .each
05:00 AlexDaniel llfourn: ^ means that it is not inclusive
05:00 llfourn each is basically map
05:00 et09 yeah
05:00 AlexDaniel m: say join ' ', 'a'..^'z'
05:00 camelia rakudo-moar fae01f: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y␤»
05:01 llfourn m: for ^5 { .say }
05:01 AlexDaniel llfourn: so it is not a bug
05:01 camelia rakudo-moar fae01f: OUTPUT«0␤1␤2␤3␤4␤»
05:01 llfourn AlexDaniel: yep thanks
05:01 llfourn AlexDaniel: is there an inclusive one?
05:01 et09 m: say 'a' x 3
05:01 camelia rakudo-moar fae01f: OUTPUT«aaa␤»
05:01 et09 aha....
05:01 AlexDaniel m: say 0..4 ~~ ^5
05:01 camelia rakudo-moar fae01f: OUTPUT«True␤»
05:01 tokuhirom_ joined #perl6
05:02 AlexDaniel so it works
05:02 et09 m: say map {.ord %% 3 x $_},'a'..z'
05:02 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GvKHqBFiaf␤Two terms in a row␤at /tmp/GvKHqBFiaf:1␤------> 3say map {.ord %% 3 x $_},'a'..z7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement …»
05:02 llfourn AlexDaniel: \o/
05:02 et09 m: say map {$_.ord % 3 x $_},'a'..z'
05:02 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PYNHuohsSc␤Two terms in a row␤at /tmp/PYNHuohsSc:1␤------> 3say map {$_.ord % 3 x $_},'a'..z7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement…»
05:02 et09 m: say map {($_.ord % 3) x $_},'a'..z'
05:02 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/x5q6duNfxi␤Two terms in a row␤at /tmp/x5q6duNfxi:1␤------> 3say map {($_.ord % 3) x $_},'a'..z7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        stateme…»
05:02 et09 hmm
05:02 AlexDaniel llfourn: actually, I'm not sure. Perhaps you have to write 0.. then
05:03 AlexDaniel or whatever your starting point is
05:03 AlexDaniel hm
05:03 AlexDaniel m: say join ' ', ^'z'
05:03 camelia rakudo-moar fae01f: OUTPUT«Earlier failures:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5z' (indicated by 7⏏)␤  in block <unit> at /tmp/s6OhAJ1gkY:1␤␤Final error:␤ Cannot call Real(Failure: ); none of these signature…»
05:03 et09 two terms in a row...
05:03 llfourn AlexDaniel: cool thanks anyways
05:03 et09 m: say map {($_.ord % 3) x $_},'a'..'z'
05:03 camelia rakudo-moar fae01f: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5a' (indicated by 7⏏)␤  in block <unit> at /tmp/pTBdcX23YR:1␤␤Actually thrown at:␤  in block <unit> at /tmp/pTBdcX23YR:1␤␤»
05:04 llfourn et09: what are you trying to do?
05:04 et09 repeat char n times based on mod 3 of ord
05:04 AlexDaniel et09: other way round
05:04 et09 oh
05:04 et09 m: say map {$_ x ($_.ord % 3) },'a'..'z'
05:04 camelia rakudo-moar fae01f: OUTPUT«(a bb  d ee  g hh  j kk  m nn  p qq  s tt  v ww  y zz)␤»
05:04 et09 m: say map {$_ x ($_.ord % 3 + 1) },'a'..'z'
05:04 camelia rakudo-moar fae01f: OUTPUT«(aa bbb c dd eee f gg hhh i jj kkk l mm nnn o pp qqq r ss ttt u vv www x yy zzz)␤»
05:05 et09 now we're cooking
05:05 et09 that's amazing, string multiplication
05:05 AlexDaniel m: say map {$_ x (($_.ord - 1) % 3 + 1) },'a'..'z'
05:05 camelia rakudo-moar fae01f: OUTPUT«(a bb ccc d ee fff g hh iii j kk lll m nn ooo p qq rrr s tt uuu v ww xxx y zz)␤»
05:05 et09 m: say map {$_ x ($_.ord % 15 + 1) },'a'..'z'
05:05 camelia rakudo-moar fae01f: OUTPUT«(aaaaaaaa bbbbbbbbb cccccccccc ddddddddddd eeeeeeeeeeee fffffffffffff gggggggggggggg hhhhhhhhhhhhhhh i jj kkk llll mmmmm nnnnnn ooooooo pppppppp qqqqqqqqq rrrrrrrrrr sssssssssss tttttttttttt uuuuuuuuuuuuu vvvvvvvvvvvvvv wwwwwwwwwwwwwww x yy zzz)␤»
05:06 et09 m: say map {$_ x ($_.ord % 15 + 1) },shuffle 'a'..'z'
05:06 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmIFpMaBoD␤Undeclared routine:␤    shuffle used at line 1␤␤»
05:06 et09 ah it's in a module
05:06 jrm left #perl6
05:07 AlexDaniel m: say 'a'..'Z'
05:07 camelia rakudo-moar fae01f: OUTPUT«"a".."Z"␤»
05:07 AlexDaniel m: say list('a'..'Z')
05:07 camelia rakudo-moar fae01f: OUTPUT«()␤»
05:07 AlexDaniel hah
05:08 AlexDaniel m: say join ' ', 'a'..'Z'
05:08 camelia rakudo-moar fae01f: OUTPUT«␤»
05:08 et09 ok thanks, good night
05:08 AlexDaniel hm, I wonder what's that
05:08 llfourn m: say ('a'..'z').pick(26)
05:08 camelia rakudo-moar fae01f: OUTPUT«(v k y s o c q d l h w b p e g a j r u n z t m i f x)␤»
05:09 llfourn m: say ('a'..'z').pick(*) # better
05:09 camelia rakudo-moar fae01f: OUTPUT«(u g x p m w o l v r s n b e q t h k d f j z c i a y)␤»
05:10 AlexDaniel not that my request was clever in any way, but I wonder if empty list is the right answer :)
05:11 llfourn AlexDaniel: what's your request?
05:11 AlexDaniel llfourn: give me a list of characters from 'a' to 'Z'!
05:11 AlexDaniel :))
05:11 llfourn AlexDaniel: ah...
05:12 AlexDaniel m: say ('Z'..'a').list
05:12 camelia rakudo-moar fae01f: OUTPUT«(Z [ \ ] ^ _ ` a)␤»
05:12 AlexDaniel ah, it's regular ascii stuff then?
05:12 llfourn wut
05:12 AlexDaniel ok
05:12 llfourn AlexDaniel: ahh so because captials come first doh
05:13 leslie_ joined #perl6
05:13 llfourn m: say 'A'..'z';
05:13 camelia rakudo-moar fae01f: OUTPUT«"A".."z"␤»
05:13 llfourn :)
05:14 AlexDaniel m: say join ' ', ('a'..'「').list # Ooowwww…
05:14 Akagi201 joined #perl6
05:15 camelia rakudo-moar fae01f: OUTPUT«(timeout)»
05:15 moritz m: say join ' ', 'a' ... '「'
05:15 camelia rakudo-moar fae01f: OUTPUT«␤»
05:17 AlexDaniel oh that's my favorite stuff
05:17 AlexDaniel m: say chr -1
05:17 camelia rakudo-moar fae01f: OUTPUT«chr codepoint cannot be negative␤  in block <unit> at /tmp/RdPRf8slzU:1␤␤»
05:17 AlexDaniel m: say chr -0.999
05:17 camelia rakudo-moar fae01f: OUTPUT«␀␤»
05:17 AlexDaniel m: say chr -0.99999999999999999999999999999999999
05:17 camelia rakudo-moar fae01f: OUTPUT«chr codepoint cannot be negative␤  in block <unit> at /tmp/eNmQxDkWPX:1␤␤»
05:18 AlexDaniel m: say chr -0.99999999999999999999999999999999999999999​99999999999999999999999999999999999999999999​9999999999999999999999999999999999999999999
05:18 camelia rakudo-moar fae01f: OUTPUT«␀␤»
05:18 AlexDaniel m: say chr -0.99999999999999999999999999999999999999​99999999999999999999999999999999999999999​99999999999999999999999999999999999999999​999999999999999999999999999999999999999
05:18 camelia rakudo-moar fae01f: OUTPUT«chr codepoint cannot be negative␤  in block <unit> at /tmp/SIzzA6BLfm:1␤␤»
05:18 AlexDaniel and so on :)
05:19 Elyan hey
05:21 leslie_ left #perl6
05:29 skids joined #perl6
05:46 [Sno] joined #perl6
05:47 Hor|zon joined #perl6
05:56 adhoc joined #perl6
05:57 nine .tell lizmat I feel like timotimo++ there. Supply.await not waiting for anything feels strange. What it does is more like a for-await, since what it gives you can be used with await. I'd rather call it .Promise, too.
05:57 yoleaux nine: I'll pass your message to lizmat.
05:58 nine .tell lizmat or if coercion is not the mechanism we're after (I'm undecided on that), something completely different. Maybe "waiter" ;)
05:58 yoleaux nine: I'll pass your message to lizmat.
06:03 [Tux] test             50000    37.605    37.493
06:03 [Tux] test-t           50000    38.816    38.703
06:05 diana_olhovik joined #perl6
06:11 abraxxa joined #perl6
06:17 tokuhirom_ joined #perl6
06:40 Ven joined #perl6
06:48 Hor|zon joined #perl6
06:49 rurban joined #perl6
06:51 bjz joined #perl6
06:51 Suzeanne joined #perl6
06:51 rarara_ joined #perl6
06:58 boggard joined #perl6
07:02 domidumont joined #perl6
07:07 domidumont joined #perl6
07:14 Suzeanne left #perl6
07:15 ely-se joined #perl6
07:17 zakharyas joined #perl6
07:17 [Sno] joined #perl6
07:18 Hor|zon joined #perl6
07:19 salva joined #perl6
07:19 timotimo FWIW, there's already a whole bunch of methods to go between different kinds of our async/multithreaded things
07:22 timotimo of course i can't come up with good examples for naming right now
07:23 g4 joined #perl6
07:23 g4 joined #perl6
07:27 firstdayonthejob joined #perl6
07:28 CIAvash joined #perl6
07:37 adu joined #perl6
07:40 Ven joined #perl6
07:47 Ven joined #perl6
07:51 Ven_ joined #perl6
08:03 tokuhirom_ joined #perl6
08:05 espadrine joined #perl6
08:06 bjz joined #perl6
08:06 darutoko joined #perl6
08:10 RabidGravy joined #perl6
08:12 Ven joined #perl6
08:13 RabidGravy morning!
08:14 Ven_ joined #perl6
08:16 Ven joined #perl6
08:16 azawawi joined #perl6
08:19 azawawi hi #perl6
08:19 azawawi is there an 'assert' keyword in Perl 6?
08:20 FROGGS_ no
08:20 moritz it's an infix called "or die" :-)
08:21 azawawi https://github.com/azawawi/perl6-seleniu​m-webdriver/blob/master/examples/ex01.t  # First test :)
08:22 FROGGS_ ohh, nice
08:22 pmurias joined #perl6
08:22 azawawi automated headless website testing in Perl 6 :)
08:23 rindolf joined #perl6
08:24 FROGGS_ m: my @a = 1,2,3; my @b; @b.push: @a,; dd @b
08:24 camelia rakudo-moar fae01f: OUTPUT«Array @b = [[1, 2, 3],]␤»
08:24 FROGGS_ m: my @a = 1,2,3; my @b; @b.push: @a; dd @b
08:24 camelia rakudo-moar fae01f: OUTPUT«Array @b = [[1, 2, 3],]␤»
08:25 dakkar joined #perl6
08:25 FROGGS_ m: my @a = 1,2,3; my @b; @b.append: @a,; dd @b
08:25 camelia rakudo-moar fae01f: OUTPUT«Array @b = [1, 2, 3]␤»
08:25 FROGGS_ m: my @a = 1,2,3; my @b; @b.append: @a; dd @b
08:25 camelia rakudo-moar fae01f: OUTPUT«Array @b = [1, 2, 3]␤»
08:25 timotimo i'm surprised that doesn't die; doesn't google automatically redirect you to https nowadays?
08:26 azawawi timotimo: you mean ex01.t ?
08:27 timotimo yeah
08:28 azawawi well it didnt on my linux box :)
08:28 RabidGravy azawawi, nice one
08:29 azawawi i will write also more ui tests for "doc.perl6.org" :)
08:30 azawawi that way we will have less regressions when changing the website functionality
08:31 Ven joined #perl6
08:31 FROGGS_ azawawi++
08:31 FROGGS_ that's awesome
08:32 azawawi btw travis CI comes with phantomjs preinstalled
08:32 azawawi so we can use that to our advantage
08:33 timotimo quite neat!
08:33 Ven joined #perl6
08:33 azawawi http://docs.travis-ci.com/user/gui-an​d-headless-browsers/#Using-PhantomJS
08:34 timotimo actually doing something web-app-like in the future sounds more and more like a possibility :)
08:34 azawawi timotimo: yup
08:34 azawawi timotimo: you do the server part
08:34 azawawi timotimo: i will test it :)
08:36 azawawi now i have a problem with documentation
08:36 azawawi i need =(begin|end) markdown
08:36 timotimo i'll still need an idea first :P
08:37 Ven joined #perl6
08:38 Ven m: class A { my $!x; method a { sleep 5; $!x = 10; method a { $!x } } }; given A.new { say .a; say .a; }
08:38 camelia rakudo-moar fae01f: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any throw at src/Perl6/World.nqp:3617␤5===SORRY!5=== Error while compiling /tmp/_3PCraXlvf␤Cannot use ! t…»
08:38 Ven m: class A { my $!x; method a {  method a { $!x }; sleep 5; $!x = 10; } }; given A.new { say .a; say .a; }
08:38 camelia rakudo-moar fae01f: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any throw at src/Perl6/World.nqp:3617␤5===SORRY!5=== Error while compiling /tmp/XGh9rYkt95␤Cannot use ! t…»
08:39 Ven http://weblog.jamisbuck.org/​2015/10/17/dynamic-def.html is really fun :P
08:40 dalek roast: f50149e | FROGGS++ | S02-types/flattening.t:
08:40 dalek roast: test method push/append for RT #126172
08:40 dalek roast: review: https://github.com/perl6/roast/commit/f50149e607
08:40 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=126172
08:42 ely-se Ven: absolutely awful
08:42 Ven ely-se: you mean amazing
08:42 Ven ruby needs more metaprogramming facilities
08:42 ely-se No, it needs fewer. And more immutability.
08:42 spider-mario joined #perl6
08:43 Ven you wouldn't know, you don't write ruby :P
08:43 ely-se Mutable classes are a horrible horrible idea.
08:43 rurban :)
08:44 rurban but that's the whole point of metaclasses
08:44 rurban to change many classes at once
08:44 Ven `class A < [Hash, Array].sample; end;` <- amazing
08:44 ely-se awful
08:44 Ven executable class bodies are great – that's why elixir stole that :P
08:44 timotimo "class Awful"? :)
08:45 ely-se one of the few things PHP gets right: no dynamic class manipulation bullshit
08:45 rurban it just needs to trigger all the class optimizations
08:45 rurban common-lisp did it properly and efficient
08:45 Ven rurban: yeah, MRI took a looong time to get a hierarchical method cache
08:45 Ven rurban: good interview, btw
08:46 lsm-desktop joined #perl6
08:47 RabidGravy aw
08:48 RabidGravy azawawi, I've just chucked in  a PR for NCurse with a new example if you want it :)
08:49 rurban method cache, role/mixin layout, inheritance tree, …
08:50 Ven joined #perl6
08:53 Ven joined #perl6
08:54 konobi pmurias: so it's the gen script that would be updated, not the Makefile-JS.in ?
08:54 yoleaux 18 Oct 2015 18:38Z <pmurias> konobi: I'll replace the build system for nqp-js with a saner one tommorrow
08:59 azawawi RabidGravy: thanks
08:59 azawawi RabidGravy++
08:59 FROGGS_ m: /<.ws >/
08:59 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eVs29YYnwZ␤Null regex not allowed␤at /tmp/eVs29YYnwZ:1␤------> 3/<.ws 7⏏5>/␤»
08:59 FROGGS_ std: /<.ws >/
08:59 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Null pattern not allowed at /tmp/H6BOCqVpwM line 1:␤------> 3/<.ws 7⏏5>/␤Parse failed␤FAILED 00:00 135m␤»
08:59 FROGGS_ k
09:00 konobi ah
09:02 konobi must have lost that in a netsplit or something
09:02 RabidGravy azawawi, seemed a shame to have it go to waste :)
09:02 konobi time for sleeping... then to voting!
09:04 tokuhirom_ joined #perl6
09:05 azawawi RabidGravy: :)
09:07 zakharyas joined #perl6
09:08 Ven_ joined #perl6
09:11 Ven joined #perl6
09:12 dalek rakudo/nom: 4b1df7b | FROGGS++ | src/Perl6/Grammar.nqp:
09:12 dalek rakudo/nom: allow whitestape in ::( "&foo"), RT #126385
09:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b1df7b018
09:12 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=126385
09:13 azawawi m: sub foo { 1 }; while foo > 1 {}    # What's wrong with this one?
09:13 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yQN1S8MWRj␤Preceding context expects a term, but found infix > instead␤at /tmp/yQN1S8MWRj:1␤------> 3sub foo { 1 }; while foo >7⏏5 1 {}    # What's wrong with this one?␤»
09:14 azawawi m: sub foo { 1 }; while foo() > 1 {}    # foo()
09:14 camelia rakudo-moar fae01f: ( no output )
09:14 Ven_ joined #perl6
09:14 bjz joined #perl6
09:16 azawawi sub foo { 1 }; while foo > 1 {}    # is that by design?
09:18 Exodist joined #perl6
09:18 timotimo m: sub foo { 1 }; while foo > 1 { }; say "oh"
09:18 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QtdsJhpyvt␤Preceding context expects a term, but found infix > instead␤at /tmp/QtdsJhpyvt:1␤------> 3sub foo { 1 }; while foo >7⏏5 1 { }; say "oh"␤»
09:18 dalek roast: 0478776 | FROGGS++ | S02-names/indirect.t:
09:18 dalek roast: add tests for indirect names with whitespace
09:18 dalek roast: review: https://github.com/perl6/roast/commit/0478776107
09:18 timotimo m: sub foo { 1 }; while foo() > 1 { }; say "oh"
09:18 camelia rakudo-moar fae01f: OUTPUT«oh␤»
09:18 azawawi RabidGravy: https://github.com/azawawi/perl6-ncurse​s/blob/master/examples/starfield.p6#L30  :)
09:18 FROGGS_ m: sub foo { 1 }; say foo > 1
09:18 camelia rakudo-moar fae01f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yegAoSRg6a␤Preceding context expects a term, but found infix > instead␤at /tmp/yegAoSRg6a:1␤------> 3sub foo { 1 }; say foo >7⏏5 1␤»
09:19 timotimo well, subs expect to get arguments
09:19 FROGGS_ true
09:19 timotimo we don't have parser-altering prototypes like perl5
09:19 RabidGravy azawawi, oops I was just testing the startup time and forgot to take that out ;-)
09:19 azawawi RabidGravy: no problem. will fix it
09:19 timotimo oh, i didn't see the earlier evaluations there
09:19 azawawi RabidGravy: done
09:20 ssflying joined #perl6
09:20 RabidGravy yay!
09:21 azawawi RabidGravy++
09:21 abaugher joined #perl6
09:29 Psyche^_ joined #perl6
09:37 brrt joined #perl6
09:49 FROGGS__ joined #perl6
09:51 zakharyas joined #perl6
09:52 ShimmerFairy joined #perl6
09:55 eliasr joined #perl6
10:04 tokuhirom_ joined #perl6
10:13 Ven joined #perl6
10:21 araujo_ joined #perl6
10:23 rindolf joined #perl6
10:27 lizmat m: dd (-1) ** 4553535345364535345634543534
10:27 yoleaux 05:57Z <nine> lizmat: I feel like timotimo++ there. Supply.await not waiting for anything feels strange. What it does is more like a for-await, since what it gives you can be used with await. I'd rather call it .Promise, too.
10:27 camelia rakudo-moar 4b1df7: OUTPUT«0␤»
10:27 yoleaux 05:58Z <nine> lizmat: or if coercion is not the mechanism we're after (I'm undecided on that), something completely different. Maybe "waiter" ;)
10:28 lizmat guess I need to backlog  :-)
10:29 lizmat seems RT #124798 tests are passing
10:29 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124798
10:30 nine lizmat: is that about the power.t failure we've had for weeks, or is it something different?
10:30 lizmat well, one of the todoed tests is passing
10:30 lizmat at least, for me, on OS X
10:31 lizmat but here on camelia (linux I assume) it's still failing
10:31 * nine is building to test on Linux
10:31 lizmat $ 6 'dd (-1) ** 4553535345364535345634543534'
10:31 lizmat 1
10:33 dalek roast: f2c1417 | lizmat++ | S32-num/power.t:
10:33 dalek roast: Change dubious test to skip
10:33 dalek roast:
10:33 dalek roast: Passes on OS X, fails on other systems
10:33 dalek roast: review: https://github.com/perl6/roast/commit/f2c14176cc
10:34 nine power.t passes on Linux with no TODOs passed
10:34 lizmat well, the above test passed for me since yesterday
10:35 nine Odd....I'd have never suspected there to be a platform difference in that area
10:35 lizmat me neither, but it *is* annoying :-)  (well, for me, running many spectests a day)
10:36 nine I guess they already passed for you before yesterday. They've been failing on Linux, which is why they were marked todo again.
10:37 nine And yes, having to run spectests again on pristine nom just to compare the list of failing tests is perfect waste of developer time :)
10:38 pmurias konobi: yes
10:38 bjz_ joined #perl6
10:39 pmurias konobi: Makefile-JS.in even has an autogenerated comment on top
10:39 pmurias konobi: it's in the repo as it's generated by an nqp script
10:39 weihan joined #perl6
10:43 RabidGravy joined #perl6
10:46 pmurias_ joined #perl6
10:47 RabidGravy leaving a kernel upgrade to 4.2.3 without bouncing probably wasn't a good idea then
10:48 cognominal joined #perl6
10:52 Sgeo_ joined #perl6
11:03 AndyDee joined #perl6
11:03 * lizmat wonders if there is something to mention about the Pittsburgh Perl Workshop that hasn't been mentioned before in the Perl 6 Weekly
11:05 moritz double mentions are OK :-)
11:06 lizmat yeah, but not in consecutive weeks  :-)
11:07 kid51 joined #perl6
11:18 Ven joined #perl6
11:20 tokuhirom_ joined #perl6
11:27 Suzeanne joined #perl6
11:38 araujo joined #perl6
11:41 dalek rakudo/nom: 42e55ec | lizmat++ | src/Perl6/World.nqp:
11:41 dalek rakudo/nom: Make sure use invocant/parameters throw an NYI
11:41 dalek rakudo/nom:
11:41 dalek rakudo/nom: Since they're not working yet, but were being parsed and set up
11:41 dalek rakudo/nom: the internals already.  In light of the coming release this week.
11:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/42e55ecf25
11:50 ely-se joined #perl6
11:52 ][Sno][ joined #perl6
11:55 Hor|zon joined #perl6
12:00 brrt good * #perl6
12:03 rindolf brrt: hello.
12:03 rindolf brrt: sup?
12:04 Woodi hallo #perl6 :)
12:05 Woodi moritz: about DBIish API...
12:06 Ven \o
12:06 ely-se o/
12:07 Woodi 1) would be nice to remove "drivers" into separate modules with separate "namespace" eg. API::Mysql. and there to have full db api, even versioned: mysql4, mysql5.5 ... 5.7 (if different of course)
12:07 Woodi so users can opt for "raw" access to engine
12:08 lizmat Woodi: have you considered roles ?
12:09 Woodi moritz: 2) (as for what you realy asked) I like MS in-memory "datasets" similiar to @rows probably. it allows to do changes and commit at the end
12:10 Woodi lizmat: not. versioning on API version probably needs modules
12:11 brrt hello rindolf, Woodi, Ven, ely-se, lizmat
12:11 Woodi I imagine having API::Posix, API::Linux, API::Win32, etc
12:12 brrt rindolf: busy busy busy. small bits of progress on the new jit
12:12 pmurias didn't Tim Bunce plan to use JDBC as the internal driver api for the DBI 2.0?
12:12 * timbunce nods
12:12 moritz Woodi: thanks for the feedback, but that AIP is a bit too high-level for DBIish
12:13 Woodi moritz: ?? which "that" ?
12:13 lizmat brrt o/
12:13 Woodi DBIis could be done on top on raw db api. threaded/evented/supplied versions too
12:16 rindolf brrt: ah, nice.
12:17 brrt maybe i may want to ask my design question here
12:17 brrt i need to deal with different-sized-operands
12:17 brrt that is usually no problem so long as the operands are both a): unsigned and b): either 8 or 4 bytes wide
12:18 moritz Woodi: allowing changes to in-memory data structures and committing at the end
12:22 moritz that's more the realm of an OR mapper
12:22 moritz and just because it looks deceptivelly simple to write one in p6 doesn't mean DBIish should mogrify into one
12:24 Woodi moritz: just ideas. depends what "scope" DBIish have. datasets could be done on top of it :)
12:25 weihan_ joined #perl6
12:26 Woodi and not 100% ORM. just a noting "this cell changed" somewhere
12:26 weihan joined #perl6
12:27 weihan joined #perl6
12:28 timotimo so an ... Objecd Dataset Mapper?
12:28 Woodi Plain Array Mapper ;)
12:28 * [Coke] tries to add https://www.reddit.com/r/perl6/.rss to feedly's rss reader, but only gets articles that are 6 weeks old+
12:29 timotimo can't just be a plain array if it's supposed to track what changed
12:29 Woodi timotimo: it is mapper part for :)
12:29 timotimo mhm
12:31 weihan joined #perl6
12:34 lea joined #perl6
12:35 moritz [Coke]: maybe https://www.reddit.com/r/perl6/new/.rss ?
12:36 tokuhirom_ joined #perl6
12:37 weihan joined #perl6
12:38 weihan joined #perl6
12:38 brrt anyway, the question is basically how to handle mixed operands that aren't unsigned and 4-to-8 bytes
12:39 brrt i.e. when using a 2-byte operand together with an 8-byte operand, the 2-byte operand (if it lives in a register) still contains 'garbage' data for the upper 6 bytes
12:40 brrt now in the case the values are unsigned, the upper 6 bytes should be zeroed'; in case they are not, they should be sign-extended (either zeroed or one'd depending on the upper bit)
12:41 brrt actually, sign extension is also necessary for 4 byte values
12:41 brrt my question is basically how explicit or implicit should this be
12:41 nine brrt: sign-extending is equal to zeroing for positive values, isn't it?
12:41 brrt i aye
12:41 brrt aye
12:42 brrt it's literally 'extending the sign byte' which is zero for positive values
12:43 sufrostico joined #perl6
12:44 Woodi brrt: you are talking about in-vm things or asm things ? in first case maybe lower-level can handle this ?
12:44 brrt asm things
12:44 nine x86 does have an op for that
12:44 brrt i know : movsx and movz for sign- and zero-extension repsectively :-)
12:45 nine I guess for API design, a good rule of thumb is: the lower level the more explicit
12:45 Woodi heh
12:45 brrt hmm, i tend to agree
12:46 brrt on the other hand, i may have cases in which it is nearly impossible to know ahead-of-time the size of all operands
12:47 brrt e.g. when using the value of one computation in another i may not know how big the operand is ahead of time; especially when considering different architectures
12:47 brrt i.e. i may specify something as sizeof(int) and that should work; but i have no idea of whether an upscaling operation would be necessary
12:47 weihan joined #perl6
12:48 brrt so, i'm leaning to 'automatic' upscaling of registers
12:48 brrt now i can do that in two ways as well
12:49 brrt a): shotgun style, by hardcoding it into the assembly; b): using specific 'scale' tree nodes that handle the conversion
12:50 brrt problem of a); is very simply that it becomes much more cumbersome, not to say impossible, to add in signedness information
12:50 reneeb joined #perl6
12:50 brrt b): of course can do so very simply, but i have to make some decisions on which things are unsigned and which things are signed
12:51 brrt i would suppose normal integer arithmetic would be signed, whereas pointer arithmetic is unsigned
12:52 brrt what about binary operations (AND/OR/XOR)?
12:53 nine And what about uints?
12:53 [Coke] moritz: weird. was necessary for feedly, but not for the web browser. ah well. Danke.
12:55 Woodi brrt: b) looks simpler ;)
12:56 brrt well, we're not dealing with uints much yet nine :-) fortunately
12:57 brrt woodi: I think so too... i just need to make some decisions on the individual ops
12:57 brrt the expr tree has only about 30 or so ops so that is not very difficult
12:58 timbunce For the record, re a DBI for Perl 6, this still applies http://markmail.org/message/oavyl5l4dlme5dft
12:58 nine brrt: but they're on the TODO. So it seems prudent to at least keep them in mind and not make it harder to add them later on.
12:59 brrt my hunch is that binary ops, by default, are unsigned; pointer arithmetic ops too;, arithmetic ops are signed,  comparisons are... signed, i guess
12:59 brrt integer comparisons, that is
12:59 brrt nine: agreed. but worst case i simply add a U for every signed operation, e.g. UADD, UMUL, UDIV
12:59 riatre joined #perl6
13:00 Woodi timotimo: but, but... it is Oracle api ! ;)
13:00 brrt carg is.... doesn't really care about it, i think, since the operand sizes will typically match the expected size by the function anyway
13:00 Woodi oops, timbunce
13:01 timbunce Woodi: "insired by" :)
13:01 timbunce *inspired
13:02 Woodi "one slide to close"... ;)
13:03 timotimo intel's new motto: there's an op for that
13:04 timbunce The key point is that there needs to be a low-level api abstracting the db vendor api's, on which to build a higher level perl6y one.
13:04 timbunce JDBC seems like a good choice, but isn't a key feature.
13:05 nine timbunce: I guess JDBC still usually covers all of the DB's capabilities?
13:05 timbunce Also using JDBC gives us an instant test suite.
13:06 timbunce Yes, all the main stuff and quite a lot of extensions. Though there'll always be a need for vendor-specific extensions.
13:06 timbunce Also using JDBC gives us an instant body of code and experience to draw on.
13:07 timbunce Also using JDBC gives us "does it work on Perl 6 on JVM using the real JDBC" as a debugging strategy
13:07 timbunce etc etc
13:08 nine Also stealing the good parts is the Perl 6 way ;)
13:09 TimToady .oO(we *intend* to give it back though)
13:10 Woodi do MS hacked/embranced-and-hijacked ODBC ?
13:13 dalek specs: f845815 | lizmat++ | S99-glossary.pod:
13:13 dalek specs: Add reposession lemma, moritz++
13:13 dalek specs: review: https://github.com/perl6/specs/commit/f845815d7b
13:14 * brrt likes the jdbc plan
13:14 brrt MS supports ODBC, but it is barely functional typically
13:17 masak slightly off-topic: is there a Perl::Tidy analogue for Python?
13:18 nine masak: Python is tidy by definition
13:18 nine masak: also https://pypi.python.org/pypi/PythonTidy/
13:18 mattp_ joined #perl6
13:19 Woodi right, ODBC looks abandoned...
13:21 mrf ugexe++++ # Grammer::HTTP
13:22 masak nine: thank you. for both answers. :P
13:22 masak mrf: I had to go check whether the module name was actually misspelled like that ;)
13:23 masak fortunately, it wasn't.
13:23 mrf masak: Rule 1. I cannot spell for toffee
13:23 mrf masak: In fact I can't spell no matter what you offer me
13:23 masak oh, and the modules.perl6.org page got a facelift, too
13:23 masak whoever++
13:25 RabidGravy joined #perl6
13:27 ponzellus joined #perl6
13:27 Ven joined #perl6
13:27 brrt nine: it's true. perl is vernacular english, and python is polygoon-journaal dutch
13:28 mrf Grammars++ # I cannot express how awesome these things are.
13:29 geekosaur speeling++
13:30 E joined #perl6
13:31 Guest79214 @@?
13:31 kalkin- joined #perl6
13:31 kalkin- hi
13:31 Guest79214 hi ^__^
13:32 kalkin- I'am trying to install rakudo and panda via rakudobrew
13:32 kalkin- installing moarvm worked. but i have some issues installing panda
13:32 aborazmeh joined #perl6
13:32 aborazmeh joined #perl6
13:33 kalkin- when doing rakudobrew build-panda i'm getting the follwing error: http://nopaste.linux-dev.org/?783469
13:34 kalkin- exucuting /home/user/.rakudobrew/moar-nom/panda/bin/panda also throws a error (Could not find Shell::Command in any of:...)
13:34 gfldex is the pointed at directory in your PATH?
13:35 kalkin- well i added it and got the same error
13:35 kalkin- btw the pointed dir does not exists
13:35 kalkin- so this might also be an issue :)
13:35 Woodi about grammars :) : let's say I have grammar for file format X. I can .parsefile("file") and it tells me if everything is ok and gives candies. but when "file" is badly formated somewhere, let's say: in the middle, it just returns error... how I can "iterate" over what was good up to the middle of file ?
13:35 Ven Woodi: using debugging tools like :dba()
13:36 ponzellus Hi all, I'm starting to play with p6, but got stuck creating a constructor for a class, which has an attribute of another custom-class. I fail to create a constructor, in which I can initiate the second class: https://gist.github.com/ph​amer/71b8b38e565bca363b81
13:36 Ven or, if it's for your debugging purposes, tools like Grammar::Debugger or Grammar::Tracer
13:37 kalkin- is there some down side to using rakudo-star package from Fedora 21? It is versioned as 0.0.2015.06. it seems recent enough for me
13:37 brrt Woodi: in very general, 'that is not how grammars always work'
13:37 kalkin- or am i missing anything important?
13:37 Woodi Ven: debugging tools looks development-time tools...
13:38 brrt because (again in general) the meaning of the document might depend on the things after the broken-in-the-middle part
13:38 * brrt wonders if he can find an example of that
13:38 Ven Woodi: Grammar::Debugger and Grammar::Tracer are, yes
13:39 Woodi :dba are in the "match" from subparse ?
13:39 brrt my point is that the notion of the document until the parse error is not necessarily well-defined for all grammars
13:39 gfldex kalkin-: was does `perl6 --version` say?
13:41 RabidGravy ponzellus, I fixed it for you, left a comment on the gist
13:41 masak m: sub foo($x, $y = my $unpassed = {}) { say "\$y was {$y === $unpassed ?? "NOT " !! ""}passed" }; foo(1); foo(2, 3)
13:41 camelia rakudo-moar 42e55e: OUTPUT«$y was NOT passed␤$y was passed␤»
13:41 Woodi brrt: I want to write script to "repair" files in not-yet-format-X. and for now grammars helps me *after* file is well formatted :)
13:42 masak ^ nice pattern for checking whether a parameter was passed or not
13:42 RabidGravy ponzellus, the main point being that you don't need to supply a new() all the time, just use a "submethod BUILD"
13:42 brrt hmmmmmm
13:42 kalkin- gfldex: This is perl6 version 2015.09-420-g4b1df7b built on MoarVM version 2015.09-79-gee9fc2b
13:42 ponzellus RabidGravy, thanks a lot! though I think you pasted the original code?
13:43 RabidGravy I did, dud
13:43 RabidGravy hang on let me fix that
13:43 RabidGravy ponzellus, that should be better
13:44 blackcat joined #perl6
13:44 brrt i don't know how a grammar trace or grammar debugger work. but it seems to me that it'd be possible to write a class that gives you the half-parsed grammar
13:44 brrt masak: that is so... silly considering the actual implementation of optional args in moarvm
13:44 ponzellus I see, thanks!
13:45 brrt (it already employs a parameter-is-passed-conditional branch)
13:45 ponzellus so, is there a rule of thumb when to use new() or BUILD()?
13:45 loren good evening everyone. Is there any function like perl5's 'getsocketname' in perl6 ?
13:46 RabidGravy ponzellus, the BUILD gets called after the object has been constructed and before it is returned to the user
13:46 loren I saw synopses said something instead of 'getsocketname' in IO modules .
13:47 loren getsocketname -> getsockname
13:47 Woodi loren: generally in Perl6 shings like that are not in "language" but in modules
13:48 RabidGravy if you supply I new() then you have to construct the object yourself (probably using bless on the type object), you may want to do this for example if you want to have positional rather than named arguments to the constructor
13:48 FROGGS joined #perl6
13:48 masak brrt: but if you don't give it a *unique* default, you can't really tell an Any from nothing-was-passed.
13:48 Woodi loren: i don't see this in  http://doc.perl6.org/type/IO::Socket::INET
13:49 brrt masak: i know. but we could just 'publish' the it-was-passed information to the frame? perhaps using an nqp op
13:49 * masak realizes there's no risk of such confusion in his case, and goes with a simple `$y?` :)
13:49 gfldex kalkin-: that looks very recent. However, right now I would not trust any distribution package. Have a look at https://github.com/rakudo/rakudo and https://github.com/tadzik/rakudobrew and build it yourself.
13:49 TimToady m: use NativeCall; sub getsockname ($s) is native {*};
13:49 camelia rakudo-moar 42e55e: ( no output )
13:49 Ven Woodi: you can also use [<foo> || <.fail(..)>]
13:49 loren I find a RFC say will be in IO::Socket, but i found nothing..
13:50 Ven the parser does that a lot
13:50 TimToady something like that
13:50 brrt e.g. nqp:hasargn("$y")
13:50 loren http://www.perl6.org/archive/rfc/146.html , Is this available?
13:50 TimToady probably needs a better type on the argument though
13:50 brrt another option would be to give $y a special 'Unprovided' null-like value
13:51 loren http://design.perl6.org/S29.html#IO , this page mentioned 'getsockname'
13:51 kalkin- g.d
13:51 kalkin- gfd
13:51 kalkin- ups sory
13:51 RabidGravy loren, it mentions as "obsolete"
13:51 kalkin- gfldex: i will open an issue at rakudobrew and we will see were it leads to
13:52 Woodi Ven: I will think a bit about what this means :)
13:53 loren Ok, then i need something instead of that, have some idea ? RabidGravy
13:53 TimToady m: use NativeCall; sub getsockname (int $s) is native {*}; say getsockname(0)
13:53 camelia rakudo-moar 42e55e: OUTPUT«(Mu)␤»
13:53 RabidGravy :)
13:53 TimToady well, 0 is probably not a socket there...
13:54 rurban1 joined #perl6
13:54 RabidGravy It would be handier for those things if you could get the fd from the IO::Socket::INET
13:54 TimToady well, and native getsockname wants 3 args
13:54 RabidGravy we'll gloss over that part ;-)
13:55 Ven m: class A{ method a { method b { } } };
13:55 camelia rakudo-moar 42e55e: ( no output )
13:55 TimToady m: use NativeCall; sub getsockname (int $s, Buf $b, int $l) is native {*}; my $b = Buf.new(0 xx 100); say getsockname(0,b,100)
13:55 camelia rakudo-moar 42e55e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nLhTMYsLUJ␤Undeclared routine:␤    b used at line 1␤␤»
13:56 loren so, i would use nativecall instead ?
13:56 TimToady m: use NativeCall; sub getsockname (int $s, Buf $b, int $l) is native {*}; my $b = Buf.new(0 xx 100); say getsockname(0,$b,100)
13:56 camelia rakudo-moar 42e55e: OUTPUT«(Mu)␤»
13:56 khw joined #perl6
13:56 TimToady something like that, only on an actual socket
13:56 loren int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen); here is the signature
13:56 TimToady offhand I don't know how to get the fd from a handle
13:57 RabidGravy I don't think there currently is a way that is obvious
13:58 TimToady maybe after we bypass libuv for sync IO it'll be easier to get to
13:58 TimToady 'course, then you still couldn't do the async and get the sockname
13:59 TimToady doubtless libuv knows the fd somewhere though
13:59 dalek roast: 941f7aa | lizmat++ | S06-parameters/smiley.t:
13:59 dalek roast: Disable premature 'use parameters' tests for now
13:59 dalek roast: review: https://github.com/perl6/roast/commit/941f7aa564
14:00 loren ok, then i implement the 'pasv' mode first..
14:01 dalek rakudo/nom: a31cc91 | lizmat++ | src/core/Exception.pm:
14:01 dalek rakudo/nom: Handle typecheck errors with Failures better
14:01 dalek rakudo/nom:
14:01 dalek rakudo/nom: Fixes RT #126394
14:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a31cc91a0d
14:01 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=126394
14:03 RabidGravy TimToady, int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) in http://docs.libuv.org/en/v1.x/handle.html
14:04 TimToady well, then, someone just needs to hook it up, I guess
14:08 pmurias konobi: you might want to look at docs/HACKING-js
14:09 _28_ria joined #perl6
14:10 TimToady lizmat: why not use 'method priors' that was already there?
14:10 lizmat TimToady: good question
14:10 lizmat I guess I had forgotten about priors
14:12 lizmat hmmm... looks like I would need to change it in a lot of messages with priors  :-(
14:12 TimToady messing with gotn only really works well if we use it as the last thing in the message
14:13 skids joined #perl6
14:13 Ven .tell timotimo for some reason, your constants in gtk_cairo_shooter are.. undefined in the rest of the file..
14:13 yoleaux Ven: I'll pass your message to timotimo.
14:14 lizmat TimToady: looks like it is everywhere
14:14 Ven .tell timotimo btw, `perl6 livecoding.p6` errors with "Internal error: Unwound entire stack and missed handler" on my computer :[
14:14 yoleaux Ven: I'll pass your message to timotimo.
14:15 TimToady why wasn't priors catching the Failure already?
14:16 lizmat m: my Int $x = fail "important failure message"
14:16 camelia rakudo-moar 42e55e: ( no output )
14:16 lizmat hmmm....
14:16 lizmat I'm not sure...
14:16 lizmat maybe because there wasn't any prior yet ?
14:17 TimToady m: say nqp::isconcrete(Failure.new("oops"))
14:17 camelia rakudo-moar 42e55e: OUTPUT«1␤»
14:17 TimToady well, it's not that
14:18 TimToady I was a little surprised when the bug report came out, since it was supposed to handle that already...
14:18 lizmat well, maybe not that case  :-(
14:18 Ulti joined #perl6
14:19 lizmat I need to go afk for a few hours...
14:19 TimToady o/
14:19 lizmat when I'm back, I'll have a new P6W
14:19 loren o/
14:19 loren I'm back..
14:19 lizmat if anybody has anything to be mentioned in it, let me know
14:19 Ven lizmat++ :)
14:21 loren I want get local ip address ..
14:21 Ven lizmat: I know the perl weekly already had a few p6 links
14:21 Ven you might want to look at them
14:21 AndyDee joined #perl6
14:22 lizmat https://gist.github.com/li​zmat/6b02537b05ff01aed226 # for the very curious
14:22 loren 'gethost' not exist too, like 'getsockname'. i fell a little 'tired'
14:24 moritz lizmat: "now show the embedded Exception message" ~~ s/show/shows/
14:25 itz_ joined #perl6
14:25 brrt loren: there exists a LWP package for perl6, that may have an implementation of some of these things
14:25 Ven lots of great perl6 blog posts :)
14:26 softmoth joined #perl6
14:27 loren brrt, Is that perl6 standard module ? I really don't want to add another module to my project
14:29 lizmat moritz: disagree, show is about the Typecheck errors <-- note multiple
14:29 lizmat the comma however should probably go
14:29 brrt loren: rakudo-the-compiler ships only with very few modules, iirc just 'Test' and maybe some debugging modules
14:29 lizmat really afk&
14:30 brrt rakudo-star-the-distribution probably ships LWP, but i'm not 100% sure
14:30 telex joined #perl6
14:30 brrt it was more a suggestion in term of 'maybe that is an interesting example of how to do networking in perl6' :-)
14:31 loren ok, brrt i will try it later , thks very much
14:31 brrt :-) you're welcome
14:31 brrt please forgive perl6 for not being entirely finished and solid just yet
14:31 loren En, I want to implement a ftp client in perl6, there are a lot of problems.
14:32 timotimo rakudo only ships with Test, lib and NativeCall
14:32 yoleaux 14:13Z <Ven> timotimo: for some reason, your constants in gtk_cairo_shooter are.. undefined in the rest of the file..
14:32 yoleaux 14:14Z <Ven> timotimo: btw, `perl6 livecoding.p6` errors with "Internal error: Unwound entire stack and missed handler" on my computer :[
14:32 timotimo though i believe lib is now not even a module any more
14:32 loren I'll never give up it.
14:32 timotimo so yeah, only Test and NativeCall
14:32 brrt well, if you find missing stuff, bugs, feel free to report them
14:32 timotimo Rakudo * ought to come with some http thing
14:33 brrt loren: your experience is very valuable to us. that sounds very corporate, but it's true :-)
14:33 loren OK, BTW, will private multi method implement soon ?
14:33 timotimo we don't have that yet?
14:33 loren ee, in my version not exist.
14:34 loren i'm still use the last release .
14:34 Ven m: class A { multi method !a(Int) {}; multi method !a(Str) {} };
14:34 camelia rakudo-moar a31cc9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hBq6HhEdZv␤Private multi-methods are not supported␤at /tmp/hBq6HhEdZv:1␤------> 3class A { multi method7⏏5 !a(Int) {}; multi method !a(Str) {} };␤»
14:34 timotimo oh
14:34 timotimo didn't know that
14:35 Ven timotimo: I think the bug I .tell'd you is similar to mine
14:35 pmurias konobi: if you have any questions about nqp-js I'll glady answer them
14:36 timotimo i must say i don't love gtk.
14:36 timotimo at all.
14:37 loren The function name is longer and longer ..
14:37 Ven timotimo: oh.
14:37 weihan joined #perl6
14:37 itz_stmuk I don't think there are any nice GUI libraries
14:37 timotimo qt always felt nice to me
14:38 loren What about wxWidgets
14:38 Ven itz_stmuk: Delphi :P
14:39 dalek rakudo/nom: 48a0888 | TimToady++ | src/core/Exception.pm:
14:39 dalek rakudo/nom: easier to fix the original precedence bug :)
14:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48a0888cce
14:39 itz_stmuk TK :D
14:41 weihan joined #perl6
14:43 PerlJam huh
14:44 * PerlJam would have missed that precedence bug too
14:44 freeze joined #perl6
14:45 TimToady well, obviously I missed it when I installed it in the first place :)
14:46 flussence fltk's an option now we have C++...
14:46 jdv79 is someone working on async db?
14:47 jdv79 saw some mention in the backlog
14:49 PerlJam TimToady: small bugs like that worry me a little for future code maintenance.
14:50 PerlJam (mostly I worry that it will cause a rash of superstitious parens)
14:52 rurban joined #perl6
15:00 Ven_ joined #perl6
15:01 * [Coke] returns from a routine checkup, nothing to see here.
15:03 [Coke] RT: 1037; weird: 11; lta: 88; nom: 8; glr: 4; tests: 9; xmas: 74
15:03 Ven joined #perl6
15:04 moritz what's an easy way to get all xmas-tagged open tickets?
15:04 Alina-malina joined #perl6
15:05 [Coke] https://rt.perl.org/Ticket/Display.html?id=123766
15:05 [Coke] Anything without a line through it.
15:06 [Coke] anyone thinking of taking up thalhammer on his coverity email?
15:07 n0tjack joined #perl6
15:08 moritz m: sub foo { @_[0] = "bah" }; my $a = "!"; foo($a); say $a # RT #71112
15:08 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=71112
15:08 camelia rakudo-moar a31cc9: OUTPUT«!␤»
15:11 moritz ok, revolutionary idea
15:12 moritz how about we make @_ (and other slurpies) a List instead of an Array?
15:12 TimToady then you couldn't shift it?
15:12 moritz aye
15:13 TimToady and you can always do +foo instead
15:13 TimToady though perhaps we should allow *foo and **foo too
15:14 moritz 'cause if @_ stays an array, the example above will never blow up, as you requested some years ago :-)
15:16 TimToady in P5 the elements of @_ are raw refs, though
15:16 s_kilk joined #perl6
15:17 moritz that doesn't mean they need to be in 6
15:17 moritz m: module A { enum Day is export <Mon Tue>; sub Day is export { 'sub Day' } }; import A; say Day(0);
15:17 camelia rakudo-moar a31cc9: OUTPUT«Mon␤»
15:18 n0xff joined #perl6
15:19 moritz m: say 'ö'.encode('ASCII')
15:19 camelia rakudo-moar a31cc9: OUTPUT«Blob[uint8]:0x<3f>␤»
15:20 ilmari m: say '→'.encode('ASCII')
15:20 camelia rakudo-moar a31cc9: OUTPUT«Blob[uint8]:0x<3f>␤»
15:20 CIAvash joined #perl6
15:20 moritz m: say '→'.encode('ASCII').decode
15:20 camelia rakudo-moar a31cc9: OUTPUT«?␤»
15:20 moritz it uses the question mark as replacement character
15:21 moritz which makes me unhappy (RT #123673)
15:21 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=123673
15:21 ilmari surely charcters that don't exist in the target encoding should throw an exception
15:22 moritz see the ticket I mentioned :-)
15:22 ilmari $ python -c '"ø".encode("ascii")'
15:22 ilmari UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
15:22 ilmari buggy error message, should be s/\<de/en/
15:23 ilmari and s/byte/character/
15:23 firstdayonthejob joined #perl6
15:24 et09 joined #perl6
15:24 et09 is there any way to not have to type semicolons, like in JS ES6?
15:25 boggard i've never heard a good argument for that.
15:25 et09 less typing
15:25 et09 guess it's just a parser design argument
15:26 et09 vs that
15:26 et09 :m { 3.say }
15:27 PerlJam semicolons are not that onerus to type :)
15:27 et09 every char adds up
15:27 moritz et09: Perl 6 allows you to omit the semicolon after a } if it's followed by a newline
15:28 masak et09: optional semicolons are not new with ES6. rather, it's a regretful misfeature from ES1 that's not possible to remove.
15:29 et09 maybe haskell is a better example
15:29 et09 of course they have indent-coding
15:29 abaugher joined #perl6
15:29 masak I don't think Perl 6 would fit well with a semicolon-less style, to be honest
15:29 masak I don't mean esthetically -- I mean it wouldn't work so well in practice
15:29 PerlJam semicolons make nice sequence points
15:30 pmurias et09: for sure there will be a module to turn off required semicolons
15:30 masak also, they allow for free-form statements
15:30 kalkin- i fixed my issue an installation of perl-Test-Harness-3.35-1.fc21.noarch fixed it
15:30 et09 all i know is my life is 5x easier since i started using babel for es6 on the backend
15:30 [Sno] joined #perl6
15:30 et09 () => { } too (even though that's still not the prettiest
15:31 flussence parens are optional in single-arg js lambdas
15:31 et09 i know
15:31 et09 so are the { } for a single statement block
15:31 et09 _.map(objs, obj => obj.prop * 2)
15:32 pmurias et09: for a semicolon less style the way python inserts them seems much more sane than what javascript does
15:32 PerlJam et09: are you *sure* you want perl 6?  ;)
15:32 flussence @objs».prop »*» 2 is still shorter :)
15:33 et09 well i seem to like everything else i read about it
15:33 et09 python's not very expressive is it
15:35 xfix joined #perl6
15:36 AlexDaniel joined #perl6
15:37 flussence python is a strange middle ground between perl and php
15:38 flussence all the compatibility breaks of the former and all the progress of the latter :)
15:38 et09 you mean 2/3 ?
15:38 et09 n/m i get it, lol
15:39 flussence I'm not sure any more; they seem to keep changing APIs even in the 2 series
15:39 et09 i barely ever use python, i just know once in a while i have to open a program and change the hashbang so it uses the right python
15:39 abaugher joined #perl6
15:40 kalkin- well at least you was sure if you started a new project that it's going to bea php5. if I start a python project most of the time i think 2 or 3? does it even mater?
15:40 rurban joined #perl6
15:40 kalkin- s/you was/you were/
15:41 flussence py3.5 has one nice feature that I've seen: they've stolen q:c"" :)
15:42 flussence (and put it into a string prefix letter I can't remember the mnemonic of...)
15:43 ilmari moritz: #123673 needs fixing in nqp, since Str.encode just calls nqp::encode()
15:43 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=123673
15:45 loren good night, every one and perl6.
15:46 ilmari j: say 'å'.encode('ASCII')
15:46 camelia rakudo-jvm 48a088: OUTPUT«Blob[uint8]:0x<3f>␤»
15:46 spider-mario joined #perl6
15:46 PerlJam .oO( loren ipsun dolos siu )
15:47 loren o/ PerlJam
15:48 PerlJam good night :)
15:48 ilmari the jvm backend just uses String.getBytes, which says «The behavior of this method when this string cannot be encoded in the default charset is unspecified.»
15:49 ilmari «The CharsetEncoder class should be used when more control over the encoding process is required.»
15:49 itz_stmuk is there anyway of using the debugger to set breakpoints inside CORE.setting?
15:50 dalek roast: 3e936df | coke++ | S06-parameters/smiley.t:
15:50 dalek roast: Use fudge directives
15:50 dalek roast: review: https://github.com/perl6/roast/commit/3e936dffad
15:52 rurban1 joined #perl6
15:53 dalek ecosystem: 5f6c96b | (Shoichi Kaji)++ | META.list:
15:53 dalek ecosystem: add Frinfon
15:53 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/5f6c96b776
15:53 dalek ecosystem: 07a25f8 | (Zoffix Znet)++ | META.list:
15:53 dalek ecosystem: Merge pull request #81 from shoichikaji/frinfon
15:53 dalek ecosystem:
15:53 dalek ecosystem: add Frinfon
15:53 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/07a25f802d
15:57 Ch0c0late joined #perl6
16:00 dalek rakudo/nom: c32c57f | TimToady++ | docs/ChangeLog:
16:00 dalek rakudo/nom: TimToady changes since last release
16:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c32c57f675
16:00 n0tjack joined #perl6
16:01 SuzieQueue joined #perl6
16:06 TimToady flussence: X* is even sorter than »*»
16:07 flussence sometimes I wonder... with X what's »» good for?
16:07 Akagi201 joined #perl6
16:07 flussence oh right, parallelization
16:07 flussence forgot that actually works now :)
16:07 TimToady and it has different semantics on the short end
16:08 TimToady »» is more like APL semantics
16:08 TimToady replicates the short dimension
16:08 TimToady well, I guess X does that too, was thinking of Z
16:08 dha joined #perl6
16:08 n0tjack m: say 'short' >>~>> 'longer';
16:08 camelia rakudo-moar 48a088: OUTPUT«shortlonger␤»
16:09 n0tjack m: say 'short'.comb >>~>> 'longer'.comb;
16:09 camelia rakudo-moar 48a088: OUTPUT«(sl ho on rg te)␤»
16:09 n0tjack heh
16:09 TimToady but X and Z are naturally for two lists (so you don't need parens on either side), while hypers are more for matrices and such
16:10 kjs_ joined #perl6
16:10 TimToady n0tjack: yeah, there's that too
16:11 TimToady list vs matrix is why X and Z are quite loose, and hypers follow their base operator's precedence
16:11 n0tjack what's the idiomatic way to say matrix-mult in p6?
16:12 * n0tjack realizes he doesn't even know how to idiomatically intialize a 2D matrix in p6
16:13 TimToady we don't quite have the notation yet, but that'll be here in a few weeks, since we have the underlying primitives in line
16:13 TimToady so we don't have a matrix multiply built in yet, but see http://rosettacode.org/wiki/​Matrix_multiplication#Perl_6
16:14 TimToady we can subscript with multi-dims, but we just don't have the "shaped" declaration syntax hooked up
16:14 n0tjack surely there's more concise way than @p[$r][$c] += @a[$r][$_] * @b[$_][$c]
16:14 TimToady sure, look down further :)
16:14 n0tjack like with [+] and >>*<< etc
16:15 n0tjack there we go :)
16:16 ^elyse^ joined #perl6
16:16 TimToady when I saw you wanted that, I hopped into my DeLorean and went back to add it earlier :)
16:16 boggard let's go cubbies!
16:17 PerlJam At some point it will be useful to have some PDL -> P6 examples (or perhaps NumPy/matlab/octave/etc -> P6)
16:18 colomon joined #perl6
16:18 TimToady well, we really need to get the abstract slicing carried over from PDL before that makes sense, unless we're talking about P6 sugar over P5 PDL
16:18 TimToady but we do have lotsa sugar :)
16:20 TimToady n0tjack: also, that implementation is really just for Array of Array, not real matrices
16:21 TimToady real mat ops will want to keep things in native shaped arrays when possible
16:23 [Coke] should pod N<>'s be separated from the thing they note by whitespace?: e.g. filesN<a note> vs. files N<a note>
16:23 PerlJam [Coke]: no whitespace is how I've been doing it.
16:24 n0tjack how is a native shaped array laid out in memory?
16:24 PerlJam n0tjack: efficiently  ;)
16:24 n0tjack in the APLs, it's something like {flags}{shape}{ravel}
16:24 ilmari n0tjack: as a C compiler would
16:24 n0tjack well, let me ask a different way: row major or column major?
16:24 n0tjack ok
16:24 ilmari (one of the use cases is NativeCall)
16:25 TimToady but since we have representational polymorphism, it'd be easy to support column major in a pinch
16:25 ilmari ah, NativeCall has its own CArray type
16:25 n0tjack one fun thing in J is you can "hide information" in the shape of an empty array
16:26 [Coke] PerlJam: makes running things like spell check marginally harder.
16:26 TimToady just leave off the {ravel}, eh?
16:26 n0tjack kinda
16:27 n0tjack if you use 0s and 1s as the lengths of each axis, then the volume will be either 0 or 1
16:27 TimToady well, we use descriptors rather than inlining, but similar idea if you have a shaped type without instantiating
16:27 n0tjack thus: 1 1 0 1 0 0 0 1 1 0 1 0 0 1 0 1 0 0 0 0 1 $ 'whatever' prints as empty
16:27 n0tjack but you can ask for the shape, convert it to ascii, and get 'hi!'
16:27 FROGGS o/
16:27 PerlJam [Coke]: aye.
16:28 pierrot_ joined #perl6
16:28 * FROGGS would really like to get below 2**10 RTs this week
16:28 dalek doc: 05b19b7 | coke++ | doc/ (27 files):
16:28 dalek doc: Fix typos.
16:28 dalek doc:
16:28 dalek doc: Remove some nounifications.
16:28 dalek doc: review: https://github.com/perl6/doc/commit/05b19b71af
16:28 dalek doc: 75361a3 | coke++ | doc/ (2 files):
16:28 dalek doc: Space out highlighted words.
16:28 dalek doc: review: https://github.com/perl6/doc/commit/75361a384d
16:29 [Coke] PerlJam: ^^ spaces out an L & and a B but left the N's alone.
16:29 espadrine_ joined #perl6
16:29 TimToady I have a vague suspicion that the inline representation would make it difficult to support extensible dimensions the way a descriptor based approach can
16:29 diegok joined #perl6
16:29 FROGGS m: "" ~~ /{}*/; say "alive"
16:29 TimToady you'd have to reshape the array every time you write to such a dimension
16:29 [Coke] Help request: doc reviews of non technical "is this english" always appreciated.
16:30 camelia rakudo-moar c32c57: OUTPUT«(timeout)»
16:30 freeze joined #perl6
16:30 boggard joined #perl6
16:30 nine joined #perl6
16:30 FROGGS [Coke]: heh, I can't help you there :o)
16:30 BooK joined #perl6
16:30 ponbiki joined #perl6
16:30 lucs joined #perl6
16:30 gonz_ joined #perl6
16:30 jferrero joined #perl6
16:30 TimToady .tell lizmat pretty much everything I did this week is reflected in the git log
16:30 yoleaux TimToady: I'll pass your message to lizmat.
16:31 z448 joined #perl6
16:31 gfldex joined #perl6
16:31 jevin joined #perl6
16:32 [Coke] continue to be kind to your release engineer and update the changelog. Thanks to everyone I've seen pushing stuff in there this week!
16:33 Hotkeys joined #perl6
16:33 TimToady and please don't use backticks for quotes, it's really ugly
16:34 moznion joined #perl6
16:34 moritz TimToady: it's markdown, it's what markdown uses for code
16:34 TimToady well, then, markdown is ugly
16:35 TimToady and the file is not marked as markdown, and the file is not consistently formated
16:35 moritz ah well
16:36 moritz as long as the release announcements remain markdown ('cause we convert them to HTML)
16:39 cfloare joined #perl6
16:39 domidumont joined #perl6
16:44 [Coke] I would be fine if we renamed the changelog to declare markdown
16:44 charsbar joined #perl6
16:44 mullagainn joined #perl6
16:44 [Coke] anything that streamlines the release process.
16:44 takadonet joined #perl6
16:45 moritz do we do anything with the changelog?
16:45 moritz copy&paste into the release announcement, for example?
16:46 FROGGS that's what I do, yes
16:46 FROGGS but nothing besides that
16:48 PsuzeannePsy joined #perl6
16:49 ^elyse^ joined #perl6
16:50 [Coke] TIL what a zeugma is: http://brokemaniacsmusicbox.tumblr.com/post/13130​0627927/professorsparklepants-tuesdayisfordancing
16:51 silug joined #perl6
16:51 itz_stmuk what city is the first beta?
16:53 tokuhiro_ joined #perl6
17:00 kjs_ joined #perl6
17:00 [Coke] There is no tag chosen yet.
17:02 TimToady right now the version is v6.b, but maybe it should be v6.b.0 so we have somewhere to go between birthday and chrismas
17:03 TimToady a pity that 'thanksgiving' doesn't come between birthday and christmas...
17:03 TimToady and it's a bit US-centric anyway
17:03 TimToady 'course, birthday is a bit me-centric :)
17:03 ilmari halloween?
17:03 TimToady wrong month
17:03 TimToady and still out of order
17:04 ilmari yeah
17:04 TimToady this is the first birthday release, anyway
17:04 n0tjack joined #perl6
17:05 dha there's always v6.[c..z] if you need room to move in the meantime...
17:05 [Coke] btw, this release will probably have 3 tags: the monthly, the city, and whatever the v6 tag ends up being.
17:05 [Coke] dha: I think christmas is v6.c
17:05 dha oh. never mind.
17:06 itz_stmuk and the bug fix release is orthodox Christmas :)
17:06 konobi thanksgiving was delicious
17:06 dha we could rejigger it so we put it out for quanZa instead and use the c..z notation. :-)
17:07 PerlJam as long as we don't have a christmas release and a boxing day release, we'll be okay  :)
17:09 rurban joined #perl6
17:10 TimToady I think the next one after christmas is diwali
17:12 FROGGS hmm, that means the one after that won't be EchoChamber?
17:12 apotheon joined #perl6
17:12 n0tjack m: say [+] 'theologica'.comb>>.ord;
17:12 camelia rakudo-moar c32c57: OUTPUT«1055␤»
17:13 TimToady m: say [+] 'theologica'.ords
17:13 camelia rakudo-moar c32c57: OUTPUT«1055␤»
17:13 n0tjack I don't get why more modern languages don't offer implicit looping
17:15 n0tjack I think there's an analogy between  hypers : looping-for-everthing :: structured-programming : gotos-for-everything
17:16 TimToady well, the OO folks don't think a loop is an object, and the FP folks don't want to admit loops exist at all
17:17 TimToady so most such solutions are ad hoc
17:18 n0tjack yeah, I never understood that attitude from the FP people
17:18 TimToady lazy lists are starting to think like that, but tend to be embedded in languages with strong head/tail biases
17:20 n0tjack one of the big attractions to p6 for me is the cohesive integration of FP and implicit looping, without giving me carpal parenthetical syndrome
17:20 n0tjack (how (can (people (even (look (at (this)))))))))?
17:21 ^elyse^ you mean "(how (can (people (even (look (at (this ())))))))))?"
17:22 n0tjack ha
17:22 dalek ecosystem: 1100901 | moznion++ | META.list:
17:22 dalek ecosystem: Add Text::LTSV
17:22 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/1100901d26
17:31 ^elyse^ m: my $xs = [1, 2, 3, 4]; say $xs>>.sqrt
17:31 camelia rakudo-moar c32c57: OUTPUT«[1 1.4142135623731 1.73205080756888 2]␤»
17:31 ^elyse^ Why does this not try to call Array.sqrt?
17:32 ^elyse^ m: my @xs = [1, 2, 3, 4]; say @xs>>.sqrt
17:32 camelia rakudo-moar c32c57: OUTPUT«[1 1.4142135623731 1.73205080756888 2]␤»
17:32 ^elyse^ And why does this not result in a list? :v
17:33 [Coke] todo: doc search finds nothing for >>
17:34 dalek nqp: 41ab646 | FROGGS++ | src/QRegex/P6Regex/ (2 files):
17:34 dalek nqp: throw when quant follows nonquantable
17:34 dalek nqp: review: https://github.com/perl6/nqp/commit/41ab646099
17:34 ^elyse^ I'm still confused about arrays vs lists.
17:35 [Coke] http://docs.perl6.org/type/Array - An Array is a List which forces all its elements to be scalar containers, which means you can assign to array elements.
17:35 dha Yeah, I was just looking for >> too.
17:35 ^elyse^ oh, Array is a subclass of List
17:36 ^elyse^ that makes sense then
17:36 dalek rakudo/nom: de4b2b3 | FROGGS++ | / (3 files):
17:36 dalek rakudo/nom: throw when quant follows nonquantable
17:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/de4b2b3a87
17:36 n0tjack m: my @list = (1,2,3,4); my @list[1] = 99; say @list;
17:36 camelia rakudo-moar c32c57: OUTPUT«5===SORRY!5===␤Shaped arrays not yet implemented. Sorry. ␤at /tmp/AmDbEgSWFf:1␤------> 3my @list = (1,2,3,4); my @list[1]7⏏5 = 99; say @list;␤    expecting any of:␤        constraint␤Other potential difficulties:␤    Redeclaration o…»
17:36 n0tjack huh
17:36 n0tjack m: my @list = [1,2,3,4]; my @list[1] = 99; say @list;
17:36 camelia rakudo-moar c32c57: OUTPUT«5===SORRY!5===␤Shaped arrays not yet implemented. Sorry. ␤at /tmp/31YD5t81OT:1␤------> 3my @list = [1,2,3,4]; my @list[1]7⏏5 = 99; say @list;␤    expecting any of:␤        constraint␤Other potential difficulties:␤    Redeclaration o…»
17:36 FROGGS n0tjack: drop the second 'my'
17:37 n0tjack thanks
17:37 n0tjack m: my @list = [1,2,3,4]; @list[1] = 99; say @list;
17:37 camelia rakudo-moar c32c57: OUTPUT«[1 99 3 4]␤»
17:37 n0tjack m: my @list = (1,2,3,4); @list[1] = 99; say @list;
17:37 camelia rakudo-moar c32c57: OUTPUT«[1 99 3 4]␤»
17:37 ][Sno][ joined #perl6
17:37 n0tjack seems I can assign to array or list indices?
17:37 apotheon joined #perl6
17:37 FROGGS n0tjack: and @foo variable will be of type Array anyway
17:37 n0tjack oh, IS ee
17:37 skids Just changing the variable name to "list" does not make it a list
17:37 skids :-)
17:38 FROGGS hehe
17:38 ^elyse^ Hmm, Rakudo prints "sorry" twice
17:38 n0tjack skids: it wasn't the name I was thinking about, it was the shape of the brackets: () vs [].
17:38 skids I know I was kidding.
17:38 ^elyse^ pipe its output to INTERCAL and it'll tell you that Rakudo is overly polite
17:38 ^elyse^ m: my @xs = [1, 2]; @xs.say
17:38 camelia rakudo-moar c32c57: OUTPUT«[1 2]␤»
17:38 et09 m: say map {x .ord % 5},'A'..'z'
17:38 camelia rakudo-moar c32c57: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JmCJCFrJ2a␤Undeclared routine:␤    x used at line 1␤␤»
17:38 n0tjack m: my @list := (1,2,3,4); @list[1] := 99; say @list;
17:38 ^elyse^ m: my @xs = [1, 2], [3, 4]; @xs.say
17:39 et09 m: say map {$_ x (.ord % 5)},'A'..'z'
17:39 n0tjack did I break something?
17:39 ^elyse^ RIP camelia
17:39 dalek roast: 95ee327 | FROGGS++ | S05-metasyntax/repeat.t:
17:39 dalek roast: add tests for non-quantable exceptions
17:39 dalek roast: review: https://github.com/perl6/roast/commit/95ee3272ab
17:39 camelia rakudo-moar c32c57: OUTPUT«(timeout)»
17:39 camelia rakudo-moar c32c57: OUTPUT«[[1 2] [3 4]]␤»
17:39 camelia rakudo-moar c32c57: OUTPUT«( B CC DDD EEEE  G HH III JJJJ  L MM NNN OOOO  Q RR SSS TTTT  V WW XXX YYYY  [ \\ ]]] ^^^^  ` aa bbb cccc  e ff ggg hhhh  j kk lll mmmm  o pp qqq rrrr  t uu vvv wwww  y zz)␤»
17:39 et09 weeee
17:39 ^elyse^ hmm
17:39 ^elyse^ m: my @xs = [1, 2],; @xs.say
17:39 camelia rakudo-moar c32c57: OUTPUT«[[1 2]]␤»
17:39 ^elyse^ ah cool
17:40 et09 m: say map {$_ x ((.ord % 5)+1)},'A'..'z'
17:40 camelia rakudo-moar c32c57: OUTPUT«(A BB CCC DDDD EEEEE F GG HHH IIII JJJJJ K LL MMM NNNN OOOOO P QQ RRR SSSS TTTTT U VV WWW XXXX YYYYY Z [[ \\\ ]]]] ^^^^^ _ `` aaa bbbb ccccc d ee fff gggg hhhhh i jj kkk llll mmmmm n oo ppp qqqq rrrrr s tt uuu vvvv wwwww x yy zzz)␤»
17:40 ^elyse^ m: my @xs = [1]; my @ys = 1; say(@xs == @ys)
17:40 camelia rakudo-moar c32c57: OUTPUT«True␤»
17:40 ^elyse^ special case :'(
17:40 TimToady one arg rule
17:40 TimToady not so special
17:40 ^elyse^ m: my @xs = [1]; my @ys = 1; say($(@xs) == $(@ys))
17:40 camelia rakudo-moar c32c57: OUTPUT«True␤»
17:40 ^elyse^ m: say([1] == 1)
17:40 camelia rakudo-moar c32c57: OUTPUT«True␤»
17:41 ^elyse^ m: say([1] === 1)
17:41 camelia rakudo-moar c32c57: OUTPUT«False␤»
17:41 TimToady m: my @xs = $[1]; my @ys = 1; say(@xs == @ys)
17:41 camelia rakudo-moar c32c57: OUTPUT«True␤»
17:41 TimToady m: my @xs = $[1]; my @ys = 1; say(@xs eqv @ys)
17:41 camelia rakudo-moar c32c57: OUTPUT«False␤»
17:42 TimToady == is just comparing lengths, while === is comparing object identities
17:42 ^elyse^ oh right, == does numeric comparison
17:42 TimToady so neither is really what you want here
17:42 ^elyse^ m: my @xs = [1]; my @ys = 1; say(@xs eqv @ys)
17:42 camelia rakudo-moar c32c57: OUTPUT«True␤»
17:42 ^elyse^ m: my $xs = [1]; my @xs = $xs; my @ys = 1; say(@xs eqv @ys)
17:42 camelia rakudo-moar c32c57: OUTPUT«False␤»
17:43 ^elyse^ ok nice
17:43 TimToady list assignment follows the one-arg rule, so it iterates the [1]
17:43 TimToady but not with that last example, because $xs has a $ on it
17:43 ^elyse^ I get it.
17:45 ^elyse^ http://rakudo.org/downloads/star/ should use HTTPS IMO
17:46 pink_mist iirc they applied (or was that just perl6.org?) for one of letsencrypt.org's beta certs, but dunno if they got it ... and soon enough that's not gonna need beta anyway
17:47 moritz I did apply for perl6.org
17:47 ^elyse^ ok cool
17:47 TimToady wow, "All tests successful."--I'd forgotten what that looks like...
17:47 pink_mist right =)
17:47 pink_mist TimToady++ lol
17:47 et09 m: say "!".."~"
17:47 camelia rakudo-moar c32c57: OUTPUT«"!".."~"␤»
17:47 et09 hmph
17:47 et09 m: say "+".."n"
17:48 camelia rakudo-moar c32c57: OUTPUT«"+".."n"␤»
17:48 ^elyse^ m: my @xs = 1, 2, 3; my @ys = 4, 5, 6; (@xs >>+<< @ys).perl.say; (@xs Z+ @ys).perl.say
17:48 camelia rakudo-moar c32c57: OUTPUT«[5, 7, 9]␤(5, 7, 9).Seq␤»
17:48 et09 m: say list("+".."n")
17:48 camelia rakudo-moar c32c57: OUTPUT«(+ , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n)␤»
17:48 TimToady ranges are primarily intervals, not lists
17:48 n0tjack m: say ("!".."~").comb;
17:48 camelia rakudo-moar c32c57: OUTPUT«(!   "   #   $   %   &   '   (   )   *   +   ,   -   .   /   0   1   2   3   4   5   6   7   8   9   :   ;   <   =   >   ?   @   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   ...)␤»
17:48 n0tjack m: say ("!".."~").comb.elems;
17:48 camelia rakudo-moar c32c57: OUTPUT«187␤»
17:48 TimToady you're coercing to string and then combing
17:49 TimToady probably because someone decided Range is Cool
17:49 flussence m: print "!".."~", "\n";
17:49 camelia rakudo-moar c32c57: OUTPUT«!"#$%&'()*+,-./0123456789:;<​=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_​`abcdefghijklmnopqrstuvwxyz{|}~␤»
17:49 TimToady m: say Range.^mro
17:49 camelia rakudo-moar c32c57: OUTPUT«((Range) (Cool) (Any) (Mu))␤»
17:49 ^elyse^ LOL http://stackoverflow.com/questions​/33152515/why-perl-6-is-very-ugly
17:49 n0tjack what do you know, Range is Cool
17:49 n0tjack Cool Range dressing
17:50 lichtkind joined #perl6
17:53 BLOKDAK joined #perl6
17:55 et09 i get emails like that at my job
17:55 et09 Why this feature is very ugly?
17:56 pink_mist I don't understand what you mean, et09
17:56 n0tjack pink_mist: et09 posted a link to a SO question asking "why is perl6 very ugly?"
17:56 et09 i didn't post that link
17:56 n0tjack oh, someone did
17:56 tony-o jnthn: are you working on compunit stuff/
17:57 TimToady jnthn++ is on a honeymoon this week
17:57 pink_mist n0tjack: I saw the link. and I saw that ^elyse^ posted it. I still don't see what that has to do with emails though, so I'm still as confused as ever
17:58 moritz https://github.com/reinderien/mimic
17:58 ^elyse^ is there a way to join paths with the platform's path separator?
17:58 n0tjack pink_mist: My take was "I get ridiculous and poorly-informed questions like [why is $feature so ugly] at my job"
17:59 jdv79 doesn't everything support / now
17:59 pink_mist n0tjack: ahh, now it makes sense =) n0tjack++
18:00 amarigatachi joined #perl6
18:00 TimToady m: say 42; say 43
18:00 camelia rakudo-moar de4b2b: OUTPUT«42␤43␤»
18:00 moritz ^elyse^: $*SPEC.catdir
18:01 ^elyse^ cooooool thanks
18:01 TimToady m: say ';'.ord
18:01 camelia rakudo-moar de4b2b: OUTPUT«59␤»
18:01 TimToady m: say 42; say 43
18:01 camelia rakudo-moar de4b2b: OUTPUT«42␤43␤»
18:01 tony-o jnthn++
18:01 TimToady huh, something is regularizing the Greek question mark to normal semicolon
18:01 rurban joined #perl6
18:02 TimToady m: EVAL "say 42\x37e say 43"
18:02 camelia rakudo-moar de4b2b: OUTPUT«42␤43␤»
18:03 TimToady yowsers
18:04 TimToady m: say "\x37e".ord
18:04 camelia rakudo-moar de4b2b: OUTPUT«59␤»
18:04 TimToady is that like a deprecated character or something?
18:05 n0tjack Wikipedia says it canonically decomposes to semicolon
18:05 vendethiel joined #perl6
18:05 TimToady but we're not using NFKD
18:08 jdv79 is precomp still not happening?
18:09 jdv79 5s to "use HTTP::UserAgent" - killin my flow here:(
18:11 TimToady jdv79: see http://irclog.perlgeek.de/p​erl6/2015-10-17#i_11392842 about that
18:13 jdv79 i know.  i thought precomp had been restored back to the old way but seems not.
18:13 ugexe nope
18:13 ^elyse^ is there a way to make run automatically append .bat and .cmd as appropriate on Windows?
18:13 jdv79 then i think i drank too much coffee to work with p6 today:(
18:14 ugexe there are typos in CUR::File/Installation in regards to the precomp-file argument
18:14 ugexe but if they are corrected it breaks loading
18:14 n0tjack it's really hard to be on a conference call and debug a Grammar at the same time
18:15 ugexe at least you arent debugging a grammar over a conference call
18:15 lizmat jdv79: if we want to move towards a sustainable / non-fragile precomp environment, we need to implement quite some stuff first
18:15 yoleaux 16:30Z <TimToady> lizmat: pretty much everything I did this week is reflected in the git log
18:17 jdv79 sure.  but was it really necessary to take a step backwards like that just to force the issue.
18:17 jdv79 sad.  makes hacking now unpleasant.
18:17 et09 what is a metaobject
18:17 ugexe it wasnt on purpose. its a typo that just happens to not cause any errors
18:17 jdv79 ugexe: are you talking to me?
18:18 ugexe yes
18:19 jdv79 oh.  i thought i read tadzik said he broke it on purpose to force the issue.
18:19 jdv79 i didn't look though
18:19 ugexe tadzik just took precompiling out of panda
18:19 ugexe you could still manually precompile. i thought you meant loading such precompiled code
18:20 jdv79 no.  i just meant when it used to just work
18:20 jdv79 huh.  well that's doubly unfortunate.  neato.
18:22 lizmat fwiw, I'm glad that tadzik++ took precomp out of panda
18:22 vendethiel no chance to get :D by default, btw? as a last-minute-decision :P
18:23 lizmat vendethiel: :D where ?
18:23 vendethiel lizmat: everywheeere
18:23 flussence m: use attributes :D; my $x;
18:23 camelia rakudo-moar de4b2b: ( no output )
18:23 lizmat I was considering having a "use smileys :D"
18:23 jdv79 lizmat: that's funny.  like saying it was great that lists stopped working the whole time the GLR was happening.
18:23 flussence oh right, $x isn't an attrib...
18:23 lizmat that would do a parameters/variables/attributes/invocent for you
18:23 rurban joined #perl6
18:23 jdv79 it could/should have been a smoother move
18:24 flussence m: use variables :D; my $x;
18:24 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VNde_xE5_h␤Variable definition of type Any:D (implicit :D by pragma) requires an initializer␤at /tmp/VNde_xE5_h:1␤------> 3use variables :D; my $x7⏏5;␤    expecting any of:␤        constraint␤»
18:24 lizmat jdv79: agree it could have been planned better
18:24 TimToady not really
18:24 lizmat but first we need to do it correctly, and then fast
18:25 vendethiel m: my Any:D $x = Nil;
18:25 camelia rakudo-moar de4b2b: ( no output )
18:25 lizmat jdv79: there were too many ways of introducing strange errors / inconsistencies in an environment with panda
18:26 jdv79 at least its only a startup type regression
18:27 Mouq joined #perl6
18:28 lizmat TimToady: do you know if the Craigslist presentation is online already ?
18:28 lizmat or the one from PPW ?
18:28 leedo at some point in the last few weeks '[+] 0..1_000_000' went from taking 2.5s to taking 22s for me
18:29 TimToady PPW wasn't recorded, and cl hasn't run it past me yet for approval, so no
18:29 TimToady I mean, yes, I know :)
18:29 lizmat TimToady  :-(
18:29 lizmat :-)
18:29 lizmat leedo: could you be more specific than " last few weeks" ?
18:29 lizmat is that 1,2,3, 10, 20 ?
18:30 leedo lizmat: no more than 3 weeks, probably closer to 2
18:30 leedo i'll try to narrow it down
18:30 TimToady reductions should definitely be eager
18:31 lizmat leedo: 25 secs for me
18:31 colomon TimToady: really?  seems like it would be massively more efficient to not create a 1,000,000 element list for that operation?
18:31 leedo it had been < 3 seconds for a year or two now
18:31 TimToady star: say [+] 1..1_000_000
18:31 camelia star-m 2015.09: OUTPUT«500000500000␤»
18:32 flussence it's 42 seconds on my 32-bit netbook... and 42 seconds on my 64-bit desktop.
18:32 TimToady well, that particular case ought to be optimized away anyhoo
18:32 lizmat maybe we lost the optimization :-)
18:32 flussence (the netbook's 2 months out of date on rakudo)
18:32 * colomon wonders if [+] should have a special sub for ranges
18:32 lizmat it's been known to happen
18:32 TimToady obviousl star still has it fast
18:32 TimToady colomon: that's what I was trying to say
18:33 leedo colomon: i did propose that patch a few years ago
18:33 flussence I have one of those in a gist somewhere...
18:33 colomon TimToady: ah!  I was getting worried that I was missing another huge piece of the picture.
18:33 leedo https://github.com/rakudo/rakudo/pull/175
18:34 DrForr Use Gauss's method in the spirit of Volkswagen, just be sure to check that you're on github :)
18:34 flussence m: https://gist.github.com/flussence/3007551
18:34 camelia rakudo-moar de4b2b: OUTPUT«125000250000␤»
18:34 flussence still works :D
18:35 * colomon fires off rakudobrew build moar Zürich
18:36 leont joined #perl6
18:36 rurban1 joined #perl6
18:38 colomon hurm, rakudobrew failed to build it.  :\
18:39 grondilu colomon: [+] should have a special sub for range indeed IMHO
18:39 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2015​/10/19/2015-43-vernacular-english/
18:40 flussence lizmat++
18:40 colomon lizmat++
18:40 ^elyse^ joined #perl6
18:40 vendethiel lizmat++
18:41 moritz lizmat++ # nice!
18:42 colomon woah, there were that many blog posts in the last week?
18:42 vendethiel yeah, tons of them
18:42 lizmat *and* ecosystem additions, yup!
18:43 lizmat brrt++ for providing me with the inspiration for this week's title  :-)
18:43 * grondilu appreciates the list of blog posts
18:44 vendethiel it's amazing
18:44 rurban joined #perl6
18:45 colomon so, apparently rakudobrew (and/or possibly rakudo itself) doesn’t like building “moar Zürich” but is fine with “moar c0e0c9748478d517956e38fe1f1a4aa89dba2419” (which is what Zürich is).
18:45 El_Che thx lizmat
18:45 * grondilu is a bit confused by the title "Perl 6 just Perl 5 with ‘use strict’ turned on" and checks out the blog entry.
18:46 lizmat grondilu: Ferdinand should give it away
18:46 pyrimidine :)
18:46 [Coke] colomon: I used a unicode tag on purpose. </evil>
18:46 grondilu https://thescienceweb.wordpress.com/2015/10/12/​perl-6-just-perl-5-with-use-strict-turned-on-2/
18:46 grondilu ^ not sure what this is about
18:46 * colomon can confirm that c0e0c9748478d517956e38fe1f1a4aa89dba2419 handles [+] 1..1_000_000 quickly.  Of course, it’s probably more or less the same as the star TimToady++ checked.
18:47 grondilu m: say [+] ^10*100
18:47 camelia rakudo-moar de4b2b: OUTPUT«499500␤»
18:47 grondilu m: say [+] ^10**100
18:47 lizmat grondilu: "Dodgy Perl 5 scripts were behind the financial crisis of 2008, the collapse of Enron and the assassination of Archduke Franz Ferdinand."
18:47 pyrimidine grondilu: see what lizmat++ said
18:47 * colomon wants rakudobrew bisect, but doesn’t have the tuits to make it now
18:47 camelia rakudo-moar de4b2b: OUTPUT«(timeout)»
18:47 leedo colomon: yeah, i believe it was a change in october
18:48 vendethiel m: my %a = a => 1, b => 2, c => 3; %a{$_}++ for %a.keys; say %a.perl;
18:48 camelia rakudo-moar de4b2b: OUTPUT«{:a(2), :b(3), :c(4)}␤»
18:48 leedo i'd have to guess 2275f64e2e447c86c7d3a5804891e5120f4eb212
18:48 pyrimidine grondilu: also note the other articles from that blog
18:49 grondilu it would be a bit difficult to specialize [+] for ranges, as it is defined by &REDUCE(\op) or something.
18:49 ^elyse^ Can I mutate %hash while looping through %hash.keys?
18:50 ^elyse^ Or should I clone the list of keys first?
18:50 TimToady grondilu: no problem, it's a HOP function that can just pick what function to do the reduction with
18:50 grondilu ok
18:51 vendethiel wrt ^elyse^'s issue, I guess it's because .keys is lazy? arguably surprising
18:51 TimToady or at least the type specializer should be able to deal with it, where we have to delay the decision
18:52 grondilu m: { (.min + .max)*.elems div 2 }(1..100) == [+] 1.. 100
18:52 camelia rakudo-moar de4b2b: OUTPUT«WARNINGS:␤Useless use of "==" in expression "(1..100) == [+] 1.. 100" in sink context (line 1)␤»
18:52 grondilu m: say { (.min + .max)*.elems div 2 }(1..100) == [+] 1.. 100
18:52 camelia rakudo-moar de4b2b: OUTPUT«True␤»
18:52 TimToady not quite
18:52 grondilu ?
18:52 TimToady m: say { (.min + .max)*.elems div 2 }(1..^100) == [+] 1..^100
18:52 camelia rakudo-moar de4b2b: OUTPUT«False␤»
18:52 lizmat ^elyse^: afaik, .keys takes a snapshot
18:53 grondilu m: say (1..^100).max;
18:53 camelia rakudo-moar de4b2b: OUTPUT«100␤»
18:53 * grondilu is confused
18:53 vendethiel m: my %h = a => 1, b => 2; for %h.keys { .say; %h{"Foo$_"} = 5; }; say %h;
18:53 camelia rakudo-moar de4b2b: OUTPUT«a␤b␤Fooa => 5, Foob => 5, a => 1, b => 2␤»
18:53 TimToady it's an interval, not a list
18:53 ^elyse^ lizmat: appears not to for me
18:53 lizmat m: my %h = a => 42; my $s = "b"; for %h.kv -> \k, \v { say k,v; %h{$s++} = 42 }
18:53 camelia rakudo-moar de4b2b: OUTPUT«a42␤»
18:54 lizmat m: my %h = a => 42; my $s = "b"; for %h.kv -> \k, \v { say k,v; %h{$s++} = 42 }; dd %h
18:54 camelia rakudo-moar de4b2b: OUTPUT«a42␤Hash %h = {:a(42), :b(42)}␤»
18:54 lizmat m: say (1..^100) .max;
18:54 camelia rakudo-moar de4b2b: OUTPUT«100␤»
18:55 softmoth joined #perl6
18:55 lizmat m: say (42..^100) .max;
18:55 camelia rakudo-moar de4b2b: OUTPUT«100␤»
18:55 Hor|zon joined #perl6
18:55 lizmat m: say (1..^100).excludes-max;
18:55 camelia rakudo-moar de4b2b: OUTPUT«True␤»
18:55 lizmat grondilu: ^^^
18:55 dj_goku joined #perl6
18:55 grondilu m: say max 1..^100
18:55 camelia rakudo-moar de4b2b: OUTPUT«99␤»
18:56 grondilu :/
18:56 grondilu looks LTA
18:56 lizmat m: say (42..^100).list.max;
18:56 camelia rakudo-moar de4b2b: OUTPUT«99␤»
18:56 TimToady m: say (1..^100000000000).elems
18:56 camelia rakudo-moar de4b2b: OUTPUT«99999999999␤»
18:56 leedo btw i did confirm the slowdown happened with 2275f64e2e447c86c7d3a5804891e5120f4eb212 on Oct 9
18:56 TimToady the logic is already in .elems
18:58 grondilu still caling it max then seems unfortunate.  maybe up/down?
18:58 lizmat grondilu: max is the name of the Range attribute
18:58 grondilu ok, fine.
18:58 TimToady well, max is emphatically not 99
18:58 Akagi201 joined #perl6
18:59 lizmat TimToady: suggestions for rename / deprecation welcome :-)
18:59 TimToady max is 100 - ϵ
18:59 TimToady but we don't have a way to represent that
18:59 moritz so 100 is the supremum
18:59 moritz but only if it's exclusive
19:00 TimToady it's the max, but we exclude it :)
19:00 Peter_R joined #perl6
19:00 grondilu I see you want to see it as a real open interval, but if so [+] $range would not make sense.
19:00 lizmat grondilu: fwiw, that's because we use Ranges for many things
19:01 TimToady well, that's because if you use a Range as a list, we turn it into one
19:01 lizmat at one point I implemented a IntRange (or was it RangeInt) to make the distinction clearer
19:01 n0tjack how do I apply a function to its fixed point?
19:01 lizmat but that was considered a bad idea, and hence removed
19:01 n0tjack as in, is there a way to say f(f(f(f(x)))) as foo(f,4,x) in some way?
19:02 TimToady n0tjack: keep it clean, this is a family-friendly channel
19:02 grondilu ([o] f xx 4)(x)
19:03 n0tjack grondilu: Oh damn, that's neat
19:03 n0tjack grondilu: is there some way to say "keep doing it til the output matches the input"?
19:03 * grondilu suspects &[o] is a cool new feature with whom lots of nice things can be done.
19:03 TimToady or [∘] if you wanna be more high-falutin'
19:03 PerlJam don't you need &f in that so that it's not a call
19:03 grondilu n0tjack: probably with first and [\o]
19:04 TimToady well, I suspect ∘ will break if you push it too hard, since we're not heavily into left-to-right currying as, say, Haskell is
19:04 grondilu first *.(x) == x, [\o] f xx *
19:04 n0tjack grondilu: that just gives me intermediate ouputs, right? what I want is perl to inspect the output of each f and stop o'ing when its output matches its input
19:04 grondilu hum
19:05 grondilu first :by(*.(x) == x), [\o] f xx *
19:05 grondilu wait no
19:05 grondilu first :by(*.(x) == x), [\o] f xx *  # gives you the function
19:05 grondilu not the output
19:05 grondilu sorry
19:05 grondilu first *.(x) == x, [\o] f xx *  # gives you the function
19:06 grondilu give us a converging function as an example maybe
19:06 TimToady that's gotta hurt if you miss the swimming pool
19:07 n0tjack grondilu: cosine
19:07 grondilu for what $x?
19:07 n0tjack pi
19:08 grondilu need to use approximation instead of == though
19:08 n0tjack yep
19:08 n0tjack I can try finding an exact converging function
19:08 grondilu m: say first -> &f { abs(f(pi) - pi) < 0.01 }, [\o] &cos xx *
19:09 camelia rakudo-moar de4b2b: OUTPUT«(timeout)»
19:09 grondilu well that did not go too well
19:09 FROGGS lizmat++ # weekly
19:13 TimToady um, cos can never == pi
19:13 grondilu lol
19:13 TimToady can't go over 1
19:13 n0tjack TimToady: no, the input is pi
19:13 grondilu so true
19:14 n0tjack and the convergence point is .739085 or so
19:14 n0tjack converges to 6 decimals at about 10 applications of POSIX cos()
19:14 grondilu yeah so what you want is to stop the iteration when it becomes stable
19:14 n0tjack ues
19:15 flussence but abs(cos(cos(...(pi))) - pi) will never equal less than 2 or so
19:15 grondilu pi, &cos ... * == *
19:15 TimToady are you wanting to compare with the previous value instead?
19:15 n0tjack yes, that's what I mean by fixed point
19:15 TimToady yeah, like that
19:16 grondilu say .[*-1] given pi, &cos ... { abs($^a - $^b) < 0.01 }
19:16 grondilu m: say .[*-1] given pi, &cos ... { abs($^a - $^b) < 0.01 }
19:16 camelia rakudo-moar de4b2b: OUTPUT«0.735604740436347␤»
19:16 grondilu m: say .[*-1] given pi, &cos ... { abs($^a - $^b) < 0.0001 }
19:16 camelia rakudo-moar de4b2b: OUTPUT«0.739054790746917␤»
19:16 vendethiel m: sub infix:<+>($a, $b, *%h) { say %h }; 3 + 4 :imprecise; # ^elyse^
19:16 camelia rakudo-moar de4b2b: OUTPUT«imprecise => True␤»
19:16 ^elyse^ cool
19:16 n0tjack TimToady: when I said "its input matches its output", the referent of "it" was "the current invocation of the function"
19:17 TimToady I was speakin' to grondulu mostly
19:17 n0tjack ah
19:17 TimToady er, *grondilu
19:18 * n0tjack sheepishly goes back to trying to learn a one-handed swing cut
19:19 * grondilu still wonders if he can get the same result with [o]
19:20 * grondilu concludes using a sequence is simple enough.
19:20 n0tjack at least I'm getting really good at 52 pickup
19:20 * lizmat wonders whether it would make sense to create a Seq.sort that would binary chop building a list, rather than first need to create a whole list
19:21 flussence m: sub infix:<≈>(\a, \b, Numeric :$ϵ = 1e-6) { abs(a - b) < $ϵ }; say pi ≈ 22/7 :ϵ(1e-2)
19:21 camelia rakudo-moar de4b2b: OUTPUT«True␤»
19:22 * grondilu would not be displeased to have something like that in the core.
19:22 TimToady n0tjack: planning to fool Penn & Teller?
19:23 kjs_ joined #perl6
19:23 n0tjack TimToady: I may or may not have spent Sunday morning fantasizing about doing just that
19:29 konobi TimToady: so... the dtrace folks are a nice helpful group. I think it'd be great for perl6 to have dtrace, both in terms of user usage as well as developer usage
19:30 * flussence notes that «perl6 -e 'while prompt(q{> }) -> $_ { say .EVAL.gist }'» starts up 5 seconds faster than the built in repl and is almost as functional...
19:31 konobi TimToady: if you're not sure as to the usefulness, i could dig up some info
19:31 TimToady not really my decision :)
19:31 moritz konobi: dtrace is freebsd, right?
19:31 * TimToady is just the BDFL, with no guarantees of competence at anything
19:32 konobi dtrace is freebsd, solaris, illumos and OSX
19:32 moritz ah, OS X too; I didn't know
19:32 konobi there's even some support in a linux distro or two
19:32 moritz I'm pretty sure unobstrusive patches will be accepted
19:33 konobi it's a smidge more involved, since it would also affect how the build happens
19:33 ^elyse^ can I instruct sprintf to use %f but with more digits after the decimal point?
19:34 moritz m: printf '%.10f', pi
19:34 camelia rakudo-moar de4b2b: OUTPUT«3.1415926536»
19:34 konobi moritz: for example... http://brendangregg.com/blog/2015​-03-10/freebsd-flame-graphs.html
19:34 ^elyse^ moritz: :D
19:35 moritz ^elyse^: was that not what you were after?
19:36 moritz konobi: am I right in assuming that support would need to go into MoarVM?
19:36 ^elyse^ yes, it was.
19:36 ^elyse^ my second real Perl 6 program: https://gist.github.com/rig​htfold/e683ff5da9e4895ac7fb :)
19:37 jdv79 iirc last time i looked dtrace was not supported on linux
19:37 jdv79 that's a pretty big target OS to lack support in
19:38 tokuhirom_ joined #perl6
19:38 n0tjack ^elyse^: love the flying chevron
19:38 ^elyse^ :P
19:39 ^elyse^ carefully sorted by length
19:39 TimToady but it's missing the entry for 1
19:39 PerlJam ^elyse^: me too  (though I would have probably stuck _ in the numbers)
19:39 ^elyse^ wish I could use Duration instead of Real, though
19:39 ^elyse^ but Duration isn't precise enough to represent yoctoseconds
19:41 TimToady need some of them 128-bit floaters...
19:41 hoelzro was the kill($signal, $pid) builtin ever brought over from Perl 5? or is it just NYI and unroasted?
19:43 TimToady I guess it's already got the entry for 1 second etc
19:43 TimToady hoelzro: it's pretty trivial to call via NativeCall
19:44 hoelzro true, I was just wondering if it'll be entering CORE
19:44 PerlJam Proc::Async has a kill() method
19:45 vendethiel m: class A { method foo(:U self:){} };
19:45 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/n_wTivDIBK␤Missing block␤at /tmp/n_wTivDIBK:1␤------> 3class A { method foo(:7⏏5U self:){} };␤»
19:45 vendethiel m: class A { method foo(:U self:) {} };
19:45 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UR9FzQWauA␤Missing block␤at /tmp/UR9FzQWauA:1␤------> 3class A { method foo(:7⏏5U self:) {} };␤»
19:45 vendethiel m: class A { method foo(:U:) {} };
19:45 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rnbhkGkURn␤Missing block␤at /tmp/rnbhkGkURn:1␤------> 3class A { method foo(:7⏏5U:) {} };␤»
19:46 vendethiel m: class A { method foo(Any:U:) {} };
19:46 camelia rakudo-moar de4b2b: ( no output )
19:46 vendethiel m: class A { method foo($?CLASS:U:) {} };#can it use this?
19:46 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5===␤In signature parameter $?CLASS, it is illegal to use the ? twigil␤at /tmp/DIi0SG38Z_:1␤------> 3class A { method foo($?CLASS7⏏5:U:) {} };#can it use this?␤Invalid typename 'U' in parameter declaration.␤at /tmp/DIi0SG38Z_:…»
19:47 adhoc joined #perl6
19:47 moznion joined #perl6
19:47 konobi moritz: in can go into moarvm and rakudo
19:47 n0tjack what's the syntax for instantiating a hash from two arrays (one for keys, other for vals)?
19:47 hoelzro PerlJam: right, but that's only for processes you create yourself
19:48 TimToady n0tjack: two common ways
19:48 virtualsue joined #perl6
19:48 TimToady %hash{@keys} = {@values}
19:48 llfourn joined #perl6
19:48 TimToady %has = @keys Z=> @values
19:48 n0tjack ah, Z is what I was looking for
19:48 n0tjack I used X and of course that didn't work
19:48 ^elyse^ Typo causes line-up, so +1
19:48 TimToady bare Z also works
19:48 TimToady or wait, no it doesn't
19:48 TimToady not since GLR :)
19:49 TimToady %hash = flat @keys Z @values would work though
19:49 n0tjack TimToady: Z=> is good enough for moi
19:50 n0tjack is there a function for "shift in"?
19:51 n0tjack as in 99 magic (1,2,3,4,5) becomes (99,1,2,3,4)?
19:51 n0tjack same length, but end drops off and first element becomes the new guy
19:51 hoelzro ab5tract_: to answer your question from 10 days ago (re: Linenoise + Windows), yes
19:52 ^elyse^ m: my @xs = 1, 2, 3; @xs.unshift 99; @xs.pop; @xs.say
19:52 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mc16mNTgmt␤Two terms in a row␤at /tmp/mc16mNTgmt:1␤------> 3my @xs = 1, 2, 3; @xs.unshift7⏏5 99; @xs.pop; @xs.say␤    expecting any of:␤        infix␤        infix stopper␤        statement …»
19:52 ^elyse^ m: my @xs = 1, 2, 3; @xs.unshift(99); @xs.pop; @xs.say
19:52 camelia rakudo-moar de4b2b: OUTPUT«[99 1 2]␤»
19:52 n0tjack ^elyse^: yeah, that's more or less what I did
19:52 hoelzro I still have not managed to get a working dev env on Windows for Rakudo =/
19:52 flussence m: say 0.000000000000000000000000000000001.nude
19:52 camelia rakudo-moar de4b2b: OUTPUT«(1 999999999999999945575230987042816)␤»
19:52 hoelzro after trying VS2013, VS2015, and Mingw
19:53 konobi moritz: i also have the dtrace inventor on my contact list, should there be questions =0)
19:53 ^elyse^ m: my @xs = 1, 2, 3; {.unshift(99); .pop} given @xs; @xs.say
19:53 camelia rakudo-moar de4b2b: OUTPUT«[99 1 2]␤»
19:53 moritz konobi: fwiw I don't know much about a dtrace, the demos I've seen were pretty cool
19:54 moritz konobi: so despite not being on a platform where it's supported, I'm in favour -- as long as it's not too big a burden on the mainters
19:54 moritz *maintainers
19:54 moritz konobi: and I don't maintain the low-level code, so I don't have much say in that matter
19:55 PerlJam m: my @xs = 1, 2, 3; @xs.=rotate(-1).[0]=99; @xs.say;
19:55 camelia rakudo-moar de4b2b: OUTPUT«[99 1 2]␤»
19:55 konobi moritz: yeah... at least there's some experience around from it being implemented in perl5
19:55 jdv79 oh, dtrace is also non-win so the usage of that "feature" may be quite limited since i believe most people are on win,lin,osx and dtrace is only on osx.
19:55 jdv79 just sayin
19:55 konobi jdv79: wrong
19:55 konobi i mentioned the platforms above
19:56 PerlJam ^elyse^:  rotate can be your friend.
19:57 konobi jdv79: and windows has an equivalent-ish feature too
19:57 jdv79 ok, more power to ya.  when i looked into it a few years ago linux support was not there.
19:58 n0tjack PerlJam++
19:58 konobi yeah, linux is still a shitshow in terms of debuggability
19:58 konobi on windows it's ETW
19:59 Akagi201 joined #perl6
19:59 flussence .oO( the joys of Weaponized Software Licenses )
20:01 raiph joined #perl6
20:09 ^elyse^ why can't I put a newline between "x" and ".m" in "x.m"?
20:09 itz_stmuk the linux dtrace support isn't that good (or wasn't a year or so back).  There is systemtap on linux and probably other rewrites
20:09 flussence x is an operator
20:09 itz_stmuk its best on solaris, freebsd and os x
20:10 ^elyse^ flussence: how about "foo" and ".bar" in "foo.bar"?
20:10 flussence foo isn't an infix operator, so that works fine
20:10 PerlJam ^elyse^: and if it doesn't, your compiler is too old.
20:10 ^elyse^ no, I get an error: "Two terms in a row across lines (missing semicolon or comma?)"
20:11 TimToady your compiler is too old
20:11 ^elyse^ ok XD
20:11 ^elyse^ thanks
20:11 ^elyse^ I'll use ==> then
20:11 TimToady m: say -42␤ .abs
20:11 camelia rakudo-moar de4b2b: OUTPUT«42␤»
20:11 TimToady there, a newline
20:16 * grondilu thought a backslash was required
20:16 PerlJam no longer
20:17 grondilu cool
20:17 grondilu using backslashes was annoying as it messes up indentation in Vim.
20:18 PerlJam grondilu: see https://github.com/rakudo/rakudo/commit/​cb25b2f475f31335d77d018474482aceec2c74de
20:19 PerlJam TimToady++ for not only making the change, but for providing a highly informative commit message.
20:19 vendethiel m: (&defined)(Any)
20:19 camelia rakudo-moar de4b2b: ( no output )
20:20 vendethiel m: (&defined)(Nil)
20:20 camelia rakudo-moar de4b2b: ( no output )
20:21 grondilu m: say pi . abs
20:21 camelia rakudo-moar de4b2b: OUTPUT«3.14159265358979␤»
20:21 vendethiel m: say &defined.candidates
20:21 camelia rakudo-moar de4b2b: OUTPUT«(sub defined (Mu \x) { #`(Sub|50144056) ... })␤»
20:22 * PerlJam is mildly surprised that True.abs does something
20:22 grondilu does that mean I can do [.]??
20:23 grondilu m: say [.] -42, abs, flip;
20:23 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LVHstioE1G␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/LVHstioE1G:1␤------> 3say [.]7⏏5 -42, abs, flip;␤»
20:23 grondilu yeah I thought so
20:23 PerlJam oh, that would be interesting were it allowed.
20:24 vendethiel that can't work. I'd try to call abs()
20:24 vendethiel maybe a macro ;-)
20:24 nine We already have o for that
20:24 vendethiel o doesn't "dot-compose"
20:24 vendethiel well
20:25 vendethiel m: say [o] -42, *.abs, *.flip;
20:25 camelia rakudo-moar de4b2b: OUTPUT«Type check failed in binding <anon>; expected Callable but got Int␤  in block <unit> at /tmp/9Dk6BDS5Ri:1␤␤»
20:25 vendethiel m: say ([o] *.abs, *.flip)(-42);
20:25 camelia rakudo-moar de4b2b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '24-7⏏' (indicated by 7⏏)␤  in block <unit> at /tmp/MyCkkaY9GH:1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp:2864␤  in block <unit> a…»
20:25 grondilu flip was a bad example, use log instead
20:25 vendethiel m: say ([o] *.abs, *.log)(-42);
20:25 camelia rakudo-moar de4b2b: OUTPUT«NaN␤»
20:26 grondilu m: say ([o] &abs, &log)(-42)
20:26 camelia rakudo-moar de4b2b: OUTPUT«NaN␤»
20:26 grondilu abs first
20:26 grondilu m: say ([o] &log, &&abs)(-42)
20:26 camelia rakudo-moar de4b2b: OUTPUT«3.73766961828337␤»
20:26 vendethiel ...&&abs?
20:26 grondilu (the doubling of & is a typo)
20:26 vendethiel oh
20:26 vendethiel just the order changed up. hehe
20:26 PerlJam m: &&&&&say("hi")
20:26 camelia rakudo-moar de4b2b: OUTPUT«hi␤»
20:27 grondilu not much different than my $$$$$$$$$$$$$
20:27 PerlJam aye.
20:27 grondilu m: say "I'm rich" given my $$$$$$$$$$$$
20:27 camelia rakudo-moar de4b2b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yN_Ilga_we␤Cannot declare a variable by indirect name (use a hash instead?)␤at /tmp/yN_Ilga_we:1␤------> 3say "I'm rich" given my $$$$$$$$$$$7⏏5$␤»
20:27 grondilu ?
20:28 grondilu std: my $$
20:28 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Cannot declare an indirect variable name at /tmp/iSdLirtp5M line 1:␤------> 3my $7⏏5$␤    expecting any of:␤ desigilname␤    twigil␤Parse failed␤FAILED 00:00 135m␤»
20:28 grondilu oh
20:28 flussence std: $$$$$$$$$$$$$$$$$$
20:28 camelia std 28329a7: OUTPUT«ok 00:00 135m␤»
20:29 lizmat hmmm... seems dalek is awol
20:30 et09 the rapper dalek?
20:30 et09 feat awol one... lol
20:30 kmel joined #perl6
20:30 dalek joined #perl6
20:34 PerlJam joined #perl6
20:34 PerlJam um ... what happened to hack?
20:35 moritz a load of about 135
20:35 RabidGravy poor computer
20:35 synbot6 joined #perl6
20:35 moritz and then, when it didn't react anymore, I rebooted it, forcefully
20:35 PerlJam moritz++
20:43 dalek roast: d40553a | lizmat++ | S32-list/grep-v.t:
20:43 dalek roast: Add tests for grep :v
20:43 dalek roast: review: https://github.com/perl6/roast/commit/d40553aed6
20:46 nick25 joined #perl6
20:51 dalek rakudo/nom: 97954be | lizmat++ | t/spectest.data:
20:51 dalek rakudo/nom: Run grep :kv / :p / :v tests
20:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97954bea03
20:55 gamo joined #perl6
20:56 gamo Hi. How do I do a swap @a[1][2] <-> @b[3][4] ?
20:58 vendethiel https://github.com/rakudo/rakudo/commit/​ef77bd72ec3fe4995c8256a0668a744db0b6c365 ... what? can I get an explanation? doesn't that fix warrant a comment there? it's hard to understand
20:58 PerlJam gamo: (@a[1][2], @b[3][4]) = @b[3][4], @a[1][2];    # a way
20:58 vendethiel "Definite return values are now allowed" what's that supposed to mean?
20:59 gamo ok, just as perl5
21:00 lizmat m: sub swap(\a,\b) { my $c = a; a = b; b = $c }; my $a = 42; my $b = 666; swap $a, $b; dd $a, $b   # naive solution for gamo
21:00 camelia rakudo-moar de4b2b: OUTPUT«Int $a = 666␤Int $b = 42␤»
21:00 vendethiel "Methods map, push, pop, shift, unshift, append, prepend now properly marked as nodal" this doesn't tell much to someone reading the changelog :P
21:01 lizmat grep nodal S99-glossary.pod   # nothing  :-(
21:01 PerlJam actually, it's weird that P6 doesn't have some sort of swap built-in
21:01 dalek perl6-roast-data: 32c3a01 | coke++ | / (9 files):
21:01 dalek perl6-roast-data: today (automated commit)
21:01 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/32c3a01cd9
21:02 gamo thanks, bye!
21:07 rurban1 joined #perl6
21:07 roguelazer joined #perl6
21:12 Akagi201 joined #perl6
21:16 tokuhiro_ joined #perl6
21:18 Hor|zon joined #perl6
21:20 ponzellus joined #perl6
21:22 nick25 left #perl6
21:22 kjs_ joined #perl6
21:24 ponzellus hi all, I'm starting to play with perl6 but am stuck using an array as a class attribute. when pushing elements into the array, I get the error "Cannot look up attributes in a type object", anybody here who'd like to have a look? :)
21:24 ponzellus I have a MWE at https://gist.github.com/ph​amer/a265d76ce94f7ea91e28
21:25 nick25 joined #perl6
21:27 PerlJam ponzellus: you don't have an instance of a Room
21:27 vendethiel ponzellus: you didn't create a room
21:27 n0tjack ^elyse^: I ruined your chevron: https://gist.github.com/ano​nymous/25143c75e96f5dd54940
21:27 ^elyse^ dat code
21:27 tony-o ry @!walls.append($l)
21:27 n0tjack the only thing I'm unhappy about there is the hamfisted {@_[@pfx.elems div 2] = 1;@_}
21:28 tony-o also
21:28 ^elyse^ actually supporting femto is good
21:28 ^elyse^ more future-proof :P
21:28 n0tjack ^elyse^: The fact that femto was missing was creating a bug which drove me crazy
21:29 n0tjack I had no idea why my FACTORS didn't match yours -- in theory it should have ;)
21:29 ^elyse^ :P
21:29 n0tjack if I could find a functional way to set %scales{' '} to 1, I'd be much happier
21:30 PerlJam n0tjack: ETOOCLEVER  :)
21:30 n0tjack PerlJam: Believe it or not, this kind of code/thinking/model is 100% standard in APLs
21:31 n0tjack an APLer who say the chevron would say "well, that's a lot of repetition"
21:31 n0tjack s/say/saw
21:31 TEttinger joined #perl6
21:31 PerlJam I'd say that in my head too, but then the next thing would be ... "at least it's readable"
21:32 pmurias joined #perl6
21:32 pmurias hi
21:33 kjs_ joined #perl6
21:33 n0tjack PerlJam: Well, the syntax of APLs does make the "clever" code completely transparent and straightforward in those languages. I'd argue if you read the algo in native APL vs the original chevron, you'd grok it faster, including the underlying pattern.
21:33 n0tjack But array-oriented code doesn't translate super well into semicolon/curlybrace languages
21:33 n0tjack though p6 is much more accomodating in that regard than any other language I've seen
21:34 dalek rakudo/nom: be99be3 | lizmat++ | src/core/Any-iterable-methods.pm:
21:34 dalek rakudo/nom: Fix handling of first :!k, :!p
21:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be99be374e
21:35 dalek roast: 9b50630 | lizmat++ | S32-list/first-p.t:
21:35 dalek roast: Add tests for first :p
21:35 dalek roast: review: https://github.com/perl6/roast/commit/9b506305f3
21:35 ponzellus PerlJam, vendethiel, d'oh... thank you
21:36 kjs_ joined #perl6
21:38 dalek roast: 1134319 | lizmat++ | S32-list/first-v.t:
21:38 dalek roast: Add tests for first :v
21:38 dalek roast: review: https://github.com/perl6/roast/commit/1134319b8a
21:44 n0tjack d'oh!
21:45 n0tjack why didn't I think of this before, much better
21:45 n0tjack https://gist.github.com/ano​nymous/5ea32acacc2aa40e1f5d
21:45 n0tjack 1000 X** ... is much better than 10 X** 3 X* ..., and the "set the units to 1" is automagical
21:45 uberbaud joined #perl6
21:48 dalek roast: f70c498 | lizmat++ | S32-list/first-end-p.t:
21:48 dalek roast: Add tests for first :end, :p
21:48 dalek roast: review: https://github.com/perl6/roast/commit/f70c498598
21:48 llfourn joined #perl6
21:50 regreg joined #perl6
21:53 dalek roast: af18e37 | lizmat++ | S32-list/first-end- (2 files):
21:53 dalek roast: Add tests for first :end, :v (and fix count on :p)
21:53 dalek roast: review: https://github.com/perl6/roast/commit/af18e37c50
21:53 uberbaud \help
21:54 * n0tjack throws a lifering to uberbaud
21:58 uberbaud joined #perl6
21:58 kid51 joined #perl6
21:59 rurban1 joined #perl6
21:59 dalek roast: dcf3e06 | lizmat++ | S32-list/first-end (2 files):
21:59 dalek roast: Add tests for first :end (and one for :end, :k)
21:59 dalek roast: review: https://github.com/perl6/roast/commit/dcf3e06a2e
22:05 dalek rakudo/nom: 46874fd | lizmat++ | t/spectest.data:
22:05 dalek rakudo/nom: Run tests for first :end, :k, :p, :v
22:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46874fd841
22:06 lizmat Files=1062, Tests=48081, 238 wallclock secs (12.05 usr  3.86 sys + 1440.55 cusr 128.51 csys = 1584.97 CPU)
22:06 lizmat wonder if we're going to reach 50K before Christmas
22:11 lizmat but first some sleep
22:11 lizmat so good night, #perl6!
22:15 Akagi201 joined #perl6
22:15 hoelzro pass for ^2000; # done!
22:16 virtualsue_ joined #perl6
22:16 tokuhiro_ joined #perl6
22:19 Hor|zon joined #perl6
22:21 zakharyas joined #perl6
22:22 telex joined #perl6
22:30 cognominal joined #perl6
22:51 lea joined #perl6
22:57 raiph joined #perl6
23:13 uberbaud \quit
23:16 cognominal joined #perl6
23:19 timotimo m: my $r = / foobar /; say $r.match("  foobar  "); say $r.submatch("  foobar  ");
23:19 camelia rakudo-moar 46874f: OUTPUT«Method 'match' not found for invocant of class 'Regex'␤  in block <unit> at /tmp/wXW2csYz_o:1␤␤»
23:19 timotimo how come we don't have that?
23:20 timotimo m: my $r = / foobar /; say $r.submatch("  foobar  ");
23:20 camelia rakudo-moar 46874f: OUTPUT«Method 'submatch' not found for invocant of class 'Regex'␤  in block <unit> at /tmp/g0JJ12ZwSZ:1␤␤»
23:20 Hor|zon joined #perl6
23:20 timotimo and why don't we have that? really, no way to match a regex and enforce start- and end-anchoring without embedding the regex into another regex or asserting that after the match?
23:25 BenGoldberg joined #perl6
23:25 Akagi201 joined #perl6
23:28 tokuhirom_ joined #perl6
23:38 Ben_Goldberg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo