Parrot 4.5.0 "Buff-faced Pygmy Parrot" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 26 June 2012.
00:02 whiteknight joined
whiteknight good evening, #parrot 00:02
00:06 benabik_ joined
whiteknight AHA! 00:32
I got messed up by a comment
benabik ?
whiteknight The comment in the socket recv code is: /* This must stay ASCII to make Rakudo and UTF-8 work for now */
but then it creates a string with a platform default encoding, which is utf8 on linux 00:33
so, yeah
benabik hah.
whiteknight so I did what the comment says, because I thought that's what Rakudo needed
whiteknight says the F word
FileHandle defaults to Parrot_platform_encoding_ptr, and Socket defaults to Parrot_default_encoding_ptr 00:39
default_encoding_ptr appears to be an alias for ascii 00:41
dalek rrot/whiteknight/io_cleanup1: 4408cbb | Whiteknight++ | src/ (5 files):
Make sure Socket defaults to use the Parrot_default_encoding_ptr, like it does in master. Refactor some of the encoding logic into Handle to avoid duplication. Socket now has settable encodings. I'm still not happy with the way we store the encoding name as a string and look it up for every IO request.
00:52
whiteknight I think that might fix the Rakudo issue
...nope 01:23
I have no idea how this works in master
wait 01:25
wait wait wait
benabik waits
whiteknight master is broken to an absurd degree 01:26
Socket.recv creates a new string with ASCII encoding, then reads raw bytes into the string buffer and never scans it
so we have an ASCII-encoded string, with non-ascii data
that's how master works.
it sets a stupid default encoding, then violates all our guarantees about encodings and jams whatever data into the buffer 01:27
benabik set it to binary and forgetaboutit?
whiteknight I'm *this* close
Okay, here's my plan:
I'm going to turn off my computer. I'm going to go to bed. If the blood vessels in my head don't pop by tomorrow morning, I'll fix it 01:28
that's a big IF at this point
I really need a new hobby. I'm thinking about alcoholism. 01:29
benabik I suggest a nice honey bourbon on the rocks. :-)
01:38 rurban joined 01:53 contingencyplan joined
dukeleto msg jashwanth the select array is an array with 0's and 1's. for example, if S=(1,0,1), that means "compute the first and third eigenvectors, but not the second" 03:52
aloha OK. I'll deliver the message.
dukeleto whiteknight: a fine 12 year scotch helped me make PL/Parrot work many a fortnight ago. You might try that. 03:53
04:01 dngor joined 05:35 kuku joined
dalek d_parrot: 7099667 | (Bart Wiegmans)++ | / (3 files):
With header reading now working CGI handling is almost complete
06:32
06:39 dukeleto joined 07:06 NotFound_b joined 07:10 brrt joined
dalek kudo/nom: ed46bdb | pmichaud++ | src/ (2 files):
METAOP_REDUCE -> METAOP_REDUCE_LEFT
07:22
kudo/nom: 46dacb9 | pmichaud++ | src/Perl6/Actions.pm:
Refactor determination of reduction type for base operator.
kudo/nom: 433956d | pmichaud++ | src/ (2 files):
Refactor to pass reduction type to CROSS and ZIP metaoperators.
kudo/nom: b639af6 | pmichaud++ | src/core/metaops.pm:
Update METAOP_ZIP to honor associativity of the base operator.
kudo/nom: 5e3dfe9 | pmichaud++ | src/core/metaops.pm:
Update METAOP_CROSS to honor associativity of the base operator.
07:25 particle1 joined
moritz msg whiteknight re encoding trouble in recv, it seems that Socket already has an 'encoding' attribute, though unused. If you provide a setter and getter, I'm fine with rakudo setting the encoding on the socket explicitly, and recv using it. Much saner than master's behavior 07:35
aloha OK. I'll deliver the message.
07:40 autark joined
dalek kudo/nom: 88a9d69 | moritz++ | / (2 files):
add :enc/:encoding support to &open
08:06
08:09 lucian joined 08:53 dukeleto joined 09:05 kjs joined 09:27 dukeleto joined
dalek : d0801b5 | kjs++ | / (6 files):
switch back to c-m0. improve naming of union members.
10:24
10:30 JimmyZ joined 11:12 NotFound_b joined
dalek kudo/io: cc780c2 | moritz++ | src/core/IO.pm:
move file tests to IO::FileTestable
11:22
12:53 dukeleto joined 12:57 PacoAir joined, JimmyZ_ joined 12:59 whiteknight_ joined 13:10 Psyche^ joined
whiteknight_ good morning, #parrot 13:15
13:16 particle joined 13:17 bluescreen joined
JimmyZ morning 13:18
moritz \\o whiteknight_ 13:19
whiteknight_ hello moritz
moritz whiteknight_: there's a msg waiting for you if you fix your nick :-)
whiteknight_ ...there appears to be a whiteknight online already 13:20
apparently I didn't turn off my laptop last night
moritz if both of them start to contribute to parrot, I'd be quite happy :-)
irclog.perlgeek.de/parrot/2012-06-27#i_5761633 13:21
whiteknight_ moritz: I think I've figured out the issue with the encoding nonsense with sockets last night, after I put in a fix that did not work
yes, I added in a getter/setter for Socket encoding last night, though it's untested
brrt \\o whiteknight 13:27
whiteknight, can we privmsg about the project today? 13:28
whiteknight_ yes sir 14:01
brrt very well 14:10
14:15 davidfetter joined
NotFound whiteknight: (after reading the backlog) And that is just one of the remainings of the abuses of string internals from every other part of parrot. 14:51
whiteknight_ NotFound: true. But it's one more good reason to rewrite this subsystem 14:53
NotFound About the "platform" encoding: this is just a quick way some things work a bit better than defaulting to ascii. Hardy a general way of using sockets.
I don''t think any network protocol defaults to "whatever encoding the other end uses".
I think "binary" will be a better default. 14:54
whiteknight_ yes, binary is probably the best default here, but that would break many tests 14:55
NotFound I think the purpose of such tests is to check the basic functionality, not the gory minor details. So if rakudo doesn't object I think it will be better to fix the tests. 14:56
brrt chiming in a bit 14:57
from apache, i read and write all data in binary
i plan to do something intelligent, like pre-encoding strings to utf8 14:58
but right now, binary
NotFound Of course, for a now I'll recommend all users to always set the desired encoding, never trust the default. 14:59
brrt: I think that in HTTP you must check the headers before trying to be smart. 15:00
whiteknight_ NotFound: more importantly, I added a method to Socket so we can specify encoding now. in master I don't think you can do that 15:01
or can't do it reliably
so now it is possible to set some other default and tell the socket to use something else
brrt NotFound: true, but not everybody sends the headers 15:02
NotFound Maybe we should also add the posibility of setting the encoding in the open methods.
brrt i.e., next to nobody sends headers
whiteknight_ NotFound: that would be interesting
brrt with that, we would almost be perl 15:03
... open would - by the way - be an awesome name for the setup function of the apache input handle
brrt wonders why he did not think of that 15:04
it is literally brilliant 15:05
whiteknight_ it's so much less descriptive than handle.prepare_the_apache_input_handle_for_reading_and_stuff()
brrt because, expected
NotFound brrt: but you shuld read them just in case. If you set uft8 before being sure, you'll get exceptions when somenone send latin-1
And there is that infamous rule about being forgiving about what you accept. 15:08
whiteknight_ I think I want to default socket to use utf-8
I think that makes the most sense
brrt is not sure
NotFound whiteknight_: I thin it will be better to default to always-wrong encoding, forcing users to set a valid one. 15:09
whiteknight_ defeats the purpose of having a default
NotFound Yeah.
That's the point.
There is no sane default.
whiteknight_ The problem is, I want Rakudo to keep working on this branch. That means I need to pick a default that Rakudo expects
NotFound Great idea, better than the "always-wrong" create the "spanish-inquisition" encoding. 15:10
So nobody will expect it.
whiteknight_ in later refactors (and there will be MANY) we can introduce more breaking changes 15:12
NotFound Well, if the idea is to be rakudo-friendly better ask the rakudo folks what they want.
whiteknight_ They want their spectest to pass 15:13
and that, I think, will require utf-8
brrt the more i think about it
the more i'm pretty sure you want binary
binary never 'breaks'
receivers can inspect it 15:14
NotFound Yeah, but they usually don't object to change their specs, or the tests, when there is a good reason.
whiteknight_ NotFound: true
15:14 dmalcolm joined
NotFound And they can switch to always set their own default *before" merging the branch. 15:14
brrt automagically interpreting everything as utf-8 means you will get socket errors that are encoding errors
whiteknight_ it's not automagic, it's just a default 15:15
you can do socket.encoding("ascii") or whatever you want later
NotFound whiteknight_: but a default that must be almost always be changed before reading anything is not a reasonable default. 15:16
whiteknight_ is utf8 going to need almost always changing?
or is binary going to need almost always changing?
NotFound whiteknight_: yes, reading utf8 can throw exceptions.
brrt both will
(the changing, not the exceptions) 15:17
whiteknight_ okay, so binary then?
NotFound whiteknight_: reading binary you can inspect and transcode
brrt yeah, that was my point as well :-) 15:18
NotFound Unless rakudo strongly opposes, I'll go for binary.
moritz ok, policy question 15:19
when should a string be returned, and when a bytebuffer?
whiteknight_: I've patched rakudo locally to call .encoding('utf8') on the socket. Now the error message I get is "Lossy conversion to single byte encoding" 15:20
NotFound moritz: I think reading into a BB must be a different method. 15:21
And that reading should bypass the encoding.
moritz then I'd like to mention that a recv_bytes would be a good addition 15:22
15:25 alester joined
NotFound I'm thinking about writing a pamphlet about the risks of Test Driven Development "Tweaking the internals of all subsystems just to pass one test" 15:31
moritz whiteknight_: (I get that error while sending, fwiw) 15:32
whiteknight_ moritz: I'll look at it 15:33
moritz: I suspect it's going to be similar
NotFound Lossy conversion to utf8? That shouldn't be possible.
moritz NotFound: and utf-8 isn't single-byte either
whiteknight_ I'll play with it tonight 15:34
15:39 dukeleto joined
moritz maybe my rakudo patch was wrong, but it's rather simple, so I would surprised if it were wrong 15:40
whiteknight_ I'll have to double-check some things. The encoding wrongness of sockets is pretty deeply ingrained in the code
dalek kudo/parrot-iocleanup1: d0dc2d3 | moritz++ | src/core/IO/Socket/INET.pm:
explicitly set encoding on sockets
moritz anyway, here's the patch if you want to try it 15:41
whiteknight_ thanks
15:43 jashwanth joined
benabik ~~ 15:50
Hm. So in my Winxed file, I have a class PACT.Packfile.Constant.Key... And inside it, I want to refer to parrot's Key class. How do I do this? 15:55
whiteknight_ var k = new ['Key'] 15:56
at least, I think that will do it
benabik What about inside a multi? I was going to put the Key to Key conversion code in a constructor... 15:57
whiteknight_ you're playing with fire
:)
benabik Well, yes.
benabik is pondering just having a var multi and using a switch statement.
whiteknight_ I think your custom class will need to be fully-qualified 15:58
so in MMD you'll use "Key" and PACT.Packfile.Constant.Key
benabik multi('_', 'Key') seems to work. 16:00
16:01 davidfetter joined 16:04 brrt left 16:05 kjs joined
whiteknight_ okay, good enough 16:05
SHIP IT
kjs hello #parrot 16:11
was there no #ps yesterday? 16:12
whiteknight_ was there? 16:14
Is today wednesday?
benabik yeah
whiteknight_ hm. fail
benabik Okay. I think I'm parsing a packfile into a PACT.Packfile... 16:44
Maybe I should write some kind of output.
whiteknight_ yes, output is good 16:52
16:55 bacek_at_work joined 16:57 tuxit joined 17:47 contingencyplan joined, davidfetter joined 17:49 dukeleto joined 17:58 lucian joined
rurban There were two reports at #ps yesterday. I missed it also 18:27
18:28 rurban left 18:47 kjs joined 19:02 brrt joined 19:05 darbelo joined 19:07 rurban joined
dalek : 2eaba0f | kjs++ | src/ (4 files):
implement function call parameter/argument checking.
19:21
d_parrot: e1f5838 | (Bart Wiegmans)++ | pudding/Server.pm:
give a server name, which hides a useless warning
19:23 benabik joined 19:32 bluescreen joined 19:40 brrt left 19:44 birdwindupbird joined 19:50 rich joined 20:04 brrt joined 20:14 brrt joined 20:22 brrt1 joined 20:27 bluescreen joined
brrt1 evalbot 20:33
brrt evalbot: help
20:36 ilbot2 joined
moderator Parrot 4.5.0 "Buff-faced Pygmy Parrot" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
brrt whom may i pester with this? 20:41
aloha: help nopaste
aloha brrt: I don't know anything about 'nopaste'.
brrt i have winxed crashing rather hardly on the loading of nqp 20:44
gist.github.com/3006750
with backtrace :-) 20:45
20:46 bluescreen joined 20:55 lucian joined 20:57 kjs joined
dalek : c81a12c | kjs++ | src/semcheck.c:
improve var naming. add checks for too many/few arguments.
20:58
: 7b779ae | kjs++ | src/semcheck.c:
fix checking boolean expressions.
21:02
21:14 brrt joined
benabik Hm. 21:15
dalek CT: 0101a43 | benabik++ | src/packfile/ (8 files):
Packfile: Start from a clean slate

