»ö« 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:01 cjbot left
[Coke] sorear: it compiled to pir, but then had a runtime failure, yes. 00:01
00:01 cognominal_ joined
[Coke] also: I'M ON A PLANE. 00:02
cognominal_ say dir '/', :test( -> $_ { IO::Path.new("/$_").d }) # better
sorear I've been on those before
00:03 benabik left
sorear I've even tried typing on them, but my arms are too long to assume typing posture in an airplane seat :( 00:03
cognominal_ anyway I think a path should be passed to the test so one could write
say dir '/', :test( -> $_ { .d }) # better
00:03 cjbot joined 00:04 benabik joined, cognominal left
cognominal_ on the other hand, people expecting a string would no be happy 00:05
[Coke] having a smallish laptop helps.
[Coke] ponders hacking on tcl to avoid thinking about how iffy that pre flight meal was.
00:18 spider-mario left 00:30 japhb_ left 00:32 uvtc joined
uvtc hi japhb 00:32
phenny uvtc: 29 Aug 23:32Z <japhb_> ask uvtc What did you use to syntax highlight the snippets at unexpected-vortices.com/temp/perl6-...index.html ?
uvtc phenny tell japhb Those snippets already had syntax-highlighting markup applied. I got them from perl6.org/snippets . I think moritz made them. I just created a simple style.css file for them by-hand. 00:34
phenny, tell japhb : Those snippets already had syntax-highlighting markup applied. I got them from perl6.org/snippets . I think moritz made them. I just created a simple style.css file for them by-hand.
phenny uvtc: I'll pass that on when japhb is around.
00:50 tokuhiro_ joined 00:51 uvtc left 00:55 tokuhiro_ left 00:57 scott__ joined 00:58 drbean left 00:59 drbean joined 01:00 tokuhiro_ joined 01:01 gongyiliao left 01:03 ObseLeTe joined, Circlepuller_ joined 01:05 Circlepuller left 01:13 PacoAir left 01:14 Coleoid_aside left 01:19 araujo joined, araujo left, araujo joined
[Coke] only 15m free wifi on the plane and I was too lazy to reconnect. 01:23
so, I have an Actions class with: PAST::Op.new( :name('invoke'), :node($/) ); 01:24
but when running that PAST, I get "Could not find sub invoke". ... where can I put the invoke sub? 01:25
putting in the same scope as MAIN, not found. inside the Actions class, not found. 01:29
01:32 smash left
sorear are there any parroty people around to reply to eiro's second mail? 01:35
[Coke] which list? 01:37
nevermind, boarding soon. 01:38
sorear p6u, for reference
01:46 whiteknight left 01:54 popl joined 01:56 FROGGS_ joined 01:58 tokuhiro_ left 02:00 FROGGS left
japhb phenny, tell uvtc Ah, thank you. 02:14
phenny japhb: I'll pass that on when uvtc is around.
japhb: 00:34Z <uvtc> tell japhb : Those snippets already had syntax-highlighting markup applied. I got them from perl6.org/snippets . I think moritz made them. I just created a simple style.css file for them by-hand.
02:25 MikeFair_ joined 02:26 orafu left, orafu joined 02:38 fgomez joined 02:43 MikeFair_ left 02:51 MikeFair_ joined 02:56 dayangkun joined 02:58 wk_ left 02:59 wk_ joined 03:06 arnsholt left, bluescreen10 joined 03:16 arnsholt joined 03:28 zhutingting joined 03:29 ObseLeTe left 03:34 zhutingting left 03:35 zhutingting joined 03:55 odoacre left 04:03 wamba joined 04:04 odoacre joined 04:23 xinming left, telex left 04:26 odoacre left 04:27 skids left 04:29 cjbot left, zhutingting left 04:31 telex joined 04:32 odoacre joined, cjbot joined 04:41 REPLeffect left
pmichaud good morning, #perl6 04:52
04:56 asdasd joined, Circlepuller joined
MikeFair_ pmichaud: good morning! 04:57
04:58 Circlepuller_ left 05:01 bluescreen10 left, xinming joined 05:04 bluescreen10 joined 05:12 benabik left, benabik joined 05:13 kaleem joined 05:17 bluescreen10 left 05:20 birdwindupbird joined 05:24 sivoais left 05:25 wk_ left, sivoais joined 05:33 popl left 05:37 marmay joined 05:41 cognominal__ joined 05:44 cognominal_ left 05:46 simcop2387 left 05:47 wamba left 05:49 simcop2387 joined 05:53 FROGGS_ left
moritz good am, pm 05:58
sorear o/ moritz
moritz good morning sorear 06:00
felher: pong
06:00 wtw joined 06:05 REPLeffect joined 06:11 erkan joined, erkan left, erkan joined 06:14 asdasd left 06:16 aindilis left 06:30 FROGGS joined
felher moritz: what is C<$*FATAL> for? I saw in in p6doc but can not find it anywhere in the specs. 06:33
There also don't seem to be any spectests regarding C<$*FATAL> 06:34
06:34 cognominal_ joined
moritz felher: rakudo uses it for implementing 'use fatal;'. But TimToady indicated that it's likely the wrong way to do things (wrong scoping) 06:35
felher moritz: okay. as i'm currently working on variables a bit, shall i keep or remove it?
06:37 cognominal__ left
felher -> bus 06:48
07:02 brrt joined 07:14 SamuraiJack joined 07:19 GlitchMr joined 07:27 wamba joined
moritz felher: remove it from p6doc 07:29
07:29 stepnem left 07:32 cognominal__ joined 07:35 cognominal_ left 07:38 cjbot left
marmay I've got a C function that returns a string, i.e. its signature is something like void some_string(char* buffer) and it writes a string of fixed length to buffer. I would like to call this function using NativeCall. sub some_string(Str $buffer) is native("...") { * } does not work, of course. Is there an easy way to call this function? 07:38
arnsholt That should work 07:40
07:40 hoelzro|away is now known as hoelzro
arnsholt Do you get some kind of error message or something? 07:41
07:41 cjbot joined
marmay No, just no output. But I didn't try any other functions from this library yet. 07:41
Buf if this is supposed to work, I will try something different first.
arnsholt Nah, it should be Str 07:42
What's the library, OOC?
marmay openssl's libcrypt.so
arnsholt Oh, hang on. Is the function writing the data in buffer to somewhere, or is it supposed to write to buffer? 07:43
marmay It writes data to buffer.
arnsholt Right, right
Then I'm not surprised it doesn't quite work, I'm afraid :/ 07:44
(I hack quite a bit on Zavolaj)
07:45 kresike joined
kresike good morning all you happy perl6 people 07:46
arnsholt Thing is, Perl 6's Str is an immutable object, so how to get the semantics of this exposed isn't immediately obvious (or something I've thought about yet)
sorear I'm curious what would happen if you declared it (Str $buffer is rw)
marmay I tried that already, same result.
tadzik I think everything is 'is rw' in zavolaj
sorear arnsholt: I think jnthn said at yapc that Zavolaj was the only thing allowed to mutate string data?
arnsholt Hmm. That's possible
One thing that might work is: 07:51
my $buffer = "string of appropriate length goes here";
explicitly-manage($buffer); 07:52
your_func($buffer);
explicitly-manage adds an attribute (sort of) to your Str that contains a C pointer with the string that persists 07:53
timotimo python does is similarly, but you create an actual buffer object from a string and that buffer object is read-write.
arnsholt But the changes probably won't be accessible from Perl, only C 07:54
moritz you could also do magic with the scalar container
arnsholt The right solution is probably to change the function signature to some_string(CArray[int8]), but that's NYI =(
moritz like, create a mutable C string, pass a pointer to it to the C function, and then create a new Perl 6 Str from the buffer, and put that into the container 07:55
arnsholt Or that 07:57
dalek rlito: 2ffd277 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - improve error handling at compilation-time
08:02
08:04 ObseLeTe joined 08:06 fhelmberger joined
marmay Okay. explicitly-manage does not change anything from my Perl program's view. Using a CArray[int8] works fine, though it seems that at_pos returns 4 or 8 bytes at once. Doing some binary operations would work out fine. 08:08
08:09 ObseLeTe left
arnsholt Yeah, getting sized stuff to work is in the pipeline, but not yet there 08:09
So any int-typed CArray will read a machine int at a time 08:10
08:11 ObseLeTe joined
marmay Okay, maybe I am going to use this solution as a work-around and watch Zavolaj carefully. 08:11
08:11 cjbot left
moritz marmay: out of curiousity, what are you working on? 08:14
08:14 cjbot joined
marmay I am not quite sure how far I get until I run out of time or interest. But if I keep working on it I will tell you later, okay? ;9 08:16
moritz sure :-)
sorear is it a libcurl binding? :D 08:17
(context: we had two people write libcurl bindings earlier this year without telling each other)
dalek rlito: 3585bd8 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - preload warnings.pm (this is required by t/op/negate.t)
08:18
08:19 Patterner left 08:22 wamba left 08:24 Psyche^ joined, Psyche^ is now known as Patterner 08:25 MikeFair_ left 08:28 daxim joined
FROGGS sorear: thats why it is important to release even it to modules.perl6.org even if it is just a stub 08:29
and now the question: who do I have to bug to get my module listed?
tadzik me
FROGGS purrrfect ;o)
tadzik or anyone with perl6/ecosystem write access
there's a wiki for that, I think :)
moritz felher: tell me your github ID, and I can give you write access
tadzik wiki.perl6.org/Create%20and%20Distr...%20Modules 08:30
moritz erm, s/felher/FROGGS/
sorry
FROGGS ya, it states that I have to bug "someone" on this channel
tadzik :)
FROGGS moritz: FROGGS
moritz FROGGS: welcome to the perl6 team 08:31
FROGGS thanks!
moritz FROGGS: you can now add stuff to ecosystem (and a few other repos :-)
FROGGS cool, I'll add my stuff then these days 08:32
08:34 wamba joined, cjbot left 08:38 cjbot joined 08:43 Tene left
FROGGS would be cool to have my BubbleBreaker game in perl6 ... 08:43
FROGGS has now plans for weekend
tadzik :)
08:44 seldon joined 08:46 dakkar joined 09:05 ObseLeTe left 09:07 arnsholt_ joined 09:08 xinming_ joined 09:09 mathw_ joined, robinsmidsrod left, mathw left, awwaiid left, Patterner left, arnsholt left, Helios left, huf left, zamolxes left, simcop2387 left, ironcamel left, ironcamel joined 09:10 huf joined, zamolxes joined, Psyche^ joined, Psyche^ is now known as Patterner, Helios joined, awwaiid joined 09:11 robinsmidsrod joined, xinming left 09:12 simcop2387 joined 09:16 dayangkun left 09:35 snearch joined 09:43 Tene joined, Tene left, Tene joined 09:45 arnsholt_ is now known as arnsholt 09:50 leont joined 10:00 wamba left, wamba joined 10:12 spider-mario joined 10:14 kurahaupo joined, scott__ left 10:16 cognominal__ left
dalek c/variables: 81784c9 | (Felix Herrmann)++ | lib/variables.pod:
[variables] fix length of a line
10:16
doc/variables: cce60ee | (Felix Herrmann)++ | lib/variables.pod:
doc/variables: [variables] elaborate dynamic variables example
10:16 dalek left 10:17 dalek joined, ChanServ sets mode: +v dalek
felher moritz: i added a few lines to [variables] and put all my changes into a branch :) you may review, merge, discard, cherry-pick however and whatever commits you like :) 10:17
10:19 cjbot left 10:22 cjbot joined 10:24 wk joined
moritz woah, felher++ 10:29
dalek c: 81784c9 | (Felix Herrmann)++ | lib/variables.pod:
[variables] fix length of a line
doc: cce60ee | (Felix Herrmann)++ | lib/variables.pod:
doc: [variables] elaborate dynamic variables example
10:29 dalek left
masak good morning, #perl6 :) 10:29
moritz good UGT antenoon, masak :-) 10:30
masak Perl 6 day today! \o/
moritz \o/
10:30 dalek joined, ChanServ sets mode: +v dalek
moritz masak: so, what are your plans? 10:30
masak fix one or both known bugs with the macros. blog. 10:31
10:32 wamba left
tadzik write a macro-powered module! \o/ 10:32
masak thought has crossed my mind, yes :)
I'm thinking we can fake some pretty cool AST construction/modification by wrapping nqp:: calls in an API.
cjbot twitter.com//status/ : 10:33
tadzik uh-oh
masak cjbot: sorry, what?
daxim status.twitter.com/
cjbot twitter.com/Kharec/status/240297523519057921 : En revanche, j'ai essayé deux-trois fois, j'suis pas trop #Perl6. J'pense que je m'y mettrais que quand #perl n'existera plus. #PasDeSuite 10:36
twitter.com/itimesupuc/status/2403...9700851712 : Perl 6 Now: The Core Ideas Illustrated With Perl 5 (Expert's Voice in Open Source) (Paperback) t.co/6AJW8Zki 10:37
twitter.com/uhyreni/status/240308444786200576 : Perl 6 Essentials (Paperback): Perl 6 Essentials is a sneak-preview of Perl 6, the widely-anticipated rewrite of... t.co/0hrxMEdj
twitter.com/PerlWeekly/status/2403...6406418432 : perl6.announce: ANNOUNCE: Niecza Perl 6 v21 by Stefan O'Rear t.co/v7Ap88zZ 10:38
twitter.com/ajbrowe/status/240401107443150848 : RT @perlbuzz: Starting again with Rakudo Perl 6 t.co/UhFAG4RL
twitter.com/trochee/status/240460876992364545 : @arthaey ... Objects &amp; namespaces as bolted-on afterthought, 1- &amp; 2-char built-in fns, perl 6 (15 years of "almost ready"!)... 10:39
twitter.com/blasgordon/status/2404...6538265600 : RT @PerlWeekly: perl6.announce: ANNOUNCE: Niecza Perl 6 v21 by Stefan O'Rear t.co/v7Ap88zZ
twitter.com/Erebuss/status/240743153571876864 : J'ai hate qu'on parle des failles de PERL 6 ... ca voudra dire qu'il est sortie :D 10:40
twitter.com/dwarf_power/status/240...6666156032 : RT @Erebuss: J'ai hate qu'on parle des failles de PERL 6 ... ca voudra dire qu'il est sortie :D
twitter.com/daveoflynn/status/2407...7741159425 : @rioter @surfichris If the base don't want to go, how do you propose to drag them? cf. Python 3, Perl 6 10:41
twitter.com/carlmasak/status/240757621668335616 : "There is much work yet to be done in [designing programming languages]..." t.co/LBvQcfHM That's what Perl 6 has taught me, too.
masak cjbot: when I said "sorry, what?", I didn't mean "could you repeat everything you've ever said?" :P
cjbot twitter.com/barcelonapm/status/240...2652677121 : RT @PerlWeekly: perl6.announce: ANNOUNCE: Niecza Perl 6 v21 by Stefan O'Rear t.co/v7Ap88zZ 10:42
twitter.com/quietfanatic/status/24...0559693824 : RT @carlmasak: "There is much work yet to be done in [designing programming languages]..." t.co/LBvQcfHM That's what Perl 6 has ...
10:42 ChanServ sets mode: +o moritz
cjbot twitter.com/daveoflynn/status/2409...3798168577 : @shadowcat_mst That wasn't the original plan for Perl 6 though; it's evolved that way because ppl wouldn't upgrade from 5. 10:43
10:43 cjbot was kicked by moritz (cjbot))
moritz cjbot, please come back when you've learned to send each message only once :-) 10:43
masak moritz++
10:45 moritz sets mode: -o moritz 10:48 leont left 10:49 kurahaupo left
felher is now heading home and cleaning up the place to show it to the next tenant 10:59
bye folks
masak o/
11:01 brrt left 11:05 cjbot joined 11:17 snearch left 11:20 mucker joined 11:36 skids joined 11:42 cognominal joined 11:45 cjbot left 11:46 spider-mario left 11:47 cjbot joined 11:57 skids left
masak git-add -i ftw. 12:01
cjbot twitter.com/afiskon/status/241144004295675904 : { aaa =&gt; 123, bbb =&gt; 456 } eqv { bbb =&gt; 456, aaa =&gt; 123 } #perl6 #perl 12:04
masak rn: say { aaa => 123, bbb => 456 } eqv { bbb => 456, aaa => 123 } 12:13
p6eval rakudo d70363, niecza v21-1-ga8aa70b: OUTPUT«True␤» 12:14
masak yep :)
cognominal can someone explain this signature : method read(IO:D: Cool:D $bytes as Int) 12:32
I mean the signature part in that declaration. 12:33
tadzik it must be called on a defined IO object. It takes a defined Cool of bytes, and coerces them to Int
masak 'IO:D:' -- the invocant is a defined IO. 'Cool:D' -- the first argument to the method is a defined Cool, which is coerced to an Int. 12:34
cognominal ho, I always miss the final ':' on the first type :( 12:35
masak it's really a kind of comma in that context. 12:36
I mean, in a very real sense, that method has two parameters, the invocant and the coerced defined Cool. 12:37
12:38 JimmyZ joined
cognominal yes, my eyes are trained to split on the comma and I miss the colon altogether 12:40
masak well, it's a bit special in that you don't have to specify the invocant parameter at all. you get one for free. 12:42
rn: class B { ... }; class A { method foo(B $self:) { say "whoa!" } }; class B is A {}; B.new.foo
p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:␤ $self is declared but not used at /tmp/OIA1Mp_7p4 line 1:␤------> class B { ... }; class A { method foo(B ⏏$self:) { say "whoa!" } }; class B is A ␤␤whoa!␤»
..rakudo d70363: OUTPUT«whoa!␤»
masak whoa.
n: class B { ... }; class A { has $.name; method foo(B:) { say "holy subclass black magic, $.name!" } }; class B is A {}; B.new(:name<Batman>).foo 12:44
p6eval niecza v21-1-ga8aa70b: OUTPUT«holy subclass black magic, Batman!␤»
masak rn: class A {}; class B is A { method foo(A:) { say "B.foo called on {self}" } }; B.new.foo 12:45
p6eval rakudo d70363: OUTPUT«B.foo called on B<409371901>␤»
..niecza v21-1-ga8aa70b: OUTPUT«B.foo called on B()<instance>␤»
masak rn: class A {}; class B is A { has $.x; our method foo(A:) { say $.x } }; &B::foo(A.new) 12:46
p6eval rakudo d70363: OUTPUT«No such method 'x' for invocant of type 'A'␤ in method foo at /tmp/sxC9tMdwn5:1␤ in block at /tmp/sxC9tMdwn5:1␤␤»
..niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method x in type A␤ at /tmp/xhRtcfMR52 line 1 (B.foo @ 4) ␤ at /tmp/xhRtcfMR52 line 1 (mainline @ 8) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 413…
masak fairynuff. :)
rn: class A {}; class B is A { has $!x = 5; our method foo(A:) { say $!x } }; &B::foo(A.new) 12:47
p6eval rakudo d70363: OUTPUT«Can not get non-existent attribute '$!x' on class 'B'␤ in method foo at /tmp/VJNmq6t_GV:1␤ in block at /tmp/VJNmq6t_GV:1␤␤»
..niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Attribute $!x not defined in A or any superclass␤ at /tmp/CrsNtNMjth line 1 (B.foo @ 4) ␤ at /tmp/CrsNtNMjth line 1 (mainline @ 8) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.sett…
masak submits LTA error message rakudobug
12:51 Targen left, Targen joined
cognominal suppose I write a find routine to scan a filesystem. In the absence of coroutine, how do I make it lazy? Or should I resort to some handler explicitely passed as a parameter to treat each file? 12:53
tadzik cognominal: you may want to take a look at File::Find, it's lazy 12:54
dalek rlito: 4b486e0 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - javascript - fix scalar assignment context under no-strict; TODO cleanup; add reference to lwn.net/Articles/451486/
12:56
cognominal nice, I did not notice it existed
tadzik it maybe should be released as a separate module
I notice that it only causes confusion, and people have trouble finding both File::Find and Shell::Command 12:57
masak (separate module)++ 12:59
cognominal tadzik, where is it, I can't find it.
masak .oO( QED ) 13:01
cognominal is it part of rakudo?
tadzik nope
it's part of File::Tools
github.com/tadzik/perl6-File-Tools...le/Find.pm 13:02
cognominal: ^
oh, it's using tabs :]
13:03 wamba joined
cognominal thx 13:03
tadzik basically, it's all about gather-take
13:06 benabik left
masak moritz: finally getting around to reviewing github.com/rakudo/rakudo/commit/39...fb96313e7b 13:07
cjbot twitter.com/afiskon/status/241159869288292352 : @Virtuos86 { bbb =&gt; 444 } == {aaa =&gt; 123} -- True, { bbb =&gt; 444 } eqv {aaa =&gt; 123} -- False #perl6 #perl 13:08
masak moritz: looks basically good and sound, but I think you've used one exception class for two quite different cases... neither of which fits with the name X::TypeCheck::MacroUnquote. :) 13:09
13:09 benabik joined
masak attempts to prepare a patch to remedy this 13:09
13:10 PacoAir joined, fglock joined
masak moritz: quasis/unquotes and macros are orthogonal, a bit like 'given' and 'when'. 13:10
13:10 PacoAir left 13:11 PacoAir joined
moritz masak: I feared I might be conflating some concepts, yes 13:12
13:12 Kharec joined
Kharec hi guys 13:12
What does mean { !!! } please? In perl6 code, obviously. 13:13
moritz Kharec: it marks the routine as a stub, and makes it die if it's exected
r: role R { method s { !!! } }; class A does R { }
p6eval rakudo d70363: OUTPUT«===SORRY!===␤Method 's' must be implemented by A because it is required by a role␤»
13:14 cjbot left
[Coke] kills cjbot 13:14
moritz r: sub a { !!! }; a()
p6eval rakudo d70363: OUTPUT«Stub code executed␤ in sub a at /tmp/IwoNK5PgXP:1␤ in block at /tmp/IwoNK5PgXP:1␤␤»
masak moritz: I don't blame you. most of the time with the macros grant seems to go into untangling and disconflating concepts :)
[Coke] wonders what sort of bizarre failure could have caused that.
masak moritz: how do you feel about the idea of providing a 'submethod BUILD($!expected = AST) {}' in the two exception classes? 13:15
Kharec :c
thanks guys (I got it!)
moritz masak: so, there are two errors, one is for returning non-ASTs from holes, one for returning non-ASTs from macros?
13:15 Kharec left
masak moritz: exactly. 13:16
moritz: the theme of D2 seems to be that there's a deep and beautiful symmetry between those two.
moritz masak: (re BUILD) not going to work, because $!expected is an attribute of the parent class
masak oh, right.
moritz: can I use $.expected there?
moritz no
masak dang :/
moritz but you can write method expected { AST } 13:17
masak then it's no longer an overridable default.
moritz because we only use the virtual accessors
right
masak I don't expect the default to be overridden, ever... but I'd rather provide the AST explicitly than put in a non-overridable default.
so, it stays the way it is, then. 13:18
moritz: '# TODO: find and report macro name' -- I'll remove this comment, I think. 13:20
moritz: there may be a macro, but there doesn't have to be.
r: my $q = quasi { say "OH HAI" }; say $q
p6eval rakudo d70363: OUTPUT«AST.new()␤»
moritz masak: we also report names of things that could be anonymous 13:21
(if we have the names)
it's a very, very useful piece of information to have
r: macro a { 42 }; say &a()
p6eval rakudo d70363: OUTPUT«42␤»
moritz that's the reason I used the same exception type for both errors 13:22
masak all I'm saying is that there isn't automatically a surrounding macro whose name we could report. I agree it's useful information when it's there.
moritz the problem is not returning the wrong type from a macro
masak right.
moritz the problem is returning the wrong type where we try to splice in an AST
masak indeed so.
moritz so I think the common error type could stay, though it might need renaming 13:23
masak X::TypeCheck::SpliceeNotAST ? :)
cognominal trying to install panda on the latest git rakudo, I get error:imcc:The opcode 'perl6_type_check_return_value_p' (perl6_type_check_return_value<1>) was not found. Check the type and number of the arguments in file '/Users/cog/.perl6/lib/Shell/Command.pir' line 584 13:24
tadzik [Coke]: about cjbot, I think twitter was down for a second, and it caused the bot to forget its known tweets db
cognominal ho, I shoud rm -rf ~/.perl6
got there before :(
tadzik cognominal: there's rebootstrap.pl which will do that for yu
[Coke] tadzik: ah! that's very plausible.
tadzik and reinstall the previously installed modules
[Coke] I suspect that might have set the "most recent tweet #" to Nil.
masak [Coke]: what tadzik said. just before it started babbling, it reported something with "twitter status".
tadzik yeah 13:25
masak moritz: X::TypeCheck::CouldNotSpliceNonAST ?
moritz: I think that's very clear.
fglock I'm wondering about porting nqp to a not-parrot backend
13:25 Kharec joined
moritz masak: if it has TypeCheck in the name, it doesn't need NonAST, no? 13:25
masak troo.
X::TypeCheck::CouldNotSplice 13:26
moritz X::TypeCheck::Splice
masak \o/
sold.
fglock would that make it possible to run rakudo somewhere else than parrot?
masak moritz++ # exceptionally good at naming
diakopter fglock: eventually, yes
tadzik at some point, yes
moritz fglock: that's the plan behind the move from PAST to QAST
(the QAST compiler is written in NQP 13:27
fglock but it is not possible yet?
moritz the PAST compiler is written in PIR)
13:27 JimmyZ left
masak fglock: at YAPC::Europe, the sense was that at the next YAPC::Europe, Rakudo will be running on Parrot *and* some other VM. 13:27
fglock: I think it was pmichaud that expressed that.
13:28 skids joined
moritz fglock: not easily, some of runtime stuff like exceptions is pretty parrot specific 13:28
fglock and porting PIR to another backend is probably not a good idea, right? 13:29
[Coke] I don't see the advantage in making PIR target something other than parrot, no. 13:30
especially when parrot itself is moving away from PIR
rjbs Portable Intermediate Language
fglock and what is the state of the transition to QAST?
13:30 Kharec left
moritz pretty much there, but not quote 13:30
rakudo has been ported to QAST 13:31
for NQP, there's a branch
tadzik rakudo builds and passes some spectests
(nqp/toqast and rakudo/nqptoqast I mean)
moritz but rakudo on the nqp-on-qast isn't quite there yet
masak r: my $q = quasi { {{{2}}} }; say $q
p6eval rakudo d70363: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/1iQkD11T1T:1␤␤use of uninitialized value of type Any in string context in block at /tmp/1iQkD11T1T:1␤␤===SORRY!===␤Type check failed in macro application; expected AST but got Int␤at :␤»…
13:32 tokuhiro_ joined
masak wonders where those undefinedness warnings are coming from 13:32
moritz masak: from file name and line number in X::Comp
I guess another day of jnthn++ hacking on the qast transition will get us there
[Coke] wonders if pmichaud is about.
masak ah.
moritz: then I won't worry about them any more. 13:33
moritz masak: currently we have a bit of a problem with errors that can appear both at run time and at compile time
masak oh? 13:37
moritz well, either the exception type does X::Comp
then it doesn't print a backtrace, but rather source line + file
masak ah, yes. I understand.
"Teaching my 10 year old niece how to program": orangethirty.blogspot.se/2012/08/te...ow-to.html 13:38
moritz but then if you throw it at runtime, you don't have that info
as a kind of workaround rakudo mixes in X::Comp if you throw a non-compile-time error at compile time
but that's kinda ugly
dalek kudo/nom: fc88876 | masak++ | src/ (3 files):
X::TypeCheck::MacroUnquote -> X::TypeCheck::Splice

Also added an $.action attribute, because splicing takes place both during quasi-block incarnation and during macro application.
13:39
moritz I wonder if types are the wrong abstraction here, and an attribute would be nicer
or maybe it would be X::Comp[$really?]
masak perhaps.
moritz and $really could be "Maybe" or "True"
masak I'd go down to attributes there, not up to parametric roles :P
[Coke] I just threw you. and this is crazy. but what's your type? runtime maybe? 13:41
moritz [Coke]++ # pop culture reference
tadzik :D 13:42
kresike bye folks
13:42 kresike left
masak enighten me -- what's the reference? :) 13:42
felher masak: was "git add -i" adressed at me?
tadzik masak: www.youtube.com/watch?v=fWNaR-rxAic 13:43
...not that I consider it worth listening to ;)
but everyone seems to be joking about it in the office, so I have to keep up with memes 13:44
[Coke] masak: www.youtube.com/results?search_quer...kKDY7ApkpU 13:45
masak felher: no, to the room.
felher masak: ah okay. Yeah, git add -i or -p are nice :)
[Coke] tadzik++ - there are hundreds of remixes/makes/parodies though.
tadzik yep
[Coke] it's catchy, tanjit. 13:46
tadzik I wonder if there's a Star Wars one, like with Friday
[Coke] prefers this version, still with the original artist: www.youtube.com/watch?v=lEsPhTbJhuo
rjbs QAST?
13:47 bluescreen10 joined
moritz (P++) AST 13:47
masak well, well. that is one muscular lawn mower guy.
rjbs moritz: ha
masak I can see why she'd be gawking through the window.
rjbs Made me think of en.wikipedia.org/wiki/Quasit
diakopter moritz: well, (++P) AST
13:48 marmay left
moritz diakopter: right 13:48
[Coke] rjbs++ ++ ++ ++ ++ ++ ++ ++
moritz rjbs: maybe it's also a bit quantum :-)
[Coke] really misses playing D&D. ;)
13:48 stopbit joined
rjbs [Coke]: I run an online game with Perl people on Saturday mornings. 13:48
[Coke] O_o 13:49
SHUT UP AND TAKE MY MONEY 13:50
er, I might be interested in that at some point. :)
masak tadzik: I liked that video. especially the end. the music itself is regular mundane radio pop, though.
tadzik +1 # Perlpg
masak: have you seen Friday? 13:51
13:52 leont joined
masak tadzik: oh, sure. 13:53
tadzik: not many of the parodies, though.
tadzik This one has a pretty decent Star Wars parody
masak moritz: thinking about it, it seems to me X::TypeCheck::Splice shouldn't inherit from X::Comp, the latter should be mixed into the former in the case of macro application. 13:54
masak tries to find the Star Wars parody
moritz masak: my current plan is to make X::Comp mean "usually thrown at compile time" 13:55
tadzik masak: www.youtube.com/watch?v=BCmi5loEBUk
moritz masak: and have it provide an attribute that defaults to False, but which Perl6::World.throw sets to True
masak tadzik: yeah, found it. it's "good" :) 13:57
tadzik ;)
the ending is awesome
13:57 FROGGS left
tadzik 3:43 and further 13:57
13:57 benabik left
masak getting there. 13:58
colomon nr: say Int.new(4) 13:59
p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Excess arguments to Int.new, used 1 of 2 positionals␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Int.new @ 1) ␤ at /tmp/ML5kiKpwdV line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/…
..rakudo d70363: OUTPUT«Default constructor only takes named arguments␤ in method new at src/gen/CORE.setting:618␤ in block at /tmp/SSMNo5yM__:1␤␤»
masak tadzik: :D
tadzik "They've got this imperial system" :D 14:00
dalek ast: 7210a91 | masak++ | S06-macros/unquoting.t:
[S06-macros/unquoting.t] chased exception rename
14:03
14:04 fhelmberger left
dalek c: 3dc7ead | moritz++ | lib/X/TypeCheck/ (2 files):
track MacroUnquote -> Splice name change
14:05
masak I *think* those are the only two cases where we will be splicing ASTs from within Perl 6. 14:07
well, there might be a manual .attach method somewhere in some API, I guess. but that one can simply typecheck by normal means.
14:10 FROGGS joined 14:14 leont left 14:16 wtw left
masak ah, there were two more cases of throwing X::TypeCheck::Splice in Actions.pm -- taking care of them. 14:17
unfortunately, the three cases of invoking a macro are currently three separate but similar code paths.
there's a strong case for extracting those three into a single code path.
14:18 MayDaniel joined, krunen left 14:20 krunen joined
[Coke] jnthn, pmichaud: I tried a different tack in the partcl-nqp/nqp2 branch - I ignore everything but the main action/grammar/compiler, add a small MAIN to setup the command line.. and there's a PAST call that cannot find the "invoke" sub. Even though there is an invoke sub; so I'm clearly putting it in the wrong place, or looking int he wrong place. 14:20
dalek kudo/nom: 7d10d1a | masak++ | src/Perl6/Actions.pm:
[Perl6::Actions] throw X::TypeCheck::Splice everywhere

