Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-07

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 eric256 mberends: sorry work called
00:03 eric256 i thought it was single line ;)
00:04 eric256 okay that will take me a while to understand but thanks! ;)
00:05 eric256 later
00:08 mbaro joined #perl6
00:13 spx2 joined #perl6
00:16 Jack joined #perl6
00:16 Jack left #perl6
00:19 spx2 joined #perl6
00:27 justatheory joined #perl6
00:50 Student joined #perl6
00:53 pugs_svn r24789 | particle++ | [S19] rip out option categories and services until they prove useful
00:55 |jedai| joined #perl6
00:56 pugs_svn r24790 | particle++ | [S19] address concerns about mixing -e and -e6
01:02 hercynium joined #perl6
01:07 xinming joined #perl6
01:07 r0bby joined #perl6
01:09 cspencer joined #perl6
01:17 japhb joined #perl6
01:20 pugs_svn r24791 | lwall++ | [S11] clarify the intent of the -e6 remark not to be special syntax, but
01:20 pugs_svn r24791 | lwall++ | a natural outcome of -e and '6;'
01:31 |jedai| joined #perl6
01:52 cspencer joined #perl6
01:59 eric256 joined #perl6
02:00 perl6examples joined #perl6
02:00 perl6examples joined #perl6
02:03 alester_ joined #perl6
02:07 xinming_ joined #perl6
02:08 cspencer perl6: class Foo { method list { say "bar" } }; my $f = Foo.new; $f.list
02:08 p6eval rakudo 35086: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: 'parrot;Foo;list' pc 187 (EVAL_13:91)␤»
02:08 p6eval ..elf 24791, pugs: OUTPUT«bar␤»
02:08 mbaro left #perl6
02:15 aindilis` joined #perl6
02:17 alc joined #perl6
02:23 eternaleye joined #perl6
02:32 fridim_ joined #perl6
02:35 |jedai| joined #perl6
02:37 perl6examples joined #perl6
02:40 ChrisDavaz joined #perl6
02:44 eric256 abandoned twitter in favor of a pure HTTP + IRC bot
02:49 pmichaud rakudo:  class Foo { method list { say "bar" } }; Foo.new.list;
02:49 p6eval rakudo 35086: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: 'parrot;Foo;list' pc 164 (EVAL_12:84)␤»
02:49 pmichaud interesting.  Will fix after rvar.
03:01 |jedai| joined #perl6
03:05 ChrisDavaz joined #perl6
03:07 perl6examples joined #perl6
03:10 eric256 the bot can now add people as collaborators.....
03:10 eric256 perl6examples: add eric256
03:10 eric256 hmmm it should probably announce that you've been added, but this is nice and quite ;)
03:12 literal you mean quiet?
03:15 mberends are there security concerns with adding collaborators via irc?
03:15 literal not if the bot only obeys commands from a certain hostmask, or requires authentication...
03:18 mberends perl6examples: add xxxx # only joking...
03:19 eric256 mberends: i don't think there realy are security issues
03:19 eric256 someone could abuse it, but then they could come on here and ask me to add them and then abuse it too
03:19 eric256 the barrier to entry is the same either way ;)
03:19 eric256 this is just easier on me ;)
03:19 mberends that's fair enough
03:20 ChrisDavaz joined #perl6
03:20 eric256 so feel free to add people and/or edumacate people on adding themselves if i'm not around
03:21 mberends certainably
03:23 s1n eric256: have you run the euler code recently?
03:25 eric256 no
03:25 eric256 with our naming convention i'm hoping to automate nightly smokes of it though ;)
03:26 eric256 why? is there a problem with it?
03:26 xinming joined #perl6
03:31 s1n eric256: try it out, i'm getting segfaults on some
03:31 s1n eric256: for example, prob004 segfaults for me
03:32 eric256 yea i get a segfault on 001-unobe and i'm waiting for a reply on prob004
03:33 s1n backtraces don't seem consistant
03:33 eric256 i've been getting segaults on large ranges lately
03:34 s1n i tried some of the new prefix operators pmichaud blogged about and it didn't crash from the RE(P)L
03:35 s1n perl6: my $sum = [+] 1..5;
03:35 p6eval rakudo 35086: RESULT«15»
03:35 p6eval ..pugs: RESULT«\15»
03:35 p6eval ..elf 24791: OUTPUT«/home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:117:in `block in to_dump0': undefined method `to_dump0' for nil:NilClass (NoMethodError)␤       from /home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:117:in `map'␤ from
03:35 p6eval ../home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:1...
03:35 s1n see, it works there, but if i put it into a script and run it, it segfaults
03:39 azawawi_ joined #perl6
03:42 eric256 are you running the same version? that works fine on my rakudo
03:43 alc joined #perl6
03:43 eric256 rakudo: my $sum = [+] 1..100;
03:43 p6eval rakudo 35086: RESULT«5050»
03:43 eric256 rakudo: my $sum = [+] 1..1000;
03:43 p6eval rakudo 35086: RESULT«500500»
03:43 eric256 rakudo: my $sum = [+] 1..10000;
03:43 p6eval rakudo 35086: RESULT«50005000»
03:43 eric256 rakudo: my $sum = [+] 1..100000;
03:44 p6eval rakudo 35086: No output (you need to produce output to STDOUT)
03:44 eric256 run a perl6 -v and see what revision you are on
03:45 mberends numeric overflow because Num is not (fully) implented. you get full precision to 1 million.
03:45 mberends *implemented
03:46 s1n 35086
03:46 s1n revision 35086 built on parrot 0.8.2-devel, for x86_64-linux-thread-multi
04:02 elmex_ joined #perl6
04:02 s1n ugh, spectest passes but i'm still getting segfaults
04:18 xinming_ joined #perl6
04:25 kisu_ joined #perl6
04:27 AzureStone_ joined #perl6
04:35 s1n is there any way of converting very large numbers (1e50) to something like the _full_ number
04:36 s1n for example, "(5 ** 50).say" gives scientific notation, but i want the full number
04:37 pdcawley joined #perl6
04:39 s1n without going the grunt work of expanding the number myself that is
04:43 s1n rakudo: (5**50).say
04:43 p6eval rakudo 35087: OUTPUT«8.88178419700125e+34␤»
04:43 s1n in other words, how can i get that full number in either a string or some other means for processing (i.e. printing)?
04:46 plainhao joined #perl6
05:02 |jedai| joined #perl6
05:20 |jedai| joined #perl6
05:20 masak joined #perl6
05:28 azawawi_ hi masak
05:28 masak azawawi_: hi
05:28 azawawi_ how r u? i hope you're doing fine/great ;-)
05:29 * masak is happy because he got up early today
05:29 masak azawawi_: how about you?
05:29 * azawawi_ is happy since he has like 25 mins to hack before going to work ;-)
05:29 masak sounds like we're in approximately the same time zone :)
05:29 azawawi yup
05:30 xinming joined #perl6
05:30 azawawi 7:30am
05:30 japhb joined #perl6
05:30 masak 6:33 here.
05:30 azawawi run rakudo script in Padre win32 worked today...Yay!
05:31 masak cool!
05:31 azawawi i cant find 'say' in S29
05:31 masak I see use.perl.org is back up.
05:31 masak azawawi: it's in S16.
05:32 masak azawawi: I don't know what to do about those yet -- maybe duplicate outright.
05:32 masak but it feels partly wrong.
05:32 alester joined #perl6
05:32 azawawi i cant understand S29 is about functions
05:32 azawawi and say is a function right?
05:33 masak :)
05:33 masak yes.
05:33 masak you're right, you're right.
05:33 masak tell you what, I'll add it right away.
05:34 azawawi remove obsolete functions to another section head?
05:34 masak azawawi: say again? I didn't get that.
05:34 azawawi use the script you created, and take a look
05:35 azawawi i need a keyword or a list of keywords in =item -s
05:36 azawawi so S29 should be more parse friendly
05:36 masak azawawi: ah, so your problem is that the 'Obsolete' section contains items with multiple words?
05:37 azawawi so i type 'Obsolete' i get a keyword calltip on time for instance
05:37 azawawi s/so/so when/
05:37 masak azawawi: suggestion. add a special case for 'Obsolete', so that it's ignored when parsing S29.
05:38 azawawi or we can think a bit more generic and add a tag or something
05:38 azawawi to mark it as a function
05:38 masak sure, that works too.
05:38 azawawi so we can extract info from S29 or S16 or S06...
05:39 azawawi what do u suggest for the tag?
05:39 azawawi something like smart links but let us call it dumblinks ;-)
05:40 masak 'dumblinks'. I like that. :)
05:40 rakudo_svn r35091 | infinoid++ | [cage] Fix up some codetest failures.
05:41 |jedai| joined #perl6
05:43 pugs_svn r24792 | masak++ | [S29] put the C<polar> function inside a list, for consistency
05:43 masak ok, so IO currently doesn't have a =head2 in S29.
05:43 masak I'll add one.
05:44 masak I also expect some people will protest; this is duplication of information, after all.
05:44 masak we'll see what happens. the revert button is always close by.
05:47 masak I'll add print, say and printf for the time being.
05:48 masak oh, and getc.
05:49 masak we should probably add a readline eventually too.
05:49 azawawi if you add for instance a link to other Synopsis-es in =item...
05:51 alc joined #perl6
05:52 masak azawawi: yes, that's what's done in some places. I find that unsatisfactory, however, if S29 is to function as a sort of 'perldoc perlfunc'.
05:52 masak hm.
05:53 azawawi perldoc perl6s29func ;-)
05:53 masak I'm just about to commit. maybe I should abort and just add 'see S16' for these four functions?
05:53 masak what do you think?
05:53 azawawi i think we need to think about it a bit
05:53 masak ok. aborting commit.
05:54 azawawi since i have like 5 min before going work ;-)
05:54 azawawi let ask moritz_ about that today
05:54 masak oh, we can fix it before you go :)
05:54 masak let's be conservative and add 'see S16' for the time being.
05:55 masak and then later, if it's a good idea, we'll copy the content.
05:56 azawawi and when the script sees S\d\d it should jump there and index its =item
05:56 masak azawawi: I can't blame you for lack of ambition :)
05:59 pugs_svn r24793 | masak++ | [S29] added mentions of getc, print, say and printf, with references to S16
06:00 pugs_svn r24793 | masak++ | for details
06:01 pugs_svn r24794 | masak++ | [S16] slight disambiguation
06:01 * masak purrs
06:01 azawawi lex cache for parsing std.pm => 1660 file
06:02 azawawi lex cache for parsing hello.p6 => 840 files
06:03 masak sounds impressive. in a slightly sick way.
06:07 * azawawi work &
06:07 azawawi thx masak++! cya in the evening...
06:12 masak buubot: spack succ
06:12 buubot masak: S02-bits.pod:1 S03-operators.pod:11 S04-control.pod:9 S05-regex.pod:25 S06-routines.pod:4 S07-iterators.pod:1 S09-data.pod:3 S12-objects.pod:7 S16-io.pod:9 S26-documentation.pod:1 S29-functions.pod:4
06:12 masak buubot: spack pred
06:12 buubot masak: S02-bits.pod:11 S03-operators.pod:6 S05-regex.pod:2 S06-routines.pod:4 S09-data.pod:2 S10-packages.pod:1 S11-modules.pod:1 S12-objects.pod:1 S26-documentation.pod:3
06:13 xinming_ joined #perl6
06:13 masak buubot: spack \bsucc\b
06:13 buubot masak: S03-operators.pod:3
06:13 masak buubot: spack \bpred\b
06:13 buubot masak: S03-operators.pod:2
06:14 masak that's better.
06:15 masak ok, so .succ and .pred currently have one behaviour on Num, and another on Bool.
06:15 masak adding that to S29.
06:25 pugs_svn r24795 | masak++ | [S29] added .succ/.pred for Num, Int and Bool
06:53 ashizawa joined #perl6
06:57 xinming joined #perl6
07:01 pbuetow joined #perl6
07:10 DemoFreak joined #perl6
07:14 mberends joined #perl6
07:16 mtnviewmark joined #perl6
07:17 mtnviewmark ping masak....
07:17 masak mtnviewmark: I'm here.
07:17 mtnviewmark do you ever sleep?
07:17 mtnviewmark :-)
07:17 masak mtnviewmark: actually, yes. sometimes.
07:17 masak but today I decided to get up early.
07:17 masak I'm glad you have the impression that I'm always here.
07:18 mtnviewmark so - would you like to take a gander at the new chart and would you be willing to proof the factual content (operator names, precedences, etc...)?
07:18 masak yes, of course.
07:18 masak URL?
07:18 mtnviewmark I actually think you are the oracle behind std: !
07:18 masak mtnviewmark: I'm not denying that.
07:19 mtnviewmark I could e-mail it to you
07:19 mtnviewmark assuming that e-mail I ahve for you works (I sent you e-mail the other day)
07:19 masak std: $*oracle_behind === 'masak' ?? 'I knew it' !! 'oh well'
07:20 p6eval std 24795: OUTPUT«00:05 86m␤»
07:20 masak mtnviewmark: it works
07:20 |jedai| joined #perl6
07:20 masak mtnviewmark: I didn't reply because you came here instead.
07:20 mtnviewmark np
07:24 mtnviewmark anyone else I should mail this to?
07:24 jan joined #perl6
07:24 masak mtnviewmark: that's a difficult question to answer. I'm sure many would be interested/eager to help.
07:24 masak but we work mainly through IRC.
07:25 mtnviewmark true - but I'm a bit wary of putting it out there in this "almost done" state -- it is useful enough to get wide circulation -- and, as you'll see, the design part isn't done
07:25 mtnviewmark okay - well, I'll start with you
07:25 mtnviewmark sent
07:26 mtnviewmark comin' at ya on the inter-toobs
07:26 masak I'm sure moritz_ would be interested. probably jnthn and pmichaud also.
07:26 masak ah! it's here.
07:26 * masak looks
07:27 * mtnviewmark hopes masak has a good PDF reader
07:27 masak it's sufficiently good.
07:27 masak ooh -- very different layout.
07:28 xinming_ joined #perl6
07:28 masak I agree with you on the non-operators -- only the feed thingies feel like ops
07:28 mtnviewmark yes - well, things changed radically since 2004
07:29 masak I can imagine... although for me, it has seemed very gradual.
07:30 masak kudos for doing this -- it's both useful and nice to look at.
07:30 mtnviewmark you should see: i have a printout of the old table with circles and arrows sketching how things changed - it is like a crazy "all change positions" dance
07:31 masak :)
07:31 mtnviewmark welcome - there is still a few days worth of work to do on it -- now that I have the factual data in place and laid-out, then there is endless tweaking and enhancing the design --- My guess is it will be done in a week or two
07:32 mtnviewmark any how -- I'm off to bed - if you find problems in the text, e-mail me please!  If you want to pass it on to a few others please do, though I don't think it is ready to be posted on a web site..
07:32 mtnviewmark thanks again
07:33 masak np
07:33 ejs joined #perl6
07:33 masak mtnviewmark: are you sure there should be 8 variants of ff and fff?
07:33 mtnviewmark they are all in Syn03, no?
07:33 masak I'd have to check S03 again.
07:33 masak I can't imagine that they're all different.
07:33 masak but then again, it might just be my lack of imagination...
07:34 masak mtnviewmark: ok, with your permission, I'll fwd it to moritz_, jnthn and pmichaud.
07:34 mtnviewmark please
07:35 masak ah, you're right about the ff and fff variants.
07:35 mtnviewmark well - there is no description of ff vs. fff except that fff is "sed style"
07:35 masak mtnviewmark: I think they correspond to Perl 5 .. and ... , respectively
07:35 mtnviewmark hmmmm, okay
07:36 masak so, 'perldoc perlop'.
07:38 mtnviewmark yes- I was off reading it... mind you, it is sort of a numbing thing to read the description of
07:39 mtnviewmark and "awk style" vs. "sed style" only helps those who came from there -- and while I *did* come from there (I don't want to tell you how many years ago) -- I long sinced GC'd by brain of awk and sed in favor of perl
07:39 masak mtnviewmark: Steve Yegge once used that part of the documentation as evidence that Perl is a very odd language.
07:40 masak uh, here: http://steve.yegge.googlepages.com/ancient-languages-perl
07:41 xinming__ joined #perl6
07:41 masak Stevey has since repented somewhat.
07:46 mtnviewmark heading to bed - later and thanks
08:01 maerzhase joined #perl6
08:02 eternaleye joined #perl6
08:11 xinming joined #perl6
08:15 |jedai| joined #perl6
08:34 pugs_svn r24796 | masak++ | [S29] added any, all, one and none as subs and methods on List and Hash
08:43 |jedai| joined #perl6
09:10 masak is there a way to define new metaoperators in Perl 6?
09:11 Matt-W I hope so
09:11 Matt-W Although I've never seen any syntax for it
09:14 masak I'm not so sure it's possible.
09:15 _jedai_ joined #perl6
09:23 masak (Dave Whipp)++ # http://dave.whipp.name/sw/perl6/perl6_xmas_2008.html
09:26 mberends Hmm, currently enjoying that as well
09:27 Matt-W that's good
09:27 Matt-W it was that post on the scripting games that got me trying out perl 6 again, but I did my own thing rather than trying those problems
09:34 * mberends discovers that Block is already registered as a class name
09:34 avar masak: S03 L</Meta operators
09:35 avar > ... would seem to suggest that metaoperators are just named by convention
09:35 lambdabot <no location info>: parse error on input `...'
09:35 avar i.e. ?+ ~+ etc are manually defined, so if you wanted a new metaop you'd have to define one FOO+ op, one BAR+ op etc
09:40 _jedai_ joined #perl6
09:41 iblechbot joined #perl6
09:42 donaldh joined #perl6
09:48 ft joined #perl6
09:49 ejs joined #perl6
09:57 eternaleye masak: Perhaps it could be defined in a similar way to ??!!, with it looking for an operator between the two parts rather than an expression, and using apply() with that captured op
10:07 _jedai_ joined #perl6
10:16 kidd` joined #perl6
10:18 spx2_ joined #perl6
10:26 _jedai_ joined #perl6
10:29 spx2__ joined #perl6
10:33 silenius joined #perl6
10:52 _jedai_ joined #perl6
11:16 _jedai_ joined #perl6
11:29 Tene joined #perl6
11:29 silenius joined #perl6
11:29 japhb joined #perl6
11:29 Ehtyar joined #perl6
11:29 Caelum joined #perl6
11:29 Southen_ joined #perl6
11:29 SubStack joined #perl6
11:29 obra joined #perl6
11:29 Grrrr joined #perl6
11:29 frodwith joined #perl6
11:29 zev joined #perl6
11:29 cls_bsd joined #perl6
11:29 szabgab joined #perl6
11:42 jferrero joined #perl6
11:48 brunoV joined #perl6
12:00 _jedai_ joined #perl6
12:02 DemoFreak joined #perl6
12:03 sri_kraih joined #perl6
12:07 jan_ joined #perl6
12:10 _jedai_ joined #perl6
12:20 Ardonel left #perl6
12:25 kisu_ joined #perl6
12:32 masak S16:409 defines C<prompt> as an only sub. is there a particular reason why C<prompt> is C<only> while virtually everything else in S16 and S29 is C<multi>?
12:35 mberends there is probably only one sensible way to call it, namely with a Str
12:35 Lorn joined #perl6
12:36 masak mberends: so if I'd like to do `prompt(42)`, I should forget about it and define my own wrapper instead?
12:40 mberends how would `prompt( ~ 42 )` go?
12:40 masak that'd work. just unusual to have to do the casting manually in Perl.
12:40 wolverian huh. surely coercions are taken into account?
12:41 wolverian (implicitly)
12:41 masak wolverian: not that I know of.
12:41 masak Str is Str and Num is Num.
12:41 masak at least in parameter passing.
12:41 plainhao joined #perl6
12:41 mberends I get type mismatch errors regularly ( with typed parameters )
12:42 wolverian I thought otherwise, but I don't know why.
12:43 masak wolverian: there's been talk about relaxing many of the type signatures in S29 from e.g. 'Str' to 'of Str' or something like that.
12:43 mberends casting manually is also necessary from Match to Str assignment
12:44 masak mberends: that's because sometimes you'd want one and sometimes the other.
12:45 mberends yes, but when the lvalue is Str it's clear that coercion is required
12:46 masak haven't tried that
12:46 * masak tries that
12:46 masak rakudo: my Str $s = "foo" ~~ /foo/; say $s
12:46 p6eval rakudo 35117: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 14950 (src/builtins/control.pir:204)␤»
12:48 mberends rakudo: my Str $s = ~ ( "foo" ~~ /foo/ ); say $s
12:48 p6eval rakudo 35117: OUTPUT«foo␤»
12:48 masak works as advertised, I would say.
12:49 mberends rakudo: my $s = "foo" ~~ /foo/; say "but this is a match: $s"
12:49 p6eval rakudo 35117: OUTPUT«but this is a match: foo␤»
12:50 masak mberends: aye, a Match that gets stringified in the string interpolation :)
12:51 mberends a Match can act like a Str, but it doesn't quack like one
12:51 masak more like it can turn into a Str when requested to.
12:53 mberends it's knocked my head at least ten times, so now I look out (and duck)
12:54 masak I think it's a matter of having the right expectations in this case.
12:54 masak I use the Match about half of the time and the Str about half.
12:55 mberends btw, I got into Match and so on thanks to the November code. love it!
12:55 masak mberends: glad to hear that. :)
13:00 Matt-W Hmm yes, one would expect stringification to be implicit in a string interpolation :)
13:00 masak it sure helps, aye.
13:01 mberends otherwise it would have to be "blah {~$foo}". yuk
13:02 Matt-W yes indeed
13:02 Matt-W uck
13:02 Matt-W what's the prefix operator for numify?
13:02 mberends +
13:02 Matt-W ah of course
13:02 Matt-W thanks
13:02 masak and ? is for boolify.
13:03 mberends oh, will have to try that somewhere
13:03 masak often there's no need.
13:03 masak Perl 6 DTRT in most cases.
13:04 Matt-W I've not had to do much
13:04 Matt-W and only explicit string conversion
13:04 Matt-W usually with Match objects
13:05 mberends ditto
13:10 rakudo_svn r35120 | jkeenan++ | Applying patch submitted by Geraud Continsouzas in https://trac.parrot.org/parrot/ticket/135 (plus one small fix to CREDITS).
13:16 _jedai_ joined #perl6
13:20 alester joined #perl6
13:25 mj41 joined #perl6
13:32 kisu joined #perl6
14:01 kisu_ joined #perl6
14:10 rakudo_svn r35122 | pmichaud++ | [rakudo]: spectest-progress.csv update: 279 files, 6171 passing, 0 failing
14:11 meppl joined #perl6
14:12 cj joined #perl6
14:13 cj Trey: hey.  I went to tag you in a photo on facebook, but it doesn't look like you've got an account. :)
14:18 _jedai_ joined #perl6
15:00 ejs joined #perl6
15:02 eric257 joined #perl6
15:03 mberends hey eric256++
15:03 vixey joined #Perl6
15:05 Exodist joined #perl6
15:06 eric257 thanks....dunno what for but i'll take it ;)
15:07 mberends 256 -> 257
15:07 eric257 lmao ahh
15:07 eric257 yea apparently left IRC on at home...
15:10 * eric257 tries to get motivated to work
15:10 masak eric257: do you have 256 homes?
15:10 eric257 hehe who do you think i am? John McCain?
15:29 mj41_ joined #perl6
15:36 |jedai| joined #perl6
15:52 jhorwitz joined #perl6
16:19 meppl joined #perl6
16:20 dwhipp joined #perl6
16:21 |jedai| joined #perl6
16:28 spx2 joined #perl6
16:33 stephens joined #perl6
16:35 [particle] std: sub perl6(:M($use|$no)) {...}
16:35 p6eval std 24796: OUTPUT«############# PARSE FAILED #############␤Unable to parse named parameter; couldn't find right parenthesis at /tmp/iy0EY3M7LQ line 1:␤------> [32msub perl6(:M($use[31m|$no)) {...}[0m␤    expecting whitespace␤00:05 83m␤»
16:39 icwiener joined #perl6
16:39 [particle] std: sub perl6(:M($use)) {...}
16:40 p6eval std 24796: OUTPUT«00:05 84m␤»
16:41 cspencer_ joined #perl6
16:47 |jedai| joined #perl6
16:50 eternaleye joined #perl6
17:02 masak anyone have an opinion on Str.warn?
17:04 masak if not, I'll consider the issue stalled for now, and move on.
17:07 cspencer_ perl6: class Foo { method list { say "bar" } }; my $f = Foo.new; $f.list
17:07 p6eval rakudo 35131: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: 'parrot;Foo;list' pc 187 (EVAL_13:91)␤»
17:07 p6eval ..elf 24796, pugs: OUTPUT«bar␤»
17:07 dwhipp Carl was concerned that Object.warn was "too much OO"
17:07 masak ooh, is that a bug I see?
17:07 cspencer_ it looks bugish
17:08 dwhipp I disagree, because p6 builtins don't default to $_
17:08 [particle] dwhipp: carl is masak
17:08 masak dwhipp: I'm just not very eager to pollute the common classes with useless convenience methods.
17:08 dwhipp so "for @a { .warn if xxx }"
17:08 masak dwhipp: and I don't see the advantage of "message".warn over warn("message")
17:09 masak dwhipp: ah, hadn't thought of that.
17:09 dwhipp that's obviously true for literal strings
17:09 masak dwhipp: but in that case, it's even more important not to put .warn only on Str, because the elements of @a might be anything.
17:10 dwhipp yes, putting it on .Object seems right
17:10 [particle] yep, should be Object.warn i think
17:10 [particle] however, { 'foo' => 'bar' }.warn is funky
17:11 masak very well, I'll add it to S29 under "Object".
17:11 masak [particle]: why? just stringify.
17:11 [particle] well, i guess i'd write {...}.perl.warn in real code anyway
17:13 masak aye
17:13 TimToady Object.warn should just use warn($self)
17:14 TimToady and let MD handle it
17:16 arthurium2 joined #perl6
17:16 masak but that's an implementation detail, no? the Perl user just sees the method .warn and the sub warn, without suspecting that one calls the other.
17:17 TimToady yes, but if .warn doesn't have the MD semantics that warn() does, it's also a matter of interface
17:17 masak TimToady: I'm writing the signature now. does `our multi method warn (Object $o:) is export` look about right?
17:17 alester joined #perl6
17:19 * masak must go, will backlog
17:19 * TimToady is wondering what happens if $o is a Junction...
17:20 rakudo_svn r35135 | particle++ | [rakudo] fix typos in makefile template
17:20 TimToady arguably, some of these things should be in Any rather than Object
17:21 maerzhase joined #perl6
17:22 pmichaud (Any vs. Object)  agreed.
17:23 TimToady we also need to carefully evaluate which forms are more basic, so that we don't end up doing SD -> MD -> SD -> MD ...
17:24 TimToady in general SD seems more basic than MD, so having SD redispatch to MD seems a bit strange, but if we make sure MD doesn't redispatch to Object/Any types, we're probably safe from cycles
17:24 kisu__ joined #perl6
17:30 rakudo_svn r35136 | pmichaud++ | [rakudo]:  Change find_global -> get_global.
17:37 _smg joined #perl6
17:40 rakudo_svn r35140 | particle++ | [rakudo] refactor makefile template to create spectest_checkout and spectest_update targets; fix logic errors
17:40 rakudo_svn r35144 | particle++ | [rakudo] add 'testable' make target to create perl6 executable, compile the test library, and update the official test suite
17:44 icwiener joined #perl6
17:47 icwiener joined #perl6
17:48 |jedai| joined #perl6
17:56 azawawi joined #perl6
17:57 mberends joined #perl6
17:57 azawawi hi
18:02 masak joined #perl6
18:03 masak should I put .perl, .print, .say, .printf and .warn in Any?
18:03 pugs_svn r24797 | moritz++ | [t/spec] correct some OO tests that I broke before, masak++
18:05 TimToady masak: yes, I think so
18:06 moritz_ I find it very un-intuitive that junctions autothread through .perl
18:06 TimToady if any(@x.perl) eq '42'
18:06 moritz_ TimToady: testing for the contents of .perl is never a good idea
18:07 TimToady nevertheless, it's sufficient if a Junction stringifies to whatever .perl would have produced
18:08 [particle] timtoady: is there a syntax for me to express something like: sub perl6(:M($use|$no)) {...}
18:08 TimToady :M(:use($no))
18:08 TimToady if you just want another alias
18:08 [particle] std: sub perl6(:M(:use($no))) {...}
18:08 p6eval std 24797: OUTPUT«00:05 84m␤»
18:09 [particle] as long as i can tell which alias was used, it'll work
18:09 TimToady you can't
18:09 [particle] feh.
18:09 [particle] i was hoping i could make -M and :use work, and -/M and :no
18:10 rakudo_svn r35153 | particle++ | [rakudo] rearrange makefile for maintainability
18:10 TimToady you just want :$M, :$use, :$no in that case
18:10 [particle] yes, okay. it's a bit ugly, but i think it'll work. any objection to that syntax?
18:12 TimToady I'm not terribly attached to -M
18:12 [particle] it's hardwired in many fingers, though
18:13 [particle] -U and -N could work
18:13 TimToady what is -u now?
18:13 TimToady and why not -/u instead of -n
18:14 [particle] that could work, but --/use is ugly
18:14 [particle] -u is free
18:15 TimToady I don't think I've ever seen someone use 'no' on the command line
18:15 [particle] here's current: http://perlcabal.org/syn/S19.html#Synopsis
18:15 TimToady and you can always say -e 'no whatever';
18:15 [particle] -e 'no strict;'
18:16 TimToady -e '6; ...'
18:16 [particle] i agree, it's not commonly used, but somebody's gonna want it.
18:16 [particle] i'll proceed with use, and leave no for later
18:17 TimToady in general I don't think we need to add shortcuts for things that can easily be worked around by actually using the language :)
18:17 [particle] the big thing rattling around it my head now is the metasyntactic options
18:17 [particle] ++COMPILER -e 'CHECK{...}' ++/COMPILER
18:18 [particle] ...this means every subsystem must accept -e
18:18 TimToady note that bare -e 'CHECK {...}' laready means that
18:18 TimToady *already
18:18 TimToady -e gives you the full power of Perl 6
18:18 [particle] troo
18:19 [particle] i wonder, does ++CMD...++/CMD execute immediately?
18:19 [particle] things like that are rattling around
18:19 [particle] should crystalize (hopefully) as i write about it
18:20 dwhipp I was looking into writing tests for S09 fixed size arrays: is "for @input -> *@a[ ++$n ] { ... } legal; and will it have the semantics of iterating increasing sized chunks from @input?
18:20 TimToady anything post compile could be handled with some kind of compiler directive like CHECK
18:20 TimToady CMD is pre though
18:21 TimToady also thinking about p5 errors like "Too late for -T"...
18:21 [particle] yes
18:21 [particle] i'm used to that error on windows :)
18:21 Psyche^ joined #perl6
18:21 [particle] #!perl -T #too late!
18:22 TimToady dwhipp: I doubt it, the ++$n would be evaluated at compile time
18:22 cspencer joined #perl6
18:23 TimToady and we haven't specced that arrays can behave like slices either
18:24 TimToady (in binding)
18:24 dwhipp My ++$n was a little extreme, but I was thinking one might write code that (e.g) calculated a number of columns to format the output; and used a fixed-size array to slurp them
18:25 TimToady might be an argument for treating the type as generic and instantiated at binding time, I suppose
18:25 TimToady not sure what the performance would be though
18:25 TimToady probably abysmal...
18:26 TimToady shower & # thinking
18:26 dwhipp if it's calculated once at the start of the loop, then probably not as bad as fully dynamic
18:27 TimToady seems ill defined as to scope
18:27 TimToady bbl &
18:27 dwhipp in what way?
18:29 dwhipp I guess a similar Q relates to the simple case: " my $n = 42; my @a[$n];" -- hopefully legal to sue $n in that context without needing "BEGIN" block
18:32 jferrero joined #perl6
18:36 aindilis joined #perl6
18:45 masak dwhipp: I don't see why not.
18:46 dwhipp That was my thought ... but Larry seems concerned when we apply that same reasoning to point-block signatures
18:52 dwhipp I guess the limit case of the question is if the signature :( $size, *@array[$size] ) is legal
18:52 moritz_ a slurpy array with fixed size?
18:52 moritz_ that looks *very* weird
18:52 dwhipp My use case was:
18:53 dwhipp my $columns = 8;
18:53 dwhipp for @input -> *@values[$columns] { say @values }
18:53 dwhipp ## prints 8 values per line
18:54 moritz_ while @input { my @cols = @input.splice(0, 8); say @cols }; # or something like that
18:54 dwhipp Yes, there's always MTOWTDI
18:55 moritz_ and I don't think there has to be a way to do everything with signatures
18:56 moritz_ actually we discourage large numbers of positional arguments generally, because they are seldom useful in real world subroutines
18:56 dwhipp It's only one positional argument: it just happens to take up 8 positional slots :)
18:57 dwhipp And this was a block, not a subroutine
18:57 azawawi moritz_: hi
18:57 moritz_ hi azawawi
18:57 dwhipp so no nasty semantics-at-a-distance issues
19:00 dwhipp left #perl6
19:03 TimToady declarations are evaluated at compile time, including traits
19:04 TimToady but possibly we can do some indirection if a closure is found
19:04 TimToady my @a[{$n}]
19:04 TimToady but my concern is forcing run-time instantiation of generic types, which could get expensive, esp when accidental
19:05 TimToady bbl &
19:11 azawawi moritz_: i need s// for removing ansi escape sequences...
19:15 cspencer am i able to define infix operators written in perl6 in rakudo yet?
19:15 cspencer i'm not quite sure whether it's unsupported or i've got the syntax wrong :)
19:17 cspencer also, if i define a class in perl 6 that's already been defined, is it possible to replace the original definition?
19:18 pbuetow joined #perl6
19:19 PerlJam cspencer: I don't think so (re: operators)
19:20 cspencer perljam: thanks, i'll work around it for the moment
19:20 PerlJam cspencer: wrt replacing a class, my gut says you should be able to do it, but I wouldn't know how :)
19:21 |jedai| joined #perl6
19:22 moritz_ azawawi: $string.subst() might work for you
19:23 ft joined #perl6
19:34 fridim_ joined #perl6
19:36 DemoFreak joined #perl6
19:42 pugs_svn r24798 | particle++ | [S19] flesh out most of option reference
19:43 cspencer_ joined #perl6
19:46 |jedai| joined #perl6
19:52 km2 joined #perl6
19:53 pugs_svn r24799 | particle++ | [S19] describe unchanged syntax
20:13 cspencer_ left #perl6
20:14 cspencer joined #perl6
20:24 mberends1 joined #perl6
20:34 km2 joined #perl6
20:36 |jedai| joined #perl6
20:44 spx2_ joined #perl6
20:51 alester_ joined #perl6
20:53 mberends joined #perl6
20:58 donaldh joined #perl6
21:00 DemoFreak joined #perl6
21:00 |jedai| joined #perl6
21:06 km2 joined #perl6
21:15 eternaleye joined #perl6
21:26 araujo joined #perl6
21:30 km3 joined #perl6
21:32 simcop2387 joined #perl6
21:46 aindilis joined #perl6
21:51 |jedai| joined #perl6
22:26 wknight8111 joined #perl6
22:35 Helios- joined #perl6
22:40 |jedai| joined #perl6
22:43 Limbic_Region joined #perl6
23:07 eternaleye joined #perl6
23:09 finger joined #perl6
23:09 finger left #perl6
23:11 pdcawley joined #perl6
23:12 pugs_svn r24800 | azawawi++ | [S:H:P6] Fixes hilitep6 binmode STDIN issue for utf8
23:12 pugs_svn r24800 | azawawi++ | [S:H:P6] Updated to latest STD.pm; releasing 0.30 to CPAN
23:21 aindilis` joined #perl6
23:27 |jedai| joined #perl6
23:36 LimbicRegion joined #perl6
23:39 LimbicRegion joined #perl6
23:46 azawawi TimToady: STD.pm finally parses in Padre... Yay! Next step outline mode for comp_unit visualization (methods/subs/tokens...etc).
23:51 |jedai| joined #perl6
23:58 ruoso joined #perl6

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

Perl 6 | Reference Documentation | Rakudo