»ö« 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:00 Cabanossi joined 00:02 noganex joined, imcsk8 joined 00:04 noganex_ left 00:11 BenGoldberg joined
u-ou $today.coffees[1].drink; 00:16
jdv79_ just got back from a beer trip in nl and be. 00:20
jetlagged 00:22
00:38 drrho_ left 00:46 drrho_ joined 00:52 aborazmeh joined, aborazmeh left, aborazmeh joined
samcv u-ou, $today.coffees.elems 00:55
u-ou usually about 4
01:14 Cabanossi left 01:15 Cabanossi joined
AlexDaniel m: say 5...^10 01:19
camelia (5 6 7 8 9)
AlexDaniel m: say 5^...10
camelia 5^..0.1
AlexDaniel hah
01:19 poohman joined 01:24 kurahaupo_ joined 01:32 bjz left 01:36 japh_com joined 01:46 iyra left 01:58 Cabanossi left 02:00 Cabanossi joined 02:08 AlexDaniel left 02:19 cpage_ joined 02:27 Cabanossi left 02:30 Cabanossi joined
samcv ok so what is the best way to compare elements of two arrays 02:32
that are almost identical but may have one or two words in different spots
well elements, elements are words but. that's beside most of the point
i simplified way wuold be to just count how many of each element exist, but order is important 02:33
but i mostly want to know at what indexes one has additional elements compare dto the other or if the element is different 02:34
02:34 bjz joined
BenGoldberg samcv, Find a good string similarity algorithm, then change it to arrays of strings instead of arrays of chars. 02:36
samcv hm
thanks
technically i need to compare similarity of two documents by words 02:37
BenGoldberg Looking for plagarism?
samcv no checking licenses
and yes i know tools exist for this
though maybe i'm making a module right now and don't know it ;) 02:38
spdx has a json of all the license text's. so i need to compare the documents not regarding whitespace or case 02:39
but punctuation matters
02:39 geekosaur left, geekosaur joined
BenGoldberg wonders whether a plagiarism detector might actually be the right tool for the job ;) 02:41
samcv and people often put in random copyrgiht lines, sometimes at the end sometimes at the end or other text, so would be nice if it could tell you "oh this is the part that differs: 'copyright 2005 some persons name here and associates\nSome random other line here someone could add in"
maybe
but... it needs to be the right order of the words
but that might work maybe. but it's critical that ALL the matching sections have the right order and not new words added in
BenGoldberg Normalizing whitespace and capitalization is the easiest part.
samcv whereas that's common in plagarism and they are plagarizing as much if they add one word extra or not 02:42
yes of course
do we have a plagarism detector module ;)
BenGoldberg, i may take the approach of making a bag for every license. then taking my unknown license document and finding which bag is closest by the words it contains 02:43
then it has the best match, and then checks it for ordering of words etc
japh_com is it possible to get a list of all of the classes/modules that are loaded in memory? something akin to ".^methods(:all)" but for all of the classes that are loaded... I'm assuming this has to be done at the NQP or maybe Metamodel level... Working on a debugger ui... 02:44
samcv but it's important to be able to tell the user running the program which lines differ and it's not like "This is not the license of my software project. Copyright foo bar"
and it detects it as the project being that license. would be not good
02:44 cyphase left
samcv that would be nice japh_com let me know. there is some way maybe 02:44
BenGoldberg Maybe a Bayesian classifier? 02:46
samcv well. i mean i want to get back the words which are different between the two
would that do that
or you mean for comparing the bags 02:47
MasterDuke_ japh_com: have you looked at jnthn's heap profile analyzer?
kurahaupo_ samcv: sounds like the sort of thing that would be easily thwarted by a global search-and-replace with some synonyms
samcv what would kurahaupo_
uh
well.
how does that defeat it i don't see
if they alter the text of the license... 02:48
also there are guidlines for certain words which are equivilant like en_GB and en_US
japh_com @MasterDuke_ Great suggestion. Checking jonathan's heap profile analyzer code now :-) 02:49
BenGoldberg kurahaupo_, We're assuming that the people in whose code (or docs) these liscences are embeded aren't deliberately making it harder for readers to identify which license it is.
samcv if you scroll down here to section 8.
spdx.org/spdx-license-list/matching-guidelines gives guidelines for words which are the same
02:49 cyphase joined 02:51 noganex_ joined
geekosaur well, there's supposed to be a way to introspect GLOBAL::, but it doesn't seem to work currently 02:54
02:54 noganex left
geekosaur oh, I guess it's just stuff imported into the current scope 02:55
m: say SETTING::.keys
camelia ($=pod &symlink $_ $/ RESTRICTED-CLASS &restricted !UNIT_MARKER &UNLINK-PATH &SYMLINK-PATH &MAKE-DIR &CHANGE-DIRECTORY &rmdir $=finish EXPORT PIO &CHMOD-PATH &chmod $! Proc NativeCall &COPY-FILE &rename &open ::?PACKAGE GLOBALish &shell &pipe &link &RENA…
03:06 poohman left, labster left 03:07 poohman joined 03:08 khw left 03:10 japh_com left, japh_com joined 03:13 labster joined, Cabanossi left 03:15 Cabanossi joined, Actualeyes left 03:16 bjz left 03:26 bjz joined 03:34 poohman left, aborazmeh left 03:39 Cabanossi left 03:41 BenGoldberg left, Cabanossi joined 03:47 kurahaupo_ left, kurahaupo_ joined 03:48 Actualeyes joined 04:02 wamba joined
u-ou squeaks 04:03
04:05 kyan left 04:11 Cabanossi left, Cabanossi joined 04:12 aborazmeh joined, aborazmeh left, aborazmeh joined 04:17 kyan joined
sjn m: say (1 ... ^5).perl # why does this "work"? 04:23
camelia (1, 0, 1, 2, 3, 4).Seq
mst m: say (1, ^5).perl 04:27
camelia (1, ^5)
mst ok, not that then
04:45 skids left 04:50 curan joined 04:54 bjz left 05:01 bjz joined 05:24 xtreak joined 05:40 Cabanossi left 05:42 cgfbee joined, Cabanossi joined 05:44 aborazmeh left 05:49 ufobat___ joined 05:50 darutoko joined 05:52 wamba left
moritz it's just 1, ^5 05:54
m: say 1, ^5 05:55
camelia 1^5
moritz m: say flat 1, ^5
camelia (1 0 1 2 3 4)
samcv geekosaur, do you think the set operators would be the easiest way to find the closest two bags to each other? 06:02
let's say i have like 40 bags and need to sort them by most items in common
06:04 CIAvash joined 06:10 Cabanossi left 06:12 Cabanossi joined 06:23 wamba joined
timotimo m: say (1 ... [9, 9, 9]) # sjn 06:24
camelia (1 2 3 4 5 6 7 8 9 9 9)
timotimo a bit late, but whatevs
06:24 TimToady left
timotimo now why it immediately stops after 1, i'm not sure 06:25
m: say (1 ... [0, 9, 9]).perl
camelia (1, 0, 9, 9).Seq
06:26 TimToady joined
moritz because 0 < 1 06:32
m: say 1 ... [4, 6, 8]
camelia (1 2 3 4 6 8)
timotimo i was totally expecting it'd compare against the length of the list :P 06:34
samcv also wtf is going on. i insntall App::Mi6 and try running the bin. and it doesn't start because some resources file 06:36
/home/samantha/perl6/share/perl6/site/resources/19DFC05B99EC4E218A1A8D9A1B966919724DE593 only contains `@ perl6 %~dpn0 %*`
timotimo yes
samcv if i clone the git, and zef install . all is fine
timotimo you see, it has a "mi6" and a "mi6.bat"
the mi6.bat contains only that exact line
samcv :\
i do not use windows 06:37
timotimo i expect zef is stripping extensions for binary scripts
and just installs one after the other, thus overwriting mi6 with mi6.bat
the solution is to not have two files with the same basename in bin/
is there not yet an issue in the mi6 repo?
BBL
samcv it installs fine with zef install . though
why difference?
apparently doesn't work on windows either github.com/skaji/mi6/issues/6 06:38
also no issue about this problem on linux
06:42 cpage_ left 06:43 cpage_ joined 06:44 mr-foobar left, bjz left
samcv well opened an issue 06:45
06:47 bjz joined 06:50 gdonald left, gdonald joined 06:55 astj_ joined, astj left 06:58 mr-foobar joined
timotimo yeesh, that's a year old 07:04
samcv well mi6 added license field support :P
very quickly
07:12 cpage_ left 07:13 cpage_ joined 07:14 astj_ left 07:15 astj joined 07:19 astj left 07:26 parv joined, g0d355__ left 07:28 mr-foobar left 07:37 baest_ joined 07:38 vendethiel- joined, r3m_ joined 07:40 wamba left, jercos_ joined, BinGOs_ joined 07:41 eyck_ joined, xinming_ joined, neady joined, BinGOs left, geekosaur left, r3m left, xinming left, r3m_ is now known as r3m, Celelibi joined 07:42 geekosaur joined
japh_com anyone concerned about the pod2html conversion problems on docs.perl6.org/perl6.xhtml ? for example: my $e = enum &lt;one two three>; 07:44
07:46 vendethiel left, eyck left, zakharyas joined, xtreak left 07:47 domidumont joined, curan left 07:50 dakkar joined 07:52 g4 joined
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/04/24/...ing-times/ 07:55
07:57 domidumont left 07:59 andrewalker joined
masak lizmat++ 08:00
08:01 xtreak joined 08:02 domidumont joined 08:03 jonas1 joined 08:04 cgfbee left
masak zoffix++ # perl6.party/post/The-Failure-Point-of-a-Release 08:06
08:06 pmurias joined
masak that's one of the best posts about release management I've ever read. very insightful 08:07
pmurias my int $?BITS := nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; # how is this NQP code supposed to work?
08:10 cgfbee joined
masak feels like he should maybe reply to stackoverflow.com/questions/4356161...quote-text 08:11
08:11 astj joined
masak I don't have time right now, but I'll try to after $dayjob 08:12
08:12 ecocode joined
nadim_ lizmat++ 08:12
masak IIUC, blippy (who asked the SO question) is aiming to get the program text out of the $expr AST argument being passed 08:14
his attempt at doing so amazes me a bit -- that's not something I'd've tried
I think something like $expr.Str ought to work -- assuming we want the standard stringification of ASTs to yield the program *code* itself, and not something more AST-y 08:15
nadim_ a few weeks ago this link was, I believe, in a P6 weekly, interesting read an nifty example of what lazy evaluation can be used for. But the main part was about attribute grammars. I find the idea interesting, grammar that can ct on objects rather than text. first things that comes to mind is XSD/DDT or even complex searches. Does P6 Grammar already support that or could easily be extended? is it altogether rubbish? 08:17
wiki.haskell.org/The_Monad.Reader/...ars_Matter
08:24 wigner joined
masak nadim_: p6 grammars are (currently) fairly Str-centric 08:27
nadim_: there's been discussion about allowing them on Cat, but Cat is still (IIRC) wildly unimplemented
nadim_: I could see some uses on Buf, especially if it leads to a whole serialization/deserialization story 08:28
08:28 cpage_ left
lizmat my thoughts on that are that if we would have a string representation of bytes, that would translate to NFG, we would be set I think 08:29
because grammars do NFG :-)
08:29 BinGOs_ is now known as BinGOs 08:30 BinGOs left, BinGOs joined 08:31 wigner left 08:32 lowbro joined, lowbro left, lowbro joined 08:35 zakharyas left
masak lizmat: hm :) 08:36
lizmat: seemsme that if you'd regex on bytes, there'd certainly be some byte sequences best expressed as (say) UTF-8-encoded strings -- but the strength would be that not all of them would be 08:37
"Sometimes a byte is just a byte" -- Freud
ach, anyway. rough consensus and working code. I should just throw together a prototype of what I mean by byte matching :> see where it leads
08:39 wamba joined 08:41 kurahaupo left 08:43 mr-foobar joined 08:46 wamba left 08:56 kyan left 09:05 xtreak left 09:06 xtreak joined 09:10 Cabanossi left, xtreak left
timotimo i remember talk about regex on objects 09:11
09:11 Cabanossi joined
timotimo i'd love that in Perl6::Optimizer :) 09:11
it would be a bit like signature unpacking but more easily accomodating alterations inside of an object graph 09:12
09:15 cpage_ joined
pmurias in what test file should a test for 0xffffffff go in? 09:22
09:22 TEttinger left 09:24 parvx joined
moritz as a literal? 09:25
09:26 parv left
pmurias yes, it's broken on 32bit rakudos 09:26
moritz maybe t7spec/S02-literals/radix.t or S02-literals/numeric.t
s/7/\// 09:27
nadim_ timotimo: if we have that on regex I guess it wouldn't be far to have it in Grammars. Was the talk in a blog or in the ether?
timotimo i dont remember. it might have been in the specs actually 09:30
the main thing about this is that we compile some backtracking code for you 09:31
the step from regexes to grammars is tiny
though it might be "interesting" to come up with what match objects are going to look like
i.e. there will not be a sensible value dor from/toi bet 09:32
09:37 cgfbee left 09:39 Cabanossi left 09:40 xtreak joined 09:41 Cabanossi joined
timotimo nadim, design.perl6.org/S05.html#Matching...on-strings 09:42
09:42 japh_com left, rindolf joined 09:43 rindolf left, cgfbee joined 09:44 rindolf joined 09:45 mr-foobar left
nadim_ timotimo++ 09:53
10:01 rindolf left 10:02 domidumont left
Geth ecosystem: ea2efae775 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
META.info -> META6.json
10:02
10:05 nadim_ left
Geth ecosystem: b2b15ee727 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
META.info -> META6.json

  raw.githubusercontent.com/MattOate.../META.info is currently
