|
Parrot 5.1.0 "Zombie Parrot" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC Set by moderator on 20 February 2013. |
|||
|
00:11
mtk joined
00:54
ctult_ joined
|
|||
| cotto | ~~ | 02:35 | |
|
02:49
kid51 joined
|
|||
| dalek | rrot: 28129d6 | rurban++ | config/gen/makefiles/root.in: [GH #933] Fix wrong blib rpath in installable_pdump Thanks to he32++ for detecting this |
03:11 | |
|
04:41
preflex_ joined
06:31
Liz joined
06:32
woolfy joined
06:43
Liz joined,
woolfy_ joined
07:03
woolfy joined,
Liz joined
07:05
Mike-PerlRecruiter_ joined
07:50
zby_home joined
|
|||
| Coke | (re: ops2c) - my take is that if we want a higher level language for this than PIR, use winxed. | 10:06 | |
| (but don't bother with it now because there's so much other crap to do) | 10:20 | ||
| moritz | wtf, using Socket.send, I get "Method 'seek' not implemented for type Socket" | 11:15 | |
| /* If we are writing to a r/w handle, advance the pointer in the | 11:19 | ||
| associated read-buffer since we're overwriting those characters. */ | |||
| Parrot_io_buffer_advance_position(interp, read_buffer, bytes_written); | |||
| maybe that's what causes it? | |||
| hm, no | 11:20 | ||
|
11:34
not_gerd joined
|
|||
| not_gerd | o/ | 11:34 | |
| moritz: the culprit is io_sync_buffers_for_write() | 11:35 | ||
| that's the wrong thing to do for IO objects like sockets where input and output are decoupled | |||
| moritz | so is that an architectural issue? | 11:43 | |
| not_gerd | yes - the semantics are wrong | 11:44 | |
| it blows up here because sockets actually can't support random access | 11:45 | ||
| pipes probably have the same issue | 11:46 | ||
| quick fix would be to return from the io_sync_buffers_* functions if the handle is of type Socket | 11:55 | ||
| a proper fix would need a new Handle method, overwritten in Socket | |||
| something like the isatty() method | 11:57 | ||
| or a sync method that is a noop in case of Socket PMCs | 11:58 | ||
| moritz | or maybe a "seekable" method | ||
| or that, yes | |||
| not_gerd | well, seekable and coupling of input/output channels is imo orthogonal | 11:59 | |
| no idea if that distinction matters in practice, but it would be 'the right thing' to do | 12:00 | ||
| moritz | I've opened github.com/parrot/parrot/issues/938 for this issue | ||
|
12:52
mtk joined
13:08
kid51 joined
|
|||
| dalek | kudo/nom: c255f1d | (Tobias Leich)++ | src/ (2 files): interpolation of e.g. regexes in arrays in regexes |
13:51 | |
|
14:21
Psyche^ joined
14:25
PacoAir joined
14:50
kid51_ joined
14:53
eternaleye left
14:54
eternaleye joined
|
|||
| dalek | p: 21a6b2c | (Arne SkjƦrholt)++ | src/ops/nqp_dyncall.ops: Fix braino in nqp_dyncall.ops. |
15:02 | |
|
15:04
kid51 joined
|
|||
| dalek | p: f03f15a | moritz++ | / (3 files): bump VERSIOn to 2013.02.1 turns out the native call support was mostly broken in 2013.02 |
15:15 | |
| kudo/nom: 952d407 | moritz++ | / (2 files): bump VERSION and NQP_REVISION to 2013.02.1 this gets us non-broken native call suport |
15:18 | ||
|
15:27
PacoAir_ joined
15:37
kid51_ joined
15:44
PacoAir joined
|
|||
| dalek | kudo/nom: ff2ceee | (Tobias Leich)++ | src/core/Cursor.pm: force regexes in array to match at pos 0 only |
15:55 | |
| cotto | ~~ | 16:53 | |
|
16:59
xcombelle joined
17:09
kid51_ joined
|
|||
| rurban | seeking on a socket? this makes no sense | 17:22 | |
| cotto | That seems to be the point. | 17:29 | |
| rurban: are you working on a patch? | 17:32 | ||
| rurban | no. the error is correct | 17:33 | |
| if someone wants to seek on a socket, he has to do the buffering by himself | |||
|
17:34
kid51 joined
|
|||
| rurban | socket.seek violates every unix principle | 17:34 | |
| cotto | moritz ran into it while using socket.send, which is a more traditional use case | 17:35 | |
| rurban | I implemented sockopts on a branch | ||
| cotto | socket.seek is obviously wrong | ||
| Hmm. The other 3 position-related socket vtable slots are noops. What about just making seek an noop? | 17:56 | ||
| *a noop | |||
| benabik | Where does writing to a socket end up calling seek? | 18:05 | |
| cotto | io_sync_buffers_for_write | 18:07 | |
|
18:07
not_gerd joined
|
|||
| not_gerd | o/ | 18:07 | |
| cotto | hio not_gerd | ||
| I was hoping you'd drop by. | 18:08 | ||
| not_gerd | ordinary read/write can call io_sync_buffers_for_read/write which in turn call seek | ||
| benabik | _read doesn't call seek | ||
| not_gerd | (which of course doesn't work for sockets/pipes) | ||
| it's still wrong to sync input and output if they are decoupled | 18:09 | ||
| we're trying to sync channels which shouldn't be sync'd | |||
| that one of these functions calls seek on IO objects which don't support the operation is only a side effect | 18:10 | ||
| cotto | I'm playing with adding a PIO_VF_SEEKABLE flag | ||
| benabik | I don't think playing with seek is the solution. | ||
| I think we want a flag marking that the I/O is tied together. | |||
| And set it to false for pipes and sockets | |||
| not_gerd | my idea was making the sync functions polymorphic (eg by adding them to IO_VTABLE) and just make them a noop for sockets and pipes | 18:11 | |
| (which I already mentioned in a comment to the ticket) | |||
| cotto | 3 out of 4 position-related vtable slots are already noops for socket | ||
| benabik | cotto: I agree with not_gerd. Problem is higher. Shouldn't be syncing the buffers in the first place. | 18:12 | |
| cotto | benabik: sure. The questions is which level should it be fixed at. | ||
| benabik | not_gerd: I think a simple yes/no flag is better. I can't think of any other behaviors we want. | 18:13 | |
| cotto | wrong fix, but seems to work if we can't come up with something better: gist.github.com/cotto/5020729 | ||
| benabik | Wait... | ||
|
18:13
zby_home joined
|
|||
| benabik | Why does the socket have a write buffer? | 18:14 | |
| It doesn't set PIO_VF_DEFAULT_WRITE_BUF | |||
| cotto | not_gerd: do you have the tuits to put together a patch that makes sync a proper polymorphic function? | 18:21 | |
| not_gerd | I can look into that, but probably not today | 18:22 | |
| cotto | ok | ||
| benabik | Condo: I'm worried that making seek a no op will just hide getting the data wrong because of the offers. | 18:25 | |
| *buffers | |||
| *cotto | |||
| not_gerd | benabik: the idea is to add vtable entries for the syn functions and make these noops, not seek | 18:26 | |
| a flag PIO_VF_SYNC_BUFFERS or somesuch as you suggested would also work | |||
| condo | Now look what you've done. | 18:27 | |
| cotto | not_gerd & benabik: I like that better. moritz++ says that the fix isn't urgent so it won't hurt anything if it doesn't happen today. | 18:29 | |
| benabik | Still curious how the socket ends up with a write buffer. | 18:31 | |
| not_gerd too | |||
| cotto | looks like the buffers come from the Socket PMC's inheritance from Handle | 18:47 | |
| benabik | cotto: It should have a write_buffer attribute, but it shouldn't get initialized. | 18:50 | |
| Or rather initialized to not null. | |||
| cotto | It is initialized to null. | 18:51 | |
| not_gerd | cotto: and as long as PIO_VF_DEFAULT_WRITE_BUF is not set, it should remain so | 18:55 | |
| benabik | Oh. sync_for_write is conditioned on there being a _read_ buffer. | ||
| Nvm. | |||
| not_gerd made the same thinko | 18:56 | ||
|
19:02
contingencyplan joined
|
|||
| not_gerd | what should the flag be called: SYNC_BUFFERS, SYNC_RW or SYNC_IO | 19:02 | |
| (likes SYNC_IO best) | 19:03 | ||
| cotto | Votes will be accepted in the form of a working patch. | 19:06 | |
|
19:08
Mike-PerlRecruiter_ joined
|
|||
| not_gerd | cotto: you already did the path, just replace SEEKABLE with SYNC_IO | 19:11 | |
| ^patch | |||
| cotto | not_gerd: you don't think that sync should be abstracted into its own VTABLE slot? | ||
| not_gerd | cotto: I think userhandle bypasses the vtable completely, ie only filehandle needs synchronization | 19:13 | |
| adding vtable slots which will never be used probably doesn't make much sense | |||
| cotto | not_gerd: not stringhandle too? | 19:14 | |
| not_gerd | stringhandle should get it as well, yes | ||
| I would be surprised if stringhandles are buffered, though | 19:15 | ||
| so the codepath will probably never be triggered | |||
| but your patch already does that | |||
| cotto | yes | 19:16 | |
| not_gerd | just rename the flag and change the comment to something like "Input and output channels need to be kept in sync, which affects buffering" and you should be done | ||
| cotto | not_gerd: just verifying w/ moritz | ||
|
19:24
benabik joined
|
|||
| dalek | rrot/smarter-io-sync: 10d8851 | cotto++ | / (4 files): [io] only sync buffers for IO types where it makes sense |
19:27 | |
| moritz | cotto: patching file src/io/utilities.c | 19:28 | |
| patch unexpectedly ends in middle of line | |||
| Hunk #2 succeeded at 548 with fuzz 1. | |||
| cotto | moritz: try the branch | 19:29 | |
| It's the 21st century. I should be doing something better than gisting diffs. | 19:30 | ||
| moritz | thanks, trying... | 19:37 | |
| (slow machine, will take some time to rebuild all of parrot/nqp/rakudo/panda/Net::IRC | 19:38 | ||
| cotto | You can also cheat and just install an updated Parrot. | ||
| moritz | no, I can't | 19:45 | |
| because my rakudo used parrot 4.10 | |||
| and that has different installation paths | 19:46 | ||
| cotto | ok | 19:47 | |
| moritz | cotto: that branch seems to work | 20:20 | |
| cotto | Is that what ilbot6 is using? | ||
| moritz | yes | ||
| cotto | nice | ||
| I'll give NQP and Rakudo's tests a spin and merge if it looks like nothing broke. | 20:21 | ||
| not_gerd | cotto++ | 20:27 | |
| bye, #parrot | |||
|
20:27
not_gerd left
|
|||
| dalek | p: b752c14 | jnthn++ | src/QAST/Operations.nqp: Fix thinkos. |
20:38 | |
| p: 8d7d9be | jnthn++ | src/stage0/ (9 files): Bootstrap update thanks to thinkos. |
|||
| p: 8d1f7f6 | jnthn++ | src/ (4 files): Replace some more pir:: with nqp::. |
|||
|
21:08
benabik joined
21:19
Khisanth joined
|
|||
| dalek | kudo/nom: cfee628 | moritz++ | src/core/Mu.pm: switch type name gistification from Type() to (Type) |
21:26 | |
|
21:55
perlite_ joined
22:47
PacoAir joined
|
|||
| dalek | p: 30d5020 | jnthn++ | src/ops/nqp.ops: Avoid returning a C NULL. |
22:54 | |
| p: cd22fa9 | jnthn++ | src/NQP/Actions.pm: Resolve a bunch of package names at compile time. Cuts down on code output rather significantly in certain cases, of note in QAST::Compiler. |
|||
|
23:54
kid51 joined
|
|||