Camelia, the Perl 6 bug

IRC log for #mojo, 2010-07-02

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

All times shown according to UTC.

Time Nick Message
00:09 sri xantus: ->json_class/don_class :)
00:09 sri Zzz
00:15 ask joined #mojo
01:10 xantus sri: sweet
01:11 xantus sri: a suggestion: a good command line param for mojo daemon would be --root-dir
01:11 xantus so if you wanted to quickly serve up something in a dir for testing, you can fire up a one liner
01:12 xantus maybe --static-root
01:43 xantus ok, going home
01:57 ashleydev joined #mojo
02:42 janus joined #mojo
03:37 jawnsy joined #mojo
03:42 nightmare joined #mojo
04:04 tl joined #mojo
04:18 nightmare left #mojo
04:39 su-bzero joined #mojo
05:54 ashleydev joined #mojo
06:00 Su-Shee joined #mojo
06:25 yko joined #mojo
06:26 ysyrota joined #mojo
07:12 su-bzero joined #mojo
07:54 esskar joined #mojo
08:04 marcus sri: maybe let ->dom cache the result after the first parse? (make it a lazy accessor or whatnot)
09:43 yko marcus++
09:58 jest joined #mojo
10:01 marcus hmm
10:02 marcus xantus' facebook account suddenly disappeared.
10:05 marcus wondering if one of his crazy girls got to him.
10:06 sri :)
10:07 sri facebook sucks
10:08 spleenjack joined #mojo
10:12 marcus yeah, I logged in again and it was back.
10:12 sri they prolly just stole his data or so and sold it
10:26 * Su-Shee sells sri to the highest bidder.
10:27 sri :o
10:28 Su-Shee less work than fixing bugs. ;)
10:29 yko :DD
10:30 yko Su-Shee: does whip comes with kit?
10:30 Su-Shee yko: "with this wonderful young developer you'll get a set of steak knives and this high qualitiy leather bull whip!"
10:30 Su-Shee and we deliver.
10:31 yko gigle
10:31 * sri dispatches a bunch of T800s to take care of Su-Shee
10:32 sri (with steak knives!)
10:33 * Su-Shee reminds sri that the woman victoriously crushes the T800.
10:34 yko but it took a lot of time...
10:35 Su-Shee ah, those classics! goethe, the opera, terminator I...
10:36 doubi joined #mojo
10:36 * yko .oO( god bless online translators )
10:37 sri see...i'm not a stupid evil super computer from a movie...i just send 20 terminators at once
10:38 Su-Shee sri: that's mean!1!
10:38 * Su-Shee pulls sri's hair and hits him with a doll.
10:38 sri :o
10:39 Su-Shee you have a sister, you know what we're capable of. ;)
10:39 sri ...
10:39 Su-Shee <-- years of experience manhandling sebastians.. ;)
10:40 sri my sister plays with guns, not dolls ;p
10:41 Su-Shee when she was 4?
10:41 yko s/doll/gun/ -- same effect, i think :D
10:58 marcus I should get Eva some guns
10:58 marcus she already has a waterpistol tho
11:07 fhelmberger joined #mojo
11:13 su-bzero joined #mojo
12:22 sri
12:22 sri
12:22 sri
12:23 sri
13:09 doubi joined #mojo
14:02 vel joined #mojo
14:28 vel joined #mojo
15:03 ashleydev joined #mojo
15:14 dotan joined #mojo
15:27 ashleydev where should I go to learn about how to do internationalization and localization in perl for a web page?
15:30 ashleydev I'm totally new to trying to make my UI multi lingual, I've seen a number of different APIs floating around and I'm not sure which API to use, and what I need to know to learn this stuff.
15:32 dotan Read the article that is part of Locale::Maketext's pod, which explains the limitations of the standard gettext
15:32 dotan http://search.cpan.org/~ferreira/Locale-Ma​ketext-1.13/lib/Locale/Maketext/TPJ13.pod
15:32 garfield [ Locale::Maketext::TPJ13 - search.cpan.org ]
15:33 garfield http://xrl.us/bhqk9d
15:33 dotan It's a good read
15:35 ashleydev cool
15:36 dotan the usual API (GNU gettext, what most PHP apps use) is a string lookup table - You wrap all your user-visible text with a function call, and it replaces your text with locale-appropriate text. The maketext article has a lot of fun explaining why that simple-minded approach isn't that great...
15:38 ashleydev does Locale::Maketext deal with I18N too?
15:39 * ashleydev is reading that article...
15:39 dotan ALSO, if you're doing a web app, worth thinking about support for RTL (right-to-left) languages - Wordpress does this with a rtl-specific CSS file that overrides the default text directionn and alignment if the locale is RTL (Arabic, Hebrew, Farsi, Urdu...)
15:40 ashleydev i'm building a REST api...
15:40 ashleydev for an app like hiveminder... which has SMS / IM / web interfaces
15:40 ashleydev and one core RESTful api on which gives JSON access to read and write data
15:40 ashleydev to the clients...
15:41 ashleydev so for now i'm trying to figure out how to deal with that API for doing things like "user $id info"
15:42 dotan http://wordpress.tv/2010/05/01/yoa​v-farhi-right-to-left-themes-sf10/
15:42 garfield [ Yoav Farhi: Right to Left WordPress � WordPress.tv ]
15:42 ashleydev which will be both a web page and an SMS cmd for desplaying that...
15:42 garfield http://xrl.us/bhqmaa
15:42 ashleydev i think it get's tricky because I have to take that command 'user $id info" as both multi lingual input and return the out put multi lingual too
15:43 ashleydev or GET /user/$id/info in the case of the web app
15:46 ashleydev dotan: thx for the links!
15:47 dotan wait wait! perldoc Mojolicious::Plugin::I18n
15:47 ashleydev that's pretty sparse
15:47 ashleydev and doesn't deal with localization
15:48 dotan It doesn't?
15:48 ashleydev i'm such a noob
15:48 ashleydev i don't see there how to deal with numbers and other args...
15:48 dotan Wait, I've been too bust throwing links at you to follow. Let me read up...
15:49 ashleydev i mean it probably handles localization.. but it doesn't explain to me how
15:49 ashleydev so that's what I need.. to learn...
15:49 sri it's just a thin wrapper around maketext
15:49 sri so better just start with plain maketext
15:49 ashleydev ok so reading the maketext docs is what I'll do now
15:49 dotan Right. Which suggests figuring outr how to use maketext. :P
15:49 * sri nods
15:49 ashleydev :) cool
15:50 dotan Your UI sounds like a command line app. Most CLIs don't localize the commands
15:52 dotan I think internationalization is the top priority. Your app should accept and correctly display text in the user's language.
15:54 dotan If it's a webapp, showing the UI (menus, links, forms) in the user's language is important. Showing the url in the user's language less so.
15:55 dotan I mean, webservers only understand GET, not תן
15:57 dotan If your users are technical users,  they can make do (and may prefer) to type get user/$foo/info
15:57 ashleydev hmmm
15:57 ashleydev it's a health tracking app
15:58 ashleydev for employees
15:58 ashleydev of multinational companies
15:58 ashleydev and in some countries the users will not have access to the web... just SMS..
15:59 ashleydev so i understand that the URLs can all be ascii
15:59 ashleydev that's fine
15:59 ashleydev but the UI of SMS can't be...
15:59 dotan So you need a free text interface (not menu selection) ?
15:59 ashleydev well...
16:00 ashleydev on SMS which is what I"m working on now, there will be a REST backend which will be ascii
16:00 ashleydev but the front end will be sort of menu driven -- so i don't think it's gonna be "freetext"
16:00 dotan Well, a menu could be a piece of paper, like a command's usage string, or a cheatsheet.
16:01 ashleydev right so in the SMS app you send "?"
16:01 ashleydev and get a list of available commands
16:01 ashleydev so that should be easy to translate and drive from another lang...
16:03 ashleydev but underneath if the DB is all in english... and there's a REST / JSON interface.. then the SMS app on top of that will need to translate both in and going out...
16:03 ashleydev i'm still trying to grock how to architect this
16:04 * ashleydev back to reading maketext...
16:07 dotan The DB should be utf8 or whatever (most languages can fit in UTF8). Most text would be opaque to the app, but labels should be localized. A tricky part might be accepting numbers in non-arabic numerals...
16:12 ashleydev i'm told I have 10 or 12 languages to support...
16:13 ashleydev alright so utf8, not ascii... good to know
16:13 Su-Shee ashleydev: what 10 or 12 languages?
16:13 ashleydev don't know
16:13 Su-Shee ?!
16:13 Su-Shee that ask first.
16:13 Su-Shee then.
16:14 ashleydev what are the major things to look for? (ltr and rtl differences and number systems?)
16:14 Su-Shee ashleydev: no concept of "char". different sort orders.
16:15 Su-Shee ligatures.
16:15 Su-Shee case sensitivity.
16:16 Su-Shee history. some languages weren't written in latin before 1930. china changed parts in 1948 to "chinese simplified".
16:17 Su-Shee user input encoding which might not be utf-8, but utf-16 with bom or shift-jis or ...
16:17 ashleydev will that change the DB storage?
16:17 dotan yep
16:18 Su-Shee well it depends how well you deal with it. if some field says it's utf-8 and then you shove shift-jis in it.. bad.
16:18 ashleydev i'm told japaneese and chineese plus the european langs
16:18 Su-Shee *HAHA* enjoy. ;)
16:18 dotan which is why Su-Shee is right about first thing finding out what languages to support.
16:18 Su-Shee and what's "the european" langs? EU or europe?
16:18 dotan Well, at least you don't have to worry about RTL yet...
16:19 ashleydev hmm... asking.. about rtl..
16:19 Su-Shee you also realize that rtl means "the entire UI"?
16:20 Su-Shee and that japanese and chinese means "things being 1 char wide in english suddenly having the double width"?
16:21 Su-Shee also, buy O'Reilly's CYKV book _today_.
16:21 ashleydev well my goal is to build a REST interface as the main controller/model that various UI's can sit on
16:21 Su-Shee aeh CJKV :)
16:21 ashleydev not have to worry about layout yet...
16:21 Su-Shee ashleydev: you have. trust me.
16:22 ashleydev :(
16:22 Su-Shee multi-lang apps should be planned rather carefully.
16:22 Su-Shee ashleydev: which languages do you know?
16:22 ashleydev english...
16:22 ashleydev perl
16:22 Su-Shee oh wow, not even something with the hint of an umlaut.. :)
16:23 ashleydev i wish
16:23 Su-Shee ashleydev: read up first. really. multi-lang stuff is a serious bitch technically. you _need_ the knowledge.
16:24 ashleydev k
16:24 Su-Shee ashleydev: otherwise, you'll end up with problems like "please activate sorting alphabetically in japanese" and other bogus.
16:25 Su-Shee and make sure that you know what "european" languages means.
16:25 * Su-Shee has an arabic interface in her todolist.. ;)
16:25 ashleydev the answer I got to what langs was,  "all... ?"
16:26 ashleydev but really it's langs that can be used via SMS...
16:26 Su-Shee that's nonsense. serious nonsense.
16:27 sri what charset are sms?
16:27 ashleydev what are the issues with EU langs?
16:27 Su-Shee oh, so it's amhardic as well? and hebrew? arabic? persian arabic? :)
16:27 Su-Shee ashleydev: EU or europe?
16:27 sri eu langs are quite good if you use unicode
16:27 ashleydev i have queried for the RTL ones...  so I don't know if I have to support those.
16:27 ashleydev europe..
16:28 sri arabic and asian languages will cause you pain i bet
16:28 Su-Shee ashleydev: then tell them that "languages used via SMS" includes arabic and hebrew.
16:28 Su-Shee sri: it's hell even if you know some of them.
16:30 Su-Shee ashleydev: read all related wikipedia articles carefully, they're rather ok for need-to-know things like "what's really unicode and utf" and things like writing systems and so on.
16:31 ashleydev does hebrew use arabic numbers?
16:31 Su-Shee ashleydev: and don't forget that "internationalization" nowadays includes unicode domains which means if you want to send anything mail-related in i18n, make sure that your system supports it properly. (dns and smtpd)
16:32 sri mojolicious does unicode domains and IRIs btw
16:33 Su-Shee ashleydev: http://en.wikipedia.org/wiki/Hebrew_numerals
16:33 garfield [ Hebrew numerals - Wikipedia, the free encyclopedia ]
16:33 sri which was a pinful path of trial and error
16:33 sri *painful
16:33 ashleydev yeah i know that, but is that in practice or can one just use arabic numerals...
16:33 ashleydev hehe... pretty overloaded..
16:34 ashleydev i'm told we have Portuguese, Chinese, Spanish, in current plans
16:34 ashleydev and we grow from there.
16:34 sri ashleydev: if you get this done you totally should write a tutorial :D
16:34 Su-Shee ashleydev: portuguese and spanish is easy. that's latin1 aka "like your english with a little addition".
16:34 Su-Shee ashleydev: chinese. including taiwan?
16:34 ashleydev i'll add it to mojo docs... :)
16:36 Su-Shee (why am I not consulting for like a 1000 euros a day?)
16:36 ashleydev seriously
16:36 ashleydev if I meet you I"ll buy you a  beer
16:36 Su-Shee ashleydev: china. taiwan included?
16:36 ashleydev depends on if you ask china or taiwan...
16:36 ashleydev hehe
16:37 ashleydev what's it matter in the code?
16:37 Su-Shee china uses those so called "chinese simplified" to write. Taiwan doesn't. they use traditional. which is what japan and korea uses as well (besides their other writings.)
16:38 ashleydev yeah taiwan is requred.
16:38 Su-Shee then you have to support both.
16:38 ashleydev k
16:39 Su-Shee http://en.wikipedia.org/wiki/Chinese_Simplified
16:39 garfield [ Simplified Chinese characters - Wikipedia, the free encyclopedia ]
16:44 dotan ashleydev: Hebrew numerals are rarely used, the two cases I can think of being writing the Hebrew calendar date and list items in official documents. I don't think your app needs to worry about them - Israel use Julian dates and arabic numerals for numbers.
16:45 ashleydev cool -- last time I was in isreal that's kind of the impression I got
16:45 ashleydev *israel
16:46 Su-Shee ashleydev: let me put it that way: if you manage to do it right, your users will love it.
16:46 * ashleydev loves the love!
16:46 Su-Shee ashleydev: essentially, you have a handful of problems which you can properly tackle one at a time and understand them:
16:47 Su-Shee ashleydev: everything latin written might contain stupid special chars - like french accents and so on. they use arabic numerals. sorting is like you know it, but with the special-char twist.
16:48 Su-Shee ashleydev: then there's greek and russian (greek and cyrillic). looks strange, but it's a regular alphabet - just different writing.
16:49 Su-Shee ashleydev: then comes the group of rtl -> hebrew and arabic and they also have ligatures.
16:49 Su-Shee which leads to devanagari and other indian writings. they have an alphabet, are ligatures but are ltr.
16:50 Su-Shee then comes everything chinese and so on which doesn't have our notion of "char" and no such thing as what we call "alphabet". that leads to: _extremely_ different concept of writing and sort order (!)
16:52 ashleydev where do non-arabic numerals come in?
16:52 dotan Arabic, ironically, uses non-arabic numerals.
16:53 ashleydev ahhh, seriously!?
16:53 Su-Shee and that's essentially it besides some more exotic stuff like you're doing a historial database for mexico which has to include pretty aztec pictures :)
16:53 ashleydev that's not gonna happen in this app
16:54 ashleydev so arabic is really the only one that needs support for non arabic numerals?
16:54 dotan http://en.wikipedia.org/wi​ki/Eastern_Arabic_numerals
16:54 garfield [ Eastern Arabic numerals - Wikipedia, the free encyclopedia ]
16:54 garfield http://xrl.us/bhqmhw
16:54 Su-Shee ashleydev: no. japan, korea, china and so on has own numerals. you wouldn't even recognize them as numerals. but the use of arabic numerals are pretty common.
16:55 ashleydev devanagri uses those too if I recall
16:55 ashleydev or something non arabic...
16:55 Su-Shee ashleydev: buy CJKV from o'reilly. put it in your office library.
16:55 crab devanagari has its own numerals, yes.
16:55 ashleydev yeah just ordering it now
16:56 crab but every year now, fewer and fewer people can read them.
16:56 * Su-Shee hopes for arabic lessons from my company. if I'm going to support good arabic  UIs...
16:57 Su-Shee crab: like roman numerals here..
16:57 * Su-Shee has also pass on germanic runes.
16:57 * ashleydev laughs
16:57 crab where is here? rome?
16:57 Su-Shee berlin, germany. ;)
16:57 Su-Shee above the roman empire line ;)
16:58 crab only a little above ;)
16:58 Su-Shee "we barely managed" ;)
16:59 Su-Shee ashleydev: also read up on how gettext does i18n, that'll probably help as well before you invent your own stuff.
17:44 esskar_ sri: add a guide for best practices to the guides
17:45 sri what?
17:47 sri thats so vague i could write about lolcat pictures
17:48 esskar_ well like, howto do distinguish between normal and ajax requests or similar stuff
17:49 sri sounds like cookbook recipes
17:49 esskar_ yes, godd enough :)
17:50 sri i don't think there is a way to do that btw
17:50 sri jquery and friends just send a special header
17:50 sri but thats not portable
17:54 sri yea, they send X-Requested-With: XMLHTTPRequest
17:54 esskar_ yes, just saw it
18:01 sri v  v        v
18:01 sri |  |  v     |  v
18:01 sri | .-, |     |  |
18:01 sri .--./ /  |  _.---.|
18:01 sri '-. (__..-"       \
18:01 sri \          a    |
18:01 sri ',.__.   ,__.-'/
18:01 sri '--/_.'----'`
18:01 dotan joined #mojo
18:01 sri fail whale!
18:02 sri \o/
18:03 spleenjack left #mojo
18:03 stephan48 sri: okey...........
18:04 sri you surely are not on twitter
18:04 sri shame on you!
18:46 esskar_ has anybody rendered a dbix::class resultset to json?
18:46 esskar_ ...yet..
18:59 dotan joined #mojo
19:11 spleenjack joined #mojo
19:33 esskar_ fucking dbix-class cocks
19:38 sri Oo
19:38 sri http://kraih.com/tpf-clean-sri.png # thoughts? :)
19:38 yko Much better
19:39 yko but i still cant get, why butterfly :)
19:39 sri why not?
19:40 yko On math exam: student: correct answer is 42. Proffessor: Why? S: Why not? P: Why yes? :)
19:41 yko :p
19:41 yko anyway, that's much more nice, than that crazy purple monster
19:56 crab what purple monster?
19:57 yko mr putin? o shi...
19:58 * yko hiding somewhere in the corner
19:58 yko giggle... friday evening
19:58 yko There was large purlple monster on previous vev of that logo
19:59 yko *ver
19:59 crab url?
19:59 yko ugh... i don't remember. look at kraih's twitter, there was urls
20:00 sri yea, it was still following the camelia guidelines... *shudders*
20:10 sri http://kraih.com/perl6-amelia-sri.png
20:10 sri monster
20:11 yko ja
20:26 sri it's not myriad anymore btw :)
20:26 sri marcus: i fell in love with a new typeface :)
20:30 crab which typeface?
20:30 sri avenir next
20:38 siegfri3d joined #mojo
20:39 siegfri3d hi sirs..
20:39 * sri waves
20:40 crab ah, another frutiger font.
20:40 siegfri3d somebody has a good reference about run/configure Mojolicious::Lite applications on apache web server?
20:43 sri siegfri3d: see cookbook
20:43 siegfri3d In CPAN?
20:43 sri (on github)
20:45 sri crab: yea, one of his best
20:45 siegfri3d hohoho thanks sri
20:50 ashleydev_ joined #mojo
21:04 yko hmm. i think at the moment nobody really does, but there's section in cookbook: http://github.com/kraih/mojo/blob/master/lib​/Mojolicious/Guides/Cookbook.pod#Apache/CGI
21:04 garfield [ lib/Mojolicious/Guides/Cookbook.pod at master from kraih's mojo - GitHub ]
21:04 garfield http://xrl.us/bhqm9g
21:05 sri yko: thats what i said
21:05 yko sri, sorry. my chat window scrolled, i did not saw that
21:07 yko there's little trick about mod rewrite: http://gist.github.com/461906
21:07 garfield [ gist: 461906 - GitHub ]
21:08 yko if script actually is behind apache's redirect for making routes routing, it's solution to make your urls correct
21:10 yko and there's .htaccess for rewriting... http://gist.github.com/461909 (stolen from vti and somebody else)
21:11 garfield [ gist: 461909 - GitHub ]
21:29 ashleydev joined #mojo
21:32 ashleydev_logbot joined #mojo
23:46 ashleydev joined #mojo

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