»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
discord6 <RaycatWhoDat> Would it be possible to get a code review of this toy program? 00:23
tellable6 2019-08-26T23:38:49Z #perl6 <AlexDaniel> RaycatWhoDat now you can use the bots from discord! All *able6 bots!
SmokeMachine I was watching Laurent Rosenfeld's talk video and finished up doing this... is it interesting somehow?
discord6 <RaycatWhoDat> o
SmokeMachine www.irccloud.com/pastebin/n8NRGXvY/
discord6 <RaycatWhoDat> m: say (1 + 1)
evalable6 2
discord6 <RaycatWhoDat> Neato.
<RaycatWhoDat> Thanks, guy!
AlexDaniel it was tobs :) 00:24
RaycatWhoDat: anyway, where's the program? 00:25
tellable6 AlexDaniel, I'll pass your message to RaycatWhoDat
AlexDaniel oooops
tobs: that doesn't work! :)
discord6 <RaycatWhoDat> 😮
tellable6 2019-08-28T00:25:43Z #perl6 <AlexDaniel> RaycatWhoDat: anyway, where's the program?
AlexDaniel let me fix that real quick… 00:26
discord6 <RaycatWhoDat> Here ya go: github.com/RayMPerry/kitchen-sink/...of-beer.p6 00:27
<RaycatWhoDat> I wrote it as naïvely as possible
<RaycatWhoDat> But it's Perl so, it should all fit on four or so lines. 😛
AlexDaniel pluralize is wrong, it's “0 bottles” 00:28
what about `for $bottlesOfBeer … 0 {}` ?
discord6 <RaycatWhoDat> That's fair. 00:29
<RaycatWhoDat> Changed both of those. 00:30
<RaycatWhoDat> Although the latter change became for $bottlesOfBeer ... 0 -> $remainingBottles { 00:31
<RaycatWhoDat> Oh, wait. I don't have to do that, do I? $_ would become my variable, right? 00:33
AlexDaniel a have a solution in 192 characters and somebody did it in 102
yeah, $_ will be your thing then :)
discord6 <RaycatWhoDat> Sweet. Also, 102 characters is insane. 00:34
AlexDaniel I think so too, yeah. I should try it again one day 00:35
Geth whateverable: 0572755c90 | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/Tellable.p6
Fix wrong automatic .tell to bridged users
00:38
AlexDaniel hey, RaycatWhoDat can you say something? 00:45
AlexDaniel I want to see if the fix to the bot is working… 00:45
you can also use { } for pluralize on the last line 00:48
say "$distribution, $nextNumber bottle{pluralize($nextNumber)} of beer on the wall.";
discord6 <RaycatWhoDat> something 00:59
<RaycatWhoDat> Also, thanks. I'll add it. 01:00
AlexDaniel RaycatWhoDat: test test 01:14
ok, seems to be working
Geth doc: tbrowder++ created pull request #2982:
Openers
01:20
doc: 641049f01e | (Tom Browder)++ | doc/Language/opener-chars.pod6
add new pod6 doc for valid opener brackets
01:21
synopsebot Link: doc.perl6.org/language/opener-chars
doc: 891037ca2b | (Tom Browder)++ | doc/Language/00-POD6-CONTROL
add new doc to the control file
synopsebot Link: doc.perl6.org/language/00-POD6-CONTROL
doc: 97f9e14b2d | (Tom Browder)++ (committed using GitHub Web editor) | 2 files
Merge pull request #2982 from tbrowder/openers

