Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-29

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:21 mcmillhj joined #perl6
00:23 Cabanossi joined #perl6
00:37 BenGoldberg joined #perl6
00:38 Geth ¦ doc: CurtTilmes++ created pull request #1293: Add section on Pod rendering to Text
00:38 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1293
00:40 labster joined #perl6
00:41 geekosaur joined #perl6
01:08 Cabanossi joined #perl6
01:14 kurahaupo_ joined #perl6
01:16 kurahaupo__ joined #perl6
01:18 kurahaupo_ joined #perl6
01:19 kurahaupo` joined #perl6
01:22 kurahaupo joined #perl6
01:31 raschipi joined #perl6
01:39 cdg joined #perl6
01:39 bjz joined #perl6
01:49 ilbot3 joined #perl6
01:49 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:53 Cabanossi joined #perl6
02:07 Geth ¦ doc: 5ced9b13d0 | (Curt Tilmes)++ (committed by Zoffix Znet) | doc/Language/pod.pod6
02:07 Geth ¦ doc: Add section on Pod rendering to Text (#1293)
02:07 Geth ¦ doc:
02:07 Geth ¦ doc: * Add section on rendering Pod to Text
02:07 Geth ¦ doc:
02:07 Geth ¦ doc: * typo head => head2
02:07 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5ced9b13d0
02:08 alyptik joined #perl6
02:10 samcv this is not bad https://gist.github.com/samcv/5339208c44a4d65f5165508e02dd0cee
02:11 samcv that md was generated from a script
02:14 kurahaupo joined #perl6
02:23 Cabanossi joined #perl6
02:38 aborazmeh joined #perl6
02:38 aborazmeh joined #perl6
02:44 Geth Swapped META.info → META6.json in 2 dists in https://github.com/perl6/ecosystem/commit/005317e258
02:47 noganex_ joined #perl6
02:48 ugexe https://github.com/ugexe/zef/issues/154#issuecomment-298141904 # spdx expression grammar with a recursion problem :/
03:08 Cabanossi joined #perl6
03:17 bjz joined #perl6
03:20 TreyHarris alphah: samcv ranguard huggable DrForr ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ilmari ugexe u68fiuk6sf
03:20 TreyHarris argh, cat
03:20 TreyHarris sorry
03:31 lucs joined #perl6
03:37 Cabanossi joined #perl6
03:44 Geth Swapped META.info → META6.json in 2 dists in https://github.com/perl6/ecosystem/commit/e1b91980d6
03:56 ugexe samcv: https://github.com/ugexe/zef/compare/reporter can generate these http://testers.p6c.org/reports/145801.html in addition to your ecosystem-tests, but its not in master
04:03 TreyHarris Design q: If you can write a typical object-construction passed-attribute sanity-check as a (simple) argument constraint, should you do the sanity-checking that way and not by throwing a custom exception in the BUILD/TWEAK body? Does your opinion change if most sanity checks can be done that way, but one argument can't? If not, should I throw an X::TypeCheck::Binding::Parameter myself, or throw a custom
04:03 TreyHarris exception for this single argument?
04:05 TreyHarris Since if I get into the body, the failure was not in binding, seems like I should throw something else. But that makes it feel more like I shouldn't use argument constraints for this purpose at all
04:07 TreyHarris it's an implementation detail that I sanitized my input in a way that made binding fail. (Can I customize the exception messages a named subset will throw?)
04:12 skids If we are talking about where clauses on a custom .new, I'd stop short of saying those should be "avoided", but they AFAIK they have speed penalties, and they definitely have side-affects on MMD if your .new may ever be multified.
04:13 skids Well, you can catch and throw something else I guess.
04:16 TreyHarris skids: I was talking where clauses or named subset parameters on BUILD, i.e.
04:16 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(Positive :$x = 0) { $!y = $x } }; Bar(x => 3).say
04:16 camelia rakudo-moar 5e7401: OUTPUT: «Cannot coerce to Bar with named arguments␤  in block <unit> at <tmp> line 1␤␤»
04:16 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(Positive :$x = 0) { $!y = $x } }; Bar(x => 3).perl.say
04:16 camelia rakudo-moar 5e7401: OUTPUT: «Cannot coerce to Bar with named arguments␤  in block <unit> at <tmp> line 1␤␤»
04:16 TreyHarris oh, this works in v6.c
04:17 sena_kun joined #perl6
04:17 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(Positive :$x = 0) { $!y = $x } }; Bar(x => -3)
04:17 camelia rakudo-moar 5e7401: OUTPUT: «Cannot coerce to Bar with named arguments␤  in block <unit> at <tmp> line 1␤␤»
04:18 kent\n joined #perl6
04:18 sena_kun
04:18 yoleaux 28 Apr 2017 23:54Z <samcv> sena_kun: new format for the module tests. json overview, and in a folder of the same name seperate log files for each module's installation run http://hack.p6c.org/~samcv/ecosystem-tests/
04:18 Khisanth joined #perl6
04:19 TreyHarris bisectable6:  class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(Positive :$x = 0) { $!y = $x } }; Bar(x => 3).perl.say
04:19 bisectable6 TreyHarris, On both starting points (old=2015.12 new=5e74017) the exit code is 1 and the output is identical as well
04:19 bisectable6 TreyHarris, Output on both points: «Cannot coerce to Bar with named arguments␤  in block <unit> at /tmp/8j2PGqgXT3 line 1␤»
04:19 TreyHarris whuh? I just copy-pasted from the REPL
04:19 skids Why coerce and not .new?
04:20 TEttinger joined #perl6
04:21 TreyHarris skids: oh, that was my mistake, in closing the lines up for camelia I removed the new-
04:21 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(Positive :$x = 0) { $!y = $x } }; Bar.new(x => -3).perl.say
04:21 camelia rakudo-moar 5e7401: OUTPUT: «Constraint type check failed in binding to parameter '$x'; expected Bar::Positive but got Int (-3)␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:22 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(Positive :$x = 0) { $!y = $x } }; Bar.new(x => 3).perl.say
04:22 camelia rakudo-moar 5e7401: OUTPUT: «Bar.new(y => 3)␤»
04:22 Cabanossi joined #perl6
04:23 TreyHarris skids: you would recommend writing a new and not a BUILD? why? it seems like a simple input-sanity check shouldn't be a heavy-lift operation
04:24 skids m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(:$x = 0) { $!y = $x } }; Bar.new(x => -3).perl.say
04:24 camelia rakudo-moar 5e7401: OUTPUT: «Type check failed in assignment to $!y; expected Bar::Positive but got Int (-3)␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:24 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod TWEAK(Positive :$x = 0) { $!y = $x } }; Bar.new(x => 3).perl.say; Bar.new(x => -3).perl.say
04:24 camelia rakudo-moar 5e7401: OUTPUT: «Bar.new(y => 3)␤Constraint type check failed in binding to parameter '$x'; expected Bar::Positive but got Int (-3)␤  in submethod TWEAK at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:24 TreyHarris even TWEAK works
04:24 skids Don't know which message I prefer, too tired.
04:24 skids No I was just assuming you were using new.
04:24 samcv o/ sena_kun
04:25 sena_kun samcv, o/
04:25 samcv have a script i'll upload that generates this https://gist.github.com/samcv/5339208c44a4d65f5165508e02dd0cee
04:25 samcv well not automatically. but i'll probably work it into the other script
04:25 skids I suppose the binding message at least says the name of the parameter.
04:27 skids anyway, sleep time.
04:27 sena_kun samcv, haven't you already done all the work? :o
04:27 samcv maybe. idk
04:27 samcv it's not automated yet and idk where to put it yet
04:28 samcv or how to keep track of issues
04:28 samcv but at least one point further i guess
04:28 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod TWEAK(Positive :$x = 0) { $!y = $x } }; Bar.new(x => 3).perl.say; try { CATCH { default { say .WHAT.perl }; Bar.new(x => -3).perl.say }
04:28 camelia rakudo-moar 5e7401: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3WHAT.perl }; Bar.new(x => -3).perl.say }7⏏5<EOL>␤»
04:28 sena_kun samcv, well, https://github.com/perl6/ecosystem/wiki/State-of-modules-on-nom - this page was created, but haven't used since 2012(oh wow), so I think, we can use it now.
04:29 samcv hmm
04:29 samcv and now the thing has stalled. i think. it's asking me for github password and username
04:30 TreyHarris m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod TWEAK(Positive :$x = 0) { $!y = $x } }; Bar.new(x => 3).perl.say; try { CATCH { default { say .WHAT.perl } }; Bar.new(x => -3) }
04:30 camelia rakudo-moar 5e7401: OUTPUT: «Bar.new(y => 3)␤X::TypeCheck::Binding::Parameter␤»
04:30 ugexe exceeded your request limit?
04:31 samcv messed up my tty and now it's not responding anymore
04:31 TreyHarris samcv: are you using an OAuth token, or ssh?
04:31 samcv this is a server. it doesn't have git setup on my account
04:32 samcv and it only happens for some module i'm not sure which
04:32 ugexe ah, a bad url usually
04:32 samcv but it should kill it.
04:32 samcv idk why it ruins everything
04:32 TreyHarris samcv: I don't understand. It's doing things on your behalf on github, how can it not have your account?
04:32 samcv the tty is mostly frozen
04:33 samcv it isn't doing anything on github
04:33 samcv different than the one i've been submiting PR with
04:33 sena_kun afk for 5 mins
04:33 TreyHarris But in general, ssh and password-based https gets throttled after many fewer requests than a token does.
04:33 samcv so this one only does client side things on git
04:33 samcv i have no setup. are you implying github is throttling clone's?
04:33 samcv or whatever?
04:33 samcv got to 528 modules or so
04:34 samcv i don't think so because if i start it again. it'll work
04:34 samcv ok good. `clear` fixed my tty
04:34 TreyHarris no; you said it's asking for your github username and password. No git-local operation can do that.
04:34 samcv it installs using zef
04:35 samcv this is the last text on the screen https://gist.github.com/samcv/8aaa3b37bd3a71690bb18bc9c104d0b8
04:35 ugexe its from `git clone https://github.com/xxx/xxx`
04:35 samcv though it was asking for github username and password
04:36 samcv isn't that only for pushing
04:36 samcv unless the module does something stupid?
04:36 ugexe not if the url is bad
04:36 TreyHarris oh. a clone is an operation that gets throttled by IP if you don't give credentials
04:36 samcv ah
04:37 samcv yeah, though i will restart it and it'll work fine. it used to stall at the beginning of the build after like 100, but then i randomized module install order
04:37 samcv so it's gotta be module
04:37 TreyHarris using any authenticated version will get you past that throttling threshold; using an OAuth token will get you even higher threshold.
04:37 ugexe something in the ecosystem declared their source-url wrong
04:38 japhdc joined #perl6
04:38 samcv but it might be Ncurses? that's the last thing it starts to test?
04:38 ugexe it fetched Ncurses, so no
04:38 ugexe unless Ncurses messed up your tty?
04:39 samcv possible
04:39 samcv i can check the json for the last module it built
04:39 labster joined #perl6
04:42 samcv file::compare is the last one to have any json data, so it must have hung before that point
04:42 ugexe well it would happen during the fetch phase of some module or any of its dependencies
04:42 samcv wish i knew what it was doing at the time
04:42 samcv yeah
04:43 samcv i guess i'll make it output the json before testing completes then
04:43 samcv and put status as pending or something
04:44 ugexe i would first do a check for invalid urls in the ecosystem
04:44 ugexe for source-url
04:44 samcv hm
04:45 samcv yeah that could work too. but. it will be useful in the future to add it to my script as well
04:45 samcv also i have it supposed to kill things if they take too long
04:45 samcv but doesn't work in this case
04:45 samcv maybe shuold try and kill all git processses if it has to kill things
04:46 sena_kun and you can also add a simple `say "Next module is: $name"`, to be able to see the exact place of hang
04:46 samcv well i want it to all be done by json sena_kun ideally
04:46 samcv and not have to look at a log file.
04:46 samcv except *permodule*
04:46 ugexe run with --debug
04:46 ugexe i think that will expose it
04:46 samcv run zef with --debug?
04:47 ugexe it should be happening during the fetch phase, and those messages dont show without --verbose or --debug
04:47 samcv ok i'll do that then ugexe
04:48 sena_kun I meant to catch a hang, but --debug option is better for sure.
04:50 poohman joined #perl6
04:52 samcv ok added those options, starting a new build now
04:52 samcv yeah i understoon sena_kun. should put it in the json though, so will be helpful even if the output goes screwy due to Ncurses or something being tested
04:54 geekosaur joined #perl6
04:54 sena_kun samcv, let's see then. With json and semi-automatical pretty modules list generation(it can be passed to the wiki page, I guess), my automatisation desires are satisfied. Is there something else I can do?
04:54 samcv uhm
04:55 samcv yes.
04:55 samcv figure out how i can keep track of issues i guess
04:55 samcv so i have this on git now https://github.com/samcv/rakudo-appimage/blob/master/failingmods.p6
04:56 samcv has hardcoded files in atm, but should be good for testing. but we need some way to report issues and be able to find them. so idk. maybe we want to have them have a title with certain text?
04:56 samcv what do you think
04:56 samcv that will save a ton of work if it can automatically update the status of the ticket/pr
04:56 sena_kun also, I can give you an (almost) exact list of modules with missing dependencies(though some of them looks strange, for example, readline).
04:57 sena_kun *look
04:57 samcv sena_kun, what's the best way to find if they're missing dependencies? maybe we should use the conglomerate json file that's made up of all the meta's in the eco
04:57 samcv and make sure that they exist? hm
04:57 samcv show me a gist sena_kun
04:58 sena_kun samcv, missing native dependencies, I meant.
04:58 samcv oh
04:58 samcv sure show me it anyway
04:58 sena_kun and it can be found by grep|sort|uniq, so I'll be back quickly...
04:59 samcv ok :)
05:01 samcv sena_kun, what's your github name?
05:04 sena_kun samcv, Altai-man. give me a sec...
05:04 samcv ok
05:05 sena_kun samcv, https://gist.github.com/Altai-man/64a8523aa256bf35a297f9246a1e949a
05:06 samcv sena_kun, ok i invited you to the repo
05:07 quester joined #perl6
05:09 samcv just feel free to add as much stuff as you want https://github.com/samcv/rakudo-appimage-module-test-automation/wiki/Roadmap-for-Automating-module-installation
05:10 sena_kun samcv, okay. as I understand it, you want to automatically create issues about failing modules and gather fixed modules, but. if this build will be run everyday, then if module fixed, we can check it as "the module was nok, now it is ok", I am not sure that we really need to keep a watch over created issues(repo owner can easily close them after appropriate fixing).
05:10 samcv we are not to the creation stage yet
05:10 samcv we are to automating updating status of existing tickets
05:10 samcv but eventually that would be cool. but taking it one step at a time :)
05:11 samcv atm need to find a way to use github's issue api to track the status, and identify them. so we can open a ticket, add something to the title or somewhere in the body idk yet (or maybe there's another way? idk)
05:12 samcv and have the list automatically populate with the issue
05:12 samcv without needing to copy and paste the issue/pr
05:12 samcv but feel free to add any ideas to that page i linked you to
05:15 sena_kun okay, so the current problem is to create an issue(without double-posting) for every failing module repo, right?
05:15 samcv that would be the end point
05:15 sena_kun hmmm. The steps "update" and "create" is reversed in my mind.
05:15 samcv for now trying to have it automatically check if an issue we've opened has closed/is still open etc
05:15 samcv yeah
05:16 sena_kun you meant existing tickets opened by hands?
05:16 samcv for now yes
05:17 samcv but feel free to figure out how to open issues as well (well i know you *can* open issues, but a prerequisite for that is not duplicating them... which means identifying if a ticket is already there)
05:18 samcv or also identify if a ticket is already open on the project for example. so. it all goes together. but opening tickets is what we should do after we've already gotten issue identification down
05:18 samcv unless nobody cares about making duplicate issues and annoying people :X
05:19 samcv for now could be as simple as putting [all-module-test] in the issue title or something and grepping for that.
05:19 ugexe <!--- jobtype=checkfoo --> in the issue, then check all issues for the identifier
05:19 samcv but that's under engineered for sure
05:19 samcv what identifier?
05:20 samcv oh
05:20 samcv you mean literally a comment
05:20 sena_kun hmm, okay. I'll google some ways of indentifying, but some static title like `[Tests are failing]` seems quite good for me.
05:20 ugexe yeah, in the issue body
05:20 sena_kun or comment, right.
05:20 samcv hmm true
05:20 samcv but yeah. that's the next stage :)
05:21 samcv sena_kun, do you have the `hub` program?
05:21 samcv it lets you do some things with github api from the command line. may be useful. though may be more sophisticated ways to do it for sure.
05:22 samcv like using their api and curl or whatever and processing the json for the issue. but yeah
05:22 sena_kun samcv, nope, but I can install it easily.
05:22 samcv https://api.github.com/repos/rakudo/rakudo gives you json like for this is, info about the repo itself
05:23 samcv yeah. it's cool. not *needed* for this. but i used it for making PR
05:23 samcv probably easier to use github's api to process issue's though. than having to process text and not json, and dealing with parsing
05:24 sena_kun I thought about using perl6 module for this task(is our git wrappers ready? let's see).
05:24 samcv curl '-H' 'Authorization: token MYTOKENHERE' 'https://api.github.com/rate_limit' < for example that's how to use oauth tokens. if you read about that
05:24 samcv yeah i'm not sure. that would be nice as well
05:24 samcv one for checking issues especially would be useful for this case
05:24 sena_kun of course, raw github html parsing is not an option. :)
05:24 samcv issues and PR
05:24 samcv hahaha
05:24 samcv that would kill me
05:26 sena_kun okay, a script that uses api to look into the repo and checks it for a certain title/comment labeled issue.
05:31 bjz joined #perl6
05:37 Cabanossi joined #perl6
05:39 avalenn joined #perl6
06:05 samcv yep :) be back in an hour or so
06:07 setty1 joined #perl6
06:16 wamba joined #perl6
06:22 Cabanossi joined #perl6
06:45 geekosaur joined #perl6
06:48 mr-foobar joined #perl6
07:00 winnie_ joined #perl6
07:02 winnie_ joined #perl6
07:02 poohman joined #perl6
07:04 poohman Hello all, when I pipe into Perl6 from Bash variable should I use? $0? Can someone help me with an example
07:09 dct joined #perl6
07:17 samcv poohman, pipe into perl6? or use command line args?
07:17 parv joined #perl6
07:17 poohman im trying something like this
07:17 samcv command line args are in @*ARGS array
07:18 poohman oh ok
07:18 poohman let me try once
07:19 poohman I tried earlier - find ~/ -name zef| perl6 -ne {'say $0'}
07:20 poohman bear with me - noob here
07:21 poohman find ~/ -name zef|perl6 -ne {'say @*ARGS'}
07:21 poohman shows empty arrays
07:22 Cabanossi joined #perl6
07:41 parv just updated rakudo to 5e74017. make build dies during Configuration phase
07:42 rindolf joined #perl6
07:43 poohman samcv: find ~/ -name zef|xargs perl6 test1.p6 works
07:43 poohman cant I directly pipe it in like in AWK??
07:44 wamba joined #perl6
07:46 poohman find ~/ -name zef|xargs perl6 -e {'say @*ARGS'} works
07:46 poohman but not with -ne
07:46 poohman samcv : thanks
07:50 shadowpaste "parv" at 217.168.150.38 pasted "rakudo updated to 5e74017d; make build dies while updating MoatVM" (12 lines) at http://fpaste.scsys.co.uk/559070
07:53 parv well, MoarVM update dives into the moat of despair
07:59 espadrine joined #perl6
08:00 parv trying again after removing nqp/MoarVM/ ...
08:07 shadowpaste "parv" at 217.168.150.38 pasted "FreeBSD 11, rakudo r5e74017d: fails t/04-nativecall/02-simple-args.t" (22 lines) at http://fpaste.scsys.co.uk/559071
08:07 sena_kun how can I calculate is file modifying DateTime is older than now for 1 day? I know I can subtract it to Duration and then calculate seconds in a day, then compare, but it is not an elegant way to deal with things.
08:09 sena_kun ah, stop, I can just do .day and then compare.
08:09 CIAvash joined #perl6
08:11 sena_kun samcv, can I add new stuff to your repo freely?
08:15 parv i wonder if Apple clang -O3 exception would apply to FreeBSD clang 4.0.0
08:32 wamba joined #perl6
08:36 dct joined #perl6
08:36 domidumont joined #perl6
08:42 parv sent the bug report: perl #131237
08:42 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131237
08:43 domidumont joined #perl6
08:47 u-ou moo
08:48 samcv yes sena_kun
08:49 samcv also make sure to follow clone instructions in the README sena_kun or you'll be dling like a GB
08:49 samcv of appimage builds for a month XD
08:49 samcv git clone --single-branch
08:49 sena_kun sure
08:49 sena_kun I've already clonned it
08:49 samcv single branch or the whole thing?
08:49 sena_kun single branch
08:49 samcv good :)
08:50 sena_kun I'm on 3g. :)
08:50 sena_kun I wrote a script for checking that can be extended(to create issues, etc). Just pushed it.
08:50 samcv sweet :)
08:51 sena_kun samcv, https://github.com/samcv/rakudo-appimage-module-test-automation/blob/master/checker.p6 - here it is.
08:51 sena_kun And the bad news is that we cannot access wiki pages from api to update it. :/
08:51 samcv hm
08:52 samcv oh you can clone the wiki maybe?
08:52 sena_kun there is a way if we store wiki in another repo, but I do not like that workaround, to be honest.
08:52 samcv see answer here https://stackoverflow.com/questions/2402413/update-a-github-project-wiki-through-the-github-api
08:53 sena_kun yep, I've seen it, google is my friend. :)
08:53 samcv kk :)
08:53 samcv but. if i clone that repo
08:53 samcv i get files
08:54 samcv that are the same files in the wiki
08:54 samcv and i just pushed to it
08:54 samcv hm. are you able to clone and push to it sena_kun ?
08:55 sena_kun samcv, let's try...
08:56 samcv .o(suspects there are secret git repository url's to issues, that nobody can use)
08:56 samcv wish they'd let you check that out or whatever. but then anybody could leave github. and they would be unhappy
08:56 sena_kun what is exact link you used to clone?
08:57 sena_kun ah, nm
08:57 sena_kun yes, I've cloned the wiki
08:57 samcv ne git@github.com:samcv/rakudo-appimage-module-test-automation.wiki.git
08:57 timotimo huh, .wiki.git is a thing?
08:58 samcv apparently
08:58 timotimo cool
08:59 samcv i'll be back in like 30 mins then take a look at your script sena_kun before i go to sleep
08:59 samcv have a headache
09:00 sena_kun samcv, push is successful, I will look into page updation work later. Sure, take your time and have a nice sleep!
09:07 parv joined #perl6
09:16 rub_ixCube joined #perl6
09:17 Geth ¦ Inline-Perl5/master: 4 commits pushed by (Brock Wilcox)++, (Stefan Seifert)++
09:17 Geth ¦ Inline-Perl5/master: 82fe889d59 | Extract the interpreter bindings
09:17 Geth ¦ Inline-Perl5/master: 252c44034d | Merge branch 'master' into extract-interpreter-binding
09:17 Geth ¦ Inline-Perl5/master: 7dbf3d3c30 | Extract more perl5 wrappers
09:17 Geth ¦ Inline-Perl5/master: c7d278680b | Merge branch 'master' into extract-interpreter-bindings
09:17 Geth ¦ Inline-Perl5/master: review: https://github.com/niner/Inline-Perl5/compare/32d0cdfb70...c7d278680b
09:18 rub_ixCube hello, I just recently installed perl6 and I was wondering how I added `/opt/rakudo-star-2017.01/bin` and `/opt/rakudo-star-2017.01/share/site/bin` to PATH?
09:19 timotimo hi
09:20 timotimo to be honest, i don't know what the exact proper way is, but i think what you ought to do is open the file .profile in your home directory and see if there's already a line containing "PATH" in it
09:20 timotimo if so, you can add those two lines in there with the path separator, which is usually a : between them
09:21 rub_ixCube oh ok Ill Try!
09:21 timotimo if not, write something like "export PATH=/opt/rakudo-star-2017.01/bin:/opt/rakudo-star-2017.01/share/site/bin:$PATH" in there
09:23 rub_ixCube so like this? `export PATH="$HOME/.cargo/bin:$PATH":"/opt/rakudo-star-2017.01/bin":"/opt/rakudo-star-2017.01/share/perl6/site/bin"`
09:23 parv joined #perl6
09:23 nine rub_ixCube: looks good
09:24 timotimo oh, i never tried having "" in there
09:25 timotimo but if there's already something there and it's using that, it must be good
09:25 rub_ixCube doesn't work ;(
09:25 timotimo this will only take effect for new terminals you open, and other programs usually have to wait for a newly logged-in desktop-environment to give the new values to the programs
09:26 rub_ixCube i know, i do it in a new terminal every time
09:26 nine What does echo $PATH give you?
09:26 timotimo you're checking by running "echo $PATH"?
09:26 rub_ixCube or do all the terminals have to be closed?
09:27 rub_ixCube my PATH arguments are not there...
09:27 timotimo only newly opened terminals will have it, but you can "source ~/.profile" in your existing terminals to get the values
09:28 nine rub_ixCube: you could try to log out/log in. I'm not sure when exactly .profile will be sourced. I usually put my settings in .bashrc
09:28 rub_ixCube oh Ill Try There then, (not .bashrc though, .zshrc)
09:29 rub_ixCube works now :)
09:35 nadim joined #perl6
09:37 pierre_ joined #perl6
09:37 Cabanossi joined #perl6
09:40 alyptik left #perl6
09:42 moritz \o
09:43 moritz jnthn, masak: this looks like a copy&paste artifact: https://github.com/jnthn/json-path/blob/master/LICENSE.txt#L1
09:46 astj joined #perl6
09:48 domidumont joined #perl6
09:50 xfix joined #perl6
09:50 geekosaur joined #perl6
10:11 kurahaupo joined #perl6
10:25 pierre_ joined #perl6
10:29 poohman joined #perl6
10:35 poohman joined #perl6
10:37 pmurias joined #perl6
10:46 japhdc joined #perl6
10:52 Cabanossi joined #perl6
10:57 timotimo http://hack.p6c.org/~timo/forestfire_callgraph.svg
10:59 geekosaur joined #perl6
11:00 poohman joined #perl6
11:12 bjz joined #perl6
11:16 sena_kun timotimo, looks cool. What is it? inb4: forestfire callgraph.
11:16 MasterDuke_ timotimo: cool, i've wanted something like that for a while
11:22 MasterDuke_ i'm going to blame the early hour and lack of coffee yet on taking forever to realize TSTRAP.nqp is actually BOOTSTRAP.nqp
11:41 DrForr I think something might have broken trailing backslashes in a recent update - "2 for 1\\n" was previously valid code even with nothing after the continuation backslash, my test case now seems to lock up.
11:42 DrForr Actually it seems to be an error now, ignore my previous statement.
11:45 stmuk joined #perl6
11:49 stmuk_ joined #perl6
11:56 nadim joined #perl6
11:59 poohman joined #perl6
12:07 Cabanossi joined #perl6
12:13 pierre_ joined #perl6
12:17 geekosaur joined #perl6
12:31 Geth ¦ ecosystem: 1c57cc54b1 | (Jonathan Stowe)++ | META.list
12:31 Geth ¦ ecosystem: Rename META for Net::AMQP
12:31 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/1c57cc54b1
12:48 bjz joined #perl6
13:06 skids joined #perl6
13:15 nadim joined #perl6
13:20 wamba joined #perl6
13:26 wamba joined #perl6
13:27 kurahaupo joined #perl6
13:33 pat_js joined #perl6
13:35 Geth ¦ doc: 9a63dc4d19 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
13:35 Geth ¦ doc: [io grant] Document IO::Path.cleanup
13:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9a63dc4d19
13:52 Cabanossi joined #perl6
13:54 pierre_ joined #perl6
14:00 Geth ¦ doc: 40740060b8 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
14:00 Geth ¦ doc: Fix .gist output in example
14:00 Geth ¦ doc: review: https://github.com/perl6/doc/commit/40740060b8
14:03 Geth ¦ doc: CurtTilmes++ created pull request #1294: Added a note about run/shell exceptions due to non-zero exits
14:03 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1294
14:08 geekosaur joined #perl6
14:09 sammers joined #perl6
14:12 pierre_ joined #perl6
14:18 timotimo http://hack.p6c.org/~timo/forestfire_callgraph_2.svg - what do y'all think?
14:21 moritz nice
14:21 moritz can you sort it vertically by time spent?
14:23 poohman joined #perl6
14:29 grondilu TIL Microsoft Edge is terrible at displaying SVG
14:32 MasterDuke_ would it make it too busy to split the progress bar box and have an exclusive time progress bar below?
14:39 Geth ¦ doc: 2387ce3518 | (Zoffix Znet)++ | 2 files
14:39 Geth ¦ doc: [io grant] Re-write IO::Handle.close docs
14:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2387ce3518
14:43 timotimo MasterDuke_: i would have rather put an exclusive time box in the name-of-function-box instead
14:44 MasterDuke_ yeah, that'd be good too
14:44 timotimo then i'll need to inner-join on the calls table *again* :D
14:44 timotimo to get the children this time
14:45 Geth ¦ doc: 79a5fce84a | (Zoffix Znet)++ | doc/Language/phasers.pod6
14:45 Geth ¦ doc: Add note that LEAVE phasers do get run
14:45 Geth ¦ doc:
14:45 Geth ¦ doc: even when routine param binding fails
14:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/79a5fce84a
14:46 MasterDuke_ luckily they are fast queries on tables this small
14:46 timotimo right
14:46 timotimo hm. i might actually need a subquery here
14:48 Geth Swapped META.info → META6.json in 1 dists in https://github.com/perl6/ecosystem/commit/5c6f4ad301
14:52 Cabanossi joined #perl6
14:57 timotimo can't get it to not syntax error
14:57 Geth ¦ doc: 0def0d131a | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
14:57 Geth ¦ doc: [io grant] Amend IO::Handle.close docs
14:57 Geth ¦ doc:
14:57 Geth ¦ doc: - Be explicit written data may be lost if handle isn't closed,
14:57 Geth ¦ doc:     since GC isn't guaranteed to be run.
14:57 Geth ¦ doc: - This isn't the case ATM since we don't seem to be buffering stuff,
14:57 Geth ¦ doc:     but we might do eventually.
14:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0def0d131a
14:59 raiph joined #perl6
15:07 raiph joined #perl6
15:08 lauct_ joined #perl6
15:08 espadrine joined #perl6
15:15 raiph joined #perl6
15:15 zakharyas joined #perl6
15:15 bjz_ joined #perl6
15:17 timotimo http://hack.p6c.org/~timo/forestfire_callgraph_3.svg now also has the contribution of each node in the node itself
15:17 timotimo i.e. the bar inside a node will give 100% when summed with the bars coming out of that node
15:33 jdv79 joined #perl6
15:34 timotimo F5 for straighter lines and entry counts
15:37 Cabanossi joined #perl6
15:41 mtj_ joined #perl6
15:41 mtj_ joined #perl6
15:43 timotimo moritz: i sort it by time now, here's how that looks like: http://hack.p6c.org/~timo/forestfire_callgraph_4.svg
15:43 timotimo i think i want to have the entries divided by the parent's entries
15:50 raiph joined #perl6
15:51 timotimo well, maybe later
15:52 cdg joined #perl6
15:56 bjz joined #perl6
15:56 khw joined #perl6
16:05 Geth ¦ Inline-Perl5: dfeea1b626 | (Stefan Seifert)++ | 6 files
16:05 Geth ¦ Inline-Perl5: Move the remaining roles into separate files
16:05 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/dfeea1b626
16:05 TreyHarris I think my failure to understand this reflect a deep misunderstanding of whatevers:
16:05 TreyHarris m: my @g = (<a b c>, 1..3).flat; say @g.map({.WHAT})
16:05 camelia rakudo-moar 6ef2ab: OUTPUT: «((Str) (Str) (Str) (Int) (Int) (Int))␤»
16:05 TreyHarris m: my @g = (<a b c>, 1..3).flat; say @g.map(*.WHAT)
16:05 camelia rakudo-moar 6ef2ab: OUTPUT: «Cannot resolve caller map(Array: Whatever); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in block <unit> at <tmp> line 1␤␤»
16:05 geekosaur I think that's more because .WHAT is magic
16:07 TreyHarris m: my @g = (<a b c>, 1..3).flat; say @g.map(&WHAT)
16:07 camelia rakudo-moar 6ef2ab: OUTPUT: «((Str) (Str) (Str) (Int) (Int) (Int))␤»
16:07 geekosaur basically .WHAT is actually a macro somewhere in the compiler, and here it's misexpanding and leading to odd calls
16:08 geekosaur (probably being invoked on the Whatever itself instead of waiting for the Whatever to be applied to a parameter)
16:09 TreyHarris okay... then my gut that this transformation of .map({ .method-on-item }) -> .map( *.method-on-item) should pretty much always work isn't invalid, it just has exceptions?
16:09 geekosaur it;s unreliable when the method is secretly a MOP call (so any of the uppercase ones are potentially tricky)
16:11 TreyHarris do we create MOP calls we might think are simple method calls via any of the normal language features (roles, traits, etc.)?
16:12 geekosaur I don't think so, just those special uppercase ones
16:14 geekosaur also iirc .WHY and .HOW are safe (.HOW would pretty much have to be since the others expand to uses of it)
16:16 Geth ¦ Inline-Perl5: c1a8e24f81 | (Stefan Seifert)++ | 2 files
16:16 Geth ¦ Inline-Perl5: Move remaining Inline::Perl5::Object setup code to that class' file
16:16 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/c1a8e24f81
16:16 Geth ¦ Inline-Perl5: 13a06fe3e4 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6
16:16 Geth ¦ Inline-Perl5: Move Perl 5 code to the =finish section
16:16 Geth ¦ Inline-Perl5:
16:16 Geth ¦ Inline-Perl5: Confuses the syntax highlighter way less and reduces the init_callbacks
16:16 Geth ¦ Inline-Perl5: methods' size considerably.
16:16 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/13a06fe3e4
16:37 Cabanossi joined #perl6
16:39 cdg joined #perl6
17:00 lauct joined #perl6
17:00 Sound joined #perl6
17:00 Sound joined #perl6
17:05 labster joined #perl6
17:07 poohman Hello, what is the difference between the following,
17:07 poohman my $a= point.new(x=>0.2,y=>0.24,z=>0.55);
17:08 poohman my point $a.new(x=>0.2,y=>0.24,z=>0.55);
17:08 jnthn Did you mean `my point $a .= new(...);` ?
17:08 geekosaur I don't think  that second one is legal. did you mean: ... that
17:09 geekosaur and the difference is the type of $a is Any in the first one, so you could assign a non-"point" to it later
17:09 jnthn I suspect the second one may be legal syntax, but it sure won't end up with a point object in $a :)
17:10 poohman the 2nd one didnt give an error
17:11 poohman but it said that it cannot look up attributes in a type object
17:12 jnthn Yeah, it'll parse the same as (my point $a).new(x=>0.2,y=>0.24,z=>0.55)
17:13 jnthn So, $a contains the point type object; .new is called on that, but the result is never stored anywhere, so the object is discarded.
17:13 jnthn And $a is left containing the point type object
17:13 poohman ah ok
17:14 poohman thanks
17:14 jnthn The correct  way to write `my point $a = point.new(...)` without repeating point is the .= operator, which means "make a method call and assign the result"
17:14 jnthn my point $a .= new(...);
17:14 poohman got it
17:14 jnthn .= is actually a bit more general
17:15 jnthn You can use it to turn any immutable method into a mutating one
17:15 jnthn m: my $a = "food"; say $a.uc; say $a; $a .= uc; say $a;
17:15 camelia rakudo-moar 6ef2ab: OUTPUT: «FOOD␤food␤FOOD␤»
17:15 jnthn There, `$a .= uc` is short for `$a = $a.uc`
17:16 * jnthn wanders off for dinner
17:17 poohman thanks
17:22 poohman Another question - right now I have overloaded the say method for a class but can use it only as $a.say to get the overloaded function
17:23 poohman if I use it as say $a;
17:23 poohman i get the default method - can I overload it and still use it as say $a;??
17:25 Geth ¦ ecosystem: fbe1641bad | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
17:25 Geth ¦ ecosystem: Add Trait::IO to ecosystem
17:25 Geth ¦ ecosystem:
17:25 Geth ¦ ecosystem: Helper IO trait to auto-close filehandles on scope leave:
17:25 Geth ¦ ecosystem: https://github.com/zoffixznet/perl6-Trait-IO/
17:25 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/fbe1641bad
17:26 Zoffix joined #perl6
17:27 Zoffix poohman: just for `say`? What about `put` or "foo $your-object bar"?
17:27 Zoffix m: class Foo { method gist { "teh gist" }; method Str { "teh Str" } }; my $o = Foo.new; say $o; put $o; say "foo $o bar"
17:27 camelia rakudo-moar 6ef2ab: OUTPUT: «teh gist␤teh Str␤foo teh Str bar␤»
17:28 Zoffix m: class Foo { method Str { "teh Str" } }; my $o = Foo.new; say $o; put $o; say "foo $o bar" # .gist fallsback to .Str
17:28 camelia rakudo-moar 6ef2ab: OUTPUT: «Foo.new␤teh Str␤foo teh Str bar␤»
17:28 Zoffix oh, never mind.
17:29 Zoffix Ah
17:29 Zoffix m: class Foo { method Str { "teh Str" }; method perl { "teh perl" } }; my $o = Foo.new; say $o; put $o; say "foo $o bar" # .gist fallsback to .perl
17:29 camelia rakudo-moar 6ef2ab: OUTPUT: «teh perl␤teh Str␤foo teh Str bar␤»
17:29 Zoffix This won't work for Str subclasses tho
17:29 Zoffix left #perl6
17:35 petercommand joined #perl6
17:37 domidumont joined #perl6
17:37 poohman sorry was away
17:42 poohman m: class Foo { method gist { "teh gist" }; method Str { "teh Str" } }; my $o = Foo.new;
17:42 camelia rakudo-moar 6ef2ab: ( no output )
17:42 poohman m: class Foo { method gist { "teh gist" }; method Str { "teh Str" } }; my $o = Foo.new; say $o
17:42 camelia rakudo-moar 6ef2ab: OUTPUT: «teh gist␤»
17:43 poohman m: class Foo { method gist { "teh gist" }; method Str { "teh Str" } }; my $o = Foo.new; put $o;
17:43 camelia rakudo-moar 6ef2ab: OUTPUT: «teh Str␤»
17:44 poohman m: class Foo { method gist { "teh gist" }; method Str { "teh Str" } }; my $o = Foo.new; say "foo $o bar"
17:44 camelia rakudo-moar 6ef2ab: OUTPUT: «foo teh Str bar␤»
17:44 poohman hmmm
17:45 imcsk8 joined #perl6
17:46 gfldex poohman: say would need to be a macro to make that work
17:47 poohman im still trying to figure out what Zoffix did
17:48 Zoffix joined #perl6
17:48 geekosaur what is confusing there?
17:49 Zoffix poohman: it's very simple: `say` uses object's .gist method's output. `put` and stringification uses object's .Str method's output. You don't need to provide a .say or .put methods, it works just the same as routines
17:49 geekosaur say uses .gitst, put uses .Str, string interpolation uses .Str
17:49 geekosaur er .gist
17:49 gfldex m: my &say = sub(|c){ put c.gist };
17:49 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    c used at line 1␤    sub used at line 1. Did you mean 'sum'?␤␤»
17:50 gfldex m: my &say = sub(**@c){ put @c».gist.join(' ') }; # actually
17:50 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3my &say = sub(**7⏏5@c){ put @c».gist.join(' ') }; # actuall␤    expecting any of:␤        infix␤  …»
17:50 Zoffix poohman: and I don't know what gfldex is talking about. You don't need any macros or messing with `&say`
17:51 poohman ok - moment - let me try that here and have a look
17:52 gfldex say "foo $o bar" <-- to have say get a concatanation of .gist, one would need a macro that takes the literal apart
17:52 evalable6 gfldex, rakudo-moar 6ef2abdfc: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/IkiSvmKVUi␤Variable '$o' is not declared␤at /tmp/IkiSvmKVUi:1␤------> say "foo ⏏$o bar" <-- to have say get a concatanat»
17:52 Zoffix That's interpolation of $o in a string (so .Str method). `say` then receives a Str
17:53 gfldex i know what it is, that's why I wrote „would“
17:55 * Zoffix doesn't see poohman asking about... taking literals apart to concatenate .gist
17:55 poohman had interchanged gist and Str here - almost there - its printing but afterwards it says
17:55 poohman This type cannot unbox to a native string: P6opaque, Bool
17:55 poohman in block <unit> at core.p6 line 13
17:56 Zoffix poohman: you got `say` inside your gist/Str methods?
17:56 Zoffix Remove it. Just return the Str
17:57 poohman ok moment
17:57 gfldex /save
17:59 poohman need to look up concatenation - moment
17:59 Zoffix poohman: "foo" ~ "bar"
17:59 Zoffix poohman: ("foo", "bar").join: 'some-separator'
17:59 Zoffix m: say [~] 'a'..'z'
17:59 camelia rakudo-moar 6ef2ab: OUTPUT: «abcdefghijklmnopqrstuvwxyz␤»
18:00 Zoffix m: my $foo = 'foo'; my $bar = 'bar'; say "$foo $bar"; # another way
18:00 camelia rakudo-moar 6ef2ab: OUTPUT: «foo bar␤»
18:00 poohman perfecto
18:00 poohman thansk
18:02 Zoffix Cool
18:02 Zoffix left #perl6
18:17 poohman joined #perl6
18:19 samcv morning :)
18:22 poohman joined #perl6
18:24 samcv 49.939099% of eco modules have licenses.
18:24 samcv omg. so close
18:24 samcv well have license tags in the META file. so... close
18:25 gfldex samcv: what kind of quest reward are you going to get? :->
18:25 samcv uh. you get more internet points
18:26 samcv if 1 more module adds it we will be at 50.06%
18:39 ZofBot joined #perl6
18:41 cdg joined #perl6
18:45 poohman If I use the Rat type - and the variable is assigned a 0 - what happens then? Cant a Rat be assigned a 0 value?
18:46 pierre_ joined #perl6
18:51 poohman m: my Rat $a=0;
18:51 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot assign a literal of type Int (0) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 0.Rat or Rat(0), or just write the value as 0.0␤at <tmp…»
18:51 poohman m: my Rat $a=0.0;
18:51 camelia rakudo-moar 6ef2ab: ( no output )
18:52 poohman m: my Rat $a=1.212;
18:52 camelia rakudo-moar 6ef2ab: ( no output )
18:52 poohman m: my Rat $a=1.22; say $a;
18:52 camelia rakudo-moar 6ef2ab: OUTPUT: «1.22␤»
18:52 poohman m: my Rat $a=0; say $a;
18:52 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot assign a literal of type Int (0) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 0.Rat or Rat(0), or just write the value as 0.0␤at <tmp…»
18:53 poohman m: my Rat $a=0.0; say $a;
18:53 camelia rakudo-moar 6ef2ab: OUTPUT: «0␤»
18:54 spider-mario joined #perl6
18:54 poohman m: my Rat $a=1.5; my Rat $b=1.5; my Rat $c=$a-$b;
18:54 camelia rakudo-moar 6ef2ab: ( no output )
18:54 poohman m: my Rat $a=1.5; my Rat $b=1.5; my Rat $c=$a-$b; say $c;
18:54 camelia rakudo-moar 6ef2ab: OUTPUT: «0␤»
18:55 poohman m: my Rat $a=1.5; my Rat $b=1.5; my Rat $c=sqrt(($a-$b)); say $c;
18:55 camelia rakudo-moar 6ef2ab: OUTPUT: «Type check failed in assignment to $c; expected Rat but got Num (0e0)␤  in block <unit> at <tmp> line 1␤␤»
18:56 poohman m: say sqrt(0);
18:56 camelia rakudo-moar 6ef2ab: OUTPUT: «0␤»
18:56 poohman m: my Rat $a=1.5; my Rat $b=1.5; my Rat $c=sqrt($a-$b); say $c;
18:56 camelia rakudo-moar 6ef2ab: OUTPUT: «Type check failed in assignment to $c; expected Rat but got Num (0e0)␤  in block <unit> at <tmp> line 1␤␤»
18:58 poohman m: say sqrt(0.0);
18:58 camelia rakudo-moar 6ef2ab: OUTPUT: «0␤»
18:58 samcv weeird.
18:58 samcv m: my Rat $var = 0/0;
18:58 camelia rakudo-moar 6ef2ab: ( no output )
18:58 samcv m: my Rat $var = 0
18:58 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot assign a literal of type Int (0) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 0.Rat or Rat(0), or just write the value as 0.0␤at <tmp…»
19:00 samcv m: my Rat  $var = -0;
19:00 camelia rakudo-moar 6ef2ab: OUTPUT: «Type check failed in assignment to $var; expected Rat but got Int (0)␤  in block <unit> at <tmp> line 1␤␤»
19:00 poohman m: my Rat $a=1.5; my Rat $b=1.5; my Rat $c=(sqrt($a-$b)).Rat; say $c;
19:00 camelia rakudo-moar 6ef2ab: OUTPUT: «0␤»
19:00 samcv that's less than awesome
19:00 samcv though technically 0 isn't a Rat. but still. heh
19:01 samcv m: my Rat $a = 0/1;
19:01 camelia rakudo-moar 6ef2ab: ( no output )
19:01 samcv m: my Rat $a = 0/1; say $a
19:01 camelia rakudo-moar 6ef2ab: OUTPUT: «0␤»
19:01 samcv m: my Rat $a = 40;
19:01 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot assign a literal of type Int (40) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 40.Rat or Rat(40), or just write the value as 40.0␤at …»
19:01 samcv yeah seems it doesn't let you do it for anything.
19:02 samcv poohman, i'd just put the number over 1
19:02 poohman oh ok
19:02 samcv since Rat's hold fractions aka rational numbers
19:02 samcv they have numerator and denominator component.
19:03 poohman Curtis Ovid Poes presentation made me do it :)
19:05 TreyHarris Is there a design reason that "has Numeric $.x, $.y, $.z is rw;" isn't supported? Every time I define several attributes with the same type and accessor traits I wonder about this.
19:05 samcv TreyHarris, does this work lass foo { has Numeric ($.a, $.b) is rw }
19:05 samcv class foo { has Numeric ($.a, $.b) is rw }
19:06 poohman Math which works - so I thought might as well use Rat for all numeric variables I use
19:06 espadrine joined #perl6
19:06 DrForr has Numeric ($.x,$.y) is rw; # works for me.
19:06 samcv poohman, well if you divide ints then it becomes a rat
19:06 samcv TreyHarris, use parens so it's clear that the numeric and rw is for the things in the parens and not the other ones
19:07 poohman ja i get that - its just that I thought it was a silver bullet - ill coerce it for now
19:09 TreyHarris samcv: I see. Yes, parens do work, they just feel weird to me in this context. I understand why from how 'has Type' and 'is rw' are implemented.
19:09 TreyHarris That's why I asked if there was a "design reason".
19:09 samcv TreyHarris, and declaring multiple variables other places `my ($a, $b)` for example
19:09 DrForr TreyHarris: It's analogous to 'my Int ($a, $b);'
19:09 TreyHarris DrForr, samcv: that makes sense. thanks
19:09 samcv well the traits apply to everything in parens
19:10 samcv i mean sure maybe it'd be cool if it let you just do whatever you wanted. but the parens make it clear and easy to tell it's for all things inside it
19:10 samcv while `my $a, $b` is like sayig my $a comma $b
19:10 samcv and then $b hasn't been defined yet.
19:10 samcv but if you have $b defined
19:11 samcv m: my $b = 10; say my $a, $b
19:11 camelia rakudo-moar 6ef2ab: OUTPUT: «(Any)10␤»
19:11 samcv that probably proves why it is how it is
19:11 DrForr Precedence takes over, and it parses like (my $a), $b
19:11 samcv yep
19:11 samcv and commas in perl form lists or seperate arguments
19:14 samcv poohman, you could use `Real`
19:14 * TreyHarris nods
19:14 samcv Real can store Rats and int's
19:14 samcv er. i think. argh
19:14 samcv trying to look at this type graph
19:15 DrForr samcv: Not to derail things, but I'm starting on a Dist:Zilla-alike with the specific goal of having a dist-upgrade option to help authors update metadata and boilerplate.
19:15 TreyHarris Why is Numeric the wrong choice for poohman's example?
19:15 samcv m: my Real $a = 1/9; say $a.WHAT
19:15 camelia rakudo-moar 6ef2ab: OUTPUT: «(Rat)␤»
19:15 samcv numeric migth work
19:15 samcv https://docs.perl6.org/images/type-graph-Real.svg
19:16 samcv so you could do Numeric too. but don't do Num because that allows floats
19:19 TreyHarris m: class Point { has Numeric ($.x, $.y, $.z) is rw; }; my Point $p .= new(x => Rat(1), y => Int(2), z => Num(3.5)); $p.say
19:19 camelia rakudo-moar 6ef2ab: OUTPUT: «Point.new(x => 1.0, y => 2, z => 3.5e0)␤»
19:20 TreyHarris Numeric allows floats
19:22 TreyHarris I forget, how do you parameterize it so that Point's $!x, $!y, and $!z are all Numeric but also are all the same type? So an <Int, Int, Int> is okay as is a <Rat, Rat, Rat>, but an <Int, Rat, Int> is disallowed?
19:22 TreyHarris can you only do that with roles?
19:23 TreyHarris (for extra credit, how to allow any three arguments that can be coerced into the same type?)
19:24 DrForr IIRC Int is a subset of Rat?
19:25 samcv no not by the type graph
19:25 TreyHarris DrForr: good point. so all Int or all Num but not a mix of Int and Num
19:26 samcv well yo ucould mix them sure... depends what you store in the variables...
19:26 DrForr He's trying to constrain the types, not allow the mixture, I think.
19:26 samcv hm
19:26 samcv but.. Ints can be converted to rats
19:27 samcv m: 5.Rat.say
19:27 camelia rakudo-moar 6ef2ab: OUTPUT: «5␤»
19:27 mxco86 joined #perl6
19:27 samcv but not the other way around (without losing info)
19:28 TreyHarris just check it however makes sense in TWEAK and throw?
19:28 DrForr Any particuar reason you're looking to do this, other than just beecause you mgith be able to?
19:28 samcv m: my Int $number-of-times-to-loop = 5; my Int $days = 7; my Numeric $foo = $number-of-times-to-loop / $days; dd $foo
19:28 camelia rakudo-moar 6ef2ab: OUTPUT: «Rat $foo = <5/7>␤»
19:28 geekosaur joined #perl6
19:29 samcv if you need to store integers, then cal them Int's, if you don't know then use Rational which allows it to be a Rat or a FatRat
19:30 samcv or contstrain as Rat idk i don't care. but FatRat can store bigger numbers or whatever
19:30 TreyHarris DrForr: there are uses for this in Haskell, so you have a way to describe a type as "foo :: Numeric t => (t,t,t) -> Point" or "foo :: Numeric t1, t2, t3 => (t1,t2,t3) -> Point" and they each have their uses
19:34 TreyHarris an inversion rotation, for instance, is a slot-swapping operation when all three components of the point are the same type, but if they're different conforming types you need to do math
19:35 DrForr Yeah, but Perl6 lets you do multimethod dispatch, which can be thought of as a different way of accomplishing the same thing.
19:35 DrForr Like ou could add multi invert(Int,Rat,Int) {} multi invert(Int,Rat,Rat) {}
19:36 TreyHarris DrForr: *nod*. This is the thing I pointed out last week when if you use a mix of types as Hash keys the key becomes unrepresentable by .gist or .perl because there's no cmp for two Anys
19:36 TreyHarris and .gist and .perl on hashes tries to sort them first
19:37 DrForr You can tell Perl6 to use object types for hash keys explicitly, are you doing that?
19:37 DrForr (I forget the syntax)
19:37 TreyHarris no, i didn't know there was syntax for that. let me check the docs.
19:41 TreyHarris It's :{ ... } apparently
19:41 DrForr Thought that wa it, but didn't want to confuse matters.
19:42 poohman joined #perl6
19:43 pmurias joined #perl6
19:44 pmurias m: my token foo { :7ignorecase };
19:44 camelia rakudo-moar 6ef2ab: ( no output )
19:44 TreyHarris m: my %h{Cool}; %h<3> = 1; %h<a> = 2; %h<2.0> = 3; for %h.kv -> $k, $v { say "$k: $v" }; dd %h
19:44 camelia rakudo-moar 6ef2ab: OUTPUT: «3: 1␤2.0: 3␤a: 2␤Ambiguous call to 'infix:<cmp>'; these signatures all match:␤:(Int:D \a, Rational:D \b)␤:(Str:D \a, Str:D \b --> Order:D)␤  in block <unit> at <tmp> line 1␤␤»
19:44 pmurias why is :7ignorecase allowed?
19:45 geekosaur because Bool is an Enum, and therefore compatible with Int
19:45 SmokeMachine m: class A {has $.s = 42}; class B is A {has $.s = 13}; say B.new
19:45 camelia rakudo-moar 6ef2ab: OUTPUT: «B.new(s => 13, s => 42)␤»
19:45 SmokeMachine is that expected?
19:46 SmokeMachine m: class A {has $.s}; class B is A {has $.s = 13}; say B.new
19:46 camelia rakudo-moar 6ef2ab: OUTPUT: «B.new(s => 13, s => Any)␤»
19:46 TreyHarris m: %h{Cool} = :{3 => 1, a => 2, 2.0 => 3};for %h.kv -> $k, $v { say "$k: $v" }; dd %h
19:46 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '%h' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5%h{Cool} = :{3 => 1, a => 2, 2.0 => 3};f␤»
19:46 TreyHarris m: my %h{Cool} = :{3 => 1, a => 2, 2.0 => 3};for %h.kv -> $k, $v { say "$k: $v" }; dd %h
19:46 camelia rakudo-moar 6ef2ab: OUTPUT: «Potential difficulties:␤    Useless use of hash composer on right side of hash assignment; did you mean := instead?␤    at <tmp>:1␤    ------> 3y %h{Cool} = :{3 => 1, a => 2, 2.0 => 3}7⏏5;for %h.kv -> $k, $v { say "$k: $v" }; d␤a: 2␤2: 3…»
19:46 poohman joined #perl6
19:47 TreyHarris m: my %h{Cool} := :{3 => 1, a => 2, 2.0 => 3};for %h.kv -> $k, $v { say "$k: $v" }; dd %h
19:47 camelia rakudo-moar 6ef2ab: OUTPUT: «Type check failed in binding; expected Associative[Any,Cool] but got Hash[Mu,Any] (:{2.0 => 3, 3 => 1, :...)␤  in block <unit> at <tmp> line 1␤␤»
19:50 pmurias geekosaur: is there a modifier where passing a number makes sense?
19:50 geekosaur I doubt it but I also doubt anything can sensibly catch this
19:50 geekosaur at most there could be a runtime check on the range, which would slow a lot of stuff down
19:51 TreyHarris m: class A { has $.s = 42; }; class B is A { has $.s = 13; }; B.new.perl; B.new(s => 13, s => 42).perl
19:51 camelia rakudo-moar 6ef2ab: ( no output )
19:51 TreyHarris m: class A { has $.s = 42; }; class B is A { has $.s = 13; }; B.new.perl.say; B.new(s => 13, s => 42).perl.say
19:51 camelia rakudo-moar 6ef2ab: OUTPUT: «B.new(s => 13, s => 42)␤B.new(s => 42, s => 42)␤»
19:51 pmurias geekosaur: we can just remove the grammar rules that allows passing a 7 there
19:52 pmurias s/rules/rule
19:52 Cabanossi joined #perl6
19:52 geekosaur so that now has different parsing rules than pairs in general?
19:53 pmurias yes, it's parsed by a different rule
19:54 SmokeMachine m: class A { has $.s = 42; }; class B is A { has $.s = 13; }; B.new.perl.say; B.new(s => "a").perl.say
19:54 camelia rakudo-moar 6ef2ab: OUTPUT: «B.new(s => 13, s => 42)␤B.new(s => "a", s => "a")␤»
19:54 pmurias m: my token foo { :highlyillegal };
19:54 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex modifier :highlyillegal␤at <tmp>:1␤------> 3my token foo { :7⏏5highlyillegal };␤»
19:55 TEttinger joined #perl6
19:58 AlexDaniel joined #perl6
19:58 kaare__ joined #perl6
20:02 skink joined #perl6
20:03 SmokeMachine m: class A {has $.s = 42}; class B is A {submethod BUILD(|) {$!s=13}}; say B.new
20:03 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Attribute $!s not declared in class B␤at <tmp>:1␤------> 3ass B is A {submethod BUILD(|) {$!s=13}}7⏏5; say B.new␤    expecting any of:␤        horizontal whitespace␤        postfix␤      …»
20:22 Cabanossi joined #perl6
20:47 TEttinger joined #perl6
20:52 * grondilu notices that rakudo/docs/ROADMAP has not been updated since 2015
20:53 timotimo as you do :)
20:54 grondilu ?
20:55 timotimo leave roadmaps unattended
20:58 cdg joined #perl6
21:02 geekosaur mv ROADMAP GPS :p
21:03 geekosaur actually discussed that the other day, with someone who'd stopped to ask for directions at the gas station + convenience store across the street...
21:05 nowan joined #perl6
21:06 geekosaur (online map/route stuff starts to become worthless south of here, there's rarely better than GPRS coverage until you approach Akron, unless you stay on one of the interstates)
21:07 Cabanossi joined #perl6
21:18 skink I'll probably be refactoring Crypt::Random in the near future, and I kinda wanna change its API as well
21:18 skink Input appreciated
21:24 khw joined #perl6
21:24 labster joined #perl6
21:31 TEttinger skink: do you have thoughts on ISAAC as a secure PRNG?
21:32 TEttinger ( http://www.burtleburtle.net/bob/rand/isaacafa.html )
21:32 skink TEttinger, The lib just uses /dev/urandom and the Windows Cryptographic API
21:32 TEttinger oh ha
21:32 TEttinger so not PRNG
21:32 TEttinger the name is accurate :)
21:32 TEttinger actually random
21:36 skink Right now it uses the above to get Bufs and turns them into Ints in a really slow way
21:37 skink And the API mimics arc4random() on the BSDs / OS X, which makes it look pretty out of place amongst other libs, I think
21:37 skink In terms of the function naming and usage
21:46 BenGoldberg joined #perl6
21:52 Cabanossi joined #perl6
21:56 geekosaur joined #perl6
22:17 samcv yay ok. so finally i got basically all modules build statuses!
22:17 samcv improved my script https://gist.github.com/samcv/5339208c44a4d65f5165508e02dd0cee
22:17 raschipi joined #perl6
22:17 samcv so 873 (that's all modules prolly?) with links to logs of the module install. 227 failing :)
22:18 samcv though some maybe not building due to not having Native dependencies. hm. has anybody figured out how we should denote those in META6.info if at all?
22:23 jnthn Could try them on Windows too, since in many cases we do binary bundling there.
22:24 * jnthn discovered today that IO::Socket::Async::SSL somehow ends up not quite working out on Windows :(
22:25 jnthn May be an SSL lib versioning issues
22:25 timotimo :o
22:25 jnthn Since it was a particular symbol it couldn't find
22:25 jnthn But yeah, it's kinda funny that we've ended up with a better install experience on Windows in terms of deps for various native libraries. :)
22:25 jnthn *native bindings
22:26 jnthn Or maybe not so surprising, in that culturally it's OK (encouraged, even) to bundle all your dependencies to avoid "DLL hell" :)
22:26 dct joined #perl6
22:27 jnthn Maybe that "install the binary" option could be factored into something that knows how to delegate to package managers across a bunch of systems
22:29 jnthn Since the Windows bundling solution is already copy-paste across a bunch of repos by now
22:31 jnthn I guess this ties into the Build.pm escape hatch still being "unofficial" too
22:31 jnthn In that to install certain modules with Zef you actually also need a dependency on Panda in order to have a Build.pm
22:31 labster joined #perl6
22:34 jnthn Anyway, I'd suggest trying to solve this in Build.pm teritory where we can have multiple solutions in this space, rather than trying to go straight to having something in META6.json, since it feels like a really gnarly area.
22:35 skink Speaking of which, the libs bundled with the openssl bindings need to be updated
22:35 * skink coughs
22:35 Woodi samcv++ # internet points :)
22:35 samcv oh?
22:35 * samcv checks
22:36 samcv or you just commenting on it and not saying that somebody gets points yet XD
22:36 samcv nope. still at 49.8%
22:37 skink jnthn, Which symbol was it?
22:38 jnthn skink: SSL_CTX_set_default_verify_paths
22:39 jnthn skink: Are you in a position to do that update? :)
22:39 * jnthn is...uh...not entirely keen to do an OpenSSL build :P
22:39 skink It's actually really easy to cross-compile
22:40 jnthn The libssh one was enough "fun" for me ;)
22:40 skink I just dunno if updated said libs will actually resolve that issue
22:40 skink updating*
22:40 skink So I'm looking into that atm
22:40 jnthn OK, cool, thanks :)
22:41 skink The bundle is 1.0.2j and latest of that series is 1.0.2k
22:41 jnthn I implemented/tested the thing on Ubuntu 16.04
22:42 pierre_ joined #perl6
22:42 jnthn Ideally the various native calls I added would end up back in the OpenSSL module though
22:42 jnthn Though I'm not quite happy with how things are structure there
22:42 jnthn The native symbols are all in packages so end up being package lookups
22:43 jnthn Which is a good bit slower if they were exported and then imported as lexicals
22:43 jnthn *than if
22:46 * BenGoldberg wonders whether methods are slower than package lookups or vice versa.
22:48 jnthn Methods range from faster to waaay faster
22:48 skink jnthn, I'm building atm, but for your purposes if you need it, cross-compile instructions are: https://github.com/sergot/openssl/pull/23
22:49 timotimo m: printf "%20s", "hello there";
22:49 camelia rakudo-moar e1994d: OUTPUT: «         hello there»
22:49 timotimo why is it right-aligned? :(
22:49 jnthn skink: oh wow, that's waaay easier than I expected :)
22:49 skink Only because those dudes had the foresight to include everything needed in the configure script
22:49 timotimo sounds like i need Inline::JavaScript and import left-pad
22:50 jnthn timotimo: .ident? :)
22:51 ZofBot joined #perl6
22:51 skink jnthn, And once built it's just a question of copying the two relevant dlls
22:51 jnthn timotimo: uh, .indent I meant :)
22:51 grondilu Tcl now targets webassembly :(  https://fossil.e-lehmann.de/wacl/index
22:52 timotimo jnthn: that doesn't put spaces at the end, though
22:52 poohman joined #perl6
22:52 go|dfish %-20s
22:52 timotimo m: printf "%-20s", "hello there";
22:52 camelia rakudo-moar fdb2b2: OUTPUT: «hello there         »
22:52 timotimo huh, fair i guess
22:55 grondilu "I'm a Perl fan and as such it saddens me to see other languages targeting wasm. I've been convinced for a while that webassembly is the next big thing in computing and so far the Perl community as far as I know has shown close to no interest whatsoever."
22:55 grondilu https://news.ycombinator.com/item?id=14229217
22:55 grondilu (just saying)
22:56 poohman joined #perl6
22:57 timotimo that's not quite true
22:57 AlexDani` joined #perl6
22:57 timotimo pmurias has mentioned wasm a few times
22:59 timotimo okay, so i have a %f, right?
22:59 timotimo it'll be between 0 and 100, but it can be 100, too
22:59 timotimo i'd like it to have a constant width
22:59 SHODAN joined #perl6
23:00 [Coke] .
23:00 musca joined #perl6
23:00 timotimo i'm not having much success with %06.3f
23:00 timotimo it'd be good if the . would line up
23:04 cgfbee joined #perl6
23:05 quester joined #perl6
23:14 timotimo http://imgur.com/a/tHklM - what does #perl6 think?
23:15 raschipi The problem with trying to represent dependencies in linux is that each distro packages them in a different manner. For example, if one needs ncurses development symbols to compile something, it will have a different name on each distro. In debian, it's called "libncurses5-dev", in fedora it's called "ncurses-devel", in Arch and Gentoo it's called "ncurses", etc.
23:16 skink timotimo, neat
23:17 raschipi Each one also divides things an a different way, so you never can be quite sure what package one might actually want.
23:22 Cabanossi joined #perl6
23:24 raschipi Packagekit tries to solve this issue, but I don't know how succesful it is: https://www.freedesktop.org/software/PackageKit/pk-faq.html#session-methods
23:24 gfldex samcv: luckily I implmenented `meta6 --issues` today, so I could learn about the issue you filed.
23:25 timotimo (now sorted by percentage)
23:32 raschipi If the dependency provides AppStream data, that can be used to locate software in a cross-distro manner too.
23:48 samcv nice gfldex
23:57 ugexe samcv: you may or may not want to use zef with `--/cached` - on google i see a failure for HTTP::Server::Tiny while testing Crust, but I fixed the failing test
23:58 ugexe so because its version *, you might have a cached version * from before the fix
23:58 timotimo keyboard input, am i right? damn it.
23:59 timotimo somehow i'm getting things with a delay of one ... sometimes

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo