»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
00:00 agentzh left
tony-o_ ab5tract: ill check ny debian version - 00:07
00:11 virtualsue left 00:15 agentzh joined 00:16 BenGoldberg joined, mvuets left
masak I found thenewcircle.com/s/post/1639/javas...pson_video to contain very Perl 6ish ideas. "if you have a syntactical itch to scratch, you're explicitly allowed to change the language" 00:29
the biggest difference is that getify++ proposes doing the language changes with external tools in your build, whereas Perl 6 proposes to do it from within the language in modules or user code. 00:30
TimToady sort of source filters writ large
ab5tract Kristien: ah, cool! But where is the Monitor role defined? ;) 00:31
Kristien in another file
role Monitor { method events returns Channel { ... } method start { ... } method stop { ... } }
masak he also hints at lens-y source filters. not just source maps, but other things as well.
00:31 BenGoldberg left
masak some of the things he says are vapor, but I agree nonetheless. 00:31
ab5tract Kristien: yes, i meant it in a rhetorical way ;)
00:32 BenGoldberg joined
Kristien :v 00:32
ab5tract ah, is that the whole role code?
00:32 BenGoldberg left 00:33 BenGoldberg joined
Kristien yeah 00:34
masak I think the courage to change your language is the limit point of language flexibility. 00:36
00:40 fil_ joined
fil_ perl6 question 00:40
tadzik moritz: is it broken?
masak fil_: shoot 00:41
fil_ i need to print indented XML. Anyone got code/module for this?
masak fil_: use external tool. I like `tidy` myself.
fil_ the XML module doesn't put any whitespace between elements when it converts the document to a strong
it feels like a relatively straightforward regexp problem 00:42
no-one's solved it in perl6 yet?
Kristien bye!
fil_ btw I'm super impressed with perl6 so far. The Grammar construct is awesome and the general language cleanup is excellent.
masak fil_: you could use one of the (many) existing Perl 6 modules to parse XML, yes. I wouldn't, though. 00:43
fil_ I once got into an argument with Larry Wall about exceptions. (I felt perl needed a formal exception mechanism and he disagreed. curious where that's landing with perl6.
masak fil_: practically, you'll get a lot better speed an reliability from just using something like `tidy`. 00:44
fil_: Perl 6 has a formal exception mechanism. congratulations, seems you won in the end ;)
fil_ :-) I should dig up my old e-mail exchange with Larry. I actually ended up writing my own in the end...
It's critical for module re-use 00:45
so your only answer is tidy
masak m: class X::Example is Exception {}; die X::Example.new; CATCH { when X::Example { say "OH HAI" } }
camelia rakudo-moar f12020: OUTPUT«OH HAI␤»
adu fil_: I was working on an xml lib a long time ago, and then someone told me to stop
masak fil_: I'm sure there are a lot of XML parsers/formatters out there that you could use. `tidy` is the one I have experience with, and like.
adu xmllint --format - is another one 00:46
fil_ there is this one: github.com/supernovus/perl6-xml-format
masak fil_: there's nothing ignoble about shelling out to an existing tool. that's one of the strengths of the Perl ethos.
fil_ but there's no code
I'm stuck on windows. shelling out is limited.
masak recommend using one with code ;)
shelling out on Windows is entirely possible.
fil_ it's complicated because the format I'm working with isn't completely xml. 00:47
so there are parts that are xml and parts that aren't.
masak ugh.
fil_ I think I'll just write the code for XML::Format and update the git project
how hard can it be?!
assuming the current admin is arround to accept the push... 00:48
masak I think your actual problem is that your XML ain't valid.
maybe that's just me...
fil_ It wasn't designed by me
it was designed by Intuit
masak ok, so maybe it's their problem.
it's someone's problem.
fil_ well it's my problem now :-)
they also have "." in their element names which is also illegal 00:49
the error messages for the XML module suck btw
I hope someone fixes that...
It's clever how they used the Grammar to parse XML, but the only error you ever get is "cannot parse xml". 00:50
what brought me back to perl was this: www.tiobe.com/index.php/content/pap...index.html
perl hyperjumped back up to spot #9. 00:51
I wonder if perl6 is responsible for the rapid climb
masak heh -- guess TIOBE can be good for something, after all :P
fil_: that ranking is generally considered to be almost completely useless.
fil_ it's a good general indication of language use 00:52
masak I beg to differ.
fil_ we need to evaluate new languages all the time at my work. for a time we were considering clojure / scala. But Tiobe tells me neither of them are going to break into common usage. 00:53
what do you think is a better indicator?
masak oh, that's a good question. 00:54
00:54 Kristien left
masak not necessarily one I feel I have to have a good answer to in order to establish that TIOBE sucks, but still -- good. 00:55
I guess in order to establish language use, I'd use some combination of books published, blog posts written, tutorials written, active mailing lists, modules published, and just general buzz/positiveness about the language. 00:56
...as metrics.
fil_ Language popularity is a very, very hard problem to solve. But I like the high-level approach they've taken to it. Books, google, forum posts, job postings, etc. It's a good rough measure. Given any 2 languages on their top 50 list that are > 10 lines apart, I am confident the higher ranked one is more commonly used than the lower ranked one. 00:57
masak but I acknowledge that it's hard to know even with those metrics, unless you're inside the community itself. and sometimes even then.
fil_: a few years back in the Perl community, there was a lot of talk about how to artificially boost the TIOBE metric. I guess some of that succeeded. 00:58
fil_ :-) 00:59
masak or maybe it's just noise.
anyway, Ruby losing ground is consistent with my general feeling that the hipsters are moving on to younger, less well-known languages like Go and Rust and Julia. 01:00
I wouldn't recommend most people to learn C even though C is at the top of that list, and probably has been for very long. 01:01
ditto Java.
bjz finds it amusing that using Rust is now considered 'hipster' - when he started it was just 'weird'
masak bjz: oh, and Swift. totally Swift.
bjz masak: Swift was always hipster ^_^ 01:02
01:06 kjs_ joined 01:10 colomon joined
colomon o/ 01:11
01:12 skids joined
masak \o 01:12
colomon is using his new MacBook Pro for the first time 01:13
vendethiel welcome aboard :P
masak: rust can't be "hipster", it has hindley-milner! it contains research from the 60s! too advanced
masak vendethiel: "I liked HM before it was cool" :P 01:14
vendethiel hahaha
bjz :)
vendethiel "well, I was doing haskell" 01:15
bjz haskell is so hipster
:)
vendethiel if people want to move to go and julia -- more power to them. I'll stay with my reliable tools :) 01:16
bjz like perl6?
vendethiel that's more of a toy these days (since I don't have a $dayjob), but yes
bjz :)
that was ablatant troll, sorry 01:17
vendethiel I know, I know ;-)
bjz ICE to meet you, I come from Rust land
vendethiel give use those ~ and @ back :P
bjz haha
you have taken them 01:18
vendethiel us* not use
bjz they said we were too perly
:(
vendethiel hahah. I started looking at rust when it still had those, and it was really "wtf"-y
(at rust? into rust?)
bjz well, I started looking at it when there were argument modes. &x: T, &&x: T, +x: T, 01:19
++x: T
and more i think 01:20
vendethiel ahahahahhaa
very spartan...
masak TimToady: I'm reading sweetjs.org/doc/main/sweet.html now. they use the dollar sign as their unquote mechanism, which obviously we can't. but beyond that, I (a) really like how they made declaration and use feel very natural, but (b) think their whole rule/template slang is almost completely arbitrary and we could do better. still, food for thought.
bjz and I was like WILL NOT USE
vendethiel masak: glad you got to look at it :)
masak: but sweet.js is focused a whole lot on actual parsing
bjz vendethiel: sorry for off topicing, I will go back to lurk mode 01:21
vendethiel bjz: please don't :)
I'm guilty as well... Far too often
masak vendethiel: how do you mean, "focused a whole lot on actual parsing" ? 01:22
vendethiel masak: I mean -- it's meant to allow for stuff our "is parsed" should do
masak right.
vendethiel like parsing `foo 5 ( bar` 01:23
masak it seems to be their default, and I don't really mind, tbh.
vendethiel would be like $id:ident $num:expr $[(] $off:ident
masak 'is parsed' might be quite a good default.
01:23 hugme left
vendethiel also, you can define "macro classes" (like in racket), which we should have through grammar inheritance 01:23
masak :ident, :lit, :expr -- interesting. 01:24
yes, we need something like that.
and those are three *very* important ones.
actually, :ident to me breaks down into two, in effect: (i) already in scope, (ii) declared as of this usage. 01:25
vendethiel right.
we need to make (ii) happen :-)
masak totally.
vendethiel: have you had time to look at 007? 01:26
vendethiel yes, but I havn't written anything in it
.oO( how slow can that be? )
ha, the readme doesn't actually give any bit of information 01:27
vendethiel clicks the tutorial links :-)
masak vendethiel: we're halfway through implementing custom operators in a branch. after that, I expect the language to be interesting for you.
vendethiel: I'll keep you posted.
vendethiel amazing :). plan to write a blog post on that one? hehe
masak eventually.
vendethiel ha, I hadn't it watched on github. must be around my 300 watch, one more, one less... 01:28
masak :)
vendethiel "we don't currently parse parentheses" oh alright 01:29
masak oh, you're in the issues now.
vendethiel I remember taking part in the discussion of block inserting in expressions tho
masak right.
that one got a happy ending IMO.
vendethiel
.oO( nobody expect the spanish parsing )
masak that's issue #7.
01:29 hugme joined, ChanServ sets mode: +v hugme
masak wrt parentheses, that's a quirky one because it's a bit of syntax that doesn't have a Q:: node as such. 01:30
instead, it just imparts a shape on the Q:: tree.
vendethiel 'think it's a "Chain" in coffee, and, uh, we have to .unwrap() it all the time :(
well, "identifying" what a node is can be painful 01:33
masak that sounds like something I'd like to know more about.
vendethiel masak: github.com/jashkenas/coffeescript/...des.coffee ctrl-f .unwrap (or .unwrapAll) 01:34
unwrap() itself is here: github.com/jashkenas/coffeescript/...offee#L246
masak I must be a little slow. why the need for this? 01:35
you're eliminating single-node Blocks, I get that. but why?
vendethiel because we might have Parens instances around, and we can't work on those 01:36
they don't have the properties
(1; 2).b (or in js, (1, 2).b)'s AST is like `Block [Chain [Parens [Literal 1, Literal 2]], tails: [Index "b"]]` 01:37
so, anytime a node is in Parens, we need to unwrap it. 01:38
masak officially digs sweet.js's explanation about hygiene as having two parts: "binding" hygiene (things declared inside the macro), and "reference" hygiene (things declared outside the macro)
vendethiel very important bit imho :)
masak vendethiel: I see. thanks for the explanation.
vendethiel: to me, parentheses are syntax with *no* semantics. so they don't "deserve" a Q:: node. 01:39
vendethiel 's coffee-fu is pretty bad now
masak vendethiel: the only thing they do is impose structure, which the Q:: tree itself can do just fine. no need for a node.
vendethiel well, in coffee AST, 1; 2 is a block anyways
but the Parens helps to know the "level" in which we compile them
masak ok. 01:40
vendethiel (`if` at PAREN level gets compiled to ?:
and the multiple expressions to the comma operator. some stuff gets an IIFE, like throw, and jumps error out)
masak oh, some kind of statement/expr distinction.
vendethiel yes, but that's mostly to work around javascript
masak of course.
vendethiel you did hit some of our issues, though -- see #7 :) 01:41
masak right :)
masak wonders if there will evenetually emerge a "nicer" compilation target than JS itself, that people will prefer to use as a backend 01:42
vendethiel well, I mean, some people are compiling python to dart, so why not 01:43
vendethiel remembers the blog post "dart is faster than java on some while loops" and chuckles
masak Java, not JavaScript? 01:44
vendethiel yes.
masak wow.
vendethiel dart is absolutely single-threaded
colomon is trying to build rakudo for the first time on the new machine 01:45
vendethiel they've poured so many man-hours into dart, and now they're started to abandon it a bit themselves
masak Dart seems a weird mix of ambition and lack of innovation. 01:47
geekosaur agreed
vendethiel dart's as bad as go :-) 01:48
ha, even my trolls are gettign tired
colomon tage start : 0.000 01:49
Stage parse : moar(9581,0x7fff77099300) malloc: *** error for object 0x7ff772716920: pointer being freed was not allocated
:(
masak specifically, TypeScript seems a *much* better attempt at what Dart wanted to do.
vendethiel masak: have you seen safejs? row polymorphism :-)
masak vendethiel: url? 01:50
vendethiel masak: github.com/sinelaw/sjs/
masak ooh 01:51
masak adds it to his list of URLs that will figure in his world domination 01:53
vendethiel masak: did you read some of 50 years of lisp :)? 01:54
masak no. patience. :)
colomon moar-HEAD builds, anyway 01:55
Stage parse : 24.572 :)
masak colomon: what was the other thing? Parrot? 01:56
colomon masak: an older moar that can still run ABC
masak oh.
colomon: is ABC broken on newer moars? was that to do with precomp?
colomon I can’t rebuild it, but it seems to work
masak: yes
masak :/
colomon++ # machete guy in this case 01:57
colomon just double-checked, and yes, ABC still fails on moar-HEAD 01:59
masak 'night, #perl6 02:04
colomon o/
02:06 rurban joined, rurban left 02:08 colomon left, colomon joined 02:14 kjs_ left 02:25 gcole left 02:33 Pleiades` left, vendethiel left 02:35 vendethiel joined 02:39 Pleiades` joined 02:46 gfldex left 02:56 vendethiel left 03:07 fwilson left 03:36 PZt joined 03:49 espadrine_ joined, espadrine_ is now known as espadrine 03:52 noganex_ joined 03:55 noganex left 04:11 spollei left 04:23 muraiki_ left 05:04 davercc joined
TimToady "Too many directives" is still LTA, since the problem is often "too few arguments" instead. Really the message should not be judging which is correct. 05:05
alas, the message is also baked into roast
should be more like "Directives specify 2 arguments, but only 1 argument was supplied" 05:07
05:40 davercc left 05:42 adu left 05:56 telex left, telex joined 06:02 BenGoldberg left 06:05 espadrine left
moritz tadzik: synopsebot still spits out links to perlcabal.org, not design.perl6.org 06:17
06:29 regreg left 06:49 torbjorn left 07:01 araujo left 07:11 virtualsue joined 07:13 adu joined 07:25 xfix joined 07:27 sunnavy left 07:34 rindolf joined 07:46 agentzh left 07:51 rindolf left 07:56 darutoko joined 07:57 virtualsue left 08:01 vendethiel joined 08:04 virtualsue joined 08:05 prime left, prime joined
bartolin TimToady: I'm gonna change "Too many directives" in roast (fudged for now) and nqp as you suggested 08:16
08:23 vendethiel left 08:27 FROGGS[mobile] joined 08:28 ptc_p6 joined
FROGGS[mobile] fil_: XML::LibXML will soon be able to prettify XML 08:29
I hope to put that in this month's rakudo star release 08:30
fil_: can you gist an example of your almost-xml? 08:35
because libxml2 happily parses html, which is already a difficult task 08:37
08:43 dlem joined 08:49 dlem left 08:50 dlem joined 08:51 IllvilJa left 08:52 IllvilJa joined 08:55 dlem left 08:56 dlem joined
raydiak so earlier today I did this: github.com/perl6/roast/commit/3a2b...c75bab1f73 but now I'm wondering if something needs to be changed in here instead: github.com/perl6/roast/blob/master...t#L223-236 08:57
09:01 dlem left, adu left
moritz raydiak: it seems like it could benefit from being more clearer/explicit 09:03
09:03 kjs_ joined
moritz lives_ok { my @a; @a[*-1].defined } 09:03
dalek c: cd56de3 | moritz++ | lib/Type/X/Assignment/RO.pod:
document X::Assignment::RO
moritz raydiak: I can do that 09:04
09:04 dlem joined
raydiak thanks moritz++...maybe we should get rid of the one I added, which appears redundant if the existing one did what was intended 09:05
specifically S02-types/array.t line 225 seems to me like with it wrapped in a try block doesn't actually check if that is fatal or not, like it claims 09:06
dalek ast: 5ddd66b | moritz++ | S02-types/array.t:
Make tests for not-throwing on my @a; @a[*-1] more explicit
09:09
moritz raydiak: it's fine to leave in your test, which explicitly checks for Failure
none of the tests in array.t do that
raydiak ah that makes sense 09:12
09:16 Rounin joined 09:28 tinyblak joined 09:29 molaf_ joined 09:32 molaf__ left 09:35 rindolf joined 09:36 dlem left 09:37 mr-foobar joined 09:40 [Sno] left 09:41 [Sno] joined 09:43 FROGGS[mobile] left, FROGGS[mobile] joined 09:44 rindolf left 09:47 salv0 left 09:48 rurban_ joined 09:56 jmark joined 09:58 kjs_ left
dalek kudo-star-daily: 8805d6a | coke++ | log/ (9 files):
today (automated commit)
09:59
10:00 FROGGS joined 10:03 gfldex joined
FROGGS m: sub trait_mod:<is>(Routine $r, :$aka!) { say $aka; $r }; sub foo is aka<bar> { } # grrr, that's quite LTA 10:06
camelia rakudo-moar f12020: OUTPUT«bar␤===SORRY!=== Error while compiling /tmp/JqQsB9XbOA␤Required named parameter 'aka' not passed␤at /tmp/JqQsB9XbOA:1␤------> ␤»
10:07 salv0 joined
FROGGS m: multi trait_mod:<is>(Routine $r, :$aka!) { say $aka; $r }; sub foo is aka<bar> { } # took a while until I spotted that I'd need to s/sub/multi/ 10:07
camelia rakudo-moar f12020: OUTPUT«bar␤»
moritz m: await for ^5 { start { } }; say 'done' 10:11
camelia rakudo-moar f12020: OUTPUT«===SORRY!=== Error while compiling /tmp/841K6o5uCm␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)␤at /tmp/841K6o5uCm:1␤------> await for ^5 ⏏{ start { } }; say 'don…»
moritz m: await do for ^5 { start { } }; say 'done'
camelia rakudo-moar f12020: OUTPUT«Type check failed in binding &code; expected 'Callable' but got 'Hash'␤ in sub start at src/gen/m-CORE.setting:21315␤ in block <unit> at /tmp/a8XLaTqynL:1␤␤»
moritz m: await do for ^5 { start {; } }; say 'done'
camelia rakudo-moar f12020: OUTPUT«done␤»
10:15 spider-mario joined
dalek c/parallel-htmlify: f17ca34 | moritz++ | htmlify.p6:
First humble attempts to parallelize htmlify

currently dies with: Internal Error: Unwound entire stack and missed handler
10:22
moritz rakudobugs it
10:31 denis_boyun_ joined, kjs_ joined
moritz jnthn: trying to parallelize htmlify.p6 in perl6/doc reveals all sorts of "Intersting" behavior 10:37
jnthn: my second attempt produces a type check failure, with find_method_fallback in the backtrace
moritz rakudobugs its 10:38
dalek c/parallel-htmlify-2: 19d6b9b | moritz++ | htmlify.p6:
Second attempt to parallelize htmlify

dies with a type check failure, with find_method_fallback in the backtrace
10:39
Woodi hallo today #perl6 :) 10:41
I know I don't know how to use grammars but: pastebin.com/wvbxej8q
is it possible to write *nix 'grep' like tool with grammars ? 10:42
grammars needs description of all input...
moritz Woodi: not with suparse 10:43
10:43 FROGGS[mobile] left, FROGGS[mobile] joined
Woodi hmm, forget about it... checking 10:43
FROGGS Woodi: perhaps do: token TOP { .*? "bc" }; and the subparse
moritz Woodi: doc.perl6.org/type/Grammar#method_subparse 10:44
10:44 sirdancealot joined
Woodi I'm asking becouse in last 14 everyone on Earth know that grammars are next Perl regex engine... but grammars are realy grammars... 10:45
realy checking now :)
masak good antenoon, #perl6 10:46
10:47 vendethiel joined
masak sweet.js manages to *some* extent to hit a (pun intended) sweet spot, or local optimum, in terms of ease for the macro author. what you're really doing is specifying grammar rules, of course, but it doesn't *feel* like that's what you're doing... 10:49
I'm not yet convinced we can get away with that in Perl 6.
moritz \o masak
masak writing regexes and (moreso) grammars is, as everyone who has more than dabbled in it, gnarly.
is that gnarliness essential and impossible to hide to the macro author? 10:50
FROGGS masak: depends if one is only fiddling with the AST or not
masak oh, I meant syntax.
actually "is that gnarliness essential" and "is that gnarliness imporrible to hide" are two different questions... 10:51
impossible*
moritz masak: I have some thoughts on that topic, but first I have to make lunch for $little-one 10:56
10:59 pmurias joined 11:01 denis_boyun__ joined 11:02 denis_boyun_ left, Kristien joined
pmurias masak: what I think is really important is that we have something that is good for writing complex macros 11:02
masak: Perl 6 by default is a pretty awesome language so tweaking small things doesn't seem so necessary 11:04
11:07 kurahaupo joined
tadzik moritz: hmm, perhaps it was not restarted 11:08
it should probably be moved to p6c while we're at it
jnthn Gah. 11:09
.\miniparrot.exe -Iruntime\parrot\include config_lib.pir > runtime\parrot\include\config.fpmc
NMAKE : fatal error U1077: '.\miniparrot.exe' : return code '0xc0000005'
...so I can't actually build the Parrot latest NQP depends on.
Which means the 6pe-mop SEGV when building on Parrot ain't going to get fixed either. 11:10
By me in the near future, at least.
masak pmurias: good point. 11:12
jnthn: maybe leave a message to the Parrot peeps?
11:14 denis_boyun_ joined, denis_boyun__ left
vendethiel m: 3 + 4; sub ignore(Any){}; ignore 3 + 4; 11:14
camelia rakudo-moar f12020: OUTPUT«WARNINGS:␤Useless use of "+" in expression "3 + 4" in sink context (line 1)␤»
jnthn masak: github.com/parrot/parrot/issues/1190 11:16
moritz masak: I think a lot of grammar/parsing gnarliness stems from the grammar language being too low-level 11:17
masak: if you think of regexes as a programming language, what have we got?
pcre: branches, loops, literals
p6: same, plus routines, packages for grouping routines 11:18
camelia rakudo-{parrot,moar} f12020: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared routines:␤ grouping used at line 1␤ packages used at line 1␤ plus used at line 1␤ routines used at line 1␤ same used at line 1␤␤»
moritz but no types, no advanced control flow, nothing context sensitive, (nearly) no parametrization
jnthn bah, arbitrary English sentences are valid Perl 6 syntax :) 11:19
moritz lol 11:20
masak haha
kind of proving moritz++' point somehow.
moritz that was the technical perspective
pmurias offering helpers to define "idiomatic" Perl 6 macros could be helpfull 11:21
moritz the social perspective is that writing grammars and programming feel like separate skill sets (even though they share some common techniques, like debugging and testing)
and while there are many courses, books and other materials teaching programming, there are nearly none teaching "gramming" (writing grammars) 11:22
and yet we expect programmers to simply be able to write grammars
masak .oO( senior grammarian )
moritz one significant difference between grammars and regular code is that grammars have this "this didn't work? let me try something else for you" attitude 11:24
which makes sense in their domain, but it means working with them is quite a bit different than working with normal control flow
one more point: we might put too little effort in separating lexing issues from parsing issues in grammars 11:25
Woodi moritz: 80/20 principle could help. examples for 80% simple things are needed. 11:26
masak pins Woodi with a "stating the obvious" badge 11:27
moritz if you look at github.com/perl6/std/blob/master/STD.pm6#L1934 for example, that's mixing direct literals in a look-ahead with calling higher-level abstractions
that feels a bit like having to worry about memory managment in your business logic 11:28
masak moritz: I have another example of leaking abstraction levels. hold on.
Woodi and when I do something what do not giving expected result I just trying other possibilities. I'm getting realy frustrated when I have no more options for "other" things... like: why 'token noise { . }' is not working ??!
moritz there are lots of "simple things should be easy" that aren't easy in grammars 11:29
Woodi masak: thanx :) but I think "evolution" works that way, by collecting things :)
masak m: sub infix:<< -> >>($l, $r) { "It puts the $l on its $r" }; say "lotion" -> "skin"
Woodi filtering also...
camelia rakudo-moar f12020: OUTPUT«lotion␤»
moritz sorry, seems I got into ranting mode. Perl 6 grammars are way ahead of most other parsing tools, I just feel there is still a lot of evolution ahead of us 11:30
masak Woodi: I'm not picking up a lot of what you're saying, except a kind of regurgitation of common patterns.
moritz: no, it's interesting and useful.
moritz: and I agree.
I wonder if the above camelieval is a bug. I think it is. 11:31
moritz why?
masak I defined an operator...
Woodi masak: sometimes I just whining (whith hope)... maybe thats why.
moritz oh
masak Woodi: maybe you're suffering from some kind of language barrier. it's not easy to grok what you're whining about. 11:32
jnthn There's an infix -> in the grammar iirc that is meant to detect certain kinds of error...
moritz masak: seems to be a predence problem 11:33
ab5tract hmm.. is NativeCall supported on 32-bit? build fails for me
jnthn m: say "lotion" -> "skin"
camelia rakudo-moar f12020: OUTPUT«===SORRY!=== Error while compiling /tmp/ne3ZQxfbQF␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)␤at /tmp/ne3ZQxfbQF:1␤------> say "lotion" ⏏-> "skin"␤ exp…»
moritz m: sub infix:<< -> >>($l, $r) { "It puts the $l on its $r" }; say ("locaton" -> "skin")
camelia rakudo-moar f12020: OUTPUT«===SORRY!=== Error while compiling /tmp/mP5JcWV290␤Two terms in a row␤at /tmp/mP5JcWV290:1␤------> uts the $l on its $r" }; say ("locaton" ⏏-> "skin")␤ expecting any of:␤ infix stopper␤ st…»
ab5tract should probably reinstall a 64-bit, the way things have been going"
masak heh, it's basically not seeing the operator properly.
moritz - QAST::Op(call &say) say \"lotion\" 11:34
jnthn masak: github.com/perl6/std/blob/master/STD.pm6#L3149
I wonder if it's something to do with that. 11:35
11:36 denis_boyun_ left 11:38 denis_boyun joined 11:42 FROGGS[mobile]2 joined, FROGGS[mobile]2 left
FROGGS masak: about macros and whether it is about messing with the parse and/or the AST... can we keep messing with parse and AST distinct? 11:44
you know, composability ftw
11:44 sirdancealot left
FROGGS s:g/parse/parser/ I guess 11:44
masak FROGGS: I'm at a loss thinking of how we're currently failing to do that. 11:45
FROGGS like, my token category:statement_control:<blarg>($/) { <blarg> ... }
there I can affect parsing (in case it would work atm) 11:46
11:46 denis_boyun left
masak FROGGS: I mean, the parsing aspects go in the `is parsed` trait, and the AST manipulation goes in the macro body... 11:47
FROGGS and messing with the AST is what the 'macro' keyword might be all about
ahh, hmmm
masak FROGGS: hold on to that thought. I want to discuss it more. it sounds interesting.
FROGGS masak: what if I only want to affect parsing without doing the action stuff in the body?
masak making lunch now, so distracted-ish.
FROGGS np
masak FROGGS: can you come up with a concrete example of that?
11:47 FROGGS[mobile] left 11:49 anaeem1_ joined, anaeem1_ left, rindolf joined
FROGGS good point 11:49
I was thinking about Slang::Tuxic, which alters method_op and identifier, to allow whitespace before the opening parenthesis 11:50
11:50 denis_boyun_ joined
FROGGS but that does not add to a category, that replaces a token 11:50
I guess... it is stupid what I say... without fiddling with the AST (or at least handing the AST of the matched token back), such a thing would be a noop 11:53
11:53 jmark left
FROGGS so, in either case you need a macro body to actually 'make' something 11:53
11:54 tinyblak left 11:56 denis_boyun_ left 11:58 jmark joined 12:01 denis_boyun___ joined 12:03 darutoko left, darutoko joined
nine Any hints about how to find out where a "Too many positionals passed; expected 1 argument but got 3" comes from? 12:04
jnthn nine: Stack trace? :) 12:07
nine: If the one you get isn't helpful enough, try --ll-exception
nine jnthn: rakudo's withholding it from me ;)
But --ll-exception gave me a hint. Many thanks! 12:09
12:12 rindolf left 12:13 Kristien left
dalek kudo/6pe-mop: 8ec84b6 | jnthn++ | src/Perl6/Metamodel/Mixins.nqp:
Work around existing bug exposed by mixin caching.

