»ö« 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.
nicq20-mobile MasterDuke: Yeah that is pretty nice, but it was added after the most recent release. So I don't have access to it yet. :/ 00:15
nicq20-mobile MasterDuke: irclog.perlgeek.de/perl6/2017-07-11#i_14857030 00:17
MasterDuke nicq20-mobile: ah, well the next release is just a couple days away 00:22
nicq20-mobile Woo! 00:23
perlawhirl . 00:25
yoleaux 11 Jul 2017 19:11Z <lizmat> perlawhirl: should this say True or False in your book: say <a b c>.Mix ⊄ <a b b c d>.Mix
ugexe re: $*THREAD.id - I dont know how evans was creating his threads, but if he was using `start { }` then its totally expectable to get the same $*THREAD.id since that only schedules code to be run 00:26
perlawhirl .tell lizmat I'm not sure I'm an authority :D The docs say a Mix is like a Bag, so my opinion is it should behave similar to bags, ie: False. 00:27
yoleaux perlawhirl: I'll pass your message to lizmat.
timotimo ugexe: it was about await shuffling tasks between threads
ugexe ah i see 00:34
Geth doc: 1ba249d7ab | (Will "Coke" Coleda)++ | xt/code.pws
track new word
00:39
lookatme morning 00:47
travis-ci Doc build failed. Will "Coke" Coleda 'track new word' 01:00
travis-ci.org/perl6/doc/builds/252629375 github.com/perl6/doc/compare/580bb...a249d7abd3
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 01:00
Geth doc: e66006021d | (Will "Coke" Coleda)++ | 19 files
Revert "Replace occurances of =head2 sub with routine for consistency"

This reverts commit 0b005062fb63f7b62f79f318a1bfe450c3d49010.
This commit breaks the build, causing the error:
  > Invocant of method 'wordcase'
  > must be an object instance of type 'Str', not a type object
  > of type 'Str'. Did you forget a '.new'?'
