»ö« 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.
tyil github.com/perl6/doc/pull/1635#dis...r147553947 would anyone have any input on this? being "reached" sounds a little off to me, but I cant really think of a better way to describe it either :/ 00:47
geekosaur 'once their rules are matched' 01:04
could quibble 'rule' as 'pattern' 01:05
and 'corresponding rule/pattern' if you want to be precise or formal
tyil that reads nicer, thanks! 01:14
blakebooyah p6: say 3 02:17
camelia 3
blakebooyah p6: say 3+4
camelia 7
blakebooyah p6: say 3**4 02:18
camelia 81
blakebooyah p6: say 3..4
camelia 3..4
blakebooyah p6: say (3..4)
camelia 3..4
blakebooyah p6: say (1..4)
camelia 1..4
blakebooyah p6: say 1..4
camelia 1..4
blakebooyah p6: print 1..4
camelia 1 2 3 4
blakebooyah p6: print 2..41
camelia 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
blakebooyah p6: print (2..41)**2
camelia 1600
blakebooyah p6: reverse 1..4 02:19
camelia ( no output )
ugexe you can pm the bot too
blakebooyah p6: say reverse 1..4
camelia (4 3 2 1)
blakebooyah okay sorry
not a lot of action in here tonight...does everyone have girlfriends and families now or what 02:20
ugexe many live in Europe 02:21
Geth doc/W4anD0eR96-patch-1: aac1952a7d | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammar_tutorial.pod6
Update grammar_tutorial.pod6
02:55
Herby_ \o 03:07
Geth doc: jstuder-gh++ created pull request #1636:
Modify Label Doc and Examples
03:08
Geth doc/master: 6 commits pushed by (Alex Chen)++ 03:53
doc: a2e3df3c7f | (Jeremy Studer)++ (committed by Zoffix Znet) | doc/Type/Label.pod6
Modify Label Doc and Examples (#1636)

  * Make Label method examples clearer
Changed the example for the next method so that it's output differs from that of the last example. With the change, the numbers 5 through 10 are printed, which makes it more clear that the loop has iterated a total of ... (6 more lines)
03:55
synopsebot Link: doc.perl6.org/type/Label
fudje oh wow that was confusing 05:21
fudje Can anyone comment on thread safety with NativeCall? 05:28
I've got a partial gettext binding that's using supposedly thread-safe calls to set locale (so I can have different languages in different threads); but given that Perl6 does threading differently - I wonder if the interface is going to be able to consistently remember per workload which locale to use. 05:33
fudje Or whether to just assume that I need to switch locale as part of the wrapper for each gettext call.... 05:36
(Of course anyone saying "Why are you messing with this at all, we have equivalent functionality already, here read this" is also welcome to comment :D) 05:37
geekosaur that would count as thread-local data and it will probably be a problem because perl 6 threads likely do not map 1-on-1 to pthreads threads. and I would be cautious about using a wrapper unless you also use some kind of synchronization (or: what happens if two threads call gettext at the same time?) 05:39
fudje I think the most correct behaviour would be to lock the entire wrapper there 05:41
geekosaur yes, that's what I meant
piojo ‎geekosaur‎: do you know if two OS-level reads will ever get the same $*THREAD.id? 05:54
I mean, is it possible for one perl thread to be two OS threads? 05:55
I want to use $*THREAD.id to ensure each thread has its own data, like: my $dbh = $database-handles<$*THREAD.id>. It works in testing, but am I sitting on a time bomb 05:56
Zoffix piojo: Text::CSV uses that technique IIRC, so it's probably safe, BUT, you're not keying it on THREAD id; you're just using string '$*THREAD.id'. You need $database-handles{$*THREAD.id} 06:01
fudje hmm... If I'm using Promises I pretty consistently get $*THREAD.id repeats... 06:06
geekosaur do pay attention to what Zoffix just said. <> is a single quote 06:08
{} is an expression
fudje p6: put bag(await ^10 .map: { start { $*THREAD.id } })
camelia 4(10)
geekosaur the other thing is I'm not sure whether $*THREAD tells you about the pthreads thread or the perl 6 thread 06:09
fudje p6: put bag(await ^1024 .map: { start { $*THREAD.id } })
camelia 4(1024)
fudje huh
geekosaur the perl 6 thread ID should generally be the same. whether it's the same pthreads thread that gettext is using is another question
fudje Pretty sure $*THREAD is the perl6 thread based on that :) 06:11
fudje piojo: are you using the Thread class directly or a promise (e.g. via start {}) ? 06:15
Geth doc: ecbe32439c | (Moritz Lenz)++ | doc/Language/regexes.pod6
Document :ignoremark (Issue #1133)
07:06
synopsebot Link: doc.perl6.org/language/regexes
Geth doc: b5a674d66e | (Moritz Lenz)++ | doc/Language/regexes.pod6
Document regex substitution adverbs

Closes #1133
07:32
synopsebot Link: doc.perl6.org/language/regexes
p6steve hi folks - I wonder if someone could help me out 07:57
I am trying to interpolate into a token in a grammar thus: token unam { <$unames> } 07:58
works fine in an isolated test setup - but when I copy over to my main project (2x pm several hundred lines each), I get an error - At Frame 1, Instruction 33, op 'findmeth', operand 1, expected MAST::Local, but didn't get one 07:59
I am doing something dumb??
This is Rakudo version 2017.07 built on MoarVM version 2017.07
moritz sounds like a bug in rakudo 08:00
p6steve I am loading a big HEREDOC - maybe pushing some size limit
moritz might be worth checking in a newer rakudo 08:01
p6steve ok - I'll try
moritz s/in/with/
p6steve thanks! 08:02
HoboWithAShotgun wanders the halls looking for an iron to iron out the wrinkles 08:43
HoboWithAShotgun oh come on, really? 11:08
i just debugged this for 2 hours until i found the cause. 11:09
lizmat and?
HoboWithAShotgun what could be a potential problem with this method: hastebin.com/ivasoroyiv.pl
lizmat first draft of Telemer 11:10
first draft of Telemetry documentation: gist.github.com/lizmat/9dfe921efe7...4dfdbcd68c
the $++ ? 11:11
HoboWithAShotgun aye
lizmat you intended what ? 11:12
HoboWithAShotgun no! i assumed $++ to be zero at each invokation of the method
lizmat alas, no, $++ is shorthand for a nameless state variable
HoboWithAShotgun or better, each time the loop gets entered
oh, ok. i thought it's a built in loop counter 11:13
MasterDuke lizmat: line 92-93: "to take calculate"
lizmat MasterDuke++ # fixed 11:15
AlexDaniel lizmat: working on RT+GH report :) 11:23
lizmat AlexDaniel++
moritz lizmat: looks like something that could well go into a module
lizmat you mean Telemetry, or just snap ? 11:24
moritz both :-)
lizmat so no core supported way to expose nqp::getrusage ? 11:25
moritz hmmm
that's something that could have a very thin wrapper in Rakudo::Internals, and then we can experiment in module space with more feature-full implementations 11:26
or didn't we have another namespaces that was mostly meant as a public but thin API for things that otherwise only work with nqp ops? 11:27
lizmat well, Rakudo::Internals is eh, internal ?
lizmat subject to change without notice ? 11:28
pmurias lizmat: re Telemetry docs, one thing that wasn't clear to be is what $t1 - $t2 results in
lizmat moritz: perhaps put it in lib, just like Test.pm ? 11:30
moritz lizmat: maybe 11:31
I'm unconvinced either way :-)
pmurias lizmat: if it's a Telemetry::Period maybe putting $t1-$2 in a temporary variable with a Telemetry::Period would be more informative 11:33
lizmat stupid flay wifi :-( 11:38
*flaky
jast maybe you do need to flay it, or at least threaten to
lizmat jast: tried that a few times already :-) 11:44
jast I'm all out of ideas, then :( 11:45
lizmat Draft of Telemetry::Period documentation: gist.github.com/lizmat/e601e91c90e...6b965ec770 11:51
moritz: making a Telemetry a module now seems useless, as it won't work before 80b49320 11:53
and afaik we don't have a way to check for existence of nqp ops at runtime ? 11:54
apart from EVAL I guess 11:55
buggable New CPAN upload: IO-Socket-Async-SSL-0.5.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...0.5.tar.gz 12:36
buggable New CPAN upload: IO-Socket-Async-SSL-0.5.0.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...5.0.tar.gz 12:56
colomon just tried installing Inline::Python, and it failed because of a dependency on Panda::Common 13:12
in particular the Build.pm file uses Panda::Common and Panda::Builder 13:14
ah, I guess I can install those by hand? 13:15
(by “by hand” I mean explicitly with zel install Panda::Common) 13:16
(this sort of thing is why I was running a 6 month old version of Rakudo) 13:17
colomon yes, now Inline::Python claims to install okay. 13:17
Geth ecosystem: 6615ee2f60 | (Jonathan Worthington)++ (committed using GitHub Web editor) | META.list
IO::Socket::Async::SSL now on CPAN
13:31
jdv79 m: "ab" ~~ /(.)*/; my %h = :k($0>>.Str); say %h<k>.WHAT, %h<k>[0].VAR.WHAT; %h<k>[0] = "" 13:32
camelia (Array)(Str)
Cannot modify an immutable Str (a)
in block <unit> at <tmp> line 1
jdv79 m: "ab" ~~ /(.)*/; my %h = :k(@=$0>>.Str); say %h<k>.WHAT, %h<k>[0].VAR.WHAT; %h<k>[0] = ""
camelia (Array)(Scalar)
jdv79 why is that diff there?
moritz m: my @a; @a[0] := 'abc'; @a[0] = 'def'; 13:38
camelia Cannot modify an immutable Str (abc)
in block <unit> at <tmp> line 1
moritz in the first example, the string is bound to an array item, not assigned to it
jdv79 the docs infer that arrays typically have containers 13:49
i realize what the diff is. i asked why the diff is.
i would get it more if one was a list and one was an array
and the default for list was uncontainered and array the opposite 13:50
moritz right
jdv79 so why did the first example up there create an array of non-containerized elements? 13:52
is there something there that implies binding?
mst I thnk that $0's elements are not containerised because it's not writeable, so the >>.Str returns un-containerised stuff too? 13:54
jdv79 that'd be my guess but seems confusing is part of my point. why isn't that a list in $0 then? 13:57
jdv79 well, i guess that's just a p6 design issue 13:58
mst m: "ab" ~~ /(.)*/; say $0.WHAT; 14:00
camelia (Array)
jdv79 its odd that we only have certain topicalizing control flow options
be cool if there was a if that topicalized
moritz m: sub f() { say 42 }; if f() -> $x { say $x } 14:25
camelia 42
True
moritz like that? :-)
Geth modules.perl6.org: dca2795682 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p20TravisCI.pm
Fix breakage in travis postprocessor
14:39
modules.perl6.org: 61bb5c6570 | (Zoffix Znet)++ (committed using GitHub Web editor) | use-me-for-commit-triggers
[REBUILD] it
14:40
wander m: say so 1|3|5 != 2 15:20
camelia True
wander m: say so any(1,3,5) != 2
camelia True
sena_kun eater, ping? 15:22
wander github.com/perl6/doc/blob/c091ada9...d6#L83-L87 15:30
wander ^^ this example throw an exception, and seems don't do what it explains below 15:31
oops, $promise2 is really broken, but when "say $promise2.cause;", it complain "Tried to get the result of a broken Promise" 15:33
wander but "say $promise1.cause;" runs well 15:34
HoboWithAShotgun can i have a nested operator? you may know i have unit operators, so i can say my $current = 12A; i have multiple of them and i want to be able to write 15:59
HoboWithAShotgun my $current = 12kA; my $current2 = 3mmA; and so on 15:59
but i don't want to have x alternations of the ampere postfix 16:00
so can i create a k and mm operator that combines with the A operator?
timotimo HoboWithAShotgun: you might have to force people to write k\V 16:01
moritz you can combine multiple postfix operators as long as you separate them somehow
timotimo m: sub postfix:<a>($a){ "$a a" }; sub postfix:<b>($a) { "$a b" }; say 100a\b; say 100b\a
camelia 100 a b
100 b a
timotimo m: sub postfix:<a>($a){ "$a a" }; sub postfix:<b>($a) { "$a b" }; say 100ab 16:02
camelia 100 a b
timotimo oh?
moritz m: sub postfix:<k>($x) { 1000 * $x }; sub postfix:<A>($x) { "$x Ampere" }; say 42k\A
camelia 42000 Ampere
timotimo well, isn't that neat
moritz m: sub postfix:<k>($x) { 1000 * $x }; sub postfix:<A>($x) { "$x Ampere" }; say 42kA 16:02
camelia 42000 Ampere
moritz I wonder if this is a bug
timotimo it'll break if someone introduces a kA operator in some unrelated module 16:03
suddenly the parse changes
that's not very nice
mst well, but, equally, you could totally have a j operator and a k operator and then also define a jk operator that's an optimisation over composing the two individual implementations 16:08
so it could turn out to be both a footgun and a feature
timotimo right 16:09
a featgun
mst timotimo++
twitter.com/shadowcat_mst/status/9...5215134722 # *snarf* 16:10
sena_kun my friend is getting `Unexplained error` on linux machine while installing a module. Googling shows it's a libuv error. Is there any possible workaround? 16:14
mst trout.me.uk/data.jpg 16:15
timotimo sena_kun: strace might give a hint for what exactly errored?
sena_kun timotimo, perhaps. Is just installing strace and running it like `strace zef install ...` enough? 16:16
timotimo you'll likely need to pass -f so that it doesn'"t stop tracing when child programs are launched 16:17
but yeah, that'd be enough
sena_kun ok.
timotimo it'll likely give you a firehose of information
timotimo i recommend grep -v for at least brk and mprotect 16:18
sena_kun so it means no quick workaround, just an issue filling? 16:20
mst we can't help you find a workaround when you haven't given us any diagnostic information whatsoever 16:21
right now your question is equivalent to my grandmother saying "the internet is broken" in terms of amount of detail 16:22
sena_kun well, I just assumed that, for example, previous rakudo/moarvm commit or usage of release or dances around the fire could help in case someone bumped into it already. I am not familiar with libav so I don't know is it obvious error or something with black magic. Logs are on the way, don't worry. :) 16:24
as for diagnostic information, btw, you are right, sorry. rakudobrew 5 minutes fresh, the exact module is `Cro::HTTP`. It happens on void linux. 16:27
timotimo does it happen in the test suite? cro itself suggests to install it without running the tests ;) 16:31
or at least it used to
sena_kun give me one more minute, please. yeah, during tests. 16:32
sena_kun pastebin.com/LpgxPQMt - it looks like that. strace log is still on the way. 16:33
during cro development it's not too rare to bump into some regressions, so yeah, without testing. :) But while you can --force broken tests, you cannot do anything with a hang during installation. 16:36
s/testing/running tests/
sena_kun the log weight is 39mb, so asked him for last 2-3 thousand of lines. 16:38
sena_kun pastebin.com/d0UrbNai - the log before first `Unexplained error`, and then it becomes like pastebin.com/9dABpbjT 16:47
tell me if full(39mb) log or any other info is needed. 16:48
ugexe i thought IO::Socket::Async::SSL was broken?
sena_kun it is indeed. 16:51
but it is possible to just --force it. However, I might have a clue on how to fix it... 16:52
sena_kun in the end just removed test file that triggered the problem. not enough info and remote investigation is not the best thing for night of Sunday, so never mind me. 17:33
Zoffix sena_kun: well, tell your friend to use releases instead of arbitrary, minimally-tested development commits that may have bugs 17:48
sena_kun: teh bug's in rakudo due to native call JIT changes
sena_kun Zoffix, oh, sure. Thanks!
Zoffix sena_kun: this is the ticket (I think Async::SSL is used by that module): github.com/rakudo/rakudo/issues/1220 17:49
looking at it now, thought I know nothing about JIT, so unless it's just some typo somewhere, I won't fix it
HoboWithAShotgun Can i envelope a sub in a foreign module? Specifically i want to manipulate the "proclaim" sub in Test, so it prints in color 18:31
currently using this to do that: hastebin.com/yahijosale.pl 18:32
but yeah know, it's not pretty
HoboWithAShotgun yawns wholeheartedly 18:36
Zoffix would just manipulate the TAP
TAP::Harness probably has a parser
You can wrap routines with `.wrap` method, but proclaim is not exported 18:38
nor is `our`ed.
That code has an error, how are you "using" it? 18:39
4 errors
HoboWithAShotgun what, my script? 18:40
that's Perl 5
Zoffix Oh, didn't realize they had a `when`
Is that from `switch` feature that turned out to be a bad idea and was removed or something? 18:41
HoboWithAShotgun no, Perl 5 bundles such stuff in "features" that have to be explicitly enabled 18:42
lizmat HoboWithAShotgun: the problem is really that proclaim() is not part of the official API of Test 18:43
moritz Zoffix: yes, given, when and smartmatch are "experimental" in newer Perl 5 versions
HoboWithAShotgun puts TAP::Parser and Test::Color on the todo list 18:44
unless we have a TAP Parser already
Zoffix "Feature "smartmatch" is not supported by Perl 5.26.0 at -e line 1."
lizmat thinks there is
lizmat well, modules.perl6.org/search/?q=TAP%3A%3AHarness actually 18:45
HoboWithAShotgun noted. but i gonna hit the sack now 18:46
pmurias is not sure what route should the js backend go with string handling 18:46
pmurias a whole bunch of roast tests want NFG but it seems this would slow stuff down a lot and add an extra barrier to interop with js code 18:47
lizmat pmurias: so you just want to use NFC as an alternative to NFG ? 18:50
afk for some organised crashing in curb #1 18:55
buggable New CPAN upload: URI-Encode-0.000.003_20171029.tar.gz by PSIXDISTS cpan.metacpan.org/authors/id/P/PS/...029.tar.gz 19:06
nine Sooo.... how can I actually download the dist? modules.perl6.org/dist/IO::Socket::...cpan:JNTHN 20:10
Geth perl6-examples: c539e3d67c | (Shlomi Fish)++ | categories/euler/prob284-shlomif.p6
Add the solution to Euler#284.
Zoffix nine: there's a link on search page (the CPAN icon: www.cpan.org/authors/id/J/JN/JNTHN/...5.0.tar.gz ) Just needds to be added to individual pages 20:12
nine: do you know if anything special needs to be done to this case in this commit? github.com/MoarVM/MoarVM/commit/82...e14e43L461 20:13
Adding `goto fail` up there fixes R#1220 ... trying to figure out what it doesn't like with it
synopsebot R#1220 [open]: github.com/rakudo/rakudo/issues/1220 [regression] Regression since 2017.10 breaks IO::Socket::Async::SSL tests 20:14
nine ===> Install [FAIL] for OpenSSL:ver('0.1.15'):auth('github:sergot'): Failed to open file /home/nine/.zef/store/openssl.git/08b4516ff5f6a2cb58cabd8bb42d603e0e61254b/resources/ssleay32.dll libeay32.dll: No such file or directory 20:15
nine Diagnosing this seems like a challenge of its on 20:15
own
nine Zoffix: can't find any download links on modules.perl6.org/search/?q=openssl either 20:21
Zoffix nine: there aren't any CPAN modules in those results 20:23
nine I'm not looking for CPAN modules? I'm just trying to install the dependencies of the module with which I ought to reproduce a bug. 20:24
Finally succeeded by manually hunting down the repos on github and editing the META6.json to make it installable
Zoffix Then I don't know what you wanted to do download 20:25
nine How did anyone even find the bug when this stuff is so hard to install? :)
nine Zoffix: there used to be links to github repos on modules.perl6.org? They were quite handy for what I'm doing. 20:25
nine Zoffix: the CPointer case is a red herring. It's just that the broken ASN1_STRING_to_UTF8 function also has a Pointer argument. But the VMArray argument is the broken one. 20:29
Odd though that the p5_sv_to_buf(Pointer, CArray[CArray[int8]]) method in Inline::Perl5 seems to work just fine. The signature is almost identical. 20:30
rindolf time perl6 prob284-shlomif.p6 gives me 5minutes 20:31
skirmisha mst, hi, just wanted to thank you for your effort today 20:38
rindolf it takes 45s in g++ -O3+gmp 20:41
rindolf so not too bad 20:42
my algo is likely inefficient 20:43
nine Even more curious, one of NativeCall's tests looks like this: sub TakeANullPointerArray(Pointer, CArray[CArray[int8]]) returns int32 20:50
Which really is the same just with switched arguments
Geth doc: jstuder-gh++ created pull request #1637:
Modify Dockerfile and Add Docker-related Make targets
20:57
nine Could be that we'd need a MVM_nativecall_refresh there 21:05
lizmat well, that was an interesting race 21:09
rindolf lizmat: which? 21:16
lizmat F1 Mexico
moritz and here I thought there was a race condition that lizmat++ found :-) 21:17
lizmat hehe :-)
lizmat and the winner was Max, who is actually a guy who grew up about 6km from where we live 21:18
we pass by his grandfather's icecream parlour regularly 21:19
or the place where he did his first cart racing... :-)
lizmat he's a local hero :-) 21:19
moritz nice :-) 21:20
I've had school swimming in a pool where Hannah Stockbauer trained regularly 21:21
who became world champion 21:22
en.wikipedia.org/wiki/Hannah_Stockbauer
lizmat Max is still a long way from world champion... but maybe next year :-) 21:35
moritz to be fair, the swimmers have more distances and thus more races where they can become champion :-) 21:37
and: go Max! :-)
moritz anyway, time for sleep here, TTFN 21:38
timotimo lizmat: oh btw i drove to my parent's house today :) 21:42
lizmat timotimo: so why don't you drop by tomorrow ? 21:43
timotimo got plans for tomorrow. not sure if there are plans for tuesday though
lizmat ah, ok, well, let us know 21:44
timotimo sure
lizmat we only have fitness in the morning :-) 21:44
timotimo fascinating. my touchpad really does switch between "two fingers to scroll" and "three fingers to scroll" on each reboot since i spilled some water on it 21:45
lizmat should be ok after 1pm
rindolf wow! Java consumes over 30% of my RAM when building rakudo
timotimo is there any terminal emulator that'd let me click (aka xdg-open) hyperlinks in the terminal using only keyboard commands? 22:48
leah2 ttps://wiki.archlinux.org/index.php/rxvt-unicode#Yankable_URLs_.28no_mouse.29 22:56
wiki.archlinux.org/index.php/rxvt-...o_mouse.29
timotimo oh, i remember having that a long time ago 22:57
1) sleep, 2) set that up ... maybe
geekosaur glah. there was one announced a couple months ago (either an emulator or a plugin) that extracted all URLs into a menu you could navigate by keyboard 22:58
I can't find it now :(
timotimo ooh :(
leah2 there's also such a thing for tmux iirc 22:59
timotimo the problem with that is that my tmux runs on a remote server 23:01
so i'd have to somehow get it tunneled back to my machine
leah2 there used to be times when firefox communicated with the local X11 display %) 23:02
timotimo hm. actually. if it's only about irc anyway i should use glowing bear instead of my terminal to chat
timotimo yeah, but the remote system is openbsd (or freebsd?) and pretty sure not to get a firefox installed :D 23:02
tadaa, every link is noc adorned with a number that i can use to "click" it without my mouse 23:04
annoyingly, that includes every nickname on every line :D 23:05
BenGoldberg For most irc clients, that's so you can send a file, do a whois, ignore, add to friends list, etc. 23:11
BenGoldberg ponders customizing the right-click menu there so it contains an actual "etc." item. 23:12
timotimo i believe glowing-bear only has it hooked up to put the name and a colon in the input bar 23:23
BenGoldberg Does it not have this new fangled thing known as tab completion? 23:36
BenGoldberg is suddenly contemplating writing a bash based irc client, which does a chroot to a directory which has programs named /join, /part, etc. and uses the shell's own command parser. 23:45
geekosaur that sounds like a recipe for confusion to me 23:48
also, caching issues. (the history of mh comes to mind)
knight__ Guys, I must say Perl6 is exceptionally, especially his parallelism/concur./async :-) 23:59
Great work.