pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
00:06 pbuetow left 00:15 cognominal joined 00:43 apeiron_ joined 00:45 adc_penner3 left, apeiron left 00:59 stephens left 01:04 DemoFreak left 01:05 ZuLuuuuuu left 01:21 justatheory left
literal what's <-> ? 01:25
jnthn -> but makes the params rw
literal ah
01:27 Chillance left 01:34 slavik joined 01:43 apeiron_ left 01:50 kanru left, kanru2 joined 02:02 alester joined 03:32 ilogger2 joined 03:34 bacek__ joined 03:44 kanru joined 04:02 elmex_ joined 04:11 bacek__ left 04:17 elmex_ is now known as elmex 04:52 [particle]1 joined
[particle]1 rakudo: my $x = [42]; say $x<0_but_true>; 04:52
p6eval rakudo 32998: OUTPUT[42␤]
[particle]1 rakudo: my $x = [42]; say $x<true_but_0>; 04:53
p6eval rakudo 32998: OUTPUT[42␤]
04:53 justatheory joined
[particle]1 rakudo: my $x = [42]; say $x<XXX>; 04:53
p6eval rakudo 32998: OUTPUT[42␤]
04:54 apeiron joined
[particle]1 rakudo: my $x = ['a', 42]; say $x<XXX>; 04:54
p6eval rakudo 32998: OUTPUT[a␤]
slavik rakudo: my $var = "string"; $var .= subst(/str/, ""); say $var; 04:55
p6eval rakudo 32998: OUTPUT[ing␤]
slavik nice, ain't it?
[particle]1: what are you trying to do there?
rakudo: say ?{1 == 0}
p6eval rakudo 32998: OUTPUT[1␤] 04:56
slavik rakudo: say ?{1 == 0}
p6eval rakudo 32998: OUTPUT[1␤]
slavik rakudo: say !{1 == 0}
p6eval rakudo 32998: OUTPUT[0␤]
slavik rakudo: say !{1 == 1}
p6eval rakudo 32998: OUTPUT[0␤]
slavik I guess they assertions are still not there
04:57 justatheory left
[particle]1 rakudo: my $x = ['a', 42]; say $x<1.4>; 04:58
p6eval rakudo 32998: OUTPUT[42␤]
[particle]1 rakudo: my $x = ['a', 42]; say $x<0.4>;
p6eval rakudo 32998: OUTPUT[a␤]
slavik haha
nice
it rounds the index? 04:59
[particle]1 it coerces to Int
i'm not sure that's wrong.
airport &
04:59 [particle]1 left
slavik :( 04:59
[particle]: that looks ok to me, since indeces have to be integers
05:07 alester joined 05:09 alester left, alester joined 05:17 alester left 05:18 alester joined 06:04 apeiron left, apeiron joined 06:14 bacek__ joined 06:21 apeiron left 06:29 [particle]1 joined, [particle]1 left 06:39 apeiron joined 06:43 apeiron left, apeiron joined 07:12 alester left 07:13 c1rcuit joined 07:53 DemoFreak joined 07:59 dukeleto_ joined 08:03 DemoFreak left 08:07 DemoFreak joined 08:08 dukeleto_ is now known as leto 08:09 leto is now known as duke_leto, duke_leto left 08:11 DemoFreak left 08:26 dukeleto_ joined 08:27 alester joined 08:33 dukeleto_ left 08:35 dukeleto_ joined 08:59 alester left 09:03 ejs joined 09:23 pbuetow joined 09:26 pbuetow left 09:31 pmurias joined
pmurias @tell moritz_ the irc log is down :( 09:32
lambdabot Consider it noted.
moritz_ there's nothing I can do until the administrator fixes the DB 09:40
lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
09:48 DemoFreak joined
pmurias moritz_: where does the irclog live? 09:49
lambdabot pmurias: You have 2 new messages. '/msg lambdabot @messages' to read them.
09:59 ilbot2 joined 10:01 ilbot2 left, ilbot2 joined
moritz_ pmurias: on faui2k3.org 10:03
/backup/ disk broken -> /backup/ unmounted -> next backup went into / filesystem -> / full 10:05
ok, up again 10:06
but there will be a reboot today (for inserting the new HD)
and I won't be online right after the reboot, so you might see a few hours of downtime today 10:07
10:11 xinming joined 10:13 xinming left, xinming joined 10:19 xinming_ joined, xinming left 10:25 xinming joined, xinming_ left 10:27 ejs left 10:35 iblechbot joined 10:38 wayland76 joined 10:45 adc_penner3 joined 10:58 rindolf joined 10:59 xinming left 11:03 meppl joined 12:08 ilbot2 left 12:34 wayland76 left 12:58 Bzek joined, adc_penner3 left 13:11 schmalbe joined 13:14 wayland76 joined 13:19 Chillance joined 13:29 masak joined
masak @tell TimToady re 'the twigil is needed only on the first occurence of the variable'. what would this do? `{ say $foo; say $^foo }` 13:36
lambdabot Consider it noted.
masak ah. s/occurence/occurrence/; I thought it looked funny. 13:37
pmurias masak: that behaviour doesn't seem very usefull 13:39
masak pmurias: indeed not. it's a corner case. 13:40
I'm just wondering what it does.
either it's a compile error or it prints $^foo twice.
pmurias i think it should be a compiler error 13:41
as should { say $^foo;say $foo }
masak pmurias: are you saying this having read the current email discussion on p6l, or not having read it? 13:47
apparently, $^foo === $foo 13:48
@tell TimToady oh, and is it really in S07 that the iterator API is described, given that (a) it doesn't exist, and (b) that exegesis is about formats? 13:50
lambdabot Consider it noted.
pmurias masak: i assumed it was something mentioned on irc, and the irc log is down so i only stated my opinion 13:56
masak pmurias: I see. it would have been interesting if that was your opinion after having read those emails, see. :) 13:57
pmurias masak: thread name?
found it
masak good.
pmurias masak: it depends if $^foo means the implicitly declared named parameter $^foo or declares a named parameter $foo 14:00
masak eh? 14:01
in my understanding, it does both.
pmurias well it does neither they are positional parameters not named ones 14:02
masak I should get a firmer grip on terminology before engaging in this type of discussion. 14:03
lunch & 14:04
pmurias it all depends if ^ is part of the name 14:06
jnthn I think $^foo should declare that we take a positional parameter foo. 14:14
Thus I'd ugess it should be available in $foo also 14:15
I kinda expect $foo used before the $^foo could work, because $^foo is actually saying something about the blocks signature, so such variables must be bound and exist at block entry. 14:16
Though I'd hardly recommend using $foo rather than $^foo the first time you use it as good practice. :-)
pmurias jnthn: the way i think it would be better if $^foo declared a positional parameter ^ 14:29
jnthn pmurias: So you can only refer to it as $^foo? 14:36
masak pmurias: I'm not too fond of the 'part of the name' meme. sigils can be seen as part of the name or not part of the name in both p5 and p6. it's possible to argue both ways, and form consistent world-views around either opinion. 14:45
e.g. "the $ in $foo is part of the name in p5 because it's a different variable than @foo", but "the $ in $foo is not part of the name in p5 because arrays are indexed with a $ too" 14:46
there must be more specific ways to say what 'part of the name' wants to describe.
pmurias jnthn: yes 14:50
masak: sigils are definitly part of the name in perl6
masak pmurias: then why can you separate the sigil and the name in $Foo::Bar::name? 14:52
pmurias: and how come the sigil doesn't matter when the corresponding accessor is called?
I think "definitely" is a strong qualifier here. 14:53
pmurias $Foo::Bar::name is the long name 14:54
masak but it can also be written Foo::Var::<$name>
see how the sigil moves around? 14:55
that's not very 'part of the name'-ish behvaiour
jnthn pugs_svn: Yeah, but ^ is a twigil, not a sigil. 14:59
erm
pmurias: ... :-)
Anyway, The Thread seemed to suggest it did declare a lexical parameter. 15:00
*lexical
masak or just a lexical variable?
what happens if theres already a parameter $foo and we refer to $^foo? 15:01
jnthn And thus $^name declares that we take a positional parameter that is bound to $name, but also referancable as $^foo.
I thought placeholders were illegal if the block already had a signature?
pmurias yes
jnthn So that situation can never occur.
masak that might well be.
good.
jnthn And I meant "also referancable as $^name" above...
masak aye. 15:02
jnthn: btw, I added the test yesterday, but didn't fudge it up. 15:03
pmurias &
15:03 pmurias left
jnthn masak: I noticed! :-P 15:05
Was that to try and make me do it quickly?
masak no, just laziness/inattention 15:06
there's really no rush.
help pmichaud fix #58392 first :P
pmichaud $Foo::Bar::name is simply rewritten (by the compiler) as Foo::Bar::<$name> 15:07
the latter is the 'official name', the former is just a convenience to keep the sigil out in front where we like it. 15:08
masak so There Is No Long Name.
jnthn masak: I think pmichaud has fixed #58392 as such, now he just has to fix the rest of Parrot. ;-) 15:09
masak jnthn: I've been seriously considering running November on top of lex4 Rakudo in the meantime...
15:19 plum joined
plum hello :) 15:19
masak hi plum!
welcome to #perl6.
plum i have a question I hope it's not dumb :O
masak plum: surely not. shoot.
plum I have no perl knowledge at all, and I'd like to learn. Should I start with perl6? 15:20
masak plum: not if you don't have extreme patience.
Perl 5.10 will do a lot of things for you that Perl 6 doesn't currently do. 15:21
pmichaud: with that said, I'm using Perl 6 daily, and it's great fun, but you also run into a lot of errors in the Perl 6 implementation.
oops, I meant plum:
plum :D
masak plum: does that answer your question? 15:22
plum yeah
masak plum: did I mention Perl 6 is way cool? so even if you don't start using it today, make sure you check it out again in a year or so.
plum of course
masak great!
good luck with your perl learning. take a look at p3rl.org 15:23
plum I'm just scared that i'll learn all this stuff and then it'll be all different :(
masak plum: hm, yes. but most of the things are just minor changes, like learning a new dialect.
and with the knowledge of Perl 5, you will understand better the design decisions of Perl 6. :)
slavik plum, read the spec, it's all correct
yes 15:24
pointy blocks are awesome
plum spec ?
slavik so are grammars
masak plum: spec.pugscode.org
pmichaud (check it out again in 4 months or so.) 15:25
plum oh it doesn't look like that much 15:26
thanks for everything friends :) 15:27
masak plum: good luck!
plum see ya! bye 15:28
15:28 plum left 15:29 ZuLuuuuuu joined 15:32 adc_penner3 joined 15:37 meteorjay joined 15:40 Limbic_Region joined 16:06 smg joined 16:12 schmalbe left 16:34 rdice joined
pugs_svn r23055 | lwall++ | [gimme5] allow before inside an after 16:56
r23055 | lwall++ | [STD] make sure my() is a function call
slavik @seen lwall 17:08
lambdabot I haven't seen lwall.
slavik :(
rakudo: my int $num=5; $num = "hello"; 17:13
p6eval rakudo 33001: OUTPUT[Scope not found for PAST::Var '$num'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (src/PCT/HLLCompiler.pir:104)␤]
slavik rakudo: my int $num=5; $num = "hello"; say $num; 17:14
p6eval rakudo 33001: OUTPUT[Scope not found for PAST::Var '$num'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (src/PCT/HLLCompiler.pir:104)␤]
slavik rakudo: my $num=5; $num = "hello"; say $num;
p6eval rakudo 33001: OUTPUT[hello␤]
jnthn slavik: s/int/Int/
slavik ahh, ty
jnthn slavik: We don't have native types yet, but type checking works on boxed types.
slavik rakudo: my Int $num=5; $num = "hello"; say $num;
p6eval rakudo 33001: OUTPUT[Type mismatch in assignment.␤current instr.: 'die' pc 12232 (src/gen_builtins.pir:7464)␤]
slavik nice
I see 17:15
rakudo: my Int $num=5; $num = 5.0; say $num;
p6eval rakudo 33001: OUTPUT[Type mismatch in assignment.␤current instr.: 'die' pc 12232 (src/gen_builtins.pir:7464)␤]
slavik rakudo: my Int $num=5; $num = 6; say $num;
p6eval rakudo 33001: OUTPUT[6␤]
slavik awesome
TimToady rakudo: my $a = [ 1,2,3 ]; say $a{'2'}; 17:16
lambdabot TimToady: You have 2 new messages. '/msg lambdabot @messages' to read them.
p6eval rakudo 33001: RESULT[3␤1]
TimToady that's wrong, I think
an array should not respond to .{} (or to .<>)
slavik hmm 17:17
masak it should if it's defined with unorthodox indexes, as in S09.
s/indexes/indices/ 17:18
slavik masak: then it's a hash type, no?
masak slavik: no.
jnthn nearly tells TimToady to file a ticket
slavik lol
masak slavik: take a look at S09.
slavik will do
jnthn But masak is our ticket file expert, so I'll ask him to instead. ;-)
TimToady masak: $foo before $^foo is compile error under strictness, unless there's a $foo in scope already, in which case $^foo is an illegal redeclaration 17:19
masak TimToady: sane. I like.
I'll add a test for that as well. 17:20
TimToady as for S07, the cabal (TINC) is working over the S#s to reuse some of the unused slots for new purposes, like iterators
masak oh my
that cabal does keep busy given that TINC
I'm not sure I think re-using S\d\d numbers is sane... :/ 17:21
TimToady see the web page at spreadsheets.google.com/ccc?key=p8...v7Fsq9u4eA 17:22
masak TimToady: thanks. 17:23
where will a module like DateTime end up in this? S31? S32? 17:24
17:24 c1rcuit left
TimToady a module like DateTime is unlikely to end up in the barebones distribution 17:24
jnthn I suspect that since S29 seems to specify various classes that are built-ins rather than purely functions, it may want a rename? 17:25
TimToady we expect to develop a distribution module more like linux
DateTime is kinda on the edge of what might be included 17:26
slavik based on CPAN?
masak I'm actually half-surprised that DateTime isn't included with the Perl 5 distributions. it's such a common, useful module. 17:27
TimToady the question is whether it's necessary for downloading everything else
masak it os? ok.
that explains it.
TimToady just as a bare kernel is basically useless without a distribution, we're thinking a bare Perl 6 is relatively useless 17:28
jnthn TimToady: Where do you see multiple dispatch fitting into the synopses mentioned in the spreadsheet?
TimToady then we get the ISPs to install a real distribution, not the barebones version
it's basically S06 17:29
jnthn OK.
I see S12 shrinking somewhat under this re-org. :-)
TimToady the current # scheme isn't perfect, but close enough for now
shrinking S12 would be a good thing
jnthn Aye, it's huge. 17:30
But full of fun stuff to implement.
TimToady and part of the motivation for putting in under pugs is to allow others to do such housekeeping
since one really has to track smartlinks as well
jnthn ...must resist temptation to remove hard to implement bits...
;-)
TimToady some kinds of forgiveness are easier to come by than others... 17:31
jnthn hopes that dispatch on named parameters and return types stays for something beyond 6.0.0.
TimToady but where the hard-to-implement bits seem like unnecessary bits, I'm sure the language designers would like some feedback :)
jnthn S09 is full of plenty of tricky looking stuff, but I've not given it enough thought to know just how bad it is. :-) 17:32
Those bits in multiple dispatch that are currently conjectural, I'd really like to see stay as "for after 6.0" though. 17:34
TimToady as long as 6.0.0 implements a strict subset of what we want to implement eventually, we can probably defer some of it if we need to
jnthn Sure.
Just don't want to strip out too much of the awesome things.
TimToady yes, well, we put in protos so we could rewrite named to positionals for just that reason
jnthn *nod*
TimToady and that rewriting will probably be mandatory for 6.0 17:35
jnthn I think I've got positional dispatch about right now.
Yes, agree. protos are on my hit list.
TimToady can we do caching based on type profiles of arguments?
at least, common profiles? 17:36
subsets will always be problematic, given they have to run code
jnthn If by that you mean, the types of the arguments (so far as knowing what class they're an instance of), then yes.
That's what I've put in now.
TimToady goodgood
jnthn If we are doing a dispatch and can make a purely nominal type-based decision
then we cache it.
If we have to dis-ambiguate on subsets, we don't bother. 17:37
I don't think we can cache those.
Not trivially.
TimToady can the base types be used to cut down the candidate list though?
jnthn Yeah.
TimToady seems like that'd be a win
jnthn I'm not doing that now.
But it wouldn't be hard to do either.
jnthn puts in a code comment to suggest it as a future opt 17:38
I didn't want to spend too much time on optimization right now, but given Parrot rather needed an MMD cache, I figured I may as well kill two birds with one stone... 17:39
TimToady and are you tracking the fact that the candidate list is actualy lexically determined?
the same short name at two different locations can mean two different candidate lists depending on what has been imported
though a given lexical pad can probably assume a constant list throughout 17:40
jnthn I'm aware of the fact I have to deal with this. 17:41
I've got an answer for how to, but I'm not sure I like it...
We're not getting that right even in the uncached case yet.
TimToady just means the cache has to be distributed lexically and not globally
slavik am I correct in that func($a, $b) is the same as @list=$a, $b; func(@list) or will func() be upset about it?
jnthn func will be very upset 17:42
slavik unless it slurps everything?
jnthn func(|@list) will do what you want though
slavik I see
TimToady what is the sig of func?
jnthn Oh, good point. ;-)
slavik if the sig is sub func($a, $b)
jnthn Then yes.
TimToady then @list will bind to $a, and $b will be Very Angry 17:43
unless you call it with |
slavik ahh, ok
jnthn TimToady: Yeah. The thing is that in Parrot we have a MultiSub which holds a set of candidates to be considered. And we stash that under the name.
TimToady: One way to do it is, if we're in a scope and it introduces new multis, clone the MultiSub and existing candidate list. 17:44
TimToady it would have to be stashed under a lexical alias of the name
slavik TimToady: the idea behind this is to cache the inputs to func() and the output received for it, so that before calling func() the next time for the same time, there could be a lookup into a hash or somesuch and the output given
jnthn Then yes, stick it in a lexical slut
*slot
slavik I guess it's the classic way sin(), cos() and tan() were handled to speed things up (look up tables)
HAHA
jnthn . o O ( oops ) 17:45
17:45 bento joined
jnthn I think I'll probably go along that route. 17:45
17:45 nacho joined
TimToady be careful with your cunning stunts :) 17:45
bento www.youtube.com/watch?v=oWFhfoAvkmc...re=related
lambdabot Title: YouTube - The Rothschilds controls the gold market
jnthn takes a moment to get it
bento What do you think about this clip?
masak jnthn: re 'lexical slut': angryflower.com/taxcut.html 17:46
lambdabot Title: Bob the Angry Flower - Tax Cuts
17:46 bento was kicked by TimToady (TimToady))
jnthn ...I take it that means I shouldn't check the movie... 17:47
TimToady Webchat is a trollbot
it pops up periodically and says something provocative
pmichaud spectest has a new test...
jnthn Anyway...since a MultiSub holds the cache, then we should get it right...
pmichaud sub non_twigil { is $^foo, 5, "A single placeholder (still) works"; is $foo, 5, "It also has a corresponding non-twigil variable";
} 17:48
... is that correct. Do $^foo placeholders also generate $foo bindings?
TimToady yes
pmichaud okay.
jnthn pmichaud: Yeah, somebody put it in and was too lazy to fudge it. ;-)
pmichaud is that new or has it always been that way?
TimToady that's one of the clarifications I put in yesterday :)
pmichaud ah.
I haven't had a good opportunity to put that in. Okay, I'll fudge.
thanks.
TimToady the result of the discussion on p6l 17:49
pmichaud haven't read email since thursday... too busy trying to fix lexicals and contexts in Parrot. :-(
slavik hmm, what about pointy blocks where the block is before the for keyword ... say $^x, $^y for 1..10; could that be changed to say $a, $b for 1..10 -> $a, $b; ?
pmichaud slavik: I think that would be: -> $a, $b { say $a, $b } for 1..10 17:50
TimToady that's not a block
pmichaud if at all.
slavik hmm
TimToady since the left of a "for" is a statement, and bare blocks at statement level are called automatically, you can say { say $^a, $^b } for 1..10 and have it dwim
masak rakudo: { say $^a, $^b } for 1..10 17:51
p6eval rakudo 33001: OUTPUT[12␤34␤56␤78␤910␤]
slavik rakudo: for 1..10 -> $a, $b {say $b, $a;}
p6eval rakudo 33001: OUTPUT[21␤43␤65␤87␤109␤]
slavik but what if I want to do something like that
masak rakudo: { say $^b, $^a } for 1..10
p6eval rakudo 33001: OUTPUT[21␤43␤65␤87␤109␤]
masak slavik: there you go.
slavik oh ...
masak :)
slavik err, how does it know to do that? does it actually evaluate the variable names? 17:52
pugs_svn r23056 | pmichaud++ | [t/spec]: Fudge the new placeholder test until rakudo implements it.
pmichaud gee... rakudo actually works sometimes.
slavik: placeholders occur in lexicographic order.
jnthn I actually expected it to fail that one!
slavik I see
pmichaud jnthn: I expected it to work. :-)
slavik so it sorts them to figure out what gets what, ok
TimToady and the answer to the next question is, don't do that. :)
slavik TimToady: ok ;) 17:53
pmichaud jnthn: one of the benefits of having fixed the if (...) -> { ... } pointy block stuff.
masak TimToady: I'm sorry, what would the next question have been?
slavik rakudo: say ?{0 == 3}
p6eval rakudo 33001: OUTPUT[1␤]
slavik p00p
masak rakudo ?(0 == 3) 17:54
jnthn pmichaud: Nice :-)
masak rakudo: say ?(0 == 3)
p6eval rakudo 33001: OUTPUT[0␤]
slavik err?
TimToady masak: the next question is typically, "
masak slavik: not curlies.
TimToady "Won't that get confusing if I do something complicated?"
slavik masak: the docs say curlies ...
masak TimToady: ah.
slavik: where?
slavik in the rules and grammars thing
S05 I think 17:55
masak slavik: please provide an URL.
preferable to the line in question.
slavik ok
masak s/ble/bly/
because that's not right.
jnthn ponders that the block in ?{0 == 3} should maybe get executed
TimToady rakudo say ?({0 == 3})
rakudo: say ?({0 == 3}) 17:56
p6eval rakudo 33001: OUTPUT[0␤]
masak and people say parentheses are only for grouping :)
TimToady jnthn: no, a bare close not in statement context is just an item, and it's true
pmichaud ...right.
jnthn TimToady: Aha, good.
TimToady they happen to create a statement inside as well
pmichaud ? { 0 .. 3 } isn't a bare block.
slavik A leading ?{ or !{ indicates a code assertion: 17:57
TimToady rakudo: say ($_ if $_ % 2 for 1..10) unless 0;
p6eval rakudo 33001: OUTPUT[-1␤]
slavik not sure how to figure out the line #
TimToady hmm, looks like a bug 17:58
slavik feather.perl6.nl/syn/S05.html
lambdabot Title: S05
slavik so, ?() is an assertion?
TimToady rakudo: say ($_ if $_ % 2 for 1..10);
p6eval rakudo 33001: OUTPUT[-1␤]
TimToady pugs: say ($_ if $_ % 2 for 1..10);
p6eval pugs: No output (you need to produce output to STDOUT)
TimToady bleh
looks like rakudo doesn't do list comprehensions yet 17:59
pmichaud it doesn't.
shouldn't be too difficult to do... just had other fish to fry first.
it's on my list. :-) 18:00
TimToady pugs: say (say $_ if $_ % 2 for 1..10);
p6eval pugs: No output (you need to produce output to STDOUT)
rakudo_svn r33003 | pmichaud++ | [rakudo]: Temporarily regress on t/spec/S16-io/basic-open.t
r33003 | pmichaud++ | until we get contexts completely worked out, and perhaps a refactor
r33003 | pmichaud++ | of Rakudo's IO subsystem to use Parrot's new IO objects.
TimToady rakudo: say (say $_ if $_ % 2 for 1..10);
p6eval rakudo 33001: OUTPUT[1␤3␤5␤7␤9␤-1␤]
slavik also, is bignum going to get fixed?
rakudo: say 2**65
p6eval rakudo 33001: OUTPUT[./parrot: error while loading shared libraries: /home/evalenv/parrot/blib/lib/libparrot.so.0.8.1: invalid ELF header␤]
pmichaud slavik: probably not anytime soon.
TimToady okay, parses the inside of () as a statement
slavik err 18:01
TimToady rakudo: say (say $_ if $_ % 2 for 1..10) unless 0;
slavik rakudo: say 2**65;
p6eval rakudo 33001: OUTPUT[1␤3␤5␤7␤9␤-1␤]
rakudo 33001: OUTPUT[3.68934881474191e+19␤]
18:01 justatheory joined
TimToady note that statement inside () also allows extra nesting of modifiers 18:01
slavik looks like it does only Doubles ...
TimToady pugs: say 2**65 18:02
p6eval pugs: No output (you need to produce output to STDOUT)
TimToady bleh
pmichaud slavik: correct... we rely on Parrot's bigint implementation at the moment, and that has some issues.
slavik pugs: say 2**65;
p6eval pugs: No output (you need to produce output to STDOUT)
slavik pugs: print 2**65;
p6eval pugs: No output (you need to produce output to STDOUT)
TimToady pugs is hosed at the moment, and I keep forgetting
slavik pugs is broke?
k
TimToady: from my cabal install of pugs, it works fine
pmichaud pugs: say "No output (you need to produce output to STDOUT)";
p6eval pugs: No output (you need to produce output to STDOUT)
TimToady just the bot 18:03
pmichaud gee, it works for me.
slavik I guess both pugs and rakudo rely on the lower level thing for bignum
TimToady pmichaud: :P
yes, but pugs doesn't rely on something GPL'd
pmichaud pugs: say <No output (you need to produce output to STDOUT) >.join(' '); 18:04
p6eval pugs: No output (you need to produce output to STDOUT)
pmichaud that works too. :-P
18:04 smg left
masak haha 18:04
slavik haha
TimToady Math Professor: "Now I'm going to multiply by 1, but I'm going to write it funny..."
slavik I guess pugs almost implements Larry's new language, called STAR 18:05
so, we should be getting news about all of our problems being fixed now, by pugs ^^
pmichaud lunchtime.
TimToady gotta go fix my car and get it smogged, sigh... 18:06
afk & # putputput
slavik hmm, inside of a grammar, how can I do an assertion, since <?()> doesn't seem to work 18:12
pmichaud we've basically been using PIR closures up til now. 18:14
might also be able to write it as a method call.
18:18 Lunchy_ joined, masak left 18:24 meteorjay left 18:28 Lunchy_ left
slavik does [] work as a non-capturing grouping in regex? 18:35
token getstr { (['&'?] \w+ '=' \w+)* } #I expect the '&' to not be captured ...
TimToady slavik: yes 18:43
afk & # really
slavik hmm, this is in rakudo
:(
and the & actually gets captured 18:44
well, this is part of a grammar
jnthn slavik: Ah, were you expecting to not have & in $1?
slavik yes
jnthn It means that you don't have a $2
('&'?) => $2 captures the &
slavik basically, give something like: blah=glah&something=other 18:45
I want to not capture the &
jnthn Maybe
['&'? (\w+ '=' \w+)]*
slavik awesome, ty 18:46
and assertions in grammars still don't work? 18:48
<?()> seems to give a syntax error
jnthn Not implemented yet, I don't think.
slavik k
hmm, what would be the best way to create a hash out of two lists? as in @keys; @vals; for @keys, @vals -> $a, $b { %hash<$a> = $b; } 18:52
or some such?
also, is there a data::dumper or printr() or similar available? 18:53
s1n i think .perl was going to eventually replace data::dumper, but i could be wrong (not sure it was specced yet) 18:57
perl6: @a = ("hello", "world"); say @a.perl 18:58
p6eval rakudo 33009: OUTPUT[Scope not found for PAST::Var '@a'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (src/PCT/HLLCompiler.pir:104)␤]
..pugs: No output (you need to produce output to STDOUT)
..elf 23056: OUTPUT[Global symbol "$a_a" requires explicit package name at (eval 117) line 3.␤Global symbol "$a_a" requires explicit package name at (eval 117) line 4.␤ at ./elf_f line 3861␤]
s1n hah ok, that didn't quite work
perl6: $a = "hello world"; say $a.perl
p6eval pugs: No output (you need to produce output to STDOUT)
..rakudo 33009: OUTPUT[Scope not found for PAST::Var '$a'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (src/PCT/HLLCompiler.pir:104)␤]
..elf 23056: OUTPUT["hello\ world"␤]
s1n hmm, well, so much for that 18:59
18:59 jferrero joined
jnthn s1n: You need to declare! 19:05
s1n oh yeah, strict is enforced still heh
slavik rakudo: my @list = 1..5; my @list2 = @list; for @list, @list2 -> $a, $b {say $a, $b; } 19:06
p6eval rakudo 33009: OUTPUT[12␤34␤51␤23␤45␤]
s1n it still shouldn't panic rakudo though
slavik hmm
rakudo: my @list = 1..5; my @list2 = @list; for @list -> $a, @list2 -> $b {say $a, $b; }
p6eval rakudo 33009: OUTPUT[Statement not terminated properly at line 1, near "-> $a, @li"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
jnthn s1n: Rakudo should give an error, just maybe worded a little different. :-)
slavik hmm
how to iterate though 2 lists at the same time?
s1n perl6: my $a = "hello world"; say $a.perl 19:07
p6eval pugs: No output (you need to produce output to STDOUT)
..elf 23056: OUTPUT["hello\ world"␤]
..rakudo 33009: OUTPUT["hello world"␤]
jnthn zip
s1n perl6: my @a = ("hello", "world"); say @a.perl
p6eval pugs: No output (you need to produce output to STDOUT)
..elf 23056: OUTPUT[["hello","world"]␤]
..rakudo 33009: OUTPUT[["hello", "world"]␤]
s1n okay, yeah that works better
i should get a ticket in for that panic for no declaration
slavik my @a = ((1,2),3); say @a.perl;
jnthn rakudo: my @a = 1..5; my @b = 6..10; for zip(@a,@b) -> $a, $b { say "$a $b" } 19:08
p6eval rakudo 33009: OUTPUT[Could not find non-existent sub zip␤current instr.: '_block11' pc 109 (EVAL_15:37)␤]
slavik rakudo: my @a = ((1,2),3); say @a.perl;
p6eval rakudo 33009: OUTPUT[[1, 2, 3]␤]
jnthn rakudo: my @a = 1..5; my @b = 6..10; for @a Z @b -> $a, $b { say "$a $b" }
p6eval rakudo 33009: OUTPUT[1 6␤2 7␤3 8␤4 9␤5 10␤]
slavik hmm
jnthn There you goes.
slavik jnthn: ty
jnthn Z infix operator works.
slavik Z is the infix zip?
jnthn Yes
slavik k
s1n jnthn: can you give an example?
slavik s1n: it's there 19:09
my @a = 1..5; my @b = 6..10; for @a Z @b -> $a, $b { say "$a $b" }
s1n oh, didn't see that heh
jnthn :-)
s1n jnthn: how many hours a week do you usually put forth for TPF grants? 19:10
(harmless curiosity) 19:11
slavik hmm, will zip work on multiple arrays?
jnthn slavik: I think so...
19:11 adc_penner4 joined
slavik rakudo: my @a = 1..5; my @b = 6..10; my @c = 11..15; for @a Z @b Z @c -> $a, $b, $c { say $a, $b, $c } 19:12
p6eval rakudo 33009: OUTPUT[1611␤2712␤3813␤4914␤51015␤]
slavik awesome
jnthn s1n: I don't currently have a TPF grant; currently I'm funded a day a week by Vienna.pm, where I do at least 8 hours (minimum I am meant to do - but it ends up more pretty much always...)
Plus I've had a one-off grant for 40 hours from DeepText to work on MMD things.
s1n jnthn: didn't you put up for a Hague grant?
jnthn Oh
You were asking how much time a week that will likely lead to? 19:13
slavik rakudo: my @a = 1..5; my @b = 6..10; my @c = 11..15; for @a Z @b Z @c -> $a, $b, $c { say "$a, $b, $c"; }
p6eval rakudo 33009: OUTPUT[1, 6, 11␤2, 7, 12␤3, 8, 13␤4, 9, 14␤5, 10, 15␤]
s1n jnthn: yeah sorta, just curious how much people spend a week on it
jnthn I'll spend at least a day a week over the 3 months, I expect.
19:14 rdice left
s1n is that on top of a day job (i.e. 4-40)? 19:14
jnthn No
I don't have a $DAYJOB
s1n heh, student?
jnthn I do consulting stuff; have done for the last couple of years. 19:15
s1n ah
jnthn Always had multiple clients, some of them just sucking up more time than others.
One of the clients I was doing a lot for needed me to do a lot less as of a month or so ago.
So I'm filling my time up with Perl 6 work, hopefully. 19:16
s1n effective use of time
jnthn I hope so! ;-) 19:17
s1n i was telling pmichaud that i will hopefully have time to add 5-10 hours a week (hopefully) on regular development soon :)
without having to change my schedule, work, school, or anything else! 19:18
i ride a vanpool to work, and i got my employer to agree to let me bring a laptop to work 19:19
so i think i want to get a netbook and spend the 2 hours working on rakudo :)
jnthn Cool! :-) 19:20
s1n i'm now looking for 2 things, which netbook to buy and a good starting point in the code :) 19:21
i've been out for 2 months (school is rough)
i last worked on the number parsing for pmichaud and helped some with the testsuite 19:22
19:24 LimbicRegion joined
s1n if anyone has any ideas for either of those, i'm all ears 19:25
19:26 adc_penner3 left
jnthn The test suite always wants help. 19:27
s1n well i started out there and i quickly started itching to actually help with rakudo
but the learning curve is kinda steep
19:34 smg joined 19:42 Limbic_Region left, LimbicRegion is now known as Limbic_Region 19:44 Bzek left 20:03 Lunchy joined 20:21 ZuLuuuuuu left 20:24 dukeleto_ left 20:29 ZuLuuuuuu joined 20:40 pjcj joined
rindolf jnthn: are you also "jonathan"? 20:56
20:59 pmurias joined 21:01 Limbic_Region left
jnthn rindolf: I'm jonathan on #parrot, jnthn here 21:02
Because jonathan was taken on this IRC server
rindolf jnthn: ah. 21:03
21:12 rindolf left 21:19 Psyche^ joined, Psyche^ is now known as Patterner 21:25 dukeleto_ joined 21:26 dukeleto_ left 21:44 masak joined 21:48 ilbot2 joined 21:49 moritz joined, moritz is now known as moritz_ 21:51 nacho left 21:52 Aisling joined 21:54 simcop2387 joined, km2 joined 22:11 Limbic_Region joined 22:41 Coleoid joined 23:08 pbuetow joined 23:11 pcbuetow joined 23:16 apeiron_ joined, masak left 23:20 apeiron left 23:26 pbuetow left 23:30 apeiron_ is now known as apeiron 23:42 ZuLuuuuuu left