This loses us some of the win on CORE.setting size (70% of the win is retained), but fixes the various spectest regressions. See comment in code for details.
12:14
timotimo what kind of win is this? memory? loading time? 12:16
jnthn Both 12:18
Well, 70% off CORE.setting size 12:19
Uh
70% of the existing 1MB or so saving off CORE.setting
So "only" around 700KB win now
We can have the other 30% in the future :)
timotimo then we'll be at 11mb. that's not very terrible. just a little :) 12:22
jnthn would still like to see a good bit of shrinking on that. :)
timotimo me, too 12:23
dalek kudo/6pe-mop: 994dd52 | jnthn++ | src/Perl6/ (2 files):
Support Str() coercion from Any, fix Str( Any ).
12:24
12:25 espadrine joined
moritz nine: you can also catch the exception in Perl 6 land, and print $!.backtrace.full 12:26
timotimo jnthn: how dirty are spec tests now?
12:26 jluis_ joined 12:27 virtualsue left 12:28 denis_boyun_ joined
jnthn timotimo: A tiny bit, but they all look like ones due to 6pe-mop missing some patches from nom. 12:29
12:29 denis_boyun___ left
timotimo nice :) 12:30
jnthn Got two passing todos also :) 12:31
timotimo two passing tests! that's certainly worth the weeks of work! ;) ;) 12:33
moritz hopes some of the new coercion type tests also pass 12:35
jnthn Well, also... 12:38
Before:
timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
command took 0:0:46.98 (46.98s tota
After:
timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
command took 0:0:4.84 (4.84s tota
timotimo ah, nice
12:38 rmgk_ joined, rmgk is now known as Guest36045, Guest36045 left, rmgk_ is now known as rmgk
vendethiel wow :). will prove useful in huge scale programming 12:39
vendethiel doesn't yet have ten thousands roles to compose!:
timotimo jnthn: what does the memory usage look like in those two cases?
jnthn vendethiel: No, but you might have a loop that has a "but True" in it somewhere.
vendethiel: Also, it was 100,000 :P
vendethiel do I look like I can math:p? sorry 12:40
12:40 rindolf joined
timotimo jnthn: like what we had or have in qx or run or wherever that is 12:40
hmm, math:p
12:41 denis_boyun__ joined 12:42 denis_boyun_ left
jnthn timotimo: yeah, I think there is an example 12:43
moritz also Str.trans, iirc
jnthn timotimo: I didn't measure memory use, but I expect it's more churn in the slower one, not more memory use 12:44
timotimo: It was computing a lot of stuff that then would get collected.
Whereas now we just don't re-compute it every time.
timotimo ah, OK 12:45
that's pretty good
that stuff doesn't go into the gen2 directly, eh? but now it does, i guess?
12:46 denis_boyun__ left, denis_boyun joined
jnthn Not directly, but it'll end up promoted there. 12:47
12:48 mvuets joined
timotimo mhm 12:48
12:49 denis_boyun left 12:51 Sqirrel left
pmurias vendethiel: are there things in nqp-js that you would like described? 13:00
pmurias needs to get around to writing a HACKING file for nqp-js
13:01 denis_boyun_ joined, Kristien joined 13:03 espadrine_ joined, espadrine left
moritz does anybody know what would steps would be necessary to make rakudo-m relocatable? 13:14
that is, deciding the install directory after it has been built 13:15
pmurias jnthn: how strong is that requirement that low numbered tests in nqp don't depend on more advanced features
jnthn: I'm not sure where to put the test for 'my $foo := 0;1 if $foo++;ok($foo eq 1)'
13:15 denis_boyun___ joined 13:16 denis_boyun_ left
moritz pmurias: t/nqp/13-op.t maybe? 13:17
jnthn Yeah, that'd sound about right
It's useful if the earlier tests have relatively few dependencies.
pmurias it's a bug in the if
(in nqp-js) 13:18
moritz 02-if.t then?
jnthn Maybe make it $foo == 1
moritz ++ seems to be pretty much everyhwere in the tests
jnthn Since ++ is a de-sugar in NQP to really basic things (math, binding), I'd not worry too much over using it, yeah. 13:19
pmurias jnthn: == is used in the actual test ;)
jnthn ah :)
At least, I've always implemented ++ as a de-sugar
pmurias I have implemented it in nqp-js as sort of a desugar 13:20
13:21 jluis_ left
pmurias I think I'll add a more advanced if test file, as we also need tests for 'if ... -> $var {...}' 13:22
jnthn Yeah, put those ones somewhere separate 13:23
They're a pain to handle.
13:25 frew joined 13:26 Sir_Ragnarok left
dalek p-js: 5dd0a3e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::hash(...).
13:26
p-js: 45cbf79 | (Pawel Murias)++ | / (3 files):
Fix if bug.