This make the remaining two code paths for macros catch up with the fact that we now throw X::TypeCheck::Splice when a macro to be spliced into mainline code doesn't return an AST. See also fc88876.
14:21
14:21 DarthGandalf left 14:22 birdwindupbird left 14:23 DarthGandalf joined 14:24 birdwindupbird joined 14:26 wamba left 14:28 kaare_ joined
masak what's the difference betwixt pir::perl6_decontainerize__PP and nqp::p6decont? 14:34
masak discovers that his code from some months ago is itself confused about the macros/quasis separation 14:37
a variable is called $quasi_ast, but should probably be called $result_ast or something.
there are many possible situations when a macro doesn't return ASTs via a quasi.
r: macro foo($a) { $a }; say foo 42 14:38
p6eval rakudo fc8887: OUTPUT«42␤»
14:38 wamba joined, wamba left
masak also, perhaps $*W.add_quasi_fixups should be called $*W.add_ast_fixups... 14:40
masak tries to keep upright as the ubiquitous language shifts under him :)
FROGGS lets masak know that somebody is listening and that he is not allone 14:41
masak thanks. 14:42
14:42 wamba joined
masak it's still a very awesome thing to be finally implementing macros in Perl 6. 14:42
I would never have guessed a few years back that I'd end up being the one to do this.
I still feel like a bear with a very small brain doing this, but breaking down the work into tiny units of progress seems to help. 14:43
rjbs [Coke]: dudgeonmaster.org/games/alar/
FROGGS masak: ya, you can actually do much if you just begin 14:46
masak there's a true word. 14:48
FROGGS btw: does somebody know if there is some sort of Time::HiRes in perl6? 14:50
I found a blogpost from 2009 that states that time() gives you a float... 14:51
nr: say time
p6eval niecza v21-1-ga8aa70b: OUTPUT«1346338267.00886␤»
..rakudo fc8887: OUTPUT«1346338265␤»
FROGGS ohh, nice
so its half true
tadzik r: say nqp::time__N()
p6eval rakudo fc8887: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op call: Error while compiling op time__N: No registered operation handler for 'time__N'␤»
tadzik r: nqp::say pir::time__N()
p6eval rakudo fc8887: OUTPUT«1346338305.09024␤»
tadzik someone should write a cross-compiler Time::HiRes :) 14:52
FROGGS great, thanks
thats what I am thinking right now
[Coke] n: say pir::time__N() # just curious. 14:54
p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤ at /tmp/IjNgW5mI5E line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571)…
[Coke] LTA error?
14:55 benabik joined
masak ooh -- yes. 14:55
[Coke] rjbs: subscribed.
masak [Coke]: I'd prefer for Niecza to trap and reject pir:: things on compilation.
I wonder if sorear will like that idea. 14:56
diakopter ERROR: NO PARROTS TO BE FOUND HERE
hoelzro ENOPARROT 14:57
flussence n: say nonexistent::foo() # the error could still be better in the general case, though
p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤ at /tmp/pYdbhhgbop line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571)…
14:57 groky left
flussence n: say foo::bar 14:58
p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤ at /tmp/knfoj7ehJo line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571)…
flussence where's that () coming from?
14:58 wamba left 14:59 wamba joined, benabik left
geekosaur not a keyword, no sigil --> assumed to be a sub? 14:59
15:00 gongyiliao joined 15:02 groky joined, SHODAN left
masak geekosaur: a sub call, yes. 15:02
r: macro foo($a) { quasi { {{{$a}}}() } }; say foo -> { 42 }
p6eval rakudo fc8887: OUTPUT«42␤»
masak r: macro foo($a) { quasi { {{{$a}}}() } }; my $v = 42; say foo -> { $v }
p6eval rakudo fc8887: OUTPUT«Any()␤»
15:04 SHODAN joined, birdwindupbird left 15:05 smash joined
smash hello everyone 15:05
felher o/ 15:07
masak hello smash.
r: macro podolsky() { my $q = quasi { 2 }; $q = quasi { 1 + {{{$q}}} } for ^2; $q }; say podolsky() 15:08
p6eval rakudo fc8887: OUTPUT«3␤»
masak should be 4.
I've managed to break this case locally, so that it complains about unregistered blocks in the serialization context. I don't know why. 15:09
r: macro rosen($code) { my $paradox = "this should not happen"; quasi { {{{$code}}}(); } }; my $paradox = "EPR"; say rosen(sub { $paradox }) 15:10
p6eval rakudo fc8887: OUTPUT«this should not happen␤»
masak and this still returns that value, so apparently I haven't fixed what I set out to fix, either. 15:11
15:11 MayDaniel left
masak back to the drawing board, then. 15:11
15:12 jeffreykegler joined
dalek p: 2f7b14d | masak++ | src/QAST/B (2 files):
add .evaluate_unquotes to BVal and Block
15:13
15:15 wamba left 15:17 leont joined
felher masak++ # for: stoop and build 'em up with wornout tools 15:18
masak did I say that? don't recall.
felher masak: was just a reference on your " back to the drawing board, then." spirit :) 15:19
15:22 mcglk left
felher Or, in other words, on your "won't give up. try again" spirit 15:22
15:22 mcglk joined 15:23 mcglk left
masak oh! 15:24
good things I didn't put any emoticons on that sentence, so it could be read like that ;)
15:24 xinming_ left
felher :D 15:25
15:25 leont left 15:26 xinming joined
FROGGS in sys.ops is inline op time(out INT) { $1 = Parrot_intval_time(); } and inline op time(out NUM) { $1 = Parrot_floatval_time(); } 15:26
how do I get the one that returns NUM?
15:28 cognominal_ joined, immortal joined, immortal left, immortal joined 15:30 fglock left 15:31 cognominal left
FROGGS nr: my Int $time = time; say time 15:31
p6eval rakudo 7d10d1: OUTPUT«1346340717␤»
..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:␤ $time is declared but not used at /tmp/bHWD73UlBx line 1:␤------> my Int ⏏$time = time; say time␤␤Unhandled exception: Nominal type check failed for scalar store; got Num, needed Int or subtype␤ at /tmp/bHWD73Ul…
FROGGS nr: my Num $time = time; say time 15:32
p6eval rakudo 7d10d1: OUTPUT«Type check failed in assignment to '$time'; expected 'Num' but got 'Int'␤ in block at /tmp/Tn9B8NYbaa:1␤␤»
..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:␤ $time is declared but not used at /tmp/R8XjRD5DDR line 1:␤------> my Num ⏏$time = time; say time␤␤1346340739.214263␤»
FROGGS nr: my Num $time = time; say $time
p6eval rakudo 7d10d1: OUTPUT«Type check failed in assignment to '$time'; expected 'Num' but got 'Int'␤ in block at /tmp/RITf_KAlza:1␤␤» 15:33
..niecza v21-1-ga8aa70b: OUTPUT«1346340779.7081189␤»
FROGGS nr: my Int $time = time; say $time
p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Num, needed Int or subtype␤ at /tmp/hzNHBgRn4a line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4139 (…
..rakudo 7d10d1: OUTPUT«1346340786␤»
15:34 cognominal__ joined 15:35 cognominal_ left 15:36 SHODAN left, mucker left, arnsholt left, erkan left, b_jonas left, Khisanth left, sorear left, jnthn left, mst left, pnu left, cxreg left, BinGOs left, felher left, moritz left, Gesh left, yeltzooo7 left 15:38 jeffreykegler left 15:40 tokuhiro_ left, SHODAN joined, mucker joined, arnsholt joined, b_jonas joined, Khisanth joined, mst joined, sorear joined, jnthn joined, pnu joined, cxreg joined, BinGOs joined, felher joined, moritz joined, Gesh joined, yeltzooo7 joined, tokuhiro_ joined 15:41 jeffreykegler joined 15:42 hoelzro is now known as hoelzro|away 15:45 tokuhiro_ left 15:53 thou joined 15:56 Patterner left 15:57 Psyche^ joined, Psyche^ is now known as Patterner, daxim left 16:02 hoelzro|away is now known as hoelzro
dalek ast: 1c33e9e | moritz++ | S06-macros/unquoting.t:
fix test plan
16:03
masak thank you. 16:04
moritz t/spec/S06-macros/unquoting.rakudo .. 16:05
Obsolete use of | or \ with sigil on param $
1..10
that's... odd 16:06
masak yeah, I'm getting that too. after github.com/rakudo/rakudo/commit/d7...9b702aa8d4 , I guess.
moritz yes, I know that's the patch that enabled them 16:07
but I don't see where the \$ or |$ is
masak ah; it's in Test::Util. 16:08
moritz oh, that explains a lot
masak++
masak which I guess you included for throws_like.
plz fix ;)
moritz correct
16:09 wamba joined
dalek ast: f80f5a8 | moritz++ | packages/Test/Util.pm:
[Test::Util] fix obsolete use of (|$) signature
16:10
moritz lol I fox it!
[Coke] r: chr(65).say
p6eval rakudo 7d10d1: OUTPUT«A␤»
[Coke] r: chr(0xe9).say
p6eval rakudo 7d10d1: OUTPUT«é␤»
[Coke] www.nntp.perl.org/group/perl.perl5....91113.html
masak moritz++ # foxy fix!
[Coke] r: chr(0xe9).print 16:11
p6eval rakudo 7d10d1: OUTPUT«é»
[Coke] urk. isn't packages/Test/Util.pm used by all the implementations?
moritz [Coke]: yes. Which is why I wonder why nobody noticed earlier
[Coke] that could have... ramifications.
moritz [Coke]: niecza was much earlier in implementing the sigilless stuff 16:12
16:12 wamba left
masak [Coke]: what about the nntp url? I don't see anything relating to Perl 6 in there. 16:12
moritz n: sub f(|$) { }
p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:␤ Unsupported use of | with sigil; nowadays please use | without sigil at /tmp/KucT4P0XQn line 1:␤------> sub f(|$⏏) { }␤ &f is declared but not used at /tmp/KucT4P0XQn line 1:␤------> sub f⏏(|$) { …
16:12 wamba joined
moritz n: sub f(|) { } 16:12
p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:␤ &f is declared but not used at /tmp/dboAJPbVv7 line 1:␤------> sub f⏏(|) { }␤␤»
[Coke] p: sub f(|$) {}
p6eval pugs: OUTPUT«*** ␤ Unexpected ")"␤ expecting parameter name␤ at /tmp/Jt7uZsQhii line 1, column 9␤»
moritz could pugs run Test::Util before? 16:13
[Coke] no clue. doing a spectest run now.
it's possible we aren't running any of those tests that use it yet.
masak has never golfed a diff before, but does so now 16:15
16:19 kaleem left
masak oh! 16:19
.add_quasi_fixups contains an early return for ASTs that don't self-identify as quasi ASTs. 16:20
that *would* make the patch not work, I guess.
now, why did I add such an exception in the first place? 16:21
[Coke] only a few failures in pugs, nothing major. probably a non-issue.
masak tries removing it to see what happens 16:22
moritz [Coke]: \o/
[Coke] gets several decks of $dayjob-themed scrum cards. 16:24
16:26 BlueT_ joined
masak heh, now it segfaults :) 16:26
I *think* that's an improvement.
I mean, clearly I'm mucking around in the right code paths.
moritz lemme guess, you got an infinite recursion somewhere, which the check avoided 16:27
16:29 MayDaniel joined
moritz kidsruby.com/about # I want something like that for Perl 6 too :-) 16:30
ingy anybody got perl6 running on android? 16:31
masak moritz: hm, that would explain why the segfault comes after a pause. 16:32
jeffreykegler A question for those with a sense of the Perl 6 language. I am working on "Sixish", a Perl 6-influenced interface for my parser, Marpa.
Could <A> ::= <X> <Y> <Z> be considered a reasonable extension of Perl 6 for expressing BNF rules
moritz ingy: yes, mberends blogged about it
jeffreykegler It could be considered a special case of "bind and read only" -- or I least I hope it might be so considered 16:33
ingy jeffreykegler: I have a parser called Pegex (originally based off of p6 rules)
masak jeffreykegler: right. it's not Perl 6 syntax, but it's at least consistent with Perl 6 syntax.
jeffreykegler: I guess that's what you're asking.
ingy A: X Y X # <= Pegex
jeffreykegler masak: yes, that was exactly my question 16:34
ingy: so Pegex used a similar notation
ingy A: <X> <Y> <X> # <= Also valid Pegex
masak r: macro foo($a) { $a }; foo say 42
p6eval rakudo 7d10d1: OUTPUT«42␤»
ingy very similar. sec
masak this also segfaults locally now.
I think that's why the early return was added.
and that moritz++ discovered this case. 16:35
ingy jeffreykegler: here's the pegex grammar for Pegex itself github.com/ingydotnet/pegex-pgx/bl.../pegex.pgx
jeffreykegler ingy, masak: OK, that's encouraging then.
ingy jeffreykegler: drop by #pegex if you have any questions about it 16:36
jeffreykegler: btw, the Pegex grammaar syntax compiles very simply to json/yaml like this github.com/ingydotnet/pegex-pgx/bl...x.pgx.yaml 16:38
jeffreykegler ingy: will do, thanks
16:39 FROGGS left
ingy moritz: url? 16:39
moritz ingy: blogs.perl.org/users/martin_berends...s-403.html
ingy moritz: ta 16:40
dalek kudo/nom: cd02586 | moritz++ | src/ (2 files):
change X::Comp to mean "potentially compile-time"

