Camelia, the Perl 6 bug

IRC log for #november-wiki, 2009-06-06

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

All times shown according to UTC.

Time Nick Message
05:40 ihrd joined #november-wiki
05:40 ihrd left #november-wiki
06:39 viklund joined #november-wiki
07:08 viklund joined #november-wiki
08:28 viklund @tell masak should the form decoding really take place in HTTP::Daeom::ClientConn?
08:28 zarah Consider it noted.
12:01 viklund_ bah, I don't understand this
12:01 viklund_ &lunch
12:03 masak joined #november-wiki
12:03 viklund_ masak: I'm investigating that unicode thingy
12:03 masak ok, nice.
12:03 zarah masak: You have new messages. Write '/msg zarah @messages' to read them.
12:03 masak @messages
12:03 zarah masak: 3 h 35 m 44 s ago, viklund said should the form decoding really take place in HTTP::Daeom::ClientConn?
12:04 masak um. no, probably not.
12:04 masak are we using that? I thought we were still on Apache.
12:04 viklund_ masak: that's unimportant right now anyway, so is my latest comment on the issue
12:04 masak ok. :)
12:04 * masak reads the backlog, so he can ignore it
12:05 viklund_ I've written a small script that's running localy on my apache that echoes the result back to the webpage
12:05 viklund_ (in perl6)
12:06 viklund_ when I run that, the unicode smiley (☺) gets encoded like this: "%26%239786%3B"
12:06 masak that doesn't look right.
12:06 viklund_ which translates to "☺"
12:06 viklund_ which is very good, because that works!!
12:07 masak oh, it does? great!
12:07 viklund_ but, when I do the same thing in november (I'm saving everything from parse_params in CGI.pm) the smiley gets encoded as: %E2%98%BA
12:07 masak what do you mean , 'translates'?
12:07 viklund_ unescape
12:08 viklund_ %26 => & (you know chr(26))
12:08 masak rakudo: say chr( :16<26> )
12:08 p6eval rakudo fb2fd4: OUTPUT«&␤»
12:08 masak oh, it's an entity?
12:08 viklund_ yep
12:08 masak rakudo: say chr( :16<3b> )
12:08 viklund_ but CGI.pm gets something else for some reason
12:08 p6eval rakudo fb2fd4: OUTPUT«;␤»
12:09 masak rakudo: say :16<239786>
12:09 p6eval rakudo fb2fd4: OUTPUT«2332550␤»
12:09 viklund_ rakudo: say chr( :16($_)) for <E2 98 BA>
12:09 p6eval rakudo fb2fd4: OUTPUT«â␤˜␤º␤»
12:09 masak I'm confused.
12:09 masak I don't think that's a real entity.
12:09 viklund_ about what?
12:09 viklund_ you don't think  "&#9786;" is a real entety?
12:09 masak you're supposed to _name_ the entity, not encode it between the '&' and the ';'
12:10 masak viklund_: yes, I do.
12:10 masak oh, now I see how it works.
12:10 masak nevermind.
12:10 viklund_ but as I said, CGI.pm sees " %E2%98%BA"
12:11 viklund_ (without the space)
12:11 viklund_ which I believe is the byte sequence of the smiley
12:12 viklund_ very strange...
12:12 masak yes.
12:12 masak where does it turn from an entity into bytes?
12:13 masak that, ISTR, was the question I got stuck at last time we investigated this.
12:13 masak our best guess was that Apache was trying to do us a favour.
12:13 viklund_ but since I have a script running on apache that actually does the right thing
12:13 masak right.
12:13 viklund_ (the same apache instance)
12:14 masak so what can it be, then?
12:14 viklund_ it is probably something we can fix somehow
12:14 viklund_ whatever
12:14 viklund_ I'm going to look into this more tonight, now I need to go and have lunch
12:14 viklund_ I'm going to gist the script where it worked
12:15 masak goodie.
12:15 viklund_ http://gist.github.com/124830
12:16 viklund_ Next step is to transfer the exact html from the edit-page to that script
12:16 viklund_ lunch &
12:30 masak viklund_: you know what we should do? ask on PerlMonks!
12:58 PerlPilot joined #november-wiki
14:43 ruoso joined #november-wiki
15:25 masak joined #november-wiki
16:05 viklund masak: maybe ask on perlmonks later, we need to do some more tests first ;)
16:06 masak agreed.
16:06 viklund do heredocs work in p6?
16:06 masak in p6 yes, in Rakudo no. :/
16:07 viklund attans
16:07 masak indeed.
16:07 viklund I'll do a multiline string instead
16:09 viklund this bug bugs me ;(
16:10 masak being passionate about bugs is often very useful.
16:11 viklund yes
16:32 viklund this is getting... ehm, stranger
16:33 viklund the test-scripts that works have http-headers that specify encoding iso-8859-1, but the page that doesn't work has encoding utf8
16:33 viklund both extra-specify utf8 in the html head (via a meta tag)
16:34 viklund Alva wokeup
16:42 viklund Ha! That's the bug
16:42 viklund if we start sending ascii instead of utf8 posting utf8 will start working!
16:43 viklund or we try to find out how to parse it
16:43 viklund (first option is easier)
16:43 viklund masak?
16:43 masak sorry, pn the phone.
16:44 masak s/pn/on/
16:44 viklund np
16:44 masak :)
16:44 viklund or maybe sending latin-1?
16:45 viklund I think we can have utf8 characters in the document even, because of the <meta>-directive in the <head>
16:45 viklund it feels kind of backwards...
16:48 viklund heh, now I got "&amp;#9786;"
16:48 viklund november is decoding twice here, I think the second time is when parsing mediawikimarkup
16:49 viklund yes
16:49 viklund it is
16:50 viklund I can patch it so numbered HTML-entities work
16:50 viklund (somehow)
17:01 * masak is back now
17:02 masak wow, that sounds great.
17:02 masak I like how you now seem to have an understanding of this issue. I still don't. :)
17:03 viklund I can explain later
17:04 viklund masak: how do I match # in p6?
17:04 viklund (preferrably in a //)
17:04 masak / '#' /
17:04 viklund ah
17:04 viklund ty
17:05 viklund right, I tend to forget the new regex syntax...
17:05 masak I can understand that, especially if you're doing p5 regexes all day.
17:06 viklund today I've been switching a bit back and forth as well
17:06 masak I think it'll feel strange to be teaching p5 this summer. :)
17:06 viklund ;)
17:07 viklund Adam (my brother) will attend that course
17:08 masak nice.
17:11 viklund Yahoo!
17:11 viklund I got smileyface: ☺
17:11 masak \o/
17:11 masak er, i mean \☺/
17:13 viklund (:
17:13 viklund but this will be really hard to do right in Web.pm
17:13 viklund my solution is kindof hackish...
17:14 masak viklund: if you had a use.perl.org blog, I'd ask you to blog about this there...
17:16 viklund ;)
17:16 viklund Time to update feather and tell mr. lichtkind about it
17:17 masak definitely.
17:17 masak viklund++
17:17 viklund he crashes November a lot, that's good
17:19 masak yes, very.
17:19 masak I should blog about that, actually.
17:19 masak and about this latest fix of yours.
17:21 viklund http://november-wiki.org/view/Ugly
17:21 zarah viklund's link is also http://tinyurl.com/mbkwhm
18:48 lichtkind joined #november-wiki
18:54 viklund lichtkind: now you can post unicode
18:55 viklund to november
18:55 lichtkind viklund++ great
18:56 lichtkind viklund you seen in #perl6 mberens also wants to edit in november
22:17 viklund lichtkind: now you can also have spaces in URLs (like 'Perl 6')
22:17 lichtkind great thanks
22:17 viklund it gets translated to 'Perl_6'
22:17 lichtkind thats how most do it :)
22:18 viklund yes, only way that's sane really
22:19 viklund lichtkind: I haven't updated the server yet though...
22:20 lichtkind no pressure i just finished some things in the tablets
22:23 viklund lichtkind: I fixed the cancel bug as well
22:23 viklund updating server now, then sleep
22:24 lichtkind great viklund++
22:25 viklund now there's only your feature request of TOC left in the issue tracker :)
22:25 lichtkind i have another feature request :)
22:25 lichtkind are maybe its already in there
22:26 lichtkind is there a tag to forma sourcecode
22:26 viklund not in the tracker
22:26 viklund no
22:26 lichtkind i mean in november
22:27 lichtkind like <verbatim> in twiki
22:27 viklund there's no more issues in the tracker, that's what I meant
22:27 viklund yes I know
22:27 lichtkind i understood
22:27 viklund I think that is probably best handled via plugins
22:27 * viklund really needs to implement that plugin system
22:28 viklund both TOC and that source code thingy would be quite easy then
22:28 viklund and if we do that we can move Tags.pm into a plugin
22:28 viklund anyway, the server is updated
22:28 lichtkind yes
22:29 lichtkind if it does the source thing rights its already more usefull that the socialtext
22:30 viklund ;)
22:33 viklund @tell masak I fixed all the bugs, now there's only features left ;)
22:33 zarah Consider it noted.
22:33 viklund zarah: thank you
22:33 zarah you're welcome, viklund :)

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