Add a test 86 for more tricky if cases.
p-js: e53cdb4 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Partial last, next and redo support when the loop block gets optimized out.
13:30
13:32 denis_boyun___ left 13:35 denis_boyun_ joined, kjs_ left
dalek kudo/6pe-mop: 57fe1fe | jnthn++ | src/Perl6/ (3 files):
Enable Str(Any) as a term.

You can't do much useful with it yet, but this does at least get the parsing of it straightened out.
13:40
13:46 denis_boyun___ joined 13:47 denis_boyun_ left 13:48 ichesnokov joined 13:50 beastd joined
pmurias jnthn: is there a way in nqp to get the dynamic variable from the caller? Like when creating $*BLOCK with an outer attribute (pointing to surrounding $*BLOCK)? 13:51
jnthn pmurias: Explicitly using nqp::getlexdyn or so may do it 13:52
pmurias nqp-m: sub foo() {last}; my $x := 0;while $x < 100 { $x++; foo() };say($foo); 13:57
camelia nqp-moarvm: OUTPUT«Use of undeclared variable '$foo' at line 2, near ");"␤ at gen/moar/stage2/NQPHLL.nqp:485 (/home/camelia/rakudo-inst-1/languages/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:2699 (/home/camelia/rakudo-inst-1/languages/nqp/lib/nqp.moarvm:v…»
pmurias nqp-m: sub foo() {last}; my $x := 0;while $x < 100 { $x++; foo() };say($x);
camelia nqp-moarvm: OUTPUT«Exception object creation NYI␤»
13:58 kjs_ joined
pmurias strange error message 13:58
jnthn In NQP, the last has to be lexically within the loop. 13:59
Otherwise it compiles the loop without handlers. 14:00
Kristien m: class A { has $!x = 42; method f { say $!x; } }; my $x = A.new; my &f = { $x.f }; &f()
camelia rakudo-moar f12020: OUTPUT«42␤»
jnthn You can call it just as f() also 14:01
Kristien Hmm. Is it possible to do something like my &f = &$x.f instead of using a block? E.g. for when f takes arguments.
jnthn $x.^find_method('f') is one way 14:02
Kristien Like Python f = "foo".center; f(10)
jnthn: ah I see
jnthn Thing is that $obj.foo is an actual call
14:02 Rounin left
Kristien yeah 14:02
dalek c: 646d11e | paultcochrane++ | lib/Type/IO/FileTestable.pod:
Replacing hard tab with spaces in code example

The hard tab had the effect of making the code example be split in the html; the closing brace was in a separate "code" presentation block. With this change the entire code example is in the same presentation block in the html.
14:04
c: 87bdadc | FROGGS++ | lib/Type/IO/FileTestable.pod:
Merge pull request #42 from paultcochrane/pr/remove_blank_line_in_html_output

Replacing hard tab with spaces in code example
jnthn { $x.f(|@_) } # shortest way I can think of to pass on (positional) arguments
14:05 denis_boyun joined
Kristien shiny 14:07
14:08 denis_boyun___ left, muraiki_ joined
moritz FROGGS: have you invited paultcochrane++ to the perl6 org already? 14:10
jnthn away for a bit
14:10 denis_boyun___ joined 14:11 anaeem1 joined
FROGGS moritz: ohh, wait a sec 14:11
moritz FROGGS: just did it
14:11 anaeem1 left
moritz should have waited a bit, probably 14:11
14:11 denis_boyun left
FROGGS moritz: hehe 14:12
nine m: class Foo {}; say Foo.new.end();
camelia rakudo-moar f12020: OUTPUT«0␤»
nine Where is this end() method coming from and what does it do?
moritz nine: it's a list-y method (from Any, I believe) which returns the last index 14:13
m: say <a b c>.end
camelia rakudo-moar f12020: OUTPUT«2␤»
moritz doc.perl6.org/routine/end
nine So my Foo class is a List? 14:14
masak no, but we intentionally confuse list-of-1 and scalar.
that's a Perl 5 holdover.
14:15 anaeem1_ joined
nine That's...quite surprising behaviour and is gonna be a bit hard to explain in my talk :/ 14:15
moritz m: class Foo {}; say Foo.new[0] 14:16
camelia rakudo-moar f12020: OUTPUT«Foo.new()␤»
ab5tract nine: can you explain a bit more? because it's one of those perl features that i miss elsewhere
nine It's the source of the "Too many positionals passed; expected 1 argument but got 3" message
14:16 denis_boyun_ joined
moritz when doing what? 14:16
14:17 denis_boyun___ left
nine ab5tract: my HTML::Parser subclass has an "end" method that I didn't intend it to have. HTML::Parser calls end(...) for end tags and I got the above error. 14:17
moritz I'd say it's a bug in HTML::Parser to call a method that's pre-defined in Any, but with a different signature 14:18
masak +1
ab5tract this could possibly be resolved with a multi?
masak that sounds... wrong.
ptc_p6 moritz++
masak ab5tract: multis should preferably come from the same intention.
ptc_p6 moritz: thanks :-) 14:19
nine It is gonna be hard to tell HTML::Parser maintainers that they have a bug in their Perl 5 module that was written years before Perl 6 came along :)
masak like if I have one `fib` multi that calculates fibonaccis, and one `fib` multi that produces white lies, then I would consider that a code smell.
moritz nine: oh, it's a p5 module 14:20
ab5tract masak: fair point :)
moritz nine: then create an 'end' method in your class, and tell the audience that HTML::Parser calls it
masak nine: still, it'd be awesome if they accepted a patch to check for this :D
moritz++
ptc_p6 moritz: does this mean I can now merge my PRs in perl6/specs? 14:21
14:22 kjs_ left
ab5tract not a big deal, but i could be argued that Any.end could better be written as And.end-pos ? 14:22
moritz ptc_p6: you can. Though I have no idea which ones those are
ptc_p6: if they are controversial, please discuss first
nine So in my Bot::BasicBot example I'll show a woraround for magic "say" method interfering and in my HTML::Parser example a workaround for the magic "end". That's 2 out of 4 examples where I need workarounds ;(
ptc_p6 will do
skids
.oO(why can I never get a GOOD song stuck in my head)
14:23
ptc_p6 moritz: PRs #81..#84 (just so you know) 14:24
moritz nine: on the one hand, that's unfortunate. On the other hand, it's the sad reality that cross-language interop is full of hairiness, because you violate (implicit) assumptions that the module authors made, just by providing objects with different interfaces
ptc_p6 one *could* be controversial, since I fixed up some sentences so that they flow, however, I'm not 100% sure if I changed the original meaning
don't want to screw things up as am still very much a noob 14:25
moritz ptc_p6: which one? I can take a closer look
ptc_p6 moritz: specifically the second commit in #81
I split the commits into "low risk" and "high risk" respectively
moritz The L</parser> generates an IR that is transformed to an L</AST>. 14:26
ptc_p6 that was a guess...
moritz depending on where you draw the boundary of what the parser is, the IR might be the AST
ptc_p6 however, beforehand the word "IR" was a space, and hence the meaning obscured 14:27
moritz ptc_p6: merge it, then I'll review that particular item again 14:28
ptc_p6 k
moritz ptc_p6: overall, the PR seems like an improvement
ptc_p6++
ptc_p6 thanks :-)
dalek ecs: d8d34bb | paultcochrane++ | S99-glossary.pod:
Correcting typos, minor grammatical errors, etc. in glossary

  ... adding missing full-stops, removing extra spaces within sentences,
