🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
JJAtria[m] jmerelo: I should have some version of my advent post ready for some reviews tomorrow or the day after, although I'm thinking about changing the topic to make it more accessible for beginners 00:10
tellable6 JJAtria[m], I'll pass your message to jmerelo
Geth_ ecosystem: JRaspass++ created pull request #567:
Fix some 404s in META.list
00:25
hythm what is the difference between `use MyModule` in the top of the file and `use MyModule` inside for example a sub? does the later mean the MyModule will only be loaded and used if the sub was called? 08:48
or the cost of using the module will exist in both cases 08:52
JJAtria[m] hythm: AFAIK, the module will be loaded in both cases (it's done at compile time), but the scope of the module you import will be different 09:09
So if the module exports a sub, for example, that sub will only be visible in the scope you `use`d it 09:10
hythm JJAtria[m] thanks 09:19
JJAtria[m] hythm: Maybe out of scope of your question, but if you want to conditionally load a module at runtime you can use require: docs.raku.org/language/modules#require 09:23
hythm noted 09:24
lizmat hythm: there's also the "if" module: github.com/FROGGS/p6-if 09:54
hythm Thanks lizmat 09:58
lizmat Files=1345, Tests=117140, 233 wallclock secs (30.39 usr 8.58 sys + 3199.41 cusr 311.12 csys = 3549.50 CPU) 10:29
tbrowder hi, all 12:34
is there any way to have a raku prog include other code fragments during compile time (not in a module)? 12:36
Geth_ advent: samebchase++ created pull request #71:
Update authors.md
13:16
El_Che tbrowder: you want to reimplement COBOL? 13:58
[Coke] like a shell .include? 13:59
"other file".IO.slurp.EVAL 14:00
xinming m: class A { has $.a; multi method t ($self where self.a == 5:) { 5.say; }; multi method t ($self where self.a == 3:) { 3.say; }; }; A.new(:a(5)).t; 14:10
camelia 5
tbrowder he, he, you can have a steady job with COBOL!
xinming For this example, Is there a way to make the `multi method ($self where self.a == 5:) { };` part shorter?
tbrowder yes, like a shell .include
ah,
[Coke] you can use the EVAL snippet above, but I would recommend making a utility module with some exports instead. 14:11
tbrowder [Coke]: ok, good, but isn't that dangerous in the wild? 14:12
xinming m: class A { has $.a; multi method t ($self where $!a == 5:) { 5.say; }; multi method t ($self where $!a == 3:) { 3.say; }; }; A.new(:a(5)).t; 14:13
camelia 5
xinming This is the shortest I can make, I just now think, that we can only have this now
[Coke] tbrowder: yes. why can't you use a module? 14:14
tbrowder thnx, folks, and happy thanksgiving for those that celebrate it tomorrow!
[Coke] (y) 14:15
tbrowder [Coke]: i'm mainly think of an include use during development...
not for public code
yr method should work fine 14:16
bye 14:17
[Coke] ~~
Geth_ advent: 5f24410047 | (Samuel Chase)++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Update authors.md

Adding myself so that a slot can be reserved for me.
14:26
advent: edfd6aacca | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Merge pull request #71 from samebchase/patch-1

Update authors.md
Xliff \o 14:48
If I want to overload += can I use infix:<+=> or do I need to overload infix:<+> ? 14:49
The docs aren't exactly clear on that.
tobs Xliff: do you mean use infix:<x> ($x is rw, $y) { … } if you say "overload += [through] infix:<+>"? That does not work. 14:56
apparently overloading infix:<+=> works and overloading infix:<+> also affects += 14:57
but it would be nice to document if assignment operators are meant to be overridden separately from their basic operator. 14:58
cpan-raku New module released to CPAN! Gnome::GObject (0.16.14) by 03MARTIMM 15:13
guifa Xliff & tobs: I think technically the assignment operators are meta operators, but probably += is specialcased allowing you to override it 15:40
guifa At the moment there’s no way to define metaoperators, though, and I’m not sure if there will be, although obviously there might be times when a combinatino metaop+op could be made more efficient some how 15:56
Geth_ ecosystem: littlebenlittle++ created pull request #568:
Add META6::Query and FileSystem::Helpers to ecosystem
16:03
Geth_ ecosystem: f9b0aeb1f3 | (Ben Little)++ (committed using GitHub Web editor) | META.list
Add META6::Query and FileSystem::Helpers to ecosystem
16:55
ecosystem: 82785a5e13 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #568 from littlebenlittle/patch-2

Add META6::Query and FileSystem::Helpers to ecosystem
cpan-raku New module released to CPAN! Gnome::Gtk3 (0.34.1) by 03MARTIMM 18:47
[Coke] TIL I learned about mutation testing. 19:23
(you mutate your code slightly, and if your unit tests still pass, that's bad, way to score your tests themselves) 19:24
perryprog Whaaaaat. TIL as well: en.wikipedia.org/wiki/Mutation_testing 19:30
Oh my gosh, the conditions for a mutation test are based on the "RIP model" 19:31
sjn I have a question about that pull-request questionnaire for the ecosystem repo: github.com/Raku/ecosystem/blob/mas...EMPLATE.md 20:05
sjn Is there a reason for chosing to use the spdx.org/licenses list, rather than OSI's list? 20:06
sjn samcv++ seems to be the original committer of that file. 20:07
Doc_Holliwood m: say [*] () 20:08
camelia 1
Doc_Holliwood why is this 1?
samcv sjn, the reason for using spdx is just spdx being a common and nice way to unambiguously refer to a specific license. spdx is just more widely used 20:09
Though. I don't think OSI has the same thing where they set specific identifiers for specific licenses? I thought they mostly reviewed licenses and gave them a rating of if it fits their definition of open source. Or am i misremembering 20:10
sjn ok, so there wasn't a specific goal behind choosing this list?
I mostly wondered about this because of the (rather understandable) noises that have been made around license prolifcation in different open source communities 20:11
samcv the specific goal is for the license field to be computer and user readable. It's not saying that we want you to pick one of the spdx list. SPDX doesn't approve any licenses or recommend anything. It just catalogues them 20:12
sjn right
samcv I would personlly recommend choosing an OSI license. But use the SPDX identifier
sjn I think it would be cool if could offer a short-list of recommended licenses
samcv Yeah. I think it could be more clear that it's the identifier matching the format that matters, and nothing else. And a link to recommended ones could be nice 20:14
kawaii Raku on Windows is strange... www.irccloud.com/pastebin/E5AjGxit/
samcv sjn, though. that list it links to does show which ones are FSF or OSI approved. which is nice
sjn yes, that is true 20:15
but it also offers a "license overload"
...and gives an author the option to "cement" the proliferation 20:16
btw, Bruce Perens has offered some interesting arguments and thoughts in this regard. Here's one of his talks about the topic: www.youtube.com/watch?v=vTsc1m78BUk
samcv Yeah. Maybe it should be phrased as: "My project has a license and the its SPDX identifier is in the "license" field" 20:17
And then say "If you need to choose a license, we recommend XYZ"
sjn Not sure if his solution is awesome, but there are some really thought-provoking ideas he's presenting there
Perens' minimal list of license recommendations is on licenseuse.org/ 20:19
As for having a canonical list of identifiers, I'm all for that. :-) 20:22
samcv Yeah. The goal was so a package manager could have an allowed license list, and only install with those or prompt for a new license. Or we could easily show or sort projects by license in a website interface etc 20:23
sjn mm
samcv It also makes sure the projects *have* licenses. As having unlicensed projects would not be great from a legal standpoint 20:24
sjn Heh. Understatement of the day. :-D 20:25
I'd say it's not even open source if it doesn't have a license, and therefore should be published through open source distribution channels 20:26
samcv then there's a tricky business of whether the META file needs a license 20:27
sjn oh? what's tricky about that?
samcv Well. If the META file doesn't have a license on the data itself, we could be violating something by just distributing it 20:28
Ideally to submit the project we would make you agree to a specific license just for the META file, so it's clear the exact licesne that data is under, and has no restrictions on it 20:29
sjn isn't this a question about defenitions and scope? e.g. one could easily specify that a LICENSE file applies to the whole project, except where stated otherwise 20:30
LICENSE file, or equivalent field in the META file 20:31
samcv Yeah. This is mostly a concern due to the large number of licenses one would have to review each one to be sure you can distribute it
samcv Or an unlicensed project 20:32
sjn Requiring a valid license before being allowed to upload an update ought to be a way of improving this situation over time, methinks 20:33
[Coke] as someone on the commercial side, I'm very glad to have easily identifiable license and copyright. 22:20
[Coke] I also wish there was a "support" +/or donation field that was common. 22:20
CAPTCHA_REQUIRED Is that fair to noncommercial developers? 22:21
[Coke] (that is: if we want to get paid support on something, how would we go about it, and barring that, if we got approval to throw some bucks as a thank you...)
Having an easily identifiable license?
kawaii I don't see why not, GitHub allow you to upload a .github/funding.yaml file too, to provide funding info for your project.
[Coke] kawaii++ 22:22
kawaii But I don't agree with enforcing a license, it's not required to simply publish a module in the public domain to also provide a software licence, the FSF have some info about this published somewhere.
timotimo have your authoring tool generate github's own funding thingie off of the META6.json 22:23
kawaii directory.fsf.org/wiki/License:PublicDomain
[Coke] Sure, you don't need to add a license, but then many people will be unable to use your code.
timotimo does anybody take meticulous care that you're using json only for good, not evil?
was that json?
kawaii Aren't you the resident JSON expert? 22:24
timotimo reluctantly, LOL
www.json.org/license.html 22:25
`The Software shall be used for Good, not Evil.`
kawaii I'm waiting for the premium release of JSON::Fast, or JSON::Turbo as we're calling it
timotimo i should call it like a combustion engine
what recognizable names of combustion engines are there ...
oh, of course! JSON::v8!
absolutely foolproof
tadzik :D
you can get more confusing by naming it like the german automakers do with specific fuel injection technologies 22:26
like JSON::CGI
timotimo hahaha
make something up so i can name it JSON::NOSJ 22:27
CAPTCHA_REQUIRED I don't agree that a license should be mandatory
I realize that many people will be able to use the code without a license 22:28
However, not having a license is effectively a cc0 non-commercial license without the future-tie in clause
timotimo you're opening yourself up for litigation, but i guess if you're not a company you can just hope you'll never be found?
CAPTCHA_REQUIRED So you can decide at a later point what license works best 22:28
timotimo wait what
kawaii I think that tools such as zef should warn users that whatever module they're installing doesn't come with a license, and it's caveat emptor at that point 22:29
CAPTCHA_REQUIRED I do don't see how your opening yourself up, but I do see how commercial entities would be unable to use something without a license
I am not a commercial entity I am an individual, and I am not representing a commercial entity right now
timotimo if you don't have a license to use a thing and you use it you're commiting Internet Software Crime
CAPTCHA_REQUIRED Maybe but intellectual property laws are not exactly based on reality 22:30
kawaii Largely based on jurisdiction I expect timotimo
timotimo not sure this is IP law
CAPTCHA_REQUIRED If you mean licensing
Software isn't tangible 22:31
timotimo what jurisdiction will be responsible for ACME::Kitty:auth<MisterMcDoesn'tGiveYouTheirLegalName> 22:32
CAPTCHA_REQUIRED Probably whatever jurisdiction a copy of that library currently exists in at the moment 22:33
JJAtria[m] What is the likely problem if zef stops and asks for github username during installation? 22:34
I'm guessing some URL is pointing at the wrong thing
zef install Web, if you want to try it at home
kawaii I'll reiterate that duty of checking the software has a suitable license falls to whomever is using it, not publishing it, we don't prosecute homeowners for being burgled, we prosecute the thieves. Same applies to 'no trespassing' signs around forbidden areas.
timotimo JJAtria[m]: git clone may ask for username/password if you've got a github.com/... URL 22:36
git pull as well
kawaii git clone asks for the username if you use the http scheme for pushing, not cloning 22:37
if you use the ssh style clone/push/pull you need to be authenticated anyway
JJAtria[m] Hm, but zef info Web reports the source-url as git://... so it must be something else 22:38
Time to dive into zef I guess
[Coke] If we need legal advice on licensing, btw, TPF is working with a lawyer at the moment. I'd recommend asking them to get their 2¢
[Coke] I think it's reasonable to have requirements of modules to be in the index (whether or not this is one of them) - nothing is stopping developers from releasing whatever they want on their own, of course. 22:40
Geth doc: JustThisGuyAZ++ created pull request #3708:
Update testing.pod6
22:50
JJAtria[m] Welp, I eventually spotted the typo: github.com/raku-community-modules/...l/24/files 23:01