Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-09-16

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:01 yarp overlap 1 time, minus, 2times plus, 3times minus ...
00:01 TimToady um, I have no idea what you mean.  I created the original rectangle, and so I know it is one.  and how is the area wrong
00:02 TimToady ?
00:03 timotimo it might be too nitpicky. it requires the points to be positioned correctly, but i suppose if the rest of the code guarantees that it's correct, i have no reason to complain
00:05 TimToady it's certainly not your standard Rect; there's intentionally some redundancy to make it easier to share Points between subdivisions, since each Point caches its circle membership in a bitmask
00:07 TimToady that is, once a given Point is created, all the rectangles that use that as a corner share the same Point object
00:07 rsimoes joined #perl6
00:08 benabik joined #perl6
00:08 TimToady one could assert that the four points are rectilinear, but then it'd be even slower than it already is :/
00:08 sorear mm, interesting problem yes
00:09 * TimToady keeps thinking there's probably an analytical way to solve it, but it would take more math than he currently has handy
00:10 sorear TimToady: yes, it can be done analytically.  I'm working out the details now
00:11 TimToady should be able to get an exact number by dividing the wet space into wedges and triangles
00:11 timotimo i like that code.
00:11 TimToady I was trying to make it likeable :)
00:11 TimToady the compass metaphor helps a great deal
00:13 timotimo triangles, wedges, something about voronoi ;)
00:13 the joined #perl6
00:13 TimToady one needs 2-D soap bubbles, I suppose
00:14 TimToady except those move each other around
00:14 TimToady these bubbles have no "pressure"
00:14 timotimo oh, there's not yet a perl6 implementation of the voronoi diagram. would you recommend i just output BMP for external visualisation or are there some drawing/imaging libraries for p6, that i could use on rosettacode without getting myself in trouble? :)
00:15 TimToady well, there are various options, but I can't really recommend one over another.
00:15 TimToady there are some Gtk examples/ in niecza
00:18 TimToady SDL has been used, as well as PPMish stuff
00:18 timotimo what do you mean by PPM?
00:18 TimToady ppm - portable pixmap file format
00:19 TimToady man ppm on linux, for example
00:19 timotimo oh, of course.
00:19 timotimo yeah, ppm is probably even easier than bmp already is
00:19 timotimo amusing, the magic cookie for ppm is apparently P6
00:21 * sorear convinces emself that the answer is always the complex logarithm of an algebraic number
00:22 TimToady http://rosettacode.org/wiki/Sier​pinski_triangle/Graphical#Perl_6 uses SVG
00:23 timotimo good point. i should be able to get a much faster implementation of voronoi if i use trigonometry and svg rather than rasterizing.
00:23 TimToady http://rosettacode.org/wiki/Grayscale_image#Perl_6 uses PPM
00:24 timotimo (but only for euclidean images, taxi and minkowski 3 won't work that easily
00:25 timotimo for taxicab, something like a marching ray might be a good answer.
00:27 tokuhiro_ joined #perl6
00:30 sorear timotimo: even in unusual metrics, the voronoi diagram always lies on the union of the equal-distance planes
00:31 sorear this leads to a natural polynomial (large constant) algorithm
00:31 sorear first find all the equal-distance planes, then restrict each equal-distance plane by intersecting it with its halfspaces of applicability
00:33 sorear equal distance surfaces in taxicab are not too bad, they're just composed of lines and 45° segments I think
00:33 sorear minkowski 3 gets you... well I'm frankly pretty ignorant about algebraic geometry
00:33 sorear but it's the locuse of points satisfying a certain cubic equatiohn
00:34 TimToady or an uncertain cubic equation, in my case :)
00:35 * sorear spent a lot of time last week trying to understand wtf Goppa codes were
00:35 * sorear failed
00:37 TimToady The world is so full of a number of things, I'm sure we should all be as happy as kings.  --RLS
00:37 TimToady there's that word, "should", again...
00:37 TimToady The subjunctive is always so subjective...
00:40 timotimo sorear: i'm implementing that now :)
00:43 timotimo how do i get a Real of value inf? or something similar?
00:46 sorear Inf
00:47 sorear rpn: say Inf ~~ Real
00:47 p6eval pugs: OUTPUT«*** No such subroutine: "&Real"␤    at /tmp/trSRNJoiEN line 1, column 5 - line 2, column 1␤»
00:47 p6eval ..rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«True␤»
00:48 timotimo ah, with a big i
00:48 TimToady rpn: say "foo" lt Inf
00:48 p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«False␤»
00:48 p6eval ..pugs: OUTPUT«␤»
00:48 TimToady hmm
00:49 timotimo is there something like "if the left expression has a division by zero, use the right expression instead"?
00:49 TimToady pnr: say 1/0 // "phooey"  # curious
00:49 p6eval rakudo 4dd124: OUTPUT«Divide by zero␤  in sub infix:<div> at src/gen/CORE.setting:2887␤  in method floor at src/gen/CORE.setting:7942␤  in method Str at src/gen/CORE.setting:7960␤  in method gist at src/gen/CORE.setting:2372␤  in sub say at src/gen/CORE.setting:7172␤  in block  at /tmp/…
00:49 p6eval ..niecza v21-8-ga216174: OUTPUT«Inf␤»
00:49 p6eval ..pugs: OUTPUT«*** Illegal division by zero␤    at /tmp/ogER5BLD0F line 1, column 5 - line 2, column 1␤»
00:50 TimToady n: say -1/0
00:50 p6eval niecza v21-8-ga216174: OUTPUT«-Inf␤»
00:50 TimToady n: say -1/-0
00:50 p6eval niecza v21-8-ga216174: OUTPUT«-Inf␤»
00:50 benabik joined #perl6
00:51 timotimo interesting.
00:51 TimToady pnr: say Inf.defined
00:51 timotimo decommute &
00:51 p6eval pugs: OUTPUT«1␤»
00:51 p6eval ..rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«True␤»
00:51 TimToady pnr: say NaN.defined
00:51 p6eval pugs: OUTPUT«1␤»
00:51 p6eval ..rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«True␤»
00:51 timotimo one way is always to do:
00:51 timotimo r: my $b = 1; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
00:51 p6eval rakudo 4dd124: OUTPUT«===SORRY!===␤Variable $foo is not declared␤at /tmp/5JXQMdlbvs:1␤»
00:51 timotimo r: my $b = 1; my $foo; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
00:52 p6eval rakudo 4dd124: OUTPUT«99␤»
00:52 timotimo r: my $b = 1; my $foo; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
00:52 p6eval rakudo 4dd124: OUTPUT«99␤»
00:52 timotimo r: my $b = 0; my $foo; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
00:52 p6eval rakudo 4dd124: OUTPUT«Inf␤»
00:52 timotimo a bit wordier than i hoped.
00:52 * sorear thinks signalling divide by zero is just wrong
00:52 TimToady define "signalling"
00:52 sorear r: sub infix:<s/>($a,$b) { $b ? $a / $b : Inf}; say 1 s/ 0
00:52 p6eval rakudo 4dd124: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator;  in Perl 6 please use ??!!␤at /tmp/ETbhox_e3_:1␤»
00:53 sorear r: sub infix:<s/>($a,$b) { $b ?? $a / $b !! Inf}; say 1 s/ 0
00:53 p6eval rakudo 4dd124: OUTPUT«Inf␤»
00:53 sorear TimToady: breaking control flow, as die(), or retuning an object which breaks control flow, like a Failure or signallingNaN
00:54 TimToady so now that you're ruled out all the possibilities...
00:54 TimToady you just want the rocket to do something random?>
00:54 sorear no, I want the operation to return Inf.
00:55 sorear I could also live with a *quiet* NaN
00:55 TimToady okay, well, I think I agree, though I can argue with it
00:56 TimToady the only argument I have is that as the denom goes to 0 from one side or the other, you lose the sign of your Infinity, if it was approaching one end or the other due to the denom's sign
00:57 TimToady one would like an easier way to turn those into something undefined though
00:57 TimToady so that // works
00:58 sorear what I really don't like about Failure here is that it doesn't seem to propagate in math
00:58 sorear 1 + 1 / $x should not die if $x is zero
00:58 sorear r: 1 + $*failuresource
00:58 p6eval rakudo 4dd124: OUTPUT«Dynamic variable name not found␤  in method Numeric at src/gen/CORE.setting:9840␤  in sub infix:<+> at src/gen/CORE.setting:2530␤  in block  at /tmp/AWV3u39NbH:1␤␤»
00:58 sorear r: say (1 + $*failuresource).defined
00:58 p6eval rakudo 4dd124: OUTPUT«Dynamic variable name not found␤  in method Numeric at src/gen/CORE.setting:9840␤  in sub infix:<+> at src/gen/CORE.setting:2530␤  in block  at /tmp/QnZnj4Di7o:1␤␤»
00:59 benabik 1 / 0 != Inf  :-/
00:59 TimToady r: say (1 + ($*failuresource//NaN)).defined
00:59 p6eval rakudo 4dd124: OUTPUT«True␤»
01:01 TimToady r: sub postfix:<//0>($x) { $x // 0 }; say (1 + $*failuresource//0).defined
01:01 p6eval rakudo 4dd124: OUTPUT«True␤»
01:02 TimToady how's that for messing with precedence? :)
01:03 TimToady I do get tired of putting parens around // expressions, but this is perhaps not the solution...
01:05 raiph joined #perl6
01:05 raiph moritz: ping
01:05 phenny raiph: 15 Sep 19:40Z <moritz> tell raiph phase one IRC log summaries are live. Enjoy! (and feedback welcome)
01:10 [Coke] joined #perl6
01:10 TimToady phenny: tell GlitchMr a KeySet is just a hash, if you use it like one, so you can say %ks{$elem} = True to add and you can %ks{$elem}:delete to remove it, or %ks{$elem} = False should work too, in addition to set operators
01:10 phenny TimToady: I'll pass that on when GlitchMr is around.
01:16 dalek std: 1f19235 | larry++ | STD.pm6:
01:16 dalek std: fix syntax error in recommendation
01:16 dalek std: review: https://github.com/perl6/std/commit/1f19235b98
01:18 [Coke] phenny: tell GlitchMr I added you to sixplanet
01:18 phenny [Coke]: I'll pass that on when GlitchMr is around.
01:19 kid51 joined #perl6
01:22 topo joined #perl6
01:22 MikeFair_ joined #perl6
01:25 MikeFair_ Evening folks :)
01:25 sorear o/
01:26 jaldhar joined #perl6
01:27 imarcusthis joined #perl6
01:37 exodist_ joined #perl6
01:51 dalek specs: b3233b4 | larry++ | S (2 files):
01:51 dalek specs: limit unary hypers to declared shape or flat
01:51 dalek specs:
01:51 dalek specs: Also add .duckmap and .deepmap to give the less huffmanly desirable
01:51 dalek specs: semantics.
01:51 dalek specs: review: https://github.com/perl6/specs/commit/b3233b4ccf
01:52 FROGGS_ joined #perl6
01:57 flightrecorder joined #perl6
01:57 colomon rn: my %ks = KeySet.new; %ks{2}++; %ks{4}++; say %ks.perl
01:57 p6eval rakudo 4dd124: OUTPUT«("2" => 1, "4" => 1).hash␤»
01:57 p6eval ..niecza v21-8-ga216174: OUTPUT«Unhandled exception: Unmatched key in Hash.LISTSTORE␤  at /tmp/QWGYMGZK6B line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571) ␤  at /home/p6eval/niecz…
01:57 colomon rn: my $ks = KeySet.new; $ks{2}++; $ks{4}++; say $ks.perl
01:57 TimToady um... := maybe?
01:57 p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«KeySet.new("2", "4")␤»
01:58 colomon TimToady: I believe that's a known Nieczabug
01:58 TimToady oh, right, we want it to dwim with a hash in key position
01:59 colomon btw, .duckmap  ?!
01:59 TimToady the old specced behavior of hyper which I couldn't get anyone to implement
02:00 colomon ah.  I didn't realize there was a gap between spec and implementations there.
02:00 TimToady at the moment I suspect the implementations are still doing deepmap, which I detest
02:00 TimToady I mean, as the default for hyper
02:00 TimToady unary hyper, that is
02:01 sorear what should binary hyper do?
02:01 TimToady same as it currently does
02:01 TimToady though we might revisit that once we start playing with shaped arrays
02:02 the joined #perl6
02:03 colomon why should unary and binary hypers approach arrays differently?
02:03 TimToady basicaly, strict hypers are likely to restrict themselves to the actual shape of a shaped array, in the hopes we can optimize them
02:05 TimToady it's probably only dwimmy hypers that should descend into reference thickets
02:05 OuLouFu joined #perl6
02:06 TimToady though that works against the current »op» semantics, I suppose
02:06 TimToady we're probably just overloading the syntax a bit too much, and should provide something like the duck/deep unary methods for getting really fancy
02:07 TimToady if we can't feed a strict hyper to a GPU, we've done something wrong
02:11 timotimo hm. what does it mean to access properties(?) of a class from a method of that class with $!name? i thought that was for private things? or are things defined with has $.name private and need to be accessed like that every time?
02:11 timotimo but in crypts source code i see accesses to $.name without an !
02:12 * TimToady thinks about doubled hypers for deep mapping: $foo»»++ and $bar »»+» 1
02:12 sftp_ joined #perl6
02:13 TimToady well, you can do it either way, depending on whether you want to view your object from the inside or the outside
02:13 TimToady the .name form can be shadowed by derived classes, and the !name can't
02:14 timotimo ah, that's interesting. in this case i don't have to worry about that, though.
02:14 TimToady right, mostly one just picks ! for efficiency in such cases
02:15 timotimo efficiency? it makes going through the mro unnecessary, right?
02:15 TimToady but you always have option of picking . if you think you might like it wrappable by subclasses
02:16 TimToady if your class turns out to be final, then the optimizer will likely turn . into ! for you
02:16 timotimo is there something inherently wrong about "has LineSegment @.neighbours"?
02:16 TimToady not if each of the neighbors is a LineSegment
02:17 timotimo i'm getting "malformed has". probably have some error nearby then.
02:18 TimToady std or niecza will maybe give a better error
02:18 timotimo good point, thanks
02:20 timotimo niecza also just says "malformed has"
02:20 timotimo does the LineSegment have to be declared earlier in the code file?
02:20 TimToady yes
02:20 TimToady can be a stub though
02:20 timotimo oh, that would explain it then.
02:21 timotimo would like a better error message for that if that's at all possible.
02:21 TimToady nodnod
02:22 TimToady in general, if you use LineSegment in normal code before definition, you'd get the better message, but declarations are picky enough to die before that
02:22 timotimo std: class Yoink { has Frob $.a }; class Frob { has Real $.blubb };
02:22 p6eval std 1f19235: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed has at /tmp/qC9vDeJjzC line 1:â�¤------> [32mclass Yoink { has [33mâ��[31mFrob $.a }; class Frob { has Real $.blub[0mâ�¤    expecting any of:â�¤       scoped declaratorâ�¤      typenameâ�¤Parse failedâ�¤FAILED 00:00 42mâ�¤Â»
02:22 TimToady std: say Yoink.new;
02:22 p6eval std 1f19235: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    'Yoink' used at line 1â�¤Check failedâ�¤FAILED 00:00 41mâ�¤Â»
02:22 timotimo std: sub yoink { Frob.new }; class Frob { has Real $.blubb }; yoink();
02:22 p6eval std 1f19235: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Illegally post-declared type:â�¤       'Frob' used at line 1â�¤Check failedâ�¤FAILED 00:00 43mâ�¤Â»
02:23 timotimo that's much nicer
02:23 TimToady there's probably some way to get it to do that from the declaration parser too
02:28 timotimo i'm amazed at how slow rakudo is :|
02:29 TimToady hmm, it's supposed to have a better message there, but I think it's getting confused on whitespace
02:34 TimToady no, that's not it...
02:42 timotimo 80 lines of not very complicated perl6 code and rakudo takes 4 seconds on my machine to tell me i've assigned a wrong type :|
02:44 TimToady well, it could be 4 hours, since it's a run-time check
02:45 TimToady depends on what the code before it is doing
02:45 timotimo oh. ok.
02:45 ggoebel joined #perl6
02:45 timotimo if i'm making mistakes like that, maybe i should be sleeping instead of hacking :)
02:46 TimToady well, a 4 second turnaround time isn't *that* slow
02:46 * TimToady thinks the old batch runs where you're lucky to get a cycle time shorter than a day...
02:48 dalek std: 63400a4 | larry++ | STD.pm6:
02:48 dalek std: reenable the undeclared typename error, timotimo++
02:48 dalek std: review: https://github.com/perl6/std/commit/63400a4408
02:49 dalek std: b842bb3 | larry++ | STD.pm6:
02:49 dalek std: oops, remove debugging statement
02:49 dalek std: review: https://github.com/perl6/std/commit/b842bb3c5f
03:04 timotimo std: if (1 == 1) { say "yup" } else if (1 == 2) { say "nope" }
03:04 p6eval std 1f19235: OUTPUT«[31m===[0mSORRY![31m===[0m�Please use 'elsif' at /tmp/9GeJXpUxc7 line 1:�------> [32mif (1 == 1) { say "yup" } else if [33m�[31m(1 == 2) { say "nope" }[0m�Confused at /tmp/9GeJXpUxc7 line 1:�------> [32mif (1 == 1) { say "yup" } else if [33m�[31m(1 == 2) {…
03:04 timotimo good. rakudo gives the rather nonhelpful "missing block" error.
03:07 raiph joined #perl6
03:07 raiph hi all
03:10 raiph http://irclog.perlgeek.de/out.pl?cha​nnel=perl6;date=2012-09-03;summary=1
03:11 raiph ^^ Summary of #perl6 on 2012-09-03 using Moritz's new Summary feature of his irclogger.
03:14 TimToady \ö/
03:15 raiph 1. Went to usual log page. 2 Wait for Enable Summary mode link to appear up top. 3. Clicked it. 4. Clicked checkboxes. 5. Clicked Save Summary.
03:16 timotimo 1.) sleep, 2.) linear algebra, 3.) ???, 4.) profit. it never fails.
03:17 timotimo step 3 may or may not be breakfast.
03:19 raiph Great start. Moritz++ Will gist some feedback about wrinkles tomorrow. Thanks Moritz!
03:19 raiph phenny, tell Moritz http://irclog.perlgeek.de/​perl6/2012-09-16#i_5992712
03:19 phenny raiph: I'll pass that on when Moritz is around.
03:25 ggoebel joined #perl6
03:45 * MikeFair_ waves helo
03:46 sorear hi!
03:48 ggoebel joined #perl6
04:00 MikeFair_ sorear: You know, I never imagined this whole if/else/end if thing would be such the ordeal it has been. :)
04:02 MikeFair_ sorear: I bloodied my head on nqp-rx, then again when upgrading to NQP2 (if moritz' hadn't taken pity on me I'd still likely be stuck there), then again figuring out that I could not accept <newline> as part of <ws> or it'd be impossible for me to distinguish between the single and multi-if cases, and now again just trying to create a new QAST Op op='if' node
04:03 the joined #perl6
04:04 sorear MikeFair_: not that anyone's counting, but it's actually NQP3
04:04 MikeFair_ hhe
04:04 sorear there is a pre-rx nqp which you might find code in
04:04 MikeFair_ figures ;)
04:06 MikeFair_ I think I've hit a wall that I'm not clear about how to get passed at the moment -- I'm finding myself going in circles
04:06 MikeFair_ staring at the same error hoping it will change. :)
04:07 sorear MikeFair_: you are aware of the difference between token and rule, ye?
04:07 MikeFair_ It's difficult when I can't tell the difference between a bug and my own mistakes
04:07 * MikeFair_ nods.
04:07 sorear A bug that you can't fix might as well be one of your own mistakes.
04:07 sorear There is a very fine line between a workaround and a fix
04:08 MikeFair_ sorear: well at least a bug identified as such can be reported and I don't feel like I'm misunderstanding what this code is supposed to do.
04:09 MikeFair_ sorear: And if I can identify it as a bug, I can skip this part and just move on to something else and then come back to it
04:09 MikeFair_ like variables and function delcarations
04:10 sorear MikeFair_: don't hold your breath for fixes.  #perl6 runs on working around bugs.
04:11 MikeFair_ well there's a lot to work on and once I get the language description complete hacking on the VM becomes the next step for me
04:11 MikeFair_ sorear: I'm thinking i'll look at both niezca and rakudo and possibly Parrot itself
04:11 sorear https://github.com/rakudo/rakudo/b​lob/nom/src/Perl6/Actions.pm#L4704 - nice example of creating a QAST op 'if' node
04:12 araujo joined #perl6
04:12 araujo joined #perl6
04:12 MikeFair_ my $qast := QAST::Op.new( $<cond>.ast, $<then>.ast, :op('if'), :node($/) );
04:12 MikeFair_ -- I think this is the line that's failing
04:12 sorear niezca and rakduo and possibly parort
04:13 sorear MikeFair_: I would guess that one or more of the arguments aren't what you thing.
04:13 sorear MikeFair_: is the failing code on github?
04:13 MikeFair_ sorear: Yeah that's what I've been tracking all afternoon
04:13 pandap joined #perl6
04:14 MikeFair_ The simple case of -e 'if 1 then say 1'
04:14 pandap hi !perl6.
04:14 MikeFair_ each of the pieces have the .AST I expect them to
04:14 MikeFair_ hello pandap
04:14 pandap hello! MikeFair~
04:14 MikeFair_ Is there a big difference between :op('if') and :op<if>?
04:15 * MikeFair_ tried it.
04:15 MikeFair_ err tries it
04:15 sorear MikeFair_: as far as I know they are identical.
04:15 sorear pandap: Welcome!
04:15 pandap update rakudo and panda.and then I got thw error message
04:15 pandap panda list
04:15 MikeFair_ yep same error
04:16 pandap connect failed: Connection refused   in sub getfile at lib/Panda/Ecosystem.pm:14   in method update at lib/Panda/Ecosystem.pm:84   in submethod BUILD at lib/Panda/Ecosystem.pm:61   in method BUILDALL at src/gen/CORE.setting:663   in method bless at src/gen/CORE.setting:648   in method new at src/gen/CORE.setting:633   in method new at lib/Panda.pm:20   in block  at /root/.perl6/bin/panda:101
04:16 sorear MikeFair_: what is the ast you expected them to?  what is the call context?  I'd like to see this line in context if you don't mind :D
04:16 MikeFair_ Error while compiling block : Error while compiling op if: invoke() not implemented in class 'NQPMu'
04:16 MikeFair_ sorear: not at all
04:16 pandap hi ! sorear~
04:17 pandap maybe someone can help me?
04:18 sorear pandap: my first guess is that you're using an out of date panda/rakudo without realizing it.  my second guess is that you're behind a firewall that doesn't like panda
04:18 sorear I'm not a panda expert
04:18 MikeFair_ sorear: https://github.com/MikeFair/Safire
04:18 MikeFair_ src/Safire/Actions.pm
04:18 MikeFair_ method if_expr
04:19 MikeFair_ You should be able to check out the project build and replicate the error with: ./installable_safire -e 'if 1 then say 1'
04:19 pandap sorear: I do rm -rf ~/.perl6. and install a fresh panda.
04:19 MikeFair_ sorear: If you'd like
04:21 pandap panda is bad.many problems!
04:22 sorear ./build.sh: line 12: /home/michael/local/bin/nqp: No such file or directory
04:22 MikeFair_ sorear: It's line 68 -- of course the corresponding Grammar.pm isline 77
04:22 sorear I have no idea what I'm doing here.
04:23 pandap and when we update rakudo,we must update panda again.
04:23 MikeFair_ Hmm, check build.sh that should be variablized
04:23 MikeFair_ the directory at the top should be set to your parrot installdir
04:23 MikeFair_ The PREFIX directory that is
04:24 sorear MikeFair_: I get a very different errror
04:24 MikeFair_ mine is /home/michael/local (as you might have guessed
04:24 sorear actione if_expr: if 1 then say 1
04:24 sorear COND: 1; CONDAST: multi_dispatch_over_lexical_candidates was unable to find a candidate list
04:24 pandap we can't do :panda update.we must rm -rf ~/.perl6        everytime......
04:24 MikeFair_ oh that's very interesting indeed
04:25 MikeFair_ sorear: Do you keep your NQP updated?  (Or more specifically what version are you running)
04:26 sorear I'm running whatever version rakudo installed
04:26 sorear because I set PREFIX to $HOME/dl/rakudo/install :D
04:27 MikeFair_ :D
04:27 sorear looks like nqp version 2012.08-2-gc223607
04:27 MikeFair_ I have: This is nqp version 2012.08-220-g962ffbe built on parrot 4.7.0 revision RELEASE_4_7_0-203-g9eaa77a
04:28 daniel-s_ joined #perl6
04:28 pandap bye~panda
04:28 MikeFair_ But your error might actually be better I'm not sure :)
04:28 sorear meh, I can't debug it
04:28 sorear this is nqpese to me :D
04:29 yarp joined #perl6
04:29 MikeFair_ sorear: With Perl debugger you mean?
04:29 MikeFair_ sorear: no worries I thnak you for looking at least
04:30 MikeFair_ sorear: For those print statements I get:
04:30 MikeFair_ COND: 1; CONDAST: QAST::IVal<1156036743>
04:30 MikeFair_ THEN: say 1; THENAST: QAST::Op<1144481427>
04:31 sorear MikeFair_: are you sure they are actually ast nodes and not single-element arrays?
04:32 sorear ...that was a stupid question, .ast would have barfed
04:32 MikeFair_ It's the AST property say $<cond>.ast
04:32 MikeFair_ say $<then>.ast
04:33 MikeFair_ I don't know what it's supposed to print, but the QAST object references were convincing enough to me
04:33 sorear MikeFair_: could you paste the full error output you get from a run on your system?
04:33 sorear including the says and enough of the backtrace to reach your code
04:34 MikeFair_ https://gist.github.com/3731005
04:34 MikeFair_ That's the whole thing
04:37 MikeFair_ Unfortuntely it doesn't tell you exactly what it was doing when it bailed the reference to "compiling op if" was all I really had to go on
04:39 MikeFair_ And if I comment the Op.new line and the following make $qast, then it doesn't have any problems (of course it doesn't add anythingto the AST either)
04:39 sorear maybe you're being misled.
04:39 * sorear chases a lead
04:39 MikeFair_ Go sorear! go!
04:40 * MikeFair_ cheers on sorear!
04:42 MikeFair_ sorear: Well talking to you has given me some other ideas on how to proceed
04:42 MikeFair_ So I did this:
04:42 MikeFair_ 68    #my $qast := QAST::Op.new( $<cond>.ast, $<then>.ast, :op<if>, :node($/) );
04:42 MikeFair_ 69
04:42 MikeFair_ 70    make $<then>.ast;
04:42 sorear I think it fails.
04:42 sorear That's the lead I'm chasing
04:43 MikeFair_ and it executes the "say 1" as I would expect
04:43 sorear Maybe one of your subasts is broken
04:43 MikeFair_ Doing the same with $<cond>.ast doesn't fail, but it doesn't output anything either
04:45 MikeFair_ of course $<cond>.ast is just an <EXPR> so I wouldn't expect it to
04:48 cognominal joined #perl6
05:01 MikeFair_ I just tried adding a real relational operator == and eq
05:02 MikeFair_ 'if 1==1 then say 1' produces the same result
05:02 sorear MikeFair_: what happens with an empty then-list, or an integer literal in it?
05:02 MikeFair_ if 1 then 1
05:02 MikeFair_ seems to be ok
05:03 MikeFair_ if 1==1 then 1 is oktoo
05:04 * sorear thinks there might be something wrong with <say>
05:04 MikeFair_ if 1 then ; 1; end if is ok as well
05:04 sorear what if you remove :name<say> from the say op?
05:04 MikeFair_ if 1 then ; 1; 2; 3; end if however is not
05:05 MikeFair_ I get a syntax error -- so likely not the same problem
05:05 MikeFair_ hmm let me try removing :name<say>
05:06 MikeFair_ same problem
05:06 MikeFair_ say 1 continues to work though
05:06 MikeFair_ if 1==1 then say 1 breaks though
05:10 rurban joined #perl6
05:11 sorear MikeFair_: what's the syntax error?  what's the output with --target=pir?
05:11 sorear MikeFair_: does 1;2;3 work (no if)?
05:11 MikeFair_ 1;2;3 does not work
05:12 MikeFair_ Strange I would have expected that to match <EXPR>, <EXPR>, <EXPR>
05:12 MikeFair_ Seems to only accept one <EXPR>
05:13 MikeFair_ can't get --target=pir
05:13 MikeFair_ can't get --target=post
05:13 MikeFair_ can get --target=past and --target=parse
05:14 sorear ah, I thought you meant 1;2;3 caused a syntax error in generated code
05:14 sorear which happens more often than you might think
05:15 MikeFair_ on the 1; 2; 3; front, it might be that <EXPR>='1; 2; 3;' and it doesn't know how to get passed the 1;
05:15 MikeFair_ actione statement: 1;
05:15 MikeFair_ STMNT: ,, EXPR: , 1,  OTHER: , 1;,
05:15 MikeFair_ actionx statement:
05:15 MikeFair_ actione statement_list: 1;
05:15 MikeFair_ actionx statement_list:
05:15 MikeFair_ Syntax error at line 2, near "2; 3;"
05:16 MikeFair_ nope, it's seeing the 1; as the statement then bails on the next
05:17 MikeFair_ -e 'if 1==1 then; 1; 2; 3;end if'  produces:Syntax error at line 2, near "if 1==1 th"
05:18 moritz \o
05:18 phenny moritz: 03:19Z <raiph> tell moritz http://irclog.perlgeek.de/​perl6/2012-09-16#i_5992712
05:18 * MikeFair_ waves back. :)
05:22 MikeFair_ moritz: I'm definitely missing something with this if thing.  here's what I got, if 1 then 1 won't produce the NQPMu error, if 1 then say 1 will
05:22 MikeFair_ moritz: "say 1" on its own is fine
05:23 MikeFair_ moritz: and if I don't try and create the new "if" node but instead just directly make $<then>.ast, it works as expected
05:23 moritz MikeFair_: my brain isn't awake yet, sorry
05:24 sorear MikeFair_: I might know what's going on
05:24 sorear MikeFair_: 'say' doesn't return anything at all
05:25 MikeFair_ Is it supposed to/does it need to?
05:25 sorear MikeFair_: maybe the "if" is getting confused by this, because if is really the ternary operator and it's normally used with things that return values
05:25 sorear try making a statementlist node
05:25 sorear where the first item is the say, and the second item returns a dummy value
05:25 sorear see if that fixes it
05:26 raiph joined #perl6
05:26 MikeFair_ I'm not quite following
05:26 sorear raiph: moritz is on now
05:27 MikeFair_ if 1 then; say 1; 2; end if
05:27 raiph sorear: hi and thanks.
05:27 sorear MikeFair_: exactly, but at the QAST level to avoid the syntax error.
05:27 MikeFair_ what if I just set say to return something?
05:28 MikeFair_ I've not gotten to that part, but in the past output I see the slot for a return value
05:28 sorear MikeFair_: you're overthinking this
05:29 raiph moritz: works great.
05:30 raiph everyone: add your favorite lines from Today -- click the Enable Summary mode link up top, check the lines you like, click Save Summary changes.
05:30 sorear MikeFair_: make QAST::Stmts.new( :node($/), $qast, QAST::IVal.new( :value(0) ) );
05:30 MikeFair_ sorear: likely (more like still grasping to comprehend ;) )
05:30 sorear MikeFair_: do that in statement_control:sym<say> instead of make $qast;
05:31 sorear MikeFair_: do you see what this change does?
05:31 MikeFair_ sorear: I see that it makes a value 0 return node instead of the say node
05:32 MikeFair_ oh wiat
05:32 MikeFair_ there's a $qast reference in there
05:32 sorear can you figure out what that referece does?
05:32 MikeFair_ So it makes a new lvalue node and appends that to my say node?
05:32 raiph (using http://irclog.perlgeek.de/perl6/today I mean)
05:33 sorear MikeFair_: you're misusing the word lvalue, but yes
05:33 sorear MikeFair_: try it and tell me what happens, maybe?
05:33 MikeFair_ and with the 'make' out front makes the 'say' <statement> return a statement list of <say > with an lValue appended
05:34 MikeFair_ hey hey hey!!
05:34 MikeFair_ actione TOP: if 1==1 then; say 1; say 2; say 3; end if
05:34 MikeFair_ actionx TOP:
05:34 MikeFair_ 1
05:34 MikeFair_ 2
05:34 MikeFair_ 3
05:35 raiph For example, I just added the last couple comments I made to the Summary you can now view at: http://irclog.perlgeek.de/out.pl?cha​nnel=perl6;date=2012-09-16;summary=1 (And I'm about to go add this one too.)
05:36 sorear MikeFair_: hey cool you fixed the synax error as well
05:38 MikeFair_ Well that syntax error was for just 1;2;3; that's still there
05:38 MikeFair_ say 1; say 2; say 3; always worked :)
05:40 MikeFair_ So :Stmnts.new is taking an array of nodes ... the :node is the parent/root and the rest are nodes in the list
05:41 MikeFair_ So the "say" method is now making a StmntList "op<say>, op<lvalue>" everytime 'say' is successfully parsed...
05:42 MikeFair_ This matters because "if" is expecting a return value for the then and else parts
05:42 sorear MikeFair_: except for the "lvalue" bit, yes
05:43 sorear "lvalue" is a technical term for an object which can be assigned to in C-like languages: a variable, member access, or dereferencing
05:43 sorear literals are not lvalues!
05:43 sorear please stop calling the literal node an lvalue node.  it's just plain wrong.
05:44 MikeFair_ (OOHHH that's an IValue (font rendering issue) This same effect might have also been achieved by $<then>.ast.push(QAST:IVal.new( :value(0))); /??
05:45 sorear No.
05:45 MikeFair_ sorear: I will, on my screen it looks like lValue and not IValue
05:45 MikeFair_ sorear: but I see it in my code as the IVal that it is
05:46 MikeFair_ sorear: and that's because "if" is evaluating each node in the statement list?
05:46 sorear Every QAST node has a list of children
05:46 MikeFair_ sorear: Like an array of return values?
05:46 ggoebel joined #perl6
05:46 sorear .push appends to the list of children
05:46 sorear Appending to the list part of an IVal won't do anything useful; you have to make a Stmts node before you can start appending stuff
05:47 MikeFair_ oh so I'd need to push to the <statement>.ast or <statement_list>.ast that is contained in the $<then>.ast?
05:47 sorear The if doesn't look inside the statement list; it evaluates the statement_list as a whole
05:47 sorear the statement_list then evaluates its children, and returns the value returned by the last one
05:47 MikeFair_ sorear: Well $<then>.ast contains either a <statement> or a <statement_list>
05:48 MikeFair_ statement_list creates a Stmnts.new
05:48 sorear MikeFair_: doing the modification in "if" is wrong.
05:48 sorear consider if 1 then 3
05:48 sorear you do NOT want to rewrite this into if 1 then 3; 0
05:48 sorear because that changes the result
05:49 sorear the modification needs to be restricted to say
05:49 MikeFair_ ahh
05:49 MikeFair_ sorear: and any other procedure type commands
05:49 MikeFair_ like print
05:49 MikeFair_ repeat
05:50 sorear MikeFair_: does safire allow the user to use statements and expressions semi-interchangably?
05:50 sorear can the user do anything like this? :
05:50 sorear n: say (say "hello")
05:50 p6eval niecza v21-8-ga216174: OUTPUT«hello␤True␤»
05:50 cognominal joined #perl6
05:51 MikeFair_ sorear: i'm pretty sure it does.  there's a concept called "it" which is roughly equivalent to 4_
05:51 MikeFair_ err $_
05:51 sorear MikeFair_: Any command which executes in a context where the user could observe the result needs to return _something_
05:51 MikeFair_ Then there's also the "eval" command
05:52 sorear nr: say (if 0 { "foo" })
05:52 p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«Nil␤»
05:52 sorear nr: say (if False { "foo" })
05:52 MikeFair_ eval(my_string_constructed_command)
05:52 p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«Nil␤»
05:53 MikeFair_ say(if test then "yes" else "no") is definitely allowed
05:53 MikeFair_ but say(if test then; 1;2;3; end if) is not
05:54 MikeFair_ it's like there are two if's one is a command and the other is an EXPR
05:54 cognominal_ joined #perl6
05:54 sorear What about say(eval('if test then; 1; end if')) ?
05:54 MikeFair_ sure
05:55 MikeFair_ I think in that case it will say the returnresult of eval
05:55 sorear question be what does it print?
05:55 MikeFair_ which I believe is (the string parsed/executed) or (the string choked)
05:55 MikeFair_ boolen
05:56 MikeFair_ (or numeric roughly representing boolean)
05:56 MikeFair_ In general though I'm good with the principle that EVERYTHING returns something
06:02 MikeFair_ sorear: So I changed the say node to this:  52     my $qast := QAST::Op.new( :name<say>, :op<say>, :returns(0), :node($/) );
06:02 MikeFair_ where I set the :returns to 0
06:02 MikeFair_ that seems to yield the same effect
06:04 * MikeFair_ realizes he has not been testing what he thinks he's been testing...
06:04 sctt joined #perl6
06:05 MikeFair_ sorear: Ok phew!  your change seems to make it stick
06:06 * sorear does not know :returns
06:06 * cognominal_ discovers that the specs have a Cat. Logical cuz they have a Rat.  Missing from rakudo when I prod. Or it has a Schrödinger trait.
06:06 MikeFair_ sorear: Well I'm just looking at the names of stuff on the nodes in --target=past
06:07 sorear MikeFair_: yeah, I'm not sure :returns is something you should be messing with
06:07 sorear for all I know it could be perfectly safe, but I've a bad feeling
06:07 MikeFair_ sorear: no worries, it didn't work anyway
06:08 * MikeFair_ was testing "make $<then>.ast" as his if_expr instead of making the if Op node
06:09 sorear ah, :returns is used for the rakudo optimizer type information
06:10 sorear eg, literal 5 has :returns(Int)
06:10 sorear and then the optimizer knows what the types will be at runtime
06:11 MikeFair_ makes sense
06:11 MikeFair_ of no use then :)
06:11 MikeFair_ (in this case)
06:16 MikeFair_ sorear++
06:36 ggoebel joined #perl6
06:41 HarryS joined #perl6
06:42 MikeFair_ Woot!!!
06:42 * MikeFair_ has added the "ELSE" portion of his if statement
06:45 wk_ joined #perl6
06:50 Woodi morning
06:55 FROGGS_ morning
06:57 sorear o/ o/
07:00 zby_home_ joined #perl6
07:01 GlitchMr joined #perl6
07:04 sorear good morning poland
07:06 cognominal_ why not vietnam?
07:06 cognominal_ ha! m/.pl$/
07:07 Woodi becouse Vietnam do not listen so no point in greetings :)
07:07 GlitchMr Because both I and zby_home_ are from Poland?
07:07 sorear GlitchMr: also FROGGS_ and Woodi
07:07 zby_home_ good morning
07:07 Woodi invassion!
07:08 Woodi o/ :)
07:08 GlitchMr That makes sense
07:08 GlitchMr But FROGGS_ and Woodi haven't just joined
07:08 * Woodi likes to backlog in irssi...
07:09 GlitchMr But I guess they just were away :-)
07:09 GlitchMr I should make Perl 6 highlight for Pygmentize
07:10 GlitchMr s/Pygmentize/Pygments/
07:10 [Coke] joined #perl6
07:10 erkan joined #perl6
07:10 rhr joined #perl6
07:10 phenny joined #perl6
07:11 wk_ joined #perl6
07:11 Khisanth joined #perl6
07:11 krunen joined #perl6
07:11 DarthGandalf joined #perl6
07:12 GlitchMr They have repository at Bitbucket, so I guess I will have to register there
07:12 phenny GlitchMr: 01:10Z <TimToady> tell GlitchMr a KeySet is just a hash, if you use it like one, so you can say %ks{$elem} = True to add and you can %ks{$elem}:delete to remove it, or %ks{$elem} = False should work too, in addition to set operators
07:12 phenny GlitchMr: 01:18Z <[Coke]> tell GlitchMr I added you to sixplanet
07:12 GlitchMr Thanks
07:12 Woodi btw. I got stupid idea (after rethinking it)... imagine Curses::UI::Grid - std. grid in Curses. then imagine taking it and putting into real GUI. just taking "object", already constructed and displaing it somewhere else. so probably it requires intermediate layer which have all displayed states and only casting it into term/curses/GTK/Qt/Windows-something...
07:12 dalek niecza: 0e6be46 | sorear++ | lib/ (4 files):
07:12 dalek niecza: Make constant tables aware of the setting they are scoped to
07:12 dalek niecza: review: https://github.com/sorear/niecza/commit/0e6be46617
07:13 GlitchMr [Coke]: I have ugly dot at Planet Six
07:13 GlitchMr Also, would it possible to use my realname instead - Konrad Borowski
07:13 warlock joined #perl6
07:13 warlock hfdhgfhfghfgh
07:13 Woodi it is kind like PS-based display in NeXt and like keeping trace of SQL tables in memory :)
07:14 GlitchMr Also, I think I should replace <h3> with <h4> for XML
07:14 warlock left #perl6
07:14 Woodi would be fine to have such layer in Perl and just cast to different displays...
07:14 GlitchMr RSS*
07:15 GlitchMr Perhaps <h1> and <h2> on RSS would be more logical
07:15 GlitchMr But that probably would be ugly
07:15 GlitchMr on PlanetSix
07:16 Woodi I mean standard, in Perl representation kind like DBI is for DBs...
07:16 GlitchMr But <code></code> definitely needs to be fixed on my blog
07:16 GlitchMr (in title, that is)
07:18 wamba joined #perl6
07:19 dalek glitchmr.github.com: 436253a | GlitchMr++ | index.xml:
07:19 dalek glitchmr.github.com: Replace <code></code> with `` in titles for XML.
07:19 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/436253a5cc
07:20 yarp joined #perl6
07:21 dalek glitchmr.github.com: 7a108e5 | GlitchMr++ | _posts/2012-09-15-how-i-learned-to-st​op-worrying-and-install-the-panda.md:
07:21 dalek glitchmr.github.com: Make "Congratulations" paragraph better.
07:21 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/7a108e5fca
07:27 MikeFair_ Woodi: This is a general DataSet abstraction concept -- extremely useful stuff
07:28 MikeFair_ Woodi: MS .NET has a great API in their ADO.NET stuff
07:29 MikeFair_ Woodi: They can bind their DataSets to DataGridViews, ListViews, and all kinds of other things -- works with both XML and table like sourcedata
07:29 Woodi MikeFair_: but I would like such abstraction for graphics :)
07:30 MikeFair_ Woodi: Right, well if you have a common internal table representation -- say SQLLite, then you can do that
07:30 Woodi somethink like html or vector graphics
07:30 MikeFair_ Woodi: You write each graphics interface to generically display a SQL Lite instance
07:31 Woodi MikeFair_: but I talking not only about grids...
07:31 Woodi rather UI - menus, lists, etc
07:31 MikeFair_ Woodi: Those are grids too, table = Menu, rows = items
07:32 MikeFair_ Woodi: The internals of the ADO.Net allows you to build relationships among the data
07:32 MikeFair_ Woodi: You can do the same thing with XML
07:33 GlitchMr perl6: say "Give me those hyper operators, ok?"
07:33 p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«Give me those hyper operators, ok?␤»
07:33 GlitchMr Thanks
07:33 MikeFair_ Woodi: I think the trick/key is to create a common data model that these various graphics libraries can understand
07:34 MikeFair_ Woodi: QT has one, GTK has one too
07:34 Woodi yes, maybe some UI widgets should be dropped
07:35 Woodi but basic list is very short: windows, buttons, labels, menu, status, popup, grids, lists
07:36 Woodi and shitches like radio or the other
07:36 Woodi sounds like html :>
07:36 MikeFair_ Woodi: Hmm, try GLADE for GTK and UiTools for QT
07:37 Woodi no, such thing must be universal
07:37 Woodi I do not realy know is it data structure or API...
07:38 Woodi something, something :)
07:38 sorear abstraction for widgets has been done a million times and nobody has ever liked it.
07:39 sorear probably the least bad one is wx
07:39 Woodi should be possible to create good one :)
07:41 MikeFair_ Woodi: Not universally
07:42 MikeFair_ Woodi: You either do least common denomitator featureset (in which case just use HTML and a local http loopback), or you try and replicate native look and feel - which is difficult to do well, or you don't support the same features across the multiple interfaces
07:43 MikeFair_ Woodi: HTTP already has a renderer for all platforms, including ncurses and mobile ;)
07:43 Woodi wx is like MS COM from pre-real-objects
07:43 MikeFair_ Woodi: People are doing a lot with javascript on HTML pages these days
07:45 MikeFair_ I don't quite follow that -- wxWindow is C++ cross platform toolkit,  like MFC -- QT is much more updated version of that
07:45 * MikeFair_ wonders if Mono has any ncurses window rendering attempts
07:46 Woodi I just want to not include low lvl drawings code and left it for Qt/GTK
07:46 Woodi MikeFair_: yes, I mean MFC probably
07:46 Woodi it is C-ish mixed with 90s objects
07:47 Woodi and doing UI in HTML is patented :) but in CSS not :)
07:47 MikeFair_ Woodi: hehe
07:48 MikeFair_ It's interesting that somone is actually wrking on a Mono NCurses interface: http://mono-project.com/MonoCurses
07:48 Woodi substracting HTTP from HTML would be fine
07:48 sorear the mono-project wiki is poorly maintained
07:48 sorear if it said something is being worked on, it means that it was either finished or abandoned five years ago
07:49 MikeFair_ sorear: hehe
07:50 MikeFair_ Woodi: FWIW I've abandoned the thought of having a terminal window and GUI cross platform API
07:50 brrt joined #perl6
07:50 MikeFair_ Woodi: I would go for like a terminal window API subset
07:52 MikeFair_ Woodi: but doing GUI on terminal in a generic way that also looks good ona modern GUI is not something I've ever seen come out well
07:53 MikeFair_ Woodi: but,if a developer really wanted to support a curses like interface, and they were willing to restrict themselves to an identified subset of commands that also worked in a terminal environment, I could see that
07:55 MikeFair_ Woodi: You're really thinking of the MVC paradigm from what I can understand here
07:59 colomon_ joined #perl6
08:01 * MikeFair_ sighs in satisfaction.
08:04 MikeFair_ sorear++ moritz++ jnthn++ TimToady++ rurban++ tadzik++ masak++
08:04 MikeFair_ I finally got all my existing test case to run without errors
08:05 sorear other than "was at PRS", what do all of those people have in common?
08:05 MikeFair_ They've all helped me out in different ways over the last couple weeks in getting this language bootstrapped
08:05 MikeFair_ sorear: Plus a bunch of folks from #parrot too
08:06 MikeFair_ if and say now work
08:07 leont joined #perl6
08:08 MikeFair_ Why it's taken me three weeks+ to get this far just seems ridiculous but it's just part ofthe journey and learning curve for me. :)
08:09 Woodi MikeFair_: your code is public somewhere ?
08:09 sorear so your language is almost as functional as yapsi. :D
08:10 MikeFair_ Woodi: Yeah but I seriously doubt you'd want to see it, but sure:
08:10 MikeFair_ https://github.com/MikeFair/Safire
08:10 dalek niecza: e5c7060 | sorear++ | / (4 files):
08:10 dalek niecza: Avoid "Top" use in junctional autothread
08:10 dalek niecza: review: https://github.com/sorear/niecza/commit/e5c7060509
08:13 MikeFair_ ok just pushed the latest changes
08:14 MikeFair_ sorear: _almost_ :)
08:14 MikeFair_ sorear: And say "almost works" - it currently only takes one paramater not a list yet :)
08:15 Woodi MikeFair_: xTalk have 'on' in it ?
08:17 MikeFair_ Woodi: Yeah - it's a lot like SmallTalk in many ways
08:18 MikeFair_ Woodi: "on mouseUp"  "on start"
08:19 Woodi I know only IRC and html on's... but it installs kind of callbacks into runtime or is like if-else ?
08:19 MikeFair_ Woodi: It's primarily got a GUI paradigm background --- your application consists of many "stacks" (aka top level windows with desktop frames) -- each of these "stacks" then has many "cards" (aka the various kinds of windows and layouts that stack can display)
08:19 MikeFair_ Woodi: It's message handlers
08:20 MikeFair_ Woodi: So in one area of the code you can say 'send mouseClick to button "Ok"'
08:20 Psyche^ joined #perl6
08:20 MikeFair_ Woodi: Then your button "Ok" would have a script associated to it
08:20 MikeFair_ Woodi: that script would have an "on mouseClick" handler
08:20 MikeFair_ Woodi: You ever played with Visual Basic?
08:21 Woodi let say no :)
08:21 Woodi <a onMouseClick=... i know
08:21 MikeFair_ Woodi: yeahso it's like that
08:21 MikeFair_ Woodi: check http://www.runrev.com/
08:22 Woodi so internal loop handles messages ?
08:22 Woodi looking
08:22 MikeFair_ Look at "LiveCode" I think
08:23 MikeFair_ Hmm no good examples
08:23 tadzik hello #perl6
08:23 FROGGS_ hi tadzik
08:24 MikeFair_ http://en.wikipedia.org/wiki/LiveCode
08:24 MikeFair_ tadzik: hey there! :)
08:24 MikeFair_ Woodi: The Wikipedia article seems to give you a good enough flavor for what it does
08:25 MikeFair_ Woodi: The big difference between an xTalk and an HTML event handler is the message path
08:25 MikeFair_ Woodi: So if you click on an image in a webpage and there is no click handler, nothing happens
08:27 MikeFair_ Woodi: In an xTalk a bunch of objects will get that message in a series and you can catch it at all the various levels (first the image object, then a group object if that image is part of a group, then any nested groups that group might be a part of, the card object that image/group sits on, then the background object that might be applied to that card, then the stack that card is a part of, then the "system" which might
08:27 MikeFair_ include any external DLLs that you've written.
08:28 wamba joined #perl6
08:30 Woodi it is like in Chain of Responsibility pattern or in exceptions...
08:31 MikeFair_ It's a concept I haven't really seen in other languages / UI toolkits.  the idea that your controls not only have a "class hierarchy" for handling messages, but also have a "location hierarchy" for handling messages.  Not that it couldn't be built, but I haven't seen anyone do it
08:31 MikeFair_ Woodi: Very much so
08:33 ggoebel joined #perl6
08:33 MikeFair_ Woodi: The same button (aka same class, same code) moved to a different "card" would adopt behaviors that were applied to it because of the card it was on (aka the environment it is currently in) in addition to any behaviors that were native to its own class code
08:35 MikeFair_ Woodi: It's also probably a lot like TCL or some other languages where there two modes "design mode" and "execute mode"
08:36 sorear MikeFair_: that actually works in html too
08:36 Woodi I am interested in the "system" part - how it works...
08:36 MikeFair_ Woodi: When you program xTalk you do it in an xTalk executing environemnt
08:36 MikeFair_ Woodi: You mean the DLLs/ externals piece?
08:37 Woodi must be scheduler working on hierarchies of containers...
08:37 sorear if you set the 3rd argument to addEventListener to true, you will receive events dispatched to any descendant
08:37 Woodi no, architecture rather
08:37 MikeFair_ sorear: oh there you go -- I didn't know about that
08:37 MikeFair_ sorear: is that an HTML5 thing?
08:37 sorear I don't think so.
08:38 MikeFair_ sorear: interesting, but yeah, adobe air/flash, director, and HTML to a large extent share some of the concepts
08:39 MikeFair_ Woodi: It's clearly a multi-threaded app, you can't control threads yourself, but you can suspend drawing while you do updates
08:39 sorear the past couple months have been interesting
08:39 MikeFair_ Woodi: The system will continue to animate things you've asked it animate while your events are firing
08:39 sorear I scored myself a javascript/html5 job while having zero knowledge of the platform
08:40 Woodi so objects-threads are realy a live :)
08:40 dalek niecza: 09989b4 | sorear++ | lib/Builtins.cs:
08:40 dalek niecza: Avoid "Top" in most lowercase builtins
08:40 dalek niecza: review: https://github.com/sorear/niecza/commit/09989b4a0c
08:40 sorear sleep&
08:41 MikeFair_ Woodi: yes - it definitely feels that way - it's a lot like 'green threads' or 'tasks' to use some of a couple recent terms I've heard
08:41 Woodi sorear: you have have good brain :)
08:42 MikeFair_ sorear: I agree with Woodi :)
08:42 Woodi 'green threads' work on scheduler - only one thread realy needed
08:42 MikeFair_ Woodi: exactly, I've always suspected that the xTalk engines are doing the same thing, all the objects are "tasks"
08:43 MikeFair_ Woodi: or green threads, unless they are a multimedia object
08:43 MikeFair_ Woodi: then they'll likely get a real thread
08:43 MikeFair_ Woodi: sound/movie that kind of thing
08:44 Woodi it's FUTURE thing ! :)
08:44 sergot joined #perl6
08:45 Woodi eee, maybe not totaly new thing but need to be more common
08:45 MikeFair_ Woodi: hehe -- I first got exposed to it mid-1997ish  -- at first I was really kind of against it
08:45 MikeFair_ Woodi: I think it is, I think it's what Visual Basic always wanted to be
08:45 Woodi thread are still hard for us :)
08:46 sqirrel joined #perl6
08:46 MikeFair_ Woodi: Their model is all objects and message passing
08:46 MikeFair_ Woodi: like erlang
08:47 MikeFair_ Woodi: but they don't have a native concept of passing messages "between applications"
08:47 Woodi would be nice to have one such vm for Perl..
08:47 * MikeFair_ grins.
08:47 MikeFair_ I think so too. :)
08:48 Woodi that LiveObjects are like Java applets
08:48 MikeFair_ And I really don't want to have to rewrite all those libraries for accessing remote databases, and loading/parsing XML files and integrating with all that stuff
08:49 MikeFair_ Woodi: Yep, though your LiveCode stacks will literally run on a browser plugin, mobile app, desktop app (windows/linux/Mac OS)  without any modification whatsoever
08:50 Woodi maybe d-bus like layer can help. would work in any language
08:50 MikeFair_ Woodi: My plan is actually to is ZeroMQ and a D-Bus like layer
08:50 Woodi yes, and without recompilation
08:50 MikeFair_ Woodi: I've got a working premises that says everything is a Namespace traversal
08:51 Woodi I quite like 0mq but I am little scared too :)
08:51 MikeFair_ Woodi: And from the perspective of the code i am writing - it is always at the root of the namespace
08:52 Woodi hmm, can you give example ?
08:52 MikeFair_ Woodi: So let's your app needs to connect to a database
08:52 MikeFair_ Woodi: Or to a file for example
08:52 MikeFair_ Woodi: usually you'll ask for the path to the file
08:53 MikeFair_ You'll be handed a string"/some/path/to/file" or "file://server/some/path/to/file"
08:54 MikeFair_ So in the new paradigm I'm working with, your local "namespace" is a lot like a DOM tree, and "external" or "public" is one of the root nodes
08:54 bbkr joined #perl6
08:54 bbkr good morning p6
08:54 Woodi hallo bbkr :)
08:54 MikeFair_ So to your application, that file is actually at /external/file/server/some/path/to/file
08:55 leont left #perl6
08:56 MikeFair_ Woodi: packages might be at /imports/packages/ui/datagrids
08:56 bbkr how can I write "Array of hashes" in method signature? @a[Hash] works but accepts only array with one hash
08:56 MikeFair_ bbkr: a JSON string ;)
08:56 MikeFair_ bbkr: Sorry I couldn't resist
08:57 bbkr MikeFair_: well, you are not far from the truth, I'm just implementing batches for JSON::RPC :)
08:57 MikeFair_ bbkr: does the method signature know the type of thing in the arrya?
08:57 moritz bbkr: currently you can't really
08:57 MikeFair_ bbkr: Perl6 has a Grammar for that :)
08:57 moritz typed containers aren't implemented to a degree where they are useful for that purpose
08:58 bbkr I can do it using "where {  check here if each element is a Hash }" but I was curious if there is more clean solution
08:58 moritz but you can do soemthing along the lines    @a where [&&] @a.map({$_ ~~ Hash })
08:58 MikeFair_ moritz: Could he use some kind of map
08:58 bbkr exactly, I'll stick with that, thanks
08:58 MikeFair_ moritz: yeah like that! ;)
08:59 MikeFair_ moritz: Is that comparing the scalar context of $_ for the word Hash?
08:59 MikeFair_ moritz: Or is it 'smarter' than that
09:00 Woodi ~~ probably check type
09:01 MikeFair_ ~~ is the Perl6 replacement for =~
09:01 MikeFair_ So it's a regex comparison
09:02 Woodi but it do more things probably then regexes
09:02 MikeFair_ could do
09:02 * Woodi is not sure about that
09:02 MikeFair_ that's why I asked ;)
09:03 Woodi and why 'and' is in [ ] ?
09:03 MikeFair_ Woodi: So the idea I'm working with is your thread/application is at the center of the universe as far as it's concerned.
09:04 MikeFair_ Woodi: There's a big universal DOM tree that spreads across every application on every machine usinge every protocol on the whole planet
09:05 MikeFair_ Woodi: If we took your application's node on that tree, and lifted it up so that everything it was connected "hung down" from it, that's the concept
09:06 MikeFair_ Woodi: /parent/ would get your code access to the node that encapsulates your application
09:07 MikeFair_ Woodi: It's the same thing coming straight out of XML/XPath/XQuery
09:07 Woodi I think little advertisement is needed to make it used everywhere :)
09:08 Woodi it is URI NG :)
09:08 MikeFair_ Woodi: I think a little (or a lot of) code to make it work needs to exist first :)
09:09 MikeFair_ Woodi: The only thing that's unique/clever about it I think is the concept of 'your code is always at the root of the namespace hierarchy' :)
09:09 ggoebel joined #perl6
09:10 MikeFair_ Woodi: I think that's going to be a useful programming paradigm to work in because i think it's something programmers can get 'they start at "their code" and then navigate to other resources'
09:10 Woodi it is 'view' me things, like planets or solar system in galaxy :)
09:11 MikeFair_ Woodi: our 'personal experience' of the universe is one of the things that inspired me to think of it ;)
09:12 MikeFair_ Woodi: We're all at the center of our universe and everything else it 'out there' so why not have our code think that way too.  Plus it makes everything extendable
09:12 MikeFair_ Woodi: A new "higher level" is actually a new "lower level" as far as my traversal of the hierarchy goes
09:13 MikeFair_ Woodi: I can always discover new things in my "subtree" but discovering the name of the thing above "/" is really difficult
09:14 Woodi so root is border for private context ?
09:14 MikeFair_ Woodi: And assuming there is such a think, it's just renamed everything in my applications namespace -- so a lot of old code either can't use it, or breaks/needs to be rewriten
09:14 MikeFair_ Woodi: Yes, it's like an IMAP mail folder if you ever use those
09:15 MikeFair_ Woodi: "Public" or "Shared Folders" is a sub-folder of the root of your personal folders
09:16 MikeFair_ Woodi: "Everyone Else" or "The World Out There" is a sub-directory of "My Private Namespace"
09:16 Woodi what about links to wife or kids ? :)
09:18 MikeFair_ Woodi: <Root name="me" @wife="my wife"><children><child name="kid1" /> <child name="kid2" /></children><siblings><sibling type="brother" name="bro" /><sibling type="sister" name="sis" /></siblings></Root>
09:19 Woodi even company as root need to href="..." needed
09:19 Woodi err
09:19 MikeFair_ Woodi: Oh I missed '<Public Directory><Persons> ....</Persons></Public Directory>
09:20 Woodi even company as root need to share namespace
09:20 MikeFair_ Woodi: yeah, the links and references are all there in the technology
09:21 MikeFair_ Woodi: Well you as a person likely actually exist as many nodes in the tree, your company will track different data on you then your doctor
09:22 MikeFair_ Woodi: Think of it like a distributed node where pieces of it exist all over the place
09:22 MikeFair_ Woodi: Some applications/systems will share/synchronize on some of the data
09:23 MikeFair_ Woodi: I always thinkabout as if the systems are communicating over XMPP to each other
09:24 MikeFair_ Woodi: It's federated, distributed, each entity controls what goes on inside of its own server, yet every actor in the system has a JID address and can have a two way conversation initiated with it
09:24 MikeFair_ Woodi: The JIDs are authenticated (to whatever degree the server that let them on authenticated them)
09:25 MayDaniel joined #perl6
09:27 MikeFair_ Woodi: My local system can control the authorization of JIDs over the objects being distributed over the XMPP network (at least as far as what leaves my server under my control goes -- it's then up to relationships and contracts to prevent redistribution --- just like it is in the real world today, nothing physically stops doctors from giving away your medical records -- they just don't do it and we've set up agreements that
09:27 MikeFair_ bad things can be done to them if they do)
09:29 MikeFair_ Woodi: So my thought is that everything accessible on the network can be mounted somewhere in the DOM hierarchy under my internet domain name, and all my applications know how to navigate to that hierarchy (through their subfolders) then they can discover everything
09:29 MikeFair_ Woodi: further if it's run through XMPP then there are lots of control points and translation points to marshal the data to/from XML
09:30 MikeFair_ Woodi: Or if the application really requires it, it can get a dedicated binary data channel ala SIP
09:31 MikeFair_ If you then put an xTalk, or Perl application GUI on top of it like I described earlier, then Ithink you really just might have something pretty cool :)
09:33 MikeFair_ ok - time for sleep for me :)
09:33 MikeFair_ gnight all! :)
09:36 wk_ joined #perl6
09:46 moritz I'm considering writing a web service that keeps me informed of certain types of events
09:47 moritz for example album releases of certain musicians
09:47 tadzik OH YES
09:47 tadzik I was thinking about it lots of times already :)
09:47 moritz or tour dates near me
09:47 moritz but I think that could be more general
09:47 moritz and we could include perl conferences, books by certain authors etc.
09:47 tadzik what is your idea for gathering this data?
09:47 Ulti do you mean Twitter
09:48 moritz Ulti: twitter in machine-readable
09:48 Ulti do you mean RSS
09:48 tadzik the thing about twitter is that it's offtopic by design
09:48 Ulti ;P
09:48 tadzik RSS doesn't solve the problem either
09:48 moritz tadzik: a mixture of croud sourcing, web scraping etc.
09:48 moritz but I do want to provide RSS feeds for searches
09:49 moritz so that I don't have to collect email addresses
09:49 tadzik heh
09:49 tadzik this sounds like a mirror of my thoughts about this :)
09:49 moritz (and I've registered the domain soonish.net for it :-)
09:49 tadzik or looks like a mirror. Or sounds like an echo. *.
09:49 moritz tadzik: don't be so creepy. That's masak's job :-)
09:50 ggoebel joined #perl6
09:50 moritz anyway, to come back to the topic here
09:50 Ulti I can load out the fully.pro for it ;P
09:50 tadzik why creepy? :P
09:50 Ulti *loan
09:50 moritz I want to model those events/facts, both in Perl 6 and in a database
09:51 moritz and currenty I'm a bit at a loss here on how to best do that
09:51 Ulti also this was quick: http://rosettacode.org/wiki​/Total_Circles_Area#Perl_6
09:51 moritz any ideas?
09:51 moritz maybe I should start to collect events/facts that I want to record, and see what kind of data they each have
09:52 moritz tadzik: what were your ideas of data sources?
09:52 Ulti do topic allocation on everything and create a network of proper noun use, then if you search for a band or venue you get everything related
09:52 tadzik moritz: scraping band websites, mostly. I was only thinking about album releases
09:53 moritz tadzik: I totally hate it when I find out that one of my favorite bands a concert 20km from my home town away and I didn't even know about it up-front
09:53 tadzik the thing I do now, is that every few weeks I 'ls ~/Muzyka' (music in Polish), and then visit every official website of a band which didn't make a release in the last year
09:53 tadzik moritz: yes, exactly
09:54 tadzik and following stuff like rockmetal.pl is like looking for a needle in a haystack. And that's just rock/metal, not my whole music taste
09:55 tadzik I didn't find a solution for this; the idea was "there should be a website for that", but that came down to "someone will have to enter that data after all"
09:55 moritz I wonder if the amazon advertising API might be useful for discovering new albums too
09:55 tadzik or last.fm
09:55 moritz do they have an API?
09:55 marmay joined #perl6
09:55 tadzik no idea
09:55 GlitchMr std: #`[[ test [ a [[ b ]] c ] [ ]]
09:55 p6eval std b842bb3: OUTPUT«ok 00:00 40m␤»
09:55 GlitchMr std: #`[[ test [ a [[ b ]] c ] [ ]] say 'ok'
09:55 p6eval std b842bb3: OUTPUT«ok 00:00 42m␤»
09:55 GlitchMr :-)
09:55 tadzik but ISTR that they announce shows as well
09:56 moritz http://www.lastfm.de/api
09:56 moritz so maybe we should start with albums and concerts
09:56 tadzik there we go
09:56 tadzik yeah
09:56 GlitchMr http://dl.dropbox.com/u/639​13412/pygmentsprogress.png
09:56 moritz and later expand to books, conferences and what not
09:56 GlitchMr I've comment detection
09:56 tadzik curious, how many bands are actually there
09:56 GlitchMr This is good start for syntax highlighting
09:57 tadzik http://www.last.fm/music/Wintersun/+events knows about the show in Kraków, but doesn't seem to know about upcoming release
09:58 moritz http://musicbrainz.org/doc/XML_Web_Service # also interesting
09:59 tadzik indeed
09:59 tadzik GlitchMr: hm, curious
10:00 GlitchMr I'm trying to make syntax highlighting for Pygments
10:00 GlitchMr Pygments is used by GitHub
10:00 tadzik oh nice
10:00 GlitchMr (as for underlined "no" it's because I currently don't have other rules than that
10:00 GlitchMr )
10:01 GlitchMr It currently looks like https://gist.github.com/3731848
10:05 GlitchMr It will be rather simplified for syntax highlighter (so it won't use STD.pm6 - that simply would be too complex ;-)), but good enough for most purposes
10:07 tadzik may be difficult to even make python talk to STD.pm6
10:07 masak o/, #perl6
10:07 tadzik hey masak
10:08 masak my presence is spotty at the moment. I'm a bit more distracted by $work than usual.
10:09 masak but I'm also thinking about macros, after a quite fruitful discussion about D2 with jnthn++ on Friday.
10:11 arnsholt Having you two working at the same company is such a win, BTW
10:11 tadzik yeah
10:11 masak join us!
10:12 arnsholt edument++ # =)
10:12 masak a gist is upcoming. but the short/quick version of it is: quasi ASTs have much the same cloning semantics as closures. macro argument ASTs have the additional challenge that they're in a context which isn't even fully parsed, but they still need to be bound to the corresponding runtime lexpd.
10:13 masak the challenge with macro arguments is very similar to a thing that happens with roles being applied in partially parsed scopes.
10:18 cart joined #perl6
10:18 masak cart: welcome.
10:19 cart hi
10:21 Woodi speaking about news... I was day or two thinked about some way of collecting material for more news for Perl6. eg. bot on #perl6 listening for /msg (or public too maybe) and collecting small topics to post on web (with some edit by humans)
10:23 Woodi eg. what's going on with macros in one-two sentences, and other infos from here to outside
10:23 Woodi becouse content is what is a problem...
10:23 Woodi content and time
10:24 MayDaniel joined #perl6
10:24 xdbr joined #perl6
10:25 spider-mario joined #perl6
10:26 moritz Woodi: sounds good. Write the bot and I'll feed it occasionally
10:26 Woodi :)
10:27 GlitchMr ok, now my script reports error on #`aa but doesn't on #aa
10:27 GlitchMr s/script/lexer/
10:27 * Woodi will try a try to :)
10:29 orafu joined #perl6
10:31 cognominal_ joined #perl6
10:40 JJ_Brain joined #perl6
10:41 JJ_Brain Hi. when will Perl6 be officially released?
10:41 moritz JJ_Brain: there are two official releases each month
10:41 moritz of two different compilers
10:42 JJ_Brain ok. Rakudo and the other one.  So Perl 6 moritz is now there.
10:42 JJ_Brain Moritz, is there Tk there?  I can't install Tk on Perl 5
10:42 moritz JJ_Brain: no
10:43 masak here is Perl 6:
10:43 masak rn: say "OH HAI"
10:43 p6eval rakudo 4dd124, niecza v21-11-g09989b4: OUTPUT«OH HAI␤»
10:43 masak that's our channel bot running actual Perl 6. it can do more things than output "OH HAI" :)
10:43 moritz rn: say [*] 1..10
10:43 p6eval rakudo 4dd124, niecza v21-11-g09989b4: OUTPUT«3628800␤»
10:43 masak for exactly what things, see http://perl6.org/compilers/features
10:43 JJ_Brain ok.  will check it out.  I'm still learning perl5.
10:44 masak it's nice that you're also curious about Perl 6 :)
10:44 JJ_Brain thanks about the info.  when do you think Perl6 will supplant Perl5
10:44 GlitchMr JJ_Brain: You can use Perl 6 today
10:45 JJ_Brain ok. thanks.  will check it out on the website
10:45 masak JJ_Brain: not soon. Perl 5 has many years on Perl 6 still. but Perl 6 is asserting itself nicely.
10:45 masak JJ_Brain: this YAPC::Europe I felt some distinct feature envy from high-up Perl 5 people ;)
10:45 JJ_Brain thanks masak.  Does it have a CPAN too?
10:45 masak no.
10:45 GlitchMr Until both Perl 6 implementations will interpret Perl 5, this won't happen.
10:45 masak we have a simple module installer.
10:45 JJ_Brain will check the website
10:46 moritz there's http://modules.perl6.org/ and a module installer called panda
10:46 masak hm, does Panda run on Niecza yet?
10:46 colomon no
10:46 GlitchMr Panda assumes it runs on Parrot everywhere
10:46 GlitchMr It even compiles to PIR
10:46 JJ_Brain what would you prefer masak Rakudo or Niecza?
10:46 moritz tadzik: https://github.com/moritz/soonish # start of a collection of ideas
10:47 moritz tadzik: want commit access? :-)
10:47 colomon I think my hacked Panda probably still works, but tadzik++ keeps on making Niecza incompatible changes.
10:47 GlitchMr I find it interesting how I see somebody++ has broken something
10:48 masak well, we're grateful tadzik++ is maintaining panda :)
10:48 GlitchMr :-)
10:48 moritz and developing it further, not just maintaining
10:48 masak and clearly it's not his intent to introduce Niecza-breaking changes.
10:48 masak or at least not his main priority ;)
10:49 GlitchMr http://irclog.perlgeek.de/​perl6/2012-09-15#i_5990920 ;-)
10:49 JJ_Brain thanks everybody
10:51 JJ_Brain joined #perl6
10:52 dalek faq: 60f370e | moritz++ | answers.md:
10:52 dalek faq: Does Perl 6 have something like CPAN?
10:52 dalek faq: review: https://github.com/perl6/faq/commit/60f370ed8c
10:54 masak moritz++
10:54 masak &
11:05 Su-Shee joined #perl6
11:05 leont joined #perl6
11:12 JimmyZ joined #perl6
11:15 MayDaniel joined #perl6
11:20 cognominal_ joined #perl6
11:24 moritz Q:      What's yellow, and equivalent to the Axiom of Choice?
11:24 moritz A:      Zorn's Lemon.
11:24 * moritz loves fortune(1)
11:27 yarp u]
11:28 yarp ly[=-0h65u aasq214n kil
11:29 moritz ronja could have typed that :-)
11:29 cognominal joined #perl6
11:32 crab2313_ joined #perl6
11:34 yarp joined #perl6
11:34 jnthn afternoon o/
11:36 crab2313_ \o
11:38 ggoebel joined #perl6
11:53 cognominal joined #perl6
11:53 felher Hey folks :)
11:55 felher While it is all neat and nice to have a standard Test module to build test files, is there also a standard way to run many test files and get nice aggregated results? Kinda how 'make spectest' does it.
11:56 colomon felher: prove
11:56 * leont would assume perl5's TAP::Harnes/prove would be the easiest way to go for that
11:57 jnthn prove --exec=perl6 t/* # or something like that, is what I use
11:58 leont Hmmmm
11:58 felher Thanks folks :) I'll look into prove, then :)
11:58 leont It could be improved to recognize the files being Perl 6, and automatically handle that
11:59 * leont never liked the *.t must be perl 5 assumption it makes, has been bitten by that before
12:00 leont It scans the hashbang line anyway (to extract the flags), so it may as well check for that 6
12:00 felher Awesome, works just fine :)
12:01 FROGGS_ hi jnthn
12:01 FROGGS_ can you tell me the difference?
12:01 FROGGS_ r: my role R [Routine $r, Str $s] { method postcircumfix:<( )>($args) { warn } };   multi trait_mod:<is>(Routine $r, Str :$inline!) { $r does R[$r, $inline] };   sub S( $a, $b) is inline('C') { 42 };   say S( 1, 2 )
12:01 jnthn o/ FROGGS_
12:01 p6eval rakudo 4dd124: OUTPUT«42␤»
12:01 FROGGS_ r: my role R [Routine $r, Str $s] { method postcircumfix:<( )>($args) { warn } };   multi trait_mod:<is>(Routine $r, Str :$inline!) { $r does R[$r, $inline] };   sub S( $a, $b=0) is inline('C') { 42 };   say S( 1, 2 )
12:01 p6eval rakudo 4dd124: OUTPUT«Warning  in method postcircumfix:<( )> at /tmp/BhcFFTF3zQ:1␤␤0␤»
12:01 FROGGS_ I added a default value to the sub definition
12:02 FROGGS_ what do I have to do to get the first piece working?
12:06 jnthn FROGGS_: Hmmmm...
12:07 FROGGS_ it's a bit weird
12:07 jnthn Add "use soft;" at the top of the file where you're doing this.
12:08 jnthn If that helps, I have a good idea what it is
12:10 FROGGS_ jnthn: it's working, and I get "get_boxed_ref could not unbox for the given representation" too
12:10 FROGGS_ "use soft" ehh?
12:10 FROGGS_ perl6 guts
12:11 jnthn It is in the spec... :)
12:11 jnthn Anyway, what's happening is that the optimizing does inlining.
12:11 jnthn And it inlined the routine that'd gotten wrapped at compile time
12:11 jnthn Which it shouldn't do
12:11 jnthn I think I see why, so I'll fix that so this case won't need "use soft".
12:12 jnthn But use it for now. :)
12:13 FROGGS_ great, thanks
12:15 jnthn hm, I can't test the patch 'cus I got tired half way through some NQP changes so my build is all busted. Will look at it later :)
12:16 FROGGS_ np
12:18 GlitchMr Also, I have:
12:18 GlitchMr alias perl6='prove -e perl6 -r t/'
12:18 GlitchMr I meant...
12:18 GlitchMr alias prove6='prove -e perl6 -r t/'
12:22 whiteknight joined #perl6
12:23 JimmyZ r: my role test {  }; sub hello() does test { * } ;
12:23 p6eval rakudo 4dd124: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<does>'; none of these signatures match:␤:(Mu:U $doee, Mu:U $role)␤␤at /tmp/FAc7PWsS1I:1␤»
12:33 GlitchMr perl6: zip
12:33 p6eval niecza v21-11-g09989b4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'zip' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /home…
12:33 p6eval ..rakudo 4dd124:  ( no output )
12:35 crab2313 joined #perl6
12:42 cognominal joined #perl6
12:44 cognominal src/core/Mu.pm:162:              ?? "use of uninitialized variable { $.VAR.name }"
12:44 cognominal sounds very suspicious
12:44 cognominal should not that bi v.VAR.name?
12:45 cognominal how come that compiles?
12:45 jnthn $.VAR.name is same as $(self.VAR.name)
12:46 cognominal ho
12:46 cognominal anyway I don't think that's was intended here
12:51 JimmyZ cognominal: it may be a bug
12:53 FROGGS_ Circlepuller: there?
12:54 JimmyZ yes, it's a bug
12:54 moritz no, it was a bug :-)
12:54 dalek rakudo/nom: 32309a4 | moritz++ | src/core/Mu.pm:
12:54 dalek rakudo/nom: fix thinko noticed by cognominal++
12:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/32309a4cda
12:56 FROGGS_ or @all: is there a way to get the code of a sub as a string?
12:57 moritz no
12:57 FROGGS_ meh
12:58 * FROGGS_ is sad
12:58 moritz might not be too hard to patch in though
12:58 kid51 joined #perl6
12:59 FROGGS_ can you give me a hint where to look?
13:00 moritz FROGGS_: first of all you need to add an attribute to Routine
13:01 moritz (or maybe block)
13:01 moritz that's set up in src/Perl6/Metamodel/BOOTSTRAP.pm
13:01 FROGGS_ k
13:02 moritz FROGGS_: and then in src/Perl6/Actions.pm method routine_def set the new attribute to ~$/
13:03 moritz with a bit of luck, that's already enough
13:04 moritz commit e1bd5c983710b3aa2e6f6c52e19b3a523a79b439 might be a nice inspiration, it also adds an attribute to Routine
13:05 FROGGS_ thanks!
13:06 jnthn Hmm...do we really want to do this?
13:06 jnthn It means that the source will be serialized.
13:06 jnthn Increasing the size of all pre-compiled modules.
13:06 jnthn CORE.setting included.
13:07 jnthn Is there some spec that says we should do this?
13:07 FROGGS_ it will not be serialized when called for example &sub.Code ?
13:07 FROGGS_ no, no spec
13:07 jnthn If you put something into Routine then whenever a mdoule is pre-compiled it will have to serialzie whatever is in there.
13:08 FROGGS_ thats bad
13:08 jnthn It's good, but if you start sticking the source code in there then yes, it may be bad :)
13:08 JimmyZ Does perl5 have this feature?
13:09 jnthn Why do you need the source of the sub, ooc?
13:10 FROGGS_ jnthn: https://gist.github.com/3732397
13:11 cognominal joined #perl6
13:11 FROGGS_ I cant get the string containing the C code without supplying all arguments
13:11 moritz jnthn: your patch that added onlystar didn't do anything like that
13:12 moritz jnthn: also it's good for .perl
13:12 jnthn moritz: It did. The onlystar flag will be serialized.
13:12 jnthn moritz: But there's a difference between including an extra integer and including kilobytes of source code.
13:12 FROGGS_ I dont know how to do that properly, so I thought it might be better to be able to get the content of a block or sub as a string
13:12 jnthn Ah, hmm.
13:13 moritz jnthn: can you point me to the portion of your patch that does it?
13:13 FROGGS_ but doing it for all subs/block at compile time isnt exactly what I wanted ;o)
13:13 jnthn I guess one way is instead of just having the string, write it as c '...';
13:13 jnthn oh, wait...
13:13 jnthn That won't quite work either.
13:13 jnthn Since we never call it
13:13 moritz FROGGS_: you can just call that sub
13:13 jnthn Hmmm. :)
13:13 jnthn moritz: arguments... :)
13:14 moritz FROGGS_: and then it returns the string inside
13:14 FROGGS_ moritz: how?
13:14 moritz aplusb(0, 0)
13:14 FROGGS_ sub thingy( SomeWeirdTYpe $a, $b? )
13:14 FROGGS_ how to call that?
13:14 jnthn I think FROGGS_ needs a general solution.
13:14 FROGGS_ right
13:14 FROGGS_ for an Inline::C module
13:14 jnthn Preferably one that doesn't need invocation.
13:15 moritz well, C doesn't have such a sophisticated type system
13:15 moritz it should be possible to find arguments that make a call possible
13:15 moritz I mean, always
13:16 FROGGS_ you have pointers to things like structs (Rect*), this would be a Rect class/type in perl
13:16 marmay joined #perl6
13:16 FROGGS_ so I really dont know how to parse the signature and generate the params
13:16 jnthn Well, parsing the signature isn't quite needed, you can introspect it with .signature
13:17 jnthn And .params gives you a Parameter object for each parameter, and that includes the type
13:17 FROGGS_ hmmm, and then I might just pass the type itself
13:18 FROGGS_ if I put all the args in an array, you do I pass that to a sub that takes for example 4 arguments?
13:18 FROGGS_ is there a way to pass an array as positionals?
13:18 moritz yes
13:18 moritz yoursub(|@args)
13:19 FROGGS_ no, I meant pass, not receive
13:19 moritz yes, pass
13:19 FROGGS_ ohh
13:19 FROGGS_ thats the function call?
13:19 moritz r: sub f($a, $b) { say "$a|$b" }; my @args = 1, 2; f |@args
13:19 p6eval rakudo 32309a: OUTPUT«1|2␤»
13:20 FROGGS_ cool
13:20 FROGGS_ that will do I guess
13:21 keith__ joined #perl6
13:21 dalek doc: df62c32 | moritz++ | lib/classtut.pod:
13:21 dalek doc: add classtut. Mostly copied from the "Using Perl 6" book
13:21 dalek doc: review: https://github.com/perl6/doc/commit/df62c32996
13:24 PacoAir joined #perl6
13:24 rsimoes left #perl6
13:32 kaare__ joined #perl6
13:35 ggoebel joined #perl6
13:45 benabik joined #perl6
13:54 Su-Shee joined #perl6
13:55 GlitchMr std: .3e4
13:55 p6eval std b842bb3: OUTPUT«ok 00:00 41m␤»
13:55 GlitchMr This is ok?
13:55 GlitchMr std: .3
13:55 p6eval std b842bb3: OUTPUT«ok 00:00 41m␤»
13:55 GlitchMr oh, ok
13:56 nebuchadnezzar joined #perl6
13:57 masak today's mini-challenge: provide a convinging answer to http://math-frolic.blogspot.co.​uk/2012/08/mind-wrenching.html by writing a program to verify the answer. preferably in Perl 6.
13:59 masak GlitchMr: it's 3. that's not ok.
14:01 cognominal joined #perl6
14:03 yarp In Math::Vector, the dot product method '⋅' is pretty difficult to key in, why didn't just use '.'? I just want to know the reason.
14:05 moritz nr: sub infix:<.>($a, $b) { $a * $b }; say 4 . 5
14:05 p6eval rakudo 32309a, niecza v21-11-g09989b4: OUTPUT«20␤»
14:05 masak yarp: I didn't pen that module, so I don't have a reason for you. but I do have a cure. in you code, do: sub infix:<.>($l, $r) { $r ⋅ $l }
14:05 moritz yarp: I don't know if that's the reason, but if you define an infix:<.> then you have to use spaces around it, otherwise it'll be parsed as a method call instead
14:06 yarp yes. I have tried, and worked.
14:08 masak moritz: to be fair, that reason isn't of much concern if one follows the (in my view sound) advice of always putting spaces around one's infixes.
14:08 masak except comma, where a spce before looks odd for literary reasons.
14:09 masak space*
14:09 yarp So, I prefer use '.'.
14:09 masak please do.
14:11 ggoebel joined #perl6
14:13 yarp nr: sub infix<*>($a, $b) {$a + $b}; say 4 * 5
14:13 p6eval rakudo 32309a: OUTPUT«===SORRY!===␤Missing block␤at /tmp/w1V1j882HM:1␤»
14:13 p6eval ..niecza v21-11-g09989b4: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed block at /tmp/dvR5G_HWCi line 1:�------> [32msub infix[33m�[31m<*>($a, $b) {$a + $b}; say 4 * 5[0m��Parse failed��»
14:14 moritz nr: sub infix:<*>($a, $b) {$a + $b}; say 4 * 5
14:14 p6eval rakudo 32309a, niecza v21-11-g09989b4: OUTPUT«9␤»
14:14 yarp nr: sub infix:<*>($a, $b) {$a + $b}; say 4 * 5
14:14 p6eval rakudo 32309a, niecza v21-11-g09989b4: OUTPUT«9␤»
14:14 yarp yee
14:14 masak don't mess with the rules of basic algebra!!!11
14:15 masak multiplication is essential for a lot of things. if it were to be replaced by addition, the whole economy would come tumbling down.
14:16 yarp Just test the possibility.
14:16 mhasch You could replace multiplication by an integer by repeated additions.
14:16 moritz masak: that's why modifications are only lexically scoped :-)
14:16 cognominal joined #perl6
14:16 masak moritz: was just thinking the same :)
14:16 masak boy, was that a right decision!
14:17 dalek nqp: 872ecdb | jnthn++ | src/NQP/ (2 files):
14:17 dalek nqp: Add an export trait for packages and get it to do the required installation.
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/872ecdb267
14:17 dalek nqp: 3fac7df | jnthn++ | src/stage0/ (9 files):
14:17 dalek nqp: Update bootstrap so we can use export updates in the NQP source itself.
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/3fac7df30b
14:17 dalek nqp: 2ea2f89 | jnthn++ | src/QRegex/Cursor.nqp:
14:17 dalek nqp: Clear up EXPORT hackery in favor of the new 'is export' trait.
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/2ea2f89532
14:17 mhasch Funny #perl6 should be amidst a discussion about arithmetic when I was going to ask a question related to raithmetic...
14:18 mhasch arithme ... whatever, hard to spell :-)
14:18 snarkyboojum the three Rs :)
14:18 moritz rrright
14:20 mhasch My question is this: How would you call a role for operands that have operations + - * / like numerical values?
14:20 masak snarkyboojum! \o/
14:20 masak mhasch: Numeric?
14:20 snarkyboojum masak: masak-san!
14:20 masak mhasch: Number-like?
14:21 mhasch The role I am talking about is more general than numeric.
14:21 snarkyboojum imaginary? :D
14:22 TimToady · is just COMPOSE . - on my keyboard
14:22 masak mhasch: Smalltalk talks about Magnitude. I don't remember whether that includes complex numbers.
14:23 colomon joined #perl6
14:23 mhasch Modular integers, square matrices, p-adics, polynomials, .... all could consume that role.
14:23 snarkyboojum mhasch: arithmetical?
14:23 snarkyboojum :O
14:24 TimToady wraithmetical
14:24 mhasch Too spooky, TimToady!
14:24 moritz weirdomathstuff
14:24 TimToady Numoids
14:25 snarkyboojum Cantors
14:25 moritz (weirdomathstuff from who has heard about 6 math lectures at University)
14:28 mhasch Hmmm.  Preferably it should be a name suitable for programmers. Snarkyboojums arithmetical sounds not so bad to me.
14:29 moritz mathy
14:29 snarkyboojum mhasch: I have it - binumery :D
14:31 masak mhasch: Arithmable.
14:33 mhasch It should be easy to locate within a role hierarchy, not necessarily fix precise mathematical properties. Division, for example, may be fail for many combinations of operands, but it should be available as an operation.
14:35 mhasch arith* sounds good to me, num* (other than numeric) too.
14:38 wamba joined #perl6
14:39 mhasch *able should begin with a verb, I think.
14:40 leont left #perl6
14:40 sisar joined #perl6
14:40 skids Modular integer support would be nice.  especially uint32 :-)
14:41 * moritz still has no idea what mhasch's new library does, or is supposed to do
14:42 mhasch It will be a part of the Math::Polynomial universe, moritz.
14:42 moritz masak: that doesn't answer the question :-)
14:42 ggoebel joined #perl6
14:43 skids mhasch: depending on what you set for the bounds of commutivity and associativity, it might be a "ring".  There are plenty of math terms for such constructs, and a tangled web of wikipedia links to find them
14:43 not_gerd joined #perl6
14:44 not_gerd hello, #perl6
14:45 masak not_gerd! \o/
14:46 masak skids: I always find such terms as "ring" fascinating, but since I'm not using them every day, I keep forgetting exactly what they mean.
14:46 not_gerd r: (-> int $i is rw { $i = 42 })((class { has int $.i is rw }).new)
14:46 p6eval rakudo 32309a: OUTPUT«===SORRY!===␤Cannot create rw-accessors for natively typed attribute '$!i'␤»
14:46 not_gerd ^ should that be possible per spec?
14:47 jnthn yes, I've just no idea how to make it happen yet
14:47 not_gerd mhasch: Algebraic
14:47 mhasch skids: Yes, an algebraic ring is most commonly to be seen as a coefficient space for polynomials (and I know about semi-rings, integral domains and whatnot, having a degree in math). My concern is about a distinction suitable for programming purposes.
14:47 jnthn It's on the list of "tricky problems to think about" :)
14:48 dalek nqp: 1d3486a | jnthn++ | src/NQP/Actions.pm:
14:48 dalek nqp: Implement is export on routines.
14:48 dalek nqp: review: https://github.com/perl6/nqp/commit/1d3486a8a3
14:48 dalek nqp: bf091cc | jnthn++ | src/NQP/ (2 files):
14:48 dalek nqp: Implement import of exported symbols upon use.
14:48 dalek nqp: review: https://github.com/perl6/nqp/commit/bf091cc3b6
14:50 moritz mhasch: so, what does your library do?
14:51 skids mhasch: yes maybe a more precise definition might help us offer suggestions.
14:52 not_gerd jnthn: I've been thinking about how a VM (parrot2?) would look like that had the explicit goal of implementing 6model/Perl6 semantics efficiently
14:52 not_gerd that was one of the cases which gave me trouble...
14:53 mhasch Math::Polynomial is an abstraction providing a mapping for operations on polynomials to operations in their coefficient space.  However, other Algebra-related modules will follow.
14:54 mhasch M::P should be as independent of actual coefficient domains as possible.  A type (better: role) for arbitrary coefficients will help to achieve this.
14:55 moritz so make M::P a parametric role, using the coefficient domain as a parameter?
15:01 Hugh joined #perl6
15:02 dalek rakudo/nom: 78efb65 | jnthn++ | / (2 files):
15:02 dalek rakudo/nom: Get latest NQP with better export handling, enabling elimination of a hack.
15:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/78efb655d3
15:02 mucker joined #perl6
15:02 GlitchMr https://gist.github.com/3732760
15:02 GlitchMr Uhmmm... what could happened there?
15:03 jnthn phenny: tell [Coke] NQP has support for "is export" now...this may or may not help you avoid various our-routine related issues you were having in your tcl work :)
15:03 phenny jnthn: I'll pass that on when [Coke] is around.
15:03 masak GlitchMr: looks like something went wrong in precompiltion, but not wrong enough for Niecza to run correctly next time.
15:04 GlitchMr std: q:w:x/echo 42/
15:04 p6eval std b842bb3: OUTPUT«ok 00:00 41m␤»
15:05 GlitchMr What words like this should do?
15:05 GlitchMr Niecza seems to only interpret last element (in this case :x), Rakudo doesn't even support that
15:05 skids mhash: I guess the question then is what the most accesibly descriptive "Blah" is for "class MyKindOfMathThingy does Math::Blah[ MyKindOfMathThingyCoefficentDomain ]" ?
15:05 masak GlitchMr: example?
15:06 not_gerd are Rakudo's Int always big integers or do they auto-promote?
15:06 GlitchMr niecza> q:w:x/echo 23/
15:06 GlitchMr 23
15:06 GlitchMr niecza> q:x:w/echo 23/
15:06 mhasch well put, skids.
15:06 GlitchMr echo 23
15:06 GlitchMr :x is execute and :w is split on words
15:06 * hugme hugs GlitchMr, good vi(m) user!
15:06 GlitchMr uhmmm... is it random?
15:06 masak GlitchMr: I see no bug there, I think.
15:07 jnthn not_gerd: always
15:07 masak GlitchMr: hugme hugged you because you started a line with ':x'. false positive :)
15:07 cognominal joined #perl6
15:09 moritz masakbot false positive
15:09 huf_ well, excess hugs is rarely a real problem
15:10 skids mhasch: and you are more concerned with telling the user of Blah that it maps polynomial operations, or that it supports specific .infix<*> operators?  which?
15:10 jnthn moritz: Do you know if we have any tests for non-complex protos?
15:10 jnthn er
15:10 jnthn non-simple protos
15:10 jnthn as in, the non-onlystar case
15:10 mhasch huf_: in this channel, you mean? In RL it might.
15:11 moritz jnthn: I've added a few
15:11 jnthn moritz: ah
15:11 jnthn that's why the ticket was closed :)
15:11 jnthn I musta missed their addition
15:11 jnthn oh!
15:11 moritz S06-multi/proto.t, commit eecc10
15:11 jnthn I see 'em
15:11 jnthn yeah...dunno how I managed to miss that commit :)
15:11 moritz not very sophisticated
15:12 moritz (the tests, I mean)
15:14 jnthn ah, they look reasonable
15:15 moritz there's one case though that I haven't covered yet, and really should have
15:17 dalek roast: 38eaa62 | moritz++ | S06-multi/proto.t:
15:17 dalek roast: test a proto that does not redispatch to its multis
15:17 dalek roast: review: https://github.com/perl6/roast/commit/38eaa62b99
15:19 mhasch To summarize the small survey (arith. operand role name): numoid, algebraic, arithmetical, "element of" ring, (unspecified role parameter)
15:21 mhasch Thanks for your input, I'll think about it some more.
15:21 mhasch And jnthn: It might be not that hard after all :-)
15:23 [particle] left #perl6
15:24 c1sung joined #perl6
15:25 tokuhiro_ joined #perl6
15:26 jnthn r: multi trait_mod:<is>(Routine $r, :$inline!) { $r.wrap(-> |c { say "in wrapper"; callsame; }); }; sub S($a, $b) is inline { 42 }; say S( 1, 2 )
15:26 p6eval rakudo 78efb6: OUTPUT«42␤»
15:29 JimmyZ joined #perl6
15:30 not_gerd hello, JimmyZ
15:31 JimmyZ hello, not_gerd
15:32 * not_gerd hasn't done any m0 work, but is thinking about how a Perl6-geared Parrot2 would look like
15:34 masak 卓明亮
15:34 masak # New Ticket Created by 卓明亮 # Please include the string: [perl #74910] # in t...
15:34 masak 5/5/10
15:34 masak g'ah. sorry.
15:34 JimmyZ not_gerd: but your m0 implementation is really awesome ;)
15:34 masak 卓明亮,你好
15:35 JimmyZ 麦高,下午好
15:35 masak (this is the second time I make exactly the same copy/paste mistake. Gmail is a little overeager in what it selects from the email header.)
15:35 diakopter not_gerd: what's a Parrot2
15:36 masak JimmyZ: 你今天怎么样?
15:36 JimmyZ masak: 还好,这几天深圳天气比较凉快
15:37 flussence joined #perl6
15:38 masak JimmyZ: 好的。:)
15:38 not_gerd diakopter: if you consider the item's on the Parrot roadmap (m0, 6model integration - which will necessitate a gc rewrite, getting rid of PIR) it seems to me a complete reboot might be more fruitful
15:38 JimmyZ ^_^
15:39 not_gerd (just something I've been thinking about)
15:40 tadzik fun fact: I was able to install modules with panda(rakudo) and run them on niecza
15:40 tadzik using niecza -I ~/perl6/lib
15:40 tadzik Just Works :)
15:41 masak \o/
15:41 JimmyZ it seems to me targeting rakudo to m1 is fruitful
15:41 tadzik and yeah, I must say I keep on making the project better which makes incompatibile changes sometimes :/
15:42 tadzik example: We no longer use wget anymore, to be more friendly (compatibile) with Windows and OSX
15:42 tadzik but we now have Parrot-specific code because of this
15:42 pmichaud joined #perl6
15:45 diakopter <sigh> the latest parrot doesn't build for me on activeperl/msvc2010, whereas it usually has for years.
15:46 pmichaud I can try it with Strawberry
15:46 masak pmichaud! \o/
15:47 diakopter pmichaud: the parrot version that is generated by nqp builds fine, however
15:47 diakopter (fyi)
15:47 pmichaud diakopter: right, I'll try it with --gen-parrot=master
15:47 pmichaud we need to test that before the parrot release on Tue
15:49 tadzik jnthn! jnthn!
15:50 tadzik I tried threading again, it now works on parrot-nqp, lexical issues seem to be fixed, but nqp still segfaults in the same way
15:50 tadzik (looking for lexpads)
15:50 pmichaud (restoration of sanity on hyper deepness)++
15:53 masak +1
15:54 pmichaud diakopter: parrot itself doesn't build?
15:54 diakopter right
15:56 diakopter toward the end of the build: https://gist.github.com/3732946
15:57 pmichaud that nmake warning looks troublesome
15:57 pmichaud I wonder if something gmake-specific got added to the makefile.
15:58 diakopter the NMAKE warning doesn't occur in the parrot build that works
16:01 pmichaud my guess is that https://github.com/parrot/parrot/commit/​b6584aea8567161aae4c9050f78ec77335956253 is the problem one.
16:01 pmichaud see line 143 of src/dynpmc/Rules.in
16:02 benabik I'm not sure why os.pmc has a .str rule but none of the others do.
16:02 pmichaud perhaps none of the others have constant strings?
16:03 pmichaud although since os.pmc is basically a dummy, I'm skeptical that it's the problem.
16:04 pmichaud it does concern me that there are now two definitions of the 'OS' pmc, though.
16:05 diakopter $< <- "The name of the first prerequisite."
16:05 pmichaud feels like the one in os.pmc should be called 'OSdummy' or something.
16:06 ggoebel joined #perl6
16:12 [Coke] GlitchMr: updated to use your real name. will take some time to propogate.
16:12 phenny [Coke]: 15:03Z <jnthn> tell [Coke] NQP has support for "is export" now...this may or may not help you avoid various our-routine related issues you were having in your tcl work :)
16:16 M_o_C joined #perl6
16:18 bg joined #perl6
16:18 M_o_C joined #perl6
16:18 pmichaud not_gerd on #parrot finds http://msdn.microsoft.com/e​n-us/library/cbes8ded.aspx ... which says that $< is only valid in inference rules.
16:19 geekosaur that's technically true of unix make as well
16:20 benabik I'm testing a possible fix on OS X, but I don't have MSVC anywhere.
16:20 pmichaud okay, sounds like you all have it in hand, then.  :-)
16:20 [Coke] jnthn: no clue if that will help. thanks, though.
16:21 * [Coke] has another issue on nqp, though. Writing up a test case now...
16:21 benabik I'm just going back to how the OS dynpmc used to be built.
16:21 benabik And then I'll try renaming the PMC itself.  :-)
16:21 pmichaud benabik++ # rules.in fix
16:21 pmichaud benabik++ # OS name fix
16:21 not_gerd geekosaur: according to the GNU make manual, there is no such thing as an inference rule ;)
16:21 benabik pmichaud: I haven't actually fixed it yet.  ;-)
16:21 Chillance joined #perl6
16:22 not_gerd it's the MS equivalent of pattern rules
16:22 geekosaur GNU make is not standard unix make, not by any stretch of the imagination.  (and inference rule is pattern rule, standard unix make does not have a lot in the way of such machinery unlike gnu make)
16:23 arnsholt Yeah, developing stuff for the GNU versions of a tool can give som nasty surprises when you try it on non-GNU versions of the same tool
16:23 geekosaur but I guess if you've fallen for gnu make as the standard, you;re going to be very unhappy on any system which does not use gnu make.  (Microsoft, the *BSDs, etc.)
16:24 geekosaur amd you might as well just decree gnu make as a dependency
16:25 * [Coke] hurls https://github.com/perl6/nqp/issues/53 for pmichaud  since he's awake. ;)
16:25 arnsholt Yeah, I just gave up getting my AWK script to work on OS X
16:25 fgomez joined #perl6
16:26 [particle] joined #perl6
16:26 geekosaur hm?  what are you having issues with?
16:26 fgomez joined #perl6
16:26 * not_gerd skimming http://pubs.opengroup.org/onlinep​ubs/009695399/utilities/make.html - nmake appears to be pretty close to POSIX make
16:26 benabik OS X uses BSD awk, which is surprising to many people.
16:27 geekosaur yes
16:27 [Coke] nqp seems to have trouble with: pointy subs in init blocks that are compiled to pir, and then used by another script which is itself then compiled to pir.
16:27 geekosaur many people think linux is everything
16:27 geekosaur OS X is periodically synched to freebsd-stabe
16:27 [Coke] sorry, what build script is broken? parrot?
16:28 benabik [Coke]: Yes, the os dynpmc won't build with nmake.
16:28 jnthn heh, I go for a nap and pmichaud pops up...
16:28 [Coke] ok. it's a simple bug. it's not like parrot has thrown away support for nmake.
16:29 benabik [Coke]: Right.  Just a mistake when removing/readding the OS dynpmc.  I'm reverting the rules to their original state.
16:29 [Coke] benabik++
16:31 [Coke] jnthn: ooh, you're awake. can you fix my latest nqp issue? ;)
16:33 fgomez joined #perl6
16:33 fgomez joined #perl6
16:35 jnthn [Coke]: If you use a sub instead of a pointy, does the issue go away?
16:35 wamba joined #perl6
16:39 arnsholt geekosaur: Yeah, what benabik said. Thankfully OS X has GNU make though
16:40 dalek rakudo/nom: 5aa57b9 | jnthn++ | src/ (2 files):
16:40 dalek rakudo/nom: Don't try to inline routines we know got wrapped before CHECK time.
16:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5aa57b9a73
16:41 geekosaur for some reason I had not thought of perl6 as being a linux-uber-alles trap...
16:41 dalek roast: 68efa9a | jnthn++ | S14-traits/routines.t:
16:41 dalek roast: Test for wrapping in a trait_mod.
16:41 dalek roast: review: https://github.com/perl6/roast/commit/68efa9a064
16:41 geekosaur (trying to educate me as to how deficient freebsd-derived systems are is not going to have the effect you would evidently prefer)
16:47 arnsholt I'm not quite that adamant, but I have to admit some of the GNU extensions are pretty handy
16:47 arnsholt The machine that runs my IRC client runs fBSD, FWIW =)
16:48 * jnthn does most of his development on Windows, so isn't fond of the extensions that bust stuff for nmake :)
16:48 arnsholt Yeah, I can definitely see how that's annoying ^_^
16:49 jnthn I get all "oh noes"-y when somebody proposes "improving" the NQP Makefile, for example. 'cus most likely improved means busting for me means I now have a commit to revert. :)
16:50 arnsholt Heh
16:50 rindolf joined #perl6
16:52 arnsholt I'm kind of split in two on things like the GNU extensions
16:53 arnsholt On the one hand, portability is important. On the other, our software doesn't have to be the best the eighties have to offer
16:54 benabik diakopter: Parrot master now has a commit that should fix your nmake woes.  (I hope)
16:54 benabik diakopter: Would appreciate a yay/nay on it.
16:56 * jnthn can try it after dinner
17:01 zby_home joined #perl6
17:06 pmichaud jnthn: yeah, I popped up.  We met our robotics deadline last night, so I have a little bit of breathing space again.  :-)
17:09 raiph phenny, tell moritz https://gist.github.com/3732447
17:09 phenny raiph: I'll pass that on when moritz is around.
17:11 ggoebel joined #perl6
17:13 xinming_ joined #perl6
17:14 raiph For anyone wanting to understand where #perl6 summaries are headed...
17:15 raiph See latest blog entry at http://blogs.perl.org/users/perl_6_reports​/2012/09/perl6-summary-for-2012-09-03.html
17:15 raiph And then consider reading https://gist.github.com/3732447
17:20 jnthn pmichaud: Nice! :)
17:20 whiteknight joined #perl6
17:25 jnthn benabik: still busted, it seems
17:25 jnthn https://gist.github.com/3733333
17:26 GlitchMr std: ${0}
17:26 p6eval std b842bb3: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of ${0}; in Perl 6 please use $0 at /tmp/FfJAFeR7ln line 1:�------> [32m${0}[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
17:27 benabik jnthn: Sorry, my first attempt was broken.  Did you test 76badef or 32da9dd?
17:27 GlitchMr I've feeling that ${0} not recommending $(-1) but recommending $0 instead isn't improvement
17:27 jnthn benabik: Currently on 32da9dd2
17:27 benabik :-/
17:28 jnthn This looks like a different error from the origianl makefile one though
17:28 jnthn It's the C compiler that spits out the errors here
17:28 benabik No idea what that is.
17:28 jnthn Which is quite different from the one diakopter posted
17:29 benabik Indeed it is, but I don't know the origin of this one.
17:34 dalek glitchmr.github.com: 96fb493 | GlitchMr++ | _posts/2012-09-16-perl-6-changes-2012W37.md:
17:34 dalek glitchmr.github.com: Perl 6 changes - 2012W37 blog article
17:34 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/96fb4931bd
17:35 [Coke] jnthn: s/->/sub/ stillf ails.
17:36 dalek glitchmr.github.com: ae28a1c | GlitchMr++ | _posts/2012-09-16-perl-6-changes-2012W37.md:
17:36 dalek glitchmr.github.com: Fix Perl 6 specification incompatible change
17:36 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/ae28a1c9fd
17:37 ggoebel joined #perl6
17:41 sisar here is an interesting error with p6doc: https://gist.github.com/3733411 (the second attempt at reading the docs for Int worked, but the first attempt failed with the unique error) (Cygwin, Windows7, 64-bit)
17:42 not_gerd sisar: you need to rebase your cygwin installation
17:42 GlitchMr Most of Perl 6 installations are either on Linux or are native Windows installations
17:43 sisar not_gerd: i just did. What do you think the problem is /
17:43 sisar ?
17:44 not_gerd sisar: did you include the parrot/perl6 DLLs in the rebase?
17:44 sisar GlitchMr: I compiled rakudo from source (within Cygwin)
17:44 GlitchMr It looks like Cygwin's fork emulation error
17:44 GlitchMr sisar: http://www.cygwin.com/faq/faq-nochunks.html#faq.using.fixing-fork-failures
17:45 sisar not_gerd, GlitchMr: ok, let me check.
17:45 GlitchMr Usually, using Perl 6 without Cygwin is less problematic
17:45 GlitchMr It's possible to use Perl 6 on Cygwin, but
17:47 spider-mario joined #perl6
17:47 GlitchMr And no, this isn't Perl 6 bug - it's just fork() call which refused to work
17:47 GlitchMr It just happens on Cygwin
17:48 sisar GlitchMr: so if I want to compile Rakudo on Windows, what should I use ?
17:48 rurban there is a rakudo distro for cygwin
17:48 GlitchMr Well - you could use precompiled Rakudo - https://github.com/downloads/rak​udo/star/rakudo-star-2012.08.msi
17:48 sisar GlitchMr: Strawberry Perl + MSVC ?
17:48 GlitchMr But if you really want, you can compile Rakudo on Windows
17:48 rurban I just didn't came to upload the last star release yet.
17:49 GlitchMr rurban: latest?
17:49 rurban latest star
17:49 not_gerd sisar: using cygwin is fine - it's just that once in a while you might run into fork errors, but that's easily fixed
17:49 rurban on fork errors you have to rebaseall. with perl5 errors perlrebase
17:49 not_gerd (when compiling your own rakudo, that is - the one from the package manager will be automatically rebased)
17:50 sisar not_gerd: ok. I now understand the error. Thanks.
17:50 GlitchMr sisar: you also could try 'cpan install Rakudo::Star'
17:51 rurban on strawberry its also pretty easy
17:51 sisar GlitchMr: Ah. I did not know about that. I'll try that.
17:52 GlitchMr cpan install Rakudo::Star worked for me, but that was on Linux
17:53 GlitchMr I wonder if it would work on Windows ;-)
17:53 GlitchMr (but, I think that .msi way is easiest)
17:53 tgt joined #perl6
17:54 spider-mario isn’t Cygwin super slow?
17:54 spider-mario I’m not sure Rakudo needs that
17:57 marmay I would like to write a role R1 that requires any class A that consumes R1 to implement methods of another role R2 or to consume R2. Is there some way to express this dependency in the first role R1? Can I write role R1 does R2 ...?
17:57 jnthn You can write role R1 does R2 and that will mean R2 also gets composed into the class.
17:58 jnthn (And thus if it has required methods then the class will need to implement those also)
17:59 marmay Okay, that's probably what I want. :-) And writing class A does R1 does R2 later on does not cause some strange behaviour? Or my A $x; $x does R1 or something like that ...
18:00 jnthn Should be OK
18:00 jnthn A role ain't meant to conflict with itself
18:01 marmay Thanks!
18:11 skids speaking of which, if you have a role that defines a required api e.g. role R1 { method m { ... } }, is there a way to let roles satisfy it with either a multi or a non-multi .m ?
18:12 not_gerd Item assignment. Places the value of the left-hand side into the container on the right-hand side.
18:12 not_gerd that doesn't sound right...
18:15 jnthn left...right...what's the difference... :)
18:15 skids which side of the screen you are sitting on.
18:15 jnthn skids: Doesn't that already work?
18:15 skids Don't think so, lemme golf a bit...
18:20 not_gerd phenny: tell moritz there appears to be some confusion on left<->right in the section on item assignment of http://doc.perl6.org/language/operators
18:20 phenny not_gerd: I'll pass that on when moritz is around.
18:20 * not_gerd couldn't immediately figure out how that page gets generated
18:21 skids Hrm, apparently it works with roles/cronies but not directly with classes...
18:21 skids r: role A { method m (*@a) { ... } }; class C does A { multi method m (*@a) { "OHAI".say } }; my C $c .= new(); $c.m(3);
18:21 p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
18:21 skids but..
18:21 skids role A { method m (*@a) { ... } }; role B { multi method m (*@a) { "OHAI".say } }; class C does B { }; my C $c .= new(); $c.m(3);
18:21 skids r: role A { method m (*@a) { ... } }; role B { multi method m (*@a) { "OHAI".say } }; class C does B { }; my C $c .= new(); $c.m(3);
18:21 p6eval rakudo 5aa57b: OUTPUT«OHAI␤»
18:22 jnthn skids: Ah...I think you found a bug
18:22 jnthn Ordering problem, I guess...
18:27 dalek glitchmr.github.com: 08dcace | GlitchMr++ | index.xml:
18:27 dalek glitchmr.github.com: XML output should use <h2> instead of <h4> and <h1> instead of <h3>.
18:27 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/08dcace0b0
18:33 skids r: role D { method m { } }; role A does D { }; role B does D { }; class C does A does B { }; C.new(); # probably just NYI diamond composition, but thought I might mention it.
18:33 p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be resolved by class C because it exists in multiple roles (B, A)␤»
18:34 jnthn yeah, that one I know about
18:35 masak skids: are you submitting a rakudobug, or shall I?
18:35 skids Go for it, unless you want to walk me through it.
18:36 * masak submits rakudobug
18:36 jnthn Wait, the diamond one?
18:36 jnthn Or the previous one?
18:36 jnthn The diamond one is in RT. The pervious one should be filed though :)
18:36 masak r: role A { method m (*@a) { ... } }; class C does A { multi method m (*@a) { "OHAI".say } }; my C $c .= new(); $c.m(3)
18:36 p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
18:36 masak that one.
18:36 jnthn yes, please do
18:37 jnthn Guess I should have a role hacking session at some point soon :)
18:37 GlitchMr Interesting how it mentions that it cannot call 'm' because it has two identical methods and it doesn't know what method it should choose.
18:37 GlitchMr So realistic.
18:37 cart joined #perl6
18:39 masak GlitchMr: it's not that it cannot call 'm', it's that it cannot compose the class.
18:39 GlitchMr oh, ok
18:39 masak GlitchMr: and the error is bogus because it's the same method.
18:39 GlitchMr I know :-)
18:40 GlitchMr Well, when two methods are identical, Perl 6 should choose one randomly without asking.
18:40 GlitchMr That would make sense
18:41 GlitchMr eval: Date.new.say
18:41 buubot_backup GlitchMr: Datenewsay
18:41 GlitchMr perl6: Date.new.say
18:41 p6eval niecza v21-11-g09989b4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'Date' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /home/p…
18:41 p6eval ..rakudo 5aa57b: OUTPUT«2012-12-24␤»
18:41 GlitchMr If Rakudo can say 2012-12-24 on Date.new, it also should be able to choose methods randomly
18:42 masak r: role R { method m {} }; class C does R { multi method m {} }
18:42 p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Cannot have a multi candidate for 'm' when an only method is also in the package 'C'␤»
18:42 masak hm.
18:43 masak r: role R { method m (*@a) {} }; class C does R { multi method m (*@a) {} }
18:43 p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Cannot have a multi candidate for 'm' when an only method is also in the package 'C'␤»
18:43 masak r: role A { method m (*@a) { ... } }; class C does A { multi method m (*@a) { "OHAI".say } }; my C $c .= new(); $c.m(3);
18:43 p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
18:43 masak what's the significant difference between the above two?
18:44 masak what makes the error messages different, I mean?
18:44 masak oh! the term:<...>.
18:44 masak r: role R { method m (*@a) { ... } }; class C does R { multi method m (*@a) {} }
18:44 p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
18:44 masak aye.
18:45 masak r: role R { method m (*@a) { ... } }; class C does R { method m (*@a) {} }; say "alive"
18:45 p6eval rakudo 5aa57b: OUTPUT«alive␤»
18:46 masak writing useful RT ticket titles causes me to stop and think what the ingredients in a bug might be :)
18:46 jnthn Well, the bug hangs off an ordering issue
18:46 jnthn We compose roles, *then* take the bunch of multis we know about and auto-gen protos
18:47 jnthn That, unfortunately, means that those auto-gen'd protos aren't there in time for the check.
18:48 not_gerd bye, #perl6
18:48 not_gerd left #perl6
18:51 jnthn r: say('a'~"¢");
18:51 p6eval rakudo 5aa57b: OUTPUT«a¢␤»
18:55 ggoebel joined #perl6
19:04 rurban joined #perl6
19:05 rurban jnthn: which activeperl do you use? 5.14 or 5.16?
19:05 jnthn heh
19:05 jnthn This is perl 5, version 12, subversion 4 (v5.12.4)
19:06 jnthn On this machine :)
19:06 jnthn My laptop is probably much more recent.
19:07 lue joined #perl6
19:12 rurban I'm trying now with active perl5.16 and msvc 9 (cl v15.0)
19:13 rurban It worked fine with strawberry gcc4.4 and cygwin gcc4.5
19:14 rurban Found the problem. Another $<
19:18 rurban Oh, someone removed the os.str target. that's why
19:20 Circlepuller_ joined #perl6
19:21 ggoebel joined #perl6
19:24 MikeFair_ howdy all
19:24 rindolf MikeFair_: hi.
19:24 rindolf MikeFair_: what's up?
19:24 cognominal joined #perl6
19:25 MikeFair_ back from church, recently made some good progress on getting the first iterations of creating a programming language I've been envisioning for a long time and sort of wondering what steps to take next
19:26 rindolf (sub ($x) { $x * $x }).(5)
19:26 rindolf :-)
19:26 MikeFair_ Soon I'd like to have something to demo, but there's a lot of interconencted pieces :)
19:26 rindolf perl6: (sub ($x) { $x * $x }).(5)
19:26 p6eval rakudo 5aa57b, niecza v21-11-g09989b4:  ( no output )
19:27 rindolf perl6: say (sub ($x) { $x * $x }).(5)
19:27 p6eval rakudo 5aa57b, niecza v21-11-g09989b4: OUTPUT«25␤»
19:27 MikeFair_ rindolf: hehe actually it's a lot like perl6 semantics but with a native english-like syntax
19:27 rindolf MikeFair_: similar to COBOL?
19:27 masak perl6: say { $^x * $^x }(5)
19:27 p6eval rakudo 5aa57b, niecza v21-11-g09989b4: OUTPUT«25␤»
19:27 MikeFair_ rindolf: and erlang and XMPP all run together, it's as much a virtual execution environment as it is a lnaguage
19:27 rurban jnthn: I could repro your dynpmc/os problem. Looks tricky. PMCNULL symbol missing
19:28 jnthn urgh
19:28 MikeFair_ rindolf: no - I think of COBOL and Basic more like the same thing
19:29 MikeFair_ rindolf: this is more like: 'put "hello " before the first word of txtWorld'
19:29 rurban os.obj : error LNK2001: unresolved external symbol _PMCNULL is what I get
19:30 MikeFair_ rindolf: Where before that would have been 'put "world!" into txtWorld'
19:31 MikeFair_ rindolf: it belongs to the "xTalk" family of languages, which while on the surface look nothing like Perl6, under the hood, contextually, are actually very much similar (at least imho)
19:31 rindolf MikeFair_: OK.
19:32 MikeFair_ rindolf: My expectation is to make it so that many native languages, not just english, could be used to create programs and programs can be decompiled into many native languages
19:34 masak MikeFair_: good luck. those are not my priorities in creating a language, but I cn still see how interesting things may come out of such a venture.
19:34 masak MikeFair_: I've always thought Eidola was an interesting experiment in that regard. I don't know if it's still online in any form, though.
19:35 masak oh, it is: http://www.eidola.org/
19:35 MikeFair_ masak: Oh clearly, I get that these priorities are my own. ;)
19:35 MikeFair_ Though there might be a few other folks interested if I can ever get something to show folks
19:35 masak *nod*
19:36 MikeFair_ masak: It's not impossible to think of P6 or 6model as an IR for this kind of language.... english -> byte code -> spansih
19:36 MikeFair_ Eidola is a representation-independent, object-oriented, visual programming language
19:36 MikeFair_ oh hey!!
19:36 MikeFair_ yeah
19:37 masak MikeFair_: also, the language "Sorted!" can be written in either English or German, or a mixture. you should check it out.
19:37 MikeFair_ exactly like that -- same kind of concept
19:37 MikeFair_ masak: My game plan atm is to use XML as the intermediary to represent the AST
19:38 masak MikeFair_: the thing that Eidola taught me was that even a language that aims to be representation-independent can't avoid being opinionated. Perl 6 and Parrot has taught me the same but even more so.
19:38 MikeFair_ masak: Compile that using EXI to get a compact binary representation
19:39 MikeFair_ masak: Yes I think of it as semantics versus syntax --- semantics are very opinionated --- the language either natively recognizes that construct, or it doesn't
19:39 masak right.
19:40 MikeFair_ masak: syntax however is extremely flexible "HOW you say it, can be very flexible... but "WHAT you can say".. not so much" :)
19:41 MikeFair_ The only psuedo exception to this is that I'm expecting to be able to load modules that dynamically change the grammar of the language at runtime/compile time
19:41 MikeFair_ a good example of this is the idea of the "move" command for GUI objects like buttons
19:42 MikeFair_ 'move button myButton to the center of the current card'
19:42 MikeFair_ that's the native syntax, and it causes the button to 'pop' over to that location
19:43 MikeFair_ however it's also useful to have an 'animatedMove' that causes it to 'glide' from point a to point b
19:43 MikeFair_ that command can be added as proceudre/function call, but it loses its native langauge expression once you do that
19:44 MikeFair_ animatedMove(myButton, the center of this card)
19:44 masak I'm curious: what do you feel you gain by imposing sloppy human grammar rather than exact programming-language grammar?
19:45 MikeFair_ masak: Lack of a human translator that speaks the foreign 'programming language'
19:45 MikeFair_ masak: it's yournative language that you already know
19:45 MikeFair_ masak: I'm not trying for 'native language parsing' so its not that 'sloppy'
19:46 masak ok.
19:46 masak at this point you should probbly build it, and then we can talk about it ;)
19:46 MikeFair_ masak: For instance, 'first, second,third' are ordinals that can be parsed and translated directly to [0], [1], [2]
19:46 masak yes, but whyyyyy
19:47 masak I'd rather write [1] any day.
19:48 MikeFair_ masak: The best way I think for me to express it is the day I went to write a somewhat complex algorithm, not knowing exactly how to express it yet, I just wrote the algorithm out using english comments, but with a mind toward being 'in language' where I could
19:49 MikeFair_ masak: When I was done, about 15 lines or so, I only had to change 4 to 6 words to make it right
19:49 MikeFair_ masak: Why do you put english language comments in your code?
19:49 MikeFair_ masak: It's the same reason
19:50 MikeFair_ masak: Your code is attempting to express something, currently you say it to yourself in english, then translate that to the programming language
19:50 masak MikeFair_: I have no interest in trying to deflate your vision. :) it might end up being something great. but I don't quite see it.
19:50 MikeFair_ masak: no worries, like I said I expect this to be my own, and like I said I couldn't see it iether at first
19:50 masak largely, I don't use English comments to explain "what" but "why".
19:51 MikeFair_ masak: I was quite opinionated about how 'inferior' this english like language was :)
19:51 lue MikeFair_: Do you know of Inform 7? It's specific to coding ye olde text adventures, but might still be worth a look, as it uses natural english: http://inform7.com/
19:51 masak if a comment contains "what", that suggests to me the variable/function that needed a comment should perhaps be renamed.
19:51 ajoe joined #perl6
19:51 masak lue++ # I though've thought of Inform 7
19:52 masak should've*
19:52 masak I believe it's a good example of what MikeFair_ is attempting.
19:52 MikeFair_ masak: agreed comments are very much 'why', but oftentimes in an xTalk , why is actually valid code
19:53 MikeFair_ it's strange when the computer speaks something close to your language
19:54 masak MikeFair_: I can't fault you for lack of vision.
19:54 MikeFair_ LOL
19:54 * MikeFair_ bows head respectfully.  "thanks!" :)
19:54 masak pray tell, how old are you?
19:54 MikeFair_ masak: I first had the idea for this thing in 1997
19:55 masak quite a while ago.
19:55 MikeFair_ masak: after 15 years of waiting for someone else I finally figured out that this was "my itch" to scratch :)
19:55 * MikeFair_ just turned 37 recently.
19:55 MikeFair_ masak: most xTalkers aren't low lovel folks
19:56 MikeFair_ masak: and most low level folks are like 'I'd rather use the shorthand notations' :)
19:57 MikeFair_ masak: Well it's not that they'd rather use the shorthand, it's just hard for them to get what the advantages are -- it's mainly productivity for people who aren't expert coders or have the ability to dedicate themselves to learning a 'foreign language'
19:58 masak well, the spectrum on which we seem to end up tending towards different ends is "syntax adapted to the human" vs "syntax adapted to the computer". neither of us is at an extreme, but we're clearly on different points.
19:58 MikeFair_ masak: It's clearly not 'efficient' from a minimalist perspective, which is something I think we pride ourselves on for good reasons
20:00 MikeFair_ masak: I look at as two stacks, each optimized for interaction with the party they are closer to (the machines or the humans)
20:00 MikeFair_ masak: Instead of one vertical stack -- it's actually two --
20:00 MikeFair_ masak: one for machines, and one for humans
20:00 masak oh, sure.
20:00 masak MikeFair_: when I was about 18, I created a dataflow programming language whose programs were ASCII diagrams wiring together different primitives.
20:00 MikeFair_ masak: then there's an IR that can translate betweenthe two
20:01 MikeFair_ masak: Sweet!
20:01 masak yes. the programs were quite beautiful. it supported recursion.
20:01 MikeFair_ masak: that's pretty cool actually, at least I think it is
20:01 masak my point is that it ended up being not very expressive. you just couldn't write anything in it beyond a certain size.
20:02 MikeFair_ masak: right, but within its subdomain I'm sure it was quite expressive
20:02 masak it didn't really have a subdomain.
20:02 masak I intended it to be general-purpose.
20:02 MikeFair_ masak: small programs expressed visually for others to read? :)
20:03 masak it was good for art, not much more :)
20:03 MikeFair_ masak: For really large projects worked on by many different people, it's actually more important that we be able to read each others code and understand why/how this is working the way it does than for the computer to
20:04 MikeFair_ masak: We can build tools to make it easy for the computer to execute, but sharing the 'program logic' with each other is how we make it scale
20:05 MikeFair_ masak: Downloading a large project when you weren't there in the beginning can be daunting
20:06 MikeFair_ masak: I'm taking on something to make comprehending large complex systems more accessible to us quicker
20:07 MikeFair_ masak: It's much more "pictury" -- the current model is "let's all learn to speak the language of the program"
20:07 MikeFair_ masak: You do any erlang?
20:07 jnthn The problem I find in such situations is rarely the small-scale logic. It's the lack of boundaries in the system.
20:07 Circlepuller_ joined #perl6
20:07 jnthn Meaning you can't just learn the bit of the system responsible for the changes you need to make.
20:07 masak +1
20:08 MikeFair_ jnthn: exactly, or not even boundaries but just interdependencies
20:08 masak let's all build bigger systems by building smaller systems!
20:09 MikeFair_ masak: Yeah! smaller systems that do one thing well and then make an infrastructure for linking them together!  --- Wait a minute!! I've heard that before :)
20:09 MikeFair_ jnthn: I downloaded the KOffice code a couple years ago and was lost in the stack of object hierarchies
20:10 MikeFair_ jnthn: It's not that it wasn't cleanly abstractly, they did a really good job, I just couldn't grok what the hierarchies were
20:10 MikeFair_ jnthn: I needed a picture of how things linked together and the data flowed through the program
20:11 MikeFair_ jnthn: Where did things begin?  When did they come into being and how were they interacted with over the life of the program
20:11 M_o_C joined #perl6
20:12 MikeFair_ What I started envisioning was some kind of 3D virtual world where I could actually watch the program execute, kind of like a debugger, but with 3D objects and lines, like some big RTS MMOPRG
20:13 Circlepuller joined #perl6
20:13 jnthn Hm :)
20:13 MikeFair_ It's no different than the JMX stuff from java from a data level
20:13 MikeFair_ just rendered differently
20:13 MikeFair_ :)
20:14 masak MikeFair_: I believe programming might eventually be done in a 3D virtual world, yes.
20:14 masak we will probably live to see it.
20:15 MikeFair_ Classes would be like "building foundations", instances of those classes would be "floors of the building", windows would be variables, methods, and such
20:16 Circlepuller__ joined #perl6
20:16 MikeFair_ I'm don't think I have all the exact metaphor representations yet, but I think we'll all know it when we see it :)
20:17 lue .oO("If builders built buildings the way programmers wrote programs, the first woodpecker to come along would destroy civilization.")
20:17 MikeFair_ lue: So wouldn't a woodpecker in this case be virus/botnet/spammer
20:18 MikeFair_ lue: In which case, I think they've proven the point. ;)
20:18 lue Yeah, that was just my first thought when the "virtual buildings" metaphor popped up.
20:19 * MikeFair_ pictures a virus like a little woodpecker messing with the memory of my code. :)
20:19 MikeFair_ Which we could do if we could hook the VM up to a machine and "watch" the program execute :)
20:21 MikeFair_ I plan on using the debugger and other hooks like that into the VM to suck the data out
20:23 MikeFair_ I'm looking at ways to take on evaluating the overall performance of the program as a whole system where we can watch the memory get consumed, the processors allocate time,the threads block on resources, that kind of thing
20:25 raiph moritz: ping
20:25 * MikeFair_ gets a picture of "nethack" as a first whack at "watching" the program execution
20:26 * lue imagines using nethack to analyze and debug code... O.o
20:26 MikeFair_ BTW, I got to lok over a few examples of the Inform 7 thing ant it's definitely in the same concept as what I'm proposing, but they are more specific of course, the xTalk stuff is more generalized.
20:27 MikeFair_ lue: exactly.. :)
20:28 MikeFair_ lue: I was thinking more 3D virtual world because I wanted "windows" (representing code blocks) that actually had the code hilite as executing and I could "click to debug", set breakpoints, and whatnot
20:30 lue Now I'm thinking of a debugger with an interface similar to blender's [ what a fun and interesting line of thought I've gone down today :) ]
20:32 bruges joined #perl6
20:33 jnthn lue: Well, the Rakudo debugger is built to have pluggable-ish UIs. :)
20:34 MikeFair_ lue: I like the sound of that
20:36 lue I imagine it'd be faster to s:g/python/perl6/ as its backend and rig up an in-program debugger than it would be to replicate blender.
20:37 MikeFair_ jnthn: I expect some kind of 'visual program explorers' ought to be conceivable with just the basic debugger hooks
20:37 MikeFair_ lue: well blender takes plugins right
20:37 MikeFair_ lue: You'd just need some kind of 'visualizer' for the data stream coming out of the VM
20:38 MikeFair_ at least my thinking so far has been that this is a VM hook thing
20:38 MikeFair_ lue: So if we created visual metaphors the stuff in 6model, that should capture most everything
20:39 MikeFair_ that's my game plan at least
20:40 * lue has now roped himself into investigating the (possibility|feasibility) of using blender as a frontend for debugging ... :)
20:40 * MikeFair_ cheers!! :)
20:40 MikeFair_ I AM NO LONGER TOTALLY ALONE IN MY INSANITY!!! :)
20:41 MikeFair_ at least for a little while. :)
20:41 MikeFair_ lue: Seriously though I'd be very curious to hear about whatever you might discover
20:43 MikeFair_ lue: I was hoselty thinking of using the ZeroMQ stuff as a gateway for shipping data back and forth between the debugger and the visualier
20:43 MikeFair_ s/hosetly/honestly
20:43 MikeFair_ visualizer
20:44 lue It seems as though the rakudo debugger's UI is in one file, which makes me feel hopeful about the possibility so far :)
20:44 masak two files, IIRC.
20:44 masak one in nqp, and one in Perl 6.
20:45 MikeFair_ that break was the VM executes code and feeds data to the debugger/tracker which generates and tracks the objects -- like an execution cache and object database -- then the visualizers would hook up to that
20:45 MikeFair_ s/that break/the breakdown/
20:46 MikeFair_ each of these could run on a separate machine if need be
20:49 MikeFair_ lue: wow -- blender looks like it'd make a really good paradigm/tool for what i'd like to see here
20:50 MikeFair_ lue: I just looked at some screenshots in the Features/Gallery and I think I can see where you thinking with that. :)
20:53 Woodi joined #perl6
20:57 lue (I can run external programs in blender scripts. That's another very good sign)
20:57 MikeFair_ lue: Yeah something like the Raytrace Rendering  and Imaging and Compositing layouts -- or perhaps the animation layouts
20:57 pmurias joined #perl6
20:58 MikeFair_ lue: All very good signs... I wonder if there are any plugins that stream in data from an external source?
20:59 MikeFair_ lue: if so, and if the code data can then be made to quack like whatever that plugin is expecting, then the debugger can be rigged up through that
21:00 MikeFair_ I need to go get my family some foood
21:00 lue I was thinking of when starting the script in blender, being asked to specify the script you want to debug, and then the script taking care of everything.
21:00 MikeFair_ bbiab
21:00 lue goodbye MikeFair_ o/
21:00 erkan joined #perl6
21:03 tadzik good knight
21:09 raiph #perl6ers: Click time field toggles highlight for log line. Display highlighted log lines for everyone the way they currently are when one clicks on a time field. What's not to love?
21:10 raiph ^^ "time field" means the log lines to the left (when viewing this message via Moritz's irclogger)
21:10 masak tadzik: good knight, tadziku
21:10 raiph "logmarks"
21:11 tadzik ...but I'm not going anywhere :)
21:11 tadzik should, but too excited
21:11 pmurias masak: what would be the advantage of programming in a 3d space?
21:11 phenny pmurias: 15 Sep 22:39Z <quietfanatic> tell pmurias I'm pretty sure solving type conversions like char* -> Str is an AI-complete problem, or at least domain-specific.
21:11 phenny pmurias: 15 Sep 22:43Z <quietfanatic> tell pmurias So if the programmer wants to use a C library, I'd presume they have that library's documentation around
21:16 raiph phenny, tell moritz What about logmarks? Click time field toggles a logmark. Logmark'd lines are highlighted. Does everything we need for phase 1. Very simple. What's not to love?
21:16 phenny raiph: I'll pass that on when moritz is around.
21:17 masak pmurias: immersion. virtual 3D space is the natural endpoint of more and bigger screens. :)
21:27 tadzik good night #perl6
21:28 masak hey, you already said good night! :P
21:28 tadzik but that was at MikeFair_ :)
21:29 the joined #perl6
21:30 masak oh!
21:30 masak good night, dear tadzik.
21:40 MikeFair_ back :)
21:50 rurban jnthn: parrot 8874c43 should fix the loadlib os issue. It was a static pmc, hence a name clash in the msvc linker.
21:50 rurban master HEAD is fixed.
22:02 sorear good * #perl6
22:02 MikeFair_ sorear: see ya! :)
22:02 masak sorear! \o/
22:03 sorear MikeFair_: leaving?
22:07 Chillance joined #perl6
22:14 jnthn sleep &
22:14 masak 'night, #perl6
22:15 MikeFair_ sorear: OH! you were saying good morning
22:15 MikeFair_ jnthn: good night
22:15 MikeFair_ masak: see ya!
22:16 MikeFair_ sorear! \o/ <- Hi!
22:47 MikeFair_ ok I'm looking for ideas on how make my Grammar more readable. The specific challenge is that most of the time I want <.ws> to include horizontal (\h) and vertical (\v) whitespace -- so \s+ is perfect
22:48 MikeFair_ However sometimes, I want to exclude the vertical whitespace so I can explicitly match on the \v in that region
22:48 MikeFair_ Currently what I have developed is something like: rule someRule { some text[ <.rtn>
22:49 MikeFair_ ]next part of the rule }
22:49 MikeFair_ where <.rtn> is effectively \v
22:50 MikeFair_ err <.rtn> is effectively <.ws> | \v
22:52 MikeFair_ Ideally I'd like to do:
22:52 MikeFair_ rule someRule { some text
22:53 MikeFair_ [ <.rtn> something to match if there is a return || something to match if there wasn't a return]
22:54 MikeFair_ the problem I have is that any whitespace in the rule after 'some text' will suck up any return I'm trying to match in the first alternation
22:57 felher 'night, #perl6
22:57 MikeFair_ Hmmm... would [ {?after <.rtn>} something to match if there is a return do the right thing?
22:57 MikeFair_ felher: gnight
22:58 thou joined #perl6
23:34 fgomez joined #perl6
23:56 dayangkun joined #perl6
23:59 dayangkun joined #perl6

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

Perl 6 | Reference Documentation | Rakudo