Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-01-03

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:53 dalek nqp-jvm-prep: c50db7c | jonathan++ | t/qast_6model.t:
00:53 dalek nqp-jvm-prep: Sketch out a basic test for attributes.
00:53 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/c50db7c7e1
00:53 dalek nqp-jvm-prep: bce9af6 | jonathan++ | / (2 files):
00:53 dalek nqp-jvm-prep: Add getattr/bindattr ops.
00:53 dalek nqp-jvm-prep:
00:53 dalek nqp-jvm-prep: Currently, not useful for anything as P6opaque doesn't yet support
00:53 dalek nqp-jvm-prep: attributes.
00:53 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/bce9af613f
00:53 dalek nqp-jvm-prep: 7e1b0d3 | jonathan++ | src/org/perl6/nqp/sixmodel/reprs/P6Opaque (3 files):
00:53 dalek nqp-jvm-prep: Make P6opaque support reference type attributes.
00:53 dalek nqp-jvm-prep:
00:53 dalek nqp-jvm-prep: Done in a way that will be relatively easily extensible to natively
00:53 dalek nqp-jvm-prep: typed attributes and the box/unbox stuff later on.
00:53 dalek nqp-jvm-prep:
00:53 dalek nqp-jvm-prep: Makes the previously added basic attributes test pass.
00:53 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/7e1b0d3117
00:55 colomon joined #perl6
01:04 jnthn sleep &
01:09 [Coke] jnthn++
01:14 colomon [Coke]++
01:22 tokuhiro_ joined #perl6
01:29 geekosaur joined #perl6
01:37 tokuhiro_ joined #perl6
01:51 kthakore 3~/win 2
01:52 crazedpsyc joined #perl6
02:23 jeffreykegler joined #perl6
02:32 FROGGS_ joined #perl6
03:04 timotimo that interview with damian conway was very pleasant to watch
03:28 adu_ joined #perl6
03:34 lue got this trying to run latest panda: ===SORRY!===\nNo object at index 333
03:36 geekosaur joined #perl6
03:40 geekosaur joined #perl6
03:41 sorear lue: you are experiencing stale compiled files.  delete your ~/.perl6 and reinstall panda
03:42 lue Ah. Will have to do that later then, fortunately I don't need any modules at the moment.
03:50 flussence it's a bug in git rakudo or something. I've been unable to fix it for weeks :/
03:51 flussence (well, besides deleting all the .pir files on my system, but that doesn't fix the root of it)
03:57 orafu joined #perl6
04:24 xinming joined #perl6
04:53 adu_ hi sorear
05:00 skids joined #perl6
05:02 skids_ joined #perl6
05:09 sorear hi adu_
05:15 adu_ how goes?
05:21 sorear ok
05:27 am0c joined #perl6
05:36 telex joined #perl6
05:41 quester joined #perl6
06:04 kaleem joined #perl6
06:12 Kharec joined #perl6
06:15 FROGGS morning *yawn*
06:20 jaldhar_ joined #perl6
06:32 jokar joined #perl6
06:36 jokar joined #perl6
06:38 jokar joined #perl6
07:04 FROGGS jnthn: I've noticed that there are cases where $foreign_proto is a dispatcher but $_.value is not, see https://github.com/rakudo/rakudo/blob/froggs_mergemulti/src/Perl6/World.pm#L277
07:05 FROGGS jnthn: before I added the conditions to line 277 there, the following test caused a NULLPMC error in clone(): https://github.com/perl6/roast/blob/master/S06-operator-overloading/sub.t#L227
07:07 FROGGS jnthn: is it wise to make a new branch to roast to add/unfudge merge tests? I dont wanna wait for the time my patch is merged in to recognize that there are issues which are not covered yet
07:07 FROGGS jnthn: so I guess I got my answer already ;o)
07:09 jokar left #perl6
07:31 moritz \o
07:38 SamuraiJack joined #perl6
07:50 fgomez joined #perl6
07:59 quester left #perl6
08:12 FROGGS_ joined #perl6
08:17 rindolf joined #perl6
08:17 rindolf joined #perl6
08:18 Pleiades` joined #perl6
08:21 Woodi good morning everyone :)
08:23 moritz sorear: fwiw rakudo doesn't look into ~/.perl6/lib anymore, but int %*CUSTOM_LIB<site> ~ '/lib'
08:26 Woodi about coloring syntax: if perl can be parsed only by perl then there is a need for at least one code editor colored by perl... but, as stated many times, it will be slow so: is checking syntax on whole document is needed on every keystroke ? maybe fire syntax highlighting on \W like braces, operators is good enought ? or maybe caching colors of lines above current line ?
08:28 moritz you don't need to parse code to hilight it
08:29 moritz it's enough to an approximate lexing
08:31 FROGGS_ joined #perl6
08:31 Woodi in recent years big MMO games like EVE maked UI threaded which realy improved user experience :) second thread executing perl interpreter can be fast enought... and additional to colouring it can display errors and warnings in status line or contextual messages...
08:32 brrt joined #perl6
08:32 Woodi moritz: just doing sci-fi autor thinking with hope of help a bit :)
08:32 brrt hi p6
08:32 Woodi o/
08:33 Woodi work &
08:33 brrt \o woodi
08:33 moritz Woodi: then also consider the dystopia
08:33 moritz you don't want your editor to run the perl compiler over the code all by itself
08:33 moritz consider BEGIN shell 'rm -rf ~'
08:34 Woodi hmm, I thinked about code I can type :)
08:34 Woodi but right
08:34 Woodi perl is dangerous!
08:35 Woodi avoid it on all costs ! :)
08:35 brrt :-)
08:35 brrt use safe languages such as python and java!
08:35 alec joined #perl6
08:35 Woodi but realy second thread for highlighting can be good
08:36 Woodi yea, even asm have better ridability...
08:36 moritz good riddance
08:38 Woodi so perl6-debugger is voulnerable to BEGIN shell trick ? :)
08:38 tadzik well, if you put such things in your code... :)
08:38 tadzik good morning #perl6
08:38 Woodi hallo tadzik :)
08:38 moritz Woodi: in first approximation, the debugger runs the code just like the compiler
08:41 FROGGS_ someone should glue STD.pm6 to an editor
08:42 FROGGS_ ... together with hoelzro's highlighter
08:43 FROGGS_ lets make Qadre! \o/
08:46 hoelzro FROGGS_: but then the editor would have to use Python =(
08:48 FROGGS_ hoelzro: both
08:48 FROGGS_ wouldnt hurt IMO
08:50 Woodi can we replace Python with something ? :)
08:51 FROGGS_ rewrite the highlighter... sounds like a lot of work...
08:53 tokuhiro_ joined #perl6
08:55 hoelzro actually, it wouldn't be *that* much work
08:56 hoelzro then again, I'm probably ignorant of all the work that Pygments does behind the scenes
08:56 hoelzro the lexer itself is fairly simple, especially considering the language it's lexing
09:05 Woodi hoelzro: what you think about 2 threads in editor ? one for user input second for highlighting (and displaying) ?
09:06 Woodi hmm, ldd vim already shows libpthread...
09:06 hoelzro Woodi: you probably wouldn't need a second thread for highlighting if your highlighter were smart enough
09:07 Woodi hoelzro: I think about user experience and parsing always takes time, sometimes chokes...
09:08 hoelzro so you would need to get a lock on the text every time the user changes it?
09:10 Woodi generally I do not want pragmatk aproach here :) thinking about future arhitectures with many cores, etc, bla bla bla :)
09:11 tokuhir__ joined #perl6
09:11 Woodi hoelzro: no, good data struct can get user text and take user input and rest of app can do editor work...
09:11 hoelzro I don't think that another thread for highlighting is necessarily a bad idea, but it sounds like a pain to implement
09:12 Woodi hoelzro: I know :) and that is a point ! we need to start small with just 2 threads ! :)
09:14 Woodi or just 1 main thread doing work delegation to small threads... and then make small changes in programs arhitecture planning...
09:17 kresike joined #perl6
09:17 kresike hello all you happy perl6 people
09:17 Woodi sugar 25 kg, gelatin 4 kg... work 7 :)
09:18 bitonic joined #perl6
09:32 FROGGS_ Woodi: you are making statue?
09:37 masak a happy morning to you, #perl6
09:40 FROGGS morning kresike, masak
09:47 Woodi FROGGS_: no, just stacktaking on end of year in bakery :)
09:47 Psyche^ joined #perl6
09:47 kresike FROGGS, o/
09:47 Woodi but we do cakes too :)
09:48 FROGGS a
09:48 FROGGS cakes++
09:48 FROGGS -a
09:50 MayDaniel joined #perl6
09:52 SmokeMachine joined #perl6
10:01 _ilbot joined #perl6
10:01 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
10:35 denisboyun_ joined #perl6
10:36 masak just to be clear, you don't have to account for any https://en.wikipedia.org/wiki/Siphon effect in t4.
10:37 moritz https://github.com/munificent/vigil
10:38 moritz masak: of course not, since all the spaces between blocks can let air through
10:40 arnsholt "This is similar to contracts, but less legal and more medieval." =D
10:42 moritz aye :-)
10:45 au vigil seems like a natural fit with TDDD (test-deletion-driven development).
10:48 am0c joined #perl6
10:56 moritz I think you could use it to train people to "commit early, commit often"
10:57 moritz and after you found an assertion violation, you do a 'git diff' and immediately see which method triggered it
10:58 masak moritz: you're right. I still believe the original t4 description is carefully worded enough to make it clear. but it doesn't hurt to be over-specific, and I just got an email asking me about the siphon effect. :)
11:00 * masak laughed out loud upon reaching "it will be deleted from your source code."
11:00 masak of course! so simple!
11:05 hash_table joined #perl6
11:08 foodoo joined #perl6
11:10 arnsholt Indeed. Dropping those hints about "must be punished" and then keeping that gem until the end was brilliant!
11:11 tadzik maybe it should have a soft-core mode, carving "I must not tell lies" in blood somewhere in the source code
11:21 foodoo left #perl6
11:24 jnthn morning o/
11:24 FROGGS morning jnthn
11:26 jnthn Going to be doing a bunch of visiting folks in the next few days, so will probably not be online a great deal.
11:28 jnthn Woodi: The point of a debuggers is to run the code without doing things differently to if it was being run normally, just letting the user see what's going on at various points. It'd be a pretty useless debugger if it didn't run the BEGIN blocks. :)
11:31 moritz if you want to debug a program that deletes your hard drive, you want it to delete your hard drive while debugging too :-)
11:31 jnthn FROGGS: The reason you have the get_bool not implemented thing is probably because you put something (looks like PROCESS) in boolean context that doesn't (at that point) know how to be. You could always use defined, or nqp::concrete(...) instead.
11:31 jnthn probably nqp::defined, in fact
11:32 jnthn That'd about the NQPCursorRole special case too
11:32 jnthn Also just calling .is_dispatcher on any symbol is probably a bad idea. Probably should be protected with nqp::can check
11:36 FROGGS_ joined #perl6
11:39 mtk joined #perl6
11:40 geekosaur joined #perl6
11:41 moritz also I think we should only merge if both protos are marked as onlystar
11:43 jnthn moritz: I already mentiond that one to FROGGS
11:44 jnthn oh, and I thought it was done, but now I look at the branch I don't see it...
11:45 jnthn Note that to de-duplicate we can also use the .static_id thingy
11:45 moritz good idea
11:49 denisboyun_ joined #perl6
11:57 dalek nqp-jvm-prep: 4ab6071 | jonathan++ | / (2 files):
11:57 dalek nqp-jvm-prep: Add box/unbox ops.
11:57 dalek nqp-jvm-prep:
11:57 dalek nqp-jvm-prep: Note that P6opaque will also need some work before it can support
11:57 dalek nqp-jvm-prep: these.
11:57 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/4ab6071310
11:57 dalek nqp-jvm-prep: 9615c61 | jonathan++ | t/qast_6model.t:
11:57 dalek nqp-jvm-prep: Test box/unbox with the boot types.
11:57 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/9615c61fd6
11:59 dalek nqp-jvm-prep: 9a2db5b | jonathan++ | docs/ROADMAP:
11:59 dalek nqp-jvm-prep: ROADMAP update.
11:59 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/9a2db5bf9d
12:00 FROGGS_ joined #perl6
12:06 FROGGS moritz: so you mean that we only should merge the dispatchees if their proto is onlystar?
12:07 FROGGS hmmm
12:07 jnthn If *both* protos are onlystar
12:07 FROGGS ahh, yeah, makes sense
12:07 jnthn Which is the common case.
12:08 FROGGS r: proto sub a { 42 }; multi sub a ( $a ) { $a }; say a(7)
12:08 p6eval rakudo f5037e: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub a at /tmp/PFMftDURHN:1␤  in block  at /tmp/PFMftDURHN:1␤␤»
12:08 FROGGS r: proto sub a ( Mu ) { 42 }; multi sub a ( $a ) { $a }; say a(7)
12:08 p6eval rakudo f5037e: OUTPUT«42␤»
12:09 FROGGS r: proto sub a ( Mu ) { 42 }; multi sub a ( Int $a ) { $a }; say a(7)
12:09 p6eval rakudo f5037e: OUTPUT«42␤»
12:09 FROGGS r: proto sub a ( Mu ) { * }; multi sub a ( Int $a ) { $a }; say a(7)
12:09 p6eval rakudo f5037e: OUTPUT«7␤»
12:09 FROGGS r: proto sub a { * }; multi sub a ( Int $a ) { $a }; say a(7)
12:09 p6eval rakudo f5037e: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling proto of 'a' will never work with argument types (int) (line 1)␤    Expected: :()␤»
12:10 FROGGS why does it ignore the multi?
12:10 moritz multis work by first calling the proto
12:10 jnthn The proto's signature must be at least as wide as that of the candidates.
12:10 moritz and the proto can then decide to re-dispatch to the candidates
12:10 jnthn Otherwise you never make it into the proto and never hit the * thtat triggers the multi-dispatch
12:10 moritz but if you write proto sub a { * }, it has a signature of ()
12:11 moritz so the proto (and thus the candidates) cannot be called
12:11 FROGGS ahh, k, cool
12:11 FROGGS_ joined #perl6
12:12 FROGGS r: proto sub a { * }; multi sub a ( Int $a ) { $a }; say a( a => 7)
12:12 p6eval rakudo f5037e: OUTPUT«Cannot call 'a'; none of these signatures match:␤:(Int $a)␤␤  in block  at /tmp/Qn4X7fgWWB:1␤␤»
12:12 FROGGS r: proto sub a ( Mu ) { * }; multi sub a ( Int $a ) { $a }; say a( a => 7)
12:12 p6eval rakudo f5037e: OUTPUT«Cannot call 'a'; none of these signatures match:␤:(Int $a)␤␤  in block  at /tmp/6eihJU511h:1␤␤»
12:12 FROGGS r: proto sub a ( Mu ) { * }; multi sub a ( Int :$a! ) { $a }; say a( a => 7)
12:12 p6eval rakudo f5037e: OUTPUT«7␤»
12:13 FROGGS r: proto sub a ( Mu ) { 42 }; multi sub a ( Int :$a! ) { $a }; say a( a => 7)
12:13 p6eval rakudo f5037e: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in sub a at /tmp/5m8kubQR8R:1␤  in block  at /tmp/5m8kubQR8R:1␤␤»
12:13 FROGGS k
12:14 JJ_Brain joined #perl6
12:20 brrt joined #perl6
12:27 JJ_Brain joined #perl6
12:36 dalek roast: 065efbb | moritz++ | S02-names-vars/variables-and-packages.t:
12:36 dalek roast: unfudge a passing test for rakudo
12:36 dalek roast: review: https://github.com/perl6/roast/commit/065efbbb27
12:37 dalek roast: 896563b | moritz++ | S29-context/die.t:
12:37 dalek roast: another rakudo unfudge
12:37 dalek roast: review: https://github.com/perl6/roast/commit/896563b730
12:39 masak could http://rosettacode.org/wiki/Balanced_brackets be map-reduced? I always thought it couldn't because nesting isn't a "local" property... but Steele in http://labs.oracle.com/projects/plrg/Publications/ICFPAugust2009Steele.pdf mentions monoid-cached trees, which seem applicable here.
12:40 JJ_Brain joined #perl6
12:41 masak (more exactly, the "parallel prefix problem" that he solves seems structurally very similar to the nested brackets property)
12:43 denisboyun_ joined #perl6
12:48 JJ_Brain joined #perl6
12:50 sorear masak: https://en.wikipedia.org/wiki/Syntactic_monoid
12:51 sorear 2nd example
12:51 sorear sleep&
12:53 masak damn, I gotta learn more of this category theory stuff. it's like it's calling me from the other side of a veil.
12:54 dalek nqp-jvm-prep: d70c951 | jonathan++ | / (4 files):
12:54 dalek nqp-jvm-prep: Preparations for supporting native attributes.
12:54 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/d70c95145d
12:54 jnthn Away for some days...worst case until Monday. o/
12:55 brrt bye jnthn!
12:55 masak fare thyself well, jnthn.
12:56 JJ_Brain_ joined #perl6
13:00 JJ_Brain joined #perl6
13:01 masak ok, so the balanced brackets do form a monoid. I'd still be curious to see an actual map-reduce solution implemented for this.
13:01 masak it's not 100% clear to me what it'd look like.
13:03 arnsholt One idea I had was to map a string fragment to a number
13:03 arnsholt Nah, won't work after all
13:03 arnsholt Parallel parsing is kinda nasty to wrap your brain around =)
13:05 * masak resolves to study monoids some more
13:07 JJ_Brain joined #perl6
13:09 mtk joined #perl6
13:11 bitonic joined #perl6
13:12 mikemol This thread needs some love: http://www.reddit.com/r/programming/comments/15tnon/damian_conway_on_the_state_of_perl_perl_6_writing/
13:13 JJ_Brain joined #perl6
13:19 masak there's a kind of saturation level at which I feel I need to stay away from such threads, help further Perl 6 along, and leave bickering over semantics to others.
13:19 hoelzro it's kind of troubling to observe that kind of reaction to Perl 6, though
13:20 hoelzro half of the people don't expect it to be ready anytime soon, and the other half seem to have given up
13:20 masak the only way to really silence that kind of reaction to Perl 6 is to put Perl 6 to good, objectively undeniable uses.
13:21 brrt chromatic has posted a nice thing about p6 too recently
13:21 hoelzro brrt: really?
13:21 masak I'm not claiming Perl 6 is ready for everyone. I'm claiming it's ready for a whole lot of people with an interest in the features Perl 6 provides, not too great a need for perf, and something of a tolerance for bugs.
13:22 hoelzro I see him as one of the larger critics, so I'd like to see that
13:22 hoelzro see, that's an interesting point, masak
13:22 masak keep in mind that chromatic is not evil. he used to be a big supporter or Perl 6, but he burned out.
13:22 masak of*
13:22 hoelzro masak: oh, I don't think he's evil! I'm just saying that he's critical
13:22 hoelzro which isn't a bad thing, but it makes it harder to advocate
13:22 brrt hoelzro, it was nice-and-not-nice at the same time
13:23 masak his criticisms should be read in the light of him being disappointed.
13:23 brrt it was nice in that it said perl6 is a well-designed language
13:23 masak on his best days, chromatic acts as a counterweight to exuberant Perl 6 optimism on reddit.
13:23 brrt it was not nice in that it said that rakudo isn't going anywhere
13:23 hoelzro brrt: ah
13:23 xinming joined #perl6
13:24 pmurias joined #perl6
13:24 masak chromatic was also heavily invested in Parrot as a platform, so Rakudo's investigating the JVM counts in his mind as Rakudo "not going anywhere".
13:24 hoelzro see, my trouble is I'd like to write something in Perl 6, but a) I occasionally encounter show-stopper bugs, like with my chat bot, or b) I'd like it be used and improved by others, and I feel that many people wouldn't want to deal with installing/learning Perl 6 just to use my stuff
13:25 brrt i personally have doubts about rakudo-on-jvm
13:25 cedrvint joined #perl6
13:25 brrt it could work, it could also not work
13:25 masak all of this, by the way, is trying to put a context to what chromatic is saying. not psychoanalysing him. :)
13:25 brrt although i'm also very much pro-rakudo-in-nqp
13:25 brrt as in, 'lets kill PIR fast'
13:27 cedrvint masak++ # http://irclog.perlgeek.de/perl6/2013-01-03#i_6294423
13:28 masak cedrvint: well, it's like this: I've seen hundreds of these threads at this point. they all look alike.
13:29 masak cedrvint: the *good* outcome (from our perspective) is that the other guys say "well, I'm willing to wait and see if it turns into something nice".
13:29 masak cedrvint: at which point I get back to helping Perl 6 and its implementations improve.
13:30 masak so I just figure, why not short-circuit the process and avoid reddit altogether? :) it's not like convincing people on reddit is a intellectually fulfilling anyway :)
13:31 cedrvint for sure! :)
13:31 geekosaur joined #perl6
13:33 masak brrt: PIR is well on its way to obsolescence, if I read the tea leaves right.
13:35 brrt good riddance
13:36 hoelzro what's wrong with PIR?
13:36 * hoelzro is lost
13:36 masak all other things being equal, the fewer the steps between source code and object code, the better. PIR is one of the steps that don't belong.
13:36 xinming joined #perl6
13:36 hoelzro oh, ok
13:36 masak you have to generate the PIR, then you have to parse the PIR. madness.
13:37 masak it's committing the sin of making an intermediate format textual/linear, rather than structured/tree-like.
13:38 JJ_Brain joined #perl6
13:42 timotimo if i have a grammar, can i easily create a parse tree from just data and use the grammar to emit a correct string representation? where in the spec do i find this?
13:43 masak define "just data".
13:43 moritz a Str? :-)
13:44 masak grammars won't get you a string from something else, no. not if I understand your question right.
13:44 masak anyway, if you have the parse tree and all the nodes know their string representation... just traverse and concatenate. :)
13:45 Oejet joined #perl6
13:45 arnsholt Various people (myself included) have debated trying to generate from grammars, but it's definitely non-trivial (and not possible in the fully general case, I suspect)
13:45 arnsholt But as masak says, if you have the data structure, generating a string representation should just be a matter of traversing the structure
13:46 arnsholt Which may or may not be easy, depending on how complicated your data structure is
13:46 timotimo right.
13:46 * mikemol is very, very pro-rakudo-in-nqp.
13:47 moritz is there anybody how is contra rakudo-in-nqp?
13:47 mikemol The more it's built on top of NQP, the more it becomes trivial to run it on top of god knows how many different languages.
13:48 * arnsholt is optimistic about the NQP/JVM thing
13:48 arnsholt I think it'll be good both for Perl 6 and Rakudo
13:48 masak yeah.
13:50 Woodi I have impression that Perl6 implementations have annoing habit of slapping you in face when you start to write something bigger... you start project becouse there is nice, shiny feature but after some lines you are blocked by lack of some basic feature every language should have... IO::Sockets problems in rakudo, GUI in Niecza...
13:50 arnsholt Part of that boils down to the fact that interacting with the outside world is actually quite complicated and labour intensive
13:50 mikemol I mean, I've got a guy somewhat interested in writing NQP in Go. I know a JavaScript fan I might conceivably persuade to take an interest. I want to try it in C++ and Python. And I bet a cdent implementation from ingy would be fascinating.
13:50 arnsholt I think
13:51 moritz Woodi: then do something about it
13:52 masak "progress depends on the unreasonable man" :)
13:52 Woodi only one think which work nearly perfect in Perl6 is text mangling :) in text and network form :)
13:52 * moritz finds that object orientation works pretty well in rakudo too
13:54 stevan_ joined #perl6
13:55 Woodi moritz: I plan to try packaging I was talking few days before... but programming isn't my no. 1 or #2 skill :)
14:00 spider-mario joined #perl6
14:01 am0c joined #perl6
14:03 fgomez joined #perl6
14:04 masak today's mini-challenge: let f be a random mapping from 1..N to 1..N. what's the expected number of steps for the sequence 1, f(1), f(f(1)) ... to start repeating itself?
14:04 masak (courtesy of Knuth's 2011 Christmas tree lecture. apparently the answer contains pi somehow.)
14:04 alec joined #perl6
14:05 moritz and you want... an answer? or a program that approximates an average?
14:06 masak a Perl 6 program that simulates an answer, and tabulates it with the correct formula for comparison :)
14:06 * masak is halfway done already
14:06 cedrvint left #perl6
14:08 masak notice that the sequence doesn't have to go back to 1. it just has to loop back to any previous number in the sequence.
14:09 moritz does  1, 1, 1, 1  count as a repetition count of 1?
14:09 moritz or 0?
14:09 masak 0 isn't part of the mapping.
14:09 masak oh, sorry. I see what you mean.
14:10 masak it starts repeating after 1 step.
14:10 masak so the sequence will always repeat after >1 steps.
14:10 masak er >= 1 steps.
14:11 PacoAir joined #perl6
14:11 Woodi answer should be quantified in % or should be Num ?
14:11 masak the case N=1 contains only your sequence of only 1s.
14:12 masak Woodi: the average of a lot of integers is either a Rat or a Num :)
14:13 Woodi but you need to interpret a given number shomehow :)
14:13 Woodi or formula ?
14:13 moritz masak: https://gist.github.com/45202bfd81a2a8dbdf87
14:15 stevan_ joined #perl6
14:15 masak ooh, you just run through them all.
14:15 masak I simulated randomly chosen mappings, Monte-Carlo-style.
14:15 moritz me too
14:16 moritz no, I don't generate all permutations
14:16 masak oh, right.
14:16 masak but you adapt the number of trials to the size of $N.
14:16 moritz yes
14:16 moritz though it's rather crude
14:16 masak anyway, this is half the solution. the other half is to find the formula for the average.
14:16 masak I still haven't found it.
14:17 masak I should post my code, too.
14:17 moritz are you sure it's a mini challenge? :-)
14:18 Woodi if f is random mapping then f(f(1)) can be simplified as f(1) ? :)
14:18 masak moritz: pretty sure :)
14:18 moritz random, not identical
14:18 masak here's mine: https://gist.github.com/4443780
14:19 masak I'm usually not this different in style to moritz :)
14:20 pmurias mikemol: re built on top of nqp, to be more accurent rakudo is written in nqp and compiles code to QAST (which nqp also compiles code too)
14:20 moritz oh, f doesn't need to be bijective?
14:21 pmurias mikemol: and someone was compiling tcl to QAST too ;)
14:21 masak moritz: if it did, I woulda said "permutation", not "mapping".
14:21 masak moritz: oh, now I see you assumed that.
14:21 masak moritz: so did one in the audience of Knuth's lecture :)
14:22 masak I simplified my https://gist.github.com/4443780 a bit -- the gather is better written as infix:<xx>
14:24 moritz uhm
14:24 moritz if it's not bijective, the simulation doesn't terminate
14:24 moritz erm
14:24 masak surely you can't keep applying a function in a finite...
14:24 moritz nevermind
14:24 masak ...set without generating a loop? :)
14:25 pmurias jnthn: how are functions like &say,&prints loaded?
14:26 moritz ok, now it's much faster
14:26 moritz and produces smaller numbers
14:26 masak :)
14:26 pmurias jnthn: they don't get serialized right?
14:27 masak moritz: for reference, for N=20 I have the average as 5.2490
14:28 moritz masak: I have 5.365
14:28 atrodo joined #perl6
14:29 * moritz has to run errands before turning to the analytical part of the solution
14:29 masak yeah, that's within the expected variation. I'm only running 1000 trials right now.
14:30 moritz well, I run 400 for 20 :-)
14:30 masak things vary in the first decimal from run to run for me.
14:31 pmurias jnthn: I have found the answer to my question ;)
14:31 moritz hey, I can generate @f lazily
14:31 masak searching for various things on ddg turns up nothing for this problem. makes it more interesting :)
14:31 arnsholt I wonder if this can't be seen as some kind of markov chain
14:32 moritz I have an idea on how to approach the analytical solution
14:32 moritz but will have to delay persuing it
14:32 moritz bbl
14:32 Woodi if f will be defined sub f(x) { return x+1 } then answer will be N ?
14:32 masak arnsholt: it's a markov chain, but the set of state transitions is the thing we're varying.
14:33 arnsholt Yeah, it's not quite a standard markov chain
14:33 masak Woodi: assuming f(N) = 1, yes.
14:33 masak Woodi: but we're averaging over all possible f.
14:33 [Coke] (tcl to qast) ... was that me?
14:33 [Coke] and if not, who was it? ;)
14:33 masak Woodi: it's impossible for the cycle length to be >N
14:35 denisboyun_ joined #perl6
14:45 kaare_ joined #perl6
14:49 masak hmm. define L(N) as being the expected length for a random mapping from 1..N to 1..N.
14:51 masak from what I can see, L(1) = 1.0, L(7) = 3.0, L(12) = 4.0, L(18) = 5.0, and all these are exact.
14:51 masak of course, it's hard to tell because of the Monte Carlo nature of it all.
14:51 pmurias [Coke]: I think that was you ;)
14:51 erkan joined #perl6
14:52 masak if we find the analytical formula, this would be a nice task for rosetta code :)
14:52 pmurias [Coke]: so your long term plan is to have tcl on the JVM? ;)
14:56 [Coke] pmurias: nah, that's already there.
14:59 [Coke] it was "get tcl running on parrot for interop purposes."
14:59 [Coke] ... but that failed due to a lack of general interest in interop.
15:00 [Coke] (there was some very specific interest, but not widereaching)
15:01 stopbit joined #perl6
15:08 JJ_Brain joined #perl6
15:09 masak ok, I believe I have the analytical formula now.
15:13 nwc10 joined #perl6
15:24 gfldex r: https://gist.github.com/4444255
15:24 p6eval rakudo f5037e: OUTPUT«8␤8("price" => 9800, "value" => 484953/50, "components" => Bool::False).hash␤8("price" => 9800, "value" => 484953/50, "components" => Bool::False).hash␤4("price" => 274974/25, "value" => 522151/50, "components" => Bool::False).hash␤158("price" => 1779/20, "value" =…
15:27 gfldex rn: https://gist.github.com/4444266
15:28 p6eval niecza v24-12-g8e50362: OUTPUT«(timeout)Potential difficulties:â�¤  $k is declared but not used at /tmp/OXQm0Iz6yr line 131:â�¤------> [32m caldari-fuel-block<components>[0,1] -> [33mâ��[31m$k, $v {[0mâ�¤  $v is declared but not used at /tmp/OXQm0Iz6yr line 131:â�¤------> [32mdari-fuel-block…
15:28 p6eval ..rakudo f5037e: OUTPUT«8␤Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/qD1hVtUzmy:138␤␤»
15:28 gfldex i have two questions about that gist
15:28 gfldex first, why the heck does niecza timeout?
15:29 gfldex secondly, why does rakudo make a difference between line 134 and 138?
15:30 [Coke] gfldex: in one case you're iterating over a hash. in the other, you're iterating over a list.
15:30 [Coke] the bare hash is better written ...<components>.kv -> $k, $v
15:31 [Coke] I think without the .kv you're getting the hash in $k, and then nothing for the $v.
15:31 gfldex it's not a hash
15:31 gfldex check line 77 to 85
15:31 [Coke] ... or my initial read could be way off! :)
15:32 masak rn: say sprintf '%12.5f', NaN
15:32 p6eval rakudo f5037e: OUTPUT«NaN␤»
15:32 p6eval ..niecza v24-12-g8e50362: OUTPUT«         NaN␤»
15:32 * masak submits rakudobug
15:32 masak rn: say sprintf '%12.5f', Inf
15:32 p6eval niecza v24-12-g8e50362: OUTPUT«    Infinity␤»
15:32 p6eval ..rakudo f5037e: OUTPUT«Inf␤»
15:32 masak rn: say sprintf '%12.5f', -Inf
15:32 p6eval rakudo f5037e: OUTPUT«-Inf␤»
15:32 p6eval ..niecza v24-12-g8e50362: OUTPUT«   -Infinity␤»
15:33 [Coke] er, Parcel vs. List. hurm.
15:34 gfldex and i'm quite sure that used to work before for got lazy
15:35 [Coke] <components>.list seems to work.
15:35 masak rn: say sprintf '%12.5f', 42
15:35 [Coke] seems very similar to another lazy bug that was recently reported.
15:35 p6eval rakudo f5037e, niecza v24-12-g8e50362: OUTPUT«    42.00000␤»
15:35 [Coke] (sorry about my initial misread)
15:37 gfldex i can live with a .list workaround
15:37 gfldex does .list force it to be eager?
15:38 bluescreen10 joined #perl6
15:38 isBEKaml joined #perl6
15:38 isBEKaml hello, #perl6!
15:39 masak isBEKaml! \o/
15:39 timotimo r: https://gist.github.com/3034309
15:39 p6eval rakudo f5037e: OUTPUT«1..2␤ok 1 - ␤ok 2 - ␤»
15:39 timotimo yay
15:39 [Coke] gfldex: (.eager also STW.)
15:41 isBEKaml hello, masak! How's things? (Faster today? ;)
15:42 timotimo hm. i've lost the file, but recently i tried to create a listing of all combinations and all lengths of A and B as a lazy list with a breadth-first-search type of output and ran into really, really strange effects that i couldn't explain to myself
15:43 timotimo i think i may have done that in /tmp and then my laptop turned itself off at some point :|
15:43 timotimo i think i'll try to recreate that
15:44 masak um, hm. no, I don't think I have found the analytical formula after all :/
15:44 kresike bye folks
15:48 nwc10 moritz: is rakudo good enough to run the IRC logger yet?
15:49 isBEKaml masak: you're still on that balanced brackets thing? :)
15:49 dalek perl6-roast-data: 98b6f30 | coke++ | / (4 files):
15:49 dalek perl6-roast-data: today (automated commit)
15:49 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/98b6f308fc
15:50 isBEKaml .oO(Hours at a problem, problem of hours) :P
15:51 masak isBEKaml: nono, this is the random maps thing :) completely different. http://irclog.perlgeek.de/perl6/2013-01-03#i_6294536
15:54 timotimo hrmpf. writing it for the second time i got to the solution faster, the code is cleaner, it's less strange and it works as it's intended to. great :|
15:54 gfldex timotimo: do you fail at failing?
15:55 timotimo i think i just did :|
15:55 timotimo then again, i failed at failing at failing, so it's all right
15:59 timotimo now i've hit a little roadblock WRT lazyness
15:59 timotimo i'd like to have a list of lazy lists, so i want to replace this code:
16:00 timotimo my @a := gather do_it([@start, A]); my @b := gather do_it([@start, B]);  -  with a loop over @values, where @values would have A and B in it
16:00 timotimo my first attempt was this: my @sub-lists := gather do_it([@start[], $_]) for @values;
16:01 timotimo but that seems to immediately eagerly want to resolve the lists - i believe that's due to flattening
16:01 moritz nwc10: might be worth a trial
16:01 timotimo so my next attempt was this: my @sub-lists := $(gather do_it([@start[], $_])) for @values; but that didn't cause it to work. maybe it's not a flattening problem after all?
16:05 timotimo r: my @a := (1..., 2..., 3...); say @a[0][0]; say @a[1][10]; say @a[2][100];
16:05 p6eval rakudo f5037e: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix , instead�at /tmp/ElVdkDX2XM:1�------> [32mmy @a := (1...,[33m�[31m 2..., 3...); say @a[0][0]; say @a[1][10[0m�»
16:05 timotimo r: say 1 ... *;
16:05 p6eval rakudo f5037e: OUTPUT«1 2 3 4 ...␤»
16:06 timotimo r: my @a := (1, 1 ... *, 2, 2 ... *, 3, 3 ... *); say @a[0][0]; say @a[1][10]; say @a[2][100];
16:06 p6eval rakudo f5037e: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'infix:<...>' will never work with argument types (Mu, Mu, Mu, Whatever) (line 1)␤    Expected any of:␤    :($a, $b)␤»
16:06 timotimo r: my @a := ((1, 1 ... *), (2, 2 ... *), (3, 3 ... *)); say @a[0][0]; say @a[1][10]; say @a[2][100];
16:06 p6eval rakudo f5037e: OUTPUT«1␤Index out of range. Is: 10, should be in 0..0␤  in method gist at src/gen/CORE.setting:10346␤  in sub say at src/gen/CORE.setting:7515␤  in block  at /tmp/CtnC9WJUYN:1␤␤»
16:06 timotimo er, now i'm somewhat confused
16:08 timotimo oh, i think i may have the solution
16:09 SamuraiJack joined #perl6
16:09 timotimo yes, indeed. this works:
16:10 timotimo my @a = \([$_, $_, ... *] for 1, 2, 3, 4); say @a[0][0]; say @a[1][10]; say @a[3][40];
16:10 timotimo r: my @a = \([$_, $_, ... *] for 1, 2, 3, 4); say @a[0][0]; say @a[1][10]; say @a[3][40];
16:10 p6eval rakudo f5037e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Comma found before apparent series operator; please remove comma (or put parens\n    around the ... listop, or use 'fail' instead of ...)â�¤at /tmp/rJNf894hU1:1â�¤------> [32mmy @a = \([$_, $_,[33mâ��[31m ... *] for 1, 2, 3, 4); say @a[0…
16:10 masak r: say 42 ... *;
16:10 p6eval rakudo f5037e: OUTPUT«42 43 44 45 ...␤»
16:10 timotimo r: my @a = \([$_, $_ ... *] for (1, 2, 3, 4)); say @a[0][0]; say @a[1][10]; say @a[3][40];
16:10 p6eval rakudo f5037e: OUTPUT«1 1 1 1 ... 2 2 2 2 ... 3 3 3 3 ... 4 4 4 4 ...␤Any()␤Any()␤»
16:10 timotimo er, that's not what i expected after all :|
16:13 moritz timotimo: what do you want to achieve?
16:13 timotimo r: my @a = \([$_, $_ ... *] for (1, 2, 3, 4)); say @a[0]; say @a[0]; say @a[0][0]; say @a[0][0][0]; say 'whyyyyyyyyyy?!';
16:13 p6eval rakudo f5037e: OUTPUT«1 1 1 1 ... 2 2 2 2 ... 3 3 3 3 ... 4 4 4 4 ...␤1 1 1 1 ... 2 2 2 2 ... 3 3 3 3 ... 4 4 4 4 ...␤1 1 1 1 ... 2 2 2 2 ... 3 3 3 3 ... 4 4 4 4 ...␤1 1 1 1 ...␤whyyyyyyyyyy?!␤»
16:13 moritz and what's the \ supposed to do?
16:14 timotimo it's supposed to cause the lists to not be eagerly evaluated immediately
16:14 moritz r: my @a := map { [$_ xx * ] }, 0..*; say @a[0][^5]; say @a[5][^5]
16:14 p6eval rakudo f5037e: OUTPUT«0 0 0 0 0␤5 5 5 5 5␤»
16:14 JJ_Brain joined #perl6
16:14 moritz timotimo: use binding instead
16:16 timotimo doesn't seem to work on my more complicated example
16:16 timotimo which looks like my @sub-lists := map { gather doer([@start[], $_]) }, @values;
16:16 timotimo the for @sub-lists {  seems to cause it to be eagerly evaluated immediately.
16:16 timotimo i'll quickly put it up on gist.
16:17 bitonic` joined #perl6
16:18 timotimo r: https://gist.github.com/4444626
16:18 jtpalmer joined #perl6
16:18 p6eval rakudo f5037e: OUTPUT«(timeout)»
16:21 moritz timotimo: well, you have that infinite loop { }
16:22 moritz as soon as you try to .perl that, it runs away
16:22 moritz all the laziness can't fix your logic for you :-)
16:22 timotimo it's inside an outer gather, no?
16:23 timotimo before i generalised it, it worked just fine. each element that falls out of do_it should be a finite list
16:23 timotimo it should start with A and then B, then A, A and A, B then B, A and B, B and then three-element lists would follow
16:23 aindilis joined #perl6
16:24 timotimo also, i limited the execution of do_it to yield only [^20] elements
16:26 timotimo oooh, i only now realized, you could do this with junctions:
16:26 * moritz 's brain explodes
16:26 moritz time to reconfigure
16:26 timotimo r: say any(&uc, &lc)("Foo!")
16:26 p6eval rakudo f5037e: OUTPUT«any(FOO!, foo!)␤»
16:27 timotimo r: say (&uc | &lc)("Foo!" | "Bar!")
16:27 p6eval rakudo f5037e: OUTPUT«any(any(FOO!, BAR!), any(foo!, bar!))␤»
16:29 masak heh, I remember discovering that trick a few years back... :)
16:29 masak junctioning callables... and it Just Works. :)
16:29 masak doesn't mean it's a good idea, though. in many cases, I would recommend against it.
16:30 timotimo sure
16:30 masak in fact, I use junctions very sparingly nowadays.
16:30 masak rule 1: don't let them escape an expression.
16:30 moritz masak: you discovered that trick, and opened a rakudobug
16:30 masak rule 2: don't let them escape a function.
16:30 masak moritz: oh, I don't remember the rakudobug part, but that's entirely possible :)
16:31 timotimo what's the worst than can happen when a junction escapes?
16:31 [Coke] Replicators.
16:31 masak :)
16:31 masak timotimo: I just find it gets difficult to reason about.
16:32 timotimo right.
16:32 timotimo did you look at my gist? i seem to have blown moritz' mind with it, but i still would like to get some help :)
16:32 [Coke] wow, pugs has been failing the daily runs for some time.
16:32 [Coke] yesterday the build happened, but all the tests failed because the build had been failing for so long, I hadn't been able to make sure anything past that worked.
16:33 masak timotimo: I have no idea what your goal is with that code.
16:34 timotimo ah, of course
16:34 timotimo i was trying to lazily enumerate all combinations of all lengths of @values in a breadth-first-search kind of manner
16:34 timotimo so A, B, AA, AB, BA, BB, AAA, AAB, ABA, ...
16:34 timotimo the problem was to generalize from A, B to @values
16:35 timotimo i could do my @a := gather doer(...); my @b := gather doer(...) just fine, but with the new code it immediately tries to eagerly create that @sub-lists list of lists
16:35 timotimo i was hoping i could get the list of lists to be a list of lazy lists and shift one element from each of the lists in turn
16:38 moritz masak: my analytical result: http://www.wolframalpha.com/input/?i=Sum[n!%2F%28n^%28x%2B1%29+*+%28n-x%29!%29+*+x^2%2C+{x%2C+1%2C+n}]
16:39 doy oeis has the sequence, for what it's worth
16:39 doy http://oeis.org/A063169
16:43 moritz yes, the description fits
16:45 masak timotimo: does this work?
16:45 masak r: my @seed = <A B>; my @e = ""; loop { .say for @e = @e X~ @seed }
16:45 p6eval rakudo f5037e: OUTPUT«(timeout)A␤B␤AA␤AB␤BA␤BB␤AAA␤AAB␤ABA␤ABB␤BAA␤BAB␤BBA␤BBB␤AAAA␤AAAB␤AABA␤AABB␤ABAA␤ABAB␤ABBA␤ABBB␤BAAA␤BAAB␤BABA␤BABB␤BBAA␤BBAB␤BBBA␤BBBB␤AAAAA␤AAAAB␤AAABA␤AAABB␤AABAA␤AABAB␤AABBA␤AABBB␤ABAAA␤ABAAB␤ABABA␤ABABB␤ABBAA␤ABBAB␤ABBBA␤ABBBB␤BAAAA␤BAAAB␤BAABA␤BAABB␤BABAA␤BA…
16:46 lolage joined #perl6
16:46 timotimo yeah, but that's way too simple! :)
16:46 masak doy++
16:46 masak timotimo: I removed the laziness, but you should be able to add it back.
16:46 rindolf joined #perl6
16:46 timotimo i used that example to learn more about lazyness in perl6 :P
16:47 timotimo maybe i can change the description of the problem to "get a lazy breadth-first-search of a graph"? ;)
16:48 timotimo is there anything about tail recursion in the perl6 language?
16:49 timotimo recursion would be a nice way to write down the BFS, but it could cause the stack to reach its limit easily in bigger graphs
16:51 stevan_ joined #perl6
16:55 timotimo http://sprunge.us/AOFJ - i found the very old version of this code in the irclog
17:01 ingy does rakudo or friends have a binding to a pcre engine at this time?
17:01 * ingy has a module that he wants to write in perl6 today
17:01 moritz I don't think so
17:01 timotimo but perl6 has a backwards compatible perl5 regex mode
17:02 moritz which is only partially implemented
17:02 timotimo hm, right.
17:02 ingy what's missing?
17:03 ingy come to think of it I might not need pcre style (like I would for pegex)
17:03 ingy I might be able to use p6rules
17:05 isBEKaml joined #perl6
17:07 ingy this time I'm porting from Ruby!
17:09 * ingy is a gem author finally: https://rubygems.org/profiles/ingy
17:10 moritz masak: https://gist.github.com/4445008
17:11 masak moritz: https://gist.github.com/4443780
17:11 masak oh, I should add an error column, too :)
17:12 masak also, I should extract the constant term from inside of the sum... :)
17:13 * moritz stole the FIRST trick for printing the headings
17:13 JJ_Brain joined #perl6
17:13 moritz masak: since you call sprintf three times separately, it might be nicer to just use .fmt
17:14 Oejet left #perl6
17:15 masak hm, yes.
17:21 moritz masak++ # nice mini challenge
17:21 * moritz suppresses the urge to -- for distracting me from doing p6cc coding
17:22 masak :P
17:22 masak that's part of the challenge :)
17:23 masak also, very punny naming the script "monte-carl.pl" :)
17:23 masak now the only mystery is: where's pi? Knuth promised us a pi.
17:23 moritz :-) gald you noticed
17:23 moritz *glad
17:23 masak :)
17:23 moritz masak: maybe in the closed form of that sum
17:23 masak was it a red herring, or did I miss it as it snuck by?
17:24 masak right.
17:24 masak could someone please close the sum? there's a draft, and the pi is getting cold.
17:24 moritz note that the sum looks an awful lot like a taylor series of an exp(x) function
17:25 moritz or maybe exp(x^2) or so
17:25 * masak is getting very good statistics
17:26 moritz and the integral over exp(-x^2) is sqrt(pi), iirc
17:26 masak it is.
17:26 masak something that took until multi-dim analysis to explain to us. >:(
17:27 moritz ah, the good integral-of-the-square trick, with coordinate transform
17:27 masak aye.
17:27 masak it's also trivial to solve with complex analysis, IIRC.
17:27 moritz oh, and it seems that the $N**2 dependency on the number of iterations is overkill
17:27 moritz $N is enough
17:27 masak ooh
17:27 * ingy has a strange craving for multi-dimsum
17:28 masak ingy++ # bad pun :)
17:28 moritz well, complex analysis does the same coordinate transformation as the square trick
17:28 masak well, I seem to recall the trick as similar but different.
17:28 masak there was an arbitrarily large circle involved.
17:29 moritz oh, you have the singularity, and do a line integral around it
17:29 masak right.
17:29 moritz what's the name of that theorem again?
17:30 masak residue theorem? Picard's theorem?
17:31 masak "Cauchy's residue theorem" seems to be it.
17:31 moritz I think I know it as Cauchy's, aye
17:31 masak it's a special case of the generalized Stokes' theorem, according to Wikipedia.
17:32 moritz right, same stuff
17:33 moritz very useful in physics, where integrating over an 1/r potential in space diverges, but you can always integrate over the perimeter
17:34 masak ...literally circumventing the problem.
17:34 moritz :-)
17:36 bitonic joined #perl6
17:39 pmurias is it possible to have to different settings in a compunit?
17:39 pmurias s/to/2
17:40 diakopter joined #perl6
17:40 masak "is it possible 2 have to different..." -- I don't get it. :)
17:41 SmokeMachine joined #perl6
17:42 masak pmurias: I think you're meant to be able to nest settings.
17:42 masak pmurias: but I have a hard time imagining more than one OUTER for a single block.
17:43 moritz a setting can have an outer setting
17:44 masak right.
17:44 masak so the answer is "transitively, yes. directly, no."
17:44 [Coke] ... we need to rename setting to turtle.
17:45 bitonic joined #perl6
17:47 * felher puts masak's mini challenge on top of his just4fun pile, where it might get tackled after $work
17:47 kaleem joined #perl6
17:48 masak felher: it was fun indeed!
17:49 masak #perl6 solves the whole thing! -- https://gist.github.com/4443780
17:49 masak [Coke]: "it's settings all the way out."
17:50 * felher takes a closer look at this solution as soon as he has some spare time and at least one of the following statements is true: he has solved the problem himself || he has given up :)
17:51 felher masak++ # providing a mini-challenge and a solution
17:51 masak felher: actually, it was moritz++ who found the formula.
17:51 felher well, moritz++ too, then :)
17:51 masak and it's still a sum, not a closed formula. we have reason to believe there's a closed formula and that it contains pi.
17:51 masak see backlog.
17:52 felher kk, will probably do after $work
17:52 * felher is afk again :)
17:53 PacoAir joined #perl6
17:54 * masak creates an RC task :)
17:56 pmurias re chromatic blog post what "impedance mismatch of an alien memory model" do either JVM or JavaScript as NQP targets suffer?
18:02 moritz r: our Str a;
18:02 p6eval rakudo f5037e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed ourâ�¤at /tmp/4c9Ntb8a3b:1â�¤------> [32mour Str [33mâ��[31ma;[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤Â»
18:05 * pmurias find it impossible to sign in on chromatic's blog to comment
18:08 nwc10 the only thing I feel confident saying is that I think that parrot suffered a *lot* from a lack of dogfood.
18:09 nwc10 in that, there was no push to minimise the bootstrap to a working parrot, and then use that to run the rest of the build system
18:09 nwc10 hence Parrot's developers rarely actually end up running ./parrot (or a language atop it) for the tasks they work on the most
18:10 nwc10 I'm not sure if that's directly relevant to Rakudo or any other Perl 6 implementaiton. I don't know enough
18:11 masak RC task page created: http://rosettacode.org/wiki/Average_loop_length
18:11 moritz masak++
18:12 masak I'm proud of what has become of my previous RC task page. please make me proud of this one, too ;)
18:12 dalek rakudo/nom: cdb0fa6 | (Tobias Leich)++ | src/core/Exception.pm:
18:12 dalek rakudo/nom: fixed typos of X::Import::Redeclaration's message
18:12 dalek rakudo/nom:
18:12 dalek rakudo/nom: The list of symbols at the end only makes sense to print if they were not mentioned before.
18:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cdb0fa60bd
18:13 masak nwc10: well, I do believe we dogfood quite a bit here on #perl6. and every time we do, we notice the benefits of it. could always dogfood more, of course.
18:13 xinming joined #perl6
18:13 masak actually, I notice two kinds of dogfooding, even. one is "use Perl 6 as part of developing Perl 6". another is "use Perl 6 in dayjob."
18:17 masak even goofing off with a mini-challenge, like I just did, generated a rakudobug. :)
18:21 FROGGS_ joined #perl6
18:24 pmurias nwc10: I use nqp a lot when working on nqp-js, but I don't use Perl6 besides developing Perl6 at all
18:30 moritz std: our Str a
18:30 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Multiple prefix constraints not yet supported at /tmp/wbkt8Q60QJ line 1:â�¤------> [32mour Str [33mâ��[31ma[0mâ�¤Malformed our at /tmp/wbkt8Q60QJ line 1:â�¤------> [32mour Str [33mâ��[31ma[0mâ�¤    expecting any of:â�¤ multi_declaratorâ�¤       typen…
18:31 fgomez joined #perl6
18:37 masak pmurias: I find that even when I'm working in other languages, quite often I'm "thinking" in Perl 6. does that happen to you too?
18:37 pmurias no
18:38 dalek roast: 28a82e8 | moritz++ | S (2 files):
18:38 dalek roast: RT #75640
18:38 dalek roast: review: https://github.com/perl6/roast/commit/28a82e845d
18:38 moritz happens to me
18:38 pmurias masak: "thinking" in NQP is not something I would be particularly fond of ;)
18:38 flussence There's been too much negativity outside today, so:   Parrot is a good idea with good intentions, and the language which the majority of its users install it for is one of the nicer ones I've used even though it's incomplete.
18:39 masak pmurias: :)
18:40 masak flussence: agreed on both counts.
18:40 masak flussence: though focusing on the positive aspects isn't enough for me in this case. Parrot could be better and Perl 6 could be more complete :)
18:41 timotimo where did this negativity come from?
18:43 masak I'm assuming reddit.
18:44 masak outside of the echo chamber, there's another chamber, where people tend to vent on Perl 6.
18:44 masak sometimes with factual statements. seldom in a nice way.
18:44 [Coke] and outside of THAT chamber, people say, "Perl? Isn't that dead?" ;)
18:46 moritz rakudo: sub foo ( $f = rand ) { say $f; }; say
18:46 p6eval rakudo f5037e: OUTPUT«␤»
18:46 moritz rakudo: sub foo ( $f = rand ) { say $f; }; say Capture.new() ~~ &foo.signature
18:46 p6eval rakudo f5037e: OUTPUT«True␤»
18:49 xilo_ joined #perl6
18:49 fgomez joined #perl6
18:50 GlitchMr joined #perl6
18:50 dalek roast: 834d159 | moritz++ | S03-smartmatch/capture-signature.t:
18:50 dalek roast: RT #77164, smart-matching against a signature with a default value
18:50 dalek roast: review: https://github.com/perl6/roast/commit/834d159713
18:54 adu_ joined #perl6
18:54 SmokeMachine joined #perl6
18:56 SmokeMac_ joined #perl6
18:57 FROGGS_ joined #perl6
18:58 [Coke] ETOOMANYCHAMBERS?
18:59 SmokeMachine joined #perl6
19:02 am0c joined #perl6
19:06 SmokeMac_ joined #perl6
19:13 dalek roast: 0093451 | moritz++ | S03-operators/range.t:
19:13 dalek roast: RT #77572, infix .. is not associative
19:13 dalek roast: review: https://github.com/perl6/roast/commit/0093451bca
19:14 dalek perl6-roast-data: 8d64c33 | coke++ | / (4 files):
19:14 dalek perl6-roast-data: today (automated commit)
19:14 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/8d64c330b3
19:15 [Coke] au++ # pugs back on the board with 33.83% of rakudo.
19:16 dalek roast: b428149 | moritz++ | S32-exceptions/misc.t:
19:16 dalek roast: RT #77582, error message when method is not found on a Hash
19:16 dalek roast: review: https://github.com/perl6/roast/commit/b428149cd0
19:17 [Coke] (down from 40.81% on 10/10/12 - mostly just needs fudging)
19:17 moritz rakudo: () .= ()
19:17 p6eval rakudo cdb0fa: OUTPUT«Method '' not found for invocant of class 'Parcel'␤  in method dispatch:<.=> at src/gen/CORE.setting:949␤  in block  at /tmp/TQZu2eZI53:1␤␤»
19:17 moritz std: () .= ()
19:17 p6eval std a8bc48f: OUTPUT«Potential difficulties:â�¤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/nGVsi7cG8d line 1:â�¤------> [32m() .=[33mâ��[31m ()[0mâ�¤ok 00:00 43mâ�¤Â»
19:18 * moritz is fine with either error message
19:21 atrodo joined #perl6
19:24 masak huh -- Rakudo passed ~1000 new tests on 2012-11-03, taking Niecza down from 90.17% to 86.46%. what was that?
19:24 * masak goes looking in Rakudo's history
19:25 masak ah. heredocs :)
19:26 perigrin .seen dukeleto
19:26 phenny perigrin: Sorry, I haven't seen dukeleto around.
19:27 masak apart from that big jump in November, it's just been a gradual slide since Rakudo overtook Niecza in terms of spectests in March.
19:28 nwc10 best reaction to chromatic's post (or any of the naysayers) is prove 'em wrong with working code.
19:28 nwc10 I hope we're getting there
19:29 masak nwc10: chromatic's post? url?
19:29 nwc10 (to be clear, not counting chromatic as a naysayer. He's basing his opinions on experience)
19:29 nwc10 was a reference to him earlier. I assumed that it was this: http://www.modernperlbooks.com/mt/2012/12/the-implementation-of-perl-5-versus-perl-6.html
19:29 nwc10 which correlated with the reference
19:29 masak I'm still surprised at how badly chromatic's experience seems to have burned him.
19:30 nwc10 I'm not totally. He put a massive amount of effort into doing the unfun debugging of parrot
19:30 nwc10 particularly GC bugs
19:31 nwc10 something dedicated a chunk of his life to, he now describes as currently being on life support (as best he can tell)
19:31 nwc10 oh, missed a "he" in there.
19:32 masak "Heroics aren't sustainable." -- :(
19:32 * masak hugs au++
19:33 supernovus joined #perl6
19:33 SmokeMachine joined #perl6
19:34 supernovus Hi, is there any updates or additional info concerning https://github.com/perl6/specs/issues/26  as it stands now, SCGI, HTTP::Easy, LWP::Simple, JSON::RPC, and likely many other socket related libraries, are broken.
19:35 masak people; http://www.modernperlbooks.com/mt/2012/12/the-implementation-of-perl-5-versus-perl-6.html is one of the best posts chromatic++ has written.
19:35 masak read it.
19:36 nwc10 the bots are excused? :-)
19:36 masak bots written in Perl 6 are excused :)
19:37 uvtc joined #perl6
19:37 masak I agree with basically everything. my main point of disagreement with chromatic is his analysis of the current situation and its degree of hopelessness.
19:37 masak it's easy to miss, but 2012 has been *great*.
19:37 masak 2013 will be better.
19:37 nwc10 me too
19:37 uvtc Saw the logs. Wanted to chime in, even though my opinion seems pretty orthogonal to what c is talking about.
19:37 phenny uvtc: 20 Dec 05:39Z <PerlJam> tell uvtc ah.  Thanks.  :-)
19:38 masak there are some things we don't do exceptionally well as an open-source community.
19:38 uvtc Regarding any negativity around Perl 6, my 2 cents is that the language seems rather complicated. My (possibly uninformed) impression is that it's probably complicated enough that the design is extremely difficult to get right. I've got no idea (nor opinion on) how "right" it currently is. I'm (mostly) waiting for there to be an official tutorial before spending more time with it.
19:38 masak we'll focus on those things. documentation, books, polish, whatever.
19:38 * _sri hopes the switch to the jvm will be a huge success
19:39 masak uvtc: "official tutorial" -- could you be more specific?
19:40 [Coke] _sri: switch is probably not the right word.
19:40 _sri [Coke]: now i'm concerned :S
19:40 uvtc I'm waiting for a Larry (or Damian?) to write a tut. When one of them does, to me that will be the bat-signal that it's time for "the masses" to start using Perl 6.
19:40 uvtc As it stands, I'm pretty confused by Perl 6.
19:41 * uvtc shrugs.
19:41 masak the Perl 6 community could benefit a lot from pulling in more people. we're not ready to open the floodgates for everyone yet, but I believe there is a huge demographic out there who would be delighted by what's there already, and who would feed a lot of useful improvements back into the system.
19:41 Woodi uvtc: official book can take a years :) for C it was probably 10 :)
19:43 uvtc I don't need a Camel book. But Larry is (IMO, and others', I assume) a fabulous writer, and Perl 6 is his baby.
19:43 masak "I didn't expect it to be perfect by any means, but I thought it'd at least by usable for some simple scripting tasks and some basic text processing. It wasn't usable for these, unfortunately." -- from http://news.ycombinator.com/item?id=4987396
19:43 masak I'd just like to say: three years' worth of p6cc contestants disagree.
19:44 masak *I* disagree.
19:44 Woodi uvtc: I vote with two hands for trolling The Two for blogging :)
19:44 masak I've been using Rakudo for exactly that for *four years*.
19:46 JJ_Brain joined #perl6
19:48 uvtc masak: I see what you mean; you'd love to attract more implementors at this point.
19:48 Woodi masak: but: no GUI, no DB, NativeCalls not quite working... maybe start with db stuff, what's is needed for DBIsh to work ?
19:48 dalek ecosystem: 4a80264 | (Timothy Totten)++ | META.list:
19:48 dalek ecosystem: WWW::App::Easy is now WWW::App::MVC
19:48 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4a80264979
19:49 dalek nqp/clang++-gh70: 10263fd | rurban++ | / (6 files):
19:49 dalek nqp/clang++-gh70: [GH #70] Enable clang++ compilation, proper function ptr casts
19:49 dalek nqp/clang++-gh70:
19:49 dalek nqp/clang++-gh70: Also fix a wrong C++ precedence: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
19:49 dalek nqp/clang++-gh70: review: https://github.com/perl6/nqp/commit/10263fdef5
19:49 SmokeMac_ joined #perl6
19:49 masak Woodi: as far as I know, DBIish is working.
19:49 masak people have done GUI stuff, at least in Niecza.
19:51 supernovus I can confirm that DBIish with SQLite3 works just fine. Not that I can run the WWW::App::MVC test using it at the moment since Rakudo broke the IO::Socket.read() method.
19:51 Woodi hmm, so I have outdated info.. Woodi--
19:52 uvtc Woodi: if you mean trolling Larry and/or Damian for blogging, I'd much rather see a github perl6/doc beginner's tut authored by them, but I'm guessing that'll happen when the time is right.
19:54 Woodi uvtc: why you want read ONLY tut from them ? it would be nice but someone other can write nice pages too me think...
19:54 Woodi and if you work in Sweden you can learn perl6 in school :)
19:54 masak that is true.
19:55 masak then again, we've always been ahead of the curve here in .se
19:55 Woodi :)
19:55 Woodi however private schools costs :)
19:55 doy for what it's worth, https://github.com/doy/p6-bread-board/blob/master/lib/Bread/Board.pm is what i was working on the past week or so
19:55 doy and while i did manage to make my way through it
19:55 masak I still remember the morning when taking the hoverboard to work started to feel... tedious.
19:56 doy the number of bugs/nyi things i ran into was fairly disheartening
19:56 masak doy: yes, I was surprised too.
19:56 doy just as another data point
19:56 masak doy: I noticed you were running up against things.
19:57 masak doy: I think I submitted O(3) bug reports thanks to your work.
19:57 doy i feel like a lot of the "it's not that buggy!" discussion comes from people who *have* been using it for 4 years now, and so know the parts of the language to avoid
19:57 masak there should be a name for that effect.
19:57 uvtc Woodi: it's not always easy collaborating on a cohesive opinionated doc. Anyhow, like I said, given the boundary conditions here, my guess is ... well, what I wrote above. :)
19:58 masak I noticed the same when writing the adventure game. "works here!" -- yeah, because I know which path to take through the game, and seldom try other paths.
19:58 masak doy: that's yet another reason to bring in new people.
19:58 hash_table joined #perl6
19:58 masak doy: we need to sandpaper as many bright new minds against the implementations as possible.
19:59 masak some people will burn out as a result, because that's how sandpaper works.
19:59 masak but the implementations will become more polished for it.
20:00 supernovus Yeah, I've rewritten several of my libraries multiple times over the last 4 years. The alpha to ng migration. The ng to nom migration. I'd like not to have to rewrite all the network related stuff to use a less intuitive read() method, but it seems nobody is interested in reverting to the DWIM behaviour. Maybe some new methods should be added to the spec, so we can have a choice between the Berkeley style and the DWIM style. TIMTO
20:00 supernovus WTDI and all that?
20:02 masak supernovus: fwiw, I think I heard pmichaud saying that he doesn't like the current state of .read breakage.
20:04 supernovus I like the idea of supporting both methodologies, a more "raw" version for those who want the closest-to-metal implementation, and a nice DWIM version for those of us who just want to be able to do a $socket.read($header-length); and have it "just work" :-)
20:05 supernovus Even if the DWIM version is just a candy coating for the more basic version, which is always what I assumed it to be anyway.
20:06 uvtc left #perl6
20:07 Woodi I was thinked about Berkeley sockets too... that Berkekeley API is standard and we should have it in Perl6. new gethostbyname (ip[46]) and rest too... universal 'read' and 'write' working in fs and network is good for general usage... but supernovus++ already say that :)
20:08 Woodi POSIX:: modules via NativeCalls ?
20:13 skids_ joined #perl6
20:13 supernovus read() for DWIM version, and sread() for raw version?  I dunno, I'm not a spec designer. I just know as a library author that the ability to say $header = $socket.read($header-length); and have it "just work" was amazingly brilliant in the previous Rakudo IO implementation, and I'd really like something like that back.
20:17 supernovus If you don't want two methods, you could have a named option to the read() method, say "exact" which would force it to use the DWIM semantics and return a Buf of the exact size (given that much data exists of course.) If omitted, the length becomes a "maximum" as per its current incarnation.
20:20 masak supernovus: it feels to me that what you just said should go into an issue/ticket somewhere. do you know of one? I think I saw one flash by a week or so ago.
20:21 doy the trouble with dwim interfaces to reading/writing type things is that you have to be very careful to get error handling correct
20:22 doy the reason the berkeley sockets api works the way that it does is that it's trivial to see that it's working correctly
20:22 doy and then you can add whatever amount of error handling you want on top of it
20:23 supernovus masak: I could update https://github.com/perl6/specs/issues/26 to include at least a couple of my potential suggestions. I don't know what the best approach is, I'm just offering some basic ideas.
20:23 FROGGS doy: I had the same experience like you. I wanted to port SDL, then recognized than I need a bit more than NativeCall, so I made Inline::C and then I ran into a bug that prevents merging multis
20:24 masak supernovus: please do.
20:24 masak supernovus: a copy-paste of what you've said here would be valuable.
20:24 doy i think that perl 6 probably has a robust enough exception mechanism to make writing a dwim thing doable
20:24 FROGGS doy: but as of today the bug is "fixed" (must be approved and applied), so the stuff I wrote will work in near future
20:24 doy you just have to be careful about it
20:25 supernovus doy: I agree that error handling must be done well. I also think we need to offer the Berkeley socket API, but that Perl 6, being the language to "make hard things easy" needs to have an easier way to do things than that.
20:25 masak FROGGS: welcome to my world. :)
20:25 doy (and a low level api where you have to handle more things yourself is preferable to a higher level api where you might just randomly drop data sometimes)
20:25 masak FROGGS: workarounds, it's an art and a science :)
20:27 * FROGGS finally arrived in masak's world! o/
20:28 supernovus As to be honest, rewriting all of the libraries to use a "read $*fixed-length number of bytes, until byte count is exactly $desired-length in a loop, then do what you want with the data" done in every single networking related library seems like a lot of unnecessary duplication when we could offer a version in the core that does exactly that in the background, but to the library-author, just returns $desired-bytes up front. No loo
20:28 supernovus p necessary.
20:28 moritz supernovus: I think it was a parrot change that caused rakudo's changed behavior
20:29 moritz supernovus: and I can totally see why a user wants the old behavior
20:29 moritz so, IMHO that's rakudo bug
20:29 moritz is there a ticket for that?
20:29 masak don't think so.
20:29 masak please file.
20:30 Woodi additional problem is parrot - it is Perl5 VM - it have the moust used things built in. so a lot of duplications for implementing std api's.
20:30 * moritz cannot parse that sentence
20:30 moritz and my disambiguation attempts hit semantic errors
20:31 FROGGS moritz: there is a github issue and a discussion
20:31 moritz rakudo doesn't have github issues enabled
20:31 Woodi parrot is like Perl5 VM - have buffering for providing perl-ish look and feel, have a lot of syscals...
20:32 FROGGS moritz: here, in specs: https://github.com/perl6/specs/issues/26
20:32 supernovus Maybe, use the DWIM version of read() by default (since it was the default behaviour up until recently), and offer the more raw version under a different method name, or by requesting it via a named parameter.
20:33 FROGGS supernovus: well, it would do what it does right now if you pass 512, right?
20:33 FROGGS so this "default chunk size parameter" just must be mentioned somewhere
20:34 rurban nqp seems to be broken: Missing or wrong version of dependency 'src/stage2/NQPCORE.setting'
20:34 supernovus FROGGS: In theory it would do what it does not if you pass 512, yeah.
20:34 moritz rurban: what are you doing to get that error message?
20:34 supernovus s:g/not/now/
20:35 rurban make realclean; perl Configure.PL && make
20:35 rurban with latest parrot installed
20:36 FROGGS supernovus: so I'd vote for implementation notes in the spec or somewhere else
20:36 * moritz builds now
20:36 rurban about the parrot read issues:  we need a parrot ticket for this. and a testcase.
20:39 masak wow, I just assumed that there was a Parret ticket for .read already :/
20:39 masak why did I assume that?
20:39 masak Parrot*
20:40 rurban I cannot even find the perl6 ticket about it...
20:40 timotimo how true is the statement that parrot is almost dead?
20:40 timotimo or did i misunderstand?
20:40 moritz rurban: because there isn't one
20:40 rurban I just forwarded it to whiteknight, but he is busy. So I'll bite into it.
20:40 masak rurban: there's just https://github.com/perl6/specs/issues/26
20:40 masak rurban++
20:40 moritz timotimo: parrot development seems to happen in bursts these days
20:41 rurban timotimo: I have no idea. The parrot Changelog and branches are even more active than rakudo
20:41 Chillance joined #perl6
20:41 moritz sometimes rurban++ or nine++ or whiteknight++ do some big-ish stuff
20:41 moritz and other month the changelog reads as if only minor build stuff was fixed
20:41 moritz *months
20:42 xinming joined #perl6
20:44 rurban moritz: https://github.com/parrot/parrot/issues/909
20:44 moritz rurban: fwiw nqp master built fine for me, on parrot 4.10.0
20:44 rurban interesting. so maybe I broke it.
20:45 rurban clang++ 3.3 -fsanitize=address testing
20:45 supernovus gotta go, be back later
20:45 moritz rurban: you might try   git clean -xdf  in nqp
20:45 [particle] joined #perl6
20:45 moritz that's usually more thorough than   make realclean
20:46 moritz rurban: thanks for opening the ticket
20:46 rurban but I have a lot of threads patches lying around there :)
20:47 moritz rurban: I'm now trying it again with parrot/master, but this machine is very slow, so might take some time :-)
20:47 rurban mine is faster, almost done
20:48 rurban nope, so parrot-4.11 is to blame here
20:48 rurban same error
20:48 rurban I changed the pmc and the ops compiler...
20:49 rurban hmm...
20:49 rurban Missing or wrong version of dependency 'src/stage2/QRegex.nqp'
20:51 FROGGS forgot to 'make install' ?
20:51 rurban Nope, but I cleaned make install also...
20:52 rurban There were a lot of changes lately
20:52 moritz erm
20:52 moritz Can't locate Parrot/Pmc2c/PCCMETHOD_BITS.pm in @INC
20:52 moritz that's what I get while trying to build nqp
20:52 rurban good
20:52 rurban That's https://github.com/parrot/parrot/issues/890 then
20:55 rurban thanks for the catch, my error. will be fixed immediately
21:03 Kharec left #perl6
21:03 rurban cannot reproduce, and could not find a parrot error. I got ./src/stage0/NQP-s0.pir:.annotate 'file', "src/stage2/gen/NQP.pm" but src/stage2/ does not exist yet
21:04 sorear o/
21:04 FROGGS hi sorear
21:04 masak sorear! \o/
21:04 * [Coke] wonders if one of you has an installed parrot elsewhere that is confusing things.
21:05 Woodi hmm, so nqp-not-on-parrot need to implement all file bufferings ?
21:06 moritz rurban: if it helps, my rakudo dir is actually a symlink
21:06 moritz moritz@lara:~>ls -ld p6/rakudo
21:06 moritz lrwxrwxrwx 1 moritz moritz 35 Apr 30  2010 p6/rakudo -> /nocrypt-home/moritz/source/rakudo/
21:06 rurban I'm building nqp from a clean git clone'd dir
21:06 rurban independent form rakudo
21:07 rurban from
21:07 rurban trying now --gen-parrot (4.10.0)
21:07 moritz well, my nqp and parrot dirs are below the rakudo dir
21:07 [Coke] rurban++ btw, for hanging out in this channel. Thanks.
21:08 rurban well, there is a big change that I broke rakudo :)
21:09 rurban ok, with --gen-parrot it works fine.
21:10 moritz 4.10.0 worked for me too
21:10 rurban I'll bisect it
21:12 rurban wanted to say: well, there is a big chance that I broke rakudo
21:12 rurban we are doing parrot-5.0 testing now
21:16 tipdbmp joined #perl6
21:17 att__ joined #perl6
21:19 moritz rurban: should I open an issue for Can't locate Parrot/Pmc2c/PCCMETHOD_BITS.pm ?
21:19 rurban nqp compiled  ok with parrot master if created via --gen-parrot  RELEASE_4_11_0-98-g5d697e5
21:20 rurban moritz: that's your problem. you must do a make clean before make install.
21:20 moritz rurban: make clean in parot?
21:20 rurban make install will just install the freshly generated files, and this files was left over
21:20 rurban yes
21:20 moritz ok
21:20 rurban make install is driven now from a generated MANIFEST.generated
21:21 moritz will do
21:21 rurban previously it was a hardcoded MANIFEST.generated (with a lot of old cruft)
21:21 rurban (and some missing entries)
21:22 rurban so nqp only has a problem from a globally installed parrot
21:22 tipdbmp How to resolve the "circular dependency": class A { method a(B $b) { ... } } class B { method b(A $a) { ... } }
21:23 doy tipdbmp: class B {...} at the beginning
21:23 tipdbmp Nope, same thing.
21:23 kurahaupo joined #perl6
21:23 masak those ... dots are literal.
21:23 masak you literally put them in.
21:24 masak r: class B { ... }; class A { method a(B $b) {} }; class B { method b(A $a) {} }; say "alive!"
21:24 p6eval rakudo cdb0fa: OUTPUT«alive!␤»
21:24 doy class B {...}; class A { method a(B $b) { ... } }; class B { method b(A $a) { ... } }
21:24 tipdbmp The error is that type methoda a(B $b) # type B is not found / typename not found
21:24 masak tipdbmp: works; see above.
21:24 tipdbmp Oh, I see.
21:25 masak literal dots? :)
21:25 tadzik good evening
21:25 kurahaupo Can they be spelt with a unicode elipsis instead? \u2026
21:25 masak tadzik! \o/
21:25 masak kurahaupo: not in standard Perl 6, no.
21:25 tadzik good day :)
21:30 kurahaupo masak: there are a bunch of useful extra punctuation in the \u2010 ~ \u205f range; in particular think \u2024 "…" for "..." and \u2047 "⁇" for "??" would be nice to have.
21:33 masak kurahaupo: if it were up to me, we would have *less* Unicode in Perl 6, not more. :)
21:34 doy say "hi" if defined $foo
21:34 kurahaupo Fair point.
21:34 diakopter masak++
21:35 masak kurahaupo: sorry, I know that's the boring, unadventurous answer.
21:35 masak kurahaupo: all is fair if you predeclare, though.
21:35 masak 'use More::Unicode;'
21:35 rurban moritz: strange https://github.com/perl6/nqp/issues/71
21:36 kurahaupo use Even::More::Unicode :with(punctuation);
21:48 pmichaud rurban: (nqp #71)   did you do a "make clean" or "make realclean" before attempting to build nqp using the globally installed parrot?
21:48 rurban even git clean -dxf
21:49 rurban I have a little patch to test parrot master with nqp
21:49 rurban at #71
21:50 pmichaud that patch doesn't look right to me
21:50 masak phenny: tell grondilu that I think http://rosettacode.org/mw/index.php?title=Average_loop_length&amp;diff=149562&amp;oldid=149561 made a mathematical-looking expression much less easy to understand :/
21:50 phenny masak: I'll pass that on when grondilu is around.
21:50 MayDaniel joined #perl6
21:51 rurban if you tell tools/build/PARROT_REVSION (same for NQP) to force master, then the cmp_rev should always win.
21:51 pmichaud PARROT_REVISION should never be set to 'master'
21:51 rurban because there's nothing bigger than master
21:51 pmichaud it's always supposed to be an actual revision number
21:52 rurban I wanted to test master with --gen-parrot, but got an wrong looking error
21:52 pmichaud should be  --gen-parrot=master
21:52 pmichaud if that doesn't work, it's a bug
21:53 rurban oh, thanks
21:53 rurban $ perl Configure.pl --gen-parrot=master
21:53 rurban Unrecognized revision specifier 'master'
21:53 pmichaud but changing PARROT_REVISION to 'master' isn't really the intent
21:53 rurban I know.
21:53 rurban just a hack to test it
21:53 masak phenny: tell grondilu also, I can't reproduce the bug you seem to be compensating for in http://rosettacode.org/mw/index.php?title=Average_loop_length&amp;diff=149566&amp;oldid=149562 -- old rakudo?
21:53 phenny masak: I'll pass that on when grondilu is around.
21:54 pmichaud pmichaud@kiwi:~/p6/nqp$ perl Configure.pl --gen-parrot=master
21:54 pmichaud Cloning into 'parrot'...
21:54 pmichaud ...works here.
21:55 rurban It failed because I had master as PARROT_REVISION
21:55 rurban now it works for me also.
21:55 rurban I deleted my hack
21:56 pmichaud one can use --gen-parrot with any (git) revision specifier, including branches.
21:56 pmichaud same goes for Rakudo
22:00 rurban I still have the nqp compile problem with a new installed parrot devel version
22:00 rurban (I deleted the wrong comments about my hack)
22:02 pmichaud master branch?
22:02 pmichaud (parrot master?)
22:02 rurban yes
22:02 pmichaud testing locally
22:02 rurban I think it has something to do with -devel
22:03 rurban And I don't understand the ModuleLoader logic
22:03 pmichaud I don't understand "-devel"
22:04 pmichaud you mean the fact of building from a git clone version?
22:04 rurban This is Parrot version 4.11.0-devel built for amd64-linux
22:04 rurban yes
22:04 pmichaud well, that's what --gen-parrot typically does
22:04 rurban but it works if installed into install/
22:05 pmichaud it works if parrot master is installed into install/ ?
22:05 rurban I'll compare the two trees...
22:05 rurban yes
22:05 pmichaud there shouldn't be much of a difference there, then
22:05 dalek nqp: 8423e0a | pmichaud++ | Configure.pl:
22:05 dalek nqp: Change Configure.pl --help to mention [=branch] option of --gen-parrot.
22:05 dalek nqp: review: https://github.com/perl6/nqp/commit/8423e0a59a
22:05 rurban thanks
22:06 pmichaud I get
22:06 pmichaud Can't locate Parrot/Pmc2c/PCCMETHOD_BITS.pm in @INC (@INC contains: /home/pmichaud/p6/parrot/install/lib/4.11.0-devel/tools/build/../../lib /home/pmichaud/p6/parrot/install/lib/4.11.0-devel/tools/build/../lib /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/pmichaud/p6/parrot/install/lib/4.11.0-devel/tools/build/../lib/Parrot/Pmc
22:06 rurban same as moritz
22:06 pmichaud from pmc2c
22:07 rurban hmm, this indicates that your parrot was not clean before make install
22:07 pmichaud I just did a fresh checkout, git clean -xdf, configure, make, makeinstall
22:07 rurban MANIFEST.generated did not contain all files it should generate
22:07 pmichaud but I can do it again
22:07 rurban hmm...
22:08 rurban This was a recent change
22:09 rurban I see. git clean -dxf does not clean parrot/
22:10 rurban this is a leftover
22:10 pmichaud but I'm not ussing parrot/
22:10 pmichaud since I installed in a different location
22:10 pmichaud still, I'm removing parrot/ explicitly and see if I get the same result.
22:10 rurban manually rm -rf parrot/ solved it for me
22:10 diakopter I had that exact problem a while ago
22:11 diakopter I suspected it was because parrot was  in the .gitignore
22:11 rurban Maybe we should make install more stable.
22:11 pmichaud if it's finding a wrong parrot, that indicates a path problem somewhere with parrot.
22:11 rurban check for Parrot/Pmc2c/PCCMETHOD_BITS
22:13 pmichaud correct, doing rm -rf parrot from the nqp directory seems to have solved the problem for me as well
22:13 pmichaud so, something in pmc2c is looking in the wrong place or grabbing the wrong parrot binary/libraries
22:14 nyuszika7h joined #perl6
22:14 pmichaud either that or nqp's Makefile is grabbing the wrong pmc2c
22:16 rurban I'll fix this: https://github.com/parrot/parrot/issues/910
22:20 thou joined #perl6
22:24 grondilu joined #perl6
22:26 rurban include/parrot/4.11.0-devel vs include/4.11.0-devel
22:27 rurban parrot_config versiondir is different
22:27 rurban parrot_config versiondir vs install/bin/parrot_config versiondir
22:29 rurban do you have a special parrot prefix or version dir logic? I don't see any. I'll check parrot
22:31 rurban we have one.
22:31 moritz rurban: fvwiw rakudo and nqp build fine for me on parrot RELEASE_4_11_0-98-g5d697e5
22:32 * moritz -> sleep
22:32 rurban There is a strange parrot logic which check the buildpath if it includes /parrot
22:32 Chillance joined #perl6
22:32 rurban mine does
22:41 Pleiades` joined #perl6
22:42 pmichaud ...checks the buildpath or install path?
22:43 rurban install path, but with installpath it is under the buildpath
22:43 rurban but with --gen-parrot the installpath is ...
22:44 pmichaud that checking for /parrot sounds completely bogus to me (more)
22:44 pmichaud for example, I often install to a path that includes '/parrot' somewhere in the path, even if it's not part of the build tree
22:45 rurban yes, this logic needs to be a bit stricter. But now I have the catch the real bug caused by this.
22:45 pmichaud looking at the pathname for a specific string sounds very fragile to me
22:46 rurban See config/init/install.pm:42
22:50 rurban hmm, the versiondir logic seems good to me. if under parrot already omit another /parrot/...
23:03 dalek rakudo/froggs_mergemulti: 0f0bb50 | jonathan++ | src/binder/bind.c:
23:03 dalek rakudo/froggs_mergemulti: Teach compile time bind analysis about (|) sig.
23:03 dalek rakudo/froggs_mergemulti:
23:03 dalek rakudo/froggs_mergemulti: It now recognizes such a signature as accepting anything, and thus
23:03 dalek rakudo/froggs_mergemulti: certain to be a successful match.
23:03 FROGGS uhh
23:03 dalek joined #perl6
23:07 dalek roast/froggs_mergemulti: f579a22 | (Tobias Leich)++ | S11-modules/import-multi.t:
23:07 dalek roast/froggs_mergemulti: new tests for multi symbol merging
23:07 dalek roast/froggs_mergemulti: review: https://github.com/perl6/roast/commit/f579a22142
23:13 bbkr joined #perl6
23:18 masak ♞y-♞, #perl6
23:20 FROGGS aloa
23:21 bbkr https://github.com/parrot/parrot/issues/909 - looks like Rakudo socket issue goes deeper. fix was marked as milestone for parrot 5.0. will there be any workaround till then on Rakudo/NQP level?
23:43 rurban bbkr: yes, I marked it as milestone for the next release. At least we need some decisions, change spec or force changing user code.
23:43 bbkr rurban: thanks!
23:46 FROGGS bbrk: a workaround in rakudo might be pretty simple when looking at this: https://github.com/rakudo/rakudo/blob/nom/src/core/IO/Socket.pm#L26-L34
23:47 rindolf Hi all.
23:48 rindolf FROGGS, rurban , masak , pmichaud : meow.
23:48 * rindolf wrote the most ad-hoc XML grammar ever.
23:48 FROGGS hi rindolf
23:48 rindolf But it only has an RNG and a sample XML file - not an XSLT yet.
23:49 rindolf I can try converting it to DocBook instead of XHTML directly.
23:50 MikeFair_ joined #perl6
23:50 bbkr FROGGS: should it be reported as rakudobug then? from user point of view - it is rakudobug because current behavior does not match spec, right?
23:51 FROGGS bbkr: I think so too, but I'm still a n00b here, so not 100% sure
23:54 FROGGS bbkr: I'd love to fix it though
23:59 bbkr FROGGS: I'm preparing simple code to demonstrate differences between 2012.11 and 2012.12. Then I will create ticket so change will be documented. Rest is up to you because I'm a total nqp/pir noob :)

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

Perl 6 | Reference Documentation | Rakudo