|
»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
|
00:16
cdg joined
00:20
cdg left
|
|||
| ugexe | Something about t/02-rakudo/04-diag.t does not like to work with some combination of testing a) pre-make-install, b) testing with prove, and c) using prove with `--archive`, but i'm not immediately seeing anything suspect jenkins.p6.nu/job/rakudo/7/os=linux/tapResults/ | 00:33 | |
|
00:38
Rawriful left
|
|||
| ugexe | `- diag at the start of file shows up in non-verbose prove run` - this doesn't seem like something that should be tested | 00:52 | |
| eh its not actually testing prove | 00:55 | ||
|
01:02
ryn1x left
|
|||
| ugexe | ah its because it essentially does `$*EXECUTABLE -e 'use Test; ...` which is not valid unless its already installed or it passes the current $*REPO to the $*EXECUTABLE | 01:03 | |
| leont | I remember seeing similar issues in the spectests for Test.pm, they fail when you don't have any rakudo installed -_- | ||
| ugexe | almost seems like a $*EXECUTABLE-BUT-WITH-MAH-LIBS would be useful | ||
| leont | (no idea if that got fixed in the mean time) | 01:04 | |
| ugexe | i havent gotten to prove-invoked-spectest yet, but hopefully that was fixed | 01:06 | |
|
01:16
cdg joined
01:20
cdg left
01:25
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:26
perigrin joined
01:29
ryn1x joined
01:33
ryn1x left
01:34
Cabanossi left
01:35
Cabanossi joined
01:42
kalkin-- joined
01:50
piojo joined
02:00
mson joined
02:04
Cabanossi left
02:05
Cabanossi joined
02:08
comborico1611 joined
|
|||
| comborico1611 | m: sub t ( say "hello" ); t; | 02:09 | |
| camelia | 5===SORRY!5=== Error while compiling <tmp> Invalid typename 'say' in parameter declaration. at <tmp>:1 ------> 3sub t ( say7⏏5 "hello" ); t; |
||
| comborico1611 | m: sub t ( say "hello"; ); t; | ||
| camelia | 5===SORRY!5=== Error while compiling <tmp> Invalid typename 'say' in parameter declaration. at <tmp>:1 ------> 3sub t ( say7⏏5 "hello"; ); t; |
||
| geekosaur | does your font show the difference between { and ( ? | 02:11 | |
| comborico1611 | m: sub t ( ) { say "hello" }; t; | ||
| camelia | hello | ||
| comborico1611 | I'm ashamed to answer that question. Lol | ||
| m: sub t { say "hello" }; t; | 02:12 | ||
| camelia | hello | ||
| comborico1611 | m: sub t( ) { say "hello" }; t; | ||
| camelia | hello | ||
| comborico1611 | Goodnight! | 02:18 | |
|
02:18
comborico1611 left
|
|||
| geekosaur | ...it's common enough that I asked it... | 02:21 | |
|
02:21
BenGoldberg joined
02:28
piojo left
02:31
ryn1x joined
02:34
ch3ck3r joined
02:35
ryn1x left
02:37
cdg joined
02:41
cdg left,
cdg joined
02:49
Cabanossi left
02:50
piojo joined,
Cabanossi joined
02:54
ilbot3 joined,
ChanServ sets mode: +v ilbot3
03:03
MasterDuke joined
03:04
blakers joined
03:08
MasterDuke left,
releasable6 joined
|
|||
| blakers | p6: say is anyone using perl6 in production? | 03:09 | |
| camelia | 5===SORRY!5=== Error while compiling <tmp> Bogus postfix at <tmp>:1 ------> 3say is anyone using perl6 in production7⏏5? expecting any of: infix infix stopper postfix statement end … |
||
| blakers | p6: say "is anyone using perl6 in production?" | ||
| camelia | is anyone using perl6 in production? | ||
|
03:12
mingdao joined
03:15
noganex_ joined
03:24
blakers left
03:29
astj joined
03:30
astj left,
astj joined
03:33
astj left
03:34
astj joined
03:39
ryn1x joined
03:47
piojo left
03:51
ryn1x left
04:02
char_var[buffer] left,
char_var[buffer] joined
04:08
mson left
04:28
R0b0t1_ joined
04:44
ryn1x joined
04:48
Cabanossi left
04:49
ryn1x left
04:50
Cabanossi joined
04:58
lookatme joined
05:07
mempko joined
|
|||
| ZzZombo | Can I can easily get a list of items in hash, OTHER than those with provided keys? | 05:27 | |
| Kinda like reverse slice. | 05:28 | ||
| lookatme | m: my %h = 1 => 2, 3 => 5; say %h.[0]; | 05:30 | |
| camelia | {1 => 2, 3 => 5} | ||
| ZzZombo | Uh, what is that? | ||
| lookatme | Just trying to do | 05:31 | |
| ZzZombo | ah, okay. | ||
| lookatme | Why you need another way ? | 05:32 | |
| ZzZombo | I have a list of keys I'm NOT interested in, I need the other items in the hash. | ||
| lookatme | oh | 05:33 | |
| m: my %h = 1 => 2, 3 => 5, 4 => 6; say %hR<1 2>; | 05:34 | ||
| camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '%hR' is not declared at <tmp>:1 ------> 3my %h = 1 => 2, 3 => 5, 4 => 6; say 7⏏5%hR<1 2>; |
||
| ugexe | m: my %foo = :a<1>, :b<2>, :c<3>; my @choices = <a d>; say %foo.grep({.key !~~ any @choices}).perl | ||
| camelia | (:c(IntStr.new(3, "3")), :b(IntStr.new(2, "2"))).Seq | ||
| lookatme | m: my %h = 1 => 2, 3 => 5; say %h{%h.keys (-) [1, 2]}; | ||
| camelia | (Any) | ||
|
05:37
evalable6 left
05:38
evalable6 joined,
ChanServ sets mode: +v evalable6
|
|||
| lookatme | m: my %h = 1 => 2, 3 => 5, 4 => 6; say %h{(%h.keys (-) [1, 2]).keys}; | 05:38 | |
| camelia | (2 5 6) | ||
| lookatme | :( | ||
| m: my %h = 1 => 2, 3 => 5, 4 => 6; say %h{(%h.keys (-) <1, 2>).keys}; | 05:43 | ||
| camelia | (2 5 6) | ||
|
05:44
ryn1x joined,
parv joined
|
|||
| lookatme | m: my %h = bar => 2, foo => 5, fbar => 6; say %h{%h.keys() (-) <foo bar>}; | 05:47 | |
| camelia | 6 | ||
| parv | that's interesting (set operation). | 05:48 | |
| lookatme | m: my %h = 1 => 2, 2 => 5, fbar => 6; say %h{%h.keys() (-) ("1", "2")}; | ||
| camelia | 6 | ||
| lookatme | m: my %h = 1 => 2, 2 => 5, fbar => 6; say %h{%h.keys() (-) <1 2 >}; # that's not work | 05:49 | |
| camelia | (Any) | ||
|
05:49
ryn1x left
|
|||
| lookatme | m: my %h = 1 => 2, 2 => 5, fbar => 6; say %h{%h.keys() (-) Q :w < 1 2 >}; # that's what I like Q | 05:50 | |
| camelia | 6 | ||
| parv | oh man, too much work that. | 05:51 | |
| (relatively speaking) | |||
| lookatme | hmm | ||
|
05:52
Cabanossi left
05:54
ufobat_ joined
05:55
Cabanossi joined,
cdg left
|
|||
| parv | lookatme, could that be due to IntStr thing? | 05:57 | |
| say <4 5 >.perl | |||
| evalable6 | (IntStr.new(4, "4"), IntStr.new(5, "5")) | ||
| parv | p6: say <4 5 >.perl | ||
| camelia | (IntStr.new(4, "4"), IntStr.new(5, "5")) | ||
| lookatme | oh | 05:58 | |
| parv | p6: say <a b >.perl | ||
| camelia | ("a", "b") | ||
| lookatme | That's why it not work :( | ||
| m: say Q :w <1 2 > | |||
| camelia | (1 2) | ||
| lookatme | m: say Q :w <1 2 > .WHAT | ||
| camelia | ===SORRY!=== Method call must either supply a name or have a child node that evaluates to the name |
||
| lookatme | m: say (Q :w <1 2 > ).WHAT | 05:59 | |
| camelia | (List) | ||
| lookatme | m: say (Q :w <1 2 > ).[0]WHAT | ||
| camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3say (Q :w <1 2 > ).[0]7⏏5WHAT expecting any of: infix infix stopper postfix statement end stateme… |
||
| lookatme | m: say (Q :w <1 2 > ).[0].WHAT | ||
| camelia | (Str) | ||
| lookatme | m: dd (Q :w <1 2 > ) | ||
| camelia | ("1", "2") | ||
| parv | "try harder to convert Int to Str" is the way to go (for now) :-| | 06:00 | |
|
06:00
ryn1x joined
|
|||
| lookatme | oh | 06:00 | |
|
06:01
Actualeyes joined
|
|||
| parv | lookatme, have you written modules in perl6 yet? or, have you written anything of significance (to you)? just curious. | 06:03 | |
| lookatme | Hmm, and another thing my script is fast enough when I use nqp and racer : ideone.com/Cm7Cox | ||
| yeah, I write some module | |||
| my nickname is araraloren | 06:04 | ||
| Hmm, How to find module use the robot ? I forgot it | 06:05 | ||
|
06:06
mempko left
|
|||
| parv | lookatme, thanks. i am reading your program. | 06:08 | |
| lookatme | Oh, that's use for find source file of c / c++ | ||
|
06:09
piojo joined
|
|||
| lookatme | grep: Getopt | 06:09 | |
| greppable6 | lookatme, gist.github.com/44190923ec32ed4f2d...498c245f63 | ||
| parv | still, that is much more than what I had used perl6 (only just on the command line/REPL). | 06:10 | |
| lookatme | we can use it in our work | 06:13 | |
| I'm a c/c++ developer, So I make a perl6 app : github.com/araraloren/perl6-app-snippet | 06:15 | ||
| run some c/c++ snippet | |||
| parv | lookatme, got that. | 06:17 | |
|
06:17
domidumont joined,
domidumont left,
domidumont1 joined
|
|||
| lookatme | parv, And some other script for personal using, such like a simple spdier: github.com/araraloren/Getopt-Kinok...picture.p6 , using for fetch picture in Baidu tieba(in china) | 06:18 | |
|
06:18
BenGoldberg left
|
|||
| moritz | good morning | 06:18 | |
| lookatme | moritz, morning o/ | ||
|
06:22
domidumont1 left
06:25
domidumont joined
06:39
ryn1x left
06:43
geospeck joined,
geospeck left
06:49
nadim joined
07:01
darutoko joined
07:04
abraxxa joined
07:05
ryn1x joined,
wamba joined
07:06
lookatme left
07:08
Cabanossi left,
abraxxa left
07:10
ryn1x left,
Cabanossi joined
07:12
geospeck joined
07:16
lookatme joined
07:23
abraxxa joined
07:36
ch3ck3r left
07:38
wamba left
07:41
wamba joined
07:46
domidumont left
07:48
aborazmeh left
08:01
Alikzus joined
08:04
geospeck left,
geospeck joined,
domidumont joined,
geospeck left
08:09
nadim left
08:10
rindolf joined
08:13
dct joined
|
|||
| ufobat_ | heya :) | 08:16 | |
|
08:17
ufobat_ is now known as ufobat
|
|||
| lookatme | :) ho | 08:17 | |
|
08:17
ryn1x joined
08:22
ryn1x left
08:24
zulu46 joined
08:26
zakharyas joined
08:28
zulu46 left
08:32
zakharyas left,
Arimaafan9 joined
08:33
zakharyas joined,
HaraldJoerg joined
08:36
dugword joined
08:37
dct left
|
|||
| Arimaafan9 | Hello. I have a question: I want to make an instance of a class (myclass1 in file1.pm6) in side another class (myclass2 in file2.pm6). I can instantiate a class in a pl6 file by writing "use lib '.'; use file1;", but when I try doint that in a module file I get an error. | 08:39 | |
|
08:39
Cabanossi left
08:40
dugword left,
Cabanossi joined
|
|||
| Arimaafan9 | anyone know how to do this? I tried asking on stackoverflow, but couldnt get an answer. | 08:41 | |
| lookatme | Arimaafan9, are you trying make a module ? | 08:42 | |
|
08:45
Arimaafan9 left
08:51
xinming joined
08:55
giraffe joined,
giraffe is now known as Guest24088
08:56
cdg joined
09:00
cdg left
|
|||
| moritz doesn't find the question on SO | 09:01 | ||
|
09:07
abraxxa left,
Cabanossi left
09:09
lookatme left
09:10
Cabanossi joined,
lowbro joined,
lowbro left,
lowbro joined
09:20
dakkar joined
09:22
abraxxa joined
09:28
ryn1x joined
09:33
ryn1x left
09:54
Cabanossi left
09:55
margeas joined,
Cabanossi joined
10:03
ryn1x joined
10:07
ryn1x left
10:11
geospeck joined
10:15
napo1eon joined,
sena_kun joined
10:19
ChoHag joined
10:23
ShalokShalom joined
10:28
parv left
10:36
geospeck left,
geospeck joined
10:40
HoboWithAShotgun joined
10:45
geospeck left
|
|||
| stmuk | is there anything like "hackerrank" which is more OSS friendly, obscure language friendly and less recruiter focussed? | 10:48 | |
|
10:53
Cabanossi left
10:55
Cabanossi joined
10:56
araraloren joined
|
|||
| tbrowder | Arimaafan9: can you show a min version of what you’re trying to do? | 11:02 | |
|
11:19
ryn1x joined
11:23
ryn1x left
11:33
dugword joined
11:37
dugword left
11:41
Zoffix joined
|
|||
| Zoffix | huggable: advent | 11:41 | |
| huggable | Zoffix, Sign up to write an Advent blog post: github.com/perl6/mu/blob/master/mi...7/schedule | ||
| Zoffix | Sign up to write an Advent Post. Anyone can write. It doesn't have to be about code; just about Perl 6. Even if you're new you can write about something cool you've learned about Perl 6. | 11:42 | |
| rakudo.party/post/Rakudo-Perl-6-Ad...or-Authors | |||
|
11:45
geospeck joined
|
|||
| Geth | mu: d998b267f9 | (Zoffix Znet)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule Make schedule emptier |
11:49 | |
| Zoffix | (might still write those, but keep them as emergency advent hole filler) | ||
|
11:53
Cabanossi left
|
|||
| Geth | mu: a94cc1f361 | (Elizabeth Mattijsen)++ | misc/perl6advent-2017/schedule Tentative shotgun on the final Advent post This is a blog post that's been brewing inside of me for a long time already. It should give people food for thought. But I'm also open to taking such a post elsewhere or elsetime. |
11:54 | |
|
11:55
Cabanossi joined
|
|||
| Zoffix | \o/ | 11:55 | |
|
12:00
Zoffix left
12:02
jonas1 joined
12:03
araraloren_ joined
12:07
araraloren left
12:18
zakharyas left
12:25
ryn1x joined
12:27
ChoHag left,
ChoHag joined
12:28
raschipi joined
12:29
AlexDaniel joined
12:30
ryn1x left
|
|||
| El_Che | releasable6: status | 12:33 | |
| releasable6 | El_Che, Next release in 5 days and ≈6 hours. No blockers. 0 out of 176 commits logged | ||
| El_Che, Details: gist.github.com/6d31a40b2aa569dc6c...cee8e627b7 | |||
|
12:35
ChoHag left
12:37
ChoHag joined
12:39
Cabanossi left
12:40
Cabanossi joined
12:47
ChoHag left
|
|||
| araraloren_ | I他 | 12:49 | |
| It's harder find a good http client module :( | |||
|
12:50
ChoHag joined
|
|||
| timotimo | araraloren_: how do you like Cro::HTTP? | 12:53 | |
| araraloren_ | I have tried LWP::Simple HTTP::Client HTTP::UserAgent, every has its problem | ||
| I haven't try it yet | |||
| I'll try it tomorrow, I was trying to login into my router :) | 12:55 | ||
| timotimo | do you want a few tips for your directory crawler script? for making it faster? | ||
| araraloren_ | timotimo, thanks | ||
| yeah, please | |||
|
12:56
domidumont left
|
|||
| timotimo | the 'if $f ne "." | ".."' might go through actual junctions if my junction optimization doesn't catch it, so that might be significantly more expensive than $f ne "." && $f ne ".." | 12:56 | |
| if you turn %ext into a Set up front your (elem) will be much cheaper because it won't have to recreate the set over and over again | 12:57 | ||
|
12:57
domidumont joined
|
|||
| timotimo | same for $os<w> as well | 12:58 | |
| araraloren_ | yeah, ok | ||
| I'll test it :) | 12:59 | ||
| Thanks, I playing game now :) | 13:00 | ||
| timotimo | have fun! | ||
| araraloren_ | Hmm :) | 13:01 | |
| timotimo | oh, and if/elsif/else is noticably faster than given/when in tight loops | ||
|
13:01
[Coke] joined
13:19
ryn1x joined
13:24
ryn1x left
|
|||
| araraloren_ | OK | 13:25 | |
| timotimo | it won't be that way forever, but for now it is | 13:27 | |
|
13:33
ryn1x joined
|
|||
| araraloren_ | yeah, I think they haven't optimize it | 13:36 | |
|
13:38
ryn1x left,
Cabanossi left
13:39
mson joined
13:40
Cabanossi joined,
domidumont left
13:41
greppable6 joined,
ChanServ sets mode: +v greppable6,
domidumont joined
|
|||
| Geth | perl6-most-wanted: 8fa0def9af | (Tom Browder)++ (committed using GitHub Web editor) | most-wanted/modules.md giving up creating this module |
13:49 | |
|
13:53
mcmillhj joined
13:56
zakharyas joined
13:58
cdg joined
14:02
cdg left
14:04
cdg joined
14:09
ryn1x joined,
khw joined
14:12
dct joined
|
|||
| araraloren_ | ideone.com/KbiAdO I fixed some bug, and it quite fast now :) thanks | 14:12 | |
|
14:14
ryn1x left
|
|||
| raschipi | why do you have two shebangs? | 14:15 | |
| araraloren_ | Hmm, I paste one and the website has one :P | 14:16 | |
|
14:18
dct left
|
|||
| moritz | @ret.push("$path/$f") if $f ne ".." && $f ne "."; | 14:20 | |
| @ret.push("$path/$f") if $f eq none <. ..>; | |||
|
14:23
greppable6 left,
greppable6 joined,
ChanServ sets mode: +v greppable6,
dct joined
|
|||
| timotimo | moritz: it was a junction before, it's no longer that because of performance | 14:24 | |
| araraloren_: what was the bug? and how much faster did it get? | |||
| araraloren_: also, if you run it with perl6 --stagestats you can see if parsing it takes noticably long and turn it into a module that gets precompiled | 14:25 | ||
| El_Che | moritz: your book arrived today :) | ||
| timotimo | so your script will just be "use FindTheFiles" and the module would be the contents of what is now the script file | ||
| araraloren_ | ok, I'll test later | 14:26 | |
|
14:29
census joined
14:31
Ven joined,
Ven is now known as Ven``
|
|||
| moritz | El_Che: \o/ | 14:34 | |
|
14:43
geospeck left,
cdg left
14:44
cdg joined
14:45
comborico1611 joined
|
|||
| comborico1611 | Good morning. | 14:54 | |
| raschipi | morning | 14:55 | |
| comborico1611 | Been on here long? | 14:56 | |
| (today) | |||
| raschipi | 2h28min | 14:57 | |
| comborico1611 | Having a productive day? | 14:58 | |
| raschipi | i think now it will work | 14:59 | |
| araraloren_ | timotimo, it speed up the script about 20%. | 15:00 | |
| yeah, and the parser take long than old one | 15:03 | ||
|
15:04
dct left
|
|||
| araraloren_ | And I have not found the module FindTheFile :) | 15:05 | |
| oh, I misunderstand you. yeah I'll make it as a App module. | 15:06 | ||
| timotimo | how long does it take for "stage parse" and all that? | 15:10 | |
|
15:12
mempko joined
15:14
llfourn joined
15:15
cdg left
15:16
cdg joined
|
|||
| araraloren_ | The "stage parse" is about 0.497, what do you mean all ? timotimo | 15:18 | |
|
15:18
margeas left
|
|||
| timotimo | it also spends a bit of time in stage optimize and stage mast usually | 15:19 | |
| that time also goes down if your code is just "use App::FindStuffInFolders;" | |||
| araraloren_ | oh, awesome | ||
| it's about 0.027 and 0.037 | 15:20 | ||
| and the mbc stage is about 0.001 | |||
|
15:20
cdg left,
ryn1x joined
|
|||
| timotimo | OK, just a tiny win | 15:21 | |
| araraloren_ | Great, I gotta got to bed now, many thanks tonight timotimo | ||
| good night | |||
| timotimo | good night! | 15:22 | |
|
15:22
araraloren_ left
15:25
ryn1x left
15:38
Cabanossi left
|
|||
| HoboWithAShotgun | m: my @foo = (1,2,3); say @foo.map( $++ => *).join(';'); | 15:39 | |
| camelia | 0 1;1 2;2 3 | ||
| HoboWithAShotgun | where does that zro come from? | ||
|
15:40
Cabanossi joined
|
|||
| [Coke] | from the $ | 15:40 | |
| m: say $; say $++; | 15:41 | ||
| camelia | (Any) 0 |
||
| [Coke] | m: say +$; | ||
| camelia | Use of uninitialized value of type Any in numeric context 0 in block <unit> at <tmp> line 1 |
||
| jnthn | I think from the definition of ++ on a type object | 15:42 | |
| HoboWithAShotgun | is there an automatic loop counter? | 15:44 | |
| timotimo | there is not | 15:45 | |
| HoboWithAShotgun | bummer | ||
| timotimo | but $++ or ++$ can work as one | ||
| HoboWithAShotgun | i got bitten by that already | ||
| timotimo | m: say (1, 2, 3).pairs.join(";") | 15:46 | |
| camelia | 0 1;1 2;2 3 | ||
| timotimo | btw | ||
| and yes, $++ on an undefined value (what $ starts out containing) will return 0 rather than whatever undefined value was in $ before | |||
| because you're using it as a number, so having 0 as the starting point makes sense | |||
| HoboWithAShotgun | no i got bitten by it not getting reset to zero after the loop. so when i tried to ran that loop again it didn't work because $++ still had the value of the previous use | 15:48 | |
|
15:48
mson left
15:49
kerframil joined
|
|||
| AlexDaniel | HoboWithAShotgun: do you have any specific example? I think we want to add something to docs.perl6.org/language/traps#Usin...once_block | 15:49 | |
| HoboWithAShotgun | not anymore no. | 15:51 | |
| jnthn | m: my @foo = (1,2,3); say @foo.kv.map(* => *).join(';'); | 15:52 | |
| camelia | 0 1;1 2;2 3 | ||
| jnthn | Why not this? :) | ||
| comborico1611 | m: my $greet = sub { say "hi"; }; $greet( ); | 15:56 | |
| camelia | hi | ||
| comborico1611 | m: my $greet = sub { say "hi"; }; $greet; | ||
| camelia | WARNINGS for <tmp>: Useless use of $greet in sink context (line 1) |
||
| comborico1611 | m: my $greet = sub { say "hi"; }; $greet ( ); | 15:57 | |
| camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3my $greet = sub { say "hi"; }; $greet7⏏5 ( ); expecting any of: infix infix stopper statement end statement… |
||
|
15:57
yqt joined
|
|||
| ufobat | m: my $greet = sub { say "hi"; }; $greet.(); | 16:03 | |
| camelia | hi | ||
| ufobat | m: my &greet = sub { say "hi"; }; greet(); | ||
| camelia | hi | ||
| ufobat | m: my sub greet() { say "hi"; }; greet(); | 16:04 | |
| camelia | hi | ||
|
16:05
zakharyas left
|
|||
| comborico1611 | .() Interesting! Thank you. | 16:05 | |
| m: my $greet = sub { say "hi"; }; $greet.( ); | 16:06 | ||
| camelia | hi | ||
| ufobat | you have lexical subs as well | 16:09 | |
| comborico1611 | In fact, i think the method call is the most accurate way! | 16:10 | |
| ufobat | m: sub foo { my sub greet { say "hi" }; greet() }; a() | ||
| camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: a used at line 1 |
||
| ufobat | m: sub foo { my sub greet { say "hi" }; greet() }; foo() | ||
| camelia | hi | ||
| comborico1611 | Are you talking about .What etc? | ||
| ufobat | m: sub foo { my sub greet { say "hi" }; greet() }; greet(); foo() # greet() outside of foo() doesn't work | ||
| camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: greet used at line 1. Did you mean 'grep'? |
||
| comborico1611 | I think that's a little too advanced for me to understand right now. | 16:11 | |
| ufobat | i dont know if this is true, but if you ask me i'd find it strange to have a $scalar for a sub | ||
| basically you can delcare subs inside subs | 16:12 | ||
| comborico1611 | For sure. | ||
| ufobat | as you declare my $variables; | ||
| and they have a lexical scope, which means you can only use them within your (current) sub | |||
| and with that you could maybe avoid storing a anon sub in a $scalar | 16:13 | ||
| just as an idea | |||
| comborico1611 | I agree (from what i can understand). Using confusing code is not good. | ||
| ufobat | sub foo { my sub greet { say "hi" }; ...; greet() }; <-- you see sub greet is delcared inside foo | 16:14 | |
| so you can use greet() only inside foo | |||
| comborico1611 | Yes. Local scope. | ||
| ufobat | that's what i mean :) | ||
| comborico1611 | Gotcha. Thanks for the tips! | 16:15 | |
|
16:20
cdg joined
16:22
cdg_ joined
16:25
cdg left
16:27
geospeck joined
16:28
domidumont left
16:31
philomath joined
16:32
ryn1x joined,
dugword joined,
mingdao left
16:34
mingdao joined
16:36
ryn1x left,
dugword left
16:45
margeas joined
|
|||
| Geth | marketing: 4d940542f6 | (Zoffix Znet)++ | 34 files Reorganize structure - Add `pub` dir that will have usable, relocation-safe links to materials - Add `archive` dir to keep outdated stuff at |
16:50 | |
|
16:53
Cabanossi left,
HaraldJoerg left
|
|||
| Geth | marketing: d9cda79be7 | (Zoffix Znet)++ | 23 files Add "Introducing Perl 6" brochure First draft |
16:54 | |
| marketing: 803884ef64 | (Zoffix Znet)++ | pub/Introducing-Perl6-Brochure.pdf Add pub symlink to Introducing Perl 6 brochure |
16:55 | ||
|
16:55
Cabanossi joined
16:56
AlexDaniel left
|
|||
| Geth | marketing: 1323e739ad | (Zoffix Znet)++ (committed using GitHub Web editor) | pub/README.md Add clickable link to raw PDF |
16:56 | |
|
16:56
HoloIRCUser2 joined
16:57
mcmillhj left
16:58
HoloIRCUser2 left
17:06
zakharyas joined
17:07
domidumont joined
17:08
ryn1x joined,
nadim joined
17:10
mcmillhj joined
17:11
lowbro left
17:12
abraxxa left,
ryn1x left,
census left
17:13
st_elmo joined
17:14
abraxxa joined
17:15
mcmillhj left
17:18
abraxxa left
|
|||
| Voldenet | m: await (^3).map({ start { sleep(.100); }}); say now - BEGIN now | 17:19 | |
| camelia | 0.17777005 | ||
| Voldenet | I wonder if there's any good way to get the critical {} working | 17:20 | |
| using Lock.protect sounds good enough, I'm just wondering if I can use some global namespace for magic "critical" keyword | 17:22 | ||
|
17:23
epony joined
|
|||
| Voldenet | m: sub critical(&c) { state $lck = Lock.new(); $lck.protect: &c; }; await (^3).map({ start { critical { sleep(.100); }}}); say now - BEGIN now | 17:24 | |
| camelia | 0.343150 | ||
| ugexe | shouldnt use state var for locks | 17:25 | |
| Voldenet | Okay. But why? | 17:26 | |
| ugexe | its not thread safe to do since its at least two non-atomic operations, //=, (is this defined) -> (if not then define it) | 17:27 | |
| so you could get two threads hitting it before its defined | |||
|
17:27
ChoHag left
|
|||
| Voldenet | Oh, so... | 17:27 | |
| m: sub critical(&c) { with BEGIN Lock.new() { .protect: &c } }; await (^3).map({ start { critical { sleep(.100); }}}); say now - BEGIN now | |||
| camelia | 0.3735283 | ||
| ugexe | or something like that. so generally you just put it as a lexical or a attribute | ||
| Voldenet | that'd be better, right? | 17:28 | |
| ugexe | yeah i think that is ok | ||
| Voldenet | thanks | ||
| geekosaur | there's an atomicvar also | 17:29 | |
|
17:29
mcmillhj joined
|
|||
| timotimo | zoffix, "and with that how to get started" sounds strange | 17:31 | |
|
17:32
abraxxa joined
|
|||
| timotimo | i wonder if i should open github issues for this? | 17:32 | |
|
17:32
yqt left
17:40
mson joined
17:43
ryn1x joined
|
|||
| timotimo | i like the brochure. only very minor issues | 17:44 | |
|
17:44
ChoHag joined
17:47
dakkar left
17:48
ryn1x left
17:55
rgrau joined
18:01
geospeck left
18:06
zakharyas left
|
|||
| timotimo | i expect the pages from our books would just be added from wendy's original brochure pdf? | 18:07 | |
|
18:09
abraxxa left
18:14
comborico1611 left
18:17
zakharyas joined
18:20
nadim left
18:22
rgrau left
18:23
geospeck joined
18:26
darutoko left
18:28
tailgate joined
|
|||
| Geth | marketing: a9c65b4824 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.md Add license section |
18:30 | |
| tailgate | Hi, I'm trying to set up zef on OSX. I installed it with rakudobrew, and packages install sucessfully. However, if I atempt to use a package i installed, I get Could not find Text::CSV at line 1 in: (list of folders) | 18:32 | |
| what do I need to change to get this working? | |||
| [Coke] | tailgate: works fine here; do you have multiple versions of rakudo installed with rakudobrew? | 18:34 | |
| tailgate | I installed previous versions. Is there a way to check that? | ||
| I used homebrew | |||
| [Coke] | ... homebrew, or rakudobrew? | ||
| I'm testing Text::CSV right now in case there's something weird about that module in particular. (works for me in general though, using a single installed rakudo version in rakudobrew and using zef as my module installer) | 18:35 | ||
| when you install a module, it's for that named version you installed with rakudobrew; so moar-2017.10 might have it, but moar-2017.09 could not. | 18:36 | ||
| (yup, that module works fine) | |||
| tailgate | yeah, I think I have something screwed up on my side | 18:37 | |
| [Coke] | so could be version skew in rakudobrew; could be a typo in your use: $ perl6 -MText::CSV -eNil; will test that one module. | ||
|
18:37
Cabanossi left
|
|||
| tailgate | I get the same error | 18:38 | |
| HoboWithAShotgun | m: my $proc = run 'sed', 's/e/x/', :in($input); say $proc.in.put("test", ); | ||
| camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$input' is not declared at <tmp>:1 ------> 3my $proc = run 'sed', 's/e/x/', :in(7⏏5$input); say $proc.in.put("test", ); |
||
| HoboWithAShotgun | m: my $proc = run 'sed', 's/e/x/', :in("tee"); say $proc.in.put("test", ); | 18:39 | |
| camelia | run is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in sub run at src/RESTRICTED.setting line 14 in block <unit> at <tmp> line 1 |
||
| HoboWithAShotgun | meh | ||
|
18:39
troys joined
|
|||
| tailgate | [Coke]: I figured it out. I need to run rakudobrew init and put rakudo in my PATH | 18:39 | |
| so I just need to set up my shell's init | 18:40 | ||
| HoboWithAShotgun | anyway, the put line above complains about the signature not matching. | ||
| ugexe | because :in does not take a command to run | ||
|
18:40
Cabanossi joined
|
|||
| ugexe | you give it a handle | 18:40 | |
| [Coke] | tailgate: ah, so maybe were testing with a different perl6 than the RB one. | 18:41 | |
| tailgate | Im using homebrew's rakudo-star | 18:42 | |
| ugexe | my $tee = shell "tee", :out, :in; and :in($tee.out) + $tee.in.put(...) or some such | ||
| [Coke] | so no rakudobrew at all? | ||
| tailgate | no, I have it installed. | ||
| rakudo init fixed it | |||
| [Coke] | ... rakudo-star and rakudobrew are two completely different things. you have both? | 18:43 | |
| tailgate | yeah | ||
|
18:44
wander joined,
geospeck left
18:46
setty1 joined
|
|||
| tailgate | The zef instructions said to use rakudobrew | 18:47 | |
| [Coke] | if you're using zef via rakudobrew, then you're not using rakudo-star anymore. | 18:48 | |
|
18:48
TimToady joined
18:49
zakharyas left
|
|||
| tailgate | hmm. If i uninstall rakudo-star, my perl6 command is gone too | 18:49 | |
| [Coke] | rakudo star comes with zef, a bunch of modules pre-installed... | ||
| ugexe | well, if you have a rakudostar installed and also rakudobrew its possible for the rakudobrew perl6's zef bin to use the rakudo star lib of zef (old) | ||
| [Coke] | tailgate: ah, trust ugexe over me, they wrote zef. | 18:50 | |
| tailgate | Is it better to install zef manually or rakudobrew? | 18:51 | |
| ugexe | if you do `zef --help` it will show you the path of its configuration file | ||
| that should show you if the correct zef is being used | |||
| [Coke] | tailgate: again, you should have already had zef installed from star. | ||
|
18:53
st_elmo left,
Rawriful joined
18:54
kerframil left
|
|||
| wander | or `zef --help |& grep CONFIGURATION` for `zef --help` prints a lot of infos | 18:58 | |
|
18:59
ryn1x joined
19:00
comborico1611 joined
19:01
geospeck joined
19:02
tailgate left
19:04
ryn1x left
19:05
Aaronepower joined
19:07
Cabanossi left
19:09
ilogger2_ joined
19:10
ilogger2 joined,
ChanServ sets mode: +v ilogger2
|
|||
| HoboWithAShotgun | how do i create a rx// with a :g modifier? | 19:30 | |
|
19:31
ryn1x joined
|
|||
| HoboWithAShotgun | i tried $something ~~ m:g/$rx/; but that only matches once | 19:32 | |
| moritz | huh | 19:33 | |
| m: my $re = rx/./; say 'abc' ~~ m:g/$re/ | 19:34 | ||
| camelia | (「a」 「b」 「c」) | ||
| moritz | seems to match three times, as expected | ||
| huf | *can* g be part of the regex (and not the application of the regex)? | ||
| moritz | no | ||
| HoboWithAShotgun | allright, mus be something else then | ||
| moritz | it's a run-time only adverb | ||
| huf | oh but the original also, silly me | ||
|
19:34
mcmillhj joined
19:36
st_elmo joined,
ryn1x left
19:40
shlomif joined,
shlomif left,
shlomif joined
19:42
shlomif left
19:43
shlomif joined
19:45
ilogger2 joined,
ChanServ sets mode: +v ilogger2
19:47
espadrine joined
19:48
rindolf joined
|
|||
| HoboWithAShotgun | m: my $reg = 'foo|bar'; say "1"; say "foo" ~~ / $reg /; say "2"; say "foo" ~~ / foo|bar /; | 19:50 | |
| camelia | 1 Nil 2 「foo」 |
||
| HoboWithAShotgun | what am i missing here, why is the first one not matching? | 19:51 | |
| moritz | strings are interpolated as literals | 19:52 | |
| you need <$reg> if you want it to be interpreted as a regex | |||
|
19:55
Cabanossi joined
|
|||
| wander | otherwise it is literal | 19:57 | |
| m: my $reg = 'foo|bar'; say "1"; say "foo|bar" ~~ / $reg /; | |||
| camelia | 1 「foo|bar」 |
19:58 | |
| wander | docs.perl6.org/language/regexes#Re...erpolation | ||
|
20:01
epony joined
20:04
ChoHag joined
20:06
vike joined
20:12
comborico1611 joined
|
|||
| HoboWithAShotgun | i got bitten by something, not sure if it's a bug. This works: hastebin.com/bufudurowu.pl, this doesn't: hastebin.com/abotumajuq.pl | 20:14 | |
| it's probably that eval trap? | 20:16 | ||
| but i don't see what's wrong with that even if it gets eval'ed | |||
| timotimo | check what $i has in it afterwards | 20:17 | |
| probably something much larger than 4 | |||
| the <{ ... }> code is getting re-run every time the match reaches that point | 20:18 | ||
| m: my $i = 0; say "foo foo foo foo" ~~ / <{ say $i++; "foo" }> /; | |||
| camelia | 0 「foo」 |
20:19 | |
| HoboWithAShotgun | 32 | ||
| timotimo | m: my $i = 0; say "foo foo foo foo" ~~ m:g/ <{ say $i++; "foo" }> /; | ||
| camelia | 0 1 2 3 4 5 6 7 (「foo」 「foo」 「foo」 「foo」) |
||
| timotimo | you'll be matching 0foo | 1bar | 2baz | 3pun the first time | ||
| the second time you'll be matching against 4foo | 5bar | 6baz | 7pun | |||
| thanks to backtracking and searching for the next possible match it probably won't match 0foo_5barz either. perhaps 0foo_9barz or even later | 20:20 | ||
| HoboWithAShotgun: does the explanation make any sense? | 20:23 | ||
| HoboWithAShotgun | makes sense. the code block could return something else at each run | ||
|
20:28
releasable6 joined
|
|||
| HoboWithAShotgun | on a scale of 1 to 10, how terrible is this: hastebin.com/akagikufeg.pl | 20:29 | |
| (line 12) | 20:30 | ||
| lizmat | HoboWithAShotgun: how about "map( { .perl.substr(1, *-2) } )" ? | 20:32 | |
| HoboWithAShotgun | yeah | ||
| lizmat | haven't tried, but this may also work "map( *.perl.substr: 1, *-2 )" ? | ||
| HoboWithAShotgun | no, i mean how terrible is it to stringify a regex, strip the // and return it into a combined regex | 20:33 | |
| it feels there should be a better way to combine regexes | |||
| lizmat | ah, ok, like that | ||
| lizmat doesn't know of a way, but again, that's not saying much :-) | 20:34 | ||
| moritz | HoboWithAShotgun: well, you can build an array of regexes in the form rx/ $i $previous_regex / | ||
|
20:34
philomath joined
|
|||
| moritz | and then interpolate the resulting array | 20:34 | |
| HoboWithAShotgun | huh? | 20:35 | |
|
20:35
philomath left,
patrickz joined,
robertle joined,
rindolf left
|
|||
| moritz | let me try to make an example | 20:37 | |
|
20:38
cdg joined,
cdg left,
cdg joined
|
|||
| moritz | HoboWithAShotgun: perlpunks.de/paste/show/5a0a02db.1736.259 | 20:38 | |
| in Perl 6, regexes are much more like code than they are strings | 20:39 | ||
| ugexe | m: my $a = /a/; my $b = /b/; my $ab = /<$a> <$b>/; say "a" ~~ $ab; say "b" ~~ $ab; say "ab" ~~ $ab; # i already typed this so damnit im pasting it | ||
| camelia | Nil Nil 「ab」 |
||
| moritz | so you should the approach transforming regexes much like you would transforming code | 20:40 | |
| by embedding it in closures | |||
| m: my $a = /a/; my $b = /b/; my $ab = /$a $b/; say "a" ~~ $ab; say "b" ~~ $ab; say "ab" ~~ $ab; | |||
| camelia | Nil Nil 「ab」 |
||
| moritz | no need for <$foo> if $foo already contains a Regex object | ||
| HoboWithAShotgun | nice. | 20:41 | |
| now go and claim your price for solving something in 2 minutes I needed an hour for | |||
| stackoverflow.com/questions/472676...8#47268308 | |||
|
20:43
cdg left
|
|||
| HoboWithAShotgun puts the @.kv trick into his book | 20:43 | ||
| i had no idea that works with arrays too | |||
|
20:44
ryn1x joined
|
|||
| HoboWithAShotgun | and i see no why there is no magic line counter, you don't need it | 20:44 | |
| lizmat | s/no/know ? | ||
| or s/no/now ? | |||
| HoboWithAShotgun | dyslexia. | ||
| sometimes it slips through :) | 20:45 | ||
| lizmat | .oO( dyslexis untie! ) |
||
| moritz | HoboWithAShotgun: see smile.amazon.com/Parsing-Perl-Rege...1484232275 for more tricks :-) | ||
|
20:48
AlexDaniel joined,
ryn1x left
|
|||
| moritz | m: say Regex.^mro | 20:49 | |
| camelia | ((Regex) (Method) (Routine) (Block) (Code) (Any) (Mu)) | ||
| HoboWithAShotgun | shameless self plugger | 20:55 | |
| i like it :) | |||
| comborico1611 | Moritz, where are you from? My last name is Dolenz. | 20:59 | |
| moritz | comborico1611: Germany | ||
| comborico1611 | Do you have Slavic ancestry? | ||
| mspo | not Geneva living with the frankenstein family? | 21:00 | |
| moritz | comborico1611: not that I know of. "Lenz" is an old-ish German word for "spring" (the season) | ||
| mspo | (Justine Moritz) | ||
| moritz | and Moritz can also be a last name, yes | 21:01 | |
| comborico1611 | Hmm. Dolenc is Slovenian the low-lands. The C was changed to Z during immigration to America. | ||
| For low-lands* | 21:02 | ||
| Or hills (i can't remember) | 21:08 | ||
|
21:08
Cabanossi left
|
|||
| comborico1611 | Is "where" used mostly inside of signatures? | 21:09 | |
| timotimo | you can also use it for a subset declaration | ||
| m: subset Greeting of Str where /:i hi /; say "oh hi mark" ~~ Greeting | 21:10 | ||
| camelia | True | ||
| timotimo | m: subset Greeting of Str where /:i hi /; say "you're my favourite customer" ~~ Greeting | ||
| camelia | False | ||
|
21:10
Cabanossi joined
|
|||
| comborico1611 | Oh yes, i see. (That is the next paragraph in the book.). Mainly those two, alright. | 21:10 | |
|
21:12
andrzejku joined
21:19
mempko joined
21:33
kaare__ joined
21:37
nadim joined
21:45
ryn1x joined
21:46
zostay_ joined
21:47
jcallen_ joined
21:48
Shozan joined
21:49
freeze_ joined,
cdg joined,
BinGOs_ joined
21:50
ryn1x left
21:51
cdg left,
tabv left,
zostay_ is now known as zostay
21:52
mempko left,
erdic_ joined,
erdic_ left,
erdic_ joined,
GHAA6UVM joined,
tabv joined,
erdic_ is now known as erdic
21:53
leedo joined
21:54
unicodable6 joined,
Cabanossi left,
releasable6 left
21:55
Cabanossi joined
21:56
squashable6 joined,
daxim joined
21:57
charsbar joined
21:58
andrzejku left
21:59
yqt joined
22:02
squashable6 left
22:08
wamba joined,
mienaikage joined
|
|||
| lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/11/13/...explained/ | 22:11 | |
| comborico1611 | A weekly update is very impressive for volunteer work. | 22:17 | |
|
22:17
MasterDuke joined
|
|||
| lizmat | comborico1611: thank you :-) | 22:18 | |
|
22:21
benchable6 joined,
coverable6 joined,
quotable6 joined,
ChanServ sets mode: +v benchable6,
ChanServ sets mode: +v coverable6,
ChanServ sets mode: +v quotable6,
bisectable6 joined,
releasable6 joined,
committable6 joined,
nativecallable6 joined
|
|||
| comborico1611 | I've been impressed with the community, for sure. | 22:22 | |
|
22:25
pilne joined
22:26
ilmari[m] joined,
wamba[m] joined,
mack[m] joined,
M-Illandan joined,
wictory[m] joined,
Matthew[m] joined,
tyil[m] joined,
tadzik joined,
unclechu joined,
AlexDaniel` joined,
xui_nya[m] joined
22:27
CIAvash[m] joined,
Garland_g[m] joined,
ryn1x joined
22:29
squashable6 joined
22:30
Ven joined,
Ven is now known as Guest78171
22:31
ryn1x left
22:32
TEttinger joined
22:36
patrickz left
|
|||
| AlexDaniel | and yet again I forgot to generate the report… uhh | 22:36 | |
| time to make a bot I guess | 22:37 | ||
| lizmat | AlexDaniel: that's ok, we'll do a two week one next week :-) | ||
|
22:38
wamba left,
ryn1x joined
|
|||
| SmokeMachine | how can I get a ISO-8859-1 string from a socket async? | 22:40 | |
|
22:41
yqt left
|
|||
| timotimo | that's latin1, isn't it? | 22:42 | |
|
22:42
wamba joined
|
|||
| timotimo | hm, i thought the Supply method allowed setting an encoding | 22:42 | |
|
22:42
ryn1x left
|
|||
| timotimo | well, i'd suggest doing something like whenever $mysocket.Supply(:bin).map(*.decode('latin-1')) { say $_ } | 22:43 | |
| SmokeMachine | yes, latin1... | 22:44 | |
| thanks! | |||
|
22:45
kitsunenokenja joined
22:51
robertle left
22:54
Cabanossi left
22:55
Cabanossi joined
22:56
Guest78171 left
23:02
niceperl joined
23:03
niceperl left
|
|||
| timotimo | :o the talk about spitsh has been uploaded for like two weeks and i totally missed it :| | 23:11 | |
|
23:16
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6
23:17
wamba left
23:24
Cabanossi left
23:25
Cabanossi joined
23:27
statisfiable6 left,
statisfiable6 joined
23:28
cdg joined
23:32
cdg left
23:34
kitsunenokenja left
23:40
comborico1611 left
23:43
comborico1611 joined
23:44
ggherdov joined
23:45
espadrine left,
ryn1x joined
23:50
mcmillhj joined
|
|||
| timotimo | llfourn: i'm really enjoying that talk | 23:51 | |
|
23:52
ryn1x left
23:53
cdg joined,
pecastro joined
23:54
mcmillhj left,
Cabanossi left
23:55
Cabanossi joined
23:56
cdg left,
cdg joined
23:57
raschipi joined
|
|||