busted due to naming it META.json. PR sent. Set to META6.json in list
10:07
xiaomiao mmh. releasing an update to rakudo that doesn't work with released versions of nqp is a little bit silly 10:09
could I please have an updated version of nqp packaged up? :)
10:10 Cabanossi left 10:11 Zoffix joined
Zoffix xiaomiao: in 3 weeks 10:11
xiaomiao Zoffix: that's a little bit confusing
10:11 Cabanossi joined, japhdc joined
Zoffix xiaomiao: it's a total clusterfuck from where I'm viewing it. 10:12
10:12 zakharyas joined
Zoffix xiaomiao: perl6.party/post/The-Failure-Point-of-a-Release 10:12
xiaomiao: The 2017.04.2 release works with 2017.04 nqp and 2017.04 moarvm; it's just have the regex/grammar bug (mentioned in that post). At this point, we'd need to recut point releases of three different projects, using the unbeaten path, which has a good chance of resulting in even more issues, so we (I?) knocked it on the head and finished for 2017.04. Next release, 2017.05 will auto-resolve all the 10:14
issues.
10:14 zakharyas left
Zoffix xiaomiao: there's also a Rakudo Star release candidate you can use instead 10:14
xiaomiao: pl6anet.org/drop/ 10:15
NeuralAnomaly: status
NeuralAnomaly Zoffix, [✘] Next release will be in 3 weeks and 4 days. Since last release, there are 14 new still-open tickets (12 unreviewed and 0 blockers) and 72 unreviewed commits. See perl6.fail/release/stats for details
xiaomiao Zoffix: I see. Mostly reasonable (bugs happen, bugfixes happen). But having a rakudo release that can't be built against released nqp is not very nice
(not complaining, just pointing out that you've accidentally made distro packagers a bit sad) 10:16
Zoffix xiaomiao: I understand that.
xiaomiao I think I'll just grab rakudo-2017.04.2 and pretend the issues don't exist
10:17 rindolf joined
Zoffix Sounds like a plan ;) 10:17
10:18 mxco86 joined 10:23 vytas joined 10:24 labster left 10:32 xtreak left, japhdc left, japhdc joined, xtreak joined 10:34 xtreak left, xtreak joined 10:37 Zoffix left 10:40 parvx left 10:45 mr-foobar joined 11:04 zakharyas joined 11:18 baest_ is now known as baest 11:20 neady is now known as eady 11:27 xtreak left 11:29 xtreak joined 11:35 gdonald left 11:36 gdonald joined 11:41 Cabanossi left 11:42 Cabanossi joined 11:51 domidumont joined, nadim_ joined 11:55 mr-foobar left 12:01 japhdc left 12:02 japhdc joined 12:04 pat_js joined 12:13 nadim_ left 12:21 itaipu joined 12:22 xtreak left 12:25 xtreak joined 12:34 xtreak left 12:36 winnie_ joined
winnie_ m: say "test" 12:36
camelia test
12:40 perlpilot joined 12:41 geekosaur left 12:42 geekosaur joined 12:44 drrho_ left 12:45 drrho_ joined
Geth ecosystem: a3f75d687d | (Moritz Len)++ | META.list
Track META name changes
12:50
12:53 vytas left 12:56 mcmillhj joined 12:58 vytas joined
Geth ecosystem: 776fa56185 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Use new meta name
13:00
dalek t-ZMQ: bf473e7 | (Zoffix Znet)++ | META (2 files):
Use modern META filename