There are some cases (like trait application and quasi unsplicing) that usually happen at compile time, but not always. When they were thrown at run time, they warned, because file name and line number were Any. This is now fixed.
16:41
masak not "unsplicing" :)
"unquote splicing", perhaps. 16:42
moritz oops
ingy moritz: crikey, this is just what I needed. I was on the fence as to whether or not to get the new ASUS tf700t. I was kinda joking about p6 on rakudo. thx!
masak .oO( please keep up with my volatile and largely arbitrary vocabulary! ) :P
16:42 SamuraiJack left, dakkar left
moritz ingy: note that the build-time memory usage has dropped quite a bit (minus 20..30%) since the post, so that should make compilation faster 16:43
masak: just add it to p6doc/lib/glossary.pod
masak if I do an nqp::getattr and provide the totally wrong class/attribute, will nqp complain? 16:44
because the more I look at this, the more that seems to be what I'm doing here.
moritz yes, it will
but the error message is LTA
16:45 SamuraiJack joined
moritz in particular if you do nqp::getattr($foo, Class, '$!bar'), and $foo isn't of type Class, it'll complain that Class doesn't have attribute '$!bar' 16:45
or some such
ingy moritz: I am much more excited about just knowing there is a way to do unix dev on android, then about building p6 16:47
but good to know:)
16:48 wk left 16:54 crab2313 joined
sorear good * #perl6 16:56
moritz \* sorear
masak s*rear! 16:57
\*/
moritz »*« 16:58
sorear o/ m{oritz,asak}
16:58 UncleFester6 joined
masak gets the error "Unknown QAST node type AST" deep inside something, and realizes that he's mistakenly wrapping ASTs in ASTs somewhere 16:59
UncleFester6 p6: class c { multi method m (Int $n --> Str) { return sprintf("%d", $n*3) } ; multi method m (Int $n --> Int) { return $n *4 } } ; my Str $s = c.m(3); say $s; my Int $n2 = c.m(3); say $n2 17:00
sorear sounds like fun
p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Ambiguous call to m; these signatures all match:␤ c, Int␤ c, Int␤ at /tmp/7cp2xVA9hK line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4139 (modu…
..rakudo 7d10d1: OUTPUT«Ambiguous call to 'm'; these signatures all match:␤:(c , Int $n, Mu *%_)␤:(c , Int $n, Mu *%_)␤␤ in method m at src/gen/CORE.setting:334␤ in block at /tmp/aUhPYhMblK:1␤␤»
UncleFester6 The return types in the example are different. Anyone else agree that considering return types makes sense? 17:01
masak drops the macro work for now and hopes to have a fruitful discussion about it with jnthn++ later 17:06
sorear masak: I am not opposed in principle to making the compiler carp on longnames that start with "pir" or "nqp" 17:07
UncleFester6: it makes sense in a language with bidirectional type inference like Haskell
UncleFester6: Perl 6 needs to do this stuff at runtime, and we decided long ago that runtime type information only flows outward 17:08
"Do not want want"
masak sorear: cool. it would probably be a net help, even if it invalidates those namespaces for other purposes.
sorear masak: do any other implementations have private opcode namespaces?
masak you mean, like Pugs and Perlito? 17:10
I'm not sure.
UncleFester6 I have a method in a class that takes a string as input and wants to do different things depending on whether the caller wants back a Str or a Buf. 17:11
Will I need two differently named methods or is there some way to detect what the user wants back.
diakopter UncleFester6: does the caller know what it wants back? If so, how about a flag parameter? 17:20
moritz UncleFester6: you can't generally do that, a context doesn't know what the caller wants 17:21
UncleFester6 More specific example - a user passes in a base64 encoded string. If the encoded data is an image they want back a Buf. If the encoded data is a string they want back a string from a utf-something decoded Buf. 17:24
I can use a flag parameter I guess but wonder if its the best one could do ...
moritz yes, either two different functions, or a flag
17:26 jeffreykegler left
sorear UncleFester6: separation of concerns. base64 should always return a Buf, and the calller is responsible for chaining on .decode('utf8') if that is what they want. 17:29
also, could someone with more of a historical background explain 'do not want want' to UncleFester6 17:30
UncleFester6 or just point me to some docs ...
moritz UncleFester6: consider multi dispatch
masak UncleFester6: in Perl 6, there is something called 'wantarray'. you can read about it at 'perldoc -f wantarray'.
UncleFester6: short story, Perl 6 doesn't have it. 17:31
17:31 benabik joined
sorear it's hard to document a negative feature 17:31
moritz multi a(Buf) { }; mult a(Str) { }
now if you could write a magic function f that returns either a Str or a Buf
what would a(f()) do?
UncleFester6 I understand the separation argument on base64. It's just not the way it works now and I wanted to preserve the existing "artifact" functionality ... 17:32
sorear define 'now'
is there an ancient base64 module that uses want() ? 17:33
moritz now = now it returns Str
sorear oh
UncleFester6 see: github.com/parrot/parrot/issues/814 17:36
sorear S06:2641, S08:212
are the references to &want that I can find in the current spec
sorear wonders if it would be useful to have doc.perl6.org/want 17:37
masak +1 17:38
[Coke] that just has DONOTWANT?
DONUT WANT
17:39 wk joined
masak .oO( you may *think* you want want, but you really don't ) 17:39
masak .oO( your desire for want is really a... Proxy desire )
benabik sub want(*@, *%) { die "No you don't." } 17:41
colomon nr: say 10 +> 1
p6eval rakudo cd0258, niecza v21-1-ga8aa70b: OUTPUT«5␤»
colomon is apparently now Lord Vader of the Thomas Wooden Railway 17:43
17:49 jeffreykegler joined 17:53 jeffreykegler left 17:54 benabik left
jnthn is back home from l'hacakathon :) 17:55
masak jnthn! \o/ 17:56
sorear o/ jnthn 17:57
jnthn hi masak, sorear 17:58
arnsholt 'lo jnthn 17:59
moritz \o * 18:00
18:01 FROGGS joined
[Coke] jnthn! 18:03
masak rn: say "Jonathan!".lc.comb[0, 2, 4, 5, 7, 8] 18:04
p6eval rakudo cd0258, niecza v21-1-ga8aa70b: OUTPUT«j n t h n !␤»
masak rn: say "Jonathan!".lc.comb[0, 2, 4, 5, 7, 8].join
p6eval rakudo cd0258, niecza v21-1-ga8aa70b: OUTPUT«jnthn!␤»
18:14 kurahaupo joined 18:15 cognominal joined
dalek kudo/macros-d2: 1ac5431 | masak++ | src/ (2 files):
halfway commit, does not work

Still seems to be largly an attempt in the right direction, though.
18:17
18:18 cognominal__ left
masak just to repeat what I'm doing here: there are two places where ASTs are spliced into code in the program. 18:19
at macro application, and at unquote evaluation. 18:20
the macro application case already works, and correctly twiddles the context so that it's the static context of the original AST.
the above is an attempt to take the same code and adapt it for the unquote evalution case. 18:21
sorear I thought you already had d2 working
masak I do. apart from this bit.
making quasis behave unhygienically when they really shouldn't. 18:22
for example, this should print "EPR":
r: macro rosen($code) { my $paradox = "this should not happen"; quasi { {{{$code}}}(); } }; my $paradox = "EPR"; say rosen(sub { $paradox })
p6eval rakudo cd0258: OUTPUT«this should not happen␤»
18:33 Circlepuller left, sergot joined
sergot hi o/ 18:33
18:34 Circlepuller joined 18:36 bluescreen10 left 18:38 sirrobert joined
moritz \o sergot 18:39
18:40 spider-mario joined 18:42 wooden left 18:44 wooden joined, Circlepuller left 18:48 wooden left, wooden joined, wooden left, wooden joined 18:52 stepnem joined, popl joined
masak greetings, sergocie. 19:00
19:02 kurahaupo left
sergot I'm back. Hope I'll be more active. :) 19:04
19:05 Circlepuller joined 19:06 gongyiliao left 19:10 fhelmberger joined 19:12 fhelmberger left 19:14 GlitchMr left 19:19 benabik joined 19:21 crab2313 left 19:25 wamba left 19:32 benabik left 19:34 benabik joined 20:00 birdwindupbird joined 20:04 kaare_ left 20:05 gongyiliao joined
dalek c: bc76642 | moritz++ | lib/X/Signature/Placeholder.pod:
X::Signature::Placeholder
20:07
20:17 FireFly left, ingy left 20:18 sivoais left 20:19 sivoais joined
moritz software usability fail of the day: chromium informs me that $page is now in fullscreen (oh really? I nearly missed that) and then gives me a link called "allow". 20:21
so that I can allow something that has already happened? so that the page feels better? 20:22
masak it's easier to get forgiveness than permission :P
FROGGS what happens if you dont click allow? will it be sad?
btw: how do I make multu subs, say one that returns a Num in Num context, and an Int otherwise? 20:23
20:24 ingy joined
FROGGS is that possible? (just a regular sub, no class) 20:24
moritz no
FROGGS meh
moritz we've had this discussio today already
FROGGS I'ld like to hear yes 􏿽xF3.􏿽xF2
ohh, I missed that
20:24 FireFly joined 20:25 birdwindupbird left
FROGGS will read the log 20:25
20:25 ingyfoo joined
sorear FROGGS: consider f(g()) versus my \x = g(); f(x) 20:26
20:27 ingy left, ingy joined
sorear r: 'x'x\Int 20:27
p6eval rakudo cd0258: OUTPUT«No such method 'Int' for invocant of type 'Capture'␤ in sub infix:<x> at src/gen/CORE.setting:1040␤ in block at /tmp/B1Keal2Q85:1␤␤»
sorear r: 'x' x Int
p6eval rakudo cd0258: OUTPUT«(timeout)»
sorear n: 'x' x Int
p6eval niecza v21-1-ga8aa70b: ( no output )
moritz timeout? :( 20:28
sorear moritz: rakudobug 114670
alexandr alexeev is a #perl6-er, yes?
FROGGS sorear: I'm sorry, I dont get it 20:29
moritz FROGGS: hold on, I'm writing an FAQ entry
dalek q: e70c13b | moritz++ | answers.md:
where is want/wantarray gone?
20:31
moritz r: say Int.Int.perl 20:32
p6eval rakudo cd0258: OUTPUT«Int␤»
moritz n: say Int.Int.perl
p6eval niecza v21-1-ga8aa70b: OUTPUT«Int␤»
benabik FROGGS: Generally you want to return an object that has .Int or .Num methods to convert to the appropriate types.
FROGGS benabik: I tried to return an object of Num class, it has .Int methods, but it isnt working either 20:33
moritz FROGGS: what problem are you trying to solve?
FROGGS time is returning an Int on rakudo, and Num on niecza 20:34
sorear moritz: typo: 'this is requires'
moritz sorear: I'll fix it, thanks
FROGGS I want it to return Num in Num context
moritz FROGGS: just alway make it return a Num
benabik FROGGS: there is no such thing as Num context.
masak FROGGS: what makes you want there to be a Num context? 20:35
FROGGS ya, but my Int $time = time will fail then
moritz so write a deprecation notice for it
masak FROGGS: don't do that, then.
benabik FROGGS: multi f(Num $x) {}; multi f(Int $x); f(time); # Int or Num context?
masak FROGGS: it's either an Int or a Num. not both.
FROGGS I've read something about: class thingy { return $something but { method Num { ... } }} 20:36
masak mixins. 20:37
sorear FROGGS: 'my Int $foo = time' failing is a feature, not a bug. it tells the user that they're throwing away information
FROGGS: if the user *wants* to throw away information, 'my Int $foo = time.Int' is there for them 20:38
FROGGS typecasting, ya
dalek q: c959ee8 | moritz++ | answers.md:
fix typo. sorear++

also elaborate on how context sensititivity works in perl 6
sorear and 'my Num $x' is almost always wrong, you should have done 'my Real $x'
FROGGS I'm changing time_i to time_n and see what happens 20:40
dalek kudo/nom: 2311372 | moritz++ | src/core/Stringy.pm:
fix infinite recursion in 42 x Int
20:50 benabik left
[Coke] so, if I'm having a PAST issue, should I try the QAST branch? 20:54
(with nom)
diakopter which qast branch of what 20:55
21:00 skids left 21:01 FireFly left, FireFly joined, benabik joined
[Coke] (rephrase) so, if I'm having a PAST issue using nom, is there a branch other than master I should try that I might have better luck with? 21:03
tadzik nqp/toqast and rakudo/nqptoqast, or so
21:04 lichtkind joined
[Coke] ack. 21:05
"using nqp"
<- idiot.
so, nqp/toqast, then.
(trying to get around latest partcl-nqp/nqp2 blocker)
diakopter I thought that branch wasn't in a working state 21:06
tadzik toqast?
jnthn diakopter: It's not quite good enough to merge, but it ain't far off. :)
tadzik nqp passes its tests on it, and rakudo is starting to pass spectests 21:07
jnthn diakopter: The matching Rakudo branch only fails about 10 spectest files.
tadzik ooh
jnthn: did the Pod patch help?
jnthn tadzik: Not entirely.
[Coke] does rakudo's --get-nqp let you say which branch to bet? 21:08
*get
jnthn tadzik: The Pod patch was clearly needed (as what was there before was wrong) but the way it exploded showed up an NQP issue.
tadzik hm
can I reproduce the failures somehow?
21:09 kurahaupo joined, FireFly left 21:10 benabik left 21:13 SamuraiJack left
jnthn tadzik: make spectest, and one of the tests really early on in S02 fails 21:19
tadzik the get_pmc_keyed business? 21:21
21:21 stepnem left
jnthn yeah 21:21
I fear it's a $/ publishing issue 21:22
[Coke] jnthn: does toqast change anything in how Past.op.new(:name()) works/ 21:24
?
jnthn [Coke]: It, er, may make it not work at all? 21:25
[Coke] and/or, how can I pass :name() the name of an nqp sub and have it find it?
jnthn [Coke]: PAST::Op.new( :name('foo') ) # will generate a 'foo'()
[Coke] ok. I can't get it to find foo, even when foo exists. 21:26
... is that going to change with QAST? should I just switch to that branch and track that anyway
?
jnthn [Coke]: The QAST branch will...expect you to use QAST 21:27
With QAST that becomes QAST::Op.new( :name('foo'), :op('call') )
[Coke] any does on QAST in toqast branch? 21:28
*docs
I'm going to cry if I get this working with nqp/master and then have to change it all, so I'll just switch now and save myself the headache. 21:29
21:29 fernandocorrea_ left
ingy what do you call the % in <a> % <b> ? 21:30
timotimo &infix:<<%>>
r: say &infix:<<%>>
p6eval rakudo 231137: OUTPUT«sub infix:<%>($a?, $b?) { ... }␤»
[Coke] "modulo" 21:31
jnthn [Coke]: Doing QAST docs is high on my todo list.
[Coke] a modulo b, with the modulus operator?
[Coke] feels a slight headache coming on. ;)
jnthn [Coke]: Additionally, pmichaud was talking about doing a tutorial during the hackathon.
[Coke]: As in, complete tutorial language.
[Coke] ok. would agree it's worth switching to QAST now since nothing I have works anyway?
would *you
jnthn Yes. 21:32
[Coke] hokay.
I will ping you and pmichaud with my next bug, whatever that is. ;) 21:33
ingy [Coke]: I meant in p6 rules 21:34
lichtkind ingy: hej 21:35
ingy tag
lichtkind :)
missed you in frankfurt will come to bologna?
[Coke] I thought it wasn't % but something like +% 21:36
masak ingy: "separator specifier"?
[Coke] but IANAP6E
sorear ingy: in '<a> % <b>' I call it a "syntax error"
[Coke] (clearly. :P)
masak [Coke]: no, the + is the quantifier and % modifies it.
sorear % is a quantifier modifier
it can only appear immediately after another quantifier
it is, or at least was, similar to other modifiers like the minimal matching modifier ? 21:37
as in a+?
jnthn Woo. It seems that NQP on QAST is a little bit faster :)
sorear jnthn: :(
jnthn At least, CORE.setting built faster
That's before I wrote the optimizer
sorear: ":(" because it's only a little bit faster? 21:38
sorear yes
jnthn sorear: Well, generating better code can only compensate so much for All The Other Things.
sorear: And it's only slightly better so far. As I said, no optimization stuff yet. 21:39
sorear jnthn: is Rakudo using QAST yet? 21:40
I mis-understood this as "I switched NQP&Rakudo to QAST and only got a tiny gain"
because I would think that not using PAST would make the CORE.setting build MUCH faster! 21:41
jnthn sorear: Oh, Rakudo had already switched
dalek Heuristic branch merge: pushed 19 commits to nqp/toqast by jnthn
jnthn This is moving NQP to use QAST also.
It didn't get immediately faster BUT memory usage dropped a load. 21:42
sorear jnthn: aha. does it make the NQP bootstrap faster, somehow correcting for the time needed to compile QAST's own pm files?
jnthn Didn't time that.
felher is exicted about QAST + Optimizer. But not that exicted that he can not go and watch a movie now with a friend and a cup of mead :) 21:43
bye folks :)
japhb o/
jnthn grr, seems I left a patch or two behind on my laptop last night, which I thought I'd pushed
japhb finally catches up with backlog while the europeans are still awake 21:44
jnthn So rakudo/nqpqast spectest isn't quite as good as it should be
felher jnthn++ btw :)
dalek kudo/nqpqast: d703632 | moritz++ | src/Perl6/Grammar.pm:
warn on obsolete use of \ and | with sigilled parameter
21:45
kudo/nqpqast: fc88876 | masak++ | src/ (3 files):
X::TypeCheck::MacroUnquote -> X::TypeCheck::Splice

