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

IRC log for #mojo, 2014-06-25

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

All times shown according to UTC.

Time Nick Message
00:11 shmuel joined #mojo
00:32 jnbek joined #mojo
00:54 d4rkie joined #mojo
00:57 laouji joined #mojo
01:14 klapperl_ joined #mojo
01:31 bowtie joined #mojo
01:35 meshl joined #mojo
01:37 meshl joined #mojo
01:40 tianon omg, just got through my backlog enough to see Mango 1.0! belated \o/!!!
02:05 d4rkie_ joined #mojo
02:08 alnewkirk joined #mojo
02:10 zivester joined #mojo
02:12 Averna joined #mojo
02:19 mishin joined #mojo
02:30 fhelmber_ joined #mojo
02:33 d4rkie joined #mojo
02:38 * jberger sets tianon on fire, on principal
02:49 tianon :D
02:49 tianon <3
03:12 disputin joined #mojo
03:18 tianon really, take your pick of http://unicodeheart.com/
03:19 tianon
03:58 mishin joined #mojo
03:58 d4rkie_ joined #mojo
03:59 Ptolemarch joined #mojo
04:02 nmishin joined #mojo
04:22 mattastrophe joined #mojo
04:29 irq joined #mojo
04:36 disputin joined #mojo
04:37 d4rkie joined #mojo
04:54 Ptolemarch joined #mojo
05:06 laouji joined #mojo
05:43 cpan_mojo Statocles 0.014 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.014 (depends on Mojolicious)
05:49 Ptolemarch joined #mojo
05:49 D4RK-PH0ENiX joined #mojo
06:02 sujithm joined #mojo
06:08 dod joined #mojo
06:09 denis_boyun joined #mojo
06:18 dod joined #mojo
06:26 sugar joined #mojo
06:36 igorsutton joined #mojo
06:42 rem_lex joined #mojo
06:43 Ptolemarch joined #mojo
06:57 denis_boyun joined #mojo
07:03 irq joined #mojo
07:03 basiliscos joined #mojo
07:04 eseyman joined #mojo
07:18 Vandal joined #mojo
07:27 rawler joined #mojo
07:37 Ptolemarch joined #mojo
07:42 trone joined #mojo
07:43 dpetrov_ joined #mojo
07:50 meshl joined #mojo
07:51 d^_^b joined #mojo
07:59 mire joined #mojo
08:03 kyshtynbai joined #mojo
08:22 trone joined #mojo
08:27 trone joined #mojo
08:31 fhelmber_ joined #mojo
08:31 Ptolemarch joined #mojo
08:42 sujithm_ joined #mojo
08:45 sujithm joined #mojo
08:48 john joined #mojo
08:50 john How might I go about getting Mojo (prob the lite version) to return no headers, just the response body?
08:50 john ANy idea, please?
08:50 purl somebody said ANy idea was welcomed.
08:52 batman john: why do you want this?
08:52 john Because a customer, bless him, has an app that he wants to interface to ours, but he can't handle headers.
08:53 john It is valid according to the rfc, although somewhat retarded, imo.
08:53 batman doesn't talk http?
08:53 john I have a feeling he has written the client himself
08:54 batman so you just want the template over tcp? you don't even get http in..?
08:55 trone joined #mojo
08:55 john it is http. It's a webservice, he just wants the response to contain the body, no headers.
08:55 john http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6
08:56 john Currently our web app is nginx and rails, but it's proving difficult, so I was going to suggest a little mojo lite server to handle his request.
08:57 batman i haven't tried this myself, but you could do $c->res->header(Dummy::Header->new); where Dummy::Header does sub to_string { "" }
08:57 batman haven't tried it myself though...
08:58 john Great stuff. I'll give it a whirl.
08:58 john Thank you for your time.
08:59 nic If it doesn't work, give your client a whirl.. off a cliff
08:59 john Heh, if only.
08:59 john Will be nice to stick one up rails though...
09:00 batman john: you need to define Dummy::Header yourself
09:01 john Ah yes, I see.
09:04 jihde joined #mojo
09:05 jihde howdy :)
09:08 jihde yay for touring the earth during corporate turmoil
09:16 batman john: can you live with the status line?
09:16 batman "HTTP/1.1 200 OK" <-- that
09:16 john Yes, status line is fine. Well I hope it is, it's mandatory.
09:16 purl Since Tue Aug 13 05:43:03 2013, there have been 20488 modifications and 7366 questions.  I have been awake for 316 days, 3 hours, 33 minutes, 51 seconds this session, and currently reference 961723 factoids. Addressing is in optional mode.
09:17 batman john: hehe
09:17 john I currently have:
09:17 john my $h = Mojo::Headers->new();
09:17 john $self->app->log->debug($h->to_string);
09:17 john $self->res->headers($h);
09:17 john to string is returning empty.
09:18 john but the response still contains headers.
09:18 batman john: do not ever paste more that one line
09:18 batman use a pasting service
09:18 john Ok, sorry.
09:18 john Not au fait with irc etiquette.
09:18 batman http://p.thorsen.pm
09:19 batman paste?
09:19 purl it has been said that paste is http://paste.scsys.co.uk/
09:20 john http://p.thorsen.pm/76260c64c756
09:22 batman john: https://gist.github.com/jhthorsen/75e51a92f4e0f589a44f
09:26 Ptolemarch joined #mojo
09:30 john Excellent!!
09:31 john That works a treat.
09:31 firnsy batman++ # my $c = shift;
09:31 batman john: glad i could help :)
09:31 batman firnsy: hehe
09:32 john Curl hangs at the end and eventually drops the connection, but that's their problem :)
09:32 john Thank you batman, great help!
09:34 batman john: maybe "curl -v ..." will give you some output
09:35 john Yeah, am doing curl -vvvv, and I get * no chunk, no close, no size. Assume close to signal end
09:35 john Then it times out, but that is fine
09:35 batman john: also, the command above "app->start" will actually give you the output to screen
09:35 batman MOJO_USERAGENT_DEBUG=1 perl without_header.pl get "/?x=1"
09:36 john Thanks batman, it all works fine. I have a feeling the customer is rolling his own http client.
09:36 john correction, has rolled his own.
09:37 john it's prob written in progress 4gl running on unix.
09:37 john *shudder*
09:38 batman ;)
09:41 john Right I'm off. Once again, thank you for your time, batman.
09:42 batman john: why not stick around?
09:43 john Okies, I can minimise the client. Just have a conf call with the errant customer.
09:44 Jonneh joined #mojo
09:45 denis_boyun joined #mojo
09:48 nic Everyone needs a Progress4GL-exclusion clause in their contracts
09:48 batman john: http://convos.by allow you to stay connected through a web browser (requries "redis" server for the mojo based backend to work)
09:50 sujithm joined #mojo
09:56 john Cheers batman.
09:56 laouji joined #mojo
09:56 john Am good, xchat is ok.
09:58 batman :)
10:00 laouji joined #mojo
10:02 fhelmber_ joined #mojo
10:10 powerman joined #mojo
10:11 powerman hi. I've just installed strawberry 5.18 x64 on Win7 and tried to install Mojolicious, but looks like it fails many tests, and probably all of them are related to PATCH method. any ideas why?
10:20 cpan_mojo MojoX-JSONRPC2-HTTP 1.0.2 by Alex Efros - http://metacpan.org/release/POWERMAN/MojoX-JSONRPC2-HTTP-1.0.2
10:20 Ptolemarch joined #mojo
10:20 Jonneh joined #mojo
10:22 powerman failed tests: http://pastebin.ca/2815524
10:26 Jonneh joined #mojo
10:26 powerman sri, jberger: any ideas why it may fail?
10:29 Jonneh_ joined #mojo
10:31 Jonneh_ joined #mojo
10:40 mire joined #mojo
10:44 basiliscos joined #mojo
10:58 dod joined #mojo
11:02 sri john: set the HTTP version to 1.0, then connection close is the default and it doesn't wait
11:03 john sri, thank you
11:06 sujithm joined #mojo
11:09 d4rkie joined #mojo
11:10 Adura joined #mojo
11:14 Negor joined #mojo
11:14 Ptolemarch joined #mojo
11:15 thowe joined #mojo
11:21 jberger powerman: not sure why you are asking me specifically
11:21 jberger But no i have no idea
11:23 mattastrophe joined #mojo
11:24 ryozi joined #mojo
11:31 abra joined #mojo
11:31 nicomen bah, I'm running into an issue of Mojo::JSON being too slow :-/
11:37 Zx3 joined #mojo
11:48 batman nicomen: or is the json data too big? ;)
11:48 mire joined #mojo
11:51 nicomen batman: yeah
11:51 nicomen add json caching to my caching Mojo::UserAgent though ;)
11:51 nicomen *added
11:52 nicomen had to do $tx->{json} = $foo as $tx->json($foo) did not do what I expected ;)
11:52 rem_lex|pivo joined #mojo
11:54 neilhwatson joined #mojo
11:54 batman peco++ # https://github.com/jhthorsen/snippets/blob/master/perl/perldocbrowser
11:56 nicomen nice
11:58 batman what is $foo? i think you're solving your problem in the wrong order nicomen :/
11:59 nicomen batman: when storing the $tx object, I wanted to set the "attribute" json (it's not really an attribute)
11:59 batman i mean... why not just solve it from the outside? why do you need "$foo" to be available on $tx->{json} ?
11:59 batman and i think you mean $res instead of $tx..?
11:59 nicomen batman: ah, because I have a caching Mojo::UserAgent
11:59 nicomen so I don't need to add this everywhere
11:59 nicomen yeah $res sorry
12:01 batman are you using JSON::XS instead?
12:01 nicomen no
12:01 nicomen just accepting that the first time takes 1000ms, the rest 2ms
12:01 batman it all sounds so very confusing
12:02 * batman steps aside
12:02 nicomen it's very easy, basically memoizing a method that would otherwise parse the body
12:02 nicomen but the gotcha was that ->json was not working as most other accessors
12:02 nicomen (it executes a json pointer search if passed an argument)
12:05 d4rkie joined #mojo
12:06 batman probably why it's listed under METHODS
12:09 Ptolemarch joined #mojo
12:12 nicomen true
12:13 nicomen how hard is it to drop-in-replace Mojo::JSON with JSON::XS?
12:15 powerman nicomen: what's wrong with just using decode_json($tx->res->body)?
12:16 powerman why do you need drop-in?
12:22 sujithm joined #mojo
12:22 powerman also, I suppose something as simple as *Mojo::Message::j = \&JSON::XS::decode_json; may go
12:29 fhelmbe__ joined #mojo
12:34 meshl joined #mojo
12:44 zivester joined #mojo
13:08 odc there is a plugin to use JSON::XS with mojolicious if you need to keep the same api
13:12 nicomen thanks guys ;)
13:13 nicomen (the plugin I found seems to just cover "handler")
13:15 phips joined #mojo
13:43 D4RK-PH0ENiX joined #mojo
13:48 Claudio joined #mojo
13:49 Jonneh joined #mojo
13:51 Mikey joined #mojo
13:52 btyler joined #mojo
14:01 btyler joined #mojo
14:03 sri guess today we'll find out if dart will be the next android language
14:04 Ptolemarch joined #mojo
14:04 mire joined #mojo
14:05 crab what happens today?
14:05 sri google i/o
14:06 * genio puts his money on Go, just to compete with sri
14:07 sri not a chance i'm afraid, google folks have only recently posted about plans to *start* porting some android apis to Go
14:07 sri dart has the advantage that it can be compiled to dalvik/art bytecode
14:07 btyler and they were very clear that they didn't want to wrap/deal with the entire android java API surface area in go
14:07 sri so it's really the only realistic option
14:08 btyler or...they announce a jvm bytecode compile target for go!
14:08 sri seems very unlikely
14:08 btyler I agree
14:09 genio Sure, let's all just kill genio's idea.  meanie-heads!
14:09 sri as miyagawa observed, there's *a lot* of dart sessions at google i/o, so that's what i would bet on
14:21 sri hah! i knew it, they just pushed pluggable storage engines to mongodb master
14:21 sri bye bye myisam phase
14:22 sri hmm, and rocksdb is the first alternative they are supporting
14:26 gryphon joined #mojo
14:27 Jonneh joined #mojo
14:31 sh4 joined #mojo
14:32 sri so document level locking is done too, neat
14:33 sri mongodb all grown up now
14:33 disputin joined #mojo
14:39 sri quite the week, yapc::na, mongodb world, and google i/o
14:45 someanon joined #mojo
14:45 someanon hi guys
14:45 someanon why does hypnotoad close STDIN, STDOU, STDERR in daemon mode?
14:46 someanon i want to use hypnotoad with systemd and rsyslog
14:46 someanon rsyslog takes stdout and put it into log file
14:48 denis_boyun_ joined #mojo
14:55 frustrating_chat someanon: because it's designed to run in the background from a terminal, so disconnecting from it is pretty standard
15:08 Ptolemarch joined #mojo
15:10 powerman someanon: just run it with -f option
15:11 powerman I'm running hypnotoad under runit's supervisor, and log goes from stdout to runit's logger
15:33 Ptolemarch joined #mojo
15:34 Jonneh joined #mojo
15:35 KCL joined #mojo
15:37 Jonneh joined #mojo
15:49 sujithm joined #mojo
16:02 igorsutton joined #mojo
16:26 Vandal joined #mojo
16:29 neyasov_ joined #mojo
16:36 kyshtynbai joined #mojo
16:43 KCL_ joined #mojo
16:48 * sri likes the new android design
16:48 someanon powerman, frustrating_chat, ty
16:48 someanon it works except reloading
16:50 someanon systemd has execReload paramter which i settted up to "hypnotoad myapp/path"
16:50 someanon but after reload it dies
16:50 sri it doesn't die, the manager process forks and the old one stops
16:50 someanon i thought that pid is changing
16:50 sri the pid is changing
16:50 someanon yeah
16:51 someanon so how to friendlyfy hypnotoad reload and systemd reload?
16:51 sri no idea if it's possible at all
16:51 sri at least for zero downtime restarts
16:51 someanon too bad
16:51 someanon if so
16:52 stephan48 shouldn't systemd be able to run a misc command?
16:52 sri you can always do "hypnotoad -s myapp/path; hypnotoad myapp/path", but no zero downtime
16:52 someanon also i changed systemd daemon type from forking to simple afte adding -f key
16:52 someanon i think it uses execStop and execStart to reload if no execReload setted
16:53 stephan48 so if you could set it to the same as start cmd this should work in theory... also you could add a pidfile check before you execute the hypnotoad start so you can catch the case when no hypnotoad runs already
16:53 sri well, it's not a plain old reload, this kind of zero downtime restarts is not very commonly known
16:53 stephan48 true
16:54 gbhat joined #mojo
16:54 someanon I strive for perfection
16:54 stephan48 but usually reload is just /etc/init.d/service reload anyway for most things(pre systemd) and this would have ran service specific stuff and if it ends to be a start with some prechecks... why should systemd care?
16:55 stephan48 mh. systemd really watches the started process? uargs
16:55 denis_boyun joined #mojo
16:55 someanon yes
16:55 someanon it is
16:55 someanon it can restart if daemon dies
16:59 dod joined #mojo
17:03 bluescreen joined #mojo
17:05 someanon i found
17:05 someanon RemainAfterExit=yes
17:05 someanon solves problem
17:05 someanon thanx to all
17:06 Ptolemarch joined #mojo
17:15 Akron joined #mojo
17:18 gbhat left #mojo
17:20 jberger someanon: this sounds like an interesting topic, would you be willing to make a blog post about it?
17:20 neilhwatson WOuld make a good page for the wiki.
17:21 jberger that too
17:24 KCL joined #mojo
17:40 tempire blog entry!
17:41 someanon jberger, maybe:3 im russian, so it will be easier to write it on russian first and than translate it
17:42 ladnaV joined #mojo
17:43 someanon and i haven't official blog, except vk.com account
17:45 mattastrophe joined #mojo
17:45 someanon i'm going go home. work time ended. i will think about article tomorrow
17:46 someanon bye
17:47 sri just start with a wiki page
17:51 gryphon joined #mojo
17:56 mire joined #mojo
18:07 KCL_ joined #mojo
18:12 Ptolemarch joined #mojo
18:13 btyler joined #mojo
18:16 sri google sucks at keynotes...TLDW (too long didn't watch)
18:19 sujithm joined #mojo
18:21 disputin joined #mojo
18:40 sri no new language...apple wins
18:44 tianon not part of the keynotes at all, but https://twitter.com/davecheney/status/480130519099650049
18:44 tianon and structured in such a way that they can look to add support for Objective C / iOS in the future
18:46 sri yea, it's not very useful for actually building android apps
18:47 sri i was hoping for dart support with the full api
18:50 tianon yeah, more would've been much cooler
18:50 tianon but at least it's a start O:)
18:51 sri considering how much effort google put into art, i doubt they will move away from that runtime any time soon
18:51 sri so you'd want a language that can actually target art
18:52 * sri just doesn't see Go fit in there
18:57 tianon yeah, that's a solid point :(
18:57 tianon so maybe next IO they'll be playing catchup >:)
18:57 irq joined #mojo
18:57 sri especially regarding the cross platform stuff, now supporting arm, x86 and mips
18:58 sri same bytecode on the play store, and compiled aot with art on the device
18:58 rat joined #mojo
19:00 sujithm_ joined #mojo
19:01 sri no clue why mips though
19:06 sri hahahahahaha
19:06 purl LOLCON 6 reached.
19:06 sri now i'm most excited about that cardboard thingy
19:07 sri https://developers.google.com/cardboard/
19:14 disputin joined #mojo
19:26 meshl joined #mojo
19:42 sri hmm, the idea of a fusionio storage engine for mongodb is intriguing
19:44 genio ugh.  There's been so much Mongo fail in this company that I can't get excited about anything Mongo related.  Maybe it's unfair, but it makes me frown thinking about it
19:49 powerman left #mojo
19:54 sri shut up and drink the kool-aid!
19:54 tianon :D
19:54 jihde tasty.
19:55 jihde who was it that wrote that damning piece on mongo a couple years back?
19:55 * jihde fergets..
19:55 jihde he sure upset the congregation though.. convinced me to wait
19:56 sri oh, there's a new subroutine signature talk by peter martini https://www.youtube.com/watch?v=ot5yOrMJogA
19:57 jihde sri, is there a good way to troubleshoot suspected blocking from some module somewhere (unknown)?
19:58 genio sri: rjbs talked about it for a while at the end of his perl 5.20 talk
19:59 sri genio: that talk on youtube yet?
19:59 genio sri: https://www.youtube.com/watch?v=D1LHFKGHceY&amp;list=UU7y4qaRSb5w2O8cCHOsKZDw
19:59 sri in germany we can't actually watch the live stream... copyright bullshit... :(
19:59 genio err... too much URL, but whatever. sorry
20:00 genio that sucks that you can't watch the live streams.  (copyright BS)--
20:07 sri \o\
20:07 sri /o/
20:14 disputin joined #mojo
20:16 sujithm joined #mojo
20:19 cstamas joined #mojo
20:21 Ptolemarch joined #mojo
20:23 cosimo joined #mojo
20:29 irq_ joined #mojo
20:34 disputin joined #mojo
20:57 sri rjbs talks are always really good
20:57 gbhat joined #mojo
21:07 neilhwatson joined #mojo
21:48 cfedde true
21:58 disputin joined #mojo
22:01 meshl joined #mojo
22:02 bobkare joined #mojo
22:04 sri ah, mongodb keynote is out too now http://www.mongodb.com/presentations/mongodb-world-2014-keynote-eliot-horowitz
22:06 btyler_ joined #mojo
22:30 bobkare joined #mojo
22:45 ceej joined #mojo
22:49 jzawodn just watched that... intersting
22:58 punter joined #mojo
23:00 ceej joined #mojo
23:03 phillipadsmith joined #mojo
23:10 ceej joined #mojo
23:11 phillipadsmith joined #mojo
23:32 btyler joined #mojo
23:32 gbhat left #mojo
23:48 zivester joined #mojo
23:56 fhelmber_ joined #mojo

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