Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-24

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 tony-o_ ab5tract: ill check ny debian version -
00:15 agentzh joined #perl6
00:16 BenGoldberg joined #perl6
00:29 masak I found https://thenewcircle.com/s/post/1639/javascrip​t_choose_your_own_adventure_kyle_simpson_video to contain very Perl 6ish ideas. "if you have a syntactical itch to scratch, you're explicitly allowed to change the language"
00:30 masak 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
00:31 ab5tract Kristien: ah, cool! But where is the Monitor role defined? ;)
00:31 Kristien in another file
00:31 Kristien role Monitor { method events returns Channel { ... } method start { ... } method stop { ... } }
00:31 masak he also hints at lens-y source filters. not just source maps, but other things as well.
00:31 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 #perl6
00:32 Kristien :v
00:32 ab5tract ah, is that the whole role code?
00:33 BenGoldberg joined #perl6
00:34 Kristien yeah
00:36 masak I think the courage to change your language is the limit point of language flexibility.
00:40 fil_ joined #perl6
00:40 fil_ perl6 question
00:40 tadzik moritz: is it broken?
00:41 masak fil_: shoot
00:41 fil_ i  need to print indented XML.  Anyone got code/module for this?
00:41 masak fil_: use external tool. I like `tidy` myself.
00:41 fil_ the XML module doesn't put any whitespace between elements when it converts the document to a strong
00:42 fil_ it feels like a relatively straightforward regexp problem
00:42 fil_ no-one's solved it in perl6 yet?
00:42 Kristien bye!
00:42 fil_ btw I'm super impressed with perl6 so far.  The Grammar construct is awesome and the general language cleanup is excellent.
00:43 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.
00:44 masak fil_: practically, you'll get a lot better speed an reliability from just using something like `tidy`.
00:44 masak fil_: Perl 6 has a formal exception mechanism. congratulations, seems you won in the end ;)
00:44 fil_ :-) I should dig up my old e-mail exchange with Larry.  I actually ended up writing my own in the end...
00:45 fil_ It's critical for module re-use
00:45 masak m: class X::Example is Exception {}; die X::Example.new; CATCH { when X::Example { say "OH HAI" } }
00:45 fil_ so your only answer is tidy
00:45 camelia rakudo-moar f12020: OUTPUT«OH HAI␤»
00:45 adu fil_: I was working on an xml lib a long time ago, and then someone told me to stop
00:45 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.
00:46 adu xmllint --format - is another one
00:46 fil_ there is this one: https://github.com/supernovus/perl6-xml-format
00:46 masak fil_: there's nothing ignoble about shelling out to an existing tool. that's one of the strengths of the Perl ethos.
00:46 fil_ but there's no code
00:46 fil_ I'm stuck on windows.  shelling out is limited.
00:46 masak recommend using one with code ;)
00:46 masak shelling out on Windows is entirely possible.
00:47 fil_ it's complicated because the format I'm working with isn't completely xml.
00:47 fil_ so there are parts that are xml and parts that aren't.
00:47 masak ugh.
00:47 fil_ I think I'll just write the code for XML::Format and update the git project
00:47 fil_ how hard can it be?!
00:48 fil_ 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.
00:48 masak maybe that's just me...
00:48 fil_ It wasn't designed by me
00:48 fil_ it was designed by Intuit
00:48 masak ok, so maybe it's their problem.
00:48 masak it's someone's problem.
00:48 fil_ well it's my problem now :-)
00:49 fil_ they also have "." in their element names which is also illegal
00:49 fil_ the error messages for the XML module suck btw
00:49 fil_ I hope someone fixes that...
00:50 fil_ It's clever how they used the Grammar to parse XML, but the only error you ever get is "cannot parse xml".
00:50 fil_ what brought me back to perl was this: http://www.tiobe.com/index.php/c​ontent/paperinfo/tpci/index.html
00:51 fil_ perl hyperjumped back up to spot #9.
00:51 fil_ I wonder if perl6 is responsible for the rapid climb
00:51 masak heh -- guess TIOBE can be good for something, after all :P
00:51 masak fil_: that ranking is generally considered to be almost completely useless.
00:52 fil_ it's a good general indication of language use
00:52 masak I beg to differ.
00:53 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 fil_ what do you think is a better indicator?
00:54 masak oh, that's a good question.
00:55 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:56 masak 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 masak ...as metrics.
00:57 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.
00:58 masak 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:59 fil_ :-)
00:59 masak or maybe it's just noise.
01:00 masak 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:01 masak 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 masak ditto Java.
01:01 * bjz finds it amusing that using Rust is now considered 'hipster' - when he started it was just 'weird'
01:01 masak bjz: oh, and Swift. totally Swift.
01:02 bjz masak: Swift was always hipster ^_^
01:06 kjs_ joined #perl6
01:10 colomon joined #perl6
01:10 colomon o/
01:12 skids joined #perl6
01:12 masak \o
01:13 * colomon is using his new MacBook Pro for the first time
01:13 vendethiel welcome aboard :P
01:13 vendethiel masak: rust can't be "hipster", it has hindley-milner! it contains research from the 60s! too advanced
01:14 masak vendethiel: "I liked HM before it was cool" :P
01:14 vendethiel hahaha
01:14 bjz :)
01:14 vendethiel "well, I was doing haskell"
01:15 bjz haskell is so hipster
01:15 bjz :)
01:16 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?
01:16 vendethiel that's more of a toy these days (since I don't have a $dayjob), but yes
01:16 bjz :)
01:17 bjz that was ablatant troll, sorry
01:17 vendethiel I know, I know ;-)
01:17 bjz ICE to meet you, I come from Rust land
01:17 vendethiel give use those ~ and @ back :P
01:17 bjz haha
01:18 bjz you have taken them
01:18 vendethiel us* not use
01:18 bjz they said we were too perly
01:18 bjz :(
01:18 vendethiel hahah. I started looking at rust when it still had those, and it was really "wtf"-y
01:18 vendethiel (at rust? into rust?)
01:19 bjz well, I started looking at it when there were argument modes. &x: T, &&x: T, +x: T,
01:19 bjz ++x: T
01:19 bjz and more i think
01:20 vendethiel ahahahahhaa
01:20 vendethiel very spartan...
01:20 masak TimToady: I'm reading http://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.
01:20 bjz and I was like WILL NOT USE
01:20 vendethiel masak: glad you got to look at it :)
01:20 vendethiel masak: but sweet.js is focused a whole lot on actual parsing
01:21 bjz vendethiel: sorry for off topicing, I will go back to lurk mode
01:21 vendethiel bjz: please don't :)
01:21 vendethiel I'm guilty as well... Far too often
01:22 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
01:22 masak right.
01:23 vendethiel like parsing `foo 5 ( bar`
01:23 masak it seems to be their default, and I don't really mind, tbh.
01:23 vendethiel would be like $id:ident $num:expr $[(] $off:ident
01:23 masak 'is parsed' might be quite a good default.
01:23 vendethiel also, you can define "macro classes" (like in racket), which we should have through grammar inheritance
01:24 masak :ident, :lit, :expr -- interesting.
01:24 masak yes, we need something like that.
01:24 masak and those are three *very* important ones.
01:25 masak actually, :ident to me breaks down into two, in effect: (i) already in scope, (ii) declared as of this usage.
01:25 vendethiel right.
01:25 vendethiel we need to make (ii) happen :-)
01:25 masak totally.
01:26 masak vendethiel: have you had time to look at 007?
01:26 vendethiel yes, but I havn't written anything in it
01:26 vendethiel .oO( how slow can that be? )
01:27 vendethiel ha, the readme doesn't actually give any bit of information
01:27 * vendethiel clicks the tutorial links :-)
01:27 masak vendethiel: we're halfway through implementing custom operators in a branch. after that, I expect the language to be interesting for you.
01:27 masak vendethiel: I'll keep you posted.
01:27 vendethiel amazing :). plan to write a blog post on that one? hehe
01:27 masak eventually.
01:28 vendethiel ha, I hadn't it watched on github. must be around my 300 watch, one more, one less...
01:28 masak :)
01:29 vendethiel "we don't currently parse parentheses" oh alright
01:29 masak oh, you're in the issues now.
01:29 vendethiel I remember taking part in the discussion of block inserting in expressions tho
01:29 masak right.
01:29 masak that one got a happy ending IMO.
01:29 vendethiel .oO( nobody expect the spanish parsing )
01:29 masak that's issue #7.
01:29 hugme joined #perl6
01:30 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 masak instead, it just imparts a shape on the Q:: tree.
01:30 vendethiel 'think it's a "Chain" in coffee, and, uh, we have to .unwrap() it all the time :(
01:33 vendethiel well, "identifying" what a node is can be painful
01:33 masak that sounds like something I'd like to know more about.
01:34 vendethiel masak: https://github.com/jashkenas/coffee​script/blob/master/src/nodes.coffee ctrl-f .unwrap (or .unwrapAll)
01:34 vendethiel unwrap() itself is here: https://github.com/jashkenas/coffeescr​ipt/blob/master/src/nodes.coffee#L246
01:35 masak I must be a little slow. why the need for this?
01:35 masak you're eliminating single-node Blocks, I get that. but why?
01:36 vendethiel because we might have Parens instances around, and we can't work on those
01:36 vendethiel they don't have the properties
01:37 vendethiel (1; 2).b (or in js, (1, 2).b)'s AST is like `Block [Chain [Parens [Literal 1, Literal 2]], tails: [Index "b"]]`
01:38 vendethiel 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)
01:38 vendethiel very important bit imho :)
01:38 masak vendethiel: I see. thanks for the explanation.
01:39 masak 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
01:39 masak vendethiel: the only thing they do is impose structure, which the Q:: tree itself can do just fine. no need for a node.
01:39 vendethiel well, in coffee AST, 1; 2 is a block anyways
01:39 vendethiel but the Parens helps to know the "level" in which we compile them
01:40 masak ok.
01:40 vendethiel (`if` at PAREN level gets compiled to ?:
01:40 vendethiel and the multiple expressions to the comma operator. some stuff gets an IIFE, like throw, and jumps error out)
01:40 masak oh, some kind of statement/expr distinction.
01:40 vendethiel yes, but that's mostly to work around javascript
01:40 masak of course.
01:41 vendethiel you did hit some of our issues, though -- see #7 :)
01:41 masak right :)
01:42 * masak wonders if there will evenetually emerge a "nicer" compilation target than JS itself, that people will prefer to use as a backend
01:43 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
01:44 masak Java, not JavaScript?
01:44 vendethiel yes.
01:44 masak wow.
01:44 vendethiel dart is absolutely single-threaded
01:45 * 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
01:47 masak Dart seems a weird mix of ambition and lack of innovation.
01:47 geekosaur agreed
01:48 vendethiel dart's as bad as go :-)
01:48 vendethiel ha, even my trolls are gettign tired
01:49 colomon tage start      :   0.000
01:49 colomon Stage parse      : moar(9581,0x7fff77099300) malloc: *** error for object 0x7ff772716920: pointer being freed was not allocated
01:49 colomon :(
01:49 masak specifically, TypeScript seems a *much* better attempt at what Dart wanted to do.
01:49 vendethiel masak: have you seen safejs? row polymorphism :-)
01:50 masak vendethiel: url?
01:50 vendethiel masak: https://github.com/sinelaw/sjs/
01:51 masak ooh
01:53 * masak adds it to his list of URLs that will figure in his world domination
01:54 vendethiel masak: did you read some of 50 years of lisp :)?
01:54 masak no. patience. :)
01:55 colomon moar-HEAD builds, anyway
01:55 colomon Stage parse      :  24.572  :)
01:56 masak colomon: what was the other thing? Parrot?
01:56 colomon masak: an older moar that can still run ABC
01:56 masak oh.
01:56 masak colomon: is ABC broken on newer moars? was that to do with precomp?
01:56 colomon I can’t rebuild it, but it seems to work
01:56 colomon masak: yes
01:56 masak :/
01:57 masak colomon++ # machete guy in this case
01:59 * colomon just double-checked, and yes, ABC still fails on moar-HEAD
02:04 masak 'night, #perl6
02:04 colomon o/
02:06 rurban joined #perl6
02:08 colomon joined #perl6
02:35 vendethiel joined #perl6
02:39 Pleiades` joined #perl6
03:36 PZt joined #perl6
03:49 espadrine_ joined #perl6
03:52 noganex_ joined #perl6
04:11 spollei left #perl6
05:04 davercc joined #perl6
05:05 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 TimToady alas, the message is also baked into roast
05:07 TimToady should be more like "Directives specify 2 arguments, but only 1 argument was supplied"
05:56 telex joined #perl6
06:17 moritz tadzik: synopsebot still spits out links to perlcabal.org, not design.perl6.org
07:11 virtualsue joined #perl6
07:13 adu joined #perl6
07:25 xfix joined #perl6
07:34 rindolf joined #perl6
07:56 darutoko joined #perl6
08:01 vendethiel joined #perl6
08:04 virtualsue joined #perl6
08:05 prime joined #perl6
08:16 bartolin TimToady: I'm gonna change "Too many directives" in roast (fudged for now) and nqp as you suggested
08:27 FROGGS[mobile] joined #perl6
08:28 ptc_p6 joined #perl6
08:29 FROGGS[mobile] fil_: XML::LibXML will soon be able to prettify XML
08:30 FROGGS[mobile] I hope to put that in this month's rakudo star release
08:35 FROGGS[mobile] fil_: can you gist an example of your almost-xml?
08:37 FROGGS[mobile] because libxml2 happily parses html, which is already a difficult task
08:43 dlem joined #perl6
08:50 dlem joined #perl6
08:52 IllvilJa joined #perl6
08:56 dlem joined #perl6
08:57 raydiak so earlier today I did this: https://github.com/perl6/roast/commit/3​a2be8499addfbcdbbc7bf9bdc6193c75bab1f73 but now I'm wondering if something needs to be changed in here instead: https://github.com/perl6/roast/blob​/master/S02-types/array.t#L223-236
09:03 moritz raydiak: it seems like it could benefit from being more clearer/explicit
09:03 kjs_ joined #perl6
09:03 moritz lives_ok { my @a; @a[*-1].defined }
09:03 dalek doc: cd56de3 | moritz++ | lib/Type/X/Assignment/RO.pod:
09:03 dalek doc: document X::Assignment::RO
09:03 dalek doc: review: https://github.com/perl6/doc/commit/cd56de3921
09:04 moritz raydiak: I can do that
09:04 dlem joined #perl6
09:05 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:06 raydiak 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:09 dalek roast: 5ddd66b | moritz++ | S02-types/array.t:
09:09 dalek roast: Make tests for not-throwing on my @a; @a[*-1] more explicit
09:09 dalek roast: review: https://github.com/perl6/roast/commit/5ddd66bf7f
09:09 moritz raydiak: it's fine to leave in your test, which explicitly checks for Failure
09:09 moritz none of the tests in array.t do that
09:12 raydiak ah that makes sense
09:16 Rounin joined #perl6
09:28 tinyblak joined #perl6
09:29 molaf_ joined #perl6
09:35 rindolf joined #perl6
09:36 dlem left #perl6
09:37 mr-foobar joined #perl6
09:41 [Sno] joined #perl6
09:43 FROGGS[mobile] joined #perl6
09:48 rurban_ joined #perl6
09:56 jmark joined #perl6
09:59 dalek rakudo-star-daily: 8805d6a | coke++ | log/ (9 files):
09:59 dalek rakudo-star-daily: today (automated commit)
09:59 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/8805d6a592
10:00 FROGGS joined #perl6
10:03 gfldex joined #perl6
10:06 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�[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JqQsB9XbOA�Required named parameter 'aka' not passed�at /tmp/JqQsB9XbOA:1�------> �»
10:07 salv0 joined #perl6
10:07 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␤»
10:11 moritz m: await for ^5 { start { } }; say 'done'
10:11 camelia rakudo-moar f12020: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/841K6o5uCm�Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)�at /tmp/841K6o5uCm:1�------> [32mawait for ^5 [33m�[31m{ start { } }; say 'don…»
10:11 moritz m: await do for ^5 { start { } }; say 'done'
10:11 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␤␤»
10:11 moritz m: await do for ^5 { start {; } }; say 'done'
10:11 camelia rakudo-moar f12020: OUTPUT«done␤»
10:15 spider-mario joined #perl6
10:22 dalek doc/parallel-htmlify: f17ca34 | moritz++ | htmlify.p6:
10:22 dalek doc/parallel-htmlify: First humble attempts to parallelize htmlify
10:22 dalek doc/parallel-htmlify:
10:22 dalek doc/parallel-htmlify: currently dies with: Internal Error: Unwound entire stack and missed handler
10:22 dalek doc/parallel-htmlify: review: https://github.com/perl6/doc/commit/f17ca342f4
10:22 * moritz rakudobugs it
10:31 denis_boyun_ joined #perl6
10:31 kjs_ joined #perl6
10:37 moritz jnthn: trying to parallelize htmlify.p6 in perl6/doc reveals all sorts of "Intersting" behavior
10:37 moritz jnthn: my second attempt produces a type check failure, with find_method_fallback in the backtrace
10:38 * moritz rakudobugs its
10:39 dalek doc/parallel-htmlify-2: 19d6b9b | moritz++ | htmlify.p6:
10:39 dalek doc/parallel-htmlify-2: Second attempt to parallelize htmlify
10:39 dalek doc/parallel-htmlify-2:
10:39 dalek doc/parallel-htmlify-2: dies with a type check failure, with find_method_fallback in the backtrace
10:39 dalek doc/parallel-htmlify-2: review: https://github.com/perl6/doc/commit/19d6b9ba35
10:41 Woodi hallo today #perl6 :)
10:41 Woodi I know I don't know how to use grammars but:  http://pastebin.com/wvbxej8q
10:42 Woodi is it possible to write *nix 'grep' like tool with grammars ?
10:42 Woodi grammars needs description of all input...
10:43 moritz Woodi: not with suparse
10:43 FROGGS[mobile] joined #perl6
10:43 Woodi hmm, forget about it... checking
10:43 FROGGS Woodi: perhaps do: token TOP { .*? "bc" }; and the subparse
10:44 moritz Woodi: http://doc.perl6.org/type/Grammar#method_subparse
10:44 sirdancealot joined #perl6
10:45 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 Woodi realy checking now :)
10:46 masak good antenoon, #perl6
10:47 vendethiel joined #perl6
10:49 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 masak I'm not yet convinced we can get away with that in Perl 6.
10:49 moritz \o masak
10:49 masak writing regexes and (moreso) grammars is, as everyone who has more than dabbled in it, gnarly.
10:50 masak 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
10:50 masak oh, I meant syntax.
10:51 masak actually "is that gnarliness essential" and "is that gnarliness imporrible to hide" are two different questions...
10:51 masak impossible*
10:56 moritz masak: I have some thoughts on that topic, but first I have to make lunch for $little-one
10:59 pmurias joined #perl6
11:01 denis_boyun__ joined #perl6
11:02 Kristien joined #perl6
11:02 pmurias masak: what I think is really important is that we have something that is good for writing complex macros
11:04 pmurias masak: Perl 6 by default is a pretty awesome language so tweaking small things doesn't seem so necessary
11:07 kurahaupo joined #perl6
11:08 tadzik moritz: hmm, perhaps it was not restarted
11:08 tadzik it should probably be moved to p6c while we're at it
11:09 jnthn Gah.
11:09 jnthn .\miniparrot.exe -Iruntime\parrot\include config_lib.pir > runtime\parrot\include\config.fpmc
11:09 jnthn NMAKE : fatal error U1077: '.\miniparrot.exe' : return code '0xc0000005'
11:09 jnthn ...so I can't actually build the Parrot latest NQP depends on.
11:10 jnthn Which means the 6pe-mop SEGV when building on Parrot ain't going to get fixed either.
11:10 jnthn By me in the near future, at least.
11:12 masak pmurias: good point.
11:12 masak jnthn: maybe leave a message to the Parrot peeps?
11:14 denis_boyun_ joined #perl6
11:14 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)␤»
11:16 jnthn masak: https://github.com/parrot/parrot/issues/1190
11:17 moritz masak: I think a lot of grammar/parsing gnarliness stems from the grammar language being too low-level
11:17 moritz masak: if you think of regexes as a programming language, what have we got?
11:17 moritz pcre: branches, loops, literals
11:18 moritz p6: same, plus routines, packages for grouping routines
11:18 camelia rakudo-{parrot,moar} f12020: OUTPUT«[31m===[0mSORRY![31m===[0m 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â�¤â�¤Â»
11:18 moritz but no types, no advanced control flow, nothing context sensitive, (nearly) no parametrization
11:19 jnthn bah, arbitrary English sentences are valid Perl 6 syntax :)
11:20 moritz lol
11:20 masak haha
11:20 masak kind of proving moritz++' point somehow.
11:20 moritz that was the technical perspective
11:21 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)
11:22 moritz and while there are many courses, books and other materials teaching programming, there are nearly none teaching "gramming" (writing grammars)
11:22 moritz and yet we expect programmers to simply be able to write grammars
11:22 * masak .oO( senior grammarian )
11:24 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 moritz which makes sense in their domain, but it means working with them is quite a bit different than working with normal control flow
11:25 moritz one more point: we might put too little effort in separating lexing issues from parsing issues in grammars
11:26 Woodi moritz: 80/20 principle could help. examples for 80% simple things are needed.
11:27 * masak pins Woodi with a "stating the obvious" badge
11:27 moritz if you look at https://github.com/perl6/st​d/blob/master/STD.pm6#L1934 for example, that's mixing direct literals in a look-ahead with calling higher-level abstractions
11:28 moritz 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.
11:28 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 ??!
11:29 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 :)
11:29 masak m: sub infix:<< -> >>($l, $r) { "It puts the $l on its $r" }; say "lotion" -> "skin"
11:29 Woodi filtering also...
11:29 camelia rakudo-moar f12020: OUTPUT«lotion␤»
11:30 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.
11:30 masak moritz: no, it's interesting and useful.
11:30 masak moritz: and I agree.
11:31 masak I wonder if the above camelieval is a bug. I think it is.
11:31 moritz why?
11:31 masak I defined an operator...
11:31 Woodi masak: sometimes I just whining (whith hope)... maybe thats why.
11:31 moritz oh
11:32 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...
11:33 moritz masak: seems to be a predence problem
11:33 ab5tract hmm.. is NativeCall supported on 32-bit? build fails for me
11:33 jnthn m: say "lotion" -> "skin"
11:33 camelia rakudo-moar f12020: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ne3ZQxfbQFâ�¤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)â�¤at /tmp/ne3ZQxfbQF:1â�¤------> [32msay "lotion" [33mâ��[31m-> "skin"[0mâ�¤    exp…»
11:33 moritz m: sub infix:<< -> >>($l, $r) { "It puts the $l on its $r" }; say ("locaton" -> "skin")
11:33 camelia rakudo-moar f12020: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mP5JcWV290â�¤Two terms in a rowâ�¤at /tmp/mP5JcWV290:1â�¤------> [32muts the $l on its $r" }; say ("locaton" [33mâ��[31m-> "skin")[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        st…»
11:33 * ab5tract should probably reinstall a 64-bit, the way things have been going"
11:33 masak heh, it's basically not seeing the operator properly.
11:34 moritz - QAST::Op(call &say) say \"lotion\"
11:34 jnthn masak: https://github.com/perl6/st​d/blob/master/STD.pm6#L3149
11:35 jnthn I wonder if it's something to do with that.
11:38 denis_boyun joined #perl6
11:42 FROGGS[mobile]2 joined #perl6
11:44 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 FROGGS you know, composability ftw
11:44 FROGGS s:g/parse/parser/ I guess
11:45 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> ... }
11:46 FROGGS there I can affect parsing (in case it would work atm)
11:46 masak FROGGS: I mean, the parsing aspects go in the `is parsed` trait, and the AST manipulation goes in the macro body...
11:46 FROGGS and messing with the AST is what the 'macro' keyword might be all about
11:46 FROGGS ahh, hmmm
11:46 masak FROGGS: hold on to that thought. I want to discuss it more. it sounds interesting.
11:46 FROGGS masak: what if I only want to affect parsing without doing the action stuff in the body?
11:46 masak making lunch now, so distracted-ish.
11:47 FROGGS np
11:47 masak FROGGS: can you come up with a concrete example of that?
11:49 rindolf joined #perl6
11:49 anaeem1_ joined #perl6
11:49 FROGGS good point
11:50 FROGGS I was thinking about Slang::Tuxic, which alters method_op and identifier, to allow whitespace before the opening parenthesis
11:50 denis_boyun_ joined #perl6
11:50 FROGGS but that does not add to a category, that replaces a token
11:53 FROGGS 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 FROGGS so, in either case you need a macro body to actually 'make' something
11:58 jmark joined #perl6
12:01 denis_boyun___ joined #perl6
12:03 darutoko joined #perl6
12:04 nine Any hints about how to find out where a "Too many positionals passed; expected 1 argument but got 3" comes from?
12:07 jnthn nine: Stack trace? :)
12:07 jnthn nine: If the one you get isn't helpful enough, try --ll-exception
12:07 nine jnthn: rakudo's withholding it from me ;)
12:08 nine But --ll-exception gave me a hint. Many thanks!
12:14 dalek rakudo/6pe-mop: 8ec84b6 | jnthn++ | src/Perl6/Metamodel/Mixins.nqp:
12:14 dalek rakudo/6pe-mop: Work around existing bug exposed by mixin caching.
12:14 dalek rakudo/6pe-mop:
12:14 dalek rakudo/6pe-mop: This loses us some of the win on CORE.setting size (70% of the win is
12:14 dalek rakudo/6pe-mop: retained), but fixes the various spectest regressions. See comment in
12:14 dalek rakudo/6pe-mop: code for details.
12:14 dalek rakudo/6pe-mop: review: https://github.com/rakudo/rakudo/commit/8ec84b608d
12:16 timotimo what kind of win is this? memory? loading time?
12:18 jnthn Both
12:19 jnthn Well, 70% off CORE.setting size
12:19 jnthn Uh
12:19 jnthn 70% of the existing 1MB or so saving off CORE.setting
12:19 jnthn So "only" around 700KB win now
12:19 jnthn We can have the other 30% in the future :)
12:22 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. :)
12:23 timotimo me, too
12:24 dalek rakudo/6pe-mop: 994dd52 | jnthn++ | src/Perl6/ (2 files):
12:24 dalek rakudo/6pe-mop: Support Str() coercion from Any, fix Str( Any ).
12:24 dalek rakudo/6pe-mop: review: https://github.com/rakudo/rakudo/commit/994dd5286e
12:25 espadrine joined #perl6
12:26 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 #perl6
12:28 denis_boyun_ joined #perl6
12:29 jnthn timotimo: A tiny bit, but they all look like ones due to 6pe-mop missing some patches from nom.
12:30 timotimo nice :)
12:31 jnthn Got two passing todos also :)
12:33 timotimo two passing tests! that's certainly worth the weeks of work! ;) ;)
12:35 * moritz hopes some of the new coercion type tests also pass
12:38 jnthn Well, also...
12:38 jnthn Before:
12:38 jnthn timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
12:38 jnthn command took 0:0:46.98 (46.98s tota
12:38 jnthn After:
12:38 jnthn timecmd perl6-m -e "role R { }; class C { }; for ^100000 { C.new does R };"
12:38 jnthn command took 0:0:4.84 (4.84s tota
12:38 timotimo ah, nice
12:38 rmgk_ joined #perl6
12:39 vendethiel wow :). will prove useful in huge scale programming
12:39 * vendethiel doesn't yet have ten thousands roles to compose!:
12:39 timotimo jnthn: what does the memory usage look like in those two cases?
12:39 jnthn vendethiel: No, but you might have a loop that has a "but True" in it somewhere.
12:39 jnthn vendethiel: Also, it was 100,000 :P
12:40 vendethiel do I look like I can math:p? sorry
12:40 rindolf joined #perl6
12:40 timotimo jnthn: like what we had or have in qx or run or wherever that is
12:40 timotimo hmm, math:p
12:41 denis_boyun__ joined #perl6
12:43 jnthn timotimo: yeah, I think there is an example
12:43 moritz also Str.trans, iirc
12:44 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 jnthn timotimo: It was computing a lot of stuff that then would get collected.
12:44 jnthn Whereas now we just don't re-compute it every time.
12:45 timotimo ah, OK
12:45 timotimo that's pretty good
12:45 timotimo that stuff doesn't go into the gen2 directly, eh? but now it does, i guess?
12:46 denis_boyun joined #perl6
12:47 jnthn Not directly, but it'll end up promoted there.
12:48 mvuets joined #perl6
12:48 timotimo mhm
13:00 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 #perl6
13:01 Kristien joined #perl6
13:03 espadrine_ joined #perl6
13:14 moritz does anybody know what would steps would be necessary to make rakudo-m relocatable?
13:15 moritz 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
13:15 pmurias 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 #perl6
13:17 moritz pmurias: t/nqp/13-op.t maybe?
13:17 jnthn Yeah, that'd sound about right
13:17 jnthn It's useful if the earlier tests have relatively few dependencies.
13:17 pmurias it's a bug in the if
13:18 pmurias (in nqp-js)
13:18 moritz 02-if.t then?
13:18 jnthn Maybe make it $foo == 1
13:18 moritz ++ seems to be pretty much everyhwere in the tests
13:19 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 ;)
13:19 jnthn ah :)
13:19 jnthn At least, I've always implemented ++ as a de-sugar
13:20 pmurias I have implemented it in nqp-js as sort of a desugar
13:22 pmurias I think I'll add a more advanced if test file, as we also need tests for 'if ... -> $var {...}'
13:23 jnthn Yeah, put those ones somewhere separate
13:23 jnthn They're a pain to handle.
13:25 frew joined #perl6
13:26 dalek nqp-js: 5dd0a3e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
13:26 dalek nqp-js: Implement nqp::hash(...).
13:26 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/5dd0a3e6ce
13:26 dalek nqp-js: 45cbf79 | (Pawel Murias)++ | / (3 files):
13:26 dalek nqp-js: Fix if bug.
13:26 dalek nqp-js:
13:26 dalek nqp-js: Add a test 86 for more tricky if cases.
13:26 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/45cbf79cda
13:30 dalek nqp-js: e53cdb4 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
13:30 dalek nqp-js: Partial last, next and redo support when the loop block gets optimized out.
13:30 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/e53cdb4685
13:35 denis_boyun_ joined #perl6
13:40 dalek rakudo/6pe-mop: 57fe1fe | jnthn++ | src/Perl6/ (3 files):
13:40 dalek rakudo/6pe-mop: Enable Str(Any) as a term.
13:40 dalek rakudo/6pe-mop:
13:40 dalek rakudo/6pe-mop: You can't do much useful with it yet, but this does at least get the
13:40 dalek rakudo/6pe-mop: parsing of it straightened out.
13:40 dalek rakudo/6pe-mop: review: https://github.com/rakudo/rakudo/commit/57fe1fe489
13:46 denis_boyun___ joined #perl6
13:48 ichesnokov joined #perl6
13:50 beastd joined #perl6
13:51 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:52 jnthn pmurias: Explicitly using nqp::getlexdyn or so may do it
13:57 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/languag​es/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:2699  (/home/camelia/rakudo-inst-1/la​nguages/nqp/lib/nqp.moarvm:v…»
13:57 pmurias nqp-m: sub foo() {last}; my $x := 0;while $x < 100 { $x++; foo() };say($x);
13:57 camelia nqp-moarvm: OUTPUT«Exception object creation NYI␤»
13:58 kjs_ joined #perl6
13:58 pmurias strange error message
13:59 jnthn In NQP, the last has to be lexically within the loop.
14:00 jnthn 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()
14:00 camelia rakudo-moar f12020: OUTPUT«42␤»
14:01 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.
14:02 jnthn $x.^find_method('f') is one way
14:02 Kristien Like Python f = "foo".center; f(10)
14:02 Kristien jnthn: ah I see
14:02 jnthn Thing is that $obj.foo is an actual call
14:02 Kristien yeah
14:04 dalek doc: 646d11e | paultcochrane++ | lib/Type/IO/FileTestable.pod:
14:04 dalek doc: Replacing hard tab with spaces in code example
14:04 dalek doc:
14:04 dalek doc: The hard tab had the effect of making the code example be split in the html;
14:04 dalek doc: the closing brace was in a separate "code" presentation block.  With this
14:04 dalek doc: change the entire code example is in the same presentation block in the
14:04 dalek doc: html.
14:04 dalek doc: review: https://github.com/perl6/doc/commit/646d11e65f
14:04 dalek doc: 87bdadc | FROGGS++ | lib/Type/IO/FileTestable.pod:
14:04 dalek doc: Merge pull request #42 from paultcochrane/pr/remove_blank_line_in_html_output
14:04 dalek doc:
14:04 dalek doc: Replacing hard tab with spaces in code example
14:04 dalek doc: review: https://github.com/perl6/doc/commit/87bdadcf64
14:04 jnthn { $x.f(|@_) } # shortest way I can think of to pass on (positional) arguments
14:05 denis_boyun joined #perl6
14:07 Kristien shiny
14:08 muraiki_ joined #perl6
14:10 moritz FROGGS: have you invited paultcochrane++ to the perl6 org already?
14:10 * jnthn away for a bit
14:10 denis_boyun___ joined #perl6
14:11 anaeem1 joined #perl6
14:11 FROGGS moritz: ohh, wait a sec
14:11 moritz FROGGS: just did it
14:11 * moritz should have waited a bit, probably
14:12 FROGGS moritz: hehe
14:12 nine m: class Foo {}; say Foo.new.end();
14:12 camelia rakudo-moar f12020: OUTPUT«0␤»
14:12 nine Where is this end() method coming from and what does it do?
14:13 moritz nine: it's a list-y method (from Any, I believe) which returns the last index
14:13 moritz m: say <a b c>.end
14:13 camelia rakudo-moar f12020: OUTPUT«2␤»
14:13 moritz http://doc.perl6.org/routine/end
14:14 nine So my Foo class is a List?
14:14 masak no, but we intentionally confuse list-of-1 and scalar.
14:14 masak that's a Perl 5 holdover.
14:14 anaeem1_ joined #perl6
14:15 nine That's...quite surprising behaviour and is gonna be a bit hard to explain in my talk :/
14:16 moritz m: class Foo {}; say Foo.new[0]
14:16 camelia rakudo-moar f12020: OUTPUT«Foo.new()␤»
14:16 ab5tract nine: can you explain a bit more? because it's one of those perl features that i miss elsewhere
14:16 nine It's the source of the "Too many positionals passed; expected 1 argument but got 3" message
14:16 denis_boyun_ joined #perl6
14:16 moritz when doing what?
14:17 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:18 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
14:18 ab5tract this could possibly be resolved with a multi?
14:18 masak that sounds... wrong.
14:18 ptc_p6 moritz++
14:18 masak ab5tract: multis should preferably come from the same intention.
14:19 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 :)
14:19 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.
14:20 moritz nine: oh, it's a p5 module
14:20 ab5tract masak: fair point :)
14:20 moritz nine: then create an 'end' method in your class, and tell the audience that HTML::Parser calls it
14:20 masak nine: still, it'd be awesome if they accepted a patch to check for this :D
14:20 masak moritz++
14:21 ptc_p6 moritz: does this mean I can now merge my PRs in perl6/specs?
14:22 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
14:22 moritz ptc_p6: if they are controversial, please discuss first
14:22 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 ;(
14:22 ptc_p6 will do
14:23 skids .oO(why can I never get a GOOD song stuck in my head)
14:24 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
14:24 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
14:25 ptc_p6 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
14:25 ptc_p6 moritz: specifically the second commit in #81
14:25 ptc_p6 I split the commits into "low risk" and "high risk" respectively
14:26 moritz The L</parser> generates an IR that is transformed to an L</AST>.
14:26 ptc_p6 that was a guess...
14:26 moritz depending on where you draw the boundary of what the parser is, the IR might be the AST
14:27 ptc_p6 however, beforehand the word "IR" was a space, and hence the meaning obscured
14:28 moritz ptc_p6: merge it, then I'll review that particular item again
14:28 ptc_p6 k
14:28 moritz ptc_p6: overall, the PR seems like an improvement
14:28 moritz ptc_p6++
14:28 ptc_p6 thanks :-)
14:29 dalek specs: d8d34bb | paultcochrane++ | S99-glossary.pod:
14:29 dalek specs: Correcting typos, minor grammatical errors, etc. in glossary
14:29 dalek specs:
14:29 dalek specs: ... adding missing full-stops, removing extra spaces within sentences,
14:29 dalek specs: generic editing really...  These edits shouldn't (and hopefully don't)
14:29 dalek specs: change the meaning of the explanations in the text.
14:29 dalek specs: review: https://github.com/perl6/specs/commit/d8d34bbae4
14:29 dalek specs: 0fa840a | paultcochrane++ | S99-glossary.pod:
14:29 dalek specs: Rewriting some sentences in glossary for better flow
14:29 dalek specs:
14:29 dalek specs: Sometimes the text didn't make sense, or there was a term or word missing,
14:29 dalek specs: thus I've collected here the "higher risk" edits, which could *potentially*
14:29 dalek specs: change the meaning of the text, however I have tried my utmost *not* to do
14:29 dalek specs: so.  Please accept my apologies in advance if my edits have changed the
14:29 dalek specs: original intent.
14:29 dalek specs: review: https://github.com/perl6/specs/commit/0fa840a650
14:29 dalek specs: 304203a | paultcochrane++ | S99-glossary.pod:
14:29 dalek specs: Merge pull request #81 from paultcochrane/pr/edit_glossary_for_typos_etc
14:29 dalek specs:
14:29 dalek specs: Edit glossary for typos etc.
14:29 dalek specs: review: https://github.com/perl6/specs/commit/304203ab5c
14:29 masak ptc_p6++
14:29 masak awesome commit message! \o/
14:29 dalek specs: fc46866 | paultcochrane++ | contents.pod:
14:29 dalek specs: Refreshing contents.pod
14:29 dalek specs:
14:29 dalek specs: This file was last updated approximately 6 months ago, so it seemed like a
14:29 dalek specs: good idea to update it again, to incorporate more recent changes.
14:29 dalek specs: review: https://github.com/perl6/specs/commit/fc468668e5
14:29 dalek specs: 65f8762 | paultcochrane++ | contents.pod:
14:29 dalek specs: Merge pull request #82 from paultcochrane/pr/refresh_contents_pod
14:29 dalek specs:
14:29 dalek specs: Refreshing contents.pod
14:29 dalek specs: review: https://github.com/perl6/specs/commit/65f876255e
14:30 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:31 ab5tract nine: that's the way to see it, indeed :)
14:33 ab5tract also, how bad are the two workarounds?
14:34 ab5tract 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
14:35 nine Both happening because very simple method names are already taken.
14:36 ab5tract hmm.. even the more complex one their is pretty clear, and i imagine, a  somewhat generic pattern
14:36 ab5tract *there
14:37 ab5tract nine: can't we patch Inline::Perl5 to always prefer the p5 version somehow?
14:38 ab5tract in the case of an overlap
14:39 moritz that's pretty hairy to do
14:40 ab5tract or do we have .^remove_method? :)
14:41 moritz regular Perl 6 classes publish a method cache at class composition time
14:42 moritz including all the callable methods, including those from the parent classes
14:42 moritz so we'd need reliable introspection of the p5 parent classes to compile that table
14:43 moritz 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
14:44 nine ab5tract: but it seems that this list is not complete. end() is not mentioned in http://doc.perl6.org/type/Any
14:44 moritz m: say Any.^method(:all).elems
14:44 camelia rakudo-moar f12020: OUTPUT«No such method 'method' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/bEdBVstvod:1␤␤»
14:44 nine But including a list of such methods in Inline::Perl5's documentation will help people solve these issues more quickly.
14:44 moritz m: say Any.^methods(:all).elems
14:44 camelia rakudo-moar f12020: OUTPUT«111␤»
14:45 ab5tract for instance to take a 'black list' approach
14:46 ab5tract but of course that can't work either, as the available methods can change during run time..
14:48 ab5tract nine: i think with a detailed instruction of what the Bot::BasicBot workaround is actually doing
14:50 ab5tract that these will be somewhat general solutions.
14:51 ab5tract <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
14:52 ab5tract very true
14:52 moritz so blacklisting them would be no solution
14:52 ab5tract oh, i meant nine's specific workarounds
14:52 moritz if you want to reduce the number of methods, you can make those classes inherit from Mu instead of from Any
14:53 ab5tract "but of course that can't work either" <--- that's what i think of black listing ;)
14:53 moritz ok
14:54 Kristien Where can I find how attributes are initialised by default? I can't find it in the design docs.
14:54 Kristien m: class C { has Str $.x; }; say C.new.x;
14:54 camelia rakudo-moar f12020: OUTPUT«(Str)␤»
14:55 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;
14:55 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␤␤»
14:55 moritz Kristien: ... except for % and @ variables, which are initialized with empty instances
14:55 Kristien ah OK, thanks
14:55 ab5tract m: class D { has $.min = 40; }; D.new.min.say;
14:55 camelia rakudo-moar f12020: OUTPUT«40␤»
14:56 moritz Kristien: http://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]));
14:56 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/languag​es/nqp/lib/NQPHLL.moarvm:panic:105)␤ from <unknown>:1  (/home/camelia/rakudo-inst-1/languages/nqp/lib…»
14:57 pmurias nqp-m: my $pos := []; $pos[0] := nqp::null(); say(nqp::isnull($pos[0]));
14:57 camelia nqp-moarvm: OUTPUT«0␤»
14:57 ab5tract m: class Perl { has $.min = 6 }; Perl.new.min.say;  # or it can be phrased this way ;)
14:57 camelia rakudo-moar f12020: OUTPUT«6␤»
14:57 pmurias jnthn: that correct? ^^
14:57 dalek specs: 39517ab | moritz++ | S99-glossary.pod:
14:57 dalek specs: glossary: Add an example for an infix
14:57 dalek specs: review: https://github.com/perl6/specs/commit/39517abc8e
14:57 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.
14:57 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.
14:57 masak ichesnokov: there's probably a jnthn++ talk somewhere with an example like that.
14:58 ichesnokov Just like I would do with AnyEvent::HTTP in Perl 5 btw.
14:58 ichesnokov *maybe
14:58 ichesnokov Hmm, any idea what even was it? :)
14:58 dalek specs: 6620830 | paultcochrane++ | S99-glossary.pod:
14:58 dalek specs: Resolving unresolved internal links in glossary
14:58 dalek specs: review: https://github.com/perl6/specs/commit/6620830732
14:58 dalek specs: 44a21c0 | paultcochrane++ | S99-glossary.pod:
14:58 dalek specs: Removing whitespace-only lines in glossary
14:58 dalek specs:
14:58 dalek specs: This issue was causing `podchecker` to emit the following warning in
14:58 moritz ichesnokov: http://jnthn.net/papers/2014-yapceu-async.pdf
14:58 dalek specs: `S99-glossary.pod`:
14:58 dalek specs:
14:58 dalek specs:     WARNING: line containing nothing but whitespace in paragraph
14:58 dalek specs:
14:58 dalek specs: which has been corrected by this commit.
14:58 dalek specs: review: https://github.com/perl6/specs/commit/44a21c0439
14:58 dalek specs: 59bd279 | paultcochrane++ | S99-glossary.pod:
14:58 dalek specs: Merge branch 'master' of https://github.com/perl6/specs
14:58 dalek specs: review: https://github.com/perl6/specs/commit/59bd279049
14:58 ichesnokov moritz, thanks!
14:58 moritz ichesnokov: also https://perl6advent.wordpress.com/2013/12/14/a​synchronous-programming-promises-and-channels/ might be worth looking at
14:59 moritz ichesnokov: also https://perl6advent.wordpress.com/2014/12​/23/webscale-sorting-of-the-sleepy-kind/ has some more examples of promises and channels
15:00 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
15:00 moritz ichesnokov: also on http://doc.perl6.org/ search for Promise, Channel or Supply
15:00 pmurias jnthn: figured it out
15:01 moritz nqp-m: my @a := []; my $cur := @a[42]; say(nqp::isnull($cur))
15:01 camelia nqp-moarvm: OUTPUT«0␤»
15:03 ab5tract ichesnokov: and here is one of jnthn's talks, about reactive programming in perl 6 https://www.youtube.com/watch?v=_cAl9KoXe1I
15:05 dalek specs: 9708f2e | paultcochrane++ | S99-glossary.pod:
15:05 dalek specs: Correcting misplaced section links in glossary
15:05 dalek specs: review: https://github.com/perl6/specs/commit/9708f2e3ec
15:05 dalek specs: 3de429d | paultcochrane++ | S99-glossary.pod:
15:05 dalek specs: Escaping slash in `$/` magic variable link
15:05 dalek specs:
15:05 dalek specs: This removes the non-escaped / warning from `podchecker`
15:05 dalek specs: review: https://github.com/perl6/specs/commit/3de429d4c8
15:09 moritz how do I do a variable with a where-clause and a default value?
15:09 moritz m: my Int $x where { * > 0 } = 42; say $x
15:09 camelia rakudo-moar f12020: OUTPUT«(Int)␤»
15:11 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␤»
15:11 FROGGS the famous 'is aka' trait
15:11 timotimo "is a car"?
15:11 moritz timotimo: aka = also known as
15:11 timotimo i know
15:12 timotimo is is aka specced?
15:12 FROGGS in a universe where a 'Ka' would be a car :o)
15:12 FROGGS don't think so
15:12 moritz :-)
15:12 FROGGS I just "need" it for my libxml bindings
15:14 dalek doc: ea35d8e | moritz++ | lib/Language/variables.pod:
15:14 dalek doc: Variables: type constraints, default values.
15:14 dalek doc:
15:14 dalek doc: Kristien++ pointed out the lack of docs
15:14 dalek doc: review: https://github.com/perl6/doc/commit/ea35d8e75d
15:18 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] joined #perl6
15:29 dalek specs: 61f7da8 | paultcochrane++ | S21-calling-foreign-code.pod:
15:29 dalek specs: Adding required empty line before `=for`
15:29 dalek specs: review: https://github.com/perl6/specs/commit/61f7da8042
15:29 dalek specs: 7627040 | paultcochrane++ | S22-package-format.pod:
15:29 dalek specs: Removing superfluous `<` in link name
15:30 dalek joined #perl6
15:30 rurban_ joined #perl6
15:43 dalek specs: 7741735 | ab5tract++ | S99-glossary.pod:
15:43 dalek specs: A tentative definition of YAPAE
15:43 dalek specs:
15:43 dalek specs: Proposed by PerlJam
15:43 dalek specs: review: https://github.com/perl6/specs/commit/7741735661
15:43 dalek specs: f626e70 | ab5tract++ | S99-glossary.pod:
15:43 dalek specs: Fix missing explanation of the acronym
15:43 dalek specs: review: https://github.com/perl6/specs/commit/f626e7097e
15:43 dalek specs: 6e4bea1 | paultcochrane++ | S99-glossary.pod:
15:43 dalek specs: Merge pull request #79 from ab5tract/patch-1
15:43 dalek specs:
15:43 dalek specs: Also wrapped text and corrected a minor grammatical error.
15:43 dalek specs: review: https://github.com/perl6/specs/commit/6e4bea1055
15:43 dalek specs: 81358bc | paultcochrane++ | S99-glossary.pod:
15:43 dalek specs: Merge branch 'ab5tract-patch-1'
15:43 dalek specs: review: https://github.com/perl6/specs/commit/81358bc659
15:43 FROGGS fil_: perl6-m -Ilib -MXML::LibXML -e 'say parse-xml "<foo><bar/></foo>"'
15:43 FROGGS <?xml version="1.0"?>
15:43 FROGGS <foo>
15:43 FROGGS <bar/>
15:43 FROGGS </foo>
15:44 FROGGS (.gist prettyfies, .Str does not)
15:47 moritz jnthn: http://jnthn.net/articles.shtml is a bit out of date (mentions APW 2014 as upcoming)
15:50 Kristien How can an object have multiple methods with the same name?
15:51 dalek doc: f84804e | skids++ | lib/Type/Junction.pod:
15:51 dalek doc: Point out corner case of all()
15:51 dalek doc:
15:51 dalek doc: This is probably better said here than in traps.pod
15:51 dalek doc: review: https://github.com/perl6/doc/commit/f84804e5ae
15:53 fwilson joined #perl6
15:53 espadrine_ joined #perl6
15:55 pmurias masak: re namespacing methods from different languages, it has some merit
15:56 masak depending on your definition of 'different languages', that's not quite what I said, though.
15:56 masak I meant 'different APIs', a much finer granularity than languages.
15:56 Kristien The documentation tells me what .+ and .* do but without examples.
15:57 dalek specs: 53dfefc | (Maxim Vuets)++ | S24-testing.pod:
15:57 dalek specs: S24: Add missing "_" in is_approx
15:57 dalek specs: review: https://github.com/perl6/specs/commit/53dfefc80c
15:57 dalek specs: f507992 | (Maxim Vuets)++ | S24-testing.pod:
15:57 dalek specs: S24: Denote function names with a pair of parentheses
15:57 synopsebot Link: http://perlcabal.org/syn/S24.html#Add_missing
15:57 synopsebot Link: http://perlcabal.org/syn/S24.html#Denote_​function_names_with_a_pair_of_parentheses
15:57 dalek specs:
15:57 dalek specs: I think it's mostly a matter of taste whether one writes:
15:57 dalek specs:
15:57 dalek specs:      The C<pass()> function marks a test as passed.
15:57 dalek specs:
15:57 dalek specs: ...or:
15:57 dalek specs:
15:57 dalek specs:      The C<pass> function marks a test as passed.
15:57 dalek specs:
15:57 dalek specs: But regardless of whichever one prefers, consistency should be superior
15:57 dalek specs: (-:
15:57 dalek specs: review: https://github.com/perl6/specs/commit/f5079924c2
15:57 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
15:58 moritz m: class Parent { method x() { say 'Parent' } }; class Child is Parent { method x() say 'Child' }; Child.new.*x()
15:58 camelia rakudo-moar f12020: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/za45hbUg2P�Missing block�at /tmp/za45hbUg2P:1�------> [32m} }; class Child is Parent { method x() [33m�[31msay 'Child' }; Child.new.*x()[0m�»
15:58 Kristien m: class A { method f { 1 } }; class B is A { method f { 2 } }; say B.new.+f
15:58 camelia rakudo-moar f12020: OUTPUT«2 1␤»
15:58 Kristien Ah, shiny.
15:58 pmurias masak: like having a .to_s method
15:59 moritz Kristien: though .* and .+ should only be used on types designed for that
15:59 Kristien Yeah obviously.
15:59 vendethiel pmurias: erm, I can't remember what I looked at. I think you have a task list maitained?
16:00 pmurias there is a TODO file but it doesn't contain any super fun tasks yet
16:08 denis_boyun_ joined #perl6
16:23 timotimo m: say 1234.invert
16:24 camelia rakudo-moar f12020: OUTPUT«Memory allocation failed; could not allocate 640 bytes␤»
16:24 timotimo this seems to infiniloop and memorynom
16:25 moritz I doubt the usefulness of having Hash methods in Any
16:25 moritz for List, I can see the point, because we can easily pretend that anything is a one-elemnt list
16:26 moritz but hashes have no such obvious identity
16:26 timotimo what's the method again that turns a string backwards?
16:26 moritz timotimo: .flip
16:26 timotimo ah, right
16:30 * moritz is always excite when 'git pull' gives a ! [rejected], because it means somebody else has also been working on "his" projects
16:30 moritz *excited
16:30 dalek doc: 2cfdaf6 | moritz++ | lib/Language/ (2 files):
16:30 dalek doc: Elaborate a bit on the MOP
16:30 dalek doc: review: https://github.com/perl6/doc/commit/2cfdaf615d
16:31 moritz skids: in the lines you added:  so all(@a, ?@a) # Does what you might have meant by the above
16:31 moritz skids: I have no idea what I might have meant by the above
16:32 moritz I think I'd write "all, and at least one of them" as  @a && all(@a)
16:37 denis_boyun_ joined #perl6
16:37 dalek doc: 470bb4d | moritz++ | lib/Type/Junction.pod:
16:37 dalek doc: try to clarify all() docs a bit more
16:37 dalek doc: review: https://github.com/perl6/doc/commit/470bb4d601
16:41 Kristien joined #perl6
16:42 kjs_ joined #perl6
16:48 anaeem1 joined #perl6
16:48 vendethiel pmurias: alright, makes sense (sorry I'm slowly backlogging...)
16:49 Alina-malina joined #perl6
16:53 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 spider-mario joined #perl6
17:05 vendethiel pmurias: how do you plan to compile non-local jumps?
17:05 vendethiel the only ways I can see how to do that are very, very bad performance-wise
17:06 Ovid_ joined #perl6
17:08 avalenn joined #perl6
17:17 haroldwu joined #perl6
17:18 Kristien http://i.stack.imgur.com/fAI5M.jpg
17:20 telex joined #perl6
17:23 grondilu joined #perl6
17:26 regreg joined #perl6
17:39 zakharyas joined #perl6
17:43 pmurias vendethiel: non-local jumps? you mean goto?
17:44 vendethiel loop ones
17:44 vendethiel m: sub foo {last; }; for ^5 { .say; foo when 3; }; # pmurias
17:44 camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤»
17:44 pmurias exceptions :(
17:44 vendethiel that, too
17:44 vendethiel IIRC, it's specced to be lexical when it can find a jump inside the loop
17:45 vendethiel but then you don't know if there's one in the body calls, or none
17:45 vendethiel and so, you have to postfix every call inside a loop body with a bunch of ifs... ugh
17:45 timotimo moritz: trying to clarify all docs is a noble quest!
17:45 pmurias a bunch of if's wouldn't be that bad
17:45 vendethiel after each function call inside a loop body?
17:46 vendethiel for ^5 { foo; bar; }
17:46 pmurias that case will need exceptions
17:46 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... }`
17:48 pmurias global variable won't be enough, what if the loop is inside a recursive function?
17:48 Alina-malina joined #perl6
17:48 Alina-malina joined #perl6
17:49 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 #perl6
17:50 pmurias and I think exceptions turn off optimalization in v8
17:50 pmurias which sucks horribly
17:51 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 jeffreykegler Who is the copyright holder of Perl 6?
17:51 moritz jeffreykegler: the contributors
17:51 jeffreykegler I ask because the issue of who the copyright holder should be for Marpa is now under discussion.
17:52 jeffreykegler moritz: So it's like Linux in that respect.
17:52 moritz jeffreykegler: "Perl 6" can mean many things
17:52 moritz jeffreykegler: there are design documents, a test suite, various implementations
17:52 jeffreykegler I'm thinking of the code, but I guess there are several codebases.
17:52 jeffreykegler That is, the implementations.
17:53 moritz jeffreykegler: The Perl Foundation holds the copyright of Rakudo
17:53 jeffreykegler And any contribution to Rakudo is assigned, therefore?
17:53 pmurias vendethiel: redo is fully lexotic so we will only pay the price when it's used
17:54 anaeem1_ joined #perl6
17:55 moritz jeffreykegler: all major contributions
17:55 moritz jeffreykegler: we accept small patches without explicit copyright assignment
17:56 jeffreykegler And for "major contributions" you require explicit assignment?
17:56 pmurias moritz: rakudo uses the TPF contributor license aggreement?
17:56 jeffreykegler With paperwork?
17:57 Kristien pmurias: can't you make LOOP_5435_REDO an array of booleans?
17:58 Kristien and then use push and pop
17:58 moritz jeffreykegler, pmurias: yes
17:59 moritz 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
17:59 moritz pmurias: yes, it grants a license
18:00 moritz 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 ...
18:01 jeffreykegler But at least one of my community thinks that unwise and unnecessary.
18:01 pmurias what is the neccessary for?
18:01 pmurias s/the/that/
18:01 jeffreykegler And of course re-licensing of open source has certainly been abused in the past.
18:02 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.
18:02 moritz it's O(2 pages)
18:04 jeffreykegler The answer is not 100% clear to me, after reading http://www.perlfoundation.org/​contributor_license_agreement
18:05 jeffreykegler 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:06 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."
18:06 moritz jeffreykegler: you license your code to TPF, TPF sub-license it to the world as $chose_your_poison
18:07 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:08 moritz there's no stability clause there, so yes, license can be changed
18:08 moritz IANAL though
18:09 SHODAN joined #perl6
18:09 jeffreykegler moritz: Thanks.  That answers my question.
18:09 jeffreykegler I'll take this back to the Marpa community and we'll decide what to do.
18:10 grondilu joined #perl6
18:10 jeffreykegler Btw, do I note correctly that Perl 6 is now artistic license only -- no dual license with GPL
18:10 jeffreykegler ?
18:10 pmurias it's artistic license 2.0
18:10 pmurias which is compatible with GPL
18:11 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
18:12 jeffreykegler So in fact the GPL dual license was redundant
18:12 moritz not quite
18:14 moritz http://opensource.org/lice​nses/artistic-license-1.0 3) says you have to do at least ONE of the following
18:14 moritz and option c) is renaming the executables, and document that
18:15 moritz 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
18:16 pmurias vendethiel: maybe it could be even possible to get the spec changed for Perl 6
18:16 jeffreykegler Rakudo is Artistic 2.0, right?
18:16 pmurias none lexotic loop control doesn't seem to be very usefull
18:16 jeffreykegler It looks like its difference, at least in the section numbering
18:16 jeffreykegler * difference -> different
18:17 moritz and http://opensource.org/lice​nses/artistic-license-2.0 has 4b as the equivalent formulation
18:17 vendethiel pmurias: this'd hurt performances a lot :)
18:17 vendethiel so yeah.
18:17 moritz and 4 c ii has another re-licensing option, if I understood that correctly
18:19 pmurias vendethiel: I don't plan to implement that unless it's neccessary for something
18:19 vendethiel right. got it
18:20 jeffreykegler moritz: OK, thanks!
18:21 pmurias there is a problem that even lexotic last/next/redo can't get through a function in js: while (1) {(function() { break })()}
18:22 pmurias exceptions get through but they might be to expensive, so I plan to do var ret = (function() { return BREAK })(); if (ret === BREAK) { break }
18:25 BenGoldberg joined #perl6
18:27 BenGoldberg joined #perl6
18:33 FROGGS_ joined #perl6
18:46 Kristien generating ECMAScript code is fun
18:48 dalek nqp-js: e09910f | (Pawel Murias)++ | src/vm/js/bin/run_tests:
18:48 dalek nqp-js: Fix bug in run_tests.
18:48 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/e09910fb92
18:48 dalek nqp-js: 38ec73c | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
18:48 dalek nqp-js: Last throws an exception if has a block stopping direct loop control.
18:48 dalek nqp-js:
18:48 dalek nqp-js: No label support yet.
18:48 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/38ec73c87d
18:48 dalek nqp-js: 30951ea | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
18:48 dalek nqp-js: Emit code for .post_deserialize in QAST::CompUnit's.
18:48 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/30951eadae
18:48 dalek nqp-js: 566743a | (Pawel Murias)++ | src/vm/js/ (2 files):
18:48 dalek nqp-js: Set the code object for QAST::Blocks with a code_object attribute.
18:48 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/566743af17
18:48 dalek nqp-js: ae81377 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
18:48 dalek nqp-js: Add a lookup method on the Ctx, it's needed for code emitted for a proto foo() {()}.
18:48 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/ae81377dd7
18:48 dalek nqp-js: 378fdc9 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
18:48 dalek nqp-js: Add a HACK to make "foo".WHAT not blow up when calling multi methods.
18:48 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/378fdc92df
18:49 pmurias Kristien: generating fast ECMAScript code is fun
18:49 Kristien never done it :D
18:50 pmurias a good think is that once beautified I can read it. So it's easier to debug than something like .NET bytecode
18:51 Kristien I have one problem with that in my project.
18:52 Kristien In debug mode property access compiles into $lasagnascript$readProperty(x, 'p') instead of just x.p, which is not easy to read.
18:52 Kristien OTOH source maps solve that problem.
18:52 jeffreykegler left #perl6
18:52 timotimo mhhh lasagna
18:52 arnsholt pmurias: I like how it's not only a hack, but a HACK =)
18:54 jmark joined #perl6
18:58 pmurias arnsholt: :)
18:59 pmurias @tell Kristien luckily nqp-js supports source maps
19:00 Kristien joined #perl6
19:00 dalek nqp-js: c49abdf | (Pawel Murias)++ | src/vm/js/ (3 files):
19:00 dalek nqp-js: Make things more sane by having an $apply method on CodeRefs instead of a Function.apply like apply.
19:00 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/c49abdf938
19:00 dalek nqp-js: 98e146d | (Pawel Murias)++ | src/vm/js/ (2 files):
19:00 dalek nqp-js: Pass test t/nqp/51-multi.t.
19:00 dalek nqp-js:
19:00 dalek nqp-js: Add NQPRoutine to the mini-setting.
19:00 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/98e146d50d
19:13 jmark joined #perl6
19:17 vendethiel pmurias: that last chunk of code is a bit hard to read :)
19:17 vendethiel "my knowhow" is that a keyword you define somewhere? or is it provided
19:18 vendethiel pmurias: what about a `var NQP_JS_LAST = {};` instead of magically last
19:19 vendethiel m: my knowhow foo {}
19:19 camelia rakudo-moar f12020: ( no output )
19:19 vendethiel oh, it's predefined, my bad
19:21 jmark_ joined #perl6
19:23 jmark__ joined #perl6
19:26 jmark joined #perl6
19:26 kjs_ joined #perl6
19:27 moritz vendethiel: a knowhow is a very primitive class
19:27 moritz doesn't support inheritance, and iirc no role composition either
19:28 moritz no idea if it supports attributes
19:28 dalek perl6-roast-data: 615caca | coke++ | / (5 files):
19:28 dalek perl6-roast-data: today (automated commit)
19:28 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/615caca19c
19:28 moritz ah yes, it does
19:30 agentzh joined #perl6
19:31 TimToady only private ones, I suspect
19:31 TimToady well, I guess that follows from "no inheritance"
19:31 TimToady they're really kinda structs with sugar
19:32 TimToady albeit vaguely OO sugar
19:34 pmurias vendethiel: the huge NQPRoutine chunk of code is copied over from the nqp setting
19:35 vendethiel oh, okay
19:35 bcode joined #perl6
19:36 pmurias it will be built from files in src/core soon
19:36 pmurias vendethiel: throw "last" will be replaced with a saner object when I add labels
19:36 vendethiel oke :)
19:42 Spot__ joined #perl6
19:51 dalek nqp-js: 6291318 | (Pawel Murias)++ | tools/build/ (2 files):
19:51 dalek nqp-js: Avoid rebuilding the mini-setting on every 'make' run.
19:51 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/6291318398
19:53 jmark joined #perl6
19:53 zakharyas joined #perl6
19:55 jmark_ joined #perl6
19:55 jmark joined #perl6
19:56 anaeem1_ joined #perl6
19:59 jmark_ joined #perl6
20:00 tony-o_ for ^5 { UNDO { say $_; } if 0; };
20:00 tony-o_ m: for ^5 { UNDO { say $_; } if 0; };
20:00 camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤4␤»
20:00 tony-o_ m: for ^5 { UNDO { say $_; } if False; };
20:00 camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤4␤»
20:03 tony-o_ ah, misread UNDO
20:03 tony-o_ that still looks weird though
20:09 TimToady m: for ^5 { UNDO { say $_; } }
20:09 camelia rakudo-moar f12020: OUTPUT«0␤1␤2␤3␤4␤»
20:09 TimToady m: for ^5 { UNDO { say $_; }; 1 }
20:09 camelia rakudo-moar f12020: ( no output )
20:17 jmark joined #perl6
20:18 jmark joined #perl6
20:20 tony-o_ m: for ^5 { UNDO { say $_; }; 0; }
20:20 camelia rakudo-moar f12020: ( no output )
20:20 tony-o_ m: for ^5 { UNDO { say $_; }; False; }
20:20 camelia rakudo-moar f12020: ( no output )
20:21 tony-o_ am i making some poor assumption or wrong expectation?
20:22 moritz tony-o_: what's your assumption or expectation?
20:22 TimToady it appears to me to be working as designed
20:23 denis_boyun_ joined #perl6
20:23 moritz m: for ^2 { UNDO .say; Any }
20:23 camelia rakudo-moar f12020: OUTPUT«0␤1␤»
20:23 moritz m: for ^2 { UNDO .say; Any.new }
20:23 camelia rakudo-moar f12020: ( no output )
20:23 moritz m: for ^2 { UNDO .say; fail }
20:23 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␤␤»
20:24 tony-o_ i'd expect the '0;' the causes UNDO to trigger
20:24 tony-o_ that seems like a 'False' exit to the block
20:25 tony-o_ or unsuccessful block exit, as it's termed in S04
20:25 TimToady see S04:1789
20:25 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1789
20:25 tony-o_ ahh, tyvm
20:27 virtualsue joined #perl6
20:28 jmark joined #perl6
20:30 kurahaupo joined #perl6
20:31 virtualsue joined #perl6
20:38 dalek doc: bea39ef | paultcochrane++ | lib/ (3 files):
20:38 dalek doc: Replacing hard tabs with spaces
20:38 dalek doc: review: https://github.com/perl6/doc/commit/bea39ef4d0
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
20:40 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
20:40 TimToady also assuming that Inline::P5 is working by failover
20:41 moritz find_method_qualified doesn't look that way
20:41 TimToady well, then we'll have to look at that
20:42 TimToady at the moment I'm still just backlogging
20:42 * mst goes on strike
20:43 TimToady m: say 42.Cool::end
20:43 camelia rakudo-moar f12020: OUTPUT«0␤»
20:43 moritz TimToady: I mis-remembered
20:43 TimToady seems to work right
20:43 moritz it does a nqp::findmethod($qtype, $name)
20:44 raiph joined #perl6
20:44 moritz so that will consider parents from superclasses of the qualified type
20:44 TimToady whew!
20:44 moritz but not fallbacks from the invocant
20:44 TimToady unwhew!
20:44 moritz no, I'd argue that's correct
20:45 moritz 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
20:45 moritz or a separate meta class
20:46 moritz though how exactly that should dispatch, I don't know
20:49 TimToady it's not quite clear whether bypassing Any should be easy or merely possible
20:49 TimToady or whether such "fallbacks" should really be processed by a class under Any somehow
20:50 moritz bypassing Any is easy right now. Just inherit directly from Mu
20:50 dalek doc: 6ce94d0 | paultcochrane++ | README:
20:50 dalek doc: Correcting minor typos in README
20:50 dalek doc: review: https://github.com/perl6/doc/commit/6ce94d002c
20:51 ptc_p6 anybody against me converting the doc repo's README into markdown?
20:51 moritz ptc_p6: go right ahead
20:51 ptc_p6 k  :-)
21:14 adu joined #perl6
21:14 dalek doc: 640b659 | paultcochrane++ | README (2 files):
21:14 dalek doc: Converting the README to markdown format
21:14 dalek doc: review: https://github.com/perl6/doc/commit/640b6596c1
21:16 ptc_p6 mvuets: thanks for closing the PR
21:16 ptc_p6 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 #perl6
21:33 jmark_ joined #perl6
21:35 mvuets ptc_p6: no worries. I am glad you tackled it---don't like dangling PR (-:
21:36 kjs_ joined #perl6
21:53 BenGoldberg joined #perl6
21:53 dalek rakudo-star-daily: 82f90da | coke++ | log/ (9 files):
21:53 dalek rakudo-star-daily: today (automated commit)
21:53 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/82f90da9f3
21:59 rurban_ joined #perl6
22:00 BenGoldberg joined #perl6
22:02 Sqirrel joined #perl6
22:03 jmark joined #perl6
22:37 FROGGS[mobile] joined #perl6
22:42 jakesyl joined #perl6
22:51 Majmun joined #perl6
22:53 Majmun left #perl6
23:04 Kristien Zinedine Zidane doesn't tackle bugs; he headbutts them!
23:08 dayangkun joined #perl6
23:14 zakharyas joined #perl6
23:15 jmark_ joined #perl6
23:24 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:25 japhb Method 'blah' must be implemented by Foo::Bar::Baz because it is required by a role
23:25 japhb Well, duh.  It's a role with which I want to force composing classes to implement method blah.
23:26 Kristien What's the difference between !!! and ...?
23:26 vendethiel Kristien: ..., !!! and ??? are die, fail and warn
23:26 vendethiel or, uh, can't remember the order :P
23:26 japhb Kristien: how strongly it errors, basically.
23:26 Kristien Oh I see.
23:26 japhb Same problem with ... FWIW
23:27 Kristien Interesting.
23:28 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 jmark joined #perl6
23:29 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:40 zakharyas joined #perl6
23:59 Kristien m: 1..* Z @lines ==> map { "$^i: $^l" } ==> { for @_ { .say } }();
23:59 camelia rakudo-moar f12020: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/gwL3yveNTCâ�¤Variable '@lines' is not declared. Did you mean '&lines'?â�¤at /tmp/gwL3yveNTC:1â�¤------> [32m1..* Z @lines[33mâ��[31m ==> map { "$^i: $^l" } ==> { for @_ { .[0mâ�¤    expecting an…»

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo