»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:05 drschumtzenberg joined 00:15 Entonian joined 00:16 xinming_ joined, crab2313 left 00:17 wolfman2000 joined 00:19 xinming left 00:20 Entonian left 00:22 lestrrat left 00:23 lestrrat joined 00:24 crab2313 joined 00:25 thelazydeveloper left 00:34 cogno left 00:45 cogno joined 00:47 zhutingting joined 00:59 cogno left 01:06 smf left 01:21 crab2313 left 01:32 PacoAir left 01:39 thou left 01:43 thou joined 01:45 isBEKaml left 01:59 zhutingting left 02:01 zhutingting joined 02:02 zhutingting left 02:05 zhutingting joined 02:07 dbr left 02:11 zhutingting_ joined 02:12 zhutingting left, zhutingting_ is now known as zhutingting 02:13 zhutingting left 02:26 Guest17862 left 02:33 orafu left 02:37 orafu joined 02:39 cognominal left, Chillance left 02:46 alim left 02:48 adu joined 02:53 colomon joined
diakopter nqp: my $a; ~$a // 0 02:57
p6eval nqp: OUTPUT«Null PMC access in set_string_native()␤current instr.: '_block1000' pc 51 ((file unknown):48) (/tmp/bAKPeVH6FZ:1)␤»
03:01 sudokode left
adu hi diakopter 03:01
diakopter o/
adu so I'm starting to think that maybe I should have started learning with perl5 instead of pearl6 03:02
it just seems like perl5 is a swiss army knife language, and perl6 is the entire swiss army 03:03
diakopter ha
it can feel that way if you read the Synopses
adu the Synopses are very detailed 03:04
03:06 sudokode joined 03:08 DrEeevil is now known as bonsaikitten
diakopter unfortunately the Synopses are now misnamed, as they don't summarize anything anymore, and they need summaries themselves 03:09
sorear the exegeses were supposed to be that. 03:13
PerlJam no, the exegeses were to explain the synopses. :) 03:14
diakopter the exegeses were supposed to explain the apocalypses, I thought.
PerlJam oh, yes. that's it.
diakopter and the synopses were supposed to summarize both... 03:15
but the synopses turned into the spec
PerlJam Perl 6 is *big* I think the Synopses are still the "least words" explanation 03:16
diakopter really? I thought S02 now dwarfed all other documents combined 03:17
well, maybe S02+S05
sorear S03 is bigger than S02, but not by much 03:20
adu heh I just happened to be reading S02
maybe that's why I thought perl6 was the swiss army
sorear S06, S12, and S26 also exceed 2000 libnes
PerlJam gist.github.com/2674590 03:21
sorear adu: note that nobody has ever bothered to write out Perl 5's behavior in full
adu: it would be at least comparable to Perl 5 if so, I think
adu how many implementations of Perl are there? 03:22
s/Perl/Perl5/
sorear One.
adu that's why
sorear No
Having few implementations is not evidence for a language being simple
adu no
sorear It is the exact opposite
if Perl 5 was as simple as Perl 6, it would have dozens of implementations
adu I mean I suspect people never reimplemented because there was no specification 03:23
diakopter it is rumored that Microsoft made a Perl 5 on the CLR as a proof of concept before releasing the CLR
I don't remember where I read that; sorry
adu IronPerl?
diakopter no; long before the Iron* 03:24
adu so Niecza is IronPerl6 so to speak
diakopter well, the Iron* languages use the 'dynamic' feature of CLR.. niecza doesn't, afaik 03:25
sorear adu: In any case, I strongly dispute your assertion that Perl 6 is more complicated than Perl 5 03:26
adu once I figure stuff out, I should write a ___'s poignant guide to Perl6 03:27
PerlJam adu: that would be neat.
adu with cartoons
diakopter I'd read that for a dollar
adu diakopter: in which direction? 03:28
diakopter heh
either
adu I mean would you pay me, or the other way around?
diakopter right, either
adu is confused
diakopter I mean, if I'd pay $1 to read it, then I'd certainly read it for free 03:29
PerlJam adu: excellent!
diakopter and if I'd read it for free, I'd certainly appreciate getting a dollar for reading it
adu PerlJam: but I have to figure stuff out first
diakopter: lol
diakopter adu: with which language(s) are you already familiar? 03:30
adu diakopter: Python, C, C++, Haskell, ML, Forth, Maple, Mathematica, Prolog, Oz, R, Go, Groovy, Scheme 03:32
diakopter ha
(impressive)
oh yeah, you were talking about Go the other day
PerlJam What's Oz?
adu Oz is a multiparadigm language
diakopter Oz/Mozart?
adu yes
Mozart is the compiler
Oz is the language
PerlJam takes that as a hint to google it. 03:33
adu I wrote a puzzle solver in it
and I had some trouble constraining the search space, so I rewrote it in prolog 03:34
I tried really hard to learn Ruby, but I never got it 03:35
sorear adu: with a background like that, I'm suprised you're having issues. How can I help?
adu sorear: I don't understand the PAST API
sorear does NOT know Maple, Mathematica, Oz, R, or Groovy 03:36
adu: PAST != Perl6
adu and whenever I talk about PAST here, they refer me to #parrot, whenever I mention it in #parrot, they refer me to #perl6
PerlJam heh
adu it's very frustrating 03:37
sorear adu: The only person who understands PAST is pmichaud
adu I'm thinking of scrapping the parrot way, and just writing my scheme in pure perl6
PerlJam sorear: you really think that's true?
03:38 JimmyZ joined
PerlJam I mean jnthn has to understand enough of PAST to make QAST. 03:38
sorear PerlJam: That statement is too vague to be true or false in a strict sense.
jnthn certainly knows more than nothing about PAST 03:39
adu but there are so many things that are in the "learn-by-example" in the PAST documentation, like $<X> that I don't understand, which seems to be perl6, not parrot
sorear PAST is a data structure library
03:39 tyatpi joined
PerlJam sorear: well, *I* konw more than nothing about PAST too :) 03:39
sorear '$<X>' is not part of the PAST concept, at all
PerlJam adu: It seems like most of your difficulty is separating things into the appropriate conceptual bins. 03:41
JimmyZ $<X> just means $/<X>, where $/ is a hash var?
sorear PAST is just a library, it has no syntax at all
$<X> is Perl 6/NQP syntax
nothing whatsoever to do with PAST 03:42
diakopter PerlJam: there are many bins
adu so $<X> = $/.X
sorear if you asked that question to #parrot, they were right to send you here
adu or whatever
JimmyZ $<X> = $/{'X'}
sorear adu: Making up syntax will get you nowhere.
adu $/{'X'}] 03:43
03:43 tokuhirom joined
adu ack 03:43
maybe I should come back after more research
sorear Here is the place for research. Do research here.
adu ok 03:44
JimmyZ adu: see perlcabal.org/syn/S05.html#When_%24%2F_is_valid
adu I'd like to know general things that I haven't found in the synoppses yet
sorear adu: Am I being rude?
adu like can grammars be composed?
sorear: nope
sorear If by 'composed' you mean general compositionality, then yes 03:45
adu like if you have grammar A {…} and grammar B {…} can you do something like grammar C { rule TOP { <A> | <B> }}?
sorear yes, you can use <A::TOP> or [ :lang(A) <TOP> ] 03:46
adu ah A::TOP
ok
sorear niecza only supports the latter form; I don't know if Rakudo does either
n: grammar G { rule TOP { :lang(Niecza::NumSyntax) <integer> } }; say G.parse('0x1F,pie') 03:47
p6eval niecza v17-4-ge5b869e: OUTPUT«G()␤»
sorear n: grammar G { rule TOP { :lang(Niecza::NumSyntax) <integer> } }; say G.parse('0x1F')
p6eval niecza v17-4-ge5b869e: OUTPUT«#<match from(0) to(4) text(0x1F) pos([].list) named({"integer" => #<match from(0) to(4) text(0x1F) pos([].list) named({"hexint" => #<match from(2) to(4) text(1F) pos([#<match from(2) to(4) text(1F) pos([].list) named({}.hash)>].list) named({}.hash)>}.hash)>…
adu so
JimmyZ you may wants grammar C is A { ... } or something?
adu the :lang(A), does that add a pair to <integer> or <TOP>?
sorear It looks like a pair but it isn't one 03:48
adu what?
sorear It's a pragma
adu what?
sorear Remember that inside regexes the language is completely different 03:49
1*3 is a multiplication in the main language, but {3,13,113,1113,...} in a regex
03:49 sisar joined
adu I thought everything was quoted 03:50
TimToady regexes are not strings in Perl 6
sorear Likewise, :lang(A) in a regex has almost nothing to do with :lang(A) in the main language
TimToady it's just a different language
likewise the inside of a quoted string is a different language 03:51
adu ok
I see the pragma section in S05, but it doesn't mention :lang
oh right you said that was impl-specific 03:52
sorear S05 should mention :ignorecase 03:53
pragmas inside regexes begin with colons
:lang functions in a similar way to :ignorecase
adu that's outside of the quotation
sorear There is no quotation
adu it looks like pragmas are inside the quotation
sorear Where do you see a quotation? 03:54
adu what are {} or // called?
TimToady basically those are lexical scope delimiters
diakopter adu: outside the regex they are modifiers 03:55
sorear TimToady: do we have a better name for them than 'nibblers'?
adu diakopter: and modifiers are not pairs?
diakopter no
I mean, correct
sorear adu: see S05:594 03:56
'can be placed inside the regex'
TimToady we reuse the pair syntax for many things that are not pairs 03:57
r: say :16<deadface>
p6eval rakudo f685cb: OUTPUT«3735943886␤»
adu lexically scoped delimiters 03:59
ok
so a colon inside delimiters might be a modifier or a pragma
TimToady depends on the language at that spot 04:00
sorear No, it's always both
adu so pragmas are modifiers?
sorear Modifiers are a kind of pragma
adu heh
TimToady almost any kind of declaration tweaks the current language into a different language 04:01
sorear A pragma is anything that tweaks the local interpretation of the language
'use strict' is a pragma. So is :ignorecase inside Prl 6 regexes
TimToady an operator declaration is merely a dramatic version of that
adu TimToady: sounds very Huffman
sorear Huffman has been a concious influence on us all 04:02
TimToady well, it's more like defining all languages in terms of a universal root, much like URLs
sorear Perl 6 tries to make the common things short and irregular while uncommon things are long and regular
adu :) 04:03
sorear IMO one of the things that sets Perl 6 apart is how much we steal from bona fide linguistics
04:03 ranguard left
adu bona fide? 04:04
sorear possibly a bad choice
adu proper linguistics?
natural linguistics? 04:05
sorear natural stuff, yes
PerlJam What would you expect from a programming language designed by a linguist?
geekosaur ^^ that
adu so I shouldn't assume every colon is a pair
can I assume that every :: is a module/package/namespace? 04:06
TimToady depends on the language
PerlJam no
TimToady :: means something else in regex language
sorear Larry's Law of Language Design: Everybody wants the colon.
PerlJam adu: sometimes :: is a cut operator :)
adu o right the backtracking
04:06 sudokode left
adu but that uses different whitespace conventions, I don't think I was confused the first time I saw that 04:06
I think I thought "WTF", I'm pretty sure I didn't think "that's a funny namespace" 04:07
TimToady we try to make different things look different, except when we don't
sorear I think that, in the languages that Perl 6 enables by default, :: is always either namespacey or a cut operator
I'm not entirely certain though 04:08
PerlJam I don't usually think of prefix :: as namespacey
TimToady we changed ??:: to ??!! to avoid overloading :: another way
diakopter std: use Test:: ::;
p6eval std 8632387: OUTPUT«ok 00:00 41m␤»
adu also, the MAIN thing confused me
04:08 sudokode joined
adu but the example has 4 parameters, and rakudo didn't act like the synapses 04:09
diakopter TimToady what does that mean ^^
adu TimToady: that would make a nice ternary op 04:10
TimToady n: say 42 ?? "yes" :: "no"
p6eval niecza v17-4-ge5b869e: OUTPUT«===SORRY!===␤␤Please use !! rather than :: at /tmp/VjEIclV8Ez line 1:␤------> say 42 ?? "yes" ⏏:: "no"␤␤Parse failed␤␤»
sorear diakopter: in niecza, :: returns the root of the virtual package tree
n: say (::).<CORE>.WHO.<pi> 04:11
p6eval niecza v17-4-ge5b869e: OUTPUT«3.1415926535897931␤»
diakopter niecza: use Test:: ::;
p6eval niecza v17-4-ge5b869e: OUTPUT«===SORRY!===␤␤'use' with arguments NYI at /tmp/M4V0bV0a3V line 1:␤------> use Test:: ::⏏;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1364 (die @ 3) ␤ at /home/p6eval/niecza/s…
adu in S06, it gives sub MAIN ($directory, :$verbose, *%other, *@filenames) as an example, but the other hash never seemed to capture anything 04:12
and I don't understand how :$verbose works
sorear --verbose
--other
adu oh
that's why
TimToady :$verbose is short for :verbose($verbose) 04:13
sorear which is how subs take named arguments in Perl 6
adu which is short for verbose => $verbose?
sorear in an expression, yes 04:14
TimToady well, not in that context
sorear in a parameter list, no
adu so named arguments aren't pairs
sorear correct
TimToady right, just borrowed the syntax
adu is there anything else that aren't pairs?
PerlJam heh
adu I mean that start with colon
TimToady I mentioned :16<abcd> 04:15
adu ah
sorear :foo is a pair if and only if it is in expression context
adu radix syntax
I remember that briefly
TimToady we also use colon syntax to extend identifiers with bits that aren't identifiery 04:16
postfix:<!> for instance
adu and :sym<foo>?
TimToady well, not without a category on the front
PerlJam We still have :{...} don't we? 04:17
adu another thing, is do I have to use :sym? or can I use :stuff<foo>?
PerlJam adu: or were you only limiting to things that match :\w+ ?
TimToady well, sym does more magic
but where we don't care to define <sym>, you can put anything there 04:18
you'll see entries like term:ident
that just describe what's being matched
adu PerlJam: I realize that :\W is a very large space, so I guess I did mean :\w
I definitely didn't mean the sigils and twigils 04:19
TimToady r: say :{ 42 }.perl
p6eval rakudo f685cb: OUTPUT«Block.new()␤»
TimToady r: say :foo{ 42 }.perl
p6eval rakudo f685cb: OUTPUT«"foo" => Block.new()␤»
TimToady arguable the first should be '' => Block.new() 04:20
*bly
adu TimToady: ok 04:21
TimToady certain colonpair syntaxes are restricted in certain spots
for instance, colonpairs as match modifers may only use the paren form 04:22
since we want to reserve the rest of the brackets to delimit the pattern
and certain forms that require literals can't depend on running code, so the {} forms are not allowe there 04:23
but generally you don't notice this details
unless of course you have a mind like diakopter, who writes weird code
every project needs one of those... 04:24
adu where can I find docs on ~~?
PerlJam adu: As TimToady says, there's a method to the madness. And once you "get it", you'll notice the principle of least surprise everywhere.
(well, you *won't* notice it ;) 04:25
adu @*ARGS ~~ /<MyGrammar::top>/;
$obj ~~ :!defined
how can those ^ be the same operator?
TimToady for ~~ see 'Smart matching' in S03 04:26
adu TimToady: thanks
TimToady those are the same because they are really sugar for RHS.ACCEPTS(LHS)
so they dispatch on the righthand type 04:27
and Pair.ACCEPTS does something different from Regex.ACCEPTS
adu ok
"<TimToady> every project needs one of those…" lol 04:29
TimToady diakopter++ is our best "fuzzer" 04:30
diakopter just notice
I fuzzed a Microsoft language out of existence, or at least I like to think so.
sisar example of diakopter's "weird" code ? 04:31
diakopter just line noise
TimToady cleverly crafted line noise though
04:35 ranguard joined
adu couldn't you uncleverly generate it until a parser for it didn't fail? 04:36
diakopter that requires lots of cleverness to make it not take forever 04:37
adu POLSE
diakopter POLSE? 04:38
adu I remember reading somewhere that PEG were good at text => grammar, and CFG's were good at grammar => text
diakopter: Principle of Least Surprise Everywhere
possibly because PEG's are not invertible 04:39
04:45 zhutingting joined
diakopter std: /\/\/////\/\/////\/\/\/\/////\/\/\/\/////\/\/\/\/\// 04:52
p6eval std 8632387: OUTPUT«ok 00:00 42m␤»
geekosaur 52 pick-up 04:53
adu diakopter++
diakopter niecza: say '//'~~/\/\/////\/\/////\/\/\/\/////\/\/\/\/////\/\/\/\/\// 04:55
p6eval niecza v17-4-ge5b869e: OUTPUT«#<match from(0) to(2) text(//) pos([].list) named({}.hash)>␤»
05:02 kaare_ joined 05:07 araujo left 05:09 JimmyZ left 05:12 ranguard left
sorear I can't parse that, and I'm not sure I want to. 05:26
TimToady is not sure of the significance of 2 2 4 4 5
diakopter tee hee 05:28
moritz \o
TimToady yo daddy! 05:29
p6: (:36<abigradixendswithz>/:36<10000000>).base(36) 05:30
p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method base in class Rat␤ at /tmp/8gUj_GhQ4C line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65) ␤ at /home/p6…
..rakudo f685cb: ( no output )
..pugs: OUTPUT«*** No such method in class Rat: "&base"␤ at /tmp/L2Ze9Fh0Wj line 1, column 1 - line 2, column 1␤»
TimToady r: say (:36<abigradixendswithz>/:36<10000000>).base(36) 05:31
p6eval rakudo f685cb: OUTPUT«ABIGRADIXEN.DSWITHZ␤»
TimToady \o/
05:31 ranguard joined
TimToady r: say (:36<abigradixendswithz>/:36<1000000000>).base(36) 05:40
p6eval rakudo f685cb: OUTPUT«ABIGRADIX.ENDSWITHZ␤»
05:45 ranguard left
sorear r: say log(36**9, 2) 05:46
p6eval rakudo f685cb: OUTPUT«46.5293250129808␤»
05:51 isBEKaml joined
dalek kudo/nom: f5288fc | moritz++ | src/core/Version.pm:
flesh out Version a bit

  * fixed constructor to properly handle :plus
  * .Str now properly handles * wildcards and trailing +
  * first shot at ACCEPTS