While I'll refer back to whiteknight's design, it's easier for me to start from scratch than adapt what's here already.
21:16
CT: 7326503 | benabik++ | src/disasm.winxed:
diasm.winxed: Output multi signatures

Very hacky way of doing it, but gives enough information to figure out what's going on.
CT: e6e2db2 | benabik++ | setup.winxed:
setup.winxed: refactor adding compilation steps
CT: 63c9bcb | benabik++ | README.mkd:
Update README

Information on directory structure and compilation
CT: 869a191 | benabik++ | / (2 files):
Add PACT.Packfile

This is a basic framework and is likely to be expanded as it gets used.
CT: 3db666b | benabik++ | pact/packfile.winxed:
Revision of Packfile classes
CT: bc74082 | benabik++ | pact/packfile.winxed:
PACT.Packfile.Constant: add constructors
CT: 0751553 | benabik++ | src/disasm.winxed:
disasm: read packfile into Packfile classes
benabik I just realized I hadn't been pushing code. So there's going to be another large dump or two today...
dalek : 7a77d4d | kjs++ | src/ (2 files):
cleanups. remove braces when there's only 1 statement.
21:23
: b452fa2 | kjs++ | src/ (2 files):
write instructions to a file a.m1 to use INS infrastructure.
21:38
d_parrot: 8d02484 | (Bart Wiegmans)++ | / (6 files):
Added test for echo handler, see if it keeps behaviong correctly, and shuffled apache.winxed a bit in non-interesting ways
21:46
: a6a5c43 | kjs++ | src/ (3 files):
write instr nodes to a file now as well. (a.m1)
21:52
CT: bfaf859 | benabik++ | pact/packfile.winxed:
PACT.Packfile: more initializers
21:55
CT: 7adb0fd | benabik++ | src/disasm.winxed:
disasm: Use initializers and shorter syntax

