Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 zostay joined #perl6
00:18 kanru joined #perl6
00:22 jfredett joined #perl6
00:23 Limbic_Region joined #perl6
00:50 bacek joined #perl6
00:53 lunatic joined #perl6
00:57 apeiron joined #perl6
01:05 Lorn joined #perl6
01:32 Alias_ joined #perl6
02:12 Alias__ joined #perl6
02:15 bacek joined #perl6
02:51 * ruoso realises that he's working too much when he unconsciously types __HELP__ when he was trying to type __END__
03:01 * ruoso sleep &
03:02 bacek joined #perl6
03:22 spinclad joined #perl6
03:24 BinGOs joined #perl6
03:33 xuser joined #perl6
04:13 alanhaggai joined #Perl6
04:13 Alias_ joined #perl6
04:27 alanhaggai_ joined #Perl6
04:34 bacek joined #perl6
05:20 Psyche^ joined #perl6
05:31 dr_df0 joined #perl6
05:36 dr_df0 left #perl6
06:10 TimToady @tell pmurias yes, void context is a special kind of scalar context, and map/for both eagerly return a list object in scalar context (lazily in list context), and either can be used only for its side effects; they are isomorphic.  see S04:279
06:10 lambdabot Consider it noted.
06:12 TimToady @tell pmurias a useless-use-of warning results if you use a non-side-effective operation within either map or for in void context, but the map/for don't themselves care
06:12 lambdabot Consider it noted.
06:20 TimToady @tell pmurias and of course, the array object need not actually be constructed if it is known that void context will throw it away; in fact, it may well be the void context optimizer that emits the warnings about useless-use as it propagates void context inward
06:20 lambdabot Consider it noted.
06:22 Ehtyar joined #perl6
06:25 TimToady ruoso: see above
06:32 ashizawa joined #perl6
07:01 BinGOs joined #perl6
07:11 iblechbot joined #perl6
07:19 moritz_ good morning
07:20 moritz_ does anybody know how I can submit a link to the perl section of reddit?
07:21 cosimo joined #perl6
07:22 pmurias joined #perl6
07:43 barney joined #perl6
07:48 pugs_svn r22080 | lwall++ | [STD] fix enum parsing (again)
07:48 pugs_svn r22080 | lwall++ | [Cursor] minor speedups
07:54 penk joined #perl6
07:54 alanhaggai_ joined #Perl6
08:23 elmex joined #perl6
08:26 Ehtyar anyone know where to find a current pugs build for windows?
08:36 mtve joined #perl6
08:39 viklund joined #perl6
08:50 jferrero joined #perl6
08:51 pugs_svn r22081 | moritz++ | [t] fixed use of do as a function in statements/redo.t
08:53 Ehtyar why do i get revision 16464 from svn and i'm seeing revision 22081 here?
08:54 moritz_ svn up -r 16464
08:54 moritz_ but if you have a new ghc installed, the latest version *should* work
08:55 pugs_svn r22082 | moritz++ | [t] moved last.t and redo.t to spec/
08:55 Ehtyar on win32?
08:56 moritz_ I think so, yes
08:56 moritz_ (but haven't tested)
08:57 Ehtyar so how can i checkout 22082?
08:57 Ehtyar up gives me no such revision
08:57 Ehtyar :S
08:58 moritz_ what does 'svn up' update to?
08:58 Ehtyar 16464
08:58 moritz_ which repository are you using?
08:58 moritz_ (svn info; search for Repository Root)
08:58 Ehtyar http://svn.openfoundry.org/pugs/
08:58 lambdabot Title: Revision 16464: /
08:59 moritz_ use http://svn.pugscode.org/pugs instead
08:59 lambdabot Title: Revision 22082: /
08:59 moritz_ the one you use is outdated
08:59 Ehtyar ah ty
08:59 pugs_svn r22083 | moritz++ | [t] merged statements/grepa-and-sort-in-for.t into spec/S04-statements/for.t
09:02 Ehtyar ok, checking out latest, ty moritz
09:02 Myoma joined #PERL6
09:03 pugs_svn r22084 | moritz++ | [t/spec] initialize a variable to make rakudo happy
09:05 zamolxes joined #perl6
09:14 pugs_svn r22085 | moritz++ | [t] simplified blocks/recurse.t a bit, used is() instead of ok()
09:18 pugs_svn r22086 | moritz++ | [t] moved blocks/recurse.t to spec/
09:22 pugs_svn r22087 | moritz++ | [t/spec] recurse.t: use numeric comparison where appropriate, fudged for
09:22 pugs_svn r22087 | moritz++ | rakudo
09:22 kjeldahl joined #perl6
09:26 pugs_svn r22088 | moritz++ | [t] moved blocks/pointy.t to spec/
09:50 preflex joined #perl6
09:57 drbean joined #perl6
10:28 meppl joined #perl6
10:36 kowey joined #perl6
10:48 itz joined #perl6
10:54 sri_work joined #perl6
11:14 charsbar joined #perl6
11:18 tessier__ joined #perl6
11:35 BinGOs joined #perl6
11:38 Lichtkind joined #perl6
11:39 BinGOs joined #perl6
12:06 BinGOs joined #perl6
12:06 alanhaggai_ joined #Perl6
12:09 BinGOs joined #perl6
12:19 BinGOs joined #perl6
13:05 guest56801 joined #perl6
13:54 charsbar joined #perl6
14:07 araujo joined #perl6
14:08 araujo_ joined #perl6
14:09 jiing joined #perl6
14:09 araujo joined #perl6
14:12 araujo joined #perl6
14:13 araujo joined #perl6
14:14 alc joined #perl6
14:15 wknight8111 joined #perl6
14:27 penk left #perl6
14:42 masak joined #perl6
14:45 iblechbot joined #perl6
14:50 hcchien joined #perl6
14:58 kowey left #perl6
15:08 awwaiid joined #perl6
15:45 pmurias joined #perl6
15:56 wknight8111 joined #perl6
16:10 fronty__ joined #perl6
16:11 Front_slash left #perl6
16:11 Front_slash joined #perl6
16:16 iblechbot joined #perl6
16:22 Bensawsome joined #perl6
16:25 rindolf joined #perl6
16:58 Front_slash left #perl6
17:06 [particle]1 joined #perl6
17:11 Chillance joined #perl6
17:12 alanhaggai joined #Perl6
17:14 IRSeekBot joined #perl6
17:17 rindolf joined #perl6
17:42 simcop2387 joined #perl6
17:45 rakudo_svn r30688 | moritz++ | [rakudo] add recursion tests to spectest_regression.data
17:48 rindolf joined #perl6
17:59 rindolf joined #perl6
18:10 jan_ joined #perl6
18:13 jhorwitz joined #perl6
19:06 ruoso joined #perl6
19:17 araujo joined #perl6
19:27 rindolf joined #perl6
19:37 larsen_ joined #perl6
19:50 ruoso joined #perl6
20:04 dduncan joined #perl6
20:05 araujo joined #perl6
20:28 lisppaste3 joined #perl6
20:45 pmurias ruoso: hi, turned out Array.map is enough ;)
20:45 lambdabot pmurias: You have 3 new messages. '/msg lambdabot @messages' to read them.
20:45 ruoso pmurias, yeah... I saw it...
20:46 ruoso it's weird to think that Array.Void() will eagerly evaluate a lazy array...
20:47 pmurias it will only extract it's side effects
20:48 jferrero joined #perl6
20:50 pmurias i'm convinced more and more that we should take the context is part of the method call route
20:51 ruoso hmm
20:51 ruoso I still can only think on contextual information as optimization...
20:52 moritz_ want()
20:53 ruoso want() is something that cannot always be answered, iirc
20:53 justatheory joined #perl6
20:54 moritz_ well, sometimes you have to fake answer
20:54 ruoso that's why I'd rather use lazy contextualization...
20:55 ruoso by calling methods on the returned value
20:55 ruoso (that's how "sub foo is rw" is implemented in SMOP, btw)
20:55 moritz_ that's the recommended approach, but not the only allowed
20:56 ruoso sure... that's why I think on "context on the stack frame" as optimization...
20:56 ruoso and that we could stick to method calls on the returned values for now...
20:57 pmurias shower&
20:57 ruoso because instead of doing if (want() ~~ Scalar), I can return an object that knows how to perform in the different contexts...
20:58 pmurias like Contextual::Return?
20:58 ruoso yeah
20:59 ruoso I think that should improve the overall lazyness of the code...
20:59 ruoso which IMHO, is a good thing...
21:00 apeiron_ joined #perl6
21:00 ruoso I could even think about dropping "want" entirely.... ;)
21:00 ruoso geez... have to run
21:00 * ruoso home &
21:00 * ruoso will backlog... as usual...
21:21 araujo_ joined #perl6
21:25 araujo joined #perl6
21:30 araujo joined #perl6
22:08 pugs_svn r22089 | lwall++ | [STD] Add Bool::True and Bool::False as valid typenames
22:32 araujo joined #perl6
22:46 ggoebel joined #perl6
22:54 wknight8111 joined #perl6
23:01 krunen joined #perl6
23:12 Gothmog_ joined #perl6
23:17 ruoso joined #perl6
23:18 wknight8111 joined #perl6
23:19 * ruoso back
23:20 pugs_svn r22090 | lwall++ | [t] clean up various calls to try, system, etc
23:30 ruoso btw... if for returns the elements returned by each iteration... what is the difference from map?
23:32 ruoso pugs: my @a = for (1,2,3) { $_ * 2 }; say @a
23:32 p6eval pugs: OUTPUT[*** ␤    Unexpected "@a"␤    expecting "=", context, ":" or "("␤    postfix op␤    at /tmp/L16H25MEQV line 1, column 4␤]
23:32 ruoso perl6: my @a = for (1,2,3) { $_ * 2 }; say @a
23:32 p6eval rakudo 30693: OUTPUT[Statement not terminated properly at line 1, near "{ $_ * 2 }"␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
23:32 p6eval ..elf 22090: OUTPUT[Parse error in: /tmp/f7iVqGrfPJ␤panic at line 1 column 20 (pos 20): Statement not terminated properly␤WHERE: my @a = for (1,2,3) { $_ * 2 }; say @a␤WHERE:                    /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:355:in `eat_terminator'␤
23:32 p6eval ..STD_red/std.rb:26...
23:32 p6eval ..pugs: OUTPUT[*** ␤    Unexpected "@a"␤    expecting "=", context, ":" or "("␤    postfix op␤    at /tmp/1HLusRMsnQ line 1, column 4␤]
23:33 ruoso nobody seems to like the idea of "for" returning a list...
23:37 * ruoso implementing "Void method for ($code)" in Array in the meanwhile
23:39 pugs_svn r22091 | ruoso++ | [smop] implementing the test for the "for" operator
23:46 TimToady perl6: my @a = do { for 1..3 { $_ * 2 }}; say @a
23:46 p6eval pugs: OUTPUT[␤]
23:46 p6eval ..elf 22091: OUTPUT[Useless use of multiplication (*) in void context at (eval 119) line 4.␤␤]
23:46 p6eval ..rakudo 30693: OUTPUT[-1␤]
23:47 wknight8111 ...neither of those answers look right
23:47 TimToady well, at least that parses :)
23:48 TimToady you can't just use a statement where a term is expected
23:48 ruoso TimToady, but is there really a use to my @a = for?
23:48 ruoso I mean...
23:48 ruoso isn't that the use of "map"?
23:48 TimToady map is just another way to write the same thing
23:48 TimToady you'll note the args come in a different order
23:49 TimToady map is even more redundant with list comprehensions
23:49 meppl joined #perl6
23:50 ruoso I know that it will benefit from optimizations depending on the context...
23:50 ruoso but it's a shame that it needs to be optimized... IMHO...
23:51 TimToady I'd much rather keep the semantics of statement for and modifier fo the same
23:51 TimToady *for
23:52 TimToady and modifier for is essential for list comprehension syntax
23:52 TimToady which has to return its values
23:52 ruoso and turn the "modifier for" into a map, actually
23:53 TimToady they're all maps, really
23:53 ruoso but a for that doesn't return is simpler than a map
23:54 ruoso I'm arguing that we should keep at least one option that simply doesn't return any value
23:54 TimToady I know you're arguing that, and I'm ignoring you.  :)
23:54 ruoso he
23:54 ruoso :P
23:55 TimToady void context propagation has to happen anyway--I don't really consider it an optimizaiton
23:55 TimToady *tion
23:58 ruoso alright... so for is just a synonym for map... and both are evaluated lazily...
23:58 TimToady in list context...
23:59 ruoso void context causes eager evaluation...
23:59 TimToady void is considered a scalar context, which is not lazy

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

Perl 6 | Reference Documentation | Rakudo