01:50
tony-o nicq20: i am, kinda 02:13
i am about to go eat, what's up?
actually i'm late to go eat, if you PM i'll ping you when i'm back nicq20
timotimo i can't reproduce $*THREAD not updating when a task gets shuffled around between workers 07:00
timotimo oh, i think i know what i did wrong 07:12
ufobat ola :D 07:57
Zoffix "we do have something that makes sure dynamic variables from where you called start will stick around for the inside of the start block" 10:40
It's the $*PROMISE dynvar whose $!dynamic_context is set to the context of pre-cue code. Recently-ish (~2017.06) there was a bug where .then wasn't setting it, though I took care for look for all other cases in Promise.pm that failed to set it and I think they all do now. 10:41
And &DYNAMIC looks to see if there's a $*PROMISE dynvar if get getlexdyn fails (and lastly looks in PROCESS::) 10:42
timotimo but does the dynamic_context of the $*PROMISE not keep the old $*THREAD alive? 10:46
Zoffix I see a $*THREAD made when Thread gets created 10:48
I've not seen the code that shows it not being updated or whatever...
perhaps OP assumed each `start` would have a unique thread.id 10:50
timotimo i wrote some code that prints the $*THREAD.id as well as the $_ for the task created 10:52
and it gave me lots of different thread id -> $_ combinations
Zoffix What's $
?
timotimo just from the for loop i used to create 20 tasks
Zoffix There's only 16 threads, so yeah, the ids would repeat 10:53
timotimo well, i also do an await Promise.in(0.1.rand) between printing them 10:54
timotimo that's the crucial part of the whole thing 10:54
to await in the middle
Zoffix Ah, I see. it gets resumed on another thread? 10:55
Zoffix & # work
araraloren evening 11:36
lizmat araraloren o/ 11:43
araraloren lizmat, ^_^ 11:50
andrzejku araraloren, helo :) 12:10
[Coke] seen on FB: ()() is not a palindrome, but )(() is. 12:15
yoleaux 11:17Z <dogbert17> [Coke]: htmlify works again, many thanks for fixing
Juerd [Coke]: The truth hurts. 12:18
araraloren andrzejku, hi 12:28
Game time
andrzejku gaym time ;D 12:30
Morfent quick question, is does perl6 support freebsd? rakudo and pugs ports have been deleted for years now, and parrot apparently no longer targets perl6 12:49
*does perl6 support freebsd 12:50
Zoffix rakudo is the lastest game in town. Whether it supports freebsd is really a question of whether there's any volunteers willing to ensure that support. I think someone was trying that out not so long ago; unsure what the end result was 12:51
llfourn I'm pretty sure you can build it on fbsd 12:53
Zoffix You could try compiling from sauce: git clone github.com/rakudo/rakudo/ ~/.perl6; cd ~/.perl6; perl Configure.pl --gen-moar --gen-nqp --backends=moar; make; make test; make install;
llfourn (not sure if there's a port though)
Zoffix and adding ~/.perl6/install/bin to PATH and runnign with perl6
Morfent there is no port 12:55
i'll try that though
thanks
perlpilot Morfent: you might want to use rakudobrew if you want something that takes care of the details for you. 12:58
Zoffix *sigh* 12:59
Zoffix You don't want rakudobrew, unless you plan to use multiple versions of rakudo at the same time. 13:00
And it requires doing extra stuff like rehashing after installing binaries that you normally don't need to do 13:01
stmuk_ perl6 worked fine on FreeBSD last time I tried it
nicq20 Comments are considered part of whitespace right? 13:04
llfourn by the compiler? yes.
lizmat fg 13:05
nicq20 Well that explains why my stuff is not working then. 13:07
Morfent i don't think rakudobrew's something i entirely need 13:08
llfourn nicq20: what kind of stuff is that?
nicq20 I'm trying to emulate the P5 module Smart::Comments. The idea is that comments beginning with >3 '#' will be displayed. 13:09
llfourn ah, for that you'll need to modify the compiler with a slang. Is that what you're doing? 13:10
nicq20 llfourn: Yeah, this is what I have so far: github.com/nicqrocks/perl6-smart-comments 13:11
llfourn hmm what you did looks like it should work :\ 13:13
nicq20 llfourn: By calling the regex 'comment:sym<smc>' it gets called, but the QAST returned is never executed. If I call it 'statement_control:sym<smc>' then it never gets called due to the compiler seeing it as whitespace.
llfourn ahhhh
yep that makes sense 13:14
nicq20 Really not sure how to get aroun that. :/
*around
llfourn well...I'm pretty sure there's a $*CURPAD or something variable 13:15
you could append your QAST into it perhaps
though YMMV
nicq20 What is that? 13:16
llfourn it's the current QAST::Block object ie lexical scope
the things that are in it will be executed. Each statement appends to one.
nicq20 What about YMMV?
llfourn your milage may vary 13:17
# YMMV is a thing right?
moritz it is 13:19
llfourn ah nice. 13:20
nicq20 Are there any docs/examples on how to use it? I can't seem to find it in Rakudo or NQP. 13:24
llfourn definetly not
but you can .push onto it and I think that will work 13:25
maybe if it doesn't try wrapping your QAST in a QAST::Stmts
so $*CURPAD.push(QAST::Op.new(...)) # or whatever 13:26
nicq20 Ah, ok.
llfourn though I've never tried this and it might be a terrible idea
nicq20 Hmm... Looks like it does not have a `.push` method. 13:29
"of type NQPMu"
llfourn $*CURPAD is NQPMu?
nicq20: you might try looking at Actions.nqp 13:31
there are some places where $*CURPAD/QAST::Block are used
nicq20 I am, but there are examples of using `.push` with $*CURPAD.
github.com/rakudo/rakudo/blob/nom/....nqp#L2911 13:32
Geth_ marketing: 380b76f4c3 | (Zoffix Znet)++ | 23 files
Add TimToady Poster

  "You have more than one way to say it...
   Have more than one way to do it."
13:35
AlexDaniel that's pretty cool 13:36
evanm Hi, I would like to contribute information to the bug tracker, but I can't seem to find a way. 13:46
AlexDaniel huggable: rakudobug
huggable AlexDaniel, Report bugs by emailing to [email@hidden.address]
AlexDaniel evanm: just send an email to this address ↑, that's if you want to file a bug report 13:47
evanm I would like to comment on an existing bug.
AlexDaniel ah-ha, then… there are two options
I think one is to write an email to [email@hidden.address] and include this in your subject: [perl #131722] 13:49
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131722
AlexDaniel where instead of 131722 you write the actual ticket number
or, you can create a bitcard account, and then you'll be able to write a comment directly on the website
evanm AlexDaniel: Thanks. I have already created a bitcard account, but the "Reply" and "Comment" links don't seem to work. 13:50
AlexDaniel evanm: hmm, what do you see when you click them?
evanm I get a mostly blank page with the message "This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure." 13:51
AlexDaniel evanm: can you see anything at all when you're logged in? 13:51
evanm fwiw the page has no opening <html> tag, <head>, etc 13:52
AlexDaniel evanm: for some reason some newly created accounts are experiencing this bug and we don't know why, yet…
evanm AlexDaniel: I can see the bugs but it says "Welcome anonymous guest" at the top
AlexDaniel ah wait, but then you're not logged in?
click “login as another user”, what happens next? 13:53
evanm AlexDaniel: I appear to be logged in
evanm AlexDaniel: If I log out, the "About" page includes information about Bitcard 13:53
AlexDaniel: If I log in, the information about bitcard disappears 13:54
AlexDaniel: Rather, the gray "Login" box disappears, the yellow box about Bitcard is still there 13:55
AlexDaniel evanm: hm, I think a screenshot would help a lot, but I have a feeling that you're experiencing the bug mentioned above 13:55
although what you see is slightly different… 13:56
evanm AlexDaniel: Oh, I think I figured it out
AlexDaniel: I had a bitcard account but had not finished creating a "Persona" 13:57
nicq20 llfourn: I think it's not working because $*CURPAD does not exist in the comments scope.
evanm AlexDaniel: Now when I am logged in I see "My open tickets" (empty) but no way to browse the bugs. 13:59
AlexDaniel: If I enter a specific bug number, I get the message "No permission to display that ticket" 14:00
AlexDaniel evanm: like this? files.progarm.org/2016-02-05-02140..._scrot.png 14:03
evanm AlexDaniel: Yes.
AlexDaniel evanm: okay, *now* we are seeing the bug I was talking about :) 14:04
evanm: just drop an email to [email@hidden.address] saying that your account is broken, and of course include the information about your account 14:05
evanm: oh also
evanm: in your email, say that it is associated with #127461 14:06
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=127461
AlexDaniel (which is the internal ticket ID for the same problem I had a year ago)
evanm: I know it's confusing, sorry for the trouble. 14:07
in fact, I have a feeling that there are more people experiencing this problem, but they probably give up completely and don't even reach this channel… 14:08
so in the end we have only a couple of documented cases, uh…
mst, [Coke]: is there anything we can do about this? ↑ 14:09
that's *at least* the fourth time I see somebody get into this trouble
mst odd 14:11
so this is "newly created bitcard accounts sometimes don't get any permissions" ? 14:12
evanm mst: I also hit an issue where a half-created bitcard account (without a "Persona") led to a buggy experience in the RT... maybe related? 14:16
AlexDaniel: Ok, I sent a message to perlbug-admin about not having permissions
[Coke] AlexDaniel: I can do nothing about it other than refer people to ping the bug admins, as you did. 14:20
mst might be worth trying to convince them to consider there's a general bug rather than just fixing stuff one at a time 14:21
[Coke] waves to Morfent.
Morfent waves back 14:29
evanm Speaking of new user issues, the issue I was going to comment on is #131025. Rakudo Star's p6doc is broken on OSX; it appears to be because the DMG does not ship with any pod files / "doc" directories. 14:33
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131025
evanm Would be great if the Keeper of the Star could take a look at this issue, as it's a pretty significant usability problem for Mac users 14:34
Geth_ marketing: 3e4b7482a4 | (Zoffix Znet)++ | 5 files
Add "Rakudo Concise" Poster

  "Why spend 9 hours programming when you can be done in 5?
When you are not writing a novel, use Rakudo."
14:36
AlexDaniel and there we have it… rakudo language :S 14:51
the poster is awesome though 14:52
nicq20 Is it possible to override a class method with one from a role? 15:03
nicq20 Ah, wait. NM. 15:05
Zoffix AlexDaniel, yup :) And the concept in the poster is entirely, 100% unmarketable under a "Perl" name :) It *is* an editable poster, tho ;) 15:11
pending an improved extended name :)
evanm Hi, is Rakudo's Configure supposed to accept "--with-moar="? INSTALL.txt indicates that it should work, but the script doesn't recognize the option 15:20
stmuk_ evanm: I know what the problem is (not OS X specific) and its now fixed if you upgrade p6doc 15:21
evanm stmuk_: Great, thanks. I worked around the issue by symlinking .perl6/doc to a checkout of perl6/doc 15:22
Zoffix evanm: doesn't look like it: github.com/rakudo/rakudo/blob/nom/...pl#L35-L42 15:23
mst I thought rakudo's configure took maybe --with-nqp ? 15:25
mst needs to go back and see how much of the crazy involved in his cpan dist prototypes is still required
and actually upload the bloody things
Zoffix yeah, but not --with-moar looks like
mst well NQP is tied to the moar so surely it should find the moar from the NQP ?
in theory
jnthn Rakudo depends on nqp, not MoarVM directly
mst it may still not be exactly *good* at doing that, but that should theoretically work 15:26
stmuk_ if someone can close rt.perl.org/Public/Bug/Display.html?id=131025 pointing at github.com/perl6/doc/commit/7d9e87...e9d1bcd560 I'd be grateful 15:26
Zoffix stmuk_: why not close yourself? 15:27
stmuk_ I can try but I'm fairly certain I can't 15:28
Zoffix What's your rt username? I can give you perms
stmuk_ [email@hidden.address] 15:29
Zoffix ok, should be able to close now 15:31
stmuk_ makes an offering to the RT God and logs in and out again
stmuk_ done 15:34
Zoffix \o/
Opened a ticket to update rakudo's INSTALL.txt to fix the --with-moar problem: rt.perl.org/Ticket/Display.html?id=131745 15:35
ugexe it also mentions nqp-rx in the same paragraph 15:39
nadim Hi, is it possible to get the text of a sub? actually an anonymous sub. 15:42
Zoffix nadim: none that I know of 15:43
Well, with a slang it's probably possible
nadim ok thank you (hada list of sub for a test that I wanted to display as an extra information) 15:44
Geth_ marketing: fc5d03653b | (Zoffix Znet)++ | 2 files
Add square versions of "Rakudo Concise" poster