05:55
05:56 ranguard joined 05:57 adu left 05:58 NamelessTee joined 06:05 isBEKaml left 06:06 isBEKaml joined
moritz adu++ # "it just seems like perl5 is a swiss army knife language, and perl6 is the entire swiss army" 06:07
diakopter keep reading :) 06:10
moritz sorear++ # "Perl 6 tries to make the common things short and irregular while uncommon things are long and regular" 06:12
dalek kudo/nom: 2ac5691 | moritz++ | / (2 files):
eqv and === for Version. Run test file
06:14
ast: a4ec6e3 | moritz++ | S02-literals/version.t:
[version.t] fix one test, fudge a second one for rakudo
ast: 52a96fb | moritz++ | S02-literals/version.t:
unfudge a version.t test
moritz ok, I now have Version implemented, except the scary parts 06:15
(ie no support for alphanumeric stuff)
diakopter++ # say '//'~~/\/\/////\/\/////\/\/\/​\/////\/\/\/\/////\/\/\/\/\// 06:16
06:18 ranguard left
sorear moritz++ # I look forward to stealing Version after $finals 06:22
06:23 isBEKaml left 06:27 ranguard joined
TimToady sorear: we appreciate that you're prioritizing school 06:29
06:32 cognominal joined
moritz we've had our fair share of hackers burning out while prioritizing p6 hacking. We don't want that to repeat 06:33
06:33 spaceships left 06:41 tokuhirom left, mikec_ left, sftp left, baest left, pomysl_ left, ivan`` left, jnthn left, odoacre left, estrai left, ivan`` joined, sftp joined, odoacre joined 06:44 isBEKaml joined
TimToady prioritizes bed & 06:56
moritz have the appropriate amount of sleep :-)
07:09 tyatpi left
isBEKaml moritz: you're still up? :| 07:19
07:20 mdupont left
isBEKaml moritz: nvm, I see it's something of early morning where you are. :-) 07:26
07:34 araujo joined, araujo left, araujo joined 07:55 zhutingting left 08:04 cognominal_ joined 08:06 raiph joined 08:07 cognominal left 08:11 tokuhirom joined, mikec_ joined, baest joined, pomysl_ joined, jnthn joined, estrai joined
moritz isBEKaml: yes, I'm still up :-) 08:11
08:11 raiph left, raiph joined
moritz though on and off, being distracted by $family and Mother's Day 08:13
isBEKaml moritz: /family/ problems. :P 08:15
isBEKaml ducks before anyone's out to get him 08:16
StuntmanMike aaah, Mother's Day! 08:20
moritz isBEKaml: today just $family, not $family.problems 08:30
at least so far :-) 08:31
dalek ast: ea734f1 | moritz++ | S12-enums/pseudo-functional.t:
simplify an enum test a bit
08:35
08:36 raiph left
moritz r: enum day (:Sun(1), 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); say day(Tue).Str 08:36
p6eval rakudo 2ac569: OUTPUT«Method 'Str' not found for invocant of class 'Undef'␤ in block <anon> at /tmp/dR0d80NyvO:1␤␤»
moritz r: enum day (:Sun(1), 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); say day(Tue) eq day(3)
p6eval rakudo 2ac569: OUTPUT«(signal SEGV)»
moritz submits rakudobug
isBEKaml SEGV, really? :( 08:37
diakopter r: enum day (); ~day() 08:38
p6eval rakudo 2ac569: OUTPUT«(signal SEGV)»
moritz diakopter++ 08:39
r: enum day <a b>; say ~day(1) 08:40
p6eval rakudo 2ac569: OUTPUT«b␤»
08:40 mdupont joined
isBEKaml r: enum day <x y x xx>; say ~day(2) 08:40
p6eval rakudo 2ac569: OUTPUT«x␤»
isBEKaml I thought enums rejected duplicate entries? Not an error scenario? 08:41
r: enum foo();
p6eval rakudo 2ac569: ( no output )
isBEKaml r: enum foo(); ~foo;
p6eval rakudo 2ac569: OUTPUT«use of uninitialized value of type foo in string context in block <anon> at /tmp/ZjvSBtYwkC:1␤␤»
moritz n: enum day <a b a>;
p6eval niecza v17-4-ge5b869e: OUTPUT«===SORRY!===␤␤Illegal redeclaration of symbol 'a' (see line 1) at /tmp/E8W7vaE4tl line 1:␤------> enum day <a b a>⏏;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1364 (die @ 3) …
isBEKaml p: enum foo<x y x xx>; ~foo(2); 08:42
p6eval pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/_DpMXzAohu line 1, column 1-19␤»
isBEKaml perl6: enum foo<x y x xx>; ~foo(2);
p6eval niecza v17-4-ge5b869e: OUTPUT«===SORRY!===␤␤Illegal redeclaration of symbol 'x' (see line 1) at /tmp/7kB9uNqC_u line 1:␤------> enum foo<x y x xx>⏏; ~foo(2);␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1364…
..rakudo 2ac569: ( no output )
..pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/Adqvbg4njr line 1, column 1-19␤»
isBEKaml moritz: yes, rakudobug?
moritz isBEKaml: yes 08:43
diakopter where are rakudobugs tracked these days
moritz trt.perl.org/rt3/
rm
rt.perl.org/rt3/ 08:44
diakopter oh
moritz noone was fond of migrating ~600 open and probably as many closed tickets
isBEKaml moritz: petdance did something like that for parrot in their move to github issues. 08:45
moritz isBEKaml: I know
isBEKaml moritz: IIRC, they had far more tickets than rakudo. 08:46
moritz isBEKaml: but their primary motivation was a huge spam problem with their trac instance
a pressure which we don't have
isBEKaml moritz: our motivation? RT sucks? ;)
moritz well yes, it sucks, but we can work with it 08:47
I haven't tried any other github tracker with such a largish number of tickets
erm 08:48
any other issue tracker
isBEKaml moritz: I think somebody needs to force you to be with $family today. :-)
moritz I am, on and off :-) 08:50
isBEKaml not unlike a flip-flop. ;)
moritz that flip was a flop :-) 08:51
diakopter waits for jnthn to awaken 08:52
isBEKaml moritz: :) While you're here, I need your help with git. 08:53
StuntmanMike r: USAGE()
p6eval rakudo 2ac569: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&USAGE' called (line 1)␤»
StuntmanMike that's LTA :/
isBEKaml moritz: I'm doing some changes to tablets. git pull'd and immediately ran into conflicts. git stash didn't help either. What can I do here?
08:53 StuntmanMike is now known as tadzik
isBEKaml tadzik: \o/ 08:54
tadzik \o/
isBEKaml!
isBEKaml tadzik: now we know what you had been upto these past days!
tadzik ha
you know, stuff :)
isBEKaml tadzik: jumping on the trampoline! :D
tadzik yeah, that too :P
isBEKaml tadzik: JUMP! 08:55
tadzik o-<-<
isBEKaml tadzik: higher!
tadzik o->-|
o-<-<
o->-|
isBEKaml :D
08:56 icwiener joined
diakopter omg. /me looks at the rakudo bug list 08:58
moritz isBEKaml: what do you mean by "git stash didn't help"? 08:59
isBEKaml moritz: I first git stash'd my changes and git pull'd. Even then, it ran into conflicts. 09:01
moritz isBEKaml: which means you had local changes/commits
isBEKaml: do you want to get rid of them? 09:02
isBEKaml moritz: yes and they were in my own local branch.
moritz: No. I guess that's what git stash is for.
moritz ah
so do a
git checkout master
git merge origin/master
if your changes are in a different local branch, that shouldn't lead to any conflicts 09:03
and then
git merge yourlocalbranch
and resolve any conflicts you might get
isBEKaml gco master 09:04
docs/tablet-2-basic-syntax.txt: needs merge
:(
error: you need to resolve your current index first
moritz eeks
isBEKaml moritz: git status gives me a list of files that were from the pull'd logs. None modified by me. 09:05
moritz: but the file I modified - is on the add queue. wtf?
moritz isBEKaml: did you do a 'git pull' or a 'git pull --rebase'? 09:06
isBEKaml moritz: git pull
moritz: I need to rebase?
moritz no
just asking
isBEKaml moritz: I don't do rebase unless I wanted to wipe my history. 09:07
moritz: alright, I'm moving my file out, doing a clean checkout and writing my history. 09:08
moritz isBEKaml: when I'm in a situation like this, and I know that all my local changes have been committed or stashed, I do a git checkout .
but that can lose information if not all local changes have been comitted or stashed
(plus and minus some git reset magic) 09:09
isBEKaml moritz: yeah, I git stashed first and did a git pull. resulted in a dirty branch. :/
moritz: now I can't even unstash or do a checkout to master.
moritz hm 09:10
now that we are at destructive things, does git reset --hard HEAD help at all?
isBEKaml didn't want to try that. Now that I have moved my file, I might as well try it.
tadzik backup the conflicting file, git checkout -f it? 09:11
isBEKaml tadzik: that wouldn't help. dirty branch, right?
tadzik hm
but checkout -f the file?
not the branch. Not sure
doesn't git status say what comment shold you use to abort it? 09:12
isBEKaml tadzik: git status gave me a list of unmerged files from my last pull.
tadzik right. So those are the one that you should do something about, right?
isBEKaml tadzik: so yes, I can't do anything unless I resolve all my conflicts, can't even move out to another branch.
dalek kudo/nom: 32b1731 | moritz++ | src/core/Enumeration.pm:
make invocations of enums much more robust, and a bit more magic.

fixes RT #112906
moritz r: enum day <a b c d e>;say day(3) === d; "foo" but d; say "alive"; "foo" but day(3) 09:13
p6eval rakudo 2ac569: OUTPUT«True␤alive␤Type check failed in assignment to '$!day'; expected 'day' but got 'Int'␤ in block <anon> at src/gen/CORE.setting:650␤ in method BUILD_LEAST_DERIVED at src/gen/CORE.setting:637␤ in sub infix:<but> at src/gen/CORE.setting:10579␤ in block <anon> at /tm…
isBEKaml tadzik: but the problem is - I git stashed my files. it shouldn't give me conflicts.
tadzik maybe stash gets confused on unmerged files
isBEKaml tadzik: anyway, I did a hard reset for a clean local branch.
moritz about that enum thing: WTF?
day(3) === d is True, but '"foo" but d' and '"foo" but day(3)' dies? 09:14
isBEKaml moritz: I did a hard reset now. I'm moving my files back in, so that helped!
moritz isBEKaml: glad to hear that
isBEKaml yeah, that enum thing is a whaddeyeff.. 09:15
moritz r: enum A <b c>; say nqp::iscont(b); say nqp::iscont(A(0))
p6eval rakudo 2ac569: OUTPUT«Method 'gist' not found for invocant of class 'Integer'␤ in sub say at src/gen/CORE.setting:6621␤ in block <anon> at /tmp/kpp3b_i_2I:1␤␤»
moritz r: enum A <b c>; nqp::say nqp::iscont(b); nqp::say nqp::iscont(A(0))
p6eval rakudo 2ac569: OUTPUT«0␤0␤»
isBEKaml moritz: OOC, these sort of errors used to give us NPMCA, right? 09:16
:)
moritz r: enum day <a b c d e>;say day(3) === d; "foo" but d; say "alive"; "foo" but d; # just checking that it works twice
p6eval rakudo 2ac569: OUTPUT«True␤alive␤»
moritz isBEKaml: yes :-)
isBEKaml moritz: darkest days are over. whew! :-) 09:17
moritz now we just get segfaults :-)
no, I fixed that one
isBEKaml r: enum day <a b c a b c>;
p6eval rakudo 2ac569: ( no output )
tadzik pugs: Missing required parameters: $_ -- what does that mean?
p6eval pugs: OUTPUT«*** ␤ Unexpected "what"␤ expecting operator, ":" or ","␤ at /tmp/jI_Ycgb4Y1 line 1, column 36␤»
tadzik eek, pardon 09:18
isBEKaml tadzik! working with pugs!
tadzik yeah :)
I wanted to see if my todo runs faster than 1 second per command
and all pugs says is: pugs: Missing required parameters: $_
does it have MAIN? 09:19
moritz prolly not 09:20
pugs: sub MAIN() { say "OH SHARK" }
p6eval pugs: ( no output )
moritz pugs doesn't like sharks :-(
rakudobug submitted 09:21
(about that enum+but wtf) 09:22
that's two enum bugs found in S12-enums/pseudo-functional.t
erm, rakudobugs detected by that test file 09:23
isBEKaml tadzik: I think it runs off its own Prelude.
tadzik: no MAIN
tadzik I see
isBEKaml pugs: sub BAR() { say "OH SHARK!" }; BAR(); 09:24
p6eval pugs: OUTPUT«OH SHARK!␤»
isBEKaml pugs: sub MAIN() { say "OH SHARK!" }; MAIN();
p6eval pugs: OUTPUT«OH SHARK!␤»
isBEKaml so, to pugs, MAIN is just a sub, not a very special one at that.
moritz r: enum A <b c>; say b ~~ A 09:25
p6eval rakudo 2ac569: OUTPUT«True␤»
moritz r: enum A <b c>; say ("foo" but b) ~~ A
p6eval rakudo 2ac569: OUTPUT«False␤»
moritz r: enum A <b c>; say ("foo" but b) ~~ b 09:26
p6eval rakudo 2ac569: OUTPUT«True␤»
moritz wait. b ~~ A, but ("foo" but b) ~~ b and ("foo" but b) !~~ A?
that seems... odd 09:27
I kinda thought our type system was transitive :-) 09:28
moritz submits rakudobug
wow, that test file really is full of all <weird good> stuff 09:31
jnthn mornin' 09:40
09:40 crab2313 joined, thelazydeveloper joined 09:41 paul1234 joined
moritz \o jnthn 09:42
jnthn r: enum A <b c>; say ("foo" but b) ~~ A
p6eval rakudo 2ac569: OUTPUT«False␤»
isBEKaml jnthn: \o
jnthn There's a good reason for that one.
When you do "but b", it generates a role from the enum. 09:43
moritz r: enum A <b c>; say ("foo" but b) ~~ b
p6eval rakudo 2ac569: OUTPUT«True␤»
jnthn Then *that* role is mixed in.
moritz ah, and the matching against b isn't a type check 09:44
jnthn Right.
isBEKaml r: enum A <a b c>; say ("foo" but b).WHAT
p6eval rakudo 2ac569: OUTPUT«Str+{<anon>}()␤»
moritz so it's not an intransitivity in the type check after all
s/check/system/
moritz relieved
jnthn Yeah. I'm a little nervous about making that come back with "true" also. 09:45
moritz which one? the ("foo" but b) ~~ b ?
jnthn No, the ~~ A one.
moritz r: enum A <b c>; say 0 ~~ b 09:46
p6eval rakudo 2ac569: OUTPUT«True␤»
jnthn r: enum A <b c>; say A.^mro; say ("foo" but b).^mro
p6eval rakudo 2ac569: OUTPUT«A() Int() Cool() Any() Mu()␤Str+{<anon>}() Str() Cool() Any() Mu()␤»
moritz jnthn: I'm finde with that. Some test file wants it to be True, but that doesn't mean much
isBEKaml jnthn: so, by mro, A() => ("foo" but b ) ~~ A should return true? 09:47
moritz isBEKaml: no
A doesn't appear in the ("foo" but b ) MRO 09:48
jnthn Right, and that's the problem.
isBEKaml moritz: Ah, I **can't** read. :/
isBEKaml cusses irssi for hiding NLs off the end.
jnthn If we make that outcome of the mixin say "yes, I'm an A", we'll get a whole load of fascinating bugs when the optimizer relies on that. :) 09:49
Or, well, when just about anything does really.
isBEKaml jnthn: blog about our type system someday? :)
jnthn e.g. ("foo" but b ) ~~ Int would become true 09:50
isBEKaml jnthn: don't ask me to buy that book about MOP (it's way over my pockets) :(
s/over/beyond/
jnthn isBEKaml: The book about MOP wouldn't be terribly helpful here anyway.
isBEKaml jnthn: so yes, blog? 09:51
jnthn Yeah, I'll try and make some post on that...could be interesting. :)
isBEKaml \o/ jnthn++
jnthn Anyway, we should only have the result of the mixin claiming it's a subtype of the enum type iff it is capable of the things the enum type is.
moritz r: enum A <b c>; say +("foo" but c) 09:52
p6eval rakudo 2ac569: OUTPUT«0␤»
jnthn hmmm
moritz r: enum A <b c>; say +("foo" but c).c
p6eval rakudo 2ac569: OUTPUT«Method 'c' not found for invocant of class 'Str+{<anon>}'␤ in block <anon> at /tmp/2AtTC_j7E5:1␤␤»
moritz r: enum A <b c>; say +("foo" but c).A
p6eval rakudo 2ac569: OUTPUT«1␤»
moritz currently enum mixins establish more of a has-a relation, not an is-a relation 09:53
isBEKaml o.O(moritz coming up with his punches to jnthn)
moritz I'm fine with that
jnthn moritz: I think that's how we've always had it. as-role.t all passes with the current implementation, fwiw.
Don't suppose you're in the thorough.t wonderland? :) 09:54
moritz jnthn: no, pseudo-functiona.t 09:55
*functional
we don't run that file yet
because the first test segfaulted :-)
I fixed that
jnthn ah, OK :)
moritz but some of the tests are at least questionable (checking ("foo" but C) ~~ A)), and another one is segfaulting too
and then there's the wonderful rt.perl.org/rt3/Ticket/Display.html?id=112908 09:56
which this file also uncovered
masak oh hai #perl6 09:57
\o/
jnthn r: enum day <a b c d e>;say day(3) === d; "foo" but d; say "alive"; "foo" but day(3) 09:58
p6eval rakudo 2ac569: OUTPUT«True␤alive␤Type check failed in assignment to '$!day'; expected 'day' but got 'Int'␤ in block <anon> at src/gen/CORE.setting:650␤ in method BUILD_LEAST_DERIVED at src/gen/CORE.setting:637␤ in sub infix:<but> at src/gen/CORE.setting:10579␤ in block <anon> at /tm…
jnthn r: enum day <a b c d e>;say day(3) === d; "foo" but d; say "alive"; "foo" but day(b)
p6eval rakudo 2ac569: OUTPUT«True␤alive␤»
09:58 localhost left
jnthn moritz: Remember that "foo but some-role(bar)" is a special form. 09:58
masak is logging in from the backseat of a car! 09:59
moritz jnthn: but day isn't a role
jnthn er, s/role/type
masak this is awesome! but slow.
jnthn But the compiler is still doing the transform, anyways.
isBEKaml this github UI keeps changing. What's up with github these days? 10:00
10:00 localhost joined
moritz r: enum day <a b c d e>;say day(3) === d; say ("foo but (my $ = day(3)) 10:00
p6eval rakudo 2ac569: OUTPUT«===SORRY!===␤Non-variable $ must be backslashed at line 1, near "$ = day(3)"␤»
moritz r: enum day <a b c d e>;say day(3) === d; say ("foo but (my $x = day(3))
p6eval rakudo 2ac569: OUTPUT«===SORRY!===␤Variable $x is not declared␤at /tmp/DD5gtSDwaY:1␤»
jnthn Missing quote
moritz r: enum day <a b c d e>;say day(3) === d; say ("foo" but (my $x = day(3))
p6eval rakudo 2ac569: OUTPUT«===SORRY!===␤Redeclaration of symbol $x␤at /tmp/jE2opvCVxm:1␤»
moritz takk
eeks
isBEKaml wtf?
moritz r: enum day <a b c d e>; my $x = day(3); say "foo" but $x
p6eval rakudo 2ac569: OUTPUT«foo␤» 10:01
isBEKaml where did the redeclaration come from?
moritz isBEKaml: from a misguided backtracking, probably
jnthn An issue that's already in RT...it's..yes, backtracking.
I dunno where.
I'm hoping it will magically go away when qbootstrap arrives. :)
10:02 xinming_ left
jnthn moritz: Anyway, the problem with "but day(3)" I guess is where to put the coercion. 10:03
10:06 dbr joined
jnthn tries a possible patch 10:07
Seems to work 10:24
10:27 JimmyZ joined
dalek kudo/nom: 9c85a3b | jnthn++ | src/core/operators.pm:
When mixing in an enumeration and supplying an initialization value, we should also apply coercion if needed, so day(2) works as well as day(tue).
10:29
10:32 spider-mario joined 10:34 isBEKaml left
jnthn moritz: ^^ should deal with #112908 10:41
10:41 thou left
spider-mario why does True ^^ True return Nil instead of False? 10:53
(or is it precisely what #112908 is about?)
10:54 PacoAir joined
jnthn huh? 10:55
#112908 is about enums
spider-mario ok 10:56
but shouldn’t True ^^ True be False? 10:57
just like False ^^ False
it seems to produce Nil, currently
r: say (False, True X^^ False, True).perl 10:58
p6eval rakudo 32b173: OUTPUT«(Bool::False, Bool::True, Bool::True).list␤»
spider-mario r: say (True ^^ True).perl 10:59
p6eval rakudo 32b173: OUTPUT«Nil␤»
11:00 whiteknight joined, whiteknight is now known as Guest28866
colomon spider-mario: what should 45 ^^ True return? 45 ^^ 23 11:00
?
spider-mario False, I guess 11:01
colomon r: say (45 ^^ False).perl
p6eval rakudo 32b173: OUTPUT«45␤» 11:02
spider-mario I’m sorry, I fail to see your point
colomon ^^ isn't an operation that returns Bool 11:03
It returns one of its arguments when possible
spider-mario the spec says: “Returns Bool::False otherwise (when more than one argument is true).”
not “Nil”
colomon perl6: say 45 ^^ 23 11:04
p6eval rakudo 32b173: OUTPUT«Nil␤»
..niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/E1YSLxL6K2 line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65)…
..pugs: OUTPUT«␤»
colomon perl6: say (45 ^^ 23).perl
p6eval rakudo 32b173: OUTPUT«Nil␤»
..niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/0NBCKHTnQr line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65)…
..pugs: OUTPUT«Bool::False␤»
spider-mario n: say (True ^^ True).perl 11:05
p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/0UIAjgMXOy line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65)…
colomon I suspect you've found a bug in the spec.
but I admit I'm not familiar enough with that corner of it to be sure. 11:06
11:07 mdupont left
dalek blets: de4db14 | isBEKaml++ | docs/tablet- (2 files):
language cleanups and spurious wordings.

  * I'm not sure we need buzzword lingo when talking about perl6
  * WIP - with tablet 2.
11:13
blets: 68aef27 | isBEKaml++ | docs/tablet-2-basic-syntax.txt:
[tablets] round 2
blets: b5f516d | isBEKaml++ | / (13 files):
merges from master
blets: 5c61f5d | isBEKaml++ | docs/tablet-2-basic-syntax.txt:
more corrections.
blets: 43c8bc0 | (Herbert Breunung)++ | docs/tablet- (2 files):
Merge pull request #9 from svatsan/svatsan

thank you very much
11:20 crab2313 left
moritz \o/ commits 11:20
moritz just had lunch. Asparagus. Very tasty :-) 11:22
11:22 goraki joined
moritz later: mango and strawberrys 11:22
and then cake 11:23
phenny: "rhabarberstreuselkuchen"?
phenny moritz: "rhubarb crumble" (de to en, translate.google.com)
dalek blets: 3025a94 | (Herbert Breunung)++ | docs/tablet-2-basic-syntax.txt:
small fixes
blets: 7cd6b8f | (Herbert Breunung)++ | docs/tablet- (2 files):
Merge branch 'master' of github.com:perl6/tablets
moritz hm, not quite, but close
jnthn mmm..crumble :)
moritz phenny: "streuselkuchen"?
phenny moritz: "streusel" (de to en, translate.google.com)
goraki I just entered to see "mango and strawberries, and then cake"
now I'm hungry...
jnthn goraki: I'm currently frying some bacon... 11:24
:P
diakopter o/
moritz goraki: well, that's my food plan for today. But I'm not hungry at all right now, having just had lunch
goraki jnthn: yeah, you're not helping.
and I just finished breakfast.
but I think we're in the same timezone.
moritz there's a well-known recipe against hunger :-)
jnthn hi, diakopter o/ 11:25
goraki eating again?
moritz goraki: yes
diakopter I should eat,but it's almost time to wake up.. I mean... go to bed. 11:26
moritz r: enum Day <Mon Tue Wed>; ("Today" but Tue).Tue 11:27
p6eval rakudo 9c85a3: OUTPUT«Method 'Tue' not found for invocant of class 'Str+{<anon>}'␤ in block <anon> at /tmp/waoA_5cgw7:1␤␤»
11:28 drschumtzenberg left
dalek ast: 1a88785 | moritz++ | S12-enums/pseudo-functional.t:
fix one test, and remove two wrong ones
11:29
moritz jnthn: that test file now segfaults after test 4 here
r: enum Day <Mon Tue Wed>; ("Today" but day(Tue)).Tue 11:30
p6eval rakudo 9c85a3: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&day' called (line 1)␤»
moritz r: enum Day <Mon Tue Wed>; ("Today" but Day(Tue)).Tue
p6eval rakudo 9c85a3: ( no output )
moritz r: enum Day <Mon Tue Wed>; so ("Today" but Day(Tue)).Tue
p6eval rakudo 9c85a3: ( no output )
moritz hm
not so easy to reduce, it seems
jnthn Hm :/ 11:31
diakopter what's the full one?
moritz diakopter: S12-enums/pseudo-functional.t after test 4
ok $x.Tue, 'day(Tue).Tue';
oh no 11:32
it segfaults in the test before
r: enum Day <Mon Tue Wed>; so Day("Today" but Day(Tue))
p6eval rakudo 9c85a3: OUTPUT«(signal SEGV)»
moritz there ya go
jnthn wtf does that even mean... 11:33
r: enum Day <Mon Tue Wed>; Day("Today" but Day(Tue)) 11:34
p6eval rakudo 9c85a3: ( no output )
jnthn r: enum Day <Mon Tue Wed>; say Day("Today" but Day(Tue)).WHAT
p6eval rakudo 9c85a3: OUTPUT«Can only use get_what on a SixModelObject␤ in block <anon> at /tmp/y6uN4fsnjm:1␤␤»
diakopter r: enum Day <Mon Tue Wed>; say ("Today" but Day(Tue)).WHAT 11:35
p6eval rakudo 9c85a3: OUTPUT«Str+{Day}()␤»
jnthn r: say ("Today" but Day(Tue)).WHAT
p6eval rakudo 9c85a3: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Tue' called (line 1)␤Undefined routine '&Day' called (line 1)␤»
diakopter r: enum Day <Mon Tue Wed>; say ("Today" but Day(Tue)).perl
p6eval rakudo 9c85a3: OUTPUT«"Today"␤»
diakopter r: enum Day <Mon Tue Wed>; say ("Today" but Day(Tue)).WHAT
p6eval rakudo 9c85a3: OUTPUT«Str+{Day}()␤»
moritz jnthn: ah, I guess I know what's wrong
jnthn moritz: OK... afk for 10 mins or so 11:36
moritz jnthn: we return %!vales_to_enum{$value} from that
and it's a parrot hash
so it returns Undef if there's no such key
dalek blets: 6ec44f3 | (Herbert Breunung)++ | docs/tablet-2-basic-syntax.txt:
slash has to be before space;spidermario++
11:41
jnthn moritz: oh...that 'splains it 11:44
11:51 birdwindupbird joined 11:53 amkrankruleuen joined 11:54 snearch joined
dalek kudo/nom: f4837f5 | moritz++ | src/Perl6/Metamodel/EnumHOW.pm:
in value_to_enum, return the type object instead of parrot Null on lookup failure
11:56
ast: 5c7bb81 | moritz++ | S12-enums/pseudo-functional.t:
fix another enum test
11:57
kudo/nom: bdc4bb8 | moritz++ | t/spectest.data:
run the last remaining enum test file
11:58
jnthn ooh :)
moritz++
dalek atures: 4e735a4 | moritz++ | features.json:
give rakudo the green light on enums
moritz r: enum A <b c b>; 11:59
p6eval rakudo 9c85a3: ( no output )
moritz that one still needs to die
I might get to that later today
jnthn ok :)
moritz: What does "use" need in order to get the green light?
moritz: Versioned modules has a separate entry, so I guess not that...
moritz after that, maybe I should revisit typed exceptions 12:00
jnthn: I guess we can make it green too
it's not macroish yet, but I guess that's OK
jnthn Yeah, at the moment the yellowness reason is "limited import lists". But we support all the tagged stuff...
moritz and might even deserve a second entry at some point
jnthn Well, that's more about dynamic exportation than "use".
moritz and we even support positional arguments to use 12:01
jnthn Right. :)
moritz r: use lib 'foobar'; say @*INC;
p6eval rakudo 9c85a3: OUTPUT«foobar /home/p6eval/.perl6/lib /home/p6eval/nom-inst2/lib/parrot/4.3.0-devel/languages/perl6/lib␤»
jnthn \o/
tadzik \o/ 12:02
icwiener Hmm. 12:04
r: my $source = "xyz"; say $source.rindex("a").WHAT; 12:05
p6eval rakudo 9c85a3: OUTPUT«Failure()␤»
icwiener r: my $source = "xyz"; say $source.index("a").WHAT;
p6eval rakudo 9c85a3: OUTPUT«Str()␤»
icwiener Is it intended that they return different things?
jnthn Looks odd to me. 12:11
moritz probably an artifact of loose speccing 12:16
and easy to fix
icwiener Just a stupid question: Would it be possible (and feasible) to have index() evaluate to true/false in boolean contex? 12:18
12:20 mucker joined
moritz icwiener: well, functions don't know their context 12:20
icwiener: so one could return '0 but True' or something
icwiener Hmm, ok. So .defined is the way to go with index when used in boolean context? 12:22
moritz iirc the specs says that it should return a StrPos object, which tracks things like byte, code point and grapheme indexes
icwiener: yes
icwiener moritz: Ok, thanks. 12:23
And yes, Spec says, it returns StrPos.
moritz jnthn: any chance you can fix the roles + precompilation fix before the rakudo release on Thursday?
well, we could just cheat
Timbus i think relying on '0' in boolean context is a bit of a C thing to do. it has its uses but really now
phenny Timbus: 30 Apr 15:15Z <masak> tell Timbus I tried to use Net::IRC but gist.github.com/2559145
Timbus waah
jnthn moritz: Should be able to.
Timbus someone used my code O_o 12:24
moritz and have an class StrPos is Int { multi method Bool(StrPos:D:) { True } }
jnthn moritz: I already figured out what's going on.
moritz jnthn: ah right, I remember, OwnedList or so required
jnthn moritz: Yeah 12:25
This week is fairly light $dayjob wise, and it ain't a huge task. I should be able to have it in before the release.
icwiener moritz: I I do not understand what you mean by that. 12:26
... in case that was meant for me. ;)
moritz icwiener: partially 12:27
icwiener: what I proposed was simply an object that is just like an Int, except that it evalutes to True in boolean context even if its 0
icwiener moritz: Sounds confusing. :) 12:29
12:31 snearch left 12:35 mdupont joined
Timbus okay so um, how do you set public attributes in BUILD these days 12:35
tadzik r: class A { has $.b; submethod BUILD { $!b = 7 } }; A.new.b.say 12:36
p6eval rakudo bdc4bb: OUTPUT«7␤»
tadzik on the other hand...
Timbus wait what
tadzik r: class A { has $.b = 4; submethod BUILD { $!b++ } }; A.new.b.say # won't work
p6eval rakudo bdc4bb: OUTPUT«1␤»
tadzik r: class A { has $.b = 4; submethod BUILD(:$!b) { $!b++ } }; A.new.b.say # should work 12:37
p6eval rakudo bdc4bb: OUTPUT«1␤»
tadzik eek
Timbus i uh. alright.
tadzik disregard the last one, I never know how to use that one
jnthn You can't refer to virtual stuff in a submethod. 12:38
$.b is $(self.b)
tadzik I don't think I did
jnthn tadzik: I explaining to Timbus :)
tadzik okay :)
so how do I use something like the above? 12:39
that works when the user supplies $!b 12:40
r: class A { has $.b = 4; submethod BUILD(:$!b) { $!b++ }; A.new(b => 12).b.say
p6eval rakudo bdc4bb: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
tadzik r: class A { has $.b = 4; submethod BUILD(:$!b) { $!b++ } }; A.new(b => 12).b.say 12:41
p6eval rakudo bdc4bb: OUTPUT«13␤»
jnthn tadzik: Like that - as a named :)
Timbus on to my next problem: why do default values override what I pass to new, if i have a submethod BUILD
12:41 mdupont left
tadzik jnthn: hmm, but how to make it work using the defaults? 12:41
Timbus do i really need to handle everything in BUILD
tadzik maybe I can't 12:42
jnthn Timbus: Yes, if you're not using the default BUILD
Timbus oh
jnthn Timbus: But you can list them is the signature rather than doing assignments to them all
Like tadzik just showed
:$!attr1, :$!attr2 ... 12:43
Timbus i tried typing words to express my feelings about this but here is a summary: :I 12:44
tadzik :) 12:46
12:51 sergot joined
sergot hi! o/ 12:51
12:51 raiph joined 12:52 tyatpi joined
moritz \o sergot 13:02
r: say (1/10000000000).base(3)
p6eval rakudo bdc4bb: OUTPUT«0.0000000000000000000010␤»
moritz r: say :3<0.0000000000000000000010> 13:03
p6eval rakudo bdc4bb: OUTPUT«0.000000000096␤»
13:03 birdwind1pbird joined
Timbus Cannot call 'said'; none of these signatures match: 13:14
:(Net::IRC::Modules::Tell , $ev, Mu *%_)
in method dispatch:<.*> at src/gen/CORE.setting:839
well.. yeah?
i thought that was the point of .*
13:15 cognominal_ left
Timbus man domt tell me .* was re-specced 13:15
13:15 cognominal joined
Timbus because that would pretty much ruin all of the things i did in perl 6 D: 13:16
13:22 Ulti joined
Ulti out of interest is any of the perl6 regex/grammar stuff inspired by TXL? 13:23
13:25 birdwindupbird left
Timbus phenny, tell masak I fixed the bot. It's still broken though (because the `.*` style method call dies if nothing matches). Thanks for letting me know. 13:27
phenny Timbus: I'll pass that on when masak is around.
13:37 goraki left
raiph Timbus: what did u think was the point of ".*" ? 13:42
Timbus: if you want to call whatever methods match, and still succeed if none do, that's ".?"
13:42 birdwind1pbird left
raiph Timbus: (iirc) 13:43
Timbus i want to call all of them if there's more than one 13:44
otherwise, .* and .+ are the same thing? 13:45
raiph Timbus: i'm wrong 13:46
Timbus in which case that means . and .? now just call every match i gue oh okay nevermind then 13:47
moritz r: class A { }; A.*foo() 13:59
p6eval rakudo bdc4bb: ( no output )
moritz r: class A { }; A.*foo(1, 2, :someargs)
p6eval rakudo bdc4bb: ( no output )
Timbus r: class A { multi method foo(){} }; A.*foo(1, 2, :someargs) 14:00
p6eval rakudo bdc4bb: OUTPUT«Cannot call 'foo'; none of these signatures match:␤:(A , Mu *%_)␤␤ in method foo at src/gen/CORE.setting:310␤ in method dispatch:<.*> at src/gen/CORE.setting:839␤ in block <anon> at /tmp/1P723aSDhZ:1␤␤»
14:03 isBEKaml joined
isBEKaml Sharkey, #perl6! 14:03
14:04 adu joined 14:12 icwiener left 14:16 icwiener joined 14:17 tyatpi left
isBEKaml spider-mario++ #spotting mistakes! 14:22
spider-mario :)
moritz \o spider, shark and all the other animals here 14:40
isBEKaml moritz: it's a jungle! ;) 14:42
14:42 spider-mario left
isBEKaml o.O(er, shark in a jungle?) 14:43
14:43 Celelibi left
moritz river sharks in the jungle! 14:44
r: say 0.base(2)
p6eval rakudo bdc4bb: OUTPUT«0␤»
dalek ast: 259bfe3 | moritz++ | S32-num/base.t:
test 0.base(2), RT #112872
14:47
geekosaur sharkū? 14:48
14:50 tokuhirom left, tokuhirom joined 14:55 mucker left, tokuhirom left, adu left 14:56 adu joined
isBEKaml geekosaur: LOTR? :D 14:58
geekosaur yep
isBEKaml geekosaur: well, we're not Orcs, are we? :) 15:03
and there's no grey wizard. Only white cloaks. :)
15:06 Celelibi joined
masak lol shark, #perl6. 15:07
phenny masak: 13:27Z <Timbus> tell masak I fixed the bot. It's still broken though (because the `.*` style method call dies if nothing matches). Thanks for letting me know.
masak hm, .* shouldn't die if nothing matches.
Timbus: we're planning to use the bot as part of a demonstration of Perl 6 for non-Perl programmers in Bristol next week.
r: class A {}; A.new.*foo; say "alive" 15:08
p6eval rakudo bdc4bb: OUTPUT«alive␤»
moritz maybe it's some dependent stuff that fails?
masak mebbe. 15:09
Tene: yes, I'm familiar with your experiences with Parrot interop. I was mostly expressing my surprise that others hadn't rushed in to realize that dream (since it seems to be central to Parrot). 15:11
jnthn masak: Looking at the backlog...it's this: 15:12
r: class A { multi method foo(){} }; A.*foo(1, 2, :someargs)
p6eval rakudo bdc4bb: OUTPUT«Cannot call 'foo'; none of these signatures match:␤:(A , Mu *%_)␤␤ in method foo at src/gen/CORE.setting:310␤ in method dispatch:<.*> at src/gen/CORE.setting:839␤ in block <anon> at /tmp/8kVM77IRVD:1␤␤»
jnthn Of course, since the spec changed on multis to the proto-controls model, .* only applies to the MRO search. 15:13
15:13 Guest28866 left
masak hm. 15:14
why do people think RT sucks? once you get over the search interface being wonky and alien, it's not that bad.
15:14 kaare_ left
Tene masak: agreed; the lack of interest has surprised me too. 15:15
jnthn masak: I don't think RT sucks, fwiw :) 15:16
masak \o/ 15:19
15:21 shinobicl joined
Tene masak: a few people have expressed the feeling that language interop isn't as desirable without first having sufficiently good languages, so they're focusing on that instead. 15:29
masak well, yes and no. 15:30
we can't pretend that language interop would layer nicely on top of the sufficiently good languages once they're in place. 15:31
it'd have to be iterated, just like everything else.
Tene I certainly agree.
There's also the issue of directing volunteer effort; nobody has personally decided that their time would be best used on language interop. 15:33
masak oh, sure. 15:34
but that's still odd considering the way Parrot was imagined.
like a cross-dynlang VM. 15:35
Tene: you're the only person I know who ever tried making that happened. and as I understand, you stopped when your stuff broke due to upstream changes in Parrot. 15:36
Tene masak: after the third time it broke, and I felt like nobody else cared and got rather burned out.
Specifically, I added language interop stuff to PCT (or whatever it was named then), and there were several large refactors that just dropped language interop on the floor. 15:38
15:38 Celelibi left
Tene It might have gone better if I had managed to get language smoke testing or something like it. 15:39
masak aye. 15:42
Tene these days things are further complicated by 6model; if 6model ever gets integrated into parrot, I might reconsider trying it again.
I've talked with three or four people with interest in working on language interop, but they've never followed up. 15:43
adu Tene: is 6model part of NQP?
JimmyZ and everybody want 6model in parrot, but nobody pick it up.
moritz yes
15:44 Celelibi joined
isBEKaml are there perl6 folks working on parrot too? or is it the other way round? 15:46
or neither? :|
moritz some of the rakudo hackers occasionally implement/fix stuff in parrot when needed
and some people like benabik++ mostly focus on parrot, and occasionally contribute to rakudo 15:47
tadzik and Parrot hackers sometimes submit patches for incompatibile Parrot changes
moritz but mostly it's just what tadzik++ says
benabik whiteknight said he'd work on 6model/Parrot integration this summer.
isBEKaml okay, the reason I asked this was, if there were regulars on parrot and perl6, they could push for integration on either side.
benabik: it's summer! :D 15:48
benabik isBEKaml: Indeed it is.
moritz isBEKaml: well, the parrot folks are very much interested in integrating 6model
isBEKaml benabik: I have said this before, I guess - parrot seems to be working out of an echo chamber. I used to see a lot of news from parrot side of things, but now it's almost nothing. 15:49
benabik: the blogosphere is nearly empty except for occasional posts from whiteknight.
benabik isBEKaml: Parrot's trying to work on some hard problems and we're down to only three or four main devs, none of whom can put a lot of time into it. 15:50
isBEKaml :(
benabik isBEKaml: Whiteknight is definitely the most productive blogger, yes. I'm better with code than English.
isBEKaml: Yes, it's sad. What irritates me the most is the number of people who complain about it rather than come help us. 15:51
We've had several new language people show up recently, which is nice. Hope they stay around past their initial poking around.
isBEKaml benabik: I could if I can - but there'd be some amount of handholding involved since it's been quite a _long_ time I did some C coding.
15:52 mucker joined
benabik isBEKaml: Parrot's codebase is a somewhat unique beast. But we're more than happy to help someone learn it. 15:52
15:52 JimmyZ left
isBEKaml benabik: I'm mostly irritated that rakudo is a _slow_ beast on parrot. If parrot side of affairs are sped up, rakudo benefits the most! 15:52
benabik: and I can't even build it on my machine. :/ 15:53
benabik isBEKaml: What's the problem getting it to build? 15:54
isBEKaml benabik: space/memory issues. I'm talking about rakudo, not parrot. 15:55
I can build parrot fine, though it takes some time.
15:58 goraki joined
isBEKaml benabik: I'll do some reading on parrot first. You should be hearing from me soon. (unique beast or not) 15:58
benabik isBEKaml: Excellent. </burns>
16:24 crab2313 joined 16:25 Araq joined
adu does 'grammar' define a package? 16:25
jnthn Yes, module/class/grammar/role are all kinds of package. 16:26
moritz in fact, 'grammar' just introduces a class that inherits from the class Grammar 16:30
jnthn Cursor, innit? 16:31
r: say (grammar Foo { }).^mro
p6eval rakudo bdc4bb: OUTPUT«Foo() Grammar() Cursor() Any() Mu()␤»
moritz so a grammar can has attributes, you can instantiate it
jnthn Heh. :)
moritz++
moritz compose roles into it etc.
jnthn++ implemented it :-)
jnthn Apparently :P
GrammarHOW is a subclass of ClassHOW, that just diddles the default parent. I think that's the only difference. 16:32
adu so grammar < class < module < package 16:33
16:33 TimToady left, TimToady joined
adu jnthn++ 16:34
16:34 mst joined
adu karma jnthn 16:34
aloha jnthn has karma of 2613.
adu wow
mst dear gentlemen: please note that if Mr. Wall shows up without the @perl/timtoady from now in, it means somebody needs to tell him that his nickserv auto-login broke again :) 16:35
adu karma moritz
aloha moritz has karma of 3146.
mst uh, s/dear gentlemen/dear gentlepeople/
eh, you knew what I meant
ta
16:35 mst left
jnthn adu: In terms of what they're capable of, you can kinda see it that way. 16:36
adu: Under the hood though, the meta-objects implementing them don't have an inheritance relationship. 16:37
adu: It's factored in terms of roles instead.
It's quite pretty. :)
adu :) 16:38
16:40 amkrankruleuen left
sorear good * #perl6 16:49
good * #perl6 16:50
adu yey 16:51
that was easy: pastebin.com/raw.php?i=qnUB2Gpg
jnthn o/ sorear 16:52
TimToady p6: lines».trans('a..m' => 'n..z', 'n..z' => 'a..m').say 16:56
p6eval pugs: OUTPUT«*** No such subroutine: "&lines"␤ at /tmp/R1Ubtu0XSN line 1, column 1 - line 2, column 1␤» 16:57
..niecza v17-4-ge5b869e: OUTPUT«Lnaq qre Bretr, Lnaq nz Sgebzr, Lnaq qre Äpxre, Lnaq qre Dbzr, Lnaq qre Häzzre, mhxhasgfervpu! Hrvzng ovfg qh tebßre Söuar, Vbyx, ortanqrg süe qnf Spuöar, ivrytreüuzgrf Öfgreervpu, ivrytreüuzgrf Öfgreervpu! Hrvß hzsruqrg, jvyq hzfgevggra yvrtfg qrz Eeqgrvy…
..rakudo bdc4bb: OUTPUT«Lnaq qre Bretr, Lnaq nz Sgebzr, Lnaq qre Äpxre, Lnaq qre Dbzr, Lnaq qre Häzzre, mhxhasgfervpu! Hrvzng ovfg qh tebßre Söuar, Vbyx, ortanqrg süe qnf Spuöar, ivrytreüuzgrf Öfgreervpu, ivrytreüuzgrf Öfgreervpu! Hrvß hzsruqrg, jvyq hzfgevggra yvrtfg qrz Eeqgrvy qh vazv…
TimToady you don't need an explicit loop :)
17:01 kaare_ joined 17:04 isBEKaml left
adu is there an unlines method? 17:05
17:05 shinobicl left
adu or join('\n')? 17:08
17:11 paul1234 left
adu can I do that with fmt? 17:13
17:13 shinobicl joined
adu @x.fmt(:separator('\n'))? 17:13
17:14 shinobicl left
goraki r: say [1, 2, 3, 4].join("<rabbits>"); 17:14
p6eval rakudo bdc4bb: OUTPUT«1<rabbits>2<rabbits>3<rabbits>4␤»
goraki adu: the same thing works for a newline.
adu I don't see that in perlcabal.org/syn/S32/Str.html 17:15
p6: say "uv\njbeyq".trans('a..m' => 'n..z', 'n..z' => 'a..m'); 17:16
p6eval pugs, rakudo bdc4bb, niecza v17-4-ge5b869e: OUTPUT«hi␤world␤»
adu TimToady: I guess you're right
17:21 adu left
Araq multi method samecase ( Str $string: Str $pattern --> Str ) is export # ':' a separator for parameters? 17:25
moritz phenny: tell aduo that .join is a method on lists, not strings, so it won't appear in S32::Str 17:26
phenny moritz: I'll pass that on when aduo is around.
gfldex Araq: the colon in that spot "unhides" the hidden parameter any method will get that holds the reference to the object (self) 17:27
moritz phenny: tell adu that .join is a method on lists, not strings, so it won't appear in S32::Str 17:28
phenny moritz: I'll pass that on when adu is around.
moritz it helps to spell the name right :-)
Araq and parameters are separated by whitespace only?
moritz no, by comma 17:29
gfldex Araq: by , or ; (latter for slices)
moritz r: sub f($x, $y) { say $x * $y }; f(42, 23)
p6eval rakudo bdc4bb: OUTPUT«966␤»
Araq Str $string: Str $pattern --> Str # no , or ; here 17:30
moritz well yes, the invocant is delimited with a colon, as gfldex explained 17:31
and --> Str is just the type of the return value
but if you want more "normal" parameters, you delimit them with commas
Araq so it's either , or ; or : ? 17:32
gfldex no, the : is a special case as is the ;
moritz Araq: yes, basically 17:33
gfldex there is further a special special case where you need ;;
moritz don't go there :-) 17:34
I've never need that, and I've been coding p6 for several years
Araq so the "I want this explicit" marker is also a separator
17:35 dx_ joined
gfldex yes 17:35
are longname parameters implemented?
Araq ok, so when would I need ;; ?
17:35 dx_ left
moritz Araq: if you want to exclude parameters from participating in multi dispatch decisions 17:36
Araq and I guess they would follow after ;; then?
moritz see S06
yes
Araq so sub f($a, $b) is the same as multi method f(: ;; $a, $b) ? 17:37
gfldex no 17:38
Araq why not?
gfldex mostly because not providing an invocant in front of a : is illegal
and that you don't let it take part in MMD does not mean it's not a multi 17:39
there will be some proto somewhere autogenerated
Araq MMD = "multi method ?" 17:40
"dispatch"?
gfldex yes
whereby it does not have to be a method, a sub can have MMD too
it's a lack-of-better-name-problem
Araq so how would a sub participate in MMD? 17:41
jnthn We should really just call it multiple dispatch because it's orthogonal to method dispatch even when it is a multi-method.
gfldex r: multi sub f(Str $s){ say $s }; multi sub f(Int $i){ say $i }; say 10; say "hello"; 17:42
p6eval rakudo bdc4bb: OUTPUT«10␤hello␤»
gfldex r: multi sub f(Str $s){ say $s }; multi sub f(Int $i){ say $i }; f 10; f "hello"; # silly me 17:44
p6eval rakudo bdc4bb: OUTPUT«10␤hello␤»
gfldex goes for a nice cup of tea
Araq so "multi" means dynamic dispatch? 17:45
and "sub" means "no self/this" whereas "method" means "with self/this"?
gfldex sub don't got a self indeed
jnthn Araq: Yes, that's a fairly good summary...depending on your definition of dynamic dispatch ;) 17:46
gfldex and the dynamic dispatch is kinda build in, in a dynamic language
r: sub f(){ say "boooring" }; &f.wrap({ say 'tricked you!'}); f
p6eval rakudo bdc4bb: OUTPUT«tricked you!␤»
Araq what if module A has a sub f and so does module B; and both modules are imported 17:48
what would f() invoke?
gfldex the compiler should complain when you import
Araq ok
what if both are "multi sub"s?
gfldex then the first multi that got a full match on the provided signature wins 17:49
17:49 alim joined
gfldex don't ask me about order, they may or may not be any 17:49
Araq what does "first" mean here?
jnthn If a couple of multis are imported from different modules, they are just subject to the usual multi-dispatch rules. 17:50
And if they have the same signatures, the dispatch will fail due to ambiguity.
Araq ok
17:51 cogno joined
jnthn wanders off to make some dinner 17:52
17:52 cogno left 17:54 thou joined 17:55 spider-mario joined 17:59 cogno joined 18:11 alim left 18:12 birdwindupbird joined 18:13 cogno left
dalek blets: d1d65de | (Herbert Breunung)++ | docs/appendix-f-faq.txt:
short faq answer for:"why is it called perl"
18:13
18:18 sisar left 18:34 sporous left 18:35 crab2313 left 18:36 sporous joined 18:43 adu joined 18:44 goraki left 18:57 crab2313 joined 19:16 adu left
moritz meh 19:19
I just spend half an hour chasing a dispatch failure in IO::Prompter
diakopter ?
moritz and it turns out the reason was
a parameter Bool :$someName = sub { False }
well, if you leave out that parameter, the candidate fails to bind. Thank you very much! 19:20
dalek kudo/nom: aeca2f8 | moritz++ | src/Perl6/Actions.pm:
fix a typo
ast: 840bfda | moritz++ | S32-exceptions/misc.t:
test for X::Signature::NameClash
19:21
19:24 wolf2k_away joined, wolfman2000 left, wolf2k_away is now known as wolfman2000
Araq what does the :$ sigil mean? 19:26
moritz there is no :$ sigil
:$foo means that $foo is a named parameter
Araq Bool :$someName = sub { False } # well?
moritz Araq: see perlcabal.org/syn/S06.html 19:27
Araq sorry the spec assumes deep perl 5 knowledge and is full of jargon ... 19:29
so it's quicker to ask here
19:34 mucker left
moritz so if we want to motivate you to read the specs, we should be slower to answer? :-) 19:40
Araq search the spec for "sigil" 19:47
a list of them is nowhere to be found 19:48
19:48 wolfman2000 left
Araq and to answer your question: it motivates to search in the spec ;-) 19:49
not to actually read it
though I must admit that it is amusing 19:50
"Leftover named arguments can be slurped into a slurpy hash." 19:51
dalek p/PackfileView: d3a9cc2 | diakopter++ | / (5 files):
whiteknight's PackfileView patch, with whitespace and stage0 changes removed
19:53
diakopter ^^ make test succeeds
jnthn diakopter: make test in nqp? 19:54
diakopter yes
jnthn suspects it may be worth a Rakudo build/spectest run atop of that.
diakopter didn't try rakudo
jnthn OK
diakopter k I'll work on that
jnthn Thanks :) 19:55
Araq wonders what the 'slurpy hash's sigil would look like ... ()===%
diakopter jnthn: well, that was a fail 20:00
moritz yes, rakudo needs a patch too 20:01
Araq: hashes have the % sigil
Araq: and slurpies are marked with *
diakopter: whiteknight did a partial patch for rakudo, but another file needed a patch too
diakopter which other file? 20:02
Araq *%slurp ?
or %
%*slurp ?
moritz diakopter: the module loader, iirc
jnthn *%slurp
Araq is the * narrowed for hash access? 20:03
*$slurp{'x'} ?
oh wait
% is kept for hash access in perl6, right? 20:04
moritz right 20:08
Araq so is it *%slurp{'x'} or %slurp{'x'} ? 20:09
20:10 PacoAir left
jnthn It's %slurp{'x'}. The * is nothing to do with the variable. It's an instruction to the signature binder to put all of the leftover named parameters into the hash that follows it. 20:10
20:11 fgomez joined
Araq well the thing got its own name ("slurpy hash") so I was misguided 20:11
though I guess it would have been "slurpy-hash" then 20:12
20:13 Chillance joined 20:17 libertyprime left, az5112 joined 20:22 fgomez left, kaare_ left 20:25 thou left 20:26 raiph left 20:29 libertyprime joined
diakopter moritz: let's say I have a commit to my fork of rakudo on github. how easy is it for someone working in the main rakudo nom branch to apply that patch? 20:34
someone needs to make a parallel make spectest 20:35
jnthn diakopter: I do a 6-way. 20:36
diakopter: But it's not the default...gotta pass --jobs or something 20:37
diakopter ohh
moritz or anyone ^^ 20:38
jnthn diakopter: Oh, and on the patch, it'd be "git remote add diakopter the-github-url" and then fetch. And then the patch can be applied. 20:41
benabik `git fetch <URL> <branch>` will store it in FETCH_HEAD 20:42
jnthn oooh :)
diakopter well, the commit dalek mentioned above and this one comprise whiteknight's patches to nqp&rakudo for PackfileView. one or both need work, because there are *tons* of rakudo spectest failures. github.com/diakopter/rakudo/commit...fe18b5f5c9 20:45
Araq "Note that all routines are (by default) considered to be candidates for inlining and constant folding. The optimizer is allowed to start making these optimizations after the main program's CHECK time, but not before. After any routine is "hard" inlined or constant folded, it is explicitly retyped as immutable; any attempt to wrap an immutable routine will result in failure of the wrap call....
...An immutable routine is so marked by recasting to type HardRoutine, a subclass of Routine."
what does that mean?
that the implementation is allowed to freeze routine definitions for optimization purposes?
jnthn Seems so :) 20:46
It doesn't seem to set many boundaries for when the implementation is allowed to do that either... :)
...so if you want to be able to wrap a routine, you'd better not make it an inlining candidate! :P
That's potentially a little unfortunate since pretty much every auto-generated proto sub is an inlining candidate... 20:47
Araq so how would one mark a sub to be not freezable? 20:51
jnthn Araq: Dunno. I don't think any of the implementations have tried to implement the bit you just quoted though. 20:52
Araq: And I suspect it needs tweaks. 20:53
geekosaur I think that's one of those bits of spec that was just put out there waiting for someone to try to actually follow it and thereby come up witht he real spec :)
Araq alright, so I'm not the only one who doesn't read the spec :P 20:55
diakopter (see my above) so I'm handing it off someone who knows how to debug it from there... 20:58
jnthn diakopter: OK, thanks. 21:03
Araq p6: sub f(Str %lie) {} 21:05
p6eval niecza v17-4-ge5b869e: OUTPUT«Potential difficulties:␤ %lie is declared but not used at /tmp/5OFXBdddl1 line 1:␤------> sub f(Str ⏏%lie) {}␤ &f is declared but not used at /tmp/5OFXBdddl1 line 1:␤------> sub f⏏(Str %lie) {}␤␤»
..pugs, rakudo aeca2f: ( no output )
Araq p6: sub f(Str %lie) { say %lie{'0'} } f("hi") 21:06
p6eval rakudo aeca2f: OUTPUT«===SORRY!===␤Confused␤at /tmp/NiOA1DgBfd:1␤»
..niecza v17-4-ge5b869e: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/5AyrFP3Lsk line 1:␤------> sub f(Str %lie) { say %lie{'0'} }⏏ f("hi")␤␤Parse failed␤␤»
..pugs: OUTPUT«*** Odd number of elements found where hash expected: VStr "hi"␤ at /tmp/0Kblfwv3ha line 1, column 36 - line 2, column 1␤»
Araq p6: sub f(Str %lie) { say %lie{'0'} }; f("hi")
p6eval rakudo aeca2f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'f' will never work with argument types (str) (line 1)␤ Expected: :(%lie)␤»
..pugs: OUTPUT«*** Odd number of elements found where hash expected: VStr "hi"␤ at /tmp/cztMTaryd_ line 1, column 37 - line 2, column 1␤»
..niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Nominal type check failed in binding '%lie' in 'f'; got Str, needed Associative␤ at /tmp/k8VAtv27Wj line 0 (f @ 1) ␤ at /tmp/k8VAtv27Wj line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤ at /home/…
sorear Araq: can I help? 21:07
Araq trying to figure out how perl handles sigil lies
sorear Str %lie isn't a lie 21:08
Araq why not?
sorear %lie has type Hash[Str]
a hash that can hold Strs
like int foo[40] in C
21:08 NamelessTee left
Araq ah hm 21:09
what's Str $x then? a string string?
sorear just a Str-holding variable.
Araq a scalar string?
sorear I am uncertain what "string string" means
Araq me too :D
so what would a hash[string, int] look like? 21:10
21:12 birdwindupbird left
sorear Hash[Str,Int] is a kind error 21:13
Hash only takes one argument
Araq a hash is a mapping from key to values, so it naturally takes 2 arguments 21:15
diakopter in Perl it's a mapping from Str to values
Araq I see
sorear diakopter: Perl 6 supports non-Str keys 21:16
however, the key type is not reflected in the hash type
Araq and I guess it's a scalar and not a Str anyway?
sorear huh?
where are you getting this 'scalar' thing?
21:16 NamelessTee joined
sorear my Str %foo{Str}; my Str %bar{Int}; # %foo and %bar are both Hash[Str], but they use different kinds of keys. Types are not the whole story 21:17
diakopter that's confusing for someone familiar with Java's Map<,> or .NET's Dictionary<,>
Araq I mean the implicti key type is '$' and not 'Str' 21:19
well I guess that
geekosaur $ sigil isn't a type
Araq what is it then? 21:20
I thought $ == Num|Str|... and others
21:21 geistteufel left
jnthn goes for some rest... 'night o/ 21:21
geekosaur technically it *is* a type, but it's a container type, which is a different kind of thing from a value type such as Num, Str, etc. 21:22
Araq well yes it appears to be a sum type
geekosaur Num, Str, etc. are what you can put inside a container; they say nothing about what the container itself is, though. contrariwise $ says what a container is but nothing about the things it contains
gfldex $ is a marker for the compiler that tells it it's not a function 21:23
Araq still looks like a sum type to me
gfldex it's easier to understand if you think of it what it not is 21:24
diakopter $ can be a function
21:24 bip` joined
gfldex $ can hold a reference to a function 21:24
you can't really touch the thing that is the function (unless you are the runtime) 21:25
diakopter you're being confusing.
Araq lol? if anything it's the sigils that are confusing 21:26
dalek blets: 0bc8303 | (Herbert Breunung)++ | docs/appendix- (2 files):
more links in B and rework the explanation of "slang"
gfldex it's actually quite easy to understand if you speak a language that forces you to capitalise the beginning of nouns 21:27
the capital at the beginning doesn't really make it a noun but it's an indication that helps you a lot to spot one
diakopter gfldex: your distinction of $ holding a reference to a function but not holding a reference to other values is wrong, I think. 21:29
gfldex it's a reference in any case 21:30
but to get a reference to a function you have to ask for one explicitly
diakopter what?
Araq ja ja im Deutschen werden alle Nomen großgeschrieben. Und nu? Wir haben aber $ und % und @ (und weitere) 21:32
und die unterscheiden sich je nach Typ
diakopter gfldex: what do you mean by 'ask for one explicitly'?
gfldex ofc, they do
you take a concept that works and extend it
my $func = &somefunc 21:33
vs. my $o = SomeObject.new;
sorear Araq: $, @, %, and & are grammatical particles that modify the way variable references are compiled. They have essentially nothing to do with types
Araq lol?
diakopter gfldex: what about my $a = sub { }
sorear Araq: given &foo, you can say foo; but if you have $foo, you have to do $foo()
TimToady: we need you 21:34
Araq of course it's about types
gfldex diakopter: you get a reference because you asked for one
21:34 mtk left
Araq otherwise a single $ for "variable" would suffice 21:34
gfldex r: my $a = sub(){ 'lol' }();
p6eval rakudo aeca2f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&sub' called (line 1)␤»
gfldex r: my $a = (sub(){ 'lol' }).();
p6eval rakudo aeca2f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&sub' called (line 1)␤»
gfldex well, in javascript you can do that :) 21:35
diakopter gfldex: wtf are you talking about
gfldex you are not running the function and store the return value but ask for a reference instead
diakopter how is 'my $a = sub { }' not getting a reference to a function? 21:36
gfldex: you are totally misunderstanding everything I've been saying
gfldex that is very well possible
or you could say it politely and assume that you misunderstood me
Araq so if % is a hash, aka map[Str, T] and $ is a Num|Str| ... and @ is an array, how come they have nothing to do with types? 21:37
gfldex % and @ promise an interface, not a type
sorear Because the first half of your sentence is entirely wrong. 21:38
Araq an interface is a type too
maybe not in perl6's lingo
gfldex no it's not, not in perl6
diakopter gfldex: anyway, you could answer my question.
gfldex you don't need an interface because you got late binding 21:39
Araq so what does $ promise? is it an 'atom'?
gfldex diakopter: and what question would that be?
sorear $ promises nothing
Araq and what does @ promise?
diakopter gfldex: how is 'my $a = sub { }' not getting a reference to a function?
sorear @ doesn't "promise" anything either
gfldex diakopter: i never wrote that, did i? 21:40
sorear it just changes the way certain operations are done
for instance, (in niecza), @foo = 1, 2, 3 is rewritten into @foo.LISTSTORE(1, 2, 3)
diakopter gfldex: I asked you what you meant by 'ask for one explicitly', and you gave the &func example. 21:41
gfldex sorear: i don't agree on that not being a promise and believe that there are quite a few other such promises
diakopter: yes, and an anonymous function is another
sorear the biggest difference is with list contexts; if $foo and @foo contain references to the same object, [$foo] and [@foo] are still different, because the @ causes the object to be iterated
gfldex the @ gives you the promise to do something reasonable with my @a; for @a -> {...} 21:42
and i'm quite sure it promises @a.push('some') to work too 21:43
sorear: from the point of view of a language implementator you are right ofc
from the standpoint of a teacher i would not agree 21:44
Araq gimme the "language implementator view" please ;-) 21:45
sorear fine then, Araq is yours. I give up.
diakopter gfldex: my original point was that ' < gfldex> $ is a marker for the compiler that tells it it's not a function' is just plain wrong 21:46
gfldex diakopter: do you know the concept of "lies for children"?
diakopter I know what you mean by that, yes. I think your claim is so completely wrong, it can't fall into that category. 21:47
gfldex is it? 21:48
what if i say: it's not a function but a reference to a function
a function and a reference to a function can't be the same thing, can it?
diakopter that's a false distinction, because the other sigils can't hold "functions as opposed to references to functions"
21:49 crab2313 left
diakopter that's like saying, a truck is distinct from other vehicles because it can't hold continents. 21:50
the other vehicles can't hold continents, so how is that helpful... 21:51
21:53 lestrrat left
Araq well I don't want the "lie for children" 21:53
I'd like to know what the purpose of the sigils is except from some string interpolation 21:54
21:54 lestrrat joined
gfldex Araq: there you go: perlcabal.org/syn/S02.html#Sigils 21:54
Araq "Perl 6 includes a system of sigils to mark the fundamental structural type of a variable: ..." 21:55
so it's about types ...
gfldex no, it's not
a structual type is not a type
a type is an actual object, a structural type is syntax 21:56
r: Str.WHAT.say;
p6eval rakudo aeca2f: OUTPUT«Str()␤»
Araq a green house is no house?
that's news to me
gfldex if you want to be snotty, just tell me and i will kindly ignore you
Araq I'm enjoying this conversation, but I don't want to be snotty 21:57
diakopter they're orthogonal measurements. "type" here is the usual notion in programming languages. "structural type" is "kind of structure"
Araq so is it about contexts? 21:58
diakopter it's more about roles. @ does Positional and Iterable. % does Associative.
Araq and $ ?
& does callable then? 21:59
diakopter I don't think that role has a name... just "reference and dereference" I guess
yes, & is Callable
Araq so can I do $foo{'x'} too?
diakopter let's see.. sec 22:00
gfldex $ is syntax and so is @ and %, but @ & % have some extra meaning on to of that
r: $foo = Hash.new; $foo{'x'} = 10;
p6eval rakudo aeca2f: OUTPUT«===SORRY!===␤Variable $foo is not declared␤at /tmp/BVQ9agnDHj:1␤»
gfldex r: my $foo = Hash.new; $foo{'x'} = 10;
p6eval rakudo aeca2f: ( no output )
gfldex r: my $foo = Hash.new; $foo{'x'} = 10; say $foo.perl;
p6eval rakudo aeca2f: OUTPUT«{"x" => 10}␤»
diakopter niecza: my %a = { a => 2 }; my $b = %a; say $b{'a'} 22:01
p6eval niecza v17-4-ge5b869e: OUTPUT«2␤»
gfldex you can do that because $foo{'x'} is the same then $foo.{'x'} what is defined in a Role
that role is Associative IIRC
being able to obmit the . is syntactical sugar 22:02
perl6 is so sweet :)
diakopter gfldex: did you understand my answer to your question? 22:04
gfldex diakopter: i believe so and we are both wrong
because it's pretty futile to think about it as something that is
in the end it's just text fed to a compiler
it has meaning tho 22:05
Araq so basically $ means "variable" and may be a hash too
gfldex and one of the meanings of sigils is to make a destinction between stuff that is a function and stuff that may not be a function
Araq: you can think like that as long as you don't think about constants 22:06
r: my constant $i = 10; $i = 20;
p6eval rakudo aeca2f: OUTPUT«Cannot assign to a non-container␤ in block <anon> at /tmp/FOo8j5aHlg:1␤␤»
Araq hm yeah well, variable as opposed to "routine" perhaps
r: my $x = sub { 0 }; $x(); 22:07
p6eval rakudo aeca2f: ( no output )
diakopter variables can hold routines!
Araq ok so it basically means nothing at all :-) 22:08
diakopter it just means container
gfldex it means: hey compiler, here comes a name that is no the name of a function. You don't really need to bother what that name is unless you want to give me an error message. 22:09
diakopter but all the other sigils mean that too!!!!!!!!
except &, which means a function.
gfldex and if you really want to confuse yourself you have a look at: perlcabal.org/syn/S06.html#Parcel_binding 22:10
diakopter Araq: don't listen to gfldex's function-vs-nonfunction distinction. the only sigil that has anything to do with that is &.
gfldex hmm, i would say & means: here comes a function name that i don't want you to execute
diakopter that's wrong 22:11
niecza: my &a = sub { say 'b' }; &a()
p6eval niecza v17-4-ge5b869e: OUTPUT«b␤»
gfldex it's wrong when it comes after my or our 22:12
r: sub f(){}; &f;
p6eval rakudo aeca2f: ( no output )
gfldex see: i told the compiler to not call a function by giving it's name 22:13
& got context or you can think of it as actually two different things with the same name
p6: sub foo(\x, \y) { x = y; } 22:14
p6eval pugs: OUTPUT«*** ␤ Unexpected "\\"␤ expecting formal parameter or ")"␤ at /tmp/glWJqcAwYQ line 1, column 9␤»
..rakudo aeca2f: OUTPUT«===SORRY!===␤Malformed parameter␤at /tmp/uxMnlJ_Lq0:1␤»
..niecza v17-4-ge5b869e: OUTPUT«Potential difficulties:␤ &foo is declared but not used at /tmp/_bEe5u4pi2 line 1:␤------> sub foo⏏(\x, \y) { x = y; }␤␤»
gfldex n: sub foo(\x, \y) { x = y; } my $a; my $b = 42; foo($a, $b); say $a; 22:15
p6eval niecza v17-4-ge5b869e: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/8OgELI_euI line 1:␤------> sub foo(\x, \y) { x = y; }⏏ my $a; my $b = 42; foo($a, $b); say $a;␤␤Parse failed␤␤»
gfldex n: sub foo(\x, \y) { x = y; }; my $a; my $b = 42; foo($a, $b); say $a;
p6eval niecza v17-4-ge5b869e: OUTPUT«42␤»
gfldex niecza++
i would really like to know what parcel binding is for 22:16
beside confusing folk :)
Araq so if perl6 tries to adhere to huffman encoding, why all the pointless $ ? how do they aid readability given they do not even describe any constraint/interface/role?
diakopter Araq: what are you suggesting instead? no sigil at all? 22:17
gfldex r: my $a = 42; sub f(){}; f $a; f $a; f $a;
p6eval rakudo aeca2f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'f' will never work with argument types (Mu) (lines 1, 1, 1)␤ Expected: :()␤»
sorear pokes TimToady
Araq diakopter: yes
sorear to be honest I've had the same thought
gfldex r: my $a = 42; sub f(){}; f($a); f($a); f($a);
p6eval rakudo aeca2f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'f' will never work with argument types (Mu) (lines 1, 1, 1)␤ Expected: :()␤»
sorear but ditching sigils in Perl ain't never gonna happen 22:18
especially now that perl 6 is quasi-stabilized
gfldex it makes it easer to leave () home and allowes for string interpolation
fprint is nice if you use the advanced stuff but for easy stuff sigil powered interpolation is much easer to read 22:19
and at least for me, starting nouns with a capital helps with readability too
Araq but you can easily have "$foo" in strings and foo without the $ everywhere else
gfldex you could do that but i would not bet on better readability 22:20
the human mind is a funky thing :)
22:20 dom96 joined
gfldex and sigils give you another name space 22:20
if you have more then one sigil you get even multiple namespaces 22:21
Araq what about type-ability? typing $ requires a shift on a german keyboard ...
spider-mario so does % on an azerty keyboard
gfldex that depends on your keyboard mapping
spider-mario @ requires Alt Gr
fortunately for me, I don’t use azerty :) 22:22
gfldex you could have food pedals that map to $ % @
Araq indeed the other sigils are no better in this respect
gfldex and i'm not kidding, you can buy that stuff and stick it into a USB port
spider-mario I use bépo
bepo.fr/
22:22 havenn joined
spider-mario funny how $ is at the far left, @ in the middle and % at the right of the layout 22:23
it might be on purpose
Araq but then why should I? a $redudant $letter $hardly $helps $readability $anyway
you know, I'd say it hurts much more than it helps 22:24
my sentences don't improve with $, do they?
diakopter perl marks nouns with sigils, not every word
Araq a so 'class' is no noun? :P 22:25
22:25 benabik left
diakopter class is a keyword, reserved 22:25
Araq I know
sorear Araq: US keyboard require shift for all of $, @, %, and &
diakopter: Araq means classes like Int, Num... 22:26
Araq no I meant the keyword
but Int and Str are good examples too :-)
22:26 NamelessTee left 22:28 xinming joined
gfldex Araq: this keyboard could releave you from pressing shift ever again: www.alternate.de/p/450x450/n/Roccat...ntzr90.png 22:28
44 extra keys :) 22:29
22:29 pomysl_ left
spider-mario yuck 22:30
I’d rather press shift
22:30 pomysl joined, pomysl left, pomysl joined
sergot 'night o/ 22:30
22:30 sergot left
Araq indeed that's nice but then people may compare Perl6 to -say- Python and come to the conclusion that they don't need new keyboards to program in Python ... ;-) 22:31
what would you say to these people? :-)
tadzik "Grow your 5th fingers" ;) 22:32
spider-mario :D
gfldex i would say to them that they should subclass Perl6 (what is a grammar) and solve their problem
diakopter they are silly to insist on typing with Shift key.
without.
dalek blets: 4fcad8b | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
minest fixes
timotimo spider-mario: i use neo-layout.org/ - extra-special keyboard layout users of the world unite! 22:33
diakopter that's like saying, I won't use a language where capital letters are necessary.
gfldex what would the world be without the sensation to hold down a key and see all those little metal stomps move up a bit
tadzik huh, that's even weirder than my Colemak :)
sorear DECLARE X AS INTEGER COMPUTATIONAL;
gfldex diakopter: err, there are plenty of germans who refuse to use capitals
diakopter probably not out of laziness 22:34
timotimo colemak and dvorak are way too mainstream nowadays
spider-mario timotimo : that looks like the german equivalent of dvorak, bépo, and others
can it be described that way?
Araq in fact, it's like saying "I won't use a language with ALLCAPS keywords"
and indeed nobody uses Modula 2 and 3 ... nor Oberon
timotimo neo is optimised for german, english, programming, shell usage. dunno if that's the same for bepo. i think it isn't for dvorak
also for mathematics. it has greek letters and mathematical symbols easily accessible 22:35
spider-mario hm, bépo is not really optimized for english and programming
Araq there may be other reasons for that but allcaps keywords certainly don't help
spider-mario it’s mainly for writing french
sorear C has plenty of all-caps 'keywords' but people use it
spider-mario return EXIT_SUCCESS; 22:36
Araq no keyword :P
spider-mario there’s CHAR_BIT as well
and others
tadzik really, people use EXIT_SUCCESS? :P
spider-mario I do
tadzik okay
spider-mario even in C++, I include <cstdlib> to have it. :D
diakopter Araq: as sorear said, Perl won't make sigils optional, if only to maintain some level of historical consistency. 22:37
tadzik I like sigils, and even for readability reasons
gfldex i like sigils for the little bit of extra meaning that @ % get me opposed to $
tadzik good knight #perl6 22:38
gfldex but then i can count only like that: one thing, many things, things with names
araujo greets
spider-mario I use & as well
but that may come from my use of functional programming languages 22:39
I like higher-order functions
timotimo spider-mario: does bepo or colemak or something
... have something like neos layers?
spider-mario I’m not sure what it is 22:40
timotimo because neo2 has a modifier for each layer on both sides and you can hold both to lock those
mouse over "ebene 3, and "ebene 4" in the image on neo-layout.org
Araq good night
spider-mario ok
then, sort of
sorear 'night Araq
22:40 Araq left
spider-mario there are shift and Alt Gr as modifiers 22:40
both can be pressed at the same time
but that makes only 4 layers 22:41
download.tuxfamily.org/dvorak/wiki/...mplete.png
22:42 alim joined, dom96 left
timotimo bleh, the brackets and parens are in uncomfortable places, as well as the angular brackets :\ 22:42
spider-mario that’s one criticism sometimes made 22:43
timotimo much like the original german layout actually, have you seen that? it's crazy. the curly braces are altgr + 7 and 0
gotta run, catch some sleep now. good night!
spider-mario in azerty, it’s 4 and + (far right)
good night 22:44
(and Alt Gr, actually)
Alt Gr + 4, Alt Gr + far right
.U 😒 22:45
hm, that’s two characters
well, no
.u 😒
phenny U+1F612 (No name found)
22:45 Entonian joined 22:47 alim left 22:48 NamelessTee joined 22:53 mikemol left
spider-mario .u 𝄞 22:55
phenny U+1D11E MUSICAL SYMBOL G CLEF (𝄞)
spider-mario !seen spider-mario 22:57
.seen spider-mario
phenny spider-mario: I last saw spider-mario at 2012-05-13 22:57:03 UTC on #perl6
22:58 spider-mario left 22:59 spider-mario joined
tadzik hmm, that's interesting 23:02
phenny: seen spider-mario? 23:03
phenny: seen spider-mario
hmm, I thought it worked that way
aloha: seen spider-mario?
aloha tadzik: spider-mario was last seen in #perl6 4 mins 6 seconds ago joining the channel.
spider-mario there’s a dot
tadzik there we are
spider-mario .seen tadzik
phenny spider-mario: I last saw tadzik at 2012-05-13 23:03:30 UTC on #perl6
tadzik yeah, it's just that I remembered output to be different
spider-mario oh
tadzik and that was because we have two bots :)
spider-mario I didn’t see that :D
23:07 spider-mario left 23:11 NamelessTee left, Entonian left 23:33 thelazydeveloper left 23:37 eternaleye left 23:38 eternaleye joined 23:39 az5112 left 23:48 s1n joined