generic editing really... These edits shouldn't (and hopefully don't) change the meaning of the explanations in the text.
14:29
ecs: 0fa840a | paultcochrane++ | S99-glossary.pod:
Rewriting some sentences in glossary for better flow

Sometimes the text didn't make sense, or there was a term or word missing, thus I've collected here the "higher risk" edits, which could *potentially* change the meaning of the text, however I have tried my utmost *not* to do so. Please accept my apologies in advance if my edits have changed the original intent.
ecs: 304203a | paultcochrane++ | S99-glossary.pod:
Merge pull request #81 from paultcochrane/pr/edit_glossary_for_typos_etc

Edit glossary for typos etc.
masak ptc_p6++
awesome commit message! \o/
dalek ecs: fc46866 | paultcochrane++ | contents.pod:
Refreshing contents.pod

This file was last updated approximately 6 months ago, so it seemed like a good idea to update it again, to incorporate more recent changes.
ecs: 65f8762 | paultcochrane++ | contents.pod:
Merge pull request #82 from paultcochrane/pr/refresh_contents_pod

Refreshing contents.pod
nine moritz: and at least that's really usefull information. Not as comfortable as showing how awesomely simple everything works, but helpful in real world situations 14:30
ab5tract nine: that's the way to see it, indeed :) 14:31
also, how bad are the two workarounds? 14:33
this is something that could proably be submitted as a pull request to perl critic or $other-linter, a warning on code that will cause these types of clashes 14:34
nine ab5tract: a simple sub end (*@args) { } for HTML::Parser but a method say(*@args) { $.parent.perl5.invoke('Bot::BasicBot', $.parent.ptr, 'say', self, |@args); } for Bot::BasicBot
Both happening because very simple method names are already taken. 14:35
ab5tract hmm.. even the more complex one their is pretty clear, and i imagine, a somewhat generic pattern 14:36
*there
nine: can't we patch Inline::Perl5 to always prefer the p5 version somehow? 14:37
in the case of an overlap 14:38
moritz that's pretty hairy to do 14:39
ab5tract or do we have .^remove_method? :) 14:40
moritz regular Perl 6 classes publish a method cache at class composition time 14:41
including all the callable methods, including those from the parent classes 14:42
so we'd need reliable introspection of the p5 parent classes to compile that table
but since p5 doesn't distinguish subs and methods, it's basically impossible to reliably introspect p5 classes for available methods 14:43
ab5tract hmm.. well the list of Any methods isn't too big
nine ab5tract: but it seems that this list is not complete. end() is not mentioned in doc.perl6.org/type/Any 14:44
moritz m: say Any.^method(:all).elems
camelia rakudo-moar f12020: OUTPUT«No such method 'method' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at /tmp/bEdBVstvod:1␤␤»
nine But including a list of such methods in Inline::Perl5's documentation will help people solve these issues more quickly.
moritz m: say Any.^methods(:all).elems
camelia rakudo-moar f12020: OUTPUT«111␤»
ab5tract for instance to take a 'black list' approach 14:45
but of course that can't work either, as the available methods can change during run time.. 14:46
nine: i think with a detailed instruction of what the Bot::BasicBot workaround is actually doing 14:48
14:50 rurban_ left
ab5tract that these will be somewhat general solutions. 14:50
<class-name>, <parent>, <method-name>, <self-ref>, <@_> 14:51
moritz ab5tract: but those methods aren't just useless annoyances. They serve a purpose, and other code can except them to be available when a type conforms to type Any
ab5tract very true 14:52
moritz so blacklisting them would be no solution
ab5tract oh, i meant nine's specific workarounds
moritz if you want to reduce the number of methods, you can make those classes inherit from Mu instead of from Any
ab5tract "but of course that can't work either" <--- that's what i think of black listing ;) 14:53
moritz ok
Kristien Where can I find how attributes are initialised by default? I can't find it in the design docs. 14:54
m: class C { has Str $.x; }; say C.new.x;
camelia rakudo-moar f12020: OUTPUT«(Str)␤»
moritz Kristien: just like variables, with the type object from the type constraint 14:55
ab5tract m: class D { has $.min = 40; }; D.min.new.say;
camelia rakudo-moar f12020: OUTPUT«Cannot look up attributes in a type object␤ in method min at src/gen/m-CORE.setting:3396␤ in block <unit> at /tmp/gJzo6tkRLG:1␤␤»
moritz Kristien: ... except for % and @ variables, which are initialized with empty instances
Kristien ah OK, thanks
ab5tract m: class D { has $.min = 40; }; D.new.min.say;
camelia rakudo-moar f12020: OUTPUT«40␤»
moritz Kristien: doc.perl6.org/language/variables#Sigils talks a bit about it, but not in detail 14:56
pmurias nqp-m: my $pos = []; $pos[0] := nqp::null(); say(nqp::isnull($pos[0]));
camelia nqp-moarvm: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " []; $pos["␤ at gen/moar/stage2/NQPHLL.nqp:485 (/home/camelia/rakudo-inst-1/languages/nqp/lib/NQPHLL.moarvm:panic:105)␤ from <unknown>:1 (/home/camelia/rakudo-inst-1/languages/nqp/lib…»
pmurias nqp-m: my $pos := []; $pos[0] := nqp::null(); say(nqp::isnull($pos[0])); 14:57
camelia nqp-moarvm: OUTPUT«0␤»
ab5tract m: class Perl { has $.min = 6 }; Perl.new.min.say; # or it can be phrased this way ;)
camelia rakudo-moar f12020: OUTPUT«6␤»
pmurias jnthn: that correct? ^^
dalek ecs: 39517ab | moritz++ | S99-glossary.pod:
glossary: Add an example for an infix
ichesnokov Hi, where can I find any information about asynchronous I/O in Perl 6? I basically want an example of how to fire a bunch of requests to a website and wait for responses asynchronously.
masak the only way to avoid direct naming collisions between methods of different intent (such as the built-in 'min' method, and one we provide) would be to namespace our methods. which feels silly, since classes are already a namespacing mechanism.
ichesnokov: there's probably a jnthn++ talk somewhere with an example like that.
ichesnokov Just like I would do with AnyEvent::HTTP in Perl 5 btw. 14:58
*maybe
Hmm, any idea what even was it? :)
dalek ecs: 6620830 | paultcochrane++ | S99-glossary.pod:
Resolving unresolved internal links in glossary
ecs: 44a21c0 | paultcochrane++ | S99-glossary.pod:
Removing whitespace-only lines in glossary

