»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:01 sporous left 00:11 sporous joined
mokko Where can I find out about perl6's pod? 00:21
00:25 spider-mario left 00:26 domidumont1 joined 00:27 domidumont left
adu mokko: I don't know 00:29
I try not to use it
flussence mokko: github.com/perl6/doc
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, perlcabal.org/syn/S26.html
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!
flussence you'll have to excuse the slightly broken HTML on that page, pod2html isn't quite complete yet :) 00:31
sorear mokko: to be clear, pod6 is not compatible with pod5 00:47
mokko: btw, welcome to perl 6
01:02 scott_ joined, scott_ is now known as Guest43154 01:06 adu left
flussence sometimes I think adu is just here to troll. 01:10
01:29 tyatpi joined 01:34 Guest62534 left 01:44 cognominal joined 01:47 cog_ left 02:02 mokko left 02:07 tokuhiro_ left 02:23 colomon left 02:28 colomon joined 02:45 Transformer joined 02:47 Transformer left 02:57 brent joined 03:02 colomon left, brent left 03:17 adu joined 03:31 thou left 03:35 wamba joined 03:42 adu left 03:55 sudokode left 04:06 sudokode joined 04:08 kaare_ joined 04:09 wamba left 04:14 stephenlb left 04:16 adu joined 04:29 alvis`` joined 04:31 alvis` left 04:51 thou joined 05:02 alvis``` joined 05:04 birdwindupbird joined, alvis`` left
moritz \o 05:16
sorear o/ 05:22
adu \o 05:25
05:49 am0c joined 06:02 magnus joined, magnus is now known as magup
magup all: i'm trying to add ilbot for a local irc server 06:04
all: i've come so far that I can see the 'Index of IRC logs' welcome 06:05
all: but ilbot does not join the specified channel, nor logs it
06:06 kaleem joined
moritz magup: I can try to help you in private message 06:10
06:18 sudokode is now known as THE_WillySilly, tyatpi left 06:19 THE_WillySilly is now known as sudokode
tadzik good morning 06:19
moritz \o tadzik 06:20
tadzik moritz! \o/
06:25 fhelmberger joined 06:29 anandrms joined 06:32 magup left
anandrms std: say 3+4 06:33
p6eval std fd2647b: OUTPUT«ok 00:01 41m␤»
anandrms std: say 3 + 4
p6eval std fd2647b: OUTPUT«ok 00:00 41m␤»
06:34 anandrms left 06:35 sudokode left
moritz tadzik: I'm trying to find out why newest panda hangs after compiling the last module 06:35
tadzik: and currently my problem is that bootstrap.sh works fine, and it installs the panda-from-source, not my local panda
tadzik: so all debug output I add to my local panda is lost
tadzik: any idea how I can debug that?
this also explains why reverting to an older version of panda didn't fix anything :/ 06:37
tadzik moritz: you can do 'panda install .' to install the local directory 06:39
tadzik decommutees 06:40
or, commutees
moritz tadzik: panda install . hangs the same way that any other installation does, since it uses the upstream panda which ./bootrap.sh installed :( 06:46
moritz tries perl6 -Iext -Ilib bin/panda install $module 06:47
segfault 06:48
06:51 brrt joined
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␤␤»
moritz that's bad.
and that's the reason panda loops 07:01
it throws that excption when resetting PERL6LIB to the previous value
*exception
and then loops somehow while trying to catch and rethrow that exception 07:02
dalek kudo/nom: cef4452 | moritz++ | src/core/terms.pm:
do not die when assigning non-Str values to %*ENV<..> elements
07:09
nda: 2d2c253 | moritz++ | lib/Panda/ (3 files):
refactor handling of PERL6LIB setting into a common sub

also improve robustness when PERL6LIB started off empty
07:10
moritz \o/ panda works again 07:16
r: sub f($x is copy) { LEAVE say ENTER $x; $x = 5 }; f 3 07:17
p6eval rakudo 16db64: OUTPUT«Nil␤»
moritz :(
that would have been really awesome
dalek nda: 2ce433c | moritz++ | lib/Panda/Common.pm:
simplify &indir
07:18
nda: 9b8a6da | moritz++ | t/panda/common.t:
tests for &indir
07:23
07:25 kresike joined
kresike good morning all you happy perl6 people 07:25
07:26 sftp_ left 07:28 tyatpi joined
tadzik hello kresike 07:31
moritz++ # panda patches
07:47 thou left 07:51 wamba joined
kresike hello tadzik o/ 07:54
moritz \o kresike
kresike hello moritz o/
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
hoelzro: rx[], IIRC.
moritz hoelzro: regex { ^ 'git://github.com' }
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
moritz thought error message that rakudo gives isn't good :(
hoelzro moritz, masak: thanks!
moritz n: regex {^git://github.com}
p6eval niecza v19-7-g5e25209: OUTPUT«===SORRY!===␤␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/AgGihPTGOg line 1:␤------> regex {^git:⏏//github.com}␤␤Unable to parse regex; couldn't find right brace at /tmp/AgGihPTGOg line…
hoelzro I'm guessing it also behaves as m//x in Perl5? 07:58
given the extra space?
moritz yes
though you can make the space DWIM with :s
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." -- perl6maven.com/starting-again-with-rakudo-perl6
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?
masak hoelzro: you could say that.
moritz hoelzro: quotes just act like quotes in the main language
masak: yes, that's what I'm also doing with perl6/doc
masak hoelzro: but it's easier to just... what moritz said.
moritz: which is sadly not mentioned in that list :/
moritz masak: so I should get gabor to join me
masak moritz: yes.
hoelzro so I can do regex { ... "something $variable something" ... }? 08:00
and $variable will be interpolated?
moritz yes
tadzik try it :)
masak hoelzro: there's an evalbot.
moritz and it will be interpolated as a string
not as a regex
r: my $var = 'o:b'; say ('foo:bar' ~~ / "fo$var" /).Str 08:01
p6eval rakudo 16db64: OUTPUT«␤»
masak r: my $foo = '42'; say "there are 42 kangaroos" ~~ / "there are $foo kangaroos" /
p6eval rakudo 16db64: OUTPUT«#<failed match>␤»
masak hm.
moritz wat
masak submits rakudobug
hoelzro moritz: right
masak n: my $foo = '42'; say "there are 42 kangaroos" ~~ / "there are $foo kangaroos" /
p6eval niecza v19-7-g5e25209: OUTPUT«#<match from(0) to(22) text(there are 42 kangaroos) pos([].list) named({}.hash)>␤»
hoelzro that's what I would expect
masak niecza++
moritz niecza++
hoelzro++ # finding a rakudobug 08:02
masak hoelzro++
hoelzro yay
08:04 adu left
hoelzro just tried $str.=subst($re, $replacement) 08:04
awesome!
masak :)
also check out .=trans, for your multi-replacement needs. 08:05
hoelzro trans ~~ y///?
masak also known as tr///, yes :)
moritz though the tr form isn't implemented yet in rakudo
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
p6eval rakudo 16db64: OUTPUT«Don't just do something, stand there!␤»
hoelzro have you guys thought about making .replace an alias for .subst?
08:06 GlitchMr joined
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
I see
masak yes, .subst and .substr look too alike. 08:07
it's a crowded spot in the API.
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
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
moritz but you can clone a repo yourself, cd into it and then panda install .
hoelzro (I have to change Github repos to their https versions in Panda due to a firewall) 08:14
tadzik :(
hoelzro see, that problem is that I'm bootstrapping Panda =( 08:15
moritz r: my $foo = '42'; say '$foo' ~~ /"$foo"/
p6eval rakudo cef445: OUTPUT«q[$foo]␤␤»
hoelzro I'll just dig inside Panda::Fetcher
tadzik hoelzro: the urls are taken from the modules' META.infos 08:16
hoelzro right
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 >:)
having little Perl6 knowledge, that's proving a little difficult
but, more importantly, fun =)
moritz hoelzro: 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
moritz if you use the bootstrap script, you'll get a fresh panda from source, not from your local copy
oh, "fun" 08:20
hoelzro moritz: thanks; I saw that before I said anything =)
masak .oO( -O"fun" )
hoelzro I've been lurking for a week or so now
masak hoelzro: I recognize your nick. you were here in 2007..2009. 08:22
welcome back :)
hoelzro yes, I pop in from time to time =) 08:23
I did a small amount of work on Pugs
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:24
masak you and us both :) 08:25
though the book could use some love.
08:25 dakkar joined
moritz moritz.faui2k3.org/tmp/p6doc-html/L...d%20Sigils the #fragment works in IE8 but not in FF 13 08:29
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: :(
brrt ooh, js errors 08:33
one has to lurk for weeks to find something in which one could be of help
masak ;) 08:34
brrt++
and no, not really. :) there's lots to help with. we should just be better at flagging it up.
moritz hm
brrt oh, jquery 08:35
lets see
moritz for producing the p6doc HTMLs I really, really need a way to get at the Pod tree of another file
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
other ideas?
tadzik I'm wondering if it would ever be possible to actually reuse the nqp part of Pod code in Perl 6 code 08:37
the parser possibly, yes, but the AST generation is using World and all this magic 08:38
moritz well
we have several such reuse mechanisms for ordinary code
use, require, eval
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
nqp is very stable tech, so it's not likely to be replaced soon.
but maybe there's such a lifting event in the future, putting Rakudo on Rakudo rather than nqp.
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?
brrt that will probably help 08:42
Timbus this is obviously a job for fuckitjs 08:43
moritz :-)
brrt haha
that code is hilarious
although.. as it seems now
it errs on cloning a node and then firing an event on it
quite possibly, firing events on parentless nodes is illegal 08:44
08:47 thou joined 08:54 robinsmidsrod left 09:02 robinsmidsrod joined 09:04 thou left 09:15 wamba left
jnthn ohhai o/ 09:23
tadzik \o 09:24
moritz lolitsjnthn! 09:25
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:27
tadzik: the reason is that otherwise .perl will produce unqualified class names, and re-evaling fails 09:28
tadzik: can you think of a reason not to do that?
tadzik moritz: nope
if it works, of course
moritz well, the pod tests still pass :-)
tadzik the rationale for 'my package Pod' was a rakudobug of some sort
moritz yes, I thought so 09:29
tadzik oh, yes, the collision with Block
moritz when I started with my various X:: classes they didn't work out of the box either
which is why I used a similar hack back then
tadzik tricky business, eh
moritz tadzik: in the long run I'd like to use panda to install modules for star 09:32
I mean, during the installation process of the star package
tadzik moritz: that looks like a reasonable step, yes
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
I also thought about something like a binary Rakudo distribution
moritz and I'd like to get rid of at least one
tadzik: me too
tadzik: but, it's only of limited usefullness, because rakudo and parrot aren't relocateable 09:34
tadzik I know
first thought is "/opt"
moritz /opt/rakudo-star-2012.06/ or so
tadzik for example, yes
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
no eye deer where it was
moritz masak: you'll probably need to read mulitple resources for that 09:37
masak: there's the "linux standard base" (?) which gives recommendations for distributions on what to put where
masak oh, ok. 09:38
sisar "{ * +2 } " <--- is this piece of code a closure ?
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/
masak sisar: no, that's not how you do it.
moritz sisar: it's likely a bug
* + 2 is a closure
masak sisar: either `{ $_ + 2 }` or `* + 2`
sisar: and they're equivalent. the * basically gives you automatic {} 09:39
sisar hmm
moritz but "{ * + 2 }" interpolates a closure into the string, without calling it
r: say "{ * + 2 } foo"
p6eval rakudo cef445: OUTPUT«_block1014 foo␤»
moritz right; not what you want
sisar r: say (* + 2);
p6eval rakudo cef445: OUTPUT«WhateverCode.new()␤»
moritz that's the difference between .gist and .Str 09:40
09:41 colomon joined
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␤␤»
moritz sisar: no, that's not computable
in the general case
sisar moritz: because one would have to check all the possible values which * can take ? 09:42
moritz sisar: one cannot even programmatically determine if a given piece of code will ever terminate 09:43
sisar: 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.
tadzik or check the AST :P 09:45
masak that*
sisar moritz: right. I'm surprised how easily and frequently I hit deep concepts of computer science regularly.
hoelzro you mean Perl6 can't solve the halting problem? =P
moritz hoelzro: except when you give it a shotgun :-)
masak tadzik: if the closures were limited to a subset, like arithmetic expressions, things are perhaps tractable on the AST level.
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.
hm, that's not quite it. 09:47
dalek kudo/nom: ee8ca1a | moritz++ | src/core/Pod.pm:
use fully qualified names for Pod classes

