»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:34 kurahaupo left 00:38 winnie_ left 00:43 bpmedley joined 00:50 poohman joined 01:06 winnie_ joined 01:07 iyra_ joined
winnie_ m: my @a;@a[1;2]=33; say @a; 01:07
camelia [(Any) [(Any) (Any) 33]]
01:08 iyra left 01:17 AlexDaniel left 01:18 BenGoldberg joined 01:21 sufrostico joined 01:27 sufrostico left 01:30 aborazmeh joined, aborazmeh left, aborazmeh joined 01:32 winnie_ left 01:42 iyra_ left, wamba joined 01:46 ilbot3 left 01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:54 sufrostico joined 01:58 Cabanossi left 01:59 Cabanossi joined 02:03 sufrostico left 02:11 eliasr left 02:15 astj joined 02:27 Cabanossi left 02:29 Cabanossi joined 02:31 eyck joined 02:34 gdonald left 02:35 gdonald joined 02:36 poohman left 02:39 geekosaur left 02:41 geekosaur joined 02:44 BenGoldberg left 02:49 wamba left 02:52 noganex_ joined 02:55 noganex left 03:26 Cabanossi left 03:29 Cabanossi joined 03:35 holyghost joined 03:36 aborazmeh left 03:41 Cabanossi left 03:43 Cabanossi joined, skids left 03:55 holyghost left
samcv do you think it'd be a good idea to show the license of the project on the modules.perl6.org page 03:58
with spdx identifiers can even provide links to spdx.org/licenses/licenseidentifier and will give them the full text of the license, and pages which also host the license too 03:59
04:07 CIAvash joined
samcv timotimo, github.com/timo/json_fast/pull/22 please accept Pull :-) 04:07
04:08 khw left 04:25 Cabanossi left 04:28 Cabanossi joined
Geth DBIish: samcv++ created pull request #91:
Use SPDX identifier in license field of META6.json
04:32
samcv oh hey i can merge that myself. heh. gonna do so
didn't see it was perl6 org project
04:36 xtreak joined
u-ou I'm trying to write a grammar for the lambda calculus but anything I come with just recurses infinitely :I 04:44
Geth DBIish: 741bdcbf6c | (Samantha McVey)++ | META6.json
Use SPDX identifier in license field of META6.json

Use the standardized identifier for the license field. For more details see design.perl6.org/S22.html#license
04:46
DBIish: 988fbf94a0 | (Samantha McVey)++ (committed using GitHub Web editor) | META6.json
Merge pull request #91 from samcv/license