Openers
antoniogamiz o/// 06:19
can I know the index of an element inside a map? 06:21
i though using :item or :label I could do it
but they return (Mu)
moritz m: my @a = <a b c>; say join ' ', map { "$^a:$^b"} @a.kv 06:53
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/oyQxxyIhuW
Missing…
moritz, Full output: gist.github.com/f970516ecaa3ac8460...96a2f6cc3e
moritz m: my @a = <a b c>; say join ' ', map { "$^a:$^b"}, @a.kv
evalable6 0:a 1:b 2:c
moritz antoniogamiz: like this
antoniogamiz oh thanks :) 06:54
moritz or you can iterate over .pairs and then access .key and .value in the map block
antoniogamiz can someone paste an emoji of a butterfly? :D 07:38
timotimo ð¦
timotimo shakes fist at openbsd or whatever runs on this terrible machine 07:39
hobbs that came out rather garbly here. How about 🦋
antoniogamiz hahaha
hobbs: I can only a rectangle
timotimo there's supposed to be something there?
hobbs install font with more butterfly
antoniogamiz with more butterfly? which is that? 07:40
hobbs I dunno :) 07:41
m: "🦋".uniname
evalable6
hobbs hmm
moritz antoniogamiz: often browsers have better font fallback support. Try colabti.org/irclogger/irclogger_lo...08-28#l161
antoniogamiz em that points to your message I think 07:42
moritz oops, sorry. Then scroll up a bit :D 07:43
antoniogamiz but.. to where? x'D
sorry for not getting it, but I've tried the things timotimo and hobbs have said 07:44
moritz to the line "that came out rather garbly here. How about 🦋" 07:48
that might be rendered correctly in your browser
CIAvash antoniogamiz: You can use Noto Color Emoji font (if you're on Linux) or Twitter Color Emoji font(twemoji-color-font) 07:50
jjmerelo We're still testing the new document generation script by antoniogamiz here: docs-stage.p6c.org/ 07:53
tellable6 2019-08-28T01:14:53Z #whateverable <AlexDaniel> jmerelo: bot test. Please ignore
gist.github.com/a925cdca6f46d3dff1...3b70265400
jjmerelo Please check it out thoroughly. When all bugs have been ironed out, this will be deployed to generate the documentation from perl6/doc 07:54
Here's the roadmap github.com/perl6/doc/issues/2983 07:55
Please check it out, comment, make suggestions...
Xliff \o 08:15
What's the best way to track down a MoarVM panic?
timotimo you can run the program in gdb, "break MVM_panic" and then "call MVM_dump_backtrace(tc)" 08:18
Xliff timo! :D
Is this early or late for you?
timotimo early 08:19
Xliff timotimo: github.com/Xliff/p6-GStreamer
I want to get it to a point where you can put GStreamer video onto a Clutter actor. ;q 08:20
OK, what's the best way to break perl6-gdb-m before a script actually runs so you can set up some breakpoints.
Or would this be a good place for Comma?
timotimo comma doesn't do C-level breakpoints 08:21
Xliff Oh. :(
timotimo i usually just ctrl-c the program, set the breakpoints, then "run" it from the start
Xliff Ah. OK.
"MoarVM panic: native callback ran on thread (140336699950848) unknown to MoarVM"
timotimo yeah, when a library calls a callback from another thread, that's complicated to deal with for moarvm 08:22
Xliff Grr... 08:23
timotimo i haven't had to deal with this topic at all yet
Xliff So it might be internal to GStreamer?
timotimo no clue 08:24
Xliff wtf? 08:27
Running it from perl6-gdb-m I get a completely different behavior
"Error while reading from file: Malformed UTF-8"
Xliff gist.github.com/Xliff/280611277686...760db09ce3 08:32
^^ backtrace
timotimo yeah it looks like gstreamer has a thread pool of its own and is trying to call into your code from there 08:33
Xliff Dammit. 08:34
Any idea if this is something that will be supported in the future?
timotimo not sure how best to handle that. perhaps a dedicated moarvm threadcontext that does nothing but handle "thread-foreign" callbacks could be set up 08:35
Xliff OK. Any workarounds you can think of? 08:36
timotimo not really
Xliff Otherwise events just can't be supported, and that will really be a blow to bringing GStreamer support to Perl6. :(
timotimo cat time! 08:37
Xliff :)
timotimo cat time already done 08:49
Geth ¦ problem-solving: Xliff assigned to jnthn Issue MoarVM Support of Callbacks in a Different Thread github.com/perl6/problem-solving/issues/96 08:50
kawaii timotimo: there is always time for more cat time 09:11
domidumont Hi, On Debian/unstable with libuv 1.30.1, rakudo fails installation with "No writeable path found, /home/domi/debian-dev/build-area/rakudo-2019.07.1/debian/rakudo/usr/lib/perl6/core not writeable" 09:16
We've seen this problem occurs with rakudo 2018.12 and 2019.07
For instance see this build log buildd.debian.org/status/fetch.php...&raw=0
Note that rakudo 2018.12 did build fine with libuv 1.24.1 09:17
Any idea on how to fix this issue ?
timotimo kawaii: not when the cat leaves 09:27
scimon Cat time is decided upon by the cat. 09:29
It is true.
timotimo 100%
Xliff Don't I know it. I have 2 09:32
timotimo 200% 09:33
Xliff More like 4....
scimon :) 09:36
Xliff m: sub a ($aa is rw) { say '0 09:38
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ybMI6g4c3U
Unable …
Xliff, Full output: gist.github.com/2c913d66a5a00a6d5f...b040f311b3
Xliff m: sub a ($aa is rw) { say '0' }; a($)
evalable6 0
Xliff m: sub a ($aa is rw) { 1, 2 }; a($) 09:40
evalable6
Xliff m: sub a ($aa is rw) { 1, 2 }; a($).say
evalable6 (1 2)
Xliff m: sub a ($aa is rw) { 1, 2 }; my $l = a($); $l.say; 09:41
evalable6 (1 2)
scimon What are you trying to do?
Xliff Damn. I was hoping $l == 1
scimon Right.
Xliff Is there a way to return a list with optional elements?
Rather... I would like to return the list so that if I ask for a singular item, like above, I would only get 1 value? 09:42
scimon m: sub a () { 1,2 }; my ($l) = a(); $l.say;
evalable6 1
scimon ?
Xliff Yeah. I was hoping to do it without the parens.
I know I can do it that way.
scimon Figured you might. 09:43
That would require the function to know the context it's being called in an Perl6 doesn't do that.
Xliff Yeah. Thought so.
scimon (As per my understanding. I may be wrong).
jnthn Yes, it's correct. I guess that's the revenge of multi-dispatch. :) 09:44
scimon On the bright side. Multi dispatch is AWESOME. So you know. Swings and roundabouts.
Xliff jnthn: Good morning.
github.com/perl6/problem-solving/issues/96
m: sub a ($aa is rw, :$all = False) { $all ?? 1 !! 1, 2 }; my $l = a($); $l.say; 09:45
evalable6 (1 2)
Xliff m: sub a ($aa is rw, :$all = False) { $all ?? 1, 2 !! 1}; my $l = a($); $l.say;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/sVRR6ieSYC
Precede…
Xliff, Full output: gist.github.com/4ca1a1d6d8670470d4...78a7385584
Xliff m: sub a ($aa is rw, :$all = False) { $all ?? (1, 2) !! 1 }; my $l = a($); $l.say; 09:45
evalable6 1
tbrowder \o/ top of the utc-6 morning to all 09:56
Xliff \o tbrowder
tbrowder o/ Xliff
Xliff I disbelieve. It's not tomorrow until I've gone to sleep. <denial>It's still wednesday!</denial> 09:57
tbrowder i need jj's or antoniogamiz's help with new doc i added yesterday-- it's not showing up on the current doc site 09:59
tbrowder i may be in backslash hell with that doc (opener-chars.pod6) 10:03
ah, i see an error in it: no "=end pod" at the end!, 10:08
Geth doc: 4ba74a7af4 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/opener-chars.pod6
add missing line at enc
10:09
synopsebot Link: doc.perl6.org/language/opener-chars
kawaii AlexDaniel: 10:10
started another Blin run
rindolf www.mail-archive.com/perl6-users@p...06933.html - posts like this make me sigh - deja vu 10:14
tbrowder rindolf: are you aware of anyone using p6 for ml? 10:19
rindolf tbrowder: no
tbrowder that could be a "killer" thing for p6 10:20
i'll bet jnthn could whip up a system in no time--he wears a red cape! 10:21
rindolf tbrowder: i mean the general "can someone please implement $insert-time-consuming-feature-here"
kawaii pretty sure Python sadly has the ML demographic locked down 10:22
tbrowder i know...just dreaming. howver, maybe use an open source py project and inlinepython... 10:23
Xliff Mailing lists?
tbrowder ?? 10:24
rindolf tbrowder: someone once told me that vista which will mix win xp and win ce will be ms' killer os
Xliff Python would outperform P6 on high traffic sites, but the features....
tbrowder: Oh. I thought you were talking Mailing Lists when you said "ml"
tbrowder no, but sympa uses p5
Xliff Yep. I remember sympa 10:25
rindolf and it didnt mix ce and was almost universally hated
tbrowder i'm about to go to sympa. why the hate? 10:26
mm3 was my hope but it seems to be in too many pieces to understand for a non-python person 10:29
Xliff tbrowder: What did you mean by "ml"?
re: symba - It was a complex beast to set up, but once done it wasn't bad. 10:30
tbrowder i though ml was machine learning
Xliff Oooooo
tbrowder ai
big data
Yeeeeeessss
Xliff I think P6 would be great for that kinda stuff. Could *ahem* borrow from what Python is doing. 10:31
tbrowder a young one like antoniogamiz should charge into that fray 10:32
did you see the pic of him and jj in a mini-p6 hackathon? 10:33
scimon So for the ML stuff it's mostly providing a nice interface to something like TensorFlow right? 10:38
Sounds like a job for NativeCall.
In fact DrForr started something along those lines a couple of years ago : github.com/drforr/perl6-TensorFlow 10:39
(Though... the github name and the module seem at odds). 10:40
tbrowder yeah, looks like he was copy/pasting ready to start a new project 10:43
scimon Ahhh... 10:44
Geth doc: 88e43474fb | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/opener-chars.pod6
try to fix one line
10:49
synopsebot Link: doc.perl6.org/language/opener-chars
doc: 42f74481d4 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/opener-chars.pod6
try this fix
10:51
synopsebot Link: doc.perl6.org/language/opener-chars
doc: 7319954974 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/opener-chars.pod6
add blank line
10:56
synopsebot Link: doc.perl6.org/language/opener-chars
Kaiepi m: say |(|((|(("Baby", "Mommy", "Daddy", "Grandma", "Grandpa") X[~] " shark"), "Let's go hunt") XZ[~] (|(("," ~ (" doo" x 5)) xx 3), "!")), "Run away...").join("\n") 11:10
evalable6 Baby shark, doo doo doo doo doo
Baby shark, doo doo doo doo doo
Baby shark, doo doo doo do…
Kaiepi, Full output: gist.github.com/c218c8f9dc9a5b35f2...5974984642
Kaiepi baby shark song in one statement without repeating a single part of it
scimon For true evil you need to encode and decode the strings. 11:42
rindolf tbrowder: not all ai is ml 13:15
tbrowder: see twitter.com/turingfan 13:17
kawaii Kaiepi: why did you make this? It's the best and worst thing I've ever seen 13:27
tbrowder rindolf: correct 13:40
Doc_Holliwood good morning you beautiful people 14:02
sena_kun o/ 14:08
Merfont kawaii, because it's fun to try to write terrible ideas 14:16
Kaiepi if i started thinking about it now, i could probably come up with a part 2 to zoffix's "the grinch" advent calendar article from a year or two ago 14:18
AlexDaniel Kaiepi: now make it shorter by replacing strings with unicode characters and then using .uninames to extract the strings 14:27
scimon m: say "🦈".uninames.tclc 14:29
evalable6 Shark
scimon :D
AlexDaniel domidumont: please file a rakudo bug 14:32
scimon: that's right :)
Doc_Holliwood guys, i have written this github.com/holli-holzer/perl6-Win-.../README.md 14:34
I'm not sure if I'm happy with the name though, what do you think?
vrurg Doc_Holliwood: considering that there could be VTs for other platforms too, I'd suggest just switching the order of subparts to make it easier to create a family of modules in the future: VT::Win 14:40
Doc_Holliwood my understanding is linux and macos have that by default 14:45
vrurg Doc_Holliwood: the world is not limited to these three. 14:47
Doc_Holliwood what other platforms do we support? 14:48
my concern was more wether or not I should add the Terminal noun. Terminal::VT::Win? 14:49
vrurg Doc_Holliwood: the question is not what we support now but what else could we support in the future. Do you know that OS/2 is not really dead yet? Terminal::VT:: is good too, I think. 14:50
Adding Terminal has second good thing in it: this is perhaps the most searchable word if somebody needs something related. 14:51
domidumont AlexDaniel: There's a similar problem for arch linux github.com/rakudo/rakudo/issues/3090 . I'll add some info in this bug instead of creating a new one 14:55
AlexDaniel domidumont: we're definitely fixing it for the next release which will happen umm… which will happen! :) 14:56
hopefully mid September 14:57
Geth doc: tbrowder++ created pull request #2984:
update to show opener characters correctly
15:45
doc: 094d2bffd1 | (Tom Browder)++ | doc/Language/opener-chars.pod6
update to show opener characters correctly
15:52
synopsebot Link: doc.perl6.org/language/opener-chars
doc: bdea4a22ea | (Tom Browder)++ | doc/Language/opener-chars.pod6
add missing pieces
doc: 0be167409d | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/opener-chars.pod6
Merge pull request #2984 from tbrowder/opener-update