that way the .perl output can be eval()ed again
masak loops whose termination is as difficult to determine as actually running the loop.
moritz right
and when the memory is not bounded
masak right.
I like to think of the Collatz sequence in this case.
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
masak r: say 5, { $_ %% 2 ?? $_ / 2 !! $_ * 3 + 1 } ... 1
p6eval rakudo cef445: OUTPUT«5 16 8 4 2 1␤»
masak r: say 37, { $_ %% 2 ?? $_ / 2 !! $_ * 3 + 1 } ... 1
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␤»
moritz another nice one is
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
moritz sisar: because arithmetic closures aren't hard 09:51
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
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
sisar: yes
sisar: optimizing compilers do that 09:53
sisar: and computer algebra systems
sisar this is all so interesting :-)
moritz 2 x + 2 == 2 * (x + 1) // Simplify 09:54
True
sisar masak++, moritz++: thanks for the explanations !
moritz says Mathematica
masak yes, the thing about "loop-less arithmetic closures" was my point above.
sisar reads about Collatz sequence 09:55
moritz loves computer algebra system
s
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.
felher xkcd.com/710/ 09:56
masak sagas (in business systems) are an example.
felher @collatz conjecture/sequence
moritz masak: aye
masak: it becomes really interesting if an analyzer knows whether it can decide a question, or not 09:57
sisar realizes that he has read about Collatz sequence before and found it really interesting 09:58
09:58 gesh joined
dalek p/toqast: 8a787d6 | moritz++ | VERSION:
bump VERSION
10:00
p/toqast: c7f76bc | moritz++ | VERSION:
Merge branch 'release-2012.06.1'

