»ö« 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.
AlexDaniel b7j0c: generally, I think the current behavior is much better. You don't want your keys to change suddenly if you introduce a constant, right? :) 00:00
IOninja ... or some module imports it into your namespace 00:01
00:06 newbie1 left
TimToady in particular, as soon as you start lining up a bunch of => lines, and some of them are autoquoted, people will assume they all are 00:06
timotimo oh! i didn't even know about unix domain sockets in the "abstract namespace"
AlexDaniel m: my $p = Perl => 6; say $p 00:12
camelia rakudo-moar ffae3f: OUTPUT«Perl => 6␤»
AlexDaniel m: my $p = (Perl) => 6; say $p
camelia rakudo-moar ffae3f: OUTPUT«(Perl) => 6␤»
AlexDaniel :P
timotimo whoa.
i would have expected parens to prevent stringifying there 00:13
AlexDaniel huh?
:P
geekosaur so would I
IOninja They are
AlexDaniel are you guys kidding me? XD 00:14
IOninja You get the Perl typeobject that stringifies to (Perl)
geekosaur erm...
m: Perl.WHAT.say
camelia rakudo-moar ffae3f: OUTPUT«(Perl)␤»
IOninja *gistifies
geekosaur was afraid of that
timotimo turns out writing a gobby plugin or client or something requires you to handle C with GObject
geekosaur it's a type object, parenthesized
timotimo i do not have the patience for that.
00:19 cdg_ left
AlexDaniel commit: 906a46e5b^,906a46e5b,HEAD my @x = 1, 3, … * 00:21
committable6 AlexDaniel, gist.github.com/d4d95966198a465b18...312b4096c1
00:21 wamba left
timotimo some had a newline, others didn't? 00:22
AlexDaniel there's ‘*’ on a separate line
commit: 906a46e5b^,906a46e5b,HEAD my @x = 1, 3, … * < 5
committable6 AlexDaniel, gist.github.com/1db4a30fac8f070582...ed5b0e0e58
IOninja That's cause it parses … as the sub, which calls fail with *
m: fail * 00:23
camelia rakudo-moar ffae3f: OUTPUT«*␤ in block <unit> at <tmp> line 1␤␤»
IOninja (* being the Whatever)
s/sub/stub/;
timotimo ooooh
AlexDaniel interesting
timotimo well, the error message should remove the part about "use fail instead of ..." 00:24
or does … also work as "stub code executed"?
m: sub test { … }; test
camelia rakudo-moar ffae3f: OUTPUT«Stub code executed␤ in sub test at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
timotimo ah, ok, it also works
oh!
i didn't see that output correctly
right, we used to explode, now we go through with the compile and run it, but we do warn 00:25
00:26 cpage_ joined
AlexDaniel m: my @x = 1, 3 … *; say @x.flat 00:26
camelia rakudo-moar ffae3f: OUTPUT«(...)␤»
AlexDaniel m: my @x = 1, 3 … *; say @x.flat.flat
camelia rakudo-moar ffae3f: OUTPUT«(...)␤»
00:26 lukiramu left
AlexDaniel bisect: old=HEAD~200 my @x = 1, 3 … *; say @x.flat.flat 00:26
bisectable6 AlexDaniel, Bisecting by output (old=HEAD~200 new=ffae3ff) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/35faccfbec05aa1b62...a7db1bf909 00:27
AlexDaniel, (2017-02-07) github.com/rakudo/rakudo/commit/51...31029fa1f0
00:28 cpage_ left 00:29 cpage_ joined
timotimo so, we have an apache file listing for rakudo.perl6.org, right? 00:29
we can style the heck out of that if i'm not mistaken?
and i believe we should.
00:31 bjz joined
IOninja Don't think you'd be able to get the same effect as rakudo.org/downloads/star/ with "Latest release" sections. 00:31
AlexDaniel Geth: hey? 00:32
IOninja ummm
wonder if enabling https on its web endpoint screwed it ovedr 00:33
timotimo you think not?
IOninja timotimo: is that the "I've done it" you think so? 00:34
timotimo no, sadly not
i don't know how to find out how it was configured to be so pretty
IOninja timotimo: on rakudo?
*rakudo.org?
timotimo yup 00:35
that's the place where it is pretty
the place where it is not pretty is rakudo.perl6.org/download
IOninja I wrote a php script: github.com/perl6/web-rakudo
AlexDaniel IOninja: well, currently it redirects to https
IOninja: so perhaps github does not follow redirects?
IOninja And I'd think we don't want to run php on rakudo.perl6.org, so: port to pleasant things
00:35 mr-foobar left
timotimo we can surely port it to bash 00:36
IOninja AlexDaniel: prolly that. The hook errors say got 301 00:37
timotimo that's not php, it's got fat arrows!
AlexDaniel huggable: geth
huggable AlexDaniel, nothing found
00:37 mr-foobar joined
timotimo gotta go to bed now, though. and tomorrow will be a lot of driving 00:37
AlexDaniel instructions have to be changed too then
but for now you probably want to get rid of the redirection…
IOninja Yeah, that's what I'll do. 00:38
Once I figure out how...
AlexDaniel IOninja: while you're figuring it out, here's a question! 00:39
m: my @x = 1, 3 … *; say @x.flat
camelia rakudo-moar ffae3f: OUTPUT«(...)␤»
AlexDaniel m: my @x = 1, 3 … *; say flat @x
camelia rakudo-moar ffae3f: OUTPUT«(1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 15…»
AlexDaniel is it a bug?
00:39 girafe left
IOninja 1 sec 00:40
00:40 jraglin left 00:41 jraglin joined
IOninja man, how do I undo the SSL thing 00:41
AlexDaniel … don't undo it?
just don't redirect
I've already changed whateverable hook to use https… 00:42
IOninja And it works? 00:43
I didn't add the redirect; the script did. No idea where it is tho
00:44 b7j0c left
AlexDaniel well, i don't know if it works 00:44
but I hope it does :D
00:45 itcharlie1 joined
Geth doc: 72d3a7b4b7 | (Will "Coke" Coleda)++ | doc/Language/control.pod6
remove trailing whitespace
00:45
doc: a92b7604d1 | (Will "Coke" Coleda)++ | xt/code.pws
learn new code words
doc: 99aa1b7065 | (Will "Coke" Coleda)++ | doc/Type/Str.pod6
fix examples
IOninja The answer is yes....
Well, I guess there's the other side of the coin to being superpainlessly install SSL cert: no idea where the hell the configuration to do the redirect is 00:48
Not how I planned to spend a Friday night -_- 00:50
AlexDaniel what are you using there? Apache?
Geth doc: 1122a88012 | (Tom Browder)++ | doc/Language/control.pod6
add format chars
00:52
IOninja There. Fixed forever
00:54 Geth left, Geth joined, ChanServ sets mode: +v Geth, cpage_ left
IOninja And the config was in the config for the site, I just skimmed through the rules without paying attention -_- 00:55
AlexDaniel \o/
IOninja: flat?
00:56 cpage_ joined
IOninja AlexDaniel: aha. Yeah, flat needs some loving. Adding another candidate that just takes one Iterable. That way the laziness flag will stay with it. Right now it's being lost due to the **@foo slurpie 00:56
00:57 cpage_ left
IOninja So it is a bug that I have listed in my notes/TODO files :} 00:57
(as opposed to a ticket)
I'm selfish. I have a private stash of bugs :P
TimToady me too :) 00:59
AlexDaniel pfft, you just saved me 3 minutes of my life :)
TimToady just one line of it is: fix %*LANG, $*ACTIONS, %*PRAGMAS
which is exactly what the braids branch does
when I do a recursive grep for PRAGMAS, that file is the only thing it finds :) 01:01
01:02 kurahaupo_ joined 01:03 ggoebel left 01:04 kurahaupo__ left
TimToady just had a random failure in S32-io/other.t though, but pretty sure that's not my fault... 01:05
01:09 aborazmeh joined, aborazmeh left, aborazmeh joined 01:13 llfourn joined
TimToady ran it five times without error, but failed after test 8 in the spectest 01:14
01:25 aborazmeh left 01:32 holyghost joined 01:35 Actualeyes joined 01:38 agentzh joined 01:46 kurahaupo_ left 01:54 araraloren left 01:55 araraloren joined 02:00 aborazmeh joined, aborazmeh left, aborazmeh joined 02:13 dwarring left 02:14 llfourn left 02:17 agentzh left 02:18 agentzh joined 02:19 AlexDaniel left 02:22 llfourn joined 02:24 itcharlie1 left 02:37 Actualeyes left
tbrowder IOninja: having certbot probs? 02:39
I feel yr pain... 02:40
02:45 ilbot3 left 02:47 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:55 Tonik joined 02:59 Actualeyes joined 03:10 gdonald left, gdonald joined 03:13 Tonik left
IOninja Not any more. 03:17
03:24 adu joined, aborazmeh left 03:25 holyghost left 03:34 noganex joined 03:37 noganex_ left 03:44 agentzh left 03:53 ggoebel joined 04:20 pyrimidi_ left 04:28 Cabanoss- joined 04:32 Cabanossi left, Cabanoss- is now known as Cabanossi 04:34 inokenty left 04:49 inokenty joined 04:51 mr_ron left 04:56 adu left
araraloren m: class Op { }; my $x = Op; say $x.?name; 04:59
camelia rakudo-moar ffae3f: OUTPUT«Nil␤»
araraloren m: class Op { has $.name; }; my $x = Op; say $x.?name;
camelia rakudo-moar ffae3f: OUTPUT«Cannot look up attributes in a Op type object␤ in block <unit> at <tmp> line 1␤␤»
araraloren Why ? Is this has a problem with `.?` ? 05:00
geekosaur m: class Op { has $.name; }; my $x = Op; say $x.name; 05:01
camelia rakudo-moar ffae3f: OUTPUT«Cannot look up attributes in a Op type object␤ in block <unit> at <tmp> line 1␤␤»
geekosaur .? only detects whether a method exists or not; it does not detect whether method invocation fails 05:03
which it does in this case because the method looks up an instance variable, and the type object has no instance variables
("attributes")
05:06 khw left, llfourn left
araraloren Hm, sound like you are right.. 05:06
So `.?` is not fully safe, it's a trap .. 05:08
05:17 llfourn joined
araraloren Maybe I misunderstand it, it's different from optional menchanism in other language 05:17
05:18 pyrimidine joined
masak m: class Op { has $.name; }; my $x = Op; say $x.^name 05:35
camelia rakudo-moar ffae3f: OUTPUT«Op␤»
masak :)
geekosaur araraloren, it's not optional like std::optional or Haskell's Maybe 05:36
it's a way to call a method that might not exist. "optional" values are handled differently
masak right, the semantics isn't "only call the method if the *invocant* is defined", it's "only call the method if the method *exists*" 05:37
m: class C { has $.foo = 42 }; for C.new, C -> $c { say ($c // Nil).foo } 05:39
camelia rakudo-moar ffae3f: OUTPUT«42␤Nil␤»
masak perhaps the above is the closest thing to "only call the method if the *invocant* is defined" semantics in Perl 6
(Nil conceptually pretends to have all methods, and they all return Nil) 05:40
llfourn m: class Op { has $.name; }; my $x = Op; say ($x andthen .name) # this is what I do 05:43
camelia rakudo-moar ffae3f: OUTPUT«()␤»
geekosaur with? 05:49
05:49 bwisti left
llfourn yeah with works too :) 05:49
araraloren llfourn, geekosaur thanks, I got it.
05:53 jeffythedragonsl joined
jeffythedragonsl hey 05:53
araraloren hey .
jeffythedragonsl so I've been using perl 5 for a few weeks now 05:54
I can see why you all are trying to modernize the language 05:55
no offense but I think the ranking is Perl 5 < Python < Perl 6 05:56
perlpilo1 "trying"? Are we not succeeding? :)
araraloren It's easy to use and uderstand , more human
masak jeffythedragonsl: would that be Python2 or Python3, incidentally? ;) 05:57
perlpilo1 jeffythedragonsl: Python doesn't quite grok scope or closures well enough yet, so Python < Perl 5 < Perl 6
jeffythedragonsl both :)
perlpilo1 jeffythedragonsl: or unicode
05:57 agentzh joined
araraloren I think python3 is good than perl5 in some respects, not all 05:58
05:58 perlpilo1 is now known as perlpilot_
jeffythedragonsl the more I read about p6 the more I realize it's the language I've been looking for for so long 05:58
ugexe gist.github.com/ugexe/91ae37b94e57...3eaff32063 # gist demonstrating easy remote module access and installation through github http api 05:59
araraloren When you want make a one-liner, you wonder how to make code work in python2/3 ..
llfourn ugexe: nice
masak jeffythedragonsl: do you have an example? 06:01
jeffythedragonsl math that works
gradual typing
06:01 bwisti joined
jeffythedragonsl unicode 06:02
lazy evaluation
so many cool things
06:02 agentzh left
perlpilot_ jeffythedragonsl: Have you tried Haskell? ;) 06:02
jeffythedragonsl several years ago 06:03
haskell will bend your mind a little bit
TEttinger haskell would be faster than perl6, but that's uh... if it works at all. I've had serious compatibility issues with haskell as a whole on windows 06:04
so even if perl6 is slow, slow is better than "takes as much time as it takes for the haskell devs to fix their windows support"
jeffythedragonsl meh 06:05
TEttinger I like a lot of stuff about haskell, the ecosystem is very lacking
masak TEttinger: have you considered running a VMWare machine or something? maybe you'd get more things done than on Windows :P
TEttinger I have in the past
it's a hassle, eh
araraloren Perl 6 need more optimize, there is dialect of Perl 6 called Fanlang, seem like it's faster than rakudo 06:06
TEttinger most of the stuff I do is meant for games, so 98% of users are on windows
jeffythedragonsl Windows is still good for a lot of software but I'm a *nix supremacist
TEttinger can't ignore the market
araraloren: heh, agentzh comes in here often
Fanlang is faster but does not seem to support a lot of features that perl6 has had to really work on to achieve in the current form 06:07
06:08 wamba joined
araraloren Oh .. 06:08
llfourn araraloren: where is the src for fanlang?
araraloren llfourn, seem like it's not open source now 06:09
llfourn ohhh that explains it :)
masak I can easily believe it's easy-ish to create a *subset* of Rakudo's feature set that's faster, yes 06:10
for example, a subset that can be translated straightforwardly into C code
llfourn I wonder is it using rakudo to parse fanlang code? 06:11
araraloren so many features in Perl 6 ..
jeffythedragonsl I read about them and then when doing perl 5 at work I want to use them :/ 06:13
masak jeffythedragonsl: I'm curious -- have you heard of Inline::Perl5? 06:14
jeffythedragonsl yes
masak good, cool
makes it a whole lot easier to achieve nice things without compromising 06:15
jeffythedragonsl I can't just replace the complier on everyone though
masak I don't see why you would have to 06:17
araraloren Hm, simple say is better 06:18
s/say/way/
jeffythedragonsl oh, I thought you were suggesting I use rakudo and feed all the perl 5 stuff into it 06:20
masak no, I mean when you want to build something new using Perl 6 but find some modules from CPAN are not in place yet
jeffythedragonsl ah yes 06:21
perlpilot_ yes, nine++ 06:22
Woodi hallo #perl6 :) 06:36
m: my $v = 1; sub a() { say $v; $v++ }; sub b() { say $v; $v = 0 }; a; b; a; a
camelia rakudo-moar ffae3f: OUTPUT«1␤2␤0␤1␤»
06:36 bwisti left
Woodi are a() and b() a clousures ? 06:36
moritz yes 06:37
Woodi moritz: thanx :) just wondering about Perl6 clousure features...
but example above, acording to wikipedia, means Perl6 is not pure functional language, right ? 06:38
jeffythedragonsl not like haskell 06:39
Woodi also no "referential transparency" ?
just highly functional features ;) 06:40
jeffythedragonsl lol
hobbs perl6 isn't pure anything.
purely impure, maybe 06:41
masak "the example above means Perl 6 is not a pure functional language" -- hahahahaha 06:43
I'm sorry, but that's just extremely funny :D
Woodi masak: why ?
masak the presence of *the assignment operator* means Perl 6 is not a pure functional language 06:44
the fact that *variables vary* means Perl 6 is not a pure functional language
not everything being immutable values means Perl 6 is not a pure functional language 06:45
Woodi everyone need to start somewhere...
masak what do you have to go and build two subs `a` and `b` for? it's so silly.
just look at it! it's not pure functional! :D
Woodi masak: I wasn't rogue blogging... just asking. 06:46
hobbs ... blogging?
masak Woodi: by the way, a() and b() are closures, because both of them make use of $v but neither of them declares it. 06:47
Woodi: but again, you can look at the bit that says `$v = 1` and go "aha! not pure functional". you can skip the rest, including the closures.
Woodi hobbs: ppls screem bad things via blogs or fb or reddit :)
masak: I'm pretty convinced now. thanx 06:48
masak Woodi: apologies if I'm making light of what might simply be curiosity on your part 06:49
Woodi: those are important concepts you're investigating. keep at it ;)
06:49 darutoko joined 06:51 mr_ron joined
samcv good * 06:53
06:56 pyrimidine left
Woodi hi samcv :) 06:56
samcv hello 06:57
06:58 jeffythedragonsl left 06:59 jeffythedragonsl joined
jeffythedragonsl so guys 06:59
I did convince people to let me use perl6 at work but we need to get rakudo installed first 07:00
masak nice!
07:00 mr_ron left 07:05 mr_ron joined 07:13 llfourn left 07:14 mr_ron left 07:18 jeffythedragonsl left 07:22 wamba left
samcv fun! 07:24
07:27 mr-foobar left 07:28 raiph left, wamba joined, wamba left 07:37 jeffythedragonsl joined 07:52 pyrimidine joined 07:56 mr-foobar joined, rsaarelm joined, pyrimidine left 07:58 Tonik joined 08:02 CIAvash joined 08:09 llfourn joined 08:10 jeffythedragonsl left 08:12 cpage_ joined 08:14 llfourn left, wamba joined, wamba left 08:15 wamba joined, wamba left 08:32 RabidGravy joined 08:37 bjz_ joined 08:38 llfourn joined, bjz left, wamba joined 08:40 wamba left, wamba joined
rsaarelm Well this is weird. I had "set relativenumber" on my .vimrc and that made moving the cursor lag terribly in perl6 syntax mode. Never saw that in any other syntax. 08:46
08:46 wamba left, wamba joined 08:48 wamba left 08:50 wamba1 joined
rsaarelm Maybe it redraws all the lines and reruns the syntax highlighting and p6 highlight is slower than other langs. I can also see visible lag when doing pageup/pagedown. 08:53
samcv hmm 08:54
i noticed the perl 6 highlighting is slow with big files
for sure
i find Atom to be more comfortable experience though I often use vim for a quick edit 08:55
plus i get all the classes/routines/methods in a panel on the right i can just click and it will go to it
08:56 parv joined
samcv oh rsaarelm wana see my vim config. there's one setting i know really sped mine up 08:56
rsaarelm, see this section github.com/samcv/dot-files/blob/ma...rc#L17-L23 08:57
if you use that, obv you can remove my themes, but if it's a 256 color terminal then it likely supports those other features and is good to use them. and won't affect using raw tty 08:58
let me know if that helps you out
08:58 rindolf joined
rsaarelm samcv: Lazyredraw looks useful, I guess that helps when you're doing something like 500 repeats of a macro on a big file and have to wait on on the screen flashing by? 09:06
samcv seemed to help a bit even when not using macros
rsaarelm Trying out those, thanks.
samcv those settings screw up linux basic tty so you have to have it be conditional 09:07
rsaarelm I'm writing a script and want to add unit tests to it, but it looks like the standard operating procedure is to write a module, write a t/ subdirectory for the module, put the tests there and have the script use the module. I want to keep the p6 stuff in a single file since it's basically a one-off tool, so I guess I'll just hack up my own subroutine that prints assert results when you call it ... 09:08
... with --test.
samcv since you want it all in one file? yeah that seems fine 09:10
09:11 pyrimidine joined
samcv rsaarelm, what other languages do you know? 09:11
rsaarelm Was just wondering if there was an established TAP-friendly idiom for this since I'd guess one-off single-file tools are a common usecase. 09:12
samcv well having a routine that does testing seems fine to me 09:13
09:15 pyrimidine left 09:22 pyrimidine joined 09:27 pyrimidine left 09:34 bjz_ left 09:36 eroux joined 09:49 parv left
gfldex m: sub test { use Test; plan 1; ok True, 'All is well!' }; test 09:49
camelia rakudo-moar ffae3f: OUTPUT«1..1␤ok 1 - All is well!␤»
gfldex rsaarelm: ^^^ even `use Test` is lexically scoped
09:54 Lucas_One joined 09:57 kaare_ left 09:59 agentzh joined 10:03 kaare_ joined, agentzh left
rsaarelm Yeah, I'm doing that, seems to work great. 10:07
jeek 10:17
10:23 pyrimidine joined 10:30 mr-foobar left 10:35 robertle joined, Tonik left
Geth perl6.org: d01c397561 | (Naoum Hankache)++ | source/downloads/index.html
s/ rakudo.org / rakudo.perl6.org

