Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-24

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:34 kurahaupo left #perl6
00:43 bpmedley joined #perl6
00:50 poohman joined #perl6
01:06 winnie_ joined #perl6
01:07 iyra_ joined #perl6
01:07 winnie_ m: my @a;@a[1;2]=33; say @a;
01:07 camelia rakudo-moar 1bce2e: OUTPUT: «[(Any) [(Any) (Any) 33]]␤»
01:18 BenGoldberg joined #perl6
01:21 sufrostico joined #perl6
01:30 aborazmeh joined #perl6
01:30 aborazmeh joined #perl6
01:47 wamba joined #perl6
01:48 ilbot3 joined #perl6
01:48 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:54 sufrostico joined #perl6
01:59 Cabanossi joined #perl6
02:15 astj joined #perl6
02:29 Cabanossi joined #perl6
02:31 eyck joined #perl6
02:35 gdonald joined #perl6
02:41 geekosaur joined #perl6
02:52 noganex_ joined #perl6
03:29 Cabanossi joined #perl6
03:35 holyghost joined #perl6
03:43 Cabanossi joined #perl6
03:58 samcv do you think it'd be a good idea to show the license of the project on the modules.perl6.org page
03:59 samcv with spdx identifiers can even provide links to https://spdx.org/licenses/licenseidentifier and will give them the full text of the license, and pages which also host the license too
04:07 CIAvash joined #perl6
04:07 samcv timotimo, https://github.com/timo/json_fast/pull/22 please accept Pull :-)
04:28 Cabanossi joined #perl6
04:32 Geth ¦ DBIish: samcv++ created pull request #91: Use SPDX identifier in license field of META6.json
04:32 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/pull/91
04:32 samcv oh hey i can merge that myself. heh. gonna do so
04:32 samcv didn't see it was perl6 org project
04:36 xtreak joined #perl6
04:44 u-ou I'm trying to write a grammar for the lambda calculus but anything I come with just recurses infinitely :I
04:46 Geth ¦ DBIish: 741bdcbf6c | (Samantha McVey)++ | META6.json
04:46 Geth ¦ DBIish: Use SPDX identifier in license field of META6.json
04:46 Geth ¦ DBIish:
04:46 Geth ¦ DBIish: Use the standardized identifier for the license field.
04:46 Geth ¦ DBIish: For more details see https://design.perl6.org/S22.html#license
04:46 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/commit/741bdcbf6c
04:46 Geth ¦ DBIish: 988fbf94a0 | (Samantha McVey)++ (committed using GitHub Web editor) | META6.json
04:46 Geth ¦ DBIish: Merge pull request #91 from samcv/license
04:46 Geth ¦ DBIish:
04:46 Geth ¦ DBIish: Use SPDX identifier in license field of META6.json
04:46 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/commit/988fbf94a0
04:46 Geth ¦ DBIish: 64ba4c4a08 | (Samantha McVey)++ | .travis.yml
04:46 Geth ¦ DBIish: Test DBIish on nom using Travis
04:46 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/commit/64ba4c4a08
04:46 samcv u-ou, oh no
05:10 nadim_ joined #perl6
05:11 curan joined #perl6
05:13 Cabanossi joined #perl6
05:15 wamba joined #perl6
05:36 andrzejku joined #perl6
05:37 lowbro joined #perl6
05:37 lowbro joined #perl6
05:39 andrzejku hi
05:40 andrzejku my friend asked me to make ecommerce web site
05:40 andrzejku some advice what to use
05:40 andrzejku ?:D
05:45 samcv idk :(
05:46 xtreak joined #perl6
05:57 ufobat___ joined #perl6
06:01 parv joined #perl6
06:03 moritz andrzejku: wordpress?
06:04 andrzejku really wordpress for ecommerce?
06:05 moritz or wucommerce or whatever the stuff is called
06:05 * moritz doesn't have first-hand experience, just heresay
06:06 parv apprently there is also square space, per its ad
06:16 andrzejku joined #perl6
06:30 domidumont joined #perl6
06:31 rindolf joined #perl6
06:35 domidumont joined #perl6
06:36 darutoko joined #perl6
06:42 Geth ¦ ecosystem: Tyil++ created pull request #330: Add Config::Parser::yaml
06:42 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/330
06:53 ufobat___ samcv, thanks for the pr :)
06:53 samcv :)
06:53 samcv PR for **everybodyyyyyyy**
06:54 samcv also if you check all your projects that'd be great
06:54 samcv in the last 4 days we're up from 13% projects with a "license" field to 20.5%
07:03 samcv m: my $list = 'https://'; say  $list.match(m/ ^ http[s]? '://' /)
07:04 camelia rakudo-moar c76a15: OUTPUT: «(timeout)Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤»
07:04 samcv guddamit
07:04 samcv bisectable: my $list = 'https://'; say  $list.match(m/ ^ http[s]? '://' /)
07:04 bisectable6 samcv, Bisecting by exit signal (old=2015.12 new=c76a15d). Old exit signal: 0 (None)
07:05 bisectable6 samcv, bisect log: https://gist.github.com/63f115aa24d62c09b32c5bf182596197
07:05 bisectable6 samcv, (2016-12-19) https://github.com/rakudo/rakudo/commit/3fe589309da1d7bc6dcf74188ccf730595e279b1
07:06 espadrine joined #perl6
07:06 Geth ¦ ecosystem: 2404a98606 | (Patrick Spek)++ (committed by Zoffix Znet) | META.list
07:06 Geth ¦ ecosystem: Add Config::Parser::yaml (#330)
07:06 Geth ¦ ecosystem:
07:06 Geth ¦ ecosystem: * Add Config
07:06 Geth ¦ ecosystem:
07:06 Geth ¦ ecosystem: * Add Config::Parser::yaml
07:06 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/2404a98606
07:07 samcv so maybe this has been around a long time
07:07 samcv m: my $list = 'https://'; say  $list.match(m/ ^ https? '://' /)
07:07 samcv why doesn't it work though...
07:07 camelia rakudo-moar c76a15: OUTPUT: «(timeout)Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤»
07:12 moritz samcv: m/.../ matches immediately against $_
07:12 moritz samcv: s you're passing a Nil to $list.match()
07:12 moritz not a regex
07:13 samcv ah k
07:13 samcv it shouldn't timeout though and use all cpu for ever
07:13 Cabanossi joined #perl6
07:14 moritz right
07:14 moritz IMHO it should fail to type-check
07:14 moritz though that might be not easy to do with the coercing going on for the Str candidate, or something :(
07:18 samcv or we could just check if it's Nil inside the function
07:18 samcv better than just totally stalling
07:19 moritz aye
07:20 gdonald joined #perl6
07:23 xtreak joined #perl6
07:24 zakharyas joined #perl6
07:26 nadim_ morning all, I have this construction return -> $c, |args {...}, If I understand it well we return a sub ref with its signature, right?
07:28 Geth ¦ doc: treyharris++ created pull request #1288: 5to6: Add caution about `exec` workarounds
07:28 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1288
07:30 Geth ¦ doc: 85fa870840 | (Trey Harris)++ (committed by Zoffix Znet) | doc/Language/5to6-perlfunc.pod6
07:30 Geth ¦ doc: 5to6: Add caution about `exec` workarounds (#1288)
07:30 Geth ¦ doc:
07:30 Geth ¦ doc: "shell and exit" are poor substitutes for exec in some common
07:30 Geth ¦ doc: situations. Add language to 5to6-perlfunc to explain these situations
07:30 Geth ¦ doc: and suggest NativeCall if they pertain.
07:30 Geth ¦ doc:
07:30 Geth ¦ doc: Also note that most Unixes have no single "exec" function exactly (Perl
07:30 Geth ¦ doc: 5 automagically dispatches the right one for the situation).
07:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/85fa870840
07:33 eater .tell
07:33 yoleaux Relay a telegram to someone
07:33 eater .tell Zoffix your "Thanks." looks very passive aggressive on PRs :')
07:33 yoleaux eater: I'll pass your message to Zoffix.
07:34 xtreak joined #perl6
07:42 g4 joined #perl6
07:42 g4 joined #perl6
07:49 Geth ¦ doc: treyharris++ created pull request #1289: 5to6-perlfunc: Fix typo
07:49 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1289
07:50 TreyHarris eater: passive-aggressiveness would have been appropriate, given ^^ ;-)
07:50 eater TreyHarris: :D
07:50 eater but he also does it on the ecosystem PRs :')
07:51 Geth ¦ doc: 223b511248 | (Trey Harris)++ | doc/Language/5to6-perlfunc.pod6
07:51 Geth ¦ doc: 5to6-perlfunc: Fix typo
07:51 Geth ¦ doc:
07:51 Geth ¦ doc: I apparently managed to hit the transpose key a few times accidentally
07:51 Geth ¦ doc: right after spell-checking...
07:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/223b511248
07:51 Geth ¦ doc: 8eff315232 | (Moritz Lenz)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
07:51 Geth ¦ doc: Merge pull request #1289 from treyharris/exec-fix
07:51 Geth ¦ doc:
07:51 Geth ¦ doc: 5to6-perlfunc: Fix typo
07:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8eff315232
07:51 moritz TreyHarris: fwiw you can push directly to perl6/doc, no need to create pull requests
07:52 bjz joined #perl6
07:52 * moritz doesn't find "Thanks." to be passive-agressive
07:56 ranguard moritz: just FYI every change to perl6/doc ends up as a new version on CPAN - so just from that point batching 'releases' (e.g. changes to your master branch) would be nice - but meh, it's only disk space
07:57 ranguard correction: every day I check if the sha of 'master' has changed - so not every change, but every day there is a change
07:57 labster joined #perl6
07:58 ranguard https://backpan.metacpan.org/authors/id/P/PS/PSIXDISTS/Perl6/ - you can see p6doc tar's at the end
07:58 moritz ranguard: but why?
07:58 masak moritz: I agree, "Thanks." is not passive-aggressive.
07:58 masak moritz: but there's an interesting trend online where full stops are perceived as quite, hm, "final"
08:00 ranguard moritz: so there is history for any module in the ecosystem - at the moment if I install a module today, and you install the module tomorrow... often it will have the same version number (authors don't seem to always update this) but could be totally different code - as it's just what is in the 'master' branch
08:02 jonas1 joined #perl6
08:02 ranguard when p6 works out what the ecosystem should use long term (I'm hopeing PAUSE) then at least users can have stability of knowing that if we both have version X it will be the same code
08:03 * ranguard knows the whole point is there can be multiple 'sources' of modules, but I hope there will be one centralised default - otherwise there is no hope for trying to build standards that help everyone
08:04 * ranguard is at PTS and hopes to discuss this there
08:06 samcv ranguard, what i think might work as a stopgap, is attaching git commits to the metadata that the package managers download
08:07 samcv so then even if the version is the same, it would know there has been an update from its version. though that wouldn't solve the whole problem for sure
08:08 moritz ranguard: you can get the history from the git repos; no need to abuse PAUSE for that, IMHO
08:08 ranguard samcv: https://github.com/perl6modules/ - this is my stopgap - there is now at least a daily history of anything that has valid meta (I gave up trying to fix where people were copy/pasting and have invalid meta)
08:09 ranguard moritz: but if you and I are talking about version X of a module we could be talking about completly different code - and it also relys on someone not deleting the git repo at some point, or deleting all history etc
08:09 samcv nice!
08:10 moritz ranguard: point taken. But I still don't see any practical value from the daily snapshots
08:10 ranguard moritz: because there is no process to require authors to update the version number - so we then have to start talking about when did you install the module which just seems insain
08:11 moritz ranguard: do you actually install from those daily snapshots?
08:11 samcv i'm checking how many packages are candidates for automated pull requests again
08:11 samcv (ones that have *no* license field in the metadata) since the past batch was corrections of existing metadata
08:11 ranguard moritz: PSIXDISTS is just a short term stop gap
08:11 ranguard it should be thrown away once there is a 'standard' release process for p6 modules to the world
08:11 samcv running it right now. and it excludes any modules that have already a PR or issue open with them, at least that are attached to the ecosystem issue tracker
08:12 samcv ranguard, did you see my post about license tags on meta files?
08:12 ranguard moritz: I don't use p6 - just couldn't stand the idea of historic data being lost
08:12 samcv if you are interested https://cry.nu/perl6/ecosystem-license-module-tagging/
08:12 samcv that is a noble cause ranguard
08:12 ranguard samcv: yea, feels like another thing that could be easily promoted if there was a standard 'release' process
08:13 samcv yeah. there is now a pull request temlate so everybody adding to the ecosystem has to check a box saying that yes they have a license tag
08:13 aindilis joined #perl6
08:13 samcv well. there's one that says *not recommended warning i knwo this is dumb and have no license tag*. but. so far all new eco modules have had proper license tags :)
08:13 samcv from my post: P.S. On April 19th only 13% of modules had a license field at all. Now, 4 days later we are up to 20.5%! Keep up the good work everyone!
08:14 samcv so that is very encouraging.
08:14 El_Che libs offering master as the installable version is a receipt for trouble. It's the way Go works and they are now working on that problem. In the mean while, everyone "vendors' their depenencies == keeping a copy of the deps
08:15 samcv i mean i don't disagree that things could continue to happen on github. but we could have a command line tool or somesuch that could check metadata or something and submit it. to make it easier for peolpe to update the modules
08:15 ranguard samcv: yea, though at the moment p6 only has a few modules - when there are thousands getting this sort of thing fixed is going to get hard :)
08:15 samcv myabe even bump the version for them
08:15 samcv yes. there's like 900?
08:15 samcv so 13 to 20% is still a lot
08:15 samcv so hopefully i can bring that up as high as humanly and robotly possible
08:15 ranguard samcv: p5 has dozens of tools for that + intergration with PAUSE - would love someone to do that for p6
08:16 El_Che "as humanly and robotly possible" <-- samcv++
08:16 samcv so. checking how many projects have license files with no issues/license pr atm. will take a long time to check this
08:16 samcv 639 modules that have no license data (that don't have an issue or PR open atm)
08:16 samcv hopefully the number i can automate is like at least half that
08:17 * samcv crosses fingers
08:20 samcv ok so we have 290 https://gist.github.com/samcv/0ec6bc3699f6e84835d571c7bdbe9db3
08:20 samcv i guess i'll take that
08:21 dakkar joined #perl6
08:21 samcv also need to see how i can make `gist` not set files to .rb if it doesn't know the filename
08:21 samcv i don't even use ruby..
08:22 samcv i guess that's their default. for some reason they think people upload more .rb files than .txt type files :\
08:22 El_Che mmm, my ubuntu 16.04 pkg does not work on the w10 linux subsystem :(
08:25 wamba joined #perl6
08:25 El_Che ha
08:25 El_Che fixed
08:26 samcv oh interesting apparently github also uses SPDX identifiers with their license api
08:26 samcv or at least returns back SPDX license identifiers
08:27 xtreak joined #perl6
08:27 samcv their standard documents are the most boring thing i've ever read. maybe. at least in the last few months
08:28 Cabanossi joined #perl6
08:29 samcv it's getting late, i'll work more on this tomorrow
08:35 domidumont joined #perl6
08:37 xtreak joined #perl6
08:53 xtreak joined #perl6
09:10 sena_kun joined #perl6
09:10 sena_kun hi folks
09:11 u-ou hi
09:12 sena_kun it is a bit unexpected to ask, but I've seen a pic about -Ofun, there was a diagonal learning curve on a plot of two axis(skills and complexity of task afaik), the lower part was "boring" and the upper part was "impossible", diagonal line was "fun". does anyone know where I can find it?
09:16 xtreak joined #perl6
09:18 sena_kun ah, I've found it. nevermind me.
09:23 nadim_ sena_kun:  then give URL please so the rest of us can O-fun too
09:24 samcv show me sena_kun
09:25 sena_kun https://perl6advent.files.wordpress.com/2015/12/camelia-flowing.gif?w=788
09:25 sena_kun it was from advent
09:30 nadim_ sena_kun++
09:32 timotimo Your branch is up-to-date with 'origin/master'.
09:32 timotimo Failed running /home/travis/.rakudobrew/bin/../moar-nom/install/bin/perl6 -Ilib bin/zef test . at /home/travis/.rakudobrew/bin/rakudobrew line 58
09:32 timotimo anyone seen this before?
09:38 xtreak joined #perl6
09:38 wamba joined #perl6
09:43 nadim_ I have my class C {method xxx{} ... }; xxx implements a defautl behavior, I want to override that behavior, so I have role non_default { method xxx{} } and that I make class C do. But the defaut behavior is not overriden; where did I go wrong?
09:45 jnthn How dod you make class C do it?
09:45 jnthn *did
09:46 jnthn In the case of class C does R { }, then the method in C will override the one in the role R
09:46 jnthn (Consistent with class C is P { } where the method in the class also wins)
09:47 wamba joined #perl6
09:47 nadim_ jnthn: how does pne override a method then?
09:48 jnthn If you want the role's method to win then you need a subclass that applies the role, perhaps an anonymous one produced using `but`
09:48 nadim_ or shall one move the default behavior to role
09:48 jnthn Yes, the default behavior being in the role would be the more natural design :)
09:49 xtreak joined #perl6
09:50 nadim_ methods in roles override each other?
09:50 nadim_ I think I read that somewhere
09:51 jnthn If you compose two roles that both provide the same method then it's a compile-time conflict error
09:51 nadim_ bleah!
09:52 nadim_ a good bleah but still one
09:52 jnthn Which is resolved by the class that is composing them
09:52 timotimo we should introduce a slang that instead of making a compile-time error it just rolls the dice each time
09:52 jnthn s/should/could if we were super bored/ :P
09:52 nadim_ that would be BLEAHGH!
09:55 Actualeyes joined #perl6
09:56 nadim_ so I got the error (I wanted to see it)  method 'tracer' must be resolved by class TracedGrammarHOW because it exists in multiple roles (TracedGrammarTreeDDT, TraceGrammerDefaultTracer)
09:56 timotimo i wonder if it should make a suggestion
09:57 nadim_ yes, because resolve is not clear how
09:57 timotimo "for example method tracer(|c) { self.TracedGrammarTreeDDT::tracer(|c)
09:57 timotimo "
09:57 nadim_ ok
09:58 AlexDaniel joined #perl6
09:59 timotimo we have all the names we need, we'd just have to put the string together in the message method of the exception object
09:59 * timotimo AFK
09:59 nadim_ interestingly, class C does X is Y, will not complay even if X and Y have the same method
10:00 nadim_ and the method in X (which is "done") is the one that is used
10:02 xtreak joined #perl6
10:03 jnthn No, because `is Y` will turn the role into an anonymous class and inherit from it
10:04 jnthn So it doesn't come into role composition at all
10:04 nadim_ get it
10:05 nadim_ and because the anonymous is a class, its method takes over, right?
10:13 Cabanossi joined #perl6
10:15 labster joined #perl6
10:15 jnthn Since it's a class then we override it in our subclass just like with inheritance normally, yes
10:22 sunnavy joined #perl6
10:24 nadim_ jnthn: https://nopaste.linux-dev.org/?1123828   it's Grammar::Tracer; I have split your class so it calls tracer(); I have made a tracer that creates a "call tree", then added another class that dumps the call tree with Data::Dump::Tree. the call tree could be dumped by something else. You talked about "options" for the tracer, this could be a way
10:26 nadim_ jnthn: the advantage of this approach is that DDT can dump with different glyph, shorten the string, ... I may also make a DHTML renderer which may come handy when the parsing is for very large data
10:27 jnthn This looks like a good approach overall, yes :)
10:29 nadim_ Just have to find a way to pass a role or two when the Grammar::Trace is used. I don't know how to do that.
10:32 TimToady joined #perl6
10:33 jnthn Maybe something with sub EXPORT is possible
10:34 wamba joined #perl6
10:37 nadim_ can you point me to an URL or a presentation?
10:37 nadim_ http://imgur.com/l5Sc4fF   we get a few things for free with DDT
10:38 jnthn https://docs.perl6.org/language/modules#index-entry-sub_EXPORT
10:39 nadim_ we only use MATCH, are there other interesting data to collect, from-to? etc... ?  I had a look at the methods but couldn't really figure what to add
10:39 jnthn I think in most cases the from/to indices would just be clutter
10:40 nadim_ shouldn't we be importing things instead? something like: use Grammar::Trace role, role, role ...
10:41 jnthn Yes, that's what I was thinking. sub EXPORT(*@roles) { ...do stuff here... }
10:41 nadim_ jnthn: that's the good thing with this approach, from-to are optional, the end user can add whatever she wants
10:41 jnthn Should let us receive those roles
10:42 timotimo so "use DDG (MyRoleOne, MyRoleTwo);"?
10:43 jnthn Aye
10:43 nadim_ something like that. what's DDG btw?
10:44 timotimo Data::Dump::Grammar
10:44 timotimo i don't know what your module is actually called
10:46 nadim_ it's Jnth's, Grammar::Tracer is the name. I just do the roles. well, I did a module of my own byt we're trying to make it pluggable.
10:47 timotimo OK
10:47 nadim_ how I think it could look like https://nopaste.linux-dev.org/?1123828
10:49 nadim_ do we have the equivalent of a C++ pure virtual? a C++ pure virtual with default implementation?
10:51 grondilu from S12:  q{All public method calls are "virtual" in the C++ sense.}
10:53 nadim_ the question was specifically for pure virtual but thank for that anyway
10:53 timotimo i'm not sure what pure virtual means
10:54 nadim_ a derived class must declare a method or you get a compile time error
10:55 nadim_ if base has pure virtual method, then derived must have that method, or no instance can be created
10:55 timotimo okay, but how does that mix with default implementation?
10:55 timotimo if the derived has that method, it won't do the default implementation
10:55 timotimo if the derived doesn't have the method, it will do the default implementation, but it will also not allow you to compile at all
10:56 nadim_ a pure virtual with default implementation has a default implementation in the base clkass but derived classes must declare the method anyway
10:56 nadim_ and the derived class can call the default implementation in the base class
10:57 nadim_ also important, base classes with pure virtual can not be instantiated
10:57 nadim_ a class with only pure virtual can be seen as a "contract"
10:58 timotimo hm, difficult. can make it explode by putting a piece of code into the role's body i guess
10:59 nadim_ someone said "Explode"?
10:59 nadim_ can you please explain, I didn't get it ;)
10:59 timotimo give an error in the same cases cpp does
10:59 timotimo i'm typing out something
10:59 nadim_ I get it now
10:59 timotimo it'll check if the class the role is being composed into is an empty class (which is what happens if you pun a role), and if not it looks if the mixed-into class implements that function itself, and if not it'll "die"
11:03 nadim_ that would be nice specially if it is not called  class but contract.
11:04 nadim_ or if contract is a role. class A is contract {...}
11:04 nadim_ timotimo: can one declare a method without body? (I think I have seen that)
11:11 gdonald joined #perl6
11:13 timotimo no, only {...}
11:13 Cabanossi joined #perl6
11:17 pmurias joined #perl6
11:17 nadim_ can one pre declase a method, eg: declase its name and signature brefore it is defined?
11:22 moritz m: class A { method x() {... }; method x() { say "implementation" }}; A.x
11:22 camelia rakudo-moar 1c2197: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Package 'A' already has a method 'x' (did you mean to declare a multi-method?)␤at <tmp>:1␤»
11:22 moritz nadim_: it seems you can't
11:22 moritz except if you put the pre-declaration into a role
11:23 AlexDaniel m: class A { proto method x { * }; multi method x() { say "implementation" }}; A.new.x
11:23 camelia rakudo-moar 1c2197: OUTPUT: «implementation␤»
11:24 xtreak joined #perl6
11:25 AlexDaniel wtf is wrong with this error message…
11:25 AlexDaniel m: class A { proto method x { * }; }; A.x
11:25 camelia rakudo-moar 1c2197: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤Cannot resolve caller x(A); none of these signatures match:␤  i…»
11:28 domidumont joined #perl6
11:31 pmurias nadim_: what would would the use of pre declaring a method be?
11:34 nadim_ make it known to the compiler without having to give it a body. I am not saying we need it. it is practical in other languages
11:35 AlexDaniel well, the proto thingy should work just fine, right?
11:39 timotimo nadim_: the compiler doesn't have any interest in knowing methods up front
11:39 timotimo nadim_: after all, whether a method exists or not is solely at the discretion of the class
11:39 timotimo i.e. if it has a ^find_method
11:40 timotimo private methods are different, though
11:48 jameslenz joined #perl6
11:48 sammers hi #perl6
11:52 domidumont joined #perl6
11:52 timotimo yo
11:54 Woodi hi #perl6 :)
11:54 Woodi do Perl6 grammars are Attribute Grammars ?  https://wiki.haskell.org/The_Monad.Reader/Issue4/Why_Attribute_Grammars_Matter
11:57 nadim_ Woodi: yo!
11:58 domidumont joined #perl6
11:59 wamba joined #perl6
12:01 sammers is anyone working on adding GtkStatusIcon support to gtk-simple? If not, I want to start working on it...
12:04 iyra joined #perl6
12:13 Cabanossi joined #perl6
12:17 nadim_ Anyonw having a Grammar with a few levels of depth (more than 3) and a test data? Where do I find the P6 Grammar, maybe I can use that on a little piece of code.
12:17 timotimo nadim_: you could try Yamlish
12:17 timotimo YAMLish
12:17 moritz nadim_: rakudo's repo, src/Perl6/Grammar.pm (but that's written in NQP)
12:17 DrForr ANTLR4 - lib/ANTLR4/Grammar.pm
12:17 moritz nadim_: and JSON::Tiny has a nice, tidy grammar (IMHO), which can go as many levels deep as you nest your JSON objects
12:18 cpage_ joined #perl6
12:19 aborazmeh joined #perl6
12:19 aborazmeh joined #perl6
12:20 nadim_ moritz: Ii have played a bit with JSON::Tiny, gives nice results in Data::Dump::Tree compared to .gist
12:23 nadim_ but the Grammar  is tiny. I need something to test Grammar Trace to see how big stuff gets displayed
12:24 nadim_ timotimo:  yes Yamlish looks nice
12:26 tbrowder hi, #perl6!
12:26 nadim_ hi
12:27 tbrowder i know there has been a lot of ecosystem work recently and it may be the source of zef install probs i'm having
12:27 cpage_ joined #perl6
12:28 tbrowder hi, nadim!
12:28 raschipi joined #perl6
12:29 sammers ok, nevermind... it was deprecated for GNotification
12:30 tbrowder the two modules causing problems are both missing a licence line in the meta file: File::Find and File::Directory::Tree
12:31 cpage_ joined #perl6
12:32 nadim_ jnthn: have though thought about a solution to make grammar tracing in a grammar that is defined in a foreign module? EG: I just installed Yamlish and I'd like to trace it.
12:33 jnthn nadim_: The tracing relies on using a different meta-class when compiling the grammar
12:33 jnthn I guess maybe we could do a mixin to the meta-object to handle that case
12:34 jnthn But not sure how easily that'd work out
12:34 jnthn Easiest bet is to clone the repo
12:34 jnthn And add use Grammar::Tracer
12:34 jnthn Since it's primarily meant for the authors of grammars :)
12:35 nadim_ what I am doing right now :)
12:35 perlpilot joined #perl6
12:35 nadim_ you are tight, it's the better way
12:39 * [Coke] waves.
12:41 pmurias \o
12:45 Zoffix joined #perl6
12:46 Zoffix tbrowder: what sort of issues are you having? What's your perl6 version and are you sure your zef is at its latest version?
12:46 sufrostico joined #perl6
12:50 tbrowder ugexe: i'm upgrading zef now, i hadn't used it since the great IO refactor
12:52 tbrowder ugexe: that cured my probs, thanks!
12:53 Zoffix left #perl6
12:57 bjz_ joined #perl6
12:58 g0d355__ joined #perl6
13:00 [Coke] looks like there's a large min width on the irc logs. (have to open the page really wide to get all the text)
13:02 [Coke] can't find the style doing that.
13:03 mcmillhj joined #perl6
13:05 * pmurias looks at that
13:06 sufrostico joined #perl6
13:09 cpage_ joined #perl6
13:10 nadim_ jnthn: Grammar::Tracer (both your version (I may not  have the latest) and my versions) break YAMLish tests.
13:11 nadim_ jnthn: also the version using objects rather than just faking a stack with tabs, is really much slower, undoubtedly Data::Dump::Tree fault
13:12 timotimo oh! damn
13:12 nadim_ jnthn: It was fun to write but I wonder if it is worth the slower execution time
13:13 timotimo i remember trying Grammar::Tracer with YAMLish and it didn't parse some stuff because of it
13:13 timotimo i shouldn't have suggested it without thinking :|
13:13 nadim_ Nahh, errors are also good to know
13:14 nadim_ I forced the install and I got a dump anyway for what I tested. I don't know how "good" the grammar is but there is certainly a lot of parsing going on even for a short YAML
13:16 timotimo how familiar are you with yaml's specification?
13:16 nadim_ Saw it a few years ago
13:16 nadim_ As I  wrote "I don't know"
13:16 * moritz just know it's *much* bigger than XML's spec
13:16 timotimo it's got to do a whole lot of stuff
13:17 nadim_ it looks like it, 125 characters YAML fires 1025 tokens
13:17 timotimo most of the stuff it has to do isn't quite easy
13:18 [Coke] samcv: are you automating prs for repos with licenses but lacking metadata?
13:18 pmurias [Coke]: you mean the irc log window has a scroll bar if it's not wide enough?
13:19 [Coke] pmurias: as I was double checking... apparently it is fine on this page. wonder if it was just a previous page I was looking at. one sec.
13:20 pmurias [Coke]: long links cause that
13:20 [Coke] https://irclog.perlgeek.de/perl6/2017-04-24 - this seems to wrap fine. https://irclog.perlgeek.de/perl6/2017-04-22 has a scrollbar.
13:21 [Coke] ah, long unbreakable words - should we use the css to make those breakable?
13:28 timotimo what is causing that? the "symbol for nl" not being an acceptable break point?
13:28 xtreak joined #perl6
13:30 pmurias timotimo: url links that are too long
13:32 timotimo oh
13:33 ggoebel joined #perl6
13:38 skids joined #perl6
13:42 eliasr joined #perl6
13:43 Cabanossi joined #perl6
13:45 domidumont1 joined #perl6
13:48 xtreak joined #perl6
13:51 moritz [Coke]: it used to be done by adding zero-width spaces; I've switched to CSS
13:58 wamba joined #perl6
14:01 raschipi joined #perl6
14:01 tbrowder m:my $f='t';my $f2='tt'; spurt $f, 'foo'; symlink $f2, $f;  say $f2.IO.L
14:01 evalable6 tbrowder, rakudo-moar 64c303297: OUTPUT: «(exit code 1) spurt is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub spurt at src/RESTRICTED.setting line 17␤  in block <unit> at /tmp/3VvG7CVMBJ line 1␤»
14:05 tbrowder i messed up with the L method which was meant to be l, but that test is. not working on my perl6 frm a few days ago. is working in the latest nom?
14:06 perlpilot tbrowder: don't you have the args to symlink backwards?   Isn't it symlink $from, $to;  ?
14:09 tbrowder i think it is backwards last time i looked
14:11 perlpilot ➤ perl6 -e 'my $f="t";my $f2="tt"; spurt $f, "foo"; symlink $f, $f2;  say $f2.IO.l'
14:11 perlpilot True
14:13 tbrowder you're correct, i swear i either have dislexia or the diocs have changed
14:21 raschipi Isn't this change part of XZoffix's grant? "The changes to &symlink and &link affected IO::Path.symlink and IO::Path.link as well. The new order of arguments is $existing-thing.symlink: $the-new-thing-we're-creating (same for .link)"
14:24 timotimo yes aMlink was just fixed
14:24 timotimo symlink
14:24 timotimo it wasnt tested properly or somethim
14:33 khw joined #perl6
14:39 sena_kun joined #perl6
14:43 Cabanossi joined #perl6
14:46 pmurias is Perl 6 defined by roast or fudged roast?
14:49 geekosaur roast. fudges are known deviations
14:53 [Coke] ... eh. for 6.c it's not clearly defined.
14:54 pmurias https://github.com/perl6/roast/blob/master/S02-names/pseudo.t#L335 - this test looks incorrect
14:54 pmurias CALLERS would see that variable, CALLER wouldn't see it
14:54 [Coke] if you find a bad test that's fudged out, you can almost certainly fix it and unfudge it in master, and you can probably also do the same in 6.c-errata if you get some core devs (whoever they are) to say "sure"
14:55 [Coke] ... especially with a comment like:     #?rakudo todo 'not entirely sure these make sense...'
14:56 cdg joined #perl6
14:56 pmurias hmm, it seems CALLERS is implemented and documened but not tested :(
15:10 poohman joined #perl6
15:10 poohman m: say "test";
15:10 camelia rakudo-moar 34b58d: OUTPUT: «test␤»
15:17 pmurias I added a test for CALLLERS. If it's not meant to be specced feel free to revert it
15:23 Kaffe joined #perl6
15:27 tyil is there a standard for DocBlocks in perl6 with pod?
15:29 perlpilot joined #perl6
15:29 alimon joined #perl6
15:29 eater tyil: #
15:29 eater ?#|
15:29 eater eh I mean: #|
15:30 tyil yeah,  I thought those ment something in your code, but I couldnt find anything about it on https://docs.perl6.org/language/pod, so I thoight I'd as
15:30 tyil k
15:34 eater ye
15:34 eater there is no documentation
15:34 eater but it exists
15:37 DrForr There's documentation in the synopses, feel free to add your own :)
15:38 DrForr They do mean something, #| and #= at the least can be accessed through .HOW (I think)
15:38 DrForr I use #={..} to store out-of-band info in my ANTLR compiler.
15:41 perlpilot I think they're accessed via .WHY
15:42 DrForr Entirely possible, I didn't really look too deeply. I just use #={..} to store structured JSON in case there's an interpreter out there that'll read the grammar eventually.
15:42 Cabanossi joined #perl6
15:43 geekosaur .HOW is the MOP
15:43 geekosaur .WHY would be the docs
15:45 pmurias DrForr: you are compiling ANTLR to Perl 6 grammars?
15:46 DrForr https://github.com/drforr/perl6-ANTLR4
15:46 DrForr I did this before the GLR, so now that I have a bit of time whilst searching for work, I'm rewriting it.
15:49 DrForr Incidentally the POD synopsis is https://design.perl6.org/S26.html
15:49 DrForr The Perl6::Tidy stuff is to the point where it tidies lots of common perl6 code so I'm comfortable leaving it alone for a while.
16:03 dogbert17 joined #perl6
16:11 robertle joined #perl6
16:13 Cabanossi joined #perl6
16:26 rindolf joined #perl6
16:26 gdonald joined #perl6
16:29 isBEKaml joined #perl6
16:33 wamba joined #perl6
16:38 zostay p6: my $x = *; say "a" ~~ $x; say "a" | "b" ~~ $x;
16:38 camelia rakudo-moar d0cd13: OUTPUT: «True␤False␤»
16:38 TimToady CALLERS is meant to be specced, as it happens
16:39 TimToady it's just we were very busy trying to get 6.c out about the time I hacked it in
16:40 TimToady m: my $x = *; say Junction ~~ $x
16:40 camelia rakudo-moar d0cd13: OUTPUT: «False␤»
16:40 TimToady m: my $x = *; say Junction ~~ *
16:40 camelia rakudo-moar d0cd13: OUTPUT: «{ ... }␤»
16:40 TimToady right
16:41 gfldex m: my $x = *; say Junction ~~ Whatever;
16:41 camelia rakudo-moar d0cd13: OUTPUT: «False␤»
16:43 Cabanossi joined #perl6
16:44 andrzejku joined #perl6
16:45 poohman joined #perl6
16:52 TimToady m: my $x = *; say 42 ~~ $x
16:52 camelia rakudo-moar d0cd13: OUTPUT: «True␤»
16:52 TimToady m: my $x = Whatever; say 42 ~~ $x
16:52 camelia rakudo-moar d0cd13: OUTPUT: «False␤»
16:52 TimToady it pays attention to :U vs :D there
17:00 lowbro joined #perl6
17:00 lowbro joined #perl6
17:02 kurahaupo joined #perl6
17:08 pmurias jnthn: cleardispatcher ignore setdispatcherfor on JVM put not on MoarVM (not sure if it's ok and if I should fix that)
17:13 Cabanossi joined #perl6
17:23 imcsk8 joined #perl6
17:36 japhb pmurias: You may want to .tell jnthn that, he's AFK for a couple days according to #moarvm
17:37 labster joined #perl6
17:45 kurahaupo joined #perl6
17:51 drrho_ joined #perl6
17:54 domidumont joined #perl6
18:00 Possum joined #perl6
18:03 geekosaur joined #perl6
18:14 iyra joined #perl6
18:33 kyan joined #perl6
18:35 espadrine joined #perl6
19:08 xinming joined #perl6
19:10 andrzejku joined #perl6
19:22 zacts joined #perl6
19:24 Ven joined #perl6
19:29 bjz joined #perl6
19:29 vendethiel joined #perl6
19:30 Cabanossi joined #perl6
19:39 pmurias why is \c[LINE FEED (LF)] being deprecated?
19:43 timotimo because unicode deprecated it
19:44 pmurias ok
19:44 masak turns out people don't feed lines anymore
19:44 ambs they got too fat
19:45 pmurias masak: \c[LINE FEED] still works
19:45 TEttinger joined #perl6
19:46 masak oh, good
19:46 masak who knows when I might need a good line feed next time
19:57 pmurias I'll likely need to steal the MoarVM unicode database processing script and adapt it for my js goals at some point rather then using some random library from npm
19:58 raschipi We still have impact matrix printers for security purposes. They still use line feeds.
20:01 samcv morning
20:02 raschipi ohayo
20:02 pmurias raschipi: how do they help with security?
20:05 kyan joined #perl6
20:05 raschipi pmurias: You can't copy it with a simple photocopier, you'd need something close to the original equipment.
20:05 Ven_ joined #perl6
20:06 raschipi To match the intaglio with the ink
20:07 raschipi By using custom fonts, it becomes even more difficult to copy.
20:13 cdg joined #perl6
20:15 MasterDuke_ is there a pre-defined regex group/rule/whatever for quote characters?
20:21 zapwai joined #perl6
20:25 samcv oh hi pmurias
20:25 pmurias samcv: hi
20:25 samcv i am here and can answer all your questions. but "LINE FEED (LF)" was a unicode 1.0 name. past unicode 1.0 they solidified all names and now names never change
20:26 samcv so we use unicode non-1.0 names and unicode name aliases (LINE FEED) is one of those
20:26 samcv and name aliases are nonchanging too
20:26 samcv to the name aliases give us names for all the control characters that no longer have normal names
20:27 samcv and for example unicode 1.0 has a name "BELL", but unicode today has a BELL which is a picture of a bell, not a control character. so there can be conflicts
20:27 samcv so just to make sure nobodies code broke i deprecated the (i think 3 or 4?) unicode 1 names that did not have idetical name aliases
20:28 samcv but you can use: "LF" or LINE FEED, instead of LINE FEED (LF)
20:28 samcv which is kind of nicer
20:28 samcv writing "\c[LINE FEED (LF)]" is kind of a weird name regardless.
20:28 El_Che .tell Zoffix. I'll release updated 2017.03 packages tomorrow with Windows 10 bash support. I'll wait with 2014.04 until npq get released.
20:28 yoleaux El_Che: What kind of a name is "Zoffix."?!
20:29 El_Che .tell Zoffix I'll release updated 2017.03 packages tomorrow with Windows 10 bash support. I'll wait with 2014.04 until npq get released.
20:29 yoleaux El_Che: I'll pass your message to Zoffix.
20:29 AlexDaniel joined #perl6
20:30 MasterDuke_ samcv: do we have an easy way of matching a quoted string? e.g., "double", or 'single', or `backwards`, or the other fancy ones?
20:30 Cabanossi joined #perl6
20:30 samcv here we go pmurias https://github.com/MoarVM/MoarVM/commit/816186484b5cc52f9ff1be6afa3b6f49264335bf read the commit description here. this is all the user facing changes that happen if you disregard unicode 1 names and only use name aliases
20:31 mr-foobar joined #perl6
20:31 samcv uhm
20:31 samcv you mean like in a regex?
20:31 El_Che If someone would have told me in early 2015 that I would be releasing *Ubuntu* *Perl 6* pacakges for *Windows* *10* I would have call them crackpots
20:31 MasterDuke_ yeah
20:31 samcv 8)
20:32 samcv pmurias, also here's a list of all official name aliases ftp://ftp.unicode.org/Public/UCD/latest/ucd/NameAliases.txt
20:32 moritz El_Che: there's no day like to today for being a crackpot :-)
20:33 El_Che on the other hand, brexit, trump
20:33 El_Che so it all makes sense
20:33 samcv 21.904762% of modules now have license field. yay 1.5% higher than a day ago. needs to be higher.
20:33 * moritz want trumpxit
20:33 samcv hopefully today i can automate some more mass PR
20:33 samcv like 200 or so
20:34 El_Che samcv: nice job
20:44 samcv we have 298 or so projects that don't have license fields in META but at least have a license file (haven't checked the license files yet) that's todays job
20:49 Ven joined #perl6
21:01 mr-foobar joined #perl6
21:10 gfldex samcv: have you considered to check for known licenses in LICENSE and use `meta6 --fork-module; your-magic-here.sh; meta6 --pull-request --message="dude I got your back!"`
21:10 samcv i have not
21:10 samcv i've been using `hub` program
21:15 Cabanossi joined #perl6
21:20 sammers gfldex: thanks for meta6. very useful
21:29 samcv how do i test if a list is mutable or not, is there a method or what
21:31 samcv i need to alter any positionals, maybe easier to just put in an array?
21:31 samcv instead of testing if they're mutable
21:42 gdonald joined #perl6
21:46 gfldex lizmat++ # i should do this once a week
21:46 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/04/24/2017-17-interesting-times/
21:47 gfldex samcv: see https://docs.perl6.org/type/PositionalBindFailover
22:03 AlexDaniel m: for 0^ ... 3 { .say }
22:03 camelia rakudo-moar f0414c: OUTPUT: «3␤  in block <unit> at <tmp> line 1␤␤»
22:03 timotimo heh.
22:04 timotimo you need it asplained?
22:06 kyan joined #perl6
22:12 AlexDaniel timotimo: well, I haven't even tried understanding it xD
22:12 AlexDaniel :|
22:12 AlexDaniel --target=ast for this prints “Oops!!! Cannot invoke this object (REPR: P6opaque; NQPMu)”
22:13 timotimo haha, great
22:14 timotimo well, you're creating a "one" junction from 0 and the result of calling ... with 3
22:14 timotimo then you're iterating over that junction with the block { .say }
22:15 timotimo but of course ... already throws an exception when it gets invoked
22:15 Cabanossi joined #perl6
22:15 timotimo so it won't get to the iteration
22:15 timotimo m: say ... 3
22:15 camelia rakudo-moar f0414c: OUTPUT: «Potential difficulties:␤    Apparent sequence operator parsed as stubbed function argument; please supply any missing argument to the function or the sequence (or parenthesize the ... call, or use 'fail' instead of ...)␤    at <tmp>:1␤    ------> …»
22:15 timotimo m: say 0^ ... 3
22:15 camelia rakudo-moar f0414c: OUTPUT: «3␤  in block <unit> at <tmp> line 1␤␤»
22:16 timotimo i wonder why it doesn't give that analysis here
22:16 timotimo m: ... 3
22:16 camelia rakudo-moar f0414c: OUTPUT: «3␤  in block <unit> at <tmp> line 1␤␤»
22:16 timotimo m: say() ... 3
22:16 AlexDaniel o_o
22:16 timotimo oh, that's really the range operator this time
22:16 camelia rakudo-moar f0414c: OUTPUT: «(timeout)Potential difficulties:␤    Useless use of ... in sink context␤    at <tmp>:1␤    ------> 3say() ...7⏏5 3␤␤»
22:16 AlexDaniel and why is it reified?
22:16 timotimo anyway, i'll be going to bed and i'm not going to be around much tomorrow
22:16 timotimo reified?
22:17 AlexDaniel ye, it times out
22:17 AlexDaniel m: 0 ... *
22:17 timotimo because after True comes True
22:17 timotimo and after True comes True
22:17 timotimo and after that comes True
22:17 camelia rakudo-moar f0414c: OUTPUT: «(timeout)Potential difficulties:␤    Useless use of ... in sink context␤    at <tmp>:1␤    ------> 0 ...7⏏5 *␤»
22:17 timotimo and the next value is also True
22:17 AlexDaniel and why does it have to do it?
22:18 AlexDaniel :S
22:18 timotimo because you're asking for it :)
22:18 AlexDaniel can't see that
22:18 gfldex m: say True.succ
22:18 camelia rakudo-moar f0414c: OUTPUT: «True␤»
22:18 timotimo m: .say for True ... 3
22:18 gfldex m: say (0^).succ
22:18 AlexDaniel timotimo: can't see how sinking something is asking for an infinite range to be reified
22:18 AlexDaniel not range but sequence
22:19 AlexDaniel whatever
22:19 camelia rakudo-moar f0414c: OUTPUT: «(timeout)True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤…»
22:19 camelia rakudo-moar f0414c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3say (0^7⏏5).succ␤    expecting any of:␤        prefix␤        term␤»
22:19 timotimo it doesn't actually realize it's infinite
22:19 timotimo and it's not smart enough to prove that nothing in that sequence needs to have .sink called on it for things to be correct
22:19 timotimo but even if it did, we'd have a sequence operator that sometimes is clever enough to not infinitely loop
22:19 timotimo and users that rely on this smartness
22:20 AlexDaniel alright
22:20 timotimo i'll head to bed :)
22:21 AlexDaniel thanks, see ya
22:21 timotimo seeya!
22:22 AlexDaniel fwiw, it changed here: https://github.com/rakudo/rakudo/commit/8f3e7b3e7d0eed4d85a1d83d0d873c24af39bfa4
22:22 AlexDaniel c: 8f3e7b3e^ 0...*
22:22 committable6 AlexDaniel, ¦8f3e7b3e^: «»
22:22 AlexDaniel c: 8f3e7b3e 0...*
22:22 grondilu .seen pmurias
22:22 yoleaux I saw pmurias 20:25Z in #perl6: <pmurias> samcv: hi
22:22 committable6 AlexDaniel, ¦8f3e7b3: ««timed out after 10 seconds» «exit signal = SIGHUP (1)»»
22:23 grondilu pmurias: hi, what's the status of the js backend?
22:25 samcv apparently node uses SPDX license identifiers too. every day find another place that uses them. apparently they banned "UNLICENSED" and "SEE LICENSE IN" in their module system
22:25 AlexDaniel I was just looking here https://www.learningperl6.com/2017/04/18/the-24-puzzle-in-perl-6-using-channels-and-promises/
22:25 AlexDaniel and noticed this: for 0 ... ^$threads {
22:26 AlexDaniel and I was like… wait that's not entirely right
22:26 samcv but UNLICENSED seesm like Unlicense. and uh. not standard so that's prolly a good thing. see a issue here they're asking what to put for commercial licenses
22:26 skids joined #perl6
22:27 * grondilu has no idea what the error "Invalid to edge 0 in NFA statelist" means
22:28 * grondilu finds NFA in S99 though
22:28 samcv i guess in npm people were putting "SEE LICENSE IN LICENSE" for their license fields in their metadata
22:28 samcv heh
22:29 samcv which is totally unuseful. i'm gonna see what they decide to do for other licenses, becuase at least for now we have they just put the license name in the "license" : "My Cool New License" and then a url in the support section
22:31 samcv and people proposing to do:
22:31 samcv license: "NON-SPDX-v2.2 (Oculus VR, Inc. Software Development Kit License)"
22:31 grondilu m: grammar { rule TOP { <foo> | <bar> }; rule foo { foo ** 2..* }; rule bar { bar } }.parse: "foo"
22:31 camelia rakudo-moar f0414c: OUTPUT: «Invalid to edge 0 in NFA statelist␤  in regex TOP at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:31 samcv oh god. hopefully they didn't end up choosing that...
22:31 samcv will read down further...
22:32 samcv then one guy suggestions for npm to have its **own** license standardization :\
22:32 samcv always that one guy
22:32 samcv becuase solving the issue is just to create your own new system...
22:32 samcv https://xkcd.com/927/
22:33 pmurias grondilu: hi, fixing bugs that cause roast test to fail (S02-lexical-conventions and S02-lists pass module some unicode support)
22:33 AlexDaniel grondilu: could be a regression
22:33 pmurias I'm currently working on S02-names and S02-literals
22:33 AlexDaniel bisect: grammar { rule TOP { <foo> | <bar> }; rule foo { foo ** 2..* }; rule bar { bar } }.parse: "foo"
22:33 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=f0414c4). Old exit code: 0
22:33 grondilu pmurias: ok
22:33 bisectable6 AlexDaniel, bisect log: https://gist.github.com/6a0efd5cdeadd3b98ad8d034d463e4cf
22:33 bisectable6 AlexDaniel, (2017-01-31) https://github.com/rakudo/rakudo/commit/9ed4449db57cab39a115c5347387d5978bd56057
22:33 AlexDaniel “Fix NFA generation”
22:35 samcv and then someone wanting to use "SPDX(MIT)" in the license field. for all liceneses. and then not have SPDX for nonspdx licesnes...
22:36 pmurias samcv: there being a  LICENSE is a lot more helpful then there being none at all
22:36 samcv yes
22:36 samcv you mean the file right?
22:36 samcv but SEE LICENSE IN LICENSE, people put that for like. all their projects
22:36 samcv even if they were on the spdx list, (so npm wouldn't complain about them not filling in the field)
22:37 samcv if we have that, we'd have "support" : { "license" : "file://LICENSE" } maybe? and then if it's a site "http://licensehere.com
22:37 samcv what do people think
22:39 samcv or what if we want a url and to specify which file it's in. i mean that's mostly useful if it's not a spdx license. but could be useful otherwise i guess
22:39 AlexDaniel mc: grammar { rule TOP { <foo> | <bar> }; rule foo { ‘foo’ ** 2..* }; rule bar { bar } }.parse("foo foo foo").say
22:39 committable6 AlexDaniel, ¦2015.12: «「foo foo foo」␤ foo => 「foo foo foo」»
22:39 AlexDaniel m: grammar { rule TOP { <foo> | <bar> }; rule foo { ‘foo’ ** 2..* }; rule bar { bar } }.parse("foo foo foo").say
22:39 camelia rakudo-moar f0414c: OUTPUT: «Invalid to edge 0 in NFA statelist␤  in regex TOP at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:39 AlexDaniel grondilu: will you submit a bug report for this?
22:39 pmurias samcv: can't sites change?
22:40 samcv sure. which is why spdx is most useful. but yeah.
22:40 samcv if it's non spdx would be nice to have a URL and obv have a file in the project
22:40 samcv but the url lets people see the license without downloading the module
22:40 samcv which is important for companies and such
22:41 samcv they don't have to worry about downloading problematic stuff, since they can see it without dling any part of the project
22:41 samcv support: { "license": "https://licensestuff.com/license", "license-file": "LICENSE" }
22:41 samcv maybe this?
22:42 samcv not sure. most stuff in support is all url's but i don't see why we couldn't do file:// if it's part of the repo maybe? and just have URI type links
22:43 samcv though that's the niceness of spdx because if it's astandardized one.
22:43 samcv https://spdx.org/licenses/Mylicensename << works for all the licenses
22:43 samcv makes it trivial to check the text and see other pages which contain the file as well
22:44 grondilu AlexDaniel: I will submit a bug report
22:46 * grondilu notices the instructions for reporting bugs have changed since last time he looked at them
22:46 samcv have they?
22:46 AlexDaniel grondilu: what instructions are we talking about exactly? I would like to know :)
22:46 grondilu in the README
22:46 grondilu I haven't submitted a bug for a long time, though
22:47 samcv you send an email. was it different before grondilu
22:47 gfldex samcv: support: { "license-url": "https://licensestuff.com/license", "license": "human-readable-name", "spdx": "Optional-2.0" }
22:48 samcv gfldex, https://github.com/samcv/URL-Find/blob/master/META6.json#L19 most things in support are url's though. well they all are
22:49 samcv but we could have a license-file though.
22:52 samcv though license-file is most important if it's not a spdx identifier. because it refers to a static thing, whose url will never change
22:54 samcv i would imagine that if we had CPAN or modules.perl6.org read the license part, if it's an SPDX license it can link to https://spdx.org/licenses/foo easily, and if not, link to what's in the support "license" field. and if it only has "license-file" field, maybe we could host the license-file's of projects who have a non-standard license or something. as long as the license allows to be copied easily which they almost all do
22:55 samcv here's a json (2.8mb big) that has all full text of licenses https://raw.githubusercontent.com/sindresorhus/spdx-license-list/master/spdx-full.json
22:55 samcv as well as url metadata to other sites it's hosted on
23:00 drrho_ joined #perl6
23:00 samcv so not sure if we need a "spdx" : false or something to show it's not a spdx standardized one. as it's trivial for package managers to check if it is or not, plus we'd want this checking as well if they enabled strict license checking or something
23:01 * grondilu looks at http://rosettacode.org/wiki/CUSIP#Perl_6 and is surprised &infix:<divmod> is not builtin
23:01 samcv grondilu, returnrs a two elements of the div and the mod?
23:03 grondilu yeah, it's supposed to be more efficient to compute both at the same time since instead of one after the other since they result from the same algorithm
23:03 samcv ah so maybe libtommath has a divmod operation? or
23:04 samcv if they do it'd be faster than doing div + mod, but i'm not sure if libtommath uses it
23:06 samcv ok they have integer division and remainder
23:08 b2gills m: say -> \l, &infix:<op>, \r { l op r }(1,&[+],3)
23:08 camelia rakudo-moar f0414c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3say -> \l, &infix:<op>, \r { l o7⏏5p r }(1,&[+],3)␤    expecting any of:␤        whitespace␤»
23:08 b2gills m: say -> \l, &op, \r { l [&op] r }(1,&[+],3)
23:08 camelia rakudo-moar f0414c: OUTPUT: «4␤»
23:10 AlexDaniel b2gills: why? :)
23:10 samcv so yeah we could add that grondilu if somebody thought it was good to add.
23:10 samcv i don't know if other devs would want it, but i will add it to moarvm if it's decided that divmod is something that is wanted
23:11 b2gills m: my &lopr = -> \l, &op, \r { l [&op] r }; say [[&lopr]] 1,&[+],2,&[-],1,&[*],2
23:11 camelia rakudo-moar f0414c: OUTPUT: «4␤»
23:11 AlexDaniel https://irclog.perlgeek.de/perl6/2016-02-10#i_12020163
23:11 samcv grondilu, what other languages have divmod? do most?
23:11 AlexDaniel https://irclog.perlgeek.de/perl6/2016-01-20#i_11912752
23:12 grondilu samcv: apparently just python.  I thought it was more common.  My bad.
23:12 AlexDaniel m: say 14.polymod(5)
23:12 camelia rakudo-moar f0414c: OUTPUT: «(4 2)␤»
23:12 samcv well. if you make the case to have it grondilu it will be the same speed and div is right now
23:12 samcv or practically
23:12 b2gills divmod is good because it is a single machine instruction
23:13 samcv yeah it reduces having to do two operations for no reason
23:13 AlexDaniel https://irclog.perlgeek.de/perl6/2015-02-15#i_10118326
23:13 b2gills a sufficiently smart compiler or jit should be able to do it though
23:14 samcv using one instruction if they use both remainder and the div result?
23:15 samcv but libtommath's div already gives us a remainder, so if people convince the other devs i'll add it in
23:16 b2gills The real question is the amount of processing to figure out if that is possible in a jit may outweigh any benefits
23:16 samcv ^
23:16 samcv that is likely
23:17 b2gills we do have &expmod so it wouldn't be that much of a inconsistency
23:20 samcv atm when doing div, the remainder is basically discarded. so the only cost would be adding it to an array or some list like object
23:20 AlexDaniel hmmm can't we just optimize polymod?
23:20 samcv i'd probably move the MVM_bigint_div into some internal function so i could share code between them
23:22 AlexDaniel m: say (-25).polymod(3)
23:22 camelia rakudo-moar f0414c: OUTPUT: «invocant to polymod out of range. Is: -25, should be in 0..^Inf␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
23:22 samcv that just returns the mod though
23:22 samcv right? i've never used it
23:22 AlexDaniel m: say 14.polymod(5)
23:22 camelia rakudo-moar f0414c: OUTPUT: «(4 2)␤»
23:22 AlexDaniel python -c 'print(divmod(14,5))' # (2, 4)
23:22 samcv hm
23:23 AlexDaniel polymod refuses to work with negative numbers, maybe for a good reason
23:24 samcv polymod seems a  bit weird. i mean. probably is heavier than moddiv. what does it do find all the divisors?
23:25 b2gills do you want only the first result to be negative, all results, or just the final result
23:25 samcv m: 9.polymod(2,2)
23:25 camelia rakudo-moar f0414c: ( no output )
23:25 samcv m: 9.polymod(2,2).say
23:25 camelia rakudo-moar f0414c: OUTPUT: «(1 0 2)␤»
23:25 samcv m: 9.polymod(2).say
23:25 camelia rakudo-moar f0414c: OUTPUT: «(1 4)␤»
23:25 samcv m: 9.polymod(2,1).say
23:25 camelia rakudo-moar f0414c: OUTPUT: «(1 0 4)␤»
23:25 b2gills m: say 1234567.polymod: 24,60,60
23:25 camelia rakudo-moar f0414c: OUTPUT: «(7 20 17 14)␤»
23:25 samcv so the last one in polymod is the div result? weird...
23:27 samcv AlexDaniel, if we added this we could optimize it some, at least if the code is as it shows in the routine there
23:27 samcv on the docs page
23:27 samcv i think they are in very different spirits though
23:28 samcv it's method and not a routine, div is a routine, so is mod. polymod returns the div as the last item
23:28 samcv err or is that how python does too?
23:29 samcv ah no. python has the div first, makes sense as it's `divmod`
23:31 b2gills I want to say that it should not be an infix operator, because most/all infix operators return singular values
23:33 b2gills m: say sum  1234567.polymod(24,60,60) Z* [\*] 1,24,60,60 # took me a minute to remember how to undo a polymod
23:33 camelia rakudo-moar f0414c: OUTPUT: «1234567␤»
23:40 samcv whatever people decide is best is fine with me :) if people think it should be added and agree with how the op should be done
23:40 samcv brb food
23:48 AlexDaniel m: say 1234567 .polymod: 24
23:48 camelia rakudo-moar f0414c: OUTPUT: «(7 51440)␤»
23:48 AlexDaniel .oO( ha, “.polymod:”, you guys have weird infix operators )
23:49 bjz joined #perl6

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

Perl 6 | Reference Documentation | Rakudo