A bit more diagnostic output.
10:00 dalek left 10:01 dalek joined, ChanServ sets mode: +v dalek 10:05 seldon joined
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:05
a saga analyzer helps keep things sane and make sure processes terminate within some set time. 10:06
moritz masak: is a saga analyzer a formal verification tool? 10:09
10:09 Guest43154 left
masak yes, running on pi calculus. 10:10
sisar hehe, I Googled for 'saga analyzer', and the no. 1 result I get is masak++'s gist; gist.github.com/2366527 ! 10:11
masak ;) 10:12
yes, there isn't any literature on this that I know of.
moritz might just be known under a different name usually
masak probably.
that saga analyzers works and is kinda cool, but now I think it misses the point. 10:13
analyzer*
the one in the gist.
p/toqast: 52ba417 | jnthn++ | / (3 files):
Get first pieces of QAST::Want support in place.
sisar masak: is this the Greg Young you were talking about: goodenoughsoftware.net/2012/04/24/s...ess-users/ ?
masak aye. 10:15
I really liked that post.
it unifies sagas and the kind of intentful TDD I use for the hanoi game. 10:16
dalek kudo/toqast: 917c855 | jnthn++ | src/QPerl6/Compiler.nqp:
Disable optimizer for now; will update it for QAST later on.
10:17
kudo/toqast: 471bd15 | jnthn++ | src/QPerl6/ (2 files):
Start translating a few lexicals bits to QAST.
kudo/toqast: 519c853 | jnthn++ | src/QPerl6/World.pm:
Translate various fixup code.
kudo/toqast: c3cfc12 | jnthn++ | src/QPerl6/ (2 files):
Various Op and Var translations to try and get us towards compiling hello world.
kudo/toqast: 71518ca | jnthn++ | src/QPerl6/World.pm:
Fix setting loading code.
kudo/toqast: 86ae30b | jnthn++ | src/QPerl6/World.pm:
PAST::Want -> QAST::Want in World.
kudo/toqast: d64eedd | jnthn++ | src/QPerl6/Actions.pm:
Disable context saving for a bit (needs updating for QAST).
masak \o/ jnthn++
moritz karma jnthn 10:18
aloha jnthn has karma of 2655.
10:19 Psyche^ joined 10:20 colomon left 10:23 Patterner left, Psyche^ is now known as Patterner 10:29 whiteknight joined 10:30 whiteknight is now known as Guest1449
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:32
masak hm. 10:33
jnthn I believe they cannot be.
masak r: sub foo(Int *@numbers) {}; foo(5, 42)
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␤␤»
masak in any case, that's a crappy error message.
r: say Array ~~ Positional 10:34
p6eval rakudo ee8ca1: OUTPUT«True␤»
masak was gonna say.
masak submits LTA rakudobug
jnthn It's missing the type info for some reason.
We should perhaps just forbid the type on slurpies at all though
masak aye.
that's the conservative thing to so.
jnthn As in, catch it much earlier at compile time and say "this won't work"
masak do*
aye.
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:␤------> sub foo(Int *⏏@numbers) {}; foo(5, 42)␤ok 00:00 44m␤»
seldon It would be nice to have, though.
masak we usually provide things that are nice to have unless they are impossible for some reason. 10:36
and sometimes even then. :)
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:40
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:42
masak seldon: interested to hear what you think of this kind of runtime duck typing: github.com/masak/crypt/blob/b80e96...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.
masak: Er..I'll need a moment to read that.
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)
that's fine, I'm not in a hurry. 10:47
seldon %commands is a hash of the public methods of $game to the number of arguments that method expects? 10:51
masak aye. 10:55
and it's computed from $game.
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
masak agreed. 10:56
seldon But then, I come from a C++ background.
Python coders might disagree.
11:11 erkan left
masak I'm not sure they would. it's not so much about duck typing as about common sense. 11:14
seldon You'd think so, but I've never seen a piece of duck-typed database client code that actually did it. 11:20
pmichaud good morning, #perl6 11:22
tadzik hello pmichaud
seldon Morning
masak pmichaud! \o/
seldon: that makes me a bit sad, then. 11:23
seldon Let's move on to happier matters, then.
masak seldon: but it also means there will always be enough work for people who have a clue.
dalek p/toqast: 4621c27 | jnthn++ | src/QAST/Compiler.nqp:
Fix loadlibs compilation.
p/toqast: ef8c730 | jnthn++ | src/QAST/Compiler.nqp:
Add stub for where we'll generate deserialization code later.
p/toqast: 2a0ef4c | jnthn++ | src/QAST/Compiler.nqp:
No blocktype implies declaration.
jnthn qperl6 -e "say(42)" # now works
dalek kudo/toqast: 3e204d4 | jnthn++ | src/QPerl6/Actions.pm:
Updating various other PAST::Want usages to QAST::Want.
11:25
moritz \o/
pmichaud jnthn: \o/
jnthn So, next I'll work through t/00-parrot 11:27
Mebbe some lunch first.
seldon Ha! sub MAIN (*@numbers where { [&&] @numbers>>.isa(Int) }) { works satisfactorily.
tadzik see also: all(@numbers) ~~ Int 11:28
masak seldon: yes, that is the established workaround.
seldon: sorry, should've said right away. seldon++ for figuring it out, though :) 11:29
seldon (: I suppose it'll be some time before I can figure out truly profound stuff. 11:30
pmichaud You'd be surprised at how quickly you run across profound stuff on this channel. :) 11:31
11:33 mucker joined, spider-mario joined
seldon Hm.. all(@numbers) ~~ Int doesn't seem to work. 11:33
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
p6eval rakudo ee8ca1: OUTPUT«False␤»
moritz oh right
mucker o/ #perl6
moritz because it type-checks the Junction against Int
if type-checks would autothread, you could never check for a Junction
pmichaud hmmm 11:35
S03 says otherwise; it says that ~~ is supposed to autothread 11:36
~~ is supposed to autothread, while .ACCEPTS does not (iirc)
moritz r: say Mu ~~ Mu
p6eval rakudo ee8ca1: OUTPUT«True␤»
moritz that wouldn't work if ~~ autothreaded
masak why not? 11:37
moritz because autothreading relies on not having any candidate that accepts Mu
pmichaud "relies on" doesn't have to.
a function that accepts Mu could do its own autothreading.
moritz well, that's how it's implemented at the moment
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.
moritz no, but I'm pretty sure that's the only mechanism mentioned
11:38 daxim joined
moritz and it's confusing enough in its current state already 11:39
pmichaud anyway, I'm pretty sure that &infix:<~~> should autothread. 11:41
if it's multi'd, it could even specifically look for Junction arguments.
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
pmichaud anyway, according to current S03 all(1,2,3) ~~ Int should autothread, and is therefore a rakudobug. 11:45
moritz ... assuming it can be done in a consistent way 11:46
otherwise it's a specbug
pmichaud correct. But I don't see an inconsistency.
moritz does
masak I don't feel like submitting a rakudobug until you decide what the spec is :) 11:50
because then it'll just limbo and take up space.
seldon To the Deathball Arena?
pmichaud the ticket can be a specbug ticket, too.
i.e., the ticket notes the discrepancy between Rakudo and spec.
11:50 renormalist joined
moritz except that specbug tickets live on github these days 11:50
(except those we haven't migrated yet) 11:51
pmichaud it can also get an entry in questions.txt in p6/spec
moritz use File::Find; find("foo", sub { say })'no &wanted subroutine given at /hom
sorry
github.com/perl6/specs/issues/new
11:51 JimmyZ__ joined
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 =(
pmichaud hoelzro: because it's exceptional :)
11:52 JimmyZ_ left
hoelzro it's all because it makes the word pop out? 11:53
masak walk &
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"
moritz hoelzro: because all our phasers are all-caps, to make it more obvious that they are special 11:54
hoelzro: and to avoid collisions with otherwise quite interesting verbs that the user might use as subroutines
hoelzro hmm
I guess that makes sense
moritz think of it as a mini-namespace 11:55
speaking of phasers
LEAVE phasers make panda a lot simpler in some places
but I always feel a tinge of danger when I use them
the typical usage is
11:56 wamba joined
moritz my $olddir = cwd; chdir $newdir; LEAVE chdir $olddir; 11:56
or
my $connection = ...; LEAVE $connection.close
and in both cases I wonder: what happens if LEAVE fires *before* the thing I want to undo happened? 11:57
ie if $olddir or $connection contain garbage, because an exception was thrown before they were initialized correctly
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
ie something like my $coonection = ...; my $was_here = 1; LEAVE $connection.close if $was_here;
pmichaud isn't that 'let' or 'temp' or something like that? 12:03
colomon n: my $func = (&[+], &[*]).pick; say 4 [$func] 5;
p6eval niecza v19-7-g5e25209: OUTPUT«9␤»
colomon n: my $func = (&[+], &[*]).pick; say 4 [$func] 5;
p6eval niecza v19-7-g5e25209: OUTPUT«20␤»
pmichaud can also do LEAVE chdir $olddir if $olddir; 12:05
also: my $connection = ...; LEAVE $connection.?close
moritz pmichaud: LEAVE $connection.?close is the wrong semantics 12:06
it's "try to close if there's a close method you can call"
pmichaud right, so if $connection is uninitialized, it doesn't have a close method and doesn't do anything.
moritz but what I want is "call a close method if $connection is (true, defined, whatever)
pmichaud: or worse, the method might be spelled "finish" instead of "close", and I'll never notice the misspelling 12:07
brrt in my experience, 12:08
egh, sorry, wrong channel
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:10 JimmyZ__ is now known as JimmyZ_
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:16
12:18 plobsing left
moritz maybe we should reverse the question 12:18
what's a use case where you always want a LEAVE phaser executed?
(and cannot simply put it at the top of the routine) 12:19
tadzik hm
defer, yes 12:20
so wouldn't it Just Work if you put LEAVE after $connection.open?
I guess not, but it'd be cool
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␤␤»
moritz huh, no cleanup?
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.
moritz: Thus the stack unwind doesn't trigger
moritz r: do { my $x = die "foo"; LEAVE say "cleaning up $x" }
p6eval rakudo ee8ca1: OUTPUT«foo␤ in block <anon> at /tmp/gJpcmcBCXk:1␤␤»
moritz r: try { my $x = die "foo"; LEAVE say "cleaning up $x" }
p6eval rakudo ee8ca1: OUTPUT«use of uninitialized value of type Any in string context in block <anon> at /tmp/FF5LLyuZMW:1␤␤cleaning up ␤»
moritz anyway, this one also illustrates my problem 12:23
12:24 kaleem left, seldon_ joined 12:26 seldon left 12:27 seldon_ is now known as seldon
dalek kudo/toqast: 4fc6c4b | jnthn++ | src/QPerl6/ (2 files):
Update a bunch of PAST::Var lexical lookups to use QAST::Var.
12:30
kudo/toqast: a4e92a9 | jnthn++ | src/QPerl6/World.pm:
Fix a get_slot_past_for_object leftover.
kudo/toqast: 3ca0be7 | jnthn++ | src/QPerl6/Actions.pm:
Start updating EXPR action method for QAST.
kudo/toqast: 65346e6 | jnthn++ | src/QPerl6/Actions.pm:
Disable whatever-currying code for now; will need quite some updating.
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?
tadzik haha 12:31
moritz if you don't need it in real time, you could hack the profiler to do it :-)
tadzik oooh
this'd take Perl Poetry to the new level 12:32
you could write code to play certain melodies
imagine rickrolling people this way
moritz I think parrot also has a tracing setting
tadzik: :-)
flussence: (unrelated craziness) I have some Pod::To::HTML wishlist features 12:33
flussence: first, I want to set the title of a HTML page. Is that supported somehow_
s/_/?/
flussence er... I think that one is actually. lemme check... 12:34
tadzik I think it is
moritz flussence: second, I want some DWIM magic for links, preferably passing a closure that mangles L<...> links
tadzik isn't =TITLE just working?
flussence yeah, the code for that seems to be there
moritz oh, there's a =TITLE? I didn't know that :-)
tadzik :) 12:35
moritz does that mean I should use that instead of my single =head1 ?
tadzik it may be
flussence doesn't hurt to have both
moritz =TITLE produces a <title>, and =head1 a <h1>?
tadzik it's Just a standard semantic block, S26 says
it just made sense to turn it into <title> when you do HTML 12:36
I think it makes sense to treat is as "something like <title>
"
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
but that's just the thing about tormenting implementors etc ;)
moritz and third, I want to piece together some Pod chunks from various files, and generate one HTML file from it
should I best do that on the Pod level?
tadzik yo ucan
you can 12:38
let me find this
moritz I'm just afraid to kill my old pod blocks :-)
'cause they are mutable
tadzik pmichaud was looking for the same thign and we've eventually found that in the spec
dalek kudo/toqast: 611bfb9 | jnthn++ | src/QPerl6/Actions.pm:
.type => .returns
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 :)
tadzik moritz: feather.perl6.nl/syn/S26.html#Placement+li
flussence: it didn't change much in the last few months :)
whoopsie
feather.perl6.nl/syn/S26.html#Placement+links 12:40
moritz: ^ is better
that's also the part of S26 where the formatting is fscked :)
moritz is P<> implemented? :-)
12:40 sftp_ joined
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:40
tadzik in which formatter? 12:41
12:41 wamba left
tadzik hint: it's not implemented in any of them :P 12:41
moritz at all :-)
well
I'm not even sure that P<> is what I want
I want to process all .pod files in p6doc
and extract all headings that are routines 12:42
tadzik ah
well
moritz and then make a per-routine file
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
moritz like say.html which has 'method say' from both IO and Mu
tadzik: but writing all those P<> links will be painful, and a nightmare to maintain 12:43
tadzik hm
probably, yes
moritz so, I'll just have to make my own I guess 12:44
tadzik hm
moritz which is... probably a just a tiny bit fiddly :-)
tadzik possibly we could get P<> behave a bit like L<>
so you can link to the specific section, and also include a specific section
12:45 PacoAir joined 12:46 kaleem joined
moritz moritz.faui2k3.org/tmp/p6doc-html/Any.html 12:49
that's probably a bit LTA
tadzik nice 12:51
masak looks, eagerly 12:52
moritz I'd prefer it if it didn't create another TITLE section
masak it's a really good start.
it has improvement potential :)
moritz I mean, it already has one <title> and one <h1>
any objections to changing that in Pod::To::HTML?
tadzik not from me :)
moritz in general, I expect I might want quite a few changes in Pod::To::HTML in the next days/weeks 12:53
should I create a branch? or simply go ahead? or fork the project, and later reconcile?
flussence I say do whichever's easiest for you :) 12:54
hoelzro rakudo doesn't implement subset yet? 12:55
jnthn As in subset types?
moritz hoelzro: it does
hoelzro nvm
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)
moritz r: subset Odd of Int where * % 2; say $_, ' ', $_ ~~ Odd for (1, 2, 3, 4, 'foo')
p6eval rakudo ee8ca1: OUTPUT«1 True␤2 False␤3 True␤4 False␤foo False␤»
pmichaud it looks like a good start to me, though. 12:57
hoelzro yeah, I just forgot the 'of'
pmichaud (the Any.html)
moritz hoelzro: then you just have an implied 'of Any' in it
ok, another p6doc design question
do we expect to install those documents as regular manpages at some point? 12:58
if not, I'd like to drop the 'perl' from 'perlvar.pod'
tadzik oh yes, do that
moritz and maybe call it 'variables.pod' or so
tadzik 'perldoc perlfoo' always seems needlessly reduntant for me 12:59
moritz moritz.faui2k3.org/tmp/p6doc-html/Any.html updated, now without the 'TITLE' section
pmichaud speaking of man pages, "perl6 --usage" is a little LTA on that point.
moritz: I think unordered list would look nicer than ordered list at the top (bikeshed) 13:00
also, do we want "Methods" subsections?
masak what kind of subsections? 13:01
pmichaud right now there's a "1. Methods" in the toc
I'm wondering if we can omit that.
moritz moritz.faui2k3.org/tmp/p6doc-html/List.html is an example wher eit makes more sense
tadzik this is cool
masak moritz++ # generating HTML
moritz in the long run, I want to include some usage examples, a bit of background, connection to other classes etc 13:02
so then METHODS won't be the only <h2> heading
pmichaud okay, then I'm wondering if we wliminate the "1. List" and "1. Any"
masak aye.
moritz right
masak +1
moritz now that we have =TITLE :-)
oh, List doesn't have a =TITLE yet 13:03
pmichaud "perl6 --usage" gives: 13:04
For more information, see the perl6(1) man page.
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. :-)
I'm fine with that being a rakudobug. :)
masak submits rakuodbug
moritz pmichaud: I thought we install docs/running.pod as perl6(1)
pmichaud oh, so we do. 13:05
moritz we have $(POD2MAN) doc/runing.pod --name=perl > $(DESTDIR)$(MANDIR)/man1/perl6.1
pmichaud I was looking for the man pages directly; didn't realize that running.pod was the source.
Okay then, the documentation in running.pod is out of date. :) 13:06
well, maybe not.
I think I'll go be quiet now.
13:07 JimmyZ__ joined
moritz running.pod was last updated in Oslo, I think 13:07
masak sounds familiar. 13:08
hoelzro can you junction types? ex. has Str|Int $.str-or-int? 13:09
moritz std: my Str|Int $foo
p6eval std fd2647b: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/cqnj_WxWXJ line 1:␤------> my Str⏏|Int $foo␤Malformed my at /tmp/cqnj_WxWXJ line 1:␤------> my Str⏏|Int $foo␤ expecting any of:␤ multi_declar…
13:09 JimmyZ_ left, JimmyZ__ is now known as JimmyZ_
moritz so, "no" 13:09
hoelzro =(
moritz with "not yet supported", STD.pm means "not a goal for 6.0" 13:10
hoelzro ok
pmichaud S02 says you can, btw.
Anywhere you can use a single type you can use a set of types, for convenience
specifiable as if it were an "or" junction:
my Int|Str $error = $val; # can assign if $val~~Int or $val~~Str
S02:1754
that's possibly a fossil.
moritz I'm pretty sure that's fossil
masak fossil.
hoelzro does Rakudo support it, though?
masak we do that with subtypes nowadays. 13:11
moritz hoelzro: no
masak should write a blog post about "You think it's cute today" features that have been replaced by sanity
pmichaud r: my subset StrInt of Any where Str|Int; my $a StrInt = 'str';
p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤Confused␤at /tmp/T_pCLurl8d:1␤»
masak '2..10 :by(2)' is another.
moritz hoelzro: but if you want to want support Int|Str, you'll probably want Cool instead :-)
pmichaud r: subset StrInt of Any where Str|Int; my $a StrInt = 'str'; 13:12
hoelzro Cool?
p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤Confused␤at /tmp/X11ru8swWg:1␤»
hoelzro it's just an example
moritz r: subset StrInt of Any where (Str|Int); my $a StrInt = 'str';
hoelzro but I managed to get around it
p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤Confused␤at /tmp/ETr2nRvVay:1␤»
moritz hm
hoelzro moritz: that's exactly what I did
13:12 cog_ joined
timotimo r: subset StrInt of Any where (Str|Int); my StrInt $a = 'str'; 13:12
p6eval rakudo ee8ca1: ( no output )
pmichaud timotimo++ # thanks 13:13
r: subset StrInt of Any where Str|Int; my StrInt $a = 'str'; say 'alive'; $a = 3; say 'alive'; $a = 4/5; say 'oops';
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␤␤»
moritz eeks, and I copied the same mistake over without noting it :/
moritz.faui2k3.org/tmp/p6doc-html/List.html now with updated heading levels 13:14
and without 1. List
pmichaud I would still prefer <ol> instead of <ul>, but this is much better. :) 13:15
13:15 cognominal left
moritz that's a detail from a subsystem I don't want to touch atm 13:15
pmichaud fair enough
moritz but I'll keep it in the back of my mind 13:16
or maybe ++flussence does :-)
13:16 mtk joined
flussence I've got a 5 day weekend coming up, so maybe :) 13:18
masak \o/
13:19 JimmyZ_ left 13:21 JimmyZ_ joined
pmichaud github.com/perl6/specs/issues/12 # Int|Str fossil in S02 13:22
masak pmichaud++ 13:25
dalek c: ce8f432 | moritz++ | lib/ (17 files):
heading level refactor