This issue was causing `podchecker` to emit the following warning in
  `S99-glossary.pod`:
   WARNING: line containing nothing but whitespace in paragraph
which has been corrected by this commit.
moritz ichesnokov: jnthn.net/papers/2014-yapceu-async.pdf
ecs: 59bd279 | paultcochrane++ | S99-glossary.pod:
Merge branch 'master' of github.com/perl6/specs
ichesnokov moritz, thanks!
moritz ichesnokov: also perl6advent.wordpress.com/2013/12/...-channels/ might be worth looking at 14:59
ichesnokov: also perl6advent.wordpress.com/2014/12/...eepy-kind/ has some more examples of promises and channels
Kristien Perl 6 is truly fascinating. 15:00
pmurias jnthn: I'm not sure how $cur_candidate := @candidates[$cur_idx]; if nqp::isnull($cur_candidate) {...} is supposed to work in multi code
moritz ichesnokov: also on doc.perl6.org/ search for Promise, Channel or Supply
pmurias jnthn: figured it out
moritz nqp-m: my @a := []; my $cur := @a[42]; say(nqp::isnull($cur)) 15:01
camelia nqp-moarvm: OUTPUT«0␤»
ab5tract ichesnokov: and here is one of jnthn's talks, about reactive programming in perl 6 www.youtube.com/watch?v=_cAl9KoXe1I 15:03
dalek ecs: 9708f2e | paultcochrane++ | S99-glossary.pod:
Correcting misplaced section links in glossary
15:05
ecs: 3de429d | paultcochrane++ | S99-glossary.pod:
Escaping slash in `$/` magic variable link

This removes the non-escaped / warning from `podchecker`
15:08 kurahaupo left
moritz how do I do a variable with a where-clause and a default value? 15:09
m: my Int $x where { * > 0 } = 42; say $x
camelia rakudo-moar f12020: OUTPUT«(Int)␤»
FROGGS m: multi trait_mod:<is>(Routine $r, :$aka!) { $r.package.^add_method($aka, $r) }; class Foo; method foo is aka<bar> { say "doing &?ROUTINE.name()" }; Foo.bar # \o/ 15:11
camelia rakudo-moar f12020: OUTPUT«doing foo␤»
FROGGS the famous 'is aka' trait
timotimo "is a car"?
moritz timotimo: aka = also known as
timotimo i know
is is aka specced? 15:12
FROGGS in a universe where a 'Ka' would be a car :o)
don't think so
moritz :-)
FROGGS I just "need" it for my libxml bindings
dalek c: ea35d8e | moritz++ | lib/Language/variables.pod:
Variables: type constraints, default values.

  Kristien++ pointed out the lack of docs
15:14
FROGGS m: multi trait_mod:<is>(Routine $r, :$aka!) { $r.set_name($aka); $r.package.^add_method($aka, $r) }; class Foo; method foo is aka<bar> { say "doing &?ROUTINE.name()" }; Foo.bar; say Foo.^methods # jnthn, how do I make that print 'bar' ? 15:18
camelia rakudo-moar f12020: OUTPUT«doing foo␤foo foo␤»
15:19 [Sno] left, [Sno] joined
dalek ecs: 61f7da8 | paultcochrane++ | S21-calling-foreign-code.pod:
Adding required empty line before `=for`
15:29
ecs: 7627040 | paultcochrane++ | S22-package-format.pod:
Removing superfluous `<` in link name

A tentative definition of YAPAE
Proposed by PerlJam
15:29 dalek left 15:30 dalek joined, ChanServ sets mode: +v dalek, rurban_ joined
ecs: f626e70 | ab5tract++ | S99-glossary.pod:
Fix missing explanation of the acronym
ecs: 6e4bea1 | paultcochrane++ | S99-glossary.pod:
Merge pull request #79 from ab5tract/patch-1

Also wrapped text and corrected a minor grammatical error.
ecs: 81358bc | paultcochrane++ | S99-glossary.pod:
Merge branch 'ab5tract-patch-1'
FROGGS fil_: perl6-m -Ilib -MXML::LibXML -e 'say parse-xml "<foo><bar/></foo>"'
<?xml version="1.0"?>
<foo>
<bar/>
</foo>
(.gist prettyfies, .Str does not) 15:44
moritz jnthn: jnthn.net/articles.shtml is a bit out of date (mentions APW 2014 as upcoming) 15:47
Kristien How can an object have multiple methods with the same name? 15:50
dalek c: f84804e | skids++ | lib/Type/Junction.pod:
Point out corner case of all()

This is probably better said here than in traps.pod
15:51
15:52 espadrine_ left 15:53 fwilson joined, espadrine_ joined 15:54 denis_boyun_ left
pmurias masak: re namespacing methods from different languages, it has some merit 15:55
masak depending on your definition of 'different languages', that's not quite what I said, though. 15:56
I meant 'different APIs', a much finer granularity than languages.
Kristien The documentation tells me what .+ and .* do but without examples.
dalek ecs: 53dfefc | (Maxim Vuets)++ | S24-testing.pod:
S24: Add missing "_" in is_approx
15:57
ecs: f507992 | (Maxim Vuets)++ | S24-testing.pod:
S24: Denote function names with a pair of parentheses

I think it's mostly a matter of taste whether one writes:
   The C<pass()> function marks a test as passed.
  ...or:
   The C<pass> function marks a test as passed.
