»ö« 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 listens to a few songs, then ques www.youtube.com/watch?v=IfU_BLec1-o to clear the ears -_- 00:13
Geth doc: 57f7680f43 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Mu.pod6
Fix broken links in text

Fixes #1592
00:18
synopsebot Link: doc.perl6.org/type/Mu
Geth doc: 560d20ef5a | (Zoffix Znet)++ | doc/Type/Proc/Async.pod6
Document Proc::Async.Supply

Fixes #1605
00:30
synopsebot Link: doc.perl6.org/type/Proc/Async
TEttinger timotimo: make sure to listen to mouth sounds and mouth moods too
timotimo TEttinger: already have 00:31
TEttinger rollercloser is excellent
timotimo rollercloser didn't connect with me at all
TEttinger wndrwll also is bizarre and I like a lot 00:32
timotimo yes, i like that one 00:32
TEttinger oh, man. friends
timotimo friends and best are both fantastic 00:33
i love any song that samples down with the sickness
i wanna lie down to sleep but the cat is in the way 00:37
Zoffix ugh, crap. Merged wrong tickets together 01:00
"An incorrectly merged ticket cannot be unmerged via the user interface, but all is not lost! This is RT, all is never lost! It's never recommended to work directly on your RT database, but in this instance that is the only way to recover from this mistake. If you're in any way unsure of what you're doing, don't do it." 01:01
Greeeeat 01:02
Zoffix Stupid RT 01:07
And after merging, it orders all the replies by original dates, so it's a right mess 01:09
AlexDaniel` Zoffix: what I realized at some point is that merging is never a good idea. Better link the tickets 01:19
Geth doc: 39d2b97a5c | (Zoffix Znet)++ | doc/Language/operators.pod6
Get smartmatch into index

Fixes #1587
01:20
synopsebot Link: doc.perl6.org/language/operators
AlexDaniel` “Refers to” and “Referred to by” 01:20
Zoffix But then we have several tickets all about the same thing
geekosaur merging is sometimes a good idea, specifically when someone replies in such a way as to create a new ticket instead of adding to the old
AlexDaniel` that's ok, once one is resolved, someone will easily close all of them :)
wander ping 04:42
wander m: grammar G { rule TOP { '(' [<var-decl>+ % ',']? ')' } rule var-decl { 'int' \w+ } } say G.parse("(int a, int b)"); 07:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3ule TOP { '(' [<var-decl>+ % ',']? ')' }7⏏5 rule var-decl { 'int' \w+ } } say G.par
expecting any of:
wander m: grammar G { rule TOP { '(' [<var-decl>+ % ',']? ')' }; rule var-decl { 'int' \w+ } }; say G.parse("(int a, int b)");
camelia Nil
wander how to get this sentence matched, it seems non-backtrack that causes unmatch 07:22
maybe add a new rule 'parameter-list'
geekosaur m: grammar G { rule TOP { '(' [<var-decl>* % ','] ')' }; rule var-decl { 'int' \w+ } }; say G.parse("(int a,int b)"); # need to gobble a space somewhere still 07:26
camelia 「(int a,int b)」
var-decl => 「int a」
var-decl => 「int b」
wander k 07:28
wander grammar G { rule TOP { '(' [<var-decl>* % ','] ')' }; rule var-decl { <.ws> 'int' \w+ } }; say G.parse("(int a, int b)"); 07:34
m: grammar G { rule TOP { '(' [<var-decl>* % ','] ')' }; rule var-decl { <.ws> 'int' \w+ } }; say G.parse("(int a, int b)"); 07:35
camelia 「(int a, int b)」
var-decl => 「int a」
var-decl => 「 int b」
wander dirty solution
todd question: If I write a program for a customer who pays my labor to write it, who owns the program? Me or the customer? 07:47
TEttinger the NSA 07:51
TEttinger but yeah if they pay you to write it, and it was in your employment contract that you'd be paid for writing the code, they probably own it unless they have a terrible legal team 07:52
or unless they didn't pay you
todd I am a provate contractor. What they payed me for fixing the problem. They don't care how. I was wondering if they owned any of the code I wrote to fix the problem. The cusomer did not specifically ask me to write anything. 07:56
TEttinger if the contract doesn't say that ownership is transferred from the author (you) to the employer, then you own the scripts and such created to solve their problem 07:59
todd that is what I thought. Thank you! 08:02
If he specificlly ask me to write him such and such, than it belongs to him 08:03
TEttinger mostly it depends on the contract
but it sounds like you wrote it so you could complete the job, without the employer needing to own what you wrote 08:04
todd no contract. he jsut what his stuff to work 08:06
TEttinger ah, should be fine then
if he comes back and wants you to work on the same thing again, he'll know you have made tools to help the job already and can maybe just run the same scripts 08:07
TEttinger it's kinda like if you employed a plumber, and he needed to quickly make some piece of wood with some nails at the end so he could pull a clog out of a pipe. he owns the wood with nails, since he made it, and unless it was your wood and your nails, he could go home with it and use it on some later day 08:10
todd That is what I thought 08:13
todd exit 08:55
patrickz Hi everyone! 09:14
I have a C function that never returns and repeatedly calls a P6 function callback to notify of RPi button pushes. Now I want to stuff those events into a Supply. The docs advise against directly using the Thread class. Is there a cleaner way to run my blocking C function and process the callbacks than using Threads directly? 09:17
AlexDaniel` patrickz: what about using a Channel? 09:52
patrickz: oh, and you'll need a start block
patrickz: if you can show a little bit of code I can give more precise hints :) 09:53
patrickz In a moment :-)
HoboWithAShotgun yawns into into a new day 10:08
patrickz AlexDaniel`: gist.github.com/patzim/ddfd922a341...7359d37656 10:10
afk for a bit 10:11
AlexDaniel` patrickz: actually, I don't know if regular start {} block is going to work better (or work at all) in this particular case 10:15
HoboWithAShotgun uh, you're running Perl6 on a Pi or something? 10:16
AlexDaniel` yeah, seems so
AlexDaniel` I've been doing that in the past also, with a reasonable amount of success 10:17
HoboWithAShotgun which way did you install it pn the pie? 10:19
AlexDaniel` installed it from debian repos 10:21
unstable usually has a fairly recent version 10:22
HoboWithAShotgun boring ;-) was hoping for a "and then, after 20,000 miles, 17 crodoliles, 2 lions and a dragon it finally compiled" story 10:25
AlexDaniel` eater: hello 11:00
eater: mind joining #moarvm for a sec? irclog.perlgeek.de/moarvm/2017-10-21#i_15334051 11:01
HoboWithAShotgun bummer. no inline-java 11:31
Zoffix HoboWithAShotgun: well volunteered! 13:32
patrickz HoboWithAShotgun: I used rakudobrew. Takes ages to compile but works well. 13:32
HoboWithAShotgun zoffix: huh? 13:34
fatguy hello, i used dbiish, .do method but i got : No such method 'finish' for invocant of type 'Int+{DBDish::StatementHandle::IntTrue}' 15:23
yoleaux 21 Jul 2017 17:25Z <Zoffix> fatguy: Not sure if you caught it before you left, but the first FindBin equivalent I gave you was wrong. It should be `use lib $*PROGRAM.sibling: '../lib';`
moritz fatguy: looks like a bug in DBIish 15:24
fatguy moritz: hmm.. what should i use then ? please advice 15:27
moritz fatguy: try to find and fix the bug in DBIish? 15:33
fatguy: or start by showing the code that produces the error?
ryn1x Does anyone have much experience with perl6, zef, and Inline::Perl5 on windows? I have installed a clean windows vm so that I could test code for windows machines at work and can not get "zef install Inline::Perl5" to succeed. I was able to get everything working at work so I know that it is possible but can't narrow down the issue. I have tried different combinations of mingw and visual studio build tools 15:45
with no success. 15:46
fatguy moritz: i used prepared statement and now no problem 15:47
ryn1x The not so helpful error message: gist.github.com/ryn1x/14e198f0e21c...5fe60afc26 15:49
stmuk ryn1x: Inline::Perl5 doesn't install on Windows due to a windows shell quoting bug 15:54
ryn1x stmuk: I was able to get to where the build failed because of the quoting bug and just went into the mentioned file and removed the lines where it was checking the version of perl and the install succeeded. I was also able to use Inling::Perl5 just fine after the install. Now I am trying to duplicate this on a windows vm and can't even get to where the build fails because of the quote error. 15:56
MasterDuke ryn1x: what perl5 do you have installed in windows? 16:08
i think someone recently said they had the best success with Strawberry Perl 5 16:09
ryn1x MasterDuke: Strawberry Perl 5 v26 x64
ryn1x I have the same versions of perl5 and perl6 on both the working windows box and the not-working windows vm 16:10
MasterDuke same version of windows? 16:12
ryn1x Both are windows 10 x64, but the vm is a newer build. 16:14
MasterDuke hm, i don't use Perl 5 or 6 in windows, so i've probably reached the end of my ability to help, sorry 16:17
ryn1x Thank for trying. Working with windows is very frustrating. I would love to find a reliable way to use Perl6 in place of python at work though. 16:19
ugexe ryn1x: did you ever run with --debug like was suggested yesterday? this will even show you the exact command zef uses to run the Build phase 16:20
then you can cd ~/.zef/Inline-Perl5/some-random-string and run the command shown to bypass zef altogether 16:21
ryn1x ugexe: I did, I did not respond after tying it yesterday though. It did not do anything different though. I tried --verbose also. Let me try again... maybe I put the flag in the wrong order..
ryn1x ugexe: Got everything working! I messed up usig --debug yesterday. I now have a reproducable way to get everything I need working on windows. Thanks! 16:35
japhb Gah. Anyone have any idea which YAML module is currently recommended? 16:47
tinita japhb: you can try out github.com/yaml/yaml-perl6 16:49
it currently depends on libyaml
sena_kun YAMLish if native perl 6 performance doesn't bother you. otherwise something with native bindigns.
tinita note that libyaml is much more correct than YAMLish though 16:50
sena_kun noted 16:51
ryn1x Posted the steps I was able to use to get inline::perl5 working on multiple windows machines here: github.com/niner/Inline-Perl5/issues/105
japhb Yeah, I think native bindings is the right tool for my current job, thanks tinita
ryn1x Not sure if I should re-post this somewhere more relevant as it may affect more than just inline::perl5? 16:52
tinita japhb: I'd appreciate feedback on the API
japhb tinita: Gotcha; if I have any, I'll let you know. :-) 16:53
tinita thanks =) 16:54
japhb tinita: Why yaml.all.load() as opposed to say yaml.load-all()? 17:01
tinita japhb: we also wanna add load-file, and then we'd end up with load, load-all, load-file, load-file-all, dump and dump-file 17:02
japhb And does yaml.load() provide any way to load a particular doc rather than the first one?
tinita japhb: not yet
japhb tinita: or perhaps yaml.load(:all)?
tinita that would mean the same as all => 1, right? 17:03
(sorry, still perl6 newbie)
japhb Also, if it's text you're parsing, than perhaps .parse rather than .load -- and then .load unambiguously means a file
all => True
tinita well, the yaml loader actually combines a parser and a constructor 17:04
japhb tinita: Ah, for circular reference management?
s/circular//
tinita for example, yes
b2gills Usually an `all` method turns into an All Junction 17:05
m: (1,2).all.^name.say
camelia Junction
tinita so, we're not sure on the API yet. we want it to be close to the new perl5 YAML api, which is also in the works
japhb Hmmm, I see where .parse is a bit misleading then.
tinita and in perl5, we have list context, so @docs = load() just works there 17:06
japhb FWIW, the lowercase yaml. looks a little odd to my Perl 6 eyes. I'd expect either YAML.foo() -- class methods -- or exported subs like to-json() and from-json() -- so in this case instead of yaml.load(), perhaps from-yaml(). 17:07
tinita yeah, yaml is just a function, so it could be written like yaml().load 17:08
japhb What does that function do?
tinita this was ingy's idea, and I actually like it
tinita it returns an YAML::API object 17:09
tinita on that you would then be able to do any configuration 17:09
japhb So it's equivalent to YAML::API.new() ? 17:10
tinita like JSON::PP->new->ascii->pretty->allow_nonref;
yep
japhb Ah. In Perl 6 idiom, that would be more often JSON::PP.new: :ascii, :pretty, :allow-nonref;
japhb So named args to the constructor 17:11
Since we have very clean syntax for that.
tinita japhb: yeah, that would also be a possibility 17:12
japhb Still, I'd probably do: sub from-yaml(Str:D $yaml, :$all) is export { $all ?? YAML::API.new.all.load($yaml) !! YAML::API.new.load($yaml) } 17:13
tinita that would then use the default configuration?
I guess in many cases the default just works 17:14
tinita the default will not instantiate any objects, so in that case you would have to use yaml(options...).load 17:15
japhb tinita: Well, you can pass those on as well. For example: 17:17
Still, I'd probably do: sub from-yaml(Str:D $yaml, :$all, |c) is export { $all ?? YAML::API.new(|c).all.load($yaml) !! YAML::API.new(|c).load($yaml) } 17:18
But of course all of this falls heavily under the umbrella of TIMTOWTDI
tinita =) 17:19
I hope ingy will have time soon to look at it also
b2gills I have to go, but I would say that a really good Perl 5 interface, and a really good Perl 6 one may be quite a bit different, even if the lower level implementation is similar. 17:20
tinita b2gills: true
what should be the same, are the actual options for the parser and constructor 17:21
i actually have to go too...
japhb: thanks 17:22
japhb tinita: No problem, anytime I'm around. :-) 17:23
holli oh hey tina :) sup? 17:50
tinita holli! 18:09
smls jnthn++ (fixing hyper/race) 18:36
smls I've often regretted not being able to use them due to their bugginess. 18:39
Herby_ o/ 18:59
AlexDaniel: Do you know if there is any plan to include a CSV reader/writer in to Rakudo Star? 19:02
AlexDaniel` Herby_: I don't know. You should ask stmuk 19:03
Herby_ k thanks
stmuk: Do you know if there is any plan to include a CSV reader/writer in to Rakudo Star?
or maybe baked in, similar to Python CSV 19:04
lizmat Herby_: the ecosystem already has Text::CSV, only a "zef install Text::CSV" away after you install Rakudo * 19:05
Herby_ lizmat: thanks. I haven't had much luck with zef and getting modules installed. 19:07
lizmat :-(
Herby_ just tried to install Text::CSV again and got a failure: pastebin.com/Jn6seHX7 19:09
I believe it is related to this issue: github.com/Tux/CSV/issues/5 19:11
lizmat Herby_: I'm pretty sure you can safely "--force-test" on the install for Text::CSV 19:17
Herby_ lizmat: that successfully installed. thanks 19:23
lizmat you're welcome :-)
stmuk Herby_: I don't have any plans to. It's a simple enough format to use .split with (or install Text::CSV) 20:17
Herby_: its also not pure perl 6 which may lead to problems with Windows
oh your error is on Windows 20:18
Herby_ stmuk: ok thank you 20:20
stmuk Text::CSV passes on linux so looks like possible Windows issues 20:22
you could also try CSV::Parser 20:23
Herby_ I was able to get it working using lizmat's tip of "--force-test"
stmuk probably worth adding a Github issue for Windows/Text::CSV 20:24
Herby_ I think one has been opened: github.com/Tux/CSV/issues/5 but I 20:25
stmuk that looks like something different now fixed 20:27
also it points out Text::CSV tends to track the very newest Perl 6 and may break on older 20:28
your problem is probably Windows specific
raschipi Well, good to notice Text::CSV is uselees then, will use something else if I need to deal with CSV. 20:29
stmuk I'm sure its very good for some use cases (eg. quickly parsing) due to the C code 20:43
Herby_ Ok, I have Text::CSV and CSV::Parser both installed (Windows 10). I have an 80 MB CSV file. Whats a simple way to benchmark the two? 21:00
now - INIT now? 21:01
gfldex m: { sleep 5; say now - ENTER now }
camelia 5.00164427
timotimo stmuk: did you just say csv is simple enough to use .split with? 21:23
TEttinger hehe
geekosaur that's the same order of mistake as parsing html with regex >.>
TEttinger ZALGO HE COMES 21:24
gfldex .split talks Regex. I would not count that as simple.
geekosaur watch out for the tentacles\
Herby_ <the center cannot hold> 21:25
timotimo gfldex: if you want to have a lookbehind that figures out if the number of " up to the beginning of the file are even or odd (not counting escaped ones), sure i guess? 21:26
stmuk timotimo: up to a point, depends on the exact file
timotimo if you're in complete control of the file contents, you might as well use a different format instead 21:27
if you're not, you have to be resilient in case "evil" input comes your way
timotimo afk again
stmuk sure the devil is in the edge cases 21:29
gfldex m: say "Z҉A҉L҉G҉O̚̕̚ ".univals 21:34
camelia (NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN)
gfldex ^^^ this made me chuckle
stmuk hmm there is a p6 grammar based solution but its in the darkecosystem 21:41
the ABNF in rfc4180 could also be used 21:42
Herby_ dumb question but how do I get the latest Rakudo Perl 6? Isn't it 2017.09? 21:51
Herby_ rakudo.org/how-to-get-rakudo/ 21:52
Is that showing 2017.07 due to it being Rakudo Star?
stmuk yes
geekosaur yes
and star will always lag the development releases to some extent, even if only by a week 21:53
the easiest way to get a devel release is rakudobrew, but any time you're doing that you're living on the bleeding edge and can expect to get cut >.>
Herby_ i don't like bleeding my own blood 21:56
Geth doc: 36fb9774f7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/typesystem.pod6
Clarify `is nodal`

It only applies to `List` methods
23:14
synopsebot Link: doc.perl6.org/language/typesystem
Herby_ is there a coding style guide that anyone can recommend? I'm coming to learn that I'm terrible at naming things, and sticking to naming conventions 23:57