»ö« 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.
Zoffix FWIW: my vacation at $work started and I'm gonna go into isolation until Apr. 6, to enjoy it. I might make some commits to repos, but I'll be ignoring all notifications. If I break something, just revert or fix the commit, as I won't see the notification about breakage. If pmichaud comes around; rakudo.org domain is ready for move, per github.com/perl6/perl6.org/issues/...-373971373 01:21
Herby_ exit 02:05
...
Kaiepi m: sub foo(--> Callable[Int]) { sub (Int $_ --> Int) { $_ + 1 } }; say foo()(1) 02:15
camelia 2
Kaiepi oh
donpdonp ive got $socket.Supply(:bin).tap(receive); which works with a -> $buf {} but if I use sub receive($buf) {} 05:34
I get Calling receive() will never work with declared signature
i would have thought the lambda and the receive sub would be equivalent. 05:35
JMERELO Hi 06:21
JMERELO I've created a repo for my activity during the Perl6/doc grant github.com/JJ/TPF-Grant/ 06:41
I'll be obviusly looking at the issues in perl6/doc, but if you want me to do something specific, or check out the progress report, or whatever, just set a watch there 06:42
Kaiepi m: my Int @a = [1,2,3] 07:07
camelia ( no output )
Kaiepi m: my Int @a = [1,2,3]; say @a
camelia [1 2 3]
Kaiepi m: my Int @a := [1,2,3]; say @a
camelia Type check failed in binding; expected Positional[Int] but got Array ($[1, 2, 3])
in block <unit> at <tmp> line 1
Kaiepi is this supposed to happen? 07:08
JMERELO m: my Array[Int] @a = [1,2,3] 07:09
camelia Type check failed in assignment to @a; expected Array[Int] but got Int (1)
in block <unit> at <tmp> line 1
JMERELO @Kaiepi yep, @a is supposed to be an Int, and you're assigning it to an array instead 07:10
donpdonp Kaiepi: this might be helpful docs.perl6.org/language/operators#infix_:= 07:14
Kaiepi ah ok 07:17
m: my Int @a = [1,2,3]; my Int @b := @a 07:18
camelia ( no output )
timotimo donpdonp: i think you wanted .tap(&receive) rather than .tap(receive) 08:08
the latter immediately calls receive and uses the return value of receive() as the function to tap with
donpdonp timotimo: ah yes, thx! 08:18
perl6 has everything :)
robertle m: my $l = Lock.new; $l.protect({ say "woo"; }) 09:17
camelia woo
robertle m: my $l = Lock.new; $l.protect({});
camelia Attempt to unlock mutex by thread not holding it
in block <unit> at <tmp> line 1
robertle surprising!
lizmat indeed 09:21
but maybe not
m: dd {}
camelia Hash % = {}
lizmat m: my $l = Lock.new; $l.protect({ ... });
camelia Stub code executed
in block <unit> at <tmp> line 1
lizmat robertle: so you're feeding Lock.protect a Hash 09:22
lizmat It think this warrants a GH Issue :-) 09:23
that error is LTA 09:24
robertle ah! 09:25
hm, there isn't really any valid use case for feeding protect anything that isn't callable, right? 09:26
robertle it is a slightly misleading error message, but admittedly not a very useful thing to do anyway. but it can happen during development when you comment out code from the protected block 09:28
m: my &t = {}; 09:34
camelia Type check failed in assignment to &t; expected Callable but got Hash (${})
in block <unit> at <tmp> line 1
robertle isn't it also surprising that the &code in the protect() signature doesn't constrain it to a callable in a similar manner as tghe assignment does?
m: my sub dosth(&code) { ...}; dosth(1); 09:35
camelia Type check failed in binding to parameter '&code'; expected Callable but got Int (1)
in sub dosth at <tmp> line 1
in block <unit> at <tmp> line 1
robertle m: my sub dosth(&code) { ...}; dosth({});
camelia Type check failed in binding to parameter '&code'; expected Callable but got Hash (${})
in sub dosth at <tmp> line 1
in block <unit> at <tmp> line 1
pmichaud good evening, #perl6 09:36
yoleaux 10 Mar 2018 01:56Z <Zoffix> pmichaud: do you got Rakudo's logo in vector or at least high-res format? This one rakudo.org/wp/wp-content/uploads/20...o-1001.png
10 Mar 2018 02:25Z <Zoffix> pmichaud: Actually, I found a large one in our marketing repo, but if you have a vector version, wouldn't hurt to add it there too: github.com/perl6/marketing/blob/ma...x-3000.png
11 Mar 2018 17:23Z <Zoffix> pmichaud: timotimo I'm on it
12 Mar 2018 03:20Z <Zoffix> pmichaud: I think it's best to wait until your return on Apr 1 before moving the site, rather than rush everything for Mar 14—I'd like to take extra time to ensure all the old links still map to something sane on the new site. I already got majority of the content up (other than binaries and the new pages we're adding) and put up a demo for you, if you wanted to look at progress so far:
12 Mar 2018 03:20Z <Zoffix> pmichaud: hack.p6c.org:4242/
12 Mar 2018 10:23Z <Zoffix> pmichaud: also the Rakudo Star release manager decided to have a shit fit. Added this page hours after told him we were re-designing the site perl6.org/downloads/others.html and now that he's seen my demo hack.p6c.org:4242/files says he oposes it because it's "confusing" and will resign as release manager
12 Mar 2018 13:24Z <Zoffix> pmichaud: nevermind; there appears to have been confusion on what site is even changing: github.com/perl6/perl6.org/issues/96
18 Mar 2018 04:03Z <Zoffix> pmichaud: new rakudo.org is good to go. Just need to move the domain. More info: github.com/perl6/perl6.org/issues/...-373971373
pmichaud Coming to you tonight from the Hotel Chinzanso Tokyo :) 09:37
masak pmichaud! \o/
moritz \o pmichaud 09:38
pmichaud masak! o/ 09:39
moritz! o/
lizmat pmichaud o/ 09:40
masak just like old times :)
pmichaud except that at the moment I'm in a timezone that is ahead of most of you :) 09:41
lizmat o/
masak I thought "Hotel Chinzanso Tokyo" sounded vaguely Asian :P
pmichaud More than that, "chinzanso" seems to have a perl6-ish connection :) 09:42
masak "House of Camellia"! o.O 09:43
en.wikipedia.org/wiki/Chinzan-so
pmichaud Indeed. :) 09:44
El_Che pmichaud: log trip? 09:46
masak imagines pmichaud floating across the Pacific on a log 09:47
well, we all know the importance of logging, so...
pmichaud Anyway, I felt a desire to share this little connection to Perl 6 from the land of the Rising Sun. The garden (and hotel grounds) are very beautiful here. We should have a conference or event here some day. :) 09:50
masak +1
pmichaud I'll check back in a week or so, I think 09:56
happy spring equinox to all
masak likewise!
tbrowder_ hi, #perl6 11:42
pmurias p6up.github.io/ - mockup p6up installer page 11:43
tbrowder_: \o/ 11:44
tbrowder_ continuing experimenting with toasting modules, i have found some that always hang and cannot (that i can find) be killed by toaster.
pmurias: \o/ 11:45
pmurias now we need an actuall p6up installer ;)
tbrowder_ toaster can ignore those for testing primarily, but not when testing other modules that depend on them. 11:46
so i’m still getting hangers. my next trials will be with using this zef command: zef —force install module; zef test module 11:49
tbrowder_ to try to decouple the dependency test failure from the primary installation during toasting. 11:50
tbrowder_ eventually i would like toast results to show, for each module, its test results along with its dependencies and their test results. 11:53
pmurias: it looks inviting! how will it affect my existing rakudo setup if i try it? 11:56
pmurias tbrowder_: it's a pure mockup at this point so it doesn't work at all yet ;) 12:08
tbrowder_ gotcha! 12:09
[Coke] Anyone here attending tpc us 2018? 12:15
lizmat 12:24
DrForr [Coke]: Planning to, yes. 12:51
[Coke] is trying to determine if he's coming for anything other than the main event.
DrForr Well, I'm doing a tutorial, but I suspect that most of the peeps here don't need it. 12:53
DrForr And I'm setting up an Origami BOF, though I don't know what day they'll block out. That does make the whole thing a bit logistically awkward, because though I'm going to be there all week, others may not, and if their BOF gets arranged for a day they're not planning to be there (I'm thinking the last 3 days) they won't be there for tehir own BOF. 12:59
Geth marketing: 79aed7ba58 | (Zoffix Znet)++ | 6 files
Update "Introducing Perl 6" Brochure to rev2

  - Add revision marker on last page
  - Make all links proper HyperLink objects to prevent issues with readers
   auto-guessing URLs wrong. Fixes github.com/perl6/marketing/issues/6
  - Fix typos and minor font weight/color issues.
   Fixes github.com/perl6/marketing/issues/4
