Camelia, the Perl 6 bug

IRC log for #november-wiki, 2009-08-19

| Channels | #november-wiki index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
03:22 sri_kraih_ joined #november-wiki
06:39 szabgab joined #november-wiki
08:48 ihrd left #november-wiki
09:49 flip913 joined #november-wiki
09:58 flip913 p6eval: say <1 2 3>
09:58 flip913 doesn't work
09:59 flip913 I get an error 'cant open perl script ... syntax_hightlight' or something like that
10:00 flip913 @tell timtowtdi p6eval doesn't work currently
10:00 zarah Consider it noted.
10:08 mj41 joined #november-wiki
10:57 masak joined #november-wiki
11:37 wayland76 joined #november-wiki
12:19 ruoso joined #november-wiki
12:33 wayland76 joined #november-wiki
12:36 sri_kraih joined #november-wiki
12:39 wayland joined #november-wiki
13:00 flip913 joined #november-wiki
13:05 flip913 masak: short question allowed?
13:06 masak flip913: sure.
13:06 flip913 I saw in http://use.perl.org/~masak/journal/
13:06 zarah flip913's link is also http://tinyurl.com/6csgre
13:06 flip913 this line:             $c.send_response(&app(%env)[2].Str)
13:07 masak yes?
13:07 flip913 but .Str puts spaces between the elements of the list doesn't it?
13:07 masak oh, er.
13:07 masak rakudo: say <a b c>.Str
13:07 flip913 So ['<div>','<span'>] would end up with whitespace ... which changes the meaning a bit.
13:07 p6eval rakudo 0d4fe0: OUTPUT«a b c␤»
13:07 masak flip913: you're completely right.
13:07 masak thanks for that.
13:07 masak rakudo: say ~<a b c>
13:07 p6eval rakudo 0d4fe0: OUTPUT«a b c␤»
13:08 masak hm.
13:08 masak rakudo: say [~] <a b c>
13:08 flip913 Ain't there an attribute to .Str?
13:08 p6eval rakudo 0d4fe0: OUTPUT«abc␤»
13:08 masak that's probably what I want.
13:08 flip913 And, is there a way for streaming output?
13:08 flip913 So I can send eg. javascript lines to update some progress information?
13:08 masak flip913: can I attribute the fix to you in an edit to the blog post?
13:09 flip913 Of course. But 913 is just some random number for uniqueness ...
13:09 masak flip913: I got the streaming output question during my YAPC talk as well.
13:09 flip913 Yes, that was me ;-)
13:09 masak flip913: I'll call you whatever you want in the blog post. :)
13:10 flip913 So: do you have any plans for the other list elements, after the array ref?
13:10 masak flip913: I'm planning to field your question to #rack when I have the tuits.
13:10 wayland76 flip913: Tell him you want to be called "O great and worshipful master" :)
13:10 flip913 If not, how about looking at the elements, and if they're Callable, just run them?
13:11 masak flip913: I'm not in a position where I want to just extent the protocol we have right now.
13:11 masak flip913: also, I'm pretty sure Rack has some prior experience in this area.
13:11 masak I plan to ask them first.
13:11 flip913 And, btw:
13:12 flip913 rakudo: my @a=1,2,3,[1,2,,,3], 4; say  [~] @a;
13:12 p6eval rakudo 0d4fe0: OUTPUT«1231 2 34␤»
13:12 flip913 there are spaces again
13:13 flip913 rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.Str;
13:13 p6eval rakudo 0d4fe0: OUTPUT«1 2 3 1 2 3 4␤»
13:13 flip913 rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.Str('');
13:13 p6eval rakudo 0d4fe0: OUTPUT«too many arguments passed (2) - 1 param expected␤in Main (/tmp/l5V3zSN7GF:2)␤»
13:14 masak flip913: well, the elements of &app(%env)[2] should be Str, so...
13:15 flip913 Well, but appending to a single array might be bad for performance ... if some functions just return their own arrays, and I just push their reference onto my output array, that scales better, I think.
13:15 flip913 And it works for .Str ... only the delimiter has to be removed.
13:15 flip913 rakudo: my @a=1,2,3,[1,2,,,3], 4; say ''.join(@a);
13:15 p6eval rakudo 0d4fe0: OUTPUT«␤»
13:16 flip913 rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.join('');
13:16 p6eval rakudo 0d4fe0: OUTPUT«1231 2 34␤»
13:16 flip913 Hmrpf ...
13:16 flip913 I'm just looking at http://aspn.activestate.com/ASPN/M​ail/Message/perl6-language/2630896
13:16 zarah flip913's link is also http://tinyurl.com/mfjfn5
13:17 flip913 rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.join;
13:17 p6eval rakudo 0d4fe0: OUTPUT«1231 2 34␤»
13:17 masak flip913: no, the Rack spec says they have to be Str.
13:17 flip913 But, as I just mentioned, might not scale.
13:18 masak at least I think it does.
13:22 masak I agree about the need to think about what might and might not scale, but I don't think we should try and fight invisible enemies at this stage.
13:22 masak our current problem is not scalability, but speed in general.
13:30 flip913 Sorry, had to answer somebody.
13:31 masak flip913: updated blog entry http://use.perl.org/~masak/journal/39475 and pushed a patch to Web.pm. thanks!
13:31 zarah masak's link is also http://tinyurl.com/ryoggf
13:32 flip913 http://nopaste.snit.ch/17594
13:33 flip913 push is not entirely linear
13:34 flip913 I've seen some projects that had to try clever things, like stringify return values, and pushing them on arrays, and so on
13:36 flip913 ain't it possible to 'enhance' the Rack specification? Embrace, extend, ... as they say
13:37 flip913 rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.cat;
13:37 p6eval rakudo 0d4fe0: OUTPUT«Method 'cat' not found for invocant of class 'Perl6Array'␤»
13:37 flip913 ;-( http://aspn.activestate.com/ASPN/M​ail/Message/perl6-language/2640847
13:37 zarah flip913's link is also http://tinyurl.com/mcglvt
13:41 masak flip913: of course it's possible to extend the Rack spec. my point is just that I don't think it's time for that just yet.
13:41 masak I consider the Rack spec to be something very stable. they hit 1.0 in February this year.
13:44 flip913 Update: http://nopaste.snit.ch/17595 push nearly linear.
13:44 flip913 Let's keep it at that, at least ATM. Thank you!
13:47 sri_kraih_ joined #november-wiki
14:03 sri_kraih joined #november-wiki
17:13 sri_kraih joined #november-wiki
19:47 Tene joined #november-wiki
19:47 * Tene forgot about this channel again... oops.
20:56 flip913 joined #november-wiki
20:57 flip913 @tell masak stone the cows - revert that last thing, I solved both problems.
20:57 zarah Consider it noted.
20:58 flip913 @tell masak Does the Rack standard say "Array"?
20:58 zarah Consider it noted.
20:58 flip913 @tell masak Or can it just be a list - possibly infinite?
20:58 zarah Consider it noted.
20:59 flip913 @tell masak then just pass the list to sendResponse(), and some levels down some code has to iterate over the list and send each element
20:59 zarah Consider it noted.
20:59 flip913 @tell masak then we just put a lazy list there - ie. something "does Iterable" or suchlike.
21:00 zarah Consider it noted.
22:05 wayland76 joined #november-wiki
22:58 ihrd joined #november-wiki
23:10 ruoso joined #november-wiki

| Channels | #november-wiki index | Today | | Search | Google Search | Plain-Text | summary