Camelia, the Perl 6 bug

IRC log for #mojo, 2010-07-20

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

All times shown according to UTC.

Time Nick Message
00:07 ask joined #mojo
00:50 xantus yko: I didn't mean it in a bad way
00:50 * yko isn't russian.
00:50 yko :D
00:52 xantus you said 'our', so I assumed
00:52 yko even if yes, i know what humor is :)
00:52 xantus I don't know what humor is, I'm a robot
00:52 xantus and that makes me laugh
00:53 yko oh... well, mostly all post-soviet countries marked as 'russians' usually
00:56 yko ignore me, it's 4am now, i just delirate
02:32 su-bzero_ joined #mojo
02:35 janus joined #mojo
02:44 ask joined #mojo
03:03 yakudzo joined #mojo
03:12 ask joined #mojo
03:20 su-bzero joined #mojo
03:47 Alias__ joined #mojo
03:53 ashleydev joined #mojo
04:03 ask_ joined #mojo
04:04 tholen42 joined #mojo
04:13 Foxcool joined #mojo
04:24 pid joined #mojo
04:26 dotan joined #mojo
04:36 Foxcool joined #mojo
05:48 Alias_ joined #mojo
05:52 Alias_ joined #mojo
05:57 ltriant joined #mojo
06:14 cognominal joined #mojo
06:15 memowe O HAI!
06:16 zakame hi
06:25 _mpu joined #mojo
06:37 zloyrusskiy joined #mojo
06:40 chansen joined #mojo
06:43 Su-Shee joined #mojo
07:13 yko joined #mojo
07:22 dotan joined #mojo
07:22 ltriant joined #mojo
07:24 _mpu joined #mojo
07:54 jest joined #mojo
08:39 dotan joined #mojo
08:46 * sri yawns
08:50 sri http://ironpython.net/browser/gettingstarted.html # :o
08:50 garfield [ IronPython.net / Getting Started ]
11:02 GitHub54 joined #mojo
11:02 GitHub54 mojo: master Sebastian Riedel * 9cf8fb7 (1 files in 1 dirs): regex cleanup - http://bit.ly/brsywg
11:02 GitHub54 left #mojo
11:03 yko joined #mojo
11:50 sharifulin joined #mojo
11:53 sharifulin sri: hello. How I can use two or more under for one action in M::L?
11:53 sri sharifulin: you can't
11:53 sharifulin I see it :)
11:54 sri M::L is a small subset of normal Mojolicious functionality, if you need more, time to upgrade ;p
11:55 sri thats the whole point
11:55 yko Btw, upgrading from M::L that became big enough can be painfull.
11:56 yko inflate is cool, but splitting get/post/under into controllers little bit annoyng
11:56 sri it's your responsibilty to decode when to upgrade :)
11:56 sri *decide
11:56 sharifulin I think about simple script for upgrade M::L to M
11:58 sri would be way more complicated than inflate, but not impossible i guess
11:59 sharifulin Solution needed. Very often, M:: L imperceptibly grows and upgrade to Mojolicious is very hard
12:00 sri i wouldn't call it very hard, just imagine porting between two competely unrelated frameworks :)
12:00 sri you are spoiled :D
12:00 sri *spoilt
12:01 sharifulin Yes. This is your fault too :)
12:01 sri ;p
12:02 sri but i could imagine this functionality in a refactoring editor
12:02 sri *cough* padre *cough*
12:02 sharifulin )))
12:03 ask joined #mojo
12:05 sri i guess most lite apps would be rather easy to transform with PPI
12:05 sri what gets you in trouble are global variables and the like
12:06 sri thats a rather hard case to solve
12:06 sri you can't split actions into multiple controllers
12:06 sri one controller would be fine though
12:08 sharifulin yes, PPI is solution
12:09 vti hm, 125 users in mail list
12:10 sri healthy growth rate
12:10 vti ye, mojo rocks
12:11 sharifulin I would like syntax of M::L, but I want to have some modules same as Mojolicious with M::L syntax. sri, it's really? what are you doing about it?
12:12 sri sharifulin: see routing guide, detour routes
12:13 sri "=head2 Embedding Applications"
12:14 sharifulin ok, I saw detour and forgot
12:14 sri the feature is still rather experimental, i would like it if more people used it and shared their experiences
12:45 sri hmm, i would like native oauth support in mojolicious
12:45 ask joined #mojo
12:45 vti me too
12:45 vti async
12:45 sri sync/async of course
12:45 vti i was going to write procotol::oauth
12:45 ask joined #mojo
12:45 sri it's so trivial why would it need a protocol?
12:46 sri *+layer
12:46 vti isn't the same as openid? i wasn't reading closely... maybe it is simple
12:46 vti not the same of course, but the same technology
12:47 dotan sharifulin: ++ on route->detour.
12:47 vti and there are couple versions too
12:47 vti like 1, 1.1 and 2.0 or smth like that
12:48 sri http://tools.ietf.org/html/rfc5849
12:48 garfield [ RFC 5849 - The OAuth 1.0 Protocol ]
12:48 sri thats all
12:49 sri i heard django has good oauth support, migth be a good idea just to steal it
12:50 vti and you want server side too, right? :)
12:50 sri sure
12:51 vti it requires SHA1
12:51 sri no big deal
12:51 vti and it's not in the core
12:52 sri it is since 5.10 or so
12:52 sri we can make it an optional prereq
12:52 sri Mojo::ByteStream can even get the helper methods
12:53 vti hm
12:53 yko oauth++
12:54 vti how about yadis and openid? ;p
12:54 yko helpers++
12:54 sri not too sure about those
12:55 sri well, we have an xml parser now, so trivial stuff
12:55 vti they require some xml parsing
12:55 sri :)
12:55 * yko monkey-patched Mojo::ByteStream once. Just to have abylity write b($foo)->non_classic_escape
12:55 yko shure non_classic_escape was called somehow else, i don't remember
12:56 vti if oauth and openid were in the core, it would be success
12:56 yko juse like sub Mojo::ByteStream::non_classic_escape {... } in base Controller class
12:56 vti they require some xs math modules though..
12:56 yko vti - im not shure about core actually.
12:56 yko Just like recomended modules - yep, that would be great
12:56 sri xs math moules?
12:57 vti like Math::Pari
12:57 yko OpenID terribly slow on pure perl
12:57 vti for calculating signatures
12:57 yko vti++
12:57 vti it will work, but really slow
12:57 yko and cookbook about using MopjoX::OpenID with Mojolicious app
12:57 sri well, i personally don't care too much about openid
12:57 vti i noticed that :)
12:57 sri oauth is more interesting
12:58 sri :)
12:58 yko oauth it's twitter and facebook api
12:58 yko at least
12:58 yko and i'ts trend now
12:58 sri oauth is a versatile auth mechanism for web apis
12:58 yko actually, MojoX::OpenID just works now :)
12:59 vti yko: really? where's the code? ;p
12:59 yko in your repo
12:59 vti =/
12:59 yko i bring up one production proj on that :p
12:59 yko only client side, though...
12:59 sri vti: btw. "Digest::SHA was first released with perl 5.009003"
12:59 yko but it damn works
13:01 ask joined #mojo
13:03 yko tempalte with built-in admin stuff looks spaghettilicious :(
13:03 sri vti: feel free to add yadis examples to the Mojo::DOM test suite btw.
13:04 vti there are namespaces invovled
13:04 sri spaghettilicious makes sri hungry :S
13:04 vti what's that? :
13:04 vti :)
13:04 sri vti: no big deal, we can parse and search them
13:05 sri we just don't *really* support namespaces
13:05 sri and if you care enough about them, patches welcome :D
13:05 vti i
13:05 vti ah
13:05 vti just below RSS
13:05 vti i see
13:06 vti ok
13:06 sri the parser just doesn't care
13:06 sri *real* support would mean actual CSS3 spec compliant support
13:07 sri searching with ns|e and stuff
13:08 sri it migth make a few edge cases easier
13:08 sri but in general we should be able to parse everything already
13:08 vti there is two cases for example
13:08 sri i'm not following the css spec too closely, since jquery doesn't do it either :)
13:09 vti <xrd ns="foo"><XRD ns="bar">... <xrd:XRD ns="foo" ns="bar"
13:09 sri wouldn't that be xml:ns=... or so?
13:10 vti ye
13:10 vti i omitted that
13:10 vti let me show real examples
13:10 sri i know how it works
13:11 sri we don't parse the namespace yet, it's just random information for the parser
13:11 vti https://gist.github.com/3cab342686453fbc39d1
13:11 vti so how do i navigate in both cases?
13:11 sri like i said, if you want to support it, feel free
13:11 sri you would need separate searches
13:12 sri i don't care enough
13:12 vti that's what i don't want...
13:12 vti libxml for example makes it transparent
13:12 sri it's rather easy, just grunt work
13:14 vti the problem is that i'd have to dig into those namespaces...and understand them a little :D
13:15 sharifulin sri: have you ever seen Mojolicious::Plugin::OAuth?
13:15 sri sharifulin: nope
13:15 sharifulin http://github.com/likhatski​y/Mojolicious-Plugin-OAuth
13:15 garfield [ likhatskiy's Mojolicious-Plugin-OAuth at master - GitHub ]
13:15 garfield http://xrl.us/bhtup2
13:16 cognominal joined #mojo
13:16 sharifulin uses Net::OAuth::All, supports 1.0, 1.0A, 2.0
13:16 sharifulin only client
13:17 sharifulin login to twitter, facebbok, 4sq, frienfeed are work
13:20 ask joined #mojo
13:29 yko why should i set upt bridge('/') everytime instead of just bridge->to...
13:29 yko I mean, mb set up default path to '/' if not defined?
13:30 vti it was already bridget->to
13:30 vti *bridge
13:30 vti afaik
13:31 yko yep. that's because im asking
13:31 yko *why*
13:31 * sri doesn't understand the question
13:32 dotan sharifulin: Net::OAuth::All is only on github, not CPAN
13:32 sharifulin yeah)
13:32 sharifulin it's devel mode
13:33 sharifulin like as my mojo plugins: Mojolicious::Plugin::JsonToXml and GeoLocation
13:52 sri vti: i'll just ignore the namespace prefix entirely for now, so it's consistent
13:59 ashleydev joined #mojo
14:00 sri so you could just search for tags, and later check their namespace
14:01 ask joined #mojo
14:03 GitHub156 joined #mojo
14:03 GitHub156 mojo: master Sebastian Riedel * eed1380 (2 files in 2 dirs): consistently ignore XML namespaces in Mojo::DOM - http://bit.ly/9c8VlB
14:03 GitHub156 left #mojo
14:03 sri i can see why jquery doesn't do namespaces, it's impossible to make them look nice
14:04 sri they are not guaranteed to have a nice prefix, just the URLish name
14:04 sri and adding the URLish name into a css expression sucks
14:05 sri @namespace foo url(http://www.example.com);
14:05 sri foo|h1 { color: blue }
14:05 sri thats how the spec wants it
14:05 sri foo|h1 is perfectly fine
14:06 sri but adding your own aliases not so much...
14:07 sri vti: actually i take it back, unless someone finds a pretty way to handle namespaces i don't want them :)
14:14 GitHub118 joined #mojo
14:14 GitHub118 mojo: master Sebastian Riedel * 9b18686 (1 files in 1 dirs): added test - http://bit.ly/diLzQz
14:14 GitHub118 left #mojo
14:15 sri yea, i think ignoring namespaces is the perfect solution
14:16 sri even if you have two tag sets that clash, internally we preserve prefixes and stuff, so you can figure everything out yourself ;p
14:16 sri btw. what about renaming attributes to attrs?
14:17 sri attributes starts to get on my nerves
14:20 GitHub101 joined #mojo
14:20 GitHub101 mojo: master Sebastian Riedel * c4abdba (3 files in 3 dirs): renamed attributes method in Mojo::DOM to attrs - http://bit.ly/dmlVib
14:20 GitHub101 left #mojo
14:20 sri :)
14:26 GitHub106 joined #mojo
14:26 GitHub106 mojo: master Sebastian Riedel * f133cdc (1 files in 1 dirs): fixed typo - http://bit.ly/du4625
14:26 GitHub106 left #mojo
14:29 vti ok...
14:30 sri anyone know case where xml namespaces make things actually easier?
14:30 sri *+a
14:30 sri all the mixed namespace specs i can think of have root elements one can search for
14:31 sri first that came to mind was svg in html5 documents
14:32 sri vti: your yadis example is no exception
14:33 sri the Service block looks like something you'll loop over anyway
14:34 vti yes
14:34 vti first get into xrds -> xrd -> service
14:35 sri search('xrd service') or so
14:35 sri loop over results with ->children
14:36 sri nothing of this would get easier with *real* namespace support
14:36 sri we could only keep track of namespaces in elements
14:37 sri $element->namespace # http://openid.net/xmlns/1.0
14:37 pid left #mojo
14:37 sri thats about it
14:38 sri vti: would that help with anything?
14:39 vti i don't know, i ignore namespace too :D
14:39 sri -.-
14:39 vti since i don't know wtf that is :D
14:39 sri you know i've been looking through specs for about 2 hours because of you? :(
14:39 vti oO
14:39 sri :,(
14:39 vti i was writing a test
14:40 vti i thought you won't do anything before that
14:40 vti as you usually do ;p
14:40 vti which spec did you read?
14:40 vti i might want to read it too
14:40 sri xml namespaces and css3
14:41 vti so...
14:41 vti <a> hello </a>
14:41 vti i get ' hello '
14:41 vti but i expect 'hello'
14:41 sri you have to trim yourself
14:41 sri the parser tries to preserve everything
14:42 sri (for now)
14:42 vti ok
14:43 sri http://www.w3.org/TR/css3-selectors/
14:43 garfield [ Selectors Level 3 ]
14:43 sri http://www.w3.org/TR/REC-xml-names/
14:43 garfield [ Namespaces in XML 1.0 (Third Edition) ]
14:43 sri btw.
14:43 vti thanks
14:43 vti will copy it to my ipad :D
14:43 sri the xml specs are not very readable though
14:44 sri css3 selectors is really good
14:44 sri every spec needs that many examples
14:44 sri examples are huge
14:46 vti <xrds><xrd><service>....</></></> and <xrds><xrd><service>...</xrd><xrd><service>....
14:46 vti how to deal with this?
14:46 vti if i do ->search('xrds xrd service')
14:46 vti i get the first one
14:46 vti should i search only xrds and then iterate?
14:46 sri huh?
14:47 vti sorry
14:47 sri that example is all broken
14:47 vti https://gist.github.com/aad21f7bd3dcb7f06c98
14:47 vti is it not valid xml?
14:47 vti ah, sorry
14:47 sri that one looks ok
14:48 vti i remember from yadis spec that i should take only the first one
14:48 vti no worries :)
14:48 sri ->search('xrds xrd service') will find *all* elements that fit the expression
14:48 sri fifo order
14:48 sri (now)
14:49 vti https://gist.github.com/3fe4befaf06b8062860e
14:49 vti test
14:49 sri what are those tests for?
14:50 vti just real example
14:50 vti isn't it what you wanted? :-[
14:50 sri ah ok
14:50 sri you should mention that ;p
14:50 vti they pass ;p
14:50 sri back to your problem
14:50 vti which one? :D
14:51 sri ->at('xrds')->search('xrd service')
14:51 sri only the first
14:52 vti ah
14:52 vti nice
14:52 vti that's realy cool
14:52 jest joined #mojo
15:05 GitHub103 joined #mojo
15:05 GitHub103 mojo: master Sebastian Riedel * 797784f (1 files in 1 dirs): added more tests - http://bit.ly/a42xDf
15:05 GitHub103 left #mojo
15:12 vti so what's the mojo::client syntax for bypassing basic authentication?
15:13 vti maybe i should check out docs :D
15:19 vti hm.. oauth requires some kind of database or cache for temporary stuff
15:20 sri vti: bypassing basic auth?
15:20 sri just don't use it...
15:22 vti how do you want to have oauth? just ifrastructure for easy implementation like generating signatures, tokens, nonces or a real $c->oauth_authentication(sub { 'ok' }); ? :)
15:24 sri as easy as possible
15:25 vti plugin?
15:25 sri if possible sure
15:26 sri as few configuration/additional work as possible
15:32 vti and what about storing stuff? memory?
15:33 sri callback defaulting to memory?
15:34 vti sub { ... store stuff... $cb->('done') } or hell with async io and just sub { .. store suff .. }?
15:35 sri just store
15:35 vti but for example couchdb
15:35 vti async req
15:35 sri do we need to know that it finished storing?
15:36 sri there might even be couchdb replication delay or whatever
15:38 vti and get/delete?
15:39 sri you could just pause the transaction and have the client callback resume
15:39 sri that will delay the response until the client is finished
15:39 sri i don't really see a problem
15:40 vti ok
15:40 vti sounds good
15:40 sri :)
15:41 sri looks like you got rusty with all the vacation time...
15:41 vti sorry
15:41 * sri spills some oil into the channel
16:10 vel joined #mojo
16:39 ariel joined #mojo
16:41 ariel hello all
16:42 ariel anyone using DBIx::Class + Mojo + Json? I'm trying to render directly in Json an recordset object returned from DBIC. Is there a way to do this?
16:43 ariel http://pastie.org/1052280
16:43 garfield [ #1052280 - Pastie ]
16:45 ariel I think I'm thinking too Ruby here
16:47 sri can you turn the resultset into a hash?
16:47 ariel i can make it an @array
16:47 sri if it's an array of hashes that would do
16:48 ariel maybe i'm missing json->encode
16:48 sri no you're not
16:48 ariel maybe that's it
16:48 sri render_json just doesn't accept objects
16:48 sri hash, array and scalar only
16:49 sri nothing blessed
16:49 ariel nothing blessed understood
16:52 sri i would expect a ->to_hash method or so
16:52 sri something to extract the raw data only
16:53 ariel the documentation says it is determined by the variable cointaining the recordset, $object or @array
16:53 ariel as i understood it's casted automatically
16:54 sri maybe {%$rs} would just work
16:55 sri i have no clue about dbic really though
16:55 ariel me neihter, i'm just trying it out :)
16:55 ariel and i have no clue about perl! :D
16:56 sri i never want to touch an ORM again!
16:57 ariel for me it is a love / hate relationship with ORMs
16:58 sri http://unicode.org/Public/6.0.​0/charts/versioned/U1F600.pdf # lol! (literally)
16:58 garfield http://xrl.us/bhtvix
17:00 sri "SMILING CAT FACE WITH HEART-SHAPED EYES"
17:00 sri wtf
17:00 _mpu it's the unicode name ?
17:01 sri yea
17:01 ariel 1F645
17:01 _mpu you should add them to the mojo tests
17:01 _mpu :)
17:01 sri :)
17:10 ariel i found how to return a plain hash in dbic, http://search.cpan.org/~frew/DBIx-Class-0.08123​/lib/DBIx/Class/ResultClass/HashRefInflator.pm
17:10 garfield [ DBIx::Class::ResultClass::HashRefInflator - search.cpan.org ]
17:10 garfield http://xrl.us/bhtvnn
17:11 sri sounds right
17:14 ariel yes, it works http://pastie.org/1052280
17:14 garfield [ #1052280 - Pastie ]
17:20 doubi joined #mojo
17:36 ashleydev joined #mojo
17:37 stephen joined #mojo
17:48 ilyuhan joined #mojo
17:54 vel joined #mojo
18:00 ariel is there a way to tell render_json() to use utf8? I'm not getting diacritic letters (sonderzeichen) in my browser :(
18:01 ariel i'm debugging the ajax call using firebug
18:07 dotan left #mojo
18:08 xantus_ joined #mojo
18:08 xantus_ morn'
18:18 sri ariel: it can only generate utf8
18:18 * sri waves
18:19 sri ariel: maybe dbic stores them as raw bytes and they need to be decoded before being fed to the json encoder?
18:19 ariel yes, i see it now, my problem seems to be in my jquery getjson call
18:19 sri ah
18:20 ariel the data in the database is utf8 i'm able to retrieve well even japanese names, i think is jquery
18:21 ariel btw, is there a way to force the content-type header from inside a mojo controller?
18:21 sri two ways actually
18:22 sri status => 'json' if you trust the MIME type module, or $self->res->headers->content_type(...) if you're a control freak
18:22 ariel thank you :)
18:22 sri ariel: well, utf8 and perl characters is not the same
18:23 sri you usually need to decode it before it can be used
18:23 sri from utf8 into perl chars
18:23 sri i'm not sure dbic does that automatically
18:23 sri otherwise you might get double encoded data
18:24 sri but i'm only guessing
18:24 ariel let me be honest, a couple of minutes ago i started a branch with DBI only
18:24 sri :)
18:24 ariel even when i found my way with DBIC i don't like the way the code looked like afterwards
18:24 sri you should still be aware of the encoding problematic
18:25 sri your utf8 data coming from the db is just bytes for perl by default
18:25 ariel treated as perl strings, right?
18:25 sri nope
18:25 sri well...kinda
18:26 sri a string of bytes, not characters
18:26 ariel i see
18:26 sri and the json encoder expects characters, so if your "strings* are not clean you get double encoding
18:27 sri it makes sense once you get used to it :)
18:27 ariel will i have to use something like Text::Iconv or can i simply use pack() or something like that?
18:27 sri utf8::decode $string will do
18:27 sri it's a builtin
18:28 ariel cool
18:28 sri bytes vs characters is one of the most common perl problems
18:29 sri builtin functions work differently depending in what mode your scalar is
18:29 ariel many languages have it hard to deal with that
18:30 sri yea
18:31 sri well, in mojolicious basically everything expects characters, so as long as you decode your input you should be fine
18:32 ariel i was tempted for a second to send the array returned by dbi::fetchall_arrayref() and send it directly to mojo::render_json()
18:33 ariel i guess i will have to add an intermediate step to convert all strings to utf8
18:33 sri possibly
18:33 sri from utf8 to perl chars you mean :)
18:33 ariel backwards
18:33 ariel i get perl chars from dbi, right?
18:34 sri i'm not sure, but i don't think so
18:34 sri should be bytes
18:34 sri maybe DBI has a utf8 switch to do automatic decoding
18:35 * sri has not been using databases directly for years
18:36 ariel it does have an utf8 switch in the mysql driver, checking for sqlite3
18:36 ariel that's driver specific
18:37 sri ah
18:38 ariel $dbh->{sqlite_unicode} = 1; $dbh->{sqlite_unicode} = 1;
18:38 ariel this did the trick  $dbh->{sqlite_unicode} = 1;
18:39 ariel vielen dank
18:39 sri :)
18:39 sri gern
18:44 spleenjack joined #mojo
18:58 yko joined #mojo
18:59 sri memowe: use your new macbook for writing patches! :)
18:59 * sri cracks the whip
19:11 _mpu sri you needed a regex fix, here is a funny one : http://www.reddit.com/r/programmin​g/comments/crmhe/regular_expressio​n_to_check_for_prime_numbers_1111/
19:11 garfield [ Regular Expression to Check For Prime Numbers -- /^1?$|^(11+?)\1+$/ : programming ]
19:11 garfield http://xrl.us/bhtv5x
19:11 sri :)
19:12 sri think i've seen that one before
19:12 _mpu oh, I was sooooo impressed :)
19:40 ask joined #mojo
19:42 memowe sri: yay, I will!
19:42 memowe But first I need to compile perl... :D
19:47 sri get homebrew
19:47 sri (for everything else than perl)
19:47 sri and of course textmate
19:47 sri http://mxcl.github.com/homebrew/
19:47 garfield [ Homebrew — MacPorts driving you to drink? Try Homebrew! ]
19:48 sri don't even think about getting macports :)
19:48 memowe sri: I know mate, but I like mvim more these days.
19:49 sri :O
19:49 memowe my fingers type O and :wq and :split.
19:49 memowe I don't.
19:49 ariel i prefer the plain old vim in Terminal
19:49 memowe So I have to use mvim.
19:50 memowe I'll try that brew thing.
19:55 vti macports!
19:55 vti they have everything i need
19:57 memowe vti: sri says brew!
19:57 sri brew!
19:57 sri macports suck...
19:57 memowe I used ports before, but sri says brew!
19:57 memowe And I'm his student!
19:57 * sri nods
19:58 memowe Oh, btw!
19:58 memowe Perl 5.12.1 :)
19:58 * memowe feels soooo perl s[ie]xy now
19:59 vti http://search.cpan.org/~xeno/Template-Plug​in-Haml-0.1.0/lib/Template/Plugin/Haml.pm
19:59 vti hahahahh!
19:59 garfield [ Template::Plugin::Haml - search.cpan.org ]
19:59 garfield http://xrl.us/bhtwbk
20:01 memowe OMFG. Installed perl and Pod::POM::Web and EVERYTHING is like before! <3 Apple's migration tools
20:01 memowe Even my complicated Apache VHost shit
20:02 memowe OK, have to load 2GB of software updates now...
20:02 memowe See you tomorrow :)
20:02 memowe *++
20:03 vti haml module is used twice on cpan! *dances*
20:19 GitHub0 joined #mojo
20:19 GitHub0 mojo: master Sebastian Riedel * 950398a (3 files in 3 dirs): added XML namespace support to Mojo::DOM - http://bit.ly/aueZne
20:19 GitHub0 left #mojo
20:19 sri only added it because the "hints" feature was needed for advanced pseudoclasses
20:20 sri but the parser can now cache meta information in the dom tree
20:22 sri it helps to understand xml namespaces before looking at the diff :)
20:23 vti ;p
20:24 sri i still refuse to add css selector support for namespaces though
20:24 sri but $element->namespace should always give you the namespace if one is available
20:25 sri not sure anyone would ever use it, i might kick it out again once we have pseudoclasses using hints ;p
20:44 GitHub98 joined #mojo
20:44 GitHub98 mojo: master Sebastian Riedel * d453882 (3 files in 3 dirs): Revert "added XML namespace support to Mojo::DOM" ... - http://bit.ly/b2I6Bq
20:44 GitHub98 left #mojo
20:44 sri can't think of a real use case
20:45 _mpu joined #mojo
20:59 sri hints are not needed, i can detect the namespace so much easier :S
21:06 GitHub38 joined #mojo
21:06 GitHub38 mojo: master Sebastian Riedel * 8ddcbc1 (3 files in 3 dirs): added XML namespace support to Mojo::DOM with a better implementation - http://bit.ly/bp0HpS
21:06 GitHub38 left #mojo
21:06 sri ok, thats better
21:11 GitHub52 joined #mojo
21:11 GitHub52 mojo: master Sebastian Riedel * c2f5d7c (1 files in 1 dirs): added more tests - http://bit.ly/cWCyLq
21:11 GitHub52 left #mojo
21:11 sri now it's just namespace detection basically, for those very very rare cases i can't think of :)
21:12 tempire joined #mojo
21:35 janus good to know :)
21:42 janus can of sandworms, actually... but once you've tasted the spice... ;)
21:42 sri heh
21:44 sri .co domains are now available
21:46 janus i want to get rid of cis.co already *scnr*
21:46 sri i tried to get that one too ;p
21:46 janus heh
21:51 xantus_ 33C in moscow today
21:51 xantus_ yow
21:51 yko last week was hottest in kiev for last 138 years
21:52 yko but in moscow it's even worse i belive. biggest city, more asfalt and beton
21:52 yko *bigger
21:53 yko it seems to me few days ago there was 37 in kiev. i switched to work at night and sleep almost all day last week
21:54 sri same here
21:54 sri few days ago we reached 40+
21:54 yko ouch...
21:54 yko i gonna drive to sea next week again, it's impossible to normal work in such env.
21:55 xantus_ people are dying of drinking and drowning
21:55 xantus_ wtf
22:00 janus sri: reading the css selector code i have to throw an idea: bound parameters
22:01 janus ... for search, that is
22:15 * yko think, if 43 routes isn't too much...
22:16 yko i should test, how mojolicious will behave with 1k routes :D
22:30 ltriant joined #mojo
22:31 sri yko: performance degrades with number of routes, unless you start nesting them
22:32 sri janus: feel free to make the code cleaner, it's all just a prototype atm :)
22:32 yko actually i have 3-4 routes. all other - nested
22:32 sri thats the right way
22:33 yko thanks, ill know it. just want to test and be shure i understand everything right
22:33 sri walking tree vs processing whole stack
22:36 ltriant joined #mojo
23:03 yko if bridge returns false, all following routes/wayp are ignored?
23:04 sri yes
23:04 yko looks like if bridge fails, but template exists it's being rendered anyway
23:04 sri thats possible
23:04 sri you are supposed to render something
23:06 yko i thought that rotes branch behind bridge are totally ignored if bridge fails, but renderer looks like using controller/action setting from routes begind bridge to determinate which template to render
23:06 sri renderer uses the stash
23:06 sri which has the final routes result
23:07 yko ill meditate on it.
23:07 sri :)
23:07 yko it looks not logical for me :(
23:07 sri bridges are not executed during the matching phase if thats what you think
23:08 sri the whole possible route gets calculated before your code runs
23:08 sri bridges only prevent actual execution
23:09 yko oooohh..... thats why....
23:09 yko ouch
23:09 yko i was thinking bridges are executed during match. my fail
23:10 yko anyway... i hoped following routing
23:10 yko $r->route('/')->to('example#welcome', id => 1);
23:10 yko $r->bridge->to('/', cb => sub { 0 }) ->route('/xxx')->to('example#welcome');
23:10 yko will render ok on / and render 404 on /xxx
23:11 yko so i should just static serve 404 in bridge and return 0 if i want to prevent rendering stashed template?
23:17 sri hmm
23:20 yko ill test it now, just fix some my own bugs :)
23:21 sri yko: ok, here's the deal, you write a test, i make it work :)
23:21 yko shure
23:22 sri there seems to be no reason to initialize the stash at once
23:22 yko first i want to determinate if i'm getting right how it should work
23:28 GitHub199 joined #mojo
23:28 GitHub199 mojo: master Sebastian Riedel * 6ba8808 (1 files in 1 dirs): cleanup - http://bit.ly/9PAJmp
23:28 GitHub199 left #mojo
23:29 sri yko: that should make it work, i expect a test from you
23:31 yko Im afraid, not today. Ill write it tomm, ok?
23:32 * sri cracks the whip
23:32 sri but just because it's you
23:32 yko :)
23:32 yko its great to be yko.
23:55 Alias_ joined #mojo

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