Social-media-friendly format.
nadim Is there a way to read a keypress without echoing it? 15:46
Zoffix yup. Disable the echoing/buffering in your shell.
I forget how. stty or something like that 15:47
ugexe there is also Terminal::Readsecret
nadim Using Terminal::Print (which is a bit buggy so alternatives are welcome) to display a data dump and I'd like to implement scrolling, folding, etc in the terminal
stmuk_ I'm wondering if people might think "Rakudo Concise" was a new distribution 15:49
Zoffix Let them ;) 15:50
nadim ugexe: I don't mind using readsecret but asking people to download and install it is a bit of a deal breaker 15:51
ugexe you could also have your users enter input as morse code and SIGWINCH
stmuk_ I'm baffled by rt.perl.org/Ticket/Display.html?id=123497 I've never seen any shebang issues with OS X .. anyone know what's going on there 15:51
hmm /usr/local/Cellar is homebrew 15:55
geekosaur most systems have a limit to how deeply you can nest #! lines 16:07
on linux that limit is fairly high; on *BSD (including OS X) it's low
so at some point the exec fails and the shell's fallback path interprets it 16:08
stmuk_ still puzzled to why they are seeing it. If anything its more likely under rakudobrew I'd have thought 16:09
geekosaur it's been seen under rakudobrew
stackoverflow.com/questions/998812...ly-ignored 16:10
stmuk_ hmm homebrew seems to use its own shims 16:11
geekosaur yes 16:12
geekosaur I'd have to dog through ,y logs to find references but people using rakudobrew have definitely run into it before and it's one of the reasons people here sometimes get grumpy about use of rakudobrew 16:20
mvr707 "zef install <module>" works on native machine where perl6 is compiled. But when I copy the install to a lower memory machine, perl6 is working fine, but "zef install" reports problem "fetching" the module. Any ideas? 16:31
[Coke] zef install is fetching from the network - are you sure your second machine has access to whatever the module is? 16:33
ugexe what problem? 17:09
i believe it should tell you the backends available and which ones are not 17:10
ugexe mvr707: pastebin the output of `ZEF_PLUGIN_DEBUG=1 zef --debug install CSV::Parser` and I can give you a better idea 17:12
andrzejk_ it looks very nice with shaders 18:36
however I like more the previous version
rightfold Does Perl 6 feature STM? 18:38
timotimo it does not 18:40
if you mean software transactional memory
there were thoughts about that at some point
rightfold OK!
evanm Hi, I have a question about wrapping C libraries 18:41
Is there a preferred convention for Enum values? Let's say in C there's something like: 18:42
enum { LXW_CHART_LINE, LXW_CHART_SCATTER }
I'm curious whether I should make the Perl 6 API "enum Chart <line scatter>" or "enum Chart <LXW_CHART_LINE LXW_CHART_SCATTER>" 18:43
(or even <lxw-chart-line lxw-chart-scatter>) 18:44
timotimo yeah that's a good question
i have no good answer to
evanm I prefer the first style, but I've hit strange errors if there are name conflicts in the same file 18:46
evanm e.g. it doesn't seem to like "enum Chart <line scatter>" and "enum Shape <line rectangle>" in the same scope 18:47
geekosaur I think that's expected, yes, since the enum values get exported into the main namespace 18:48
although arguably it should be a warning and then require qualification on names
(currently said qualification is optional, which is why it's an error to reuse names)
evanm geekosaur: it looks like if I put the enums in separate compunits I can effectively require qualifications 18:54
moritz m: enum Shape <line circle>; enume Char <line scatter>; say Shape::line
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Char used at line 1
Undeclared routine:
enume used at line 1. Did you mean 'rename'?
moritz m: enum Shape <line circle>; enume Chart <line scatter>; say Shape::line 18:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Chart used at line 1
Undeclared routine:
enume used at line 1. Did you mean 'rename'?
moritz m: enum Shape <line circle>; enum Chart <line scatter>; say Shape::line
camelia Potential difficulties:
Redeclaration of symbol 'line'
at <tmp>:1
------> 3<line circle>; enum Chart <line scatter>7⏏5; say Shape::line
line
Geth_ marketing: a828697fb9 | (Zoffix Znet)++ | 6 files
Tweak "Rakudo Concise" poster; stmuk_++

To make it more obvious "Concise" ain't part of the name
19:40
rindolf Hi all! Can anyone tell me how to make this p6 code faster in rakudo/moar? www.shlomifish.org/Files/files/text...mif-p6.txt ; this runs much faster - github.com/shlomif/project-euler/b...43_v2.bash 20:16
nicq20 rindolf: What is this designed to do? 20:23
rindolf nicq20: solve projecteuler.net/problem=343 20:24
nicq20 Ah, ok. 20:27
nicq20 rindolf: Just looking at the concept, it seems like it can be done in a much more consise way. What is the 'Primes' class used for exactly? 20:30
rindolf nicq20: for finding the factors
nicq20: see MAIN
nicq20 rindolf: Oh, I see now. 20:31
rindolf nicq20: yes 20:33
nicq20: I copied it from prob003-lanny.pl 20:34
nicq20 Ok, I think I got a much simpler version working 20:36
m: sub f(Rat $r) { my $n = $r.numerator; my $d = $r.denominator; return $r if $d <= 1; f1((++$n)/(--$d)); }; f(1/20) 20:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
f1 used at line 1. Did you mean 'fc'?
nicq20 m: sub f(Rat $r) { my $n = $r.numerator; my $d = $r.denominator; return $r if $d <= 1; f((++$n)/(--$d)); }; f(1/20)
camelia ( no output )
nicq20 m: sub f(Rat $r) { my $n = $r.numerator; my $d = $r.denominator; return $r if $d <= 1; f((++$n)/(--$d)); }; say f(1/20)
camelia 6
nicq20 Ah, there we go.
nicq20 rindolf: Unless I'm misunderstanding the problem, this function will do it when given 1/k 20:38
rindolf nicq20: ah, i think it's not efficient 20:53
nicq20 rindolf: I agree. 20:54
kybr anyone have pointers on setting up callbacks with c libraries and NativeCall? 23:09
timotimo we have a few projects that do it 23:16
and there's tests in t/nativecall under rakudo that also show how it's done
kybr: ^
GTK::Simple has callbacks, for example. the async SSH one does, too 23:17
kybr timotimo: thanks. that's just what i wanted. 23:27
kybr MoarVM panic: Internal error: Unwound entire stack and missed handler :( 23:33
geekosaur you have to handle perl 6 errors including Failures inside your callback; there's nothing to do with them otherwise because C has no clue what they even are 23:35
(note that Nil is a delayed silent 'exception' and Failure is a delayed noisy one) 23:36
timotimo yeah, there's nothing in C that moarvm could cooperate with to do stack unwinding and cleanup. the C code you were calling that called you back, it could have done all sorts of things on the stack, like it could assume its stack frame would live a bit longer and pass some pointers to the stack around 23:45
not to mention resources allocated between oyu calling it and it calling you back. that's buffers malloced, sockets created or other kinds of files opened ... 23:46
anyway, bedtime