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

IRC log for #mojo, 2014-01-12

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

All times shown according to UTC.

Time Nick Message
00:00 jberger sri: thought so, but I thought I would ask
00:01 jberger I have been reading lots of doc on forking and I don't see a great option other than fork+exec (which would be very cumbersome)
00:18 hesperaux joined #mojo
00:18 hesperaux joined #mojo
00:35 jack joined #mojo
00:40 good_news_everyone joined #mojo
00:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/vtr0gQ
00:40 good_news_everyone mojo/master 0edeca7 Sebastian Riedel: factor out sibling selection
00:40 good_news_everyone left #mojo
00:48 jberger joined #mojo
02:08 mire__ joined #mojo
02:12 tempire joined #mojo
02:14 beyondcreed joined #mojo
02:27 Lucas1 joined #mojo
02:39 Lucas1 joined #mojo
02:45 klapperl joined #mojo
03:08 KindOne joined #mojo
03:35 TitanOfOld joined #mojo
03:38 KindTwo joined #mojo
03:49 good_news_everyone joined #mojo
03:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2zOXQw
03:49 good_news_everyone mojo/master 34cff29 Sebastian Riedel: small optimizations
03:49 good_news_everyone left #mojo
03:52 johnny5_ joined #mojo
03:53 johnny5_ joined #mojo
04:16 hesperaux_ joined #mojo
04:17 preflex_ joined #mojo
05:03 jberger my nopaste clone now has (almost) all of the cli options that App::Nopaste has and two working services (pastie and mathb.in)
05:03 jberger \o/
05:06 d4rkie joined #mojo
05:58 dj_goku joined #mojo
05:58 Lucas1 joined #mojo
06:02 jberger 3 services :-)
06:09 KindTwo joined #mojo
06:46 KindTwo joined #mojo
06:59 hummeleBop joined #mojo
07:10 amirite joined #mojo
08:14 Vandal joined #mojo
08:21 dotan joined #mojo
08:50 dod joined #mojo
08:50 dod joined #mojo
08:58 dod joined #mojo
09:02 trone joined #mojo
09:54 basiliscos joined #mojo
10:06 laouji joined #mojo
10:15 nornagest joined #mojo
10:44 amirite joined #mojo
10:57 denisboyun joined #mojo
11:22 voegelas joined #mojo
11:23 dod1 joined #mojo
11:27 mire__ joined #mojo
11:40 rem_lex| joined #mojo
13:01 sh4 joined #mojo
13:07 d4rkie joined #mojo
13:17 dsteinbrunner joined #mojo
13:20 d4rkie joined #mojo
13:50 dsteinbrunner joined #mojo
14:11 denis_boyun joined #mojo
14:14 trone joined #mojo
14:53 jberger sri: when printing available commands, would you consider sorting them? should be a one word patch here: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Commands.pm#L98
14:53 * jberger tries
14:57 jberger ok, not one-word, it needs a sort block, but its still tiny
14:57 sri +1
14:57 purl 1
14:58 jberger pr coming, I had to install Perl::Tidy on this box
15:00 jberger does perltidy -b work?
15:05 jberger -pbp contains -st?! srsly?
15:05 jberger argh
15:07 jberger -nst fixes it :-/
15:08 good_news_everyone joined #mojo
15:08 good_news_everyone [mojo] jberger created sort_commands (+1 new commit): http://git.io/VPObSg
15:08 good_news_everyone mojo/sort_commands a2b954b Joel Berger: sort commands by name
15:08 good_news_everyone left #mojo
15:12 good_news_everyone joined #mojo
15:12 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/3fmM0A
15:12 good_news_everyone mojo/master 9c36280 Sebastian Riedel: Merge pull request #579 from kraih/sort_commands...
15:12 good_news_everyone left #mojo
15:12 jberger \o/
15:13 sri jberger++
15:13 jberger my current $job is big on code review, so I developed a near fear of "push to master", sorry if that path feels convoluted
15:14 sri i like it a lot :)
15:14 jberger :D
15:15 good_news_everyone joined #mojo
15:15 good_news_everyone [mojo] jberger deleted sort_commands at a2b954b: http://git.io/DTm_zg
15:15 good_news_everyone left #mojo
15:17 jberger my nopaste clone now has 5 services
15:17 mire__ joined #mojo
15:17 jberger looks better sorted
15:19 sri guess i never noticed since the inode order here is alphabetical by accident
15:21 jberger wow, what are the odds?
15:21 purl the odds are good I can pick that up for $50. ;)
15:21 jberger haha
15:22 good_news_everyone joined #mojo
15:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/B8OAcA
15:22 good_news_everyone mojo/master 86f8416 Sebastian Riedel: updated Changes
15:22 good_news_everyone left #mojo
15:22 jberger its too bad that gist is so hard to use programmatically
15:23 jberger I don't think its going to make my first release
15:28 rem_lex joined #mojo
15:31 * jberger likes python's set type
15:35 good_news_everyone joined #mojo
15:35 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Qt_CNg
15:35 good_news_everyone mojo/master 938d916 Sebastian Riedel: removed a few deprecated attributes and methods
15:35 good_news_everyone left #mojo
15:35 * sri loves removing deprecated code o/
15:39 jberger every time I see the deprecation purges, I hug Carton
15:40 jberger but since it exists, sri++
15:40 jberger sri: when is 5.0?
15:40 sri summer
15:41 jberger we really are clicking through version numbers
15:41 sri or when we run out of numbers
15:43 * jberger still likes FACE SCREAMING IN FEAR
15:45 sri oh right, we have no new codename yet
15:46 jberger Clipboard.pm doesn't seem to copy to the correct clipboard :-/
15:48 jberger argh, a bug report with a patch, sitting open since March 2011
15:48 jberger https://rt.cpan.org/Public/Bug/Display.html?id=65399
15:49 * sri starts to wonder if we should remove support for the 308 and 451 status codes
15:50 sri since it doesn't look like either drafts are becoming rfcs
15:50 dvinciguerra joined #mojo
15:52 jberger sri: after existing this long, they wouldn't rescind the statuses would they?
15:53 jberger hahaha, i like the choice of number for code 451
15:53 wingfold joined #mojo
16:06 sri jberger: they never really existed, we just early adopted a draft
16:06 jberger they are both on wikipedia :-P
16:06 sri 308 draft expired in 2012 :(
16:07 jberger sri: I don't actually have any opinion, I'm just surprised that anything that would get even that far would ever be rolled back
16:08 jberger did any of the major browsers implement them?
16:10 sri they don't have to implement 451 and i believe 308 is supported by accident anyway
16:10 sri proper redirect handling is still an open problem in mojolicious
16:13 jberger actually I just had an issue with the shadowcat pastebin
16:13 jberger it uses http-equiv redirect, and the ua did not redirect
16:14 jberger I'm not sure its worth the effort to support that, but, I guess it is relevant to the discussion
16:15 sri nope
16:15 * jberger monkey_patches Clipboard.pm
16:15 sri we won't ever parse the html to extract headers
16:16 jberger I don't think we should either
16:16 jberger I guess I am saying, I'm amazed at the number of ways that a resource can request a redirect
16:19 mhb joined #mojo
16:27 * sri redirects jberger into an infinite loop
16:27 jberger jberger() while jberger()
16:28 sri YO DAWG...
16:28 purl yo dawg is http://qntm.org/responsibility
16:29 jberger purl, I'm not sure I get that one :s
16:29 purl jberger: what?
16:29 * jberger bites purl
16:29 * purl bites jberger back
16:29 sri http://knowyourmeme.com/memes/xzibit-yo-dawg
16:31 sri oh, you talked to purl...
16:31 * sri kicks purl
16:31 * purl blocks!  Paint the fence!
16:32 sri :/
16:42 jberger git diff | mojo nopaste pastie -x # post diff to pastie and copy the url to the clipboard
16:47 sri neat
16:51 dsteinbrunner joined #mojo
16:55 ispy_ joined #mojo
17:05 batman joined #mojo
17:07 elvis joined #mojo
17:07 batman joined #mojo
17:28 wingfold_ joined #mojo
17:40 dsteinbrunner joined #mojo
18:08 elvis joined #mojo
18:09 batman joined #mojo
18:45 KindTwo joined #mojo
18:50 maxhq joined #mojo
19:00 Sjors joined #mojo
19:00 Sjors Hi all
19:01 Sjors I'm writing a proxy-like daemon that has a HTTP server on one end and a HTTP client on the other, using Mojolicious::Lite
19:02 Sjors if I start it in daemon mode, I want its HTTP client to start doing some requests immediately
19:02 Sjors though if I don't start it in daemon mode, for example I use it in combination with Test::Mojo, I don't... so I can't just put stuff in front of app->start; right?
19:03 Sjors what's the recommended way for doing this? for example, is there a signal that's emitted exactly once at the start of the application, but only if it is running in daemon mode?
19:07 Sjors is the way to convert it to a Mojolicious application and adding a sub startup, maybe?
19:18 Sjors that last thing worked... is it the recommended way?
19:24 sri fun fact, Test::Mojo uses the exact same server as the daemon command
19:32 * jberger releases Mojolicious::Command::nopaste
19:32 jberger \o/
19:37 rem_lex joined #mojo
19:42 jberger https://twitter.com/joelaberger/status/422452034919342080
20:02 batman jberger: that's pretty cool :)
20:02 batman what about setting a default paste module to make it even simpler?
20:02 jberger batman, thanks
20:03 jberger the only problem with that is that it allows input from stdin, so if you didn't know what you were doing and did 'mojo nopaste' you would see nothing and it would be waiting for stdin
20:04 batman right. it could be solved by only reading STDIN if $file eq '-'
20:04 * jberger is investigating utf8, its probably buggy
20:04 batman :)
20:04 jberger batman, true
20:05 jberger also Clipboard.pm kinda sucks
20:05 batman haha. ok :)
20:05 batman no idea how that module works
20:05 jberger lets just say, its fragile
20:05 batman ok :(
20:05 * jberger wonders if there is another implementation
20:07 batman i think just pasting into STDIN is pretty good as well.
20:07 batman not sure if i would worry too much about the Clipboard feature...
20:07 batman but that's probably just me :)
20:13 elvis_ joined #mojo
20:13 batman_ joined #mojo
20:14 hesco If I am starting an app with: Mojolicious::Commands->start_app('MyApp');, how do I tell it what non-default port I need it to run at?
20:16 moritz hesco: perldoc Mojolicious::Commands has an example
20:17 hesco thanks moritz, will take a look there
20:18 hesco perfect moritz!  just what I was looking for.
20:18 hesco thanks again
20:20 jberger batman, I care more about copying the url to the clipboard, not as much getting input from the clipboard
20:20 jberger if you already had it copied, you could just paste into the pastebin directely :-P
20:20 batman ah! right. that makes sense :)
20:21 batman do you print the pasebin url afterwards? (easier to ask than to read code...)
20:21 jberger yes
20:21 jberger always
20:21 batman good
20:21 jberger so its not a big deal if it fails
20:21 jberger 0.02 released
20:21 batman :)
20:22 jberger gotta be able to paste I ❤ Mojolicious
20:23 Adura Non-unicode pasting of that makes for I ? Mojolicious
20:23 jberger I might actually make a lite app in a test file to test this stuff, right now the tests are just essentially use_ok
20:23 jberger http://pastie.org/8627184
20:23 jberger Adura, ^^
20:24 Adura Or, that.
20:24 batman jberger: can't you just rewrite the request url in $ua->on(start => ...); and then do the actual paste in the test?
20:24 Adura I was just thinking of when I pasted it into an editor where it wasn't set to utf8, heh.
20:24 jberger batman, I'm sure there are a number of ways of doing it
20:25 batman there always is :)
20:25 jberger actually that would let you test each service, but then again, only as good as your test mock
20:25 jberger I think a generic system would be fine
20:25 batman but use_ok() is pretty use_less() (pun intended) imo :)
20:25 jberger most of the code is shared anyway
20:26 jberger keeps me from releasing with broken code, thats better than nothing
20:26 batman right
20:26 jberger I'm especially happy with the mathb.in support
20:27 batman :)
20:27 jberger its an html/markdown/latex pastebin rather than the others being for code
20:28 batman yeah, pretty cool
20:28 jberger mst: does shadowcat pastebin do unicode? http://paste.scsys.co.uk/290934
20:28 jberger echo 'I ❤ Mojolicious' | mojo nopaste shadowcat
20:29 batman looks like it to me
20:29 jberger really?? looks broken to me
20:30 * jberger scratches head
20:30 batman http://home.thorsen.pm/private/raw/notverysecret/i-love-mojo.png
20:30 jberger odd
20:30 sri works for me too
20:31 batman jberger: you havent' forced charset or something weird in your browser?
20:31 batman which browser?
20:31 jberger chrome
20:31 jberger chromium to be exact
20:31 * batman as well.
20:31 sri chrome too
20:31 lukep joined #mojo
20:31 jberger I see the other sites working tho
20:31 batman chromium Version 31.0.1650.63 Ubuntu 13.10 (31.0.1650.63-0ubuntu0.13.10.1~20131204.1)
20:32 jberger how does this look?: http://pastie.org/8627278
20:32 batman <3
20:32 batman looks like you expect
20:32 jberger well then I have no idea
20:32 denis_boyun joined #mojo
20:33 jberger aha!
20:33 jberger see, what I didn't tell you is that I set the syntax highlighting by default to perl, which is a query arg for shadowcat
20:33 jberger the highlighting breaks it
20:34 jberger http://paste.scsys.co.uk/290936?hl=on
20:34 batman true
20:34 batman same here
20:35 hrupp joined #mojo
20:37 bpmedley joined #mojo
20:39 jberger mst: YOR HIGHLITZZ S BROKZ
20:41 mire__ joined #mojo
20:41 jberger I accidentally all the highlighting
21:25 hesco Me and the hypnotoad seem to be at an impasses:  https://gist.github.com/hesco/ec9ecd24eb0ef006678c  any idea what it likes to be fed in these circumstances?
21:26 jberger hesco, it is of utmost importance to rem ... ALL GLORY TO THE HYPNOTOAD!!!
21:26 hesco so I hear in these parts
21:27 jberger hesco, rather that trying to use perl -I for a custom @INC for hypnotoad, try using PERL5LIB env var
21:28 hesco ok, will do, thanks.
21:31 hesco though it continues to produce the same result.
21:32 hesco so do I need to assign something to: $ENV{HYPNOTOAD_APP}; ???
21:33 hesco or perhaps to ->run()'s $path argument.
21:55 TitanOfOld joined #mojo
22:06 jberger I think I fixed Clipboard::Xclip, though I had to monkey_patch both the copy and paste methods :-/
22:06 jberger 0.03 release
22:07 jberger hesco, what does your invocation look like with the env var
22:07 jberger also unitialized $0 sounds like something is really wrong
22:08 hesco jberger: /usr/bin/perl -d local/bin/hypnotoad scripts/tfc
22:08 jberger are you using 'use lib' by any chance or else 'FindBin'?
22:08 hesco probably am, usually do
22:08 jberger run hypnotoad as a script
22:08 * jberger dislikes lib
22:08 jberger FindBin should work, but is frought with peril
22:09 jberger do you really want to run hypnotoad under the debugger
22:09 jberger ??
22:09 jberger that sounds really aweful
22:09 jberger are you trying to debug your script or hypnotoad itself?
22:10 jberger hesco, ^^
22:11 jberger if you really want to do that, set -d in PERL5OPT
22:11 jberger run hypnotoad as your main program
22:11 hesco /usr/bin/perl -d local/bin/hypnotoad scripts/tfc
22:12 * sri can't stop laughing at the thought of using the debugger with hypnotoad
22:13 jberger sri, me too
22:13 hesco sorry, javascript froze my desktop again
22:13 hesco I'm back
22:13 hesco I want to debug my script
22:13 jberger hesco, then you really REALLY don't want to run it under hypnotoad
22:14 jberger perl -Imypath -d myscript.pl daemon
22:14 hesco it passes t/basic.t tests, my goal at the moment is to sort out why its not visible to me in a browser
22:15 jberger I doubt the debugger would help
22:15 jberger using the right port?
22:16 jberger perl -Imypath myscript.pl get /some_route
22:16 jberger if that works, then there isn't much left
22:18 jberger on another note, I can't imagine that App::Nopaste's use of Clipboard.pm works correctly on any Xwindows platform
22:23 bpmedley hesco: Does netstat -an show a LISTENING port?
22:23 hesco it does not
22:24 hesco bpmedley:,  no, it does not
22:24 bpmedley Does morbo work?
22:24 hesco have not tried
22:24 bpmedley Which servers have you tried?  I'm aware of morbo, hypnotoad, prefork, and daemon.
22:24 jberger bpmedley, all of those are daemon
22:25 jberger under the hood
22:25 bpmedley I see.
22:25 jberger the only different thing to try would be to run under say plackup
22:25 jberger but I doubt it would make any difference
22:25 * jberger suspects some port blocker
22:26 bpmedley hesco: Are you running an App or a Lite script?
22:26 hesco an App
22:26 bpmedley Would you try a small Mojolicious::Lite app so you can paste the code here?
22:27 jberger hesco, do you have actual tests, or just shell tests?
22:27 jberger if you have actual tests, and they pass, then its not mojo, its your system
22:27 jberger IMO
22:27 hesco ok, so `perl -Ilocal/lib/perl5 -d script/myapp daemon` does work
22:28 jberger hesco, what platform are you on
22:28 jberger ?
22:28 hesco debian wheezy
22:28 hesco 7.2 I think it was
22:29 jberger but this did not?
22:29 hesco is running it like that with the daemon argument suitable for anything more than an FYEO demonstration?
22:29 jberger PERL5LIB=local/lib/perl5 local/hypnotad script/myapp
22:30 jberger daemon is pretty good, hypnotoad is just a preforking wrapper around daemon
22:30 jberger with hot restart
22:35 hesco well, that is a beautiful thing.  I can work with that.
22:35 hesco thanks for the help jberger!
22:35 jberger PERL5LIB worked?
22:37 jberger glad to help
22:37 mire__ joined #mojo
22:38 jberger hypnotoad is very picky about its arguments and invocation, because it has to be
22:43 maxhq joined #mojo
22:47 dvinciguerra joined #mojo
23:40 marty all glory to the hypnotoad
23:42 jberger marty, that was a rather weak glory to give to ... ALL GLORY TO THE HYPNOTOAD!!!
23:44 gryphon joined #mojo
23:44 * marty is caps challenged today bu th... ALL GLORY TO THE HYPNOTOAD!!!
23:59 dvinciguerra joined #mojo

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