But regardless of whichever one prefers, consistency should be superior
  (-:
synopsebot Link: perlcabal.org/syn/S24.html#Add_missing
synopsebot Link: perlcabal.org/syn/S24.html#Denote_f...arentheses
pmurias masak: so that a Perl 6 object will expose different methods in ruby land and vice versa 15:58
moritz Kristien: through inheritance, for one
m: class Parent { method x() { say 'Parent' } }; class Child is Parent { method x() say 'Child' }; Child.new.*x()
camelia rakudo-moar f12020: OUTPUT«===SORRY!=== Error while compiling /tmp/za45hbUg2P␤Missing block␤at /tmp/za45hbUg2P:1␤------> } }; class Child is Parent { method x() ⏏say 'Child' }; Child.new.*x()␤»
Kristien m: class A { method f { 1 } }; class B is A { method f { 2 } }; say B.new.+f
camelia rakudo-moar f12020: OUTPUT«2 1␤»
Kristien Ah, shiny.
pmurias masak: like having a .to_s method
moritz Kristien: though .* and .+ should only be used on types designed for that 15:59
Kristien Yeah obviously.
vendethiel pmurias: erm, I can't remember what I looked at. I think you have a task list maitained?
pmurias there is a TODO file but it doesn't contain any super fun tasks yet 16:00
16:05 ichesnokov left 16:08 denis_boyun_ joined 16:09 Kristien left 16:20 jmark left
timotimo m: say 1234.invert 16:23
camelia rakudo-moar f12020: OUTPUT«Memory allocation failed; could not allocate 640 bytes␤» 16:24
timotimo this seems to infiniloop and memorynom
moritz I doubt the usefulness of having Hash methods in Any 16:25
for List, I can see the point, because we can easily pretend that anything is a one-elemnt list
but hashes have no such obvious identity 16:26
timotimo what's the method again that turns a string backwards?
moritz timotimo: .flip
timotimo ah, right
16:26 denis_boyun_ left
moritz is always excite when 'git pull' gives a ! [rejected], because it means somebody else has also been working on "his" projects 16:30
*excited
dalek c: 2cfdaf6 | moritz++ | lib/Language/ (2 files):
Elaborate a bit on the MOP
moritz skids: in the lines you added: so all(@a, ?@a) # Does what you might have meant by the above 16:31
skids: I have no idea what I might have meant by the above
I think I'd write "all, and at least one of them" as @a && all(@a) 16:32
16:37 denis_boyun_ joined
dalek c: 470bb4d | moritz++ | lib/Type/Junction.pod:
try to clarify all() docs a bit more
16:37
16:40 anaeem1_ left 16:41 Kristien joined 16:42 kjs_ joined 16:48 anaeem1 joined
vendethiel pmurias: alright, makes sense (sorry I'm slowly backlogging...) 16:48
16:48 Alina-malina left 16:49 Alina-malina joined 16:52 spider-mario left
rurban_ Do you have a doc how to setup on win64 with msvc somewhere? Do you need a selfmade msvc perl or is the strawberry mingw64 enough? 16:53
16:53 spider-mario joined
vendethiel pmurias: how do you plan to compile non-local jumps? 17:05
the only ways I can see how to do that are very, very bad performance-wise
17:06 Ovid_ joined 17:07 CurtisOvidPoe left 17:08 avalenn joined 17:17 haroldwu left, haroldwu joined, rindolf left
Kristien i.stack.imgur.com/fAI5M.jpg 17:18
17:19 telex left 17:20 telex joined 17:23 grondilu joined 17:26 regreg joined 17:39 zakharyas joined 17:40 rurban_ left 17:42 Alina-malina left 17:43 denis_boyun_ left
pmurias vendethiel: non-local jumps? you mean goto? 17:43
vendethiel loop ones 17:44
m: sub foo {last; }; for ^5 { .say; foo when 3; }; # pmurias
camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤»
pmurias exceptions :(
vendethiel that, too
IIRC, it's specced to be lexical when it can find a jump inside the loop
but then you don't know if there's one in the body calls, or none 17:45
and so, you have to postfix every call inside a loop body with a bunch of ifs... ugh
timotimo moritz: trying to clarify all docs is a noble quest!
pmurias a bunch of if's wouldn't be that bad
vendethiel after each function call inside a loop body?
for ^5 { foo; bar; } 17:46
pmurias that case will need exceptions
vendethiel has to be compiled to `for (var i = 0; i < 5; i++) { LOOP_5435_REDO = false; foo(); if (LOOP_5435_REDO) ...; if (LOOP_5435_BREAK) break... }`
pmurias global variable won't be enough, what if the loop is inside a recursive function? 17:48
17:48 Alina-malina joined, Alina-malina left, Alina-malina joined
pmurias so I will need a try { for (var i=0; i < 5; i++) {....} } catch (e) {if (e == break_exception) {} else {...}} 17:49
Kristien You need a stack!
17:49 jeffreykegler joined
pmurias and I think exceptions turn off optimalization in v8 17:50
which sucks horribly
jeffreykegler Good morning! I'm leader of the Marpa project, and I and my project have been frequent recipients of helpful advice from this channel. I'm here for more ... 17:51
Who is the copyright holder of Perl 6?
moritz jeffreykegler: the contributors
jeffreykegler I ask because the issue of who the copyright holder should be for Marpa is now under discussion.
moritz: So it's like Linux in that respect. 17:52
moritz jeffreykegler: "Perl 6" can mean many things
jeffreykegler: there are design documents, a test suite, various implementations
jeffreykegler I'm thinking of the code, but I guess there are several codebases.
That is, the implementations.
17:53 anaeem1 left
moritz jeffreykegler: The Perl Foundation holds the copyright of Rakudo 17:53
jeffreykegler And any contribution to Rakudo is assigned, therefore?
pmurias vendethiel: redo is fully lexotic so we will only pay the price when it's used
17:54 anaeem1_ joined
moritz jeffreykegler: all major contributions 17:55
jeffreykegler: we accept small patches without explicit copyright assignment
jeffreykegler And for "major contributions" you require explicit assignment? 17:56
pmurias moritz: rakudo uses the TPF contributor license aggreement?
jeffreykegler With paperwork?
Kristien pmurias: can't you make LOOP_5435_REDO an array of booleans? 17:57
and then use push and pop 17:58
moritz jeffreykegler, pmurias: yes
jeffreykegler: we only hand out rakudo commit bits to those who have submitted a signed TPF contributor's icense agreement 17:59
pmurias moritz: the TPF one doesn't seem to assign copyright
moritz pmurias: yes, it grants a license
pmurias: which is good, because for example in Germany, copyright isn't asignable 18:00
jeffreykegler mortiz -- Does the license grant permission to re-license the software to the copyright holder? Because that's what I've been talking about in the Marpa context ...
But at least one of my community thinks that unwise and unnecessary. 18:01
pmurias what is the neccessary for?
s/the/that/
jeffreykegler And of course re-licensing of open source has certainly been abused in the past.
moritz jeffreykegler: dunno; you'd have to read it 18:02
jeffreykegler Right now I am thinking of moving a repo from LGPL to MIT -- so tht kind of thing.
moritz it's O(2 pages)
jeffreykegler The answer is not 100% clear to me, after reading www.perlfoundation.org/contributor_..._agreement 18:04
But 3.) seems to suggest re-licensing can occur -- it commits the TPF to "use your Contributions only in ways that are consistent with the open source nature of the Work" 18:05
moritz jeffreykegler: 4.1 mentions sublicensing 18:06
jeffreykegler Which I read as "Yes, we may re-license, but only for Good and never for Evil."
moritz jeffreykegler: you license your code to TPF, TPF sub-license it to the world as $chose_your_poison
18:06 SHODAN left
jeffreykegler OK so "sublicense" in the doc is equivalent to what I've been calling "re-license", because they can sublicense to the world. 18:07
moritz there's no stability clause there, so yes, license can be changed 18:08
IANAL though
18:09 SHODAN joined, grondilu left
jeffreykegler moritz: Thanks. That answers my question. 18:09
I'll take this back to the Marpa community and we'll decide what to do.
18:10 grondilu joined
jeffreykegler Btw, do I note correctly that Perl 6 is now artistic license only -- no dual license with GPL 18:10
?
pmurias it's artistic license 2.0
which is compatible with GPL
vendethiel pmurias: ah, alright for redo. still leaves last and next 18:11
moritz jeffreykegler: also the artistic license specifically has a clause for re-licensing
jeffreykegler So in fact the GPL dual license was redundant 18:12
moritz not quite
opensource.org/licenses/artistic-license-1.0 3) says you have to do at least ONE of the following 18:14
and option c) is renaming the executables, and document that
so if you do that, you're not even bound to retain the license 18:15
pmurias vendethiel: for strict nqp I think I can get away with stuff being strictly lexotic
vendethiel: maybe it could be even possible to get the spec changed for Perl 6 18:16
jeffreykegler Rakudo is Artistic 2.0, right?
pmurias none lexotic loop control doesn't seem to be very usefull
jeffreykegler It looks like its difference, at least in the section numbering
* difference -> different
moritz and opensource.org/licenses/artistic-license-2.0 has 4b as the equivalent formulation 18:17
vendethiel pmurias: this'd hurt performances a lot :)
so yeah.
moritz and 4 c ii has another re-licensing option, if I understood that correctly
pmurias vendethiel: I don't plan to implement that unless it's neccessary for something 18:19
vendethiel right. got it
jeffreykegler moritz: OK, thanks! 18:20
pmurias there is a problem that even lexotic last/next/redo can't get through a function in js: while (1) {(function() { break })()} 18:21
exceptions get through but they might be to expensive, so I plan to do var ret = (function() { return BREAK })(); if (ret === BREAK) { break } 18:22
18:25 BenGoldberg joined 18:26 BenGoldberg left 18:27 BenGoldberg joined 18:28 zakharyas left 18:33 FROGGS_ joined 18:36 FROGGS left 18:38 kjs_ left
Kristien generating ECMAScript code is fun 18:46
dalek p-js: e09910f | (Pawel Murias)++ | src/vm/js/bin/run_tests:
Fix bug in run_tests.
18:48
p-js: 38ec73c | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Last throws an exception if has a block stopping direct loop control.

No label support yet.
p-js: 30951ea | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Emit code for .post_deserialize in QAST::CompUnit's.
p-js: 566743a | (Pawel Murias)++ | src/vm/js/ (2 files):
Set the code object for QAST::Blocks with a code_object attribute.
p-js: ae81377 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
Add a lookup method on the Ctx, it's needed for code emitted for a proto foo() {()}.
p-js: 378fdc9 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Add a HACK to make "foo".WHAT not blow up when calling multi methods.
pmurias Kristien: generating fast ECMAScript code is fun 18:49
Kristien never done it :D
pmurias a good think is that once beautified I can read it. So it's easier to debug than something like .NET bytecode 18:50
Kristien I have one problem with that in my project. 18:51
In debug mode property access compiles into $lasagnascript$readProperty(x, 'p') instead of just x.p, which is not easy to read. 18:52
OTOH source maps solve that problem.
18:52 jeffreykegler left
timotimo mhhh lasagna 18:52
arnsholt pmurias: I like how it's not only a hack, but a HACK =)
18:54 jmark joined 18:57 Kristien left
pmurias arnsholt: :) 18:58
@tell Kristien luckily nqp-js supports source maps 18:59
19:00 Kristien joined
dalek p-js: c49abdf | (Pawel Murias)++ | src/vm/js/ (3 files):
Make things more sane by having an $apply method on CodeRefs instead of a Function.apply like apply.
19:00
p-js: 98e146d | (Pawel Murias)++ | src/vm/js/ (2 files):
Pass test t/nqp/51-multi.t.