The `META.info` is a legacy, pre-Christmas name. While it's still currently supported,
  `META6.json` is the new name. And since a lot of people simply copy some module's
structure, the old name still proliferates, so we're trying to get rid of it for good by sending PRs to any modules that use the old name, to switch to the modern name.
13:01
t-ZMQ: ef1d56e | timo++ | META (2 files):
Merge pull request #12 from zoffixznet/patch-1

Use modern META filename
13:10 perlpilot left 13:14 bjz_ joined 13:16 bjz left 13:21 mr-foobar joined 13:25 Possum joined 13:39 Cabanossi left 13:41 ggoebel left 13:42 Cabanossi joined 13:52 rindolf left 13:53 skids joined 13:57 alimon joined 14:00 salva joined, cdg joined 14:05 zakharyas left, zakharyas joined 14:06 Possum left 14:10 zakharyas left 14:14 kurahaupo_ left, kurahaupo joined 14:16 wamba joined
Geth Pod-To-HTML: cc4399ae61 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
Use modern META filename

The `META.info` is a legacy, pre-Christmas name. While it's still currently supported, `META6.json` is the new name. And since a lot of people simply copy some module's structure, the old name still proliferates, so we're trying to get rid of it for good by sending PRs to any modules that use the old name, to switch to the modern name.
14:20
14:20 Khisanth left 14:21 rindolf joined
Geth doc: 45cd208ee0 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
Use modern META filename
14:23
yaml-pm6: 3d70a2e81c | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
Use modern META filename
testml-pm6: 210c2a6c75 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
Use modern META filename
14:24
14:24 Possum joined, Cabanossi left 14:26 alimon left 14:27 Cabanossi joined 14:34 Khisanth joined 14:36 alimon joined, perlpilot joined
El_Che Win 10 bash support on new release: github.com/nxadm/rakudo-pkg/releas...2017.03_03 14:37
Geth ecosystem: 8f59111638 | (Zoffix Znet)++ | META.list
[automated commit] META.info -> META6.json