Patch from tadzik++ to add missing $<spaces>.
21:45 dalek left, MayDaniel left, dalek joined, ChanServ sets mode: +v dalek
japhb re: D&D -- On the recommendation of the local comic/game shop, I've been teaching my kids to roleplay using the "Pathfinder Roleplaying Game Beginner Box". A moderately simplified d20 System variant; reminds me a lot of the original D&D boxed sets I had as a kid. Really well designed for bootstrapping people from scratch into the RPG world. 21:46
kudo/nqpqast: f92c7fb | jonathan++ | src/Perl6/Metamodel/Dispatchers.pm:
Dispatcher fix (also can avoid creating an iterator).
jnthn There we go 21:49
21:49 gongyiliao left
tadzik wo :) 21:49
jnthn Thought I'd pushed those last night
Well, I probably did write the push command but...hackathon wifi was hackathon wifi. :)
tadzik :P 21:50
time to sleeps. Good knight #perl6
lichtkind good night tadzik 21:51
japhb o/
jnthn o/
21:52 sergot left
japhb moritz, re: github.com/perl6/roast/commit/f80f5a8682 , shouldn't the #OK comment be removed as well now? 21:52
22:02 xinming left 22:05 tokuhiro_ joined
sorear yes 22:06
.oO( STD could have a warning for "useless use of #OK" )
22:07
masak 'night, #perl6 22:09
jnthn gets some rest also o/ 22:19
22:26 benabik joined 22:31 stopbit left 22:32 cognominal left, cognominal joined 22:41 hoelzro is now known as hoelzro|away 22:47 skids joined
lichtkind bye jnthn 22:51
22:57 Circlepuller_ joined 22:59 Circlepuller left
ingy masak++ I coined separator indicator before I saw that 23:07
sorear: :P
japhb phenny, tell moritz Browsing over the KidsRuby GitHub info, it looks like we could build a Perl 6 clone using essentially the same technologies. Looks more or less straightforward, but some of the libraries involved will have quite large bindings, so definitely a good test of Zavolaj and a fair amount of work. But at least the path forward is well lit. :-) 23:08
phenny japhb: I'll pass that on when moritz is around.
23:23 thou left 23:37 betterworld left
felher wishes all happy (and unhappy [and with-no-particual-emotion]) perl6 people a good night. 23:39
23:39 betterworld joined
felher *particular 23:39
23:41 tokuhiro_ left