»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:00
vrurg joined,
ggoebel_ left
00:01
ggoebel left,
p6bannerbot sets mode: +v vrurg
00:05
lizmat left
00:08
Herby_ joined
00:09
p6bannerbot sets mode: +v Herby_
00:12
TreyHarris left
00:16
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris,
ggoebel joined,
ggoebel_ joined,
p6bannerbot sets mode: +v ggoebel
00:17
p6bannerbot sets mode: +v ggoebel_
00:22
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
00:30
TreyHarris left
00:34
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
00:38
Kaiepi left
00:41
MasterDuke left
00:42
Kaiepi joined,
molaf left,
p6bannerbot sets mode: +v Kaiepi
00:49
TreyHarris left
00:52
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
00:53
ZzZombo_ left,
ZzZombo_ joined,
hitchcock.freenode.net sets mode: +v ZzZombo_,
p6bannerbot sets mode: +v ZzZombo_,
ZzZombo_ is now known as ZzZombo
00:57
chenyf_ left
01:00
rgrau_ joined,
pmichaud joined,
ambs joined,
simcop2387_ joined,
avuserow joined,
hahainternet joined,
afresh1 joined
01:01
p6bannerbot sets mode: +v rgrau_,
p6bannerbot sets mode: +v pmichaud,
p6bannerbot sets mode: +v ambs,
susmus joined,
p6bannerbot sets mode: +v simcop2387_,
p6bannerbot sets mode: +v avuserow,
shadowpaste joined,
p6bannerbot sets mode: +v hahainternet,
p6bannerbot sets mode: +v afresh1,
perlbot_ joined,
p6bannerbot sets mode: +v susmus,
p6bannerbot sets mode: +v shadowpaste
01:02
aindilis joined,
p6bannerbot sets mode: +v perlbot_,
p6bannerbot sets mode: +v aindilis
01:06
mantovani joined,
p6bannerbot sets mode: +v mantovani
01:07
TreyHarris left
|
|||
mantovani | I awlays forget the Perl'6 cpan name, I should stop to smoke :) | 01:07 | |
I spend a lot of time on airplanes, do you guys know if I can download Perl'6 documentation on PDF or something like it ? | 01:08 | ||
01:10
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
01:14
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
|
|||
MasterDuke | mantovani: it's available somewhere as a single page, you could print that to pdf | 01:17 | |
01:18
ZzZombo left
|
|||
Herby_ | utilizing unicode characters confused me | 01:20 | |
it looks like U+2260 is the "not-equal" symbol | |||
how do I use that in REPL? or with camelia? | |||
mantovani | MasterDuke: could you help me to find ? | 01:21 | |
MasterDuke: there's no a perldoc like ? | |||
MasterDuke | mantovani: there is p6doc | 01:22 | |
can be installed with zef | |||
trying to find the single page docs... | |||
mantovani: docs.perl6.org/perl6.html this maybe | 01:23 | ||
Herby_ | m: [U+2260] | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: U used at line 1 |
||
Herby_ | m: put [U+2260] | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: U used at line 1 |
||
mantovani | thank you very much! | ||
Herby_ | m: put "[U+2260]" | ||
camelia | [U+2260] | ||
mantovani | MasterDuke++ | ||
MasterDuke | Herby_: have you seen this? docs.perl6.org/language/unicode_entry | 01:24 | |
m: say "\c[2260]" | 01:25 | ||
camelia | rakudo-moar b07874e06: OUTPUT: «ࣔ» | ||
mantovani | MasterDuke: it's so big that chrome is suffering to generate the PDF. | ||
Herby_ | MasterDuke: I had not. thanks! | ||
01:25
TreyHarris left
|
|||
mantovani | Herby_: thank you very much, you help me a lot. | 01:26 | |
MasterDuke | mantovani: it took firefox about 10-15s | 01:27 | |
mantovani | I think took about 50 seconds from Chrome on a I7 2.5 | 01:28 | |
01:28
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
01:33
regreg joined,
chenyf_ joined
01:34
p6bannerbot sets mode: +v regreg,
aindilis left,
p6bannerbot sets mode: +v chenyf_
01:35
aindilis joined,
p6bannerbot sets mode: +v aindilis
|
|||
Herby_ | mantovani: happy to help :) | 01:36 | |
01:42
TreyHarris left
01:46
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
01:51
Kaiepi left
01:52
Kaiepi joined,
p6bannerbot sets mode: +v Kaiepi
01:59
abbychau joined,
p6bannerbot sets mode: +v abbychau
02:00
TreyHarris left
|
|||
abbychau | hi! | 02:00 | |
mantovani | just to be sure, github.com/sylvarant/Avro | 02:02 | |
"{favorite_color => (Any), favorite_number => 256, name => Alyssa}" | |||
This output "(Any)" is a bug, correctly ? | |||
02:04
chenyf_ left
|
|||
mantovani | suppose to be "{u'favorite_color': None, u'favorite_number': 256, u'name': u'Alyssa'} | 02:04 | |
02:04
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
02:08
kerframil left
|
|||
lindylex | m: say "\c[2260]" | 02:10 | |
camelia | rakudo-moar b07874e06: OUTPUT: «ࣔ» | ||
02:12
ZzZombo joined,
p6bannerbot sets mode: +v ZzZombo
02:13
chenyf_ joined
02:14
p6bannerbot sets mode: +v chenyf_
02:16
ufobat_ joined,
p6bannerbot sets mode: +v ufobat_
02:19
TreyHarris left,
ufobat left
02:22
aborazmeh left
02:23
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
|
|||
lindylex | mantovani : wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains perl6.org --no-parent docs.perl6.org/perl6.html | 02:32 | |
02:33
ZzZombo left
02:35
ZzZombo joined,
p6bannerbot sets mode: +v ZzZombo
02:37
TreyHarris left
02:41
ZzZombo left,
ZzZombo_ joined,
ZzZombo_ is now known as ZzZombo,
p6bannerbot sets mode: +v ZzZombo
|
|||
Herby_ | looking at a perl6 exercise: What is 7.297e-3 as a fraction | 02:41 | |
kind of stumped | |||
m: 7.297e-3.Int | 02:43 | ||
camelia | ( no output ) | ||
Herby_ | m: put 7.297e-3.Int | ||
camelia | 0 | ||
MasterDuke | m: say 7.297e-3.Rat | 02:50 | |
camelia | 0.007297 | ||
MasterDuke | m: my @n = 7.297e-3.Rat.nude; say "@n[0] / @n[1]" | 02:51 | |
camelia | 23 / 3152 | ||
02:52
Herby__ joined
02:53
p6bannerbot sets mode: +v Herby__
|
|||
lindylex | SmokeMachine : I went back to my original regex and it worked with the addition of the <?after [^|\s]> | 02:54 | |
say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/ <?after [^|\s]> \d? [<[.-]>]? [ << \d ** 3..4 >> ] ** 3 % <[.-]> / ; | 02:55 | ||
evalable6 | (「917.234.5678」 「1-526-553-1234」 「1.917.123.4567」) | ||
lindylex | m: say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/ <?after [^|\s]> \d? [<[.-]>]? [ << \d ** 3..4 >> ] ** 3 % <[.-]> / ; | ||
camelia | (「917.234.5678」 「1-526-553-1234」 「1.917.123.4567」) | ||
lindylex | timotimo : thanks for th help earlier I got it to work as I had originally written the addition of the <?after [^|\s]> EXAMPLE :: say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/ <?after [^|\s]> \d? [<[.-]>]? [ << \d ** 3..4 >> ] ** 3 % <[.-]> / ; | 02:56 | |
timotimo : This <?after [^|\s]> solved the problem. | 02:57 | ||
03:00
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
03:01
p6bannerbot sets mode: +v aborazmeh,
abbychau left
03:02
Ulti joined,
sivoais joined,
sjn joined,
f3ew joined,
sivoais left,
sivoais joined,
p6bannerbot sets mode: +v sivoais,
phogg joined,
perigrin joined
|
|||
SmokeMachine | lindylex: good to know! | 03:02 | |
03:03
p6bannerbot sets mode: +v Ulti,
p6bannerbot sets mode: +v sivoais,
p6bannerbot sets mode: +v sjn,
p6bannerbot sets mode: +v f3ew,
p6bannerbot sets mode: +v phogg
|
|||
SmokeMachine | mantovani: hi!!! Why do you think that’s a bug? | 03:03 | |
03:03
p6bannerbot sets mode: +v perigrin
|
|||
mantovani | SmokeMachine: isn't | 03:03 | |
03:04
phogg left,
phogg joined,
karatkievich.freenode.net sets mode: +v phogg,
p6bannerbot sets mode: +v phogg
|
|||
lindylex | It is a game changer for me. Because so many problems unpredictable things have occurred which never made sense to me. | 03:04 | |
SmokeMachine | Yes, that isn’t... (Any) is an any object type | ||
mantovani | how do I create a {foo => {bar => "baz"}} in Perl 6 ? | ||
SmokeMachine | m: dd {foo => {bar => "baz"}} | 03:05 | |
camelia | Hash % = {:foo(${:bar("baz")})} | ||
03:05
aborazmeh left
|
|||
SmokeMachine | mantovani: 👆 | 03:05 | |
mantovani | is not working with this Avro module | ||
SmokeMachine: paste.scsys.co.uk/581756 | 03:06 | ||
I want to put the data inside address, address => { street1 => "foo" } | |||
doesn't work like this ^ | 03:07 | ||
SmokeMachine | The `Q<<>>` creates a string | ||
03:07
tony-o joined
|
|||
mantovani | I know | 03:07 | |
is not the schema | |||
$writer.append({name => "Alyssa", address => Any}); | |||
I'm talking about this line ^ | |||
$writer.append({name => "Alyssa", address => {"street1" => "foo"}); # Doesn't work | 03:08 | ||
03:08
p6bannerbot sets mode: +v tony-o
|
|||
mantovani | $writer.append({name => "Alyssa", address => {"street1" => "foo"}}); # Doesn't work | 03:08 | |
SmokeMachine | Why are you using an undefined Any? | ||
mantovani | forget any | 03:09 | |
look the last example | |||
SmokeMachine | What’s the error message? | 03:10 | |
I don’t know this module... | |||
mantovani | Parameter '$buf' of routine 'write' must be an object instance of type 'Blob', not a type object of type 'Blob'. Did you forget a '.new'? | 03:11 | |
It's not an useful error | |||
zfs install Avro | |||
perl6 test.p6 | |||
SmokeMachine | I’m not on a computer... | ||
ZzZombo | It's about as useful as it can get. | ||
mantovani | Someone knows how do I create complex types with Avro module ? | 03:12 | |
actually is just a simple {name => "Alyssa", address => {"street1" => "foo"}} | 03:13 | ||
:( | |||
SmokeMachine: nothing? | 03:19 | ||
03:22
simcop2387_ left,
simcop2387_ joined,
hitchcock.freenode.net sets mode: +v simcop2387_,
p6bannerbot sets mode: +v simcop2387_
03:23
simcop2387_ is now known as simcop2387
|
|||
SmokeMachine | Does the testfile exists? | 03:29 | |
But you are using :w... | |||
mantovani | yes.... | ||
this is not the issue | |||
the issue is the line that I showed | |||
SmokeMachine | yes, but on the modules code, when you `.append` it `$!buffer.write`... | 03:33 | |
mantovani: Im on my computer now.. | 03:34 | ||
it didn't break here... | |||
mantovani: this was the answer: {address => (Any), customer_number => (Any), customer_type => (Any), name => Alyssa, source => (Any)} | |||
what's your perl6's version? | 03:35 | ||
Herby__ | Is there a go-to library for html parsing? | 03:45 | |
outside of dom::tiny | 03:46 | ||
03:49
hamhu3_ joined,
p6bannerbot sets mode: +v hamhu3_
03:51
hamhu3 left
03:54
hamhu3_ left,
hamhu3 joined
03:55
p6bannerbot sets mode: +v hamhu3
|
|||
lindylex | Not sure why this just freezes. It is a simple crossword puzzle helper hastebin.com/bifegofime.pl | 03:58 | |
04:02
Herby__ left
04:26
rindolf joined
04:27
ccc joined,
p6bannerbot sets mode: +v rindolf
04:28
p6bannerbot sets mode: +v ccc
|
|||
perlawhirl | lindylex: what arguments does the some expect? | 04:29 | |
ccc | Is there a more succint way to do this %foo{%foo.keys.grep({ ~~ /A|B|C/})}:p | ||
lindylex | perlawhirl : ./ch.pl .e.rl | 04:30 | |
perlawhirl : update hastebin.com/towoyidoqi.pl | |||
It output nothing when I use a variable. Whne hard coded it output. | 04:31 | ||
04:32
cpage_ joined
04:33
p6bannerbot sets mode: +v cpage_
|
|||
ZzZombo | m: my %h=%(a=>'b', c=>'d', e=>'f'); dd %h.grep(* ~~ /a|e/, :p) | 04:34 | |
camelia | (0 => :e("f"), 2 => :a("b")).Seq | ||
perlawhirl | yeah i think there's difficulty in accepting a regex from the outside world. it's comes in as a string, and when you try to create a regex out of it, i think it escapes meta characters | ||
04:34
APic joined
|
|||
perlawhirl | thinking back to my own script... i know i solved it once by eval'ing the string, but i can't remember if i found a better solution. | 04:34 | |
i'm looking... | 04:35 | ||
04:35
p6bannerbot sets mode: +v APic,
cpage left,
cpage_ is now known as cpage
|
|||
perlawhirl | m: my $pattern = 'p.rl'; say 'perl' ~~ /<$pattern>/; | 04:37 | |
camelia | 「perl」 | ||
ccc | m: my %foo=(j => True, A => (2,3,5)); say %foo{%foo.keys.grep({$_ ~~ /A|B|C/})}:p | ||
camelia | (A => (2 3 5)) | ||
perlawhirl | so i think you will need to say: $word if lc($word) ~~ /<$tmp>/; | ||
ccc | wouldn't be necessary if the :p was seen by the matcher, but my tests show that the matcher only ever gets the value | 04:38 | |
perlawhirl | lindylex: I don't understand why you are accepting args as *@wordNum, if you only care about the first arg. | ||
ccc | (the matcher in grep) | ||
04:38
itaipu left
|
|||
perlawhirl | can just do: sub MAIN($pattern) { for 'words.txt'.IO.words -> $word { say $word if $word.lc ~~ /<$pattern>/ } | 04:39 | |
ccc | My use case is that I have a hash of properties and in some cases for a group of properties at most one of them can be true. It's expensive to check these properties so they get put in the hash. when the check gets called I need to see if ANY of them exist in the hash | 04:42 | |
lindylex | perlawhirl : interesting it needed the <> around it to work. | 04:43 | |
Thanks | 04:44 | ||
It is so slow. Any ideas how to speed it up? | |||
perlawhirl | regex engine is quite slow at the moment, unfortunately :/ | 04:45 | |
lindylex | Thanks I will try to use a system call instead then. | ||
perlawhirl | FYI, it could also be golf'd down to: .say for 'words.txt'.IO.words.grep(/:i <$pattern> /) | 04:48 | |
lindylex | Oh let me try. | 04:52 | |
perlawhirl | it'll still be slow tho :D | ||
lindylex | Rats I still like the way you refactored it. | ||
ccc | m: my %foo=(j => True, A => (2,3,5)); say %foo{<A B C>}:p | ||
camelia | (A => (2 3 5)) | ||
lindylex | perlawhirl : this throws an error my $message = q:x/grep 'ical$' ./words.txt /; ERROR :: Two terms in a row | 04:54 | |
04:54
Herby_ left
|
|||
perlawhirl | if i was using external grep... i would do it this way: .say for run(« grep -i "$pattern" words.txt », :out).out.lines | 04:54 | |
the '/' in './words' is closing your 'q:x/' | 04:56 | ||
so use another delimiter, eg. .say for qq:x{ grep '$pattern' ./words.txt } | 04:57 | ||
and use 'qq' so that $vars get interpolated | |||
if required | |||
04:58
mahafyi joined
04:59
p6bannerbot sets mode: +v mahafyi
05:01
jmerelo joined
|
|||
lindylex | perlawhirl : it is so much faster now. | 05:02 | |
05:02
p6bannerbot sets mode: +v jmerelo
|
|||
jmerelo | squashable6: staths | 05:02 | |
squashable6 | jmerelo, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Squashable | ||
jmerelo | squashable6: status | ||
squashable6 | jmerelo, Next SQUASHathon in 21 days and ≈4 hours (2018-10-06 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
jmerelo | releasable6: status | 05:03 | |
releasable6 | jmerelo, Next release in ≈1 day and ≈13 hours. 1 blocker. 1 out of 99 commits logged (⚠ 46 warnings) | ||
jmerelo, Details: gist.github.com/a6a73fc43e7ab15a74...a54e71b9ee | |||
perlawhirl | ccc: is this any better for you: say %foo.pairs.grep(*.key eq any <A B C>) | ||
m: my %foo=(j => True, A => (2,3,5)); say %foo.pairs.grep(*.key eq any <A B C>) | |||
camelia | (A => (2 3 5)) | ||
perlawhirl | sorry... '.pairs' isn't even needed there | 05:04 | |
m: my %foo=(j => True, A => (2,3,5)); say %foo.grep(*.key eq any <A B C>) | |||
camelia | (A => (2 3 5)) | ||
ccc | perlawhirl: no the one I used above is what I really wanted | ||
m: my %foo=(j => True, A => (2,3,5)); say %foo{<A B C>}:p | |||
camelia | (A => (2 3 5)) | ||
perlawhirl | ahh, i didn't see that message... nice work | 05:05 | |
lindylex: yeah, external grep is much faster. it's nice that it's so easy to call from perl 6, but still wish regex engine was faster. | |||
05:06
sauvin joined,
p6bannerbot sets mode: +v sauvin
|
|||
lindylex | Same, I feel like a failure. | 05:07 | |
perlawhirl | think of it as a positive... you learned a bit more about how to call external commands in Perl 6 | 05:09 | |
ccc | goodnight | ||
05:09
ccc left
|
|||
lindylex | Indeed you are the best. | 05:09 | |
One time I had a technical job interview for python. The guy have a teask I made a system call because that tool would be faster he did not like it. I said why not. There production env is a unices. He was not having it and said everything must be within the language. I was like dud if it can be done a faster way with a system call why does it matter? I proposed no security risk. | 05:11 | ||
It proposed no security risk. | 05:12 | ||
ccc: nite | 05:13 | ||
perlawhirl | there are 2 sides... i usually try to write everything in language. you can't always rely on system commands (and flags!) being portable across unix/linux/bsd. but, if there's no need for portability and it's faster, it can be a quick win | 05:14 | |
05:14
molaf joined,
psychoslave joined
|
|||
lindylex | Thanks for explaining. | 05:15 | |
05:15
p6bannerbot sets mode: +v molaf,
p6bannerbot sets mode: +v psychoslave
05:22
molaf left
05:26
vrurg left
05:27
vrurg joined
05:28
p6bannerbot sets mode: +v vrurg,
vrurg left
05:37
vrurg joined
05:38
p6bannerbot sets mode: +v vrurg
05:42
|oLa| joined
05:43
p6bannerbot sets mode: +v |oLa|,
vrurg left
05:48
AlexDaniel left
05:54
psychoslave left
05:56
ufobat_ is now known as ufobat
05:59
psychoslave joined,
p6bannerbot sets mode: +v psychoslave
06:10
regreg left
06:13
sotona joined
06:14
sotona left
06:22
jmerelo left
06:27
robertle_ joined
06:28
p6bannerbot sets mode: +v robertle_
06:44
lindylex left
06:47
domidumont joined
06:48
domidumont left,
cgfbee left,
domidumont joined
06:49
p6bannerbot sets mode: +v domidumont
07:35
mahafyi left
07:46
lizmat joined
07:47
p6bannerbot sets mode: +v lizmat
07:58
cgfbee joined
07:59
p6bannerbot sets mode: +v cgfbee
08:04
Ven`` joined
08:05
p6bannerbot sets mode: +v Ven``,
sena_kun joined
08:06
p6bannerbot sets mode: +v sena_kun
08:15
sno left
08:18
sno joined,
p6bannerbot sets mode: +v sno
08:25
thc202 joined
08:26
psychoslave left
08:28
thc202 left
08:36
pecastro joined
08:37
scimon joined,
p6bannerbot sets mode: +v pecastro,
p6bannerbot sets mode: +v scimon
08:39
mou joined
08:44
mou left
09:12
wyre15 joined
09:13
wyre15 left
09:14
cgfbee left
09:16
cgfbee joined
09:17
p6bannerbot sets mode: +v cgfbee
09:23
domidumont left
09:26
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel,
Ven`` left
09:29
cgfbee left,
graphene left
09:31
graphene joined,
scimon left
09:32
p6bannerbot sets mode: +v graphene,
scimon joined
09:33
p6bannerbot sets mode: +v scimon
09:37
cgfbee joined
09:38
p6bannerbot sets mode: +v cgfbee
09:51
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
09:52
p6bannerbot sets mode: +v aborazmeh
10:02
aborazmeh left
10:05
bigvalen23 joined
10:09
bigvalen23 left
10:12
scimon left,
scimon joined
10:13
p6bannerbot sets mode: +v scimon,
kurahaupo joined
10:14
p6bannerbot sets mode: +v kurahaupo
10:19
lin joined,
p6bannerbot sets mode: +v lin
10:22
kurahaupo left,
kurahaupo joined
10:23
p6bannerbot sets mode: +v kurahaupo
10:25
ventonegro1 joined
10:26
ventonegro1 left,
cgfbee left
10:27
ZzZombo left
10:36
cgfbee joined
10:37
p6bannerbot sets mode: +v cgfbee
10:49
m4rcu519 joined,
MasterDuke left
10:52
chenyf_ left
10:55
m4rcu519 left
11:13
chenyf_ joined
11:14
p6bannerbot sets mode: +v chenyf_
11:15
Zoffix joined,
p6bannerbot sets mode: +v Zoffix
11:17
chenyf_ left
11:25
Zoffix left
11:30
Robus2 joined
11:32
MorayJ` joined
11:33
p6bannerbot sets mode: +v MorayJ`
11:34
chenyf_ joined
11:35
Robus2 left
|
|||
MorayJ` | Hi, I'm looking to do some edits on docs.perl6.org/type/Cool and need clarification on what are methods and what are routines. Had thought methods would be those defined as method, and routines as those defined as sub or method and sub. Doesn't seem to be the case. Anyone able to give me a quick explanation or a link to an explanation..? | 11:35 | |
11:35
p6bannerbot sets mode: +v chenyf_
11:38
lichtkind joined
11:39
p6bannerbot sets mode: +v lichtkind
|
|||
moritz | that's how it's supposed to be | 11:47 | |
Routine is the parent class of Sub and Method | |||
MorayJ` | method exp | 11:51 | |
Defined as: | |||
multi sub exp(Cool:D $pow, Cool:D $base?) | |||
Whoops sorry, bad pasting | |||
11:51
ZzZombo joined,
p6bannerbot sets mode: +v ZzZombo
|
|||
MorayJ` | Method exp (for instance) is defined as a multi sub and a multi method - would that then be best be described as a routine? | 11:52 | |
And if something is only defined as a sub, should it then be sub name? | 11:56 | ||
11:57
psychoslave joined,
p6bannerbot sets mode: +v psychoslave
|
|||
moritz | both correct | 11:58 | |
MorayJ` | Great...thanks. Will raise it as an issue and look into fixing it | 12:01 | |
El_Che | moritz: I would have swore that your books were on Safari. I looked for them today, but there aren't there (anymore?). I have a paper version at home. | 12:03 | |
12:08
sena_kun left,
sena_kun joined
12:09
p6bannerbot sets mode: +v sena_kun
12:13
sena_kun left
|
|||
moritz | El_Che: I don't have any control or information on that -- that's all publisher's business :( | 12:13 | |
lichtkind | how to get a change into modules.perl6.org if module changes to different fork | 12:14 | |
moritz | get the maintainer to merge it? | 12:17 | |
lichtkind | moritz, i dont understand what you mean but Pierre, (current owner) and meare of one opinion that it should move to my github adress | 12:22 | |
12:23
araraloren joined
|
|||
moritz | lichtkind: then you should change the URL in the ecosystem repo | 12:23 | |
12:23
p6bannerbot sets mode: +v araraloren
|
|||
araraloren | . | 12:23 | |
m: given :($*a).params.[0] { say .name; say .sigil; say .twigil; } | 12:25 | ||
camelia | $*a $ |
||
araraloren | Anyone know is this a bug ? | ||
the twigil is return nothing | 12:26 | ||
lichtkind | moritz ah thanks thats what i wanted know, becaause i looked on the modules repo | ||
moritz | araraloren: looks like a bug to me | 12:35 | |
m: class A { has $!a; method f(:$!a) { } }; say A.find_method('a').signature.params[0].twigil | |||
camelia | No such method 'find_method' for invocant of type 'A' in block <unit> at <tmp> line 1 |
||
moritz | m: class A { has $!a; method f(:$!a) { } }; say A.^find_method('a').signature.params[0].twigil | ||
camelia | No such method 'signature' for invocant of type 'Mu' in block <unit> at <tmp> line 1 |
||
El_Che | moritz: yes, I thought so. But it's good that you know in case someone asks here. | ||
moritz | m: class A { has $!a; method f(:$!a) { } }; say A.^find_method('f').signature.params[0].twigil | ||
camelia | |||
12:36
domidumont joined
|
|||
moritz | El_Che: agreed, thanks | 12:36 | |
El_Che | moritz: I'll ping when they are available again | ||
12:36
p6bannerbot sets mode: +v domidumont
|
|||
El_Che | moritz: I was having a look at the new Learning Perl 6. I think your Fundamentals books approach works better | 12:37 | |
araraloren | moritz I check the source code, so it only support attribute, not for dynamic variable ? | ||
El_Che | moritz: haven't finished Learning yes, just impression after a few chapters | 12:38 | |
moritz | El_Che: it has quite a bit of a different target audience | 12:39 | |
El_Che: and you are squarely in the Fundamentals target audience, not in the Learning one | |||
Learning and Thinking overlap more in audience | |||
El_Che | I don't know about that | ||
Thinking is more about learning to program | 12:40 | ||
araraloren | I will fill an ticket :) | ||
El_Che | and it happens to be with Perl 6 | ||
Learning has a reference book feel to it (without being one) | |||
e.g. as it feels compelled to discussed complex numbers, while it's out of the scope of most readers | |||
MorayJ` | moritz: I quoted you in the issue. Just to confirm I understood. "Moritz confirmed on #perl6 "Routine is the parent class of Sub and Method" and that if only a method, it should be method name, if only a sub it should be sub name and if both routine name" | 12:42 | |
El_Che | Moritz as an argument by authority. I like that :) | ||
MorayJ` | If Moritz is happy with it, I'll leave it for a while and see if anyone has anything to add, but a good authority from what I can tell :-) | 12:44 | |
12:52
andrzejku joined,
p6bannerbot sets mode: +v andrzejku
12:56
lizmat left
|
|||
andrzejku | araraloren hello | 12:58 | |
:) | |||
12:59
lizmat joined
13:00
p6bannerbot sets mode: +v lizmat
13:06
mcmillhj joined
13:07
p6bannerbot sets mode: +v mcmillhj
13:08
nadim_ joined
13:09
p6bannerbot sets mode: +v nadim_
|
|||
moritz | if people argue with me as an authority, you could start calling me "The Moritz", right? :D | 13:14 | |
timotimo | why don't you go where information sits? puttin' on mo' ritz | 13:15 | |
13:17
Guest38163 joined
|
|||
El_Che | The Ritz Hotels are considering changing their name to Mo'Ritz, just to surf the public opinion wave | 13:18 | |
13:20
Guest38163 left
13:26
molaf joined
|
|||
mantovani | Hello guys, I'm using Avro module and if the example works fine: $writer.append({name => "Alyssa"}); | 13:27 | |
but when I try to have a key => hash it doesn't work | |||
13:27
p6bannerbot sets mode: +v molaf
|
|||
mantovani | $writer.append({name => "Alyssa", address => {"street1" => "foo"}}); | 13:27 | |
$writer.append({name => "Alyssa", address => {"street1" => "foo"}}); | 13:28 | ||
paste.scsys.co.uk/581757 | |||
Any idea? Idk what to try I'm since yesterday with this problem | |||
If I change to address => Any works | 13:29 | ||
13:29
vrurg joined
13:30
p6bannerbot sets mode: +v vrurg
|
|||
timotimo | perhaps that feature is missing? | 13:30 | |
13:30
skjnldsv26 joined
|
|||
mantovani | :( | 13:31 | |
El_Che | The examples on shows arrays as complex values | 13:32 | |
mantovani: raise an issue at the repo? | |||
mantovani | that's my next step, I just want to be sure that I wasn't doing something stupid | ||
thanks | |||
El_Che | maybe someone here will return from afk and uses the module. Stick around ) | 13:33 | |
:) | |||
mantovani | thanks | 13:34 | |
13:35
skjnldsv26 left
|
|||
MorayJ` | :-D | 13:37 | |
mantovani | github.com/sylvarant/Avro/issues/6 | ||
13:42
[particle] left
13:43
sena_kun joined
13:44
nadim_ left,
p6bannerbot sets mode: +v sena_kun,
[particle] joined
13:45
p6bannerbot sets mode: +v [particle]
13:51
noganex left
13:52
noganex joined
13:53
p6bannerbot sets mode: +v noganex
13:54
MorayJ` left,
stux|RC-only left,
pecastro left,
ambs left
13:55
ambs joined,
p6bannerbot sets mode: +v ambs
13:56
pecastro joined,
stux|RC-only joined
13:57
p6bannerbot sets mode: +v pecastro,
p6bannerbot sets mode: +v stux|RC-only,
xxpor joined
13:58
p6bannerbot sets mode: +v xxpor
13:59
larissa joined,
larissa is now known as Guest40655
14:00
p6bannerbot sets mode: +v Guest40655
|
|||
Guest40655 | liɡht iѕ nഠt dοinɡxE2x80x81Aⅼⅼɑһ ⅰsxE2x80x80doiᥒg | 14:00 | |
fаᥒ is ᥒot doⅰnɡ Aⅼlaһ іѕ doiᥒɡ | |||
busіᥒᥱssesѕ аrеxE2x80x80not dοіᥒɡ Ꭺⅼⅼɑh iѕ ԁoіng | |||
amеrіⅽ іs nоt dⲟiᥒg Allah iѕ doіᥒɡ | |||
amerⅰϲa iѕ nоt doiᥒɡ Allaһ iѕ dഠing | |||
fіre cаn nοt burn wⅰtһoᥙt tһe permiѕsⅰon of ɑⅼlah | |||
kᥒife ϲan not сut wⅰthоut thе рerⅿіѕѕiⲟnxE2x80x80xE2xB2x9Ff aⅼⅼah | |||
fileѕystеⅿ does ᥒot wrⅰtе without pᥱrⅿissіⲟn ofxE2x80x81alⅼaһ | |||
rᥙⅼᥱrѕ are not doinɡ Aⅼlɑh is ⅾഠіᥒg | |||
gο⋁erᥒmеnts arᥱ not doinɡ Αⅼlaһ іѕ ⅾoіng | |||
ѕlᥱep іs not ԁⲟіnɡ Allаh is ԁⲟⅰᥒɡ | |||
hunɡer is nоt dഠіnɡ Αllah ⅰѕ doiᥒɡ | |||
foоԁ doᥱѕ ᥒot tаkеxE2x80x81xD0xB0way the hᥙnɡer Aⅼlah tаkeѕ awɑуxE2x80x81tһe huᥒger | |||
water ԁοeѕ ᥒⲟt tɑkе ɑᴡɑy thе thirst Ꭺllah takeѕ ɑᴡaу tһe tһirst | |||
sᥱeⅰngxE2x80x80is not dοⅰng Αllɑһ is doіᥒg | 14:01 | ||
hearinɡ is not doіnɡ Aⅼlah is dⲟinɡ | |||
seɑѕoᥒs ɑre not dοіnɡ Aⅼlaһ is ԁοⅰᥒg | |||
ᴡeathеr iѕ not dоing Allɑh іѕ doiᥒg | |||
hᥙⅿаns are nοtxE2x80x80xD4x81οіᥒɡ Аlⅼɑһ ⅰѕ ԁഠinɡ | |||
ɑnⅰmɑls are ᥒot doіᥒɡ Allaһ is ⅾoing | |||
tyil | where are mods when you need them | ||
Guest40655 | thexE2x80x81beѕt amoᥒɡst уoᥙ are thഠsе whഠ learᥒ aᥒd tеɑcһ quran | ||
onᥱ letter reaԁ from bഠоk οf Aⅼⅼah аⅿouᥒts tഠ oᥒexE2x80x81gooԁ ԁeed aᥒd Аⅼlah muⅼtiрⅼies oᥒе ɡood ԁeed ten tⅰⅿeѕ | |||
hеаrts gеt r∪ѕteⅾ as dഠeѕ іrⲟn with wɑter tο removᥱ rust from heart reⅽitɑtiоn ഠf ⵕuran aᥒd rеⅿᥱⅿberɑncе of ԁеatһ | |||
heart is likened tⲟ a mіrrоr | |||
timotimo | mods are not doing allah is doing | ||
Guest40655 | whᥱᥒ a рerѕon сoⅿⅿitѕ оne siᥒ a black dοt ѕustɑіnsxE2x80x81the heart | ||
to ɑccᥱpt Іslаm ѕаy that і bearxE2x80x81witneѕѕ tһat thеrᥱ ⅰs nο ԁeity ᴡorthу оf worѕһⅰp exⅽеpt Аⅼlaһ and Ꮇᥙhammad peace be uрοᥒ hiⅿ іs hіѕ sⅼa∨ᥱ ɑᥒdmᥱsѕᥱᥒɡer | |||
sena_kun | .o0 ( now is the time to use Perl 6's Unicode support! ) | 14:02 | |
tobs | I'm still missing some glyphs :/ | ||
sena_kun | me too. :) | ||
14:03
DarthGandalf left,
moray` joined
14:04
ChanServ sets mode: +o diakopter,
moray` left,
Guest40655 left
|
|||
timotimo | so how much do i have to blaspheme to make all my kitchen knives become dull and broken immediately? | 14:05 | |
14:05
diakopter sets mode: +o timotimo,
Herby_ joined
|
|||
mantovani | Perl 6 is not doing Allah is doing | 14:06 | |
14:06
DarthGandalf joined,
p6bannerbot sets mode: +v DarthGandalf
|
|||
diakopter | heh | 14:06 | |
14:06
p6bannerbot sets mode: +v Herby_
|
|||
timotimo | allah is strangely consistent, too? | 14:06 | |
Herby_ | \o | ||
14:06
MorayJ joined
14:07
p6bannerbot sets mode: +v MorayJ
|
|||
araraloren | What ? Allah ? | 14:19 | |
timotimo | araraloren: you didn't see the spam a couple minutes earlier? | 14:21 | |
14:22
molaf left
|
|||
mantovani | Perl 6 grammar is fantastic, docs.perl6.org/type/Grammar | 14:22 | |
araraloren | hmm, I see it | ||
mantovani | I'm in love with Perl 6 <3 | ||
araraloren | I want told them Allah love Perl 6, because it is powerful :) | 14:24 | |
And I wonder Allah was doing what ? | |||
yeah, Grammar is so powerful | 14:25 | ||
14:29
AlexDaniel left
14:30
Herby_ left
14:38
molaf joined,
p6bannerbot sets mode: +v molaf
|
|||
Geth | doc: f3263bbb16 | (Daniel Mita)++ | doc/Type/Promise.pod6 Fix Promises reference to react/whenever |
14:39 | |
synopsebot | Link: doc.perl6.org/type/Promise | ||
14:41
zakharyas joined
14:42
p6bannerbot sets mode: +v zakharyas,
perlbot_ left,
perlbot_ joined,
asimov.freenode.net sets mode: +v perlbot_,
p6bannerbot sets mode: +v perlbot_,
perlbot_ is now known as perlbot
14:47
regreg joined
14:48
p6bannerbot sets mode: +v regreg
14:53
zakharyas left
15:07
zakharyas joined,
p6bannerbot sets mode: +v zakharyas
15:08
lucasb joined
15:09
psychoslave left,
p6bannerbot sets mode: +v lucasb
15:17
sostis joined,
p6bannerbot sets mode: +v sostis
15:21
sostis left
15:22
araraloren left
|
|||
lucasb | m: my $v = 10; say my $p = a => $v; $v = 20; say $p | 15:25 | |
camelia | a => 10 a => 20 |
||
lucasb | this really surprised me | ||
that pair construction kept a reference to its value argument | 15:26 | ||
15:26
graphene left
|
|||
lucasb | or, IOW, is an alias | 15:27 | |
15:27
graphene joined
|
|||
lucasb | is it intended or an oversight? | 15:28 | |
15:28
p6bannerbot sets mode: +v graphene
|
|||
lucasb | m: my $v = 10; say my $p = Pair.new(key=>'a', value=>$v); $v = 20; say $p | 15:29 | |
camelia | a => 10 a => 10 |
||
15:30
rembo10 joined
|
|||
lucasb | ^^ as a note, this way of building a pair doesn't suffer from this | 15:31 | |
15:33
graphene left
15:34
rembo10 left
15:35
graphene joined
|
|||
Juerd | It's not even a read-only alias | 15:36 | |
m: my $v = 10; say my $p = :a($v); $p.value = 20; say $v | |||
camelia | a => 10 20 |
||
Juerd | It does seem useful | ||
15:36
p6bannerbot sets mode: +v graphene
|
|||
Juerd | lucasb: A simple way to force a copy is assigning to an unnamed lexical: my $p = a => (my $ = $v) | 15:37 | |
15:41
Kaiepi left,
Kaiepi joined
15:42
p6bannerbot sets mode: +v Kaiepi
15:43
zakharyas left
15:45
Herby_ joined,
p6bannerbot sets mode: +v Herby_
15:47
kerframil joined,
p6bannerbot sets mode: +v kerframil
15:52
albertferrico joined,
p6bannerbot sets mode: +v albertferrico
15:53
lucasb left,
albertferrico left
15:55
geozdr joined,
geozdr was kicked by timotimo (geozdr))
16:07
graphene left
16:09
graphene joined,
Xliff joined
16:10
p6bannerbot sets mode: +v graphene,
p6bannerbot sets mode: +v Xliff
|
|||
Xliff | m: use NativeCall; sub c-printf-II ('%d/%d',int32,int32 --> int32) is native is symbol<printf> {}; c-printf-II(1,3) | 16:10 | |
camelia | Calling c-printf-II(Int, Int) will never work with declared signature (Str $ where { ... }, int32, int32 --> int32) in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 5… |
||
Xliff | m: use NativeCall; sub c-printf-II ('%d/%d',int32,int32 --> int32) is native is symbol<printf> {}; c-printf-II(''.1,3) | 16:11 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call at <tmp>:1 ------> 3ve is symbol<printf> {}; c-printf-II(''.7⏏051,3) |
||
Xliff | m: use NativeCall; sub c-printf-II ('%d/%d',int32,int32 --> int32) is native is symbol<printf> {}; c-printf-II('',1,3) | ||
camelia | ( no output ) | ||
Xliff | OK. So no const parameters to NativeCall routines. | 16:16 | |
16:17
graphene left
|
|||
timotimo | seems like we don't support that, but also don't error out | 16:17 | |
potentially a change from when we started compiling nativecall subs to jit? | |||
Xliff | Yes. :) | ||
timotimo | but what you want may be .assuming rather than putting a constant in the signature | ||
since constants there are about matching, not "providing for the caller" | |||
Xliff | Yeah. The '%d/%d' is probably interpreted as Str | 16:18 | |
m: use NativeCall; sub c-printf-II ('%d/%d',int32,int32 --> int32) is native is symbol<printf> {}; c-printf-II('%d',1,3) | |||
16:18
scimon left
|
|||
camelia | 1 | 16:18 | |
Xliff | Yup. | ||
16:18
graphene joined
16:19
p6bannerbot sets mode: +v graphene,
Kaiepi left
16:20
Kaiepi joined
16:21
p6bannerbot sets mode: +v Kaiepi
16:25
graphene left,
xinming left
16:26
xinming joined
16:27
graphene joined,
p6bannerbot sets mode: +v xinming,
p6bannerbot sets mode: +v graphene
16:28
domidumont left,
jjmerelo joined
16:29
p6bannerbot sets mode: +v jjmerelo
16:32
johnLate0 joined
16:39
johnLate0 left
16:40
regreg left
16:44
chenyf_ left
|
|||
El_Che | what the difference between say and put? | 16:45 | |
16:45
lizmat left
|
|||
El_Che | m: say 'foo' | 16:45 | |
camelia | foo | ||
El_Che | m: put 'foo' | ||
camelia | foo | ||
16:46
lichtkind left
16:47
graphene left,
lizmat joined
16:48
p6bannerbot sets mode: +v lizmat
|
|||
lizmat | e.g. docs.perl6.org/type/Array with a bar on the left with the table of contents | 16:48 | |
wow, did the layout of docs.perl6.org just change ? | |||
16:48
graphene joined
16:49
aindilis left,
xinming left,
p6bannerbot sets mode: +v graphene
|
|||
El_Che | the implementation of put and say look very identical (github.com/rakudo/rakudo/blob/058a...ators.pm6) | 16:49 | |
what's their difference in practice? | |||
16:50
xinming joined
|
|||
lizmat | .Str vs .gist ? | 16:50 | |
geekosaur | ^ | ||
jjmerelo | El_Che: There's a FAQ: docs.perl6.org/language/faq#How_an...nt_differ? | ||
16:51
p6bannerbot sets mode: +v xinming
|
|||
El_Che | thx! | 16:51 | |
I must confess I have never used put | 16:52 | ||
came it across when browsing through Learning Perl 6 :) | |||
it seems briandf prefers put :) | |||
I would expect to be the logical choice in a beginner's book? | 16:54 | ||
I am reading it to know what book to advice to hypothetical newbies | 16:55 | ||
"Sir, have you heard the good news of Perl 6?" | |||
16:58
regreg joined
16:59
p6bannerbot sets mode: +v regreg
17:01
noganex left
17:02
noganex joined
17:03
p6bannerbot sets mode: +v noganex
17:07
Kaiepi left
17:08
Kaiepi joined,
p6bannerbot sets mode: +v Kaiepi
17:09
robertle_ left
17:11
chenyf_ joined
17:12
p6bannerbot sets mode: +v chenyf_
17:15
graphene left
17:16
graphene joined
17:17
p6bannerbot sets mode: +v graphene,
MorayJ left
17:22
souther17 joined
17:25
souther17 left,
regreg left,
maha_d joined
|
|||
timotimo | pff. i didn't look for five minutes and this happens again | 17:25 | |
17:25
maha_d is now known as mahafyi
17:26
p6bannerbot sets mode: +v mahafyi,
graphene left
17:27
graphene joined
17:28
p6bannerbot sets mode: +v graphene
17:33
patrickz joined,
mike-kfed joined,
p6bannerbot sets mode: +v patrickz
17:36
mike-kfed left
17:37
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
|
|||
timotimo | and again! | 17:43 | |
17:47
noganex_ joined
17:48
p6bannerbot sets mode: +v noganex_
17:51
noganex left,
molaf left
17:58
ggoebel_ left,
ggoebel left
|
|||
timotimo | now i'm paying attention and no spam is coming | 18:02 | |
18:03
Kaiepi left
18:11
Kaiepi joined,
ggoebel joined,
ggoebel_ joined
18:12
p6bannerbot sets mode: +v Kaiepi,
p6bannerbot sets mode: +v ggoebel,
p6bannerbot sets mode: +v ggoebel_
18:13
sotona joined
18:14
p6bannerbot sets mode: +v sotona,
|oLa| left
18:15
|oLa| joined
18:16
|oLa| left
|
|||
diakopter | timotimo: sorry, yeah, I keep looking away too :( | 18:18 | |
18:30
kerframil left
|
|||
timotimo | no worries | 18:32 | |
we're doing what we can | |||
18:32
sauvin left
18:35
aindilis joined
|
|||
diakopter | mst: should we use /ipkb on these latest spammers or what | 18:36 | |
18:36
p6bannerbot sets mode: +v aindilis
|
|||
timotimo | i hope there's not a lot of talk at the moment just because people have no reason to talk, not because the spam is repulsing them | 18:36 | |
i don't actually think the same ip will come back any time soon | 18:37 | ||
ofperfection[m] | I think it's the former | 18:43 | |
Geth | doc: 46dff366dd | (JJ Merelo)++ | htmlify.p6 Refactors a bit htmlify.p6 Putting two literal (which were different) in a constant. This goes towards #1823 (long time overdue) but fixes #2307 |
18:44 | |
18:45
jjmerelo left
18:46
aindilis left,
samgd3 joined,
aindilis joined
18:47
samgd3 was kicked by timotimo (samgd3))
|
|||
timotimo | i got it! | 18:47 | |
diakopter | ooooooooo got them | ||
timotimo | *smack* | ||
18:47
p6bannerbot sets mode: +v aindilis
|
|||
lizmat | weird: I have't seen any spam here between 19:43 and now ? | 18:49 | |
timotimo | ooooh | ||
i know | |||
diakopter and me are mods | |||
we see messages from people without +v | |||
AlexDaniel | yep | 18:50 | |
and everyone else is confused | |||
timotimo | so even when i let the spammer join, spam, and part ... i was the only one who suffered :P | 18:53 | |
well, and diakopter | |||
diakopter | :D | ||
(oops, ish) | 18:54 | ||
AlexDaniel | p6bannerbot also has to witness all that nonsense | 18:55 | |
timotimo | poor bot | ||
18:56
[Sno] joined
18:57
p6bannerbot sets mode: +v [Sno]
18:58
sno left
19:08
hamhu3 left,
hamhu3 joined
19:09
p6bannerbot sets mode: +v hamhu3
|
|||
El_Che | timotimo: your pain is appreciated | 19:21 | |
same for diakopter | 19:22 | ||
19:28
mcmillhj left
19:29
sotona left
19:33
sena_kun left
|
|||
AlexDaniel | ****AND**** p6bannerbot | 19:34 | |
El_Che: stoprobotabuse.com/ | |||
AlexDaniel nap 💤 | 19:37 | ||
19:41
pdurbin left
19:42
sotona joined
19:43
p6bannerbot sets mode: +v sotona
19:48
mcmillhj joined
19:49
p6bannerbot sets mode: +v mcmillhj
19:50
molaf joined
19:51
dylanwh joined,
AlexDaniel left,
sotona left,
p6bannerbot sets mode: +v molaf,
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel,
p6bannerbot sets mode: +v dylanwh
19:53
mcmillhj left
19:54
graphene left
19:56
graphene joined
19:57
p6bannerbot sets mode: +v graphene
|
|||
xinming | m: class A { method a { "a".say }; method b { "b".say }; method c { "c".say }; }; class B { has $a handles <a b>, :c_differ<c>; }; my $b = B.new(:a(A.new)); $b.a; $b.b; $b.c_differ | 19:59 | |
camelia | WARNINGS for <tmp>: Useless use of ":c_differ<c>" in sink context (lines 1, 1) No such method 'a' for invocant of type 'Any' in block <unit> at <tmp> line 1 |
||
20:00
mcmillhj joined
|
|||
xinming | In this case, How can we alias a delegation? | 20:00 | |
20:00
sotona joined,
p6bannerbot sets mode: +v mcmillhj
|
|||
xinming | ignore me, I just realized that we can add () around it | 20:00 | |
m: class A { method a { "a".say }; method b { "b".say }; method c { "c".say }; }; class B { has $a handles (<a b>, :c_differ<c>); }; my $b = B.new(:a(A.new)); $b.a; $b.b; $b.c_differ | 20:01 | ||
camelia | No such method 'a' for invocant of type 'Any' in block <unit> at <tmp> line 1 |
||
20:01
p6bannerbot sets mode: +v sotona
20:04
mcmillhj left
20:05
lucasb joined,
p6bannerbot sets mode: +v lucasb
20:12
mcmillhj joined,
sarna joined
20:13
p6bannerbot sets mode: +v mcmillhj,
p6bannerbot sets mode: +v sarna
20:16
mcmillhj left
20:17
kerframil joined,
p6bannerbot sets mode: +v kerframil
|
|||
sarna | hey 👋 what's the best way of writing something into a file after a line that matched a regex? | 20:19 | |
lucasb | modify in-place the file? | ||
sarna | yes | 20:20 | |
well, I have troubles expressing myself today. I meant - is there a standard way of doing this stuff? should I just load the entire file into memory, loop over the lines, check for matches, insert text I need and overwrite the file? | 20:22 | ||
moritz | the best way is typically to write a temp file with the new contents | 20:24 | |
20:26
mcmillhj joined
|
|||
moritz | and then move the temp file to the original name | 20:26 | |
20:27
p6bannerbot sets mode: +v mcmillhj
|
|||
rindolf | moritz: hi, sup? | 20:28 | |
sarna | moritz: thanks. for some reason I thought I'd need to do it in a loop, without it it's much simpler | 20:29 | |
20:31
mcmillhj left
|
|||
AlexDaniel | sarna: what about something like: perl6 -ne 'INIT { $*OUT = ‘tempfile’.IO.open: :w }; END { move ‘tempfile’, @*ARGS[0] }; .say' myinputfile | 20:31 | |
that shouldn't slurp the whole file, right? | 20:32 | ||
I mean, even .lines probably won't | |||
masak | moritz: re "temp file with the new contents" -- doesn't the -i flag do this in Perl 5? | ||
sarna | AlexDaniel: my God, it's beautiful | ||
moritz | masak: it does | ||
AlexDaniel | also somebody should implement -i in rakudo :) | 20:33 | |
masak | yes, seems otherwise it might end up being a FAQ ;) | 20:36 | |
AlexDaniel | it already is, I've seen this question multiple times | 20:37 | |
20:39
sarna left
|
|||
masak | I blame all the lurkers. they never help implement stuff. | 20:42 | |
20:46
derpy joined
20:48
AlexDaniel left
20:49
mcmillhj joined,
derpy left,
p6bannerbot sets mode: +v mcmillhj
20:53
mcmillhj left
20:54
lizmat left
|
|||
mantovani | how is possible to have two modules with the same namespace ? | 20:54 | |
modules.perl6.org/search/?q=+XML%3A%3AXPath | |||
20:55
lizmat joined
|
|||
mantovani | oh, one link go to github and other perl page... | 20:55 | |
20:55
p6bannerbot sets mode: +v lizmat
|
|||
geekosaur | use Module::Name:auth<whatever>; | 20:59 | |
or :ver or :from or varios other ways to disambiguate | |||
21:00
mcmillhj joined
21:01
p6bannerbot sets mode: +v mcmillhj,
SirLagz10 joined
21:04
patrickz left
21:05
mcmillhj left
21:06
SirLagz10 left
21:17
mcmillhj joined,
hamhu3 left
|
|||
timotimo | AlexDaniel`: the version with END { move $tempfile, $origfile } will clobber the original file if some exception is thrown | 21:17 | |
21:18
hamhu3 joined,
p6bannerbot sets mode: +v mcmillhj
21:19
p6bannerbot sets mode: +v hamhu3
21:21
regreg joined
21:22
mcmillhj left,
p6bannerbot sets mode: +v regreg
|
|||
lizmat | perhaps a KEEP phaser would be more appropriate ? | 21:22 | |
AlexDaniel`: ^^^ | 21:23 | ||
moritz | but KEEP runs at every scope exit | 21:24 | |
so not too good inside a loop | |||
maybe just LAST? | |||
m: for 1, 2, 3 { die "foo" if $_ == 2; LAST { .say } } | 21:25 | ||
camelia | foo in block <unit> at <tmp> line 1 |
||
moritz | the exception causes LAST not to run | ||
m: for 1, 2, 3 { LAST { .say } } | |||
camelia | 3 | ||
21:27
graphene left
|
|||
lizmat | ah, good point :-) | 21:27 | |
m: m: for 1, 2, 3 { LAST { .say }; die if $_ == 2 } | 21:28 | ||
camelia | Died in block <unit> at <tmp> line 1 |
||
lizmat | m: m: for 1, 2, 3 { LAST { .say }; die if $_ == 3 } | ||
camelia | Died in block <unit> at <tmp> line 1 |
||
21:28
graphene joined
21:29
p6bannerbot sets mode: +v graphene
|
|||
Geth | doc: 02a64553dc | (Elizabeth Mattijsen)++ | 2 files Give minimal info about methods for Positional/Associative roles We should at least mention the methods that *must* be implemented. And we should refer to the extended information: since I had no clue as to how to properly refer to this internal information in a link, I've just use the URL (which apperently happens more often). If this is incorrect, please fix :-) |
21:30 | |
21:30
mcmillhj joined
21:31
p6bannerbot sets mode: +v mcmillhj
21:32
lucasb left
21:35
mcmillhj left
21:37
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
21:45
Guest47855 left
21:54
mcmillhj joined
21:55
p6bannerbot sets mode: +v mcmillhj
21:59
mcmillhj left
22:14
s0me0ne-unkn0wn left
22:20
sotona left
22:25
mcmillhj joined
22:26
p6bannerbot sets mode: +v mcmillhj
22:27
sotona joined,
p6bannerbot sets mode: +v sotona
22:30
mcmillhj left
22:31
lucasb joined
22:34
lucasb left,
lucasb joined
22:35
p6bannerbot sets mode: +v lucasb
|
|||
lucasb | m: my $a = [10,20]; ($a[1] = 30, $a.say) | 22:35 | |
camelia | [10 20] | ||
lucasb | m: my $a = [10,20]; (($a[1] = 30), $a.say) | 22:36 | |
camelia | [10 30] | ||
lucasb | why do I need parens here? | 22:37 | |
it changes evaluation order? | |||
geekosaur | it sees $a[1]= (30, $a.say), runs say with the value before the assignment, and then drops the result of say because there's nowhee to put it | 22:39 | |
22:42
mcmillhj joined
|
|||
lucasb | I thought it was item assignment, so precedence of "=" was tighter than comma | 22:42 | |
22:42
p6bannerbot sets mode: +v mcmillhj
|
|||
timotimo | it's the difference between item assignment and list assignment | 22:42 | |
the LHS of the = doesn't look like something listy | |||
so $a.say doesn't become part of the assignment | 22:43 | ||
oh, er | |||
lucasb | $a[1] becomes (30, True) | ||
timotimo | hm, that's not entirely right, i don't think | ||
because it does evaluate the whole list first | |||
lucasb | m: my $a = 10; ($a = 20, $a.say) | 22:44 | |
camelia | 20 | ||
lucasb | so, @a[...] and %h{...} always imposes list assignment (?) | 22:46 | |
22:46
mcmillhj left
|
|||
lucasb | m: my @a; @a[1] = 1,2,3; say @a # seems so. My mistake was that I was expecting item assignment here | 22:47 | |
camelia | [(Any) (1 2 3)] | ||
lizmat | lucasb: only if what's between [] and {} is Iterable | ||
sleep& | 22:49 | ||
timotimo | TBH i don't have a complete understanding of when it does one vs the other | 22:53 | |
since it's a syntactic distinction, as both have different precedence levels | |||
22:54
sotona left
22:59
mcmillhj joined
23:00
p6bannerbot sets mode: +v mcmillhj
23:04
mcmillhj left
23:18
mcmillhj joined,
p6bannerbot sets mode: +v mcmillhj
23:22
mcmillhj left
23:29
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
23:34
lucasb left
23:42
pecastro left
23:58
mcmillhj joined
23:59
p6bannerbot sets mode: +v mcmillhj
|