Add NQPRoutine to the mini-setting.
19:13 jmark left, jmark joined
vendethiel pmurias: that last chunk of code is a bit hard to read :) 19:17
"my knowhow" is that a keyword you define somewhere? or is it provided
pmurias: what about a `var NQP_JS_LAST = {};` instead of magically last 19:18
m: my knowhow foo {} 19:19
camelia ( no output )
vendethiel oh, it's predefined, my bad
19:21 jmark_ joined 19:23 jmark__ joined 19:25 muraiki_ left, jmark left 19:26 jmark joined, kjs_ joined, jmark_ left
moritz vendethiel: a knowhow is a very primitive class 19:27
doesn't support inheritance, and iirc no role composition either
no idea if it supports attributes 19:28
dalek rl6-roast-data: 615caca | coke++ | / (5 files):
today (automated commit)
moritz ah yes, it does
19:29 jmark__ left 19:30 jmark left, agentzh joined
TimToady only private ones, I suspect 19:31
well, I guess that follows from "no inheritance"
they're really kinda structs with sugar
albeit vaguely OO sugar 19:32
pmurias vendethiel: the huge NQPRoutine chunk of code is copied over from the nqp setting 19:34
vendethiel oh, okay 19:35
19:35 bcode left, bcode joined
pmurias it will be built from files in src/core soon 19:36
vendethiel: throw "last" will be replaced with a saner object when I add labels
vendethiel oke :)
19:42 Spot__ left 19:43 Spot__ joined
dalek p-js: 6291318 | (Pawel Murias)++ | tools/build/ (2 files):
Avoid rebuilding the mini-setting on every 'make' run.
19:51
19:53 jmark joined, zakharyas joined 19:55 jmark_ joined, jmark left, jmark_ left, jmark joined, anaeem1_ left 19:56 anaeem1_ joined 19:59 jmark_ joined
tony-o_ for ^5 { UNDO { say $_; } if 0; }; 20:00
m: for ^5 { UNDO { say $_; } if 0; };
camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤4␤»
tony-o_ m: for ^5 { UNDO { say $_; } if False; };
camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤4␤»
tony-o_ ah, misread UNDO 20:03
20:03 jmark left
tony-o_ that still looks weird though 20:03
TimToady m: for ^5 { UNDO { say $_; } } 20:09
camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤4␤»
TimToady m: for ^5 { UNDO { say $_; }; 1 }
camelia ( no output )
20:14 anaeem1_ left 20:16 jmark_ left 20:17 jmark joined 20:18 jmark left, jmark joined
tony-o_ m: for ^5 { UNDO { say $_; }; 0; } 20:20
camelia ( no output )
tony-o_ m: for ^5 { UNDO { say $_; }; False; }
camelia ( no output )
tony-o_ am i making some poor assumption or wrong expectation? 20:21
20:22 darutoko left
moritz tony-o_: what's your assumption or expectation? 20:22
TimToady it appears to me to be working as designed 20:23
20:23 denis_boyun_ joined
moritz m: for ^2 { UNDO .say; Any } 20:23
camelia rakudo-moar f12020: OUTPUT«0␤1␤»
moritz m: for ^2 { UNDO .say; Any.new }
camelia ( no output )
moritz m: for ^2 { UNDO .say; fail }
camelia rakudo-moar f12020: OUTPUT«0␤␤ in block at src/gen/m-CORE.setting:8524␤ in method reify at src/gen/m-CORE.setting:8494␤ in method gimme at src/gen/m-CORE.setting:9022␤ in method sink at src/gen/m-CORE.setting:9511␤ in block <unit> at /tmp/2GMdo0w4Qd:1␤␤»
tony-o_ i'd expect the '0;' the causes UNDO to trigger 20:24
20:24 pmurias left
tony-o_ that seems like a 'False' exit to the block 20:24
or unsuccessful block exit, as it's termed in S04 20:25
TimToady see S04:1789
synopsebot Link: perlcabal.org/syn/S04.html#line_1789
tony-o_ ahh, tyvm
20:27 virtualsue joined 20:28 kjs_ left, jmark left, jmark joined 20:29 virtualsue left 20:30 kurahaupo joined 20:31 virtualsue joined
dalek c: bea39ef | paultcochrane++ | lib/ (3 files):
Replacing hard tabs with spaces
20:38
TimToady seems to me that $x.Mu::end would bypass Any::end and then do the right thing, since Mu:: is where you start looking, not where you stop
moritz it is? 20:40
TimToady that's what the notation means in P5, and I've assumed it would mean the same in P6
also assuming that Inline::P5 is working by failover
20:41 zakharyas left
moritz find_method_qualified doesn't look that way 20:41
TimToady well, then we'll have to look at that
at the moment I'm still just backlogging 20:42
mst goes on strike
TimToady m: say 42.Cool::end 20:43
camelia rakudo-moar f12020: OUTPUT«0␤»
moritz TimToady: I mis-remembered
TimToady seems to work right
moritz it does a nqp::findmethod($qtype, $name)
20:44 raiph joined
moritz so that will consider parents from superclasses of the qualified type 20:44
TimToady whew!
moritz but not fallbacks from the invocant
TimToady unwhew!
moritz no, I'd argue that's correct
because if the fallbacks are in the invocant type, they aren't in the qualified type 20:45
TimToady maybe we need a pseudoclass for the P5 dispatch
moritz or a separate meta class
though how exactly that should dispatch, I don't know 20:46
TimToady it's not quite clear whether bypassing Any should be easy or merely possible 20:49
or whether such "fallbacks" should really be processed by a class under Any somehow
moritz bypassing Any is easy right now. Just inherit directly from Mu 20:50
20:50 raiph left
dalek c: 6ce94d0 | paultcochrane++ | README:
Correcting minor typos in README
20:50
ptc_p6 anybody against me converting the doc repo's README into markdown? 20:51
moritz ptc_p6: go right ahead
ptc_p6 k :-)
21:04 virtualsue left 21:10 agentzh left 21:14 adu joined
dalek c: 640b659 | paultcochrane++ | README (2 files):
Converting the README to markdown format
21:14
21:15 kurahaupo left
ptc_p6 mvuets: thanks for closing the PR 21:16
mvuets: I hadn't noticed the instances of C<> in headings... I'd noticed though, that methods *tended* not to be formatted with C<>, hence my comment
21:28 lichtkind joined 21:33 jmark_ joined
mvuets ptc_p6: no worries. I am glad you tackled it---don't like dangling PR (-: 21:35
21:36 mvuets left, jmark left, kjs_ joined, xfix left 21:46 grondilu left 21:48 kjs_ left 21:51 BenGoldberg left 21:52 denis_boyun_ left 21:53 BenGoldberg joined
dalek kudo-star-daily: 82f90da | coke++ | log/ (9 files):
today (automated commit)
21:53
21:59 rurban_ joined, BenGoldberg left 22:00 BenGoldberg joined 22:02 Sqirrel joined, jmark_ left 22:03 jmark joined 22:13 adu left 22:18 regreg left 22:22 rurban_ left 22:25 jakesyl left 22:37 FROGGS[mobile] joined 22:42 jakesyl joined 22:44 ptc_p6 left 22:51 Majmun joined 22:53 Majmun left
Kristien Zinedine Zidane doesn't tackle bugs; he headbutts them! 23:04
23:08 dayangkun joined 23:14 zakharyas joined 23:16 jmark_ joined 23:19 jmark left
japhb Gah, having problems with a role in a module. I have effectively a lib/Foo/Bar/Baz.pm6 which defines 'role Foo::Bar::Baz { method blah { !!! } }'. When I try to use it from a script (or even -e), I get: 23:24
Method 'blah' must be implemented by Foo::Bar::Baz because it is required by a role 23:25
Well, duh. It's a role with which I want to force composing classes to implement method blah.
Kristien What's the difference between !!! and ...? 23:26
vendethiel Kristien: ..., !!! and ??? are die, fail and warn
or, uh, can't remember the order :P
japhb Kristien: how strongly it errors, basically.
Kristien Oh I see.
japhb Same problem with ... FWIW 23:27
Kristien Interesting.
23:28 jmark_ left
japhb I'm *guessing* it's because something is trying to pun the role into a class at comp_unit compile time, but that makes things rather difficult for doing what I'm trying to do, which seems like a sane thing. 23:28
23:28 jmark joined
japhb Gah, being pulled away. If anyone has any ideas for a workaround (or fix!), please .tell me and I'll come back in a bit. 23:29
23:39 zakharyas left 23:40 zakharyas joined, lichtkind left 23:51 jmark left
Kristien m: 1..* Z @lines ==> map { "$^i: $^l" } ==> { for @_ { .say } }(); 23:59
camelia rakudo-moar f12020: OUTPUT«===SORRY!=== Error while compiling /tmp/gwL3yveNTC␤Variable '@lines' is not declared. Did you mean '&lines'?␤at /tmp/gwL3yveNTC:1␤------> 1..* Z @lines⏏ ==> map { "$^i: $^l" } ==> { for @_ { .␤ expecting an…»