Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-12

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

All times shown according to UTC.

Time Nick Message
00:06 marty Don't you just love those moments when you look at your code and say "oh my god what was I thinking!"
00:16 Molaf__ joined #mojo
00:20 sri hehe
00:24 sri https://github.com/kraih/mango/commit/2​415f90d42fada73d5ba609faf54d254a26d8da8
00:24 sri not sure yet if this is a good or bad idea
00:26 sri in what format do you like your hires time in JavaScript?
00:26 sri float?
00:27 marty No particular preference for me.
00:28 marty I usually work with times in epoch seconds
00:28 * sri too, but i can see that millisecond precision might come in handy
00:28 * marty nods
00:29 marty yes, for high transaction rates, which I do not have.
00:29 marty but never hurts to have more.  :)
00:37 sri bson_time->to_epoch seems useless now, you can just do int(bson_time)
00:56 mattastrophe joined #mojo
00:56 jzawodn joined #mojo
01:01 heytrav joined #mojo
01:06 GabrielVieira joined #mojo
01:10 Miked joined #mojo
01:27 egopro joined #mojo
01:29 ka2u joined #mojo
01:54 tv joined #mojo
01:58 GabrielVieira2 joined #mojo
01:58 ka2u_ joined #mojo
02:02 d4rkie joined #mojo
02:26 basic6 joined #mojo
02:51 d4rkie joined #mojo
03:01 moltar joined #mojo
03:19 Miked joined #mojo
03:28 opendevbot joined #mojo
03:29 opendevbot joined #mojo
03:45 ka2u joined #mojo
03:58 opendevbot nice
03:58 opendevbot timestamps please
03:59 * opendevbot politely requests a version of Mojolicious that will run on rakudo
04:01 opendevbot only because perl6 and Mojolicious are both so very excellent and deserve to be together ... in the future ...
04:01 opendevbot some day ...
04:07 tempire When rakudo can support it, there will be one.
04:47 arpadszasz_ joined #mojo
04:56 Lurchentsafter joined #mojo
05:07 ka2u joined #mojo
05:12 ka2u_ joined #mojo
05:37 spleenjack joined #mojo
05:52 mattastrophe joined #mojo
06:40 dod joined #mojo
06:52 dod joined #mojo
06:55 yakudza joined #mojo
07:08 Mike-PerlRecruiter_ joined #mojo
07:08 Vandal joined #mojo
07:21 ask joined #mojo
07:46 dod joined #mojo
07:51 dhg joined #mojo
07:55 basic6 joined #mojo
08:35 dod joined #mojo
08:35 andrefs joined #mojo
08:37 marcus sri: https://developer.mozilla.org/en-US/docs/​JavaScript/Reference/Global_Objects/Date javascript wants an int with milliseconds since 1970 for hires.
08:48 ladnaV joined #mojo
08:50 suy joined #mojo
08:59 dotan joined #mojo
09:05 fhelmber_ joined #mojo
09:11 mugenken joined #mojo
09:14 dod joined #mojo
09:24 hrupp joined #mojo
09:26 bd joined #mojo
09:26 bd hello
09:40 Vandal joined #mojo
09:55 KindTwo joined #mojo
09:57 ladnaV joined #mojo
09:58 ObseLeTe joined #mojo
10:00 nic joined #mojo
10:02 nelio joined #mojo
10:08 marty hi bd
10:27 nelio joined #mojo
10:37 daxim joined #mojo
10:41 kitt_vl joined #mojo
11:03 dod joined #mojo
11:04 arpadszasz_ joined #mojo
11:23 spleenjack joined #mojo
12:13 maxhq joined #mojo
12:22 suy joined #mojo
12:22 dvinciguerra_ joined #mojo
12:38 judofyr joined #mojo
12:57 sri marcus: hmm, so you think i should undo the change?
13:05 ka2u joined #mojo
13:07 dpetrov_ joined #mojo
13:12 dvinciguerra__ joined #mojo
13:14 sri https://github.com/kraih/mango/commit/0​512d29a7a269ff7826b8916712b4655c4f49b0b
13:26 d4rkie joined #mojo
13:39 _visu joined #mojo
13:40 inokenty joined #mojo
13:46 moltar joined #mojo
13:50 Britzel_ joined #mojo
13:50 spleenjack joined #mojo
13:51 mattastrophe joined #mojo
13:52 mire joined #mojo
14:13 gryphon joined #mojo
14:17 andrefs joined #mojo
14:18 Skylos_ joined #mojo
14:25 andrefs joined #mojo
14:32 bd i am getting 404s when serving content from public if the file is in public/css/foo/bar.js it works for public/css/bar.js
14:33 bd wait, may be PEBCAK
14:35 bd nope I can reproduce it
14:36 Miked joined #mojo
14:37 ryozi joined #mojo
14:38 andrefs joined #mojo
14:41 * bd hides in a corner
14:44 dvinciguerra_ joined #mojo
14:46 andrefs joined #mojo
14:54 marty bd: sounds like your route may be incorrect.
14:55 bd marty: kind of, public was in the wrong place (filesystem wise)
15:11 Molaf_ joined #mojo
15:12 pierrick joined #mojo
15:14 ObseLeTe joined #mojo
15:15 Vandal joined #mojo
15:18 pierrick hi, i have a route $r->get('/contact')->to('root#contact'); when i hit http://domain.com/contact.test ( error in backlink ) , i have an error template contact.test.ep not found !( i just want forward to my default route to have a 404)  it's something new in routing or i miss something in docs ?
15:19 judofyr pierrick: I think you can do `$r = $r->bridge(format => 0)` to disable the format detection
15:20 pierrick judofyr: thanks i ll try that
15:20 judofyr pierrick: that will also disable /contact.html and /contact.js (if you're using that)
15:20 ka2u joined #mojo
15:21 pierrick judofyr: ok not a problem for me i think .. i hope :)
15:22 wircus Seems chrome and web sockets have some trouble with unicode. :-/
15:22 wircus https://github.com/sockjs/sockjs-node/issues/27
15:22 dhg joined #mojo
15:23 pierrick judofyr: it's work as expected thanks
15:28 sri wircus: not surprising that there are still bugs, at least this test case works :) https://github.com/kraih/mojo/bl​ob/master/examples/websocket.pl
15:29 marty anyone know how to render partial all files in a directory.   something like %== include '/foo/bar/*', format => 'js';
15:30 wircus sri: yeah, I see that when I've left my chat client alone for a long time I suddenly see those 'could not decode unicode frame' work everything, and I can't send messages anymore and have to reload.
15:30 sri odd
15:31 wircus like https://www.evernote.com/shard/s22/sh/64dbfa37-0f5​a-43cb-bea9-c6933435bbd4/acd601656f2b85e12d9942e39​387d3a3/deep/0/Screenshot%2012.02.13%2016:17.jpg
15:32 sri btw. any other opinions on Mojo::UserAgent->put_json/patch_json?
15:34 wircus sri: I'd rather have put_form
15:34 sri eeeep
15:34 wircus :D
15:35 wircus sri: http://pastie.org/private/91vxbm3nbrdqnyov19owa
15:36 * sri runs away
15:36 * wircus sends the ferrets after sri.
15:43 whee left #mojo
15:44 sri put_json, patch_json, put_form, patch_form, put_json_ok, patch_json_ok, put_form_ok, patch_form_ok... seriously?
15:44 yakudza joined #mojo
15:44 judofyr I want get_json too
15:45 judofyr :D
15:49 rwstauner joined #mojo
15:55 TitanOfOld joined #mojo
15:57 labrown joined #mojo
16:14 janus why bother at all? that would also unify for any ever used method
16:14 dvinciguerra__ joined #mojo
16:17 judofyr what about post($url, form => …) and post($url, json => …) ?
16:18 jberger_ joined #mojo
16:19 jberger_ sri: I have a question
16:19 jberger_ once a websocket connection is opened between a client and a server worker
16:20 jberger_ that connection is between those same two until the connection is closed, correct?
16:21 sri correct
16:21 jberger_ I haven't seen any data mangling yet, but have seen some messages get repeated in a way that got me nervous
16:22 jberger_ I'm working on a Perl command line send client
16:22 sri well, you can always check what mojolicious does with MOJO_WEBSOCKET_DEBUG=1
16:22 jberger_ that way I would have two available clients, shows the flexibility
16:22 jberger_ yeah I probably should do that
16:24 jberger_ and fwiw, I think you are probably ok to remove some of the lesser used methods
16:24 jberger_ put/patch etc
16:25 jberger_ as long as there's a good example of how to select the one you want somewhere nearby
16:32 bd it seems like Mojo::IOLoop->recurring() is not executed when running under apache/cgi. running the script from morbo works.
16:32 bd any tips on how to debug this?
16:33 judofyr sri: what do you think about this approach? http://hastebin.com/yeyukadovu.diff ->post("…", form => { a => 1 }, encoding => 'UTF-8');  and ->put("…", json => { a => 1})
16:33 judofyr sri: all tests still pass
16:34 judofyr bd: Mojo::IOLoop isn't running under CGI
16:35 judofyr bd: there's really nothing you can do about it
16:35 mattastrophe joined #mojo
16:36 sri judofyr: i think that breaks test descriptions
16:36 sri or wait...
16:36 sri those have none
16:36 judofyr test descriptions?
16:37 bd judofyr: that could be it ;)
16:37 judofyr anyway, gotta go
16:38 sivoais joined #mojo
16:39 sri i suppose it would work
16:40 dhg joined #mojo
16:41 dod joined #mojo
16:49 dpetrov_ joined #mojo
16:51 jberger_ sri: I get this odd problem
16:52 jberger_ I'm essentially following the example here: https://metacpan.org/module​/Mojo::UserAgent#websocket
16:52 jberger_ this is the output I get:
16:52 jberger_ http://pastie.org/6135166
16:53 jberger_ and here is the code/line: https://github.com/jberger/GalileoSend/b​lob/master/example/shell_client.pl#L136
16:54 jberger_ oddly it sits there until the timeout BEFORE the error message
16:54 jberger_ do you have any thoughts?
16:55 mire joined #mojo
16:58 sri jberger_: umm, when you're done you have to stop the event loop again
16:58 jberger_ how do I know when I'm done
16:58 sri that error is prolly just some destruction oddity
16:59 sri you tell me ;p
16:59 * jberger_ is still getting used to this non-blocking
16:59 jberger_ haha
16:59 tempire sri: fyi, you can't like the mango article if using twitter sign on.
16:59 jberger_ yeah, I'll work that one out on my own
16:59 tempire or "heart" it, in posterous' case
16:59 sri tempire: :O
16:59 jberger_ tempire, I saw that too btw
16:59 sri twitter fricking owns posterous
17:00 Skylos_ $$$.  :/
17:00 * Skylos_ thumps tempire.
17:06 arpadszasz_ joined #mojo
17:07 xaka joined #mojo
17:07 ka2u joined #mojo
17:08 dvinciguerra_ joined #mojo
17:09 inokenty jberger_: sub setup_ws (_) {  -  how did you know this? I can't find any information about '_' prototype in perldoc =)
17:12 inokenty Oh, never mind. I found it
17:13 jberger_ inokenty, yeah, its a cute cheater
17:13 jberger_ I wouldn't use that in anything bigger than this
17:24 dvinciguerra__ joined #mojo
17:37 dvinciguerra_ joined #mojo
17:43 sri marcus, tempire, crab: what are your thoughts on judofyrs proposal?
17:43 wircus sri: +1 from me.
17:43 sri it would mean the deprecation of post_form and post_json i suppose
17:44 kbenson joined #mojo
17:44 wircus hmm,guess I should stop znc and switch to 'marcus' on this client. even works for android now.
17:44 mire joined #mojo
17:46 tempire I like the direction.
17:46 tempire Though I would really like to see the ability to plugin in formats
17:46 sri tempire: very possible
17:47 sri $ua->transactor->add_format(foo => sub {...})
17:47 wircus sri: yeah. pretty big deprecation. but the alternative seems to be to add  shitload of new methods. his proposal seems cleaner.
17:47 sri wircus: agreed, and pluggable
17:47 sri format is not the right term though... hmm
17:47 sri maybe add_builder or so
17:48 wircus generator
17:48 sri dunno, we use the term build consistently so far
17:48 wircus form generator,json generator, xml generator
17:49 sri perhaps generator would help differentiating
17:49 wircus form builder seems a bit strange.
17:49 wircus building transactions make sense.
17:50 * sri nods
17:51 * sri is starting to really like the idea of pluggable generators
17:56 jberger_ build_form?
18:05 knight joined #mojo
18:17 sri wow, that's a hell of a lot of deprecation warnings, on 3 layers :)
18:27 jberger_ sri: $ua->websocket( $url, $cb ), when does $cb get invoked?
18:27 jberger_ I can't get it to fire
18:27 jberger_ I may be doing something very wrong, but grrrrr
18:28 * sri is busy with the pluggable generator thing
18:28 kbenson left #mojo
18:29 crab what are pluggable generators?
18:30 sri $ua->transactor->add_generator(foo => sub {...}); $ua->get('/test', foo => {does => 'stuff with this hash'});
18:30 sri json and form are just generators
18:31 sri $ua->post('/test' => json => {lalala => 1});
18:31 sri or $ua->post('/test', json => {lalala => 1}); i suppose :)
18:32 sri works for all methods
18:32 sri $t->put_ok('/test', form => {lalala => 23});
18:33 sromanov joined #mojo
18:33 crab ahh
18:34 sh4 joined #mojo
18:35 * sri wonders if f() in ojo needs a deprecation or can just be removed
18:39 sri hahaha
18:39 sri deprecation warnings on 5 layers!
18:55 TitanOfOld joined #mojo
18:57 sri results are very promising so far, event the complicated charset tests work
19:00 rem_lex|pivo joined #mojo
19:09 Mike-PerlRecruiter_ joined #mojo
19:12 mattastrophe joined #mojo
19:20 * bd fights with mod_proxy
19:21 bd I seem to be unable to get /public and form_for to work both at the same time
19:21 bd redirects and static files from public work now, but form_for misses the "base path" under which apache proxies to ::daemon
19:22 yko joined #mojo
19:22 bd when adding $self->req->url->base->path->parse('/wakeonlan'); to before_dispatch form_for creates the correct path, but /public can no longer be acccessed as paths look like /wakeonlan/wakeonlan/css/...
19:23 jberger_ parse changes the base path, is that what you want?
19:24 bd i am not sure anymore :). i want to have an apache on port 80 and my ::lite app reachable under /wakeonlan/
19:25 jberger_ or, the stored path in $app->static->paths is absolute
19:25 jberger_ and you might want to try checking that
19:27 bd that is an array containing '/var/www/wakeonlan/bin/public'
19:29 jberger_ make sure it point where you want it to point
19:30 jberger_ actually I'm not sure I'm following you correctly
19:31 bd honestly, no idea why i need to touch that, none of the dokus I read mention it
19:31 jberger_ but that array must contain the correct path for the static renderer to find it
19:31 bd i tried following https://github.com/kraih/m​ojo/wiki/Apache-deployment but that does not work for me for a number ofreasons
19:31 bd well the path is correct, the url is not
19:32 jberger_ ok, so ignore my steps down that path
19:32 bd you know what, i am calling it quits for today and I'll try to create a minimal testcase tomorrow and pasteie it somehwere
19:32 jberger_ that would be good
19:32 jberger_ better luck tomorrow!!
19:33 bd thanks, I'll drink a lucky beer later ;)
19:35 mire joined #mojo
19:38 jberger_ :-)
19:38 jberger_ mmmmmm beer
19:45 knight joined #mojo
19:52 mire joined #mojo
19:55 zivester joined #mojo
19:55 bluescreen joined #mojo
19:59 r0b3rt joined #mojo
20:09 DaTa joined #mojo
20:11 good_news_everyone joined #mojo
20:11 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/EgIjzw
20:11 good_news_everyone mojo/master 38ff5c3 Sebastian Riedel: added pluggable generator system to Mojo::UserAgent::Transactor
20:11 good_news_everyone left #mojo
20:11 sri marcus, tempire, crab: REVIEW!
20:12 sh4|2 joined #mojo
20:21 good_news_everyone joined #mojo
20:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/P5EtKg
20:21 good_news_everyone mojo/master dbaf296 Sebastian Riedel: test tweaks
20:21 good_news_everyone left #mojo
20:22 sri https://github.com/kraih/mojo/blo​b/master/t/mojo/transactor.t#L13
20:22 sri this is how you add generators
20:24 phillipadsmith Quick question: I'm using Plack w/ Mojolicious to make use of the debug panels, however I can't seem to get the plackup -r or -R options to work properly, i.e., I'd like them to watch the templates/ directory for changes too. Tips?
20:25 ObseLeTe joined #mojo
20:26 fhelmber_ joined #mojo
20:31 good_news_everyone joined #mojo
20:31 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/XSPysQ
20:31 good_news_everyone mojo/master c82b314 Sebastian Riedel: updated a few examples
20:31 good_news_everyone left #mojo
20:31 sri that last commit shows the differences pretty well
20:35 phillipadsmith sri: pointers on the reloading question above?
20:35 phillipadsmith Happy to hop into #Plack if that's the best spot to ask
20:35 * sri is busy with generators
20:35 * phillipadsmith understands...
20:36 lukep joined #mojo
20:43 phillipadsmith Question answered by the man himself. :)
20:43 lukep joined #mojo
20:45 GabrielVieira joined #mojo
20:50 jnbek joined #mojo
20:54 rem_lex joined #mojo
20:54 laidback_01 joined #mojo
20:58 knight joined #mojo
21:02 judofyr joined #mojo
21:04 judofyr did I just manage to sneak in deprecations all over Mojo?
21:04 sri looks that way ;p
21:08 KindOne joined #mojo
21:09 * judofyr winning
21:09 sri judofyr++
21:15 nelio joined #mojo
21:20 xaka joined #mojo
21:23 good_news_everyone joined #mojo
21:23 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/lTbHMA
21:23 good_news_everyone mojo/master dc9b3a4 Sebastian Riedel: documentation tweaks
21:23 good_news_everyone left #mojo
21:23 fhelmbe__ joined #mojo
21:27 BeDa joined #mojo
21:33 priodev joined #mojo
21:40 wircus judofyr: Guess you'll update all the nordaaker codebases with the new syntax then? ;-)
21:41 wircus all your codebases are belong to us!
21:41 sri :D
21:44 marcus woot woot
21:44 marcus ok, let's hope wirc works well now, just killed my znc :)
21:45 zivester joined #mojo
21:50 good_news_everyone joined #mojo
21:50 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/9aFI3A
21:50 good_news_everyone mojo/master 2a42051 Sebastian Riedel: added content generator recipe to cookbook
21:50 good_news_everyone left #mojo
21:50 sri ok, that should get the point across :)
21:52 sri hmm, i guess "stream" is a better name for the generator
21:52 marcus Yeah
21:53 * marcus expects to see a soap generator on cpan soon.
21:53 * sri rips generators out of mojolicious again
21:53 marcus :D
21:54 mire joined #mojo
21:54 jberger_ I like it
21:55 Skylos what do generators do
21:56 marcus Skylos: generate request bodies.
21:58 good_news_everyone joined #mojo
21:58 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pD1dZQ
21:58 good_news_everyone mojo/master 9c5776f Sebastian Riedel: better generator recipe
21:58 good_news_everyone left #mojo
21:58 sri http://mojolicio.us/perldoc/Mojolicio​us/Guides/Cookbook#Content_generators
21:59 alester joined #mojo
22:00 cfedde is there a missing '>' in that call to add_generator?
22:00 sri :S
22:01 cfedde I for one would vote for a syntax change where = is the same as => because I tyoe it that way often enough.
22:01 Skylos hmm.
22:01 good_news_everyone joined #mojo
22:01 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/d4iKVA
22:01 good_news_everyone mojo/master 0eaddc6 Sebastian Riedel: fixed typo in recipe
22:01 good_news_everyone left #mojo
22:06 good_news_everyone joined #mojo
22:06 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/H64Agw
22:06 good_news_everyone mojo/master ddcaf1a Sebastian Riedel: updated synopsis examples
22:06 good_news_everyone left #mojo
22:13 KindOne joined #mojo
22:14 tempire excellent.
22:14 tempire the first step to useragent plugins.
22:14 tempire \o/
22:15 * tempire wonders if generator is the right name
22:15 * sri shrugs
22:18 tempire thesaurus lists magneto as a synonym to generator
22:19 KindTwo joined #mojo
22:20 sri filter?
22:20 sri i guess not really
22:20 tempire sift
22:21 tempire strain
22:21 sri rainbows
22:21 tempire amalgamate
22:23 baton8 joined #mojo
22:24 tempire mapping
22:24 tempire transform
22:24 sri transformers
22:24 tempire I kind of like that
22:25 tempire transmute
22:25 tempire mogrify
22:25 sri add_transformer
22:25 * sri prefers generator
22:26 tempire transformer implies from one format to another
22:26 tempire so that could be confusing
22:26 tempire transmute makes the most sense.
22:26 tempire but it may be too obscure of a word.
22:28 sri so far we have add_helpers, add_handler, add_shortcut and add_condition
22:30 mattastrophe joined #mojo
22:33 * Skylos tries to define an abstract interface for adding things.
22:33 Skylos no, wait.  that might be too many abstractions
22:48 sivoais joined #mojo
22:58 rwstauner joined #mojo
23:05 mattastrophe joined #mojo
23:08 vervain joined #mojo
23:20 mattastrophe joined #mojo
23:25 KindOne joined #mojo
23:32 jberger sri: so I made a simple test case : https://gist.github.com/jberger/4774073
23:32 jberger which works
23:32 jberger and kept cutting my real-world script back until I had literally nothing more than that
23:32 sri stop right there
23:33 sri client_close is not enduser api
23:33 jberger and thats when I realized that I was entering the wrong url
23:33 jberger ok so how do I close the websocket? its documented and says for implementing useragents which I'm doing
23:34 sri surely you're not implementing a user agent
23:34 sri you're *using* one
23:34 sri it's always ->finish
23:34 vervain joined #mojo
23:36 jberger ok, well I'll change that
23:36 jberger for the purposes of this discussion it wasn't the problem
23:36 jberger the problem was I had pointed it at the HTML frontpage, not the websocket url
23:38 jberger and I stand corrected, its not documented
23:38 jberger I had read the source so many times I got confused
23:38 jberger my bad
23:39 sri if it's public api it has to be documented
23:39 jberger I guess that makes it double facepalm
23:40 jberger no you were right, its not documented
23:40 jberger other client_* are, and I must have been reading the source and saw it
23:45 jberger all use of client_close removed
23:52 mattastrophe joined #mojo
23:54 good_news_everyone joined #mojo
23:54 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/SVm_Hg
23:54 good_news_everyone mojo/master f609f33 Sebastian Riedel: test tweaks
23:54 good_news_everyone left #mojo
23:54 sri unless there are complaints i'll release mojolicious 3.85 in a bit
23:59 jberger quite a changelog entry
23:59 jberger :-)
23:59 jberger I like it a lot

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