»ö« 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:01 thowe left
mspo so nqp is just bootstrap stuff? 00:01
seatek i've seen some people use it in their normal programming stuff
viki nqp ops map to VM ops and you also use NQP to generate QAST trees
and VM uses those trees to... do stuff 00:02
perl6 --stagestats -e 'use nqp; nqp::say("hello")' # gives you the stages of the program 00:03
perl6 --target=ast -e 'use nqp; nqp::say("hello")' # gives you the QAST tree, before it goes through the optimizer
mspo so it's a language for writing/bootstrapping moarvm and a lib to use in regular perl6 00:06
I recall that POD parser in nqp had some drama with not being as stable of a language 00:07
TimToady Perl 6 makes no promises about the stability of other languages, including nqp :) 00:08
viki the way to use it in regular code is with use MONKEY-GUTS; pragrma... and its name says a lot about how often you're expected to use nqp code in your programs :)
mspo: and it's not just MoarVM, JVM too and JS also is coming along.
00:09 canopus left
mspo anyway it's confusing 00:09
viki :)
Have you seen jnthn++ NQP training course?
edumentab.github.io/rakudo-and-nqp-...ls-course/
TimToady mspo: so is the inside of your car :) 00:10
mspo TimToady: that's why I only have one of them 00:11
TimToady no, no, no, use the best car for the job :P 00:12
mspo lol
from the outside I can say the relationship of NQP is extra confusing 00:13
even compared to rakudo vs ... (anything still developed?)
TimToady "Pay no attention to the lang behind the curtain!"
mspo TimToady: I mostly look at this stuff because I was some kind of static linking/perl-packer/whatever 00:14
00:14 perlawhirl joined
TimToady nodnod, not trying to discourage you there :) 00:14
viki mspo: you don't build a custom house each time. You make bricks, optimize your brick factory to make lots of them fast, and then use them to build whatever house you like. Same with NQP, you build just the basic features you need, to optimize them to be fast, and you use those feature to build anything that Perl 6 needs.
00:15 cdg left
perlawhirl should infix:<===> have a multi that handles IntStr's ? 00:15
m: say <8> === <8>
camelia rakudo-moar 054aca: OUTPUT«Ambiguous call to 'infix:<===>'; these signatures all match:␤:(Int:D \a, Int:D \b)␤:(Str:D \a, Str:D \b --> Bool)␤ in block <unit> at <tmp> line 1␤␤»
00:15 canopus joined
viki Yeah 00:15
mspo "Remember, ship artifacts not build environments." 00:16
perlawhirl viki: cool
viki s: &infix:<eqv>, \(<8>, <8>)
mspo s/was/want
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/5163...phs.pm#L78
viki perlawhirl: would you submit a PR fixing it? It'd be similar to that ^, except you'd use && instead of || and '===' instead of eqv. 00:17
perlawhirl: and add that to all allomoprhs, like RatStr and ComplexStr. 00:18
and NumStr
00:19 pmurias joined
perlawhirl sure will have a look 00:19
pmurias mspo: the nqp pragma 'use nqp' and the nqp language are different things 00:20
viki perlawhirl++ Thanks \o/ 00:22
perlawhirl: FWIW <4> is IntStr, < 4/2 > is RatStr (not the spaces), < 1+3i > is ComplexStr (again, spaces matter), and <1e2> is NumStr 00:23
AlexDaniel please not this again 00:24
00:28 pmurias left 00:31 avalokite joined
viki Ssshh... I'm luring a contributor! :) 00:32
00:33 avalokite left, avalokite joined
AlexDaniel m: say (Inf+1i).perl 00:35
camelia rakudo-moar 054aca: OUTPUT«<Inf+1i>␤»
AlexDaniel m: dd <Inf+1i>
camelia rakudo-moar 054aca: OUTPUT«<Inf+1i>␤»
viki That's literal Complex
AlexDaniel yeah, I know 00:36
I am surprised it works!
perlawhirl viki: thanks, yeah i saw those commits to p6doc yesterday.
viki m: dd <NaN+NaN1i>
camelia rakudo-moar 054aca: OUTPUT«"NaN+NaN1i"␤»
viki m: dd <NaN+NaNi>
camelia rakudo-moar 054aca: OUTPUT«"NaN+NaNi"␤»
viki :(
m: dd <NaN+Infi>
camelia rakudo-moar 054aca: OUTPUT«"NaN+Infi"␤»
viki oh right
AlexDaniel \ needed?
m: dd <NaN+NaN\i> 00:37
camelia rakudo-moar 054aca: OUTPUT«<NaN+NaN\i>␤»
viki m: dd <NaN+NaN\i>
camelia rakudo-moar 054aca: OUTPUT«<NaN+NaN\i>␤»
viki yeah :)
*phew*
AlexDaniel viki: at least it is not completely broken, this gives me some hope 00:38
viki It's barely broken :)
AlexDaniel m: dd <1--Inf\i> 00:39
camelia rakudo-moar 054aca: OUTPUT«<1+0i>␤»
viki ...
Ah, that's the -Inf is a term thing that I will fix soonish :)O
AlexDaniel viki: yeah, I'm actually waiting for this fix 00:40
viki Oh? I didn't realize :)
Why are you waiting for it?
AlexDaniel I mean, there are some bits of code where I'd much rather use the unicode version, not a big deal. But from the bug hunting perspective: I am not even trying a lot of things because I know they won't work because of this 00:42
viki :/
I'll fix it this weekend.
00:43 pierre_ joined
viki .in 4d fix the -Inf thing! 00:43
yoleaux viki: I'll remind you on 3 Dec 2016 00:43Z
00:44 BenGoldberg joined
AlexDaniel oh 00:45
viki ? 00:46
AlexDaniel m: dd <--Inf--Inf\i> # this is probably a bit funnier than the previous version
camelia rakudo-moar 054aca: OUTPUT«<0+0i>␤»
viki hehe
AlexDaniel \<0+0>/
00:47 wamba left
viki You could submit all these weird edge cases as a roast commit :P 00:47
00:47 Gruber joined
AlexDaniel not today though 00:48
.in 1d submit weird <--Inf++Inf\i> edge cases as roast tests 00:49
yoleaux AlexDaniel: I'll remind you on 30 Nov 2016 00:49Z
AlexDaniel by the way, I didn't know “+Inf” is a thing
00:49 bhm left, Grrrr left 00:50 bhm joined
AlexDaniel viki: by the way, why does it resolve to 0? 00:50
--Inf is +Inf, isn't it? 00:51
viki No idea, I'm now starting to suspect it's not the -Inf thing, but I'll take a look into it on the weekend too
It's in the same token as the thing I'll be fixing 00:52
00:55 aborazmeh joined, aborazmeh left, aborazmeh joined
AlexDaniel heh, this one is not wrong, it's just interesting 00:56
m: dd <0xFF.FF>
camelia rakudo-moar 054aca: OUTPUT«RatStr.new(255.99609375, "0xFF.FF")␤»
viki It's doing the :16<meow> thing 00:57
AlexDaniel yea
viki m: dd :3<0xFF>
camelia rakudo-moar 054aca: OUTPUT«255␤»
viki Which is also weird as well :)
m: dd :3<:36('Perl6IsGreat')>
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed radix number␤at <tmp>:1␤------> 3dd :3<7⏏5:36('Perl6IsGreat')>␤ expecting any of:␤ number in radix notation␤»
AlexDaniel I didn't know you can use _ after x 00:58
m: dd :3<0x_FF.FF>
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed radix number␤at <tmp>:1␤------> 3dd :3<0x7⏏5_FF.FF>␤ expecting any of:␤ number in radix notation␤»
AlexDaniel m: dd :16<0x_FF.FF>
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed radix number␤at <tmp>:1␤------> 3dd :16<0x7⏏5_FF.FF>␤ expecting any of:␤ number in radix notation␤»
AlexDaniel or, um
viki m: dd :3(':36<Perl6IsGreat>')
camelia rakudo-moar 054aca: OUTPUT«3344530687443935525␤»
viki :)
AlexDaniel m: dd <0x_FF.FF> # well, here you can for sure
camelia rakudo-moar 054aca: OUTPUT«RatStr.new(255.99609375, "0x_FF.FF")␤»
AlexDaniel hm 00:59
viki m: dd < :36<Perl6IsGreat> >
camelia rakudo-moar 054aca: OUTPUT«IntStr.new(3344530687443935525, ":36<Perl6IsGreat>")␤»
AlexDaniel wait, you can use :xx notation in < >? :o 01:01
viki yeah
and 0b
and 0o
m: dd < 0b001 0o34 0x42 > 01:02
camelia rakudo-moar 054aca: OUTPUT«(IntStr.new(1, "0b001"), IntStr.new(28, "0o34"), IntStr.new(66, "0x42"))␤»
AlexDaniel I wonder if this one needs a unicode minus sign too github.com/rakudo/rakudo/blob/nom/....nqp#L3466
non-ascii one I mean 01:03
viki yeah
It's part of the thing I'm fixin
seatek m: my$n = 'hi' ; say $n; # just found that an couldn't believe it never errored! :)
camelia rakudo-moar 054aca: OUTPUT«hi␤»
AlexDaniel seatek: this is common in code golf 01:04
01:04 cibs left
AlexDaniel there are a couple of other neat places where you can omit whitespace unexpectedly 01:04
see existing perl 6 code golf answers for more :)
seatek :) 01:05
01:05 cibs joined
AlexDaniel seatek: not sure if you will find this surprising, but: 01:06
m: say base 42: 2
camelia rakudo-moar 054aca: OUTPUT«101010␤»
seatek yeah i do 01:07
AlexDaniel do we have this documented, by the way?
how is it called?
m: dd < <hello world> > 01:10
camelia rakudo-moar 054aca: OUTPUT«Value of type List uselessly passed to val()␤ in block <unit> at <tmp> line 1␤("<hello", "world>")␤»
TimToady kewl
seatek it's like running a magnet around on a CRT screen 01:14
01:16 kurahaupo__ left, kurahaupo left 01:17 zakharyas joined
viki hoho :) 01:20
AlexDaniel: and that last one looks very related to this one:
m: qw { meow { moo mew } foo }
camelia ( no output )
viki m: dd qw { meow { moo mew } foo }
camelia rakudo-moar 054aca: OUTPUT«("meow", "\{moo", "mew}", "foo")␤»
AlexDaniel m: dd qw {{ meow { moo mew } foo }} 01:21
camelia rakudo-moar 054aca: OUTPUT«("meow", "\{", "moo", "mew", "}", "foo")␤»
AlexDaniel m: dd qw {{ meow {{ moo mew }} foo }}
camelia rakudo-moar 054aca: OUTPUT«("meow", "\{\{moo", "mew}}", "foo")␤»
AlexDaniel m: dd qw { meow {{ moo mew }} foo } 01:22
camelia rakudo-moar 054aca: OUTPUT«("meow", "\{\{moo", "mew}}", "foo")␤»
viki and I lied about finding new theme for advent. I just saw a notification on my phone
(tomorrow)
01:28 El_Che left 01:34 Guest96738 left, Guest96738 joined, Guest96738 is now known as ZzZombo 01:38 trnh left 01:43 kyclark left
viki grrrrrrrrr 01:43
Now I remember why I hate web dev.
Fighting with local apache install instead of doing what I want to do
seatek yeeeesssssssssss 01:44
01:46 kyclark joined
viki Perl 5 doesn't work on rakudo.org.... PHP works... So, hooray pragmatic approach? 01:57
mspo "doesn't work" 02:01
viki it doesn't work without involvement of someone with more perms than me :) 02:02
mspo m: say ∞ ≅ ∞ 02:04
camelia rakudo-moar 054aca: OUTPUT«True␤»
viki ? 02:05
02:05 giraffe left
viki Did you expect something different, mspo? 02:05
mspo viki: no just saw the bug fix 02:06
viki ah
mspo now I'm trying to think of when that could ever happen :) 02:08
viki m: say 1e1000 ≅ 1e1000000000000000000000000000000000000000000000000000000000 02:09
camelia rakudo-moar 054aca: OUTPUT«True␤»
viki :)
close enough, amirite? :)
mspo: I noticed this bug when testing trig functions 02:10
So that's one posibility :) 02:11
02:12 giraffe joined 02:20 kalkin- joined
ZzZombo what is 'reified'? 02:21
02:24 kalkin-_ left
seatek it's like when you make it come into existence 02:24
geekosaur pyanfar Z$ 6 'my $s; $s<x> = "a"; dd $s;'
Hash $s = ${:x("a")}
$s was empty (Any), but when I used it as if it were a hash it reified a hash for me and stored it in $s, then used the new hash to do what I asked 02:25
seatek speaking of which, we don't have any auto-vivification stuff in hashes when testing in p6 do we? 02:26
ZzZombo but we already have "autovivification"
seatek we can test way down and not have to worry?
geekosaur similarly, if I create an empty array and then access some element, it reifies that element. both are reification, but autoviv is a more complex kind of it
seatek dont' forget instantiate 02:27
geekosaur in any case, something comes into existence that wasn't before
AlexDaniel m: say -(∞ ≅ ∞)
camelia rakudo-moar 054aca: OUTPUT«-1␤»
AlexDaniel was there a list of Perl 6 smileys somewhere? :)
geekosaur (if I do `my @a` it is created with no elements, if I didn't create it shaped. so it has to create elements on the fly)
AlexDaniel by the way
m: say \True 02:28
camelia rakudo-moar 054aca: OUTPUT«\(Bool::True)␤»
AlexDaniel m: say WHAT \True
camelia rakudo-moar 054aca: OUTPUT«(Capture)␤»
seatek poetry, that
AlexDaniel ah nvm 02:29
geekosaur was wondering if something was supposed to be wrong with that or something?
AlexDaniel did not expect it to be a Capture 02:31
I thought that you'd need () for that
seatek nobody ever does
02:37 TimToady left
geekosaur afaik \ always creates a Capture, () is only needed if it's got more than one thing in it 02:38
BenGoldberg m: say sin(∞)
camelia rakudo-moar 054aca: OUTPUT«NaN␤»
BenGoldberg say tan(∞)
m: say tan(∞) 02:39
camelia rakudo-moar 054aca: OUTPUT«NaN␤»
BenGoldberg m: say atan(NaN)
camelia rakudo-moar 054aca: OUTPUT«NaN␤»
geekosaur but this is one of those syntaxes that was generalized from perl 5
02:39 kyclark left 02:42 vendethiel joined 02:45 ilbot3 left 02:47 ilbot3 joined 02:49 vendethiel left
ZzZombo m: sub x($name){ my $name=$name // 'no name';put $name};x('xxx') 02:50
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5===␤Cannot use variable $name in declaration to initialize itself␤at <tmp>:1␤------> 3sub x($name){ my $name=$7⏏5name // 'no name';put $name};x('xxx')␤ expecting any of:␤ term␤Other potential difficulties:␤ R…»
ZzZombo oh duh
I'm stil sleepy
still*
m: sub x($name){ $name//='no name';put $name};x('xxx') 02:51
camelia rakudo-moar 054aca: OUTPUT«xxx␤»
ZzZombo m: sub x(:$name){ $name//='no name';put $name};x(:name('xxx')) 02:52
camelia rakudo-moar 054aca: OUTPUT«xxx␤»
02:53 cibs left
AlexDaniel geekosaur: well, \ is also used for unspace 02:53
geekosaur sure but only when followed by whitespace 02:54
02:55 cibs joined
ZzZombo m: say WHAT |True 02:55
camelia rakudo-moar 054aca: OUTPUT«(Bool)␤»
ZzZombo m: say WHAT |c 02:56
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ c used at line 1␤␤»
02:57 pierre_ left
AlexDaniel m: <3 5>\ ».say 02:57
camelia rakudo-moar 054aca: OUTPUT«3␤5␤»
AlexDaniel m: <3 5>\».say
camelia rakudo-moar 054aca: OUTPUT«3␤5␤»
AlexDaniel geekosaur: not really? ;) 02:58
but yeah
AlexDaniel hates symbols that do more than one thing 02:59
ZzZombo m: gist.github.com/ZzZombo/5caa51f9b2...556920a0d8 03:00
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot assign to a readonly variable or a value␤at <tmp>:107␤»
ZzZombo m: sub x(:$name){ $name//='no name';put $name};x(:name('xxx'))
camelia rakudo-moar 054aca: OUTPUT«xxx␤»
ZzZombo why does the latter work???
AlexDaniel because it did not assign? 03:01
m: sub x(:$name){ $name//='no name';put $name};x()
camelia rakudo-moar 054aca: OUTPUT«Cannot assign to a readonly variable or a value␤ in sub x at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo the actual error is at line 24
what 03:02
AlexDaniel //= only assigns if it is undefined
ZzZombo yes
03:02 pierre_ joined
AlexDaniel so if it is undefined, it attempts to assign, but it is readonly 03:03
use “is copy” if you want to do that stuff
ZzZombo thanks
AlexDaniel or perhaps provide a default value?
not sure if $attr.name.substr(2) is going to work, but I guess it will
ZzZombo what would it be then? 03:04
it does work
AlexDaniel m: sub foo($x, :$y = $x.substr(2)) { say $x; say $y }; foo(‘hello’)
camelia rakudo-moar 054aca: OUTPUT«hello␤llo␤»
AlexDaniel m: sub foo($x, :$y = $x.substr(2)) { say $x; say $y }; foo(‘hello’, :y(‘test’))
camelia rakudo-moar 054aca: OUTPUT«hello␤test␤»
AlexDaniel yup
m: sub foo($x, :$y is copy) { $y //= $x.substr(2); say $x; say $y }; foo(‘hello’, :y(‘test’)) 03:05
camelia rakudo-moar 054aca: OUTPUT«hello␤test␤»
AlexDaniel m: sub foo($x, :$y is copy) { $y //= $x.substr(2); say $x; say $y }; foo(‘hello’)
camelia rakudo-moar 054aca: OUTPUT«hello␤llo␤»
AlexDaniel does anybody know why assigning to a readonly parameter is not a compile time error? 03:06
03:07 pierre_ left 03:08 chinarulezzz left
ZzZombo also why it still doesn't show more info, like what is the variable name? 03:08
is there any documentation about truthness of type objects? 03:12
03:13 TimToady joined
tailgate ZzZombo: I believe they are False (they are undefined) 03:15
m: Int.defined
camelia ( no output )
tailgate m: say Int.defined
camelia rakudo-moar 054aca: OUTPUT«False␤»
tailgate m: say Int.Bool
camelia rakudo-moar 054aca: OUTPUT«False␤»
geekosaur m: say so Int
camelia rakudo-moar 054aca: OUTPUT«False␤»
03:16 pierre_ joined
ZzZombo but I recall there was a statement along the lines "defindness and truthness are distinct properties, if you ask for one you ask only for it" 03:16
tailgate yeah, that is probobly true (see geekosaur's answer)
ZzZombo related, why is that "Smartmatch against True always matches" 03:22
03:23 noganex_ joined
geekosaur your statement is somewhat orthogonal; asking for truthiness and getting False doesn't tell you if it was defined, and asking for defined and getting True doesn't tell you if it is (or boolifies to) False 03:23
ZzZombo yes, I'm just asking what is the rule as to why they are False. 03:24
<ZzZombo> is there any documentation about truthness of type objects?
viki: github.com/zoffixznet/perl6.party/...oc-content 03:25
there is a dead link
github.com/perl6/docs/
03:26 noganex left 03:30 telex left
AlexDaniel was it because of stuff like 「‘foo’ ~~ m/../」 ? 03:34
(smartmatch against True)
03:34 aborazmeh left
tailgate if I want to have 2 methods in a NQP class, foo($x,$y,$z) and foo($x, $y) how do I do that? 03:35
03:36 kyclark joined
AlexDaniel m: class Foo { method Bool { True } }; say so Foo 03:37
camelia rakudo-moar 054aca: OUTPUT«True␤»
geekosaur 2016 Jan 09 17:09:56 <moritz> Skarsnik: having ~~ False always be False and ~~ True always be True enables us to write stuff like ~~ *.defined 03:38
from the last time this was discussed
03:38 telex joined
AlexDaniel huggable: Smartmatch against True :is: having ~~ False always be False and ~~ True always be True enables us to write stuff like ~~ *.defined 03:38
huggable AlexDaniel, Added Smartmatch against True as having ~~ False always be False and ~~ True always be True enables us to write stuff like ~~ *.defined
ZzZombo I'd argue that's overly lazy. If you check for boolean, you should simply compare against that. 03:40
and not use smartmatch as a catch-all
AlexDaniel so why would anybody write ~~ True?
ZzZombo sub x(True) gets passed everything 03:41
03:41 avalokite left
AlexDaniel you mean #130182 ? 03:42
where's the bot
AlexDaniel *bleep blop* rt.perl.org/Ticket/Display.html?id=130182
ZzZombo wasn't it killed by viki on #per-dev?
AlexDaniel not this one :)
synopsebot6: hey 03:43
geekosaur synopsebot6 vanished in a netsplit
AlexDaniel RT #130182
synopsebot6: ??
ahhh
ok
geekosaur [28 16:01:44] * synopsebot6 has quit (*.net *.split)
AlexDaniel my IRC client is showing that it is still there, for whatever reason
ZzZombo what was the multiline comment syntax, again? 03:44
AlexDaniel #`{{{ }}}
ZzZombo #`( )?
AlexDaniel or #`() yes 03:45
geekosaur #`{} (or other brackets)
AlexDaniel note that #`{ will also work even if the code inside has curly brackets { } ← }
geekosaur as long as they're balanced at least 03:46
AlexDaniel ya
and same goes for other brackety things
m: say “hello “world” ”
camelia rakudo-moar 054aca: OUTPUT«hello “world” ␤»
ZzZombo m: say "nop"e"" 03:47
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say "nop"7⏏5e""␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ …»
AlexDaniel well of course it won't be able to figure it out if there is no distinction between the opening and closing bracket/quote 03:48
m: say “nop“e”” # see! It works! :)
camelia rakudo-moar 054aca: OUTPUT«nop“e”␤»
03:53 telex left 04:00 pierre_ left, pierre_ joined
BenGoldberg m: say “hello “world” ” 04:10
camelia rakudo-moar 054aca: OUTPUT«hello “world” ␤»
BenGoldberg m: say q{{{ foo }}} 04:11
camelia rakudo-moar 054aca: OUTPUT« foo ␤»
04:13 avalokite joined
seatek m: class T { has DateTime $.t is rw; }; my $d = T.new; say so $d.t.defined; 04:14
camelia rakudo-moar 054aca: OUTPUT«False␤»
seatek is there a way to get that back to False after i put a DateTime in there one time... ?
04:15 khw left, cpage joined 04:16 pierre_ left
seatek m: class T { has DateTime $.t is rw; }; my $d = T.new; say so $d.t.defined; $d.t = DateTime.new; say so $d.t.defined; 04:17
camelia rakudo-moar 054aca: OUTPUT«False␤Earlier failure:␤ Cannot call DateTime.new with no parameters␤ in block <unit> at <tmp> line 1␤␤Final error:␤ Type check failed in assignment to $!t; expected DateTime but got Failure (Failure.new(exception...)␤ in block <unit> at <tm…»
ZzZombo m: dd Int.^methods(:all) 04:18
camelia rakudo-moar 054aca: OUTPUT«(method Int (Int $: *%_) { #`(Method|38777472) ... }, method Num (Int:D $: *%_) { #`(Method|38777624) ... }, method Rat (Int:D $: $?, *%_) { #`(Method|38777776) ... }, method FatRat (Int:D $: $?, *%_) { #`(Method|38777928) ... }, method abs (Int:D $: *%_) …»
ZzZombo m: dd class A{}.^methods(:all)
camelia rakudo-moar 054aca: OUTPUT«(Method+{<anon|71775760>}.new, method iterator ($: | is raw) { #`(Method|47470696) ... }, Method+{<anon|71775760>}.new, Method+{<anon|71775760>}.new, Method+{<anon|71775760>}.new, Method+{<anon|71775760>}.new, Method+{<anon|71775760>}.new, method ACCEPTS (…»
geekosaur m: class T { has DateTime $.t is rw; }; my $d = T.new; say so $d.t.defined; $d.t = DateTime; say so $d.t.defined;
camelia rakudo-moar 054aca: OUTPUT«False␤False␤»
geekosaur you want the type object, not a new object of the type
seatek i would like a //= operator to work 04:19
i woul dlike to be able to set the attribute that contains a class instance to be able to go back to "undefined" 04:20
when that attribute is typed to that class 04:21
it's no problem if it's not typed
geekosaur m: class T { has DateTime $.t is rw; }; my $d = T.new; say so $d.t.defined; $d.t = DateTime.now; say so $d.t.defined; $d.t = DateTime; say so $d.t.defined; 04:22
camelia rakudo-moar 054aca: OUTPUT«False␤True␤False␤»
geekosaur this is not what you want?
04:25 pierre_ joined
seatek oh yeah maybe that is! 04:25
i didn't even think of not putting on the new - just giving it the reference
i should have from your example though
geekosaur it's a type object, not a reference. the type object is the typed "undefined value" 04:26
m: say so Int.defined
camelia rakudo-moar 054aca: OUTPUT«False␤»
seatek k 04:27
ugh... now i forgot where it was that i needed this
thanks geekosaur!
geekosaur in some other languages that syntax might mean the type itself, but in perl 6 it's a typed undefined value
(and in perl 5 it sometimes acted like "the type itself" but it was really a string...) 04:28
seatek that's what i was thinking without testing it 04:29
this is a neat way to do it
it's kinda there but isn't
04:29 pierre_ left, telex joined
seatek oh! well, not only all that but it works too! ;) 04:32
geekosaur++ thank you!
04:35 Lucas_One joined, Tonik left 04:41 kyclark left 04:46 kyclark joined 04:47 kyclark left 05:05 Cabanossi left 05:07 Cabanossi joined
MasterDuke ZzZombo, AlexDaniel: github.com/rakudo/rakudo/pull/931. with this change, 'sub a($b) { $b=1 }; a(2)' now says 'Cannot assign to a readonly variable ($b) or a value' 05:37
AlexDaniel MasterDuke: cool, what about tests? 05:38
MasterDuke those come after sleep 05:39
AlexDaniel great then
though I'd love to see these become compile-time errors
if that is possible
MasterDuke maybe create an RT? 05:40
AlexDaniel that would be great :P 05:41
MasterDuke heh. i'm falling asleep at the kb here, i'll create one tomorrow if not already done. laterzzz.... 05:42
AlexDaniel .in 0.5d remind MasterDuke to create a ticket if not done already 05:43
yoleaux AlexDaniel: I'll remind you at 17:43Z
05:54 cognominal left
BenGoldberg wonders why get_attribute_boxed and friends are snake_case instead of kebab-case. 05:56
05:56 BenGoldberg left 06:00 ufobat joined 06:01 Cabanossi left 06:04 Cabanossi joined 06:06 pierre_ joined 06:09 eisen74 joined 06:11 cibs left 06:12 cibs joined 06:15 El_Che joined 06:21 Xliff_ZZZzzzz left 06:33 domidumont joined 06:34 CIAvash joined, CIAvash left 06:38 perlawhirl left 06:40 domidumont left 06:43 eisen74 left 06:45 AlexDaniel left 06:49 RabidGravy joined 06:56 domidumont joined 07:00 CIAvash joined, domidumont left
moritz bisectable6: internals are often snake cased 07:02
bisectable6 moritz, Bisecting by output (old=2015.12 new=5163e8a) because on both starting points the exit code is 1
moritz sorry, meant BenGoldberg
bisectable6 moritz, bisect log: gist.github.com/efaa9d40c1d054ca34...493fc0042a
moritz, (2016-08-16) github.com/rakudo/rakudo/commit/17...ee5a96c4ff
07:21 domidumont joined 07:23 bjz joined 07:24 Actualeyes left 07:26 Tonik joined 07:28 telex left 07:30 bjz left, telex joined 07:32 bjz joined 07:33 matt_ left, matt_ joined, matt_ is now known as Guest21621 07:36 bjz left 07:44 brillenfux joined 07:49 wamba joined
Ulti for the weekly jnthn's 6guts post had more comments on /r/programming www.reddit.com/r/programming/comme...h=8dda0c9f 07:54
07:55 bjz joined, Actualeyes joined 07:56 Guest21621 is now known as matt_, matt_ is now known as Guest45087 07:58 Guest45087 is now known as matt_ 08:00 telex left, telex joined 08:04 ufobat left
moritz a great deal of them not very enlightening 08:14
08:15 ufobat joined 08:16 lolo78 joined 08:17 lolo78 left
arnsholt Yeah, a pretty sorry showing, all in all 08:22
lizmat Ulti: added 08:28
lizmat clickbaits p6weekly.wordpress.com/2016/11/28/...ing-along/ 08:30
psch huh 08:32
"Ovid couldn't have explained it better" in reply to a post by... Ovid
reddit is weird, isn't it
08:33 labster left, dakkar joined 08:38 labster joined 08:50 rindolf joined, firstdayonthejob joined 08:52 aries_liuxueyang joined 08:58 perlawhirl joined 09:00 dogbert17 left 09:01 bjz left, effbiai left 09:05 bjz joined 09:08 effbiai joined, effbiai left, effbiai joined, jonas1 joined 09:14 girafe left
ZzZombo Yay, I finished with property accessors. 09:20
09:21 labster left
ZzZombo m: class A{has $!a;method !m{$!a}};class B is A{method m { return self!m }}; 09:25
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Private method call to m must be fully qualified with the package containing the method␤at <tmp>:1␤------> 3}};class B is A{method m { return self!m7⏏5 }};␤ expecting any of:␤ method …»
ZzZombo m: class A{has $!a;method !m{$!a}};class B is A{method m { return self!A::m }}; 09:26
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot call private method 'm' on package A because it does not trust NQPMu␤at <tmp>:1␤------> 3class B is A{method m { return self!A::m7⏏5 }};␤ expecting any of:␤ method arguments␤»
ZzZombo so what's the point in telling me to fully qualify the method if I'm not allowed to call it anyway?
psch m: class A{has $!a;method !m{$!a}};class B is A {method m { return self!A::m }}; # spaces still matter
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot call private method 'm' on package A because it does not trust B␤at <tmp>:1␤------> 3lass B is A {method m { return self!A::m7⏏5 }}; # spaces still matter␤ expecting any of:␤ m…»
psch note the 'NQPMu' vs 'B' 09:27
and, well, trust isn't inherited vOv
09:27 lukaramu joined, aries_liuxueyang left
jnthn It doesn't know whether you can call the private method until you tell it which package the method is from 09:28
(Private methods ain't virtual.)
09:32 bjz left 09:35 wamba left 09:39 bjz joined
kalkin- why can't I use ≔ instead of := ? 09:42
I find the unicode operators very inconsistent
Is there a reason for that? Or is it just because some one haven't patched it in yet? 09:44
timotimo m: my &infix:<≔> = &infix:<:=>; my $foo = 10; my $bar ≔ $foo; $bar = 9; say $foo 09:46
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ infix:<:=> used at line 1. Did you mean 'infix:<=>', 'infix:<∖>', 'infix:<lt>', 'infix:<eq>'?␤␤»
timotimo ah, hmm
09:46 domidumont left 09:47 aries_liuxueyang joined
ZzZombo One thing I can't understand is why, after all this time, Perl 6 got castrated classes. Just... why? You can't get the autogenerated accessors to play nicely along with custom, you don't have proper syntax for members, only tackling sigils in front of their names, no proper visibility in forms of public, protected (only methods are possible) and private members, private members are invisible to 09:48
subclasses no matter what, unless you go out of your way and trust each of them, all attributes are private...
What was the goal of this design? Have nobody in the dev team seen C++? Or really, anything with developed OOP built-in?
And when I was talking about the syntax, why was it chosen to tackle sigils-wigils is the best approach? Look, you have wonderful things like traits, yoi could use them instead, and gain much better readability and usability. Example: has Array:D @a=[] is private;
timotimo private members are visible to subclasses if you add a "trusts" directive 09:49
the twigil makes it immediately clear what the scope and access-method of a variable, or attribute is on the point of usage
just like C++ programmers call all their member variables m_something, we have $! and $. 09:50
El_Che timotimo: learnt something new: "trusts". Thx
timotimo also, you're free to write a slang that does away with twigils
that might be problematic with stubbed classes, though 09:51
masak ZzZombo: gee, that was a lot of things at once. but the "private members are invisible to subclasses no matter what" thing is something I consider to be a strength, not a weakness.
ZzZombo timotimo: has Array:D @a=[] is private; tells that just fine. 09:52
masak ZzZombo: many OO systems expose private things to subclasses (or deal with half-measures such as "protected"), and the end result tends to be sadness and weak OO solutions
timotimo ZzZombo: no, that is at the point of declaration, not at the point of use
perlawhirl visually, `$!name` looks like a method call (ie, $.name) but with a "wall" between the object and a method. you can only call that method if you are inside the wall :D
timotimo larry really likes to put himself into everything :P 09:53
perlawhirl HAH
timotimo++
ZzZombo masak: Delphi has strict visiblity. Stricly private things for example, wouldn't be visible to subclasses.
timotimo even IRC has this thing called "wallops" which i gather is operations you can do on a server only if you're part of the Wall family 09:54
ZzZombo so it is possible to implement in P6 too.
timotimo: you can't trust every sublcass in advance. 09:55
arnsholt I think there's a pretty good tl;dr for jnthn's most recent post: Look to SmallTalk
kalkin- m:sub infix:<≔>(|c) { infix:<:=>(|c) }; $a ≔ 3
arnsholt (Although ST has attributes visible to all subclasses, much of the API things are very ST-y)
kalkin- m: sub infix:<≔>(|c) { infix:<:=>(|c) }; $a ≔ 3 09:56
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3sub infix:<≔>(|c) { infix:<:=>(|c) }; 7⏏5$a ≔ 3␤»
kalkin- m: sub infix:<≔>(|c) { infix:<:=>(|c) }; my $a ≔ 3
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ infix:<:=> used at line 1. Did you mean 'infix:<=>', 'infix:<∖>', 'infix:<lt>', 'infix:<eq>'?␤␤»
timotimo you should be able to create HOWs and EXPORTHOWs to make classes that behave like "trust everything always"
masak but to me, it sounds like working against the grain of the OO system 09:57
jnthn
.oO( BallOfMudHOW :) )
kalkin- grepping in ~/rakudo source doesn't find any sub infix:<:=>. Why that? How is it implemented? I.e. infix:<…> returns a few declrations
arnsholt masak: Indeed. It's not that noone who worked on Perl 6 knew about C++. It's that they *did*, and they disagreed 09:58
jnthn kalkin-: It's a special compiler form
arnsholt kalkin-: Looks like it's an initializer:<:=> in Grammar.nqp
jnthn kalkin-: Binding is a rather low-level operation
So you can't just call it
And yes, where arnsholt pointed is one spot, and there's an infix:<:=> somewhere in the grammar too. 09:59
arnsholt initializer:sym<:=> actually
ZzZombo <timotimo> you should be able to create HOWs and EXPORTHOWs to make classes that behave like "trust everything always"
but the point is to make private members available only to subclasses.
jnthn ZzZombo: If they're available to subclasses, how are they private?
timotimo okay, then add a check" is this a subclass" and trust only subclasses
kalkin- Thanks, i found it
Would it make sense to patch it to work with ≔? (I really like using unicode chars) 10:00
ZzZombo private in the sense outside users of the object won't be able to use it.
perlawhirl kalkin-: also, for defining an alias to a subrouting, you can do away with Captures an just refer to the subs in noun form
m: my &infix:<minus> = &infix:<->; say 3 minus 2
camelia rakudo-moar 054aca: OUTPUT«1␤»
10:01 CIAvash left
jnthn But anyone can write a subclass. A subclass is also an outside user. 10:01
kalkin- perlawhirl: thanks, TIL
perlawhirl kalkin-: np... and of course, i meant 'subroutine'. i'm a network engineer so my fingers always perfer 'routing' over 'routine' :D 10:02
kalkin- :) 10:03
10:04 dj_goku_ left
f3ew_ wonders how much of Perl(6) OO has been inspired by CLOS 10:05
ZzZombo The fact that anyone can create a subclass doesn't mean a thing. 10:06
jnthn f3ew_: MOP wise, most certainly 10:07
10:14 perlawhirl left 10:16 CIAvash joined 10:20 ufobat left 10:21 zakharyas left 10:23 wamba joined 10:30 ufobat joined 10:34 pmurias joined
pmurias ZzZombo: attributes that are visible to subclasses that aren't trusted aren't private 10:35
ZzZombo: why would we want to copy stupid stuff from C++ (public/private/protected) 10:36
ZzZombo: the twigils are used to have a clear distinction between the attribute and accessor 10:42
10:52 seatek left 11:04 pierre_ left
viki ZzZombo: thanks, but that article won't ever be published :) 11:04
11:07 pierre_ joined 11:11 [particle] left
viki kalkin-: I would vote -1 on such a PR, because that unicode version is indistinguishable from regular = on any dirty monitor with my font: i.imgur.com/GNY9MBj.png 11:11
kalkin-: AlexDaniel has a gist somewhere with a whole ton of such unicode replacements... 11:12
kalkin- viki: That's a lame excuse :). Following such logic you shouldn't use most unicode versions of anything in perl6 :)
viki kalkin-: like what? 11:13
kalkin-
the unicode equivalent of ==>
viki What's the unicode equivalent of ==> ?
What does … look similar to?
kalkin- ... 11:14
up
viki kalkin-: but that function is equivalent :|
kalkin- no I meant there are fonts not displaying it at all
==> ⟹ 11:15
viki kalkin-: but that's not my argument. The rendering of ≔ is very close to equals sign. I
We don't have ⟹ 11:16
kalkin- ohh we don't? this is what I meant by it's hard to guess what works :)
viki: I really don't want to flame, but your reasoning is basically, that your font sucks. A font can suck in many different ways
:)
viki It's all documented so you don't have to guess: docs.perl6.org/language/unicode_texas.html
kalkin-: no, my reasoning is a proposed character is rendered close to a completely different op that is also used in the same position as the proposed chacter, thereby it has a high chance of causing confusion. 11:18
m: my @a = 1, 2, 3; my @b = 4, 5, 6; say @a ∖ @b 11:19
camelia rakudo-moar 054aca: OUTPUT«set(3, 1, 2)␤»
viki ^ a lot of people get confused even by taht.
kalkin- viki: Hmm, but isn't it the job of the font to display a clear reandering of the char? 11:20
but i guess almost any monospaced font would probably have the character rendered badly
DrForr What's the argument here? (just curious) 11:21
kalkin- actually no argument, it's not really that important
11:21 [particle] joined
DrForr I didn't mean argument in the sense of "fists out", I just missed the start of the discussion. 11:22
viki kalkin-: here's what it gets rendered in my coding editor, compared next to proper equals sign: i.imgur.com/DRPBhfo.png
DrForr: irclog.perlgeek.de/perl6/2016-11-29#i_13646508
kalkin- viki: yeah this looks bad
viki DrForr: irclog.perlgeek.de/perl6/2016-11-29#i_13646674
timotimo eew, yeah
kalkin- it doesn't look better, with Fira Mono (the one I'm using) I must admit 11:23
viki FWIW AlexDanial has a big gist with unicode replacements for stuff. 11:24
like >= <= etc
kalkin- The double colon equal also looks awful ⩴ 11:25
This one gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c ? 11:26
CIAvash kalkin-: I don't think Fira has it, for me, it falls back to "DejaVu Sans Mono" for ≔ 11:30
kalkin- CIAvash: dunno, may be my xfce4-terminal also does a fallback
if it's falling back, it's not to DejaVu because there it looks much more awful 11:31
dalek c: 775c00f | gfldex++ | doc/Language/typesystem.pod6:
fill in role in /language/typesystem
11:32
viki kalkin-: yeah, that one 11:33
kalkin- why does && has not the same precedence as 'and' ? Is it because it's useful to have two operators which are almost the same? 11:37
moritz kalkin-: yes
kalkin- k, i guess i did too much python in the last few years :) 11:38
moritz kalkin-: in particular, && is very useful in typical logical expression, and 'and' is very useful for things like my $x = get_value() and say "x is $x";
kalkin- mumbles: I would prefer ∧ for logical stuff 11:39
moritz: but I definitely see your point 11:41
gfldex m: constant &infix:<∧> := &infix:<&&>; say 1 ∧ True;
camelia rakudo-moar 054aca: OUTPUT«True␤»
gfldex kalkin-: ^^^
viki One thing I wish we never added is −
It's all over the codebase, so in half the things it still doesn't work and it makes checks like if nqp::ord(nqp::substr...) much more elaborate, since now you gotta store the char somewhere and then check it against two possibilities 11:42
gfldex you mean prefix:<-> ?
timotimo viki: there's ordat that gives you an ord without a substr 11:43
viki timotimo: :o I'll need to review some of my commits then
timotimo it'll also circumvent an allocation that'll immediately get cleaned up again, but it goes through malloc, too
viki gfldex: U+2212 minus
11:43 aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo and there's also eqat, which lets you put the comparison into the op, too 11:43
and it won't allocate at all, even though it lets you use a string
viki sweet 11:44
timotimo YW :)
viki Who knew! Complaining can be productive! :)
11:45 bjz_ joined, bjz left 11:50 TEttinger left 11:51 lizmat left 11:52 CIAvash left
gfldex prefix operators don't show up in the index and I can see why they shouldn't. 11:55
viki Why? 11:56
DrForr Heh. I'm ref[au]ctoring that portion of Perl6::Parser at the moment :)
11:56 CIAvash joined
gfldex I mean I can't find the bug in htmlify.p6 11:56
viki ah 11:57
12:03 domidumont joined 12:08 canopus left
gfldex m: say 'foo' 12:12
camelia ( no output )
gfldex camelia is sick again :(
12:12 pierre_ left 12:16 cdg joined 12:17 canopus joined 12:18 lizmat joined
dalek c: 4054328 | gfldex++ | doc/Language/typesystem.pod6:
doc trait does
12:19
12:21 cdg left
dalek c: dc485ac | gfldex++ | doc/Language/typesystem.pod6:
tell how mixin conflicts are handled
12:25
c: 4ee1194 | gfldex++ | doc/Language/operators.pod6:
tell how conflicts are handled for infix:<but> and infix:<does>
gfldex I'm quite sure we will have complete docs eventually. :) 12:26
12:31 sufrostico joined 12:39 ufobat left
dalek c: 1d6295b | gfldex++ | doc/Language/typesystem.pod6:
doc trait hides
12:40
c: 2c3c887 | gfldex++ | doc/Language/typesystem.pod6:
doc trait is hidden
12:40 sufrostico left 12:42 rindolf left 12:47 travis-ci joined
travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'doc trait is hidden' 12:47
travis-ci.org/perl6/doc/builds/179747841 github.com/perl6/doc/compare/4ee11...3c88722391
12:47 travis-ci left 12:49 kalkin- left 12:53 sufrostico joined 12:56 CIAvash left 12:57 pierre_ joined 12:58 aborazmeh left, ggoebel joined 13:03 iH2O joined
viki What does "these days cannot be banked" mean, in a context of work? Does it mean I won't get paid? 13:05
13:05 itaipu joined
iH2O isnt doing useful work self-rewarding enough? 13:06
viki hah
DrForr That's generally for vacation days, means you can't use them after the end of the year.
viki Oh. 13:07
OK. That makes more sense than not getting paid :P
iH2O i just visited rakudo.org and it appears theres been a tremendous amount of rakudo work from 2016.10 to 2016.11 13:11
i browsed the changes/improvements and i thought id never reach the end
13:13 mitchum joined
viki iH2O: yeah, 2016.11 Rakudo had larger than average changelog 13:13
iH2O thx to dedicated unpaid workers like u viki :-P 13:14
viki I get paid in knowledge.
And FAME!!! \o/
:)
timotimo i'm not sure why, but the star changelog wasn't abbreviated like it usually is 13:15
viki mhm
13:18 pecastro left
timotimo i think the star release guide also advises to abbreviate 13:18
13:22 bjz_ left 13:25 zakharyas joined 13:32 iH2O left 13:35 ugjka left 13:36 ugjka joined
dalek c: 61fdbb0 | coke++ | doc/Language/typesystem.pod6:
remove trailing whitespace
13:37
c: 028fc71 | coke++ | doc/Language/typesystem.pod6:
remove lolcat but only to pass spellcheck
[Coke] iz sad about 028fc71. :| 13:41
viki add iz to spellchecker word list? :)
13:41 kyclark joined
[Coke] I would have felt worse about that, I think 13:43
11 gaps left in advent schedule. First gap is in 8 days.
13:46 CIAvash joined, CIAvash left 13:49 kyclark left 13:54 nadim joined
nadim African salutations all. 13:54
13:55 kyclark joined
[Coke] o/ 13:55
viki You're in Africa?
lizmat looks like Tunisia :-) 13:57
13:59 xinming left, travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'remove lolcat but only to pass spellcheck' 13:59
travis-ci.org/perl6/doc/builds/179762555 github.com/perl6/doc/compare/2c3c8...8fc719d053
13:59 travis-ci left
tadzik spellcheck shmerchek 14:00
viki looks at travel.gc.ca/destinations/tunisia
"Regional advisory - Avoid all travel"
nadim: nice knowing you ;) 14:01
14:01 zakharyas left 14:02 cdg joined 14:04 xinming joined 14:09 firstdayonthejob left
gfldex viki: could you check the load on the host that build the docs please? It takes 88m to build right now. 14:13
moritz 1.6
not too high
14:14 kyclark left
moritz you might want to check which syntax hilighting method it uses 14:14
(the build logs should indicate that)
nadim I think travel base on advising should not be USA advising. We'd never get anywhere.
gfldex i will try to reproduce locally
viki nadim: it's Canadian advisory :)
nadim lizmat: indeed few weeks in Tunisia, Couscous and some Perl hopefully 14:15
viki: not that one either then :)
viki :)
gfldex nadim: maybe it's you who is causing that travel warning. 14:16
14:16 firstdayonthejob joined
gfldex "Folk are running and screaming whereever I go. This planet is quite dangerous!" 14:17
nadim gfldex: You have a point here. 14:18
lizmat :-) 14:20
14:21 khw joined
DrForr "And your hair covers it nicely." :) 14:22
pmurias the advisory seems to mention only specific regions where "violent clashes" are taking place
DrForr mutters something about the "no-go" areas in France. 14:24
[Coke] stackoverflow.com/questions/408637...the-locale - Anyone want to claim this one? I think the first problem is that these aren't POSIX. 14:25
viki: how about a bot that reports how many new perl6 questions there are on stackexchange each day, along with the the count of total unanswered/answered? 14:26
nadim DrForr: Maybe I should make the same "in the no-go zone" reporting I did for Belleville.
viki [Coke]: go for it. IRC::Client is well documented ;) 14:27
nadim [Coke]: excellent idea, maybe it could get listed somewhere that is not IRC too
DrForr refrains from posting some comments on press in the US that would be seen as flaming. 14:28
jnthn [Coke]: Those are all defined in terms of Unicode character properties; they're nothing to do with POSIX at all 14:29
nadim DrForr: 1+1=2, the sky looks blue, no no-go zone in Belleville, nothing flamming about that. 14:31
gfldex the docs need Inline::Python that seams to be missing
nadim DrForr: but we have other forums, my point was just to say hi to all of you.
gfldex viki: if you got the time could you install Inline::Python please? 14:32
viki ok
moritz answered: stackoverflow.com/a/40868456/14132 14:33
viki hm... it needs some lib?
moritz libpython-dev maybe? 14:34
nope, that's installed
viki gcc pyhelper.c -shared -fPIC -o ./resources/libraries/libpyhelper.so
pyhelper.c:1:20: fatal error: Python.h: No such file or directory
moritz tries libpython3.4-dev 14:35
viki leaves this in moritz's hands then :)
[Coke] moritz: ha! I didn't realize it was bdf asking the question until I read your answer. :)
moritz nope :(
ilmari libpython-dev depends on the -dev package for the default python for the distro, e.g. libpython2.7-dev 14:36
which ships /usr/include/python2.7/Python.h
seems like missing -I/usr/include/python<version>
$ python-config --includes
-I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7
moritz nine: ^^ seems like a Configure-time problem with Inline::Python
ilmari++ # analysis 14:37
ilmari on my system --cflags includes --includes 14:38
14:38 dolmen joined
moritz oh 14:38
it's missing python2-config 14:39
ilmari that's in python-dev here
moritz ah, and I had only libpython-dev installed
nine: never mind, 'twas just me being too stupid to properly read the error messages 14:40
ilmari so, python-dev ships python-config and python2-config, which link to python2.7-config
python2.7-dev ships python2.7-config, which is a symlink to x86_64-linux-gnu-python2.7-config, which is shipped by libpython2.7-dev 14:41
moritz gfldex: Inline::Python now installed
ilmari there's also x86_64-linux-gnu-python-config, shipped by libpython-config
s/-config$/-dev/
14:41 skids joined 14:44 dj_goku joined
dalek c: b2aa298 | gfldex++ | doc/Language/ (2 files):
we can have a list of roles
14:48
14:55 kalkin- joined
dalek c: d7feaf8 | gfldex++ | doc/Language/traps.pod6:
add trap but R1,R2
14:58
viki :(
gfldex there is RT#130213 for this trap. So it might go away. 14:59
viki :/ why is this a trap? docs.perl6.org/language/traps.html...g_a_string 15:00
Sounds more like 5-to-6 material
[Coke] agreed.
and there's already a 'ucfirst' entry on 5to6-perlfunc. 15:01
15:03 alimon1 joined
dalek c: dc17f03 | (Zoffix Znet)++ | doc/Language/traps.pod6:
Capitalizing a string is not a trap

5-to-6 already mentions tc/ucfirst
15:04
15:09 Ven joined
Ven o/, #perl6 15:09
m: say (&[+])([1,2,3]); say [+] [1,2,3]; 15:10
camelia rakudo-moar 054aca: OUTPUT«3␤6␤»
viki \
Ven I'm not too sure why the first case has `+` called on the Array? :)
15:10 brillenfux left
viki Could it be due to our specialcasing of [+] to call &sum? 15:11
oh
the first case :)
In the first case you're calling infix(?) + with one argument: the array
s: &[+]
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/44dd...ic.pm#L186
viki s: &[+], \([1, 2,3 ]) 15:12
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/44dd...ic.pm#L187
viki called it! :)
15:12 MilkmanDan left
Ven m: say &[[+]]([1,2,3]) 15:13
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ infix:<[+]> used at line 1. Did you mean 'infix:<+|>', 'infix:<∖>', 'infix:<lt>'?␤␤»
Ven m: say (&[[+]])([1,2,3])
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ infix:<[+]> used at line 1. Did you mean 'infix:<+|>', 'infix:<∖>', 'infix:<lt>'?␤␤»
viki m: say [&[+]] [1,2,3]
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside []␤at <tmp>:1␤------> 3say [&[+]] [7⏏051,2,3]␤ expecting any of:␤ bracketed infix␤ infix␤ infix stopper␤»
15:13 MilkmanDan joined
viki m: say [[&[+]]] [1,2,3] 15:14
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at <tmp>:1␤------> 3say [[&7⏏5[+]]] [1,2,3]␤»
viki blehg
Ven well, for this one I can call `*.sum`, but not for [*] :(
viki To achieve what?
15:15 travis-ci joined
travis-ci Doc build failed. Zoffix Znet 'Capitalizing a string is not a trap 15:15
travis-ci.org/perl6/doc/builds/179788157 github.com/perl6/doc/compare/d7fea...17f03c8fea
15:15 travis-ci left
Ven trying to golf down `my @a=xxx; $_ %% [+] @a and $_ %% [*] @a` 15:15
viki
.oO( xxx ? )
15:16
Ven so I tried `(&[+] & &[*])(xxx)`
viki: read ??? :)
or @foo $bar $baz
moritz Ven: maybe start by describing with words what you're trying to do?
viki Ven: now I see why people call perl line noise :)
Ven viki: hehe :P 15:17
moritz: check if a number is divisible both by the sum of its digits, and also by their product.
15:17 avalokite left
Ven viki: the complete line reads `{(1..*).grep({my @a=$_.split("")[1..*-2];$_%%@a.sum&&$_%%[*] @a})[$_]}` 15:17
which does look a bit like line-noise... Also TIL, [1..*-2] takes less space than :skip-empty in the split :P
viki $_ %% all(([+] @a), [*] @a) 15:18
$_ %% ([+] @a) & [*] @a
viki isn't sure on precedence on that last one
$_ %% (@a.sum & [*] @a) 15:19
Ven viki: that doesn't allow me to eliminate `@a`, but yes
m: my @a = 3; say 3 %% @a.sum ^ [*] @a
camelia rakudo-moar 054aca: OUTPUT«one(True, 3)␤»
Ven m: my @a = 3; say 3 %% (@a.sum & [*] @a) 15:20
camelia rakudo-moar 054aca: OUTPUT«all(True, True)␤»
Ven m: my @a = 3; say 3 %% @a.sum & [*] @a
camelia rakudo-moar 054aca: OUTPUT«all(True, 3)␤»
viki m: .join %% (.sum & [*] |$_) with 3.comb 15:21
camelia rakudo-moar 054aca: OUTPUT«WARNINGS for <tmp>:␤Useless use of "%%" in expression ".join %% (.sum & [*] |$_)" in sink context (line 1)␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the …»
viki m: say .join %% (.sum & [*] |$_) with 3.comb
camelia rakudo-moar 054aca: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at <tmp> line 1␤␤»
viki bleh
viki leaves to do stuff
moritz m: $_ = 1234; my @a = .comb; say $_ %% @a.sum & [*] @a
camelia rakudo-moar 054aca: OUTPUT«all(False, 24)␤»
moritz m: $_ = 1234; my @a = .comb; say $_ %% (@a.sum & [*] @a) 15:22
camelia rakudo-moar 054aca: OUTPUT«all(False, False)␤»
viki lizmat: ^ that's one argument for .comb predictable giving List, BTW :)
Ven actually, I wonder if there's an easy way to go from "123" to (1,2,3)
m: say "123".comb.perl
camelia rakudo-moar 054aca: OUTPUT«("1", "2", "3").Seq␤»
Ven well, that still helps me a lot.
moritz m: $_ = 1234; @_ = .comb; say $_ %% (@_.sum & [*] @_)
camelia rakudo-moar 054aca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use placeholder parameter @_ in the mainline␤at <tmp>:1␤------> 3$_ = 1234; @_7⏏5 = .comb; say $_ %% (@_.sum & [*] @_)␤»
viki lizmat: oh nevermind 15:23
Ven {(1..*).grep({$_%%.comb.sum&&$_%%[*] .comb})[$_]}
m: with 1116 { say $_ %% (.comb.sum & [*] .comb) } 15:25
camelia rakudo-moar 054aca: OUTPUT«all(True, True)␤»
Ven m: with 1117 { say $_ %% (.comb.sum & [*] .comb) }
camelia rakudo-moar 054aca: OUTPUT«all(False, False)␤»
Ven it doesn't short-circuit though, but oh well.
I'm allowed to warn-a-lot. 15:26
.oO( I never expected one day I'd wish for a 1..* shortcut... )
15:27
thanks, #perl6 :P 15:29
15:31 avalokite joined 15:33 kurahaupo joined, perlawhirl joined 15:36 Ven left 15:38 pierre_ left
moritz m: say ^* 15:48
camelia rakudo-moar 843a6b: OUTPUT«{ ... }␤»
moritz m: say ^Inf
camelia rakudo-moar 843a6b: OUTPUT«0..^Inf␤»
moritz starts with 0, ont good
viki Why not good? 15:49
[Coke] m: say 1+^Inf 15:50
camelia rakudo-moar 843a6b: OUTPUT«Cannot coerce Inf to an Int␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
[Coke] m: say ^Inf+1
camelia rakudo-moar 843a6b: OUTPUT«1..^Inf␤»
moritz viki: because Ven needed something that starts with 1
viki ah
perlawhirl '1..*' is as same chars as '^Inf' 15:51
so i think 1..* is fine
viki but not ^∞ :)
perlawhirl lol
[Coke] perlawhirl: no, ^Inf is from 0, not 1, not the same.
huh. I cannot type the unicod inf symbol here. 15:52
can someone try ^Inf+1 but with the symbol?
viki It works of course
m: ^∞+1
camelia rakudo-moar 843a6b: OUTPUT«WARNINGS for <tmp>:␤Useless use of "+" in expression "^∞+1" in sink context (line 1)␤»
viki m: dd ^∞+1
camelia rakudo-moar 843a6b: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10... (lazy list)␤»
[Coke] oh, same CHARS. 15:53
perlawhirl yes
[Coke] perlawhirl++
viki m: say (^*)(∞)
camelia rakudo-moar 843a6b: OUTPUT«0..^Inf␤»
perlawhirl and even if viki could coerce ∞ to do it in 1 less char, it would still be more bytes 15:54
viki m: say '∞'.codes
camelia rakudo-moar 843a6b: OUTPUT«1␤»
viki m: say '∞'.ords
camelia rakudo-moar 843a6b: OUTPUT«(8734)␤»
15:58 skids left
japhb m: say '∞'.encode.elems 16:00
camelia rakudo-moar 843a6b: OUTPUT«3␤»
viki m: say '1..*'.encode.elems 16:01
camelia rakudo-moar 843a6b: OUTPUT«4␤»
viki m: say '^∞+'.encode.elems
camelia rakudo-moar 843a6b: OUTPUT«5␤»
viki :)
[Coke] byte? how quaint. :P
16:08 salv0 joined 16:09 perlawhirl left
timotimo browsix.org/ okay 16:10
16:15 sufrostico left 16:16 sufrostico joined 16:17 kurahaupo left
[Coke] half the links here never work through $dayjob proxy. :( 16:17
viki ssh tunnel 16:19
sudo -u zoffix ssh -ND 2225 zoffix@cerberus
16:20 pmurias left
viki then in your broswer set socks5 proxy to localhost:2225 16:20
16:20 kurahaupo joined
viki replace zoffix and cerberus with proper user name and host of some box you can ssh to :) 16:20
[Coke] viki: there's a limit to what I can do and not break the rules. 16:22
16:23 zacts left
viki :) 16:23
16:30 camelia left, camelia joined 16:32 wamba left, ChanServ sets mode: +v camelia 16:33 kurahaupo left 16:35 wamba joined
dalek c: 2bfe008 | (Zoffix Znet)++ | doc/Language/unicode_texas.pod6:
List texas version of «=»