commit 258664b Updated the link but forgot to update the text.
10:36
RabidGravy speaking of Test I'm always somewhat disappointed I can't do: 10:39
m: use Test; my &👍= &ok.assuming(True); 👍
camelia rakudo-moar ffae3f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Name must begin with alphabetic character␤at <tmp>:1␤------> 3use Test; my &7⏏5👍= &ok.assuming(True); 👍␤ expecting any of:␤ constraint␤ infix␤ infix stopper␤…»
gfldex m: use Test; constant term:<👍> = &ok.assuming(True); 👍 10:40
camelia ( no output )
gfldex RabidGravy: ^^^
10:40 sena_kun joined
gfldex m: use Test; plan 1; constant term:<👍> = &ok.assuming(True); 👍() 10:41
camelia rakudo-moar ffae3f: OUTPUT«1..1␤ok 1 - ␤»
gfldex m: use Test; plan 1; constant &term:<👍> = &ok.assuming(True); 👍
camelia rakudo-moar ffae3f: OUTPUT«1..1␤ok 1 - ␤» 10:42
gfldex there you go
gfldex .oO( Perl 6 does support madness. )
RabidGravy this is why I love it 10:43
Geth doc: e8aec11d92 | (Wenzel P. P. Peppmeyer)++ | doc/Language/syntax.pod6
better example for term:<>
10:50
doc: d94962a005 | (Wenzel P. P. Peppmeyer)++ | type-groups.json
categorise more types
sena_kun gfldex, you probably should use ": «" form in the comment. 10:52
Geth doc: e3e194e1f6 | (Wenzel P. P. Peppmeyer)++ | doc/Language/syntax.pod6
fix output
10:55
evalbot/gfldex-doc-sync: a4c5cbab43 | (Wenzel P. P. Peppmeyer)++ | evalbot.pl
sync OUTPUT with style in docs
10:59
evalbot: gfldex++ created pull request #9:
sync OUTPUT with style in docs
11:02 TEttinger left
Geth doc: ecd98a589d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Uni.pod6
test for tagging class files
11:15
11:16 mr-foobar joined 11:22 espadrine_ joined 11:25 espadrine joined 11:27 mawkish__ joined, espadrine_ left 11:31 lukaramu joined 11:45 setty1 left 11:53 llfourn left, labster left 12:01 bjz joined 12:07 bjz left 12:08 bjz joined 12:24 andrzejku left 12:25 CIAvash left 12:27 dotness joined
rsaarelm How do I say "if $mystring parses cleanly into a base-10 integer"? First I was happy that it seemed like I could just say "if $mystring.parse-base(10)", but then I realized what happens when the string is "0". 12:36
timotimo m: say "hello".parse-base(10)
camelia rakudo-moar ffae3f: OUTPUT«Cannot convert string to number: malformed base-10 number in '3⏏5hello' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
timotimo since it'll either parse cleanly or throw an exception, you probably don't want if anyway
but for your use case, the "with" keyword has been introduced 12:37
m: with "0".parse-base(10) { "$_ is my number".say }
camelia rakudo-moar ffae3f: OUTPUT«0 is my number␤»
rsaarelm I'm doing an elsif chain where one branch starts if the string is an integer.
gfldex m: say "hello".parse-base(10); CATCH { default { say .^name, ' ', .Str } }
camelia rakudo-moar ffae3f: OUTPUT«X::Str::Numeric Cannot convert string to number: malformed base-10 number in '3⏏5hello' (indicated by ⏏)␤»
timotimo btw, prefix the variable with +, that's shorter than .parse-base(10) 12:38
m: if False { say "not this one" } orwith +"0" { say "$_ is my number" }
camelia rakudo-moar ffae3f: OUTPUT«0 is my number␤»
timotimo orwith is basically elsif but with with instead of if
rsaarelm So this is the else branch that should get evaled if the string parses into an integer and skipped to the next else branch if it's not. Exception-handlers are an awkward fit here.
gfldex rsaarelm: it depend what you do. In most cases you do input validation with a rx as early as possible to fail before you do any lengthy computation.
rsaarelm Looks like "orwith +$mystr {" might work. Thanks. 12:40
timotimo nice :) 12:41
m: with try +"hello" { say "this is my number: $_" } else { say "not my number!" }
camelia rakudo-moar ffae3f: OUTPUT«not my number!␤»
timotimo ^- that's how you get that with exception handling, btw
without making it too awkward 12:42
m: with try +"999" { say "this is my number: $_" } else { say "not my number!" }
camelia rakudo-moar ffae3f: OUTPUT«this is my number: 999␤»
12:44 fhain joined
rsaarelm Was wondering what the equivalent of Python's 'in' is. Now I find out it's ∈. Not sure if disgusted or impressed. 12:44
timotimo don't have to spell it like that 12:45
there's also (elem)
rsaarelm I don't have a good system for typing unicode but having it in the source might actually be a good idea for readability.
timotimo docs.perl6.org/language/unicode_entry - seen this?
rsaarelm Well I'm not going to start memorizing the hex codes. 12:46
Though I did have a widget in my Vim that lets me type latex and unicode that. 12:47
timotimo a widget in vim? vim already has a functionality built-in that lets you type unicode stuff
12:47 mr_ron joined
timotimo ∈(-22088712ELEMENT OF 12:47
well, that pasted spectacularly badly 12:48
you press ctrl-k, then ( - and it'll give you the elem sign
rsaarelm This is a plugin that lets me do C-l and then type \in to get the set membership thing.
timotimo oh, latex-based
rsaarelm Hm, didn't know the C-k thing.
Geth doc: 6d341b8fe0 | (Wenzel P. P. Peppmeyer)++ | doc/Language/exceptions.pod6
show that try provides a return value
gfldex timotimo++ 12:49
timotimo it literally mentions the ^K right in the Vim section, though
perhaps it has to stand out a bit more
like, the "you can enter hex characters" should be moved downwards
and be mentioned as "in the worst case"
rsaarelm Yeah.
timotimo and the digraph one should be put up top
rsaarelm That's pretty neat actually, the digraphs are sorta mnemonic, so you could learn the mathy ones eventually. 12:50
timotimo yup
i wouldn't have pointed it out if i didn't think it's cool
12:52 ZzZombo joined, ZzZombo is now known as Guest78862
Guest78862 p6: say "I'm back!" 12:53
camelia rakudo-moar ffae3f: OUTPUT«I'm back!␤»
12:53 Guest78862 left, Guest78862 joined
timotimo ohai zzzombo 12:53
12:53 Guest78862 is now known as ZzZombo
ZzZombo stfu NickServ 12:53
yea, hello #perl6
rsaarelm Ugh. I can escape literal <, > in a <word list> with a backslash in front, but the Vim syntax mode doesn't understand it and messes up the highlighting in the rest of my file. 12:55
12:57 sjohnson left
ZzZombo So, unless I'm blinder than I'd give myself credit, where is the docs for Perl slangs? In particular, for creation of one. 12:58
timotimo might not have anything in doc.perl6.org 13:01
but there's example slangs
13:01 fhain left
ZzZombo "Note: Slangs are NYI in Rakudo." 13:02
ugh
fine? 13:03
timotimo oh, huh
where is that from?
ZzZombo docs.perl6.org/language/variables#The_~_Twigil 13:04
gfldex ZzZombo: see mouq.github.io/slangs.html
timotimo ah
ZzZombo gfldex: will take a look. Thanks a lot. 13:05
13:07 sjohnson joined
ZzZombo In the meantime, are they implemented or not, is that quote a leftover? 13:08
timotimo the quote is ... inaccurate
the ~ twigil isn't useful at the moment, if i understand correctly 13:09
but you can build slangs with a slightly more low-level approach, such as the slangs we have in the ecosystem show
moudles.perl6.org - search for "Slang"
13:17 ggherdov__ left, ggherdov__ joined, ggherdov__ left, ggherdov__ joined, ggherdov__ is now known as ggherdov
Ulti I have a bit of a silly one here too github.com/MattOates/BioInfo/blob/...ioInfo.pm6 13:20
13:24 bjz left, dotness left 13:25 bjz_ joined
ZzZombo "What actions classes to is create an AST" -- is there supposed to be "do" instead of "to"? 13:27
gfldex ^
timotimo yup
.seen mouq 13:28
yoleaux I saw Mouq 7 Jan 2016 04:12Z in #perl6: <Mouq> Juerd++ regardless :) even reading good code sucks
timotimo wow, that's long ago
13:31 lukiramu joined 13:32 setty1 joined 13:34 lukaramu left 13:35 jraglin left 13:47 espadrine left 13:48 espadrine joined, AlexDaniel joined 14:01 agentzh joined 14:05 skids joined 14:06 agentzh left 14:21 coloseau joined 14:24 coloseau left 14:30 cale2 joined 14:33 kurahaupo joined
Geth evalbot: a4c5cbab43 | (Wenzel P. P. Peppmeyer)++ | evalbot.pl
sync OUTPUT with style in docs
14:36
evalbot: af1d88a495 | (Zoffix Znet)++ | evalbot.pl
Merge pull request #9 from perl6/gfldex-doc-sync

sync OUTPUT with style in docs
cale2 Hey, how can I speed up this program? I don't have a background in CS, so I'm unsure of how to do things like "don't re-evaluate a long list on every iteration" glot.io/snippets/en8z8gqgkx
14:36 camelia left 14:37 camelia joined
IOninja for one you can avoid append in loop and just `do for` 14:38
14:38 newbie1 joined
IOninja m: my @stuff = do for ^3 { rand }; say @stuff 14:38
14:38 ChanServ sets mode: +v camelia
camelia [0.21669180321733 0.035343624204734 0.9542705172299] 14:38
IOninja m: my @stuff = flat do for ^3 { (rand, rand) }; say @stuff
camelia [0.718103630275985 0.238012063018444 0.117576807813873 0.698080171615648 0.911101333174519 0.0544951428357265]
cale2 IOninja: how does `do for` replace append though? I need to append it to the main list 14:40
AlexDaniel removing constraints might help also 14:41
IOninja IOninja │ for one you can avoid append ***im loop***
AlexDaniel m: my Int @pairs.push: 0; 14:42
camelia ( no output )
AlexDaniel m: my Int @pairs.push: 0; say @pairs
camelia [0]
AlexDaniel heh… interesting…
14:42 sammers left
AlexDaniel m: my Int @pairs = 0; say @pairs 14:42
camelia [0]
14:42 espadrine_ joined 14:43 espadrine left
cale2 Isn't the program slow because of the way it is iterating through the long list though? 14:44
I recall a word like "memoize" applying in a situation such as this lol 14:45
IOninja Which is a way of saying "cache yer stuff in a hash"
gfldex cale2: you could try @pairs»++; 14:47
cale2 IOninja: So like saving the length of the list in the hash and then only calculating the difference
gfldex: great idea
IOninja doubt the lenth of the list is a very expensive operation. 14:51
m: use experimental :cached; sub foo ($x) is cached { sleep 1; $x² }; say foo(42) xx 100 14:52
camelia (1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 1764 176…
cale2 Same. Is there an article about optimizing code? 14:53
IOninja ¯\_(ツ)_/¯ profile, replace slowest parts with faster parts. Repeat until you get bored.
perl6 has --profile switch
cale2 docs.perl6.org/language/performance 14:54
14:54 sammers joined
AlexDaniel well, generally you just try different stuff and try to measure the difference 15:00
you can try --profile first
15:05 zakharyas joined
cale2 @pairs>>.++ was actually slower than a normal map lol 15:05
the profile data was hard to make sense of
AlexDaniel oh, you may also try native ints 15:08
IOninja m: my @a = 1..10; @a[^*] += 1 xx @a
camelia Cannot assign to an immutable value
in block <unit> at <tmp> line 1
IOninja :(
mc: my @a = 1..10; @a[^*] += 1 xx @a 15:09
committable6 IOninja, ¦«2015.12»:
AlexDaniel it will either make it significantly faster or significantly slower
IOninja mc: my @a = 1..10; @a[^*] += 1 xx @a; say @a
committable6 IOninja, ¦«2015.12»: [20 (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any)]
IOninja heh
cale2 I just think my algorithm is bad. On the haskell version, it was really really slow as well. But then someone suggested one little change in the evaluation of the lists, and it was lightning fast 15:11
AlexDaniel IOninja: I don't understand what's happening here 15:12
m: my @a = 1..10; @a[^*] X= 5; say @a 15:13
camelia [5 5 5 5 5 5 5 5 5 5]
AlexDaniel ah… right
DrForr Speaking of optimizations, the code I removed (and maybe the reorganization I did) cut the runtime of the Perl6::Parser tests from 180+ down to 77 seconds.
15:14 ssm_ left
AlexDaniel well, at the moment rakudo is extremely sensitive to how you write your stuff 15:14
change method to a sub and boom you get a 2x boost 15:15
15:15 lizmat joined
AlexDaniel Here's one of these cases: github.com/perl6/whateverable/blob...#L101-L104 15:15
any other way of writing the same thing will be noticeably slower 15:16
DrForr Yeah, I don't doubt. It's one of the reasons I don't worry (yet) about optimization. But eventually it'll be worthwhile.
15:17 cale2 left
AlexDaniel and I was able to make it just a little bit faster by using nqp 15:17
another interesting case: github.com/MasterDuke17/Text-Diff-...6c61e4a772 15:19
DrForr I've just been refactoring purely to cut down on the amount of code I have to dig through to find problems. 15:20
15:25 bwisti joined 15:26 itcharlie1 joined 15:32 skids left
mspo isn't using nqp kind of bad practice? 15:37
IOninja heh 15:38
AlexDaniel mspo: sure. But what's the alternative? 15:43
DrForr Perl6::Parser relies on it. 15:45
But that's not meant as an endorsement. In my case there's simply no API exposed that does what I need. 15:46
16:10 eyck left 16:21 pyrimidine left, pyrimidine joined 16:42 eroux left
IOninja .ask jnthn seems $foo.WHAT === Code doesn't detect thunks? Here's my version of infix:<orelse> but it still returns a thunk instead of executed thunk. Am I doing it wrong? gist.github.com/zoffixznet/82ef0cf...5fab557427 16:42
yoleaux IOninja: I'll pass your message to jnthn.
IOninja oh crap. Now that I read it on github I see the error of my ways -_- 16:43
16:43 Penguiniator joined
IOninja Oh wait no 16:43
moritz $foo ~~ Callable?
IOninja Line 12 is checking for thunk and evals it before returning.. 16:44
moritz: but that would call even user Callables
16:44 mr_ron left 16:46 zacts left
IOninja hm, it tells me the .WHAT is a Block 16:49
Maybe I'm misunderstanding the thunk stuff...
gonna try moritz's suggestion
16:50 nowan joined
Geth doc: efa768cca4 | (Will "Coke" Coleda)++ | doc/Language/exceptions.pod6
remove trailing whitespace
16:51
16:52 zakharyas left, nowan_ left
IOninja .tell jnthn nevermind, I've got Blocks not Code 16:53
yoleaux IOninja: I'll pass your message to jnthn.
IOninja wooo I fixed it \o/ 16:55
m: my $stuff = ({say "hi"} orelse 42); say $stuff
camelia -> ;; $_? is raw { #`(Block|39889504) ... }
IOninja But my version executes that codeblock :/ 16:56
moritz that's not a thunk 16:58
it's a block
IOninja OK 16:59
m: note (Nil andthen "foo" orelse Nil orelse "bar");
camelia -> ;; $_ is raw { #`(Block|70957784) ... }
IOninja Is that also not a thunk but a block? 17:00
Should it be a thunk?
17:00 khw joined
IOninja What's the .b and .t stuff? "block" and "thunk"? github.com/rakudo/rakudo/blob/nom/...3838-L3840 17:02
IOninja tries those with .t 17:03
it worked! :P 17:05
moritz \o7
erm
\o/
IOninja lol... there's a gazillion spectest failures tho :P 17:06
17:08 cdg joined 17:11 cdg left, cdg joined
IOninja Well, I'm out of ideas for now. 17:13
IOninja untakes rt.perl.org/Ticket/Display.html?id=130798
17:14 mr_ron joined, Tonik joined
Geth doc: d992946f5f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Uni.pod6
Revert "test for tagging class files"

This reverts commit ecd98a589d824f4fa25f120e60d25965ba3f291c.
17:20
IOninja oh snap. MoarVM has already been released :) 17:26
I'm sittin' and waiting here lol
17:28 itcharlie1 left 17:37 ggoebel left 17:43 Penguiniator_ joined, Penguiniator left 17:44 ChoHag left 17:48 mawkish__ left, mawkish__ joined 17:50 ggoebel joined 17:52 NeuralAnomaly left 17:53 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 18:02 agentzh joined 18:03 gdonald left, eroux joined, gdonald joined 18:06 agentzh left 18:08 espadrine_ left 18:13 cpage_ left
arnsholt Gah. Porting Python to Perl is occasionally tricky 18:15
Some of the code relies on being able to store defaults in a class variable and then later overriding it with an instance variable 18:16
geekosaur ...who do they think they are, ruby?
timotimo oh hey arnsholt 18:18
arnsholt It's a pretty straightforward consequence of Python's lookup semantics, but doesn't map very well to other languages
timotimo can you do some trickery with // there?
IOninja :/ github.com/agwind/perl6-csv-gramma...f0279046f3
Looks like I need to up my name swapping game.
arnsholt timotimo: Possibly. I think I'll probably just let it be a normal instance variable with a default value 18:19
timotimo oh, you mean the shared default isn't meant to be changed and have a global impact?
arnsholt (Until some jerk decides that it's a good idea to change the class variable too. In which case I'll throw my laptop out the window)
I *think* it's not really supposed to be mutated
18:20 Actualeyes left 18:21 awwaiid left
timotimo so isn't that really just a default variable for an attribute? 18:21
arnsholt Yeah. I'm pretty sure that's how it's intended 18:23
But the semantics don't map 100%
timotimo OK 18:24
arnsholt And for a first pass I'm trying to keep it pretty close
On the principle of better to refactor something that already works than trying to refactor *and* port at the same time
IOninja You're converting it to Perl 6?
arnsholt Perl 5
IOninja ah 18:25
timotimo don't talk to me or my programming language ever again! :P
arnsholt With Moo and other nice things to make it closer to Perl 6, but still 5
(mst++ for making me aware of several of these nice things, incidentally)
IOninja uses Mew :) 18:26
timotimo huh, i have a feeling that when fudgeandrun runs syncthing is like "hey, these files just changed! better transfer them over!" 18:27
18:34 agentzh joined 18:38 jjido joined 18:48 cpage_ joined 18:55 Tonik left 18:56 kent\n left 18:58 eyck joined 18:59 jjido left 19:05 NeuralAnomaly left, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 19:07 jjido joined 19:13 andrzejku joined 19:21 kent\n joined
Geth ecosystem: f17d11680e | (Steve Mynott)++ | META.list
Leont's prove packaged for Rakudo Star
19:24
19:26 devmikey joined 19:30 labster joined 19:31 darutoko left 19:32 Voldenet joined
Voldenet hello 19:32
I'm trying to use a "grammar", but I can't figure out how to split that into more understandable rules: { .*? '.txt' } 19:33
19:33 jjido left 19:35 jjido joined
Voldenet What I did so far is that: grammar File { rule TOP { <name> '.txt' } token name { .*? } } 19:36
IOninja Seems simple enough as it is
Voldenet but it doesn't seem to match anything at all, so I must've misunderstood something
IOninja Prolly 'cause tokens don't backtrack
moritz IOninja: the release announcement still points to rakudo.org for downloads
IOninja m: grammar File { rule TOP { <name> '.txt' } token name { .*? } }.parse('foo.txt').say
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3rammar File { rule TOP { <name> '.txt' }7⏏5 token name { .*? } }.parse('foo.txt').s
expecting any of:
in…
moritz IOninja: can you pleaes change that for the next one?
IOninja m: grammar File { rule TOP { <name> '.txt' }; token name { .*? } }.parse('foo.txt').say
camelia Nil
IOninja m: grammar File { rule TOP { <name> '.txt' }; regex name { .*? } }.parse('foo.txt').say 19:37
camelia 「foo.txt」
name => 「foo」
IOninja Yeah
moritz: on purpose. I wanna make the download page as clear and pretty as the old one first.
Voldenet: so basically backtracking. `regex` instead of `token` works, but backtracking in grammars is a smell, so you should rethink your rules to do stuff without backtracking 19:38
moritz IOninja: oh, I hadn't actually seen the pretty version
IOninja: how is that done on the older server? 19:39
IOninja moritz: with a PHP script: github.com/perl6/web-rakudo
but I figure we can run something better on the new site
moritz IOninja: we could statically generate them after each upload
Voldenet IOninja: well sure, but for such general things as filenames you pretty much have to backtrack to get an extension, unless you started parsing reversed name, which makes sense 19:40
but is insane
moritz but I wouldn't even use a grammar for that, just plain .split 19:41
Voldenet Well, true. I'm just playing around with grammars so far, it's a nice shiny feature I don't really know how to use 19:43
IOninja m: grammar File { token TOP { <name> '.txt' }; token name { [ . <!before 'txt'> ]+ } }.parse('foo.txt').say
camelia 「foo.txt」
name => 「foo」
19:43 jjido left
IOninja Well, don't have to... 19:43
Voldenet: it's for doing a good bit of parsing, not to split a filename with extension :)
19:44 devmikey left
Voldenet Yeah, I thought it's a "nice drop-in replacement for perl5's regex mess" 19:44
IOninja m: "foo.txt" ~~ /$<name>=.+ $<ext> = '.txt'/; say $/ 19:45
camelia 「foo.txt」
name => 「foo」
ext => 「.txt」
IOninja Don't need a grammar :)
FYI: "if you have any code that depends on %*PRAGMAS or $*ACTIONS, it'll break" 19:47
Soon. We're marging improvements and stuff.
*mergin
Voldenet Well, that's a slow progress ;) 19:48
19:49 zakharyas joined, pyrimidine left, pyrimidine joined
IOninja moritz: yeah, static should work. As long as release managers remember to run it after upload :) 19:50
moritz IOninja: that's what the guides are for, no? :-)
IOninja: or could be run by cron job also
IOninja :) 19:51
19:53 TEttinger joined
lucs Um, what am doing here?: 19:55
m: .say for '04'..'16'
camelia 04
05
06
14
15
16
lucs m: .say for '07'..'11'
camelia 07
06
05
04
03
02
01
17
16
15
14
13
12
11
IOninja lucs: making a character range 19:58
lucs I don't get it :/
IOninja 0 rises to 1; 7 decreases to 1
0 rises to 1; 4 rises to 6
lucs Oooh... 19:59
How do I get strings for example from '03' to '12' (03 04 05 ⋯ 09 10 11 12) ? 20:00
20:00 gdonald left
IOninja m: say eager '03', *.succ … '12' 20:00
camelia (03 04 05 06 07 08 09 10 11 12)
lucs Hmm... Okay :) 20:01
Thanks
rindolf lucs: hi! Long time! How are you? 20:05
20:05 jjido joined, espadrine joined
lucs Good, thanks. Enjoying Perl a lot. 20:05
IOninja m: .say for '03', *.succ … '12' 20:06
camelia 03
04
05
06
07
08
09
10
11
12
IOninja (just to clarify `eager` wasn't part of making it)
lucs IOninja: Yep, I had that figured out, thanks. 20:07
ugexe no need to `zef update` before installing to get the latest module index anymore. unless you manually disable auto-update anyway 20:08
Voldenet m: .fmt('%02d').say for 3..12 20:09
camelia 03
04
05
06
07
08
09
10
11
12
Voldenet wow, it actually worked
20:09 regnarg joined
Voldenet that might be insane of me, but can a regex within a grammar pass a transformed regex into some sub-regex? 20:09
20:10 jjido left
Voldenet grammar ReverseGrammarIfA { rule TOP { <a> <b> } regex a { 'a' .*? - .* } regex b { 'b' .*? - .* } regex result { .*? - .* } } 20:12
but then a should pass \1 as \2 and \2 as \1, while b should just call result
hm, actually, can be simplified
grammar ReverseGrammarIfA { rule TOP { <a> | <result> } regex a { 'a' .*? - .* } regex result { $<first> = [.*?] - $<second> = [.*] } } 20:13
meh, nevermind, my question is gibberish 20:15
20:17 bwisti left
ugexe `$<name>=<.known-header> ':' <.OWS> {} $<value>=<::($<name>)>` you can dynamically choose a rule name based on the previous match's value 20:18
Voldenet basically, I want to parse 'aSecond - First' and 'bFirst - Second' as ['First', 'Second'], but named groups won't do - "First" and "Second" are subregexes 20:20
ugexe the capture is so it can use its value as the name of the subregex or whatever 20:22
<::($<name>)
regnarg Hi, I have a NativeCall struct like this: class args_t is repr('CStruct') { has int32 $.argc is rw; has CArray[Str] $.argv is rw; }
I currently find myself unable to write to the array
Voldenet It looks like a good answer, now I just need to understand it :-) 20:23
regnarg p6: use NativeCall; class args_t is repr('CStruct') { has int32 $.argc is rw; has CArray[Str] $.argv is rw; }; my args_t $args .= new; $args.argv = CArray[Str].new(["a"]); 20:24
camelia Cannot modify an immutable NativeCall::Types::CArray[Str]
in block <unit> at <tmp> line 1
regnarg p6: use NativeCall; class args_t is repr('CStruct') { has int32 $.argc is rw; has CArray[Str] $.argv is rw; }; my args_t $args .= new( :argv(CArray[Str].new(["a"])) );
camelia Cannot modify an immutable NativeCall::Types::CArray[Str]
in block <unit> at <tmp> line 1
ugexe p6: say $*VM.version 20:25
camelia v2017.02
regnarg p6: use NativeCall; class args_t is repr('CStruct') { has int32 $.argc is rw; has CArray[Str] $.argv is rw; }; my args_t $args .= new; $args.argv.push("a");
camelia Cannot modify an immutable NativeCall::Types::CArray[Str]
in block <unit> at <tmp> line 1
regnarg The docs say that we should use := instead of =. But that cannot be done from the outside. It works when I define a custom setter. 20:26
p6: use NativeCall; class args_t is repr('CStruct') { has int32 $.argc is rw; has CArray[Str] $.argv is rw; method set(CArray[Str] $val) { $!argv := $val; } }; my args_t $args .= new; $args.set(CArray[Str].new(["a"])); 20:27
camelia ( no output )
regnarg This works but is kinda ugly. Is there another way? (perhaps some magic trait instead of is rw) 20:28
20:31 jjido joined 20:33 labster left, labster joined 20:38 Rawriful joined, jjido left 20:39 Penguiniator_ left 20:40 Lucas_One left 20:49 Rawriful left 20:53 andrzejku left 20:56 torbjorn left 21:06 mawkish__ left, mawkish__ joined, Khisanth left 21:17 jeffythedragonsl joined 21:20 rindolf left, Khisanth joined, eroux left 21:30 jeffythedragonsl left 21:34 rindolf joined 21:38 zakharyas left 21:39 mawkish__ left 21:40 mawkish__ joined
Voldenet p6: say "abc def ghi" ~~ m:global{\w+} 21:49
camelia (「abc」 「def」 「ghi」)
Voldenet very weird
for me it outputs "False"
AlexDaniel 6c: say "abc def ghi" ~~ m:global{\w+} 21:50
committable6 AlexDaniel, ¦«2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,2016.09,2016.10,2016.11,2016.12,2017.01,HEAD»: (「abc」 「def」 「ghi」)
AlexDaniel Voldenet: what's your rakudo version?
committable6: all say "abc def ghi" ~~ m:global{\w+}
Voldenet it's debian stable, so... erm, ancient
AlexDaniel Voldenet: well, there's your answer
committable6 AlexDaniel, gist.github.com/b0c05edf8e1b116780...def245a865 21:51
AlexDaniel Voldenet: anything older than 2015.12 is worth upgrading
Voldenet 2014.07, lol
AlexDaniel Voldenet: according to the bot your version is <2014.11
yes
ok
Voldenet i can't believe it's the newest one in the repo
AlexDaniel right, you have debian jessie
I thought we were just about to see a new debian release… 21:52
Voldenet there's no good repo for pre-compiled "daily" debian snapshots?
AlexDaniel huggable: deb
huggable AlexDaniel, CentOS and Debian Rakudo packages: github.com/nxadm/rakudo-pkg/releases
Voldenet Thanks.
AlexDaniel Voldenet: not a repo, but you can get a deb package there ↑ 21:53
Voldenet Well, it's good enough. I can make a repo out of it. :-)
AlexDaniel 2017-02-05: Full freeze
21:54 mawkish__ left, mawkish__ joined
AlexDaniel so debian stretch will end up having rakudo 2016.12 21:55
not too bad!
… yet nothing for package management 21:56
(s/package/module/ ?)
21:56 bolangi left 21:58 bolangi joined 22:09 wamba1 left
Voldenet Hm, regexes seem a lot more different than in perl5, how do I do this in perl6: print $1 if "[abc]def" =~ /\[([^]]+)\]/? 22:09
p6: say "[abc]def" ~~ / '[' <[.] - [\]]>+ ']' / 22:11
camelia Nil
timotimo . inside [ ] doesn't mean "anything" 22:14
it means "a dot"
Voldenet Yeah, but then dot is invalid
timotimo say "[abc]def" ~~ / '[' <-[\]]>+ ']' /
m: say "[abc]def" ~~ / '[' <-[\]]>+ ']' /
camelia 「[abc]」
Voldenet makes a spectacular sense
timotimo :) :) 22:15
AlexDaniel hm, I wonder…
m: say "[abc]def" ~~ / ‘[’ (<-[‘]’>+) ‘]’ /
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>'
at <tmp>:1
------> 3say "[abc]def" ~~ / ‘[’ (<-[‘]7⏏5’>+) ‘]’ /
AlexDaniel m: say "[abc]def" ~~ / ‘[’ (<-[‘]’]>+) ‘]’ /
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>'
at <tmp>:1
------> 3say "[abc]def" ~~ / ‘[’ (<-[‘]7⏏5’]>+) ‘]’ /
AlexDaniel ok-ok… 22:16
m: say "[abc]def" ~~ / ‘[’ ~ ‘]’ (.+) / 22:17
camelia 「[abc]」
0 => 「abc」
AlexDaniel Voldenet: maybe this makes more sense?
IOninja Last one is wrong. 22:18
AlexDaniel why?
IOninja m: say "[abc]d]e]f" ~~ / ‘[’ ~ ‘]’ (.+) /
camelia 「[abc]d]e]」
0 => 「abc]d]e」
timotimo yeah, it goes to the last one
the other one goes to the first one
easy to fix, though 22:19
m: say "[abc]d]e]f" ~~ / ‘[’ ~ ‘]’ (.+?) /
camelia 「[abc]」
0 => 「abc」
AlexDaniel ah yeah
22:21 robertle left
Voldenet what does ~ actually mean? 22:25
timotimo "these two around the following thing" 22:26
22:35 rindolf left 22:37 Voldenet left 22:38 mawkish__ left
AlexDaniel (not documented yet: github.com/perl6/doc/issues/853 ) 22:38
22:38 mawkish__ joined 22:41 Voldenet joined, Voldenet left, Voldenet joined
moritz the grammar chapter of leanpub.com/perl6 talks about ~ too 22:43
and how you can use it to generate good error messages from a failed parse
</plug>
timotimo :) 22:46
sena_kun there is a PR that "should" document it, but not yet ready. 22:47
22:47 kurahaupo left 22:48 cdg left 22:53 cdg joined 22:57 cdg left 23:01 mawkish__ left 23:02 mawkish__ joined 23:05 llfourn joined 23:07 mr_ron left 23:10 mawkish__ left, mawkish__ joined 23:12 mr_ron joined 23:16 sena_kun left 23:26 mawkish__ left, mawkish__ joined 23:29 kalkin- joined 23:30 kalkin- left 23:31 mawkish__ left 23:32 mawkish__ joined 23:33 hartenfels joined 23:34 itaipu joined 23:35 lep-delete left 23:36 agentzh left 23:41 lep-delete joined 23:42 mawkish__ left, mawkish__ joined 23:44 espadrine left 23:45 mawkish__ left 23:46 mawkish__ joined 23:48 llfourn left 23:50 mawkish__ left, mawkish__ joined 23:54 mawkish__ left, mawkish__ joined 23:58 itcharlie joined