»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
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
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:03
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:05
00:07 rsimoes left
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
00:07 rsimoes joined 00:08 benabik joined
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
TimToady keeps thinking there's probably an analytical way to solve it, but it would take more math than he currently has handy 00:09
00:10 spider-mario left
sorear TimToady: yes, it can be done analytically. I'm working out the details now 00:10
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.
TimToady I was trying to make it likeable :)
the compass metaphor helps a great deal
timotimo triangles, wedges, something about voronoi ;) 00:13
00:13 the joined
TimToady one needs 2-D soap bubbles, I suppose 00:13
except those move each other around 00:14
these bubbles have no "pressure"
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:14 the left 00:15 Guest86105 left
TimToady well, there are various options, but I can't really recommend one over another. 00:15
there are some Gtk examples/ in niecza
SDL has been used, as well as PPMish stuff 00:18
timotimo what do you mean by PPM?
TimToady ppm - portable pixmap file format
man ppm on linux, for example 00:19
timotimo oh, of course.
yeah, ppm is probably even easier than bmp already is
amusing, the magic cookie for ppm is apparently P6
sorear convinces emself that the answer is always the complex logarithm of an algebraic number 00:21
TimToady rosettacode.org/wiki/Sierpinski_tri...cal#Perl_6 uses SVG 00:22
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 rosettacode.org/wiki/Grayscale_image#Perl_6 uses PPM
timotimo (but only for euclidean images, taxi and minkowski 3 won't work that easily 00:24
for taxicab, something like a marching ray might be a good answer. 00:25
00:27 tokuhiro_ joined
sorear timotimo: even in unusual metrics, the voronoi diagram always lies on the union of the equal-distance planes 00:30
this leads to a natural polynomial (large constant) algorithm 00:31
first find all the equal-distance planes, then restrict each equal-distance plane by intersecting it with its halfspaces of applicability
equal distance surfaces in taxicab are not too bad, they're just composed of lines and 45° segments I think 00:33
00:33 PacoAir left
sorear minkowski 3 gets you... well I'm frankly pretty ignorant about algebraic geometry 00:33
but it's the locuse of points satisfying a certain cubic equatiohn
TimToady or an uncertain cubic equation, in my case :) 00:34
sorear spent a lot of time last week trying to understand wtf Goppa codes were 00:35
sorear failed
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
there's that word, "should", again...
The subjunctive is always so subjective...
00:39 benabik left, Alpha64 left
timotimo sorear: i'm implementing that now :) 00:40
how do i get a Real of value inf? or something similar? 00:43
sorear Inf 00:46
rpn: say Inf ~~ Real 00:47
p6eval pugs: OUTPUT«*** No such subroutine: "&Real"␤ at /tmp/trSRNJoiEN line 1, column 5 - line 2, column 1␤»
..rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«True␤»
timotimo ah, with a big i 00:48
TimToady rpn: say "foo" lt Inf
p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«False␤»
..pugs: OUTPUT«␤»
TimToady hmm
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
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:50
..niecza v21-8-ga216174: OUTPUT«Inf␤»
..pugs: OUTPUT«*** Illegal division by zero␤ at /tmp/ogER5BLD0F line 1, column 5 - line 2, column 1␤»
TimToady n: say -1/0
p6eval niecza v21-8-ga216174: OUTPUT«-Inf␤»
TimToady n: say -1/-0
p6eval niecza v21-8-ga216174: OUTPUT«-Inf␤»
00:50 benabik joined
timotimo interesting. 00:51
TimToady pnr: say Inf.defined
timotimo decommute &
p6eval pugs: OUTPUT«1␤»
..rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«True␤»
TimToady pnr: say NaN.defined
p6eval pugs: OUTPUT«1␤»
..rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«True␤»
timotimo one way is always to do:
r: my $b = 1; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
p6eval rakudo 4dd124: OUTPUT«===SORRY!===␤Variable $foo is not declared␤at /tmp/5JXQMdlbvs:1␤»
timotimo r: my $b = 1; my $foo; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
p6eval rakudo 4dd124: OUTPUT«99␤» 00:52
timotimo r: my $b = 1; my $foo; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
p6eval rakudo 4dd124: OUTPUT«99␤»
timotimo r: my $b = 0; my $foo; $foo = 99 / $b unless $b == 0; $foo //= Inf; say $foo
p6eval rakudo 4dd124: OUTPUT«Inf␤»
timotimo a bit wordier than i hoped.
sorear thinks signalling divide by zero is just wrong
TimToady define "signalling"
sorear r: sub infix:<s/>($a,$b) { $b ? $a / $b : Inf}; say 1 s/ 0
p6eval rakudo 4dd124: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!!␤at /tmp/ETbhox_e3_:1␤»
sorear r: sub infix:<s/>($a,$b) { $b ?? $a / $b !! Inf}; say 1 s/ 0 00:53
p6eval rakudo 4dd124: OUTPUT«Inf␤»
sorear TimToady: breaking control flow, as die(), or retuning an object which breaks control flow, like a Failure or signallingNaN
TimToady so now that you're ruled out all the possibilities... 00:54
you just want the rocket to do something random?>
sorear no, I want the operation to return Inf.
I could also live with a *quiet* NaN 00:55
TimToady okay, well, I think I agree, though I can argue with it
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:56
one would like an easier way to turn those into something undefined though 00:57
so that // works
sorear what I really don't like about Failure here is that it doesn't seem to propagate in math 00:58
1 + 1 / $x should not die if $x is zero
r: 1 + $*failuresource
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␤␤»
sorear r: say (1 + $*failuresource).defined
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␤␤»
benabik 1 / 0 != Inf :-/ 00:59
TimToady r: say (1 + ($*failuresource//NaN)).defined
p6eval rakudo 4dd124: OUTPUT«True␤»
TimToady r: sub postfix:<//0>($x) { $x // 0 }; say (1 + $*failuresource//0).defined 01:01
p6eval rakudo 4dd124: OUTPUT«True␤»
TimToady how's that for messing with precedence? :) 01:02
I do get tired of putting parens around // expressions, but this is perhaps not the solution... 01:03
01:05 raiph joined
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:06 tokuhiro_ left 01:10 [Coke] joined
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.
dalek d: 1f19235 | larry++ | STD.pm6:
fix syntax error in recommendation
01:16
[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 01:22 topo joined, MikeFair_ joined, whiteknight left 01:24 imarcusthis left
MikeFair_ Evening folks :) 01:25
sorear o/
01:26 jaldhar joined 01:27 imarcusthis joined 01:28 raiph left 01:37 exodist_ joined, exodist_ is now known as Exodist
dalek ecs: b3233b4 | larry++ | S (2 files):
limit unary hypers to declared shape or flat

Also add .duckmap and .deepmap to give the less huffmanly desirable semantics.
01:51
01:52 FROGGS_ joined 01:54 flightrecorder left 01:56 FROGGS left 01:57 flightrecorder joined
colomon rn: my %ks = KeySet.new; %ks{2}++; %ks{4}++; say %ks.perl 01:57
p6eval rakudo 4dd124: OUTPUT«("2" => 1, "4" => 1).hash␤»
..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…
colomon rn: my $ks = KeySet.new; $ks{2}++; $ks{4}++; say $ks.perl
TimToady um... := maybe?
p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«KeySet.new("2", "4")␤»
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
colomon btw, .duckmap ?! 01:59
TimToady the old specced behavior of hyper which I couldn't get anyone to implement
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
I mean, as the default for hyper
unary hyper, that is
sorear what should binary hyper do? 02:01
TimToady same as it currently does
though we might revisit that once we start playing with shaped arrays
02:02 the joined, the is now known as Guest41987
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:03 araujo left
TimToady it's probably only dwimmy hypers that should descend into reference thickets 02:05
02:05 OuLouFu joined
TimToady though that works against the current »op» semantics, I suppose 02:06
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
if we can't feed a strict hyper to a GPU, we've done something wrong 02:07
02:09 orafu left
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
but in crypts source code i see accesses to $.name without an !
TimToady thinks about doubled hypers for deep mapping: $foo»»++ and $bar »»+» 1 02:12
02:12 sftp_ joined
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
the .name form can be shadowed by derived classes, and the !name can't
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
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
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"?
TimToady not if each of the neighbors is a LineSegment
timotimo i'm getting "malformed has". probably have some error nearby then. 02:17
TimToady std or niecza will maybe give a better error 02:18
timotimo good point, thanks
niecza also just says "malformed has" 02:20
does the LineSegment have to be declared earlier in the code file?
TimToady yes
can be a stub though
timotimo oh, that would explain it then.
would like a better error message for that if that's at all possible. 02:21
TimToady nodnod
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 };
p6eval std 1f19235: OUTPUT«===SORRY!===␤Malformed has at /tmp/qC9vDeJjzC line 1:␤------> class Yoink { has ⏏Frob $.a }; class Frob { has Real $.blub␤ expecting any of:␤ scoped declarator␤ typename␤Parse failed␤FAILED 00:00 42m␤»
TimToady std: say Yoink.new;
p6eval std 1f19235: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Yoink' used at line 1␤Check failed␤FAILED 00:00 41m␤»
timotimo std: sub yoink { Frob.new }; class Frob { has Real $.blubb }; yoink();
p6eval std 1f19235: OUTPUT«===SORRY!===␤Illegally post-declared type:␤ 'Frob' used at line 1␤Check failed␤FAILED 00:00 43m␤»
timotimo that's much nicer 02:23
TimToady there's probably some way to get it to do that from the declaration parser too
timotimo i'm amazed at how slow rakudo is :| 02:28
TimToady hmm, it's supposed to have a better message there, but I think it's getting confused on whitespace 02:29
no, that's not it... 02:34
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:42
02:42 Guest41987 left
TimToady well, it could be 4 hours, since it's a run-time check 02:44
depends on what the code before it is doing 02:45
timotimo oh. ok.
02:45 ggoebel joined
timotimo if i'm making mistakes like that, maybe i should be sleeping instead of hacking :) 02:45
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...
dalek d: 63400a4 | larry++ | STD.pm6:
reenable the undeclared typename error, timotimo++
02:48
d: b842bb3 | larry++ | STD.pm6:
oops, remove debugging statement
02:49
02:55 kid51 left
timotimo std: if (1 == 1) { say "yup" } else if (1 == 2) { say "nope" } 03:04
p6eval std 1f19235: OUTPUT«===SORRY!===␤Please use 'elsif' at /tmp/9GeJXpUxc7 line 1:␤------> if (1 == 1) { say "yup" } else if ⏏(1 == 2) { say "nope" }␤Confused at /tmp/9GeJXpUxc7 line 1:␤------> if (1 == 1) { say "yup" } else if ⏏(1 == 2) {…
timotimo good. rakudo gives the rather nonhelpful "missing block" error.
03:07 raiph joined
raiph hi all 03:07
irclog.perlgeek.de/out.pl?channel=p...;summary=1 03:10
^^ Summary of #perl6 on 2012-09-03 using Moritz's new Summary feature of his irclogger. 03:11
TimToady \ö/ 03:14
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:15
timotimo 1.) sleep, 2.) linear algebra, 3.) ???, 4.) profit. it never fails. 03:16
step 3 may or may not be breakfast. 03:17
raiph Great start. Moritz++ Will gist some feedback about wrinkles tomorrow. Thanks Moritz! 03:19
phenny, tell Moritz irclog.perlgeek.de/perl6/2012-09-16#i_5992712
phenny raiph: I'll pass that on when Moritz is around.
03:20 ggoebel left 03:21 raiph left 03:25 ggoebel joined 03:41 ggoebel left
MikeFair_ waves helo 03:45
sorear hi! 03:46
03:46 thou left 03:48 ggoebel joined 03:51 wamba left
MikeFair_ sorear: You know, I never imagined this whole if/else/end if thing would be such the ordeal it has been. :) 04:00
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:02
04:03 the joined 04:04 the is now known as Guest82502
sorear MikeFair_: not that anyone's counting, but it's actually NQP3 04:04
MikeFair_ hhe
sorear there is a pre-rx nqp which you might find code in
MikeFair_ figures ;)
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
staring at the same error hoping it will change. :)
04:06 rurban left
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
MikeFair_ nods.
sorear A bug that you can't fix might as well be one of your own mistakes.
There is a very fine line between a workaround and a fix
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:08
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
04:09 yarp left
MikeFair_ like variables and function delcarations 04:09
sorear MikeFair_: don't hold your breath for fixes. #perl6 runs on working around bugs. 04:10
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
sorear: I'm thinking i'll look at both niezca and rakudo and possibly Parrot itself
sorear github.com/rakudo/rakudo/blob/nom/...s.pm#L4704 - nice example of creating a QAST op 'if' node
04:12 araujo joined, araujo left, araujo joined
MikeFair_ my $qast := QAST::Op.new( $<cond>.ast, $<then>.ast, :op('if'), :node($/) ); 04:12
-- I think this is the line that's failing
sorear niezca and rakduo and possibly parort
MikeFair_: I would guess that one or more of the arguments aren't what you thing. 04:13
MikeFair_: is the failing code on github?
MikeFair_ sorear: Yeah that's what I've been tracking all afternoon
04:13 pandap joined
MikeFair_ The simple case of -e 'if 1 then say 1' 04:14
pandap hi !perl6.
MikeFair_ each of the pieces have the .AST I expect them to
hello pandap
pandap hello! MikeFair~
MikeFair_ Is there a big difference between :op('if') and :op<if>?
MikeFair_ tried it. 04:15
err tries it
sorear MikeFair_: as far as I know they are identical.
pandap: Welcome!
pandap update rakudo and panda.and then I got thw error message
panda list
MikeFair_ yep same error
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
MikeFair_ Error while compiling block : Error while compiling op if: invoke() not implemented in class 'NQPMu'
sorear: not at all
pandap hi ! sorear~
maybe someone can help me? 04:17
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
I'm not a panda expert
MikeFair_ sorear: github.com/MikeFair/Safire
src/Safire/Actions.pm
method if_expr
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.
MikeFair_ sorear: If you'd like
pandap panda is bad.many problems! 04:21
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
sorear I have no idea what I'm doing here.
pandap and when we update rakudo,we must update panda again. 04:23
MikeFair_ Hmm, check build.sh that should be variablized
the directory at the top should be set to your parrot installdir
The PREFIX directory that is
sorear MikeFair_: I get a very different errror 04:24
MikeFair_ mine is /home/michael/local (as you might have guessed
sorear actione if_expr: if 1 then say 1
COND: 1; CONDAST: multi_dispatch_over_lexical_candidates was unable to find a candidate list
04:24 pmurias left
pandap we can't do :panda update.we must rm -rf ~/.perl6 everytime...... 04:24
MikeFair_ oh that's very interesting indeed
sorear: Do you keep your NQP updated? (Or more specifically what version are you running) 04:25
sorear I'm running whatever version rakudo installed 04:26
because I set PREFIX to $HOME/dl/rakudo/install :D
MikeFair_ :D 04:27
sorear looks like nqp version 2012.08-2-gc223607
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
pandap bye~panda 04:28
MikeFair_ But your error might actually be better I'm not sure :)
04:28 pandap left
sorear meh, I can't debug it 04:28
this is nqpese to me :D
04:29 yarp joined
MikeFair_ sorear: With Perl debugger you mean? 04:29
sorear: no worries I thnak you for looking at least
sorear: For those print statements I get: 04:30
COND: 1; CONDAST: QAST::IVal<1156036743>
THEN: say 1; THENAST: QAST::Op<1144481427>
04:31 daniel-s left
sorear MikeFair_: are you sure they are actually ast nodes and not single-element arrays? 04:31
...that was a stupid question, .ast would have barfed 04:32
MikeFair_ It's the AST property say $<cond>.ast
say $<then>.ast
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?
including the says and enough of the backtrace to reach your code
MikeFair_ gist.github.com/3731005 04:34
That's the whole thing
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:37
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.
sorear chases a lead
MikeFair_ Go sorear! go!
MikeFair_ cheers on sorear! 04:40
sorear: Well talking to you has given me some other ideas on how to proceed 04:42
So I did this:
68 #my $qast := QAST::Op.new( $<cond>.ast, $<then>.ast, :op<if>, :node($/) );
69
70 make $<then>.ast;
sorear I think it fails.
That's the lead I'm chasing
MikeFair_ and it executes the "say 1" as I would expect 04:43
sorear Maybe one of your subasts is broken
MikeFair_ Doing the same with $<cond>.ast doesn't fail, but it doesn't output anything either
of course $<cond>.ast is just an <EXPR> so I wouldn't expect it to 04:45
04:48 cognominal joined
MikeFair_ I just tried adding a real relational operator == and eq 05:01
'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?
MikeFair_ if 1 then 1
seems to be ok
if 1==1 then 1 is oktoo 05:03
sorear thinks there might be something wrong with <say> 05:04
MikeFair_ if 1 then ; 1; end if is ok as well
sorear what if you remove :name<say> from the say op?
MikeFair_ if 1 then ; 1; 2; 3; end if however is not
I get a syntax error -- so likely not the same problem 05:05
hmm let me try removing :name<say>
same problem 05:06
say 1 continues to work though
if 1==1 then say 1 breaks though
05:08 benabik left 05:10 rurban joined
sorear MikeFair_: what's the syntax error? what's the output with --target=pir? 05:11
MikeFair_: does 1;2;3 work (no if)?
MikeFair_ 1;2;3 does not work
Strange I would have expected that to match <EXPR>, <EXPR>, <EXPR> 05:12
Seems to only accept one <EXPR>
can't get --target=pir 05:13
can't get --target=post
can get --target=past and --target=parse
sorear ah, I thought you meant 1;2;3 caused a syntax error in generated code 05:14
which happens more often than you might think
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
actione statement: 1;
STMNT: ,, EXPR: , 1, OTHER: , 1;,
actionx statement:
actione statement_list: 1;
actionx statement_list:
Syntax error at line 2, near "2; 3;"
nope, it's seeing the 1; as the statement then bails on the next 05:16
-e 'if 1==1 then; 1; 2; 3;end if' produces:Syntax error at line 2, near "if 1==1 th" 05:17
moritz \o 05:18
phenny moritz: 03:19Z <raiph> tell moritz irclog.perlgeek.de/perl6/2012-09-16#i_5992712
MikeFair_ waves back. :)
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
moritz: "say 1" on its own is fine
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
sorear MikeFair_: I might know what's going on 05:24
MikeFair_: 'say' doesn't return anything at all
05:24 Chillance left
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
try making a statementlist node
where the first item is the say, and the second item returns a dummy value
see if that fixes it
05:26 yarp left, raiph joined
MikeFair_ I'm not quite following 05:26
sorear raiph: moritz is on now
MikeFair_ if 1 then; say 1; 2; end if 05:27
raiph sorear: hi and thanks.
sorear MikeFair_: exactly, but at the QAST level to avoid the syntax error.
MikeFair_ what if I just set say to return something?
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.
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) ) );
MikeFair_ sorear: likely (more like still grasping to comprehend ;) )
sorear MikeFair_: do that in statement_control:sym<say> instead of make $qast;
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
oh wiat 05:32
there's a $qast reference in there
sorear can you figure out what that referece does?
MikeFair_ So it makes a new lvalue node and appends that to my say node?
raiph (using irclog.perlgeek.de/perl6/today I mean)
sorear MikeFair_: you're misusing the word lvalue, but yes 05:33
MikeFair_: try it and tell me what happens, maybe?
MikeFair_ and with the 'make' out front makes the 'say' <statement> return a statement list of <say > with an lValue appended
hey hey hey!! 05:34
actione TOP: if 1==1 then; say 1; say 2; say 3; end if
actionx TOP:
1
2
3
raiph For example, I just added the last couple comments I made to the Summary you can now view at: irclog.perlgeek.de/out.pl?channel=p...;summary=1 (And I'm about to go add this one too.) 05:35
sorear MikeFair_: hey cool you fixed the synax error as well 05:36
MikeFair_ Well that syntax error was for just 1;2;3; that's still there 05:38
say 1; say 2; say 3; always worked :)
So :Stmnts.new is taking an array of nodes ... the :node is the parent/root and the rest are nodes in the list 05:40
05:41 ggoebel left
MikeFair_ So the "say" method is now making a StmntList "op<say>, op<lvalue>" everytime 'say' is successfully parsed... 05:41
05:42 cognominal left
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
"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
literals are not lvalues!
please stop calling the literal node an lvalue node. it's just plain wrong.
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:44
sorear No. 05:45
MikeFair_ sorear: I will, on my screen it looks like lValue and not IValue
sorear: but I see it in my code as the IVal that it is
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
MikeFair_ sorear: Like an array of return values?
05:46 ggoebel joined
sorear .push appends to the list of children 05:46
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
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
the statement_list then evaluates its children, and returns the value returned by the last one
MikeFair_ sorear: Well $<then>.ast contains either a <statement> or a <statement_list>
statement_list creates a Stmnts.new 05:48
sorear MikeFair_: doing the modification in "if" is wrong.
consider if 1 then 3
you do NOT want to rewrite this into if 1 then 3; 0
because that changes the result
the modification needs to be restricted to say 05:49
MikeFair_ ahh
sorear: and any other procedure type commands
like print
repeat
sorear MikeFair_: does safire allow the user to use statements and expressions semi-interchangably? 05:50
can the user do anything like this? :
n: say (say "hello")
p6eval niecza v21-8-ga216174: OUTPUT«hello␤True␤»
05:50 cognominal joined
MikeFair_ sorear: i'm pretty sure it does. there's a concept called "it" which is roughly equivalent to 4_ 05:51
err $_
sorear MikeFair_: Any command which executes in a context where the user could observe the result needs to return _something_
MikeFair_ Then there's also the "eval" command
sorear nr: say (if 0 { "foo" }) 05:52
p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«Nil␤»
sorear nr: say (if False { "foo" })
MikeFair_ eval(my_string_constructed_command)
p6eval rakudo 4dd124, niecza v21-8-ga216174: OUTPUT«Nil␤»
MikeFair_ say(if test then "yes" else "no") is definitely allowed 05:53
but say(if test then; 1;2;3; end if) is not
it's like there are two if's one is a command and the other is an EXPR 05:54
05:54 cognominal_ joined
sorear What about say(eval('if test then; 1; end if')) ? 05:54
MikeFair_ sure
I think in that case it will say the returnresult of eval 05:55
sorear question be what does it print?
MikeFair_ which I believe is (the string parsed/executed) or (the string choked)
boolen
(or numeric roughly representing boolean) 05:56
In general though I'm good with the principle that EVERYTHING returns something
05:57 cognominal left
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
where I set the :returns to 0
that seems to yield the same effect
MikeFair_ realizes he has not been testing what he thinks he's been testing... 06:04
06:04 sctt joined
MikeFair_ sorear: Ok phew! your change seems to make it stick 06:05
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.
MikeFair_ sorear: Well I'm just looking at the names of stuff on the nodes in --target=past
sorear MikeFair_: yeah, I'm not sure :returns is something you should be messing with 06:07
for all I know it could be perfectly safe, but I've a bad feeling
MikeFair_ sorear: no worries, it didn't work anyway
MikeFair_ was testing "make $<then>.ast" as his if_expr instead of making the if Op node 06:08
sorear ah, :returns is used for the rakudo optimizer type information 06:09
eg, literal 5 has :returns(Int) 06:10
and then the optimizer knows what the types will be at runtime
MikeFair_ makes sense 06:11
of no use then :)
(in this case)
sorear++ 06:17
06:31 ggoebel left 06:36 ggoebel joined 06:41 HarryS joined
MikeFair_ Woot!!! 06:42
MikeFair_ has added the "ELSE" portion of his if statement
06:45 wk_ joined 06:46 fgomez left 06:47 wk_ left 06:48 [Coke] left, erkan left, rhr left, Khisanth left, krunen left
Woodi morning 06:50
06:51 sctt left
FROGGS_ morning 06:55
sorear o/ o/ 06:57
07:00 zby_home_ joined 07:01 GlitchMr joined
sorear good morning poland 07:04
cognominal_ why not vietnam? 07:06
ha! m/.pl$/
Woodi becouse Vietnam do not listen so no point in greetings :) 07:07
GlitchMr Because both I and zby_home_ are from Poland?
sorear GlitchMr: also FROGGS_ and Woodi
zby_home_ good morning
Woodi invassion!
o/ :) 07:08
GlitchMr That makes sense
But FROGGS_ and Woodi haven't just joined
Woodi likes to backlog in irssi...
GlitchMr But I guess they just were away :-) 07:09
I should make Perl 6 highlight for Pygmentize 07:10
s/Pygmentize/Pygments/
07:11 [Coke] joined, erkan joined, rhr joined, phenny joined, wk_ joined, Khisanth joined, krunen joined, DarthGandalf joined
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
GlitchMr: 01:18Z <[Coke]> tell GlitchMr I added you to sixplanet
GlitchMr Thanks
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...
dalek ecza: 0e6be46 | sorear++ | lib/ (4 files):
Make constant tables aware of the setting they are scoped to
GlitchMr [Coke]: I have ugly dot at Planet Six 07:13
Also, would it possible to use my realname instead - Konrad Borowski
07:13 warlock joined
warlock hfdhgfhfghfgh 07:13
Woodi it is kind like PS-based display in NeXt and like keeping trace of SQL tables in memory :)
GlitchMr Also, I think I should replace <h3> with <h4> for XML 07:14
07:14 warlock left
Woodi would be fine to have such layer in Perl and just cast to different displays... 07:14
GlitchMr RSS*
Perhaps <h1> and <h2> on RSS would be more logical 07:15
But that probably would be ugly
on PlanetSix
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
(in title, that is)
07:18 wamba joined
dalek href="https://glitchmr.github.com:">glitchmr.github.com: 436253a | GlitchMr++ | index.xml:
Replace <code></code> with `` in titles for XML.
07:19
07:20 yarp joined
dalek href="https://glitchmr.github.com:">glitchmr.github.com: 7a108e5 | GlitchMr++ | _posts/2012-09-15-how-i-learned-to-stop-worrying-and-install-the-panda.md:
Make "Congratulations" paragraph better.
07:21
MikeFair_ Woodi: This is a general DataSet abstraction concept -- extremely useful stuff 07:27
Woodi: MS .NET has a great API in their ADO.NET stuff 07:28
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 :)
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
MikeFair_ Woodi: You write each graphics interface to generically display a SQL Lite instance
Woodi MikeFair_: but I talking not only about grids... 07:31
rather UI - menus, lists, etc
MikeFair_ Woodi: Those are grids too, table = Menu, rows = items
Woodi: The internals of the ADO.Net allows you to build relationships among the data 07:32
Woodi: You can do the same thing with XML
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?␤»
GlitchMr Thanks
MikeFair_ Woodi: I think the trick/key is to create a common data model that these various graphics libraries can understand
Woodi: QT has one, GTK has one too 07:34
Woodi yes, maybe some UI widgets should be dropped
but basic list is very short: windows, buttons, labels, menu, status, popup, grids, lists 07:35
and shitches like radio or the other 07:36
sounds like html :>
MikeFair_ Woodi: Hmm, try GLADE for GTK and UiTools for QT
Woodi no, such thing must be universal 07:37
I do not realy know is it data structure or API...
something, something :) 07:38
sorear abstraction for widgets has been done a million times and nobody has ever liked it.
probably the least bad one is wx 07:39
Woodi should be possible to create good one :)
MikeFair_ Woodi: Not universally 07:41
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:42
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
MikeFair_ Woodi: People are doing a lot with javascript on HTML pages these days
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
Woodi I just want to not include low lvl drawings code and left it for Qt/GTK 07:46
MikeFair_: yes, I mean MFC probably
it is C-ish mixed with 90s objects
07:47 wk_ left
Woodi and doing UI in HTML is patented :) but in CSS not :) 07:47
MikeFair_ Woodi: hehe
It's interesting that somone is actually wrking on a Mono NCurses interface: mono-project.com/MonoCurses 07:48
Woodi substracting HTTP from HTML would be fine
sorear the mono-project wiki is poorly maintained
if it said something is being worked on, it means that it was either finished or abandoned five years ago
MikeFair_ sorear: hehe 07:49
Woodi: FWIW I've abandoned the thought of having a terminal window and GUI cross platform API 07:50
07:50 brrt joined
MikeFair_ Woodi: I would go for like a terminal window API subset 07:50
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:52
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:53
Woodi: You're really thinking of the MVC paradigm from what I can understand here 07:55
07:59 colomon_ joined, colomon left, colomon_ is now known as colomon
MikeFair_ sighs in satisfaction. 08:01
sorear++ moritz++ jnthn++ TimToady++ rurban++ tadzik++ masak++ 08:04
I finally got all my existing test case to run without errors
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
sorear: Plus a bunch of folks from #parrot too
if and say now work 08:06
08:07 leont joined, wamba left
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:08
Woodi MikeFair_: your code is public somewhere ? 08:09
sorear so your language is almost as functional as yapsi. :D
MikeFair_ Woodi: Yeah but I seriously doubt you'd want to see it, but sure: 08:10
github.com/MikeFair/Safire
dalek ecza: e5c7060 | sorear++ | / (4 files):
Avoid "Top" use in junctional autothread
MikeFair_ ok just pushed the latest changes 08:13
sorear: _almost_ :) 08:14
sorear: And say "almost works" - it currently only takes one paramater not a list yet :)
Woodi MikeFair_: xTalk have 'on' in it ? 08:15
MikeFair_ Woodi: Yeah - it's a lot like SmallTalk in many ways 08:17
Woodi: "on mouseUp" "on start" 08:18
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)
Woodi: It's message handlers
Woodi: So in one area of the code you can say 'send mouseClick to button "Ok"' 08:20
08:20 Psyche^ joined
MikeFair_ Woodi: Then your button "Ok" would have a script associated to it 08:20
Woodi: that script would have an "on mouseClick" handler
Woodi: You ever played with Visual Basic?
Woodi let say no :) 08:21
<a onMouseClick=... i know
MikeFair_ Woodi: yeahso it's like that
Woodi: check www.runrev.com/
Woodi so internal loop handles messages ? 08:22
looking
MikeFair_ Look at "LiveCode" I think
Hmm no good examples 08:23
tadzik hello #perl6
FROGGS_ hi tadzik
08:24 Patterner left, Psyche^ is now known as Patterner
MikeFair_ en.wikipedia.org/wiki/LiveCode 08:24
tadzik: hey there! :)
Woodi: The Wikipedia article seems to give you a good enough flavor for what it does
Woodi: The big difference between an xTalk and an HTML event handler is the message path 08:25
Woodi: So if you click on an image in a webpage and there is no click handler, nothing happens
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
include any external DLLs that you've written.
08:27 ggoebel left 08:28 wamba joined
Woodi it is like in Chain of Responsibility pattern or in exceptions... 08:30
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
Woodi: Very much so
08:33 ggoebel joined
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:33
Woodi: It's also probably a lot like TCL or some other languages where there two modes "design mode" and "execute mode" 08:35
sorear MikeFair_: that actually works in html too 08:36
Woodi I am interested in the "system" part - how it works...
MikeFair_ Woodi: When you program xTalk you do it in an xTalk executing environemnt
Woodi: You mean the DLLs/ externals piece?
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
Woodi no, architecture rather
MikeFair_ sorear: oh there you go -- I didn't know about that
sorear: is that an HTML5 thing?
sorear I don't think so.
MikeFair_ sorear: interesting, but yeah, adobe air/flash, director, and HTML to a large extent share some of the concepts 08:38
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
MikeFair_ Woodi: The system will continue to animate things you've asked it animate while your events are firing
sorear I scored myself a javascript/html5 job while having zero knowledge of the platform
Woodi so objects-threads are realy a live :) 08:40
dalek ecza: 09989b4 | sorear++ | lib/Builtins.cs:
Avoid "Top" in most lowercase builtins
sorear sleep&
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 :)
MikeFair_ sorear: I agree with Woodi :) 08:42
Woodi 'green threads' work on scheduler - only one thread realy needed
MikeFair_ Woodi: exactly, I've always suspected that the xTalk engines are doing the same thing, all the objects are "tasks"
Woodi: or green threads, unless they are a multimedia object 08:43
Woodi: then they'll likely get a real thread
Woodi: sound/movie that kind of thing
Woodi it's FUTURE thing ! :) 08:44
08:44 sergot joined
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
Woodi: I think it is, I think it's what Visual Basic always wanted to be
Woodi thread are still hard for us :)
08:46 sqirrel joined
MikeFair_ Woodi: Their model is all objects and message passing 08:46
Woodi: like erlang 08:47
Woodi: but they don't have a native concept of passing messages "between applications"
Woodi would be nice to have one such vm for Perl..
MikeFair_ grins.
I think so too. :)
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
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:49
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
Woodi yes, and without recompilation
MikeFair_ Woodi: I've got a working premises that says everything is a Namespace traversal
08:50 brrt left 08:51 ironcamel left
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
Woodi hmm, can you give example ? 08:52
MikeFair_ Woodi: So let's your app needs to connect to a database
Woodi: Or to a file for example
Woodi: usually you'll ask for the path to the file
You'll be handed a string"/some/path/to/file" or "file://server/some/path/to/file" 08:53
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
08:54 bbkr joined
bbkr good morning p6 08:54
Woodi hallo bbkr :)
MikeFair_ So to your application, that file is actually at /external/file/server/some/path/to/file
08:55 leont left
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
MikeFair_ bbkr: a JSON string ;)
bbkr: Sorry I couldn't resist
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?
moritz bbkr: currently you can't really
MikeFair_ bbkr: Perl6 has a Grammar for that :)
moritz typed containers aren't implemented to a degree where they are useful for that purpose
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 })
MikeFair_ moritz: Could he use some kind of map
bbkr exactly, I'll stick with that, thanks
MikeFair_ moritz: yeah like that! ;)
moritz: Is that comparing the scalar context of $_ for the word Hash? 08:59
moritz: Or is it 'smarter' than that
Woodi ~~ probably check type 09:00
MikeFair_ ~~ is the Perl6 replacement for =~ 09:01
So it's a regex comparison
Woodi but it do more things probably then regexes 09:02
MikeFair_ could do
Woodi is not sure about that
MikeFair_ that's why I asked ;)
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.
Woodi: There's a big universal DOM tree that spreads across every application on every machine usinge every protocol on the whole planet 09:04
09:04 ggoebel left
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:05
Woodi: /parent/ would get your code access to the node that encapsulates your application 09:06
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 :)
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 :)
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
09:09 ggoebel joined
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 :)
MikeFair_ Woodi: our 'personal experience' of the universe is one of the things that inspired me to think of it ;) 09:11
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
Woodi: A new "higher level" is actually a new "lower level" as far as my traversal of the hierarchy goes
Woodi: I can always discover new things in my "subtree" but discovering the name of the thing above "/" is really difficult 09:13
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
Woodi: Yes, it's like an IMAP mail folder if you ever use those
Woodi: "Public" or "Shared Folders" is a sub-folder of the root of your personal folders 09:15
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 ? :)
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
err
MikeFair_ Woodi: Oh I missed '<Public Directory><Persons> ....</Persons></Public Directory>
Woodi even company as root need to share namespace 09:20
MikeFair_ Woodi: yeah, the links and references are all there in the technology
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:21
Woodi: Think of it like a distributed node where pieces of it exist all over the place 09:22
Woodi: Some applications/systems will share/synchronize on some of the data
Woodi: I always thinkabout as if the systems are communicating over XMPP to each other 09:23
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
Woodi: The JIDs are authenticated (to whatever degree the server that let them on authenticated them)
09:25 MayDaniel joined
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
bad things can be done to them if they do)
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
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
Woodi: Or if the application really requires it, it can get a dedicated binary data channel ala SIP 09:30
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:31
ok - time for sleep for me :) 09:33
gnight all! :)
09:36 wk_ joined 09:43 MayDaniel left 09:44 ggoebel left
moritz I'm considering writing a web service that keeps me informed of certain types of events 09:46
for example album releases of certain musicians 09:47
tadzik OH YES
I was thinking about it lots of times already :)
moritz or tour dates near me
but I think that could be more general
and we could include perl conferences, books by certain authors etc.
tadzik what is your idea for gathering this data?
Ulti do you mean Twitter
moritz Ulti: twitter in machine-readable 09:48
Ulti do you mean RSS
tadzik the thing about twitter is that it's offtopic by design
Ulti ;P
tadzik RSS doesn't solve the problem either
moritz tadzik: a mixture of croud sourcing, web scraping etc.
but I do want to provide RSS feeds for searches
so that I don't have to collect email addresses 09:49
tadzik heh
this sounds like a mirror of my thoughts about this :)
moritz (and I've registered the domain soonish.net for it :-)
tadzik or looks like a mirror. Or sounds like an echo. *.
moritz tadzik: don't be so creepy. That's masak's job :-)
09:50 ggoebel joined
moritz anyway, to come back to the topic here 09:50
Ulti I can load out the fully.pro for it ;P
tadzik why creepy? :P
Ulti *loan
moritz I want to model those events/facts, both in Perl 6 and in a database
and currenty I'm a bit at a loss here on how to best do that 09:51
Ulti also this was quick: rosettacode.org/wiki/Total_Circles_Area#Perl_6
moritz any ideas?
maybe I should start to collect events/facts that I want to record, and see what kind of data they each have 09:52
tadzik: what were your ideas of data sources?
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
tadzik moritz: scraping band websites, mostly. I was only thinking about album releases
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
moritz: yes, exactly
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:54
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
tadzik or last.fm
moritz do they have an API?
09:55 marmay joined
tadzik no idea 09:55
GlitchMr std: #`[[ test [ a [[ b ]] c ] [ ]]
p6eval std b842bb3: OUTPUT«ok 00:00 40m␤»
GlitchMr std: #`[[ test [ a [[ b ]] c ] [ ]] say 'ok'
p6eval std b842bb3: OUTPUT«ok 00:00 42m␤»
GlitchMr :-)
tadzik but ISTR that they announce shows as well
moritz www.lastfm.de/api 09:56
so maybe we should start with albums and concerts
tadzik there we go
yeah
GlitchMr dl.dropbox.com/u/63913412/pygmentsprogress.png
moritz and later expand to books, conferences and what not
GlitchMr I've comment detection
tadzik curious, how many bands are actually there
GlitchMr This is good start for syntax highlighting
tadzik www.last.fm/music/Wintersun/+events knows about the show in Kraków, but doesn't seem to know about upcoming release 09:57
moritz musicbrainz.org/doc/XML_Web_Service # also interesting 09:58
09:58 zby_home_ left
tadzik indeed 09:59
GlitchMr: hm, curious
GlitchMr I'm trying to make syntax highlighting for Pygments 10:00
Pygments is used by GitHub
tadzik oh nice
GlitchMr (as for underlined "no" it's because I currently don't have other rules than that
)
It currently looks like gist.github.com/3731848 10:01
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:05
tadzik may be difficult to even make python talk to STD.pm6 10:07
masak o/, #perl6
tadzik hey masak
masak my presence is spotty at the moment. I'm a bit more distracted by $work than usual. 10:08
but I'm also thinking about macros, after a quite fruitful discussion about D2 with jnthn++ on Friday. 10:09
10:11 OuLouFu left
arnsholt Having you two working at the same company is such a win, BTW 10:11
tadzik yeah
masak join us!
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.
the challenge with macro arguments is very similar to a thing that happens with roles being applied in partially parsed scopes. 10:13
10:18 cart joined
masak cart: welcome. 10:18
cart hi 10:19
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:21
eg. what's going on with macros in one-two sentences, and other infos from here to outside 10:23
becouse content is what is a problem...
content and time
10:24 MayDaniel joined, xdbr joined, cognominal_ left 10:25 spider-mario joined
moritz Woodi: sounds good. Write the bot and I'll feed it occasionally 10:26
Woodi :)
GlitchMr ok, now my script reports error on #`aa but doesn't on #aa 10:27
s/script/lexer/
Woodi will try a try to :)
10:29 orafu joined 10:31 cognominal_ joined 10:40 JJ_Brain joined
JJ_Brain Hi. when will Perl6 be officially released? 10:41
moritz JJ_Brain: there are two official releases each month
of two different compilers
JJ_Brain ok. Rakudo and the other one. So Perl 6 moritz is now there. 10:42
Moritz, is there Tk there? I can't install Tk on Perl 5
moritz JJ_Brain: no 10:43
masak here is Perl 6:
rn: say "OH HAI"
p6eval rakudo 4dd124, niecza v21-11-g09989b4: OUTPUT«OH HAI␤»
masak that's our channel bot running actual Perl 6. it can do more things than output "OH HAI" :)
moritz rn: say [*] 1..10
p6eval rakudo 4dd124, niecza v21-11-g09989b4: OUTPUT«3628800␤»
masak for exactly what things, see perl6.org/compilers/features
JJ_Brain ok. will check it out. I'm still learning perl5.
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
GlitchMr JJ_Brain: You can use Perl 6 today
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.
JJ_Brain: this YAPC::Europe I felt some distinct feature envy from high-up Perl 5 people ;)
JJ_Brain thanks masak. Does it have a CPAN too?
masak no.
GlitchMr Until both Perl 6 implementations will interpret Perl 5, this won't happen.
masak we have a simple module installer.
JJ_Brain will check the website
moritz there's modules.perl6.org/ and a module installer called panda 10:46
masak hm, does Panda run on Niecza yet?
colomon no
GlitchMr Panda assumes it runs on Parrot everywhere
It even compiles to PIR
JJ_Brain what would you prefer masak Rakudo or Niecza?
moritz tadzik: github.com/moritz/soonish # start of a collection of ideas
tadzik: want commit access? :-) 10:47
colomon I think my hacked Panda probably still works, but tadzik++ keeps on making Niecza incompatible changes.
GlitchMr I find it interesting how I see somebody++ has broken something
masak well, we're grateful tadzik++ is maintaining panda :) 10:48
GlitchMr :-)
moritz and developing it further, not just maintaining
masak and clearly it's not his intent to introduce Niecza-breaking changes.
or at least not his main priority ;)
GlitchMr irclog.perlgeek.de/perl6/2012-09-15#i_5990920 ;-) 10:49
JJ_Brain thanks everybody
10:50 JJ_Brain left 10:51 JJ_Brain joined 10:52 JJ_Brain left
dalek q: 60f370e | moritz++ | answers.md:
Does Perl 6 have something like CPAN?
10:52
masak moritz++ 10:54
10:54 MayDaniel left
masak & 10:54
11:05 Su-Shee joined, leont joined 11:08 Su-Shee_ left 11:12 JimmyZ joined 11:14 cognominal_ left 11:15 MayDaniel joined 11:20 cognominal_ joined
moritz Q: What's yellow, and equivalent to the Axiom of Choice? 11:24
A: Zorn's Lemon.
moritz loves fortune(1)
11:27 cognominal_ left
yarp u] 11:27
ly[=-0h65u aasq214n kil 11:28
moritz ronja could have typed that :-) 11:29
11:29 cognominal joined 11:32 crab2313_ joined 11:33 ggoebel left, yarp left 11:34 yarp joined
jnthn afternoon o/ 11:34
crab2313_ \o 11:36
11:38 ggoebel joined 11:44 cognominal left 11:53 cognominal joined
felher Hey folks :) 11:53
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:55
colomon felher: prove 11:56
leont would assume perl5's TAP::Harnes/prove would be the easiest way to go for that
jnthn prove --exec=perl6 t/* # or something like that, is what I use 11:57
leont Hmmmm 11:58
felher Thanks folks :) I'll look into prove, then :)
leont It could be improved to recognize the files being Perl 6, and automatically handle that
leont never liked the *.t must be perl 5 assumption it makes, has been bitten by that before 11:59
12:00 crab2313_ left
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 :)
FROGGS_ hi jnthn 12:01
can you tell me the difference?
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 )
jnthn o/ FROGGS_
p6eval rakudo 4dd124: OUTPUT«42␤»
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 )
p6eval rakudo 4dd124: OUTPUT«Warning in method postcircumfix:<( )> at /tmp/BhcFFTF3zQ:1␤␤0␤»
FROGGS_ I added a default value to the sub definition
what do I have to do to get the first piece working? 12:02
jnthn FROGGS_: Hmmmm... 12:06
FROGGS_ it's a bit weird 12:07
jnthn Add "use soft;" at the top of the file where you're doing this.
If that helps, I have a good idea what it is 12:08
FROGGS_ jnthn: it's working, and I get "get_boxed_ref could not unbox for the given representation" too 12:10
"use soft" ehh?
perl6 guts
jnthn It is in the spec... :) 12:11
Anyway, what's happening is that the optimizing does inlining.
And it inlined the routine that'd gotten wrapped at compile time
Which it shouldn't do
I think I see why, so I'll fix that so this case won't need "use soft".
But use it for now. :) 12:12
FROGGS_ great, thanks 12:13
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:15
FROGGS_ np 12:16
GlitchMr Also, I have: 12:18
alias perl6='prove -e perl6 -r t/'
I meant...
alias prove6='prove -e perl6 -r t/'
12:22 whiteknight joined
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␤»
GlitchMr perl6: zip 12:33
p6eval niecza v21-11-g09989b4: OUTPUT«===SORRY!===␤␤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…
..rakudo 4dd124: ( no output )
12:34 cognominal left 12:35 crab2313 joined 12:42 cognominal joined
cognominal src/core/Mu.pm:162: ?? "use of uninitialized variable { $.VAR.name }" 12:44
sounds very suspicious
should not that bi v.VAR.name?
how come that compiles? 12:45
jnthn $.VAR.name is same as $(self.VAR.name)
cognominal ho 12:46
anyway I don't think that's was intended here
12:50 lue left
JimmyZ cognominal: it may be a bug 12:51
FROGGS_ Circlepuller: there? 12:53
JimmyZ yes, it's a bug 12:54
moritz no, it was a bug :-)
dalek kudo/nom: 32309a4 | moritz++ | src/core/Mu.pm:
fix thinko noticed by cognominal++
FROGGS_ or @all: is there a way to get the code of a sub as a string? 12:56
moritz no 12:57
FROGGS_ meh
FROGGS_ is sad 12:58
moritz might not be too hard to patch in though
12:58 kid51 joined
FROGGS_ can you give me a hint where to look? 12:59
moritz FROGGS_: first of all you need to add an attribute to Routine 13:00
(or maybe block) 13:01
that's set up in src/Perl6/Metamodel/BOOTSTRAP.pm
FROGGS_ k
moritz FROGGS_: and then in src/Perl6/Actions.pm method routine_def set the new attribute to ~$/ 13:02
with a bit of luck, that's already enough 13:03
commit e1bd5c983710b3aa2e6f6c52e19b3a523a79b439 might be a nice inspiration, it also adds an attribute to Routine 13:04
FROGGS_ thanks! 13:05
jnthn Hmm...do we really want to do this? 13:06
It means that the source will be serialized.
Increasing the size of all pre-compiled modules.
CORE.setting included.
Is there some spec that says we should do this? 13:07
FROGGS_ it will not be serialized when called for example &sub.Code ?
no, no spec
jnthn If you put something into Routine then whenever a mdoule is pre-compiled it will have to serialzie whatever is in there.
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 :)
JimmyZ Does perl5 have this feature?
13:08 cognominal left
jnthn Why do you need the source of the sub, ooc? 13:09
FROGGS_ jnthn: gist.github.com/3732397 13:10
13:11 cognominal joined
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
jnthn: also it's good for .perl 13:12
jnthn moritz: It did. The onlystar flag will be serialized.
moritz: But there's a difference between including an extra integer and including kilobytes of source code.
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
jnthn Ah, hmm.
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)
jnthn I guess one way is instead of just having the string, write it as c '...';
oh, wait...
That won't quite work either.
Since we never call it
moritz FROGGS_: you can just call that sub
jnthn Hmmm. :)
moritz: arguments... :) 13:14
moritz FROGGS_: and then it returns the string inside
FROGGS_ moritz: how?
moritz aplusb(0, 0)
FROGGS_ sub thingy( SomeWeirdTYpe $a, $b? )
how to call that?
jnthn I think FROGGS_ needs a general solution.
FROGGS_ right
for an Inline::C module
jnthn Preferably one that doesn't need invocation.
moritz well, C doesn't have such a sophisticated type system 13:15
it should be possible to find arguments that make a call possible
I mean, always
13:15 marmay left
FROGGS_ you have pointers to things like structs (Rect*), this would be a Rect class/type in perl 13:16
13:16 marmay joined
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
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
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
is there a way to pass an array as positionals?
moritz yes
yoursub(|@args)
FROGGS_ no, I meant pass, not receive 13:19
moritz yes, pass
FROGGS_ ohh
thats the function call?
moritz r: sub f($a, $b) { say "$a|$b" }; my @args = 1, 2; f |@args
p6eval rakudo 32309a: OUTPUT«1|2␤»
FROGGS_ cool 13:20
that will do I guess
13:21 keith__ joined
dalek c: df62c32 | moritz++ | lib/classtut.pod:
add classtut. Mostly copied from the "Using Perl 6" book
13:21
13:24 PacoAir joined, rsimoes left 13:26 crab2313 left 13:30 ggoebel left 13:32 kid51 left, kaare__ joined 13:35 ggoebel joined 13:36 Su-Shee left 13:44 keith__ left 13:45 benabik joined 13:54 Su-Shee joined
GlitchMr std: .3e4 13:55
p6eval std b842bb3: OUTPUT«ok 00:00 41m␤»
GlitchMr This is ok?
std: .3
p6eval std b842bb3: OUTPUT«ok 00:00 41m␤»
GlitchMr oh, ok
13:56 nebuchadnezzar joined 13:57 cognominal left
masak today's mini-challenge: provide a convinging answer to math-frolic.blogspot.co.uk/2012/08/...ching.html by writing a program to verify the answer. preferably in Perl 6. 13:57
GlitchMr: it's 3. that's not ok. 13:59
14:01 cognominal joined
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:03
14:04 ggoebel left
moritz nr: sub infix:<.>($a, $b) { $a * $b }; say 4 . 5 14:05
p6eval rakudo 32309a, niecza v21-11-g09989b4: OUTPUT«20␤»
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 }
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
yarp yes. I have tried, and worked. 14:06
14:06 cognominal left
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
except comma, where a spce before looks odd for literary reasons.
space* 14:09
yarp So, I prefer use '.'.
masak please do.
14:11 ggoebel joined, wamba left
yarp nr: sub infix<*>($a, $b) {$a + $b}; say 4 * 5 14:13
p6eval rakudo 32309a: OUTPUT«===SORRY!===␤Missing block␤at /tmp/w1V1j882HM:1␤»
..niecza v21-11-g09989b4: OUTPUT«===SORRY!===␤␤Malformed block at /tmp/dvR5G_HWCi line 1:␤------> sub infix⏏<*>($a, $b) {$a + $b}; say 4 * 5␤␤Parse failed␤␤»
moritz nr: sub infix:<*>($a, $b) {$a + $b}; say 4 * 5 14:14
p6eval rakudo 32309a, niecza v21-11-g09989b4: OUTPUT«9␤»
yarp nr: sub infix:<*>($a, $b) {$a + $b}; say 4 * 5
p6eval rakudo 32309a, niecza v21-11-g09989b4: OUTPUT«9␤»
yarp yee
masak don't mess with the rules of basic algebra!!!11
multiplication is essential for a lot of things. if it were to be replaced by addition, the whole economy would come tumbling down. 14:15
yarp Just test the possibility. 14:16
mhasch You could replace multiplication by an integer by repeated additions.
moritz masak: that's why modifications are only lexically scoped :-)
14:16 cognominal joined
masak moritz: was just thinking the same :) 14:16
boy, was that a right decision!
dalek p: 872ecdb | jnthn++ | src/NQP/ (2 files):
Add an export trait for packages and get it to do the required installation.
14:17
p: 3fac7df | jnthn++ | src/stage0/ (9 files):
Update bootstrap so we can use export updates in the NQP source itself.
p: 2ea2f89 | jnthn++ | src/QRegex/Cursor.nqp:
Clear up EXPORT hackery in favor of the new 'is export' trait.
mhasch Funny #perl6 should be amidst a discussion about arithmetic when I was going to ask a question related to raithmetic...
arithme ... whatever, hard to spell :-) 14:18
snarkyboojum the three Rs :)
moritz rrright
mhasch My question is this: How would you call a role for operands that have operations + - * / like numerical values? 14:20
masak snarkyboojum! \o/
mhasch: Numeric?
snarkyboojum masak: masak-san!
masak mhasch: Number-like?
mhasch The role I am talking about is more general than numeric. 14:21
snarkyboojum imaginary? :D
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:22 colomon left 14:23 colomon joined
mhasch Modular integers, square matrices, p-adics, polynomials, .... all could consume that role. 14:23
snarkyboojum mhasch: arithmetical?
:O
TimToady wraithmetical 14:24
mhasch Too spooky, TimToady!
moritz weirdomathstuff
TimToady Numoids 14:25
snarkyboojum Cantors
moritz (weirdomathstuff from who has heard about 6 math lectures at University)
mhasch Hmmm. Preferably it should be a name suitable for programmers. Snarkyboojums arithmetical sounds not so bad to me. 14:28
moritz mathy 14:29
snarkyboojum mhasch: I have it - binumery :D
14:30 spider-mario left
masak mhasch: Arithmable. 14:31
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:34
arith* sounds good to me, num* (other than numeric) too. 14:35
14:38 ggoebel left, wamba joined
mhasch *able should begin with a verb, I think. 14:39
14:40 leont left, sisar joined
skids Modular integer support would be nice. especially uint32 :-) 14:40
moritz still has no idea what mhasch's new library does, or is supposed to do 14:41
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
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
14:43 not_gerd joined
not_gerd hello, #perl6 14:44
masak not_gerd! \o/ 14:45
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)
p6eval rakudo 32309a: OUTPUT«===SORRY!===␤Cannot create rw-accessors for natively typed attribute '$!i'␤»
not_gerd ^ should that be possible per spec?
jnthn yes, I've just no idea how to make it happen yet 14:47
not_gerd mhasch: Algebraic
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.
jnthn It's on the list of "tricky problems to think about" :)
dalek p: 1d3486a | jnthn++ | src/NQP/Actions.pm:
Implement is export on routines.
14:48
p: bf091cc | jnthn++ | src/NQP/ (2 files):
Implement import of exported symbols upon use.
moritz mhasch: so, what does your library do? 14:50
skids mhasch: yes maybe a more precise definition might help us offer suggestions. 14:51
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
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.
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:54
moritz so make M::P a parametric role, using the coefficient domain as a parameter? 14:55
14:56 cognominal left 15:01 Hugh joined
dalek kudo/nom: 78efb65 | jnthn++ | / (2 files):
Get latest NQP with better export handling, enabling elimination of a hack.
15:02
15:02 mucker joined
GlitchMr gist.github.com/3732760 15:02
Uhmmm... what could happened there?
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.
masak GlitchMr: looks like something went wrong in precompiltion, but not wrong enough for Niecza to run correctly next time.
GlitchMr std: q:w:x/echo 42/ 15:04
p6eval std b842bb3: OUTPUT«ok 00:00 41m␤»
GlitchMr What words like this should do? 15:05
Niecza seems to only interpret last element (in this case :x), Rakudo doesn't even support that
skids mhash: I guess the question then is what the most accesibly descriptive "Blah" is for "class MyKindOfMathThingy does Math::Blah[ MyKindOfMathThingyCoefficentDomain ]" ?
masak GlitchMr: example?
not_gerd are Rakudo's Int always big integers or do they auto-promote? 15:06
GlitchMr niecza> q:w:x/echo 23/
23
niecza> q:x:w/echo 23/
mhasch well put, skids.
GlitchMr echo 23
:x is execute and :w is split on words
hugme hugs GlitchMr, good vi(m) user!
GlitchMr uhmmm... is it random?
masak GlitchMr: I see no bug there, I think.
jnthn not_gerd: always 15:07
masak GlitchMr: hugme hugged you because you started a line with ':x'. false positive :)
15:07 Hugh left, cognominal joined
moritz masakbot false positive 15:09
huf_ well, excess hugs is rarely a real problem
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?
er
non-simple protos
as in, the non-onlystar case
mhasch huf_: in this channel, you mean? In RL it might.
moritz jnthn: I've added a few 15:11
jnthn moritz: ah
that's why the ticket was closed :)
I musta missed their addition
oh!
moritz S06-multi/proto.t, commit eecc10
jnthn I see 'em
15:11 yarp left
jnthn yeah...dunno how I managed to miss that commit :) 15:11
moritz not very sophisticated
(the tests, I mean) 15:12
jnthn ah, they look reasonable 15:14
moritz there's one case though that I haven't covered yet, and really should have 15:15
15:17 JimmyZ left
dalek ast: 38eaa62 | moritz++ | S06-multi/proto.t:
test a proto that does not redispatch to its multis
15:17
mhasch To summarize the small survey (arith. operand role name): numoid, algebraic, arithmetical, "element of" ring, (unspecified role parameter) 15:19
Thanks for your input, I'll think about it some more. 15:21
And jnthn: It might be not that hard after all :-)
15:23 [particle] left 15:24 c1sung joined 15:25 tokuhiro_ joined
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
not_gerd hello, JimmyZ 15:30
JimmyZ hello, not_gerd 15:31
not_gerd hasn't done any m0 work, but is thinking about how a Perl6-geared Parrot2 would look like 15:32
masak 卓明亮 15:34
# New Ticket Created by 卓明亮 # Please include the string: [perl #74910] # in t...
5/5/10
g'ah. sorry.
JimmyZ not_gerd: but your m0 implementation is really awesome ;)
masak 卓明亮,你好
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.)
diakopter not_gerd: what's a Parrot2
masak JimmyZ: 你今天怎么样? 15:36
JimmyZ masak: 还好,这几天深圳天气比较凉快
15:37 flussence joined
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
JimmyZ ^_^
not_gerd (just something I've been thinking about) 15:39
tadzik fun fact: I was able to install modules with panda(rakudo) and run them on niecza 15:40
using niecza -I ~/perl6/lib
Just Works :)
masak \o/ 15:41
JimmyZ it seems to me targeting rakudo to m1 is fruitful
tadzik and yeah, I must say I keep on making the project better which makes incompatibile changes sometimes :/
example: We no longer use wget anymore, to be more friendly (compatibile) with Windows and OSX 15:42
but we now have Parrot-specific code because of this
15:42 pmichaud joined
diakopter <sigh> the latest parrot doesn't build for me on activeperl/msvc2010, whereas it usually has for years. 15:45
pmichaud I can try it with Strawberry 15:46
masak pmichaud! \o/
diakopter pmichaud: the parrot version that is generated by nqp builds fine, however 15:47
(fyi)
pmichaud diakopter: right, I'll try it with --gen-parrot=master
we need to test that before the parrot release on Tue
tadzik jnthn! jnthn! 15:49
15:50 wamba left
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
(looking for lexpads)
pmichaud (restoration of sanity on hyper deepness)++
masak +1 15:53
pmichaud diakopter: parrot itself doesn't build? 15:54
diakopter right
toward the end of the build: gist.github.com/3732946 15:56
pmichaud that nmake warning looks troublesome 15:57
I wonder if something gmake-specific got added to the makefile.
diakopter the NMAKE warning doesn't occur in the parrot build that works 15:58
15:59 JimmyZ left
pmichaud my guess is that github.com/parrot/parrot/commit/b6...7335956253 is the problem one. 16:01
16:01 ggoebel left
pmichaud see line 143 of src/dynpmc/Rules.in 16:01
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?
although since os.pmc is basically a dummy, I'm skeptical that it's the problem. 16:03
it does concern me that there are now two definitions of the 'OS' pmc, though. 16:04
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
[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 16:17 M_o_C left 16:18 bg joined, M_o_C joined
pmichaud not_gerd on #parrot finds msdn.microsoft.com/en-us/library/cbes8ded.aspx ... which says that $< is only valid in inference rules. 16:18
geekosaur that's technically true of unix make as well 16:19
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. :-)
[Coke] jnthn: no clue if that will help. thanks, though.
[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.
And then I'll try renaming the PMC itself. :-)
pmichaud benabik++ # rules.in fix
benabik++ # OS name fix
not_gerd geekosaur: according to the GNU make manual, there is no such thing as an inference rule ;)
benabik pmichaud: I haven't actually fixed it yet. ;-)
16:21 Chillance joined 16:22 bg left
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)
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.)
amd you might as well just decree gnu make as a dependency 16:24
[Coke] hurls 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 16:26 [particle] joined
geekosaur hm? what are you having issues with? 16:26
16:26 fgomez left, fgomez joined
not_gerd skimming pubs.opengroup.org/onlinepubs/00969.../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.
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.
geekosaur many people think linux is everything
OS X is periodically synched to freebsd-stabe
[Coke] sorry, what build script is broken? parrot?
benabik [Coke]: Yes, the os dynpmc won't build with nmake. 16:28
jnthn heh, I go for a nap and pmichaud pops up...
[Coke] ok. it's a simple bug. it's not like parrot has thrown away support for nmake.
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++
jnthn: ooh, you're awake. can you fix my latest nqp issue? ;) 16:31
16:33 fgomez left, fgomez joined, fgomez left, fgomez joined
jnthn [Coke]: If you use a sub instead of a pointy, does the issue go away? 16:35
16:35 wamba joined
arnsholt geekosaur: Yeah, what benabik said. Thankfully OS X has GNU make though 16:39
dalek kudo/nom: 5aa57b9 | jnthn++ | src/ (2 files):
Don't try to inline routines we know got wrapped before CHECK time.
16:40
geekosaur for some reason I had not thought of perl6 as being a linux-uber-alles trap... 16:41
dalek ast: 68efa9a | jnthn++ | S14-traits/routines.t:
Test for wrapping in a trait_mod.
geekosaur (trying to educate me as to how deficient freebsd-derived systems are is not going to have the effect you would evidently prefer)
arnsholt I'm not quite that adamant, but I have to admit some of the GNU extensions are pretty handy 16:47
The machine that runs my IRC client runs fBSD, FWIW =)
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 ^_^
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:49
arnsholt Heh 16:50
16:50 rindolf joined
arnsholt I'm kind of split in two on things like the GNU extensions 16:52
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:53
benabik diakopter: Parrot master now has a commit that should fix your nmake woes. (I hope) 16:54
diakopter: Would appreciate a yay/nay on it.
jnthn can try it after dinner 16:56
17:01 mucker left, zby_home joined
pmichaud jnthn: yeah, I popped up. We met our robotics deadline last night, so I have a little bit of breathing space again. :-) 17:06
17:06 ggoebel left
raiph phenny, tell moritz gist.github.com/3732447 17:09
phenny raiph: I'll pass that on when moritz is around.
17:11 ggoebel joined 17:13 xinming_ joined
raiph For anyone wanting to understand where #perl6 summaries are headed... 17:14
See latest blog entry at blogs.perl.org/users/perl_6_reports...09-03.html 17:15
And then consider reading gist.github.com/3732447
17:16 xinming left 17:19 whiteknight left
jnthn pmichaud: Nice! :) 17:20
17:20 whiteknight joined
jnthn benabik: still busted, it seems 17:25
gist.github.com/3733333
GlitchMr std: ${0} 17:26
p6eval std b842bb3: OUTPUT«===SORRY!===␤Unsupported use of ${0}; in Perl 6 please use $0 at /tmp/FfJAFeR7ln line 1:␤------> ${0}⏏<EOL>␤Parse failed␤FAILED 00:00 41m␤»
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
jnthn benabik: Currently on 32da9dd2
benabik :-/ 17:28
17:28 ggoebel left
jnthn This looks like a different error from the origianl makefile one though 17:28
It's the C compiler that spits out the errors here
benabik No idea what that is.
17:28 tokuhiro_ left
jnthn Which is quite different from the one diakopter posted 17:28
benabik Indeed it is, but I don't know the origin of this one. 17:30
dalek href="https://glitchmr.github.com:">glitchmr.github.com: 96fb493 | GlitchMr++ | _posts/2012-09-16-perl-6-changes-2012W37.md:
Perl 6 changes - 2012W37 blog article
17:34
[Coke] jnthn: s/->/sub/ stillf ails. 17:35
dalek href="https://glitchmr.github.com:">glitchmr.github.com: ae28a1c | GlitchMr++ | _posts/2012-09-16-perl-6-changes-2012W37.md:
Fix Perl 6 specification incompatible change
17:36
17:37 ggoebel joined
sisar here is an interesting error with p6doc: 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:41
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
sisar not_gerd: i just did. What do you think the problem is / 17:43
?
not_gerd sisar: did you include the parrot/perl6 DLLs in the rebase? 17:44
sisar GlitchMr: I compiled rakudo from source (within Cygwin)
GlitchMr It looks like Cygwin's fork emulation error
sisar: www.cygwin.com/faq/faq-nochunks.htm...k-failures
sisar not_gerd, GlitchMr: ok, let me check. 17:45
GlitchMr Usually, using Perl 6 without Cygwin is less problematic
It's possible to use Perl 6 on Cygwin, but
17:47 spider-mario joined
GlitchMr And no, this isn't Perl 6 bug - it's just fork() call which refused to work 17:47
It just happens on Cygwin
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
GlitchMr Well - you could use precompiled Rakudo - github.com/downloads/rakudo/star/r...012.08.msi
sisar GlitchMr: Strawberry Perl + MSVC ?
GlitchMr But if you really want, you can compile Rakudo on Windows
rurban I just didn't came to upload the last star release yet.
GlitchMr rurban: latest? 17:49
rurban latest star
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
rurban on fork errors you have to rebaseall. with perl5 errors perlrebase
not_gerd (when compiling your own rakudo, that is - the one from the package manager will be automatically rebased)
sisar not_gerd: ok. I now understand the error. Thanks. 17:50
GlitchMr sisar: you also could try 'cpan install Rakudo::Star'
rurban on strawberry its also pretty easy 17:51
17:51 rurban left
sisar GlitchMr: Ah. I did not know about that. I'll try that. 17:51
GlitchMr cpan install Rakudo::Star worked for me, but that was on Linux 17:52
I wonder if it would work on Windows ;-) 17:53
(but, I think that .msi way is easiest)
17:53 tgt joined
spider-mario isn’t Cygwin super slow? 17:54
I’m not sure Rakudo needs that
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.
(And thus if it has required methods then the class will need to implement those also) 17:58
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 ... 17:59
jnthn Should be OK 18:00
A role ain't meant to conflict with itself
18:01 sisar left
marmay Thanks! 18:01
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:11
not_gerd Item assignment. Places the value of the left-hand side into the container on the right-hand side. 18:12
that doesn't sound right...
jnthn left...right...what's the difference... :) 18:15
skids which side of the screen you are sitting on.
jnthn skids: Doesn't that already work?
skids Don't think so, lemme golf a bit...
not_gerd phenny: tell moritz there appears to be some confusion on left<->right in the section on item assignment of doc.perl6.org/language/operators 18:20
phenny not_gerd: I'll pass that on when moritz is around.
not_gerd couldn't immediately figure out how that page gets generated
skids Hrm, apparently it works with roles/cronies but not directly with classes... 18:21
r: role A { method m (*@a) { ... } }; class C does A { multi method m (*@a) { "OHAI".say } }; my C $c .= new(); $c.m(3);
p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
skids but..
role A { method m (*@a) { ... } }; role B { multi method m (*@a) { "OHAI".say } }; class C does B { }; my C $c .= new(); $c.m(3);
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);
p6eval rakudo 5aa57b: OUTPUT«OHAI␤»
jnthn skids: Ah...I think you found a bug 18:22
Ordering problem, I guess...
18:23 xinming_ is now known as xinming
dalek href="https://glitchmr.github.com:">glitchmr.github.com: 08dcace | GlitchMr++ | index.xml:
XML output should use <h2> instead of <h4> and <h1> instead of <h3>.
18:27
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)␤»
jnthn yeah, that one I know about 18:34
masak skids: are you submitting a rakudobug, or shall I? 18:35
skids Go for it, unless you want to walk me through it.
masak submits rakudobug 18:36
jnthn Wait, the diamond one?
Or the previous one?
The diamond one is in RT. The pervious one should be filed though :)
masak r: role A { method m (*@a) { ... } }; class C does A { multi method m (*@a) { "OHAI".say } }; my C $c .= new(); $c.m(3)
p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
masak that one.
jnthn yes, please do
Guess I should have a role hacking session at some point soon :) 18:37
18:37 cart left
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
So realistic.
18:37 cart joined
masak GlitchMr: it's not that it cannot call 'm', it's that it cannot compose the class. 18:39
GlitchMr oh, ok
masak GlitchMr: and the error is bogus because it's the same method.
GlitchMr I know :-)
Well, when two methods are identical, Perl 6 should choose one randomly without asking. 18:40
That would make sense
eval: Date.new.say 18:41
buubot_backup GlitchMr: Datenewsay
GlitchMr perl6: Date.new.say
p6eval niecza v21-11-g09989b4: OUTPUT«===SORRY!===␤␤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…
..rakudo 5aa57b: OUTPUT«2012-12-24␤»
GlitchMr If Rakudo can say 2012-12-24 on Date.new, it also should be able to choose methods randomly
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'␤»
masak hm.
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'␤»
masak r: role A { method m (*@a) { ... } }; class C does A { multi method m (*@a) { "OHAI".say } }; my C $c .= new(); $c.m(3);
p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
masak what's the significant difference between the above two?
what makes the error messages different, I mean? 18:44
oh! the term:<...>.
r: role R { method m (*@a) { ... } }; class C does R { multi method m (*@a) {} }
p6eval rakudo 5aa57b: OUTPUT«===SORRY!===␤Method 'm' must be implemented by C because it is required by a role␤»
masak aye.
r: role R { method m (*@a) { ... } }; class C does R { method m (*@a) {} }; say "alive" 18:45
p6eval rakudo 5aa57b: OUTPUT«alive␤»
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
We compose roles, *then* take the bunch of multis we know about and auto-gen protos
That, unfortunately, means that those auto-gen'd protos aren't there in time for the check. 18:47
not_gerd bye, #perl6 18:48
18:48 not_gerd left 18:50 ggoebel left
jnthn r: say('a'~"¢"); 18:51
p6eval rakudo 5aa57b: OUTPUT«a¢␤»
18:55 ggoebel joined 19:04 rurban joined
rurban jnthn: which activeperl do you use? 5.14 or 5.16? 19:05
jnthn heh
This is perl 5, version 12, subversion 4 (v5.12.4)
On this machine :) 19:06
My laptop is probably much more recent.
19:07 lue joined
rurban I'm trying now with active perl5.16 and msvc 9 (cl v15.0) 19:12
It worked fine with strawberry gcc4.4 and cygwin gcc4.5 19:13
Found the problem. Another $< 19:14
19:16 ggoebel left
rurban Oh, someone removed the os.str target. that's why 19:18
19:19 cognominal left 19:20 Circlepuller_ joined, zby_home left 19:21 ggoebel joined 19:22 Circlepuller left
MikeFair_ howdy all 19:24
rindolf MikeFair_: hi.
MikeFair_: what's up?
19:24 cognominal joined
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:25
rindolf (sub ($x) { $x * $x }).(5) 19:26
:-)
MikeFair_ Soon I'd like to have something to demo, but there's a lot of interconencted pieces :)
rindolf perl6: (sub ($x) { $x * $x }).(5)
p6eval rakudo 5aa57b, niecza v21-11-g09989b4: ( no output )
rindolf perl6: say (sub ($x) { $x * $x }).(5) 19:27
p6eval rakudo 5aa57b, niecza v21-11-g09989b4: OUTPUT«25␤»
MikeFair_ rindolf: hehe actually it's a lot like perl6 semantics but with a native english-like syntax
rindolf MikeFair_: similar to COBOL?
masak perl6: say { $^x * $^x }(5)
p6eval rakudo 5aa57b, niecza v21-11-g09989b4: OUTPUT«25␤»
MikeFair_ rindolf: and erlang and XMPP all run together, it's as much a virtual execution environment as it is a lnaguage
rurban jnthn: I could repro your dynpmc/os problem. Looks tricky. PMCNULL symbol missing 19:28
jnthn urgh
MikeFair_ rindolf: no - I think of COBOL and Basic more like the same thing
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
MikeFair_ rindolf: Where before that would have been 'put "world!" into txtWorld' 19:30
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.
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:32
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
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.
oh, it is: www.eidola.org/ 19:35
MikeFair_ masak: Oh clearly, I get that these priorities are my own. ;)
Though there might be a few other folks interested if I can ever get something to show folks
masak *nod*
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
Eidola is a representation-independent, object-oriented, visual programming language
oh hey!!
yeah
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
masak: My game plan atm is to use XML as the intermediary to represent the AST
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
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.
MikeFair_ masak: syntax however is extremely flexible "HOW you say it, can be very flexible... but "WHAT you can say".. not so much" :) 19:40
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
a good example of this is the idea of the "move" command for GUI objects like buttons
'move button myButton to the center of the current card' 19:42
that's the native syntax, and it causes the button to 'pop' over to that location
however it's also useful to have an 'animatedMove' that causes it to 'glide' from point a to point b 19:43
that command can be added as proceudre/function call, but it loses its native langauge expression once you do that
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?
MikeFair_ masak: Lack of a human translator that speaks the foreign 'programming language' 19:45
masak: it's yournative language that you already know
masak: I'm not trying for 'native language parsing' so its not that 'sloppy'
masak ok. 19:46
at this point you should probbly build it, and then we can talk about it ;)
MikeFair_ masak: For instance, 'first, second,third' are ordinals that can be parsed and translated directly to [0], [1], [2]
masak yes, but whyyyyy
I'd rather write [1] any day. 19:47
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:48
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
masak: Why do you put english language comments in your code?
masak: It's the same reason
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.
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
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 :)
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: inform7.com/
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
masak lue++ # I though've thought of Inform 7 19:52
should've*
I believe it's a good example of what MikeFair_ is attempting.
MikeFair_ masak: agreed comments are very much 'why', but oftentimes in an xTalk , why is actually valid code
it's strange when the computer speaks something close to your language 19:53
masak MikeFair_: I can't fault you for lack of vision. 19:54
MikeFair_ LOL
MikeFair_ bows head respectfully. "thanks!" :)
masak pray tell, how old are you?
MikeFair_ masak: I first had the idea for this thing in 1997
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 :)
MikeFair_ just turned 37 recently.
masak: most xTalkers aren't low lovel folks
masak: and most low level folks are like 'I'd rather use the shorthand notations' :) 19:56
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:57
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
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
masak: Instead of one vertical stack -- it's actually two --
masak: one for machines, and one for humans
masak oh, sure.
MikeFair_: when I was about 18, I created a dataflow programming language whose programs were ASCII diagrams wiring together different primitives.
MikeFair_ masak: then there's an IR that can translate betweenthe two
masak: Sweet! 20:01
masak yes. the programs were quite beautiful. it supported recursion.
MikeFair_ masak: that's pretty cool actually, at least I think it is
masak my point is that it ended up being not very expressive. you just couldn't write anything in it beyond a certain size.
MikeFair_ masak: right, but within its subdomain I'm sure it was quite expressive 20:02
masak it didn't really have a subdomain.
I intended it to be general-purpose.
MikeFair_ masak: small programs expressed visually for others to read? :)
masak it was good for art, not much more :) 20:03
20:03 ajoe left
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:03
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:04
masak: Downloading a large project when you weren't there in the beginning can be daunting 20:05
20:05 M_o_C left
MikeFair_ masak: I'm taking on something to make comprehending large complex systems more accessible to us quicker 20:06
masak: It's much more "pictury" -- the current model is "let's all learn to speak the language of the program" 20:07
masak: You do any erlang?
20:07 Circlepuller_ left
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
20:07 Circlepuller_ joined
jnthn Meaning you can't just learn the bit of the system responsible for the changes you need to make. 20:07
masak +1
MikeFair_ jnthn: exactly, or not even boundaries but just interdependencies 20:08
masak let's all build bigger systems by building smaller systems!
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
jnthn: I downloaded the KOffice code a couple years ago and was lost in the stack of object hierarchies
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
jnthn: I needed a picture of how things linked together and the data flowed through the program
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
20:11 M_o_C joined
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:12
20:13 Circlepuller joined
jnthn Hm :) 20:13
MikeFair_ It's no different than the JMX stuff from java from a data level
just rendered differently
:)
masak MikeFair_: I believe programming might eventually be done in a 3D virtual world, yes. 20:14
we will probably live to see it.
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:15
20:16 Circlepuller__ joined, Circlepuller_ left, marmay left
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:16
lue
.oO("If builders built buildings the way programmers wrote programs, the first woodpecker to come along would destroy civilization.")
20:17
20:17 Circlepuller left
MikeFair_ lue: So wouldn't a woodpecker in this case be virus/botnet/spammer 20:17
20:17 kaare__ left
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.
MikeFair_ pictures a virus like a little woodpecker messing with the memory of my code. :) 20:19
Which we could do if we could hook the VM up to a machine and "watch" the program execute :)
I plan on using the debugger and other hooks like that into the VM to suck the data out 20:21
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:23
raiph moritz: ping 20:25
MikeFair_ gets a picture of "nethack" as a first whack at "watching" the program execution
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.
lue: exactly.. :) 20:27
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:28
20:30 bruges left
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:30
20:30 GlitchMr left 20:32 bruges joined
jnthn lue: Well, the Rakudo debugger is built to have pluggable-ish UIs. :) 20:33
MikeFair_ lue: I like the sound of that 20:34
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:36
MikeFair_ jnthn: I expect some kind of 'visual program explorers' ought to be conceivable with just the basic debugger hooks 20:37
lue: well blender takes plugins right
lue: You'd just need some kind of 'visualizer' for the data stream coming out of the VM
at least my thinking so far has been that this is a VM hook thing 20:38
lue: So if we created visual metaphors the stuff in 6model, that should capture most everything
that's my game plan at least 20:39
lue has now roped himself into investigating the (possibility|feasibility) of using blender as a frontend for debugging ... :) 20:40
MikeFair_ cheers!! :)
I AM NO LONGER TOTALLY ALONE IN MY INSANITY!!! :)
at least for a little while. :) 20:41
lue: Seriously though I'd be very curious to hear about whatever you might discover
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
s/hosetly/honestly
visualizer
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.
one in nqp, and one in Perl 6.
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
s/that break/the breakdown/
each of these could run on a separate machine if need be 20:46
lue: wow -- blender looks like it'd make a really good paradigm/tool for what i'd like to see here 20:49
20:49 sqirrel left
MikeFair_ lue: I just looked at some screenshots in the Features/Gallery and I think I can see where you thinking with that. :) 20:50
20:51 Woodi left, erkan left 20:53 Woodi joined
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
MikeFair_ lue: All very good signs... I wonder if there are any plugins that stream in data from an external source? 20:58
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 20:59
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.
MikeFair_ bbiab
lue goodbye MikeFair_ o/
21:00 erkan joined
tadzik good knight 21:03
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:09
^^ "time field" means the log lines to the left (when viewing this message via Moritz's irclogger) 21:10
masak tadzik: good knight, tadziku
raiph "logmarks"
tadzik ...but I'm not going anywhere :) 21:11
should, but too excited
pmurias masak: what would be the advantage of programming in a 3d space?
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.
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
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 tgt left
masak pmurias: immersion. virtual 3D space is the natural endpoint of more and bigger screens. :) 21:17
21:21 PacoAir left 21:24 rindolf left 21:25 M_o_C left
tadzik good night #perl6 21:27
masak hey, you already said good night! :P 21:28
tadzik but that was at MikeFair_ :)
21:29 Guest82502 left, the joined, the is now known as Guest44297
masak oh! 21:30
good night, dear tadzik.
21:35 Guest44297 left
MikeFair_ back :) 21:40
21:45 spider-mario left
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
master HEAD is fixed.
sorear good * #perl6 22:02
MikeFair_ sorear: see ya! :)
masak sorear! \o/
sorear MikeFair_: leaving? 22:03
22:05 Chillance left 22:07 Chillance joined 22:12 MayDaniel left
jnthn sleep & 22:14
masak 'night, #perl6
MikeFair_ sorear: OH! you were saying good morning 22:15
jnthn: good night
masak: see ya!
sorear! \o/ <- Hi! 22:16
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:47
However sometimes, I want to exclude the vertical whitespace so I can explicitly match on the \v in that region 22:48
Currently what I have developed is something like: rule someRule { some text[ <.rtn>
]next part of the rule } 22:49
where <.rtn> is effectively \v
err <.rtn> is effectively <.ws> | \v 22:50
Ideally I'd like to do: 22:52
rule someRule { some text
[ <.rtn> something to match if there is a return || something to match if there wasn't a return] 22:53
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:54
felher 'night, #perl6 22:57
MikeFair_ Hmmm... would [ {?after <.rtn>} something to match if there is a return do the right thing?
felher: gnight
22:58 thou joined 23:20 fgomez left 23:34 fgomez joined 23:56 dayangkun joined 23:59 dayangkun left, dayangkun joined