Changed 49 URLs
14:38
14:41 Exodist joined 14:44 winnie_ left 14:51 lowbro left
Geth ecosystem: ac6f230c60 | (Zoffix Znet)++ | META.list
[automated commit] META.info -> META6.json

Changed 3 URLs
14:51
14:59 wictory[m] left, M-Illandan left, tadzik left 15:05 mst joined 15:07 japhdc left 15:10 wictory[m] joined, khw joined 15:15 nadim_ joined 15:25 perlpilot left 15:29 zakharyas joined, dp[m] joined, tadzik joined, M-Illandan joined, Matthew[m] joined 15:30 unclechu joined, ilmari[m] joined, mienaikage joined, xui_nya[m] joined, CIAvash[m] joined
Geth ecosystem: 540879260f | (Zoffix Znet)++ | META.list
[automated commit] META.info -> META6.json

Changed 11 URLs
15:30
15:31 inokenty joined 15:32 zakharyas left 15:33 zakharyas joined 15:37 bjz_ left 15:46 rindolf left 15:49 zakharyas left 15:52 rindolf joined 15:58 le_perlie joined 15:59 sufrostico left 16:01 iyra joined
Geth ecosystem: ad9e9e4094 | (Zoffix Znet)++ | META.list
[automated commit] META.info→META6.json (4 URLs)
16:02
16:08 nadim_ left 16:09 le_perlie left 16:11 Zoffix joined
Zoffix FWIW: the automate commits are done by a script that checks for updates every 30m. I've sent ~380 PRs to swap META.info to META6.json, I think ~60 were already merged, so ~320 are yet to come. I can make Geth ignore these commits, if they're too spammy. 16:13
timotimo could you turn these commit messages into a single line perhaps? 16:14
"11 URLs changed at github.com/perl6/ecosystem/commit/540879260f"
[Coke] "eh, it's fine" 16:16
timotimo: last one was a single line.
timotimo it's actually three lines
16:16 sufrostico joined
[Coke] the last one is one line of commit message, with the usual pre-amble and post-amble of one line eaach. 16:17
timotimo :)
[Coke] the one before that is 3 lines of commit message.
no reason to shrink it past that, IMO.
16:18 robertle joined
Zoffix OK then ":) 16:18
16:18 salva left 16:19 kurahaupo_ joined 16:21 kurahaupo left 16:24 mcmillhj left 16:25 Cabanossi left 16:26 Cabanossi joined 16:28 dakkar left 16:32 itaipu left, itaipu joined, mcmillhj joined
Geth ecosystem: 136ca2e210 | (Zoffix Znet)++ | META.list
[automated commit] META.info→META6.json (2 URLs)
16:32
16:35 jonas1 left, jonas1 joined 16:37 geekosaur left, domidumont left, g4 left, mcmillhj left 16:40 geekosaur joined, CIAvash left 16:44 Geth left 16:45 cdg_ joined 16:47 Geth joined, ChanServ sets mode: +v Geth
Geth Swapped META.info → META6.json in 2 dists in github.com/perl6/ecosystem/commit/136ca2e210 16:47
Zoffix \o/
Worked the first time :}
Added "Commit filters" feature to geth 16:48
16:49 cdg_ left, cdg left
Geth ecosystem: 53792e4c9e | (Zoffix Znet)++ (committed using GitHub Web editor) | PULL_REQUEST_TEMPLATE.md
Fix typo
16:49
16:50 Geth left, Geth joined, ChanServ sets mode: +v Geth, mcmillhj joined 16:51 setty1 left 16:52 cdg joined, setty1 joined 16:53 setty1 left 16:54 setty1 joined, domidumont joined
timotimo neat 16:54
16:55 mcmillhj left
Geth ecosystem: bd5e6bd3f2 | (Nick Logan)++ (committed using GitHub Web editor) | META.list
Update META.list
16:56
timotimo oh, people are unaware of the automatic script 16:57
not really surprising, just interesting
16:58 mcmillhj joined 17:01 Geth left, Geth joined, ChanServ sets mode: +v Geth
Geth Swapped META.info → META6.json in 1 dists in github.com/perl6/ecosystem/commit/2ec7a3e9b8 17:03
17:06 nadim_ joined 17:08 cdg left 17:11 cdg joined, Ven joined, domidumont left, Ven is now known as Guest25397 17:12 Guest25397 left 17:18 mcmillhj left 17:23 zakharyas joined, Zoffix left 17:26 mcmillhj joined 17:27 domidumont joined
Geth ecosystem: 2d7f6b1593 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.md
Add correct name of meta file to README
17:29
17:36 grondilu left 17:37 setty1 left 17:38 setty1 joined 17:39 mcmillhj left 17:41 domidumont left 17:45 kurahaupo joined, mcmillhj joined 17:46 kurahaupo_ left 17:58 vendethiel- left 18:02 Ven joined 18:03 Geth left, Geth joined, ChanServ sets mode: +v Geth, Ven is now known as Guest3812 18:04 mcmillhj left, sufrostico left, eliasr joined 18:07 khw left 18:10 perlpilot joined 18:11 mcmillhj joined
Geth Swapped META.info → META6.json in 1 dists in github.com/perl6/ecosystem/commit/538ddf2174 18:16
18:16 zakharyas left
[Coke] off by one error 18:17
.tell zoffix off by one error on your message in 538ddf2174 18:18
yoleaux [Coke]: I'll pass your message to zoffix.
18:27 iyra left
Geth ecosystem: dd52a27f8c | (Zoffix Znet)++ | tools/meta.p6
Add META.info -> META6.json swapping script

