»ö« 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 Zoffix on 25 May 2018. |
|||
Geth | p6-sake: AlexDaniel self-assigned Running `sake` without arguments should run task `default` github.com/perl6/p6-sake/issues/15 AlexDaniel self-assigned Dependency tree visualization with graphviz github.com/perl6/p6-sake/issues/14 Rename internal make_task to make-task |
00:00 | |
raschipi | Perl 6 can convert one into the other anyway. | ||
tobs | ToddAndMargo: I can relate, but after some time of using perl, my usage of "unless" in conversational English went up (from zero), too. | 00:02 | |
00:03
kurahaupo joined
|
|||
ToddAndMargo | I usually hear "unless" in English as some part of an equivocation, so if I use "not" it is very direct | 00:03 | |
BUt as with all things Perl, there is always 1001 ways to do anything! | 00:04 | ||
I thought I understood how to find how many arguments where on the command line. `if @*ARGS.elems > 0 ` throws "Dynamic variable @*ARGV not found" | 00:06 | ||
docs.perl6.org/routine/args | 00:07 | ||
jnthn | Looks like you typed @*ARGV instead of @*ARGS | ||
ToddAndMargo | mumble, mumble, mumble | 00:08 | |
What is wrong with this one: `&::($RunSpecific)();` No such symbol '' | 00:11 | ||
I don't see me using any single quotes | |||
geekosaur | it's an empty string, with the single quotes part of the error message to set off the symbol it's looking for? | 00:13 | |
ToddAndMargo | I just found my typo. I am testing | 00:14 | |
geekosaur | hm, actually it says that for any not found symbol, so that may be showing a bug | 00:15 | |
m: my $RunSpecific = 'glup'; say &::($RunSpecific)(); | |||
camelia | No such symbol '' in block <unit> at <tmp> line 1 |
||
geekosaur | m: sub glup { 1 }; my $RunSpecific = 'glup'; say &::($RunSpecific)(); | ||
camelia | 1 | ||
ToddAndMargo | `::($RunSpecific)();` is the correct syntax. | 00:17 | |
geekosaur rakudobugged the bad error message | 00:18 | ||
ToddAndMargo | I am trying to side step EVAL and run the name of a sub I pick up from the command line. | ||
`::("$RunSpecific")();` throws "No such symbol 'GetAWSCleaner'" (Get "GetAWSCleaner" was copied and pasted from the sub's name.) | 00:20 | ||
raschipi | You could declare MAIN subs and have literal strings as the first argument, and calling './program subcommand' would call one of those for you. | 00:21 | |
00:22
Khisanth left
|
|||
ToddAndMargo | &::($RunSpecific)(); Throws No such symbol '' | 00:22 | |
00:22
Actualeyes joined
|
|||
geekosaur | yeh, that's what I reported | 00:22 | |
that's not you doing it wrong (they should do about the same thing, same as you don;t need to precede sub names with & normally), that's the error message being wrong | 00:23 | ||
00:23
thundergnat left
|
|||
ToddAndMargo | This is what I am trying to convert from Perl 5: `else { eval "$RunSpecific"; }` And get around the See No Monkey's pragma. Any workarounds | 00:24 | |
geekosaur | m: sub glup { 1 }; my $RunSpecific = '&glup'; say ::($RunSpecific)(); | 00:25 | |
camelia | 1 | ||
ToddAndMargo | `::('&' ~ $RunSpecific)();` No such symbol '&GetAWSCleaner' I can't win. Sniffle! | 00:26 | |
raschipi | Maybe it's telling you the truth, there's no &GetAWSCleaner. Where is it being defined? | 00:27 | |
ToddAndMargo | I could have typo'ed it. Ahhh poop (not my exact word. I transposed two letters! | 00:28 | |
Thank you! | 00:29 | ||
Converting from P5, when "index" can't find something, it return "-1". In p6 is it always a "nil"? | 00:32 | ||
raschipi | Yes | 00:34 | |
timotimo | "with" and "index" is a good combo | 00:35 | |
ToddAndMargo | Thank you! Me got a bunch of corrections to make! | ||
timotimo | with index $bloop, $bleep -> $found-position { say "found $bleep in $bloop at $found-position" } else { say "didn't find it" } | ||
ToddAndMargo | This is what I am converting `if ( index $Rev, "rc" ) > -1 {` and since I only want to know if "rc" is in the line, me thinks it would be more p6-ish just to ` if m/rc/` instead. Your thoughts? | 00:37 | |
timotimo | i prefer .contains | ||
ToddAndMargo | oops `if $Rev ~~ /rc/` | 00:38 | |
timotimo | if $Rev.contains("rc") { } | ||
ToddAndMargo | even easier! Thank you! | ||
p6-sake: 4972a25408 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Sake.pm6 Rework `file` sub to allow body to accept a Task This was an oops in 8102fcb173dd7e67b91d38609ec0a78f49e745ad. |
|||
00:40
HaraldJoerg left
00:49
Khisanth joined
00:58
hythm_ joined
|
|||
hythm_ | p6: my $ge = ">="; 6 $ge 7 # how can I use $ge here so the statement becomes "6 >= 7" | 01:02 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3my $ge = ">="; 67⏏5 $ge 7 # how can I use $ge here so th expecting any of: infix infix stopper statement end … |
||
raschipi | hythm_: Can't. | 01:04 | |
[Coke] | well, EVAL | 01:05 | |
hythm_ | I tried EVAL, got two terms ina row error | ||
timotimo | m: my $ge = &[>=]; say $ge(6, 7) | 01:06 | |
camelia | False | ||
MasterDuke | m: my $ge = ">="; say "6 $ge 7".EVAL | ||
camelia | False | ||
lookatme | what is the &[] mean ? | 01:10 | |
m: say &[==]; | |||
camelia | sub infix:<==> ($?, $?, *%) { #`(Sub+{is-pure}+{Precedence}|38542992) ... } | ||
lookatme | m: say &[|]; | ||
camelia | sub infix:<|> (|) { #`(Sub+{is-pure}+{Precedence}|50844144) ... } | ||
lookatme | m: say &[.]; | 01:11 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call at <tmp>:1 ------> 3say &[.7⏏5]; |
||
timotimo | one way to name an infix operator | ||
lookatme | m: say &[!]; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Negation metaoperator not followed by valid infix at <tmp>:1 ------> 3say &[!7⏏5]; expecting any of: argument list infix infix noun infix stopper… |
||
lookatme | oh | ||
01:13
sno joined
|
|||
hythm_ | I dont think EVAL would help in this case, I created a snippet to help explain what I want to do better: (the issue is in the last multi sub) | 01:17 | |
gist.github.com/hythm7/74a5290d574...708a27d989 | |||
timotimo | would it be okay to have my $condition = * => *; instead? | 01:18 | |
01:19
sno left
|
|||
timotimo | m: my $condition = ">=; say &infix:["$condition"](5, 6); | 01:19 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Cannot use variable $condition in declaration to initialize itself at <tmp>:1 ------> 3my $condition = ">=; say &infix:["$7⏏5condition"](5, 6); expecting any of: double quotes… |
||
timotimo | m: my $condition = ">="; say &infix:["$condition"](5, 6); | ||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in code at <tmp> line 1 5===SORRY!5=== Error while compiling <tmp> Undeclared routine:… |
||
timotimo | ah, of course, that'd have to be begin time | ||
hythm_ | I dont understand * => * looks like a place holder to $condition args, but yeah that would be ok | 01:24 | |
timotimo | * >= * is equivalent to -> $a, $b { $a >= $b } | 01:25 | |
i.e. it's a piece of code | |||
hythm_ | noted | ||
timotimo | we call those "WhateverCode" or refer to it as "whatever currying" | ||
whatevercode can be more than just a single operator, and can be between one and as many placeholders as you want | 01:26 | ||
so * >= 5 is also a valid WhateverCode | |||
01:30
rindolf left
|
|||
hythm_ | makes sense, Thanks for clarification, I tried a few things with $condition set to * => * but still did not work for me (getting same two terms in a row error), will try more | 01:32 | |
timotimo | you need to use $condition as if it were a sub | 01:33 | |
i.e. $condition($one, $other) | |||
hythm_ | hmm | ||
timotimo | also, i think for versions you might want "before" and "after"? | ||
hm, though there's no "before or equal" word i don't think | 01:34 | ||
maybe >= is fine | |||
hythm_ | ok, will try that. I appreciate the suggestions and help, thank you | 01:36 | |
timotimo | you're welcome | 01:37 | |
02:04
Grrrr joined
02:06
Kaiepi left,
hythm_ left
|
|||
tbrowder_ | in p5 i can have a hash element like “key => \$val” but how do i do that in p6? my goal is to deref the val upon key lookup to see the current value of $val. | 02:11 | |
raschipi | You want to bind the value instead of asigning it, is that it? | 02:14 | |
geekosaur | bind the container, sounds like | ||
raschipi | Yeah, the container. | 02:15 | |
lookatme | m: my %foo; %foo{1} = %{1 => 2, 3 => 4}; %foo{2} := %{5 => 6, 7 => 8}; dd %foo; | 02:20 | |
camelia | Hash %foo = {"1" => ${"1" => 2, "3" => 4}, "2" => {"5" => 6, "7" => 8}} | ||
lookatme | not much difference, seems like | ||
02:21
kurahaupo_ joined
|
|||
geekosaur | I think you bind individual elements, rather than assigning Pairs? | 02:22 | |
02:23
kurahaupo left
|
|||
geekosaur | m: my %h; my $x = 1; %h<a> = 5; %h<b> := $x; dd %h; $x = 2; dd %h | 02:23 | |
camelia | Hash %h = {:a(5), :b(1)} Hash %h = {:a(5), :b(2)} |
||
02:31
Kaiepi joined
02:37
MilkmanDan left
02:39
MilkmanDan joined
|
|||
ToddAndMargo | How do I do an array consisting of two elements per index? p6 'my @x; push @x= ["a", "1"]; push @x= ["b", "2"]; say @x;' [b 2] | 02:45 | |
joya | array of arrays | 02:46 | |
in that code you gave, only the assignment is meaningful | 02:48 | ||
think of it as: @x = ["a", "1"]; push @x | |||
the push part is not doing anything | |||
i think what you want is more like, @x.push( ["a", "1"] ) | 02:49 | ||
then @x.push( [ "b", "2" ] ) | |||
ToddAndMargo | checking | 02:50 | |
joya | the square brackets are the internal arrays -- each one is an element of the array @x | ||
also abbreviated as @x.push: ["a", "1"] | 02:51 | ||
02:52
tuoneta joined
|
|||
ToddAndMargo | Thank you. And I do know better. Getting a bit tired. $ p6 'my @x; push @x, ["a", "1"]; push @x,["b", "2"]; say @x;' [[a 1] [b 2]] | 02:52 | |
joya | 👍 | 02:53 | |
02:55
tuoneta left
03:02
sno joined
03:12
arp34 joined
03:13
sno left
03:16
ToddAndMargo left
03:29
wamba joined
03:35
raschipi left
|
|||
benjikun | tyil: Sorry about LoneStar not being included, didn't know this was a thing | 03:42 | |
It's a little late to add an option, I'd say, but we'll definitely throw it in on the next survey | |||
03:56
turdmonkey joined
|
|||
turdmonkey | Hello. | 03:58 | |
04:04
arp34 left
|
|||
benjikun | turdmonkey: Howdy | 04:06 | |
turdmonkey | Does anyone find think it's funny how you can read Perl 6 almost exactly like English? | 04:08 | |
04:15
lizmat joined
|
|||
benjikun | turdmonkey: I like it when that's possible | 04:18 | |
it's surely not always with Perl6, but the option is there | |||
turdmonkey | Well yes, not always | ||
04:18
sno joined
|
|||
benjikun | I know what you mean, though | 04:19 | |
turdmonkey | Try reading all of those sigils and funny operators out loud haha | ||
<<+>> | |||
04:23
MasterDuke left
|
|||
benjikun | This is perhaps a stupid question, and is obvious for all of us | 04:28 | |
but how do newcomers know to use Zef as the tool to install modules | |||
turdmonkey | I got the book, "perl 6 fundamentals" and it said so in the beginning, when setting up the perl 6 environment | 04:29 | |
benjikun | True, it is mentioned regularly at the beginning of books and beginner's guides | 04:30 | |
Well, it also does explicitly reference zef under the "Modules" page in the docs | 04:31 | ||
turdmonkey | I'm excited for "Learning Perl 6", which will probably demonstrate zef as well | ||
benjikun | Maybe we should put a reference to the modules docs page on the frontpage of modules.perl6.org | ||
I'm trying to discover any things newbies might miss | 04:32 | ||
turdmonkey | Pointing newbies toward Rakudo-Star is useful | ||
And always having a short and quick beginner tutorial that utilizes a cool module that requires zef. | 04:33 | ||
benjikun | Perhaps we could put a link titled "What next?" or some variation on that at the bottom of each of the installation instructions for rakudostar here: rakudo.org/files | 04:34 | |
or a link at the bottom that says "Learn more about what's included with Rakudo Star" | 04:36 | ||
There's a box similar to that on the downloads page @ perl6.org | 04:38 | ||
turdmonkey | oh man I just discovered GTK::Simple | 04:49 | |
04:50
curan joined
|
|||
turdmonkey | pretty much the only thing I don't use perl 5 for is GUI stuff. Not that I do GUI stuff often(hardly ever), but Perl 6 supporting a real, high-quality GUI Framework would be sweet | 04:50 | |
benjikun | turdmonkey: Were you the one that requested that in the survey? | 04:51 | |
04:51
skids left
|
|||
benjikun | I saw that, and I'd agree | 04:52 | |
04:52
jmerelo joined
|
|||
benjikun | jmerelo: Welcome back | 04:53 | |
turdmonkey | benjikun, No, but it's been on my mind for a while now | 04:54 | |
jmerelo | benjikun: hi. Checking out answers to the survey. Quite a lot! | 04:55 | |
turdmonkey | What is something perl absolutely excels at? Data munging! What do people love? graphs! | ||
benjikun | jmerelo: Yeah, I'm quite pleased with them | 04:56 | |
turdmonkey: I'm planning on generating some custom charts for the survey questions a little after it appears on P6Weekly, so that everyone gets an opportunity | 04:57 | ||
alongside considering a repository for the .csv and chart generators for each round of surveys we do | |||
turdmonkey | I think that a huge area where Perl 6 can shine is data visualization | 05:00 | |
jmerelo | If you've got the time, please cast your vote in the hash declaration style poll github.com/perl6/doc/issues/2117#i...-399742781 | ||
El_Che | benjikun: I bundle zef in rakudo-pkg (and a script to install it at home). | 05:04 | |
I think people discover zef soone enough | 05:05 | ||
the only danger is them picking als variants like panda, ufo from older posts | |||
05:05
kurahaupo_ left,
kurahaupo joined
|
|||
El_Che | or start with rakudobrew becasue it sounds like perlbrew | 05:05 | |
05:06
sno left
|
|||
turdmonkey | $var.kv, kv is "key/value" method? | 05:07 | |
benjikun | El_Che: good points, I know people who have done that with panda | ||
jmerelo | turdmonkey: right. | 05:08 | |
turdmonkey | well that's quite nifty | ||
jmerelo | This question is still unanswered in StackOverflow: list of encodings that Perl6 understands stackoverflow.com/questions/414332...nderstands | 05:10 | |
turdmonkey | How is Perl 6's speed now? | ||
jmerelo | turdmonkey: better ;-) | 05:11 | |
El_Che | ymmv depending on what you do. Having easy concurrency helps on that area | 05:12 | |
benjikun | jmerelo: About the hash debate, I'd agree with labster on consistency paralleling defining arrays (i.e. my @a = []; being similar to {}) | 05:17 | |
As for why {} is so much slower, can that be improved, or is that option inherently slower than the others | |||
05:19
turdmonkey left
|
|||
benjikun | too bad there aren't more symbols on most keyboards, ha | 05:25 | |
El_Che | benjikun: i.ytimg.com/vi/FVfiujbGLfM/hqdefault.jpg | 05:29 | |
benjikun | El_Che: lol | ||
jmerelo | benjikun: it will probably be improved. Did you vote at the poll? | 05:30 | |
benjikun | jmerelo: Yeah, I did | 05:31 | |
geekosaur | benjikun, theres a bug open for it already | ||
jmerelo | benjikun: great! I'll leave it open for another 24 hours, and change documentation after that. | 05:32 | |
There are a bunch of Perl 6 unanswered questions in StackOverflow. You might want to take a look at them stackoverflow.com/unanswered/tagged/perl6 In some cases, they give you interesting insight on the working of the language | 05:34 | ||
05:42
kurahaupo left,
kurahaupo joined
|
|||
El_Che | jmerelo: quite a discussion about hashes :) | 05:43 | |
jmerelo | El_Che: that's the kind of thing I love about Perl 6 and the community. It's also the kind of issues I hate. | 05:44 | |
El_Che | herding cats? | ||
jmerelo | El_Che: herding butterflies. | 05:45 | |
El_Che | cats are less fragile :) | ||
jmerelo | El_Che: precisely. | 05:46 | |
El_Che | academics love precise language :) | 05:47 | |
jmerelo | jmerelo: :-) | ||
El_Che | (and to talk to themselves it seems) :) | 05:48 | |
05:48
xtreak joined
|
|||
jmerelo | El_Che: we don't talk to ourselves, we mumble :-) | 05:48 | |
El_Che | mumblemumblereferenceneededmumble | 05:49 | |
jmerelo | El_Che: that's wikipedians. Almost, but not quite. | ||
El_Che | <this perl 6 doc is incomplete or has unresolved issues> | 05:50 | |
jmerelo | El_Che: academics would be quite "You need to compare Perl 6 to every single language in town. The font you are using for code is too small, except when it's too big. You are not mentioning my Very Important Contribution to the realm of languages" | 05:52 | |
El_Che | lol | ||
train arrived | |||
bbl | |||
jmerelo | El_Che: have a nice trip | ||
05:55
wamba left
05:57
kurahaupo_ joined
05:58
kurahaupo left
06:02
kurahaupo_ left
06:11
kurahaupo joined
06:14
ufobat_ joined
|
|||
El_Che | jmerelo: just commute to work :) | 06:20 | |
06:23
Kaypie joined,
Kaiepi left
06:26
domidumont joined
06:31
domidumont left
06:32
sno joined,
domidumont joined
06:35
hami joined
06:38
jmerelo left
06:42
kurahaupo_ joined
06:45
kurahaupo left
06:48
lookatme left
07:18
hami left
07:21
jeromelanteri joined
07:22
jeromelanteri left
07:23
zakharyas joined
07:24
zakharyas left
07:27
zakharyas joined
07:28
zakharyas left,
zakharyas joined
07:45
darutoko joined
07:50
joya left
|
|||
tyil | benjikun: dont sweat it | 07:51 | |
07:53
jmerelo joined
|
|||
jmerelo | .tell phdphil A lazy list could be infinite. Kind of hard to do combinations on that thing... | 07:53 | |
yoleaux | jmerelo: I'll pass your message to phdphil. | ||
08:05
dakkar joined
08:11
dogbert17 left
08:25
xtreak left
08:27
zakharyas1 joined
08:28
xtreak joined
08:29
zakharyas left
08:37
wamba joined
08:39
xtreak left
08:42
wamba left
08:43
wamba joined,
pmurias joined
|
|||
buggable | New CPAN upload: App-Assixt-0.4.0.tar.gz by TYIL modules.perl6.org/dist/App::Assixt:cpan:TYIL | 08:56 | |
tyil | neat | ||
09:06
xtreak joined
09:09
zakharyas1 left,
zakharyas joined
|
|||
buggable | New CPAN upload: cro-http-0.7.6.tar.gz by JNTHN modules.perl6.org/dist/Cro::HTTP:cpan:JNTHN | 09:16 | |
New CPAN upload: cro-core-0.7.6.tar.gz by JNTHN modules.perl6.org/dist/Cro::Core:cpan:JNTHN | |||
New CPAN upload: cro-tls-0.7.6.tar.gz by JNTHN modules.perl6.org/dist/Cro::TLS:cpan:JNTHN | |||
09:17
HaraldJoerg joined
09:20
domidumont left
09:24
domidumont joined,
n1ge joined
|
|||
buggable | New CPAN upload: cro-0.7.6.tar.gz by JNTHN modules.perl6.org/dist/cro:cpan:JNTHN | 09:26 | |
New CPAN upload: cro-websocket-0.7.6.tar.gz by JNTHN modules.perl6.org/dist/Cro::WebSocket:cpan:JNTHN | |||
New CPAN upload: cro-zeromq-0.7.6.tar.gz by JNTHN modules.perl6.org/dist/Cro::ZeroMQ:cpan:JNTHN | |||
09:29
Kaypie left
09:31
xtreak left
09:34
haj` joined
|
|||
buggable | New CPAN upload: Geo-Coordinates-UTM-0.9.0.tar.gz by KJPYE cpan.metacpan.org/authors/id/K/KJ/...9.0.tar.gz | 09:36 | |
jmerelo | Wow | 09:42 | |
09:43
scimon joined
09:45
rindolf joined
09:46
xtreak joined
09:49
Jon__ joined
|
|||
Jon__ | Hello:), i tried to install moose and when i run my perl program i get this error | 09:49 | |
Can't locate Moose.pm in @INC (you may need to install the Moose module) (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at .\test.pl line 6. BEGIN failed--compilation aborted at .\test.pl line 6. | |||
Can someoen tell me what i'm doing wrong? | |||
09:54
Jon__ left
10:02
scimon left
10:03
scimon joined
10:09
margeas joined
|
|||
Ulti | you need to tell your perl where your cpan modules are installed try -I to manually do that on the command line | 10:10 | |
your second marginal error was asking a perl5 question on a perl6 chat, you might have more luck with #perl | 10:11 | ||
though there are some p5 people on here too | |||
scimon | Jon__: sounds like you need to install Moose `cpanm Moose` should do the job. But as Ulti says the #perl chat might be a better place to ask. | 10:16 | |
jnthn | I think they left :) | ||
10:20
benjikun left
|
|||
scimon | Ah well. | 10:23 | |
10:43
wamba left
10:45
scimon left,
scimon joined
10:46
Zoffix joined
10:47
wamba joined
|
|||
Zoffix | benjikun: but you don't define arrays with `my @a = [];` you just write it as `my @a;`. Same with hashes | 10:50 | |
10:53
sena_kun joined
|
|||
Zoffix | benjikun: and yeah, {} can be improved. If you write it explicitly as circumfix:<{ }> it becomes fast, so I suspect it's the left over block from when we're trying to guess whether we're making a hash or a block that's to blame. There's another issue where this form of guessing could be implemented better, so I think once that's done the speed loss will resolve itself :) | 10:53 | |
mmm... the "Recent blog posts" needs fixing: perl6.org/ | 10:54 | ||
Right now it appears to shows comments from medium.com as new blogs... "Jo Christian Oterhals: Yes, you’re right." "Jo Christian Oterhals: Thanks for the response, Dave." | 10:55 | ||
.tell benjikun you wanted to add links to rakudo.org The sauce is here: github.com/perl6/rakudo.org/ The templates are in templates/ Add [REAPP] (including brackets) to commit title to restart the app with your changes | 10:57 | ||
yoleaux | Zoffix: I'll pass your message to benjikun. | ||
11:02
jmerelo left
|
|||
Geth | perl6.org: 4c84c5ea2b | (Zoffix Znet)++ | fetch-recent-blog-posts.pl Get rid of comments on medium.com showing up as new blogs |
11:11 | |
11:20
raschipi joined
11:22
zakharyas left
11:33
xtreak left
11:58
scovit joined
11:59
Zoffix left
12:03
lizmat left
12:19
epony left
12:21
kurahaupo_ left
|
|||
Geth | perl6.org: e151ad1f3f | (Zoffix Znet)++ (committed using GitHub Web editor) | fetch-recent-blog-posts.pl Explain more how the medium.com comment filter works |
12:36 | |
12:47
damnlie left
12:49
p6noob left,
damnlie joined
12:53
mcmillhj joined,
mcmillhj left
12:58
mcmillhj joined,
mcmillhj left,
notable6 left,
notable6 joined
13:00
cosimo joined
13:03
wamba left,
mcmillhj joined,
mahafyi joined
|
|||
pmurias | the truffle backend now passes t/nqp/001-literals.t :) | 13:04 | |
moritz | \o/ | 13:07 | |
13:08
kurahaupo joined
|
|||
jkramer | Would it make sense to add a divmod op to P6 or would that have no advantages over doing mod and div seperately? | 13:09 | |
stmuk | hmm zeroturnaround.com/rebellabs/graal...es-on-jvm/ has helped my understanding | 13:12 | |
13:15
zakharyas joined
|
|||
pmurias | jkramer: does it offer any benefits rather then as an optimization aid? | 13:17 | |
jkramer | pmurias: No, but isn't an optimization aid not a good reason for having it? :) I mean I guess div+mod are things that are often needed together and usually in situations where you do math stuff that you'd want to be fast | 13:19 | |
I'm doing some project euler tasks in P6 lately and this is something that I found would be useful on many occasions | 13:20 | ||
pmurias | jkramer: I'm not just not very convinced that it will make things faster | 13:22 | |
jkramer | pmurias: Yeah that's why I'm asking. I guess rakudo is too high-level to make efficient use of CPU features/side effects | 13:27 | |
13:27
zakharyas left
|
|||
raschipi | Doesn't polymod do that? | 13:28 | |
m: say 25.polymod(3).reverse | |||
camelia | (8 1) | ||
13:28
zakharyas joined
|
|||
timotimo | the thing is that when we divide, we already get both the div and mod results, at least from the bigint library | 13:28 | |
[Coke] | raschipi++ | ||
timotimo | we then throw away one of the two, recalculate, and throw away the other | ||
at least i think that's what happens | |||
AlexDaniel clickbaits docs.google.com/forms/d/e/1FAIpQLS...g/viewform | 13:29 | ||
ilmari | m: 37.divmod(5).say() | ||
camelia | No such method 'divmod' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
ilmari | m: 37.polymod(5).say() | ||
camelia | (2 7) | ||
ilmari | isn't divmod just a special case of polymod? | ||
[Coke] | divmod isn't p6, I don't think. | 13:30 | |
raschipi | Yep, it's the polymod case with a single argument. | ||
jkramer | Well divmod in other languages/libs that are more low-level make use of the fact that the machine opcode for division automatically stored the remainder in an extra register, so it's just one CPU op that does both at once | ||
But that's probably not possible in Rakudo | 13:31 | ||
raschipi | jkramer: Why do you say that? | ||
AlexDaniel | m: say expmod(4, 2, 5); | ||
camelia | 1 | ||
ilmari | s: Int, 'polymod' | ||
SourceBaby | ilmari, Sauce is at github.com/rakudo/rakudo/blob/e935...t.pm6#L105 | ||
timotimo | the jit's optimizer could probably figure that out | ||
jkramer | raschipi: Well you'd need to do inline assembly with all the downsides :) | ||
timotimo | just gotta implement it ;) | ||
13:31
epony joined
13:32
skids joined
|
|||
raschipi | jkramer: Rakudo generates assembler for x86_64 | 13:32 | |
jkramer | Oh really? I was not aware of that | ||
ilmari | well, it's really moarvm that does it | ||
but yes, some ops are JITed | |||
jkramer | So I can compile P6 to binary? | ||
raschipi | Well, yeah, Moar does it. | ||
It compiles it's own bytecode to binary | 13:33 | ||
But not all of it, jkramer. | 13:34 | ||
timotimo | we only do JIT compilation, no AOT compilation here. | ||
jkramer | That's pretty neat :) | ||
timotimo | it's also only really a win because we observe the actual execution of the program to figure out what types are common where | 13:35 | |
pmurias | all the Perl 6 backends (moar, jvm, js and truffle) do JIT compilation btw | ||
timotimo | 6guts.wordpress.com has many posts about our dynamic optimizer, and brrt-to-the-future.blogspot.com has posts about the jit | ||
actually | 13:36 | ||
jkramer: www.youtube.com/watch?v=3umNn1KnlCY - this could be very interesting for you: Jonathan Worthington (jnthn) - "How does deoptimization help us go faster" | 13:37 | ||
13:39
Pheix joined
|
|||
tbrowder_ | g'day, #perl6 | 13:41 | |
raschipi | oi tbrowder_ | ||
tbrowder_ | raschipi: o/ | 13:42 | |
13:43
molaf joined
|
|||
tbrowder_ | i need to bind a variable to a hash key so i can do something in p6 as is done in this gist: gist.github.com/tbrowder/e032014c6...61298e6c16 | 13:43 | |
jkramer | timotimo: Thanks, I'll watch it later, can't have sound right now :) | 13:44 | |
timotimo | jnthn.net/papers/2017-spw-deopt.pdf - this is the slides pdf | 13:45 | |
raschipi | m: my $b = 3; %h<a> := $b; $b = 4; say %h<a> | 13:47 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '%h' is not declared at <tmp>:1 ------> 3my $b = 3; 7⏏5%h<a> := $b; $b = 4; say %h<a> |
||
raschipi | m: my $b = 3;my %h; %h<a> := $b; $b = 4; say %h<a> | 13:48 | |
camelia | 4 | ||
13:48
kurahaupo left
13:49
Pheix2 joined
13:50
Pheix3 joined
|
|||
raschipi | tbrowder_: Does that solve your problem? | 13:50 | |
13:50
lizmat joined
13:52
Pheix left
|
|||
tbrowder_ | it does, and i'm a dummy! i was focused on assigning it inside the original hash definition and didn't consider the direct binding. thnx! | 13:53 | |
13:53
Pheix2 left
13:54
curan left
|
|||
tbrowder_ | s/original/original total/ | 13:54 | |
ufobat_ | did anyone work any further on perl6 and ldap? fyi: gist.github.com/FROGGS/bafc8454a14...0048dabf47 | ||
raschipi | tbrowder_: geekosaur found the answer when you asked earlier, you must have not seen it. I just repeated it now. | 13:57 | |
It's not obvious at all when trying to translate the Perl 5 code. | 14:00 | ||
14:00
kurahaupo joined
|
|||
b2gills | I think that if a NQP op for divmod was added, it might make it easier to optimize a div followed by a mod (or the reverse) as the optimization could be done in NQP. (note that this is just a guess) | 14:03 | |
14:03
zakharyas left
|
|||
raschipi | polymod is repeated divmod | 14:08 | |
14:09
turdmonkey joined
|
|||
turdmonkey | yay perl! | 14:10 | |
raschipi | heya turdmonkey | ||
turdmonkey | Hello. | ||
14:11
turdmonkey left,
greppable6 left
14:12
greppable6 joined
14:16
wamba joined
|
|||
raschipi | Juerd: do you find it amusing or frustrating that everyone disagrees so strongly with your style recommendations? | 14:22 | |
tbrowder_ | geekosaur: thanks for the answer to binding a var to a hash key! | ||
buggable | New CPAN upload: RDF-Turtle-0.0.1.tar.gz by BDUGGAN modules.perl6.org/dist/RDF::Turtle:cpan:BDUGGAN | 14:26 | |
14:36
wamba left
|
|||
masak | raschipi: what style recommendations are those? | 14:41 | |
14:43
wamba joined
|
|||
raschipi | Use 'hash' instead of '{ }' to create empty hashes in the docs and getting rig of '$' anonymous variables, requiring it to be declred 'state $'. | 14:43 | |
14:46
turdmonkey joined
|
|||
b2gills | `$` is actually `(state $)` as `$ = 1` always assigns a `1`. While `state $ = 1` only assigns it the first time through the block. | 14:51 | |
timotimo | i prefer {} over hash, because {} is a term, whereas hash can take some more stuff after it. if you're not careful, what you intended to be "empty hash" turns into "hash with a bunch of stuff" | 14:52 | |
turdmonkey | Why is {} confusing with a block? Isn't one of Perl | ||
Perls greatest strengths context? | |||
Geth | doc: 77374a0a82 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6 Document interpolation-of-anon-state-vars as a trap Found 6 or 7 cases of this bug in the ecosystem |
||
synopsebot | Link: doc.perl6.org/language/traps | ||
turdmonkey | You should be able to tell based upon context, yes? | ||
timotimo | in that case it's based on content, not context | ||
turdmonkey | hm | 14:53 | |
timotimo | if there's any reference to $_ inside the { } it'll be interpreted as a block instead of a hash | ||
which can surprise you | |||
especially because there's the .foo form which is short for $_.foo | |||
turdmonkey | so if you use $_ inside of {} then you must explicitly declare it a hash? | ||
timotimo | so you can have a $_ in there without seeing the $_ | ||
in that case you'll have to use %( ) syntax, or a call to "hash" or rename the variable outside of it | 14:54 | ||
14:54
zakharyas joined
|
|||
raschipi | Well, it's not a problem in practice, you just need to know how to force Perl 6 to do what you mean. | 14:54 | |
14:55
Zoffix joined
|
|||
timotimo | aye | 14:55 | |
a type annotation here or there can help, too | |||
m: my %foo = { hi => "goodbye", boop => .uc } | |||
camelia | Odd number of elements found where hash initializer expected: Only saw: -> ;; $_? is raw { #`(Block|86150824) ... } in block <unit> at <tmp> line 1 |
||
timotimo | or, you know, the % sigil | ||
Zoffix | turdmonkey: more accurately, referring to any **parameters** will make it a block. And $_ is a default parameter in blocks. The path to this error is having stuff like `{ foo => $o.ber }` and then later changing `$o` to be aliased to `$_` in the outer construct, so you go and change the hash to `{ foo => .ber }` but that's now a param, so it becomes a block | 14:56 | |
14:56
molaf left
|
|||
Zoffix | And the second error is reducing `{ … some code … }` to just an empty `{}`, but depending on the context that could mean a hash instead, so you have to go back and change that to `{;}` | 14:57 | |
turdmonkey | lol, wow | 14:58 | |
Zoffix | :) | ||
I don't know why people keep using initialization to argue against `{}`. You wouldn't use it there! :) | |||
m: my %foo = hi => "goodbye", boop => .uc | |||
camelia | No such method 'uc' for invocant of type 'Any' in block <unit> at <tmp> line 1 |
||
raschipi | Zoffix: because they had their minds warped by computer science? | 15:00 | |
Zoffix | I suspect it's because they're making up the problems that don't exist instead of reporting actual problems that happened :P | ||
raschipi | Well, it's got to be 'pure' and conform to some theory and all that, so every problem that can be made up must be solved, I think. | 15:01 | |
Zoffix | Same with state vars. The original argument was that it's hard to search for, which proved false. However, I found ~6 modules in the ecosystem that weren't scoping them correctly | ||
turdmonkey | Zoffix, `boop => .uc` is really $_.uc ? | ||
Zoffix | turdmonkey: yes | ||
turdmonkey | :-O | ||
Zoffix | turdmonkey: same with .[0], .<foo>, and so on | 15:02 | |
turdmonkey | Cool. | ||
Zoffix | Except for hypering, IIRC `.»lc with <a b c>` wont work | ||
m: dd .»lc with <a b c> | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call (only alphabetic methods may be detached) at <tmp>:1 ------> 3dd .7⏏5»lc with <a b c> |
||
Zoffix | yeah, it really wants a `$_` in there | ||
turdmonkey | How do you use those unicode characters o easily? | ||
Zoffix | turdmonkey: on this computer, I use XCompose, so it's `RWin, >, >` to type » | 15:03 | |
raschipi | Zoffix types with his mind directly. | ||
turdmonkey | Hahaha, that is so cool | ||
Zoffix | turdmonkey: on my home computer, I have 18 extra keys on the side and have some of them bound to the special chars | ||
turdmonkey | Well, aren't you mister fancy pants. | ||
Zoffix | And if you don't know how to type it, you can just write it as `>>` | 15:04 | |
turdmonkey | Yes. | ||
Zoffix | m: say <a b c>».lc; say <a b c>>>.lc | ||
camelia | (a b c) (a b c) |
||
turdmonkey | The 'infinity symbol' = * = Inf ? | ||
Zoffix | m: say <a b c>».uc; say <a b c>>>.uc | ||
camelia | (A B C) (A B C) |
||
Zoffix | Yeah | ||
turdmonkey | Why are there three ways to represent infinity? | ||
Zoffix | turdmonkey: full list here: docs.perl6.org/language/unicode_ascii | ||
turdmonkey: oh, sorry, the `*` is not Inf. It's the "Whatever" object. And in some methods it represents an `Inf` | 15:05 | ||
15:05
comborico1611 joined
|
|||
Juerd | raschipi: Slightly frustrating, but not because the "recommendations" (they're not really recommendations, more suggestions) aren't followed. I'm mostly frustrated with the things that make Perl 6 hard to learn or work with. | 15:05 | |
raschipi | Juerd: they don't make it hard, they aren't problems in practice. | 15:06 | |
Juerd | raschipi: Regarding hashes, 'hash' was never my preference until the other two were deemed too confusing. Although 'hash' is ugly, I think it's better to use something that's consistently safe, than to switch between constructs based on what's safe for specific contents. | ||
Zoffix | m: multi pick-a-number(Whatever:D) { ^100 .rand }; multi pick-a-number(Int \n) { n.rand.Int }; pick-a-number 42; pick-a-number * | ||
camelia | ( no output ) | ||
Zoffix | m: multi pick-a-number(Whatever:D) { ^100 .rand }; multi pick-a-number(Int \n) { n.rand.Int }; say pick-a-number 42; say pick-a-number * | ||
camelia | 30 11.74417071926397 |
||
Juerd | raschipi: Regarding $, it may just be disagreement about whether hidden or hard-to-detect state is bad or not. | 15:07 | |
Zoffix | turdmonkey: so ^ here, I made "Whatever" mean "100" | ||
15:07
zakharyas left
|
|||
El_Che | Juerd: I agree with you if the argument is timtowtdi if it make sense and a sane default when doesn't | 15:07 | |
Juerd | raschipi: But in general, I'm not pessimistic at all. A few of my suggestions have made it into the language, and I don't take the rejections personally :D | ||
raschipi | I don't see how the traditinal $i would make it any different than just $. | 15:08 | |
Juerd | raschipi: $i can't be used without declaring it. | ||
raschipi: $ can | |||
Zoffix | Juerd: but I can declare that state with `my $i` in outer block. | ||
Juerd | Zoffix: Yes. | ||
raschipi | Well, I don't see how 'my $i' makes code any more clear than just '$'. | 15:09 | |
Zoffix | And you won't find my state at all, where any anon var, I can find relatively easy for the common case, and the rest of the cases could be found with a tool that examines ASTs | ||
Juerd | raschipi: My most insane idea for the language was initially rejected and eventually adopted. So even when I don't get my way, I remain hopeful :DH | ||
s/H$// | |||
Zoffix | Juerd: what was the idea? :) | ||
raschipi | Which idea was it? | ||
Juerd | .= | 15:10 | |
Zoffix | I just find "state is bad" argument a bit vague. Before trying to find all the `$` uses, you'd need to have motivation to do so :) | 15:11 | |
.= is good. Even tho majority of people seem to struggly with chaining those | 15:12 | ||
Juerd | Zoffix: I'm depending on the community's agreement on the argument, I'm not going to try and change anyone's mind towards it :) | ||
Zoffix | `$x .= foo.bar.ber` for example | ||
Juerd | Zoffix: I don't think one should chain them. | ||
Zoffix | Juerd: no, but the above is meant to be equivalent to `$x = $x.foo.bar.ber`, but it's actually `($x = $x.foo).bar.ber` | ||
Juerd | Zoffix: I'm fine with it being possible, because I do think the language should provide as much rope as needed to hang yourself, but I don't necessarily think all the options should be used in practice. | 15:13 | |
Zoffix | Juerd: you should write a book. "Perl 6 Best Practices" | ||
Juerd | Zoffix: I might release a short style guide at some point | ||
Zoffix: But definitely not within the coming few years | |||
afk | |||
Zoffix | Juerd: with argumentations for why "state is bad". | 15:14 | |
raschipi | Write a module that enforces it too. | ||
Zoffix | And well, explanations for all the other practices. | ||
15:15
Zoffix left
15:18
Pheix3 left
15:29
Tideflat joined
15:33
wamba left
|
|||
buggable | New CPAN upload: cro-http-0.7.6.1.tar.gz by JNTHN modules.perl6.org/dist/Cro::HTTP::T...cpan:JNTHN | 15:36 | |
15:39
SHODAN joined
|
|||
buggable | New CPAN upload: cro-http-0.7.6.1.fix.tar.gz by JNTHN modules.perl6.org/dist/Cro::HTTP::T...cpan:JNTHN | 15:46 | |
jnthn | Monday... :/ | ||
15:47
mcmillhj_ joined
15:50
mcmillhj left,
mcmillhj_ left
|
|||
Tideflat | What is the recommended way to install zef? I am on Debian and don't seem to have a command named zef in spite of having perl 6 installed, nor is there a packages named perl 6 | 15:50 | |
15:50
dxmxr joined
|
|||
El_Che | Tideflat: are you using the version in debian itself or a third party package? | 15:50 | |
Tideflat | I believe the official package though I installed it a while ago and may have forgotten, but my version number exactly matches the version of latest perl6 package from Debian | 15:53 | |
El_Che | do "which perl6" | 15:54 | |
Tideflat | The version is 6.c-1 | ||
timotimo | what's "perl6 --version" say? | ||
Tideflat | This is Rakudo version 2016.12 built on MoarVM version 2016.12 | 15:55 | |
implementing Perl 6.c. | |||
timotimo | you probably won't be able to install zef on that | 15:56 | |
well, at least not latest zef | |||
Tideflat | ah thanks. So updating to a more recent version of Rakudo outside of the Debian package system would fix that? | ||
El_Che | Tideflat: I provide a repo for debian stable and ubuntu here: github.com/nxadm/rakudo-pkg | 15:57 | |
timotimo | el_che's packages are very good | ||
El_Che | it will not conflict with OS-supplied rakudo | ||
Tideflat | Thank you! I will look into that after I get home from work. | ||
El_Che | (as long you don't start mixing paths, at least) | 15:58 | |
ping if you need help | |||
bbl | |||
16:01
vcv_ joined,
vcv_ is now known as vcv
|
|||
raschipi | El_Che: Do you know if the packages for Debian Stretch work fine on Buster? | 16:01 | |
vcv | Can any of the bots in here run Perl6 code that uses a third party module? | ||
like Cro::HTTP::Client | |||
16:01
Tideflat left
16:02
Tideflat joined,
jmerelo joined
|
|||
timotimo | i believe on the evalable bot you can reach modules from the ecosystem | 16:02 | |
vcv | p6: use Cro::HTTP::Client; Cro::HTTP::Client.new(:base-uri("www.test.com"), :cookie-jar).post("/test") | 16:03 | |
camelia | ===SORRY!=== Could not find Cro::HTTP::Client 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 … |
||
16:03
mcmillhj joined
|
|||
timotimo | you have to add it via "use lib", though | 16:03 | |
it and all of its dependencies, probably | 16:04 | ||
16:04
mcmillhj left
|
|||
timotimo | i don't know how exactly | 16:04 | |
vcv | Ok, sounds like an adventure. thanks :) | ||
timotimo | the code required to do it might be too long to fit in one irc message, even | ||
16:08
mcmillhj joined
16:09
mcmillhj left
|
|||
tony-o_ | cro has a lot of deps | 16:09 | |
16:09
mcmillhj joined
|
|||
tony-o_ | m: use Cro:HTTP::Client; | 16:09 | |
camelia | ===SORRY!=== Could not find Cro 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::Repo… |
||
Geth | doc: 2054d3cc80 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Junction.pod6 Reword Junction short-cuircuting portion Closes github.com/perl6/doc/issues/2120 D#2120 - Expand short-circuiting behavior to include same type of shortcircuiting as performed in `and`/`or` ops - Document it as possible future language feature per github.com/perl6/doc/issues/2120#i...-399996522 - Feature proposed in R#1963 github.com/rakudo/rakudo/issues/1963 |
||
synopsebot | Link: doc.perl6.org/type/Junction | ||
synopsebot | D#2120 [open]: github.com/perl6/doc/issues/2120 Junction short-circuiting clarification | ||
synopsebot | R#1963 [open]: github.com/rakudo/rakudo/issues/1963 Make Junctions short-curcuit similar to how `and`/`or` do | ||
doc: e7d26b1c7f | (JJ Merelo)++ | doc/Type/Junction.pod6 Minor rephrasing and example compilation fixing |
16:13 | ||
16:14
wamba joined
16:15
sno left
|
|||
turdmonkey | woow | 16:15 | |
.pat.say for dir; | |||
.path.say for dir; | |||
evalable6 | irc-backup.tar.gz bin t sandbox 3rdparty .gitmodules .gitignore CONTRIBUTING.md Sakefile maintenance services META6.json config-default.json lib config.json junk .git data LICENSE stdin logs README.md |
||
turdmonkey | lol | 16:16 | |
.path.say for dir("../"); | |||
evalable6 | ../whateverable ../bloaty ../perl6-Toaster |
||
Geth | doc: b347d5e85b | (JJ Merelo)++ | doc/Language/traps.pod6 Puts comments into the code chunk |
||
synopsebot | Link: doc.perl6.org/language/traps | ||
turdmonkey | .path.say for dir("../../../"); | 16:17 | |
evalable6 | ../../../nadja ../../../cheapfood ../../../yuno ../../../automata ../../../mary ../../../bisectable ../../../ovh ../../../alex ../../../anna |
||
turdmonkey | .path.say for dir("../../../../../../"); | ||
evalable6 | ../../../../../../initrd.img.old ../../../../../../vmlinuz.old ../../../../../../bin ../..… |
||
turdmonkey, Full output: gist.github.com/f7321deb6ce586985c...eecbe5c572 | |||
turdmonkey | .path.say for dir("../../../../../"); | ||
evalable6 | ../../../../../initrd.img.old ../../../../../vmlinuz.old ../../../../../bin ../../../../..… |
||
turdmonkey, Full output: gist.github.com/f1fe60babcb780c62a...9d105d04f5 | |||
turdmonkey | sorry if I'm spammin, it's kinda cool | ||
.path.say for dir("../../../../"); | |||
evalable6 | ../../../../initrd.img.old ../../../../vmlinuz.old ../../../../bin ../../../../etc ../../.… |
16:18 | |
timotimo | you can go into #whateverable, too | ||
evalable6 | turdmonkey, Full output: gist.github.com/a62895b0671580889c...e0fc72f3ce | ||
turdmonkey | is that the channel for playing around? | ||
AlexDaniel | sort of, yeah | ||
jmerelo | Reached 100 answers in the dev survey, but it's good if we have a few more. Check it out: docs.google.com/forms/d/e/1FAIpQLS...g/viewform | 16:19 | |
turdmonkey | .path.say for dir("../../../../../etc"); | ||
evalable6 | ../../../../../etc/bindresvport.blacklist ../../../../../etc/ngircd ../../../../../etc/ufw… |
||
turdmonkey, Full output: gist.github.com/380d04be568cebb3f0...d9f823c453 | |||
AlexDaniel | turdmonkey: even though most of the file system is not writable, there are some writable files that are needed for the bot… I advise not to do crazy stuff :) | ||
turdmonkey | Yeah...can't someone screw up your box? | ||
16:20
domidumont left
|
|||
AlexDaniel | well, you can screw up the bots, it'd take a bit more effort to screw up the box :) | 16:20 | |
16:20
donaldh joined,
zakharyas joined
|
|||
AlexDaniel | like maybe through a kernel vulnerability or something like that | 16:20 | |
16:20
Zoffix joined
|
|||
Zoffix | turdmonkey: there's also /msg camelia that works :) | 16:20 | |
turdmonkey: there's also a penalty for screwing up the box. You… don't wanna know what it is :O | 16:21 | ||
AlexDaniel | e: spurt ‘isitwritable’, ‘foo’ | ||
evalable6 | (exit code 1) Failed to open file /home/bisectable/git/whateverable/isitwritable: Read-only file system in block <unit> at /tmp/7ZB0TMvSS9 line 1 |
||
AlexDaniel | ↑ you see :) | ||
e: slurp ‘config.json’ | |||
evalable6 | (exit code 1) Failed to open file /home/bisectable/git/whateverable/config.json: Permission denied in block <unit> at /tmp/E65kMFQxGW line 1 |
||
AlexDaniel | there are limits for the number of started processes, used memory, and maybe some other stuff I don't remember right now | 16:22 | |
like, /tmp is private for each bot | |||
it's definitely not very secure, but it would take some dedicated effort to screw things up :) | 16:23 | ||
Zoffix | m: await IO::Socket::Async.connect('irc.freenode.net', 6667 ).then({given .result {.print("NICK Camelia_\nturdmonkey, don't mess around or else! :P\n"); react {whenever .Supply {}}}}) | ||
AlexDaniel | right :) | ||
camelia | (timeout) | ||
Zoffix | hm.. | ||
e: await IO::Socket::Async.connect('irc.freenode.net', 6667 ).then({given .result {.print("NICK Camelia_\nturdmonkey, don't mess around or else! :P\n"); react {whenever .Supply {}}}}) | 16:24 | ||
timotimo | you need to PRIVMSG | ||
Zoffix | oh, right | ||
evalable6 | (signal SIGHUP) «timed out after 10 seconds» | ||
Zoffix | m: await IO::Socket::Async.connect('irc.freenode.net', 6667 ).then({given .result {.print("NICK Camelia_\nPRIVMSG #perl6 turdmonkey, don't mess around or else! :P\n"); react {whenever .Supply {}}}}) | ||
Well, now it's not as fun :P | |||
turdmonkey | lol | ||
Zoffix | Missing join | ||
camelia | (timeout) | ||
Zoffix | oh well | ||
timotimo | true, though some channels allow messages without joining IIRC | ||
a mode you'd have to set manually, i expect | 16:25 | ||
turdmonkey | AlexDaniel, never underestimate hackers. | ||
AlexDaniel | I remember when this stuff came up when I was searching for regressions by rerunning a lot of m: snippets from irc logs :) | ||
turdmonkey | "Dedicated effort" practically defines them | ||
geekosaur | it's defaulting off recently because of spam attacks from around 6 months ago | ||
AlexDaniel | turdmonkey: correct, but at least we'll be able to observe their dedicated effort publicly :) | 16:26 | |
turdmonkey: at least *ables don't answer on private messages | |||
16:26
Tison joined
16:27
Camelia_ joined
|
|||
Camelia_ | turdmonkey, don't mess around or else! :P | 16:27 | |
Zoffix | hehe | ||
turdmonkey | hahahahhaa | ||
16:27
Camelia_ left,
dakkar left
16:28
donaldh left
|
|||
turdmonkey | hmm | 16:28 | |
16:28
donaldh joined
|
|||
turdmonkey | that looks suspiciously like an Arch Linux box m i rite | 16:28 | |
Zoffix | mhm | ||
AlexDaniel | e: say run <uname -a> | ||
evalable6 | Linux superserver 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 0, signal => 0, pid => 16931, command => ["uname", "-a"]) |
||
turdmonkey | ;-o | 16:29 | |
Tison | Zoffix, have you ever given a talk/essay about OOP on Perl 6? | ||
Zoffix | m: use NativeCall; sub system (Str) is native {}; system 'uname -a' | 16:30 | |
camelia | Linux camelia 4.4.92-31-default #1 SMP Sun Oct 22 06:56:24 UTC 2017 (1d80e8a) x86_64 x86_64 x86_64 GNU/Linux | ||
turdmonkey | guys, do you have any suggestions for some networking projects in Perl 6, for a relative beginner, some of which use threads? | ||
16:30
dxmxr left
|
|||
Zoffix | turdmonkey: yeah, fix bugs in IRC::Client :) | 16:30 | |
turdmonkey | :-O | ||
Zoffix | eco: IRC::Client | ||
16:30
scimon left,
Tideflat left
|
|||
Zoffix | buggable: yo | 16:30 | |
buggable | Zoffix, IRC::Client 'Extendable Internet Relay Chat client': github.com/zoffixznet/perl6-IRC-Client 6 other matching results: modules.perl6.org/s/ | ||
16:30
donaldh left
16:31
donaldh joined
|
|||
Zoffix | turdmonkey: we have a list of most wanted modules: github.com/perl6/perl6-most-wanted...ed-modules | 16:31 | |
turdmonkey | woah | ||
Zoffix | Tison: nope | ||
turdmonkey | that's a lot | ||
hmmm | 16:32 | ||
so does that mean you need an Email::Sender module? | |||
16:32
donaldh left,
donaldh joined
|
|||
Zoffix | turdmonkey: I'd say it means someone at some point in time added that to the list. Someone else—unaware of it being on the list—might've implemented something. You should check the ecosystem | 16:33 | |
modules.perl6.org/ | |||
turdmonkey: also, I think the Perl 6 survey currently going on is asking for what module people want the most. You could wait for results and see | |||
turdmonkey | cool | 16:34 | |
I am primarily interested in netowrking since I really need to learn it better | 16:35 | ||
Tison | to construct an object, it jump out a lot of concepts like `new` `BUILD` `bless` `BUILDALL`, hard to clarify relations among them | ||
turdmonkey | I'm learning IO::Socket::INET right now | ||
AlexDaniel | jmerelo: there was no weekly yet, I think that'd give another inflow of answers | 16:36 | |
jmerelo | Can someone tell me what's wrong with my answer here? stackoverflow.com/questions/414332...8#51016808 | ||
raschipi | Tison: You'll usuall just need TWEAK untill you start to really get into it. | ||
Zoffix | I'd say you'll usually need none of them | 16:37 | |
jmerelo | I have a strong hunch of who's voted it down, and same hunch tells me why, but I really can't see how the answer is unhelfup or not addressing the question. If it does, please say something and I'll happily edit or simply delete it if there's a better answer. | 16:38 | |
AlexDaniel: but 100 is striking. | |||
AlexDaniel | jmerelo: ha | ||
Zoffix | jmerelo: it doesn't answer the question: "How to get a list of encodings". You answered only how to see if something's supported if you already have a list | 16:39 | |
jmerelo: dunno, I'm on bdfoy's shitlist as well and he didn't downvote my answers. Just ignored them and never accepted them. So it's possible your hunch is wrong :) | 16:40 | ||
16:40
raynold joined
|
|||
jmerelo | Zoffix: it does point to the new code that shows all encodings. But you are right, it does not say so explicitly | 16:40 | |
turdmonkey | brian d foy? | 16:41 | |
Zoffix | yeah | ||
turdmonkey | whaaat | ||
he doesn't like you? | |||
jmerelo | Zoffix: the list is also wrong. | ||
I mean, the link. | |||
Zoffix | jmerelo: I think that'd still just give a list of *rakudo's* encoding. Is there a way to get a list of them from any compliant implementation? | ||
Like some method on Encoding::Registry or something | 16:42 | ||
16:43
brrt joined
|
|||
jmerelo | Zoffix: I have edited it now. Check out the code. $encodings is a class-scoped variable. I don't see how that could be accessed. Maybe I'm dumb, but I can't see the way. | 16:44 | |
Zoffix: the block-lexical $encodings get into a class-lexical %lookup. Really can't see how... It does not have any role, or superclass, so that's all there is. | 16:46 | ||
jnthn | Encoding::Registery should probably get a method that fetches all registered encodings. Note that it should make a defensive non-lazy copy to be thread-safe | ||
jmerelo | jnthn: that's what I thought by looking at the code, but I don't know if it's done that way by design or whatever. Right now there does not seem to be a way. | 16:47 | |
jnthn | No, there's not a way | ||
Zoffix | R#1964 | ||
synopsebot | R#1964 [open]: github.com/rakudo/rakudo/issues/1964 [RFC] Implement a way to get a list of supported encodings | ||
jmerelo | Zoffix++ | 16:48 | |
jnthn | I added Encoding::Registry in the first place, and just did what was needed to use it in place of what existed before. | ||
jmerelo | jnthn: it was a big improvement, far as I can tell. | ||
jnthn | There's no sense that I didn't think there should be a way to introspect the encodings. I think there should. Just was focused on all the other pieces. :) | 16:49 | |
jmerelo | jnthn: of course. No problem. | ||
But you see, digging up unanswered stackoverflow questions brings some joy and improvement to us all (and downvotes to some :-) ) | 16:50 | ||
16:50
domidumont joined
|
|||
jnthn | It's possible we want to add another piece of state to keep track of the actual encodings themselves, since the %lookup has all of the aliases | 16:51 | |
Whereas what a .encodings() method likely wants to return is the Encoding objects themselves | |||
From which you can the introspect the name and the aliases | |||
*can then | |||
16:52
n1ge left
16:55
Tison left
|
|||
buggable | New CPAN upload: RDF-Turtle-0.0.2.tar.gz by BDUGGAN modules.perl6.org/dist/RDF::Turtle:cpan:BDUGGAN | 16:56 | |
16:59
zakharyas left
17:00
donaldh left
17:03
Zoffix left
17:04
buggable joined,
ChanServ sets mode: +v buggable
|
|||
Geth | whateverable: 04beb801ab | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable.pm6 Use Bufs and utf8-c8 in get-output Otherwise Greppable complains about malformed UTF-8. Maybe a good side-effect of this change is that some output will not be normalized. See issue #153. |
17:16 | |
turdmonkey | hm, interesting.. | ||
`say $file.absolute;` gives me the absolute path of the file, and `say $file.absolute.path;` looks like it returns not only the absolute path, but also the fact that they are .IO objects? | 17:17 | ||
raschipi | .absolute returns a string and .path returns an IO object | 17:20 | |
Geth | doc: 36eee8451a | (JJ Merelo)++ | doc/Type/IO/Path.pod6 Index link and symlink as methods/routine This would close #2121. They are searchable now as routine and methods, with the notation "sub". If this is not address satisfactorily the OP, feel free to reopen. |
||
synopsebot | Link: doc.perl6.org/type/IO::Path | ||
doc: 62f9619f96 | (JJ Merelo)++ | doc/Type/IO/Path.pod6 Changes routine → sub |
|||
raschipi | You're looking at their gists, which is a human-recognizable representation of the object | ||
geekosaur | more specifically, "say" invokes the gist method of anything it prints to get a printable representation | 17:21 | |
turdmonkey | cooool | 17:23 | |
17:27
natrys joined
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/06/25/...surveying/ | 17:29 | |
raschipi | Yay, lizmat ++ | ||
lizmat | decommute& | 17:35 | |
17:36
lizmat left,
sena_kun left
17:37
sena_kun joined
|
|||
turdmonkey | I am enjoying learning about perl's concurrency features | 17:39 | |
I made my file system printer concurrent wee | 17:40 | ||
jmerelo | turdmonkey: congrats! | ||
turdmonkey | my $channnel - Channel.new(); | ||
= | |||
ok, now I know what I must do | 17:41 | ||
Make a concurrent web crawler in perl | |||
17:41
espadrine joined
|
|||
turdmonkey | do you guys have any examples of that yet? | 17:41 | |
maybe I can contribute | 17:42 | ||
jmerelo | Just a reminder we have a poll going on how to prescribe hash declaration in the docs: github.com/perl6/doc/issues/2117#i...-399742781 | ||
I'll leave it running for another 24 hours before closing. | |||
turdmonkey: You mean, as in Mojo::DOM with DOM extraction and the works? To tell you the truth, I still use Mojo::DOM for that... | |||
turdmonkey | I don't know, I haven't looked at that | 17:43 | |
jmerelo | turdmonkey: but short question is: no, I don't know of any example... Sorry. | ||
17:43
sena_kun left
|
|||
turdmonkey | No, that's ok. | 17:43 | |
I would love to figure it out on my own and then give it to the examples section on the website | 17:44 | ||
17:44
sena_kun joined,
pecastro left
17:47
Zoffix joined,
uzl joined
|
|||
Zoffix | jmerelo: but we have a Perl 6 implementation of Mojo::DOM already | 17:47 | |
eco: DOM::Tiny | |||
buggable | Zoffix, DOM::Tiny 'Very small, self-sufficient DOM parser manipulator': github.com/zostay/p6-DOM-Tiny 1 other matching results: modules.perl6.org/s/DOM%3A%3ATiny | ||
Zoffix | Exactly the same interface | ||
You may want to install with zef --/test; it has a huge and lengthy test suite | 17:48 | ||
jmerelo | Zoffix: ah, that's amazing. I didn't know. Thanks! | 17:49 | |
17:51
damnlie left,
damnlie joined,
sena_kun left
17:52
sena_kun joined
|
|||
turdmonkey | I met that guy | 17:52 | |
who wrote that | 17:53 | ||
he was at TPC | |||
he gave the presentation on perl6 ad the rpi, I think | |||
17:53
kurahaupo left
|
|||
Zoffix | cool | 17:53 | |
turdmonkey | yeeeah that's him | ||
he's cool | |||
17:53
kurahaupo joined
|
|||
turdmonkey | I may be working for him soon doing network security for ziprecruiter, LOL | 17:53 | |
uzl | The Spanish translation of Learn X in Y Minutes -- Perl 6 was pushed to the website. It'd greatly benefit from some revision. | 17:56 | |
17:56
pecastro joined
|
|||
uzl | link: learnxinyminutes.com/docs/es-es/perl6-es/ | 17:57 | |
Zoffix | \o/ | 17:58 | |
turdmonkey | Illegally post-declared type..? | 17:59 | |
AlexDaniel | that's pretty cool, IIRC there are many responses asking for Spanish docs | ||
jmerelo: ↑ :) | |||
Zoffix | turdmonkey: you must declare a type before you use it | 18:00 | |
m: my Foo $x; class Foo {} | |||
camelia | 5===SORRY!5=== Type 'Foo' is not declared at <tmp>:1 ------> 3my Foo7⏏5 $x; class Foo {} Malformed my at <tmp>:1 ------> 3my7⏏5 Foo $x; class Foo {} |
||
Zoffix | I forget which one says illegally | 18:01 | |
But stick def first, or use a stub | |||
m: class Foo {…}; my Foo $x; class Foo {} # the first one is a stub | |||
camelia | ( no output ) | ||
Zoffix | lizmat++ # good, and long, weekly | 18:03 | |
turdmonkey | Zoffix: does this mean that it's a single pass compiler? | ||
Zoffix | turdmonkey: yup | ||
turdmonkey | O really!? | 18:04 | |
I figured it was one of those scala-like 23-pass compilers | |||
Zoffix | Yup. It's part of the spec even. You can mutate the language lexically, and unless you execute stuff as you parse, you can't really do it | ||
18:04
Ven`` joined
|
|||
Zoffix | m: role R { }; &R | 18:05 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Illegally post-declared type: R used at line 1 |
||
Zoffix | interesting error :/ | ||
oh, it's just this: | 18:06 | ||
m: A.new; class A { } | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Illegally post-declared type: A used at line 1 |
||
Zoffix | m: class A {…}; A.new; class A { } | ||
camelia | ( no output ) | ||
18:08
mcmillhj left,
molaf joined
|
|||
Zoffix | Filed as R#1965 | 18:09 | |
synopsebot | R#1965 [open]: github.com/rakudo/rakudo/issues/1965 [LTA] LTA error when using `&` coercer on a role | ||
18:11
domidumont left
|
|||
Zoffix | m: BEGIN { $?LANG.refine_slang('MAIN', role { token infix:sym«smaller» { <sym> <O('prec', 'm=', 'assoc', 'left', 'dba', 'chaining', 'iffy', 1, 'diffy', 1, 'pasttype', 'chain')> } } )}; sub infix:<smaller> { $^a < $^b }; say 1 smaller 2 smaller 3 | 18:13 | |
camelia | True | ||
Zoffix | m: BEGIN $?LANG.refine_slang('MAIN', role { token apostrophe { <[ - ' \\ ]> } }, role {}); my $foo\bar = 42; say $foo\bar; | 18:14 | |
camelia | 42 | ||
Zoffix | ^ some examples of mutating the language as you go | ||
turdmonkey | :O | ||
Zoffix | m: sub infix:<♥> { "$^a loves $^b".say }; 42 ♥ 'meows' | 18:15 | |
camelia | 42 loves meows | ||
raschipi | And that's doesn't even get into the work being done on macros. | ||
Zoffix | m: sub infix:<¯\(°_o)/¯> { @_.pick }; say 'Coke' ¯\(°_o)/¯ 'Pepsi'; | 18:16 | |
camelia | Pepsi | ||
turdmonkey | well that is quite cool | 18:17 | |
Zoffix | m: sub prefix:<∑> (*@els) { @els.sum }; say ∑ 1, 2, 3, 4; | ||
camelia | 1234 | ||
Zoffix | oh right | ||
turdmonkey | lol | ||
Zoffix | m: sub prefix:<∑> (*@els) is looser(&[,]) { @els.sum }; say ∑ 1, 2, 3, 4; | ||
camelia | 10 | ||
turdmonkey | haha | 18:18 | |
that unicode... | |||
18:19
ilogger2 joined,
ChanServ sets mode: +v ilogger2
|
|||
Zoffix | m: sub infix:<+> (Int $a, Int $b) { $a - $b }; say 2 + 2; | 18:20 | |
camelia | 0 | ||
Zoffix | And now, for the show's finale! Prepare to be amazed! | ||
raschipi | Now we're getting into the evil side. | ||
18:20
psychoslave joined
|
|||
Zoffix | m: sub infix:<> { $^a + $^b }; say 22; | 18:20 | |
camelia | 4 | ||
Zoffix | magic | 18:21 | |
:) | |||
raschipi | Doing that for multiplication is more fun. | ||
18:22
mcmillhj joined
|
|||
raschipi | m: sub infix:<> { $^a * $^b }; sub f(\x) { x³ - 3x² + 2x }; f 4 | 18:23 | |
camelia | ( no output ) | ||
raschipi | m: sub infix:<> { $^a * $^b }; sub f(\x) { x³ - 3x² + 2x }; say f 4 | ||
camelia | 3912 | ||
Zoffix | u: <> | 18:24 | |
unicodable6 | Zoffix, U+003C LESS-THAN SIGN [Sm] (<) | ||
Zoffix, U+2063 INVISIBLE SEPARATOR [Cf] (control character) | |||
Zoffix, U+003E GREATER-THAN SIGN [Sm] (>) | |||
18:25
ilogger2 joined,
ChanServ sets mode: +v ilogger2
18:30
dct joined,
brrt joined,
sno joined
18:33
mcmillhj joined
|
|||
Geth | doc: acc6730ff7 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6 whitespace |
18:43 | |
synopsebot | Link: doc.perl6.org/language/traps | ||
El_Che | jmerelo: what's happening :) | 18:55 | |
jmerelo | El_Che: nothing unexpected. | ||
18:56
benjikun joined
|
|||
jmerelo | I'm going AFK right now :-) | 18:56 | |
18:56
mcmillhj left
19:01
splatt9990 joined
19:03
bwisti joined
|
|||
turdmonkey | Yes, DOMTiny and HTTPUserAgen are perfect | 19:05 | |
19:07
benjikun2 joined
19:09
benjikun left,
benjikun2 is now known as benjikun
19:10
_uzl joined
|
|||
turdmonkey | the MAIN sub is absolutely spectacular | 19:10 | |
19:11
bwisti left
19:12
_uzl left
|
|||
moritz | yes, very useful | 19:13 | |
El_Che | .tell jmerelo if spain keep playing like that I will be force to cheer the other team :) | 19:14 | |
yoleaux | El_Che: I'll pass your message to jmerelo. | ||
El_Che | turdmonkey: out of the box, mmm, not really | 19:16 | |
turdmonkey: with this: sure! docs.perl6.org/language/functions#...-MAIN-OPTS | |||
turdmonkey: docs.perl6.org/language/functions#...d-anywhere | |||
turdmonkey | oh my | 19:18 | |
Geth | ecosystem: nicqrocks++ created pull request #400: Move Git::Wrapper to GitLab |
||
19:18
mcmillhj joined
19:21
brrt left
19:22
bwisti joined
19:23
mcmillhj left,
wamba joined
|
|||
[Coke] | m: say "🏩".uninames; | 19:27 | |
camelia | (LOVE HOTEL) | ||
19:27
lizmat joined
|
|||
[Coke] | O_o; . o O (thanks, 🗾) | 19:27 | |
lizmat waves from SLC | 19:28 | ||
yoleaux | 18:26Z <samcv> lizmat: i was disapointed that it didn't let me choose multiple options for what my most proficient languages | ||
El_Che | samcv: indeed | ||
[Coke] | lizmat: You at the airport? Safe travels! | 19:29 | |
El_Che | samcv: benjikun did the poll (iirc) | 19:30 | |
AlexDaniel | samcv: you're not the only one, some people wrote more than one in Other… field | ||
benjikun | yoleaux: Yeah I saw some people on reddit were disappointed about the language question alongside not being able to choose multiple text editors | 19:31 | |
yoleaux | 10:57Z <Zoffix> benjikun: you wanted to add links to rakudo.org The sauce is here: github.com/perl6/rakudo.org/ The templates are in templates/ Add [REAPP] (including brackets) to commit title to restart the app with your changes | ||
benjikun | We'll certainly do that next time | ||
El_Che | benjikun++ | ||
AlexDaniel | benjikun: fwiw the unicode question is a bit wrong I think, something to fix for the next time also | 19:32 | |
benjikun | It's a little crowded with the answer choices | ||
but I know why you wanted the data, nevertheless | |||
19:32
mcmillhj joined
|
|||
benjikun | does seem useful | 19:33 | |
AlexDaniel | benjikun: it says “No, and I don't want to use unicode characters in my source code” but for some people I'd expect the answer is “Yes I can, but I don't want …” | ||
lizmat | [Coke] yeah, waiting for things to happen | ||
[Coke] | (languages) what's this from? | ||
AlexDaniel | [Coke]: survey | ||
“Not including Perl 6, what language are you most proficient in?” | |||
turdmonkey | "In what languages are you most proficient" | 19:34 | |
[Coke] | AlexDaniel: What survey? | ||
turdmonkey | Anything less than utterly perfect grammar is punishable by DEATH | ||
AlexDaniel | [Coke]: docs.google.com/forms/d/e/1FAIpQLS...g/viewform | ||
benjikun | [Coke]: We're still taking answers | 19:36 | |
wanted to snatch the people that look at p6weekly | |||
19:37
mcmillhj left
|
|||
AlexDaniel | [Coke]: btw this was posted on twitter, on reddit, on facebook, and it was mentioned in p6weekly… It was only up for like one day, but it makes me wonder, is there any other social media platform that we forgot? Something that you follow? | 19:37 | |
Geth | p6-sake: 5ed74a9da2 | (Tom Browder)++ (committed using GitHub Web editor) | README.md think this word (alike) is the intended one |
19:38 | |
[Coke] | I didn't see it on twitter or FB, and I'm not on reddit. | 19:40 | |
I haven't gone through this week's weekly yet. | |||
El_Che | facebook is woolfy | ||
[Coke] | where was it posted on twitter? | 19:43 | |
Perhaps there's another account for me to follow (and never see actual updates from because twitter is a firehose) | |||
El_Che | I saw it in Zoffix feed | ||
19:43
mcmillhj joined
|
|||
El_Che | [Coke]: twitter.com/perl6org | 19:44 | |
(retweeted it) | |||
I suspect Zoffix manage that account | |||
moritz | I do, actually | ||
El_Che | I remember now | ||
I knew that :) | |||
moritz | though I wouldn't mind handing the password to another person who is willing to help me | 19:45 | |
(not that it's very much to do, but having a backup never hurts) | |||
El_Che | feel free to ping me if you need a backup | 19:46 | |
brb, last minutes of match :) | |||
turdmonkey | woah woah | ||
Moritz as in Moritz Lenz, the guy who wrote Perl 6 Fundamentals and the Regex one? | 19:47 | ||
moritz | turdmonkey: the very same; I take you read at least one of them? :) | ||
turdmonkey | Both. | ||
moritz | nice :-) | ||
turdmonkey | I like how dense they are. | ||
No fluff. | |||
Like the K&R C of Perl 6 | |||
moritz | I'd a appreciate a rating on amazon, btw :-) | 19:48 | |
turdmonkey | Of course | ||
moritz | (don't need to write pages of review) | ||
19:48
mcmillhj left
|
|||
El_Che | ok, jmerelo lost some hair today | 19:49 | |
19:49
joya joined
|
|||
[Coke] | jmerelo had hair to lose? <monty python>Luxury!</monty> | 19:52 | |
Geth | ecosystem: 10699c899c | Nic++ (committed using GitHub Web editor) | META.list Move Git::Wrapper to GitLab |
19:53 | |
ecosystem: f1a05ab2f5 | Nic++ (committed using GitHub Web editor) | META.list Merge pull request #400 from nicqrocks/patch-1 Move Git::Wrapper to GitLab |
|||
pmurias | blogs.perl.org/users/pawel_murias/2...iment.html - my new blog post | 20:01 | |
timotimo | pmurias: is that "with" supposed to be "without"? | 20:02 | |
El_Che | pmurias: just to late for the weekly :( | ||
20:03
mcmillhj joined
|
|||
AlexDaniel | not too late! It's at least 6 days earlier! | 20:04 | |
20:04
raschipi joined
|
|||
turdmonkey | is "~$url" anything special? the tilde? | 20:04 | |
is it the bit negation? | 20:05 | ||
AlexDaniel | it's stringification | ||
m: dd ~5 | |||
camelia | "5" | ||
AlexDaniel | m: dd 5 | ||
camelia | 5 | ||
turdmonkey | ahh, that's right, '~' is the "string operator" right? | 20:06 | |
it is the Master String | |||
20:08
mcmillhj left
|
|||
raschipi | It's the string in "String". | 20:09 | |
turdmonkey | hm, that's pretty cool | 20:11 | |
lizmat | weekly: blogs.perl.org/users/pawel_murias/2...iment.html | 20:12 | |
notable6 | lizmat, Noted! | ||
pmurias | hopefully it will pass a lot more tests by next week :) | 20:14 | |
20:17
mcmillhj joined
|
|||
El_Che | pmurias: I like your attitude! | 20:17 | |
raschipi | Not even unprecendented, it was like that for the javascript backend. | 20:18 | |
20:20
zachk joined
|
|||
timotimo | i have a feeling that pmurias might know a thing or two about the javascript backend | 20:20 | |
20:20
Ven`` joined
20:21
zachk left
20:22
zachk joined
|
|||
raschipi | I know and I was just going to ask him about it. | 20:22 | |
20:23
zachk left,
zachk joined
|
|||
raschipi | pmurias: you plan to run rakudojs just in node.js or in browsers too? | 20:23 | |
benjikun | raschipi: From one of his previous blog posts: "As part of working on making Rakudo.js run in the browser.." | 20:28 | |
raschipi | Oh, right. So just the graal interpreter embedded in node.js isn't enough. | 20:29 | |
pmurias | raschipi: the browser is the vastly more important target for the js backend :) | 20:36 | |
raschipi | Will the JIT generate asm.js? :p | 20:37 | |
turdmonkey | I'm trying to use HTTPUserAgent and DOMTiny to get the source from a web page and then extract the links, but I'm getting an odd error | 20:38 | |
pastebin.com/xtqrVcDL | |||
"Cannot resolve caller AUTOGEN(DOM::Tiny: HTTP::Response); none of these signatures match: | 20:39 | ||
(DOM::Tiny:U $: Str:D $html, Bool :$xml is copy, *%_ --> DOM::Tiny:D) | |||
(DOM::Tiny:D $: Str:D $html, Bool :$xml, *%_ --> DOM::Tiny:D) | |||
in sub MAIN at dom.p6 line 14 | |||
in block <unit> at dom.p6 line 8 | |||
pmurias | raschipi: on which backend? | 20:41 | |
lizmat | boarding& | ||
20:41
lizmat left
|
|||
pmurias | raschipi: the graalvm team has some vague plans to maybe run on webassembly once it matures but I don't count on it | 20:41 | |
geekosaur | turdmonkey, an HTTP::Response will contain the page, but is not only the page text. Possibly stringifying it will do what you want | 20:42 | |
that is, DOM::Tiny.parse(~$response) | 20:43 | ||
20:45
dcorzine joined
|
|||
turdmonkey | I see. | 20:45 | |
20:46
labster joined
|
|||
turdmonkey | Yay | 20:47 | |
pmurias | raschipi: the truffle backend is not a replacement for the js one (which is not abandoned) | 20:48 | |
raschipi | DOM::Tiny could have an AUTOGEN candidate that accepted an HTTP::Response and did the right thingwith it... Gonna implement it tonight, someone thinks that's not a good idea? | ||
turdmonkey | Isn't one of Perl's biggest upsides "DWIM" ? | ||
raschipi | pmurias: I got that, I was just thinking about their relationship. | ||
benjikun | lizmat: airplane? | ||
stay safe | |||
raschipi | She's safer while flying than at the airport. | 20:49 | |
benjikun | true | ||
turdmonkey | raschipi: Can I see how you do it? How are you going to start? | 20:50 | |
geekosaur | turdmonkey, yes, but someone has to think of it :) | ||
in this case it'd just do what you did: see it got an HTTP::Response ibject and stringify it | |||
then possibly nextwith to pass it to the correct candidate | 20:51 | ||
*see if it | |||
raschipi | It would be very short, something like copying something like this: (Str:D $html, Bool :$xml, *%_ --> DOM::Tiny:D) into (Str( HTTP::Response) $html, Bool :$xml, *%_ --> DOM::Tiny:D) and then calling the already existing function. | 20:52 | |
method, rather | |||
20:52
Zoffix joined
|
|||
Zoffix | turdmonkey: if all you're trying to do is fetch content, you could take WWW module for a spin instead | 20:53 | |
raschipi | with nextsame instead of nextwith, I think. Perhaps detect the filetype and fill the :$xml argument automatically. | ||
Zoffix | eco: WWW | ||
buggable | Zoffix, WWW 'No-nonsense, simple HTTPS client with JSON decoder': github.com/zoffixznet/perl6-WWW 5 other matching results: modules.perl6.org/s/WWW | ||
Zoffix | raschipi: how will you get the right type? | ||
runtime loading? | |||
turdmonkey | Zoffix: I will look into that, too. I want to make a script which will crawl a web page, and then I want to use GTK later on to visualize the data | ||
20:54
mcmillhj left
|
|||
Zoffix | IMO trying to do that is over-engineering. There's like half a dozen, if not more, of HTTP fetching modules. | 20:54 | |
(the HTTP::Response thing, not the crawling thing) | |||
turdmonkey | Thanks for pointing me in the right direction. I'm not very familiar with the Perl 6 ecosystem yet | 20:55 | |
raschipi | What about making HHTP::Response Stringy? | ||
geekosaur | that sounds like more of a win, yes. I think most other uses you;d have for it (e.g. extracting cookies or other HTTP headers) would use method calls --- but doublecheck that first | 20:56 | |
things could get interesting if it does Positional or Associative, etc. | 20:57 | ||
20:57
n1ge joined
|
|||
raschipi | Yeah, I would rather not make it THAT interesting of an object... | 20:58 | |
geekosaur | DWIM, WAT | ||
raschipi | Make it Cool, Stringfy to get the text and numify to get the status code | 20:59 | |
21:02
Ven`` left,
Ven`` joined
|
|||
Zoffix | e: constant term:<😎> = Cool; say 42 ~~ 😎; multi is-cool($ where 😎) { say "it's cool, bruh" }; multi is-cool(|) { say "ain't cool" }; is-cool 42; is-cool class UnCool {} | 21:04 | |
evalable6 | True it's cool, bruh ain't cool |
||
Zoffix is disappointed multi is-cool(😎) didn't want to compile | 21:05 | ||
raschipi | Cool | 21:06 | |
Hugs and kisses everyone, my wifeis here I'm going home. Later. | |||
21:06
raschipi left
|
|||
Zoffix | m: BEGIN $?LANG.refine_slang: 'MAIN', role { token identifier { '😎' | <.ident> [ <.apostrophe> <.ident> ]* } }; constant 😎 = Cool; multi is-cool( 😎) { say "it's cool, bruh" }; multi is-cool(|) { say "ain't cool" }; is-cool 42; is-cool class UnCool {} | 21:08 | |
camelia | it's cool, bruh ain't cool |
||
Zoffix | hahahaaha :D | ||
21:08
wamba left
21:09
mcmillhj joined
21:11
Ven`` left
|
|||
geekosaur | Cool and the gang? | 21:11 | |
benjikun | *Kool and the gang | 21:12 | |
21:14
mcmillhj left,
Zoffix left
|
|||
geekosaur | yes, that was the joke (riffing on Zoffix's Cool shenanigans) | 21:15 | |
21:16
margeas joined
|
|||
turdmonkey | Ah, I see that DOMTiny talks about stringification in the docs now | 21:17 | |
21:17
smls joined
|
|||
turdmonkey | If you convert the DOM::Tiny object to a string using Str, ~, or putting it in a string, it will render the markup. | 21:17 | |
smls | m: class A { method FLATTENABLE_LIST { () }}; sub a (:$a) { }; a |A.new; | 21:18 | |
camelia | This type (List) does not support elems in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
turdmonkey | Now, to make it concurrent... | ||
smls | ^^ What's that error about? | ||
21:20
Zoffix joined
|
|||
Zoffix | smls: it wants an NQP list, not a Perl 6 one | 21:21 | |
smls | Ah. | ||
Zoffix | smls: also, that method is very much secret sauce and it shouldn't be shown to users. | ||
smls | But I'm implementing my own Hash-like type... :P | ||
Zoffix | Use the available public methods. And if those are not enough, file an Issue. | 21:22 | |
smls | What methods are available to control binding of the type to signatures? | 21:23 | |
I thought that's what FLATTENABLE_LIST and FLATTENABLE_HASH are for... | |||
Zoffix | Dunno, give me an example? | ||
smls | s/binding/flattening/ | 21:24 | |
like: | 21:25 | ||
m: sub a (*@a, *%a) { dd @a; dd %a }; a |Hash.new("a" => 42); | |||
camelia | [] {:a(42)} |
||
smls | If I replace Hash.new with MyHash.new then what do I need to add to class MyHash to get the same output? | 21:26 | |
Zoffix | m: class A is Hash { }; sub a { dd @_; dd %_ }; a |A.new("a" => 42); | ||
camelia | [] {:a(42)} |
||
Zoffix | That's all I know. | ||
smls | Hm... | 21:28 | |
timotimo | don't you want to change the .Capture of your class? | ||
smls | timotimo: No, that's separate. | ||
Zoffix | Capture would just affect signature unpacking, not slipping. | ||
21:29
mcmillhj joined
|
|||
timotimo | OK | 21:29 | |
Zoffix | m: class A { has $.a; method Capture { \(<meow>, :$!a) } }; sub a ($ (*@_, *%_)) { dd @_; dd %_ }; a |A.new("a" => 42); | ||
camelia | Default constructor for 'A' only takes named arguments in block <unit> at <tmp> line 1 |
||
Zoffix | m: class A { has $.a; method Capture { \(<meow>, :$!a) } }; sub a ($ (*@_, *%_)) { dd @_; dd %_ }; a |A.new(a => 42); | ||
camelia | ["meow"] {:a(42)} |
||
21:31
splatt9990 left
|
|||
smls | I wonder to what extend one can override all behavior when subclassing from Hash, and what performance overhead it would have to carry the unused baseclass internals around... | 21:31 | |
Zoffix | Filed R#1966 | 21:33 | |
synopsebot | R#1966 [open]: github.com/rakudo/rakudo/issues/1966 [RFC] Ability to specify how an object flattens in signatures | ||
21:34
mcmillhj left
|
|||
Zoffix | smls: FWIW, if you go the Hash route, keep it mind it won't init your attribute defaults with its default new | 21:35 | |
m: class A is Hash { has $.a = 42 }; dd A.new | |||
camelia | {} | ||
Zoffix | m: class A is Hash { has $.a = 42; method new {self.bless: |%_} }; dd A.new | 21:36 | |
camelia | {} | ||
Zoffix | um | ||
right, it's got it's own perl too | 21:37 | ||
smls | :P | ||
Zoffix | m: class A is Hash { has $.a = 42; method perl { dd $!a } }; dd A.new.perl | ||
camelia | Any $!a = Any Nil |
||
Zoffix | m: class A is Hash { has $.a = 42; method new { self.bless: |%_ }; method perl { dd $!a } }; A.new.perl | 21:38 | |
camelia | Int $!a = 42 | ||
21:38
sena_kun joined
|
|||
Zoffix | That's RT#130020 | 21:38 | |
synopsebot | RT#130020 [open]: rt.perl.org/Ticket/Display.html?id=130020 [RFC][@LARRY] Create a set of conventions to minimize impact internal changes to user's code | ||
Zoffix & | |||
21:38
Zoffix left
|
|||
turdmonkey | Is Zoffix in the background now? | 21:39 | |
smls | Yeah, Perl 6 built-in types don't make it easy to subclass them. I think I once tried it with List but gave up and went the "A does Positional does Iterable" route with a private List attribute instead... | ||
masak | turdmonkey: Zoffix is so in the background, he even logged off! :) | ||
(but yes, "in the background" is what that shorthand means) | 21:40 | ||
AlexDaniel | fg | ||
21:48
mcmillhj joined
21:51
smls left
21:53
mcmillhj left
|
|||
turdmonkey | hahaaaa | 22:04 | |
12 lines of code(excluding the preable stuff) to make a crawler which prints the data to a file | 22:05 | ||
preamble* | |||
22:06
evalable6 joined,
ChanServ sets mode: +v evalable6,
quotable6 joined,
ChanServ sets mode: +v quotable6,
reportable6 joined,
notable6 joined,
ChanServ sets mode: +v reportable6,
ChanServ sets mode: +v notable6,
benchable6 joined,
committable6 joined
|
|||
turdmonkey | Hm, I could save some lines by making it more idiomatic e.g `spurt "linkfile", "$e<a href>";` | 22:06 | |
LOL one line... | |||
wtf.. | |||
perl 6 is cool | |||
AlexDaniel | turdmonkey: well, I can probably give some bonus hints to make it even shorter if you can show the code :) | 22:10 | |
turdmonkey | for hahaha | ||
alright, i'll show it the first time I wrote it, which is not very idiomatic. | 22:11 | ||
Juerd | turdmonkey: Care to share the line? :) | ||
turdmonkey | pastebin.com/tnv6WGDq | 22:12 | |
AlexDaniel | hm can't you do my $ua = HTTP::UserAgent.new: :10timeout; | ||
turdmonkey | I can? | ||
AlexDaniel | or any other form that you prefer, HTTP::UserAgent.new(timeout => 10) | 22:13 | |
turdmonkey | oooo | ||
AlexDaniel | that doesn't work, weird | 22:14 | |
turdmonkey | hmm | 22:16 | |
the first one works | 22:17 | ||
.new: :10timeout; | |||
AlexDaniel | turdmonkey: it does nothing silently | ||
the timeout is still 180 | |||
turdmonkey | hahahahaha | 22:18 | |
22:18
raschipi joined,
mcmillhj joined
|
|||
turdmonkey | ok, this is a little weird | 22:19 | |
AlexDaniel | turdmonkey: I created this ticket: github.com/sergot/http-useragent/issues/206 :) | ||
turdmonkey | when i run "$fh.print($e<a href>, ':', $e.text, "\n");" | 22:20 | |
it prints everything to the file with (Str) in front ((Str) /community/):Community | 22:21 | ||
AlexDaniel | just $e<href> ? | 22:22 | |
turdmonkey | but when i run "$fh.say($e<a href>, ':', $e.text); it prints everything to the file properly, but I get this error | ||
"Use of uninitialized value of type Str in string context. | |||
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. | |||
AlexDaniel | yeah | ||
turdmonkey | in block at dom.p6 line 17" | ||
AlexDaniel | turdmonkey: so I'd guess that $e is your <a …> tag already | 22:23 | |
turdmonkey: and it's associative so you can access the attributes with {'href'} or <href> | |||
but there's no ‘a’ attribute | |||
am I right? | |||
22:24
mcmillhj left,
mcmillhj joined
|
|||
turdmonkey | Yes, you are correct. | 22:24 | |
Thanks. | 22:25 | ||
Is it just me, or are there a lot of quirks? I tend to assume things are my fault, since I am not familiar with the Perl 6 syntax, but I come across strange errors on a regular basis | |||
I also haven't learned a new language in a while, so perhaps I am biased. | 22:26 | ||
timotimo | we consider bad error messages a bug, maybe you've got something we can fix? | 22:28 | |
turdmonkey | Well, I don't know if i's a "bad error message", since it directly told me what was happening. | 22:29 | |
I think it was my fault for not being familiar with the module | |||
raschipi | You just need a little more practice to become fluent, it's the same in any other language. | 22:30 | |
Juerd | There are also actual quirks :) | 22:33 | |
AlexDaniel | Juerd: btw I'm serious about the style guide :) | 22:35 | |
Juerd | My memory fails me. What was that again? | ||
AlexDaniel | Juerd: github.com/perl6/roast/issues/439#...-400110713 | ||
22:36
mcmillhj left
|
|||
Juerd | AlexDaniel: I don't have sufficient experience with Perl 6 yet to write such a document. I can comment on specific things. | 22:36 | |
benjikun | AlexDaniel: github.com/sergot/http-useragent/b...nt.pm6#L75 | ||
AlexDaniel | Juerd: well, I'm expecting others to chime in, so all it needs is just a start :) | 22:37 | |
benjikun | wouldn't they need timeout included as a BUILD argument to make that an option at declaration | ||
Juerd | But even then, I'm not going to write a list of "consider using <alternative>" because nobody likes to read that. I'm familiar with training and instructing people, and they want to hear "do this, don't do that", and they're intelligent enough to realise that there are always exceptions. | ||
AlexDaniel | benjikun: another option is to remove the BUILD method entirely | ||
Juerd | AlexDaniel: If it's a collaborative effort, we'll just get deadlocked in bikeshedding, I'm sure. | ||
AlexDaniel | benjikun: some initialization can be done in TWEAK | ||
benjikun | ah, true | ||
AlexDaniel | Juerd: I'm more optimistic about this :) | 22:38 | |
Juerd | AlexDaniel: I'm not; will send a private message with some more details in a minute | 22:39 | |
22:41
mcmillhj joined
|
|||
benjikun | Juerd: are you talking just about that issue on GitHub in relation to bikeshedding or work as a whole | 22:48 | |
am I missing part of this conversation | 22:53 | ||
AlexDaniel | greppable6: \<\-\> | 22:54 | |
greppable6 | AlexDaniel, 124 lines, 36 modules: gist.github.com/c53627c55a1569076f...bc96c3b4a4 | ||
AlexDaniel | wtf where's markdown rendering? | ||
timotimo | any | that weren't escaped properly? or html somehow ended up inside something somewhere? | 22:55 | |
22:57
sena_kun left
|
|||
AlexDaniel | timotimo: I clicked `Edit`, then `Save`, and now it's rendering properly: | 22:57 | |
gist.github.com/AlexDaniel/dc3ddc5...9e445b38d0 | |||
joya | question: is it normal that if you assign an rhs hash value to an lhs hash variable, its keys are stringified? | ||
Juerd | benjikun: Writing a style guide collaboratively would result in an infinite bikeshed. | 22:58 | |
benjikun | oh, I see | 22:59 | |
yeah that's a possibility | |||
AlexDaniel | joya: yes, I think. You probably want to use binding := and maybe there are some helpful hints on docs.perl6.org/language/hashmap#No...ject_hash) | ||
Juerd | benjikun: Write anonymous hashes with {}, says the person who follows the design and knows this was the originally intended way to write them. Write hashes with %(), says the person who got bitten by parsing rules that caused their {} to be interpreted as a block. No, use "hash", I say, because that seems to be the only way to do so reliably -- even though I would have preferred "{}" otherwise, and I | 23:01 | |
personally haven't been bitten by it that much yet. No, just don't write anonymous hashes, just initialize named ones with a list of pairs, I expect someone to comment at some point. | |||
With %() I meant %(something), of course, with 'something' being any of the numerous options available. | 23:02 | ||
Including whitespace. | |||
benjikun | I know what you mean, perhaps we just need to choose one and stick with it | ||
AlexDaniel | s:g/anonymous/empty/ :) | ||
Juerd | AlexDaniel: Empty and anonymous | ||
benjikun | and force it in docs for newcomers | ||
Juerd | benjikun: That too is controversial. Some (most) appear to want the docs not to stick to any single solution, but instead be sufficiently descriptive of code that's already in the wild. | 23:03 | |
Personally, I don't like "hash", but I value easy teaching and maintainability over other arguments, so for me it's still a clear winner. | 23:04 | ||
benjikun | will inevitably make Perl 6 seem convoluted and tricky to newbies, but expressive and personal to long-timers | ||
lots of trade-offs | 23:05 | ||
I suppose it all falls on how our docs and first-time resources are setup | 23:09 | ||
23:13
itaylor57 joined
23:14
cpage_ joined
23:17
cpage_ is now known as cpage
23:20
BenGoldberg joined
23:21
skids joined
23:28
subroot joined
23:36
Khisanth joined
23:39
pecastro_ joined
23:50
margeas left
|
|||
joya | AlexDaniel: 😊 | 23:57 | |
that is strange behaviour, though | 23:58 | ||
i mean, you wouldn't expect a deep copy of a typed container to erase types | |||
23:59
mcmillhj left
|