Use SPDX identifier in license field of META6.json
DBIish: 64ba4c4a08 | (Samantha McVey)++ | .travis.yml
Test DBIish on nom using Travis
samcv u-ou, oh no
04:50 labster left 05:10 Cabanossi left, nadim_ joined 05:11 curan joined 05:13 Cabanossi joined 05:15 wamba joined 05:36 andrzejku joined 05:37 lowbro joined, lowbro left, lowbro joined
andrzejku hi 05:39
my friend asked me to make ecommerce web site 05:40
some advice what to use
?:D
samcv idk :( 05:45
05:46 xtreak left, xtreak joined 05:51 xtreak left 05:57 ufobat___ joined 06:01 parv joined
moritz andrzejku: wordpress? 06:03
andrzejku really wordpress for ecommerce? 06:04
moritz or wucommerce or whatever the stuff is called 06:05
moritz doesn't have first-hand experience, just heresay
parv apprently there is also square space, per its ad 06:06
06:13 andrzejku left 06:16 andrzejku joined 06:30 domidumont joined 06:31 rindolf joined 06:34 domidumont left 06:35 domidumont joined 06:36 darutoko joined
Geth ecosystem: Tyil++ created pull request #330:
Add Config::Parser::yaml
06:42
06:51 andrzejku left
ufobat___ samcv, thanks for the pr :) 06:53
samcv :)
PR for **everybodyyyyyyy**
also if you check all your projects that'd be great 06:54
in the last 4 days we're up from 13% projects with a "license" field to 20.5%
06:57 parv left 07:01 robertle left
samcv m: my $list = ''; say $list.match(m/ ^ http[s]? '://' /) 07:03
camelia (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
bisectable: my $list = ''; say $list.match(m/ ^ http[s]? '://' /)
bisectable6 samcv, Bisecting by exit signal (old=2015.12 new=c76a15d). Old exit signal: 0 (None)
samcv, bisect log: gist.github.com/63f115aa24d62c09b3...f182596197 07:05
samcv, (2016-12-19) github.com/rakudo/rakudo/commit/3f...0595e279b1
07:06 espadrine joined
Geth ecosystem: 2404a98606 | (Patrick Spek)++ (committed by Zoffix Znet) | META.list
Add Config::Parser::yaml (#330)

  * Add Config
  * Add Config::Parser::yaml
07:06
samcv so maybe this has been around a long time 07:07
m: my $list = ''; say $list.match(m/ ^ https? '://' /)
why doesn't it work though...
camelia (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:11 Cabanossi left
moritz samcv: m/.../ matches immediately against $_ 07:12
samcv: s you're passing a Nil to $list.match()
not a regex
samcv ah k 07:13
it shouldn't timeout though and use all cpu for ever
07:13 Cabanossi joined
moritz right 07:14
IMHO it should fail to type-check
though that might be not easy to do with the coercing going on for the Str candidate, or something :(
samcv or we could just check if it's Nil inside the function 07:18
better than just totally stalling
moritz aye 07:19
07:19 gdonald left 07:20 gdonald joined 07:23 xtreak joined 07:24 xtreak left, zakharyas joined
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:26
Geth doc: treyharris++ created pull request #1288:
5to6: Add caution about `exec` workarounds
07:28
doc: 85fa870840 | (Trey Harris)++ (committed by Zoffix Znet) | doc/Language/5to6-perlfunc.pod6
5to6: Add caution about `exec` workarounds (#1288)

  "shell and exit" are poor substitutes for exec in some common
situations. Add language to 5to6-perlfunc to explain these situations and suggest NativeCall if they pertain.
Also note that most Unixes have no single "exec" function exactly (Perl 5 automagically dispatches the right one for the situation).
07:30
eater .tell 07:33
yoleaux Relay a telegram to someone
eater .tell Zoffix your "Thanks." looks very passive aggressive on PRs :')
yoleaux eater: I'll pass your message to Zoffix.
07:34 xtreak joined 07:36 wamba left 07:42 g4 joined, g4 left, g4 joined
Geth doc: treyharris++ created pull request #1289:
5to6-perlfunc: Fix typo
07:49
TreyHarris eater: passive-aggressiveness would have been appropriate, given ^^ ;-) 07:50
eater TreyHarris: :D
but he also does it on the ecosystem PRs :')
Geth doc: 223b511248 | (Trey Harris)++ | doc/Language/5to6-perlfunc.pod6
5to6-perlfunc: Fix typo

I apparently managed to hit the transpose key a few times accidentally right after spell-checking...
07:51
doc: 8eff315232 | (Moritz Lenz)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Merge pull request #1289 from treyharris/exec-fix

5to6-perlfunc: Fix typo
moritz TreyHarris: fwiw you can push directly to perl6/doc, no need to create pull requests
07:52 bjz joined
moritz doesn't find "Thanks." to be passive-agressive 07:52
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:56
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
07:57 labster joined
ranguard backpan.metacpan.org/authors/id/P/...STS/Perl6/ - you can see p6doc tar's at the end 07:58
moritz ranguard: but why?
masak moritz: I agree, "Thanks." is not passive-aggressive.
moritz: but there's an interesting trend online where full stops are perceived as quite, hm, "final"
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:00
08:02 jonas1 joined
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:02
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:03
ranguard is at PTS and hopes to discuss this there 08:04
samcv ranguard, what i think might work as a stopgap, is attaching git commits to the metadata that the package managers download 08:06
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:07
moritz ranguard: you can get the history from the git repos; no need to abuse PAUSE for that, IMHO 08:08
ranguard samcv: 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)
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!
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
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
(ones that have *no* license field in the metadata) since the past batch was corrections of existing metadata
ranguard moritz: PSIXDISTS is just a short term stop gap
it should be thrown away once there is a 'standard' release process for p6 modules to the world
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
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
samcv if you are interested cry.nu/perl6/ecosystem-license-module-tagging/
that is a noble cause ranguard
ranguard samcv: yea, feels like another thing that could be easily promoted if there was a standard 'release' process
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
08:13 aindilis joined
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
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
so that is very encouraging.
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
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 :)
samcv myabe even bump the version for them
yes. there's like 900?
so 13 to 20% is still a lot
so hopefully i can bring that up as high as humanly and robotly possible
ranguard samcv: p5 has dozens of tools for that + intergration with PAUSE - would love someone to do that for p6
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
639 modules that have no license data (that don't have an issue or PR open atm)
hopefully the number i can automate is like at least half that
samcv crosses fingers 08:17
ok so we have 290 gist.github.com/samcv/0ec6bc3699f6...c7bdbe9db3 08:20
i guess i'll take that
08:21 dakkar joined
samcv also need to see how i can make `gist` not set files to .rb if it doesn't know the filename 08:21
i don't even use ruby..
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 Cabanossi left, wamba joined
El_Che ha 08:25
fixed
samcv oh interesting apparently github also uses SPDX identifiers with their license api 08:26
or at least returns back SPDX license identifiers
08:26 xtreak left 08:27 xtreak joined
samcv their standard documents are the most boring thing i've ever read. maybe. at least in the last few months 08:27
08:28 Cabanossi joined
samcv it's getting late, i'll work more on this tomorrow 08:29
08:31 xtreak left 08:34 domidumont left 08:35 domidumont joined 08:36 espadrine left 08:37 xtreak joined 08:42 xtreak left 08:53 xtreak joined 08:57 xtreak left 09:10 sena_kun joined
sena_kun hi folks 09:10
u-ou hi 09:11
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:12
09:16 xtreak joined 09:17 Actualeyes left
sena_kun ah, I've found it. nevermind me. 09:18
09:20 xtreak left
nadim_ sena_kun: then give URL please so the rest of us can O-fun too 09:23
samcv show me sena_kun 09:24
sena_kun perl6advent.files.wordpress.com/20....gif?w=788 09:25
it was from advent
nadim_ sena_kun++ 09:30
timotimo Your branch is up-to-date with 'origin/master'. 09:32
Failed running /home/travis/.rakudobrew/bin/../moar-nom/install/bin/perl6 -Ilib bin/zef test . at /home/travis/.rakudobrew/bin/rakudobrew line 58
anyone seen this before?
09:33 wamba left 09:38 xtreak joined, wamba joined
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:43
09:44 wamba left
jnthn How dod you make class C do it? 09:45
*did
In the case of class C does R { }, then the method in C will override the one in the role R 09:46
(Consistent with class C is P { } where the method in the class also wins)
09:46 xtreak left 09:47 wamba joined
nadim_ jnthn: how does pne override a method then? 09:47
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
jnthn Yes, the default behavior being in the role would be the more natural design :)
09:49 xtreak joined
nadim_ methods in roles override each other? 09:50
I think I read that somewhere
jnthn If you compose two roles that both provide the same method then it's a compile-time conflict error 09:51
nadim_ bleah!
a good bleah but still one 09:52
jnthn Which is resolved by the class that is composing them
timotimo we should introduce a slang that instead of making a compile-time error it just rolls the dice each time
jnthn s/should/could if we were super bored/ :P
nadim_ that would be BLEAHGH!
09:54 xtreak left 09:55 Actualeyes joined
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
nadim_ yes, because resolve is not clear how 09:57
timotimo "for example method tracer(|c) { self.TracedGrammarTreeDDT::tracer(|c)
"
nadim_ ok
09:58 AlexDaniel joined
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
nadim_ interestingly, class C does X is Y, will not complay even if X and Y have the same method
and the method in X (which is "done") is the one that is used 10:00
10:02 xtreak joined
jnthn No, because `is Y` will turn the role into an anonymous class and inherit from it 10:03
So it doesn't come into role composition at all 10:04
nadim_ get it
and because the anonymous is a class, its method takes over, right? 10:05
10:06 xtreak left 10:10 sena_kun left 10:11 Cabanossi left 10:13 Cabanossi joined 10:14 labster left, domidumont left 10:15 labster joined
jnthn Since it's a class then we override it in our subclass just like with inheritance normally, yes 10:15
10:15 labster left 10:20 TEttinger left 10:22 sunnavy joined
nadim_ jnthn: 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:24
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:26
jnthn This looks like a good approach overall, yes :) 10:27
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:29
10:30 TimToady left, wamba left 10:32 TimToady joined
jnthn Maybe something with sub EXPORT is possible 10:33
10:34 wamba joined
nadim_ can you point me to an URL or a presentation? 10:37
imgur.com/l5Sc4fF we get a few things for free with DDT
jnthn docs.perl6.org/language/modules#in...sub_EXPORT 10:38
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
nadim_ shouldn't we be importing things instead? something like: use Grammar::Trace role, role, role ... 10:40
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
jnthn Should let us receive those roles
timotimo so "use DDG (MyRoleOne, MyRoleTwo);"? 10:42
jnthn Aye 10:43
nadim_ something like that. what's DDG btw?
timotimo Data::Dump::Grammar 10:44
i don't know what your module is actually called
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:46
timotimo OK 10:47
nadim_ how I think it could look like nopaste.linux-dev.org/?1123828
do we have the equivalent of a C++ pure virtual? a C++ pure virtual with default implementation? 10:49
grondilu from S12: q{All public method calls are "virtual" in the C++ sense.} 10:51
nadim_ the question was specifically for pure virtual but thank for that anyway 10:53
timotimo i'm not sure what pure virtual means
nadim_ a derived class must declare a method or you get a compile time error 10:54
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?
if the derived has that method, it won't do the default implementation
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
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
and the derived class can call the default implementation in the base class
also important, base classes with pure virtual can not be instantiated 10:57
a class with only pure virtual can be seen as a "contract"
timotimo hm, difficult. can make it explode by putting a piece of code into the role's body i guess 10:58
nadim_ someone said "Explode"? 10:59
can you please explain, I didn't get it ;)
timotimo give an error in the same cases cpp does
i'm typing out something
nadim_ I get it now
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"
nadim_ that would be nice specially if it is not called class but contract. 11:03
or if contract is a role. class A is contract {...} 11:04
timotimo: can one declare a method without body? (I think I have seen that)
11:10 gdonald left 11:11 Cabanossi left, gdonald joined
timotimo no, only {...} 11:13
11:13 Cabanossi joined 11:17 pmurias joined
nadim_ can one pre declase a method, eg: declase its name and signature brefore it is defined? 11:17
moritz m: class A { method x() {... }; method x() { say "implementation" }}; A.x 11:22
camelia 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
moritz nadim_: it seems you can't
except if you put the pre-declaration into a role
AlexDaniel m: class A { proto method x { * }; multi method x() { say "implementation" }}; A.new.x 11:23
camelia implementation
11:24 xtreak joined
AlexDaniel wtf is wrong with this error message… 11:25
m: class A { proto method x { * }; }; A.x
camelia 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
pmurias nadim_: what would would the use of pre declaring a method be? 11:31
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:34
11:34 cpage_ left
AlexDaniel well, the proto thingy should work just fine, right? 11:35
11:38 domidumont left
timotimo nadim_: the compiler doesn't have any interest in knowing methods up front 11:39
nadim_: after all, whether a method exists or not is solely at the discretion of the class
i.e. if it has a ^find_method 11:40
private methods are different, though
11:48 jameslenz left, jameslenz joined
sammers hi #perl6 11:48
11:50 wamba left 11:52 domidumont joined
timotimo yo 11:52
Woodi hi #perl6 :) 11:54
do Perl6 grammars are Attribute Grammars ? wiki.haskell.org/The_Monad.Reader/...ars_Matter
nadim_ Woodi: yo! 11:57
11:58 domidumont left 11:59 domidumont joined, wamba joined 12:00 kaare__ is now known as kaare_
sammers is anyone working on adding GtkStatusIcon support to gtk-simple? If not, I want to start working on it... 12:01
12:04 iyra joined 12:10 Cabanossi left 12:13 Cabanossi joined
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
YAMLish
moritz nadim_: rakudo's repo, src/Perl6/Grammar.pm (but that's written in NQP)
DrForr ANTLR4 - lib/ANTLR4/Grammar.pm
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 12:19 aborazmeh joined, aborazmeh left, aborazmeh joined
nadim_ moritz: Ii have played a bit with JSON::Tiny, gives nice results in Data::Dump::Tree compared to .gist 12:20
but the Grammar is tiny. I need something to test Grammar Trace to see how big stuff gets displayed 12:23
12:24 cpage_ left
nadim_ timotimo: yes Yamlish looks nice 12:24
tbrowder hi, #perl6! 12:26
nadim_ hi
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
12:27 cpage_ joined
tbrowder hi, nadim! 12:28
12:28 raschipi joined
sammers ok, nevermind... it was deprecated for GNotification 12:29
tbrowder the two modules causing problems are both missing a licence line in the meta file: File::Find and File::Directory::Tree 12:30
12:30 cpage_ left 12:31 cpage_ joined
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:32
jnthn nadim_: The tracing relies on using a different meta-class when compiling the grammar 12:33
I guess maybe we could do a mixin to the meta-object to handle that case
But not sure how easily that'd work out 12:34
Easiest bet is to clone the repo
And add use Grammar::Tracer
Since it's primarily meant for the authors of grammars :)
nadim_ what I am doing right now :) 12:35
12:35 perlpilot joined
nadim_ you are tight, it's the better way 12:35
[Coke] waves. 12:39
pmurias \o 12:41
12:41 cpage_ left 12:45 Zoffix joined, CIAvash left
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
12:46 sufrostico joined
tbrowder ugexe: i'm upgrading zef now, i hadn't used it since the great IO refactor 12:50
ugexe: that cured my probs, thanks! 12:52
12:53 Zoffix left 12:55 iyra left 12:57 bjz_ joined 12:58 g0d355__ joined, bjz left
[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:00
can't find the style doing that. 13:02
13:03 mcmillhj joined
pmurias looks at that 13:05
13:05 sufrostico left 13:06 sufrostico joined 13:09 cpage_ joined
nadim_ jnthn: Grammar::Tracer (both your version (I may not have the latest) and my versions) break YAMLish tests. 13:10
jnthn: also the version using objects rather than just faking a stack with tabs, is really much slower, undoubtedly Data::Dump::Tree fault 13:11
timotimo oh! damn 13:12
nadim_ jnthn: It was fun to write but I wonder if it is worth the slower execution time
timotimo i remember trying Grammar::Tracer with YAMLish and it didn't parse some stuff because of it 13:13
i shouldn't have suggested it without thinking :|
nadim_ Nahh, errors are also good to know
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:14
timotimo how familiar are you with yaml's specification? 13:16
nadim_ Saw it a few years ago
13:16 cpage_ left
nadim_ As I wrote "I don't know" 13:16
moritz just know it's *much* bigger than XML's spec
timotimo it's got to do a whole lot of stuff
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
[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:18 xtreak left
[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:19
13:19 ggoebel left
pmurias [Coke]: long links cause that 13:20
13:20 curan left
[Coke] irclog.perlgeek.de/perl6/2017-04-24 - this seems to wrap fine. irclog.perlgeek.de/perl6/2017-04-22 has a scrollbar. 13:20
ah, long unbreakable words - should we use the css to make those breakable? 13:21
13:21 aborazmeh left
timotimo what is causing that? the "symbol for nl" not being an acceptable break point? 13:28
13:28 xtreak joined
pmurias timotimo: url links that are too long 13:30
timotimo oh 13:32
13:33 ggoebel joined 13:38 skids joined 13:40 Cabanossi left 13:42 eliasr joined 13:43 Cabanossi joined 13:45 domidumont1 joined 13:48 domidumont left, xtreak left, xtreak joined
moritz [Coke]: it used to be done by adding zero-width spaces; I've switched to CSS 13:51
13:54 wamba left 13:58 wamba joined 13:59 raschipi left 14:01 raschipi joined
tbrowder m:my $f='t';my $f2='tt'; spurt $f, 'foo'; symlink $f2, $f; say $f2.IO.L 14:01
evalable6 (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
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:05
perlpilot tbrowder: don't you have the args to symlink backwards? Isn't it symlink $from, $to; ? 14:06
tbrowder i think it is backwards last time i looked 14:09
perlpilot ➤ perl6 -e 'my $f="t";my $f2="tt"; spurt $f, "foo"; symlink $f, $f2; say $f2.IO.l' 14:11
True
tbrowder you're correct, i swear i either have dislexia or the diocs have changed 14:13
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:21
timotimo yes aMlink was just fixed 14:24
symlink
it wasnt tested properly or somethim
14:33 khw joined 14:39 xtreak left, sena_kun joined 14:41 Cabanossi left 14:43 Cabanossi joined 14:45 g4 left
pmurias is Perl 6 defined by roast or fudged roast? 14:46
14:48 lowbro left
geekosaur roast. fudges are known deviations 14:49
[Coke] ... eh. for 6.c it's not clearly defined. 14:53
pmurias github.com/perl6/roast/blob/master...udo.t#L335 - this test looks incorrect 14:54
CALLERS would see that variable, CALLER wouldn't see it
[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"
... especially with a comment like: #?rakudo todo 'not entirely sure these make sense...' 14:55
14:56 cdg joined
pmurias hmm, it seems CALLERS is implemented and documened but not tested :( 14:56
15:08 domidumont1 left 15:09 jonas1 left 15:10 poohman joined
poohman m: say "test"; 15:10
camelia test
pmurias I added a test for CALLLERS. If it's not meant to be specced feel free to revert it 15:17
15:19 perlpilot left 15:23 Kaffe joined 15:26 wamba left
tyil is there a standard for DocBlocks in perl6 with pod? 15:27
15:28 poohman left 15:29 perlpilot joined, alimon joined
eater tyil: # 15:29
?#|
eh I mean: #|
tyil yeah, I thought those ment something in your code, but I couldnt find anything about it on docs.perl6.org/language/pod, so I thoight I'd as 15:30
k
15:31 drrho_ left
eater ye 15:34
there is no documentation
but it exists
DrForr There's documentation in the synopses, feel free to add your own :) 15:37
They do mean something, #| and #= at the least can be accessed through .HOW (I think) 15:38
I use #={..} to store out-of-band info in my ANTLR compiler.
15:40 Cabanossi left
perlpilot I think they're accessed via .WHY 15:41
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
15:43 Cabanossi joined, bjz_ left
geekosaur .HOW is the MOP 15:43
.WHY would be the docs
pmurias DrForr: you are compiling ANTLR to Perl 6 grammars? 15:45
DrForr github.com/drforr/perl6-ANTLR4 15:46
I did this before the GLR, so now that I have a bit of time whilst searching for work, I'm rewriting it.
Incidentally the POD synopsis is design.perl6.org/S26.html 15:49
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 16:11 robertle joined, Cabanossi left 16:13 Cabanossi joined 16:16 zakharyas left 16:23 rindolf left 16:26 rindolf joined, gdonald left, gdonald joined 16:29 isBEKaml joined 16:33 wamba joined
zostay p6: my $x = *; say "a" ~~ $x; say "a" | "b" ~~ $x; 16:38
camelia True
False
TimToady CALLERS is meant to be specced, as it happens
it's just we were very busy trying to get 6.c out about the time I hacked it in 16:39
m: my $x = *; say Junction ~~ $x 16:40
camelia False
TimToady m: my $x = *; say Junction ~~ *
camelia { ... }
TimToady right
gfldex m: my $x = *; say Junction ~~ Whatever; 16:41
camelia False
16:42 Cabanossi left 16:43 Cabanossi joined 16:44 andrzejku joined 16:45 poohman joined 16:51 dakkar left
TimToady m: my $x = *; say 42 ~~ $x 16:52
camelia True
TimToady m: my $x = Whatever; say 42 ~~ $x
camelia False
TimToady it pays attention to :U vs :D there
16:59 poohman left 17:00 lowbro joined, lowbro left, lowbro joined 17:02 kurahaupo joined
pmurias jnthn: cleardispatcher ignore setdispatcherfor on JVM put not on MoarVM (not sure if it's ok and if I should fix that) 17:08
17:09 isBEKaml left 17:11 Cabanossi left 17:13 Cabanossi joined 17:20 kurahaupo left 17:23 imcsk8 left, imcsk8 joined 17:30 AlexDaniel left
japhb pmurias: You may want to .tell jnthn that, he's AFK for a couple days according to #moarvm 17:36
17:37 labster joined 17:45 kurahaupo joined 17:51 drrho_ joined 17:54 domidumont joined 17:56 perlpilot left 18:00 Possum joined 18:01 geekosaur left 18:03 geekosaur joined 18:14 iyra joined 18:15 cdg left 18:28 wamba left 18:32 aindilis left 18:33 kyan joined 18:35 espadrine joined 18:51 andrzejku left 19:08 darutoko left, lowbro left, xinming joined 19:10 andrzejku joined 19:13 domidumont left 19:22 zacts joined 19:24 Ven joined 19:25 Possum left, Ven is now known as Guest50256 19:28 Cabanossi left 19:29 bjz joined, vendethiel joined 19:30 Cabanossi joined 19:37 bjz left
pmurias why is \c[LINE FEED (LF)] being deprecated? 19:39
19:41 eliasr left
timotimo because unicode deprecated it 19:43
pmurias ok 19:44
masak turns out people don't feed lines anymore
ambs they got too fat
pmurias masak: \c[LINE FEED] still works 19:45
19:45 TEttinger joined
masak oh, good 19:46
who knows when I might need a good line feed next time
19:47 andrzejku left, Guest50256 left 19:48 sena_kun left
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:57
raschipi We still have impact matrix printers for security purposes. They still use line feeds. 19:58
samcv morning 20:01
raschipi ohayo 20:02
pmurias raschipi: how do they help with security?
20:04 kyan left 20:05 kyan joined
raschipi pmurias: You can't copy it with a simple photocopier, you'd need something close to the original equipment. 20:05
20:05 Ven_ joined
raschipi To match the intaglio with the ink 20:06
By using custom fonts, it becomes even more difficult to copy. 20:07
20:13 cdg joined
MasterDuke_ is there a pre-defined regex group/rule/whatever for quote characters? 20:15
20:21 zapwai joined
samcv oh hi pmurias 20:25
pmurias samcv: hi
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
so we use unicode non-1.0 names and unicode name aliases (LINE FEED) is one of those 20:26
and name aliases are nonchanging too
to the name aliases give us names for all the control characters that no longer have normal names
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
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
but you can use: "LF" or LINE FEED, instead of LINE FEED (LF) 20:28
which is kind of nicer
writing "\c[LINE FEED (LF)]" is kind of a weird name regardless.
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.
yoleaux El_Che: What kind of a name is "Zoffix."?!
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 Cabanossi left, AlexDaniel joined
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
20:30 Cabanossi joined, mr-foobar left
samcv here we go pmurias github.com/MoarVM/MoarVM/commit/81...49264335bf 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:30
20:31 mr-foobar joined
samcv uhm 20:31
you mean like in a regex?
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
MasterDuke_ yeah
samcv 8)
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 :-)
El_Che on the other hand, brexit, trump 20:33
so it all makes sense
samcv 21.904762% of modules now have license field. yay 1.5% higher than a day ago. needs to be higher.
moritz want trumpxit
samcv hopefully today i can automate some more mass PR
like 200 or so
El_Che samcv: nice job 20:34
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:44
20:46 Ven_ left 20:49 Ven joined, Ven is now known as Guest31321 20:59 Guest31321 left 21:00 skids left, mr-foobar left 21:01 mr-foobar joined 21:07 ufobat___ left
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
21:10 mcmillhj left
samcv i have not 21:10
i've been using `hub` program
21:13 Cabanossi left 21:15 Cabanossi joined
sammers gfldex: thanks for meta6. very useful 21:20
21:22 raschipi left
samcv how do i test if a list is mutable or not, is there a method or what 21:29
i need to alter any positionals, maybe easier to just put in an array? 21:31
instead of testing if they're mutable
21:38 alimon left 21:42 gdonald left, kyan left, gdonald joined 21:46 robertle left
gfldex lizmat++ # i should do this once a week 21:46
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/04/24/...ing-times/
gfldex samcv: see docs.perl6.org/type/PositionalBindFailover 21:47
AlexDaniel m: for 0^ ... 3 { .say } 22:03
camelia 3
in block <unit> at <tmp> line 1
timotimo heh.
you need it asplained? 22:04
22:06 kyan joined
AlexDaniel timotimo: well, I haven't even tried understanding it xD 22:12
:|
--target=ast for this prints “Oops!!! Cannot invoke this object (REPR: P6opaque; NQPMu)”
22:12 Cabanossi left
timotimo haha, great 22:13
well, you're creating a "one" junction from 0 and the result of calling ... with 3 22:14
then you're iterating over that junction with the block { .say }
but of course ... already throws an exception when it gets invoked 22:15
22:15 Cabanossi joined
timotimo so it won't get to the iteration 22:15
m: say ... 3
camelia 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
------> …
timotimo m: say 0^ ... 3
camelia 3
in block <unit> at <tmp> line 1
timotimo i wonder why it doesn't give that analysis here 22:16
m: ... 3
camelia 3
in block <unit> at <tmp> line 1
timotimo m: say() ... 3
AlexDaniel o_o
timotimo oh, that's really the range operator this time
camelia (timeout)Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 3say() ...7⏏5 3
AlexDaniel and why is it reified?
timotimo anyway, i'll be going to bed and i'm not going to be around much tomorrow
reified?
AlexDaniel ye, it times out 22:17
m: 0 ... *
timotimo because after True comes True
and after True comes True
and after that comes True
camelia (timeout)Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 030 ...7⏏5 *
timotimo and the next value is also True
AlexDaniel and why does it have to do it?
:S 22:18
timotimo because you're asking for it :)
AlexDaniel can't see that
gfldex m: say True.succ
camelia True
timotimo m: .say for True ... 3
gfldex m: say (0^).succ
AlexDaniel timotimo: can't see how sinking something is asking for an infinite range to be reified
not range but sequence
whatever 22:19
camelia (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
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
timotimo it doesn't actually realize it's infinite
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
but even if it did, we'd have a sequence operator that sometimes is clever enough to not infinitely loop
and users that rely on this smartness
AlexDaniel alright 22:20
timotimo i'll head to bed :)
AlexDaniel thanks, see ya 22:21
timotimo seeya!
AlexDaniel fwiw, it changed here: github.com/rakudo/rakudo/commit/8f...24af39bfa4 22:22
c: 8f3e7b3e^ 0...*
committable6 AlexDaniel, ¦8f3e7b3e^: «»
AlexDaniel c: 8f3e7b3e 0...*
grondilu .seen pmurias
yoleaux I saw pmurias 20:25Z in #perl6: <pmurias> samcv: hi
committable6 AlexDaniel, ¦8f3e7b3: ««timed out after 10 seconds» «exit signal = SIGHUP (1)»»
grondilu pmurias: hi, what's the status of the js backend? 22:23
22:23 espadrine left
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 www.learningperl6.com/2017/04/18/t...-promises/
and noticed this: for 0 ... ^$threads {
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
grondilu has no idea what the error "Invalid to edge 0 in NFA statelist" means 22:27
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
heh
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:29
and people proposing to do: 22:31
license: "NON-SPDX-v2.2 (Oculus VR, Inc. Software Development Kit License)"
grondilu m: grammar { rule TOP { <foo> | <bar> }; rule foo { foo ** 2..* }; rule bar { bar } }.parse: "foo"
camelia Invalid to edge 0 in NFA statelist
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
samcv oh god. hopefully they didn't end up choosing that...
will read down further...
then one guy suggestions for npm to have its **own** license standardization :\ 22:32
always that one guy
becuase solving the issue is just to create your own new system...
xkcd.com/927/
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
pmurias I'm currently working on S02-names and S02-literals
AlexDaniel bisect: grammar { rule TOP { <foo> | <bar> }; rule foo { foo ** 2..* }; rule bar { bar } }.parse: "foo"
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=f0414c4). Old exit code: 0
grondilu pmurias: ok
bisectable6 AlexDaniel, bisect log: gist.github.com/6a0efd5cdeadd3b98a...34d463e4cf
AlexDaniel, (2017-01-31) github.com/rakudo/rakudo/commit/9e...978bd56057
AlexDaniel “Fix NFA generation”
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:35
pmurias samcv: there being a LICENSE is a lot more helpful then there being none at all 22:36
samcv yes
you mean the file right?
but SEE LICENSE IN LICENSE, people put that for like. all their projects
even if they were on the spdx list, (so npm wouldn't complain about them not filling in the field)
if we have that, we'd have "support" : { "license" : "file://LICENSE" } maybe? and then if it's a site "licensehere.com 22:37
what do people think
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
committable6 AlexDaniel, ¦2015.12: «「foo foo foo」␤ foo => 「foo foo foo」»
AlexDaniel m: grammar { rule TOP { <foo> | <bar> }; rule foo { ‘foo’ ** 2..* }; rule bar { bar } }.parse("foo foo foo").say
camelia Invalid to edge 0 in NFA statelist
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
AlexDaniel grondilu: will you submit a bug report for this?
pmurias samcv: can't sites change?
samcv sure. which is why spdx is most useful. but yeah. 22:40
if it's non spdx would be nice to have a URL and obv have a file in the project
but the url lets people see the license without downloading the module
which is important for companies and such
they don't have to worry about downloading problematic stuff, since they can see it without dling any part of the project 22:41
support: { "license": "licensestuff.com/license", "license-file": "LICENSE" }
maybe this?
22:41 rindolf left
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:42
though that's the niceness of spdx because if it's astandardized one. 22:43
spdx.org/licenses/Mylicensename << works for all the licenses
makes it trivial to check the text and see other pages which contain the file as well
grondilu AlexDaniel: I will submit a bug report 22:44
grondilu notices the instructions for reporting bugs have changed since last time he looked at them 22:46
samcv have they?
AlexDaniel grondilu: what instructions are we talking about exactly? I would like to know :)
grondilu in the README
I haven't submitted a bug for a long time, though
samcv you send an email. was it different before grondilu 22:47
gfldex samcv: support: { "license-url": "licensestuff.com/license", "license": "human-readable-name", "spdx": "Optional-2.0" }
samcv gfldex, github.com/samcv/URL-Find/blob/mas...6.json#L19 most things in support are url's though. well they all are 22:48
but we could have a license-file though. 22:49
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:52
22:52 drrho_ left
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 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:54
here's a json (2.8mb big) that has all full text of licenses raw.githubusercontent.com/sindreso...-full.json 22:55
as well as url metadata to other sites it's hosted on
23:00 drrho_ joined
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:00
grondilu looks at 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:01 cdg left
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
if they do it'd be faster than doing div + mod, but i'm not sure if libtommath uses it 23:04
ok they have integer division and remainder 23:06
b2gills m: say -> \l, &infix:<op>, \r { l op r }(1,&[+],3) 23:08
camelia 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
b2gills m: say -> \l, &op, \r { l [&op] r }(1,&[+],3)
camelia 4
AlexDaniel b2gills: why? :) 23:10
samcv so yeah we could add that grondilu if somebody thought it was good to add.
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
b2gills m: my &lopr = -> \l, &op, \r { l [&op] r }; say [[&lopr]] 1,&[+],2,&[-],1,&[*],2 23:11
camelia 4
AlexDaniel irclog.perlgeek.de/perl6/2016-02-10#i_12020163
samcv grondilu, what other languages have divmod? do most?
AlexDaniel irclog.perlgeek.de/perl6/2016-01-20#i_11912752
grondilu samcv: apparently just python. I thought it was more common. My bad. 23:12
AlexDaniel m: say 14.polymod(5)
camelia (4 2)
samcv well. if you make the case to have it grondilu it will be the same speed and div is right now
or practically
23:12 pmurias left
b2gills divmod is good because it is a single machine instruction 23:12
samcv yeah it reduces having to do two operations for no reason 23:13
AlexDaniel irclog.perlgeek.de/perl6/2015-02-15#i_10118326
b2gills a sufficiently smart compiler or jit should be able to do it though
samcv using one instruction if they use both remainder and the div result? 23:14
but libtommath's div already gives us a remainder, so if people convince the other devs i'll add it in 23:15
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 ^
that is likely
b2gills we do have &expmod so it wouldn't be that much of a inconsistency 23:17
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?
samcv i'd probably move the MVM_bigint_div into some internal function so i could share code between them
AlexDaniel m: say (-25).polymod(3) 23:22
camelia 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
samcv that just returns the mod though
right? i've never used it
AlexDaniel m: say 14.polymod(5)
camelia (4 2)
AlexDaniel python -c 'print(divmod(14,5))' # (2, 4)
samcv hm
AlexDaniel polymod refuses to work with negative numbers, maybe for a good reason 23:23
samcv polymod seems a bit weird. i mean. probably is heavier than moddiv. what does it do find all the divisors? 23:24
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)
camelia ( no output )
samcv m: 9.polymod(2,2).say
camelia (1 0 2)
samcv m: 9.polymod(2).say
camelia (1 4)
samcv m: 9.polymod(2,1).say
camelia (1 0 4)
b2gills m: say 1234567.polymod: 24,60,60
camelia (7 20 17 14)
samcv so the last one in polymod is the div result? weird...
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
on the docs page
i think they are in very different spirits though
it's method and not a routine, div is a routine, so is mod. polymod returns the div as the last item 23:28
err or is that how python does too?
ah no. python has the div first, makes sense as it's `divmod` 23:29
b2gills I want to say that it should not be an infix operator, because most/all infix operators return singular values 23:31
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 1234567
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
brb food
AlexDaniel m: say 1234567 .polymod: 24 23:48
camelia (7 51440)
AlexDaniel
.oO( ha, “.polymod:”, you guys have weird infix operators )
23:49 bjz joined 23:54 imcsk8 left, zapwai left 23:59 Cabanossi left