use =TITLE as top level heading, and then start with =head1 methods
this effectively lowers the rank of most headings by one
13:30
c: 13f6b55 | moritz++ | htmlify.pl:
[htmlify] prepare for chunky Bacon, erm Pod

this creates some infrastructure that we will need to extract per-routine documentation into separate output files
13:36
13:38 JimmyZ__ joined 13:40 JimmyZ_ left, JimmyZ__ is now known as JimmyZ_
dalek c: c451a46 | moritz++ | lib/Int.p (2 files):
fix file name
13:42
13:43 bluescreen10 joined, sudokode joined 13:49 spider-mario left 13:50 spider-mario joined
moritz ok, I need a name for documents like 'perlintro' and 'perlvar' etc., as opposed to class/role/module documentation/API documentation 13:51
jnthn langdocs 13:52
Or just "langauge" 13:53
Or "syntax", though I guess they're really about what the syntax means.
moritz language is not bad 13:56
I'll apologize in advance: the htmifly.pl script won't run on windows 13:57
nor on mac with case insensitive file system
because I'll need to distingish Int.pod and int.pod
or at least be able to
jnthn Are Int.pod and int.pod in the same directory? 13:59
If so I probably won't even be able to check out the git repo ;) 14:00
moritz no (or not yet at least :-)
but
for the HTML generation stage, I create a file name per method 14:01
(at least that's the plan)
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
for example .Bool and .bool or so
dalek p/toqast: 325137a | jnthn++ | src/QAST/Compiler.nqp:
Ensure the QAST compiler is registered and the operations manager is available.
14:09
moritz "operations manager" sounds very corporate :-)
jnthn Don't worry, I didn't call the class that :P 14:10
kresike bye all 14:12
14:12 kresike left
moritz writing Pod ASTs by hand is not much fun :/ 14:14
moritz wants a Pod templating system
[Coke] moritz: I think we want to avoid doing that.
moritz [Coke]: doing what?
[Coke] (generating files that differ only by case.)
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?
methods of the same name are simply assembled in the same file
including multis and onlys 14:16
erm
is that "onlis"? :-)
flussence onlies? nah, I you were right the first time. English is weird :)
[Coke] moritz: so, I'd just assemble int and Int in the same file. 14:17
I think "onlies" is probably correctest, but I also don't htink it's a word. ;)
moritz [Coke]: but then the docs give me answers that have nothing to do with the question I've asked
in Perl 6 I can *never* call an .Int method as .int 14:18
[Coke] moritz: don't assume that doc.perl6.org is driven by files. problem solved. 14:19
instead, create a little mojo app. 14:20
flussence md5 all the things!
moritz [Coke]: that's no small change of assumptions 14:21
[Coke] echo "all the things" | md5sum -
b9a8cbc1606685b44ef5c09690a1c038 - 14:22
moritz
equally ugly URLs for everybody!
[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:23
but treating it like a web app rather than a collection of files is probably a better long term solution. 14:24
do you have any goals other than "web app" ?
moritz currently not
[Coke] (that something like mojo would hurt)
moritz which is why I'm not too worried about breaking a local copy
because nearly nobody needs one
[Coke] as an example, perl5's documentation is often installed as a local set of web page. 14:25
(on windows)
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
pmichaud fwiw, I think p6doc should be relatively case insensitive.
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 tyatpi left
masak moritz++ 14:27
moritz so, I need something that works with rakudo. And generating plain files happen to work pretty well
*and* isn't too hard to debug
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:28
pmichaud: maybe some level of DWIM is acceptable in cases where it's not ambiguous 14:29
hoelzro p6doc -i?
pmichaud right, so the output needs to be able to respond to either query; perhaps by suggesting a disambiguation
jnthn If it's ambiguous, just have a disambiguation.
moritz but our language is case sensitive, and the tools should refelct that
*reflect
jnthn "Did you mean: X or Y?"
pmichaud our language is case sensitive, which means our on-ramps need to be forgiving
flussence p6doc -i for /:i/? 14:30
.oO( "be like grep" seems a pretty sane default... )
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>"
and the other way around
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
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.
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.
masak 'Any' and 'any' are good examples.
they don't belong on the same page.
and we think of them as distinct.
bet most people here haven't even placed them in the same pidgeon hole ;) 14:34
but we can still link between them.
pmichaud I have, actually. :-)
masak oh!
pmichaud I mean, I've definitely noticed the pun and thought "that's unfortunate"
s/pun/conflict/
masak my point is that it's not. 14:35
verbs and nouns are mostly in different slots in people's brain.
pmichaud either way, with "p6doc any" it's hard to know which slot the user is coming from. 14:36
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."
now then if someone did "p6doc .any" -- I'd be pretty certain what was meant. 14:37
or if they do "p6doc any()" -- then yes, that's fairly certain as well.
jnthn ooh
pmichaud and I really want "p6doc '%%'" to dwim.
jnthn I hadn't thought of using Perl 6 style syntax there rather than -f style switches. 14:38
pmichaud right
jnthn I like that.
masak pmichaud: agree. I want '%%' to dwim too.
pmichaud the fact that 'perldoc' (p5) doesn't give me an easy way to find operators has always bugged me.
masak aye.
pmichaud I'm also fine if "p6doc Any" returns me the class, although "p6doc Any::" would be truly unambiguous.
moritz aye
and special variables 14:39
but Any:: is a symbol table, not a type
pmichaud okay, ::Any then
moritz anyway
I'm tring to get classes and routines to work now 14:40
dalek p/toqast: f51d4a9 | jnthn++ | src/QAST/Compiler.nqp:
Honor HLL in operation lookups.
moritz and I'll be more than happy to accept patches to make more work
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.
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.
moritz r: my @a; say @a[*-1] // 0;
p6eval rakudo ee8ca1: OUTPUT«0␤»
geekosaur NATIVE::int ? 14:46
pmichaud geekosaur: maybe. but what about int1, int8, int64, etc.? 14:47
moritz r: my @a; say @a[*-1];
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␤␤»
geekosaur NATIVE::type[::size]; the short names might be aliases
dalek kudo/toqast: 8f86af5 | jnthn++ | src/QPerl6/Actions.pm:
nsentry is dead
kudo/toqast: eaff765 | jnthn++ | / (3 files):
Move Perl 6 ops registration out into a different file, and update these to register the ops with QAST.
kudo/toqast: db3f53b | jnthn++ | src/QPerl6/ (3 files):
Add a nqp::op for perl6_container_store and update actions to use it.
kudo/toqast: 673fc87 | jnthn++ | src/QPerl6/Ops.pm:
Fix some bogus whitespace.
kudo/toqast: 567eb74 | jnthn++ | src/QPerl6/Actions.pm:
perl6_booleanize => p6bool
kudo/toqast: ccd30a7 | jnthn++ | src/QPerl6/ (2 files):
perl6ize_type => p6type
kudo/toqast: 5761ab7 | jnthn++ | src/QPerl6/ (2 files):
perl6_take_dispatcher => p6takedisp
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" :-)
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
masak pmichaud: that was never five minutes! :P 14:50
www.youtube.com/watch?v=kQFKtI6gn9Y 14:51
apparently, the quote is "that was never five minutes just now". 14:54
moritz Pod::To::HTML has this code:
my $last = @opened[*-1] // 0;
if $last < $lvl {
and that first line dies with "Cannot use negative index -1 on Array" 14:55
and when I try to reproduce it locally, I don't get any such error
locally = on the command line or with p6eval 14:56
masak then you need to golf it from the original code.
moritz I know, but DO NOT WANT
moritz calls it a day instead
masak :/
masak is tempted to try to golf it for moritz 14:57
flussence nested list code... not fun
dalek c/indexfile-bug: 4ead333 | moritz++ | htmlify.pl:
[WIP] start to write an index file
14:58
moritz masak: have fun, the dying code is in the branch
masak: you just need to install rakudo and Pod::To::HTML and run ./htmlify.pl in the perl6/doc dir
masak excellent. 14:59
moritz++
moritz really decommute&
15:00 tokuhiro_ joined
masak huh, what happened to all the badges on modules.perl6.org/ ? :( 15:07
they're all blank.
tadzik yep
nobody nows 15:08
masak :( :( :(
flussence I think that's been like that since a few weeks now
tadzik yep
15:11 JimmyZ_ is now known as JimmyZ
masak heh, moritz++ tricked me into downloading perl6/doc, too ;) 15:11
dalek kudo/toqast: 3e84f10 | jnthn++ | src/QPerl6/Actions.pm:
Look for QAST::Node instead of PAST::Node.
kudo/toqast: 71fb485 | jnthn++ | src/QPerl6/Actions.pm:
Fix meta-op code gen a bit.
kudo/toqast: 1a88ffa | jnthn++ | src/QPerl6/Actions.pm:
Translate various control structures over to QAST.
15:19 JimmyZ left
hoelzro does Rakudo implement tail recursion? 15:19
masak hoelzro: tail recursion is just a kind of recursion. Rakudo implements recursion.
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.
hoelzro sorry
masak yes, I know.
hoelzro I meant tail call optimization
masak right.
jnthn In which case the answer is no, not yet.
hoelzro ok
so sub foo { foo; } should overflow, right? 15:21
jnthn Yes
masak sorry for being a stickler for terms ;)
jnthn masak: :P
Would be kinda fun to add that to the optimizer some day
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:26
15:26 kaleem left
hoelzro so sub foo { foo; } should overflow, right? 15:27
moritz masak: did you check out branch indexfile-bug ? 15:28
oh dammit 15:29
and I forgot to commit a module
and git clean -xdf'ed it
masak oh!
you said branch, and I forgot it.
moritz masak: wait a moment...
masak sure.
dalek c/indexfile-bug: 1ae1e84 | moritz++ | lib/Pod/To/Serialization.pm:
add Pod::To::Serialization
15:30
moritz tries to reproduce with clean working tree 15:31
hoelzro this program doesn't seem to overflow: gist.github.com/3040496 15:32
it reaches 99983 on my machine and stops
moritz masak: yes, should produce that error now
15:33 tyatpi joined 15:35 thou joined
masak and indeed it does. 15:35
we have successfully transported the error from your computer to mine! :D
let the golfin' begin. 15:36
moritz and, good news 15:37
you don't need the loop through @sources to reproduce it
so you can execute it orders of magnitudes faster 15:38
colomon \o/ 15:39
moritz \o colomon 15:40
colomon o/
masak yes, I see it.
colomon! \o/
15:40 tokuhiro_ left
colomon reproducible bugs are the best kind 15:41
moritz nonexisting bugs are the best kind :-) 15:42
hoelzro speaking of bugs..
did anyone look at my gist above?
=)
it looks kinda buggy to me
moritz hoelzro: I did 15:43
hoelzro: recently we a a problem where the "recursion depth exceeded" exception caused an inifinite loop 15:44
maybe that's related
masak grumbles something about "nonexisting" not being an actual property
sisar " method rand(Real:D:) " <-- this mean that: rand is a method, it accepts a Real no., and... what does the ":D:" mean ?
masak it's a pseudoproperty used in the same grammatical slot as properties :)
hoelzro moritz: what's interesting is that I get no exception
masak sisar: :D means 'defined'
sisar: the ':' after means 'invocant' 15:45
hoelzro or was that behavior removed because of something more insidious?
sisar masak: 'invocant' ? what does it men (in this context) ? the 'one which invokes' ? 15:46
*mean
moritz sisar: the object on which you call a method on
masak sisar: means the object on which... what moritz said. 15:47
but without the redundant 'on' :P
moritz hoelzro: yes, the exception gets caught and rethrown and that loops infinitely, which isn't good :/
or something like that
hoelzro ok, just wanted to check =)
sisar masak, moritz: so does it mean that invoking rand without an invocant should throw an error? 15:48
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␤␤»
sisar r: say rand; #it does not
masak sisar: no, just means that the method form always has an invocant ;)
moritz sisar: yes, it is
p6eval rakudo ee8ca1: OUTPUT«0.582778168915869␤»
masak r: say rand()
p6eval rakudo ee8ca1: OUTPUT«0.224691034601168␤»
moritz that's a different rand() :-)
masak it is.
sisar is confused 15:50
moritz sisar: there's both a sub and a method call rand
masak so, let's drag you the rest of way to enlightenment ;)
moritz and you cannot invoke the method rand without an invocant
masak sisar: methods != subs
sisar moritz: oh ! duh ! :)
moritz nr: say rand()
p6eval niecza v19-7-g5e25209: OUTPUT«===SORRY!===␤␤Unsupported use of rand(); in Perl 6 please use rand at /tmp/uFgN28wEur line 1:␤------> say rand⏏()␤␤Parse failed␤␤»
..rakudo ee8ca1: OUTPUT«0.290655951554985␤»
moritz I think niecza++ is right here 15:51
nr: say rand(10)
p6eval rakudo ee8ca1: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'rand' will never work with argument types (int) (line 1)␤ Expected: :()␤»
..niecza v19-7-g5e25209: OUTPUT«===SORRY!===␤␤Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at /tmp/Y591WqdlyV line 1:␤------> say rand⏏(10)␤␤Parse failed␤␤»
masak submits rakudobug 15:52
sisar masak++
masak karma masak
aloha masak has karma of 745.
masak \o/
dalek c: 765f530 | moritz++ | lib/Real.pod:
document term rand
15:54
15:56 xinming_ left
masak is a-golfin' 15:57
16:00 ilogger2 joined, ChanServ sets mode: +v ilogger2, wolong joined
huf perhaps golfin matilda would adapt better? 16:01
hoelzro haha
colomon should really get around to around to buying a Beach Boys album someday... 16:04
[Coke] colomon: start with Dan & Jean 16:06
16:07 mikemol joined
[Coke] wonders if he dredged that very old music memory correctly. probably not. ;) 16:08
16:08 zby_home joined
pmichaud (catching up with backscroll) 16:12
15:32 <hoelzro> this program doesn't seem to overflow: gist.github.com/3040496 16:13
15:32 <hoelzro> it reaches 99983 on my machine and stops
currently Rakudo sets Parrot's recursion limit to 100K, so that looks about right.
We definitely need to fix the exception handlers so that don't infinitely trap that exception, though.
s/that/they/
not sure how to do that.
heh
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:14
(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:15
[Coke] pmichaud: ooh evil solution. ++ 16:16
pmichaud maybe I can ask #parrot for suggestions
sorear good * #perl6 16:19
16:19 thelazydeveloper joined
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:20
sorear pmichaud: do C methods count? can you change the recursion limit from the handler? 16:21
pmichaud sorear: I don't think C methods count. 16:22
although they might.
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...
pmichaud but yes, bumping up the recursion limit from within the handler might be a possibility
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
The counter is incremented in the Sub PMC's invoke v-table, which is not on the call path for C methods, iirc.
pmichaud so, a handler could bump up the limit, handle it, and restore the old limit.
or, we could just set the recursion limit so high that someone runs out of memory before ever reaching the limit :) 16:24
[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
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.␤===SORRY!===␤Unsupported use of rand(); in Perl 6 please use rand at /tmp/TtfykUn5_j line 1…
masak moritz: meanwhile, quite some golfing later: gist.github.com/3040873 16:35
I think it's quite easy to see what's going on from that. 16:38
whether it's correct (upstream 'fatal' pragma loading affecting the 'fatal' level of a downstream module) is left as an exercise for the reader.
pmichaud I don't understand why it's being thrown. 16:39
oh, use fatal!
okay, I understand now. 16:40
sorear Let me be a voice in favor of (lowish) recursion limits.
Out of control recursion is easier to spot when you get a recursion limit exception rather than an out of memory exception or segfault
adding a recursion limit to niecza is on my TODO list 16:41
pmichaud sorear++
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
s:2nd/p5/p6/
pmichaud soft limit sounds very useful
moritz sorear: globally 16:45
colomon [Coke]: I believe you meant Jan and Dean? I'd not heard of them before... 16:57
moritz I think it was about a Beach Boys album 16:58
16:58 erkan joined 16:59 adu joined
[Coke] colomon: so close! 17:04
17:04 MayDaniel joined
masak moritz: was everything clear about the golfin'? 17:11
17:11 fridim_ joined
moritz masak: erm, you tell me :-) 17:12
oh wait 17:13
moritz missed the gist
oh
my
moritz stupid
use fatal
moritz facepalms
masak ;) 17:16
moritz masak++
masak I'm still not convinced it's correct Rakudo behavior.
so, 'use fatal' affects runtime behavior, yes? 17:17
moritz sure
masak hm. then maybe there's not much that we can do to limit it to the current unit.
jnthn It's a dynamic.
$*FATAL
moritz so 17:18
jnthn -> shoppe
17:18 fridim_ left
moritz the correct way is to write 'no fatal;' in modules which depend on it? 17:18
17:23 kaare__ joined
[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"
moritz [Coke]: not if I understood dynamic scoping correclty 17:25
[Coke] harmil: making up new verbs is precedented here. ;) 17:26
sorry, verbing up parts of speech is...
geekosaur ...is English all the way :p 17:30
17:33 fgomez joined
dalek kudo/nom: 3bc91c1 | pmichaud++ | src/Perl6/Grammar.pm:
Recognize obsolete forms of rand() and rand(N), per STD.pm. Fixes RT #113968.
17:37
17:40 fridim_ joined 17:41 kaare__ is now known as kaare_
harmil When compiling Perl6, Actions take longer than Grammar… there's a lesson to be learned in there, somewhere... 17:47
pmichaud 11:31 <pmichaud> You'd be surprised at how quickly you run across profound stuff on this channel. :) 17:48
harmil ;)
moritz or across profund-sounding stuff, at least :-)
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:49
jnthn Well, Actions.pm is almost twice as long as Grammar.pm. 17:52
17:52 fridim_ left, moukeddar joined
moritz I guess some of that could and should be factored out to World.pm 17:52
17:52 birdwindupbird joined
harmil Seems I'm getting a lot of this while building Rakudo-Star 2012.06: 17:53
===SORRY!===
No object at index 265
In that case, while compiling ${PREFIX}/lib/parrot/4.5.0/languages/perl6/lib/Bailador.pm
17:54 fgomez left 17:55 moukeddar left
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 17:58 cog_ joined
moritz stares at Pod::To::HTML 17:59
if I do something like
=item foo\n =item bar
the HTML it generates is 18:00
<ul><li><p>foo</p>
</li></ul><ul><li><p>bar</p>
</li></ul>
18:01 hmm joined, moukeddar left, hmm is now known as Guest64415
Guest64415 hi 18:02
moritz hello
Guest64415 how abt
r u there 18:03
hello 18:04
yea tell mortiz
18:04 Guest64415 left
tadzik moritz: yeah, this part is a bit tricky 18:06
18:06 zby_home left
tadzik S26 doesn't have a concept of lists. It has concept of items 18:06
which makes it quite unfriendly to convert that to tree-like lists
moritz I guess we'll need an analysis pass 18:07
tadzik ISTR one of the formatters had it 18:09
seems that I was wrong 18:10
masak tadzik: en.wikipedia.org/wiki/Composite_pattern is made specifically to treat the symptom you're describing. 18:16
(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.
for multi-level lists
tadzik right
pmichaud =item is the same as =item1
tadzik correct
[Coke] wonders how many bugs can be closed out by doing what pmichaud just did to Grammar.pm
(copying bits from STD.pm) 18:18
pmichaud [Coke]: I didn't even copy bits from STD.pm for that one, though.
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 :)
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
I thought I could just add Option +MultiViews
and AddType 'text/html; charset=utf-8' html
but that still gives a 404 18:22
any idea what's wrong?
or what I could try?
pmichaud any chance that Option is disabled there, or specifically MultiViews ?
moritz it's a virtual host file 18:23
can it be disabled there?
pmichaud probably not, if it's Included 18:24
moritz it is; the index.html works
pmichaud is apache compiled with mod_negotiation?
(default would be yes... but worth checking.) 18:25
moritz a2enmod negotiation 18:26
Module negotiation already enabled
pmichaud I wouldn't think the AddType directive would be needed; it should already know about html
moritz well, I've tried without first, didn't work either 18:27
pmichaud does the error log show anything, ooc?
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:28
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
the last line is from access.log
flussence er... IIRC it's "Options"
moritz perlpunks.de/paste/show/4ff33a18.228a.384 that's the virtual host file
OH 18:30
it's commented out
moritz facepalms again
flussence haha :)
moritz doc.perl6.org/type/Any
works now
tadzik \o/ 18:31
masak \o/ \o/ \o/
flussence moritz++
masak moritz++
tadzik woo
moritz++
masak that. is. just. so. cool.
moritz doc.perl6.org/ exists too 18:33
jnthn moritz++ :D 18:34
dalek c/indexfile-bug: 37500ce | moritz++ | htmlify.pl:
fix creation of index page
18:35
c: 65f731c | moritz++ | lib/Pod/To/Serialization.pm:
add Pod::To::Serialization
c: a4811a7 | moritz++ | htmlify.pl:
Create an index page
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:36
tadzik hoho :) 18:37
masak please write up.
++harmil
timotimo harmil: i'm interested! 18:39
[Coke] moritz: I may work up an updated stylesheet if I'm bored. ;) 18:40
dalek ast: 2ebe3d9 | pmichaud++ | S32-num/rand.t:
Add tests for rand() and rand($n) (RT #113968)
18:41
moritz pmichaud: throws_likek 'rand()', X::Obsolete; # would be a good test case 18:45
*throws_like
from Test::Util
pmichaud ah, I was looking for dies_like 18:49
throws_like++
pmichaud fixes.
18:54 fgomez joined
dalek ast: 8a68931 | pmichaud++ | S32-num/rand.t:
Update rand.t test to use throws_like (moritz++).
18:55
18:55 brrt joined
pmichaud fwiw, I'm not sure that BEGIN { @*INC.push: 't/spec/packages/' } 18:55
is properly scalable/portable
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
pmichaud my problem is with the "t/spec", not the BEGIN.
no, I don't have a fix.
moritz pmichaud: well, that part is documented in roast
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
Guess I won't be able to do that for these files.
well, I guess I'm okay as long as t/spec is in my current dir
masak that sounds like a rather small price to pay, tbh. 18:58
if you copy a file out of its native environment, you change the settings that assume that environment.
moritz the tests for $*PROGRAM_NAME also check that it starts with 't/spec/' or so
pmichaud it can certainly remain; it just feels like a design smell to me. 19:00
19:00 pyrimidine joined
moritz there's no design behind it, just evolution 19:01
"the simplest thing that could possibly work"
pmichaud perhaps "evolution" is a form of design? ;-)
timotimo as long as you keep intelligent design out of our perl6 classrooms! 19:02
masak no, no. teach it alongside Pastafarianism for all I care. 19:06
but perhaps don't waste too much biology lesson time on it ;)
timotimo keep the scientifically illiterate out of the science classroom :[ 19:07
masak well, we all start out scientifically illiterate...
19:07 brrt left
timotimo yeah, don't let those people into the science classroom! 19:10
they'll make it more awkward for the geniouses!
this troll is going nowhere *stops
19:19 kaare_ left 19:25 arnsholt joined, adu left
moritz pmichaud: note that the section that contains 'my Int|Str $var' is already marked as Conjectural in the heading 19:32
pmichaud moritz: good point. 19:33
moritz which in p5 land would have been "here be dragons" :-) 19:34
pmichaud I'll close the issue for now. 19:35
ooc, now that I've remembered that GitHub has an issue tracker, should I move questions.txt into the issue tracker?
(the real question is... what is most likely to get TimToady++ to respond? ;-)
19:36 brrt joined 19:41 brrt left
moritz pmichaud: nagging on IRC more than choice of bug list medium 19:42
:-)
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
diakopter like "blocking me"
pmichaud diakopter: (priority) I can do that in either the questions.txt or the issue tracker
diakopter that way he doesn't feel like he needs to answer them all at once together 19:45
so the task doesn't look as big :)
19:46 vmspb joined
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.
masak question about prompt:
pmichaud otherwise he would've answered them on irc already :)
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
pmichaud (fwiw, I think I'm in favor of using the issue tracker)
masak beijing -e 'my $a = prompt "> "; my $b = prompt "> "; say $a; say $b' # does
which one is correct?
moritz masak: I'd argue nom is correct
pmichaud I think nom is correct.
moritz ^D closes STDIN
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
ok, so how do I re-open STDIN?
dalek c: c216b81 | moritz++ | lib/ (2 files):
rename "perlvar" to "variables"
19:50
masak r: say get
p6eval rakudo 3bc91c: OUTPUT«Land der Berge, Land am Strome,␤»
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␤␤»
masak r: $*IN.close; $*IN.open; say get
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␤…
moritz r: $*IN.close; $*IN.open('-'); say get
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␤␤»
masak I think there should definitely be a way to open $*IN after it has closed automatically.
19:52 alvis```` joined
dalek c: ef6516f | (Gabor Szabo)++ | bin/p6doc:
fix search path if it is missing trailing slash
19:52
c: 9f6657a | (Gabor Szabo)++ | bin/p6doc:
display error message if no POD found
c: b03e584 | (Gabor Szabo)++ | lib/ (2 files):
Merge branch 'master' of github.com:perl6/doc
colomon can you open stdin in a different file variable? 19:53
something like $file = open('-')
?
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␤␤»
masak heh :)
19:54 brrt joined, stephenlb joined
colomon can't try it locally because he has somehow broken Rakudo. 19:55
n: my $fh = open('-'); say $fh.get
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…
colomon has broken Rakudo, mono, and the Windows version of his $work project so far this week.... 19:57
arnsholt Impressive for a tuesday =) 19:58
20:00 fhelmberger joined
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 fhelmberger left
vmspb Hello, perl 5 works in pugs? 20:10
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.␤»
diakopter eval: print ~5
buubot_backup diakopter: 42949672901
20:13 spider-mario joined 20:16 cog_ left, cognominal joined
pmichaud I think I'm leaning towards using the git issue tracker for spec questions. 20:20
*github 20:22
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␤␤␤»
moritz r: say Any
p6eval rakudo 3bc91c: OUTPUT«Any()␤»
moritz r: say Any.list
p6eval rakudo 3bc91c: OUTPUT«use of uninitialized value of type Any in string context in block <anon> at /tmp/JW7vMMSSxo:1␤␤␤» 20:25
sorear pmichaud: +1 20:28
20:30 tokuhiro_ joined 20:44 vlixes joined 20:52 MayDaniel left
dalek c: 629aa4e | moritz++ | lib/Array.pod:
[Array] just state what it is yet, no methods yet
20:55
c: 7e59ba0 | moritz++ | htmlify.pl:
[htmlify.pl] separate types and language docs
20:56 birdwindupbird left 21:00 vmspb left 21:03 brrt left 21:13 brrt joined
masak lol, I blug! \o/ strangelyconsistent.org/blog/july-3...ing-around 21:19
pmichaud downside of using the github issue tracker is that updates don't post to the channel, though. 21:20
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
It didn't poll for new issues, but it coulda been made to.
pmichaud well, I'd prefer something push-oriented anyway.
masak jnthn: we need to get https to work on Rakudo :) 21:22
for those who dare read today's blog post: it's simpler and less involved than the previous two.
this will probably be the prevailing patterns from now on. simple steps.
think of posts 1 and 2 as a crash course in intentful testing :)
21:23 brrt left
jnthn masak: Yeah, I've no idea how we do that ;) 21:23
masak jnthn: maybe it's the only thing in computer science that actually can't be done :P 21:24
jnthn :P
masak what, you just implement the HTTPS protocol. it's not like it involves hard things like, I dunno, encryption, or serious math. 21:25
jnthn sshhhhh :P 21:26
sorear just use zavolaj and libcurl. 21:27
if you hate libcurl, you could still use ssleay and/or openssl.
masak I don't hate libcurl. 21:30
jnthn sorear++ # good ideas
masak yeah. sorear++
jnthn (My "no idea" was mostly about what libraries to write bindings for.)
21:30 fridim_ joined
masak r: class A { has $s .= new } 21:31
p6eval rakudo 3bc91c: OUTPUT«===SORRY!===␤Cannot use .= to initialize an attribute at line 2, near " }"␤»
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?
jnthn masak: Laziness. 21:33
masak: Probably on my part.
masak: It can likely be made to work.
masak yeah, I don't see the impossibility here.
jnthn masak: It's just a little bit more re-writing.
masak aye.
it's been bumped out of RT (because that ticket was about an internal error).
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 :)
*got
I can fix it, but after the QAST refactor.
masak yes yes do QAST first of course
:)
would you be helped by a rakudobug for it? 21:35
jnthn Yes.
masak submits rakudobug
jnthn Otherwise it stands a very high chance of being forgotten.
masak wouldn't want that. 21:36
sorear pmichaud: dalek can forward pretty much anything to the chan.
pmichaud: if you can write a program in any language which spits out updates to STDOUT, it can feed into dalek.
pmichaud well, email obviously can be quickly spit to STDOUT :-) 21:37
and a good procmail script can feed it to dalek
and I suspect we could find a way to get issue update emails sent to a dalek address 21:38
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.
sorear pmichaud: there's a Perl 5 helper module that implements karma updates somewhere too
so, yeah. procmail could very easily route stuff to dalek 21:41
but I don't currently have time to develop such a thing
pmichaud r: sub marine() { }; say &marine 21:49
p6eval rakudo 3bc91c: OUTPUT«sub marine() { ... }␤»
pmichaud r: sub marine() { }; say &marine.name
p6eval rakudo 3bc91c: OUTPUT«marine␤»
pmichaud r: sub marine() { }; say &marine.Str
p6eval rakudo 3bc91c: OUTPUT«marine␤»
dalek c: 9fdeae2 | pmichaud++ | lib/Code.pod:
[Code]: Update .Str example to actually use Code.Str :-).
21:50
jnthn Gee, what a terrible pun... :)
masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {.WHAT} {callsame}" } }; say &marine.name 21:51
p6eval rakudo 3bc91c: OUTPUT«marine␤»
masak hmm :)
oh!
r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {.WHAT} {callsame}" } }; say &yellow.name
p6eval rakudo 3bc91c: OUTPUT«use of uninitialized value of type Any in string context in method name at /tmp/Vppqviy1c8:1␤␤yellow marine␤»
masak almost... :)
pmichaud self.WHAT
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␤»
jnthn self.WHAT.gist
masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.WHAT.gist} {callsame}" } }; say &yellow.name
jnthn for self.^name
p6eval rakudo 3bc91c: OUTPUT«yellow Sub+{<anon>}() marine␤»
jnthn *or
masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^name} {callsame}" } }; say &yellow.name
p6eval rakudo 3bc91c: OUTPUT«yellow Sub+{<anon>} marine␤»
masak r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^name.substr(0, 3)} {callsame}" } }; say &yellow.name
p6eval rakudo 3bc91c: OUTPUT«yellow Sub marine␤»
masak \o/
pmichaud cheater!
masak yeah... :) 21:53
jnthn sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^mro[1].^name} {callsame}" } }; say &yellow.name
r: sub marine() {}; my &yellow = &marine but role { method name { "yellow {self.^mro[1].^name} {callsame}" } }; say &yellow.name
p6eval rakudo 3bc91c: OUTPUT«yellow Sub marine␤»
masak oh, and that's *not* cheating? :P 21:55
pmichaud cheater!
masak (nice, though)
jnthn no mroe cheating than yours :P
pmichaud afk, pizza run.
masak see pizza run. run, pizza, run. 21:56
jnthn they run, do they?
dang, masak got their first :P
masak only if you execute them.
jnthn
.oO( I'd never thought of the pizza slicer that way... )
21:57
harmil r: say ([Mu,[],{}]>>.^methods).perl 22:00
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 )
harmil hmm… the last bit of that is, ", [], {})"
there are a lot of possible results I might have expected, but that's not one of them
jnthn hyper dispatch descends into nested data structures 22:04
harmil oh does it now? 22:05
Hmm… is there any way to stop that? 22:06
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. :)
masak you *should* use map, if shallow traversal is what you want. 22:10
but yes, I agree about it being really pessimal in some cases.
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)?
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
thanks
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:21
jnthn -> rest 22:31
'night, #perl6
masak 'night, #perl6 22:43
22:45 preflex joined 22:50 thelazydeveloper left 22:56 seldon joined 23:10 erkan left 23:13 cognominal_ joined, cognominal left 23:14 erkan joined 23:18 cognominal__ joined 23:21 cognominal_ left 23:29 skids joined 23:37 tokuhirom2 joined 23:40 seldon left 23:46 erkan left 23:50 plobsing joined
carlin masak: s/mehthod/method/ in your latest blog post 23:51
(unless mehthod is a neologism for a method that one feels indifferently about)
23:57 leprevost joined