Camelia, the Perl 6 bug

IRC log for #parrot, 2013-02-23

Parrot | source cross referenced

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

All times shown according to UTC.

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

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

Parrot | source cross referenced