Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-07-03

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:11 sporous joined #perl6
00:21 mokko Where can I find out about perl6's pod?
00:26 domidumont1 joined #perl6
00:29 adu mokko: I don't know
00:29 adu I try not to use it
00:29 flussence mokko: https://github.com/perl6/doc
00:30 adu I can't tell if it's incompatible with perl6 pod or not because depending on which tools I use it either complains "invalid =begin" or "error, =end is missing"
00:30 flussence mokko: if you're looking for the format itself, http://perlcabal.org/syn/S26.html
00:30 mokko I am just looking into perl6 so I know next to nothing. I am a bit confused by the absence of documentation. Yes. I am looking for format itself. Thanks!
00:31 flussence you'll have to excuse the slightly broken HTML on that page, pod2html isn't quite complete yet :)
00:47 sorear mokko: to be clear, pod6 is not compatible with pod5
00:47 sorear mokko: btw, welcome to perl 6
01:02 scott_ joined #perl6
01:10 flussence sometimes I think adu is just here to troll.
01:29 tyatpi joined #perl6
01:44 cognominal joined #perl6
02:28 colomon joined #perl6
02:45 Transformer joined #perl6
02:57 brent joined #perl6
03:17 adu joined #perl6
03:35 wamba joined #perl6
04:06 sudokode joined #perl6
04:08 kaare_ joined #perl6
04:16 adu joined #perl6
04:29 alvis`` joined #perl6
04:51 thou joined #perl6
05:02 alvis``` joined #perl6
05:04 birdwindupbird joined #perl6
05:16 moritz \o
05:22 sorear o/
05:25 adu \o
05:49 am0c joined #perl6
06:02 magnus joined #perl6
06:04 magup all: i'm trying to add ilbot for a local irc server
06:05 magup all: i've come so far that I can see the 'Index of IRC logs' welcome
06:05 magup all: but ilbot does not join the specified channel, nor logs it
06:06 kaleem joined #perl6
06:10 moritz magup: I can try to help you in private message
06:19 tadzik good morning
06:20 moritz \o tadzik
06:20 tadzik moritz! \o/
06:25 fhelmberger joined #perl6
06:29 anandrms joined #perl6
06:33 anandrms std: say 3+4
06:33 p6eval std fd2647b: OUTPUT«ok 00:01 41m␤»
06:33 anandrms std: say 3 + 4
06:33 p6eval std fd2647b: OUTPUT«ok 00:00 41m␤»
06:35 moritz tadzik: I'm trying to find out why newest panda hangs after compiling the last module
06:35 moritz tadzik: and currently my problem is that bootstrap.sh works fine, and it installs the panda-from-source, not my local panda
06:35 moritz tadzik: so all debug output I add to my local panda is lost
06:35 moritz tadzik: any idea how I can debug that?
06:37 moritz this also explains why reverting to an older version of panda didn't fix anything :/
06:39 tadzik moritz: you can do 'panda install .' to install the local directory
06:40 * tadzik decommutees
06:40 tadzik or, commutees
06:46 moritz tadzik: panda install . hangs the same way that any other installation does, since it uses the upstream panda which ./bootrap.sh installed :(
06:47 * moritz tries   perl6 -Iext -Ilib bin/panda install $module
06:48 moritz segfault
06:51 brrt joined #perl6
06:59 moritz r: %*ENV<foo> = Any
06:59 p6eval rakudo 16db64: OUTPUT«Cannot unbox a type object as a native str␤  in block <anon> at src/gen/CORE.setting:11855␤  in any <anon> at src/gen/BOOTSTRAP.pm:309␤  in block <anon> at /tmp/kS3Xmsp_K4:1␤␤»
06:59 moritz that's bad.
07:01 moritz and that's the reason panda loops
07:01 moritz it throws that excption when resetting PERL6LIB to the previous value
07:01 moritz *exception
07:02 moritz and then loops somehow while trying to catch and rethrow that exception
07:09 dalek rakudo/nom: cef4452 | moritz++ | src/core/terms.pm:
07:09 dalek rakudo/nom: do not die when assigning non-Str values to %*ENV<..> elements
07:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cef4452dcf
07:10 dalek panda: 2d2c253 | moritz++ | lib/Panda/ (3 files):
07:10 dalek panda: refactor handling of PERL6LIB setting into a common sub
07:10 dalek panda:
07:10 dalek panda: also improve robustness when PERL6LIB started off empty
07:10 dalek panda: review: https://github.com/tadzik/panda/commit/2d2c253e92
07:16 moritz \o/ panda works again
07:17 moritz r: sub f($x is copy) { LEAVE say ENTER $x; $x = 5 }; f 3
07:17 p6eval rakudo 16db64: OUTPUT«Nil␤»
07:17 moritz :(
07:17 moritz that would have been really awesome
07:18 dalek panda: 2ce433c | moritz++ | lib/Panda/Common.pm:
07:18 dalek panda: simplify &indir
07:18 dalek panda: review: https://github.com/tadzik/panda/commit/2ce433c695
07:23 dalek panda: 9b8a6da | moritz++ | t/panda/common.t:
07:23 dalek panda: tests for &indir
07:23 dalek panda: review: https://github.com/tadzik/panda/commit/9b8a6da81a
07:25 kresike joined #perl6
07:25 kresike good morning all you happy perl6 people
07:28 tyatpi joined #perl6
07:31 tadzik hello kresike
07:31 tadzik moritz++ # panda patches
07:51 wamba joined #perl6
07:54 kresike hello tadzik o/
07:54 moritz \o kresike
07:54 kresike hello moritz o/
07:56 hoelzro uh, hi Perl6 folk.  I'm trying to make a "cleaner" version of the regex /^git:\/\/github.com/, but rx {^git://github.com} says "Unable to parse blockoid", and regex {^git://github.com} says "Malformed regex". Anyone care to point out what I'm doing wrong?
07:56 masak morning, #p6
07:56 masak hoelzro: rx[], IIRC.
07:56 moritz hoelzro: regex { ^ 'git://github.com' }
07:57 moritz hoelzro: everything that's not alphanumeric is a (potential) meta character in a regex, and must be escaped or quoted
07:57 hoelzro I see
07:57 moritz thought error message that rakudo gives isn't good :(
07:57 hoelzro moritz, masak: thanks!
07:57 moritz n: regex {^git://github.com}
07:57 p6eval niecza v19-7-g5e25209: OUTPUT«[31m===[0mSORRY![31m===[0m��Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/AgGihPTGOg line 1:�------> [32mregex {^git:[33m�[31m//github.com}[0m��Unable to parse regex; couldn't find right brace at /tmp/AgGihPTGOg line…
07:58 hoelzro I'm guessing it also behaves as m//x in Perl5?
07:58 hoelzro given the extra space?
07:58 moritz yes
07:58 moritz though you can make the space DWIM with :s
07:58 masak "That's a lot and quite unorganized pile of stuff. Along writing articles on this site, I am planning to also pull in the documentation from all these places, where the license permits that, and try to create something that will be useful for you too." -- http://perl6maven.com/starting-again-with-rakudo-perl6
07:59 masak I read that as "There's the problem of N places with info, and my proposed solution is an (N+1)th place."
07:59 hoelzro and I'm also guessing quotes act like \Q and \E?
07:59 masak hoelzro: you could say that.
07:59 moritz hoelzro: quotes just act like quotes in the main language
07:59 moritz masak: yes, that's what I'm also doing with perl6/doc
07:59 masak hoelzro: but it's easier to just... what moritz said.
07:59 masak moritz: which is sadly not mentioned in that list :/
07:59 moritz masak: so I should get gabor to join me
07:59 masak moritz: yes.
08:00 hoelzro so I can do regex { ... "something $variable something" ... }?
08:00 hoelzro and $variable will be interpolated?
08:00 moritz yes
08:00 tadzik try it :)
08:00 masak hoelzro: there's an evalbot.
08:00 moritz and it will be interpolated as a string
08:00 moritz not as a regex
08:01 moritz r: my $var = 'o:b'; say ('foo:bar' ~~ / "fo$var" /).Str
08:01 p6eval rakudo 16db64: OUTPUT«␤»
08:01 masak r: my $foo = '42'; say "there are 42 kangaroos" ~~ / "there are $foo kangaroos" /
08:01 p6eval rakudo 16db64: OUTPUT«#<failed match>␤»
08:01 masak hm.
08:01 moritz wat
08:01 * masak submits rakudobug
08:01 hoelzro moritz: right
08:01 masak n: my $foo = '42'; say "there are 42 kangaroos" ~~ / "there are $foo kangaroos" /
08:01 p6eval niecza v19-7-g5e25209: OUTPUT«#<match from(0) to(22) text(there are 42 kangaroos) pos([].list) named({}.hash)>␤»
08:01 hoelzro that's what I would expect
08:01 masak niecza++
08:01 moritz niecza++
08:02 moritz hoelzro++ # finding a rakudobug
08:02 masak hoelzro++
08:02 hoelzro yay
08:04 * hoelzro just tried $str.=subst($re, $replacement)
08:04 hoelzro awesome!
08:04 masak :)
08:05 masak also check out .=trans, for your multi-replacement needs.
08:05 hoelzro trans ~~ y///?
08:05 masak also known as tr///, yes :)
08:05 moritz though the tr form isn't implemented yet in rakudo
08:06 hoelzro ok
08:06 masak r: my $s = "Don't just stand there, do something!"; $s .= trans(["stand there", "do something"] => ["do something", "stand there"]); say $s
08:06 p6eval rakudo 16db64: OUTPUT«Don't just do something, stand there!␤»
08:06 hoelzro have you guys thought about making .replace an alias for .subst?
08:06 GlitchMr joined #perl6
08:06 masak hoelzro: yes, but aliases in core is probably not a good idea. write a module for it.
08:06 hoelzro when I did $str.^methods, I expected something like .replace; .subst looks a little too much like "substring" to me
08:06 hoelzro I see
08:07 masak yes, .subst and .substr look too alike.
08:07 masak it's a crowded spot in the API.
08:11 hoelzro does Panda not support https:// Git repos?
08:11 moritz I think you'd need a way to tell panda that that's a git URL
08:12 moritz that's obvious for git:// URLs, but for https:// it could also be a link to a tarball, or SVN, or whatever
08:12 tadzik hmm
08:12 moritz but you can clone a repo yourself, cd into it and then  panda install .
08:14 hoelzro (I have to change Github repos to their https versions in Panda due to a firewall)
08:14 tadzik :(
08:15 hoelzro see, that problem is that I'm bootstrapping Panda =(
08:15 moritz r: my $foo = '42'; say '$foo' ~~ /"$foo"/
08:15 p6eval rakudo cef445: OUTPUT«q[$foo]␤␤»
08:15 hoelzro I'll just dig inside Panda::Fetcher
08:16 tadzik hoelzro: the urls are taken from the modules' META.infos
08:16 hoelzro right
08:17 tadzik hoelzro: as a local hotfix you can try .subst-ish thing in the Fetcher, yes
08:17 hoelzro haha, that's what I'm doing >:)
08:17 hoelzro having little Perl6 knowledge, that's proving a little difficult
08:17 hoelzro but, more importantly, fun =)
08:19 moritz hoelzro: http://irclog.perlgeek.de/perl6/2012-07-03#i_5778752 that might be interesting for you too
08:19 * masak add's moritz' eval to the RT ticket
08:19 moritz if you use the bootstrap script, you'll get a fresh panda from source, not from your local copy
08:20 moritz oh, "fun"
08:20 hoelzro moritz: thanks; I saw that before I said anything =)
08:20 * masak .oO( -O"fun" )
08:20 hoelzro I've been lurking for a week or so now
08:22 masak hoelzro: I recognize your nick. you were here in 2007..2009.
08:22 masak welcome back :)
08:23 hoelzro yes, I pop in from time to time =)
08:23 hoelzro I did a small amount of work on Pugs
08:24 hoelzro I usually get excited about Perl6 about once a year, but pmichaud's talk at YAPC::NA inspired me to read the perl6 book on Github, and I'm liking what I'm seeing =)
08:25 masak you and us both :)
08:25 masak though the book could use some love.
08:25 dakkar joined #perl6
08:29 moritz http://moritz.faui2k3.org/tmp/p6doc-html/List.html#Items%2C%20Flattening%20and%20Sigils the #fragment works in IE8 but not in FF 13
08:31 masak moritz: last time I was on a computer with IE9 on it (a week or so ago), it still had the JS error message dialog box popping up for every time the IRC logs loaded. :/
08:31 moritz masak: :(
08:33 brrt ooh, js errors
08:33 brrt one has to lurk for weeks to find something in which one could be of help
08:34 masak ;)
08:34 masak brrt++
08:34 masak and no, not really. :) there's lots to help with. we should just be better at flagging it up.
08:34 moritz hm
08:35 brrt oh, jquery
08:35 brrt lets see
08:35 moritz for producing the p6doc HTMLs I really, really need a way to get at the Pod tree of another file
08:36 moritz my options: 1) create an API for that (not easy) 2) create a Pod::To::Serialization module, have it write a serialized version to a file, and then read that (hacky)
08:36 moritz other ideas?
08:37 tadzik I'm wondering if it would ever be possible to actually reuse the nqp part of Pod code in Perl 6 code
08:38 tadzik the parser possibly, yes, but the AST generation is using World and all this magic
08:38 moritz well
08:38 moritz we have several such reuse mechanisms for ordinary code
08:38 moritz use, require, eval
08:39 masak from what I see of Rakudo development, there's ongoing bootstrapping going on on various different levels, "lifting" old parts up into newer, better parts.
08:39 masak nqp is very stable tech, so it's not likely to be replaced soon.
08:39 masak but maybe there's such a lifting event in the future, putting Rakudo on Rakudo rather than nqp.
08:41 brrt hmm, seems like a jquery error because all variables are very much defined and non-null
08:41 moritz so, upgrading to newest jquery?
08:42 brrt that will probably help
08:43 Timbus this is obviously a job for fuckitjs
08:43 moritz :-)
08:43 brrt haha
08:43 brrt that code is hilarious
08:43 brrt although.. as it seems now
08:43 brrt it errs on cloning a node and then firing an event on it
08:44 brrt quite possibly, firing events on parentless nodes is illegal
08:47 thou joined #perl6
09:02 robinsmidsrod joined #perl6
09:23 jnthn ohhai o/
09:24 tadzik \o
09:25 moritz lolitsjnthn!
09:27 moritz tadzik: I have a local patch which changes   my package Pod { class Block { ... }; class Foo { ... } };   to my class Pod::Block { ... }; my class Pod::Foo { ... } etc.
09:28 moritz tadzik: the reason is that otherwise .perl will produce unqualified class names, and re-evaling fails
09:28 moritz tadzik: can you think of a reason not to do that?
09:28 tadzik moritz: nope
09:28 tadzik if it works, of course
09:28 moritz well, the pod tests still pass :-)
09:28 tadzik the rationale for 'my package Pod' was a rakudobug of some sort
09:29 moritz yes, I thought so
09:29 tadzik oh, yes, the collision with Block
09:29 moritz when I started with my various X:: classes they didn't work out of the box either
09:29 moritz which is why I used a similar hack back then
09:29 tadzik tricky business, eh
09:32 moritz tadzik: in the long run I'd like to use panda to install modules for star
09:32 moritz I mean, during the installation process of the star package
09:32 tadzik moritz: that looks like a reasonable step, yes
09:33 moritz currently we have the inter-dependency resolution between modules inside a distribution in three different places (panda, ufo, star installer)
09:33 tadzik oh, oh
09:33 tadzik I also thought about something like a binary Rakudo distribution
09:33 moritz and I'd like to get rid of at least one
09:33 moritz tadzik: me too
09:34 moritz tadzik: but, it's only of limited usefullness, because rakudo and parrot aren't relocateable
09:34 tadzik I know
09:34 tadzik first thought is "/opt"
09:34 moritz /opt/rakudo-star-2012.06/ or so
09:34 tadzik for example, yes
09:35 masak does anyone know of a resource on the web explaining "everything you ever wanted to know about those Unix root directories, why they are named like that, and what goes where"?
09:36 tadzik I think I've read something like that once
09:36 tadzik no eye deer where it was
09:37 moritz masak: you'll probably need to read mulitple resources for that
09:37 moritz masak: there's the "linux standard base" (?) which gives recommendations for distributions on what to put where
09:38 masak oh, ok.
09:38 sisar "{ * +2 } "  <--- is this piece of code a closure ?
09:38 moritz then there's lots of historical cruft like /bin vs. /usr/bin, which was from times where hard discs were very small, and all the binaries for mounting /usr/ went into /bin, the rest in /usr/bin/
09:38 masak sisar: no, that's not how you do it.
09:38 moritz sisar: it's likely a bug
09:38 moritz * + 2 is a closure
09:38 masak sisar: either `{ $_ + 2 }` or `* + 2`
09:39 masak sisar: and they're equivalent. the * basically gives you automatic {}
09:39 sisar hmm
09:39 moritz but "{ * + 2 }" interpolates a closure into the string, without calling it
09:39 moritz r: say "{ * + 2 } foo"
09:39 p6eval rakudo cef445: OUTPUT«_block1014 foo␤»
09:39 moritz right; not what you want
09:39 sisar r: say (* + 2);
09:39 p6eval rakudo cef445: OUTPUT«WhateverCode.new()␤»
09:40 moritz that's the difference between .gist and .Str
09:41 colomon joined #perl6
09:41 sisar r: say (* + 2) ~~ (* +1 +1); #I'm wondering if can two closures be checked for equivalence ?
09:41 p6eval rakudo cef445: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:686␤  in sub infix:<+> at src/gen/CORE.setting:2464␤  in block <anon> at /tmp/ZFMUp7mzlG:1␤␤»
09:41 moritz sisar: no, that's not computable
09:41 moritz in the general case
09:42 sisar moritz: because one would have to check all the possible values which * can take ?
09:43 moritz sisar: one cannot even programmatically determine if a given piece of code will ever terminate
09:44 moritz sisar: https://en.wikipedia.org/wiki/Halting_problem
09:44 masak sisar: it's not so much taht one would have to check all the possible values.
09:45 tadzik or check the AST :P
09:45 masak that*
09:45 sisar moritz: right. I'm surprised how easily and frequently I hit deep concepts of computer science regularly.
09:45 hoelzro you mean Perl6 can't solve the halting problem? =P
09:45 moritz hoelzro: except when you give it a shotgun :-)
09:45 masak tadzik: if the closures were limited to a subset, like arithmetic expressions, things are perhaps tractable on the AST level.
09:46 tadzik . o O ( zombie halting problem )
09:46 masak the problem is essentially when the programming substrate is advanced enough to contain loops which may not terminate.
09:47 masak hm, that's not quite it.
09:47 dalek rakudo/nom: ee8ca1a | moritz++ | src/core/Pod.pm:
09:47 dalek rakudo/nom: use fully qualified names for Pod classes
09:47 dalek rakudo/nom:
09:47 dalek rakudo/nom: that way the .perl output can be eval()ed again
09:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ee8ca1ab89
09:47 masak loops whose termination is as difficult to determine as actually running the loop.
09:47 moritz right
09:47 moritz and when the memory is not bounded
09:47 masak right.
09:47 masak I like to think of the Collatz sequence in this case.
09:48 masak it's a simple case of a loop where we don't know if it always terminates.
09:48 moritz whenever you have a finite amount of memory, you also have finite (albeit large) space of possible states, so you can "just" walk 'em through
09:48 masak r: say 5, { $_ %% 2 ?? $_ / 2 !! $_ * 3 + 1 } ... 1
09:48 p6eval rakudo cef445: OUTPUT«5 16 8 4 2 1␤»
09:48 masak r: say 37, { $_ %% 2 ?? $_ / 2 !! $_ * 3 + 1 } ... 1
09:48 p6eval rakudo cef445: OUTPUT«37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1␤»
09:48 moritz another nice one is
09:49 sisar I wonder then how the human brain decides equivalence of (lets say arithmetic) closures ?
09:50 moritz for 4, 6 ... * -> $n { last unless (2..$n).grep: { is-prime($_) && is_prime($n - $_ } };
09:50 mathw joined #perl6
09:51 moritz sisar: because arithmetic closures aren't hard
09:51 moritz sisar: smart compilers can do it too. But the point is that neither computers nor humans can do it for a pair of arbitrary closures
09:52 sisar moritz: can a program be written to compare equivalence of loop-less arithmetic closures ?
09:52 moritz sisar: consider my example from 4 lines above -- to know if it terminates you'll have to solve an open question that's been unsolved for maybe half a century or so
09:52 moritz sisar: yes
09:53 moritz sisar: optimizing compilers do that
09:53 moritz sisar: and computer algebra systems
09:53 sisar this is all so interesting :-)
09:54 moritz 2 x + 2 == 2 * (x + 1) // Simplify
09:54 moritz True
09:54 sisar masak++, moritz++: thanks for the explanations !
09:54 moritz says Mathematica
09:54 masak yes, the thing about "loop-less arithmetic closures" was my point above.
09:55 * sisar reads about Collatz sequence
09:55 * moritz loves computer algebra system
09:55 moritz s
09:55 masak I think there's a lot of cool applications to be had by just restricting the computation domain to something manageable and analyzable, and then exploiting the new abilities to analyze it.
09:56 felher http://xkcd.com/710/
09:56 masak sagas (in business systems) are an example.
09:56 felher @collatz conjecture/sequence
09:56 moritz masak: aye
09:57 moritz masak: it becomes really interesting if an analyzer knows whether it can decide a question, or not
09:58 * sisar realizes that he has read about Collatz sequence before and found it really interesting
09:58 gesh joined #perl6
10:00 dalek nqp/toqast: 8a787d6 | moritz++ | VERSION:
10:00 dalek nqp/toqast: bump VERSION
10:00 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/8a787d6320
10:00 dalek nqp/toqast: c7f76bc | moritz++ | VERSION:
10:00 dalek nqp/toqast: Merge branch 'release-2012.06.1'
10:01 dalek joined #perl6
10:05 seldon joined #perl6
10:05 masak moritz: Greg Young has done very interesting work with saga analyzers. what makes it interesting is that you're often modifying a saga in a running system, while states are active in it. so states can basically end up in "pocket universes" because reality changed while it was in some path or other.
10:06 masak a saga analyzer helps keep things sane and make sure processes terminate within some set time.
10:09 moritz masak: is a saga analyzer a formal verification tool?
10:10 masak yes, running on pi calculus.
10:11 sisar hehe, I Googled for 'saga analyzer', and the no. 1 result I get is masak++'s gist; https://gist.github.com/2366527 !
10:12 masak ;)
10:12 masak yes, there isn't any literature on this that I know of.
10:12 moritz might just be known under a different name usually
10:12 masak probably.
10:13 masak that saga analyzers works and is kinda cool, but now I think it misses the point.
10:13 masak analyzer*
10:13 masak the one in the gist.
10:14 dalek nqp/toqast: e262e92 | jnthn++ | src/QAST/Compiler.nqp:
10:14 dalek nqp/toqast: A bit more diagnostic output.
10:14 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/e262e92660
10:14 dalek nqp/toqast: 52ba417 | jnthn++ | / (3 files):
10:14 dalek nqp/toqast: Get first pieces of QAST::Want support in place.
10:14 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/52ba417e12
10:14 sisar masak: is this the Greg Young you were talking about: http://goodenoughsoftware.net/2012/04/24/state-machines-and-business-users/ ?
10:15 masak aye.
10:15 masak I really liked that post.
10:16 masak it unifies sagas and the kind of intentful TDD I use for the hanoi game.
10:17 dalek rakudo/toqast: 917c855 | jnthn++ | src/QPerl6/Compiler.nqp:
10:17 dalek rakudo/toqast: Disable optimizer for now; will update it for QAST later on.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/917c855af5
10:17 dalek rakudo/toqast: 471bd15 | jnthn++ | src/QPerl6/ (2 files):
10:17 dalek rakudo/toqast: Start translating a few lexicals bits to QAST.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/471bd15269
10:17 dalek rakudo/toqast: 519c853 | jnthn++ | src/QPerl6/World.pm:
10:17 dalek rakudo/toqast: Translate various fixup code.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/519c8531e2
10:17 dalek rakudo/toqast: c3cfc12 | jnthn++ | src/QPerl6/ (2 files):
10:17 dalek rakudo/toqast: Various Op and Var translations to try and get us towards compiling hello world.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/c3cfc12dd9
10:17 dalek rakudo/toqast: 71518ca | jnthn++ | src/QPerl6/World.pm:
10:17 dalek rakudo/toqast: Fix setting loading code.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/71518ca7ed
10:17 dalek rakudo/toqast: 86ae30b | jnthn++ | src/QPerl6/World.pm:
10:17 dalek rakudo/toqast: PAST::Want -> QAST::Want in World.
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/86ae30b358
10:17 dalek rakudo/toqast: d64eedd | jnthn++ | src/QPerl6/Actions.pm:
10:17 dalek rakudo/toqast: Disable context saving for a bit (needs updating for QAST).
10:17 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/d64eedd47f
10:17 masak \o/ jnthn++
10:18 moritz karma jnthn
10:18 aloha jnthn has karma of 2655.
10:19 Psyche^ joined #perl6
10:29 whiteknight joined #perl6
10:32 seldon Can slurpy parameters not be typed? I'm having trouble with sub foo(Int *@numbers) { }; Rakudo tells me "Nominal type check failed for parameter '@numbers'; expected Positional but got Array instead"
10:33 masak hm.
10:33 jnthn I believe they cannot be.
10:33 masak r: sub foo(Int *@numbers) {}; foo(5, 42)
10:33 p6eval rakudo ee8ca1: OUTPUT«Nominal type check failed for parameter '@numbers'; expected Positional but got Array instead␤  in sub foo at /tmp/Uahpyxk4qn:1␤  in block <anon> at /tmp/Uahpyxk4qn:1␤␤»
10:33 masak in any case, that's a crappy error message.
10:33 masak r: say Array ~~ Positional
10:34 p6eval rakudo ee8ca1: OUTPUT«True␤»
10:34 masak was gonna say.
10:34 * masak submits LTA rakudobug
10:34 jnthn It's missing the type info for some reason.
10:34 jnthn We should perhaps just forbid the type on slurpies at all though
10:34 masak aye.
10:34 masak that's the conservative thing to so.
10:34 jnthn As in, catch it much earlier at compile time and say "this won't work"
10:34 masak do*
10:34 masak aye.
10:35 tadzik std: sub foo(Int *@numbers) {}; foo(5, 42)
10:35 p6eval std fd2647b: OUTPUT«Potential difficulties:â�¤  @numbers is declared but not used at /tmp/d6F4dbGHZv line 1:â�¤------> [32msub foo(Int *[33mâ��[31m@numbers) {}; foo(5, 42)[0mâ�¤ok 00:00 44mâ�¤Â»
10:35 seldon It would be nice to have, though.
10:36 masak we usually provide things that are nice to have unless they are impossible for some reason.
10:36 masak and sometimes even then. :)
10:40 seldon I'm new at perl6, but I noticed as much already. None of this "only one way to do it" nonsense. :) To me, the strong typing option looks very nice -- runtime duck typing makes me wary -- so just dropping it here feels like a shame.
10:42 jnthn Maybe we can find a way to make it work; I think previous attempts there ran into issues since *@foo is quite different from @foo in a parameter list.
10:46 masak seldon: interested to hear what you think of this kind of runtime duck typing: https://github.com/masak/crypt/blob/b80e96e59cfdc2f82e825c5752c73aa515936052/bin/crypt#L314
10:46 seldon The error message is the same as throwing an untyped slurpy into a typed array parameter, if that helps. my Int @foo = @numbers>>.Int; seems to be a workaround.
10:46 seldon masak: Er..I'll need a moment to read that.
10:46 masak seldon: i.e. take the first word of a command line and turn it into a method call. (we do validation on line 307)
10:47 masak that's fine, I'm not in a hurry.
10:51 seldon %commands is a hash of the public methods of $game to the number of arguments that method expects?
10:55 masak aye.
10:55 masak and it's computed from $game.
10:55 seldon Well, that looks slick, and I don't mean to say to never use duck typing at all, but I'd only use it if I had a good reason. For example, starting a database transaction before you know if the connection object you got supports all the operations you need in the case of an error (such as rollback) would strike me as irresponsible.
10:55 colomon joined #perl6
10:56 masak agreed.
10:56 seldon But then, I come from a C++ background.
10:56 seldon Python coders might disagree.
11:14 masak I'm not sure they would. it's not so much about duck typing as about common sense.
11:20 seldon You'd think so, but I've never seen a piece of duck-typed database client code that actually did it.
11:22 pmichaud good morning, #perl6
11:22 tadzik hello pmichaud
11:22 seldon Morning
11:22 masak pmichaud! \o/
11:23 masak seldon: that makes me a bit sad, then.
11:23 seldon Let's move on to happier matters, then.
11:23 masak seldon: but it also means there will always be enough work for people who have a clue.
11:23 dalek nqp/toqast: 4621c27 | jnthn++ | src/QAST/Compiler.nqp:
11:23 dalek nqp/toqast: Fix loadlibs compilation.
11:23 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/4621c2790d
11:23 dalek nqp/toqast: ef8c730 | jnthn++ | src/QAST/Compiler.nqp:
11:23 dalek nqp/toqast: Add stub for where we'll generate deserialization code later.
11:23 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/ef8c730f63
11:23 dalek nqp/toqast: 2a0ef4c | jnthn++ | src/QAST/Compiler.nqp:
11:23 dalek nqp/toqast: No blocktype implies declaration.
11:23 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/2a0ef4c774
11:24 jnthn qperl6 -e "say(42)" # now works
11:25 dalek rakudo/toqast: 3e204d4 | jnthn++ | src/QPerl6/Actions.pm:
11:25 dalek rakudo/toqast: Updating various other PAST::Want usages to QAST::Want.
11:25 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3e204d407a
11:25 moritz \o/
11:25 pmichaud jnthn: \o/
11:27 jnthn So, next I'll work through t/00-parrot
11:27 jnthn Mebbe some lunch first.
11:27 seldon Ha! sub MAIN (*@numbers where { [&&] @numbers>>.isa(Int) }) { works satisfactorily.
11:28 tadzik see also: all(@numbers) ~~ Int
11:28 masak seldon: yes, that is the established workaround.
11:29 masak seldon: sorry, should've said right away. seldon++ for figuring it out, though :)
11:30 seldon (: I suppose it'll be some time before I can figure out truly profound stuff.
11:31 pmichaud You'd be surprised at how quickly you run across profound stuff on this channel.  :)
11:33 mucker joined #perl6
11:33 spider-mario joined #perl6
11:33 seldon Hm.. all(@numbers) ~~ Int doesn't seem to work.
11:34 seldon But debian's rakudo version is three months old, so it could be that.
11:34 moritz r: say so all(1, 2, 3) ~~ Int
11:34 p6eval rakudo ee8ca1: OUTPUT«False␤»
11:34 moritz oh right
11:34 mucker o/ #perl6
11:34 moritz because it type-checks the Junction against Int
11:34 moritz if type-checks would autothread, you could never check for a Junction
11:35 pmichaud hmmm
11:36 pmichaud S03 says otherwise; it says that ~~ is supposed to autothread
11:36 pmichaud ~~ is supposed to autothread, while .ACCEPTS does not  (iirc)
11:36 moritz r: say Mu ~~ Mu
11:36 p6eval rakudo ee8ca1: OUTPUT«True␤»
11:36 moritz that wouldn't work if ~~ autothreaded
11:37 masak why not?
11:37 moritz because autothreading relies on not having any candidate that accepts Mu
11:37 pmichaud "relies on"    doesn't have to.
11:37 pmichaud a function that accepts Mu could do its own autothreading.
11:37 moritz well, that's how it's implemented at the moment
11:38 moritz and I also think that's how it's specced
11:38 pmichaud I doubt the spec says that the only mechanism to autothread is via signature binding.
11:38 moritz no, but I'm pretty sure that's the only mechanism mentioned
11:38 daxim joined #perl6
11:39 moritz and it's confusing enough in its current state already
11:41 pmichaud anyway, I'm pretty sure that &infix:<~~> should autothread.
11:41 pmichaud if it's multi'd, it could even specifically look for Junction arguments.
11:43 moritz I kinda thought it was macro-ish
11:43 pmichaud it's macro-ish in the sense that it needs to topicalize the smartmatch, yes.
11:45 JimmyZ_ joined #perl6
11:45 pmichaud anyway,   according to current S03    all(1,2,3) ~~ Int    should autothread, and is therefore a rakudobug.
11:46 moritz ... assuming it can be done in a consistent way
11:46 moritz otherwise it's a specbug
11:46 pmichaud correct.  But I don't see an inconsistency.
11:46 * moritz does
11:50 masak I don't feel like submitting a rakudobug until you decide what the spec is :)
11:50 masak because then it'll just limbo and take up space.
11:50 seldon To the Deathball Arena?
11:50 pmichaud the ticket can be a specbug ticket, too.
11:50 pmichaud i.e., the ticket notes the discrepancy between Rakudo and spec.
11:50 renormalist joined #perl6
11:50 moritz except that specbug tickets live on github these days
11:51 moritz (except those we haven't migrated yet)
11:51 pmichaud it can also get an entry in questions.txt in p6/spec
11:51 moritz use File::Find; find("foo", sub { say })'no &wanted subroutine given at /hom
11:51 moritz sorry
11:51 moritz https://github.com/perl6/specs/issues/new
11:51 JimmyZ__ joined #perl6
11:52 pmichaud but since I don't see anything in the spec that says or implies that the only mechanism to autothread is via dispatch fail... I don't see an inconsistent spec.
11:52 hoelzro I like the idea of the catch block being within the block that may throw an exception, but why does CATCH have to be in all caps =(
11:52 pmichaud hoelzro: because it's exceptional  :)
11:53 hoelzro it's all because it makes the word pop out?
11:53 masak walk &
11:53 pmichaud S06 does discuss strategies for implementing autothreading in subs, but it doesn't say anything about "this is the only way autothreading can take place"
11:54 moritz hoelzro: because all our phasers are all-caps, to make it more obvious that they are special
11:54 moritz hoelzro: and to avoid collisions with otherwise quite interesting verbs that the user might use as subroutines
11:54 hoelzro hmm
11:54 hoelzro I guess that makes sense
11:55 moritz think of it as a mini-namespace
11:55 moritz speaking of phasers
11:55 moritz LEAVE phasers make panda a lot simpler in some places
11:55 moritz but I always feel a tinge of danger when I use them
11:55 moritz the typical usage is
11:56 wamba joined #perl6
11:56 moritz my $olddir = cwd; chdir $newdir; LEAVE chdir $olddir;
11:56 moritz or
11:56 moritz my $connection = ...; LEAVE $connection.close
11:57 moritz and in both cases I wonder: what happens if LEAVE fires *before* the thing I want to undo happened?
11:57 moritz ie if $olddir or $connection contain garbage, because an exception was thrown before they were initialized correctly
11:58 moritz so what I would really like is something like a LEAVE phaser, but which only triggers if the control flow has passed the place of the LEAVE phaser once
11:58 moritz ie something like  my $coonection = ...; my $was_here = 1; LEAVE $connection.close if $was_here;
12:03 pmichaud isn't that 'let' or 'temp' or something like that?
12:03 colomon n: my $func = (&[+], &[*]).pick; say 4 [$func] 5;
12:03 p6eval niecza v19-7-g5e25209: OUTPUT«9␤»
12:03 colomon n: my $func = (&[+], &[*]).pick; say 4 [$func] 5;
12:03 p6eval niecza v19-7-g5e25209: OUTPUT«20␤»
12:05 pmichaud can also do   LEAVE chdir $olddir if $olddir;
12:05 pmichaud also:   my $connection = ...;  LEAVE $connection.?close
12:06 moritz pmichaud: LEAVE $connection.?close   is the wrong semantics
12:06 moritz it's "try to close if there's a close method you can call"
12:06 pmichaud right, so if $connection is uninitialized, it doesn't have a close method and doesn't do anything.
12:06 moritz but what I want is "call a close method if $connection is (true, defined, whatever)
12:07 moritz pmichaud: or worse, the method might be spelled "finish" instead of "close", and I'll never notice the misspelling
12:08 brrt in my experience,
12:08 brrt egh, sorry, wrong channel
12:09 JimmyZ__ r: my $func = ([+], [*]).pick;say $func(4, 5);
12:09 p6eval rakudo ee8ca1: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Int'␤  in <anon> at src/gen/BOOTSTRAP.pm:811␤  in any <anon> at src/gen/BOOTSTRAP.pm:807␤  in block <anon> at /tmp/V0l1ivLRDU:1␤␤»
12:16 felher I agree with moritz. '.?' isn't exaclty what i would want in that case. Also, such a LEAVE phaser that only triggers if the control flow passed the place of the LEAVE phaser once reminds me of go's "defer" statement (which i find to be quite cute). Only on a block instead of subroutine level.
12:18 moritz maybe we should reverse the question
12:18 moritz what's a use case where you always want a LEAVE phaser executed?
12:19 moritz (and cannot simply put it at the top of the routine)
12:19 tadzik hm
12:20 tadzik defer, yes
12:20 tadzik so wouldn't it Just Work if you put LEAVE after $connection.open?
12:20 tadzik I guess not, but it'd be cool
12:21 moritz r: do { my $x = do { die "foo"; "bar" }; LEAVE say "cleaning up $x" }
12:21 p6eval rakudo ee8ca1: OUTPUT«foo␤  in block <anon> at /tmp/dTK8Ky6nUm:1␤  in block <anon> at /tmp/dTK8Ky6nUm:1␤␤»
12:21 moritz huh, no cleanup?
12:22 tadzik heh
12:22 jnthn moritz: We ran into this one just yesterday. It happens when the last-gasp error handler catches it rather than some CATCH block.
12:22 jnthn moritz: Thus the stack unwind doesn't trigger
12:22 moritz r: do { my $x =  die "foo"; LEAVE say "cleaning up $x" }
12:22 p6eval rakudo ee8ca1: OUTPUT«foo␤  in block <anon> at /tmp/gJpcmcBCXk:1␤␤»
12:22 moritz r: try { my $x =  die "foo"; LEAVE say "cleaning up $x" }
12:22 p6eval rakudo ee8ca1: OUTPUT«use of uninitialized value of type Any in string context  in block <anon> at /tmp/FF5LLyuZMW:1␤␤cleaning up ␤»
12:23 moritz anyway, this one also illustrates my problem
12:24 seldon_ joined #perl6
12:30 dalek rakudo/toqast: 4fc6c4b | jnthn++ | src/QPerl6/ (2 files):
12:30 dalek rakudo/toqast: Update a bunch of PAST::Var lexical lookups to use QAST::Var.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/4fc6c4b550
12:30 dalek rakudo/toqast: a4e92a9 | jnthn++ | src/QPerl6/World.pm:
12:30 dalek rakudo/toqast: Fix a get_slot_past_for_object leftover.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/a4e92a907f
12:30 dalek rakudo/toqast: 3ca0be7 | jnthn++ | src/QPerl6/Actions.pm:
12:30 dalek rakudo/toqast: Start updating EXPR action method for QAST.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3ca0be7679
12:30 dalek rakudo/toqast: 65346e6 | jnthn++ | src/QPerl6/Actions.pm:
12:30 dalek rakudo/toqast: Disable whatever-currying code for now; will need quite some updating.
12:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/65346e6a7b
12:30 flussence filling my horrible idea quota for the year: what if there was a Devel::Trace-like thing that converted nqp calls to sounds as they ran?
12:31 tadzik haha
12:31 moritz if you don't need it in real time, you could hack the profiler to do it :-)
12:31 tadzik oooh
12:32 tadzik this'd take Perl Poetry to the new level
12:32 tadzik you could write code to play certain melodies
12:32 tadzik imagine rickrolling people this way
12:32 moritz I think parrot also has a tracing setting
12:32 moritz tadzik: :-)
12:33 moritz flussence: (unrelated craziness) I have some Pod::To::HTML wishlist features
12:33 moritz flussence: first, I want to set the title of a HTML page. Is that supported somehow_
12:33 moritz s/_/?/
12:34 flussence er... I think that one is actually. lemme check...
12:34 tadzik I think it is
12:34 moritz flussence: second, I want some DWIM magic for links, preferably passing a closure that mangles L<...> links
12:34 tadzik isn't =TITLE just working?
12:34 flussence yeah, the code for that seems to be there
12:34 moritz oh, there's a =TITLE? I didn't know that :-)
12:35 tadzik :)
12:35 moritz does that mean I should use that instead of my single =head1 ?
12:35 tadzik it may be
12:35 flussence doesn't hurt to have both
12:35 moritz =TITLE produces a <title>, and =head1 a <h1>?
12:35 tadzik it's Just a standard semantic block, S26 says
12:36 tadzik it just made sense to turn it into <title> when you do HTML
12:36 tadzik I think it makes sense to treat is as "something like <title>
12:36 tadzik "
12:37 flussence a lot of pod6 seems to map nicely to html elements, so I just went with the most obvious route :)
12:37 tadzik except lists. Grr
12:37 tadzik but that's just the thing about tormenting implementors etc ;)
12:37 moritz and third, I want to piece together some Pod chunks from various files, and generate one HTML file from it
12:37 moritz should I best do that on the Pod level?
12:37 tadzik yo ucan
12:38 tadzik you can
12:38 tadzik let me find this
12:38 moritz I'm just afraid to kill my old pod blocks :-)
12:38 moritz 'cause they are mutable
12:38 tadzik pmichaud was looking for the same thign and we've eventually found that in the spec
12:39 dalek rakudo/toqast: 611bfb9 | jnthn++ | src/QPerl6/Actions.pm:
12:39 dalek rakudo/toqast: .type => .returns
12:39 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/611bfb9955
12:39 flussence I really haven't kept up to date with any changes in the pod parsing stuff in a few months, so tadzik probably knows better than me :)
12:39 tadzik moritz: http://feather.perl6.nl/syn/S26.html#Placement+li
12:39 tadzik flussence: it didn't change much in the last few months :)
12:39 tadzik whoopsie
12:40 tadzik http://feather.perl6.nl/syn/S26.html#Placement+links
12:40 tadzik moritz: ^ is better
12:40 tadzik that's also the part of S26 where the formatting is fscked :)
12:40 moritz is P<> implemented? :-)
12:40 sftp_ joined #perl6
12:40 flussence I had plans for a refactoring which would make it easier to get stuff like passing closures added... maybe I should get back to working on it :)
12:41 tadzik in which formatter?
12:41 tadzik hint: it's not implemented in any of them :P
12:41 moritz at all :-)
12:41 moritz well
12:41 moritz I'm not even sure that P<> is what I want
12:41 moritz I want to process all .pod files in p6doc
12:41 moritz and extract all headings that are routines
12:42 tadzik ah
12:42 tadzik well
12:42 moritz and then make a per-routine file
12:42 tadzik you can keep those headings in separate files, and include them using P<> in both regular .pod files and the one you're talking about onw
12:42 moritz like say.html which has 'method say' from both IO and Mu
12:43 moritz tadzik: but writing all those P<> links will be painful, and a nightmare to maintain
12:43 tadzik hm
12:43 tadzik probably, yes
12:44 moritz so, I'll just have to make my own I guess
12:44 tadzik hm
12:44 moritz which is... probably a just a tiny bit fiddly :-)
12:44 tadzik possibly we could get P<> behave a bit like L<>
12:44 tadzik so you can link to the specific section, and also include a specific section
12:45 PacoAir joined #perl6
12:46 kaleem joined #perl6
12:49 moritz http://moritz.faui2k3.org/tmp/p6doc-html/Any.html
12:49 moritz that's probably a bit LTA
12:51 tadzik nice
12:52 * masak looks, eagerly
12:52 moritz I'd prefer it if it didn't create another TITLE section
12:52 masak it's a really good start.
12:52 masak it has improvement potential :)
12:52 moritz I mean, it already has one <title> and one <h1>
12:52 moritz any objections to changing that in Pod::To::HTML?
12:52 tadzik not from me :)
12:53 moritz in general, I expect I might want quite a few changes in Pod::To::HTML in the next days/weeks
12:53 moritz should I create a branch? or simply go ahead? or fork the project, and later reconcile?
12:54 flussence I say do whichever's easiest for you :)
12:55 hoelzro rakudo doesn't implement subset yet?
12:55 jnthn As in subset types?
12:55 moritz hoelzro: it does
12:55 hoelzro nvm
12:56 hoelzro I screwed up the syntax =)
12:56 flussence (btw the refactoring thing I mentioned involves splitting the AST iteration into a separate module, so I could do that independent of everything else if I want)
12:56 moritz r: subset Odd of Int where * % 2; say $_, ' ', $_ ~~ Odd for (1, 2, 3, 4, 'foo')
12:56 p6eval rakudo ee8ca1: OUTPUT«1 True␤2 False␤3 True␤4 False␤foo False␤»
12:57 pmichaud it looks like a good start to me, though.
12:57 hoelzro yeah, I just forgot the 'of'
12:57 pmichaud (the Any.html)
12:57 moritz hoelzro: then you just have an implied 'of Any' in it
12:57 moritz ok, another p6doc design question
12:58 moritz do we expect to install those documents as regular manpages at some point?
12:58 moritz if not, I'd like to drop the 'perl' from 'perlvar.pod'
12:58 tadzik oh yes, do that
12:58 moritz and maybe call it 'variables.pod' or so
12:59 tadzik 'perldoc perlfoo' always seems needlessly reduntant for me
12:59 moritz http://moritz.faui2k3.org/tmp/p6doc-html/Any.html updated, now without the 'TITLE' section
12:59 pmichaud speaking of man pages,  "perl6 --usage"  is a little LTA on that point.
13:00 pmichaud moritz: I think unordered list would look nicer than ordered list at the top  (bikeshed)
13:00 pmichaud also, do we want "Methods" subsections?
13:01 masak what kind of subsections?
13:01 pmichaud right now there's a "1. Methods"  in the toc
13:01 pmichaud I'm wondering if we can omit that.
13:01 moritz http://moritz.faui2k3.org/tmp/p6doc-html/List.html is an example wher eit makes more sense
13:01 tadzik this is cool
13:01 masak moritz++ # generating HTML
13:02 moritz in the long run, I want to include some usage examples, a bit of background, connection to other classes etc
13:02 moritz so then METHODS won't be the only <h2> heading
13:02 pmichaud okay, then I'm wondering if we wliminate the "1. List"   and   "1. Any"
13:02 masak aye.
13:02 moritz right
13:02 masak +1
13:02 moritz now that we have =TITLE :-)
13:03 moritz oh, List doesn't have a =TITLE yet
13:04 pmichaud "perl6 --usage" gives:
13:04 pmichaud For more information, see the perl6(1) man page.
13:04 pmichaud afaik, we don't have a perl6(1) man page.  We should either create (and install) one, or we should remove that line from usage.  :-)
13:04 pmichaud I'm fine with that being a rakudobug.  :)
13:04 * masak submits rakuodbug
13:04 moritz pmichaud: I thought we install docs/running.pod as perl6(1)
13:05 pmichaud oh, so we do.
13:05 moritz we have $(POD2MAN) doc/runing.pod --name=perl > $(DESTDIR)$(MANDIR)/man1/perl6.1
13:05 pmichaud I was looking for the man pages directly; didn't realize that running.pod was the source.
13:06 pmichaud Okay then, the documentation in running.pod is out of date.  :)
13:06 pmichaud well, maybe not.
13:06 pmichaud I think I'll go be quiet now.
13:07 JimmyZ__ joined #perl6
13:07 moritz running.pod was last updated in Oslo, I think
13:08 masak sounds familiar.
13:09 hoelzro can you junction types? ex. has Str|Int $.str-or-int?
13:09 moritz std: my Str|Int $foo
13:09 p6eval std fd2647b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Multiple prefix constraints not yet supported at /tmp/cqnj_WxWXJ line 1:â�¤------> [32mmy Str[33mâ��[31m|Int $foo[0mâ�¤Malformed my at /tmp/cqnj_WxWXJ line 1:â�¤------> [32mmy Str[33mâ��[31m|Int $foo[0mâ�¤    expecting any of:â�¤      multi_declar…
13:09 moritz so, "no"
13:09 hoelzro =(
13:10 moritz with "not yet supported", STD.pm means "not a goal for 6.0"
13:10 hoelzro ok
13:10 pmichaud S02 says you can, btw.
13:10 pmichaud Anywhere you can use a single type you can use a set of types, for convenience
13:10 pmichaud specifiable as if it were an "or" junction:
13:10 pmichaud my Int|Str $error = $val;              # can assign if $val~~Int or $val~~Str
13:10 pmichaud S02:1754
13:10 pmichaud that's possibly a fossil.
13:10 moritz I'm pretty sure that's fossil
13:10 masak fossil.
13:10 hoelzro does Rakudo support it, though?
13:11 masak we do that with subtypes nowadays.
13:11 moritz hoelzro: no
13:11 * masak should write a blog post about "You think it's cute today" features that have been replaced by sanity
13:11 pmichaud r:  my subset StrInt of Any where Str|Int;   my $a StrInt = 'str';
13:11 p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤Confused␤at /tmp/T_pCLurl8d:1␤»
13:11 masak '2..10 :by(2)' is another.
13:11 moritz hoelzro: but if you want to want support Int|Str, you'll probably want Cool instead :-)
13:12 pmichaud r: subset StrInt of Any where Str|Int;   my $a StrInt = 'str';
13:12 hoelzro Cool?
13:12 p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤Confused␤at /tmp/X11ru8swWg:1␤»
13:12 hoelzro it's just an example
13:12 moritz r: subset StrInt of Any where (Str|Int);   my $a StrInt = 'str';
13:12 hoelzro but I managed to get around it
13:12 p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤Confused␤at /tmp/ETr2nRvVay:1␤»
13:12 moritz hm
13:12 hoelzro moritz: that's exactly what I did
13:12 cog_ joined #perl6
13:12 timotimo r: subset StrInt of Any where (Str|Int);   my StrInt $a = 'str';
13:12 p6eval rakudo ee8ca1:  ( no output )
13:13 pmichaud timotimo++  # thanks
13:13 pmichaud r: subset StrInt of Any where Str|Int;   my StrInt $a = 'str'; say 'alive';  $a = 3;  say 'alive';  $a = 4/5;  say 'oops';
13:13 p6eval rakudo ee8ca1: OUTPUT«alive␤alive␤Type check failed in assignment to '$a'; expected 'StrInt' but got 'Rat'␤  in block <anon> at /tmp/a_RP7_L6bH:1␤␤»
13:13 moritz eeks, and I copied the same mistake over without noting it :/
13:14 moritz http://moritz.faui2k3.org/tmp/p6doc-html/List.html now with updated heading levels
13:14 moritz and without 1. List
13:15 pmichaud I would still prefer <ol> instead of <ul>, but this is much better.  :)
13:15 moritz that's a detail from a subsystem I don't want to touch atm
13:15 pmichaud fair enough
13:16 moritz but I'll keep it in the back of my mind
13:16 moritz or maybe ++flussence does :-)
13:16 mtk joined #perl6
13:18 flussence I've got a 5 day weekend coming up, so maybe :)
13:18 masak \o/
13:21 JimmyZ_ joined #perl6
13:22 pmichaud https://github.com/perl6/specs/issues/12   # Int|Str fossil in S02
13:25 masak pmichaud++
13:30 dalek doc: ce8f432 | moritz++ | lib/ (17 files):
13:30 dalek doc: heading level refactor
13:30 dalek doc:
13:30 dalek doc: use =TITLE as top level heading, and then start with =head1 methods
13:30 dalek doc:
13:30 dalek doc: this effectively lowers the rank of most headings by one
13:30 dalek doc: review: https://github.com/perl6/doc/commit/ce8f432b05
13:36 dalek doc: 13f6b55 | moritz++ | htmlify.pl:
13:36 dalek doc: [htmlify] prepare for chunky Bacon, erm Pod
13:36 dalek doc:
13:36 dalek doc: this creates some infrastructure that we will need to extract
13:36 dalek doc: per-routine documentation into separate output files
13:36 dalek doc: review: https://github.com/perl6/doc/commit/13f6b55d68
13:38 JimmyZ__ joined #perl6
13:42 dalek doc: c451a46 | moritz++ | lib/Int.p (2 files):
13:42 dalek doc: fix file name
13:42 dalek doc: review: https://github.com/perl6/doc/commit/c451a463c8
13:42 bluescreen10 joined #perl6
13:43 sudokode joined #perl6
13:50 spider-mario joined #perl6
13:51 moritz ok, I need a name for documents like 'perlintro' and 'perlvar' etc., as opposed to class/role/module documentation/API documentation
13:52 jnthn langdocs
13:53 jnthn Or just "langauge"
13:53 jnthn Or "syntax", though I guess they're really about what the syntax means.
13:56 moritz language is not bad
13:57 moritz I'll apologize in advance: the htmifly.pl script won't run on windows
13:57 moritz nor on mac with case insensitive file system
13:57 moritz because I'll need to distingish Int.pod and int.pod
13:57 moritz or at least be able to
13:59 jnthn Are Int.pod and int.pod in the same directory?
14:00 jnthn If so I probably won't even be able to check out the git repo ;)
14:00 moritz no (or not yet at least :-)
14:00 moritz but
14:01 moritz for the HTML generation stage, I create a file name per method
14:01 moritz (at least that's the plan)
14:01 moritz so if we have two methods of the same name, but different case (and I guess some coercers will do that), we'll have that case
14:01 moritz for example .Bool and .bool or so
14:09 dalek nqp/toqast: 325137a | jnthn++ | src/QAST/Compiler.nqp:
14:09 dalek nqp/toqast: Ensure the QAST compiler is registered and the operations manager is available.
14:09 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/325137a679
14:09 moritz "operations manager" sounds very corporate :-)
14:10 jnthn Don't worry, I didn't call the class that :P
14:12 kresike bye all
14:14 moritz writing Pod ASTs by hand is not much fun :/
14:14 * moritz wants a Pod templating system
14:14 [Coke] moritz: I think we want to avoid doing that.
14:14 moritz [Coke]: doing what?
14:14 [Coke] (generating files that differ only by case.)
14:15 [Coke] how do you treat multi methods in that case?
14:15 moritz [Coke]: I know we want to avoid it. But if doc.perl6.org/int and doc.perl6.org/Int are to return different documents, what should I do?
14:15 moritz methods of the same name are simply assembled in the same file
14:16 moritz including multis and onlys
14:16 moritz erm
14:16 moritz is that "onlis"? :-)
14:16 flussence onlies? nah, I you were right the first time. English is weird :)
14:17 [Coke] moritz: so, I'd just assemble int and Int in the same file.
14:17 [Coke] I think "onlies" is probably correctest, but I also don't htink it's a word. ;)
14:17 moritz [Coke]: but then the docs give me answers that have nothing to do with the question I've asked
14:18 moritz in Perl 6 I can *never* call an .Int method as .int
14:19 [Coke] moritz: don't assume that doc.perl6.org is driven by files. problem solved.
14:20 [Coke] instead, create a little mojo app.
14:20 flussence md5 all the things!
14:21 moritz [Coke]: that's no small change of assumptions
14:21 [Coke] echo "all the things" | md5sum -
14:21 [Coke] b9a8cbc1606685b44ef5c09690a1c038  -
14:22 moritz .oO( doc.perl6.org/b9a8cbc1606685b44ef5c09690a1c038 )
14:22 moritz equally ugly URLs for everybody!
14:23 [Coke] moritz: if your goal is to have sane URLs, there are solutions that don't involve breaking a local copy of the "app".
14:24 [Coke] but treating it like a web app rather than a collection of files is probably a better long term solution.
14:24 [Coke] do you have any goals other than "web app" ?
14:24 moritz currently not
14:24 [Coke] (that something like mojo would hurt)
14:24 moritz which is why I'm not too worried about breaking a local copy
14:24 moritz because nearly nobody needs one
14:25 [Coke] as an example, perl5's documentation is often installed as a local set of web page.
14:25 [Coke] (on windows)
14:26 [Coke] eh. I'm not writing any code here, so I'm not going to try harder to convince you. ;)
14:26 moritz [Coke]: my problem is really that there aren't any idea solutions
14:26 pmichaud fwiw, I think p6doc should be relatively case insensitive.
14:27 pmichaud I don't want to type   "perldoc int"  and wonder why I can't find any of the Int methods
14:27 moritz I want to dogfood, partly because the only robust-ish pod processor is written in p6
14:27 masak moritz++
14:27 moritz so, I need something that works with rakudo. And generating plain files happen to work pretty well
14:27 moritz *and* isn't too hard to debug
14:28 moritz pmichaud: I, on the other hand, don't want to ask p6doc for int and get the answers for Int. They aren't the same in Perl 6
14:29 moritz pmichaud: maybe some level of DWIM is acceptable in cases where it's not ambiguous
14:29 hoelzro p6doc -i?
14:29 pmichaud right, so the output needs to be able to respond to either query; perhaps by suggesting a disambiguation
14:29 jnthn If it's ambiguous, just have a disambiguation.
14:29 moritz but our language is case sensitive, and the tools should refelct that
14:29 moritz *reflect
14:29 jnthn "Did you mean: X or Y?"
14:29 pmichaud our language is case sensitive, which means our on-ramps need to be forgiving
14:30 flussence p6doc -i for /:i/?
14:30 flussence .oO( "be like grep" seems a pretty sane default... )
14:31 pmichaud the help tools need to be.... helpful, not throw-your-mistakes-back-in-your-face
14:31 tadzik idea: case insensitive, but maybe Int should say "Int can also mean int <click here for int>"
14:31 tadzik and the other way around
14:32 pmichaud personally, I'd want  "p6doc int" to tell me everything about Int and int, and if I want only a specific class, then I provide an option asking for just that.
14:32 pmichaud or, if there's just too much to cover in Int and int, it should give me quick links to narrow down the search to what I want.
14:33 masak my personal preference is to honor case sensitivity all the way, but to provide easy links via error messages and "see also".
14:33 pmichaud in general, bareword terms with multiple meanings need to be fairly all-encompasing unless there's really only one possible meaning.
14:33 masak 'Any' and 'any' are good examples.
14:33 masak they don't belong on the same page.
14:33 masak and we think of them as distinct.
14:34 masak bet most people here haven't even placed them in the same pidgeon hole ;)
14:34 masak but we can still link between them.
14:34 pmichaud I have, actually.  :-)
14:34 masak oh!
14:34 pmichaud I mean, I've definitely noticed the pun and thought "that's unfortunate"
14:34 pmichaud s/pun/conflict/
14:35 masak my point is that it's not.
14:35 masak verbs and nouns are mostly in different slots in people's brain.
14:36 pmichaud either way, with "p6doc any"  it's hard to know which slot the user is coming from.
14:36 pmichaud in that sense I think it should act more like a search engine than a "oh, you used a lowercase 'a', so I know exactly what you mean."
14:37 pmichaud now then if someone did  "p6doc .any"  -- I'd be pretty certain what was meant.
14:37 pmichaud or if they do  "p6doc any()"   -- then yes, that's fairly certain as well.
14:37 jnthn ooh
14:37 pmichaud and I really want   "p6doc '%%'"  to dwim.
14:37 jnthn I hadn't thought of using Perl 6 style syntax there rather than -f style switches.
14:38 pmichaud right
14:38 jnthn I like that.
14:38 masak pmichaud: agree. I want '%%' to dwim too.
14:38 pmichaud the fact that 'perldoc' (p5) doesn't give me an easy way to find operators has always bugged me.
14:38 masak aye.
14:38 pmichaud I'm also fine if   "p6doc Any"  returns me the class, although "p6doc Any::"  would be truly unambiguous.
14:38 moritz aye
14:39 moritz and special variables
14:39 moritz but Any:: is a symbol table, not a type
14:39 pmichaud okay, ::Any then
14:39 moritz anyway
14:40 moritz I'm tring to get classes and routines to work now
14:40 dalek nqp/toqast: f51d4a9 | jnthn++ | src/QAST/Compiler.nqp:
14:40 dalek nqp/toqast: Honor HLL in operation lookups.
14:40 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/f51d4a99a7
14:40 moritz and I'll be more than happy to accept patches to make more work
14:40 pmichaud my point is just that using case sensitivity to assume that "list", "int", "bool", etc. are unambiguous is the wrong approach for a help/user documentation tool.
14:41 lumi__ So that's some way towards a Perl6 explainer?
14:41 pmichaud ditto for relying on a case-sensitive filesystem.  use "int-native.pod" if necessary.  In general I suspect that the 1-1 mapping of class name to filename is going to break down at some point anyway.
14:41 moritz r: my @a; say @a[*-1] // 0;
14:41 p6eval rakudo ee8ca1: OUTPUT«0␤»
14:46 geekosaur NATIVE::int ?
14:47 pmichaud geekosaur: maybe.  but what about int1, int8, int64, etc.?
14:47 moritz r: my @a; say @a[*-1];
14:47 p6eval rakudo ee8ca1: OUTPUT«Cannot use negative index -1 on Array␤  in method gist at src/gen/CORE.setting:9542␤  in sub say at src/gen/CORE.setting:7009␤  in block <anon> at /tmp/dt0EJvqs_c:1␤␤»
14:47 geekosaur NATIVE::type[::size]; the short names might be aliases
14:47 dalek rakudo/toqast: 8f86af5 | jnthn++ | src/QPerl6/Actions.pm:
14:47 dalek rakudo/toqast: nsentry is dead
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/8f86af5595
14:47 dalek rakudo/toqast: eaff765 | jnthn++ | / (3 files):
14:47 dalek rakudo/toqast: Move Perl 6 ops registration out into a different file, and update these to register the ops with QAST.
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/eaff76587e
14:47 dalek rakudo/toqast: db3f53b | jnthn++ | src/QPerl6/ (3 files):
14:47 dalek rakudo/toqast: Add a nqp::op for perl6_container_store and update actions to use it.
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/db3f53bea1
14:47 dalek rakudo/toqast: 673fc87 | jnthn++ | src/QPerl6/Ops.pm:
14:47 dalek rakudo/toqast: Fix some bogus whitespace.
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/673fc87fb2
14:47 dalek rakudo/toqast: 567eb74 | jnthn++ | src/QPerl6/Actions.pm:
14:47 dalek rakudo/toqast: perl6_booleanize => p6bool
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/567eb7420b
14:47 dalek rakudo/toqast: ccd30a7 | jnthn++ | src/QPerl6/ (2 files):
14:47 dalek rakudo/toqast: perl6ize_type => p6type
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/ccd30a7879
14:47 dalek rakudo/toqast: 5761ab7 | jnthn++ | src/QPerl6/ (2 files):
14:47 dalek rakudo/toqast: perl6_take_dispatcher => p6takedisp
14:47 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/5761ab7605
14:48 geekosaur this also means an obvious way to have both a "fastest" native type and a range of native sizes
14:48 pmichaud geekosaur: "the short names might be aliases" --> "the filename to typename mapping breaks down"  :-)
14:49 geekosaur right, I'm kinda assuming thats going to break down anyway
14:49 pmichaud I feel like I'm being more argumentative than helpful today; I think I should take a break.  bbl
14:50 masak pmichaud: that was never five minutes! :P
14:51 masak http://www.youtube.com/watch?v=kQFKtI6gn9Y
14:54 masak apparently, the quote is "that was never five minutes just now".
14:54 moritz Pod::To::HTML has this code:
14:54 moritz my $last = @opened[*-1] // 0;
14:54 moritz if $last < $lvl {
14:55 moritz and that first line dies with "Cannot use negative index -1 on Array"
14:55 moritz and when I try to reproduce it locally, I don't get any such error
14:56 moritz locally = on the command line or with p6eval
14:56 masak then you need to golf it from the original code.
14:56 moritz I know, but DO NOT WANT
14:56 * moritz calls it a day instead
14:56 masak :/
14:56 * masak is tempted to try to golf it for moritz
14:57 flussence nested list code... not fun
14:58 dalek doc/indexfile-bug: 4ead333 | moritz++ | htmlify.pl:
14:58 dalek doc/indexfile-bug: [WIP] start to write an index file
14:58 dalek doc/indexfile-bug: review: https://github.com/perl6/doc/commit/4ead33307c
14:58 moritz masak: have fun, the dying code is in the branch
14:58 moritz masak: you just need to install rakudo and Pod::To::HTML and run ./htmlify.pl in the perl6/doc dir
14:59 masak excellent.
14:59 masak moritz++
14:59 moritz really decommute&
15:00 tokuhiro_ joined #perl6
15:07 masak huh, what happened to all the badges on http://modules.perl6.org/ ? :(
15:07 masak they're all blank.
15:07 tadzik yep
15:07 tadzik nobody nows
15:08 masak :( :( :(
15:08 flussence I think that's been like that since a few weeks now
15:08 tadzik yep
15:11 masak heh, moritz++ tricked me into downloading perl6/doc, too ;)
15:11 dalek rakudo/toqast: 3e84f10 | jnthn++ | src/QPerl6/Actions.pm:
15:11 dalek rakudo/toqast: Look for QAST::Node instead of PAST::Node.
15:11 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3e84f104bc
15:11 dalek rakudo/toqast: 71fb485 | jnthn++ | src/QPerl6/Actions.pm:
15:11 dalek rakudo/toqast: Fix meta-op code gen a bit.
15:11 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/71fb485724
15:11 dalek rakudo/toqast: 1a88ffa | jnthn++ | src/QPerl6/Actions.pm:
15:11 dalek rakudo/toqast: Translate various control structures over to QAST.
15:11 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/1a88ffaf4d
15:19 hoelzro does Rakudo implement tail recursion?
15:19 masak hoelzro: tail recursion is just a kind of recursion. Rakudo implements recursion.
15:20 masak tail recursion is recursion that happens last in a routine.
15:20 jnthn Well, hoelzro may mean the set of optimizations that "tail recursion" often implies.
15:20 hoelzro sorry
15:20 masak yes, I know.
15:20 hoelzro I meant tail call optimization
15:20 masak right.
15:20 jnthn In which case the answer is no, not yet.
15:20 hoelzro ok
15:21 hoelzro so sub foo { foo; } should overflow, right?
15:21 jnthn Yes
15:21 masak sorry for being a stickler for terms ;)
15:21 jnthn masak: :P
15:21 jnthn Would be kinda fun to add that to the optimizer some day
15:26 masak moritz: I am unable to reproduce your failure here. I just get a list of processees on the form 'lib/Match.pod => Match', and no error.
15:27 hoelzro so sub foo { foo; } should overflow, right?
15:28 moritz masak: did you check out branch indexfile-bug ?
15:29 moritz oh dammit
15:29 moritz and I forgot to commit a module
15:29 moritz and git clean -xdf'ed it
15:29 masak oh!
15:29 masak you said branch, and I forgot it.
15:29 moritz masak: wait a moment...
15:29 masak sure.
15:30 dalek doc/indexfile-bug: 1ae1e84 | moritz++ | lib/Pod/To/Serialization.pm:
15:30 dalek doc/indexfile-bug: add Pod::To::Serialization
15:30 dalek doc/indexfile-bug: review: https://github.com/perl6/doc/commit/1ae1e8463f
15:31 * moritz tries to reproduce with clean working tree
15:32 hoelzro this program doesn't seem to overflow: https://gist.github.com/3040496
15:32 hoelzro it reaches 99983 on my machine and stops
15:32 moritz masak: yes, should produce that error now
15:33 tyatpi joined #perl6
15:35 thou joined #perl6
15:35 masak and indeed it does.
15:35 masak we have successfully transported the error from your computer to mine! :D
15:36 masak let the golfin' begin.
15:37 moritz and, good news
15:37 moritz you don't need the loop through @sources to reproduce it
15:38 moritz so you can execute it orders of magnitudes faster
15:39 colomon \o/
15:40 moritz \o colomon
15:40 colomon o/
15:40 masak yes, I see it.
15:40 masak colomon! \o/
15:41 colomon reproducible bugs are the best kind
15:42 moritz nonexisting bugs are the best kind :-)
15:42 hoelzro speaking of bugs..
15:42 hoelzro did anyone look at my gist above?
15:42 hoelzro =)
15:42 hoelzro it looks kinda buggy to me
15:43 moritz hoelzro: I did
15:44 moritz hoelzro: recently we a a problem where the "recursion depth exceeded" exception caused an inifinite loop
15:44 moritz maybe that's related
15:44 * masak grumbles something about "nonexisting" not being an actual property
15:44 sisar " method rand(Real:D:) " <-- this mean that: rand is a method, it accepts a Real no., and... what does the ":D:" mean ?
15:44 masak it's a pseudoproperty used in the same grammatical slot as properties :)
15:44 hoelzro moritz: what's interesting is that I get no exception
15:44 masak sisar: :D means 'defined'
15:45 masak sisar: the ':' after means 'invocant'
15:45 hoelzro or was that behavior removed because of something more insidious?
15:46 sisar masak: 'invocant' ? what does it men (in this context) ? the 'one which invokes' ?
15:46 sisar *mean
15:46 moritz sisar: the object on which you call a method on
15:46 masak sisar: means the object on which... what moritz said.
15:47 masak but without the redundant 'on' :P
15:47 moritz hoelzro: yes, the exception gets caught and rethrown and that loops infinitely, which isn't good :/
15:47 moritz or something like that
15:47 hoelzro ok, just wanted to check =)
15:48 sisar masak, moritz: so does it mean that invoking rand without an invocant should throw an error?
15:49 moritz r: say Int.can('rand')[0]()
15:49 p6eval rakudo ee8ca1: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in method rand at src/gen/CORE.setting:2576␤  in block <anon> at /tmp/Mk3czni_51:1␤␤»
15:49 sisar r: say rand; #it does not
15:49 masak sisar: no, just means that the method form always has an invocant ;)
15:49 moritz sisar: yes, it is
15:49 p6eval rakudo ee8ca1: OUTPUT«0.582778168915869␤»
15:49 masak r: say rand()
15:49 p6eval rakudo ee8ca1: OUTPUT«0.224691034601168␤»
15:49 moritz that's a different rand() :-)
15:49 masak it is.
15:50 * sisar is confused
15:50 moritz sisar: there's both a sub and a method call rand
15:50 masak so, let's drag you the rest of way to enlightenment ;)
15:50 moritz and you cannot invoke the method rand without an invocant
15:50 masak sisar: methods != subs
15:50 sisar moritz: oh ! duh ! :)
15:50 moritz nr: say rand()
15:50 p6eval niecza v19-7-g5e25209: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of rand(); in Perl 6 please use rand at /tmp/uFgN28wEur line 1:�------> [32msay rand[33m�[31m()[0m��Parse failed��»
15:50 p6eval ..rakudo ee8ca1: OUTPUT«0.290655951554985␤»
15:51 moritz I think niecza++ is right here
15:51 moritz nr: say rand(10)
15:51 p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'rand' will never work with argument types (int) (line 1)␤    Expected: :()␤»
15:51 p6eval ..niecza v19-7-g5e25209: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at /tmp/Y591WqdlyV line 1:�------> [32msay rand[33m�[31m(10)[0m��Parse failed��»
15:52 * masak submits rakudobug
15:52 sisar masak++
15:52 masak karma masak
15:52 aloha masak has karma of 745.
15:52 masak \o/
15:54 dalek doc: 765f530 | moritz++ | lib/Real.pod:
15:54 dalek doc: document term rand
15:54 dalek doc: review: https://github.com/perl6/doc/commit/765f530cf4
15:57 * masak is a-golfin'
15:58 * moritz mentally adapts "surfin' USA" to "golfin' #perl6"
15:59 timotimo "you ess aye" is a little bit like "hash perl six" WRT rhythm, but it doesn't scan very well otherwise :(
15:59 broquaint joined #perl6
16:00 ilogger2 joined #perl6
16:00 wolong joined #perl6
16:01 huf perhaps golfin matilda would adapt better?
16:01 hoelzro haha
16:04 * colomon should really get around to around to buying a Beach Boys album someday...
16:06 [Coke] colomon: start with Dan & Jean
16:07 mikemol joined #perl6
16:08 * [Coke] wonders if he dredged that very old music memory correctly. probably not. ;)
16:08 zby_home joined #perl6
16:12 pmichaud (catching up with backscroll)
16:13 pmichaud 15:32 <hoelzro> this program doesn't seem to overflow: https://gist.github.com/3040496
16:13 pmichaud 15:32 <hoelzro> it reaches 99983 on my machine and stops
16:13 pmichaud currently Rakudo sets Parrot's recursion limit to 100K, so that looks about right.
16:13 pmichaud We definitely need to fix the exception handlers so that don't infinitely trap that exception, though.
16:13 pmichaud s/that/they/
16:13 pmichaud not sure how to do that.
16:13 pmichaud heh
16:14 pmichaud if the exception handler gets the recursion limit exceeded exception, have it bump the limit by 10 so that it can process the exception properly.  :-P
16:15 pmichaud (I suspect the problem is that when the handler catches the recursion limit exception, it's unable to call any more subs or blocks because that would exceed the recursion limit.)
16:16 [Coke] pmichaud: ooh evil solution. ++
16:16 pmichaud maybe I can ask #parrot for suggestions
16:19 sorear good * #perl6
16:19 thelazydeveloper joined #perl6
16:20 pmichaud (or, more precisely, if the handler catches the recursion limit exception, calling other subs or methods as part of the handling simply triggers more recursion limit exceptions)
16:21 sorear pmichaud: do C methods count?  can you change the recursion limit from the handler?
16:22 pmichaud sorear: I don't think C methods count.
16:22 pmichaud although they might.
16:22 geekosaur ...I would also set a flag since if you bump it and then hit the new limit you might be into a different kind of infinite loop...
16:22 pmichaud but yes, bumping up the recursion limit from within the handler might be a possibility
16:22 jnthn Given that we take care to run exception handlers with the call stack that's already in place, this seems likely to be the issue.
16:23 jnthn The counter is incremented in the Sub PMC's invoke v-table, which is not on the call path for C methods, iirc.
16:23 pmichaud so, a handler could bump up the limit, handle it, and restore the old limit.
16:24 pmichaud or, we could just set the recursion limit so high that someone runs out of memory before ever reaching the limit :)
16:25 [Coke] pmichaud: I don't think we need to encourage that sort of coding. :P
16:25 pmichaud well, 100,000 is itself a fairly arbitrary (and perhaps low) limit
16:26 pmichaud std: say rand()
16:27 p6eval std fd2647b: OUTPUT«Use of uninitialized value $x in pattern match (m//) at STD.pm line 66584.�Use of uninitialized value $x in concatenation (.) or string at STD.pm line 66623.�[31m===[0mSORRY![31m===[0m�Unsupported use of rand(); in Perl 6 please use rand at /tmp/TtfykUn5_j line 1…
16:35 masak moritz: meanwhile, quite some golfing later: https://gist.github.com/3040873
16:38 masak I think it's quite easy to see what's going on from that.
16:38 masak whether it's correct (upstream 'fatal' pragma loading affecting the 'fatal' level of a downstream module) is left as an exercise for the reader.
16:39 pmichaud I don't understand why it's being thrown.
16:39 pmichaud oh, use fatal!
16:40 pmichaud okay, I understand now.
16:40 sorear Let me be a voice in favor of (lowish) recursion limits.
16:40 sorear Out of control recursion is easier to spot when you get a recursion limit exception rather than an out of memory exception or segfault
16:41 sorear adding a recursion limit to niecza is on my TODO list
16:41 pmichaud sorear++
16:42 pmichaud that voice is sufficient for me to say "okay, we keep the limit for now"
16:42 sorear maybe even a soft one like p5 has, but it's not clear how to implement "no warnings 'deep'" in p5
16:42 sorear s:2nd/p5/p6/
16:42 pmichaud soft limit sounds very useful
16:45 moritz sorear: globally
16:57 colomon [Coke]: I believe you meant Jan and Dean?  I'd not heard of them before...
16:58 moritz I think it was about a Beach Boys album
16:58 erkan joined #perl6
16:59 adu joined #perl6
17:04 [Coke] colomon: so close!
17:04 MayDaniel joined #perl6
17:11 masak moritz: was everything clear about the golfin'?
17:11 fridim_ joined #perl6
17:12 moritz masak: erm, you tell me :-)
17:13 moritz oh wait
17:13 * moritz missed the gist
17:13 moritz oh
17:13 moritz my
17:13 * moritz stupid
17:13 moritz use fatal
17:13 * moritz facepalms
17:16 masak ;)
17:16 moritz masak++
17:16 masak I'm still not convinced it's correct Rakudo behavior.
17:17 masak so, 'use fatal' affects runtime behavior, yes?
17:17 moritz sure
17:17 masak hm. then maybe there's not much that we can do to limit it to the current unit.
17:17 jnthn It's a dynamic.
17:17 jnthn $*FATAL
17:18 moritz so
17:18 * jnthn -> shoppe
17:18 moritz the correct way is to write 'no fatal;' in modules which depend on it?
17:23 kaare__ joined #perl6
17:24 [Coke] moritz: won't that have the opposite effect on modules that thought they were fataling?
17:24 harmil [Coke]: I just want to point out that you just said "fataling"
17:25 moritz [Coke]: not if I understood dynamic scoping correclty
17:26 [Coke] harmil: making up new verbs is precedented here. ;)
17:26 [Coke] sorry, verbing up parts of speech is...
17:30 geekosaur ...is English all the way :p
17:33 fgomez joined #perl6
17:37 dalek rakudo/nom: 3bc91c1 | pmichaud++ | src/Perl6/Grammar.pm:
17:37 dalek rakudo/nom: Recognize obsolete forms of rand() and rand(N), per STD.pm.  Fixes RT #113968.
17:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3bc91c1cf7
17:40 fridim_ joined #perl6
17:47 harmil When compiling Perl6, Actions take longer than Grammar… there's a lesson to be learned in there, somewhere...
17:48 pmichaud 11:31 <pmichaud> You'd be surprised at how quickly you run across profound stuff on this channel.  :)
17:48 harmil ;)
17:48 moritz or across profund-sounding stuff, at least :-)
17:49 harmil Well, to be fair, it's probably not very profound to point out that there's probably something profound to be found in what you just pointed out....
17:52 jnthn Well, Actions.pm is almost twice as long as Grammar.pm.
17:52 moukeddar joined #perl6
17:52 moritz I guess some of that could and should be factored out to World.pm
17:52 birdwindupbird joined #perl6
17:53 harmil Seems I'm getting a lot of this while building Rakudo-Star 2012.06:
17:53 harmil ===SORRY!===
17:53 harmil No object at index 265
17:53 harmil In that case, while compiling ${PREFIX}/lib/parrot/4.5.0/languages/perl6/lib/Bailador.pm
17:55 jnthn moritz: I suspect D4 of masak's macros work will force us to do that in some palces.
17:55 * moritz wonders if D4 is as explosive as C4
17:55 moukeddar joined #perl6
17:58 cog_ joined #perl6
17:59 * moritz stares at Pod::To::HTML
17:59 moritz if I do something like
17:59 moritz =item foo\n =item bar
18:00 moritz the HTML it generates is
18:00 moritz <ul><li><p>foo</p>
18:00 moritz </li></ul><ul><li><p>bar</p>
18:00 moritz </li></ul>
18:01 hmm joined #perl6
18:01 moukeddar left #perl6
18:02 Guest64415 hi
18:02 moritz hello
18:02 Guest64415 how abt
18:03 Guest64415 r u there
18:03 Guest64415 hello
18:04 Guest64415 yea tell mortiz
18:06 tadzik moritz: yeah, this part is a bit tricky
18:06 tadzik S26 doesn't have a concept of lists. It has concept of items
18:06 tadzik which makes it quite unfriendly to convert that to tree-like lists
18:07 moritz I guess we'll need an analysis pass
18:09 tadzik ISTR one of the formatters had it
18:10 tadzik seems that I was wrong
18:16 masak tadzik: http://en.wikipedia.org/wiki/Composite_pattern is made specifically to treat the symptom you're describing.
18:17 masak (about mixing lists and non-lists items in an object hierarchy)
18:17 pmichaud if I'm reading S26 correctly, the item syntax is normally =item1, =item1, =item2, etc.
18:17 pmichaud for multi-level lists
18:17 tadzik right
18:17 pmichaud =item is the same as =item1
18:17 tadzik correct
18:17 * [Coke] wonders how many bugs can be closed out by doing what pmichaud just did to Grammar.pm
18:18 [Coke] (copying bits from STD.pm)
18:18 pmichaud [Coke]: I didn't even copy bits from STD.pm for that one, though.
18:18 pmichaud In this case, the STD.pm bits were already there.  I just moved the piece of code that was preventing them from ever being used :)
18:21 moritz quick apache2 question for (doc.perl6.org): I want to make the URL /type/Any to load file $docroot/type/Any.html
18:21 moritz I thought I could just add  Option +MultiViews
18:21 moritz and AddType 'text/html; charset=utf-8' html
18:22 moritz but that still gives a 404
18:22 moritz any idea what's wrong?
18:22 moritz or what I could try?
18:22 pmichaud any chance that Option is disabled there, or specifically MultiViews ?
18:23 moritz it's a virtual host file
18:23 moritz can it be disabled there?
18:24 pmichaud probably not, if it's Included
18:24 moritz it is; the index.html works
18:24 pmichaud is apache compiled with mod_negotiation?
18:25 pmichaud (default would be yes... but worth checking.)
18:26 moritz a2enmod negotiation
18:26 moritz Module negotiation already enabled
18:26 pmichaud I wouldn't think the AddType directive would be needed; it should already know about html
18:27 moritz well, I've tried without first, didn't work either
18:27 pmichaud does the error log show anything, ooc?
18:28 moritz [Tue Jul 03 20:27:46 2012] [error] [client 79.249.100.145] File does not exist: /var/www/doc.perl6.org/type/Any
18:29 moritz 79.249.100.145 - - [03/Jul/2012:20:27:46 +0200] "GET /type/Any HTTP/1.1" 404 284 "-" "Wget/1.13.4 (linux-gnu)"
18:29 moritz the last line is from access.log
18:29 flussence er... IIRC it's "Options"
18:29 moritz http://perlpunks.de/paste/show/4ff33a18.228a.384 that's the virtual host file
18:30 moritz OH
18:30 moritz it's commented out
18:30 * moritz facepalms again
18:30 flussence haha :)
18:30 moritz http://doc.perl6.org/type/Any
18:30 moritz works now
18:31 tadzik \o/
18:31 masak \o/ \o/ \o/
18:31 flussence moritz++
18:31 masak moritz++
18:31 tadzik woo
18:31 tadzik moritz++
18:31 masak that. is. just. so. cool.
18:33 moritz http://doc.perl6.org/ exists too
18:34 jnthn moritz++ :D
18:35 dalek doc/indexfile-bug: 37500ce | moritz++ | htmlify.pl:
18:35 dalek doc/indexfile-bug: fix creation of index page
18:35 dalek doc/indexfile-bug: review: https://github.com/perl6/doc/commit/37500ce34f
18:35 dalek doc: 65f731c | moritz++ | lib/Pod/To/Serialization.pm:
18:35 dalek doc: add Pod::To::Serialization
18:35 dalek doc: review: https://github.com/perl6/doc/commit/65f731cf2e
18:35 dalek doc: a4811a7 | moritz++ | htmlify.pl:
18:35 dalek doc: Create an index page
18:35 dalek doc: review: https://github.com/perl6/doc/commit/a4811a71d4
18:36 harmil Hmm… I'm embedding some Perl 6 into a Python project using their setuptools. This seems like a useful thing to write up… surprisingly easy to make it work well.
18:37 tadzik hoho :)
18:37 masak please write up.
18:37 masak ++harmil
18:39 timotimo harmil: i'm interested!
18:40 [Coke] moritz: I may work up an updated stylesheet if I'm bored. ;)
18:41 dalek roast: 2ebe3d9 | pmichaud++ | S32-num/rand.t:
18:41 dalek roast: Add tests for rand() and rand($n)   (RT #113968)
18:41 dalek roast: review: https://github.com/perl6/roast/commit/2ebe3d9c81
18:45 moritz pmichaud: throws_likek 'rand()', X::Obsolete; # would be a good test case
18:45 moritz *throws_like
18:45 moritz from Test::Util
18:49 pmichaud ah, I was looking for dies_like
18:49 pmichaud throws_like++
18:49 * pmichaud fixes.
18:54 fgomez joined #perl6
18:55 dalek roast: 8a68931 | pmichaud++ | S32-num/rand.t:
18:55 dalek roast: Update rand.t test to use throws_like (moritz++).
18:55 dalek roast: review: https://github.com/perl6/roast/commit/8a689313b1
18:55 brrt joined #perl6
18:55 pmichaud fwiw, I'm not sure that  BEGIN { @*INC.push: 't/spec/packages/' }
18:55 pmichaud is properly scalable/portable
18:56 pmichaud it assumes tests are always in t/spec from the current dir.
18:56 moritz use lib 't/spec/packages/'; # would be nicer, but doesn't work on niecza
18:56 pmichaud my problem is with the "t/spec", not the BEGIN.
18:56 pmichaud no, I don't have a fix.
18:56 moritz pmichaud: well, that part is documented in roast
18:57 pmichaud documentation helps, yes.  But many times I'll copy a test file up from t/spec to the main dir to make it easier to test/manipulate
18:57 pmichaud Guess I won't be able to do that for these files.
18:57 pmichaud well, I guess I'm okay as long as t/spec is in my current dir
18:58 masak that sounds like a rather small price to pay, tbh.
18:58 masak if you copy a file out of its native environment, you change the settings that assume that environment.
18:58 moritz the tests for $*PROGRAM_NAME also check that it starts with 't/spec/' or so
19:00 pmichaud it can certainly remain; it just feels like a design smell to me.
19:00 pyrimidine joined #perl6
19:01 moritz there's no design behind it, just evolution
19:01 moritz "the simplest thing that could possibly work"
19:01 pmichaud perhaps "evolution" is a form of design?  ;-)
19:02 timotimo as long as you keep intelligent design out of our perl6 classrooms!
19:06 masak no, no. teach it alongside Pastafarianism for all I care.
19:06 masak but perhaps don't waste too much biology lesson time on it ;)
19:07 timotimo keep the scientifically illiterate out of the science classroom :[
19:07 masak well, we all start out scientifically illiterate...
19:10 timotimo yeah, don't let those people into the science classroom!
19:10 timotimo they'll make it more awkward for the geniouses!
19:10 timotimo this troll is going nowhere *stops
19:25 arnsholt joined #perl6
19:32 moritz pmichaud: note that the section that contains 'my Int|Str $var' is already marked as Conjectural in the heading
19:33 pmichaud moritz: good point.
19:34 moritz which in p5 land would have been "here be dragons" :-)
19:35 pmichaud I'll close the issue for now.
19:35 pmichaud ooc, now that I've remembered that GitHub has an issue tracker, should I move questions.txt into the issue tracker?
19:35 pmichaud (the real question is... what is most likely to get TimToady++ to respond?  ;-)
19:36 brrt joined #perl6
19:42 moritz pmichaud: nagging on IRC more than choice of bug list medium
19:42 moritz :-)
19:43 pmichaud I guess I'm not good enough at nagging, then.
19:43 diakopter pmichaud: maybe mark each question with a priority for how soon you want/need it answered ideally - such as "asap", "sooner", "later", "eventually"
19:44 colomon +1 to using the issue tracker
19:44 diakopter like "blocking me"
19:44 pmichaud diakopter: (priority)  I can do that in either the questions.txt or the issue tracker
19:45 diakopter that way he doesn't feel like he needs to answer them all at once together
19:45 diakopter so the task doesn't look as big :)
19:46 vmspb joined #perl6
19:46 diakopter I mean, I can imagine some questions take a lot more thought than others
19:46 pmichaud well, most of them take some thought, yes.
19:46 masak question about prompt:
19:46 pmichaud otherwise he would've answered them on irc already :)
19:47 pmichaud afk, errand brb
19:47 masak nom -e 'my $a = prompt "> "; my $b = prompt "> "; say $a; say $b' # doesn't let me input $b if I ^D on $a
19:47 pmichaud (fwiw, I think I'm in favor of using the issue tracker)
19:47 masak beijing -e 'my $a = prompt "> "; my $b = prompt "> "; say $a; say $b' # does
19:47 masak which one is correct?
19:47 moritz masak: I'd argue nom is correct
19:47 pmichaud I think nom is correct.
19:47 moritz ^D closes STDIN
19:48 masak my use case in last year's crypt was to ask "Are you sure?" on quitting. and quitting can be done by ^D.
19:48 masak ok, so how do I re-open STDIN?
19:50 dalek doc: c216b81 | moritz++ | lib/ (2 files):
19:50 dalek doc: rename "perlvar" to "variables"
19:50 dalek doc: review: https://github.com/perl6/doc/commit/c216b81074
19:50 masak r: say get
19:50 p6eval rakudo 3bc91c: OUTPUT«Land der Berge, Land am Strome,␤»
19:51 masak r: $*IN.close; say get
19:51 p6eval rakudo 3bc91c: OUTPUT«End of argfiles reached␤  in method gist at src/gen/CORE.setting:9542␤  in sub say at src/gen/CORE.setting:7009␤  in block <anon> at /tmp/RsKMYBwVcJ:1␤␤»
19:51 masak r: $*IN.close; $*IN.open; say get
19:51 p6eval rakudo 3bc91c: OUTPUT«Cannot call 'open'; none of these signatures match:␤:(IO , $path, :r(:$r), :w(:$w), :a(:$a), :bin(:$bin), :chomp(:$chomp) = { ... }, :enc(:encoding($encoding)) = { ... }, Mu *%_)␤␤  in method open at src/gen/CORE.setting:7090␤  in block <anon> at /tmp/SfGlpckn_o:1␤…
19:51 moritz r: $*IN.close; $*IN.open('-'); say get
19:51 p6eval rakudo 3bc91c: OUTPUT«End of argfiles reached␤  in method gist at src/gen/CORE.setting:9542␤  in sub say at src/gen/CORE.setting:7009␤  in block <anon> at /tmp/cIiRMIAOt0:1␤␤»
19:51 masak I think there should definitely be a way to open $*IN after it has closed automatically.
19:52 alvis```` joined #perl6
19:52 dalek doc: ef6516f | (Gabor Szabo)++ | bin/p6doc:
19:52 dalek doc: fix search path if it is missing trailing slash
19:52 dalek doc: review: https://github.com/perl6/doc/commit/ef6516f738
19:52 dalek doc: 9f6657a | (Gabor Szabo)++ | bin/p6doc:
19:52 dalek doc: display error message if no POD found
19:52 dalek doc: review: https://github.com/perl6/doc/commit/9f6657a306
19:52 dalek doc: b03e584 | (Gabor Szabo)++ | lib/ (2 files):
19:52 dalek doc: Merge branch 'master' of github.com:perl6/doc
19:52 dalek doc: review: https://github.com/perl6/doc/commit/b03e58462e
19:53 colomon can you open stdin in a different file variable?
19:53 colomon something like $file = open('-')
19:53 colomon ?
19:54 masak r: my $fh = open('-'); say $fh.get
19:54 p6eval rakudo 3bc91c: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub open at src/RESTRICTED.setting:5␤  in block <anon> at /tmp/9BBBm_6dZJ:1␤␤»
19:54 masak heh :)
19:54 brrt joined #perl6
19:54 stephenlb joined #perl6
19:55 * colomon can't try it locally because he has somehow broken Rakudo.
19:55 colomon n: my $fh = open('-'); say $fh.get
19:55 p6eval niecza v19-7-g5e25209: OUTPUT«Unhandled exception: System.IO.FileNotFoundException: Could not find file "/home/p6eval/niecza/-".␤File name: '/home/p6eval/niecza/-'␤  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, B…
19:57 * colomon has broken Rakudo, mono, and the Windows version of his $work project so far this week....
19:58 arnsholt Impressive for a tuesday =)
20:00 fhelmberger joined #perl6
20:08 colomon woah, my $fh = open('-'); say $fh.get does indeed work locally on Rakudo
20:08 * diakopter writes a bit of Perl 6 code with 3 nested gather/take
20:10 vmspb Hello, perl 5 works in pugs?
20:10 vmspb p: use v5; print ~5;
20:11 p6eval pugs: OUTPUT«Error eval perl5: "sub { use ops (':default', 'binmode', 'entereval');; print ~5;␤␤}"␤*** 'print' trapped by operation mask at (eval 2) line 1.␤␤Can't call method "" on an undefined value.␤»
20:11 diakopter eval: print ~5
20:11 buubot_backup diakopter: 42949672901
20:13 spider-mario joined #perl6
20:16 cognominal joined #perl6
20:20 pmichaud I think I'm leaning towards using the git issue tracker for spec questions.
20:22 pmichaud *github
20:24 moritz r: say Any.map: { $^x }
20:24 p6eval rakudo 3bc91c: OUTPUT«use of uninitialized value of type Any in string context  in block <anon> at /tmp/wUKX3b_lkE:1␤␤␤»
20:24 moritz r: say Any
20:24 p6eval rakudo 3bc91c: OUTPUT«Any()␤»
20:24 moritz r: say Any.list
20:25 p6eval rakudo 3bc91c: OUTPUT«use of uninitialized value of type Any in string context  in block <anon> at /tmp/JW7vMMSSxo:1␤␤␤»
20:28 sorear pmichaud: +1
20:30 tokuhiro_ joined #perl6
20:44 vlixes joined #perl6
20:55 dalek doc: 629aa4e | moritz++ | lib/Array.pod:
20:55 dalek doc: [Array] just state what it is yet, no methods yet
20:55 dalek doc: review: https://github.com/perl6/doc/commit/629aa4e79a
20:55 dalek doc: 7e59ba0 | moritz++ | htmlify.pl:
20:55 dalek doc: [htmlify.pl] separate types and language docs
20:55 dalek doc: review: https://github.com/perl6/doc/commit/7e59ba0f75
21:00 vmspb left #perl6
21:13 brrt joined #perl6
21:19 masak lol, I blug! \o/ http://strangelyconsistent.org/blog/july-3-testing-the-adventure-game-looking-around
21:20 pmichaud downside of using the github issue tracker is that updates don't post to the channel, though.
21:21 jnthn masak and I hacked up an IRC bot for github issues that ran on Rakudo...then the API changed to https only :(
21:21 jnthn It didn't poll for new issues, but it coulda been made to.
21:21 pmichaud well, I'd prefer something push-oriented anyway.
21:22 masak jnthn: we need to get https to work on Rakudo :)
21:22 masak for those who dare read today's blog post: it's simpler and less involved than the previous two.
21:22 masak this will probably be the prevailing patterns from now on. simple steps.
21:22 masak think of posts 1 and 2 as a crash course in intentful testing :)
21:23 brrt left #perl6
21:23 jnthn masak: Yeah, I've no idea how we do that ;)
21:24 masak jnthn: maybe it's the only thing in computer science that actually can't be done :P
21:24 jnthn :P
21:25 masak what, you just implement the HTTPS protocol. it's not like it involves hard things like, I dunno, encryption, or serious math.
21:26 jnthn sshhhhh :P
21:27 sorear just use zavolaj and libcurl.
21:27 sorear if you hate libcurl, you could still use ssleay and/or openssl.
21:30 masak I don't hate libcurl.
21:30 jnthn sorear++ # good ideas
21:30 masak yeah. sorear++
21:30 jnthn (My "no idea" was mostly about what libraries to write bindings for.)
21:30 fridim_ joined #perl6
21:31 masak r: class A { has $s .= new }
21:31 p6eval rakudo 3bc91c: OUTPUT«===SORRY!===␤Cannot use .= to initialize an attribute at line 2, near " }"␤»
21:32 masak why is that, by the way?
21:32 pmichaud ooc, could dalek be modified to be able to forward (well-formatted) email updates to the chan?
21:33 jnthn masak: Laziness.
21:33 jnthn masak: Probably on my part.
21:33 jnthn masak: It can likely be made to work.
21:33 masak yeah, I don't see the impossibility here.
21:33 jnthn masak: It's just a little bit more re-writing.
21:33 masak aye.
21:33 masak it's been bumped out of RT (because that ticket was about an internal error).
21:34 masak I'm thinking of bumping it back in as a feature request.
21:34 jnthn I suspect it went like this: it didn't ever work before but gave a crappy error, I did the initializer refactor, put in a good error for it and go on with something else :)
21:34 jnthn *got
21:34 jnthn I can fix it, but after the QAST refactor.
21:34 masak yes yes do QAST first of course
21:34 masak :)
21:35 masak would you be helped by a rakudobug for it?
21:35 jnthn Yes.
21:35 * masak submits rakudobug
21:35 jnthn Otherwise it stands a very high chance of being forgotten.
21:36 masak wouldn't want that.
21:36 sorear pmichaud: dalek can forward pretty much anything to the chan.
21:36 sorear pmichaud: if you can write a program in any language which spits out updates to STDOUT, it can feed into dalek.
21:37 pmichaud well, email obviously can be quickly spit to STDOUT :-)
21:37 pmichaud and a good procmail script can feed it to dalek
21:38 pmichaud and I suspect we could find a way to get issue update emails sent to a dalek address
21:40 sorear pmichaud: there is a file named something like /home/p6eval/dalek/queue; you want to format lines like 'freenode #perl6 Hello!' and >> them to the queu
21:40 pmichaud we could potentially use an email gateway to get updates from RT into the channel too.
21:40 sorear pmichaud: there's a Perl 5 helper module that implements karma updates somewhere too
21:41 sorear so, yeah.  procmail could very easily route stuff to dalek
21:41 sorear but I don't currently have time to develop such a thing
21:49 pmichaud r: sub marine() { }; say &marine
21:49 p6eval rakudo 3bc91c: OUTPUT«sub marine() { ... }␤»
21:49 pmichaud r: sub marine() { }; say &marine.name
21:49 p6eval rakudo 3bc91c: OUTPUT«marine␤»
21:49 pmichaud r: sub marine() { }; say &marine.Str
21:49 p6eval rakudo 3bc91c: OUTPUT«marine␤»
21:50 dalek doc: 9fdeae2 | pmichaud++ | lib/Code.pod:
21:50 dalek doc: [Code]:  Update .Str example to actually use Code.Str :-).
21:50 dalek doc: review: https://github.com/perl6/doc/commit/9fdeae22e3
21:50 jnthn Gee, what a terrible pun... :)
21:51 masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {.WHAT} {callsame}" } }; say &marine.name
21:51 p6eval rakudo 3bc91c: OUTPUT«marine␤»
21:51 masak hmm :)
21:51 masak oh!
21:51 masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {.WHAT} {callsame}" } }; say &yellow.name
21:51 p6eval rakudo 3bc91c: OUTPUT«use of uninitialized value of type Any in string context  in method name at /tmp/Vppqviy1c8:1␤␤yellow  marine␤»
21:51 masak almost... :)
21:51 pmichaud self.WHAT
21:52 masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.WHAT} {callsame}" } }; say &yellow.name
21:52 p6eval rakudo 3bc91c: OUTPUT«use of uninitialized value of type Sub+{<anon>} in string context  in method name at /tmp/NvzgRbch2v:1␤␤yellow  marine␤»
21:52 jnthn self.WHAT.gist
21:52 masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.WHAT.gist} {callsame}" } }; say &yellow.name
21:52 jnthn for self.^name
21:52 p6eval rakudo 3bc91c: OUTPUT«yellow Sub+{<anon>}() marine␤»
21:52 jnthn *or
21:52 masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^name} {callsame}" } }; say &yellow.name
21:52 p6eval rakudo 3bc91c: OUTPUT«yellow Sub+{<anon>} marine␤»
21:52 masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^name.substr(0, 3)} {callsame}" } }; say &yellow.name
21:52 p6eval rakudo 3bc91c: OUTPUT«yellow Sub marine␤»
21:52 masak \o/
21:52 pmichaud cheater!
21:53 masak yeah... :)
21:53 jnthn sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^mro[1].^name} {callsame}" } }; say &yellow.name
21:53 jnthn r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^mro[1].^name} {callsame}" } }; say &yellow.name
21:53 p6eval rakudo 3bc91c: OUTPUT«yellow Sub marine␤»
21:55 masak oh, and that's *not* cheating? :P
21:55 pmichaud cheater!
21:55 masak (nice, though)
21:55 jnthn no mroe cheating than yours :P
21:55 pmichaud afk, pizza run.
21:56 masak see pizza run. run, pizza, run.
21:56 jnthn they run, do they?
21:56 jnthn dang, masak got their first :P
21:56 masak only if you execute them.
21:57 jnthn .oO( I'd never thought of the pizza slicer that way... )
22:00 harmil r: say ([Mu,[],{}]>>.^methods).perl
22:01 p6eval rakudo 3bc91c: OUTPUT«((method ACCEPTS(Mu , , Mu *%_) { ... }, method WHERE(Mu , Mu *%_) { ... }, method WHICH(Mu , , Mu *%_) { ... }, method take(Mu , Mu *%_) { ... }, method WHY(Mu , Mu *%_) { ... }, method Bool(Mu , , Mu *%_) { ... }, method so(Mu , Mu *%_) { ... }, method not(Mu , M…
22:01 * masak .oO( meat is murder, as are tomatoes and crust )
22:01 harmil hmm… the last bit of that is, ", [], {})"
22:01 harmil there are a lot of possible results I might have expected, but that's not one of them
22:04 jnthn hyper dispatch descends into nested data structures
22:05 harmil oh does it now?
22:06 harmil Hmm… is there any way to stop that?
22:09 harmil That's really a show-stopper when you don't know what the list contains, but just want to introspect on it. You have to avoid hyperoperators in that case?
22:09 jnthn You could use map. :)
22:10 masak you *should* use map, if shallow traversal is what you want.
22:10 masak but yes, I agree about it being really pessimal in some cases.
22:11 masak the "new" traversal semantics really surprises me sometimes.
22:11 harmil So, hyperoperators are only useful if you know that you're operating on collections of scalar values or homogeneous collections of nested structures (e.g. where all scalar content can be treated identically)?
22:12 jnthn With the current spec, I think so, yes.
22:12 harmil OK, well I might argue that's icky, but at least I know
22:12 harmil thanks
22:21 harmil Now I think about it, I have this vague memory from somewhere around 2005ish that there was a discussion about controlling the shallow/deepness of hyperoperation on either side of >>*<< but I can't recall what that discussion lead to or if it was ever captured anywhere.
22:31 * jnthn -> rest
22:31 jnthn 'night, #perl6
22:43 masak 'night, #perl6
22:45 preflex joined #perl6
22:56 seldon joined #perl6
23:13 cognominal_ joined #perl6
23:14 erkan joined #perl6
23:18 cognominal__ joined #perl6
23:29 skids joined #perl6
23:37 tokuhirom2 joined #perl6
23:50 plobsing joined #perl6
23:51 carlin masak: s/mehthod/method/ in your latest blog post
23:51 carlin (unless mehthod is a neologism for a method that one feels indifferently about)
23:57 leprevost joined #perl6

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

Perl 6 | Reference Documentation | Rakudo