Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-06

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 rmgk joined #perl6
00:08 perltricks joined #perl6
00:13 eternaleye joined #perl6
00:16 perltricks hey just polishing my advent article for tomorrow. Is it correct to say single adverb options can omit the ":"? Because qq:x// and qqx// seem to work.
00:17 psch m: say "AbCd" ~~ mi/abcd/
00:17 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/px7eMn0I9J�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument�at /tmp/px7eMn0I9J:1�------> [32msay "AbCd" ~~ mi/abcd/[33m�[3…»
00:18 perltricks m: say qx/perl6 -v/
00:18 camelia rakudo-moar 6345f4: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub QX at src/RESTRICTED.setting:9␤  in block <unit> at /tmp/Oj29LqPXjD:1␤␤»
00:18 perltricks aww
00:19 psch in general "a single adverb doesn't need the colon" is wrong
00:21 perltricks psch: I think it only applies to quoting: "You may omit the first colon by joining an initial Q, q, or qq with a single short form adverb"
00:21 lue Is that in the spec?
00:21 psch if that's in the synopses somewhere you can probably say it like that
00:21 psch i wasn't aware of that :)
00:22 lue 'cos as far as I know, stuff like qw is just assigning names to common usages of the quoting/regex langs.
00:22 psch huh, \qq inside \q is gone?
00:23 lue ?
00:23 psch it was specced once, but it also was kinda out-there
00:23 psch m: say \q[\o[40]]
00:23 camelia rakudo-moar 6345f4: OUTPUT«\(\o[40])␤»
00:23 psch m: say \qq[\o[40]]
00:23 camelia rakudo-moar 6345f4: OUTPUT«\( )␤»
00:23 psch ehh
00:23 perltricks psch: sorry yah I found it after I asked the question: http://perlcabal.org/syn/S02.html#Adverbs_on_quotes
00:23 psch m: say \q{\qq[\o[40]]}
00:23 camelia rakudo-moar 6345f4: OUTPUT«\( )␤»
00:24 psch perltricks: no worries, happens to me a lot
00:24 psch lue: it's apparently not gone, i just didn't invoke it correctly
00:24 lue psch: I have no idea what you're doing right now O_o
00:24 psch lue: we have \qq as a special quoting construct inside \q
00:25 lue Never in my life have I seen \qq *or* \q
00:25 psch m: say q["my literal text, except \qq{LATIN CAPITAL LETTER A}"]
00:25 camelia rakudo-moar 6345f4: OUTPUT«"my literal text, except LATIN CAPITAL LETTER A"␤»
00:25 psch something like that :/
00:26 lue m: say q["my literal text, except \qq{\c[LATIN CAPITAL LETTER A]}"]
00:26 camelia rakudo-moar 6345f4: OUTPUT«"my literal text, except A"␤»
00:26 psch ...exactly.  sorry, i'm a bit unfocused atm
00:26 lue no worries :) .
00:27 psch i'm having fun with objectweb.asm and invokedynamic
00:28 psch trying to dynamically install a interopish-method that prints the types of the arguments it was called with
00:28 psch and something is amiss, but i'm not sure what
00:33 BenGoldberg joined #perl6
00:56 colomon psch: sounds like the story of my life.  ;)
00:57 psch colomon: being unfocused and not knowing what's missing?  or trying to install interopish methods? :)
00:58 colomon "something is amiss, but i'm not sure what"  :)
01:01 psch well, i do get an error from the jvm, and it's kind of informative, but...
01:11 rurban joined #perl6
01:18 japhb_ WIP macro idea, but I have to switch computers: https://gist.github.com/japhb/92442a22962c5156e102
01:18 japhb_ masak, TimToady: ^^
01:26 psch ugh
01:26 psch https://docs.oracle.com/javase/7/docs/api/java/lang/invoke/MethodType.html#genericMethodType(int,%20boolean)
01:27 psch the bools doesn't convert the last param, it adds a param
01:27 psch *bool
01:27 psch that was missing
01:58 bcode joined #perl6
02:10 Akagi201 joined #perl6
02:18 Mso150 joined #perl6
02:24 colomon joined #perl6
02:33 erkan joined #perl6
02:45 raiph joined #perl6
02:46 raydiak if I write 10 paragraphs into a comment box and the captcha is "prosodic", does it mean I'm being watched? :)
02:48 colomon the internet knows everything, raydiak
02:50 eternaleye joined #perl6
02:50 raydiak *shudder*
02:51 raydiak the internet was actually kinda a small part of my rant in a way, so I'm sure it's out to get me now if it wasn't before...
02:52 * raydiak was thinking about growing the rant into a small book
03:07 Mso150 joined #perl6
03:09 eternaleye joined #perl6
03:17 noganex joined #perl6
03:18 perltricks ok, advent article is live http://perl6advent.wordpress.com/
03:18 perltricks I guess it's Saturday in Europe
03:19 psch it's 4:19 am
03:20 psch so, yes, it is saturday :)
03:23 Mso150 joined #perl6
03:26 psch but then europe is actually bigger too...
03:26 psch bigger than one timezone that is
03:46 aborazmeh joined #perl6
03:46 anaeem1_ joined #perl6
04:12 Akagi201 joined #perl6
04:12 kurahaupo joined #perl6
04:16 Mso150_e joined #perl6
04:32 Akagi201 joined #perl6
04:39 tinyblak joined #perl6
04:41 tinyblak_ joined #perl6
04:54 tinyblak joined #perl6
05:13 anaeem1 joined #perl6
05:27 KCL_ joined #perl6
05:40 tinyblak_ joined #perl6
06:13 psch hrm, the current hurdle is getting the GlobalContext from a static method (or un-static-ing the method which i might not be able to) to unbox SixModelObjects into their jvm equivalent :/
06:13 psch but that's definitely beyond my current wakefulness, g'nite #perl6 \o
06:33 raiph joined #perl6
07:19 anaeem1_ joined #perl6
07:24 bjz joined #perl6
07:25 vti joined #perl6
07:53 anaeem1 joined #perl6
08:16 isBEKaml joined #perl6
08:17 [Tux] Slang::Tuxic broken?
08:17 [Tux] ===SORRY!=== Error while compiling test-t.pl
08:17 [Tux] Two terms in a row
08:17 [Tux] at test-t.pl:76
08:17 [Tux] ------>             my $msg = $reason.sprintf ⏏(@args);
08:28 Alina-malina joined #perl6
08:33 darutoko joined #perl6
08:35 kaare_ joined #perl6
08:40 eternaleye joined #perl6
08:42 Alina-malina joined #perl6
08:45 avar joined #perl6
08:46 avar joined #perl6
08:47 avar joined #perl6
08:47 avar joined #perl6
08:48 avar joined #perl6
08:48 avar joined #perl6
08:49 mvuets joined #perl6
08:49 avar joined #perl6
08:49 gfldex joined #perl6
08:49 rindolf joined #perl6
08:52 avar joined #perl6
08:52 avar joined #perl6
08:53 bjz_ joined #perl6
08:55 Sqirrel joined #perl6
09:07 Sqirrel joined #perl6
09:22 telex joined #perl6
09:30 vendethiel joined #perl6
09:31 rurban joined #perl6
09:39 kurahaupo joined #perl6
09:40 mvuets greetings #perl6
09:43 mvuets is it correct to think that «if $_ ~~ $foo» is equivalent to «when $foo»?
09:45 moritz mvuets: nearly; 'when $foo' also exits the outer given { } block
09:45 moritz m: given 42 { when 42 { say 1 }; say 'outer' }
09:45 camelia rakudo-moar 6345f4: OUTPUT«1␤»
09:45 moritz m: given 42 { if $_ ~~ 42 { say 1 }; say 'outer' }
09:45 camelia rakudo-moar 6345f4: OUTPUT«1␤outer␤»
09:46 rindolf joined #perl6
09:48 mvuets oh i see. hmm. i was thinking how to match against $_ implicitly, like perl5's «say 1 if /42/»
09:49 mvuets realized 'when' can be used naked, w/o 'given'
09:49 moritz mvuets: also a regex in boolean context automatically matches against $_
09:49 moritz m: $_ = 42; say 1 if /4/
09:49 camelia rakudo-moar 6345f4: OUTPUT«1␤»
09:50 moritz m: $_ = 23; say 1 if /4/
09:50 camelia rakudo-moar 6345f4: ( no output )
09:50 mvuets ENOTENOUGHCOFFEE (-:
09:57 mvuets m: sub x {42} say x()
09:57 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/pi80yFjsffâ�¤Two terms in a rowâ�¤at /tmp/pi80yFjsff:1â�¤------> [32msub x {42} [33mâ��[31msay x()[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤        statement modifi…»
09:57 mvuets m: sub x {42}; say x()
09:57 camelia rakudo-moar 6345f4: OUTPUT«42␤»
09:57 mvuets is semicolon really necessary?
09:58 mvuets ...when written in a single line?
09:58 moritz std: sub x {42} say x()
09:58 camelia std 76ccee1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/CYFTGSC9yg line 1:â�¤------> [32msub x {42}[33mâ��[31m say x()[0mâ�¤    expecting any of:â�¤        horizontal whitespaceâ�¤  infix or meta-infixâ�¤    infixed …»
10:00 mvuets http://perlcabal.org/syn/S04.html#Statement-ending_blocks
10:03 * moritz just wanted to see STD.pm's error message
10:05 * mvuets shown he found the answer on his question
10:06 moritz then we're all a happy bunch, no? :-)
10:07 mvuets surely
10:09 mvuets if using naked 'when' is not discouraged, it is very tempting to write...
10:09 mvuets m: $_ = "happy"; say "surely" when "happy"
10:09 camelia rakudo-moar 6345f4: OUTPUT«surely␤»
10:13 Sqirrel joined #perl6
10:16 prevost joined #perl6
10:18 isBEKaml joined #perl6
10:18 ptc_p6 joined #perl6
10:33 Ugator joined #perl6
10:36 anaeem1 joined #perl6
10:36 FROGGS joined #perl6
10:50 anaeem1_ joined #perl6
11:00 anaeem1 joined #perl6
11:01 anaeem1_ joined #perl6
11:19 Alina-malina joined #perl6
11:21 anaeem1 joined #perl6
11:22 onebitboy joined #perl6
11:43 Roonin joined #perl6
11:46 pecastro joined #perl6
11:51 bjz joined #perl6
12:15 psch joined #perl6
12:17 psch hi #perl6
12:17 psch mvuets: RT #71368 exists
12:17 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=71368
12:18 psch i'm not entirely sure that's up-to-date enough to be definite about a sole when outside a topicalizer, though
12:19 mvuets oh, it's a forbidden construct )-: i thought it was a feature
12:24 mvuets psch: maybe semantic changed, see the very end of this section http://perlcabal.org/syn/S04.html#Switch_statements
12:25 masak oh hai, #perl6
12:25 psch mvuets: yeah, i was looking at S04 and didn't find "mortal sin" anywhere
12:25 mvuets ehm, well, that's a statement modifier though
12:26 mvuets m: $_=42; when 42 {say "yay"}
12:26 camelia rakudo-moar 6345f4: OUTPUT«yay␤»
12:26 psch hi masak o/
12:26 mvuets in repl i also get a warning "succeed without when clause"
12:26 mvuets m: $_=42; say "yay" when 42;
12:26 camelia rakudo-moar 6345f4: OUTPUT«yay␤»
12:27 mvuets and this one does not generate a warn, all good
12:29 psch m: for 1..10 -> $x { $_ = 3; when 3 { print "_" }; say $x }
12:29 camelia rakudo-moar 6345f4: OUTPUT«__________»
12:30 psch i'm not sure i could explain that...
12:35 colomon why not?
12:35 psch is it just "when as statement always breaks topicalizers, no matter what it matches against"?
12:35 psch might be i'm not awake enough yet.. :)
12:36 colomon …. breaks topicalizers?!?
12:36 mvuets i think 'when' is legit inside the 'for' loop
12:36 colomon absolutely when is legit inside a for loop
12:36 colomon it's a great idiom, actually
12:37 mvuets it is, however in psch's example for does not really topicalize
12:38 psch colomon: "breakout semantics" is what S04 uses, so i probably should have written "breaks out of topicalizers" or something like that
12:38 psch i.e. "end the current iteration"
12:39 colomon I understand it as "it ends the current block"
12:40 colomon so if it's iterating, yes, it goes to the next iteration
12:40 mvuets like 'next', right?
12:40 colomon right
12:40 psch right, that's probably more correct
12:41 mvuets seems to be DWIM-y
12:42 colomon m: for 1..10 { when 3|4|9 { print "_" }; when * %% 2 { print "$" }; print $_; }
12:42 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QSuJohKGOmâ�¤Non-variable $ must be backslashedâ�¤at /tmp/QSuJohKGOm:1â�¤------> [32m4|9 { print "_" }; when * %% 2 { print "[33mâ��[31m$" }; print $_; }[0mâ�¤    expecting any of:â�¤        arg…»
12:42 colomon m: for 1..10 { when 3|4|9 { print "_" }; when * %% 2 { print "\$" }; print $_; }
12:42 camelia rakudo-moar 6345f4: OUTPUT«1$__5$7$_$»
12:44 mvuets wait what?
12:44 mvuets «when * %% 2» === «when $_ %% 2», huh?
12:45 psch mvuets: topicalized, yes.  the WhateverCode gets $_, because that's what when takes
12:45 mvuets bizarre [=
12:46 psch m: say (^10).grep({ $_ %% 2 }); say (^10).grep(* %% 2); # think of it like this
12:46 camelia rakudo-moar 6345f4: OUTPUT«0 2 4 6 8␤0 2 4 6 8␤»
12:47 psch or @_[0] or even $^a instead of $_ if you want
12:47 mvuets re 'for', topic, and 'when': S04 reads "If the smart match succeeds, when's associated block is executed, and the innermost surrounding block that has $_ as one of its formal parameters (either explicit or implicit) is automatically broken out of." - maybe 'broken out' is ambiguous here?
12:48 mvuets psch: cool! * is still a new beast to me.
12:48 psch hm, i think in my example the "has $_ as one of its formal parameters" is what's not working as designed
12:48 psch i.e. the for doesn't use $_ implicitely or explicitely, but the when still breaks it
12:48 psch *breaks out of it
12:49 mvuets yeah, i wasn't sure about that behavior either. that's what i meant saying your example does not topicalize
12:50 mvuets like 'for' is used as an excuse to set the topic by hand and then use 'when'
12:50 psch i'm not sure there's situation where not breaking there actually makes sense, though
12:53 colomon (sorry for disappearing there) If you smartmatch against a WhateverCode, it runs the WhateverCode against the item you are trying to smartmatch -- in the case of "when", that's $_
12:56 vti joined #perl6
12:57 * colomon doesn't like explicitly saying $_ if he can avoid it
12:58 mvuets colomon: yeah, makes perfect sense now. psch's example demonstrates that well
13:05 anaeem1_ joined #perl6
13:07 BenGoldberg joined #perl6
13:08 anaeem1 joined #perl6
13:08 anaeem1_ joined #perl6
13:17 spider-mario joined #perl6
13:19 Ugator left #perl6
13:19 denis_boyun_ joined #perl6
13:20 FloLo joined #perl6
13:20 Alina-malina joined #perl6
13:26 [Tux] whoever fixed Slang::Tuxic, thanks!
13:29 rindolf joined #perl6
13:32 aborazmeh joined #perl6
13:36 masak can't have been a fix to the repo itself -- that was 26 days ago.
13:37 [Tux] panda did not pull. I think that was why it failed
13:37 [Tux] I had to go into the repo to pull again
13:37 [Tux] by now, I am so used to 'rakudobrew build moar' doing everything by itself
13:38 tadzik :)
13:38 tadzik it should make panda re-pull all the things though
13:38 [Tux] well, it didn't :/
13:39 tadzik weird
13:39 tadzik I don't think it even keeps the old repos around these days
13:39 tadzik (I'm pretty sure it does not)
13:52 rurban joined #perl6
13:56 rurban joined #perl6
13:58 vendethiel joined #perl6
14:01 vendethiel o/, #perl6
14:03 psch \o vendethiel
14:03 FloLo Hello #perl6,
14:03 FloLo I'm dreaming of something like Inline:R - it would be so handy to have all the cran packages available, how hard would that be to achieve?
14:04 FloLo does anyone here know R?
14:04 psch FloLo: did you have a look at Inline::Perl5 or Inline::Python for inspiration?
14:04 arnsholt R saved my butt about a year back
14:04 arnsholt So nice for stats
14:05 FloLo I looked at python - but that kinda scared me :D
14:06 FloLo I'd propably need some help ;)
14:06 psch fwiw, i don't know R
14:10 psch arnsholt: can you take a look at my jvminterop stuff?  i'm not quite sure how to continue from where i am right now
14:10 FloLo is there some blog posts about inlining?
14:10 psch FloLo: you probably want to look at NativeCall at github.com/jnthn/zavolaj/
14:11 psch arnsholt: https://github.com/peschwa/rakudo/blob/jvminterop/src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java#L56 around here specifically
14:11 FloLo ah :) thx psch
14:11 FROGGS o/
14:12 psch \o FROGGS
14:16 raiph joined #perl6
14:20 mvuets left #perl6
14:34 dalek snake: 956b7e2 | (Arne Skjærholt)++ | README:
14:34 dalek snake: Add a README.
14:34 dalek snake: review: https://github.com/arnsholt/snake/commit/956b7e2511
14:37 arnsholt psch: I'm not terribly familiar with the JVM stuff. What's going wrong?
14:37 psch arnsholt: the main problem i'm having is that i'm not sure how to get a P6Opaque into the right java type
14:38 psch i've asked you 'cause i remembered the offer to help with ASM.jar and this is in the same ballpark, i think
14:39 psch afaiu, the installation of the invokedynamic callsite works
14:40 psch but inside the targetted method i have no clue how to get the java types from the P6Opaque, to test for the right MethodHandle
14:40 psch i think i'd need the GlobalContext to unmarshal, but i don't think i can easily get at it
14:40 psch if at all
14:41 arnsholt The GlobalContext should be possible to get at
14:41 arnsholt Being global, and all
14:41 arnsholt But you may have to thread it in from the calling code somewhow
14:42 arnsholt *somehow
14:44 psch optional arguments for indy bootstrap methods are limited in the types the can accept, so i can't pass it through to the callsite-generating code and install it with together with the target
14:45 arnsholt Set it as a property on one of the parameters perp
14:45 arnsholt *perhaps?
14:47 psch "Each argument must be an Integer, Float, Long, Double, String, Type or Handle value."
14:47 psch i don't know how i would set a property on any of those
14:48 arnsholt Hmm
14:49 FROGGS psch: why do you want to pass a SMO to java anyway?
14:51 zakharyas joined #perl6
14:51 arnsholt psch: Maybe you can extend the Handle class to have a parameter you can use?
14:52 psch FROGGS: so i'm (trying to) convert wrongly?  i do want to pass the corresponding java-ish type with its value
14:53 psch RuntimeSupport.unboxJava is what marshalOut uses to get the value to java
14:54 psch oh hm
14:54 psch but it does more too, and i have to do the same
14:55 hoelzro o/ #perl6
14:55 psch so i guess i actually want to dynamically call marshalOut instead of trying to replicate its behavior..?
14:55 FROGGS hi hoelzro
14:56 psch hoelzro \o
14:56 FROGGS what type do you want to pass to Java in your test case right now?
14:57 Ben_Goldberg joined #perl6
14:58 psch FROGGS: i'm testing with a (String, int) method
14:58 psch i have another overloaded with (int, int)
14:59 psch that's why i'm installing a varargs method with (Object[]) Object
14:59 smls joined #perl6
15:00 psch uh, the first one is (int, String), the second one is only (int)
15:00 psch confused my test cases...
15:02 FROGGS so you just want to get the String or int out of an P6opaque?
15:02 psch right, i just want the value out of the P6opaque
15:04 FROGGS you could look at nqp/src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java:266
15:06 FROGGS in combination with line 154
15:07 rindolf joined #perl6
15:08 usernotexists joined #perl6
15:10 psch FROGGS++: thanks, that does look like it could help (also arnsholt++ for suggestions)
15:11 * smls posted rant in perl6advent comment section
15:13 smls Is it too late to rethink/improve Perl 6's built-in "running external commands" support?
15:13 FROGGS no
15:14 FROGGS we know that there is a need to change/improve certain things
15:14 smls Would something like the Perl 5 function I posted (http://perl6advent.wordpress.com/2014/12/06/day-06-running-external-programs-from-perl-6/) be possible to do in a cross-platform way?
15:15 smls And somehow get the exit status into the return value, so we don't need "$?" ?
15:15 moritz I wonder of IO::Handle.pipe can do that
15:15 FROGGS well, pipe() goes in that direction
15:16 moritz but I'd really prefer a run('command', @args, :capture)
15:16 FROGGS and is quite new (just a month old)
15:16 moritz and it'd capture the output streams from the process it spawns
15:17 FROGGS one would just have to look at proc_exec from php... we should be in a position to what it does in a even nicer way
15:17 FROGGS to do*
15:18 smls What moritz said.
15:19 FROGGS would be nice if pipe(), shell() an run() would share a common interface
15:20 moritz maybe run(:shell :capture/:pipe)
15:20 smls Maybe instead of returning a Proc::Status,  run() could return a  Proc::Result  that stringifies to captured STDOUT (but otherwise behaves like Proc::Status)
15:22 moritz smls: or more explicitly, $res = run($prog, :capture); $res.out; $res.err; $res.return-code
15:22 mvuets joined #perl6
15:22 smls yeah
15:23 moritz bonus points for :async, which will start the program, but doesn't wait for its completion
15:24 moritz and then $prog.{in,out,err} would be handle
15:24 moritz s
15:26 smls ++ to that
15:27 FROGGS you should also consider what should happen when you mess with $*OUT and so on
15:30 hoelzro I was thinking about determinate return values again yesterday (ie. sub foo(--> $var) { ... }), and something occurred to me
15:30 hoelzro the spec says to indicate that if you --> $var, it will use an existing variable as the return value
15:31 hoelzro but if you use a *non-existing* variable, it will create a variable local to your sub for you
15:31 hoelzro I was thinking that the latter being implicit could result in odd behavior, so I was thinking that maybe the right thing to do would be to force a user to explicitly declare a new variable via sub foo(--> my $result) { ... }
15:32 hoelzro any thoughts?
15:32 FROGGS m: sub foo($x = my $y = 42) { say $y }
15:32 camelia rakudo-moar 6345f4: ( no output )
15:32 FROGGS m: sub foo($x = my $y = 42) { say $y }; foo()
15:32 camelia rakudo-moar 6345f4: OUTPUT«42␤»
15:33 FROGGS m: sub foo($x = my $y = 42) { say $y }; foo(); say $y
15:33 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NsEbtHqXOcâ�¤Variable '$y' is not declaredâ�¤at /tmp/NsEbtHqXOc:1â�¤------> [32m = my $y = 42) { say $y }; foo(); say $y[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
15:33 FROGGS hoelzro: yeah, that sounds sane :o)
15:33 FROGGS since the signature seems to be part of the routine
15:33 FROGGS 's body anyway
15:38 FROGGS hoelzro: so quick! respec it! :o)
15:41 FROGGS moritz / smls: I'd like to see the following: run('foo', @args, :env({ foo => 42 }), :$out, :$err, :$in), and then I could read from $out/$err and print to $in
15:42 FROGGS and since the nqp::openpipe is new and not used in nqp's stage0, we are free to change its signature
15:42 FROGGS like passing filehandles...
15:43 FROGGS hmmm, this could actually work... I was thinking about that quite for a long time, problem always was that an op can only return one thing, but if we provide filehandles from P6 world, we can do whatever we like
15:44 smls but then you would have to declare a variable for STDOUT in your lexical scope each time I want to run a command and get its output
15:44 smls s//you/
15:47 tinyblak joined #perl6
15:47 smls with a Proc::Result return value that stringifies to STDOUT and and boolifies to return status, I could elegantly write:
15:47 smls my $result = run('foo', @args) || die "Program foo reported failure\n";
15:48 FROGGS smls: passing :$out would be just one way to do it
15:48 moritz and if it's not passed, it can always be captured automatically
15:48 FROGGS in case to let the child process print to an already opened handle
15:48 betterwo1ld if you make stdout and stdin more flexible, it might be worthwile to have an option to combine several processes into one pipeline, like a bash pipeline
15:49 betterwo1ld that's what python does with the Popen interface
15:49 moritz yes, a :merge or so
15:49 smls FROGGS: good point re "already opened handle"
15:49 FROGGS if you don't pass :out but :capture, the method/sub in perl 6 would open a handle, and pass that down to the vm, and return it as part of the Proc::Something
15:49 mvuets m: $mul = * * *; say $mul(3, 4); # zomg! (-:
15:49 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/V84xVTKaMDâ�¤Variable '$mul' is not declaredâ�¤at /tmp/V84xVTKaMD:1â�¤------> [32m$mul[33mâ��[31m = * * *; say $mul(3, 4); # zomg! (-:[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
15:50 FROGGS m: 6; $mul = * * *; say $mul(3, 4); # zomg! (-:
15:50 camelia rakudo-moar 6345f4: OUTPUT«12␤»
15:50 FROGGS betterwo1ld: can you paste an example code here?
15:50 FROGGS I'm not even a python beginner
15:50 mvuets FROGGS: huh! how come that 6 matters?
15:50 betterwo1ld FROGGS: i think so.. it might take a while to come up with a nice example
15:51 FROGGS mvuets: that '6' is a shorthand of 'no strict'
15:51 mvuets FROGGS: errrr....
15:51 FROGGS betterwo1ld: but the idea is to pass the $out of the first process as the $in of the second?
15:52 mvuets FROGGS: REPL and -e are 'no strict', when running from a file and the bot are 'strict', correct?
15:52 betterwo1ld FROGGS: yes.  Like in a bash command, e.g.   tail file.txt | grep foobar
15:52 FROGGS mvuets: correct
15:52 FROGGS betterwo1ld: k
15:53 FROGGS betterwo1ld: I dunno if we can let pipes to that for us... run('foo') ===> run('bar')
15:53 betterwo1ld actually I came up with that fantasy some months ago (the pipe operators for commands :)
15:54 FROGGS my problem is that I have no idea how thes pipe ops work, nor what they are supposed to do :o)
15:54 moritz the problem with the feed syntax is that it assumes only one stream
15:56 * FROGGS .oO( ≡≡≡> )
15:56 FROGGS unicode to the rescue /o/
15:56 tinyblak joined #perl6
15:57 smls FROGGS: Or instead of separate «:out» and «:capture», «:out($handle)» and «:out(True)»
15:57 BenGoldberg_ joined #perl6
15:58 moritz smls: that sounds good too
15:58 FROGGS :out(True) would be :out in short
15:58 rurban joined #perl6
15:58 FROGGS which is not bad at all
16:01 psch Proc::Status could .list() to { $status ?? $out.read !! $err.read } or something like that i guess
16:01 moritz .list to a single item? sounds wrong-ish to me
16:01 FROGGS yeah
16:01 FROGGS that sound like a misuse :o)
16:02 FROGGS so, the smallest steps we could take are:
16:02 FROGGS 1) allow to pass opened fhs to pipe(), which are passed down to the vm, if these are omitted the current way is kept (inheriting the handles)
16:02 FROGGS 2) extend Proc::Status by .in, .out, .err
16:02 psch i'm not firm on what exactly Handle.read does, i might mean .lines
16:02 FROGGS I have the feeling that 1) and 2) are clashing slightly
16:03 psch but that falls into the same troublesome spot for m:g/$pat/ { } falls as i implemented it
16:03 psch i.e. "how do we know we want to .list() if something also .Str()s"
16:04 moritz psch: it's not really a problem; we can just return an object that knows its stuff
16:04 psch moritz: right, but that currently doesn't work
16:05 psch m: class A { method Str() { "foo" }; method list() { <a b c> } }; for A.new { .say }
16:05 moritz psch: with m:g// and s///, the problem is that people have firm expectations
16:05 camelia rakudo-moar 6345f4: OUTPUT«A.new()␤»
16:05 psch hrm, i'd have to look up the exact example...
16:05 betterwo1ld FROGGS: a python example for a pipeline is at https://docs.python.org/2/library/subprocess.html#replacing-shell-pipeline
16:05 moritz psch: if we design a Proc::Status from the ground up, we can make a good API that people won't feel the need to abuse
16:06 betterwo1ld the code does the same as the bash code output=`dmesg | grep hda`
16:06 betterwo1ld that might be tricky in perl
16:07 psch http://irclog.perlgeek.de/perl6/2014-08-15#i_9188844 around here
16:07 betterwo1ld if you want to avoid calling the shell completely (which is the case if have user input to pass around)
16:07 psch anyway, +1 to "a good API that people won't feel the need to abuse"
16:08 pmurias joined #perl6
16:08 pmurias hi
16:08 FROGGS betterwo1ld: ahh yes, we can make that work with the model we just discussed
16:08 FROGGS hi pmurias
16:08 dalek nqp-js: 23ff160 | (Pawel Murias)++ | src/vm/js/bin/run_tests:
16:08 dalek nqp-js: Add test 69 to list of passing tests.
16:08 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/23ff1609d3
16:08 dalek nqp-js: cb0e297 | (Pawel Murias)++ | src/vm/js/mini-setting:
16:08 dalek nqp-js: Export all the HOWs from the mini-setting
16:08 psch pmurias o/
16:08 vendethiel pmurias++
16:08 moritz I think I'd prefer  run('dmesg', :out, :async).pipe-to('grep')
16:08 pmurias dalek needs to be made more resilent
16:09 dalek joined #perl6
16:10 vendethiel pmurias: well, chanserv punishes harshly
16:10 mr-foobar joined #perl6
16:10 bcode eh, it's not ChanServ; that's the ircd going all "EXTERMINATE"
16:10 bcode (sorry, I do some dev on IRC stuff so tend to be extra pedantic about that :P)
16:15 betterwo1ld if you need help, I should be able to come up with the low-level code to implement that piping stuff on Linux.  Don't know about Windows, though
16:16 FROGGS betterwo1ld: we use libuv for that on moarvm, and plain C for parrot... and then there is the jvm :o)
16:17 FROGGS doing it for moarvm shouldn't be that hard...
16:17 FROGGS except that I don't know how to merge stdout and stderr
16:18 moritz listen on out and err, open another stream and write to taht
16:18 smls lets get the design right first, though
16:19 FROGGS smls: well, the low level op is quite decoupled from what we expose in Perl 6 land
16:19 smls right
16:19 FROGGS and we do not have many options about what to do in the low level op
16:19 smls then, feel free to implement away... :)
16:21 mvuets RFC: S24, make skip($reason, *) behave like skip_rest($reason)
16:24 moritz mvuets: and then deprecated skip_rest
16:24 vendethiel bcode: sorry, was joking. I've done some myself, I can identify anope services etc
16:24 mvuets moritz: yes! (didn't dare to say that) (-:
16:26 araujo joined #perl6
16:27 smls FROGGS, moritz: Would it be useful if I compiled a structured overview of what the different potential use-cases and demands for running external commands are, what our «shell/open/pipe» currently support, what Python's «subprocess» module supports, and what would be possible with the ideas for extending «run»  mentioned by everyone above?
16:27 smls Do we have a wiki for that kind of thing?
16:27 FROGGS smls: ohh yes, please do
16:27 FROGGS no, we don't have a wiki anymore
16:30 smls a mailing list might be good for this too, but perl.perl6.language doesn't seem to be used much except by the commit bot...
16:32 smls So gisthub it is, I guess ;)
16:33 hoelzro FROGGS: maybe I should get TimToady's input? or is that not really necessary these days?
16:34 moritz smls: gisthub would be fine
16:36 FROGGS hoelzro: he'll review and can talk to you
16:36 smls Ok, though I won't finish it today. (There's no hurry, is there?)
16:36 FROGGS smls: no
16:40 smls btw. I might have mentioned this before, but I think it might be a good idea to start moving some of the Perl 6 design/development discussion to a more structured medium like a mailinglist
16:41 smls in IRC, things can get lost in chatter or if the "right" person wasn't online at the time and doesn't backlog diligently
16:41 smls and it makes it difficult for new people to find what was already discussed on a certain topic, and what the conclusions were
16:43 smls mailing lists provide a separate thread for each topic, so people don't need to "backlog" through unrelated noise to read up on the diuscussion on things they're interested in
16:43 smls Of course, the benefit of IRC is that it facilitates more personal/fun and also faster communication
16:44 smls So I wouln't want to discourage that either
16:44 psch i think the problem is that replicating irc discussions on some structured medium is tedious and as unfun as it gets
16:45 psch you won't ever get people to not discuss things on irc, so we'd need a scribe to order it by topic etc.
16:45 psch but then, we have the synopses on one hand and the clog on the other
16:45 smls Qt manages to do it
16:46 psch maybe a case could be made for "let's write down results in perl6/spec branches and see about merging them after implementations show usefulness" or similar
16:46 psch where "results" == "results from discussion that lead to implementable proposals"
16:46 smls they have people discussing things on IRC channels, or in person (if they work for the same company), but if no write-up was posted to the mailing list, any decisions reached are not official.
16:46 psch but then, i also have a feeling that these kinds of things have been discussed before...
16:47 psch which kind of proves the point of "structured write ups would be nice" :)
16:47 moritz smls: perl6-language was masterful in the discipline of drowning useful discussion in chatter
16:47 smls i.e. they use the motto "if the mailing list wasn't told, it didn't happen"
16:48 psch afaik we're working towards "what roast expects is what's official"
16:48 psch i.e. if there's no tests it didn't happen
16:48 moritz where "chatter" mostly meant overreaching discussions which didn't help the slightest
16:48 moritz I remeber asking about how a few methods should be named, and some answers proposed a far-reaching change to the object model itself
16:49 M_o_C joined #perl6
16:50 smls Well but now that Perl 6 is much closer to converging on 6.0, maybe the discussions would be more focused and useful?
16:50 moritz not on p6l
16:50 moritz maybe on a new mailing list that starts from scratch
16:51 smls fine by me :)
16:51 hoelzro hmm, now that I re-read that section of S06, it looks like a return parameter *always* declares a new variable
16:51 Ulti smls have you seen http://irclog.perlgeek.de/perl6 ?
16:52 hoelzro kind of like for @values -> $var { ... }
16:52 smls psch: "if there's no tests it didn't happen" only works for actual, final design changes.
16:52 smls "if the mailing list wasn't told, it didn't happen" also works for setting not-yet realized plans and goals
16:53 smls Ulti: Of course, but that's not the same :)
16:54 Ulti I dunno I find it about as easy to find something in there as I do mailing list logs :S
16:56 psch smls: right, but discussion (hopefully) leads to someone championing the implementation.  i'm proposing that the branch that implements also features a branch on perl6/spec that adjusts the synopses and of course the branch on perl6/roast
16:56 Ulti plus there is all the discussion that happens on bug tickets and github
16:56 psch in my perception lizmat++ is the most diligent about adjusting the synopses to her changes on roast and rakudo
16:56 psch but that's mostly because she's actually working on things that aren't quite spec
16:57 psch i for example am guilty of not writing a perl6/spec branch for changes to commandline parsing... :)
16:57 Ben_Goldberg joined #perl6
16:58 psch (there is the advent post thingy at the moment, though...)
17:04 psch hm, there's the obvious gap in the "hopefully"... i think i'm convinced that there should be a grouping of discussions and their result
17:05 psch smls++
17:06 smls btw I also wouldn't let bugtracker/commit bots post to the list, as that just adds noise
17:06 FROGGS hoelzro: so it is consistent with every other variable name in a signature
17:06 hoelzro FROGGS: right, that makes a lot of sense to me
17:07 FROGGS yeah, to me too :o)
17:07 hoelzro I'm just wondering if one would ever want to use an outer variable as a return variable, *without* shadowing it
17:07 hoelzro that seems kind of evil to me
17:07 Akagi201 joined #perl6
17:07 smls One mailinglist thread per topic, starting with a link to a pre-existing discussion if applicable, followed by replies/discussion, and ending with a link to a commit, would be ideal
17:07 FROGGS hoelzro: there's still OUTER::<$foo> and CALLER::<$bar>
17:08 smls When a commit happened, the discussion is (ideally) already over, so it seems silly for a bot to start a thread about it *then*.
17:08 hoelzro ah, good point
17:09 FROGGS hoelzro: which already look a bit suspicious as they should :o)
17:09 hoelzro I think that that level of explicitness is good
17:09 hoelzro indeed
17:10 moritz smls: we're operating on "foregiveness is beter than permission"
17:10 moritz smls: so that's not quite right
17:18 kurahaupo joined #perl6
17:18 lucas_ joined #perl6
17:19 lucas_ hi
17:19 lucas_ I agree with some of the things smls++ is saying about IRC vs. mailing list
17:20 lucas_ Have you peolpe saw the PHP RFC voting process? Having a web form like "Do you agree? Yes/No" really works for them...
17:21 lucas_ I've proposed having a MediaWiki instance, but that doesn't seem to be of interest to some.
17:22 lucas_ *people
17:24 rindolf joined #perl6
17:24 moritz except that a majority vote on individual features won't lead to cohesive design
17:24 moritz it's the old "design by comittee" fallacy
17:30 hoelzro m: my sub foo(Str $) {}; my sub call-stringy(&f(Str)) { f(''); }; call-stringy(&foo)
17:30 camelia rakudo-moar 6345f4: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &f␤  in sub call-stringy at /tmp/Fl84QLq_aG:1␤  in block <unit> at /tmp/Fl84QLq_aG:1␤␤»
17:30 hoelzro rakudo bug?
17:30 hoelzro or am I doing it wrong?
17:32 FROGGS bug and already ticketed lately
17:32 hoelzro ok, thanks FROGGS
17:32 * hoelzro searches
17:34 hoelzro wow, over a month ago
17:34 FROGGS https://rt.perl.org/Public/Bug/Display.html?id=123116
17:40 dalek specs: caacd06 | (Rob Hoelz)++ | S06-routines.pod:
17:40 dalek specs: Clarify return variables' behavior wrt. shadowing
17:40 dalek specs: review: https://github.com/perl6/specs/commit/caacd0609f
17:41 masak moritz: Haskell was designed by committee. it turned out quite well. but that's the only case I know.
17:42 masak moritz: oh, and the EcmaScript 6 committee, TC-something, is doing fairly well too.
17:48 hoelzro m: my sub foo(Str $) {}; my sub call-stringy(&f:(Str)) { f(''); }; call-stringy(&foo)
17:48 camelia rakudo-moar 6345f4: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
17:48 hoelzro huh
17:48 hoelzro is it &f(Str) or &f:(Str) in the signature?
17:48 hoelzro roast/specs seem to indicate the latter
17:49 moritz m: say &f(Str).^name
17:49 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/CP60J69q40â�¤Undeclared routine:â�¤    &f used at line 1â�¤â�¤Â»
17:49 moritz m: sub f(&a(Str)) { }; say &f.signature.params[0].perl
17:49 camelia rakudo-moar 6345f4: OUTPUT«&a (Str)␤»
17:52 rindolf joined #perl6
17:52 pmurias lucas_: I'm not sure PHP is something we should take design advice from ;)
17:54 lucas_ pmurias: Open source development issues are common to all projects. I'm not talking about the language. :)
17:56 mayuresh joined #perl6
17:56 mayuresh hello  :)
17:58 mayuresh anyone around?
17:58 japhb_ masak, any thoughts on the (admitedly nebulous) macro idea I had last night?
17:58 mayuresh okay.
17:58 mayuresh any rationale for using the virtual machine + compiler approach for perl6?
17:58 mayuresh instead of the old style interpreter based one?
17:58 xinming_ joined #perl6
17:59 pmurias speed?
18:00 mayuresh of execution! or development?
18:00 pmurias executiom
18:00 pmurias * execution
18:00 mayuresh hmnn
18:00 psch doesn't perl5 also run on what is essentially a vm?
18:00 pmurias yes
18:00 japhb_ psch: It's a well-tuned interpreter.
18:01 mayuresh well, in the same vein, everything on a computer is always interpreted by the processor.
18:01 mayuresh ;)
18:01 smls pmurias: Well, Perl 6 isn't exactly beating Perl 5 when it comes to speed... :P
18:01 pmurias I think we are beating bash
18:01 mayuresh :D
18:01 pmurias which is an example of an old-style interpreter ;)
18:01 smls oh
18:01 psch japhb_: right, so there is a distinction that i would recognize if i was more familiar with both terms
18:02 mayuresh would the community be averse to accepting a Perl6 interpreter?
18:02 psch s/$/?/
18:02 mayuresh written in c89?
18:02 japhb_ mayuresh: Are you planning to write one?
18:02 mayuresh portable.
18:02 mayuresh japhb_, yes
18:02 psch mayuresh: the official position is "if it passes the spectest it's perl6"
18:02 mayuresh sounds fair enough
18:02 psch mayuresh: see those at github.com/perl6/roast
18:02 japhb_ You're quite welcome to write a new implementation of Perl 6.  That's been officially OK since the start.
18:03 mayuresh oh, i thought parrot + rakudo
18:03 pmurias mayuresh: what do you regard as the distinction between a vm and an interpreter?
18:03 mayuresh are the only official stuff
18:03 psch that reminds me, there was someone who was implementing perl6 in c/c++ some weeks/months back..?
18:03 mayuresh pmurias: oh, someone's already started?
18:03 mayuresh dang
18:03 mayuresh no worries
18:04 mayuresh i will still start work as soon as i finish my training in comp sci
18:04 japhb_ Warning: implementing all of Perl 6 is A LOT OF WORK.
18:04 pmurias moarvm is written in c
18:04 mayuresh which is just 18 months away
18:04 mayuresh somehow, VMs make me feel very uncomfortable
18:04 mayuresh a machine layered upon another machine
18:05 japhb_ mayuresh: Probably easier to write an interpreter that can run NQP code.
18:05 mayuresh nqp? is that "not quite perl"?
18:05 pmurias mayuresh: and how will your interpreter run? in clockwork?
18:05 mayuresh i have already been told to write an interpreter as a rite of passage at the end of my training
18:06 mayuresh am still 18 months away from starting off
18:06 japhb_ mayuresh: yes.  It's another layer.  :-)  Basically it's a restricted version of Perl 6 that's smaller, easier to optimize, and tuned for writing compilers.
18:06 mayuresh so we go from code, execute
18:06 mayuresh to code, compile, run in a VM approach
18:06 mayuresh sounds very painful to mme
18:07 mayuresh similar to java and c#
18:07 pmurias and any sane language
18:07 japhb_ jnthn++ has some good presentation slides on why this layering is a good thing.
18:07 psch heh, WhateverCode in c++ *shudder*
18:08 mayuresh hey, even i shudder about c++ now-a-days
18:08 mayuresh c++ 11/14 is so big
18:08 mayuresh c89 still rocks. :)
18:08 japhb_ mayuresh: Think of the network layering model, that means e.g. that applications don't have to write raw ethernet frames.  We're doing the same for compilers.
18:08 mayuresh hmnn
18:09 mayuresh does that land in the same category as a the .net approach?
18:09 japhb_ It's about trading off different forms of complexity at each layer.
18:09 mayuresh don't layers add in trauma, by way of excessive computations?
18:09 japhb_ .net had closer to JVM type reasons for existance.
18:10 japhb_ We're closer to talking about PyPy.
18:10 mayuresh just read up about pypy
18:10 mayuresh looks very interesting
18:10 pmurias mayuresh: the layers allow doing things efficently and correctly
18:10 mayuresh though not all that different from java hotspot vm
18:11 japhb_ Sure, and any situation in which you have a JITting interpreter written in the same language it interprets.
18:12 japhb_ The distinction is between an interpreter written in a separate language, and a bootstrapped interpreter (written in the language it implements, or a close variant like RPython or NQP)
18:13 mayuresh or Squeak (Smalltalk)
18:14 japhb_ (C by the way being an example of a bootstrapped *compiler* instead of bootstrapped *interpreter*)
18:14 mayuresh yeah
18:15 mayuresh hmnn
18:15 mayuresh i have to do that project any ways
18:15 mayuresh would prefer to work on perl6
18:15 psch hm, can't find them
18:15 psch mayuresh: you can work on perl6 for fun on the side :)
18:16 mayuresh yes, but i typically take things too seriously
18:16 * TimToady hugs mayuresh
18:16 mayuresh :)
18:16 TimToady hugme: hug mayuresh
18:16 * hugme hugs mayuresh
18:16 mayuresh hug timtoady
18:17 mayuresh hugme: hug TimToady
18:17 * hugme hugs TimToady
18:17 mayuresh mayuresh: hug TimToady
18:17 mayuresh heh, this IRC thing is neat :)
18:17 mayuresh though, mailing lists are nicer. ;)
18:17 TimToady we take our fun way too seriously :)
18:18 mayuresh :)
18:18 mayuresh okay
18:18 mayuresh so see you people around
18:18 mayuresh need to hit bed, almost close to mid-night
18:18 japhb_ TimToady: Any thoughts on my (nebulous and potentially crazy) macro idea from last night?
18:18 japhb_ o/ mayuresh
18:19 TimToady \o
18:19 mayuresh :)
18:19 TimToady japhb_: made me want to rewrite them as slang tokens, but I fell asleep
18:20 japhb_ Hmmm.  So either too simple examples to properly motivate the idea, or already existing syntax works better.  Dang.
18:22 TimToady it might be okay for the intermediate macro stage where we assume a macro is always passed in function call form
18:22 TimToady it's sort of a C macro interface
18:23 TimToady it's like it's allowing an implicit 'is parsed' on each argument, but then requiring the name(a,b,c) form around those
18:24 TimToady we might well want some sugar for that form
18:24 FROGGS joined #perl6
18:25 BenGoldberg joined #perl6
18:26 rindolf joined #perl6
18:27 TimToady but to my mind it's sugar for something like slang token { <identifier> <args> { quasi { ... } } where we provide some easy way to tear into args
18:27 psch ah, found it at last
18:28 psch https://github.com/BizarreCake/Arane
18:28 Ben_Goldberg joined #perl6
18:28 japhb_ I was trying to muster by thoughts for a non-C-style macro form, but I got stuck in trying to figure out how it would fit into the parse stream if e.g. it didn't act as a unified term, or could appear in a place that we've otherwise tightly constrained.  That was the WIP part
18:28 japhb_ TimToady: Yeah, gotcha
18:28 japhb_ *my thoughts
18:28 psch .tell mayuresh https://github.com/BizarreCake/Arane is the previous project i mentioned.  it's written in C++11 though, not C89
18:28 yoleaux psch: I'll pass your message to mayuresh.
18:34 bowtie joined #perl6
18:36 Mso150 joined #perl6
18:37 TimToady well, if we had a helper macro like slang token argh { <identifier> <args> { make \($<identifier>, <args>.list) } then you could use that in another slang token interval { <argh> { given $<argh>.made -> ¤base, ¤range { quasi { ... } } } }
18:37 TimToady that's what it'd be sugar for, really
18:38 kaare_ joined #perl6
18:38 rindolf joined #perl6
18:40 TimToady of course since <args> is looking for comma-separated expressions, you can't use that sugar for other syntax, but I said that already
18:41 TimToady In the Perl 6 context, "sugar" is not always pejorative. :)
18:41 mvuets re mayuresh' initiative on an interpreter in c: i think there was a c compiler in the very beginning, even before pugs, no?
18:42 masak I'm still largely unconvinced about the need for a new sigil. seems to me with them we still have all the problems we did without them.
18:42 TimToady fine use \base, \range to show it's not a sigil, then use ¤ inside the quasi as an escape char, since it's not really a sigil
18:43 masak what we do need is (a) a way to make any syntactic category a macro argument, and (b) a way for any syntactic category to figure as an unquote.
18:43 TimToady but I kind like the consistency
18:43 TimToady *kinda
18:43 TimToady yes, we also want that sugar
18:44 TimToady without forgetting that it *is* sugar
18:45 TimToady macros are to make up for stupid compiler writers: "Darn it, why didn't the standard compiler provide this capability already!?!"
18:45 japhb_ Hmmm, thinking about your comments at 10:37 TimToady, I kinda like that desugaring.  And also having the sugar, because I wouldn't want to write the desugared form all the time.  :-)
18:48 TimToady the argh rule is, of course, standing in for a more general ability to query the syntax tree for the bits we just parsed, and returning those bits in a form that can easily be bound to unquotey things
18:48 rindolf joined #perl6
18:49 TimToady that is, what the current compiler is doing via QAST manipulations, but we want to make easier, for some definition that excludes things that should merely be possible.
18:50 masak I'm still grappling with the QAST/Qtree thing.
18:51 masak we're definitely serving two masters with that one.
18:51 masak both QAST and Qtree are primary, "master models", for what they do.
18:51 * TimToady wonders if it's the same issue as not having a compiler that's actually written in P6 yet
18:52 masak it's made slightly easier by QAST being read-only. but Qtree keeps a live bidi connection to its source.
18:53 rindolf joined #perl6
18:54 TimToady QAST is largely used read-only, but then that's true of pretty much anything sane
18:54 TimToady QAST can be annotated, and can have chidlren added/removed
18:54 TimToady so I don't think of it as read-only
18:55 masak there's a particular degree of squinting that can be applied to be able to claim that Qtree is similarly read-only.
18:55 TimToady the main problem with QAST as far as I'm concerned is that it's very hard to get good error messages out of it in nqp when things go wrong
18:55 TimToady but that's more of an nqp thing than a QAST thing
18:57 * TimToady should study up on Qtree; do you have a good ref?
18:57 masak I haven't published anything on it yet.
18:57 masak expect things to trickle out in December.
18:59 TimToady trickle is about all any of us can manage, except for jnthn++ somehow :)
19:01 masak I'm using https://github.com/JetBrains/intellij-community/tree/master/java/java-psi-api/src/com/intellij/psi as a bit of an inspiration. p6-is-not-java caveats apply, though.
19:02 masak so it might be better to look at https://github.com/JetBrains/intellij-community/tree/master/python/psi-api/src/com/jetbrains/python/psi actually. I plan to look at that next.
19:03 masak but this is my main insight/inspiration with the kind of introspection/analysis/manipulation of source we want to make from macros -- it's an awful like what state-of-the-art IDEs do with refactors and the like.
19:07 * moritz wonders if rakudo's Action.pm would benefit in readability from a Q-Tree
19:07 moritz currently we go from parse tree straight to AST
19:07 moritz but that makes some things difficult
19:07 moritz like, introspecting the AST if some piece is what we think it should be
19:08 moritz dunno if that's still the case, but I remember when dynamic variables were not emitted as a QAST::Var, but rather as a subroutine call
19:09 moritz which means that any checks for a variable needed special-casing for dynamic vars
19:09 masak moritz: I'm kinda glad you say that. looking forwards, what I feel the most trepidation about is how Actions.pm will be affected by Qtree.
19:11 gfp joined #perl6
19:11 moritz the QAST-level optimizer might be a bit less awkward on Q-Trees too
19:17 TimToady it's true that QAST has to do a lot of introspection of strings at the moment, which might (or might not) be improved by using the type system more heavily
19:18 ugexe like a bright raspberry tang, followed by that strong coffee bite
19:18 masak well, QAST has one advantage that Qtree doesn't have, and never will have: QAST optimizes for uniformity. it has surprisingly few node types.
19:18 masak kind of like binary has surprisingly few types of digit. :)
19:20 gfp left #perl6
19:20 TimToady the other advantage of QAST is that you don't have to evolve your AST types in parallel with your Grammar and your Actions, so it's more easily extensible in that sense, at the expense of requiring more introspection later
19:20 gfp joined #perl6
19:20 gfp left #perl6
19:21 masak +1
19:21 masak though "evolve your AST types" really only happens if you're a slang settler.
19:22 TimToady it's all slangs, this is Perl 6
19:24 moritz it's all about the slang, 'bout the slang, no reparse
19:24 * moritz hums
19:24 TimToady long term, I still see nqp/QAST largely as scaffolding
19:25 TimToady but that's post 6.0, so I'm fine with Qtrees sitting in the laboratory for now
19:26 masak nqp/QAST=scaffolding is a thrilling view. I just hope it works out performance-wise.
19:27 * araujo should get some time today to play with perl6
19:27 masak araujo! \o/
19:27 TimToady my gut feeling is that we have a much better chance at optimizing polymorphism than we do introspection
19:27 araujo question: do we have already some http-request/methods lib?
19:27 dalek Heuristic branch merge: pushed 39 commits to panda/CPAN by FROGGS
19:27 araujo masak, hello! :)
19:27 masak araujo: I'm toying with a mini-language, and that made me think of you! :)
19:28 TimToady but that's because it's more work to build the extensible type system that would replace the introspection of nodes
19:28 araujo masak, hahah really? :D
19:28 BenGoldberg_ joined #perl6
19:28 masak ya.
19:28 araujo masak, what is that mini language all about? and where can I clone that repo? ;)
19:28 FROGGS araujo: https://github.com/sergot/http-useragent/
19:28 masak araujo: not a repo yet, just a secret gist. stay tuned.
19:28 araujo FROGGS, thanks!, checking....
19:28 araujo masak, \o/
19:29 araujo masak, keep dropping updates here, so I can check it later :P
19:30 psch FROGGS: i didn't quite get anywhere with the nativecallcast stuff.  for some reason i get P6Opaques that don't support positional access, which means i can't get to their typeinfo and thus don't know what to cast them to
19:31 psch additionally, the runtime type of the args seems to actual be Object, not SixModelObject, which might be from invokedynamic somehow
19:32 FROGGS psch: do you get your hands on the StorageSpec of the input object?
19:33 psch i need the STable for that, which i haven't found out how to get either
19:33 FROGGS hmmmm
19:33 psch there's like 3 layers of indirection at work here hah
19:34 FROGGS I guess casting the thing to an SixModelObject does not do the trick? :o)
19:34 FROGGS :/
19:34 Ugator joined #perl6
19:34 psch i'm writing bytecode that calls a static method that parses argument types from runtime and tries to dispatch to a method that's been written before as well...
19:34 psch or somewhat like that, i'm actually losing focus a little for the past half hour
19:35 psch casting directly from Object to SixModelObject gives me the same trouble with at_key_boxed
19:37 colomon joined #perl6
19:40 masak I think I'm going to change the subject of tomorrow's Advent post.
19:40 masak I put in there "best of RT". I might still write about that, if I claim another Advent post day.
19:40 masak but for tomorrow I want to write about .roll, which apparently never got a blog post.
19:40 masak does that sound OK? :)
19:43 dalek mu: 75af2f1 | masak++ | misc/perl6advent-2014/schedule:
19:43 dalek mu: [advent-2014/schedule] change topic
19:43 dalek mu: review: https://github.com/perl6/mu/commit/75af2f13fe
19:45 raydiak good morning #perl6
19:45 masak top o' the evening to you, raydiak
19:45 masak perl6: enum Die <⚀ ⚁ ⚂ ⚃ ⚄ ⚅>; say Die.roll
19:45 camelia rakudo-moar 6345f4: OUTPUT«⚃␤»
19:45 camelia ..rakudo-parrot 6345f4: OUTPUT«⚀␤»
19:46 psch raydiak \o
19:46 raydiak masak++ # teaching me the word "antipodal" :)
19:46 masak perl6: enum Die <⚀ ⚁ ⚂ ⚃ ⚄ ⚅>; say Die.roll xx 2
19:46 camelia rakudo-parrot 6345f4: OUTPUT«⚃ ⚄␤»
19:46 camelia ..rakudo-moar 6345f4: OUTPUT«⚀ ⚄␤»
19:46 raydiak o/ psch
19:47 masak raydiak: wow, I have no memory of that.
19:47 masak raydiak: maybe you're confusing me with someone on the other side of the planet? :P
19:47 raydiak masak: http://irclog.perlgeek.de/perl6/2014-11-26#i_9721899
19:47 masak ah :D
19:48 raydiak granted, I'm a few days behind...I kinda like it back here though :)
19:49 ingy joined #perl6
19:50 raydiak I am likely to start another major revision of math::symbolic soon, and was wondering if anyone had any suggestions or ideas in general, that I might factor in as I do so
19:51 raydiak mainly it needs better-defined structure and a real api more than features atm, but I figured it'd be smart to try to look towards the future as I re-lay the groundwork
19:53 TimToady m: say ('⚀' .. '⚅').roll xx 5
19:53 camelia rakudo-moar 6345f4: OUTPUT«⚁ ⚃ ⚂ ⚄ ⚄␤»
19:54 psch FROGGS++: casting to SixModelObject actually lets me get the STable... thanks :)
19:54 FROGGS \o/
19:54 telex joined #perl6
19:54 psch i think i should leave it at that for today :)
19:54 TimToady ooh, small straight
19:54 FROGGS *g*
19:55 psch just checking if getting the StorageSpec works as expected right now and then i'll do something less brain-intensive :D
19:55 TimToady masak: ^^ note a simple range works here
19:56 masak TimToady: yes.
19:56 masak TimToady: I just like .roll on enums :>
19:56 masak TimToady: and I liked the look of `Die.roll` ;)
19:56 TimToady m: say ('⚀' .. '⚅').roll(5)  # more efficient
19:56 camelia rakudo-moar 6345f4: OUTPUT«⚅ ⚄ ⚂ ⚅ ⚁␤»
19:56 TimToady doesn't recalculate the range
19:57 masak perl6: enum Die <⚀ ⚁ ⚂ ⚃ ⚄ ⚅>; say Die.roll(5)
19:57 camelia rakudo-moar 6345f4: OUTPUT«⚂ ⚂ ⚅ ⚁ ⚅␤»
19:57 camelia ..rakudo-parrot 6345f4: OUTPUT«⚁ ⚂ ⚀ ⚁ ⚀␤»
19:57 TimToady though in theory that range should constant fold
19:57 masak aye. thanks.
20:01 psch welp, not quite... "__P6opaque__66 cannot be cast to org.perl6.nqp.sixmodel.reprs.P6Opaque"
20:02 psch but yeah, no more today o/
20:02 Ugator joined #perl6
20:10 hoelzro is there a way to express &:(Str, Int, ...) as a distinct type? something like my subset StartTagHandler of &:(TagName, TagAttrs) where True
20:11 dalek rakudo/nom: 6b53d38 | (Tobias Leich)++ | src/core/CompUnitRepo/Local/Installation.pm:
20:11 dalek rakudo/nom: fix last .IO.path.basename leftover
20:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6b53d381e0
20:11 dalek Heuristic branch merge: pushed 26 commits to panda/eleven by FROGGS
20:13 vendethiel hoelzro: you don't need a where
20:13 TimToady how come pl6anet carried the first two advent entries, but none since?
20:13 geekosaur hm? I saw more than two
20:13 raydiak I'm looking at all of them right now
20:13 TimToady hmm, maybe my feed is busted somehow
20:14 FROGGS TimToady: you're looking at /test, right?
20:14 hoelzro vendethiel: ah, ok
20:14 TimToady oh, I'm looking at /test
20:14 FROGGS :o)
20:14 hoelzro I'm guessing that example wouldn't work, though?
20:14 hoelzro m: my subset StartTagHandler of &:(Str)
20:14 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/G3NNWf6tYOâ�¤Missing semicolon.â�¤at /tmp/G3NNWf6tYO:1â�¤------> [32mmy subset StartTagHandler of [33mâ��[31m&:(Str)[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤Â»
20:16 masak tomorrow's advent post draft: https://gist.github.com/masak/b0d9fdb8e7ac9802f63d
20:16 masak feel free to review and comment.
20:16 * masak writes a md->wordpress converter
20:18 FROGGS lizmat: I can rebootstrap panda/eleven into a json blob using that config: https://gist.github.com/FROGGS/e9ef49b8fd8aab1a1149
20:18 FROGGS lizmat: now I try to unborke installing a module
20:20 Ugator joined #perl6
20:22 dalek panda/eleven: 06a0f2f | (Tobias Leich)++ | META.info:
20:22 dalek panda/eleven: add Panda::Reporter to META.info
20:22 dalek panda/eleven: review: https://github.com/tadzik/panda/commit/06a0f2f426
20:23 Ugator joined #perl6
20:24 TimToady masak: I wonder if you skip to the bag/enum magic a bit too soon; maybe you should demo a list roll for those who were too lazy to click through to the old blog
20:24 raydiak m: sub foo (Int $, Str $) { }; sub bar () {}; my subset StartTagHandler of Code where {.arity && .signature ~~ :(Int, Str)}; say &foo ~~ StartTagHandler; say &bar ~~ StartTagHandler
20:24 camelia rakudo-moar 6345f4: OUTPUT«True␤False␤»
20:24 masak ah, yes.
20:24 masak TimToady: good suggestion. I'll see what I can do.
20:28 Ben_Goldberg joined #perl6
20:28 dalek rakudo/nom: 4a9ebae | (Tobias Leich)++ | src/core/CompUnitRepo.pm:
20:28 dalek rakudo/nom: fix CompUnitRepo.files
20:28 dalek rakudo/nom:
20:28 dalek rakudo/nom: When asking for an installed file (i.e. a script) then we basically ask for a filename, and
20:28 dalek rakudo/nom: optionally for distname/auth/version. In contrast to asking for packages where we tend to ask
20:28 dalek rakudo/nom: for packagename, and optionally for a filename/auth/version.
20:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a9ebae1e2
20:28 TimToady raydiak: surely the .arity check is redundant
20:28 masak TimToady: updated with example: https://gist.github.com/masak/b0d9fdb8e7ac9802f63d
20:29 raydiak TimToady: I'm golfing the bug now, gives an error without it about trying to shift off a parcel when it hits bar
20:29 raydiak m: sub foo (Int $, Str $) { }; sub bar () {}; my subset StartTagHandler of Code where {.signature ~~ :(Int, Str)}; say &foo ~~ StartTagHandler; say &bar ~~ StartTagHandler
20:29 camelia rakudo-moar 6345f4: OUTPUT«True␤No such method 'shift' for invocant of type 'Parcel'␤  in method ACCEPTS at src/gen/m-CORE.setting:11123␤  in block <unit> at /tmp/AKzNdXtk2P:1␤␤»
20:30 sqirrel joined #perl6
20:30 TimToady cool bug
20:30 TimToady but only 'cuz bugs are cold-blooded...
20:31 masak surely it can be golfed further... :)
20:31 FROGGS \o/
20:31 FROGGS panda/eleven works again
20:31 raydiak oh yeah, I just don't know all the little corners of the syntax for type constraints is mainly whats slowing me
20:31 FROGGS with not much effort
20:32 FROGGS lizmat: I can install modules now with panda/eleven
20:32 colomon \o/
20:32 raydiak m: sub bar () {}; say &bar ~~ (Code where {.signature ~~ :(Int, Str)}) # should this work?
20:32 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/hQK2Ow1BVuâ�¤Two terms in a rowâ�¤at /tmp/hQK2Ow1BVu:1â�¤------> [32msub bar () {}; say &bar ~~ (Code [33mâ��[31mwhere {.signature ~~ :(Int, Str)}) # sho[0mâ�¤    expecting any of:â�¤        pos…»
20:32 FROGGS @all: with panda/eleven one gets *-m, *-j and *-p executables (scripts) for free for every script that gets installed
20:33 TimToady m: sub foo (Int $, Str $) { }; sub bar () {}; my subset StartTagHandler of Code:(Int, Str); say &foo ~~ StartTagHandler; say &bar ~~ StartTagHandler
20:33 camelia rakudo-moar 6345f4: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
20:33 raydiak ooh FROGGS++ :)
20:34 TimToady say Code:(Int, Str).WHAT
20:34 FROGGS and one also gets .bat files on windows that DTRT :o)
20:34 TimToady m: say Code:(Int, Str).WHAT
20:34 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/W7WNKxrLzO�You can't adverb that�at /tmp/W7WNKxrLzO:1�------> [32msay Code:(Int, Str)[33m�[31m.WHAT[0m�»
20:34 TimToady that form is supposed to work someday
20:35 raydiak m: sub bar () {}; say &bar ~~ :(Int, Str) # this, however, isn't broken
20:35 camelia rakudo-moar 6345f4: OUTPUT«False␤»
20:36 Ugator joined #perl6
20:36 TimToady m: sub foo (Int $, Str $) { }; say &foo ~~ :(Int, Str)
20:36 FROGGS m: sub bar () {}; say &bar.signature ~~ :(Int, Str)
20:36 camelia rakudo-moar 6345f4: OUTPUT«False␤»
20:36 camelia rakudo-moar 6345f4: OUTPUT«No such method 'shift' for invocant of type 'Parcel'␤  in method ACCEPTS at src/gen/m-CORE.setting:11123␤  in block <unit> at /tmp/74y7tklnQG:1␤␤»
20:36 raydiak m: sub bar () {}; subset Foo where :(Int, Str); say &bar ~~ Foo # works
20:36 camelia rakudo-moar 6345f4: OUTPUT«False␤»
20:37 raydiak m: sub bar () {}; subset Foo where .signature ~~ :(Int, Str); say &bar ~~ Foo # doesn't
20:37 camelia rakudo-moar 6345f4: OUTPUT«No such method 'shift' for invocant of type 'Parcel'␤  in method ACCEPTS at src/gen/m-CORE.setting:11123␤  in method ACCEPTS at src/gen/m-CORE.setting:3146␤  in any accepts_type at src/gen/m-Metamodel.nqp:2890␤  in method ACCEPTS at src/gen/m-CORE.…»
20:37 TimToady ain't broken, but ain't fixed either :)
20:38 TimToady at the moment signatures only bind to Captures, not other signatures
20:39 raydiak m: sub bar (Int $, Foo $) {}; subset Foo where :(Int, Str); say &bar ~~ Foo
20:39 camelia rakudo-moar 6345f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/PoC6M05RMB�Invalid typename 'Foo' in parameter declaration.�at /tmp/PoC6M05RMB:1�------> [32msub bar (Int $, Foo[33m�[31m $) {}; subset Foo where :(Int, Str); sa[0m�»
20:39 raydiak m: sub bar (Int $, Str $) {}; subset Foo where :(Int, Str); say &bar ~~ Foo
20:39 camelia rakudo-moar 6345f4: OUTPUT«False␤»
20:39 raydiak ^ but then it doesn't match at all
20:39 TimToady note that the form you say "works" is returning returning false
20:39 TimToady as I said, it ain't fixed
20:39 raydiak okay I'm catching up :)
20:40 masak m: $_ = "AB"; s[(\w)(\w)] = "$1$0"; say $_
20:40 camelia rakudo-moar 6345f4: OUTPUT«BA␤»
20:40 TimToady it's only return False because it says I dunno how to match that...
20:40 raydiak so yeah it's just broken when you do it right I guess
20:41 TimToady it at least shouldn't blow up instead of producing the wrong answer :)
20:43 * TimToady keeps backlogging unsuccessfully, and now it's past lunchtime  :|
20:43 TimToady y'all keep saying things that are too interesting
20:43 smls .oO( Dwarfs.roll: http://i.imgur.com/TJY8tOj.jpg )
20:44 nwc10 as in, lunch has been and gone, without you?
20:44 mvuets The 1st advent post on the state of Perl 6 has been featured in the recent issue of http://thechangelog.com/
20:45 Akagi201 joined #perl6
20:45 mvuets Also this podcast with Ovid on Perl 5 and Perl 6 http://thechangelog.com/133/ (haven't listened to yet)
20:48 El_Che mvuets: I just did :)
20:50 masak a short converter script for people who want to write their post in Markdown but convert it to Wordpress broken HTML: https://gist.github.com/masak/0636c964eb17725da38b
20:51 raydiak m: sub foo (Int $, Str $, Num $) { }; sub bar () {}; my subset StartTagHandler of Code where {.signature.params[0,1]».type eqv (Int, Str)}; say &foo ~~ StartTagHandler; say &bar ~~ StartTagHandler; # since the original question included a ", ...", this is what I ended up with
20:51 camelia rakudo-moar 6345f4: OUTPUT«True␤False␤»
20:51 masak (I know it's incomplete. it's just enough to convert tomorrow's post)
20:51 masak Necessity-Driven Development :)
20:52 * moritz just writes in pod and uses pod2html; good enough
20:52 masak to each his own.
20:52 masak I find Pod quite verbose, too.
20:53 mvuets El_Che: did you like it?
20:53 moritz I mostly use prose and code blocks; not too much verbosity there
20:54 smls I wrote mine in HTML
20:54 masak Post scheduled for: Dec 7, 2014 @ 0:01
20:54 mvuets masak: he we go - an another useful Perl 6 program unrelated to the language!
20:54 smls and wrote a Perl 6 script to help syntax-highlight it: https://github.com/smls/undef/blob/master/scripts/pygmentize-code-tags.p6
20:54 smls :P
20:54 masak smls: did you mean: 'broken Wordpress HTML' ?
20:55 masak tomorrow's advent post is scheduled.
20:55 smls yes, "HTML that keeps in mind that Wordpress will still add <p></p> and <br> tags and prettify quotes/dashes"
20:56 smls what else does it "break"?
20:56 El_Che mvuets: I think he did a good job marketing perl[56] for non-perl people
21:02 masak smls: that's about it, I think.
21:02 masak smls: it also auto-converts smilies, IIRC.
21:03 kurahaupo it would help if WordPress' editor had paragraph spacing turned on, to discourage people from the awful habit of hitting <enter> twice to make paragraph breaks
21:03 masak here's a thought that just struck me: I know we are Not Done Yet with programming, because I'm using a once-only script to convert md->html, but it's really a "lens problem", and it's kinda silly that after the conversion, the two copies start to diverge.
21:04 moritz we're not done yet by far :-)
21:07 masak that's also true.
21:07 Mso150 joined #perl6
21:07 tinyblak joined #perl6
21:07 FROGGS masak: why don't you release your converter? I guess the effort to do that is not that huge, and somebody else can improve it if needed
21:08 masak FROGGS: dunno. I feel it's too niche.
21:09 tinyblak_ joined #perl6
21:09 FROGGS hmmm, yeah, maybe
21:11 masak I mean, I see what you're saying. wrap it in a module. ship it.
21:11 masak someone else is welcome to. ;)
21:11 FROGGS *g*
21:11 masak consider the code to be in the public domain. anyone can take it and relicense it.
21:13 moritz what pod and markdown have in common is that I can't remember their link syntax after a few weeks of not using it
21:13 moritz s/it/them/
21:13 FROGGS true
21:13 masak moritz: Markdown is probably the first one that I internalized. but I agree it's completely arbitrary.
21:14 masak for me, the mnemonic became "I could perfectly credibly put (...) with a url in them in ordinary text, after a description"
21:14 moritz was (link)[text] or [link](text) or [text](link) or (text)[link] ?
21:14 masak which helps me remember both the order of text vs link, and where the parens go.
21:15 masak Markdown has the nice design principle that it should "look like an email". that works in its advantage here for the link syntax.
21:16 Ugator1 joined #perl6
21:19 tinyblak joined #perl6
21:26 mvuets is it doable and sensible to parse markdown with grammars?
21:28 BenGoldberg_ joined #perl6
21:28 FROGGS I'd say so
21:31 moritz probably with a mixture of grammars and paragraph-based processing
21:31 moritz (though I don't know markdown enough)
21:39 raydiak what kinds of things are less sensible to parse with grammars?
21:40 masak moritz: I'd parse CommonMark, as it looks very regular and like a good target for a grammar.
21:42 FROGGS raydiak: html
21:43 raydiak FROGGS: why?
21:45 FROGGS raydiak: because it is usually invalid html
21:45 raydiak ah excellent point
21:45 FROGGS libxml does a good job of building a dom based on that
21:47 raydiak mase sense...guess it's often a bad idea to roll your own in any form when there is a more specialized solution available
21:50 * raydiak has a habit of reinventing wheels...more for the experience points wrt wheels than for the resulting product
21:52 FROGGS yeah, me too
21:52 FROGGS you just need to know when to stop :o)
21:53 raydiak aye, I suspect I spend well more than half my time chasing my tail in circles around my less-than-perfectly-circular wheels :)
21:53 smls FROGGS: Sometimes you don't need (or want) to build a DOM though
21:54 smls my script (which I linked above) finds <code></code> elements using a pretty simple grammar, and yet it can deal with a lot of broken HTML
21:54 smls by simply ignoring it :)
21:55 Ugator joined #perl6
21:56 FROGGS ohh yes, that's fine of course
22:00 FROGGS gnight
22:01 smls night
22:09 masak 'night, #perl6
22:09 araujo joined #perl6
22:16 BenGoldberg joined #perl6
22:19 denis_boyun_ joined #perl6
22:34 * vendethiel doesn't like refactoring 2004 code
22:34 KCL_ joined #perl6
22:35 Ben_Goldberg joined #perl6
22:41 colomon joined #perl6
22:44 rurban1 joined #perl6
23:08 BenGoldberg joined #perl6
23:26 denis_boyun_ joined #perl6
23:34 djanatyn joined #perl6
23:35 Ben_Goldberg joined #perl6
23:41 aborazmeh joined #perl6

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

Perl 6 | Reference Documentation | Rakudo