»ö« 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. |
|||
TimToady | samcv: be sure your script pulls the latest; I just pr'd Grammar::Debugger to add some of those fields, for instance | 00:01 | |
samcv | cool | ||
yeah ofc | |||
TimToady always figures it's better to say a thing too many times than too few :) | |||
samcv | yep | 00:02 | |
00:03
cpage_ joined
|
|||
TreyHarris | It looks like most well-behaved classes ignore any named argument they don't recognize, but some do barf. When you only define BUILD, though, that's the behavior you get, so that's what should be considered default behavior, yes? (Wondering how to write the test "I implement this flag" before I get to the behavior that can exercise it, but I guess I can't and should just accept that.) | 00:05 | |
samcv | ok cool got my automated script to scrape all these that RabidGravy said failed the META license test | 00:07 | |
so many variations | |||
also idk what 'perl' license means. perl 5 ? perl 6? heh | |||
ugexe | "yes" | 00:08 | |
samcv | ;) | ||
here's the list gist.github.com/samcv/9177c43f2a78...54c63d28e5 | |||
ugh so many saying just "Artistic" and many of those i've seen have 2.0, but. no way to automate that without dling any license file in the project and checking that. | 00:09 | ||
ugexe | no urls then i assume? | ||
samcv | url's? | ||
00:09
mcmillhj joined
|
|||
samcv | to the meta's? well. | 00:09 | |
ugexe | as the license some people use a url to the license text | ||
samcv | my script has them. that's just the printout | ||
anarchy! | 00:10 | ||
TimToady | well, anything that /Artistic.*2/ can probably change to 'Artistic-2.0', which I believe is the standard espoused by the website | ||
samcv | yeah | ||
exactly | |||
ugexe | i can't filter urls effectively, so i'm all for some ENUM of values | 00:11 | |
samcv | hmm? | ||
TimToady | perl probably means it was originally "same as Perl itself", which at the time would only have been Artistic | ||
samcv | yeah. though. many say Artistic. but mean Artistic 2.0. but i'm sure some mean Artistic 1. | ||
TimToady | well, Artistic | GPL actually | ||
it was a quantum superposition | |||
samcv | :) | 00:12 | |
Artistic-1.0-Perl OR GPL-1.0 | |||
TimToady | but since Perl 6 is still "perl", we could try to tweak them to Artistic 2.0, with a love note saying they should do something else if this is unacceptable | ||
samcv | using SPDX spec notation | ||
hahaha | |||
00:13
Actualeyes joined
|
|||
TreyHarris | I'm trying to port a package with many Perl 5 classes with named boolean switches in the constructors. Since they were standard blessed hashes, their failure to define an accessor method for those flags means doesn't register any inten; I can define the switches as public attributes or as hidden attributes only settable at constructor time. What makes sense to me is to make them all attributes with "is ro" if | 00:15 | |
their behavior can't be changed usefully after construction, 'is rw' if they can. That's the right way to do it, yes? | |||
s/means.*intent/doesn't indicate any intent/ | |||
00:17
japh__ left,
japh__ joined
00:18
iyra left
|
|||
samcv | ugexe, updated the gist to have url's and url's to meta files gist.github.com/samcv/9177c43f2a78...54c63d28e5 | 00:18 | |
00:19
AlexDaniel left
|
|||
TimToady | "Artistic-1.0-Perl OR GPL-1.0" is not quite right, since the README itself allows you to use any subsequent version of the GPL | 00:20 | |
samcv | hm | ||
TimToady | but then, I think GPL-1.0 also contains that provision | ||
so maybe it doesn't matter | |||
samcv | isn't that in the GPL-1.0? | ||
then it'd be Artistic-1.0-Perl OR GPL-1.0 WITH foobarclausename | |||
or something like that | |||
TreyHarris | Also: is there any basic rule of thumb about when to replace underscores in P5 names with hyphens? | 00:21 | |
samcv | uhm. do it if you want to make it more perl6y? | ||
TimToady | well, Perl always added a lot of foobar clauses to the GPL :) | ||
samcv | you don't have to, not really any rules | ||
TimToady, dev.perl.org/licenses/ it seems to just say GPL 1 or Artistic | 00:22 | ||
TreyHarris | samcv: I'm just trying to do a "straight but Perl 6-ish" port. I guess Test::More -> Test is the canonical case of that, so the answer is "yes" on underscores to hyphens and "yes" on attributes | ||
samcv | i usually used dashes for perl 6 stuff and sometimes name variables with underscores when they are going to be used in non perl 6 programming languages. but that's just me | 00:23 | |
TimToady | we generally reserve underscores for internal names in p6 | ||
samcv | do we though? | ||
hm | |||
TimToady | well, "reserve" is perhaps too strong | ||
we encourage hyphens for public-facing APIs, let's put it that way | 00:24 | ||
samcv | yeah | ||
00:24
japh____ joined
|
|||
TimToady | the presence of any underscores can be taken as a mild warning of <mumble> | 00:25 | |
TreyHarris | TimToady: undrstd. | 00:26 | |
00:28
japh__ left
00:30
gdonald left,
gdonald joined
00:45
Cabanossi left
00:48
Cabanossi joined
00:49
kurahaupo left,
kurahaupo joined
|
|||
samcv | nice. i automated it! | 01:01 | |
first automated PR down github.com/zostay/perl6-IO-Glob/pull/6 | |||
now i will uh. just let it go crazy! | |||
and it checks to make sure json is correct before doing it | 01:02 | ||
01:03
shdb left
01:04
shdb joined,
mcmillhj left
|
|||
samcv | so should be fairly safe | 01:04 | |
01:05
mcmillhj joined
|
|||
TreyHarris | erm... isn't there a shorthand to toggle a `has Bool $.blinking is rw` attribute that doesn't require saying the attribute name twice? | 01:08 | |
samcv | toggle it programatically without typing it into the program? | ||
not sure the question | |||
mst | $_ = !$_ for $obj.blinking; or something? | 01:09 | |
TreyHarris | like $p.blinking = not $p.blinking, but without saying "$p.blinking" twice. | ||
01:09
mcmillhj left
|
|||
TreyHarris | I thought there was a concise and clear way I saw once that was better than just writing it out. But if not, no worries. | 01:09 | |
01:12
sufrostico left,
labster left
|
|||
TreyHarris | I've had to learn too many languages in the past 16 months--I feel like the semester I took Spanish, Japanese and Russian. I keep "remembering" features from the wrong language. | 01:14 | |
01:16
Cabanossi left
01:18
Cabanossi joined
01:20
sufrostico joined
|
|||
samcv | so many PR gist.github.com/samcv/b7809f404778...f08efeb6bd | 01:21 | |
that was fun though. once i tried to relax and that i had already built in json validity safechecks and other things that it wouldn't do something embarassing to 30+ repos | 01:22 | ||
BenGoldberg | m: my $x = False; [not=] $x; say $x; | 01:28 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Prefix not requires an argument, but no valid term found at <tmp>:1 ------> 3my $x = False; [not7⏏5=] $x; say $x; expecting any of: prefix |
||
BenGoldberg | m: my $x = False; $x not= ; say $x; | 01:29 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3my $x = False; $x7⏏5 not= ; say $x; expecting any of: infix infix stopper statement end statement modifier … |
||
BenGoldberg | m: my $x = False; $x not= (); say $x; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3my $x = False; $x7⏏5 not= (); say $x; expecting any of: infix infix stopper statement end statement modifier… |
||
skids | samcv: merged X::Protocol, Control::Bail, Proc::Screen. Also, the urls stop showing up halfway down the gist. | 01:30 | |
BenGoldberg | m: my $x = False; $x .= not; say $x; | ||
camelia | True | ||
BenGoldberg | m: class Blinkable { has $.blinking }; my Blinkable $obj .= new; $obj.blinking.=not; dd $obj; | 01:31 | |
camelia | Cannot modify an immutable Any in block <unit> at <tmp> line 1 |
||
BenGoldberg | m: class Blinkable { has $.blinking is rw }; my Blinkable $obj .= new; $obj.blinking.=not; dd $obj; | ||
camelia | Blinkable $obj = Blinkable.new(blinking => Bool::True) | ||
BenGoldberg | TreyHarris ^ | ||
01:40
kurahaupo left
01:41
cpage_ left
01:42
labster joined
01:45
ilbot3 left
01:47
Cabanossi left
01:48
ilbot3 joined,
ChanServ sets mode: +v ilbot3
|
|||
samcv | skids, the ones without url's don't have PR yet | 01:48 | |
01:48
Cabanossi joined
|
|||
samcv | because they didn't have artistic and 2 in the license field | 01:48 | |
the other ones will have to be done more carefully | |||
02:08
noganex_ joined
02:10
noganex left
02:15
Cabanossi left
02:17
Cabanossi joined
|
|||
TimToady | m: my $x = False; $x ?^= True; say $x; $x ?^= True; say $x; | 02:19 | |
camelia | True False |
||
TimToady | you can use exclusive or as well | ||
02:21
japh__ joined
02:24
japh____ left
|
|||
BenGoldberg | m: use Benchmark; | 02:26 | |
camelia | ===SORRY!=== Could not find Benchmark at line 1 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::R… |
||
02:27
jrac1001 joined
|
|||
MasterDuke_ | star: use Benchmark | 02:30 | |
camelia | ===SORRY!=== Could not find Benchmark at line 1 in: /home/camelia/.perl6 /home/camelia/star-2016.10/share/perl6/site /home/camelia/star-2016.10/share/perl6/vendor /home/camelia/star-2016.10/share/perl6 CompUnit::Repository::Ab… |
||
MasterDuke_ | BenGoldberg: trying to do some benchmarking? | ||
02:32
jrac1001 left
|
|||
TimToady | m: my $x = False; $x .= not for ^1000000; say now - INIT now | 02:34 | |
camelia | 2.5071128 | ||
TimToady | m: my $x = False; $x ?^= True for ^1000000; say now - INIT now | ||
camelia | 1.27069904 | ||
TimToady | m: my int $x = 0; $x +^= 1 for ^1000000; say now - INIT now | 02:36 | |
camelia | 0.60105261 | ||
02:40
ChoHag joined
02:47
japh____ joined
02:49
mcmillhj joined
02:51
japh__ left
02:54
Actualeyes left,
mcmillhj left
02:56
mr-foobar left
03:00
japh__ joined
03:02
titsuki_ joined
03:03
japh____ left,
BenGoldberg left,
titsuki left
03:04
BenGoldberg joined
03:07
Actualeyes joined
03:17
sufrostico left,
japh____ joined
03:20
japh__ left
03:27
zapwai left,
Sgeo joined,
Sgeo__ left
|
|||
samcv | phase 2 attack of the automated PR has begun | 03:40 | |
now if it has artistic or perl in the license it checks to make sure there's only one license file, and that, that file is at max one line copyright line different from my copy | |||
03:43
kevin joined,
kevin is now known as Guest8657,
perlawhirl left
03:44
Cabanossi left
|
|||
Guest8657 | Hi all, is there any module in perl6 can parse excel file | 03:44 | |
03:44
labster left
03:46
Cabanossi joined,
perlawhirl joined,
perlawhirl__ joined,
perlawhirl_ joined,
perlawhirl___ joined
|
|||
samcv | good question Guest8657 | 03:47 | |
03:47
Guest8657 left
|
|||
samcv | TimToady, looks especially nice if we sort it by length heh gist.github.com/samcv/b7809f404778...f08efeb6bd | 03:47 | |
i guess that's the lazy way to sort it by whether or not there's a url there | 03:48 | ||
still 50 more repos i need to cover though | 03:55 | ||
u-ou | hello | 03:57 | |
samcv | hi u-ou :) | 03:59 | |
u-ou | (: | ||
04:00
wamba joined
04:02
u-ou is now known as no-n
04:03
japh__ joined
04:06
japh____ left
|
|||
no-n | tfw your program is tidy and resonable but then you need to add more features | 04:10 | |
samcv | :-D | 04:12 | |
no-n | :) | ||
04:14
skids left
04:15
Cabanossi left
04:17
Cabanossi joined
|
|||
samcv | how many PR until github shuts you down?. lol. | 04:17 | |
maybe they have an algorithm? | 04:18 | ||
since idk what prevents people creating Pull requests or issues with spam in it. hm. or mabye it's not really an issue | |||
no-n | hehe | 04:19 | |
perlawhirl_ | fwiw, i fixed up mine < Net::Netmask Pod::To::Markdown::Fenced wig > | 04:21 | |
04:24
Possum left
04:25
perlawhirl_ left
|
|||
samcv | oh cool | 04:28 | |
thank you perlawhirl :) | 04:30 | ||
04:30
no-n is now known as u-ou
04:31
Possum joined
04:34
labster joined
04:46
perlawhi1l joined
04:50
BenGoldberg left
05:00
Cabanossi left
05:01
Cabanossi joined
05:02
japh__ left,
japh__ joined
|
|||
Geth | doc: 4bc72d5114 | (Samantha McVey)++ | doc/Language/modules.pod6 Add updated information on putting license in META6.json design.perl6.org/S22.html#license |
05:02 | |
doc: eb608b1a1f | (Samantha McVey)++ | .travis.yml Add fast_finish to .travis.yml Should enable build status before ignored build statuses have finished |
05:07 | ||
05:09
japh____ joined
05:10
Possum left
05:11
japh__ left
05:17
perlawhirl___ left
05:18
azawawi joined
|
|||
azawawi | good-morning | 05:18 | |
05:18
perlawhirl__ is now known as perlawhirl_,
perlawhirl_ is now known as 07EAAQYAC
05:19
07EAAQYAC left,
perlawhirl left,
perlawhi1l is now known as perlawhirl
05:20
japh____ left,
japh____ joined
05:22
Possum joined
05:29
Cabanossi left
05:31
Cabanossi joined
05:34
Possum left
05:36
japh__ joined
05:39
japh____ left
05:40
Possum joined
|
|||
masak | good morning, #perl6 | 05:43 | |
m: my $program = q[say "lol, so unsafe!"]; EVAL $program | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma to override this error, but only if you're VERY sure your data contains no injection attacks) at <tmp>:1 ------> 3 q[say "lol,… |
||
samcv | hii | ||
masak | m: use MONKEY-SEE-NO-EVAL; my $program = q[say "lol, so unsafe!"]; EVAL $program # bah | 05:44 | |
camelia | lol, so unsafe! | ||
masak | m: my $program = q[say "lol, so unsafe!"]; my &eval = &EVAL; eval $program | ||
camelia | lol, so unsafe! | ||
samcv freaks out and runs around screaming | |||
masak | ah, so *that's* how you do it | ||
two birds with one stone, really | |||
05:44
xtreak joined
|
|||
samcv | hahahha | 05:44 | |
masak | (a) I get the non-silly spelling back | ||
(b) I trivially circumvent the hysterical error | |||
this almost deserves a blog post, although I fear it might be a slightly grumpy one | 05:45 | ||
samcv | hahaha | 05:46 | |
m: ("'foo'" ~ '.EVAL').EVAL.say | |||
camelia | 5===SORRY!5=== Error while compiling /home/camelia/EVAL_1 Undeclared routine: foo used at line 1 |
||
samcv | m: Q<'foo'.EVAL>.EVAL.say | 05:47 | |
camelia | 5===SORRY!5=== Error while compiling /home/camelia/EVAL_1 Undeclared routine: foo used at line 1 |
||
masak | fwiw, in the book "JavaScripdt: The Definitive Guide", it says that (in JS) `eval()` oughta have been a unary (prefix) operator, not a function. this is why. | ||
samcv | m: 'foo'.EVAL.say | ||
camelia | 5===SORRY!5=== Error while compiling /home/camelia/EVAL_0 Undeclared routine: foo used at line 1 |
||
masak | (because you basically cannot statically analyze first-class function values) | ||
TimToady: hm, why was it at one point believed that only `:=` would work for assigning functions in Perl 6, not `=`? | 05:48 | ||
(this is back to the Pugs or pre-Pugs days. ISTR that Pugs proved in practice that `=` worked. but I'm unclear on why it was not obvious at the time that it'd work.) | 05:49 | ||
05:50
ufobat joined,
RabidGravy joined
|
|||
moritz | I guess the thinking was that & variables wouldn't have a level of container | 05:51 | |
but I mostly remember that I didn't understand the reasoning at that time | 05:53 | ||
samcv | m: my $n = 5; my $var = "foo"; for ^$n { $var = "‘‘" ~ $var ~ "’’" ~ ".EVAL" }; $var.say; ($var ~ '.EVAL' x $n -1 ).EVAL.say | ||
camelia | ‘‘‘‘‘‘‘‘‘‘foo’’.EVAL’’.EVAL’’.EVAL’’.EVAL’’.EVAL foo |
||
samcv | nice. | ||
hahaha | |||
m: my $n = 5; my $var = "foo"; for ^$n { $var = "‘‘" ~ $var ~ "’’" ~ ".EVAL" }; $v2 = ($var ~ '.EVAL' x $n -1 ); $v2.say; $v2.EVAL.saysay | 05:54 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$v2' is not declared at <tmp>:1 ------> 3 $var = "‘‘" ~ $var ~ "’’" ~ ".EVAL" }; 7⏏5$v2 = ($var ~ '.EVAL' x $n -1 ); $v2.say |
||
samcv | m: my $n = 5; my $var = "foo"; for ^$n { $var = "‘‘" ~ $var ~ "’’" ~ ".EVAL" }; my $v2 = ($var ~ '.EVAL' x $n -1 ); $v2.say; $v2.EVAL.saysay | ||
camelia | ‘‘‘‘‘‘‘‘‘‘foo’’.EVAL’’.EVAL’’.EVAL’’.EVAL’’.EVAL.EVAL.EVAL.EVAL.EVAL No such method 'saysay' for invocant of type 'Str' in block <unit> at <tmp> line 1 |
||
samcv | m: my $n = 5; my $var = "foo"; for ^$n { $var = "‘‘" ~ $var ~ "’’" ~ ".EVAL" }; my $v2 = ($var ~ '.EVAL' x $n -1 ); $v2.say; $v2.EVAL.say | ||
camelia | ‘‘‘‘‘‘‘‘‘‘foo’’.EVAL’’.EVAL’’.EVAL’’.EVAL’’.EVAL.EVAL.EVAL.EVAL.EVAL foo |
||
samcv | so many evals | ||
m: my $n = 5; my $var = "foo"; for ^$n { $var = "‘“" ~ $var ~ "”’" ~ ".EVAL" }; my $v2 = ($var ~ '.EVAL' x $n -1 ); $v2.say; $v2.EVAL.say | 05:55 | ||
camelia | ‘“‘“‘“‘“‘“foo”’.EVAL”’.EVAL”’.EVAL”’.EVAL”’.EVAL.EVAL.EVAL.EVAL.EVAL foo |
||
samcv | slightly easier to read like this. but. really not XD | ||
06:04
mr-foobar joined
06:10
domidumont joined
|
|||
RabidGravy | samcv, so when I asked you *not* to send me PRs about this license thing ... | 06:12 | |
samcv | i'm sorry RabidGravy, i automated it, and it applied it to all of them. sorry about that | ||
06:17
domidumont left
|
|||
moritz | RabidGravy: you can like, close them :-) | 06:18 | |
RabidGravy | I have | ||
samcv | they did get closed ;) | ||
RabidGravy | I am also going to remove all the modules from the ecosystem at 9PM BST unless I see some evidence that this has been discussed among a group wider than half a dozen people on here | 06:19 | |
TimToady | sorry, we don't play the nuclear blackmail game here | 06:20 | |
moritz | we have 304 nicks in here, so maybe ~250 people who had the opportunity to speak up | 06:21 | |
RabidGravy | I know, it's not a threat, I just don't think this is the way to proceed | ||
moritz | then propose alternative processes to deal with such things | ||
ideally some that aren't a huge overhead | |||
06:21
japh____ joined
06:22
japh__ left
06:23
xtreak left,
xtreak joined
|
|||
samcv | RabidGravy, i'm sorry for the PR. and i looked at them and changes from "perl" to "Artistic-2.0" or from "Artistic" to "Artistic-2.0" offer more information about the modules. i mean there could be a way that we could have package managers resolve names that may not be exact matches, but "perl" and "Artistic" don't show full information | 06:24 | |
TimToady | Perl 6 has succeed to the extent it has because it has been a convergent (on average) process over the years. | ||
samcv | also open to suggestions about how to preced of course. and i've blacklisted you on my script | 06:25 | |
TimToady | we haven't forced rapid convergence, (obviously, in retrospect), but we do want to keep a gentle pressure in that direction | ||
if this was not gentle enough, then we need to figure out a better way, as moritz points out | 06:26 | ||
samcv | agreed | ||
TimToady | perhaps "blacklisted" has some undesirable negative connotations :) | 06:27 | |
samcv | was not meant that way. but it will skip any repos of user jonathanstowe on github now | ||
06:27
xtreak left
|
|||
moritz | "not-nag-listed" :-) | 06:27 | |
samcv | added an exception? | ||
06:28
nadim joined
|
|||
TimToady | actually, given how opinionated we all are, I'm surprised we've managed the degree of convergence we have, even if it did take a decade and a half (so far) :) | 06:29 | |
samcv | :) | 06:30 | |
docs.perl6.org/language/modules#in...META6.json i've updated the license section of here to provide more guidance. mostly says the same as the synopsis. need to clean up formatting a bit but | 06:33 | ||
or template now has a license field so hopefully that will help people out as well making new modules | |||
06:33
darutoko joined
06:35
domidumont joined
06:37
wamba left
06:38
imcsk8 joined
06:40
domidumont left
06:41
domidumont joined
06:44
azawawi left
07:01
japh____ left
|
|||
Geth | Inline-Perl5: 45cd7ec289 | (Samantha McVey)++ | META6.json Use SPDX identifier in license field of META6.json For more details see design.perl6.org/S22.html#license |
07:01 | |
Inline-Perl5: 8cb8c3254f | niner++ (committed using GitHub Web editor) | META6.json Merge pull request #95 from samcv/license Use SPDX identifier in license field of META6.json |
|||
07:02
japh__ joined,
samcv left,
samcv joined
07:03
raschipi joined
07:07
cpage_ joined
07:13
parv joined
07:15
astj joined
|
|||
TEttinger | I'm surprised nobody's made an Autistic License that is just like the Artistic License but has a clause that specifies it must be taken literally | 07:22 | |
it's redundant with it being a legal document, but it never hurts to be clear | 07:23 | ||
07:26
wamba joined
07:27
rindolf joined
07:29
TheAthlete joined
07:32
qeesung joined,
qeesung left
07:33
astj left,
TheAthlete left
|
|||
raschipi | TEttinger: aiming to increase redudancy is an infinite loop. | 07:42 | |
TEttinger | you're in #perl6, there are how many redundant implementations of it? | 07:53 | |
raschipi | Yes, but if increasing redudancy was our *aim*, everyone would have to start multiple nem implementations... | 07:58 | |
new implementations... | |||
tyil nibbles on samcv | 08:03 | ||
08:04
xtreak joined
|
|||
raschipi | I'm joking, of course, but I think you meant it's better to be explicit instead of implicit, not that just increasing redudancy is a good thing in itself. | 08:04 | |
08:06
xtreak left,
xtreak joined
08:07
abraxxa joined
|
|||
TEttinger | no I think I meant it to tie back to the characteristic of many people with autism who have difficulty understanding metaphors or non-formal documents and prefer things specified pedantically for clarity | 08:07 | |
which is not a disadvantage for programmers | |||
or lawyers! | |||
samcv | aren't licenses already pretty precise? | 08:08 | |
raschipi | I think we just said the same thing in too different ways, there's redudancy for you. | ||
TEttinger | hehe | ||
samcv | :O | ||
u-ou | too? | ||
samcv | also | ||
raschipi | two* | ||
TEttinger | samcv: I think there are lots of shoddy licenses out there. I encountered one | 08:09 | |
samcv | WTF license? | ||
www.wtfpl.net/txt/copying/ | |||
raschipi | Arguing for the everything explicit in #perl6, that's asking for a flamewar. | 08:10 | |
samcv | i'm still not sure what it actually grants as the license… though i know what the spirit of it is. i still don't know | ||
eater | why not force everyone to use Artistic-2.0? "If you run this program under perl6 it is licensed under Artistic-2.0" | ||
u-ou | what license do I need to use if I release some Perl 6 code? | ||
TEttinger | like this one is just terrible oryxdesignlab.com/license | ||
samcv | u-ou, Artistic 2.0 is the most common one | ||
that's what rakudo moarvm and nqp are licensed as, and the majority of our licensed modules | |||
TEttinger | (that license appears to prevent any usage of the things you buy from oryx) | ||
08:11
xtreak left,
japh__ left
|
|||
parv | u-ou, depends mostly on your own motives & anybody else's involved | 08:11 | |
samcv | i would argue the WTF license doesn't grant anything new. and people already "do what the fuck they want to" | ||
TEttinger | AGPL, watch the world burn | ||
samcv | but i've seen argued that GPL and AGPL at least in europe still allow linking to programs of any license without forceing them to be GPL | 08:12 | |
though in other juristictions it could be different | |||
TEttinger | AGPL is a pretty fiendish one though | ||
especially with stuff like Opa, which had an AGPL standard lib for a long time | 08:13 | ||
samcv | yes. but at least in europe. if it's linked then you only need to release the source of the library itself that was modified | ||
TEttinger | so any code that used strings, or numbers, etc. became AGPL. and it was for web dev | ||
so your crypto, needs to be OSS | |||
08:13
pmurias joined
|
|||
raschipi | working as intended. | 08:13 | |
08:13
zakharyas joined
|
|||
TEttinger | no surprise, Opa is dead | 08:14 | |
08:14
japh__ joined
|
|||
masak | moritz: "no level of container" makes a modicum of sense, I guess | 08:14 | |
or rather, I don't understand why it was thought it wouldn't/shouldn't have one, but... if that was the case, then binding'd be the only option | 08:15 | ||
samcv | TEttinger, see joinup.ec.europa.eu/community/eupl...sing-ghost | ||
As a conclusion, it looks that in most cases, linking two programs or linking an existing software with your own work does not – at least in Europe – produce a derivative or extends the coverage of the linked software licence to your own work | |||
^ the gist of it | |||
TEttinger | I'm not in Europe | ||
samcv | me either | 08:16 | |
in other places in is not quite as certain | |||
TEttinger | also, this is just hilarious opalang.org/ | ||
there's no download link, just some build instructions with a significant omission for windows | 08:17 | ||
samcv | but it hinges on what is a derivitive work TEttinger | ||
in any jurisdiction | |||
TEttinger | mm | 08:18 | |
samcv | which is the language the GPL and AGPL use | ||
TEttinger | also any software that needs, as part of its build process, for you to run `sudo ln -s /sbin/md5 /usr/local/bin/md5sum` | ||
maaaaay have a problem | |||
samcv | uhm | ||
i don't see why | |||
how is that a derivitive work... | 08:19 | ||
TEttinger | oh that was the Opa thing | ||
samcv | oh | ||
TEttinger | Opa changed from AGPL stdlib to just AGPL compilr | ||
samcv | i should make a "don't do anything" license. as a parady of the do what the fuck you want to license | ||
which will say you can't do anything. even look at the software | |||
or think about it | |||
or maybe "don't do anything you want to" | 08:20 | ||
raschipi | can't copy it even to your mind. | ||
samcv | which is equally meaningless to the wtf license | ||
haha | |||
because what does "don't do anything you want to" even mean... | |||
what if you don't want to do something, are yo uthen allowed to do it? | |||
parv | samcv: is that not for every closed source software & tractors? | 08:21 | |
samcv | and conversely with the WTF license | ||
haha | |||
TEttinger | I should make a license that requires anyone who seeks to enforce a patent against the licensor represent themselves in court with a blood alcohol level of 1% | ||
samcv | LOL | ||
idk if that's legal | |||
TEttinger | if they don't drive | ||
samcv | just make it at least 3/4 of the legal limit | ||
TEttinger | prohibition was repealed samcv | ||
samcv | for a court room | ||
08:21
japh__ left
|
|||
samcv | but. yo ucan't be drunk in court... | 08:21 | |
if you fail a breath test they'll throw you own in contempt | 08:22 | ||
08:22
japh__ joined
|
|||
TEttinger | public drunkenness yeah | 08:22 | |
jast | after a blood alcohol level of 1% I'm fairly sure you'll never drive again | ||
samcv | court is in public | ||
TEttinger | hmm, what would be a better requirement | ||
samcv | no not true jast | ||
TEttinger | oh! | ||
samcv | but it is not healthy | ||
TEttinger | must present entire case standing on head | ||
samcv | dunno then no way for case to go forward | 08:23 | |
TEttinger | if you fail, you must concede | ||
samcv | don't think judge would allow | ||
LOL | |||
TEttinger, or how to get parts of your license thrown out in court easily | |||
RE these things. lol | |||
TEttinger | yes. | ||
but standing on your head must be legal in court, they need to reenact things like assaults where someone's wrestling | 08:24 | ||
raschipi | The other day a judge threw someone in contempt in Brazil because they were using flip-flops. The Superior Court awarded them reparation from the judge that did it. | ||
samcv | haha | ||
raschipi | A judge won't enforce things they don't want to. | ||
08:24
Cabanossi left
08:25
Cabanossi joined
|
|||
jast | samcv: AFAIK the lethal dose is around 0.3-0.4% for "unpracticed" drinkers. there have been occasional measurement results of up to 0.7% I believe, but 1% seems a bit much | 08:25 | |
08:26
araujo left
|
|||
TEttinger | i suppose in that case you would weigh your options and decline to sue | 08:26 | |
jast | historical find of 0.77%: www.tagesspiegel.de/weltspiegel/alk...71216.html :) | ||
08:27
raschipi left
|
|||
samcv | After a short sobering, the drunkard had already left the hospital. | 08:27 | |
seems fine to me | 08:28 | ||
but i would argue jast 1% would likely the person be unconscious without a very high tolerance | |||
and could be dangerous. so would be hard to argue in court | |||
jast | yeah, and note the "I've never seen a value this high in my 28 years of doing this job" and "you might survive this once but it'll cause a lot of damage" | 08:29 | |
samcv | so to meet the requirements you'd have to spend months gaining a tolerance to fight in court | ||
jast | and it'd still be almost 30% more than has ever (?) been encountered | 08:30 | |
samcv | .ask Zoffix is there anyway we could have `dir :d` or `dir :f` to get all directories or all files etc? | 08:31 | |
yoleaux | samcv: I'll pass your message to Zoffix. | ||
08:32
domidumont left,
robertle joined,
domidumont joined
|
|||
samcv | i can do dir.grep({.d}) but dir :d would be much more convenient | 08:33 | |
moritz | dir.grep("d" => True) might work | 08:34 | |
.grep(*.d) | 08:35 | ||
samcv | but it's a very commonly wanted thing i would think | ||
to want all folders or all files | |||
moritz | but there's more to it | 08:36 | |
what about symlinks? | |||
should it follow them? treat them as dirs if it points to a dir? | |||
samcv | there is more to it. but.... :d would be like .grep(*.d) | ||
or dir :d, :f would do dirs and files. would perform like the .d or .f things do | 08:37 | ||
it just works exactly the same way things already do | |||
El_Che | hi | 08:39 | |
08:40
domidumont left
|
|||
moritz | ho | 08:40 | |
nadim | hej | ||
El_Che | 'Trump has to go' | ||
oh, we're not doing that :) | |||
08:41
domidumont joined,
gdonald left
|
|||
u-ou | does $s does Role run all of Role's initialisers on $s? | 08:41 | |
08:41
gdonald joined
|
|||
u-ou | so that you get all of the role's variables reset? | 08:41 | |
I hope that makes sense | |||
if you do it multiple times, does it keep resetting variables through the initialisers? | 08:42 | ||
samcv | pyeah it does u-ou | ||
that's the thing about roles which make them cool | 08:43 | ||
u-ou | yeah, they are cool | ||
samcv | it carries over many more things than `is` does | ||
u-ou | so you don't have to do self.stats = Stats.new, you can just do self does Stats | ||
m: role Stuff { has $.i is rw = 0 }; class Thing does Stuff { method inc { $.i++ }; method get { $.i }; method reset { self does Stuff } }; my $t = Thing.new; $t.inc for ^10; $t.get.say; $t.reset; $t.get.say | 08:46 | ||
camelia | 10 0 |
||
u-ou | so, every time 'does' is used the initialisers run? | 08:48 | |
i.e. = 0 | |||
08:56
domidumont left,
domidumont joined
08:59
espadrine joined
|
|||
u-ou | weird. if i change method get to $!i i get 10 again | 08:59 | |
m: role Stuff { has $.i is rw = 0 }; class Thing does Stuff { method inc { $.i++ }; method get { $!i }; method reset { self does Stuff } }; my $t = Thing.new; $t.inc for ^10; $t.get.say; $t.reset; $t.get.say | |||
camelia | 10 10 |
||
09:02
wamba left
|
|||
u-ou | but why? :I | 09:03 | |
09:06
gregf_ joined
09:07
espadrine left
|
|||
timotimo | oh you really don't want to "does" your object multiple times | 09:08 | |
m: role Omg { }; my $i = 10; for ^10 { say $i.perl; $i does Omg } | |||
camelia | 10 10 10 10 10 10 10 10 10 10 |
||
timotimo | bad example | ||
m: role Omg { }; class Test { }; my $i = Test.new; for ^10 { say $i.perl; $i does Omg } | 09:09 | ||
camelia | Test.new Test+{Omg}.new Test+{Omg}+{Omg}.new Test+{Omg}+{Omg}+{Omg}.new Test+{Omg}+{Omg}+{Omg}+{Omg}.new Test+{Omg}+{Omg}+{Omg}+{Omg}+{Omg}.new Test+{Omg}+{Omg}+{Omg}+{Omg}+{Omg}+{Omg}.new Test+{Omg}+{Omg}+{Omg}+{Omg}+{Omg}+{Omg}+{Omg}.new… |
||
timotimo | you're creating a new class every time | ||
u-ou | ahhhh | ||
timotimo | that'll also cause deoptimization because we can't be sure about types involved in existing code any more | ||
u-ou | so to reset everything you've mixed in you just have to reset everything you've mixed in | 09:10 | |
timotimo | you can keep the original object around and use "but" instead of "does" | 09:11 | |
09:12
wamba joined
|
|||
u-ou | m: role R {}; class C {}; my $i = C.new; for ^10 { say $i.perl; $i = $i but R } | 09:13 | |
camelia | C.new C+{R}.new C+{R}+{R}.new C+{R}+{R}+{R}.new C+{R}+{R}+{R}+{R}.new C+{R}+{R}+{R}+{R}+{R}.new C+{R}+{R}+{R}+{R}+{R}+{R}.new C+{R}+{R}+{R}+{R}+{R}+{R}+{R}.new C+{R}+{R}+{R}+{R}+{R}+{R}+{R}+{R}.new C+{R}+{R}+{R}+{R}+{R}+{R}+{R}+{R}+{R}.… |
||
u-ou | oh, "the original object" | 09:14 | |
09:16
Ven joined,
Ven is now known as Guest37478
|
|||
timotimo | oh, but that won't keep changes around of course | 09:17 | |
u-ou | I'm probably going to just write a "reset" method for my role :P | ||
timotimo | i wonder how to properly delegate to a method of one name in all roles, i don't think we had something for that yet | ||
09:24
sena_kun joined
09:25
xtreak joined
|
|||
eater | self but Stuff? | 09:26 | |
u-ou | what's the diff. between does and but? | 09:28 | |
I think it's just that but clones the object and does does not | |||
09:32
wamba left
09:34
bjz joined
09:38
TEttinger left
09:48
Guest37478 left,
salv0 joined
09:50
AlexDaniel joined
09:51
Ven joined,
Ven is now known as Guest2485
|
|||
tbrowder | .tell ugexe zef fails to install Text::Abbrev | 09:52 | |
yoleaux | tbrowder: I'll pass your message to ugexe. | ||
09:52
wamba joined
10:00
Cabanossi left,
Cabanossi joined
10:03
xtreak left
|
|||
Geth | ecosystem: the-eater++ created pull request #323: Add travis tests for newly added packages |
10:04 | |
10:22
aindilis left
10:24
labster left
10:28
xinming left
10:29
xinming joined
10:30
xtreak joined
10:34
bjz left
10:37
bjz joined
10:38
ilogger2 joined,
ChanServ sets mode: +v ilogger2
10:46
Cabanossi joined
|
|||
samcv | opened an eco issue github.com/perl6/ecosystem/issues/324 so we can track the modules which have nonstandard license keys, now that i'm done with the automable stage. full summary and detail in the summary at the top | 10:47 | |
i must go to sleep now. night everybody o/ | |||
10:55
salv0 joined
11:02
Ven joined
11:03
Ven is now known as Guest98008
11:13
Guest98008 left
|
|||
w4and0er96 | assume `my @array = < 3 1 4 5>; ` i wanna know how `@array[*-1] == 5`, what is `*` means and how can i use it | 11:21 | |
11:21
mr-foobar joined
|
|||
moritz | w4and0er96: *-1 creates a callback, just like sub ($x) { $x - 1 } | 11:21 | |
w4and0er96: and if you pass such a callback to the [] indexing operator, it calls it with the number of elements as an argument | 11:22 | ||
so it becomes @array[@array.elems - 1], basically | |||
w4and0er96 | is it a special syntactic sugar? or where else can i use such trick | 11:26 | |
moritz | m: say map *-1, 1..5; | 11:27 | |
camelia | (0 1 2 3 4) | ||
moritz | w4and0er96: wherever you want to construct a simple function | ||
m: say map *.uc, <a b c> | |||
camelia | (A B C) | ||
w4and0er96 | thx, maybe i got some about it | 11:28 | |
Woodi | hi #perl6 | 11:39 | |
question: if I buy software licence (with code) then what I can do with it ? looks that just buying is MUCH less trouble then the best OOS licence... | 11:41 | ||
Oracle and MS just sells per cpu or even core. what about "pay $2^m" where m is number of managers you have in company ? ;) | 11:42 | ||
samcv | open source software is free though. and depending on the license you can modify and include in software that you charge money for without needing to release the source | ||
Woodi | just looks OOS licences are main problem with OOS :) maybe we do that to yourself ? | 11:44 | |
eater | .f scr | ||
eh | |||
samcv | Woodi, non open source don't allow you the source PERIOD | 11:45 | |
and the licenses don't let you sell it for money | |||
in certain ways | 11:46 | ||
so they are more restrictive period. regarding MIT licenses or Artistic licenes | |||
Artistic 2.0 is pretty nice | |||
Woodi | so selling source code to distributor to resell is impossible business ? :) | ||
why painters don't have so much troubles ? | 11:48 | ||
Geth | doc: 466cc01ac1 | (Samantha McVey)++ | META.info Use SPDX identifier in license field of META.info Use the standardized identifier for the license field. For more details see design.perl6.org/S22.html#license |
||
Woodi | I guess purpose of Artistic license is to have similiar case... | ||
samcv | you can sell proprietary software with open source parts in it easily | 11:49 | |
pmurias | samcv: there are non open source things that allow you access to the source | 11:50 | |
yoleaux | 18 Apr 2017 00:58Z <MasterDuke_> pmurias: i think NQP_VERBOSE_EXCEPTIONS=1 is what gives better jvm errors | ||
samcv | just keep the proprietary stuff not open source if you want to remain ability to pursue people distributing it or something idk. depends what profit model is | ||
pmurias, that's not possible | |||
do you mean free software? | |||
sena_kun | is it just me or zef install File::Ignore doesn't work on latest rakudo? | 11:51 | |
samcv | open source... definition means you can read it | ||
uh sena_kun passed for me uh | |||
3 days ago? | |||
oh wait. nope | |||
it fails! | 11:52 | ||
sena_kun | samcv, well, I'll open an issue. Thanks! | ||
samcv | forgot the bug here hack.p6c.org/~samcv/install_log_live.txt but search for "Testing [FAIL]: File::Ignore" | ||
if you have the power add it to here github.com/perl6/ecosystem/issues/318 | |||
if you're in p6 group. i need to sleep | |||
sena_kun | samcv, sure. | ||
pmurias | samcv: is "you can change the source code but must give as 5% of your profits for anything you use it" Open Source? | ||
samcv | or just reply if not | ||
sena_kun | samcv, sleep well. | ||
samcv | yes pmurias | ||
open means you can read it | 11:53 | ||
free means that you can freely copy and alter it | |||
also. that's not a license that's a contract | |||
what you described | |||
very different legally. one is copyright law other is contract law | 11:54 | ||
also night o/ | |||
i should have been to bed hours ago | |||
also this has agood answer softwareengineering.stackexchange....t-you-cant | 11:55 | ||
but gpl 3 is not that bad, but companies don't like it because of uh. they don't understand fully when it is and isn't covered. so. but that makes sense | |||
anyway | |||
it talks about contract and copyright differences (as long as i linked the right thing). night | 11:56 | ||
sena_kun | the list is updated | 11:58 | |
samcv | also for extra points, search for `===> Testing [FAIL]` on that log txt hack.p6c.org/~samcv/install_log_live.txt and add them too ;) | 12:01 | |
sena_kun | is there anyone who can give me a hint about new braid(?) policy? I mean the "define_slang" thing. It was implemented about two months ago(as I remember), but I was too slow to update my slang that time. | ||
samcv | Zzz | ||
sena_kun | samcv, roger! | ||
jnthn | I somewhat fear the File::Ignore thing is going to turn out to be a Rakudo regression | 12:02 | |
Because I've installed it not all that long ago | |||
And even if I go back in the module's history some way, stuff still fails | 12:03 | ||
So it's not a regression in the module due to recent changes | 12:04 | ||
sena_kun | regressions are unavoidable, I guess. though, for two months of difference rakudo feels slightly faster for me now, so everyone++ | ||
jnthn | m: say 'resultA.txt' ~~ /'result-' <[AB]-[/]> '].txt'<?before "/" | $> / | 12:07 | |
camelia | Nil | ||
jnthn | commitable6: 2017.02 say 'resultA.txt' ~~ /'result-' <[AB]-[/]> '].txt'<?before "/" | $> / | ||
committable6 | jnthn, ¦2017.02: «Nil» | ||
jnthn | ah, d'oh | ||
12:07
Ven joined,
nowan joined
|
|||
jnthn | commitable6: 2017.02 say 'result-A.txt' ~~ /'result-' <[AB]-[/]> '].txt'<?before "/" | $> / | 12:08 | |
committable6 | jnthn, ¦2017.02: «Nil» | ||
12:08
Ven is now known as Guest49446
|
|||
jnthn | oh hmm | 12:08 | |
yeah, that's wrongly generated, jsut spotted the ] | |||
It's taking a little time to golf, but I've got an idea what might be going on | 12:15 | ||
12:15
mr-foobar left
12:16
wamba joined
12:19
mr-foobar joined
|
|||
sena_kun | >Cannot import symbol DOM from Template::Anti, because it already exists in this lexical scope | 12:25 | |
jnthn | This is super weird | ||
sena_kun | it seems that there is a lot of broken modules. :| | ||
jnthn | The mere presence of an action method with an empty body causes a later match to be wrong | ||
12:26
grondilu joined
|
|||
jnthn | m: gist.github.com/jnthn/f26b1ed53e6e...256523af0e | 12:26 | |
camelia | 「[AB].txt」 matcher => 「AB」 matcher => 「].txt」 |
||
jnthn | commitable6: HEAD gist.github.com/jnthn/f26b1ed53e6e...256523af0e | 12:27 | |
committable6 | jnthn, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry. | ||
jnthn | Slacker! | ||
committable6: HEAD gist.githubusercontent.com/jnthn/f...ismatch.p6 | |||
committable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, ¦HEAD(736be4d): «「[AB].txt」 matcher => 「AB」 matcher => 「].txt」» | |||
jnthn | committable6: 2017.02 gist.githubusercontent.com/jnthn/f...ismatch.p6 | ||
committable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, ¦2017.02: «「[AB].txt」 matcher => 「AB」 matcher => 「.txt」» | |||
jnthn | Note the ] that has sneaked in to the final matcher capture | ||
bisectable6: gist.githubusercontent.com/jnthn/f...ismatch.p6 | 12:28 | ||
bisectable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, Bisecting by output (old=2015.12 new=736be4d) because on both starting points the exit code is 0 | |||
jnthn, bisect log: gist.github.com/119eb26d8ca245bf59...bc014c9fc2 | |||
jnthn, There are 20 candidates for the first “new” revision. See the log for more details | |||
12:28
Cabanossi left
|
|||
jnthn | Aww | 12:29 | |
committable6: 2017.03 gist.githubusercontent.com/jnthn/f...ismatch.p6 | |||
committable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, ¦2017.03: «「[AB].txt」 matcher => 「AB」 matcher => 「.txt」» | |||
jnthn | committable6: 2017.04 gist.githubusercontent.com/jnthn/f...ismatch.p6 | ||
committable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, ¦2017.04: «「[AB].txt」 matcher => 「AB」 matcher => 「].txt」» | |||
12:31
Cabanossi joined
|
|||
jnthn | committable6: e0e0800 gist.githubusercontent.com/jnthn/f...ismatch.p6 | 12:31 | |
committable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, ¦e0e0800: «「[AB].txt」 matcher => 「AB」 matcher => 「.txt」» | |||
12:31
domidumont joined
|
|||
jnthn | committable6: fbf19d88dac7 gist.githubusercontent.com/jnthn/f...ismatch.p6 | 12:31 | |
committable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, ¦fbf19d8: «Cannot test this commit (Commit exists, but a perl6 executable could not be built for it)» | |||
jnthn | hmmm | ||
That was the uncurse merge | |||
Which I'm suspecting but can't easily prove | |||
committable6: 63e76d7 gist.githubusercontent.com/jnthn/f...ismatch.p6 | 12:32 | ||
committable6 | jnthn, Successfully fetched the code from the provided URL. | ||
jnthn, ¦63e76d7: «Cannot test this commit (Commit exists, but a perl6 executable could not be built for it)» | |||
jnthn files a rakudobug with what he's managed to figre out | |||
*figure | |||
12:33
bjz_ joined
|
|||
sena_kun | jnthn++ | 12:33 | |
12:33
xtreak joined
|
|||
jnthn | sena_kun++ # reporting it :) | 12:33 | |
12:34
Guest49446 left
12:35
Ven_ joined
|
|||
sena_kun | jnthn, I just merely tried to install Ddt to fix my Slang module, and File::Ignore(the dependency of Ddt) was broken and... Well, the dependency chain goes here. Yet I still don't know how to fix my module. | 12:35 | |
12:35
japh____ joined
|
|||
jnthn | Filed it; hoping TimToady++ might have an idea what's up :) | 12:42 | |
12:42
domidumont left
12:43
domidumont joined
12:45
Actualeyes joined
|
|||
Geth | doc: 6172df409c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO.pod6 Mention interaction between indir... ...$*CWD and lazily evaluted results returned from indir |
12:46 | |
12:49
Ven_ left
12:50
sufrostico joined
12:51
parrot_bird joined
12:52
darutoko- joined,
wamba left,
parrot_bird left
12:54
mcmillhj joined,
Ven_ joined
12:58
Cabanossi left
12:59
kurahaupo joined
13:00
xtreak left
13:01
Cabanossi joined
13:26
astj joined
|
|||
sena_kun | .tell samcv I have raided install_log_live.txt a bit, but, hmm... "cat install_log_live.txt | grep 'Testing \[FAIL\]' | sort | uniq | nl" gives me 132. Of course, some of them are failing because of missing native library, but it is approximately 70-100 modules to re-check and add to issue description. I wonder if it can be automated somehow. | 13:30 | |
yoleaux | sena_kun: I'll pass your message to samcv. | ||
grondilu mans nl | 13:31 | ||
13:33
Ven_ left
|
|||
sena_kun | grondilu, it should be, hmm, wc -l, but I'm more used to nl somehow. | 13:33 | |
13:34
Hor|zon joined
13:35
Ven joined
13:36
Ven is now known as Guest54785
13:42
astj left,
skids joined
13:43
Cabanossi left
13:45
Guest54785 left
13:46
Cabanossi joined
13:48
astj joined
13:52
astj left
|
|||
SmokeMachine | anyone ever tried to use native call with OpenCL on mac? | 13:53 | |
13:54
Ven_ joined
|
|||
SmokeMachine | im trying to run the PerlCL: github.com/kmwallio/PerlCL/blob/master/play.p6 | 13:55 | |
13:56
cowens joined
14:00
mcmillhj left
14:05
mcmillhj joined
14:06
darutoko joined
14:08
darutoko- left
|
|||
ugexe | tbrowder: I'm surprised Text::Abbrev ever worked - `unit module Abbrev;` | 14:10 | |
yoleaux | 09:52Z <tbrowder> ugexe: zef fails to install Text::Abbrev | ||
14:10
darutoko left
14:12
Ven_ left
|
|||
tbrowder | ugexe: I didn't check it closely, thsnks. | 14:12 | |
w4and0er96 | is there some usual use of `$_` and `@_` | 14:13 | |
new to perl, I find it too odd to understand | |||
b2gills | If you put an object in 「$_」 you can call methods on it without mentioning it 「.method」 is short for 「$_.method」 | 14:15 | |
cowens | $_ is default variable it is targeted by some functions and syntax by default | 14:16 | |
I think Perl 6 calls it the “subject” | |||
@_ is where your arguments to a function are stored if you don’t specify a signature | |||
14:19
Ven joined,
Ven is now known as Guest78706
|
|||
b2gills | There is also 「$/」 which is mostly used for regex results. 「$<key>」 is short for 「$/<key>」 and 「$0」 is short for 「$/[0]」 | 14:19 | |
grondilu | m: say sub { $_ }("hello") | ||
camelia | Too many positionals passed; expected 0 arguments but got 1 in sub at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
grondilu | m: say { $_ }("hello") | 14:20 | |
camelia | hello | ||
grondilu | works for blocks but not subroutines, though | ||
14:21
wamba joined
|
|||
cowens | m: say sub { @_ }("hello") | 14:21 | |
camelia | [hello] | ||
b2gills | m: {say @_; say $_}('hello')#If you have both @_ and $_ in a block, then @_ takes precedence | ||
camelia | [hello] (Any) |
||
b2gills | w4and0er96: In case you didn't know we have docs online docs.perl6.org/syntax/$_ please let us know if you have trouble understanding anything in them so that we can improve them | 14:26 | |
w4and0er96 | ok i'll try to understand it, thank you all | 14:28 | |
b2gills | Those of us who understand the language can only easily see logical errors in the docs, not what is missing, so we need new people to let us know. | ||
14:30
dct joined
|
|||
samcv | sena_kun, sounds good to me | 14:32 | |
yoleaux | 13:30Z <sena_kun> samcv: I have raided install_log_live.txt a bit, but, hmm... "cat install_log_live.txt | grep 'Testing \[FAIL\]' | sort | uniq | nl" gives me 132. Of course, some of them are failing because of missing native library, but it is approximately 70-100 modules to re-check and add to issue description. I wonder if it can be automated somehow. | ||
samcv | feel free to restructure to allow easier updatinng | 14:33 | |
samcv & | |||
sena_kun | samcv, well, I have some free time anyway, so I will think about it. The github issue's form looks a bit strange for me, but anyway. I will restructure and update the issue then later. | 14:34 | |
samcv | yeah it is weird. and i totally agree it could be a lot better | 14:35 | |
samcv heads back to bed | 14:37 | ||
sena_kun | samcv, sleep well! # hint: just `poweroff` that damn internet-connected thing already! | 14:38 | |
14:42
Guest78706 left
|
|||
ugexe | anyone know github:softmoth / Tim Smith irc handle? | 15:07 | |
TreyHarris | :m class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); "x: {.x} y: {.y}" given $p; | 15:08 | |
agh | |||
m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); "x: {.x} y: {.y}" given $p; | |||
camelia | WARNINGS for <tmp>: Useless use of "x: {.x} y: {.y}" in expression "x: {.x} y: {.y}" in sink context (line 1) |
||
tadzik | I think softmoth used to hang around here, no? | ||
.seen softmoth | |||
yoleaux | I saw softmoth 20 Oct 2015 06:17Z in #perl6: <softmoth> Explicitly specifying modules (what looks like Crust::Runner's current approach) puts the burden on the end user, which is also brittle and tedious, but it works and puts the solution at the same level as the error will show up. | ||
tadzik | yeah, years ago :) | 15:09 | |
ugexe | heh | ||
TreyHarris | m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); my $out = "x: {.x} y: {.y}" given $p; | ||
camelia | ( no output ) | ||
TreyHarris | Is that the most concise way to interpolate several stringy attributes of the same object? | 15:10 | |
m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); my $out = "x: {.x} y: {.y}" given $p; say $out; | |||
camelia | x: 3 y: 5 | ||
15:11
Zoffix joined
|
|||
Zoffix | m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); say $p.Capture; | 15:12 | |
camelia | \(:x(3), :y(5)) | ||
TreyHarris | And, .sprintf doesn't support named parameters--am I missing the way to do this if I need additional format control? | ||
15:12
dct left
|
|||
TreyHarris | Zoffix: sorry, I wasn't literally talking about like that. Assume | 15:12 | |
avuserow | TreyHarris, try using `with` instead of `given` | ||
TreyHarris | m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); my $out = "My x-val is {.x}, and as for y: {.y}" given $p; say $out; | ||
camelia | My x-val is 3, and as for y: 5 | ||
Zoffix | TreyHarris: looks pretty consise to me... | ||
avuserow | m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); my $out = "My x-val is {.x}, and as for y: {.y}" with $p; say $out; | 15:13 | |
camelia | My x-val is 3, and as for y: 5 | ||
Zoffix | `with` won't work with all objects | ||
m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); my $out = sprintf "My x-val is %s, and as for y: %s", |$p.Capture<x y>; say $out; | 15:14 | ||
camelia | My x-val is 3, and as for y: 5 | ||
TreyHarris | Zoffix: agreed. But what if I want to do formatting, is there a pythonish named-parameter variant of sprintf I'm not seeing lurking somewhere? | ||
So I can embed the names in the format rather than in the args? | |||
Zoffix | m: class Point { has $.x; has $.y; }; my $p = Point.new(:3x, :5y); my $out = {"My x-val is $:x, and as for y: $:y"}(|$p.Capture); say $out | 15:15 | |
camelia | My x-val is 3, and as for y: 5 | 15:16 | |
TreyHarris | Zoffix: yep, I've got lots of ways to do straight interpolation. But if I want column and alignment control, sprintf with a capture is the best I'm going to do? | 15:17 | |
perlpilot | TreyHarris: There's always the Form module. | 15:18 | |
Zoffix | TreyHarris: .Capture won't always give all the attrs. I'd just use sprintf '%s.... %s', .x, .y, .z with $foo | 15:19 | |
buggable: eco Form | |||
buggable | Zoffix, Found 37 results: Math::FourierTransform, Text::Diff, BioPerl6, BioInfo, DateTime::Format. See modules.perl6.org/#q=Form | ||
Zoffix | buggable: dude, learn to give exact matches, bruh | 15:20 | |
TreyHarris | Zoffix: yeah. I have a table of formats I need to select on with varying number of columns depending on the underlying implementation | ||
Zoffix | No docs. | ||
TreyHarris | I can convert the table into multis returning strings across all those implementations, but I'd kinda like to keep them together | 15:21 | |
15:23
devmikey joined,
iyra joined
|
|||
TreyHarris | perlpilot: Form? I don't see it in ecosystem... I remember it from the apocalypse and exegesis.... | 15:24 | |
m: use Form; | |||
camelia | ===SORRY!=== Could not find Form at line 1 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Reposi… |
||
Zoffix | TreyHarris: it *is* in the ecosystem | 15:25 | |
15:25
japh__ joined
|
|||
Zoffix | TreyHarris: modules.perl6.org/repo/Form | 15:25 | |
TreyHarris | Zoffix: oh crap, I was searching on '\bForm', forgot that despite my -i when you use a capital with ack it turns -i off | ||
Zoffix: sorry, that was like one of the first things I looked for before asking anything here, sorry :-/ | 15:26 | ||
perlpilot | TreyHarris: but, as Zoffix said ... no docs. You'd have to read the docs from Perl 5's Perl6::Form | ||
TreyHarris | perlpilot: That's fine, I've used it before. | ||
15:28
buggable joined,
ChanServ sets mode: +v buggable
|
|||
eater | m: multi sub prefix:<7>(Any --> Any) { say "yo" }; 7 4 | 15:28 | |
camelia | yo | ||
eater | :D | ||
15:28
japh____ left
|
|||
Zoffix | eater: I'll raise ya | 15:29 | |
m: sub infix:<> { $^a + $^b }; say 22; | |||
camelia | 4 | ||
Zoffix | :) | ||
eater | :') | ||
Zoffix btw what do you think about that MR I sent, too harsh or okay? | 15:30 | ||
TreyHarris | What's the right way to write a method whose multiple underlying OS-dependent native implementations will return either an iterable thingy or a list all at once? Flatten the iterator ones, turn the array ones into iterators, neither and just return what you get assuming people will use it in a way that works either way? | ||
Zoffix | buggable: eco Form | ||
buggable | Zoffix, Form 'A Perl 6 implementation of Perl 6-style string formatting.': github.com/perl6/form 37 other matching results: modules.perl6.org/#q=Form | 15:31 | |
Zoffix | yey | ||
TreyHarris | Zoffix: nice, thanks | ||
15:31
buggable left,
buggable joined,
ChanServ sets mode: +v buggable
|
|||
Zoffix | m: say List ~~ Iterable | 15:32 | |
camelia | True | ||
TreyHarris | Zoffix: right. Is this where "Slip" comes in handy? | ||
Zoffix | TreyHarris: you mean a Seq by iterable thingy? I'd convert it all to one return value, so it'd be predictable. | ||
15:33
bjz_ left
|
|||
Zoffix | Slip is a List that flattes itself into outer iterables | 15:33 | |
m: say Slip ~~ List | |||
camelia | True | ||
Zoffix | eater: didn't have time to review any of it; other than the $line < 6 stuff I mentioned this morning. | ||
eater | Zoffix: that's fine :) It's currently pretty horrible (faking a Test environment and stuff) but yeah take your time | 15:34 | |
Zoffix | TreyHarris: just stick a .List or .Seq as a coercer | ||
15:35
azawawi joined
|
|||
TreyHarris | Zoffix: some OSes implement a readdir-like one-at-a-time interface, others implement an array-return interface | 15:35 | |
azawawi | Hi | ||
TreyHarris | I could make the readdir ones lazy | 15:36 | |
Zoffix | eater: well, I don't think I'll be reviewing it. Just merge it. It's just for travis stuff, right? I don't see much need to deliberate it in PR form. Merge it. Iron out the bugs. Done | ||
eater: I sent you an invite to perl6 GitHub org, so you should be able to merge your PR yourself | |||
eater | Zoffix: thanks :D | ||
Zoffix | TreyHarris: yeah, and return those as Seq. And for those that are all-at-a-time, I'd coerce them to Seqs just to keep up the consistency with the return value. | 15:37 | |
Zoffix goes to do things | |||
\o | |||
15:37
Zoffix left
|
|||
TreyHarris | Zoffix++ | 15:37 | |
Er, now anyone lurking knows that I agree with Zoffix anyway :-) | 15:38 | ||
15:39
itaipu joined
|
|||
eater | :D | 15:40 | |
15:42
japh__ left
|
|||
iyra | can someone please tell me the most efficient way of using a regex to parse a line starting with : but not a line starting with \:? | 15:43 | |
ChoHag | /^:/ ? | 15:45 | |
sena_kun | m: ":haha".starts-with(':') | ||
camelia | ( no output ) | ||
sena_kun | m: say ":haha".starts-with(':') | ||
camelia | True | ||
sena_kun | m: say "\:haha".starts-with(':') | ||
camelia | True | ||
sena_kun | m: say "\\:haha".starts-with(':') | ||
camelia | False | ||
sena_kun | If this check is everything you want, of course. | 15:46 | |
iyra | thanks a lot, that helps! | ||
I just realised after I posted it that it's obvious :) | |||
sena_kun | iyra, yw | ||
and simple string methods are much, much faster than any regex-related work, afaik | 15:47 | ||
TreyHarris | sena_kun: in most cases. Not all. When ratcheting can be usefully applied to reject large swaths of work, the regex will be faster than the string operation unless you write extra stuff that does the equivalent of ratcheting. | 15:53 | |
but "starts-with" is definitely not such a case unless the string you pass to start-with is very long (and maybe not even then, lemme see how it's implemented...) | 15:54 | ||
sena_kun | TreyHarris, well, I guess you are right. I am not an expert in such questions, just a useless young folk who sometimes can do some easy-tiredsome work. :) | 15:55 | |
s/tiredsome/tiresome/ | 15:56 | ||
buggable, eco Tardis | 15:58 | ||
buggable | sena_kun, Nothing found | ||
sena_kun | eeeeeh. | ||
16:00
devmikey left
16:03
cowens left
16:08
azawawi left
16:09
Hor|zon left
|
|||
sena_kun | how that great and cool and useful channel with Zoffix's bots is called again? I need to assault buggable a bit. | 16:13 | |
ah, stop, nevermind. | |||
buggable, eco 007 | 16:15 | ||
buggable | sena_kun, 007 'Small experimental language with a license to macro': github.com/masak/007 | ||
sena_kun | well, it doesn't work in private for me, so the channel still will be greatly appreciated. | ||
MasterDuke_ | sena_kun: i think #zofbot | 16:19 | |
sena_kun | MasterDuke_, thanks a lot | ||
16:20
domidumont left
16:22
imcsk8 joined
16:24
astj joined
16:27
john51_ joined
16:30
Cabanossi left,
robertle joined
16:31
Cabanossi joined
|
|||
iyra | how can I sort a hash by key, using a custom sort function (lambda)? | 16:44 | |
sena_kun | .tell samcv I have much or less updated github.com/perl6/ecosystem/issues/318 - it was done automatically, so troubles may occur, but now we have some pattern to investigate further. And I believe that it is not, well, "our" issue, to be honest. There are some modules that has already working PRs with fixes, but authors just don't merge them. Some libraries are easily abandoned. We need some policy from our side about it, imho, | 16:48 | |
yoleaux | sena_kun: I'll pass your message to samcv. | ||
sena_kun | though I cannot come up with any just now. | ||
.tell samcv also, there are some false positives in your link, please, check it and consider removing of some entries(I've made appropriate comments there). | 16:49 | ||
yoleaux | sena_kun: I'll pass your message to samcv. | ||
sena_kun | s/link/links/ | ||
16:51
mcmillhj left
|
|||
sena_kun | let's call it a day. thanks for everyone's help today! \o | 16:52 | |
16:53
sena_kun joined,
Actualeyes left
|
|||
sena_kun | .tell samcv p.s. and I doubt that travis log's are needed. There are false positives("job exceed...", you know what I mean) and false negatives(the package is "green", but with a new rakudo it still fails). | 16:54 | |
yoleaux | sena_kun: I'll pass your message to samcv. | ||
16:54
sena_kun left
16:58
Cabanossi left
|
|||
TreyHarris | m: my %h = gather {for (1..20) { take $_ => 'f' }}; %h.sort({$^a.key <=> $^b.key}); | 17:01 | |
camelia | ( no output ) | ||
TreyHarris | m: my %h = gather {for (1..20) { take $_ => 'f' }}; %h.sort({$^a.key <=> $^b.key}); say %h.perl; | ||
camelia | {"1" => "f", "10" => "f", "11" => "f", "12" => "f", "13" => "f", "14" => "f", "15" => "f", "16" => "f", "17" => "f", "18" => "f", "19" => "f", "2" => "f", "20" => "f", "3" => "f", "4" => "f", "5" => "f", "6" => "f", "7" => "f", "8" => "f", "9" => "f"} | ||
17:01
Cabanossi joined
|
|||
TreyHarris | m: my %h = gather {for (1..20) { take $_ => 'f' }}; say %h.sort({$^a.key <=> $^b.key}); | 17:01 | |
camelia | (1 => f 2 => f 3 => f 4 => f 5 => f 6 => f 7 => f 8 => f 9 => f 10 => f 11 => f 12 => f 13 => f 14 => f 15 => f 16 => f 17 => f 18 => f 19 => f 20 => f) | ||
17:01
astj left
|
|||
TreyHarris | iyra: ^^ ignore the first | 17:01 | |
iyra | thanks a lot TreyHarris :) | 17:03 | |
TreyHarris | iyra: there may be a simpler P6ical way, but that's the Perl 5-ish way. If you wanted to sort by values, not keys, you shouldn't use that method though. See docs.perl6.org/type/Hash for examples of that. | 17:04 | |
iyra: and, unlike in Perl 5, if you're using a Hash merely for its keys, you should be using Bag, Set, BagHash or BagSet instead. | 17:05 | ||
MasterDuke_ | m: my %h = gather {for (1..20) { take $_ => 'f' }}; say %h.sort(*.key) | 17:07 | |
camelia | (1 => f 10 => f 11 => f 12 => f 13 => f 14 => f 15 => f 16 => f 17 => f 18 => f 19 => f 2 => f 20 => f 3 => f 4 => f 5 => f 6 => f 7 => f 8 => f 9 => f) | ||
MasterDuke_ | m: my %h = gather {for (1..20) { take $_ => 'f' }}; say %h.sort(+*.key) | ||
camelia | (1 => f 2 => f 3 => f 4 => f 5 => f 6 => f 7 => f 8 => f 9 => f 10 => f 11 => f 12 => f 13 => f 14 => f 15 => f 16 => f 17 => f 18 => f 19 => f 20 => f) | 17:08 | |
TreyHarris | MasterDuke_: I do not understand. Why does hyperwhatever cause a non-cmp sort? Or is something else happening? | 17:10 | |
MasterDuke_ | it defaults to string comparison | 17:11 | |
m: my %h = gather {for (1..20) { take $_ => 'f' }}; say %h.sort({$^a.key cmp $^b.key}); | |||
camelia | (1 => f 10 => f 11 => f 12 => f 13 => f 14 => f 15 => f 16 => f 17 => f 18 => f 19 => f 2 => f 20 => f 3 => f 4 => f 5 => f 6 => f 7 => f 8 => f 9 => f) | ||
jnthn | The assignment to %h stringifies the keys | 17:14 | |
So while sort may use cmp, which will happily sort integers, the keys are not integers any more by that point. | |||
m: my %h{Int} = gather {for (1..20) { take $_ => 'f' }}; say %h.sort(*.key) | 17:15 | ||
camelia | (1 => f 2 => f 3 => f 4 => f 5 => f 6 => f 7 => f 8 => f 9 => f 10 => f 11 => f 12 => f 13 => f 14 => f 15 => f 16 => f 17 => f 18 => f 19 => f 20 => f) | ||
MasterDuke_ | better explanation | 17:17 | |
TreyHarris | I understand that bit. But why does a string-keyed hash sort numerically when **.key is used? | ||
17:17
nadim joined
|
|||
TreyHarris | Oh! That's +*.key.... my eyesight.... gah | 17:18 | |
MasterDuke_ | +*, not ** | ||
17:18
mcmillhj joined
|
|||
jnthn | :) | 17:18 | |
TreyHarris | And I was embarrassingly about to try using bisectable6 to figure out when that started working b/c it doesn't work on my installation. | ||
TreyHarris sighs | 17:19 | ||
17:29
Cabanossi left
17:31
Cabanossi joined
17:32
wamba left
17:39
astj joined
17:43
iyra left
17:48
roguelazer joined
17:49
labster joined
17:53
ufobat_ joined
18:07
dct joined
18:12
astj left
18:22
shdb joined
18:23
iyra joined
18:24
dct left
18:37
domidumont joined
|
|||
timotimo | a little much to backlog today, so i'll skip some parts | 18:42 | |
El_Che | #perl6. The good parts | 18:47 | |
19:01
itaipu left
19:02
gdonald joined
|
|||
moritz just offers #perl6. The comprehensive guide. | 19:03 | ||
timotimo | what options do i have on an ios phone to offer a website and have it pretend to be an app? | 19:14 | |
19:15
nadim left
|
|||
timotimo | i've found the "add to home screen" button in safari, which is a start | 19:15 | |
El_Che | that's it | 19:16 | |
timotimo | m( | 19:17 | |
El_Che | there are certainly frameworks to turn a webpage into a "real" app, but you'll need to pay to get it into the closed garden | 19:18 | |
timotimo | my mom wants a super simple thing, and i'm def not going to shell out what 60 dollars or so for a developer's license and find a macbook to work with | ||
haha, i'll develop it for Nintendo DS and give her my old device :D | |||
El_Che | well, it depends if you love your mom or not :) | 19:19 | |
timotimo | don't question my love for my mommy | 19:20 | |
El_Che | true | 19:21 | |
timotimo | i'm going to do javascript for her sake | ||
El_Che | she can play mario as well | ||
so everyone wins! | |||
timotimo | arguably a fate worse than death | ||
XML is broken because it's using IO in a signature | 19:31 | ||
oh | 19:32 | ||
it wasn't XML | |||
19:32
dct joined
|
|||
timotimo | er, or it was XML and the function in question just wasn't tested in XML itself | 19:33 | |
what the heck | 19:34 | ||
iyra | can someone please help me understand what $x.Int returns if $x can't be converted to an integer, and how to check for it? | 19:38 | |
timotimo | m: say "hello".Int.perl | 19:39 | |
camelia | Failure.new(exception => X::Str::Numeric.new(source => "hello", pos => 0, reason => "base-10 number must begin with valid digits or '.'"), backtrace => Backtrace.new) | ||
timotimo | m: say ("hello" // -1) | 19:40 | |
camelia | hello | ||
timotimo | oops | ||
m: say ("hello".Int // -1) | |||
camelia | -1 | ||
timotimo | m: say ("hello".Int ~~ Nil) | ||
camelia | True | ||
timotimo | any of those ways will be fine, iyra | ||
iyra | thanks :) | 19:41 | |
TimToady | PSA: the File::Ignore module is working again (and maybe any other modules that were failing due to use of the <( )> construct) | ||
.tell sena_kun File::Ignore is working again | |||
yoleaux | TimToady: I'll pass your message to sena_kun. | ||
19:45
Cabanossi left
19:46
Cabanossi joined
|
|||
iyra | timotimo, what is a good way of checking if multiple variables can be converted to Int or not? I have 7 or 8 variables to check this way | 19:46 | |
[Coke] | should they be separate variables or in an array/ | 19:47 | |
iyra | i have them as separate variables | 19:48 | |
eater | theres not zef init :( | ||
AlexDaniel | m: say ("58", "25c", "60).any.Int ~~ Nil | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in double quotes; couldn't find final '"' at <tmp>:1 ------> 3say ("58", "25c", "60).any.Int ~~ Nil7⏏5<EOL> expecting any of: double quotes t… |
||
AlexDaniel | m: say ("58", "25c", "60").any.Int ~~ Nil | ||
camelia | True | ||
AlexDaniel | m: say ("58", "25", "60").any.Int ~~ Nil | ||
camelia | False | ||
[Coke] | m: my @a = 1.0,3/2,4/2,1.5,π; say @a.map{$_.narrow}.perl; | ||
iyra | thanks! | ||
camelia | Cannot resolve caller map(Array: ); none of these signatures match: ($: Hash \h, *%_) (\SELF: █; :$label, :$item, *%_) (HyperIterable:D $: █; :$label, *%_) in block <unit> at <tmp> line 1 |
||
AlexDaniel | iyra: maybe junctions again | 19:49 | |
iyra | junctions are one thing I think are most confusing about perl 6 for me, anyway | ||
[Coke] | m: my @a = 1.0,3/2,4/2,1.5,π; say @a.map({$_.narrow}).perl; | ||
camelia | (1, 1.5, 2, 1.5, 3.14159265358979e0).Seq | ||
[Coke] | there's a difference between .narrow and ~~ Int | ||
so, depending on which question you're trying to answer... | 19:50 | ||
m: my @a = 1.0,3/2,4/2,1.5,π; say @a.grep({$_.narrow ~~ Int}).perl; | |||
camelia | (1.0, 2.0).Seq | ||
iyra | testing converting to Int is what I care about, but I don't really care about the result | ||
AlexDaniel | junctions then \o/ | 19:51 | |
[Coke] | then you want that last one - is the .narrow'd result ~~ Int. | ||
iyra | thanks | ||
[Coke] | You probably don't want junctions. | ||
(unless you only care about one of the variables) | |||
(or all of them) | 19:52 | ||
19:53
domidumont left,
dct left
19:54
gdonald left,
gdonald joined
19:58
itaipu joined
|
|||
TreyHarris | m: my @a = 1.0,3/2,4/2,1.5,π,i,i*i; say @a.map({$_.narrow.WHAT}) | 20:05 | |
camelia | ((Int) (Rat) (Int) (Rat) (Num) (Complex) (Int)) | ||
TreyHarris | m: my @a = 1.0,3/2,4/2,1.5,π,i,i*i; say @a.map({($_.WHAT, $_.narrow.WHAT)}) | 20:08 | |
camelia | (((Rat) (Int)) ((Rat) (Rat)) ((Rat) (Int)) ((Rat) (Rat)) ((Num) (Num)) ((Complex) (Complex)) ((Complex) (Int))) | ||
20:08
skids left
20:13
astj joined
|
|||
iyra | AlexDaniel, it's strange, I can't get something like this to work: if (($year, $month, $day, $hour, $min, $sec).any.Int ~~ Nil) { ... } | 20:14 | |
I get error: "No such method 'Int' for invocant of type 'Any' | 20:15 | ||
" instead | |||
20:15
mcmillhj left
|
|||
AlexDaniel | iyra: one of your variables is Any | 20:15 | |
geekosaur | betting they were expecting undefined to be Nil instead of Any | 20:16 | |
20:17
astj left
20:21
devmikey joined
|
|||
iyra | yeah, thanks, some of my variables were undefined.. | 20:22 | |
20:23
itaipu left
|
|||
timotimo | phew, i was somehow working with an outdated version of exemel even though i was kind of certain i had gotten the newest one | 20:25 | |
crisis averted | |||
iyra | why can't I index hashes using strings? For example, if i have: my %langs = { 'en' => 'English', 'ja' => 'Japanese' }; then why doesn't %langs<"en"> return the value? Instead it return (Any) | 20:29 | |
ilbelkyr | you want %langs<en>, or %langs{"en"} | ||
iyra | I have to use %langs<en> but I don't know how to do that if I'm using a string variable to index (such as %langs<$my_language_code>) | ||
ah, okay, thanks | 20:30 | ||
I thought they were equivalent for some reason | |||
TreyHarris | m: my $foo = "hiya"; my %h; %h<$foo> = 3; say %h.perl | 20:31 | |
camelia | {"\$foo" => 3} | ||
TreyHarris | iyra: <...> indexing is for literals | ||
{} indexing for anything else | |||
geekosaur | <> is like single quotes, << >> is like double quotes, { } is any expression | 20:32 | |
iyra | interesting, thanks for the explanation | ||
geekosaur | or « » if you hate texas :p | ||
timotimo | you're unfortunately* not allowed to use any unicode quoting pair here :P | 20:33 | |
20:33
TEttinger joined
20:35
espadrine joined
|
|||
TreyHarris | m: my $foo = "hiya"; my %h; %h<$foo> = 3; %h<<$foo>> = 9; %h{$foo ~ "there"} = 2; say %h.perl | 20:36 | |
camelia | {"\$foo" => 3, :hiya(9), :hiyathere(2)} | ||
TreyHarris | m: my $foo = "hiya"; my %h<<$foo ~ "there">> = 7; say %h.perl | 20:38 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Shaped variable declarations not yet implemented. Sorry. at <tmp>:1 ------> 3y $foo = "hiya"; my %h<<$foo ~ "there">>7⏏5 = 7; say %h.perl |
||
TreyHarris | oops | ||
m: my $foo = "hiya"; my %h; %h<<$foo ~ "there">> = 7; say %h.perl | |||
camelia | {:hiya(7), :there(Any), "~" => Any} | ||
20:38
mcmillhj joined
|
|||
iyra | if $year is a string, is it valid to make $year into an Int (assuming it works) by doing $year = $year.Int? or will $year still by of type Str? | 20:39 | |
TreyHarris | the point is, the three aren't interchangeable except for <<$var>> and {$var}...anything more complicated than that is no longer equivalent | ||
geekosaur | m: my $y = '5'; $y .= Int; dd $y | 20:40 | |
camelia | Int $y = 5 | ||
iyra | thank you :D | ||
geekosaur | although if you declared it as my Str $year then it'd throw an error | 20:42 | |
iyra | TreyHarris, an example in the docs is: DateTime.new(:year<10000>, :month<2>).days-in-month; but I seem to be getting errors when I do something like: DateTime.new(:year<$year>, :month<$month>).days-in-month; even though I know $year and $month are integers | 20:45 | |
samcv | . | ||
yoleaux | 16:48Z <sena_kun> samcv: I have much or less updated github.com/perl6/ecosystem/issues/318 - it was done automatically, so troubles may occur, but now we have some pattern to investigate further. And I believe that it is not, well, "our" issue, to be honest. There are some modules that has already working PRs with fixes, but authors just don't merge them. Some libraries are easily abandoned. We need some policy from our side about it, | ||
iyra | I also tried with {} instead of <> with no luck | ||
yoleaux | imho, | ||
16:49Z <sena_kun> samcv: also, there are some false positives in your link, please, check it and consider removing of some entries(I've made appropriate comments there). | |||
samcv | . | ||
yoleaux | 16:54Z <sena_kun> samcv: p.s. and I doubt that travis log's are needed. There are false positives("job exceed...", you know what I mean) and false negatives(the package is "green", but with a new rakudo it still fails). | ||
samcv | .tell sena_kun thanks! | 20:46 | |
yoleaux | samcv: I'll pass your message to sena_kun. | ||
TimToady | TreyHarris: even those aren't interchangeable | 20:48 | |
m: my %h = :1a, :2b, :3c, 'a b c' => 42; my $var = "a b c"; say %h«$var»; say %h{$var} | |||
camelia | (1 2 3) 42 |
||
TreyHarris | iyra: that's because :year<2017> isn't a hash index, it's a pair literal. you write DateTime.new(year => $yearvar) | 20:49 | |
TimToady | m: my %h = :1a, :2b, :3c, 'a b c' => 42; my $var = "a b c"; say %h«'$var'»; say %h{$var} | ||
camelia | (Any) 42 |
||
TreyHarris | TimToady: yes...but I was worried that would confuse iyra even more. | ||
TimToady | m: my %h = :1a, :2b, :3c, 'a b c' => 42; my $var = "a b c"; say %h«"$var"»; say %h{$var} | ||
camelia | 42 42 |
||
TreyHarris | m: DateTime.new(year => "2001") | 20:52 | |
camelia | ( no output ) | ||
TreyHarris | m: say DateTime.new(year => "2001") | ||
camelia | 2001-01-01T00:00:00Z | ||
TreyHarris | iyra: and for the record, DateTime is cool so this works | ||
iyra | do other functions work in the same way with named arguments? or is it just datetime's new method? | 20:53 | |
TreyHarris | didn't the bot at one point print an evaluation of the last expression in sink context? | ||
iyra: see the documentation for Cool. | 20:54 | ||
iyra | thanks, I'll take a look | ||
TreyHarris | In Perl 5 you generally didn't need to worry about what was a number and what wasn't--except when you did. Cool is how Perl 6 does the same (in a way requiring less special-casing) | 20:55 | |
timotimo | and in perl6 looking at a variable can't make it flip what it thinks it is | 20:56 | |
TreyHarris | iyra: See NumStr if you absolutely must control this (but you almost certainly don't need to) | 20:57 | |
[Coke] | zoffix, do you still plan to make 'xtest' pass? | 20:58 | |
TreyHarris | m: my $x = "1999"; say ++$x; say $foo.WHAT | 21:02 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$foo' is not declared at <tmp>:1 ------> 3my $x = "1999"; say ++$x; say 7⏏5$foo.WHAT |
||
TreyHarris | ack | ||
m: my $x = "1999"; say ++$x; say $x.WHAT | |||
camelia | 2000 (Str) |
||
TreyHarris | That's slightly surprising to me | 21:03 | |
Ahh, all is explained in docs.perl6.org/routine/succ | 21:05 | ||
If I _wanted_ a strictly lexicographic succ to "1999", i.e., "199:", could I get it easily without stripping the string apart? | 21:07 | ||
21:07
iyra left,
iyra joined
21:09
mcmillhj left
|
|||
timotimo | don't know of a way to make that happen with any single method we have | 21:09 | |
TreyHarris | timotimo: it doesn't seem useful. i was just curious. Before Cool, like way back in pre-Synopsis days, initially the idea would have been that multi dispatch would have chosen to succ numerically because the string looks numeric, right, so you would have been able to force it by specifying which succ you wanted, but with succ as a method on Str that checks if it looks numeric, you can't? | 21:12 | |
timotimo | true | 21:14 | |
21:19
kent\n joined
21:20
emeric joined
21:22
nadim joined
21:23
itaipu joined
|
|||
robertle | what are people doing to determine test coverage? I found MVM_COVERAGE_LOG, but how di I convert the output to something more understandable? is there anything else? | 21:23 | |
timotimo | there's moarvm's tools/parse_coverage or whatever it's called | 21:25 | |
21:25
Zoffix joined
|
|||
timotimo | it's ... kinda rough still | 21:25 | |
Zoffix | robertle: there's a slightly dated blog post describing the procedure: perl6.party/post/Perl-6-Core-Hacki...Moar-Cover | ||
robertle: this is the updated version of the script mentioned in the blog post that I used to generate coverage for perl6.WTF gist.github.com/zoffixznet/09a7eb7...a2e0d3dfa3 | 21:26 | ||
robertle: and that's just for core stuff. More work needs to make it show coverage for any script | |||
robertle: I think to make it show coverage, it could work by just tweaking the coverage reporter script to look for lines from file? Like right now it looks for setting files: github.com/MoarVM/MoarVM/blob/mast...rt.p6#L128 | 21:27 | ||
21:28
itaipu left
|
|||
timotimo | well, it could just ignore #?file lines, right? | 21:29 | |
then you'd still have to run it once for each file of you rcode | |||
though what you could totally do is concatenate your code files and put the #?file lines in there manually, and also concatenate the moar --dump output for each file there | 21:30 | ||
that's what i mean by rough :D | |||
hm, did i write my more precise coverage stuff before or after the release ... | 21:31 | ||
Zoffix | timotimo: after | 21:32 | |
timotimo | um, i didn't even merge it to master yet! | 21:34 | |
that's a bad miss %) | |||
Zoffix | m: .[*-1]++, dd $_.».chr.join with '1999'.ords.Array | 21:35 | |
camelia | "199:" | ||
Zoffix | oh oh | ||
Zoffix rakes the toolbox for .substr-rw | |||
robertle | tools/parse_coverage_report.p6 looks promising, but I seem unable to run it correctly: gist.github.com/anonymous/5f33670d...e5fcfcb2d0 | 21:36 | |
what's the "annotations" argument meant to do? | |||
timotimo | it uses what moar --dump outputs to get a clear picture of what lines even have code in 'em | ||
so the percentage can actually reach 100% | |||
Zoffix | m: my $x = '1999'; $x.substr-rw($x.chars-1, 1) = $x.comb.tail.ord.&[+](1).chr; dd $x | ||
camelia | Str $x = "199:" | ||
Zoffix | hehe neat | ||
timotimo | can't you (*-1,1) for substr-rw? | 21:37 | |
Zoffix | Oh, probably | ||
timotimo | actually, isn't that also equivalent to (*-1)? | ||
Zoffix | m: my $x = '1999'; $x.substr-rw(*-1) = $x.comb.tail.ord.&[+](1).chr; dd $x | ||
camelia | Str $x = "199:" | ||
Zoffix | timotimo++ | ||
timotimo | because if you only have one arg it's "to the end of string" | ||
yay | |||
oh but wait there's more | |||
Zoffix | m: my $x = '1999'; $x.substr-rw(*-1) .= ord.=&[+](1).=chr; dd $x | 21:38 | |
camelia | Str $x = "199\x[6]7" | ||
Zoffix | heh | ||
timotimo | yes! | ||
wait, no :D | |||
m: my $a = "hello"; my $x = $a.substr-rw(2); $x .= uc; $x .= flip; say $a | 21:39 | ||
camelia | hello | ||
timotimo | m: my $a = "hello"; my $x := $a.substr-rw(2); $x .= uc; $x .= flip; say $a | ||
camelia | heOLL | ||
timotimo | m: my $a = "hello"; my $x := $a.substr-rw(2); $x .= uc.= flip; say $a | ||
camelia | heOLL | ||
timotimo | why doesn't it work properly in your case? | ||
Zoffix | m: my $x = '1999'; $_ = chr .ord + 1 with $x.substr-rw: *-1; dd $x | ||
camelia | Str $x = "199:" | ||
timotimo | that's the cleanest so far, nice! | 21:40 | |
but wait | |||
Zoffix | timotimo: it assigns the .ord to string and then continues with the 6 or whatever | ||
timotimo | let's try .ord.succ | ||
Zoffix | m: my $x = '1999'; $_ = .ord.succ.chr with $x.substr-rw: *-1; dd $x | ||
camelia | Str $x = "199:" | ||
robertle | so how do I create this annotations file for some perl6 code? this seems to work at a slightly lower level | ||
TreyHarris | geekosaur: I may have been netsplit because I can't find it in scrollback, but lucs tells me you answer my "$x .= not" question. Thanks | ||
timotimo | you'll have to perl6 --target=mbc --output=something.moar mycode.p6 | ||
then you can moar --dump something.moar | 21:41 | ||
robertle | which is confusing, the output produced by MVM_COVERAGE_LOG seems to reference lines in my code! why do I need the annotations? | ||
timotimo | they are kind of optional | ||
robertle | ok, will try | ||
timotimo | the coverage parser tool could run without | ||
it won't give proper percentages in that case, though | |||
Zoffix | robertle: I don't think you *need* them. You'll just get unreachable lines marked as uncovered | ||
timotimo | because it'll think every empty line or comment is not being covered by your tests | ||
but it seems like if you don't specify the annotation file it'll complain | 21:42 | ||
robertle: an empty file will work just fine btw | |||
Zoffix | It will just `note` a warning message without the annotations: github.com/MoarVM/MoarVM/blob/mast...rt.p6#L140 | ||
21:43
Zoffix left
|
|||
timotimo | robertle: could you change a line for me in the coverage tool? | 21:44 | |
robertle | timotimo: totally | 21:45 | |
timotimo | try putting Any:D in front of $ann where ... | ||
in line 125 | |||
robertle | better, now I can run it without the --annotations arg! thank! | 21:46 | |
timotimo | okay, i'll commit that to moarvm | ||
robertle | but no matter whether I do that or pass an empty file, it finishes now and says "Coverage report read: 76099 lines covered." | ||
nadim | Hi all, is there a way to dump a grammar? .perl gives it's name, s .gist say it is a grammar, and stringification ruturns Any. | ||
robertle | but the resulting coverage report is empty, somehow it must fail to match the lines in the coverage input to the source provided? | ||
another minor thig: if the "coverage" output directory does not exist, it is not created but the tool exits with a semi-helpful message | 21:47 | ||
the message is actually not that bad all things considered, but... | |||
timotimo | btw, you will want to pull master from moarvm now, it has a fix that makes the line coverage more precise | 21:48 | |
(it used to skip some lines) | |||
hah, it would only have accepted annotations from SETTING: anyway | |||
robertle | hah! I noticed that! I though it skips lines that can be inferred from the previous ones, where tehre is no possible branches... | ||
timotimo | okay can you put a line like this in the beginning of the source file you're trying to cover: | 21:49 | |
#line 1 SETTING:src/blah | |||
robertle | only for parse_coverage_report.p6 or do I need that when creating the coverage list itself? | 21:52 | |
timotimo | oh, every line from the annotations file and from the coverage report will be offset by one | ||
MasterDuke_ | nadim: what do you mean "dump a grammar"? a grammar is a class. or do you mean dump the results of parsing something with a grammar? | 21:53 | |
robertle | timotimo: still no data in the final coverage report | 21:54 | |
nadim | I wrote Data::Dump::Tree, it dumps Matches but it is the definition of the grammar itself I'd like to dump | ||
MasterDuke_ | what does D::D::T do for "regular" classes? | 21:56 | |
nadim | it dumps its guts | ||
jnthn | We don't keep the source code around to compile time, so there's no way to dump the source | 21:57 | |
Though I think for regexes we do keep it around as a special case | |||
Which is a bit of a dubious exception | |||
timotimo | robertle: one more try: | ||
nadim | anyway to gets to its components programmatically? | ||
timotimo | can you put the same kind of line in the end of your file? with a different mock-filename, please | ||
jnthn | Like what rules it has? | ||
Those are methods, so .^methods | 21:58 | ||
MasterDuke_ | jnthn: just `regex`s, or `rule`s and `token`s also? for keeping the source that is | ||
jnthn | MasterDuke_: I'm not sure | ||
timotimo | m: regex a { hello there }; say &a.perl; | ||
camelia | 5===SORRY!5=== Undeclared routine: a used at line 1 Other potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the sp… |
||
timotimo | m: regex a { hello there }; say a.perl; | ||
camelia | 5===SORRY!5=== Undeclared routine: a used at line 1 Other potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the sp… |
||
robertle | timotimo: sure! are you positive that it's a single colon after SETTING? I noticed other (core) entries in my coverage that have SETTING::... | ||
nadim | but ethods will not give the structure I guess | ||
jnthn | No | ||
that said | 21:59 | ||
timotimo | oh you're right, it has to be two : | ||
nadim | OK, I put that idea back in the freezer | ||
jnthn | You can do .file and .line on a method I think | ||
And then if the source file exists track it down | |||
timotimo | m: my regex blah { "hello there" }; say &blah.perl; | ||
camelia | regex blah { "hello there" } | ||
timotimo | ^- there it is | ||
m: say / foo .* bar /.perl | 22:00 | ||
camelia | / foo .* bar / | ||
timotimo | there as well | ||
MasterDuke_ | m: my rule blah { "hello there" }; say &blah.perl; | ||
camelia | rule blah { "hello there" } | ||
MasterDuke_ | m: my token blah { "hello there" }; say &blah.perl; | 22:01 | |
camelia | token blah { "hello there" } | ||
TreyHarris | and TimToady's '?= True' solution--but I think I'll take the 50% execution time hit for the clearer '.= not' solution. Though given that "$obj.truth .= not" is 12 times the execution that "$obj.truth = not $obj.truth" (!?!), maybe I'll just use the wordy one after all. | ||
er, '?^= True' that should have been | 22:02 | ||
22:02
dct joined
|
|||
samcv | does anyone know what caused gentoo to fail instlaling rakudo? | 22:02 | |
and if there is a fix? | |||
timotimo | no clue, do you have some output to look at? | 22:03 | |
TimToady | m: say '1999' ... '~~~~' # TreyHarris: but note this | ||
camelia | (1999 199: 199; 199< 199= 199> 199? 199@ 199A 199B 199C 199D 199E 199F 199G 199H 199I 199J 199K 199L 199M 199N 199O 199P 199Q 199R 199S 199T 199U 199V 199W 199X 199Y 199Z 199[ 199\ 199] 199^ 199_ 199` 199a 199b 199c 199d 199e 199f 199g 199h 199i 199j 199… | ||
nadim | timotimo: doesn't work with a Grammar, it says "Any" | ||
samcv | ./libmoar.so: undefined reference to `mp_set_long' | ||
timotimo | can you show a bit of example code, nadim? | ||
samcv | ebuild gitweb.gentoo.org/repo/gentoo.git/....03.ebuild | ||
tyil, is having issues | |||
TimToady | m: say '1999' ... '::::' | ||
camelia | (1999 199: 19:9 19:: 1:99 1:9: 1::9 1::: 2999 299: 29:9 29:: 2:99 2:9: 2::9 2::: 3999 399: 39:9 39:: 3:99 3:9: 3::9 3::: 4999 499: 49:9 49:: 4:99 4:9: 4::9 4::: 5999 599: 59:9 59:: 5:99 5:9: 5::9 5::: 6999 699: 69:9 69:: 6:99 6:9: 6::9 6::: 7999 799: 79:… | ||
samcv | and i remember someone else came in a week ago | ||
Geth | doc: 61e749f14c | (Zoffix Znet)++ | 5 files Fix white-space and nbsp xtests |
||
timotimo | m: grammar Test { rule A { hey }; rule B { yo } }; for Test.^methods -> $m { say $m.perl } | ||
camelia | rule A { hey } rule B { yo } method subparse (Grammar $: \target, :$rule, :$args, Mu :$actions, *%_) { #`(Method|33440992) ... } method parsefile (Grammar $: Cool $filename, :$enc, *%_) { #`(Method|33441144) ... } method parse (Grammar $: \target… |
||
tyil | samcv: it happens on .02 and .01 as well | 22:04 | |
timotimo | nadim: when you do it like this, it'll work | ||
jnthn | samcv: At a wild guess, is it using a packaged libtommath? | ||
tyil | same error, all on the moarvm package | ||
samcv | that's what i thought jnthn | ||
jnthn | What happens if we make it use the bundled one? | ||
samcv | is there any other ebuild though? | ||
i don't see any --use-* things in that ebuild | |||
TreyHarris | TimToady: because a range doesn't iterate over "succ"? | ||
timotimo | hm, does --backends=moar, work? | 22:05 | |
TimToady | not when the strings are the same length | ||
TreyHarris | ohh | ||
TimToady | m: say '000' ... '???' | ||
camelia | (000 001 002 003 004 005 006 007 008 009 00: 00; 00< 00= 00> 00? 010 011 012 013 014 015 016 017 018 019 01: 01; 01< 01= 01> 01? 020 021 022 023 024 025 026 027 028 029 02: 02; 02< 02= 02> 02? 030 031 032 033 034 035 036 037 038 039 03: 03; 03< 03= 03> 0… | ||
jnthn | samcv: I have no idea, I just have a hazy memory about that function not being in some older version of libtommath | ||
samcv | yep | ||
that is 100% accurate | |||
TimToady | so there's hex in a weird notation | ||
m: say '000' ... '777' | 22:06 | ||
camelia | (000 001 002 003 004 005 006 007 010 011 012 013 014 015 016 017 020 021 022 023 024 025 026 027 030 031 032 033 034 035 036 037 040 041 042 043 044 045 046 047 050 051 052 053 054 055 056 057 060 061 062 063 064 065 066 067 070 071 072 073 074 075 076 0… | ||
TimToady | but it's more for octal and such | ||
timotimo | Date: Wed Dec 10 18:59:31 2014 +0100 | ||
add mp_get_long_long() and mp_set_long_long() | |||
oh, no, wait | |||
Date: Sun Nov 13 19:17:46 2011 +0100 | 22:07 | ||
Add set_long and get_long functions | |||
that's really old | |||
what the heck is gentoo shipping? :) | |||
jnthn | samcv: gitweb.gentoo.org/repo/gentoo.git/...ebuild#n45 | ||
It's doing it in the MoarVM ebuild | |||
timotimo | yeah, bad idea. that'll also get you an expmod that can infinitely recurse (or iterate?) | 22:08 | |
samcv | version 1.0? | ||
idk packages.gentoo.org/packages/dev-l...libtommath | |||
looking. | |||
TreyHarris | Why do the .= not and ?^= True solutions take so much longer than the fully-written-out one? Because simple assignment doesn't have lots of dispatching possibilities? | ||
timotimo | +SRC_URI="github.com/libtom/libtommath/relea...V}.tar.xz" | ||
so that must be a 1.0 tarball then? | 22:09 | ||
but v1.0 is from 2016 .. ?! | |||
-- Moritz Lenz contributed a fix to mp_mod() | |||
tyil | 1.0 seems the latest available in ports | ||
timotimo | and provided mp_get_long() and mp_set_long() | ||
i know that guy! | |||
tyil | but 0.4 is marked as the latest stable | ||
robertle | timotimo: got it! it's a bit fickle, but that does work! | ||
timotimo | oh, look | ||
tyil | 0.42 * | ||
timotimo | yeah, 0.42 is from 2010 | 22:10 | |
tyil | Im compiling 1.0 rn | ||
nadim | m: grammar XXX { token TOP { abc } } ; say &XXX.perl ; | ||
tyil | see if that helps | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Illegally post-declared type: XXX used at line 1 |
||
22:10
dct left
|
|||
timotimo | robertle: yeah, we'll rework the tool so it can be used for usercode | 22:10 | |
the reason why it requires SETTING::src/ is because i didn't want the reports to show what lines in the test suite were covered | |||
samcv | who is in an admin on the perl6 group? we need to enable travis for travis-ci.org/perl6/ecosystem | ||
timotimo | it is done | 22:11 | |
samcv | \o/ | ||
tyil | moar builds with libtommath 1.0 | ||
lets see if nqp and rakudo itself also work now | |||
timotimo | tyil: cool, we should tell the maintainer of the ebuild to require that version | ||
nadim | m: grammar MY::GR { token TOP { abc } } ; say &MY::GR.perl ; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Cannot use pseudo package MY in package name at <tmp>:1 ------> 3grammar MY::GR7⏏5 { token TOP { abc } } ; say &MY::GR.per expecting any of: generic role |
||
timotimo | nadim: no, you don't get methods like that | 22:12 | |
tyil | timotimo: I'll send out a mail to him | ||
timotimo | also, GR doesn't have a & sigil | ||
m: grammar My::Gr { token TOP { abc } }; say My::Gr.perl | |||
camelia | My::Gr | ||
timotimo | m: grammar My::Gr { token TOP { abc } }; say My::Gr.^methods.grep(*.name eq "TOP").perl | ||
camelia | (token TOP { abc },).Seq | ||
timotimo | TYVM, TYIL | 22:13 | |
TreyHarris | TimToady: my recollection of how you originally envisioned numeric/str polymorphism was correct, right? Multi dispatch via value dispatch that would make a looks-like-number string closer to the numeric multi than the string multi? | ||
nadim | right, it's a class with methods | ||
timotimo | but the error you were getting was because you're not allowed to use MY like that | ||
nadim | which means we can't dump anything that makes sense | ||
timotimo | has to be My or my or MEH | ||
nadim | timotimo: I didn't even know MY was special :) | 22:14 | |
timotimo | it's a pseudopackage that has your lexical variables in it | ||
22:14
dct joined
|
|||
nadim | timotimo++ | 22:14 | |
timotimo | m: my $test; sub inner { my $innertest; say MY::.keys }; inner() | ||
camelia | ($_ $/ $innertest $*DISPATCHER $! $¢) | ||
timotimo | MY only has the one that are defined in the current lexical scope | 22:15 | |
tyil | timotimo: sent, lets see how quickly it updates :> | 22:16 | |
timotimo | \o/ | ||
samcv | tyil, link? | 22:17 | |
tyil | samcv: its an email | ||
samcv | also would be good if it didn't --use-libffi as well. since that backend is less well tested | ||
ok. fw me | |||
tyil | its already sent | ||
:'D | |||
samcv | that's why it's called a forward | ||
:) | |||
tyil | are you implying I keep records of sent mail? | 22:18 | |
samcv | yes | ||
tyil | you are correct | ||
nadim | jnthn: I send a pull request for Grammar::Tracer some times ago, there's another pull request there btw, I think I'll just create another module. I was thinking about having it under Grammar::Tracer::something namespace, is that ok for you? | ||
TreyHarris | TimToady: I ask just because I wondered if the ultimate (/current) solution has any functional disadvantages you miss, despite its advantages | ||
tyil | samcv: [email@hidden.address] right? | ||
jnthn | nadim: I think you wanted to take the output format in a direction I disagreed with, so that's probably best. | ||
samcv | oh btw everyone i'm running another full module build hack.p6c.org/~samcv/install_log_live2.txt right now | ||
no | 22:19 | ||
[email@hidden.address] | |||
tyil | >ham | ||
nice | |||
nadim | jnthn: it's just a different output format, I prefer mine because it is much more compact, it's just a question of taste, functionally it is the same | ||
tyil | samcv: sent | 22:20 | |
jnthn | nadim: Maybe we could make it an option? | ||
timotimo | nadim: is there an example where i can see that output format in action? | ||
nadim | sure, 1mn to post a screenshot | ||
jnthn | use Grammar::Tracer (format => 'foo') or something | ||
22:22
bjz joined
|
|||
tyil | samcv: if I make any module, I'll be sure to use "perl" as the license name | 22:23 | |
samcv | XD | ||
22:23
wamba joined
|
|||
TreyHarris | samcv: I just created a new package with mi6--it creates an Artistic License 2.0 by default but doesn't give any license info in the metadata. | 22:24 | |
samcv | thanks for the heads up TreyHarris | 22:25 | |
Geth | doc: 06cb6c9a93 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6 Fix for space-after-comma xtest |
||
doc: 144f0be23e | (Zoffix Znet)++ | 2 files Fix typo in xtest filename |
|||
TreyHarris | samcv: your massive PR was scanning for LICENSE files when there was no metadata though, wasn't it? | 22:26 | |
samcv | no. not *no* metadata. just wrong or nonstandard naming | ||
nadim | timotimo: imgur.com/3SnOKm9 that's the grammar that was in one of the advent calender entries | ||
samcv | will have to do ones for no metadata as well though | ||
TreyHarris | samcv: ahh. in this case then you'd not have fixed it then. it creates a LICENSE file with Artistic 2 filled out | 22:27 | |
samcv | but for now i'm correcting ones from like "perl" >> "Artistic-2.0" or "The Artistic License 2.0" >> "Artistic-2.0" or | ||
timotimo | nadim: not a bad look | ||
samcv | a url to the license and replace it with the license identifier | ||
nadim | I am actually thinking about outputing it via Data::Dump::Tree to get some filtering and highlighting options but I am afraid the buffering will make it slow for large ASTs | ||
timotimo: if the string get capped it lookes even better | 22:28 | ||
timotimo | right, with backtracking and such it might very well give a few thousand lines of output easily | ||
samcv | TreyHarris, next step would be applying the script i have to ones with *no* license field, and checking the license file in the project etc | ||
TreyHarris nods. | |||
samcv | the PR i sent out, took the field in the metadata, and corrected it. and if the metadata was not precise "artistic" or "perl" would check the license file and ensure there was only one license/licence/copying file and also check the text matched | ||
Geth | doc: 9efb25fda1 | (Zoffix Znet)++ | doc/Language/io-guide.pod6 Reword |
22:29 | |
nadim | timotimo: I am trying to optimize Date::Dump::Tree but my last effort made little to no difference, althought in my example I reduced the number of total call with 3-4% | ||
eater | how does NativeCall work with an Enum as argument? | ||
TreyHarris | I think the other thing I've seen--certainly on CPAN--is no license file but a LICENSE section of POD (usually only used for "Module::Name is made available under the same licensing terms as Perl itself.") | ||
samcv | eater, you need to make an enum. you should try gpxtrixie | ||
gptrixie* | 22:30 | ||
nadim | timotimo: it's worth a shot, I'll create a few classes for the tracer, I could also add some statistics about what matched and what didn't and how many times in the dump | 22:31 | |
jnthn: if you want it as an option, you have the pull request already, although it may need to be rebased | 22:32 | ||
22:33
cpage_ joined
|
|||
timotimo | nadim: i wonder if it'd be interesting to have a view at the target string showing little flags where different regexes were trying to parse | 22:34 | |
robertle | timotimo: one last quetion: how do I get parse_coverage_report to look at multiple source? or merge the results? | ||
TreyHarris | Oh, dear... a user (not a bot I don't think, the wording varies) is responding to every single mesage sent by anyone on Twitter asking @United for customer service pointing them at my story with a different disability-rights hashtag every time. This is troubling since I didn't authorize it. (If it's any of you, don't tell me, it's probably best I don't know, but please stop it, it isn't helping.) | 22:36 | |
!!! | |||
...and that was the wrong channel, I'm SO sorry | |||
timotimo | yeah, it's hard when people on twitter just go ahead and do whatever while referencing you | 22:37 | |
there's a person talking about perl6 and NSA and xkeyscore and i'm like "okay, but ... what?" | |||
TreyHarris | timotimo: :-P | 22:38 | |
TreyHarris hides under a big Perl-shaped rock. | |||
timotimo | camelia lets you hide under her wings | ||
(two meters wingspan, after all!) | |||
sorry, it's three meters | 22:39 | ||
nadim | timotimo: it certainly would be nice, Damian had a regex debugger that I like, may be something like that would be nice, do you know which one I mean? | ||
timotimo | en.wikipedia.org/wiki/Homona_coffearia - um, why didn't i know before that a camellia exists that is actually a moth? | ||
nadim: no clue. for reference, i do zero perl5 at all | |||
gfldex | is &slurp lazy? | ||
timotimo | nope | 22:40 | |
we don't have lazy strings yet | |||
22:40
iyra left
22:41
r3m joined
|
|||
gfldex | m: my @fs = <file1.ext file2.ext file3.ext>; dd [//] try (@fs».IO».slurp); | 22:41 | |
camelia | Failure.new(exception => X::AdHoc.new(payload => "Failed to open file /home/camelia/file3.ext: no such file or directory"), backtrace => Backtrace.new) | ||
TreyHarris | would bare slurp be lazy even if we did? I'd think that would be an option or a different method | ||
gfldex | does [//] shurt circuit? | 22:42 | |
timotimo | even if it does, it can't properly thunk the list you're writing, so any code you write after the [//] will be evaluated to create the list [//] will operate on (is my assumption) | ||
22:43
iyra joined
|
|||
iyra | I hope I'm not being too much of a bother, can anyone help me understand why this is returning False? "TITLE: a" ~~ m/^':'(\w+)' '(.+)$/ | 22:44 | |
timotimo | because there's no ':' at the beginning of a line | ||
iyra | ah crap, you're right, thanks.. | ||
timotimo | :) | ||
nadim | timotimo: for reference search.cpan.org/~dconway/Regexp-Deb...ebugger.pm | ||
22:45
robertle left
|
|||
timotimo | heatmapped visualization log! | 22:45 | |
nadim: is there a screenshot or screencast you can recommend? | 22:46 | ||
22:46
cpage_ left
22:47
Garland joined
|
|||
gfldex | m: my @fs = <file1.ext file2.ext file3.ext>; my $s = slurp([//] try (@fs».IO».open)); | 22:47 | |
camelia | Failed to open file /home/camelia/file3.ext: no such file or directory in block <unit> at <tmp> line 1 Actually thrown at: in block <unit> at <tmp> line 1 |
||
timotimo | searching google for rxrx screencast gives me a bunch of random semi-screencast-related videos | ||
gfldex | that's likely more sensible | ||
22:47
cpage_ joined
|
|||
gfldex | m: my @fs = «$*HOME/.gitconfig $*HOME/.config/git/config»; my $s = slurp([//] try (@fs».IO».open)); | 22:49 | |
camelia | Failed to open file /.config/git/config: no such file or directory in block <unit> at <tmp> line 1 Actually thrown at: in block <unit> at <tmp> line 1 |
||
gfldex | that's what I actually want to do | ||
m: say $*HOME | 22:50 | ||
camelia | "/home/camelia".IO | ||
gfldex | m: my @fs = «$*HOME/.gitconfig $*HOME/.config/git/config»; dd @fs; my $s = slurp([//] try (@fs».IO».open)); | ||
camelia | Array @fs = ["/home/camelia", "/.gitconfig", "/home/camelia", "/.config/git/config"] Failed to open file /.config/git/config: no such file or directory in block <unit> at <tmp> line 1 Actually thrown at: in block <unit> at <tmp> line 1 |
||
timotimo | why is camelia allowing you to try to open stuff at all? | 22:51 | |
it should be prevented by the restricted setting | |||
m: open("hello") | |||
camelia | open is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in sub open at src/RESTRICTED.setting line 9 in block <unit> at <tmp> line 1 |
||
gfldex | m: my @fs = $*HOME «~« </.gitconfig /.config/git/config>; my $s = slurp([//] try (@fs».IO».open)); | ||
camelia | Cannot resolve caller slurp(IO::Handle); none of these signatures match: (IO::ArgFiles:D $io = { ... }, :$bin, :$enc = "utf8", |c is raw) (Cool:D $path, :$bin = Bool::False, :$enc = "utf8", |c is raw) in block <unit> at <tmp> line 1 |
||
timotimo | m: slurp("hello") | ||
camelia | Failed to open file /home/camelia/hello: no such file or directory in block <unit> at <tmp> line 1 Actually thrown at: in block <unit> at <tmp> line 1 |
||
timotimo | yeah, no, it should definitely restrict that | 22:52 | |
huh, slurp was never in there in the first place? is this fine? | |||
TreyHarris | m: say glob('*') | 22:53 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: glob used at line 1 |
||
timotimo | it's "dir" | 22:54 | |
TreyHarris | say dir | ||
m: say dir | |||
camelia | (".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".bash_history".IO ".bashrc".IO "mbox".IO ".lesshst".IO "evalbot.log".IO ".cpan".IO "dale… | ||
TreyHarris | m: slurp(".cpanm") | 22:55 | |
camelia | '.cpanm' is a directory, cannot do '.open' on a directory in block <unit> at <tmp> line 1 Actually thrown at: in block <unit> at <tmp> line 1 |
||
22:55
cpage_ left
|
|||
TreyHarris | m: slurp(".bashrc") and say "yes" | 22:56 | |
camelia | yes | ||
TreyHarris | m: slurp("nosuch") and say "yes" | ||
camelia | Failed to open file /home/camelia/nosuch: no such file or directory in block <unit> at <tmp> line 1 Actually thrown at: in block <unit> at <tmp> line 1 |
||
TreyHarris | yeah, it's broken, Jim. try reversing the polarity. | ||
geekosaur | a tually I answered it in a different context | 22:57 | |
[21 20:40:00] <geekosaur> m: my $y = '5'; $y .= Int; dd $y an answer to [21 20:39:33] <iyra> if $year is a string, is it valid to make $year into an Int (assuming it works) by doing $year = $year.Int? or will $year still by of type Str? | 22:58 | ||
TreyHarris | geekosaur: answered what? why .= not is so much slower than "$obj.truth = not $obj.truth"? if so I don't see the through-line connecting the two | 23:00 | |
geekosaur | oh. I didn't even touch that one, so I have no idea what lucs meant | 23:01 | |
just got back from the store and noticed the highlight | |||
and that's the only thong I said that was in anyway relevant | |||
*thing | |||
gfldex | there seams to be no candidate for &slurp(IO::Handle:D) | ||
timotimo | wonder if there should be; how are the other subs? do we have &lines(IO::Handle:D) for example? | 23:02 | |
23:03
ChoHag joined
|
|||
gfldex | lines defaults to $*ARGFILES | 23:03 | |
timotimo | oh, does lines take any arguments ever? | 23:04 | |
23:04
Cabanossi left
|
|||
gfldex | and forwards to *.lines, so lines(IO::Handle:D) should work | 23:04 | |
23:04
BenGoldberg joined
|
|||
timotimo | argfiles is going to get a little overhaul anyway. do we have a slurp for argfiles? | 23:05 | |
gfldex | in fact &slurp seams to be the only IO sub that is so strict | ||
anyway, good * | 23:06 | ||
23:06
Cabanossi joined
|
|||
gfldex self.sleep() | 23:06 | ||
23:07
dct left
|
|||
timotimo | gnite gfldex! | 23:08 | |
Geth | doc: bb972365ea | (Zoffix Znet)++ | 15 files Fix spelling xtest Used `sort` on words files, so the diff shows some of the results of sorting along with new words added. |
23:11 | |
Garland | I've been getting an internal error that requests a report to rakudobug, but I can't make it happen consistently. I tried re-running it with -ll-exception like it said to, but I don't get an error at all. | 23:20 | |
<Internal error while creating backtrace: Cannot set attribute values when cloning a type object in method throw at SETTING::src/core/Exception.pm line 63 | 23:21 | ||
timotimo | huh, interesting | 23:22 | |
Garland | If I change this line at all, the error also disappears: | 23:23 | |
for @!subscribers.race( batch => 1 ) -> $sub { | |||
AlexDaniel | ah-ha, .race! | 23:24 | |
timotimo | oh | ||
yeah, race is kinda broken at the moment | |||
as is .hyper | |||
at least i think so? | |||
Garland | hyper doesn't have the issue | ||
AlexDaniel | I think jnthn was working on it | ||
timotimo | last time i tried (months ago) it tended to just give empty lists for no reason | ||
Garland | or at least, it didn't set off the long internal error | 23:25 | |
TreyHarris | Anyone know of a good test suite to look at that mocks native calls? | ||
AlexDaniel | (e.g. 6guts.wordpress.com/2017/03/16/con...semantics/ ) | ||
Garland | Even removing a space makes the error disappear eg: for @!subscribers.race( batch => 1) -> $sub { | ||
where the space after the 1 is removed. | 23:26 | ||
AlexDaniel | .tell jnthn fwiw irclog.perlgeek.de/perl6/2017-04-21#i_14466196 | 23:27 | |
yoleaux | AlexDaniel: I'll pass your message to jnthn. | ||
nadim | timotimo: www.youtube.com/watch?v=zcSFIUiMgA...ature=plcp | 23:29 | |
timotimo: and I had a few ideas about how to make it slightly better rt.cpan.org/Public/Dist/Display.ht...p-Debugger | 23:31 | ||
Garland | Here's a link to the full error chain as well: www.dropbox.com/s/fexjtd1lswfu4y8/...perl6?dl=0 | 23:32 | |
For whoever needs it | |||
23:33
Garland left
23:40
skids joined
|
|||
timotimo | i think i'm going to bed real soon now | 23:41 | |
have a good one! | |||
23:45
TimToady joined,
wamba left
23:53
nadim left
23:55
bjz left
|
|||
iyra | what's the usual way to check if a hash already exists in a list of hashes? | 23:59 |