update to show opener characters correctly
Geth doc: tbrowder++ created pull request #2985:
escape the table pipes for proper table handling
17:11
doc: be6122e43a | (Tom Browder)++ | doc/Language/opener-chars.pod6
escape the table pipes for proper table handling
17:12
synopsebot Link: doc.perl6.org/language/opener-chars
doc: 8ea87dd243 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/opener-chars.pod6
Merge pull request #2985 from tbrowder/opener-update2

escape the table pipes for proper table handling
Kaiepi if you have a method that mutates a class' state predictably, but otherwise doesn't do anything that could be considered impure, can you still use the is pure trait with it? 17:35
basically what i'm asking is can i make every method of this role pure? fpaste.scsys.co.uk/585866 17:42
timotimo "is pure" will currently only happen when a value is known 17:47
timotimo also, method lookup is probably too late-bound to happen in the optimizer stage 17:50
tbrowder .tell jjmerelo the new doc page looks pretty good on my local 18:06
tellable6 tbrowder, I'll pass your message to jjmerelo
tbrowder .tell jjmerelo host but it hasn't shown on the public docs yet 18:07
tellable6 tbrowder, I'll pass your message to jjmerelo
discord6 <RaycatWhoDat> So, uh... 19:44
<RaycatWhoDat> Sorry, wrong server.
timotimo gist.github.com/timo/f4020bb85a102...3424cf0276 - subscribe to moarvm-internal events; when the GC runs and when spesh does some work 19:51
MasterDuke moarprof going to get some sort of visualizer for this info? 19:52
discord6 <RaycatWhoDat> m: say <1 ... 3> X <4 ... 6> X <7 ... 9> 19:53
evalable6 ((1 4 7) (1 4 ...) (1 4 9) (1 ... 7) (1 ... ...) (1 ... 9) (1 6 7) (1 6 ...) (1 6 9) (... …
RaycatWhoDat, Full output: gist.github.com/3cd347faeca57a62d8...97500989a6
discord6 <RaycatWhoDat> m: say 1 ... 3 X~ 4 ... 6 X~ 7 ... 9 19:54
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/TcjcHKV7hb
Only id…
RaycatWhoDat, Full output: gist.github.com/b6afd0129f90e19e36...a60417bdca
timotimo MasterDuke: not sure; jn wants to make it play nice with Log::Timeline, though, that'll be good 19:55
discord6 <RaycatWhoDat> Ooohhh, it's two dors
MasterDuke ah right
discord6 <RaycatWhoDat> dots*
<RaycatWhoDat> m: say 1 .. 3 X~ 4 .. 6 X~ 7 .. 9
evalable6 (147 148 149 157 158 159 167 168 169 247 248 249 257 258 259 267 268 269 347 348 349 357 358 359 367 368 369)
Kaiepi i found myself wishing perl 6 had a feature js has for the first time like, ever, almost 2 years after learning this and switching to this as my main language 20:41
that being Symbol
using an atomicint as an id was good enough for what i was doing, but if nothing similar to Symbol exists as a way of creating entirely unique objects given an optional string of some sort i might spend a day or two writing a library for it 20:44
timotimo m: constant Thing = Any.new; constant OtherThing = Any.new; say Thing === OtherThing 20:45
evalable6 False
timotimo m: constant Thing = Any.new; constant OtherThing = Any.new; say Thing eqv OtherThing
evalable6 True
timotimo hm, that's perhaps not optimal
Kaiepi in js, Symbol() !== Symbol(), but Symbol.for('') === Symbol.for('') 20:46
timotimo ah 20:47
Kaiepi i'm not 100% sure how the spec specifies it should be implemented, but with Symbol() the string you pass it only dictates how it gets stringified, while with Symbol.for it uses it as a key to store it in a global map of some sort that you can't reflect or anything 20:48
s/should be implemented// 20:49
tobs that should be well within reach of a module 20:53
AlexDaniel tobs: had to slap this fix on tellable6: github.com/perl6/whateverable/comm...c673c19ec1 21:04
otherwise it was .tell-ing to discord users all the time :D
tobs AlexDaniel: nice. Some oversights were to be expected I guess 21:09
Xliff m: my (@a [$a, $b, $c]) = ('a'...'z'); $c.say 21:29
evalable6 (exit code 1) Cannot call method 'say' on a null object
in block <unit> at /tmp/ixz9nrWxpy line 1
Xliff m: my (@a [$a, $b, $c]) = ('a'...'z'); @a.say
evalable6 [a b c d e f g h i j k l m n o p q r s t u v w x y z]
Xliff m: my (@a [$a, $b, $c]) = ('a'...'z'); $a.say
evalable6 (exit code 1) Cannot call method 'say' on a null object
in block <unit> at /tmp/o1wRRjdGpR line 1
Xliff ^^ Array decomposition in a my statement not spec'd? 21:30
AlexDaniel oh cool a null object 21:33
Xliff What is this "null" thing you speak of?!
AlexDaniel: Bug?
AlexDaniel something that should never happen
jnthn Yeah, it should say that the LHS is too complicated for a list assignment. 21:51
AlexDaniel or it might as well just work 21:54
m: my (Str() @a) = (0...5); say WHAT @a[0] 21:55
evalable6 (Int)
AlexDaniel heh 21:56
jnthn AlexDaniel: Just use binding if you want it to "just work" :) 21:58
AlexDaniel m: my (@a [$a, $b, $c, |c]) := [(‘a’...‘z’),]; $a.say 22:00
evalable6 a
cpan-p6 New module released to CPAN! Result (0.2.5) by 03SAMGWISE 23:02