Since it also requires special [ ] treatment
16:36
16:39 pierre_ joined
[Coke] buggable: tags 16:41
buggable [Coke], Total: 1415; BUG: 936; UNTAGGED: 288; LTA: 132; NYI: 92; RFC: 61; JVM: 54; CONC: 52; REGEX: 39; SEGV: 36; PERF: 28; UNI: 27; @LARRY: 21; NATIVECALL: 21; POD: 19; IO: 18; TODO: 15; PRECOMP: 13; BUILD: 11; TESTCOMMITTED: 11; OO: 10; TESTNEEDED: 8; BOOTSTRAP: 6; MATH: 6; STAR: 6; GLR: 5; OSX: 4; REPL: 4; OPTIMIZER: 3; WEIRD: 3; REGRESSION: 2; SITE: 2; SPESH: 2; @y: 1; CONFIGURE:
16:41 sufrostico left 16:44 zacts joined 16:45 skids joined 16:46 xtt joined, dolmen left, dolmen joined, dolmen is now known as Guest42590 16:47 pierre_ left 16:53 rindolf joined
viki Do we have a vector of Rakudo's logo"? 16:54
16:55 aries_liuxueyang left 16:57 aries_liuxueyang joined 16:59 domidumont left
viki heh, doing image search with rakudo's logo as file shows "Best guess for this image: karma chinese symbol tattoo" 17:00
17:02 nadim left
viki *crickets* 17:03
17:03 Gruber is now known as Grrrr, sufrostico joined
viki @... @.... 17:04
(those are tumble weeds)
17:05 jonas1 left
timotimo look in the mu repository 17:06
[Coke] Pretty sure we do, yes. 17:07
viki I see a file called "SLAVES" :S
[Coke] commons.wikimedia.org/wiki/File:Camelia.svg ? 17:08
timotimo in the misc folder, there's camelia.svg, .png, .pdf, .odg, .jpg
and 16x16 and 32x32 .ico files
viki That's not Rakudo's logo tho.
I mean this: rakudo.org/wp/wp-content/uploads/20...o-1001.png
timotimo oh!
duh
[Coke] oh! 17:09
viki :)
[Coke] timotimo: glad it wasn't just me.
timotimo yes, quite
[Coke] irclog.perlgeek.de/perl6/2010-09-27/text - search for svg 17:10
ah, irclog.perlgeek.de/perl6/2010-09-27#i_2869052
.seen pmichaud 17:11
yoleaux I saw pmichaud 15 Sep 2016 01:34Z in #perl6: <pmichaud> m: my $input = '(\d\d\d)'; my $m = 'a 123' ~~ /$0=<$input>/; say $m
viki good nuf, thanks :)
.ask pmichaud would be sweet if you could drop the .ai of Rakudo logo into github.com/perl6/marketing/tree/master/LOGOs if you get a chance 17:12
yoleaux viki: I'll pass your message to pmichaud.
dalek rketing: f30998d | (Zoffix Znet)++ | LOGOs/Camelia (8 files):
Move Camelia logo files into their own dir
17:13
rketing: 576093d | (Zoffix Znet)++ | LOGOs/Rakudo/rakudo-box-3000.png:
Add Rakudo large PNG logo
17:14
17:15 xtt left 17:18 sjohnsen joined 17:19 sufrostico left, dogbert2 joined 17:21 raiph left, avalokite left 17:22 domidumont joined 17:23 optikalmouse joined 17:24 dogbert2 left 17:26 grondilu joined 17:40 dogbert17 joined
yoleaux AlexDaniel: remind MasterDuke to create a ticket if not done already 17:43
viki yoleaux: he ain't in here, bruh. 17:45
17:45 dakkar left
dalek rketing: 0998a64 | (Zoffix Znet)++ | LOGOs/RakudoStar/Rakudo-Star--logo. (2 files):
Add Rakudo Star logos

