»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:01 kurahaupo left 00:02 Actualeyes joined 00:03 john51 left 00:07 itsame left, john51 joined 00:09 mcmillhj joined 00:14 Cabanossi left 00:15 Cabanossi joined 00:16 kurahaupo joined, mcmillhj left 00:17 BenGoldberg joined 00:26 kurahaupo left, itsame joined 00:30 pierre_ joined 00:32 mcmillhj_ joined 00:33 kurahaupo joined 00:34 lookatme joined, ChoHag left 00:36 xinming left 00:37 mcmillhj_ left 00:44 mcmillhj_ joined 00:47 kurahaupo left 00:48 mcmillhj_ left
lookatme morning, morning .. 01:00
raschipi Look at the European 01:01
01:02 itsame left, mcmillhj_ joined
lookatme Here is +8 zone 01:05
01:05 kurahaupo joined
raschipi Even more European than the people that live in Europe, than. 01:07
01:07 mcmillhj_ left 01:09 pierre_ left, cyphase left
lookatme Em --? 01:10
01:10 pierre_ joined 01:14 kurahaupo left 01:15 cyphase joined 01:16 kurahaupo joined 01:17 xinming joined 01:18 mcmillhj_ joined, kurahaupo_ joined 01:19 imcsk8 left, imcsk8 joined 01:21 kurahaupo left 01:23 mcmillhj_ left 01:27 kurahaupo_ left 01:28 bubble1994 left, mcmillhj_ joined 01:33 mcmillhj_ left
haxmeister so zef is failing to install Selenium::WebDriver with the following error: pastebin.com/77kKeCHe 01:35
01:36 itsame joined
haxmeister and it locks up there too... have to ^c to get out of it 01:36
01:44 Cabanossi left 01:45 Cabanossi joined 01:47 mcmillhj_ joined 01:52 mcmillhj_ left 01:53 itaipu joined
lookatme I think it's problem of Selenium::WebDriver. 01:55
The test failed.
haxmeister well I have chromium browser.. and it popped open like 15 windows due to the test
I just installed chrome browser.. maybe it will succeed??.. 01:56
lookatme Is the document of the module said something about test ? 01:57
Such as you have install something .. etc
haxmeister nope 01:58
is chrome test
of some sort
launches chrome windows to nowhere
look at screenshot imgur.com/fRRNZBr 02:02
lookatme I don't know.. 02:04
haxmeister weird eh?
lookatme Em, maybe it's a bug... 02:05
Have you google it ?
02:06 mcmillhj joined
haxmeister no.. I'm digging 02:07
lookatme Em, I notice that have a ChromeDriver, have you installed it ? 02:10
02:11 mcmillhj left, choz joined
choz mornin all 02:11
im newb in perl, anyone knows what is '\$6' in this command do? `perl -e 'print crypt("password","\$6") . "\n"'` 02:12
haxmeister encryption level? 02:13
choz is that a variable?
02:13 Cabanossi left
choz coz when i try to run it, it'd return nothing.. 02:14
raschipi choz: It's not, the "$" is being escaped. 02:15
But I have no idea what it means, though.
02:15 Cabanossi joined, colomon_ joined
choz i see 02:15
anyway, thx fyi raschipi n haxmeister 02:16
MasterDuke_ i think that's the salt. at maybe it's saying to run 6 rounds of crypt?
02:16 colomon left, colomon_ is now known as colomon
raschipi That's another language. There's two with the same name. 02:16
MasterDuke_ *and maybe
choz oh
raschipi We talk Perl6, but that's Perl5.
geekosaur on linux that means to use sha-512 02:17
man 3 crypt
haxmeister $1 would be md5 crypt 02:18
lookatme It's a salt `char *crypt(const char *key, const char *salt);`
choz so \$6 is an ID of glibc salt 02:19
haxmeister $6 sha-512
choz ive got it not
now*
geekosaur lookatme, that interpretation is 7th edition unix
it does more now
haxmeister have to escape the $ for bash to send it proper
choz i think ive got what i have to do next..
tq wizards.. 02:20
geekosaur no, it's single quoted. but it's in a double quoted perl string inside the single quoted shell string, because you can't nest a single quoted string inside another in a shell
haxmeister ^this
geekosaur so it has to escape the $ against perl
haxmeister he's right^
geekosaur (alternately they could have used q/$6/ or something)
haxmeister selenium :(
02:22 mcmillhj joined 02:27 mcmillhj left
haxmeister interesting... it doesnt' like the chromedriver that comes with chromium and to install chromdriver independantly I have to uninstall chromium 02:32
oh the life...
we'll see if it works this time
02:36 olinkl joined, mcmillhj joined
haxmeister failed again 02:37
02:38 itsame left
haxmeister pastebin.com/Bssi9TT0 02:38
02:41 mcmillhj left
haxmeister man I have no idea what to do with that information 02:41
MasterDuke_ looks like File::Temp failed a test, but the test has something to do with GC, so maybe it's just a timing error or something like that 02:42
haxmeister I don't even know what GC is referring too 02:43
MasterDuke_ could manually install File::Temp with --force and then try Selenium::WebDriver again
garbage collection
haxmeister ah ok
I'll try again with no changes 02:44
02:44 Cabanossi left
MasterDuke_ yeah, it might be good to create an issue in the File::Temp repo if the test is failing for no good reason 02:45
haxmeister passed temp that time
02:45 Cabanossi joined
haxmeister fingers crossed 02:45
02:46 cpage_ joined
choz just realized my crypt didnt work because i didnt close the last '$'.. finally got it working with `perl -e 'print crypt("Awe378437", "\$6\$"). "\n"'`.. tq for your guys help, really saved me lots of trouble 02:46
haxmeister passed the chrome.t test this time too
02:46 choz left
haxmeister success?!?!? 02:47
lookatme ...
I tried install File::Temp, no error
It's not stable. :) 02:48
02:51 mcmillhj joined
haxmeister the install succeded thsi time 02:54
so I'll to a little test after a break 02:55
02:55 mcmillhj left, wamba joined
lookatme It's not easy install that module .. XD 02:57
03:05 mcmillhj joined
haxmeister simple test script worked 03:08
well.. partially 03:09
03:11 mcmillhj left, Cabanossi left 03:14 Cabanossi joined 03:16 mcmillhj joined 03:21 itaipu left, mcmillhj left
samcv lookatme, os? 03:30
lookatme os ?? 03:31
03:32 mcmillhj joined
lookatme samcv, what the mean? fedora 25 ?. 03:34
samcv that is an acceptable answer 03:35
lookatme :)
samcv you colud steal my implementation 03:36
github.com/perl6/doc/blob/master/h...#L962-L970
03:36 aborazmeh joined, aborazmeh left, aborazmeh joined, mcmillhj left
samcv the extra code is qust to code for that 1 in a million chance that you get the same one. but very important for langer running programs 03:36
lookatme What implementation ? Oh I just test that File::Temp installation 03:37
samcv oh so you aren't usig tnhe module directly
lookatme I don't need that module
samcv oh ok
lookatme Yeah..
samcv Your printf-style directives specify 1 argument, but 1000000 arguments were supplied 03:38
hehehe
1 million arguments
lookatme OH, I see it. 03:41
03:42 lighttrr joined
lookatme The temp file will save on the disk ? 03:44
samcv idk what command are you using? 03:45
the code i linked or something else 03:46
lookatme It's better create a FIFO file instead of that temp file on the disk. 03:47
samcv depends on what you're doing
03:48 mcmillhj joined
lookatme Yeah 03:48
Have lunch now, see you. 03:50
03:55 mcmillhj left 04:00 wamba left 04:04 lighttrr left 04:05 itsame joined 04:06 itsame left, mcmillhj joined 04:07 itsame joined 04:08 AlexDaniel left 04:10 mcmillhj left 04:16 CIAvash joined 04:23 mcmillhj joined 04:28 mcmillhj left 04:31 itsame left 04:33 pierre_ left 04:35 khw left 04:39 mcmillhj joined 04:42 curan joined 04:43 Cabanossi left, Cabanossi joined 04:46 raschipi left 04:47 mcmillhj left 04:49 aborazmeh left 04:51 itsame joined 04:57 skids left 05:02 itsame left 05:06 geekosaur left 05:09 geekosaur joined 05:13 xtreak joined 05:17 labster left 05:25 mcmillhj joined 05:27 Cabanossi left 05:29 Cabanossi joined 05:30 mcmillhj left 05:37 itsame joined 05:38 skaji joined 05:40 wamba joined, m0ltar left 05:43 mcmillhj joined 05:44 TeamBlast joined 05:45 domidumont joined, domidumont left 05:46 wamba left, domidumont joined 05:48 mcmillhj left
grondilu Hello, I was looking at rosettacode.org/wiki/Bernoulli_numbers#Perl_6, and I tried to shorten it a bit by making @a a state variable. 05:49
Turns out state @a = ... fails, but (state @a) = ... works.
I'm not sure the semantics is supposed to be different. 05:50
05:50 lookatme left 05:51 lookatme joined, itsame left, itsame joined 05:52 domidumont left, m0ltar joined 05:53 domidumont joined 05:55 anton_p joined 06:00 pierre_ joined 06:02 mcmillhj joined
grondilu m: say gather for ^Inf { (state @a) = 1/($_+1), +@a*(@a.shift-*) ... {!@a}; take @a.tail if @a.tail }[^10] 06:04
camelia (1 0.5 0.166667 -0.033333 0.023810 -0.033333 0.075758 -0.253114 1.166667 -7.092157)
grondilu m: say gather for ^Inf { state @a = 1/($_+1), +@a*(@a.shift-*) ... {!@a}; take @a.tail if @a.tail }[^10]
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use variable @a in declaration to initialize itself
at <tmp>:1
------> 3ather for ^Inf { state @a = 1/($_+1), +@7⏏5a*(@a.shift-*) ... {!@a}; take @a.tail i
expecting any of:
grondilu this makes sense, not sure why I had a different message earlier 06:05
06:07 mcmillhj left 06:10 itsame left, itsame joined 06:14 mcmillhj joined 06:15 itsame left, itsame joined 06:18 BenGoldberg left, mcmillhj left 06:19 lowbro joined 06:20 lowbro left, lowbro joined 06:26 mcmillhj joined, Cabanossi left 06:28 wamba joined 06:29 Cabanossi joined 06:30 mcmillhj left 06:35 xtreak left 06:36 xtreak joined 06:40 xtreak left, mcmillhj joined 06:41 itsame left 06:42 itsame joined 06:44 xtreak joined 06:45 mcmillhj left 06:52 darutoko joined 06:53 mcmillhj joined 06:55 astj_ joined, astj left 06:58 labster joined, mcmillhj left 07:01 robertle left 07:05 ChoHag joined, espadrine joined 07:09 mcmillhj joined, parv joined 07:11 ufobat joined, itsame left, itsame joined 07:12 Cabanossi left 07:14 Cabanossi joined 07:15 mcmillhj left 07:20 itsame left, domidumont left, itsame joined 07:21 domidumont joined 07:23 espadrine left, zakharyas joined, abraxxa joined 07:27 mcmillhj joined 07:30 aindilis` joined 07:32 aindilis left 07:35 mcmillhj left
lizmat_ clickbaits p6weekly.wordpress.com/2017/05/08/...batross_i/ 07:43
07:43 lizmat_ is now known as lizmat
parv lizmat, like the name of the command "fix_windows10" ;-> 07:45
07:46 mcmillhj joined 07:48 sena_kun joined 07:50 aindilis` left, itsame left, itsame joined, mcmillhj left 07:51 AlexDaniel joined, mithaldu_ joined, g4 joined, g4 left, g4 joined, wamba left
lizmat parv: can't take any credit for it :-) 07:52
lizmat is just the messenger on that one
parv lizmat, thing is i don't know who made that; so here is hoping the messenger would pass back my message. 07:54
07:55 CIAvash left
lizmat El_Che: ^^^ 07:55
parv Aye.
El_Che, interesting command name there, "fix_windows10". 07:56
lookatme :) fix_bug10
07:58 TEttinger left, AlexDaniel left 07:59 mcmillhj joined 08:04 mcmillhj left, jonas1 joined 08:05 itsame left, itsame joined 08:11 mcmillhj joined, parv left 08:12 rindolf joined, Cabanossi left 08:13 itsame left 08:14 Cabanossi joined 08:16 mcmillhj left 08:17 astj joined, astj_ left 08:22 parv joined 08:23 parv left
samcv .tell Zoffix docs still mention slurp-rest for Proc objects docs.perl6.org/type/Proc 08:23
yoleaux samcv: I'll pass your message to Zoffix.
08:25 zakharyas left 08:27 mcmillhj joined, wigner joined 08:31 mcmillhj left 08:34 wamba joined
lookatme samcv, slurp-rest still working for Proc 08:35
samcv i know it still works
that's not the issue. just zoffix is updating the docs to mention 'slurp' instead and that be the preferred one 08:36
lookatme, see message here: docs.perl6.org/routine/slurp-rest
lookatme I see. But in 6.c we still have this method, right ? 08:40
08:43 ChoHag left, ChoHag joined, mcmillhj joined 08:47 pierre_ left
u-ou which operator should I use to compare two objects? 08:48
I know that eq is for strings and == is for numbers so what is for objects?
moritz u-ou: what semantics do you want out of the comparison?
08:48 mcmillhj left 08:49 xtreak left
moritz m: class A { has $.x }; say A.new(:x(5)) eqv A.new(:x(5)); say A.new(:x(5)) === A.new(:x(5)); 08:49
camelia True
False
moritz stackoverflow.com/questions/176343/...erators-eq
u-ou that they're the same object 08:50
moritz === then
u-ou thank you 08:51
lookatme u-ou, you can provides a overload of infix:<==> for your class 08:54
u-ou cool
lookatme m: class A { has $.x }; multi sub infix:<==>(A $a, A $b) { say "CALL ME"; True; }; say A.new(:x(5)) === A.new(:x(5)); 08:55
camelia False
lookatme m: class A { has $.x }; multi sub infix:<==>(A $a, A $b) { say "CALL ME"; True; }; say A.new(:x(5)) == A.new(:x(5));
camelia CALL ME
True
08:55 mcmillhj joined 08:56 xtreak joined
samcv lookatme, yes we still have it. but they do *mostly* the same thing 08:57
lookatme samcv, I wonder why they name that method **slurp-rest**.
moritz m: say 1.WHICH.^name 08:58
camelia ObjAt
samcv well. we have slurp now. instead of having slurp and slurp-rest
but slurp and slurp rest literally slurp to the end of the file. but that's basically implied
no reason to say rest
moritz m: class A { has $.x; method WHICH() { ObjAt.new('A') } }; A.new(x=>5) === A.new(x => 6)
camelia WARNINGS for <tmp>:
Useless use of "===" in expression ".new(x=>5) === A.new(x => 6)" in sink context (line 1)
moritz m: class A { has $.x; method WHICH() { ObjAt.new('A') } }; say A.new(x=>5) === A.new(x => 6) 08:59
camelia True
moritz a very egalitarian class
samcv otherwise would be like .slurp-from-beginning or something weird
moritz iirc the question was whether .slurp on a file handle would close the file handle or not
08:59 xtreak left
moritz and the reaction was to rename slurp on file handles to something different 08:59
but why -rest, I don't know 09:00
09:00 mcmillhj left 09:04 xtreak joined 09:06 mcmillhj joined, xtreak left 09:14 mcmillhj left 09:18 wigner left, pierre_ joined
El_Che lo 09:25
09:28 scovit joined, Cabanossi left
scovit hello, where could I find the documentation about the behaviour of Closures in Perl 6? 09:29
09:29 xtreak joined, Cabanossi joined
scovit found this en.wikibooks.org/wiki/Perl_6_Progr...d_Closures 09:29
is it possible to introspect the state of a Closure? 09:30
like know which variables are in the scope, what is their value, change their value
lookatme docs.perl6.org/language/functions#Closures 09:31
scovit, check out this page
scovit lookatme, thank you. I would like to know if it is possible to manipulate their state? 09:33
lookatme I think you want this : docs.perl6.org/language/packages#P...o-packages
m: { my $x = 10; say MY::.keys; } 09:35
camelia ($_ $*DISPATCHER $x)
scovit good hints! thanks 09:37
lookatme Em, :) 09:38
09:38 lookatme left 09:41 pierre_ left 09:52 geekosaur left 09:54 geekosaur joined, z8 joined 09:55 pierre_ joined 09:57 z8 left
scovit lookatme, I am trying to understand. For packages I understand it might be possible to achieve what I would like, and that is maybe what I should focus on. What about blocks? 10:00
m: sub ciao(&code) { my $j = "due"; say &code::.keys; }; my $i = "perl"; ciao { say "here"; };
camelia (0)
10:00 wamba left
scovit also, could I create a Package on-the-fly as a closure? 10:01
jnthn Perl 6 is pretty strict about lexicals staying lexical 10:04
There's no way in general to introspect what a closure closes over 10:05
10:05 xtreak left
jnthn It is possible to obtain MY:: and pass *that* around 10:05
But the compiler is otherwise free to optimize lexical variables aggressively, including erasing information that would allow their introspection, short of seeing something that requires it in scope (like MY:: or EVAL) 10:06
10:11 zakharyas joined 10:16 gregf_ left 10:18 wamba joined, astj left 10:19 astj joined 10:22 sena_kun left 10:23 astj left 10:25 eady left 10:28 Cabanossi left 10:29 Cabanossi joined 10:31 astj joined
Geth doc: 164d5534bc | (Zoffix Znet)++ | doc/Type/Proc.pod6
Remove .slurp-rest from Proc examples; samcv++
10:34
10:35 labster left 10:45 kurahaupo joined 10:51 xtreak joined 10:59 ChoHag left 11:00 LeCamarade joined 11:01 kurahaupo left 11:07 eady joined 11:11 bioduds joined
bioduds Hello, is this support channel? 11:12
11:13 Cabanossi left
bioduds I'm getting this weird error 11:13
===SORRY!=== QAST::Block with cuid 2 has not appeared
Someone knows what it is related to?
moritz what code did you run? 11:14
11:14 Cabanossi joined
bioduds Just trying to implement a test module 11:14
use v6; # SOME DECLARATIVE CODE exemples subset Natural of Int where * >= 0; subset FirstName of Str where 0 < *.chars < 256;
moritz m: use v6; subset Natural of Int where * >= 0; subset FirstName of Str where 0 < *.chars < 256; 11:16
camelia ===SORRY!===
QAST::Block with cuid 2 has not appeared
moritz looks like a bug to me
m: use v6; subset Natural of Int where * >= 0; subset FirstName of Str where { 0 < .chars < 256} ;
camelia ( no output )
moritz bioduds: seems to work with a {} closure
m: subset Foo of Int where 0 < * < 3 11:17
camelia ( no output )
moritz m: subset Foo of Int where 0 < *.sqrt < 3
camelia ===SORRY!===
QAST::Block with cuid 1 has not appeared
moritz m: subset Foo of Int where 0 < *.sqrt
camelia ( no output )
moritz m: subset Foo of Int where 0 < *.sqrt < 3
camelia ===SORRY!===
QAST::Block with cuid 1 has not appeared
moritz m: say (0 < *.sqrt < 3)(4) 11:18
camelia ===SORRY!===
QAST::Block with cuid 1 has not appeared
11:18 xtreak left
bioduds moritz: do you understande the problem? 11:18
quite bugish right?
11:19 xtreak joined
moritz m: say (0 < * < 3)(2) 11:19
camelia True
bioduds weird part is that it was working before 11:20
it started to complaint after I changed to .pl6
moritz bisectable: say (0 < *.sqrt < 3)(4)
bisectable6 moritz, Bisecting by output (old=2015.12 new=20cfd6b) because on both starting points the exit code is 1
moritz, bisect log: gist.github.com/9b0068a0ec1bd53966...c468ed2cf4
moritz, (2015-12-25) github.com/rakudo/rakudo/commit/07...dc61f84053
moritz, The result looks a bit unrealistic, doesn't it? Most probably the output is different on every commit (e.g. 「bisect: say rand」)
11:20 Zoffix joined
moritz bisectable: say so try (0 < *.sqrt < 3)(4) 11:20
11:20 itaipu joined
bisectable6 moritz, Bisecting by output (old=2015.12 new=20cfd6b) because on both starting points the exit code is 1 11:20
moritz, bisect log: gist.github.com/5cd30d93ce3cf0d0c4...9ce208a9dc 11:21
moritz, (2015-12-25) github.com/rakudo/rakudo/commit/07...dc61f84053
moritz, The result looks a bit unrealistic, doesn't it? Most probably the output is different on every commit (e.g. 「bisect: say rand」)
11:21 xtreak left
Zoffix That's a known bug that existed for ages. 11:21
11:21 xtreak joined
Zoffix It's due to the curry not knowing about being chained 11:21
moritz m: say so try (0 < *.sqrt < 3)(4
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3say so try (0 < *.sqrt < 3)(47⏏5<EOL>
moritz m: say so try (0 < *.sqrt < 3)(4)
camelia ===SORRY!===
QAST::Block with cuid 1 has not appeared
moritz Zoffix: ok, thanks 11:22
Zoffix: there's an RT for that, right?
Zoffix Yeah, should be
Zoffix looks
moritz if yes, won't bother submit it again
bioduds how come it worked before and suddenly, boom
Zoffix bioduds: you may be misremembering it working before
bioduds well, good to know it is a bug then
I may 11:23
anyhow, I don't quite need it, I was just confused. Thanks for pointing out
Zoffix moritz: rt.perl.org/Public/Bug/Display.htm...et-history
and I recall talking about it in #perl6-dev and TT saying it's got to do with curry and chaining or something 11:24
bioduds: in your case you can just remove the asterisk, as the `where` block thunks, so $_ will be the arg and your expression returns True/False 11:25
11:30 zacts left
Zoffix bioduds: also we have UInt for Int >= 0. Though natural numbers generally don't include a 0 so your subset is off a bit 11:30
And the Firstname subset doesn't need the lower bound since chas can't be negative; so just .chars < 256 11:32
11:35 Zoffix left
bioduds tx Zoffix 11:40
done it 11:41
11:41 kurahaupo joined 11:42 Cabanossi left 11:44 Cabanossi joined 11:45 pierre_ left 11:49 zacts joined 11:51 kurahaupo left, kurahaupo joined, kurahaupo left 11:52 kurahaupo joined, kurahaupo left, ChoHag joined, kurahaupo joined 11:59 kyan joined 12:18 wamba left 12:32 skids joined 12:34 itaipu left 12:40 wamba joined 12:46 xtreak left 12:48 xtreak joined 12:49 wamba left 12:53 wamba joined 12:54 mcmillhj joined 12:55 xtreak left
scovit m: use experimental :macros; macro ciao { quasi { say MY::.keys; } }; my $i = "hello"; say MY::.keys; ciao; 12:58
camelia ($=pod EXPERIMENTAL-MACROS $_ $/ !UNIT_MARKER &ciao $=finish EXPORT $! $i ::?PACKAGE GLOBALish $¢ $?PACKAGE)
()
scovit m: use experimental :macros; macro ciao { quasi { say MY::.keys; } }; my $i = "hello"; ciao;
camelia ()
MasterDuke_ m: use experimental :macros; macro ciao { quasi {{{ say MY::.keys; }}} }; my $i = "hello"; ciao; 12:59
camelia ($_ $*DISPATCHER)
scovit is there some random behaviour or I do not understand 13:00
ah MasterDuke_ sorry
thougth that what was I wrote
so the {{{ }}} defined scope cannot access $i 13:01
13:02 raschipi joined, curt_ joined 13:03 wamba left
MasterDuke_ i have no idea, masak can probably answer though 13:05
13:05 robertle joined
curt_ Docs have Instant.Date (docs.perl6.org/type/Instant#method_Date) but not Instant.DateTime (though Rakudo has it implemented) 13:06
13:09 wamba joined, cdg joined
[Coke] wonders how hard it would be to make a module that let you use [] for substr. 13:12
13:13 Cabanossi left 13:14 Cabanossi joined 13:18 zakharyas left, jonas1 left 13:19 zakharyas joined 13:22 Sound joined 13:23 Sound left, Sound joined, zakharyas left
Ulti is there a way to add your own encodings to stuff like Bug.decode do you just monkey in the candidate 13:24
*Buf.decode
13:24 sufrostico joined
Ulti thinking of adding 2bit format for compactly keeping DNA sequences in memory and it would be nice to have the decode to a character representation be kind of generic rather than something special I create in the library 13:26
13:28 silug left 13:30 colomon left
Ulti something like this? gist.github.com/MattOates/363ce81f...9b4e641f38 13:32
jnthn Ulti: Not yet, though pluggable encodings is something on my todo list
Ulti ahh cant augment Blob 13:36
13:37 colomon joined
Ulti so why is Blob closed for augmentation but Int is not I thought one of the main reasons was perf? 13:42
13:43 buggable left, buggable joined, ChanServ sets mode: +v buggable
jnthn Blob is a role 13:44
Int is a class
Ulti ok so Id end up making my own 2bit class by the looks of it anyway similar to the utf8 ones defined in Rakudo 13:49
13:49 bioduds left
[Coke] m: say 1-(1-9.95)**(1/3) 13:52
camelia NaN
[Coke] m: say 1-(1-0.95)**(1/3) #oops 13:54
camelia 0.631596850135961
13:56 abraxxa left
Ulti sorry why is the first one a problem 13:56
13:58 curan left
[Coke] m: say sqrt(-2) 13:58
camelia NaN
[Coke] ^^
I assume we don't like roots of negative numbers, even though it might work. 13:59
Ulti m: -2.sqrt.say 14:00
camelia WARNINGS for <tmp>:
Useless use of "-" in expression "-2.sqrt.say" in sink context (line 1)
1.4142135623731
Ulti m: say(-2.sqrt)
camelia -1.4142135623731
[Coke] m: say (-2).sqrt
camelia NaN
[Coke] precedence.
Ulti yeah its - after the fact with 2.sqrt I guess
[Coke] but my original equation should be 3.076 or so. rakudobug?
Ulti it also doesnt matter if you get it away from Rat 14:01
[Coke] m: say 1-(1-9.95)**.333333333
camelia NaN
Ulti well .3 is still a Rat right so thats identicalish 14:02
but yeah weird
surely someone would have noticed this before now so is it a regression?
people have played with 2D mechanics and graphics where you're likely to write almost exactly this code 14:03
raschipi bisectable: say 1-(1-9.95)**.333333333
bisectable6 raschipi, On both starting points (old=2015.12 new=20cfd6b) the exit code is 0 and the output is identical as well
raschipi, Output on both points: «NaN»
Ulti o___O 14:04
also whoa bisectable is fast
moritz why does anybody think this is a regression?
if you want complex numbers, you need to start with a complex number
m: say 1-(1-9.95+0i)**.333333333 14:05
camelia -0.0381123313882117-1.79806329757973i
moritz and it's always[tm] been this way, since we don't want to burden the not-so-mathematically-inclined programmer with complex numbers if they just made the mistaken of taking an sqrt (or comparable) of a negative number 14:06
Ulti yeah I guess that's fair
plus with the precedence just pointed out it might be super confusing 14:07
raschipi What's happening is automatic promotion from Rat to Num, because Rat has limited precision.
FatRat doesn't promote to Num. 14:08
Rat is limited to 64 bits in the denominator.
14:11 khw joined 14:12 Cabanossi left 14:14 Cabanossi joined
[Coke] moritz: it's not complex though. you can cube root a negative real and get a negative real. Is it just complex because we don't have literal cube root and are approximating? 14:16
m: say 64**(1/3)
camelia 4
[Coke] m: say (-64)**(1/3)
camelia NaN
[Coke] m: say (-64+0i)**(1/3) 14:17
camelia 2+3.46410161513775i
moritz [Coke]: right, but we disallow fractional powers of any negative number, which is a common practise in numerical implementations
[Coke] hokay.
it was the wrong equation for my particular problem anyway, so I'm all set. :)
Geth doc: b4e10b6fbe | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Instant.pod6
Document Instant.DateTime; curt_++

coverage report shows it as covered; so it's likely in roast
14:21
14:22 gregf_ joined
Geth doc: 75abdd5b79 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Instant.pod6
Reword

  - Shorten description
  - Remove confusing comment, as it implies the method is not portable, but it is
14:22
14:31 eliasr joined 14:50 eady left 14:56 Cabanossi left 14:59 Cabanossi joined 15:02 silug joined 15:03 lowbro left 15:05 zakharyas joined 15:16 domidumont left 15:22 zakharyas left, wamba left 15:23 zakharyas joined 15:40 vytas left 15:45 st_elmo joined 15:50 zakharyas left 15:56 vytas joined, sufrostico left 16:13 sufrostico joined 16:17 scovit left 16:18 dj_goku_ left, dj_goku joined, dj_goku left, dj_goku joined 16:20 st_elmo left 16:23 itaipu joined 16:24 Zoffix joined, Zoffix left 16:27 mcmillhj left 16:29 mscha joined
mscha m: say 243.log(3); .say for 0 .. 243.log(3); # I hate invisible rounding problems. 😡 16:31
camelia 5
0
1
2
3
4
16:31 itaipu left
timotimo m: say 243.log(3) - 5 16:31
camelia -8.88178419700125e-16
timotimo yeah, that's far behind the comma
16:32 itaipu joined
mscha Problem is, you can't really add a delta, no matter how small, because then you might get a value that's too high. 16:33
Oh well, I'll do it without .log().
TimToady m: say 243.log(3); .say for 0 ... * ≅ 243.log(3);
camelia 5
0
1
2
3
4
5
mscha m: .say for 1, 3, 3² ... 243; # this is prettier anyway 16:34
camelia 1
3
9
27
81
243
timotimo 'tis
TimToady :D
m: .say for 3⁰, 3¹, 3² ... 243; 16:35
camelia 1
3
9
27
81
243
16:35 ufobat left
curt_ m: my $i = -0x8000000000000000; say ($i div 2**12) == ($i +> 12) ?? 'good' !! 'bad'; 16:36
camelia good
curt_ m: my $i = -0x8000000000000000; say ($i div 2**37) == ($i +> 37) ?? 'good' !! 'bad';
camelia bad
TreyHarris m: say 9**(-1/2) 16:39
camelia 0.333333333333333
curt_ m: my $i = -0x8000000000000000; say ($i div 2**23) == ($i +> 23) ?? 'good' !! 'bad'; 16:40
camelia good
curt_ m: my $i = -0x8000000000000000; say ($i div 2**42) == ($i +> 42) ?? 'good' !! 'bad';
camelia bad
16:40 ggoebel left
TimToady loks like a bug 16:41
*oo
at the 32-bit boundary
16:41 Actualeyes left
TimToady m: my $i = -0x8000000000000000; say ($i +> 31) 16:41
camelia -4294967296
TimToady m: my $i = -0x8000000000000000; say ($i +> 32)
camelia -1
TimToady please report bug 16:44
TimToady heads to Fry's yet again for more capacitors... 16:45
timotimo did you fry your capacitors?
TimToady ancient Tivo power supply, have replaced most of the caps already, but of course it's the one I forgot to buy that is the busted one, seemingly 16:46
anyway, the 12v line is only making about 6v
can actually hear the cap arcing, a little snick-snick noise 16:47
I wouldn't put so much work into this, except it's the Tivo with the lifetime subscription :)
also put a new capacitor into my air conditioner condenser last week, but that single cap easily outweighed all the boards in my Tivo :) 16:49
TreyHarris TimToady: heh, hope you've stuck ethernet and a bigger hard drive on it if it's old enough for that
TimToady it's the early HD model, so already has ethernet 16:50
TreyHarris Ah... the ones before that had ethernet--as headers on the board. So you could connect it but you had to run a cable through the chassis. Turned out the fan was smaller than the outlet by _just_ enough to get a thin cable out. 16:51
TimToady had an external 500G, but plan to replace internal with 2T and forget the external
I don't think I'd futz with a low-def tivo, since I'm a bit of a video snob :) 16:52
TreyHarris TimToady: I've got two from my cable company now--RCN just uses honest-to-god TiVos as their cable boxes, bless them 16:53
curt_ Bugged: bit shift broken at 32 bits: rt.perl.org/Public/Bug/Display.html?id=131278
TimToady curt_++
that took less time than me not going to Fry's :)
afk &
16:53 ggoebel joined 16:55 Actualeyes joined 16:56 cdg left
curt_ -1 looks like the intended output for big shifts: rt.perl.org/Public/Bug/Display.html?id=126942 16:59
17:03 Sound left, dogbert17 joined 17:04 mscha left, darutoko- joined
curt_ Work around for big bit shifts, just do two of them less than 32 17:04
m: my $i = -0x8000000000000000; say ($i div 2**37) == ($i +> 31 +> 6) ?? 'good' !! 'bad';
camelia good
17:07 darutoko left 17:12 wamba joined 17:16 kyan left
alphah Hello, what would be a good way to call a method by a variable has it's name, something like $var="methodname"; self.$var 17:17
m: class C { has $!var = "foo"; method foo() { "hello" }; method bar() { say self.$!var } }; C.new.bar
camelia No such method 'CALL-ME' for invocant of type 'Str'
in method bar at <tmp> line 1
in block <unit> at <tmp> line 1
jnthn self."$var"()
17:17 mcmillhj joined
jnthn Or self."$!var"() in that case 17:17
alphah jnthn: worked, thank you 17:18
17:22 setty1 joined 17:26 gregf_ left 17:35 rindolf left 17:36 domidumont joined
alphah That works for methods, does it also works for attributes? 17:36
class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { say self.$attr.hello } }
m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { say self.$attr.hello } }
camelia ( no output )
alphah m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { say self.$attr } } 17:37
camelia ( no output )
17:40 rindolf joined, ggoebel left
alphah class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { say self.$attr.hello0o } } # why no error! 17:40
m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { say self.$attr.hello0o } } # why no error! 17:41
camelia ( no output )
17:41 grondilu_ joined 17:44 grondilu left
timotimo alphah: public attributes are always accessed via accessor methods, so yes, it should work 17:45
17:46 sufrostico left 17:47 ufobat joined
alphah timotimo: in this example should not it call .hello ?: 17:48
ufobat should perl6 build on a raspi in the meanwhile?
alphah m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { self.$attr.hello() } }
camelia ( no output )
timotimo i have cat on me
17:49 itaipu left, espadrine joined, zakharyas joined
timotimo self.$attr calls $attr as a code object and passes self as invocant 17:49
cant properly type with cat on me 17:50
you don't get an error because you're not calling any of the code 17:51
alphah hmm
tried slef.$attr.new.hello 17:52
timotimo well, as long as it's inside method foo of class B and you're not doin something like B.new.foo
nothing's gonna happen
you won't get a compile error because the $attr that gets passed could be a code object
even though the default case would almost guaranteed give you an exception, we don't do analysis like that 17:53
okay, cat left 17:55
alphah okay, so what I'm trying to do is: I have a class which has 3 attributes , each one is an instance of different class,,, I want to create a method takes "string" arg, and use the instance that matches this string
17:55 mr-foobar left
timotimo m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { self.$attr.hello() } }; B.new.foo 17:55
camelia No such method 'CALL-ME' for invocant of type 'Str'
in method foo at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo ^- there's the error you were expecting
17:56 itaipu joined
timotimo in what way does the instance match the given string? 17:56
m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { self."$attr".hello() } }; B.new.foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.
at <tmp>:1
------> 3; method foo($attr = "a") { self."$attr"7⏏5.hello() } }; B.new.foo
alphah just the name
timotimo m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { self."$attr"().hello() } }; B.new.foo
camelia hello
timotimo m: class A { method hello() { say "hello" } }; class B { has A $.a; method foo($attr = "a") { self."$attr"().hello() } }; B.new.foo("bleh")
camelia No such method 'bleh' for invocant of type 'B'
in method foo at <tmp> line 1
in block <unit> at <tmp> line 1
17:56 ggoebel joined
timotimo does that solve your problem? 17:58
alphah let me try that
yes worked :) 18:00
what confused me is I did not think I will need the "()" for the attributes... now understand 18:01
timotimo yeah accessors are just methods 18:02
that was the number one confusing thing for me near the beginning
alphah noted
timotimo i was like "but the attribute is called $.foo, why don't i write self.$foo or something?
or maybe $self.foo?"
etc etc
alphah yes exactly, that was my thought just 1 minute ago 18:03
timotimo but self.$foo is really like $foo(self)
skids m: my $b; (loop ($b = 4; $b; $b--) { next if $b == 1; $_ }).note 18:05
camelia ((Any) (Any) (Any) (Mu) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (A…
skids That only happens if you next out of the last iteration.
timotimo oh, fascinating 18:06
skids files an RT 18:08
m: my $b; (loop ($b = 4; $b > 0; $b--) { next if $b == 1; $b }).note # version without escaping the termination condition 18:13
camelia (4 3 2 (Mu))
skids still have that Mu.
18:15 robertle left
skids RT #131281 18:17
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131281
skids Ooh. also affect while. 18:19
m: my $b =4; (while ($b--) { next if $b == 0; $b }).note
camelia (3 2 1 (Mu) -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -6…
18:30 sunnylarry joined 18:34 sunnylarry left
Geth ecosystem: 9ecab7fd65 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Add Pythonic::Str to ecosystem

Index into strings like Pythonists do! See: github.com/zoffixznet/perl6-Pythonic-Str
18:37
tadzik ha! This is cool 18:44
timotimo yo tadzik 18:46
what is?
18:47 sufrostico joined
tadzik Pythonic::Str 18:49
I have 4 python students this week, and when I told them that I work with Perl some of them looked... jealous
timotimo huh 18:50
that's new
tadzik an ex-Perlist I suppose, not happy about the transition
18:50 zakharyas left
timotimo hmm 18:50
imgur.com/R7T4Gzn - tadzik i wanted you to see this 18:51
tadzik looks
oh dayum
it's beautiful
I can't unsee die katze
timotimo <3 18:52
die katze also sees you
tadzik have you githab it? 18:53
ah, I see it
timotimo yup
it also comes with a tool that creates a nice graphviz'd render of the whole callgraph
tadzik how's it faring with very big profiles?
mmm 18:54
timotimo it fares perfectly because it uses sqlite
tadzik right, but does it render the things in reasonable time, compared to angular?
timotimo it does a pretty different thing
why's the irclog down? :(
tadzik what I mean is, I wonder if it's viable to port p6profiler-qt to Perl 6 18:55
(and Gtk)
timotimo yeah, it probably is
tadzik hmm :)
timotimo as long as you go with sqlite instead of json :)f
tadzik yup
timotimo hack.p6c.org/~timo/forestfire_callgraph_3.svg - check it 18:56
tadzik right, it was mostly rendering that brought the web profiler down
ayy, neat!
timotimo ayyyyyyyyyyy
raschipi lmao 19:09
19:14 AlexDaniel joined
AlexDaniel Ulti: re “whoa bisectable is fast”, it only had to try 2 revisions, so that's not so impressive :) 19:15
in fact, it is a bit slow because both revisions were compressed (even though it could have kept HEAD and 2015.12 uncompressed to speed things up)
so that's like 0.1s overhead per revision or something like that 19:16
19:17 sufrostico left 19:18 yqt joined 19:22 Ven joined, Ven is now known as Guest43623 19:26 revere joined 19:27 Guest43623 left, darutoko- left, Ven_ joined 19:28 Cabanossi left 19:29 Cabanossi joined, domidumont left 19:34 Ven_ left, ribasushi left 19:35 robertle joined 19:36 Ven_ joined 19:37 revere left 19:38 revere joined 19:39 revere left, revere joined, ribasushi joined 19:42 labster joined
timotimo sasheldon.com/blog/2017/05/07/how-i...r-windows/ - heh. 19:43
19:46 rindolf left
raschipi heh 19:46
19:48 ufobat left 19:52 lichtkind joined 20:12 cdg joined, AlexDaniel left 20:13 zakharyas joined, Ven_ left 20:14 Ven_ joined
[Coke] win 3 20:18
buggable [Coke], Thank you for entering Accidental /win Lottery! The next draw will happen in 4 weeks, 2 days, 3 hours, 41 minutes, and 50 seconds
raschipi win 9223372036854775807 20:21
buggable raschipi, Thank you for entering Accidental /win Lottery! The next draw will happen in 4 weeks, 2 days, 3 hours, 38 minutes, and 42 seconds
raschipi m: say "win 12" 20:22
camelia win 12
20:27 Cabanossi left 20:28 Ven_ left 20:29 Cabanossi joined 20:36 Ven joined 20:37 Ven is now known as Guest97635 20:40 TEttinger joined 20:47 gdonald left 20:49 gdonald joined
haxmeister win 5 20:51
buggable haxmeister, Thank you for entering Accidental /win Lottery! The next draw will happen in 4 weeks, 2 days, 3 hours, 8 minutes, and 8 seconds
haxmeister what's that all about? 20:52
haxmeister just installed moritz JSON module 20:53
raschipi Zoffix owns it.
haxmeister the module? 20:54
raschipi No, the bot
20:54 dct joined
raschipi The bot function, should I say 20:54
haxmeister got me excited for a minute there
samcv how do i traverse the grammar entries
in an actions class. in order that is
from how they are displayed when i dump $/ i need to access that inside TOP 20:55
hmm actually i think if i add another heirarchy i can do this
20:57 Cabanossi left
jnthn samcv: Positional captures in .list, named in .hash, and iirc .caps give you all of them in the order they happened 20:57
samcv what do i call .list on?
$/?
jnthn Ues
*Yes
samcv cool
alphah win 7 20:58
buggable alphah, Thank you for entering Accidental /win Lottery! The next draw will happen in 4 weeks, 2 days, 3 hours, 1 minute, and 52 seconds
20:58 Guest97635 left 20:59 Cabanossi joined
samcv jnthn, that does not work. $/.list inside of TOP 20:59
in the actions class that is
oh i can set an @array though. and i gues use that 21:00
21:00 itaipu left
jnthn m: grammar G { token TOP { (.)(.) } }; class A { method TOP($/) { say $/.list } }; G.parse('xy', :actions(A)) 21:01
camelia (「x」 「y」)
jnthn m: grammar G { token TOP { <alpha> <digit> } }; class A { method TOP($/) { say $/.hash } }; G.parse('x2', :actions(A))
camelia Map.new((:alpha(Match.new(list => (), made => Any, pos => 1, hash => Map.new(()), orig => "x2", from => 0)),:digit(Match.new(list => (), made => Any, pos => 2, hash => Map.new(()), orig => "x2", from => 1))))
jnthn m: grammar G { token TOP { (.) <digit> } }; class A { method TOP($/) { say $/.caps } }; G.parse('x2', :actions(A)) 21:02
camelia (0 => 「x」 digit => 「2」)
21:02 Ven_ joined
jnthn If one of those isn't what you want I need a little more explaining. :-) 21:02
samcv jnthn, gist.github.com/9c08cbff64bb8b21d1...f9e37536f7
i get nothing but an empty list printing out like this
but printing out $/ itself works fine. gisting that is
caps does work though 21:03
jnthn Ah, yes, because <hex> and friends are named captures
That's what I meant by "Positional captures in .list" 21:04
samcv ah kk
jnthn It'll only give those captured like (xxx)
samcv ok i got it. using caps now :)
jnthn Hm, I'm sure I wrote something to parse that file at some point... :) 21:06
samcv yeah we have something to parse the file right now. i'm making it better though :) but yes you have :) 21:07
going to check individual graphemes instead of just the length of the total graphemes now
jnthn yeah, just ofund it
*found it
github.com/perl6/roast/blob/master...est-gen.p6
:)
samcv to make it fully test what the test is testing
i wrote that one you wrote the one before that :) 21:08
haxmeister json module seems to work
samcv in git history somewhere
jnthn And yeah, I was like "wait, how did I get away with such simple parsing code...oh" :D
samcv yeah neither of us did it very complex
tested it 90% which is mostly good enough
unless you have two incorrect in the wrong direction break/nobreaks
unlikely but. 21:09
important to test for
21:09 sufrostico joined
jnthn Yeah, it's nice to have to make sure we're really getting it right :) 21:09
Especially with Unicode 9 21:10
The world was simpler in Unicode ...
*9
gah, 8 :)
samcv heh
the good ol days
jnthn Yeah, the emoji stuff broke the "just examine two codepoints" assumption :/ 21:11
21:12 raschipi left 21:16 kyan joined 21:18 Ven_ left 21:20 Ven joined 21:21 Ven is now known as Guest85403
samcv and prepend 21:21
broke the directional ensurement for state 21:22
maybe didn't use the bset words there
*best
but you get what i mean
i've almost got this :) going to look nice this test 21:23
jnthn samcv++ 21:24
samcv gonna be my best looking one yet
21:25 zakharyas left 21:29 mcmillhj left, Guest85403 left 21:36 perlpilot left 21:45 setty1 left
samcv \o/ success 21:46
21:47 mcmillhj joined
samcv jnthn, might include the test file in roast maybe? it doesn't take very long to process it using a grammar 21:48
jnthn samcv: As in the Unicode test data file itself? 21:50
samcv yeah
jnthn Guess we can...are there any license condiderations? 21:51
*considerations
samcv i will check into that.
jnthn But otherwise, if it's quick enough just to parse and test each case as it comes then may as well do that
21:51 espadrine left 21:52 mcmillhj left
samcv yeah 21:52
just have to make sure to not delete their license information
"this copyright and permission notice appear in associated Documentation." 21:53
so that's fairly simple.
21:57 alimon left, mcmillhj joined 21:58 raiph left 22:01 raiph joined
samcv ok so we have 11 lines that result in failures up from 4 22:01
so yay 22:02
yay failure!
22:02 mcmillhj left, cyphase left 22:05 mcmillhj joined 22:08 ChoHag left 22:10 cyphase joined 22:14 z448 joined 22:17 wamba left, anton_p left 22:35 mcmillhj left 22:39 z448 left 22:42 mcmillhj joined 22:46 mcmillhj left 22:47 BenGoldberg joined 22:58 mcmillhj joined, Cabanossi left 22:59 Cabanossi joined 23:06 mcmillhj left 23:23 cdg left, bpmedley left 23:26 Cabanossi left 23:29 Cabanossi joined 23:36 jcallen_ is now known as jcallen 23:42 giraffe joined 23:44 eliasr left, Cabanossi left 23:49 Cabanossi joined 23:57 cpage_ left