Winxed (experimentally) allows :type variable(arg) for var variable = new type(arg). It seems far more readable.
CT: 249be8a | benabik++ | / (2 files):
PACT.Packfile.Constant.Key: init from Key

Add a constructor that understands native keys and use it when disassembling.
CT: e59ad14 | benabik++ | src/disasm.winxed:
disasm: Remove unneeded function.

I was referring to it when writing parse_arg, but now that's mostly done.
CT: 394337d | benabik++ | / (2 files):
PACT.Packfile.*: Add __dump methods

This lets me use _dumper to see if I'm building what I think I'm building. Of course, I'm not...
CT: b3a2d36 | benabik++ | src/disasm.winxed:
disasm: Remove extra annotations

Since we check annotations before updating the current sub
  (since the sub needs to add all the active annotations anyway),
remove useless annotations from the end of the old sub.
CT: a8c4892 | benabik++ | src/disasm.winxed:
disasm: Add active annotations to every sub

Since annotations are scoped by bytecode index, they remain active across subroutine boundries.
CT: b0552dd | benabik++ | src/disasm.winxed:
diasm: Add opcodes to subs.

This is much better than parsing everything and then ignoring the result.
CT: 91b8942 | benabik++ | src/disasm.winxed:
disasm: Save PCC arrays in PCC ops

Forgot to add them to the Op before using them to parse the other arguments.
21:59 Liz joined
dalek : 39fa3ef | kjs++ | src/ (4 files):
more preparations to move to instr node generation.
22:27
whiteknight yeah, I left my computer on all day 22:30
good afternoon, #parrot
benabik++ 22:35
okay, I think if I set Socket to use a binary encoding by default, it *should* fix the one rakudo issue 22:37
*should*
hmm, I realize that I should probably be building parrot with --optimize 22:41
at least, I realize it now
actually, I probably don't need to rebuild rakudo each time 22:44