The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2015-05-16

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

All times shown according to UTC.

Time Nick Message
00:00 nf joined #mojo
00:02 sri cool how the rust folks have actually hired a writer to make a book they can ship with the language http://doc.rust-lang.org/stable/book/README.html
00:10 jb360 joined #mojo
00:43 tempire neat
00:43 erik joined #mojo
00:50 Grinnz makes some pretty bold claims, but sounds cool
00:51 Grinnz at this point i'll take anything that purports to replace C in a sane way :P
01:01 nf joined #mojo
01:48 kopekru joined #mojo
01:49 kopekru joined #mojo
01:58 klapperl_ joined #mojo
02:03 noganex_ joined #mojo
02:03 nf joined #mojo
02:36 erik joined #mojo
02:45 lluad joined #mojo
03:16 erik would anyone be able to give me some pointer troubleshooting websockets with mojo?
03:20 Grinnz if you ask your question someone will help if they can.
03:21 erik thanks, so i'm trying to understand when the finish callback should be called
03:21 erik i have mojo behind an apache proxy
03:21 Grinnz you mean the finish event of the controller?
03:21 erik yeah
03:22 Grinnz er
03:22 Grinnz well the controller has a finish method, which will actually send the closing event
03:23 Grinnz and there's a finish event on the transaction, which you subscribe to with $c->on(finish => ...)
03:23 Grinnz is the latter what you're asking about?
03:23 erik ok, so i have a $c->on( finish => sub { warn ... } )
03:23 erik and i'm just using mojo in a script to test, sending messages
03:24 erik when i ctrl-c the script i was hoping that would trigger the finish
03:24 basic6_ joined #mojo
03:24 Grinnz that is this event: https://metacpan.org/pod/Mojo::Transaction::WebSocket#finish
03:24 erik but i might be misunderstanding when the event gets fired
03:24 Grinnz to trigger the finish you should actually close the websocket normally
03:24 Grinnz by sending a close code
03:25 erik ah, ok
03:25 Grinnz i'm not sure if it gets triggered when the connection is lost
03:25 Grinnz is the test script running both the client and server? or just client
03:25 erik test script is running the client
03:26 Grinnz if it's a Test::Mojo like script runnign both, then ctrl-c will kill them both before the finish event can be emitted anyway
03:26 erik and then there is a separate mojo server
03:26 erik yeah, just killing the client
03:26 erik you happen to know if there is another way i could detect a lost connection?
03:27 erik i have a recurring IO loop that is sending mesages
03:28 erik and when the connection is lost, it continues to try to send messages
03:28 erik i was thinking maybe i could put the clean up code in there if there is a way to detect that the connection is lost
03:30 erik this is the first time i'm using websockets and first time i'm using mojo...
03:34 Grinnz i'm not sure if there is a generic way to tell
03:35 erik so in the context of an actual browser, if i close the tab will it send a closing event?
03:36 erik or is that something that is done explicitly?
03:41 sri Grinnz: close frame is irrelevant for the event
03:42 Grinnz i thought so but i can't figure out where its actually sent
03:43 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Transaction/WebSocket.pm#L233
03:46 erik is server_close something that is called explicitly?
03:50 sri no
03:50 erik i guess my question is, should i expect finish to be emitted when a connection is lost?
04:05 nf joined #mojo
04:08 sri that's what i said before
04:11 erik so what should i look at next if the finish is not be emitted?
04:12 erik does it have to do with the proxy?
04:14 sri does apache even support websockets?
04:14 erik http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html
04:14 erik That's what i'm using
04:14 Grinnz sort of if yuou have 2.4
04:15 erik sending messages is working in both directions
04:27 erik ok, thanks, i'll play around with this some more
04:42 kaare joined #mojo
04:57 polettix joined #mojo
05:06 nf joined #mojo
05:07 davido_ joined #mojo
05:10 davido__ joined #mojo
05:45 nf joined #mojo
05:49 kopekru joined #mojo
05:57 Oleg joined #mojo
06:28 dod joined #mojo
06:28 dod joined #mojo
06:34 dod joined #mojo
07:21 dod1 joined #mojo
07:38 polettix joined #mojo
07:42 kyshtynbai joined #mojo
07:43 sh4 joined #mojo
07:44 kyshtynbai left #mojo
07:44 kyshtynbai joined #mojo
07:44 kyshtynbai left #mojo
07:44 kyshtynbai joined #mojo
07:46 kyshtynbai Guys, I sometims write the following code in template files: <% do { %> <some><tags> <% } if (some condition); %> . Is it ok to do so or maybe there are some other ways of generating content which depends on user's previous actions or something like this?
08:11 amon joined #mojo
08:20 Vandal31341 joined #mojo
08:25 nf joined #mojo
08:44 berov joined #mojo
09:08 nf joined #mojo
09:50 KindOne joined #mojo
09:53 mattastrophe joined #mojo
11:09 tardisx joined #mojo
11:17 dod joined #mojo
11:17 nf joined #mojo
11:45 nf joined #mojo
12:03 ToApolytoXaos joined #mojo
12:15 nf joined #mojo
12:29 nf joined #mojo
13:01 nf joined #mojo
13:10 trone joined #mojo
13:12 mattastrophe joined #mojo
13:15 trone joined #mojo
13:17 good_news_everyon joined #mojo
13:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vTve1
13:17 good_news_everyon mojo/master a66401d Sebastian Riedel: mention that it might not be possible to render the same message twice
13:17 good_news_everyon left #mojo
13:24 Oleg joined #mojo
13:29 nf joined #mojo
13:30 AirDisa joined #mojo
14:22 dvinciguerra joined #mojo
14:40 sri i still don't like that warning
14:40 sri there's like a dozen similar methods
14:46 sri actually, i think i'm going to deprecate those methods
14:46 sri they are obviously too hard to use for normal users
14:57 sandeep joined #mojo
15:06 mst sri: which ones? (sorry, don't immediately see it in scrollback)
15:12 stl joined #mojo
15:16 sri just stuff nobody really cares about
15:31 good_news_everyon joined #mojo
15:31 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vTvii
15:31 good_news_everyon mojo/master f918a4d Sebastian Riedel: deprecate build_body and build_headers methods in Mojo::Content
15:31 good_news_everyon left #mojo
15:31 sri this one was easy
15:31 sri Mojo::Message::to_string/build_body/build_headers/build_start_line are a little more heavily used
15:33 asarch joined #mojo
15:40 ajr_ joined #mojo
15:43 ajr_ joined #mojo
15:47 mattastrophe joined #mojo
15:49 dod joined #mojo
15:58 disputin joined #mojo
16:02 kaare joined #mojo
16:06 AirDisa joined #mojo
16:14 good_news_everyon joined #mojo
16:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vTvdW
16:14 good_news_everyon mojo/master 04c12ef Sebastian Riedel: start_line_size is now an abstract method
16:14 good_news_everyon left #mojo
16:14 sri actually, i have no clue how to document the behavior
16:14 sri methods like header_size also finalize the request/response
16:15 sri Mojo::Message::build_start_line and friends are actually useful for testing :S
16:16 sri like the progess event
16:44 good_news_everyon joined #mojo
16:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vTfe1
16:44 good_news_everyon mojo/master 006f7b8 Sebastian Riedel: add a lot of warnings
16:44 good_news_everyon left #mojo
16:58 Adura joined #mojo
17:05 odin22 joined #mojo
17:17 davido___ joined #mojo
17:46 jb360 joined #mojo
17:50 nf joined #mojo
17:58 human39 joined #mojo
18:00 good_news_everyon joined #mojo
18:00 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vTf8S
18:00 good_news_everyon mojo/master b53da2e Sebastian Riedel: test dynamic content
18:00 good_news_everyon left #mojo
18:51 nf joined #mojo
18:59 ToApolytoXaos joined #mojo
19:03 AirDisa joined #mojo
19:33 jberger so then to_string is staying and the other methods that freeze the message are being removed?
19:38 sri undecided
19:38 purl hmmm... undecided is almost by definition a person watching TV to figure out how to vote.
19:50 jberger at some point, when I'm less busy, and mostly just for the learning experience, I'd like to implement another framework on top of Mojo
19:51 jberger Not even sure to what end
19:52 nf joined #mojo
19:54 Adura Jojo
19:55 jberger hehe
20:12 * sri watches marcus play hearthstone
20:13 * jberger hopes that sri isn't actually playing against marcus while saying that
20:28 sri not this time ;p
20:31 sri jberger: btw. removing them all is impossible
20:32 sri only Mojo::Message::to_string/build_start_line/build_headers/build_body could be removed
20:35 sri they are kinda convenient for debugging/testing though
20:36 jberger then perhaps back to the original plan of putting great big warnings in the doc
20:36 jberger ?
20:38 sri hehe, you didn't follow the commit stream
20:39 sri first i did https://github.com/kraih/mojo/commit/f918a4df62f33441097e14d9d948acf2c9628142
20:39 sri then https://github.com/kraih/mojo/commit/006f7b8f7e6a9724ab2dd03a2900527e81402a52
20:40 jberger aha! sorry I guess I did
20:40 jberger (did miss them, damn I need a nap)
20:41 jberger (to much driving)
20:41 jberger too!
20:41 jberger balls
20:49 mattastrophe joined #mojo
20:53 nf joined #mojo
21:54 nf joined #mojo
22:13 good_news_everyon joined #mojo
22:13 good_news_everyon [mojo] kraih tagged v6.11 at 3f2a6d9: http://git.io/vTJP2
22:13 good_news_everyon left #mojo
22:14 good_news_everyon joined #mojo
22:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vTJPy
22:14 good_news_everyon mojo/master c0564c3 Sebastian Riedel: bump version
22:14 good_news_everyon left #mojo
22:42 d4rkie joined #mojo
22:49 D4RK-PH0ENiX joined #mojo
22:52 mattastrophe joined #mojo
22:54 nf joined #mojo
23:24 trone joined #mojo
23:28 trone joined #mojo
23:40 asarch joined #mojo
23:55 nf joined #mojo

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