»ö« 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.
mspo that's the chicago boss guy, right? 00:05
00:05 dubi0us_ joined 00:09 _28_ria left
mspo I didn't know about =~= 00:11
00:13 dubi0us_ left
timotimo =~= has more nuance to it than just 1e-15 or what 00:14
00:16 Kyo91_ joined
timotimo you can set $*TOLERANCE and it'll honor that 00:18
00:29 Cabanossi left 00:31 Cabanossi joined 00:35 dubi0us joined
raschipi Dynamic variables are so neat too: 00:39
m: {my $*TOLERANCE = 100;say 0 ≅ 99};say 0 ≅ 99
camelia True
False
00:39 dubi0us left
ckraniak So I have a CStruct and need to pass its pointer to a function. How do I get that pointer? 00:40
timotimo whenever you pass a CStruct to a function it'll be passed by pointer 00:41
time for me to sleep 00:42
ckraniak I feel like I ought to have known that
Thanks
00:43 lookatme joined
lookatme morning 00:46
00:47 BenGoldberg joined 00:52 pierre_ joined, Actualeyes joined 00:53 Kyo91_ left
ckraniak So I know y'all were saying if I wanted to load a function pointer into a CStruct I needed to nativecast to pointer 00:59
Only missing bit now is I don't know how to define a function I can do that with in Perl
Can I tack an "is native" and give it an actual function body and expect it to behave? 01:00
Basically how to define a callback in Perl that C can use, or if that is eve a thing 01:01
01:08 skids joined
lookatme the callback is normal function in Perl 6 declare with sub 01:11
01:12 dubi0us joined
ckraniak With native typed args and / or return? 01:15
lookatme yeah 01:22
01:25 BenGoldberg left
ckraniak Alright, let's give that a shot then 01:25
01:26 dubi0us left 01:28 dubi0us joined
zengargoyle yay TEPC videos. 01:29
lookatme m: use NativeCall; my Buf[uint32] $buf .= new(<6 2 8 4 5>); sub qsort(Buf[uint32], size_t, size_t, & ( Pointer[uint32], Pointer[uint32] --> int32 )) is native(Str) { * }; sub compare(Pointer[uint32] $l, Pointer[uint32] $r) of int32 { return $l.deref > $r.deref; }; qsort($buf, 5, nativesizeof(uint32), &compare); say $buf; 01:32
camelia Buf[uint32]:0x<02 04 05 06 08>
lookatme ckraniak, an example ^^^
void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); 01:33
ckraniak "of int32"? 01:34
01:34 Actualeyes left
lookatme the return type constraint 01:35
same as --> int32, returns int32
ckraniak Ok, I don't think I've seen that flavor before and wanted to make sure 01:36
Thanks, that is great help
lookatme YW 01:37
01:37 cpage_ joined
lookatme I prefer `of`, but seems like in native sub signature callback can not use `of` instead of `-->` style 01:38
AlexDaniel lookatme: perhaps relevant: github.com/perl6/doc/issues/1024 01:40
01:41 Rawriful left
AlexDaniel lookatme: and also github.com/perl6/doc/issues/1027 01:41
lookatme: and then docs.perl6.org/type/Signature#Cons...turn_Types which explains why it may be a good idea to prefer --> 01:42
lookatme AlexDaniel, thanks 01:43
Actually of is the shortest :)
01:44 Cabanossi left 01:45 ilbot3 left 01:46 Cabanossi joined
raschipi zengargoyle: Do you have a link? 01:49
01:51 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:55 pierre_ left 01:56 pierre_ joined 01:59 pierre_ left, pierre_ joined 02:04 cpage left 02:05 noganex joined 02:08 noganex_ left
zengargoyle raschipi: www.youtube.com/watch?v=B5KVLlnxN2...mp;index=4 02:20
it's under 'The Perl Conference' user, it did take me several search tries to actualy find it....
i had to search for 'the european perl conference amsterdam 2017' to actually get close... :) 02:21
raschipi I also did a quick search and didn't find anyhing. They should create a proper channel, Youtube really doesn't like to promote user videos anymore. 02:22
02:27 Khisanth left 02:35 markmont left 02:42 Khisanth joined 02:43 cibs_ is now known as cibs 02:52 pierre_ left
lookatme m: $_ = "light"; say $/ if rx/light/; 02:53
camelia 「light」
lookatme why rx// match against $_ ? 02:54
02:55 sufrosti1o left, sufrostico left
raschipi lookatme: It does that when coerced to a Bool 02:56
lookatme m: $_ = "light"; rx/light/; say $/; 02:57
camelia 「light」
lookatme but in sink context, it still match against $_ 02:58
02:58 pierre_ joined
raschipi yep 02:58
lookatme docs.perl6.org/language/regexes#Le...onventions 02:59
I'm not get it, the document said rx// just a regex object
02:59 pierre_ left
lookatme m: $_ = "light"; say rx/light/; 03:01
camelia rx/light/
zengargoyle i do sorta wish TPC invested a bit in some audio/video/streaming/recording solution thingy that they shipped around to conferences.
03:01 dubi0us left 03:02 dubi0us joined
lookatme :) I wonder we have m// yet. Why let rx// match against in sink context. 03:02
AlexDaniel lookatme: why would you need to sink a regex object otherwise?
lookatme Nothing, I just study tutorial, don't understand this. 03:05
zengargoyle goes HA at 'Laurent Rosenfeld (‎lolo78‎). Functional Programming in Perl 6' talking about MJD's HOP. now i won't have to think about it myself. :P 03:08
03:08 dubi0us left 03:14 Cabanossi left
lookatme m: say "\x{123}" 03:14
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of curlies around escape argument; in Perl 6 please use square brackets
at <tmp>:1
------> 3say "\x{7⏏05123}"
03:15 Cabanossi joined, mr-fooba_ joined 03:16 dubi0us joined, mr-foobar left 03:24 dubi0us left 03:27 dubi0us joined 03:31 dubi0us left, lookatme left 03:32 lookatme joined 03:37 dubi0us joined, khw left 03:43 Cabanossi left 03:45 dubi0us_ joined, dubi0us left, Cabanossi joined 03:49 dubi0us_ left 03:55 dubi0us joined 03:57 khw joined 03:59 dubi0us left 04:02 skids left 04:05 pilne left, dubi0us joined 04:10 dubi0us left, aborazmeh joined, aborazmeh left, aborazmeh joined 04:15 dubi0us joined 04:20 dubi0us left 04:21 piojo9 joined 04:25 dubi0us joined 04:29 xtreak joined 04:33 dubi0us left 04:44 Cabanossi left 04:45 wamba joined, Cabanossi joined 04:46 dubi0us joined 04:50 dubi0us left, khw left 04:53 itaipu joined 04:56 dubi0us joined 05:00 masak joined 05:04 dubi0us left 05:05 xtreak left, dubi0us joined 05:10 dubi0us left 05:16 dubi0us joined 05:18 lowbro joined 05:19 andrzejku joined 05:21 dubi0us left 05:25 dubi0us joined 05:30 dubi0us left 05:36 nadim joined, dubi0us joined 05:38 lookatme left, aborazmeh left, lookatme joined 05:41 dubi0us left 05:46 dubi0us joined 05:50 dubi0us left 05:56 andrzejku left, dubi0us joined 05:58 raschipi left 05:59 lookatme left 06:00 lookatme joined, dubi0us left
lookatme ls /usr/bin -al | perl6 -e '$*IN.Supply(:size<8>).tap(&print);' | more 06:01
Hi, I found a IO problem
When press q quit more command, rakudo complain: `Failed to write bytes to filehandle: Broken pipe` 06:02
06:04 itaipu left 06:05 dubi0us joined 06:06 brrt joined
moritz lookatme: isn't that normal behavior in Linux? 06:08
lookatme I don't think so 06:09
moritz you have a pipe, quit the consumer of the pipe, and the producer gets a SIGPIPE
and the default handler for SIGNPIPE aborts the program
brrt (iff the producer writes to the pipe)
i believe so to
06:09 dubi0us left
nadim morning, I have role X { has $x ; methods ... } now I want to inherit from it so $x is set. something like role Y { method new { $.x = 11 } } but new is not called what is? 06:12
06:13 pierre_ joined
lookatme m: role X { has $x ; }; role Y does role X { method new { nextwith(x => 11); } }; say Y.new; 06:13
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'role'
at <tmp>:1
------> 3role X { has $x ; }; role Y does role7⏏5 X { method new { nextwith(x => 11); } }
nadim is it BUILD, TWEAK?
lookatme m: role X { has $x ; }; role Y does X { method new { nextwith(x => 11); } }; say Y.new;
camelia Y.new
lookatme m: role X { has $.x ; }; role Y does X { method new { nextwith(x => 11); } }; say Y.new;
camelia Y.new(x => 11)
lookatme do you mean this ?
no, BUILD TWEAK are submethod 06:14
nadim trying it ...
gfldex m: role R { has $.x = 42 }; class C does R {}; C.new.x.say
camelia 42
06:15 dubi0us joined
nadim gfldex: I want x to change in the R2 role 06:16
gfldex m: role R { has $.x; submethod BUILD { $!x = 42 } }; class C does R {}; C.new.x.say 06:17
camelia 42
lookatme m: role R { has $.x = 42 }; class C does R { submethod TWEAK { $!x = 42; } }; C.new.x.say 06:18
camelia 42
lookatme m: role R { has $.x; }; class C does R { submethod TWEAK { $!x = 42; } }; C.new.x.say
camelia 42
nadim lookatme: I failed to mention that I do not call new, the roles are passed as arguments
so I do not have the object either, just the roles to tweak 06:19
lookatme m: role R { has $.x; }; role C does R { submethod TWEAK { $!x = 42; } }; C.new.x.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Attribute $!x not declared in role C
at <tmp>:1
------> 3does R { submethod TWEAK { $!x = 42; } }7⏏5; C.new.x.say
expecting any of:
horizontal whitespace
postfix
gfldex there is a COMPOSE phaser but it's not documented (yet)
06:19 dubi0us left
lookatme That's what I faced several month ago, role does not meet $!x in subrole 06:21
nadim gfldex: any idea of it it would work here?
lookatme so I use class replaced it
m: role R { has $.x; }; role C does R { submethod BUILD { $!x = 42; } }; C.new.x.say 06:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Attribute $!x not declared in role C
at <tmp>:1
------> 3does R { submethod BUILD { $!x = 42; } }7⏏5; C.new.x.say
expecting any of:
horizontal whitespace
postfix
nadim hmm, can't tweak a subrole either, no object to play wiht
lookatme and more, you can not use nextwith in TWEAK or BUILD, they are not in inheritance chain
nadim neither does BUILD 06:23
06:25 dubi0us joined
nadim lookatme: how did you work around it? 06:26
lookatme m: role R { has $.x; }; class C does R { submethod BUILD { $!x = 42; } }; C.new.x.say
camelia 42
lookatme use class
nadim can't. the objects are build somewhere else, all I can do is pass roles 06:27
lookatme I'm not get it, what are you trying to do ? 06:28
nadim one of the roles I am passing has $.x; when the object is created I want $.x to be set to, say, 42. 06:30
06:30 dubi0us left
nadim the role, I have, uses $x to display a limited part of a string. if I do not set $.x, the whole string is displayed 06:30
the only way I see is to have a derived role which will set $.x 06:31
remember that I do not have the object, just roles I can pass
06:33 wamba left 06:35 pierre_ left
lookatme but when you hold the role, how you get $.x from it ? 06:36
06:36 andrzejku_ is now known as andrzejku, dubi0us joined
nadim I have two pieces of code. In the first one I had the object so I could $o.x = 42. In the second code I call a sub which contructs a special object that can take roles. 06:38
as a shortcut I copied the whole role but it not very OO
lookatme Hmm, can you show me some code ? 06:43
06:46 dubi0us left, dubi0us joined 06:48 nadim left 06:50 dubi0us left 06:55 brrt left
moritz ok, I'm rebooting hack.p6c.org soon 06:56
06:57 dalek left, [ptc] left, SourceBaby left, synopsebot6 left, Util left, dalek joined, ChanServ sets mode: +v dalek, synopsebot6 joined, ChanServ sets mode: +v synopsebot6 06:58 Cabanossi left 07:00 Cabanossi joined 07:04 ijneb left 07:05 lizmat left 07:06 dubi0us joined, wamba joined 07:10 dubi0us left 07:14 pierre_ joined 07:16 dubi0us joined, xtreak joined 07:20 dubi0us left, nadim joined, xtreak left, brrt joined
TimToady finally back on a network with port 22... 07:22
brrt links www.evanmiller.org/a-review-of-perl-6.html
07:27 dubi0us joined 07:28 wamba left
nadim lookatme: do you want me to golf it or the real code? 07:29
lookatme either will be ok 07:31
07:31 dubi0us left
nadim probably later today, $work is calling :) 07:32
thanks
lookatme ok
07:33 darutoko joined 07:35 dubi0us joined 07:39 dubi0us left 07:43 Cabanossi left, abraxxa joined, lizmat joined 07:44 dubi0us joined 07:45 Cabanossi joined 07:49 dubi0us left 07:51 ChoHag left 07:54 xtreak joined 07:55 dubi0us joined 07:59 dwarring left 08:00 dubi0us left 08:01 jonas1 joined 08:04 Guest69863 joined 08:07 dubi0us joined
piojo9 Is there any particular reason string concatenation doesn't work with junctions? 08:08
p6 my $extensions = '.' ~ any(<txt bat exe>);
p6: my $extensions = '.' ~ any(<txt bat exe>);
camelia ( no output )
brrt no suchr eason
lizmat is working on that
piojo9 p6: 'foo.exe' ~~ ('.' ~ any(<txt bat exe>));
camelia ( no output )
brrt lizmat++ i should say
piojo9 @brrt: thanks, good to know it's intended to work eventually. 08:09
lizmat m: dd '.' ~ any(<txt bat exe>)
camelia any(".txt", ".bat", ".exe")
piojo9 it works for you!
lizmat that part already works in bleed
08:09 g0d355__ left
lizmat piojo9: what version are you on ? 08:09
piojo9 rakudo star 2017-07, windows 08:10
Juerd Personally, I find "any <.txt .bat .exe>" easier to read...
piojo9 I have a lot of extensions in the real code
I want it to fit on the line :P
lookatme buggable: eco HTTP
buggable lookatme, Found 43 results: HTTP::UserAgent, HTTP::Server::Async, HTTP::Server::Tiny, HTTP::Easy, HTTP::Client. See modules.perl6.org/s/HTTP
08:11 dubi0us left
piojo9 lizmat: thanks for your work. 08:11
lizmat piojo9: well, it wasn't fixed in 2017.07, so I'm afraid you will have to wait for 2017.10 * if you want to stick to Rakudo *
piojo9 My home (linux) computer is more flexible. Which branch/version would you recommend for having a good balance of completeness and correctness? 08:12
08:16 dubi0us joined 08:17 rindolf joined
lizmat piojo9: well, eh... bleed ? :-) 08:18
more seriously: using the compiler releases, you are a little bit more certain everything will work
and we expect the 2017.08 release next weekend 08:19
which should give you correct ~ wrt Junctions
piojo9 lizmat: Good to know, thanks
lookatme :) this month is a little later
piojo9 lizmat: If I knew better perl6, I'd be happy to use bleed. But since I don't, I may think the compiler's bugs are my mistakes 08:20
brrt fair enough
08:20 zakharyas joined
brrt unfortuantley, compiler bugs are hardly missing from official releases :-) 08:20
08:23 Guest69863 left
piojo9 brrt: are you voting for a reasonably capable (in general) perl6 newbie to use bleed? :D 08:23
brrt hmmm. i'm not sure what i'm voting for at this point 08:24
yes, but
arguably, it should not be necessary
piojo9 Haha. Just looking for advice on the best environment for learning and fairly simple (100-1000 line) scripting
brrt i don't think we're in the part of the cycle where we have self-sustaining quality checks
i.e. like perl5 has 08:25
we have a test suite, but it's not nearly large enough
08:25 dubi0us left 08:26 pmurias joined
moritz the p5 developers regularly smoke-test most of CPAN with their bleadperl 08:26
because their core test suite alone isn't enough either
brrt that's mostly what i mean, yes 08:27
a heavily-used, mature language can afford that
now rakudo is one hell of a test suite by itself
but it's nowhere near everything
pmurias brrt: rakudo is written in NQP
brrt true 08:28
but for MoarVM that's still quite good
lookatme :) NQP syntax is more functional style
pmurias brrt: re afford that, is running tests for all our modules too expensive for Perl 6? 08:29
brrt: or do you mean that we don't have enough modules to test everything? 08:30
gfldex last time I checked it took about 8h on a not so fast host to test the whole ecosystem 08:31
it seams AMD is making CPUs for us :)
nadim Am I right to assume that a Socket going out of scope will have it's close method called? 08:35
08:36 dubi0us joined
moritz only when the GC collects it 08:37
LEAVE $socket.close if $socket;
lizmat or: 08:40
LEAVE .close with $socket
brrt brrt: more the later than the former
i don't expect that running a cpan smoke test is very cheap for the perl5 hackers
08:43 Cabanossi left 08:44 dubi0us left 08:45 Cabanossi joined, dubi0us joined
nadim Well, it's a very good idea to close it rather than wait for the GC time. little example I had was getting very hacky and slow without. 08:45
thank to both of you for the details
08:49 dubi0us left
lizmat decommute& 08:50
08:50 lizmat left 08:56 dubi0us joined 08:59 brrt left 09:00 dubi0us left, brrt joined 09:01 brrt left 09:05 gregf_ joined 09:06 dubi0us joined 09:10 dubi0us left 09:16 dubi0us joined 09:21 dubi0us left, wamba joined 09:24 brrt joined 09:26 dubi0us_ joined 09:30 dubi0us_ left 09:31 zengargoyle left 09:33 zengargoyle joined 09:34 ufobat joined, TEttinger left 09:35 dubi0us joined 09:40 dubi0us left
lookatme .tell nadim contact me with nick `araraloren` later 09:41
yoleaux lookatme: I'll pass your message to nadim.
09:41 lookatme left
stmuk lizmat: I wouldn't agree that monthly releases are any more likely to work than Rakudo Star 09:43
they are both frequently broken to be frank
09:44 dubi0us joined 09:49 dubi0us left 09:54 ChoHag joined 09:55 dubi0us joined 09:58 rurban joined 10:00 dubi0us left 10:05 ijneb joined, dubi0us joined 10:10 dubi0us left 10:11 xtreak left 10:12 xtreak joined 10:13 pmurias left 10:14 pmurias joined 10:15 lichtkind joined, xtreak left, xtreak joined 10:16 dubi0us joined 10:21 sena_kun joined 10:24 lichtkind left, dubi0us left 10:25 dubi0us joined 10:26 lichtkind joined 10:29 pierre_ left 10:30 dubi0us left 10:34 mr-fooba_ left 10:36 dubi0us joined 10:37 mr-foobar joined 10:43 cpage joined 10:44 dubi0us left 10:47 dubi0us joined 10:48 andreoss joined
andreoss m: role F[::A] {}; role G[::A] does F[A] {}; say G[Int].new.^roles 10:49
camelia ((G[Int]) (F[A]))
andreoss m: role F[::A] { method type { A.WHAT }}; role G[::A] does F[::A] {}; say G[Int].new.^roles[*-1].new.type 10:51
camelia No such method 'gist' for invocant of type 'A'
in block <unit> at <tmp> line 1
andreoss what is A in F[A]?
why it's not F[Int]?
m: role F[$A] { method type { $A.WHAT }}; role G[$A] does F[$A] {}; say G[Int].new.^roles 10:53
camelia ((G[Int]) (F[Mu]))
10:56 dubi0us_ joined, dubi0us left 11:00 dubi0us_ left 11:05 dubi0us joined
moritz m: role F[::A] { method type { A.WHAT }}; role G[::A] does F[::A] {}; say G[Int].new.^roles[0] ~~ G[Int] 11:08
camelia True
moritz m: role F[::A] { method type { A.WHAT }}; role G[::A] does F[::A] {}; say G[Int].new.^roles[0].^name
camelia G[Int]
moritz m: role F[::A] { method type { A.WHAT }}; role G[::A] does F[::A] {}; say G[Int].new.^roles 11:09
camelia ((G[Int]) (F[A]))
moritz m: role F[::A] { method type { A.WHAT }}; role G[::A] does F[::A] {}; say G[Int].new.^roles[1].^name
camelia F[A]
11:09 dubi0us left
moritz m: role F[::A] { method type { A.WHAT }}; role G[::A] does F[::A] {}; say G[Int].new.^roles[1] ~~ F[Int] 11:10
camelia False
11:12 zakharyas left 11:16 dubi0us joined 11:20 Alikzus left 11:21 dubi0us left, Alikzus joined 11:25 andreoss left 11:26 araraloren joined, dubi0us_ joined 11:28 Alikzus left 11:29 Cabanossi left, Alikzus joined 11:30 dubi0us_ left, Cabanossi joined 11:31 dubi0us joined 11:34 xtreak left, brrt left 11:40 markmont joined 11:45 brrt joined 11:49 rurban left, mr-foobar left 11:52 setty1 joined 11:53 dubi0us left 11:54 mr-foobar joined 11:55 dubi0us joined 11:58 Cabanossi left 12:00 dubi0us left, Cabanossi joined 12:04 brrt left, brrt1 joined, nadim left 12:18 dubi0us joined 12:21 pierre_ joined 12:23 dubi0us left 12:27 Cabanossi left 12:28 dubi0us joined 12:30 Cabanossi joined
araraloren Perl 6 's IO performance is 10x slower than Perl 5 12:32
timotimo what code are you timing? 12:33
moritz araraloren: did you measure comparable things? Like actually doing the UTF-8 encoding/decoding in Perl 5 that Perl 6 does by default?
jnthn That's not generally true 'cus I got one quite common case (reading a UTF-8 file line by line) *faster* on Friday :P 12:34
12:35 zakharyas joined
timotimo might have to check whether you've got buffering on the perl6 side or not, because perl5 does buffer 12:35
and the difference between buffered and direct can be huge 12:36
12:36 gregf_ left, dubi0us left
jnthn That too; for file output, then :buffer passed to open can make quite a difference. 12:37
We'll do that by default for non-tty at some point in the near future
araraloren I have one unix format file, how can I improve my program performance: for $file.IO.lines { my @cols = .split("\t"); @db.push([ @cols[0].Int, @cols[1].Int, @cols[2] ]); }
I read file like above
timotimo can you give us a little one-liner that would generate a typical piece of input file at a reasonable size? 12:38
araraloren It's like `<11 number> \t <11 number> \t <4 number>` 12:39
1300012000013000129999022 12:40
timotimo okay so kind of like (10000000000..99999999999).roll(2).join("\t") ~ "\t" ~ (1000..9999).roll
how many lines are you working with?
araraloren It's about thirty thousand line 12:41
sorry
three hundred thousand 12:42
And I have SSD
timotimo how long does it take on your machine?
araraloren 12~13s 12:43
timotimo ok that's good
12:44 araraloren_ joined
timotimo profiling now 12:45
12:46 dubi0us joined
timotimo okay it's spending 36.6% of its time inside split and 16.6% of its time inside the Int method 12:46
araraloren_ jnthn, Hi, I found a IO Pipe problem. When use `morel` look through the result, press q will cause rakudo complain : Failed to write bytes to filehandle: Broken pipe 12:47
12:47 araraloren left
timotimo on my machine it also takes just 10 seconds 12:47
araraloren_ ls /usr/bin -al | perl6 -e '$*IN.Supply(:size<8>).tap(&print)' | more
timotimo there's been a ticket discussing this very issue recently
araraloren_ jnthn, here is the command ^^^ 12:48
OH, you mean the broken pipe ?
jnthn signal(SIGPIPE).tap: { exit(0) }
If you want to silently exit on such things
timotimo interestingly, STORE, i.e. putting the result of .split into the array, takes 20% of the time inside the loop block 12:49
12:50 dubi0us left
araraloren_ ok, seems like add try around it also work 12:50
while(<KK>){my @abc=split "\t",$_; 12:51
push @kk,\@abc;
}
and this is perl 5 code
timotimo using substr three times (since you know the lengths of the numbers up front) reduces it to 7.5 seconds 12:52
12:52 itaipu joined
timotimo you're not numifying the values in the perl5 version? 12:52
without the two .Int i get down to 4.5s 12:53
12:53 ambs joined
araraloren_ timotimo, but I will compare to Int after read over 12:54
timotimo OK 12:55
if your ints are the same lengths every time, maybe doing string comparison is cheaper than intifying
araraloren_ will try it
jnthn Even then, == in Perl 6 will compare them as numerics late 12:56
*later
So there's no particular reason to do the conversion earlier
timotimo except if you keep one side of the comparison the same every time and that's a string that gets intified over and over again :)
jnthn Well, true :)
Then it makes sense :) 12:57
araraloren_ Okay
jnthn Though still changes the cost of the work in the loop we're comparing
timotimo i've had some benchmarks *terribly* slow because they grabbed the "number of times to run" from @*ARGS and it was a string that was being compared to in the main loop a bajillion times
12:59 mcmillhj joined, dubi0us joined 13:01 dubi0us left
araraloren_ Hmm, I take 5s in last version 13:03
13:04 cpage__ joined, cpage left, cpage__ is now known as cpage 13:08 lizmat joined 13:10 dubi0us joined 13:14 dubi0us_ joined, dubi0us left
andrzejku araraloren_, :O 13:15
araraloren_ What's up ?
mspo can someone try using rakudo/tools/install-dist.pl on svg ? 13:16
I am getting Serialization Error: missing static code ref for closure 'BUILD'
13:18 rurban joined, dubi0us_ left, itaipu left, rurban left 13:19 itaipu joined 13:25 perlpilot joined 13:28 bstamour left 13:29 SourceBaby joined, ChanServ sets mode: +v SourceBaby 13:38 MilkmanDan left 13:40 gregf_ joined 13:41 MilkmanDan joined 13:43 cdg joined 13:48 MilkmanDan left, moray` joined, skids joined 13:51 MilkmanDan joined 13:52 ck joined, ck is now known as Guest53883 13:54 ckraniak left 13:56 Guest53883 left 13:58 sufrostico joined 14:03 sufrosti1o joined, piojo9 left 14:10 alimon joined
mspo m: say 3 × 3; say 3 x 3; say 3 xx 3; 14:13
camelia 9
333
(3 3 3)
mspo m: say (3 × 3).WHAT; say (3 x 3).WHAT; say (3 xx 3).WHAT;
camelia (Int)
(Str)
(Seq)
pmurias is there supposed to be a difference between $a .= repeated and $a.=repeated ? 14:14
14:14 Kyo91_ joined 14:16 pierre_ left
araraloren_ pmurias, I think no difference 14:18
14:19 Ven joined, Ven is now known as Guest12884 14:23 brrt1 left 14:24 sufrostico left, sufrosti1o left 14:25 brrt joined
stmuk mspo: appears to work for me 14:27
I have noticed install-dist.pl seems to register a module as installed even if it fails to install BTW
nine: ^^ 14:28
14:28 brrt left, Cabanossi left, itaipu left
mspo stmuk: how did you run it? 14:28
araraloren_ Though I improve read performance of my script, but the whole script still cost 80s. 14:29
stmuk I just did "cd zef", "perl6 ~/.rakudobrew/moar-nom/tools/install-dist.pl " 14:30
without trailing space
araraloren_ And when I use .race, it take 44s
14:30 Cabanossi joined
stmuk it errored first time due to missing XML::Writer 14:30
mspo stmuk: put RAKUDO_RERESOLVE_DEPENDENCIES=0 in there
stmuk and after I installed that I had to --force since it wrongly thought SVG was installed 14:31
araraloren_ But the whole time of Perl 5 only cost 0.9s
Altreus can I do substr(Str, $start) such that it returns the whole string if it is not $start chars long?
araraloren_ yeah you can 14:32
Altreus uh
I mean the empty string
brain fart
Currently it tells me off
"Start argument to substr out of range" it says
araraloren_ empty string ?
stmuk mspo: ok hang on I'm nuking and starting from scratch
Altreus Yeah if the string is not N chars long then I want substr(Str, N) is to be no chars, not an error 14:33
jnthn Altreus: It's probably a Failure, so you can just // '' afterwards
Altreus tak
ilmari m: say substr("foo", 4) // "too short"
camelia too short
araraloren_ m: say substr("foo", 4)
camelia Start argument to substr out of range. Is: 4, should be in 0..3; use *-4 if you want to index relative to the end
in block <unit> at <tmp> line 1
Altreus sweet that worked
I'm learning \o/
araraloren_ Where is the exception ? 14:34
m: say substr("foo", 4) // "too short"
camelia too short
Altreus who said exception?
jnthn araraloren_: It returns a Failure (lazy exception)
If you call .defined it's disarmed
mspo I also wish I understood this error: Serialization Error: missing static code ref for closure 'BUILD'
araraloren_ okay, cool
Altreus I like it more now that I'm aware of it 14:35
mspo the line in question seems to be: submethod BUILD(Str :$!name --> Nil) { from class CompUnit::Repository::Staging is CompUnit::Repository::Installation {
stmuk mspo: I still don't see that error .. what version of rakudo are you using 14:36
mspo: you could try "rm ~/.perl6" maybe? 14:37
mspo stmuk: 2017.07
14:37 andrzejku left
mspo stmuk: no luck 14:38
stmuk: weirdly I get the error, and then calling again results in an "already installed" error :)
14:38 Guest12884 is now known as Ven``
mspo stmuk: that didn't help 14:38
stmuk yes there is a bug where an install failure leads to it appearing installed 14:39
but I can't reproduce your main issue on linux
mspo okay 14:40
14:40 itaipu joined
mspo stmuk: it's strange because some packages work (xml-writer, oo-monitors) 14:40
stmuk: but the two svg and svg-plot give that error
pmurias rakudo-j is broken in the eval bot? 14:41
j: say('hello')
camelia java.nio.file.NoSuchFileException: /nqp/lib/Perl6/BOOTSTRAP.jar
in <anon> (gen/jvm/ModuleLoader.nqp:92)
in load_module (gen/jvm/ModuleLoader.nqp:79)
in <anon> (gen/jvm/CORE.setting)
in <anon> (gen/jvm/ModuleLoader.nqp:257)
in load_sett…
14:42 Petit_Dejeuner joined
araraloren_ j: say 13; 14:43
camelia java.nio.file.NoSuchFileException: /nqp/lib/Perl6/BOOTSTRAP.jar
in <anon> (gen/jvm/ModuleLoader.nqp:92)
in load_module (gen/jvm/ModuleLoader.nqp:79)
in <anon> (gen/jvm/CORE.setting)
in <anon> (gen/jvm/ModuleLoader.nqp:257)
in load_sett…
Petit_Dejeuner m: say map({ &^func($^arg) }, ({$_ + 1}, {$_ + 1}, {$_ + 1}), (2, 2, 2))
camelia Type check failed in binding to parameter '&func'; expected Callable but got List ($(2, 2, 2))
in block <unit> at <tmp> line 1
Petit_Dejeuner I'm confused, shouldn't this map over both list arguments in parallel? 14:44
14:44 rurban1 joined
stmuk mspo: are you passing any parameters to install-dist.pl ? 14:45
14:46 rurban1 left
mspo stmuk: -for=site 14:46
oh and -to= 14:47
maybe I can work backwards: what is that error saying? 14:48
stmuk try it without params just cd'd into that dir
it defaults to site anyway 14:49
mspo without a -to I get non-writable path
I'll just chmod
14:49 brrt joined 14:50 brrt left, brrt joined, brrt left 14:51 lowbro left
mspo stmuk: that time it ran without error :( 14:51
okay!
that's progress 14:52
stmuk it uses multi-dispach so maybe its calling the wrong method? 14:53
14:53 cdg_ joined 14:56 cdg left
mspo stmuk: it must not be able to resolve some kind of compunit dependency when attempting to install into the DESTDIR 15:00
15:02 raschipi joined
mspo stmuk: trying to reproduce it inside of vendor instead of site and now I get the is a directory, cannot do '.open' on a directory stuff 15:07
anyway I need to work on my job and stop messing around with this for a while
I'm sure nine will yell at me later for trying to use command line args or something
stmuk its clearly a bit buggy!
:)
araraloren_ Petit_Dejeuner, map only accept one list
m: say map({ .[0].(.[1]) }, [({$_ + 1}, {$_ + 1}, {$_ + 1}) Z, (2, 2, 2)]) 15:08
camelia (3 3 3)
mspo stmuk: let's start by calling it opaque
stmuk: not sure how long error messages referencing files named "734095A335B8660A6977EBFBDD61726CFADC4BCC" is going to fly for general use :) 15:09
15:09 brrt joined
stmuk there were some docs in the git log of the original import 15:09
15:10 zakharyas left 15:11 sufrostico joined
mspo stmuk: there are also some conflicting signals. nine claims installs-dist.pl is *the* way for packagers and friends 15:12
stmuk: but rakudo-star itself uses zef and zef also uses zef
Petit_Dejeuner m: map({$^a + $^b), (1, 2, 3), (4, 5, 6)) 15:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3map({$^a + $^b7⏏5), (1, 2, 3), (4, 5, 6))
expecting any of:
statement end
statement modifier
statement modifier loop
Petit_Dejeuner araraloren_: Thanks. I got confused because somehow my multiple list arguments were getting joined before being passed to map somehow. 15:17
15:17 stmuk_ joined
stmuk_ ping 15:17
mspo: I had a quick look at install-dist.pl for R* but it didn't run tests or display any information about what it was installing
15:17 sufrostico left 15:18 stmuk left
stmuk_ mspo: I think its more suitable for actual binary packaging than user facing builds 15:18
15:19 [Coke] joined
[Coke] . 15:19
15:20 brrt left
mspo stmuk_: yeah it seems fine, just difficult to debug 15:20
for me, anyway
15:21 andrzejku joined
stmuk_ yeah I agree 15:21
mspo I'm a little afraid that if everyone else, including lib developers, are just using zef all the time otherwise 15:22
install-dist.pl might always be playing catch up or drifting out of sync
but I probably don't understand that they're both just front-ends to Comp Unit stuff 15:23
ugexe lib developers shouldnt be using install-dist.pl
install-dist.pl is essentially a convience to writing a 1 liner to do the same thing since all the class names are so long. everything is just using CompUnit stuff to get the job done, there is nothing to catch up to 15:25
stmuk_ does anything actually use it?
mspo one suse package
I put about 5 things into pkgsrc-wip this weekend 15:26
but only a few work for me, which is why I'm talking about this now :)
stmuk_ great! I'll have a look 15:27
mspo install-dist.pl has two common errors that I've seen, and seem to also exist in google's history: the BUILD closure thing and the .open directory thing
15:27 Cabanossi left
mspo stmuk_: they're just the first few things from star's module list 15:27
ugexe you are trying to install things without resolving their build orde? 15:28
mspo xml-writer, svg, svg-plot, Term-ANSIColor
ugexe or handle build.pm?
mspo ugexe: I am installing in the order star uses
what is build.pm
stmuk_ the star build order should work 15:29
perl6/doc uses Build.pm :/ I wonder if install-dist.pl works with that
ugexe no 15:30
15:30 Cabanossi joined
stmuk_ the requirements of the web site building code have made perl6/doc a lot harder to package the docs 15:31
the pod6 should be really be in an other repo IMO
mspo so Serialization Error: missing static code ref for closure 'BUILD' probably means that it's not finding CompUnit::Repository::Installation 15:32
right?
ugexe its probably trivial for us to install it if it was described in the meta6.json sufficiently 15:33
15:33 aindilis left, aindilis` joined
stmuk_ is there any support in META6.json for different build targets to install a subset for example? 15:34
where is design.perl6.org/S22.html? 15:36
15:38 wamba left
AlexDaniel stmuk_: oops, design docs seem to be down. You can use this: raw.githubusercontent.com/perl6/sp...format.pod 15:38
stmuk_ thanks 15:39
AlexDaniel hmm I wonder who can fix that
moritz: ↑ ?
ugexe subsets should probably use different distributions. otherwise you run into issues regarding reproducability, checksums, etc 15:41
stmuk_ yeah 15:42
and S22 doesn't consider docs anyway
15:45 araraloren_ left
ugexe right but it could be added to CURI fairly easily if someone thought up of a sufficient way to describe it in meta6.json 15:51
.pod files are easy enough, but embeded pod would take a little thought
then p6doc doesn't have to keep things in sync anymore and can focus on other stuff 15:54
15:54 mcmillhj left
ugexe you also get to punt the "which version/auth should i load?" to the CUR (like bin/ scripts) 15:55
15:58 abraxxa left 16:01 zakharyas joined 16:03 koto joined 16:04 andreoss joined 16:05 sena_kun left, mcmillhj joined 16:08 cdg_ left 16:10 mcmillhj left 16:18 mcmillhj joined 16:24 mcmillhj left 16:27 konsolebox left 16:30 khw joined, dubi0us joined 16:35 dubi0us left, koto left 16:36 ufobat left 16:37 Geth left, bisectable6 left, unicodable6 left, benchable6 left, committable6 left, bloatable6 left, coverable6 left, evalable6 left, quotable6 left, greppable6 left 16:38 mcmillhj joined 16:41 konsolebox joined, zakharyas left 16:43 mcmillhj left 16:44 Ven`` left 16:46 mcmillhj joined 16:47 dubi0us joined 16:51 mr-fooba_ joined 16:52 mr-foobar left 16:55 gregf_ left 16:56 setty1 left 17:00 Kyo91 joined 17:01 wamba joined 17:02 Kyo91_ left 17:21 jonas1 left
AlexDaniel nine: hm, Geth is down? 17:28
17:31 moray` left, st_elmo joined 17:39 Rawriful joined 17:47 Geth joined
nine AlexDaniel: fixed. Thanks for pointing it out :) 17:48
mscha m: say 0.1e0 + 0.2e0 == 0.3e0; say 1e-1 + 2e-1 == 3e-1
camelia False
False
mscha m: say 0.1e0 + 0.2e0 == 0.3e0;
camelia False
mscha m: say 1e-1 + 2e-1 == 3e-1
camelia True
mscha Huh?
Why is the last one suddenly True? It was False just 2 statements earlier. 17:49
17:51 coverable6 joined, bloatable6 joined, committable6 joined, quotable6 joined, evalable6 joined, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v bloatable6, ChanServ sets mode: +v committable6, ChanServ sets mode: +v quotable6, ChanServ sets mode: +v evalable6, bisectable6 joined, unicodable6 joined, greppable6 joined, benchable6 joined, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v benchable6
timotimo m: use NativeCall; nativecast(0.1e0, int64).base(16).say; nativecast(1e-1, int64).base(16).say 17:52
camelia Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6int (int64)
in sub nativecast at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 497…
timotimo m: use NativeCall; nativecast(int64, 0.1e0).base(16).say; nativecast(int64, 1e-1).base(16).say
camelia Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque (Num)
in sub nativecast at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 497…
timotimo we don't do that?
m: use NativeCall; nativecast(CArray[int64], CArray[num64].new(0.1e0))[0].base(16).say; nativecast(CArray[int64], CArray[num64].new(1e-1))[0].base(16).say 17:53
camelia 3FB999999999999A
3FB999999999999A
timotimo m: use NativeCall; nativecast(CArray[int64], CArray[num64].new(0.2e0))[0].base(16).say; nativecast(CArray[int64], CArray[num64].new(2e-1))[0].base(16).say
camelia 3FC999999999999A
3FC999999999999A
timotimo m: use NativeCall; nativecast(CArray[int64], CArray[num64].new(0.3e0))[0].base(16).say; nativecast(CArray[int64], CArray[num64].new(3e-1))[0].base(16).say
camelia 3FD3333333333333
3FD3333333333333
timotimo hmm 17:54
m: use NativeCall; nativecast(CArray[int64], CArray[num64].new(0.1e0 + 0.2e0))[0].base(16).say; nativecast(CArray[int64], CArray[num64].new(1e-1 + 2e-1))[0].base(16).say
camelia 3FD3333333333334
3FD3333333333334
timotimo oh 17:55
isn't this about non-commutativeness of floating point math or something?
Geth ecosystem/master: 5 commits pushed by (André Brás)++, (Andre Bras)++, (Juan Julián Merelo Guervós)++
ugexe if it was i wouldnt expect it to provide two different outcomes 17:56
timotimo i know we've addressed this on channel before
17:57 nhywyll joined
timotimo m: say 0.1e0 - 1e-1 17:57
camelia 0
timotimo evanm actually brought it up on channel 17:59
17:59 Cabanossi left 18:00 Cabanossi joined
ugexe m: say 1e-1 + 2e-1 == 3e-1; say 0.1e0 + 0.2e0 == 0.3e0; say 1e-1 + 2e-1 == 3e-1 18:00
camelia True
True
True
ugexe m: say 0.1e0 + 0.2e0 == 0.3e0; say 1e-1 + 2e-1 == 3e-1
camelia False
False
ugexe knowing nothing about how any of this works, it seems like a tolerance gets changed unexpectedly 18:02
timotimo aha, zoffix found it out 18:03
gist.github.com/zoffixznet/46ae8dd...f60f82a179
but then why did i get the same bit representation up there ... 18:04
m: use NativeCall; nativecast(CArray[int64], CArray[num64].new(0.1e0 + 0.2e0 - 0.3e0))[0].base(16).say; nativecast(CArray[int64], CArray[num64].new(1e-1 + 2e-1 - 3e-1))[0].base(16).say 18:06
camelia 3C90000000000000
3C90000000000000
timotimo m: use NativeCall; nativecast(CArray[int64], CArray[num64].new(0.1e0 + 0.2e0 - 0.3e0))[0].base(16).say; nativecast(CArray[int64], CArray[num64].new(1e-1 + 2e-1 - 3e-1))[0].base(16).say; say 1e-1 + 2e-1 - 3e-1 == 0.1e0 + 0.2e0 - 0.3e0 18:07
camelia 3C90000000000000
3C90000000000000
True
timotimo m: say 1e-1 + 2e-1 - 3e-1 == 0.1e0 + 0.2e0 - 0.3e0
camelia True
timotimo hm? 18:08
18:13 Zoffix joined
Zoffix timotimo: once it gets parsed written in one style, the other style will just used cached version. 18:14
That's the bigger problem with the issue: a pure statement's value can change depending on what type of code got parsed earlier in the program.
timotimo oooh 18:15
so that's why
hm, but how does it figure out those two should be the same num value? they aren't string-equal, and they're also not going to be numerically equal? 18:16
18:16 dubi0us left
Zoffix Don't know. I never investigated it. 18:16
Well, actually, I don't know if it's actually using the cached value; that's just the apparent effect and earlier parse affects later values of unrelated statements 18:17
18:18 nadim joined
timotimo super weird, no doubt 18:18
18:18 Petit_Dejeuner left
raschipi timotimo: the expoent is a signed number, so the string representation can be turned into the float in multiple ways. Compare mantissa 0.1 with exponent 0 with mantissa 1 with exponent -1. So that might be where the differences come from. 18:21
18:25 dubi0us_ joined 18:33 dubi0us_ left, dubi0us joined 18:35 mr-foobar joined 18:37 mr-fooba_ left 18:45 Zoffix left 18:49 mcmillhj left 18:50 mcmillhj joined 18:52 dubi0us left 18:57 dubi0us joined 18:58 mr-foobar left, ckraniak joined, Cabanossi left 18:59 espadrine joined 19:00 dubi0us left, mr-foobar joined, dubi0us joined, Cabanossi joined
ckraniak Where is $*DISTRO.version getting its info from? 19:04
19:05 dubi0us left
ckraniak I am on Win 7 (6.1) and it returns 6.3 and am not sure if it's failing to report OS properly or if it is doing something else 19:06
andrzejku hey people 19:07
geekosaur ckraniak, it could be using build time info
that said, windows complicates things with e.g. 32 bit bins on a 64 bit system running in a VM which may be booting a different version :/ 19:08
moritz and that the internal and the marketing versions also often disagree 19:09
andrzejku do you think it have a sence to write another HTTP Perl6 server?:P
ckraniak Build version is what I was thinking
moritz andrzejku: if it supports HTTP/2, sure
ckraniak Although I had the impression $*DISTRO was meant for runtime checking 19:10
geekosaur arguably $*DISTRO should be runtime and $?DISTRO should be build time, or something like that
lizmat on Win, it gets the version information from $*VM.config<osvers>
raschipi ckraniak: It's reporting the NT version, which is 6.1
andrzejku moritz, that was a plan
moritz, however we and my friend we think more about 19:11
raschipi Source: en.wikipedia.org/wiki/History_of_M...er_2008_R2
ckraniak raschipi: it is reporting 6.3 though
19:11 TEttinger joined
geekosaur on theone hand that's arguably an abuse of the $? sigil, on the other it does make the point that the $? one is from a different context (just, the wrong "build tme" :) 19:11
andrzejku moritz, Perl6 server which will share wasm perl6 interpreter which should interpret perl6 code and qml frontend
do you think it is good idea?
raschipi I think service packs upgrade that number. 19:12
ckraniak Shouldn't
VerifyVersionInfo documentation / invocation explicitly separates service pack info
raschipi For example, for me it returns 4.9.0, which is my kernel release. It should do something similar on windows.
19:13 dubi0us_ joined, dubi0us_ left, dubi0us_ joined
moritz andrzejku: I only understand half of what you wrote :-) 19:14
andrzejku moritz, HTTP server -> share web assembler Perl6 interpreter -> then we feed on request Perl6 code with QML -> and user see an application 19:15
19:16 nightfrog left 19:17 dubi0us joined, dubi0us_ left 19:19 darutoko left 19:20 nightfrog joined 19:21 dubi0us left 19:22 alexshendi joined
moritz andrzejku: ah, you want to write more than a HTTP server :-) 19:22
andrzejku yeah
but I am not sure if it is possible
19:23 itaipu left
moritz it's possible, but quite some work 19:23
andrzejku ohh ;-) 19:24
mspo step 2 sounds like a lot of work
masak meh, step 2 is always just '???' :P 19:25
yoleaux 12 Aug 2017 22:45Z <raschipi> masak: In your 007 macro experiments, is it possible to get the parse tree macros get like one would use Perl6::Parse for (in Perl6 instead of 007)? I mean, since it has to be able to hand parse trees to macros, is there an interface that makes it possible to get the same when parsing a string?
raschipi masak: my question was already answered, thanks.
masak raschipi: what was the answer? :)
raschipi That it's already possible to get it trough nqp. 19:26
masak ah, nice
though note that that would be NQP nodes, not Qtrees
raschipi Right. And do you have plans to make the later available?
masak raschipi: I think there's a 007 issue (still open) about the ability to go from string to Qtree. any such mechanism would be unhygienic, but it might still be useful sometimes. 19:27
in many cases you're better off combining quasis and synthetic nodes in some way
19:28 dubi0us joined, Cabanossi left
sjn \o 19:29
masak o/
sjn just found that the "I'm feeling lucky" button on modules.perl6.org doesn't work 19:30
e.g. enter "git config", try the button, and get a 404
19:30 Cabanossi joined
nadim Zoffix is the man to talk to I believe 19:32
yoleaux 09:41Z <lookatme> nadim: contact me with nick `araraloren` later
raschipi sjn: It's because you're out of luck.
19:32 dubi0us left
nadim hehe 19:32
19:33 cognominal joined
andreoss m: class f { method g {...}} ; role A is f {}; role B is f {}; class C does A does B {}; 19:33
camelia 5===SORRY!5=== Error while compiling <tmp>
Package '<anon>' already has parent 'f'
at <tmp>:1
raschipi sjn: I agree that the error message is less than awesome, but try to write a name of a module you know exist there.
nadim I get "No such symbol 'Data::Dump::Tree::CursesFoldable'", the line that causes it looks like "require Data::Dump::Tree::CursesFoldable <&some_sub>", the module and the sub exist, I have an example that uses the module and calls the eported sub. what can it be? 19:36
19:37 dubi0us joined
nadim it's not "file not found" but Symbol not found 19:37
moritz nadim: is there a package Data::Dump::Tree::CursesFoldable in the file Data/Dump/Tree/CursesFoldable.pm6? 19:40
andreoss m: role f { method g {...}} ; role A does f {}; role B does f {}; class C does A does B { method g { 1 } };
camelia ( no output )
19:41 dubi0us left
nadim moritz: in lib/Data/Dump/Tree/CursesFoldable.pm not pm6 19:42
19:45 dubi0us joined 19:47 ChoHag left
nadim moritz: changing the extension to pm6 changed nothing 19:48
moritz nadim: can you verify with strace or similar tools that it actually reads the file? 19:49
or set RAKUDO_MODULE_DEBUG=1 19:50
19:51 lspaans joined 19:52 mr-foobar left
andreoss is there some example for cathegory theory stuff done in Perl 6? 19:52
19:53 dubi0us left 19:54 ChoHag joined, lspaans left 19:55 alexshendi left 19:56 dubi0us joined
raschipi andreoss: P6 has a run-time gradual type system with all types being maybe types. 19:56
19:57 Cabanossi left
Geth whateverable: 5d7445b1bd | (Aleks-Daniel Jakimenko-Aleksejev)++ | 3 files
New bot: Releasable (with tests)

Automatically detects release dates, commits that were logged, etc. Also, prints warnings if something is not quite right.
Technically, “changelogable” would be more precise (given that the bot does not make releases itself), but “releasable” is easier to remember. ... (48 more lines)
19:58
raschipi Moar bots!
20:00 dubi0us left, Cabanossi joined
andreoss i don't think it qualifies 20:00
in this way Perl 5 undef's sort of Maybe as well 20:01
20:02 andrzejku left
raschipi andreoss: You don't think Perl6 types are maybe types? Any typed variable can also hold a failure, which is undefined but it's not just undef. 20:02
And the Failure is transmitted forward... It's meant to fit the theory at least. 20:03
20:03 andrzejku joined
b2gills en.wikipedia.org/wiki/Option_type#Perl_6 20:05
20:06 dubi0us joined
moritz not all types, fwiw 20:06
there are also native types, and :D types
nadim moritz: the trace nopaste.linux-dev.org/?1160729 20:07
andreoss paste.debian.net/981351/ 20:08
i'm more curious about type classes though
CT would be much easier with them 20:09
20:09 releasable6 joined, ChanServ sets mode: +v releasable6
nadim moritz: wrong trace sorry, let me re run this 20:10
andreoss I feel there's something wrong with using augmented classes for that
AlexDaniel actually, another bot kaboom to get the latest nqp/moar bump… 20:11
20:11 bisectable6 left, unicodable6 left, benchable6 left, committable6 left, bloatable6 left, coverable6 left, evalable6 left, releasable6 left, quotable6 left, greppable6 left
nadim moritz: here it is nopaste.linux-dev.org/?1160730 20:13
20:13 cdg joined 20:16 dubi0us left 20:21 dubi0us joined
andreoss raschipi: they could be called maybes but not in a Haskell manner 20:22
you can't .map :U types for example
20:23 dubi0us_ joined
raschipi Of course you can: 20:24
m: Any.map(*.say)
camelia (Any)
nadim you can!
oops, too slow
andreoss m: Int.map(* + 1).say
camelia Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'. Did you forget a '.new'?
in block <unit> at <tmp> line 1
20:25 dubi0us left
andreoss should be Int 20:25
raschipi m: Int.new.map(* + 1).say
camelia (1)
andreoss Int.map(* + 1) should be Int accoring to the monoid laws 20:27
if Int is a None type 20:28
raschipi It's the + operator that requires defined arguments, it's not inherent in the type system.
andreoss + should be called in the case of monoid 20:29
raschipi And what operators do with the types is language specific. The type system itself has maybe/option types.
20:30 captain-adequate joined
andreoss no, i'm wrong 20:30
raschipi Perl6 and Haskell were developed side by side, but they disagree on what should happen when specific incantations are called. Both fit the mathematical type model, though. 20:31
20:32 markmont left 20:33 dubi0us_ left
andreoss ADT and type classes would be a nice thing to have though 20:33
raschipi We do have something that implements the mathematical model called "ADT", they are called "modules". 20:37
The mathematical model called "Type Classes" are implemented in "Type Variables". 20:40
andreoss can you give an example? 20:41
raschipi m: sub foo(::T $x) {say "Got a " ~ T.^name; }; foo(4.2); foo("OH HAI");
camelia Got a Rat
Got a Str
raschipi m: sub foo(::T $x, T $y) { }; foo("OH HAI", "KPLZTHNXBYE"); foo("OH HAI", 42) 20:42
camelia Type check failed in binding to parameter '$y'; expected Str but got Int (42)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
geekosaur I find that statement a bit weird --- starting with, typeclasses are not part of a mathematical model. they're a convenience/syntax sugar 20:43
and at type level they are *constraints* on type variables
20:44 rindolf left
raschipi Haskeel doesn't implement anyhing without making a mathematical model for it first, apparently. So, the term refers to both the Haskell implementation and the mathematical model assossiated with it. 20:45
geekosaur if only
Foldable doesnt have a mathematical model 20:46
20:46 dubi0us joined
geekosaur Num *certainly* doesn;t 20:46
20:46 Xal joined 20:47 pmurias left
raschipi Well, in the case of Ad Hoc Polymorphism, they did require a Mathematical model. 20:47
20:48 pmurias joined 20:50 dubi0us left 20:51 dubi0us joined
Geth whateverable: 377826e017 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Always list unreviewed commits

Even if the changelog for this release was not started yet.
20:52
20:53 committable6 joined, evalable6 joined, bloatable6 joined, ChanServ sets mode: +v committable6, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v bloatable6, releasable6 joined, greppable6 joined, unicodable6 joined, coverable6 joined, quotable6 joined, benchable6 joined, ChanServ sets mode: +v releasable6, bisectable6 joined, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v quotable6, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v bisectable6
raschipi .botsnack 20:53
synopsebot6 om nom nom
yoleaux :D
AlexDaniel raschipi: let's not implemented that on all 11 whateverables… 20:54
raschipi Moar botexplosions!
20:55 dubi0us left 21:00 markmont joined, dubi0us joined 21:03 cognominal left, wamba left, skids left, mcmillhj left
nadim Anyone else having an idea why requireing a module generates a "No such symbole" error? the trace nopaste.linux-dev.org/?1160729 21:03
21:04 mcmillhj joined, dubi0us left 21:05 st_elmo left 21:06 mscha left, rindolf joined 21:07 mack[m] left, M-Illandan left, rindolf left, wamba joined, xui_nya[m] left, ilmari[m] left, unclechu left 21:08 rindolf joined, wictory[m] left, mienaikage left, Matthew[m] left, tadzik left, CIAvash[m] left
raschipi andreoss: Do you see my point about the mathematics behind it leading to different implementations and that bot Perl6 and Haskell follow the models? 21:08
21:08 mcmillhj left
andrzejku fpaste freeze :/ 21:10
21:11 Aaronepower left, ribasushi left
andreoss raschipi: yes, have you seen my code? 21:11
21:11 tyil[m] left
raschipi Sorry, my wife just called. I gotta go. 21:12
21:12 raschipi left
andrzejku oh lol 21:14
paste.fedoraproject.org/paste/zLTu...ZT4H~iy~w/
It just don't print y/n
on console
shit 21:15
wrong channel
21:16 dubi0us joined 21:20 dubi0us left 21:25 S007 left 21:26 dubi0us joined 21:28 S007 joined 21:30 notostraca joined, S007 left, S007 joined, dubi0us left 21:32 Sgeo left 21:33 TEttinger left 21:35 dubi0us joined 21:39 tadzik joined, dubi0us left 21:40 dubi0us joined 21:42 dubi0us left, ribasushi joined 21:44 andrzejku left, Cabanossi left 21:45 Cabanossi joined 21:47 dubi0us joined 21:48 rindolf left 21:51 dubi0us_ joined, dubi0us left 21:55 dubi0us_ left 21:59 lowbro joined, lowbro left, lowbro joined 22:02 Matthew[m] joined, ilmari[m] joined, mack[m] joined, M-Illandan joined, tyil[m] joined, unclechu joined, wictory[m] joined, CIAvash[m] joined, mienaikage joined, xui_nya[m] joined, dubi0us joined 22:04 huf left 22:05 Kyo91 left
Geth whateverable: baeaf8b3dd | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/coverable.t
Revert "Everyone loves performance improvements!"

This reverts commit f2d1d8c13e673da1080216873a70467062f8668f.
22:06
whateverable: a6595f172c | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/bisectable.t
Revert "Everyone loves performance improvements! №2"

This reverts commit be9c01a870b6ee945e0c33349e9eb8925aca76e9.
22:06 Sgeo joined, dubi0us left 22:09 wamba left 22:11 wamba joined 22:13 dubi0us joined 22:17 dubi0us left 22:18 cognominal joined
brimonk Is there a reason that references don't really exist in perl6? 22:21
Maybe they do, and I'm still figuring the language out.
But they don't seem to exist. 22:22
nadim almosr everything is a refrence, so you don't need "reference" that's how things are
brimonk nadim: The syntax has just gotten easier to use then? 22:23
nadim I think it was easy before. IMO just forget about before, take it as it is now
22:23 dubi0us joined
andreoss can a has-scoped variable be exposed to other roles but not to a client? 22:24
m: role Foo { has $!a = 1 }; role Goo does Foo { method foo {$!a }} ; Goo.new.foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Attribute $!a not declared in role Goo
at <tmp>:1
------> 3 role Goo does Foo { method foo {$!a }}7⏏5 ; Goo.new.foo
expecting any of:
horizontal whitespace
postfix
nadim andreoss: yes, if you mean something like friend in c++ 22:25
but I forgot the name.
:)
22:27 lowbro left
lizmat trusts ? 22:27
22:28 dubi0us left
lizmat docs.perl6.org/routine/trusts 22:28
not sure how that works with roles though
22:28 dubi0us joined
nadim lizmat: thank you for covering for my memory loss :) 22:28
lizmat not sure it's the right answer though 22:29
brimonk How do I define a variable in a class to be of a certain type? 22:30
nadim trusting a role seems wrong altogether, as trusting to other roles. what does it mean altogether.
brimonk: has TYPE $var ; 22:31
brimonk Thanks! 22:32
22:32 dwarring joined, dubi0us left
andreoss m: role T { trusts Any }; 22:32
camelia 5===SORRY!5=== Error while compiling <tmp>
No such method 'add_trustee' for invocant of type 'Perl6::Metamodel::ParametricRoleHOW'
at <tmp>:1
lizmat could someone make a doc issue about "react" not being findable ?
nadim lizmat Any idea why requireing a module generates a "No such symbole" error? the trace nopaste.linux-dev.org/?1160729 22:33
lizmat nadim: sadly no: atm I'm trying to finish the P6W and then get some sleep :-) 22:34
nadim lizmat: the interesting thing is that none of my module work when required but Term::ANSIColor does.
lizmat: Good night :)
brimonk Is there a way to start up the p6 interpreter and execute scripts from within it? 22:38
22:38 dubi0us joined
nadim from within it? 22:41
22:41 espadrine left
nadim inside your code you want to run other code that is in other files? 22:42
22:42 dubi0us left 22:43 alimon left
nadim docs.perl6.org/routine/EVAL 22:43
brimonk Can anyone help me figure out why I can't install DBIish? termbin.com/u6v1 22:45
22:47 raschipi joined 22:50 dubi0us joined, skids joined
nadim brimonk: github.com/salortiz/NativeHelpers-Blob/issues/2 there other known issues with that module 22:50
raschipi lizmat: github.com/perl6/doc/issues/1449 Done 22:51
brimonk So, I guess I should just rebuild my version of rakudo? 22:52
I can try that.
22:52 nhywyll left
nadim it's pretty easy, clone the repo, follow the instruction, takes 3 mn to build 22:52
El_Che Can CompUnit::Repository give me more than the name of a loaded module and optionaly a version if specified? I am playing with niner.name/talks/A%20look%20behind%...cker.html, and so far as I can see with the precomp thing, the best I can do to do a portable package of the loaded modules is to ship the precomp 22:53
directory with the module source somewhere if the user got a new rakudo version?
brimonk nadim: I've done it before, just making sure that I understood is all.
The parse test is what takes the longest.
nadim doesn't matter what takes the longest, you have to do it anyway 22:54
22:54 dubi0us left
nadim start the build, do something else in the meantime 22:54
andreoss what does Int<141341> returned by .gist mean?
brimonk nadim: It died again. 22:55
Wait, 22:56
El_Che I see the travis build for perl6 uses rakudobrew and takes ages to run? Is there interest in using my linux packages so the images run way faster? Or is the choice for rakudobrew by design?
22:57 mcmillhj joined
lizmat El_Che: not by design, afaik :-) 22:57
22:59 wamba left
raschipi El_Che: The docs have a bug report about taking too long to run, for example. 22:59
23:00 dubi0us joined, pmurias left
ckraniak Can one re-export the stuff imported from a sub-module? 23:00
Without manually doing it all anyway
23:02 wamba joined, mcmillhj left
lizmat and another issue of the Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/08/14/...in-review/ 23:02
brimonk nadim: It still dies, even with the latest version of stable.
Unless it's my version of zef that causes it to be dying. 23:03
raschipi lizmat++
El_Che raschipi: using debs for rakudo the base setup would takes us from dozens of minutes to seconds 23:05
raschipi El_Che: They can't even upgrade from ubuntu 12.04.
El_Che raschipi: they? I see more recent versions here docs.travis-ci.com/user/reference/overview/ 23:08
23:08 dubi0us left
El_Che raschipi: and whatever ubuntu version travis support, I am willing to create debs automatically for them 23:09
23:09 dubi0us joined
raschipi There are debs, ryu0 has a PPA. 23:10
El_Che even better
brimonk Here's the problem, I think it's unchanged: termbin.com/nhvo 23:11
El_Che my monthly ubuntu debs are for 16.04 and 17.04 (EOL'ed 16.10)
brimonk And I did a fresh build of rakudo.
El_Che lizmat: thx for the weekly!
23:13 dubi0us left
AlexDaniel Uzu looks so promising 23:14
23:18 dubi0us joined
El_Che nine: great talk btw about the module loading internals 23:20
23:22 dubi0us left 23:25 pierre_ joined 23:29 Cabanossi left, dubi0us joined 23:30 Cabanossi joined 23:31 pierre_ left 23:33 dubi0us left 23:34 wamba left 23:39 dubi0us joined
Juerd Things became slower. The MQTT::Client unit tests now take 10 seconds, used to take 7. 23:44
Maybe I'll bisect that later 23:45
brimonk Anyone have any thoughts as to why I can't install DBIish? termbin.com/nhvo 23:46
23:47 dubi0us left
AlexDaniel Juerd: if you have a short-enough snippet, we can try bisecting it with a bot 23:48
Juerd: also, what rakudo version are you using?
23:49 dubi0us joined
AlexDaniel Juerd: there was a Moar/NQP bump 5 hours ago which fixed a memory leak (which was eventually causing things to slow down) 23:49
23:51 ribasushi left, lizmat left, john51 left, ryu0 left, ranguard left, sjn left, jeek left, basket` left, tony-o left, pierrot left, jsimonet left, gabiruh left, joy left, plicease left, ponbiki left, lumimies left, Spot__ left, domm left, musca left, raydiak_ left, tomaw left, MilkmanDan left, CIAvash[m] left, wictory[m] left, nightfrog left, cpage left, ambs left, lucs left, nowan left, shadowpaste left, go|dfish left, TimToady left, APic left, stux|RC-only left, smash left, mattp_ left, kubrat left, markmont left, cdg left, dustinm` left, tbrowder left, buggable left, leego left, NeuralAnomaly left, huggable left, ZofBot left, obra left, TeamBlast left, protium left, BuildTheRobots left, jhill left, robinsmidsrod left, simcop2387 left, captain-adequate left, Geth left, andreoss left, Alikzus left, masak left, k-man left, jameslenz left, titsuki left, Celelibi left, eater left, Unavowed left, ingy left, Grrrr left, gfldex left, hcit_ left, tinita left, Dunearhp left, Guest17892 left, Gothmog_ left, mantovani left, raschipi left, dwarring left, MasterDuke left, zoll left
skids commit: releases unit module Foo; sub foo() is export {}; say Foo::<EXPORT>.WHICH eq UNIT::<EXPORT>.WHICH 23:51
committable6 skids, ¦2015.12,2016.01.1,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1: «True» ¦2016.08.1,2016.09,2016.10,2016.11,2016.12,2017.01,2017.02,2017.03,2017.04.3,2017.05,2017.06,2017.07,HEAD(231cb3f): «False»
23:51 simcop2387 joined 23:52 obra joined, huggable joined, NeuralAnomaly joined, buggable joined, ZofBot joined, daxim joined, nadim left, markmont joined, k-man joined, leego joined, robinsmidsrod joined, luis joined, TeamBlast joined, cdg joined 23:53 tbrowder joined, dustinm` joined, dubi0us left
AlexDaniel brimonk: hello 23:53
brimonk: I think it's a regression of some sort, one second…
23:53 parisba joined, clkao joined
AlexDaniel bisect: old=HEAD~300 gist.githubusercontent.com/AlexDan...rs-test.p6 23:54
bisectable6 AlexDaniel, Successfully fetched the code from the provided URL.
AlexDaniel, Bisecting by exit code (old=HEAD~300 new=231cb3f). Old exit code: 0
23:54 SmokeMachine joined, epony left
bisectable6 AlexDaniel, bisect log: gist.github.com/ccec99653559dd5f13...033fc7bdfb 23:54
AlexDaniel, (2017-08-07) github.com/rakudo/rakudo/commit/46...ea9779a104
skids bisect: good=2016.07.1 bad=2016.08.1 unit module Foo; sub foo() is export {}; say Foo::<EXPORT>.WHICH eq UNIT::<EXPORT>.WHICH
bisectable6 skids, Bisecting by output (old=2016.07.1 new=2016.08.1) because on both starting points the exit code is 0
23:54 Matthew[m] left, tyil[m] left
bisectable6 skids, bisect log: gist.github.com/5ec10dbe603d419741...2fe0c1e48b 23:54
skids, (2016-08-15) github.com/rakudo/rakudo/commit/4d...e86acb632c
23:54 jhill joined, ribasushi joined, xui_nya[m] left, ilmari[m] left
AlexDaniel brimonk: yes 23:55
23:55 BuildTheRobots joined, mack[m] left, CIAvash[m] joined, wictory[m] joined, nightfrog joined, MilkmanDan joined, cpage joined, ambs joined, lucs joined, APic joined, nowan joined, shadowpaste joined, go|dfish joined, TimToady joined, stux|RC-only joined, smash joined, mattp_ joined, kubrat joined
AlexDaniel nine: any ideas? ↑ 23:55
23:55 tadzik left, wictory[m] left, CIAvash[m] left
ijneb What is goin on lol 23:55
23:55 unclechu left, stux|RC-only left, APic left, go|dfish left 23:56 raschipi joined, dwarring joined, MasterDuke joined, zoll joined, pnu__ joined, pnu__ left, pnu__ joined, mienaikage left, lizmat joined, john51 joined, ryu0 joined, ranguard joined, sjn joined, jeek joined, basket` joined, tony-o joined, pierrot joined, jsimonet joined, gabiruh joined, joy joined, plicease joined, ponbiki joined, Spot__ joined, lumimies joined, domm joined, musca joined, raydiak_ joined, M-Illandan left, tomaw joined, rodarmor joined, stux|RC-only joined, APic joined
AlexDaniel brimonk: actually, can you submit a bug report with that? 23:56
23:56 captain-adequate joined, Geth joined, andreoss joined, Alikzus joined, masak joined, jameslenz joined, titsuki joined, Celelibi joined, eater joined, Unavowed joined, ingy joined, Grrrr joined, gfldex joined, hcit_ joined, tinita joined, Dunearhp joined, Guest17892 joined, Gothmog_ joined, mantovani joined, BooK_ joined, zb joined, raschipi left, dwarring left, MasterDuke left, zoll left, go|dfish joined, Guest17892 left, ggherdov joined 23:57 tomaw left, MilkmanDan left, nightfrog left, cpage left, ambs left, lucs left, nowan left, shadowpaste left, TimToady left, smash left, mattp_ left, kubrat left 23:58 dubi0us joined, john51 left, john51 joined 23:59 ennio joined, nightfrog joined, MilkmanDan joined, cpage joined, ambs joined, lucs joined, nowan joined, shadowpaste joined, TimToady joined, smash joined, mattp_ joined, kubrat joined