Logo-ishes? Symbols? Glyphs? Do we have a R* logo already? I made these things...
17:48
17:57 grondilu left 17:58 CIAvash joined
dalek rketing: e0710b1 | (Zoffix Znet)++ | LOGOs/NQP/NQP--logo-- (4 files):
Add NQP Logo variants

Logo-ish symbols :)
18:07
perlpilot I didn't even know nqp had a logo 18:13
viki It does now!
perlpilot :)
18:14 eisen74 joined
perlpilot where's MoarVM's logo? ;) 18:14
timotimo imgur.com/gMyYJjN - i wanted it to be this 18:15
perlpilot interesting 18:16
viki Dunno. I can design one if there's a need. (it's not needed for my current project)
timotimo could be a crab, but i suppose you could also have a butterfly-like thing with the wings at an angle to make it look like that
jonadab Makes me think lobster, initially.
But I can see ambiguity in it, yes. 18:17
viki timotimo: it took forever to load on my crappy network and when the first half only was showing, I thought it'd be a whole butterfly :)
I like it :)
18:23 cdg left 18:25 CIAvash left 18:41 optikalmouse left
viki man, I love PHP. *google PHP do XYZ* *copy-paste function name* done! 18:52
mst viki: trout.me.uk/mstcat2.jpg 18:53
viki mst: I'm currently writing a rakudo/nqp/star download page.... in PHP :) 18:54
18:54 wamba left 18:55 nadim joined
[Coke] viki - don't forget latest could have a .1 on the end. 18:55
18:56 girafe joined, Tonik left
viki Yeah, that already works :) 18:56
Well, PHP did it for me. I've just used a function ^_^ 18:57
DrForr Programming via stackverflow. 19:08
19:10 domidumont left 19:13 lizmat_ joined 19:14 lizmat left, labster joined, lizmat_ is now known as lizmat 19:15 mohae_ joined 19:18 mohae left 19:32 nnunley left 19:34 vendethiel joined
viki preview of rough look: i.imgur.com/tVX4QDc.png 19:38
19:38 domidumont joined, domidumont left, domidumont joined
viki This is the current look: rakudo.org/downloads/star/ 19:38
( -latest-blah URLs will also work with new version, automagically) 19:39
viki leaves to do some $actual-work for a change 19:40
19:40 cibs left
timotimo looks good to me 19:40
19:42 cibs joined
[Coke] viki: can you order by name, not date? 19:42
(so archive is at the bottom) 19:43
19:43 wamba joined
[Coke] misread those URLS. 19:46
viki [Coke]: yeah, it's by name. Here's larger preview: i.imgur.com/RiTSTr8.png
[Coke] Maybe a mono font on dates and sizes, and right justify sizes?
looks nice. 19:47
viki Yeah, mono looks better: i.imgur.com/wjYDqDo.png 19:56
viki &
[Coke] I would donwload that. 19:57
20:06 swuecho joined
swuecho Hi, all. How can I catch the exception in 'lines()' 20:07
.say for '/home/hwu/.zsh_history'.IO.lines();
If I run it as perl6 script. 20:08
have the error msg:
20:08 domidumont left
swuecho Malformed UTF-8 in method sink-all at SETTING::src/core/Any-iterable-methods.pm line 1 in block <unit> at test.p6 line 1 20:08
20:09 andrzejku_ joined
viki m: Blob.new(<3423123>).decode 20:12
camelia rakudo-moar 843a6b: OUTPUT«Malformed UTF-8 at line 1 col 1␤ in block <unit> at <tmp> line 1␤␤»
viki m: try Blob.new(<3423123>).decode
camelia ( no output )
viki m: try Blob.new(<3423123>).decode; say $!.^name
camelia ( no output )
viki wat
oh, broken robot... it's X::AdHoc
swuecho: well, try {} will catrch the exception.
20:12 camelia left 20:13 camelia joined 20:14 ChanServ sets mode: +v camelia
viki s: "foo".IO, 'print', \("meow") 20:15
SourceBaby viki, Something's wrong: ␤ERR: Could not find candidate that can do \("meow")␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤ in block <unit> at -e line 6␤␤
viki s: "foo".IO, 'print', \()
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/44dd...Mu.pm#L468
viki I see
swuecho: hm, well, .say for '/home/hwu/.zsh_history'.IO.lines(); works, but it'll stop at the line where you have malformed UTF 20:16
swuecho Yes. 20:17
try block works.
viki I wonder how come this stops too: try .encode("Latin-1").decode.say for "foo".IO.slurp(:bin).decode("Latin-1").lines
I kinda expected that to skip the line with broken utf8 and print the rest 20:18
Oh, need braces
try {.encode("Latin-1").decode.say} for "foo".IO.slurp(:bin).decode("Latin-1").lines
swuecho me too. I do not care much about the malformed lines.
viki change "foo" to "/home/hwu/.zsh_history", obviously :) 20:19
20:20 nicq20 joined
viki try {.encode("Latin-1").decode.say} || say "[MALFORMED UTF-8]" for "/home/hwu/.zsh_history".IO.slurp(:bin).decode("Latin-1").lines 20:21
\o/
swuecho thanks. 20:23
viki Any time. 20:24
mst try {.encode("Latin-1").decode.say} || say "[THIS LINE ENCODED IN WTF-8]"
20:31 bjz joined
andrzejku_ hey guys 20:34
could you help me?;-)
moritz depends on the problem :-)
viki Sure. What size a body are we talking about? 20:35
andrzejku_ I am not proficient in english but I decided to write a book for my friends about perl 6
viki :o
Sweet
andrzejku_ I think I will base on existing book like eloquent series 20:36
20:36 AlexDaniel joined
andrzejku_ but it will be great if you guys take a look at it from time to time 20:36
viki Sure. We can do it.
AlexDanie would be more than happy too, I'm sure. 20:37
andrzejku_ greate
AlexDaniel yoleaux: this was stupid
yoleaux: ye really, what kind of behavior is that? 20:38
yoleaux: who thought that it is a good idea? 20:39
viki
.oO( so this is why the robots want to kill all humans...)
AlexDaniel andrzejku_: hello!
stmuk_ grrr I can't delete a fork through the web on GH 20:40
AlexDaniel andrzejku_: perhaps I'm not the best person to review your English, but I can give feedback about the content itself, yes
andrzejku_: just contact me when you have something 20:41
viki stmuk_: sure you can. Settings -> all the way to the bottom -> Delete this repository
stmuk_ it doesn't work .. I get an error
viki :(
stmuk_ it has worked in the recent past
20:43 pierre_ joined
andrzejku_ sure okay 20:44
viki \o/
andrzejku_ that were very motivating words
:)
viki andrzejku_: also, post on our reddit www.reddit.com/r/perl6/ or on our Facebook page www.facebook.com/groups/1595443877388632/ or mention to lizmat to post on one of the Perl 6 Weeklies.... you know, to generate buzz :) 20:45
andrzejku_ okay
I think it will be also a good english practice for me 20:46
viki Definitely.
andrzejku_ since I don't like learning :D
I like only practice
okay, thank you viki and AlexDaniel, going to be busy 20:47
20:48 pierre_ left
dalek c: 5b79e49 | moritz++ | doc/Language/regexes.pod6:
Mention that alnum, alpha etc. are not real POSIX char classes, because they are not locale dependent
20:53
moritz andrzejku_: also let me know when you have something tangible. I have a mailing list of 130+ people interested in Perl 6 books 20:54
AlexDaniel moritz: see this also: github.com/perl6/doc/issues/973 20:56
moritz: the docs are currently wrong 20:57
there is no <word> and no <ascii>
20:57 perlawhirl joined
AlexDaniel \w is actually <alnum> if I recall correctly 20:57
20:57 perlawhirl left
AlexDaniel not sure about the rest. Could be rigth, could be wrong 20:57
20:59 Cole_ns joined
viki m: say '_' ~~ /<alnum>/ 21:02
camelia rakudo-moar 843a6b: OUTPUT«「_」␤ alnum => 「_」␤»
AlexDaniel yea-yea I know its weird
commit: all say '_' ~~ /<alnum>/
viki yeah
AlexDaniel commit: all say so '_' ~~ /<alnum>/
moritz same as \w, it seems
committable6 AlexDaniel, gist.github.com/382875eaa1d2a1be5a...a83526dcbc
AlexDaniel, gist.github.com/628c22533f92dac065...a51c7e29a5 21:03
dalek c: 19d8717 | moritz++ | doc/Language/regexes.pod6:
Some more fixes to built-in rules

  * add a few Unicode property alternatives
  * delete <word> and <ascii>, which do not exist
  * add <wb> and <ww>
