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

IRC log for #mojo, 2014-07-09

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

All times shown according to UTC.

Time Nick Message
00:01 deserted firnsy, always the way isn't it
00:02 nicomen does setting a requestheader work if you set a constant yourself?
00:02 mattastrophe joined #mojo
00:02 deserted nicomen, yeah works fine that way
00:02 deserted so it's related to the variable interpoloation
00:02 nicomen even the same header?
00:03 deserted have also tried with      ProxyPassInterpolateEnv On but had no affect
00:03 deserted and yes the same header nicomen
00:04 deserted updated pastie with some of the changes I was playing with yesterday
00:04 deserted http://pastie.org/9369636
00:04 firnsy i do remember "ProxyPassInterpolateEnv On" being a missing piece in my efforts
00:05 nicomen For instance, to rewrite according to the REMOTE_USER variable from within the per-server context (httpd.conf file) you must use %{LA-U:REMOTE_USER} - this variable is set by the authorization phases, which come after the URL translation phase (during which mod_rewrite operates).
00:05 nicomen https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
00:05 deserted nicomen, yup, but I'm not using mod_rewrite to set it, I'm using mod_headers
00:06 deserted dump of headers object http://pastie.org/9369640
00:06 jberger_ joined #mojo
00:07 nicomen then you probably need to make sure RequestHeader happens after the mod_auth_kerb module?
00:08 nicomen btw. is it really an SSL variable?
00:08 nicomen (%{foo}s?)
00:10 deserted ahh good point, not using ssl :S however had the same issue with %{REMOTE_USER}e
00:11 nicomen does this work? Header echo %{REMOTE_USER}e ?
00:11 nicomen ah no lol, echo only works on already set headers
00:12 deserted the oddity is, REMOTE_USER should definitely be set at apache, as testing against phpinfo() shows it as set
00:13 nicomen but if you are able to try to set a response header based on the variable, it would indicate a problem between mojo and apache, if not, the order of mods executed is wrong
00:13 nicomen deserted: yes but phpinfo is at the last stage, in mojo, you might look in the ENV, or if FCGI, PSGI or something provides it
00:14 deserted nicomen, so are you suggesting that apache is sending the proxied request on before setting the header?\
00:14 * firnsy notes he was in SSL and KERB env
00:15 nicomen deserted: no, I'm suggesting mod_headers executes before mod_auth_kerb
00:16 deserted ahh god ya
00:16 deserted got*
00:25 deserted nicomen, having a look at mod_info output, RequestHeader should be executing after mod_auth_kerb
00:26 deserted mod_rewrite executes even later in the chain though, so may be worth trying to utilise instead
00:46 lipizzan joined #mojo
00:47 deserted firnsy, you didn't happen to end up needing a custom module to get this working did you?
00:47 Averna joined #mojo
00:50 deserted firnsy, nicomen thank you very much for your help :) much appreciated
00:51 deserted end result was that I had to a) user rewrite with lookahead and b) execute the rewrite within the <location> block after the auth :)
01:17 oetiker joined #mojo
01:45 klapperl joined #mojo
01:53 laouji joined #mojo
01:56 dvinciguerra joined #mojo
02:04 d4rkie_ joined #mojo
02:39 good_news_everyon joined #mojo
02:39 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/sbLoxg
02:39 good_news_everyon mojo/master 3e264f8 Sebastian Riedel: the new picture element is phrasing content
02:39 good_news_everyon left #mojo
02:55 d4rkie joined #mojo
02:55 rGeoffrey joined #mojo
02:59 btyler joined #mojo
02:59 KCL joined #mojo
03:07 elik joined #mojo
03:08 good_news_everyon joined #mojo
03:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/5c2daad0887850b7b94343e6c26c6a763b5e8436
03:08 good_news_everyon mojo/master 5c2daad Sebastian Riedel: mention gzip compression
03:08 good_news_everyon left #mojo
03:21 laouji joined #mojo
03:25 laouji joined #mojo
03:28 laouji joined #mojo
03:29 yko joined #mojo
03:41 KCL_ joined #mojo
03:44 disputin joined #mojo
04:00 d4rkie_ joined #mojo
04:01 basic6 joined #mojo
04:17 gatitskiy joined #mojo
04:30 sujithm joined #mojo
04:43 Adura joined #mojo
04:46 irq joined #mojo
04:53 d4rkie joined #mojo
05:12 laouji joined #mojo
05:13 laouji_ joined #mojo
05:26 gatitskiy joined #mojo
05:33 mire joined #mojo
05:35 gatitskiy joined #mojo
06:16 denis_boyun joined #mojo
06:18 laouji joined #mojo
06:22 sujithm joined #mojo
06:22 denis_boyun joined #mojo
06:29 denis_boyun_ joined #mojo
06:48 mtj- joined #mojo
06:48 denis_boyun joined #mojo
06:52 dod joined #mojo
06:55 gatitskiy joined #mojo
07:05 igorsutton joined #mojo
07:05 denis_boyun joined #mojo
07:05 eseyman joined #mojo
07:07 bobkare joined #mojo
07:10 sugar joined #mojo
07:11 yko joined #mojo
07:17 Vandal joined #mojo
07:23 trone joined #mojo
07:31 KCL joined #mojo
07:33 basiliscos joined #mojo
07:34 KCL_ joined #mojo
07:37 dotandimet joined #mojo
07:40 Adura joined #mojo
07:40 Adurah joined #mojo
07:41 Adurah_ joined #mojo
07:41 D4RK-PH0ENiX joined #mojo
07:42 KCL joined #mojo
07:46 batman jberger: ah! thanks :)
07:47 Adura joined #mojo
07:47 Adurah joined #mojo
07:48 dotandimet joined #mojo
07:59 Adurah_ joined #mojo
08:00 Adura joined #mojo
08:04 aleksey joined #mojo
08:07 sujithm joined #mojo
08:11 edestler joined #mojo
08:25 sujithm joined #mojo
08:29 irq joined #mojo
08:38 gatitskiy joined #mojo
08:44 john joined #mojo
08:46 john When hypnotoad gets a connection, what are the mechanics of getting the request to a worker?
08:47 john Does it forward all bytes to the worker or does it tell the client to reconnect to the worker?
08:52 mr-foobar joined #mojo
08:54 michael joined #mojo
08:54 dpetrov_ joined #mojo
08:56 batman john: the worker gets the connection directly
08:57 batman the parent opens the socket, but the workers does accept on the socket.
08:57 batman you probably want to look up unix socket programming or something like that on google.
08:57 batman my internet connection is terrible here, so i can't find it for you :(
08:58 john No problem batman
08:58 john I just wondered how it worked
08:58 john I've never really bothered to think about it
08:58 john I never knew a process could open a socket and tell another process to use it.
08:59 john Thank you for that
09:01 batman it's even cooler in newer version of linux: one process can open a socket, and then you can start another process (not child) that can share the same connection
09:02 batman yourapp.pl daemon http://*:8080?reuse=1 # this enables that feature, meaning you don't really need hypnotoad or prefork. just start as many "daemon" processes as you like instead
09:23 denis_boyun joined #mojo
09:27 denis_boyun joined #mojo
09:27 d4rkie joined #mojo
09:36 kyshtynbai joined #mojo
09:42 sujithm joined #mojo
09:53 fhelmber_ joined #mojo
09:59 meshl joined #mojo
10:12 ryozi joined #mojo
10:27 dod joined #mojo
10:49 meshl joined #mojo
10:50 sujithm joined #mojo
10:50 mire joined #mojo
10:57 rGeoffrey_ joined #mojo
11:01 ua joined #mojo
11:09 dotandimet joined #mojo
11:28 gatitskiy joined #mojo
11:43 neilhwatson joined #mojo
11:44 dvinciguerra joined #mojo
11:56 igorsutton joined #mojo
12:13 ilbot2 joined #mojo
12:13 Topic for #mojo is now 🐯 hear me roar | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
12:13 omega joined #mojo
12:13 jnthn joined #mojo
12:14 test777 joined #mojo
12:15 batman joined #mojo
12:18 rGeoffrey The OSCON lightning talks are going to be with the State of the Onion on Wednesday night. If you will be there, do you want to speak about something?  Any chance someone here is in a position to offer up the State of Mojo?
12:18 mst joined #mojo
12:22 geira joined #mojo
12:24 dotandimet1 joined #mojo
12:26 dod joined #mojo
12:31 john batman, newer version of linux?
12:32 dod joined #mojo
12:33 d4rkie joined #mojo
12:47 dotandimet joined #mojo
12:54 gatitskiy joined #mojo
12:57 mtths joined #mojo
13:05 moritz I'm trying to get a grasp on minion
13:05 moritz it seems that Job objects have finished() and failed() events
13:06 john minion?
13:06 purl rumour has it minion is a lovely thing ot have. or teh intarsurf
13:06 moritz can I create the job on host A, subscribe to these events on the same host, but run them on Host B?
13:06 moritz john: https://github.com/kraih/minion
13:13 john Ah, I see.
13:14 dvinciguerra joined #mojo
13:15 gatitskiy joined #mojo
13:18 john moritz, you may also like TheSchwartz
13:19 sugar joined #mojo
13:19 moritz john: yes; unfortunately, TheSchwartz seems to be tied pretty tightly to its mysql DB
13:20 moritz john: and in the end, I want to distrubted and coordinate the tasks via AMQP
13:20 john I think it also handles sqllite
13:20 john amqp?
13:20 purl i guess amqp is a Advanced Message Queuing Protocol. A big protocol and fairly flexible and I believe the implementations of an AMQP server are fairly stable and reliable (unlike some - STOMP), but until now there's not been any perl interface... or POE::Component::AMQP or RabbitFoot or has a reasonable javascript implementation (no, rly!)
13:22 john got it
13:22 john Other option may be Gearman
13:22 john also, for messaging, Spread.
13:23 john http://www.spread.org/
13:24 john Spread has a perl interface and it also exposes an fd, so you can monitor it async
13:25 bluescreen joined #mojo
13:26 andrefs joined #mojo
13:33 moritz well, amqp is pretty much a given by now
13:34 Mikey_ i have a novel setup of zmq/minion going on right now
13:34 Mikey_ it's pretty awesome
13:34 moritz Mikey: are you going to publish the zmq backend as a module?
13:35 Mikey i can have an open websocket dispatch a job, run the job on another server, save the results to a mongodb, notify the socket via zmq, have the socket slurp the results out of the mongodb, and ship them over the open socket
13:35 Mikey i hope to one day open source my entire application
13:37 dod joined #mojo
13:37 Mikey either way, in its current form it's not ready to be released.  but what it does allow me to do is run tasks that would otherwise block my IOLoop (heavy blocking queries, etc) in an async friendly way
13:47 mire joined #mojo
13:52 sujithm joined #mojo
13:54 basiliscos joined #mojo
13:58 noidd joined #mojo
14:09 sh4 joined #mojo
14:10 gatitskiy joined #mojo
14:12 Adura joined #mojo
14:13 gatitskiy joined #mojo
14:27 gatitskiy joined #mojo
14:43 btyler joined #mojo
14:48 gatitskiy joined #mojo
14:53 sri wishlist thread gets a little more interesting
14:53 * sri would like to see the proxy stuff abstracted out into modules
14:56 marty joined #mojo
14:57 _eugen joined #mojo
14:59 bluescreen joined #mojo
15:14 gatitskiy joined #mojo
15:28 disputin joined #mojo
15:30 KCL joined #mojo
15:43 gatitskiy joined #mojo
15:48 Kripton joined #mojo
15:55 gatitskiy joined #mojo
15:55 denis_boyun joined #mojo
15:56 sri another good reason to not have pluggable backends in Minion on the mailing list
15:56 * sri considers going Mango only again
15:59 denis_boyun_ joined #mojo
16:04 disputin1 joined #mojo
16:04 tempire I don't care about pluggable backends specifically, but I do care about a backend that is deployable without an external daemon.
16:04 tempire file-based being the most obvious option
16:04 * tempire specifies
16:07 dvinciguerra joined #mojo
16:07 sri so you do care about pluggable backends ;p
16:08 meshl joined #mojo
16:08 sri but seriously, i think there's a complexity limit we can't cross... like too many backend methods providing blocking and non-blocking variants
16:09 good_news_everyon joined #mojo
16:09 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/-DrMMA
16:09 good_news_everyon mojo/master 1d31c5b Sebastian Riedel: fixed a few typos
16:09 good_news_everyon left #mojo
16:11 gatitskiy joined #mojo
16:13 punter joined #mojo
16:13 sujithm joined #mojo
16:14 nicomen tempire++
16:15 denis_boyun joined #mojo
16:20 gatitskiy joined #mojo
16:29 nishttal2 joined #mojo
16:29 nishttal2 does Mojo::JSON support canonical parsing of hashs?
16:30 tianon you'll have to unravel a bit what you mean by "canonical parsing", I think
16:31 gatitskiy joined #mojo
16:31 nishttal2 when i encode_json a hash.. every time I do it.. I get a different string.. it sorts the key in different order
16:34 sri how is that related to parsing at all?
16:35 nishttal2 sri.. for example the JSON module.. lets me do my $json = JSON->new->canonical; .. and then the json string is consistent.. was hoping I can do the same with Mojo::JSON
16:36 sri i'm totally confused... that has absolutely no relation to parsing at all
16:37 nishttal2 i misspoke.. not parsing.. encoding a hash
16:37 tianon wouldn't Mojo::JSON do that if you had a "consistent hash" in the first place?
16:37 tianon ie, IxHash or some other magic
16:37 sri it would
16:37 sri like Mango::BSON::bson_doc
16:38 sri perl -Mojo -MMango::BSON=:bson -E 'say j(bson_doc(a => 1, b => 2, c => 3))'
16:41 crab joined #mojo
16:51 disputin joined #mojo
16:53 davido_ joined #mojo
16:55 disputin1 joined #mojo
17:11 rem_lex| joined #mojo
17:17 sujithm joined #mojo
17:30 berov joined #mojo
17:30 sri there are official windows builds for atom now http://blog.atom.io/2014/07/09/hello-windows.html
17:30 sri also
17:30 sri DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS
17:31 edestler joined #mojo
17:31 punter_ joined #mojo
17:31 tianon https://www.youtube.com/watch?v=8To-6VIJZRE
17:33 meshl joined #mojo
17:33 gatitskiy joined #mojo
17:36 mire joined #mojo
17:37 D4RK-PH0ENiX joined #mojo
17:54 _eugen joined #mojo
17:55 Kripton joined #mojo
17:59 mire joined #mojo
18:32 punter joined #mojo
19:00 btyler_ joined #mojo
19:05 hummeleBop joined #mojo
19:25 kyshtynbai joined #mojo
19:26 KindOne joined #mojo
19:36 Eke- joined #mojo
19:58 yko joined #mojo
20:05 mattastrophe joined #mojo
20:08 davido_ joined #mojo
20:15 yko joined #mojo
20:18 * lb ducks as sri starts throwing chairs
20:21 sri (╯°□°)╯︵ ┻━┻
20:21 lipizzan joined #mojo
20:31 berov joined #mojo
20:39 denis_boyun joined #mojo
20:51 yko joined #mojo
20:54 Eke- joined #mojo
21:03 yko joined #mojo
21:06 Adura joined #mojo
21:09 phips left #mojo
21:13 yko joined #mojo
21:38 berov It is not late for YAPC::Europe to give a presentation. I would make a presentation.
21:39 berov I mean the organiser replyed that it still ok
21:40 berov any recomendations about how it should look?
21:41 berov I was thinking to go trough the headings in Mojolicious::Guides
21:42 yko joined #mojo
21:48 berov No interest?
21:51 woz joined #mojo
21:54 sri that's a lot of headings
21:56 lb lots of lightning talks
21:57 berov well that is why I am asking
21:59 berov would prefer to skip the Lite Tutorial
21:59 berov people get confused
21:59 sri what?
22:00 berov I mean
22:01 berov it is often that one does not understand that from the lite  app it is just one step away to not lite app
22:02 berov or should I emphasis on the lite tutorial?
22:07 berov hm looking at the lite turorial, havent looked there long ago
22:07 berov so each heading is a perfect slide :)
22:07 berov lot of copy paste to do
22:10 meshl joined #mojo
22:10 powerman joined #mojo
22:12 powerman how to limit amount of parallel requests in Mojo::UserAgent?
22:34 tempire powerman: Don't make more than you want to make
22:34 powerman tempire: this will make code too complicated
22:35 powerman I've found this one https://github.com/dotandimet/Mojo-UserAgent-Assistant but it's not released yet and at a glance more complicated than it should be
22:37 voegelas joined #mojo
22:42 marty_ joined #mojo
22:51 bpmedley berov Are you giving a tutorial or a talk?
22:51 bodgix joined #mojo
22:53 dvinciguerra joined #mojo
22:53 d4rkie joined #mojo
22:59 disputin joined #mojo
23:04 berov bpmedley: Now I am watching tempire's presentation and there is no much to add
23:05 tempire which one?
23:05 berov YAPC::NA 2012
23:05 purl i guess YAPC::NA 2012 is really going to be on a weekend next year?
23:06 tempire there is a ton beyond what's in that presentation
23:06 berov got really intimidated
23:06 berov I know
23:08 berov it is about 2.97, still  for introduction not much to add
23:09 berov may be concentrate on what happened after 2.97
23:09 berov ?
23:11 d4rkie joined #mojo
23:13 lipizzan joined #mojo
23:14 bpmedley berov: Have you done anything cool you talk about that would be interesting?
23:14 bpmedley you can talk
23:15 berov I think Ado is interesting
23:15 berov :)
23:15 berov a mojo app - it is on cpan
23:17 bpmedley It appears to be glue code that a lot of different web apps could use?
23:17 berov yep
23:18 berov a layer on top of mojo - should make a little bit more thinner
23:18 bpmedley Could you talk about that and the strengths of Mojolicious?
23:18 berov then add an admin panel again on cpan
23:19 berov sure :)
23:20 berov Mojo plugins can be added and they just become part of the app
23:21 berov well writing some more glue code may be needed in some cases
23:22 bpmedley It does look interesting - I would need to see a small example.
23:22 berov it is an example
23:23 berov just start it after installing in it's own directory
23:23 berov comes with Semantic UI
23:24 berov and a Login controller and adduser command
23:25 berov also added recently apache2 vhost config and ht access generators
23:26 bpmedley Looks like it needs an SQLite db?
23:26 berov well yes
23:26 berov actually
23:27 berov DBD::SQLite provides what s needed
23:27 berov Ado has the db file in the distro
23:28 * sri sees some very bad practices in Ado
23:28 berov would be glad to get critiques
23:28 berov like what?
23:28 bpmedley If you read this text in your browser it means the owner of this site (you?!?) successfully installed Ado.
23:28 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado.pm#L48
23:29 berov yes?
23:29 purl yes is the answer to the latest question
23:29 sri that's a private method
23:30 berov yes, I noted for my self to change this
23:32 berov sri: as you see I even forced Perl::Critic not to complain
23:32 berov I wanted just to replace the default perldoc page and could not figure out how to do it more smartly
23:35 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado/Control.pm#L41
23:36 sri inline is for templates, not raw text
23:36 berov thanks
23:39 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado/Control/Test.pm#L17
23:39 sri not sure if it matters, but that kind of aliasing is bad for subclassing
23:40 berov this was made for testing - but agree
23:41 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado/Control/Doc.pm#L23
23:41 sri this does not appear to do anything
23:41 sri you just stringify it again a few lines down
23:42 sri well, it's used further down... still a waste of cpu cycles
23:42 berov looking at iit
23:43 berov I use $document in _set_title
23:43 berov methid
23:43 berov method*
23:44 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado/Sessions.pm#L56
23:44 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado/Sessions.pm#L68
23:44 sri very evil use of internals
23:45 berov yep
23:45 berov how to work around this?
23:46 berov just want to use another storage for the session - file or DBI
23:47 sri i don't know, if there's a missing api you need to bring it up
23:47 sri all i can tell you is that your hack is going to break
23:47 berov and use the cookie only for the session id
23:47 berov Well I take the responsibility :) to run my tests
23:48 berov and watch - but yes it will brake sooner or later
23:49 berov so, what about an API allowing using other storage for sessions?
23:52 sri you need to be more precise, as far as i'm concerned the api is already there
23:53 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado/Plugin/I18n.pm#L108
23:53 sri that seems silly, breaks ojo one-liners
23:54 berov may be I did not understand but this was recommended by batman :)
23:54 davido__ joined #mojo
23:54 sri https://metacpan.org/source/BEROV/Ado-0.51/lib/Ado/Plugin/I18n.pm#L194
23:54 sri that is poking into the object
23:55 berov yes
23:56 berov this will be called a lot and wanted to save some method invocation
23:58 sri don't poke into objects, that will also break at some point

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