If future generations would want to repurpose it or something
18:29
18:30 cdg_ joined
Geth ecosystem: 5b2e139c80 | (Zoffix Znet)++ (committed using GitHub Web editor) | tools/meta.p6
Fix bugglet
18:32
18:33 salva joined 18:34 cdg left, Guest3812 left, cdg_ left 18:37 Ven_ joined 18:41 gdonald left 18:43 iyra joined 18:44 gdonald joined, itaipu left 18:55 sufrostico joined, sufrostico left, sufrostico joined 19:01 domidumont joined 19:06 domidumont left, labster joined 19:11 itaipu joined 19:17 itaipu left, bhm left, bhm joined 19:21 rindolf left, darutoko left
samcv good * everyone 19:24
19:24 ufobat___ left
timotimo hey samcv 19:26
19:26 sufrostico left
samcv so i have 40 bags and need to compare how similar some other Bag i have is to each of them 19:27
fastest way?
/easist
timotimo well, easiest is easy :) 19:30
moritz I guess you need nested loops, an in there, get the intersecction of a pair of bags
samcv ∩?
moritz two 19:31
samcv two what
moritz two nested loops
samcv by an 'in' did you mean intersection i.e. `∩` 19:32
19:32 kurahaupo_ joined
samcv m: say (1,2,2,3).Bag ∩ (1,2,2).Bag 19:32
camelia bag(1, 2(2))
moritz ah, yes
samcv omg linenosie why you no support utf-8 ahhhh
moritz m: say (1, 2, 2, 3).bug 19:33
camelia No such method 'bug' for invocant of type 'List'
in block <unit> at <tmp> line 1
moritz m: say (1, 2, 2, 3).Bag
camelia bag(1, 3, 2(2))
moritz m: say (1, 2, 2, 3).Bag.sum
camelia Cannot resolve caller Numeric(Pair: ); none of these signatures match:
(Mu:U \v: *%_)
in block <unit> at <tmp> line 1
moritz m: say (1, 2, 2, 3).Bag.values.sum
camelia 4
19:33 raiph joined, kurahaupo left
samcv ok. and then find the intersection probably divide it be the number of items in the verbatim license file 19:34
and then find the one that has the most interaction
because obv you'd get a way big intersection otherwise if you had an infinitely long document that wasn't the license 19:35
moritz m: sub s(\x) { x.values.sume }, simalarity(Bag \a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b) }; similarty((1, 2, 2, 3).Bag, (1, 3).Bag)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3 s(\x) { x.values.sume }, simalarity(Bag7⏏5 \a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b
expecting any…
moritz m: sub s(\x) { x.values.sum }; simalarity(Bag \a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b) }; say similarty((1, 2, 2, 3).Bag, (1, 3).Bag)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3b s(\x) { x.values.sum }; simalarity(Bag7⏏5 \a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b
expecting any…
samcv hmm cool
moritz m: sub s(\x) { x.values.sum }; sub similarity(Bag \a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b) }; say similarty((1, 2, 2, 3).Bag, (1, 3).Bag) 19:36
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')'
at <tmp>:1
------> 3a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b) 7⏏5}; say similarty((1, 2, 2, 3).Bag, (1, 3
ex…
moritz m: sub s(\x) { x.values.sum }; sub similarity(Bag \a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b)) }; say similarty((1, 2, 2, 3).Bag, (1, 3).Bag)
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
similarty used at line 1. Did you mean 'similarity'?
moritz m: sub s(\x) { x.values.sum }; sub similarity(Bag \a, Bag \b) {2 * s(a ∩ b) / (s(a) + s(b)) }; say similarity((1, 2, 2, 3).Bag, (1, 3).Bag)
camelia 0.666667
moritz \o/
took me only a few dozen attempts
tyil thats not too bad 19:37
robertle until (quite) a while ago, I could call a method in a different module, which would do "require ::Foo", and that made Foo available to the code calling into this module. this does not work anymore, which seems right as importing into the caller sounds wrong 19:43
but is there a differnt way to do this? I am trying to do something like "Pluggable"...
timotimo right, you can't import "into the caller", you can only import into a "user", because then you can have a sub EXPORT 19:44
[Coke] it's now lexically scoped.
(which might impact your use case)
robertle ok, that makes sense. but is there a way to get the old behavior back? otehrwise I can't see how to dynamically load plugins... 19:45
timotimo after you've required a module, you can stash it away in any datastructure you want 19:46
geekosaur the code is present but not in scope. you could access it by global name instead of names imported into the lexical namespace?
robertle I think what I am after is your "stash it" with an emphasis on the "it". currently i stash the require'd module name rather than the actual thing 19:47
ceci nest pas une pipe
Geth Swapped META.info → META6.json in 6 dists in github.com/perl6/ecosystem/commit/a2be897f78
timotimo yeah, you ought to stash the module away, or chosen subs inside it or whatever 19:48
19:50 rindolf joined
robertle hmm, how do I get to the actual module from it's name? 19:51
timotimo you "require ::($name)" it, no? 19:52
m: my $name = "Test"; require ::($name); say ::($name).WHAT
camelia (Test)
timotimo m: my $name = "Test"; require ::($name); say ::($name).WHO 19:53
camelia Test
robertle right, that's what I do. and of course I could do a .new right after that, and store the result
timotimo well, you don't want to .new a module
robertle but that only works for modules that have a new, and has other problems
samcv moritz, thanks for that. should work pretty well for my uses :)
robertle I would rather store the module itself, and then pass that to someone else so that they can do .new on it without having to require it themselves
19:54 Cabanossi left
robertle like store the class rather than an instance of it 19:54
19:54 zakharyas joined
timotimo why would you ever .new on what require gives you? 19:54
i mean, if it has a "unit class" in it, then sure
19:54 ribasushi joined
samcv m: say "blah".isa(Str:D) 19:55
camelia False
samcv this does not work
robertle exactly, it was just an example! so I want to dynamically load plugins. if the plugins are classes, then you could do .new on them. but they could just be modules, e.g. each with a sub do-sth() in them
19:56 kurahaupo_ left
robertle hmm, makes less and less sense the more I think about it 19:56
19:57 Cabanossi joined
robertle essentially I need a replacement for Module::Pluggable in perl5 19:57
19:57 kurahaupo joined
robertle until some time ago I could do this easily in perl6, but the (good) change to make require lexically scoped breaks that 19:57
so I am looking for some work around it... 19:58
if my plugins are always classes, then the plugin system can do require and then .new and store instances rather than the class. that's a bit oif a pity, but workable 20:00
but for non-oo, regular modules I seem to be bust...
geekosaur there's a Package with that name though 20:01
robertle Pluggable? yeah, that is broken too...
alphah hello Perl6, I'm getting this error when trying to merge two hashes, (it happens when left side hash is empty) 20:06
Lists on either side of non-dwimmy hyperop of are not of the same length while recursing
left: 2 elements, right: 1 elements
[Coke] m: my %stuff; { require Test ; %stuff<t> = Test } ; %stuff<t>.WHAT;
camelia ( no output )
[Coke] alphah: can you gist the code?
tyil samcv: ^
alphah I'm printing the hash before merging (That part in code is in TOP method for grammar action), here is in the output below:
tyil does Hash::Merge suffer from this? 20:07
samcv i don't think that's published to the eco yet tho?
tyil but before it is :'D
samcv yes alphah show us your code
me and tyil gonna publish a hash merging module shortly 20:08
alphah Alright one moment, Will paste rest of info I have then show code
./bin/program.p6 dummy
[Coke] alphah: use a nopaste or gist service if it's more than a few lines.
tyil I'll wirte up a testcase either way
alphah cnf hash: ${:origin("/tmp"), :yolo}
cmd hash: {}
tyil also, `nc termbin.com 9999 < file.pm6` 20:09
alphah cnf hash: ${:origin("/tmp"), :yolo}
cmd hash: Nil
Lists on either side of non-dwimmy hyperop of are not of the same length while recursing
left: 2 elements, right: 1 elements
I dont get that error if I added cmd arg:
alphah@slackwork$ ./bin/program.p6 yolo dummy
g cnf: ${:origin("nono"), :yolo}
g cmd: {:yolo}
[Coke] alphah: please use a nopaste service.
20:09 pat_js left
alphah ok, one second 20:10
robertle [Coke]: awesome!
tyil samcv: seems like merging a hash into an empty hash is ok for us 20:11
samcv yeah prolly
[Coke] m: my %stuff; { require Test ; %stuff<t> = Test } ; %stuff<t>.WHAT.say # forgot the say
camelia (Test)
samcv don't see why it wouldn't
[Coke] Assuming you can't keep your require in the scope it's needed in, that trick might help.
samcv alphah, does this description fit your needs? github.com/scriptkitties/p6-Hash-Merge
and if so what is not covered here or does not work for you
method name may change 20:12
alphah samacv looks exactly what I need, but need to test it first 20:13
samcv oh ok
cool.
also [Coke] what sholud i call the method so it won't conflict with any future merge method?
[Coke] samcv: unless you pick some-long-name-that-will-very-likely-never-conflict, you can't know. 20:14
samcv mix lower and uppercase letters.... hehehe 20:15
[Coke] I would use the simplest thing that works for now, and if a new version of p6 appears with a merge method, you can make yours be conditional on version.
samcv %hash.MeRgE
alphah Coke: here is the whole file, the problem happen in method TOP. (Please ignore the naming I'm using) 20:18
gist.github.com/anonymous/5393f31f...a4886625db
20:19 jonas1 left
samcv oh no. zef is failing building on uhm 20:20
idk why
travis-ci.org/scriptkitties/p6-Has.../225752270
failing on 2017.04.3-50-gd057efd and 2017.03 but not on nom? idk
tyil zef is not supposed to fail
samcv no 20:21
it is not
oh it's working on the newer travis build. maybe travis just derped
crisis averted. TRAVVIISSSSS 20:22
pmurias m: my str $foo = 'Infinity on Linux but not on windows'; my num $n = $foo;say $n
camelia Inf
pmurias ^^ can someone please check what the above does on Rakudo on windows?
samcv that. hm
did not know we could turn strings into nums like that... 20:23
geekosaur that's what Cool does 20:24
samcv yes. didn't know it did that when asigning a string to a number like that. but i guess it makes sense sorta 20:25
didn't know about Inf though
or that you could have random text after a number and have it not freak out
i never tried
pmurias geekosaur: it's a low level coercion that doesn't involve Cool 20:26
geekosaur that does sound like trouble tbh 20:27
pmurias it also seems to be operation system dependent, which sucks ultra hard
geekosaur calculist.blogspot.com/2006/02/nancy-typing.html
use care converting random strings to numbers...
20:29 cdg joined 20:30 gdonald left 20:31 gdonald joined, ufobat___ joined
pmurias m: my str $nancy = "NaNcy"; my num $n = $nancy; say $n == $n; 20:32
camelia False
20:32 dct joined
[Coke] alphah: and how do you trigger the error you were mentioning? 20:34
do we have a "how to ask for help" link somewhere? 20:35
alphah I have the main program includes, have this line my %hash = LawCmd.create(@*ARGS.Str); and run the program as "alphah@slackwork$ ./bin/program.p6 dummy" 20:36
Coke:
20:37 kurahaupo left
alphah that will trigger the error, because %cmd arg hash will be empty, but running the program as "alphah@slackwork$ ./bin/program.p6 yolo dummy", I dont get that error 20:37
[Coke] so you're not showing us the code?
you're showing us some other code?
alphah Coke: I pasted the whole file
20:38 kurahaupo joined
alphah this is the other file that has this line of code: 20:38
[Coke] (if I run your code with "dummy" as an arg, nothing happens)
you posted one file, then said you had another file.
part of helping us help you is to make it easy to see what's going on with the existing code you have, or for you to golf that code to highlight the problem (remove extraneous code until only the problem you're dealing with is present in the code) 20:39
alphah sorry my mistake, thought I posteed the second,, really the second file doesn't have anything at all important, except creating the hash... posting it now
[Coke] ok. I'm heading out shortly, hopefully someone can help you out. Good luck. 20:40
alphah Alright, Thanks, here is the other file anyway gist.github.com/anonymous/8f7584cf...d5dc39f8fd 20:41
I'm ccreating account on gist so I can have the code easily available next time 20:42
[Coke] ok, that still doesn't compile, and also has a dependency on a file in /etc 20:43
I tried to switch the use's to load the first file, but then get stuck on other errors.
20:44 alimon left 20:45 alimon joined
[Coke] I would recommend golfing down your error. make a small 10 line program which highlights the issue you're having; hardcode whatever data you need to show the issue. 20:45
(%physics<star> ««=«« $<star>.ast if $<star>; looks weird to me, fwiw) 20:47
alphah alright will do that, I was trying to do that, by printing the two hashes that got produced from the program (as these the only things <<=<< op deals with during merging), Iposted them earlier but will make a small program that shows the issue 20:48
Thank you for help
[Coke] might help the next person if you posted that output in a separate gist.
20:52 Ven_ left
alphah Coke: gist.github.com/anonymous/b4b512d2...aee8675fc7 20:52
the program out put and the conf file 20:53
20:53 Ven joined
alphah , I would like to mention as well that, TOP regex breaks Grammar::Debugger Don't know why 20:53
20:53 Ven is now known as Guest73192 20:57 espadrine joined 20:58 setty1 left 21:00 skids left 21:02 bjz joined 21:03 sufrostico joined, TEttinger joined 21:10 Cabanossi left 21:11 cdg left 21:12 Cabanossi joined 21:14 Zoffix joined
Zoffix alphah: did you sort it out yet? 21:14
samcv moritz, cool :) 21:16
Finding similarity
(Artistic-2.0 => 0.997442 ClArtistic => 0.562578 Artistic-1.0-Perl => 0.538067 O
seems to work pretty great
21:17 zakharyas left
Zoffix m: say +StrDistance.new: :before<Artistic-2.0>, :after<ClArtistic> 21:17
camelia 6
Zoffix m: say +StrDistance.new: :before<Artistic-2.0>, :after<Artistic-1.0-Perl> 21:18
camelia 6
Zoffix heh
m: say +StrDistance.new: :before<Artistic-2.0>, :after<Artistic-1.0-Perfsdfdsfsdfsdfsdfsdfsdl>
camelia 27
21:18 Guest73192 left
alphah Zoffix: Not yet, I'm still having the error. Also what makes it difficult to track is I can't use Grammar::Debugger to follow step by step, it just ccrash if I enabled Grmmar::Debugger, (feels like writing sh*tty code) 21:18
Geth Swapped META.info → META6.json in 8 dists in github.com/perl6/ecosystem/commit/66b891e9fa 21:19
Zoffix alphah: well, how can I repro the issue? So far I have a bunch of gists, but they don't fit together well.
alphah: stick --ll-exception flag to perl6; it'll tell you where the error is at
alphah Zoffix: I just created the account at Github and pushed the code there: github.com/alphah77/galaxy 21:21
Zoffix alphah: OK. And how do I make it error out? 21:22
alphah and error shows when run "./bin/galaxy.p6 dummy" , also the conf file should be in "/etc/galaxy/laws" ,,, (laws file also is in "bin" directory in the project 21:23
works as expected without error in many other cases: for example "./bin/galaxy.p6 yolo dummy" . works fine. 21:25
Zoffix alphah: what does this supposed to do again? I don't know hyperops: %physics<galaxy> ««=«« $<galaxy-laws>.ast;
alphah that should merge the hash produced by .ast $<galaxy-laws>.ast to %physics<galaxy> hash,,, overwriting duplicates keys, and save result in %physics<galaxy> 21:27
Geth ecosystem: Tyil++ created pull request #331:
Add Hash::Merge
alphah and the error happens when $<galaxy-laws>.ast produces empty hash
Zoffix alphah: so why not avoid that error same way as in: %physics<star> ««=«« $<star>.ast if $<star> 21:28
m: my %h = foo => { bar => { ber => 42 } }; my %h2 = foo => { meow => { moo => 72 } }; %h ««=«« %h2; dd %h 21:30
camelia Hash %h = {:foo(${:bar(${:ber(42)}), :meow(72)})}
Zoffix wouldn't call that merging...
alphah Zoffix: It's actually inside if statment, so I'm using the same conditional, the conditional is at line 145
Zoffix m: my %h = foo => { bar => { ber => 42 } }; my %h2 = foo => { meow => { moo => 72 } }; %h «=« %h2; dd %h 21:31
camelia Hash %h = {:foo(${:bar(${:ber(42)}), :meow(72)})}
Zoffix How come two «« are used?
alphah: this is where the error points; I don't see an `if` statement up there: github.com/alphah77/galaxy/blob/ma...cs.pm#L144 21:32
alphah lol, that was typo, I was using <<=<< ,, thats probably confused me.. I just fixed it and tested again but give same issue
Zoffix Well, right that was just a side note. The original issue is there's no conditional for when $<galaxy-laws>.ast is empty 21:33
Or rather Any
21:34 perlpilot left
alphah you are right 21:35
21:35 aindilis joined
Zoffix And when I fix that it dies with "Laws are not consistent", which I'm guessing is normal 21:35
21:35 mcmillhj left
alphah Not that should not be the expected behavior, this erro means that Grammr LawCMD did not parse correctly, which it should have in this case 21:36
Zoffix Well, good luck :) 21:37
I think this is the largest Perl 6 program I ever looked at so far :P
Geth ecosystem: 669fbcc805 | (Patrick Spek)++ (committed by Zoffix Znet) | META.list
Add Hash::Merge (#331)

See github.com/scriptkitties/p6-Hash-Merge/
21:38
alphah lol, this is my very first program ever,, II know I made many stupid mistakes on it,, but it's just learning program 21:39
Zoffix tyil: FWIW, you can `git pull --rebase` to pull in changes from master without creating a new commit for the merge.
alphah: that's pretty cool! My first program ever was much shorter and didn't do much useful things :) 21:40
\o
21:40 Zoffix left, grondilu joined, grondilu left, grondilu joined 21:46 Actualeyes left
Geth Swapped META.info → META6.json in 5 dists in github.com/perl6/ecosystem/commit/77fbe95b4d 21:49
21:56 nadim_ left 21:59 Actualeyes joined 22:03 kurahaupo_ joined, japhdc joined 22:04 kurahaupo left 22:11 AlexDaniel joined, espadrine left
Geth Swapped META.info → META6.json in 9 dists in github.com/perl6/ecosystem/commit/03fd5ec588 22:20
22:22 pmurias left 22:23 alimon left 22:24 Cabanossi left
samcv ack my license checker is broken now. not sure why 22:25
finding 74% similarity for artistic 2.0, and MIT finds 0.47 (when i checked the files and they're def those) 22:26
so the percentages seem off
22:26 Cabanossi joined
samcv oh oopsie. forgot to normalize the text first! 22:27
22:27 kurahaupo_ left
samcv that would do it... 22:27
22:28 kurahaupo joined, dct left 22:31 dct joined 22:33 kurahaupo_ joined 22:34 kurahaupo left 22:35 bjz left
samcv working great for Artistic-2.0. hm maybe i need to set an upper limit based on different words instead of on percent 22:36
because MIT will show like 95% even if only like 5 words are different
and artistic will have 99.7% in that case 22:37
*artistic2
22:53 dct left 22:54 dct joined, Cabanossi left 22:56 Cabanossi joined 23:06 pochi joined 23:09 rindolf left, dct left 23:10 mcmillhj joined
Geth Swapped META.info → META6.json in 2 dists in github.com/perl6/ecosystem/commit/966bed1aff 23:20
23:21 ue joined 23:23 eyck_ left 23:25 iyra left, Cabanossi left 23:26 wamba left, Cabanossi joined 23:27 zapwai joined 23:29 eyck joined 23:32 ue left 23:33 ue joined 23:35 mcmillhj left 23:39 ue left 23:40 ue joined 23:42 ue left 23:43 ue joined 23:47 mcmillhj joined 23:51 kurahaupo_ left, mcmillhj left 23:53 mcmillhj joined 23:55 geekosaur left 23:57 geekosaur joined
samcv timotimo, what the hell is this 'at 1: can't parse objects starting in M yet (context: ETA.in)' 23:57
in JSON::Fast...
why not...
hm. something weird is going on here. printing to screen works fine but json::pretty says it only got 9 charecters 23:58
23:58 ufobat___ left