See #973
21:05
AlexDaniel viki: perhaps this will also be very surprising to you
m: say ‘25_8thelloworld_234aeou’ ~~ / <ident> / 21:06
camelia rakudo-moar 843a6b: OUTPUT«「_8thelloworld_234aeou」␤ ident => 「_8thelloworld_234aeou」␤»
AlexDaniel note that there is no + or *
m: say ‘25_8thelloworld_234aeou’ ~~ / <+ident +[∞]> /
camelia rakudo-moar 843a6b: OUTPUT«「_8thelloworld_234aeou」␤»
AlexDaniel m: say ‘25_8thellowo∞rld_234aeou’ ~~ / <+ident +[∞]> /
camelia rakudo-moar 843a6b: OUTPUT«「_8thellowo」␤»
AlexDaniel m: say ‘25∞_8thelloworld_234aeou’ ~~ / <+ident +[∞]> / 21:07
camelia rakudo-moar 843a6b: OUTPUT«「∞」␤»
moritz AlexDaniel: yes, ident is supposed to be match a simplistic identifier
jnthn ident isn't a charclass
moritz AlexDaniel: like in Perl 6, but without the - and ' thingy
AlexDaniel moritz: I have no problems with ident subrule, but why is it a character class
being*
jnthn: so why can you use it as a character class then?
moritz you can't
AlexDaniel I just did 21:08
moritz as your own example showed
AlexDaniel and my example did not error out
jnthn You can try to use any rule as a charclass
If it doesn't match just one char, you're going to have a bad time.
We can't statically determine that.
AlexDaniel m: my rule foo { . }; say ‘25∞_8thelloworld_234aeou’ ~~ / <+foo +[∞]> / 21:09
camelia rakudo-moar 843a6b: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel jnthn: how can I do it?
jnthn You'd need to be in a grammar, I think
Unless <+&foo> works, but I don't believe it does 21:10
m: my rule foo { . }; say ‘25∞_8thelloworld_234aeou’ ~~ / <+&foo +[∞]> /
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3; say ‘25∞_8thelloworld_234aeou’ ~~ / <+7⏏5&foo +[∞]> /␤Unrecognized regex metacharacter + (must be quoted to match literall…»
jnthn Yeah, thought not
m: grammar G { token TOP { <+foo-[x]> }; token foo { \w+ } }; say G.subparse('abcxd') 21:11
camelia rakudo-moar 843a6b: OUTPUT«「abcxd」␤»
jnthn d'oh :)
m: grammar G { token TOP { <+foo-[x]> }; token foo { \w } }; say G.subparse('abcxd')
camelia rakudo-moar 843a6b: OUTPUT«「a」␤»
jnthn There we go
AlexDaniel m: grammar Blah { rule TOP { <+foo +bar> }; rule foo { <[abc]> }; rule bar { <[def]>+ } }; say Blah.parse(‘d’)
camelia rakudo-moar 843a6b: OUTPUT«「d」␤»
AlexDaniel yeah
turns out you are right
21:13 itaipu left, cdg joined
AlexDaniel something should be done about this :-/ 21:14
jnthn Anyway, if we've docs/examples that show using <+ident> or refer to ident as a charclass rather than a bulit-in rule, then I suggest they be tweaked.
It's perhaps possible to shove in extra code-gen to check if such a rule matched exactly one char, or alternatively to only ever eat 1 char, but I suspect it's not entirely trivial. I'm incliend to leave using an inappropraite rule as a charclass as being erroneous. 21:18
*inclined
21:19 Wiertek joined 21:23 andrzejku_ left
AlexDaniel isn't it less than awesome 21:24
21:26 bjz left 21:28 domidumont joined, pmurias joined 21:30 domidumont left
jnthn What would you consider more awesome? 21:32
AlexDaniel more awesome than accepting any rule as a character class? A warning would be nice 21:35
.tell MasterDuke tests?
yoleaux AlexDaniel: I'll pass your message to MasterDuke.
21:36 itaipu joined
jnthn is too tired to figure out how easy/feasible/cheap that is, but we can consider it at some point. TimToady++ may have a better intuition on that. :) 21:43
21:51 Wiertek left 21:53 cognominal joined
AlexDaniel OK: #130217 21:54
could've been phrased a bit better but whatever
21:58 zacts left 22:04 zacts joined 22:05 skids left 22:08 TEttinger joined 22:09 RabidGravy left
AlexDaniel who is Brandon Allbery? 22:10
22:10 bjz joined
viki AlexDaniel: geekosaur 22:10
AlexDaniel geekosaur: how is it relevant to this particular ticket?
geekosaur: do you have a link to IRC discussion? I can submit another ticket 22:11
geekosaur general misrecognition of what rules/definitions are appropriate where?
AlexDaniel <+smth> is not a misrecognition, it could be a valid character class
22:15 Cole_ns left 22:17 swuecho left
geekosaur irclog.perlgeek.de/perl6/2016-11-20#i_13598215 through irclog.perlgeek.de/perl6/2016-11-20#i_13598435 22:17
22:21 bjz left 22:34 Guest42590 left 22:48 salv0 left
AlexDaniel “token after {}” haha :) 23:01
samcv hmm my IRC bot that i use a lot of threading things... once it's running for long enough it just uses huge numbers of threads at 100% cpu. still functioning but I need to figure out what's going on 23:04
23:04 lukaramu left
samcv was at 100% all 4 cores for like many minutes, and using like 25 threads. now it's down using minimal ones. any way to do this? 23:06
23:06 dataf3l joined
dataf3l HI guys 23:06
23:07 dataf4l joined
dataf4l Hi guys 23:07
Anybody home? 23:08
timotimo samcv: please attach gdb to stop it, then you can "thread apply all bt" to see backtraces for each thread and we might be bale to see where it hangs
AlexDaniel *bleep* *blop*
samcv will it be useful to me as a perl 6 programmer? I know C as well but
timotimo able*, not bale
you can get the perl6-level backtrace, too, but it involves a bit of manual work
samcv need to mostly know which threads are sticking around doing something.
ah 23:09
timotimo you have to activate the thread in question, use "up" until you get a frame with a MVMThreadContext *tc in its scope
then you can "call MVM_dump_backtrace(tc)" to get the perl6-level backtrace
AlexDaniel m: grammar G { token TOP { <before> }; token before { . } }; say G.parse(‘foo’) 23:10
camelia rakudo-moar 843a6b: OUTPUT«===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
AlexDaniel m: grammar G { token TOP { <before2> }; token before2 { . } }; say G.parse(‘foo’)
camelia rakudo-moar 843a6b: OUTPUT«Nil␤»
samcv ah ok ti
AlexDaniel I see
dataf4l: why are you asking? :) 23:11
any interesting question?
dataf4l how do I server static files using HTTP::Server::Tiny
23:14 nadim left, kurahaupo__ joined, kurahaupo__ left
timotimo www.reddit.com/r/lolphp/comments/ps6x5/0x0_wat/ - that's pretty cool 23:14
23:15 kurahaupo__ joined 23:16 kurahaupo__ is now known as kurahaupo
AlexDaniel timotimo: :| indeed 23:16
23:17 eisen74 left
AlexDaniel m: say 0x0 +2e1 23:18
camelia rakudo-moar 843a6b: OUTPUT«20␤»
AlexDaniel well, what else did I expect…
how in a world it could possibly be something else…
23:18 xinming left 23:20 dataf4l left, dataf3l left
AlexDaniel timotimo: in case you did not backlog, here is a perl 6 variant of that 23:20
m: dd <--Inf--Inf\i>
camelia rakudo-moar 843a6b: OUTPUT«<0+0i>␤» 23:21
AlexDaniel :|
23:21 dataf4l joined 23:23 dataf3l_ joined
timotimo :D 23:23
AlexDaniel timotimo: I am really curious why is it 0 and not something else
the reason why it accepts --Inf is clear 23:24
but still, - -Inf is +Inf, right?
viki m: use nqp; say nqp::radix(10, '-Inf', 0, 0)[0] 23:25
camelia rakudo-moar 843a6b: OUTPUT«0␤»
23:25 xinming joined
timotimo it's a complex number 23:25
its re part is - -Inf, its im part is - -Inf
AlexDaniel so?
timotimo i'm not sure why it ends up 0, though
viki :/ 23:26
AlexDaniel viki: ok, so what does it mean?
viki AlexDaniel: it doesn't get noticed as being and Inf, goes to the radix parser that happily parses it as a zero?
timotimo m: use nqp; say nqp::radix(10, 'Inf', 0, 0)[0]
camelia rakudo-moar 843a6b: OUTPUT«0␤»
AlexDaniel viki: ooooooh
viki: that explains it
viki Just a guess. But I see the sign being part of the number parsed when target=parsing it
timotimo right, the radix parser knows nothing about Inf, apparently
right, yeah
viki AlexDaniel: the more amusing part of that php post is the "explanation" is given by mauke... a l33t perl hax0r :) 23:27
timotimo oh, haha
23:27 firstdayonthejob left 23:28 pmurias left
timotimo how did you find that bug, AlexDaniel? 23:28
AlexDaniel timotimo: how did I find all other bugs I reported? 23:29
:)
in this case, I just know that -Inf being a thing by itself causes a lot of problems
viki It won't be that for long! :)
AlexDaniel which is something viki is going to fix soon, yeah
23:29 itaipu left
timotimo cool 23:29
but yeah, how do you find all those bugs? 23:30
AlexDaniel vOv
23:30 skids joined
timotimo OK 23:30
AlexDaniel more serious bugs usually come from actual projects I write in perl 6. LTA tickets and other fun stuff is just me throwing weird things into rakudo and seeing how it reacts 23:32
manual fuzzing, basically
timotimo OK 23:36
viki Current Advent theme: Sobe # this is a note for me, in case I mess up again like last time and won't be able to revert back to the old theme :) 23:40
dalek c: 3481ba8 | gfldex++ | doc/Type/List.pod6:
fix markup
c: 39014d6 | gfldex++ | doc/Type/List.pod6:
show how to test for empty list in the part that readers will actually
23:41 xinming left
AlexDaniel viki: while you are at it… can we have black text? 23:42
viki AlexDaniel: that's the reason I'm changing it 23:43
It actually looks fine on my home monitor :)
AlexDaniel well it's not like I can't read it, but I find it a bit uncomfortable
viki Yeah 23:44
AlexDaniel oops, this title was a bit too long :) 23:46
viki ohhhhh...
viki designergasm at the current one 23:47
sms
23:47 xinming joined
AlexDaniel geekosaur: #130218 23:47
geekosaur I saw 23:48
AlexDaniel *bleep-blop* rt.perl.org/Ticket/Display.html?id=130218
23:53 synopsebot6 joined
timotimo one of those days i have to port synopsebot6 to IRC::Client 23:53
AlexDaniel well, I was planning to do this too :P 23:54
timotimo i gotta go to bed early, have a long drive in front of me 23:55
23:55 rpburkholder joined
viki .tell moritz I checked a few and they sucked. This one is sexy, so I went with it: perl6advent.wordpress.com/2015/12/18/ 23:59
yoleaux viki: I'll pass your message to moritz.
23:59 Vynce joined