DrForr plugs some more edge cases. 13:00
Geth marketing: 71691dc489 | (Zoffix Znet)++ | 3 files
Update pub "Introducing Perl 6" Brochure PDFs to rev 2
13:01
Geth marketing: 3b351b9616 | (Zoffix Znet)++ | 5 files
Fix inconsistent time on "Rakudo Concise" poster

Fixes github.com/perl6/marketing/issues/5
13:17
tbrowder_ ref hanging modules: i have found the following modules hang during toasting and cannot be killed by the job: 14:22
AlexDaniel please file a ticket for every module that does that 14:24
(there are some tickets already, by the way) 14:25
tbrowder_ OO::Actors, Test::Scheduler, IO::Socket::Async::SSL, and Event::Emitter::Inter-Process
AlexDaniel: WILCO
AlexDaniel yeah, first two already have a ticket 14:27
tbrowder_ ticket at each url, roger, anywhere else?
tbrowder_ AlexDaniel: all the modules i lsted have an issue filed about tests hanging 15:11
AlexDaniel cool
thundergnat Heya perl6. 15:38
lizmat thundergnat o/ 15:41
thundergnat Sometime in the past year, it seems that the bigInt, bigInt candidate for %% got changed so it no longer handles them. It _used_ to. I know it worked in 2016.10
m: say 23067200747291880127814827277075079921671259751791 %% 100000000000000000000000000000000000000000000000577;
camelia Cannot unbox 164 bit wide bigint into native integer
in block <unit> at <tmp> line 1
thundergnat That _used_ to work... 15:42
lizmat thundergnat: please make a GH issue :-) 15:44
thundergnat Ok.
MasterDuke bisectable6: say 23067200747291880127814827277075079921671259751791 %% 100000000000000000000000000000000000000000000000577 15:47
bisectable6 MasterDuke, Bisecting by exit code (old=2015.12 new=f4255d5). Old exit code: 0
MasterDuke, bisect log: gist.github.com/0c0a04c16226bb8117...dee18ad4b8
MasterDuke, (2017-02-22) github.com/rakudo/rakudo/commit/75...7f93def3d3
MasterDuke thundergnat, lizmat: ^^^ 15:48
thundergnat MasterDuke: Thanks, I'll include that in the ticket.
thundergnat Issue submitted: R#1640 16:06
synopsebot R#1640 [open]: github.com/rakudo/rakudo/issues/1640 %% fails with bigInt, bigInt arguments
lizmat thundergnat++ # close to a fix :-) 16:14
thundergnat lizmat: woot! 16:15
lizmat m: use nqp; say nqp::not_i(23067200747291880127814827277075079921671259751791) 16:16
camelia Cannot unbox 164 bit wide bigint into native integer
in block <unit> at <tmp> line 1
lizmat was the underlying issue
m: use nqp; say !23067200747291880127814827277075079921671259751791
camelia False
lizmat the fix
bdmatatu p6: say (^40).grep( / (.)'4' / ).map({ $/[0] }) 16:23
camelia (Nil Nil Nil)
bdmatatu Hi folks, what's a good way to do something like the above? (since the match object doesn't seem to be available)
timotimo bdmatatu: use -> $/ { $/[0] } or just { .[0] } 16:24
or *[0]
AlexDaniel m: say (^40).map({/ (.)'4' / ?? $0 !! Empty}) 16:25
camelia (「1」 「2」 「3」)
moritz or
say (^40).grep( / . )> '4' / )
evalable6 (14 24 34)
JMERELO Hi, @timotimo. Can you help with this concurrent thingie I'm trying to build? I replied to your comment in StackOverflow here stackoverflow.com/questions/493698...8_49369853 pointing to this code github.com/JJ/my-perl6-examples/bl...current.p6
moritz erm
say (^40).grep( / . <( '4' / )
evalable6 (14 24 34) 16:26
moritz why doesn't )> work here?
AlexDaniel because it only checks, it doesn't map
moritz ah, right
say (^40).grep( / . <( '4' / ).map({$_})
evalable6 (14 24 34)
moritz say (^40).grep( / . )> '4' / ).map({$_})
evalable6 (14 24 34)
moritz meh
moritz not thinking straight 16:27
AlexDaniel bdmatatu: so, is my solution good enough? 16:29
bdmatatu I think that's the only one of the above that works 16:30
moritz say (^40).grep( * % 10 == 4 ).map( (*/10).Int) 16:31
evalable6 (0 1 2 3)
moritz say (^40).grep(*>10).grep( * % 10 == 4 ).map( (*/10).Int)
evalable6 (1 2 3)
JMERELO @moritz nice trick :-)
bdmatatu I have some files with names including foo-001.json, foo-002.json (among others) and was trying to a grep + map to get 001, 002,... 16:34
But I suppose I could just do the map with a ternary and skip the grep 16:36
jnthn m: say <foo-001.json foo-002.json foo-042.json>.map(*.comb(/'-' <( \d+ )> '.'/)).flat
camelia (001 002 042)
jnthn m: say <foo-001.json foo-002.json foo-042.json nonum.json>.map(*.comb(/'-' <( \d+ )> '.'/)).flat
camelia (001 002 042)
moritz m: <bla foo-001.json foo-002.json bar>.map({/'-'<(\d+)>'.json'/}).grep(?*)
camelia Invocant of method 'match' must be a type object of type 'Any', not an object instance of type 'Regex'. Did you forget a 'multi'?
in block <unit> at <tmp> line 1
moritz m: <bla foo-001.json foo-002.json bar>.map({m/'-'<(\d+)>'.json'/}).grep(?*) 16:37
camelia ( no output )
moritz m: say <bla foo-001.json foo-002.json bar>.map({m/'-'<(\d+)>'.json'/}).grep(?*)
camelia (「001」 「002」)
moritz m: say <bla foo-001.json foo-002.json bar>.map({m/'-'<(\d+)>'.json'/}).grep(?*).map(~*)
camelia (001 002)
moritz a bit weird, but *finally* I got to use <( and )> in a regex :-)
jnthn Think I prefer my flat comb solution ;) 16:39
But yeah, that also works :) 16:40
bdmatatu <( and )> look pretty useful, thanks 16:41
moritz m: say gather for <bla foo-001.json foo-002.json bar> { take ~$/[0] if m/'-' (\d+) '.json'/ } 16:43
camelia (001 002)
moritz simple to reason about :-)
JMERELO So I want to create a new Channel that groups elements in a base Channel. I'm using this my $c2 = $c.Supply.batch( elems => 2).Channel; 16:43
moritz JMERELO: I've already seen similar things on stackoverflow; why are you so eager to turn Supplies into Channels? 16:44
JMERELO It simply hangs up. I initially tried to use Supplies, but you can't run them concurrently
@moritz not really. I tried @timotimo answer, but the problem is that turning a channel into a list blocks it if there's no supply available. 16:45
OK, back to basics. I want to do this. I have a channel and I want to do stuff to individual elements in a channel, but concurrently I want to do stuff to couples of elements in the channel. 16:46
moritz JMERELO: why not work with the supplies directly?
JMERELO @moritz they are supposed to not be concurrent, I guess. 16:46
moritz channels are also for serializing things 16:47
JMERELO This is the code with supplies
my $length = 32;
my $supplier = Supplier.new; 16:48
my $supply = $supplier.Supply;
my $pairs = $supply.batch( elems => 2 );
$supply.tap( -> $v { say "First : ", $v });
$supply.tap( -> $χ { say max-ones( $χ ) } );
$pairs.tap( -> @pair { say crossover( @pair[0], @pair[1] )} );
moritz you can do something like while my $elem = $channel.receive() { start { do something with $elem } }
JMERELO for 1 .. 10 {
timotimo please don't paste code directly into irc, thanks
JMERELO $supplier.emit( random-chromosome($length) );
}
mst JMERELO: pasting directly into an IRC channel creates an unreadable mess
JMERELO @timotimo OK. What's the best way to do it?
mst please consider using e.g. github's gist or fpaste.scsys.co.uk/
JMERELO @mst will do. Thanks.
mst also note that on IRC you address people with 'mst:', twitter-style is weird 16:49
timotimo not only does it allow others to write in between your lines, but also - in order for the server to not kick you for spam - your client spreads it out at about 1 line per second
JMERELO You have probably noticed I'm not too familiar with IRC. Sorry. mst: timotimo:
Anyway, here's the code github.com/JJ/p6-algorithm-evoluti.../supply.p6 16:50
timotimo JMERELO: do you realize you've closed the $c channel that $more-work is supposed to send stuff to in line 5? 16:51
JMERELO Works pretty well, but I would like the two taps to run concurrently. That's why I tried channels, but then I realized it's not easy to do that with channels.
timotimo: no. So stupid. 16:52
timotimo that doesn't fix it, though
JMERELO timotimo: does not make it any less stupid. 16:53
Took it down to this gist.github.com/JJ/47c5988e661291c...9262992c17 It simply hangs up. 16:55
moritz maybe you really want to something with .hyper.map with two parallel jobs or so? 16:55
thundergnat Is there any way to modify the .pos of a match from inside a Grammar? I'm trying to update this code: rosettacode.org/wiki/Names_to_numbers#Perl_6 to work with modern Rakudo and this is a major stumbling block. See the .trimspace method, last line.
JMERELO moritz: maybe. Tell me more...
moritz JMERELO: 6guts.wordpress.com/2017/03/16/con...semantics/ 16:56
JMERELO moritz: Not sure. It's nice, but I would need the left hand side of the .hyper to be generated dynamically. 16:59
moritz: that is, to be a channel or supply
JMERELO This one works a tiny bit better: gist.github.com/JJ/47c5988e661291c...9262992c17 Spits numbers for a while, then hangs. 17:03
If I stop re-sending what's been read to the channel, it spits _less_ numbers and then hangs.
jnthn my $work = start react whenever $c -> $item { $c.send( $item ); 17:08
...is that meant to be sending to itself forever?
JMERELO jnthm: there's a counter to make it stop after some time. But in a first approximation, yes.
jnthn Well, until somebody closes it, and then it will potentially die on the .send
El_Che JMERELO: /nick jmerelo 17:09
JMERELO: it seems you're screaming :)
jmerelo El_Che: Thanks 17:09
El_Che way beter :)
who said the Spanish always yell ;) 17:10
jmerelo El_Che: and wave hands \o/ 17:10
El_Che that's the Italian :) 17:11
jmerelo: who's your grant manager, by the way?
jmerelo El_Che: :-)
El_Che: Mark Jensen 17:12
I kinda got this concurrent Fibonacci to work github.com/JJ/my-perl6-examples/bl...current.p6
El_Che jmerelo: I don't know him personally 17:13
jmerelo: I love channels as well
nice
jmerelo El_Che: Likewise.
El_Che: the thing is to keep the stuff moving as long as you take only one element from the channel. 17:14
El_Che I find them easy to conceptualize in my head
the other stuff less so
:)
jnthn uses Channel much less than Promise and Supply, but that's probably a reflection of the problems he works on 17:18
jmerelo :jnthn I couldn't figure out how to that with Promises.
El_Che jnthn: I know you are a promise guy
:)
timotimo well, promises are for single values, and you really want multiple values over time 17:19
jmerelo It hangs now after the last sentence... github.com/JJ/my-perl6-examples/bl...current.p6 17:24
jnthn jmerelo: I didn't say they are the right tool for your task :) 17:25
I think Channel may actually be the right thing here
jmerelo: $output is never closed 17:30
jmerelo jnthm: Do I need to close it before reading it?
jnthn No, but you need to close it for a .list loop over it to terminate
for $channel.list { } means read from the channel, blocking until there's values, until the channel is closed
jmerelo jnthn: right. So I guess I would need to use poll instead, and close if there's nothing there waiting. 17:31
jnthn Maybe but beware race conditions
I don't know what problem this is abstracted from so it's hard to suggest a better solution without risking factoring out the actual problem :) 17:32
jmerelo jnthn: an evolutionary algorithm 17:33
jnthn Ah, sadly I know nothing much about those. 17:35
jmerelo Well, there's this nice (and rather recent) Perl 6 Module... modules.perl6.org/dist/Algorithm::...an:JMERELO 17:35
jnthn Is the re-sending of items significant or just because channels are a one-to-one mechanism, not a broadcast one? 17:37
jmerelo jnthn: it rather is. My idea is to evolve populations concurrently, and have a "mixer" mixing populations coming from a particular channel. 17:38
jmerelo jnthn: so basically yes. 17:38
I guess this is it, channel mixing achieved, output channel printed at the end using poll github.com/JJ/my-perl6-examples/bl...current.p6 17:40
jnthn :) 17:42
jnthn bbl
jmerelo So, next question. Can anyone give me the docs.perl6.org server logs? Or a few of them anyway? I'd like to analyze them basically for search engine terms, landing pages and leaving pages. 17:50
IPs are not so important, so they can be anonymized if needed.
El_Che jmerelo: probably a question for moritz 17:52
jmerelo moritz: can you help with the p6doc server logs? 17:54
jimav I'm wondering why atomic operators are not restricted to "atomicint", which is portable... 19:42
jimav In other words, is it helpful to allow the non-portable "my int64 $i; cas $i,0,1" without a warning? 19:43
Relatedly, why throw an exception if the result from atomic ops won't fit in 64 bits, rather than won't fit in atomicint (which could be 32 bits)? 19:45
jimav Are the various is repr('...') documented anywhere? 19:52
lelf p6: sub foo ($x? where Int) { }; foo() 20:17
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Any (Any)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
lelf unconfuse me please
jnthn p6: sub foo (Int $x?) { }; foo() # why not this? 20:20
camelia ( no output )
jnthn jimav: Native types are don't carry type information at runtime, so we can't tell the difference. We could try and do static analysis and catch some cases. 20:23
lelf p6: subset Even of Int where * %% 2; sub foo (Even $x?) { }; foo() # jnthn: 20:24
camelia Use of uninitialized value of type Int in numeric context
in whatevercode at <tmp> line 1
[Coke] r: subset Even of Int:D where * %% 2; sub foo (Even $x?) { }; foo() # jnthn: 20:25
camelia Constraint type check failed in binding to parameter '$x'; expected Even but got Int (Int)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
( no output )
[Coke] (oops, meant m)
jnthn Interesting that r-j things differently though 20:27
But yeah, it enforces the constraint even on an optional. 20:28
AlexDaniel bisectable6: uptime 21:47
bisectable6 AlexDaniel, 3 hours, 36 minutes, and 5 seconds, 208.800781MiB maxrss. This is Rakudo version 2018.02.1-166-g51c4d4d89 built on MoarVM version 2018.02-171-geee5be412 implementing Perl 6.c.
AlexDaniel committable6: uptime 21:48
committable6 AlexDaniel, 3 hours, 42 minutes, and 41 seconds, 203.855469MiB maxrss. This is Rakudo version 2018.02.1-166-g51c4d4d89 built on MoarVM version 2018.02-171-geee5be412 implementing Perl 6.c.
AlexDaniel notable6: uptime
notable6 AlexDaniel, 2 days, 23 hours, and 57 seconds, 239.210938MiB maxrss. This is Rakudo version 2018.02.1-166-g51c4d4d89 built on MoarVM version 2018.02-171-geee5be412 implementing Perl 6.c.
AlexDaniel # license ‘GPL-3.0-or-later’ is not one of the standardized SPDX license identifiers. 21:55
what the
ah… it's outdated
Geth ecosystem: c05cbfdb8d | (Aleks-Daniel Jakimenko-Aleksejev)++ | META.list
Add App::OrgSleep
22:09
AlexDaniel heh… first module… 22:10