|
2009 -- the year of November. <november-wiki.org> <github.com/viklund/november> <irclog.perlgeek.de/november-wiki> <nopaste.snit.ch> Set by moderator on 14 August 2009. |
|||
|
03:22
sri_kraih_ joined
06:39
szabgab joined
08:48
ihrd left
09:49
flip913 joined
|
|||
| flip913 | p6eval: say <1 2 3> | 09:58 | |
| doesn't work | |||
| I get an error 'cant open perl script ... syntax_hightlight' or something like that | 09:59 | ||
| @tell timtowtdi p6eval doesn't work currently | 10:00 | ||
| zarah | Consider it noted. | ||
|
10:08
mj41 joined
10:57
masak joined
11:37
wayland76 joined
12:19
ruoso joined
12:33
wayland76 joined
12:36
sri_kraih joined
12:39
wayland joined
13:00
flip913 joined
|
|||
| flip913 | masak: short question allowed? | 13:05 | |
| masak | flip913: sure. | 13:06 | |
| flip913 | I saw in use.perl.org/~masak/journal/ | ||
| zarah | flip913's link is also tinyurl.com/6csgre | ||
| flip913 | this line: $c.send_response(&app(%env)[2].Str) | ||
| masak | yes? | 13:07 | |
| flip913 | but .Str puts spaces between the elements of the list doesn't it? | ||
| masak | oh, er. | ||
| rakudo: say <a b c>.Str | |||
| flip913 | So ['<div>','<span'>] would end up with whitespace ... which changes the meaning a bit. | ||
| p6eval | rakudo 0d4fe0: OUTPUT«a b c» | ||
| masak | flip913: you're completely right. | ||
| thanks for that. | |||
| rakudo: say ~<a b c> | |||
| p6eval | rakudo 0d4fe0: OUTPUT«a b c» | ||
| masak | hm. | 13:08 | |
| rakudo: say [~] <a b c> | |||
| flip913 | Ain't there an attribute to .Str? | ||
| p6eval | rakudo 0d4fe0: OUTPUT«abc» | ||
| masak | that's probably what I want. | ||
| flip913 | And, is there a way for streaming output? | ||
| So I can send eg. javascript lines to update some progress information? | |||
| masak | flip913: can I attribute the fix to you in an edit to the blog post? | ||
| 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. | ||
| flip913 | Yes, that was me ;-) | ||
| masak | flip913: I'll call you whatever you want in the blog post. :) | ||
| 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. | ||
| wayland76 | flip913: Tell him you want to be called "O great and worshipful master" :) | ||
| flip913 | If not, how about looking at the elements, and if they're Callable, just run them? | ||
| masak | flip913: I'm not in a position where I want to just extent the protocol we have right now. | 13:11 | |
| flip913: also, I'm pretty sure Rack has some prior experience in this area. | |||
| I plan to ask them first. | |||
| flip913 | And, btw: | ||
| rakudo: my @a=1,2,3,[1,2,,,3], 4; say [~] @a; | 13:12 | ||
| p6eval | rakudo 0d4fe0: OUTPUT«1231 2 34» | ||
| flip913 | there are spaces again | ||
| 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» | ||
| flip913 | rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.Str(''); | ||
| p6eval | rakudo 0d4fe0: OUTPUT«too many arguments passed (2) - 1 param expectedin Main (/tmp/l5V3zSN7GF:2)» | ||
| masak | flip913: well, the elements of &app(%env)[2] should be Str, so... | 13:14 | |
| 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 | |
| And it works for .Str ... only the delimiter has to be removed. | |||
| rakudo: my @a=1,2,3,[1,2,,,3], 4; say ''.join(@a); | |||
| p6eval | rakudo 0d4fe0: OUTPUT«» | ||
| flip913 | rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.join(''); | 13:16 | |
| p6eval | rakudo 0d4fe0: OUTPUT«1231 2 34» | ||
| flip913 | Hmrpf ... | ||
| I'm just looking at aspn.activestate.com/ASPN/Mail/Mess...ge/2630896 | |||
| zarah | flip913's link is also tinyurl.com/mfjfn5 | ||
| flip913 | rakudo: my @a=1,2,3,[1,2,,,3], 4; say @a.join; | 13:17 | |
| p6eval | rakudo 0d4fe0: OUTPUT«1231 2 34» | ||
| masak | flip913: no, the Rack spec says they have to be Str. | ||
| flip913 | But, as I just mentioned, might not scale. | ||
| masak | at least I think it does. | 13:18 | |
| 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 | ||
| our current problem is not scalability, but speed in general. | |||
| flip913 | Sorry, had to answer somebody. | 13:30 | |
| masak | flip913: updated blog entry use.perl.org/~masak/journal/39475 and pushed a patch to Web.pm. thanks! | 13:31 | |
| zarah | masak's link is also tinyurl.com/ryoggf | ||
| flip913 | nopaste.snit.ch/17594 | 13:32 | |
| push is not entirely linear | 13:33 | ||
| I've seen some projects that had to try clever things, like stringify return values, and pushing them on arrays, and so on | 13:34 | ||
| ain't it possible to 'enhance' the Rack specification? Embrace, extend, ... as they say | 13:36 | ||
| 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'» | ||
| flip913 | ;-( aspn.activestate.com/ASPN/Mail/Mess...ge/2640847 | ||
| zarah | flip913's link is also tinyurl.com/mcglvt | ||
| 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 | |
| I consider the Rack spec to be something very stable. they hit 1.0 in February this year. | |||
| flip913 | Update: nopaste.snit.ch/17595 push nearly linear. | 13:44 | |
| Let's keep it at that, at least ATM. Thank you! | |||
|
13:47
sri_kraih_ joined
14:03
sri_kraih joined
17:13
sri_kraih joined
19:47
Tene joined
|
|||
| Tene forgot about this channel again... oops. | 19:47 | ||
|
20:56
flip913 joined
|
|||
| flip913 | @tell masak stone the cows - revert that last thing, I solved both problems. | 20:57 | |
| zarah | Consider it noted. | ||
| flip913 | @tell masak Does the Rack standard say "Array"? | 20:58 | |
| zarah | Consider it noted. | ||
| flip913 | @tell masak Or can it just be a list - possibly infinite? | ||
| zarah | Consider it noted. | ||
| 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. | ||
| flip913 | @tell masak then we just put a lazy list there - ie. something "does Iterable" or suchlike. | ||
| zarah | Consider it noted. | 21:00 | |
|
22:05
wayland76 joined
22:58
ihrd joined
23:10
ruoso joined
|
|||