Camelia, the Perl 6 bug

IRC log for #mojo, 2012-07-30

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

All times shown according to UTC.

Time Nick Message
00:21 andrefs joined #mojo
00:29 xaka1 joined #mojo
00:41 mikegrb whoa, turns out I have a computer that doesn't have mojolicious installed yet!
00:42 mikegrb comrad ~ 2976 %  mojo get "https://api.linode.com/?api_action=api.spec"
00:42 mikegrb zsh: command not found: mojo
00:42 mikegrb I'm sitting here thinking, surely you are wrong zsh
00:43 mikegrb imac in my home office though, I don't use it too often these days
01:03 laouji joined #mojo
01:07 bird joined #mojo
01:11 scott joined #mojo
01:50 scott joined #mojo
01:56 d4rkie joined #mojo
02:03 preflex_ joined #mojo
02:36 Psyche^ joined #mojo
02:45 noganex_ joined #mojo
03:13 xaka joined #mojo
03:24 xaka1 joined #mojo
03:50 xaka joined #mojo
04:22 xaka1 joined #mojo
04:25 asarch joined #mojo
05:27 xaka joined #mojo
05:37 Britzel joined #mojo
05:42 marcus mikegrb :-)
05:52 xaka joined #mojo
05:55 Foxcool joined #mojo
06:00 xaka1 joined #mojo
06:02 ovnimancer joined #mojo
06:07 d4rkie joined #mojo
06:18 dbr joined #mojo
06:18 marting joined #mojo
06:44 espent joined #mojo
07:01 kitt_vl joined #mojo
07:20 Vandal joined #mojo
07:25 venkatk_ joined #mojo
07:35 spleenjack joined #mojo
07:37 taryk joined #mojo
07:44 d4rkie joined #mojo
07:59 fhelmber_ joined #mojo
08:14 inokenty joined #mojo
08:17 pau4o joined #mojo
08:29 Coff joined #mojo
08:30 sri \o\
08:30 sri /o/
08:32 Coff (.)(.)
08:32 Coff @}--}-----
08:36 bjoernfan I'd like to write a few more tests for my app. One of these tests would check if the search function. Search for name "aoeu". But what happens if "aoeu" isn't in the database anymore? Would you fetch a random name from the database first, before trying the search function?
08:36 bjoernfan I could probably express that in a better way.
08:37 bjoernfan But, like, what would best practices say?
08:39 sri "random" and "tests" don't mix
08:39 bjoernfan That's what I thought.
08:40 bjoernfan I'm not sure I want to rely on a specific row in the database either, it could change at any time.
08:40 bjoernfan Should I just maybe use a test db for the tests?
08:41 jamesw mock your db, yeah
08:54 robhammond joined #mojo
08:58 daxim joined #mojo
09:19 mire joined #mojo
09:26 andrefs joined #mojo
09:33 sri hey db, you suck!
10:03 robhammond joined #mojo
10:06 Lucas1 joined #mojo
10:14 ovnimancer joined #mojo
10:45 sandeepdb joined #mojo
10:53 cosmincx joined #mojo
11:00 SmokeMachine joined #mojo
11:44 robhammond joined #mojo
12:12 venkatk_ joined #mojo
12:53 Foxcool joined #mojo
12:58 nickl joined #mojo
13:15 nickl_ joined #mojo
13:16 nickl__ joined #mojo
13:16 nickl__ left #mojo
13:16 nickl_ left #mojo
13:38 vel joined #mojo
13:41 Lucas1 joined #mojo
13:45 andrefs joined #mojo
13:48 marting left #mojo
13:49 andrefs joined #mojo
13:52 andrefs joined #mojo
13:55 laouji joined #mojo
13:57 laouji joined #mojo
13:57 marty joined #mojo
13:57 marty joined #mojo
14:08 joelaberger joined #mojo
14:09 joelaberger quick question, is it possible to release a mojolicious app using Module::Build as the build system? I'm not a zealot either way, but I know M::B much better
14:10 joelaberger I can test my app fine using prove, but with ./Build test everything fails and I see "Premature connection close"
14:11 nickl_ joined #mojo
14:12 joelaberger the message about that error in the FAQ doesn't help clear up the issue very much
14:17 mire joined #mojo
14:19 robhammond joined #mojo
14:25 nickl joined #mojo
14:25 nickl_ joined #mojo
14:25 labrown joined #mojo
14:27 nickl joined #mojo
14:27 Lance joined #mojo
14:31 sri joelaberger: the build system shouldn't matter much, but i have no clue about Module::Build and its quirks
14:35 jnap joined #mojo
14:35 sri can't imagine why it would test differently than EU::MM, makes no sense
14:46 diegok \o/
14:48 marcus .oO( )
14:56 sri OO
15:04 joelaberger sri: I would agree with you, but it hanging
15:04 joelaberger *its
15:05 joelaberger I think perhaps I will make a fork of my app that moves to EU::MM, perhaps they both fail for some reason
15:05 joelaberger either way it will give me/us more data
15:05 sri oh, i assumed you already had done that
15:06 joelaberger no, but it works under prove
15:06 gryphon joined #mojo
15:07 joelaberger actually, `perl Build.PL && ./Build && prove -b t` fails too
15:07 sandeep joined #mojo
15:07 joelaberger I had been using prove -l t
15:07 joelaberger so it doesn't seem to be working from the blib directory
15:17 Britzel joined #mojo
15:22 joelaberger ok, I haven't solved it yet, but I know what the problem is
15:23 joelaberger the installer isn't moving the template and public directories into the blib directory
15:24 joelaberger it might just be easier to use File::ShareDir
15:24 joelaberger thanks, sorry for the noise
15:43 sri joelaberger: that sounds like an M::B bug, it works with EU::MM after all
15:43 joelaberger yeah, I'm just moving to EUMM
15:43 joelaberger I'm having to learn all the tags
15:43 sri or use Module::Install
15:43 joelaberger and it doesn't automatically install from bin or script dirs? hmmm
15:46 xaka1 joined #mojo
15:58 preflex_ joined #mojo
16:00 mercutioviz joined #mojo
16:18 Leandr joined #mojo
16:19 sri http://mojolicio.us/perldoc/Mojolicious/Guides​/Cookbook#Making_your_application_installable
16:19 sri that's the only way to install apps we support
16:19 sri everything else is up to you
16:20 joelaberger yeah
16:20 joelaberger thats what I was doing, except under M::B it doesn't install the non-standard directories
16:21 joelaberger in the end I think I have come up with a highly portable recipe for M::B
16:21 joelaberger though its a little more verbose than the EUMM one
16:21 sri make sure to put it on the wiki
16:21 joelaberger will do
16:22 sri i don't particularly care about M::B, but good to know that it couldn't actually install Mojolicious itself
16:23 sri one more reason not to like it
16:27 jm4 joined #mojo
16:28 jm4 left #mojo
16:29 mire joined #mojo
16:29 joelaberger it does have some quirks, but its subclassable api makes it really attractive for other things
16:31 joelaberger I'm trying to release a preview of my CMS before I leave for vacation
16:32 joelaberger if you are interested, check out https://github.com/jberger/Galileo
16:32 joelaberger I've renamed it Galileo (from MojoCMS)
16:33 joelaberger the goal is a minimal CMS that is fully installable from CPAN
16:33 joelaberger :-)
16:36 jnap joined #mojo
16:40 asarch joined #mojo
16:57 revolet joined #mojo
17:04 cosmincx joined #mojo
17:08 asarch joined #mojo
17:13 vel joined #mojo
17:18 jnap joined #mojo
17:21 * sri wonders if there should be a Mojolicious::Commands->options method
17:23 joelaberger https://metacpan.org/module/JBER​GER/Galileo-0.001/lib/Galileo.pm
17:23 joelaberger :-D
17:25 joelaberger nm, some issues 0.002 coming (groan)
17:27 sri joelaberger: http://memowe.github.com/contenticious/ # might interest you
17:29 * sri wonders if this makes sense "$command->options(['--die'], 'd|die' => sub { die 'Dead!' });"
17:37 asarch joined #mojo
17:38 joelaberger sri: contentious looks interesting. its a similar concept, but a very different implementation
17:38 joelaberger I'm not necessarily saying whose is better :-P
17:41 joelaberger ok 0.002 is up
17:42 joelaberger sri: is there any way that hypnotoad could be made to search the $PATH for applications
17:42 joelaberger i.e. hypnotoad `which galileo` could just become hypnotoad galileo
17:42 sri no
17:43 sri sounds like a horrible idea tbh
17:43 joelaberger so the recommended incantation for an installed app is hypnotoad `which galileo`?
17:44 sri absolute paths are recommended
17:44 sri there is so much to go wrong with those auto-magic hacks
17:44 joelaberger that makes playing with perlbrew a little more complex
17:45 * sri has been nurned way too often by portability issues
17:45 sri *burned
17:45 joelaberger gotcha
17:46 joelaberger anyway, I guess not too many people run webapps from perlbrew, especially in a production environment
17:56 GitHub62 joined #mojo
17:56 GitHub62 [mojo] kraih pushed 1 new commit to master: http://git.io/B1Tk1A
17:56 GitHub62 [mojo/master] better command example - Sebastian Riedel
17:56 GitHub62 left #mojo
18:03 GitHub72 joined #mojo
18:03 GitHub72 [mojo] kraih pushed 1 new commit to master: http://git.io/SBSgZg
18:03 GitHub72 [mojo/master] added example to plugin synopsis - Sebastian Riedel
18:03 GitHub72 left #mojo
18:04 jnap joined #mojo
18:09 xaka joined #mojo
18:09 rem_lex|pivo joined #mojo
18:09 asarch joined #mojo
18:11 venkatk_ joined #mojo
18:15 jnap joined #mojo
18:30 xaka1 joined #mojo
18:36 vel joined #mojo
18:44 noganex_ joined #mojo
18:49 andrefs joined #mojo
18:49 d4rkie joined #mojo
18:51 d4rkie joined #mojo
19:03 Patterner joined #mojo
19:03 jnap joined #mojo
19:13 jnap joined #mojo
19:17 jamesw joined #mojo
19:28 diegok How do you guys deploy hypnotoad apps?, Now I have perlbrew on a normal user and I run the hypnotoad command by hand (or via mrsh on multiple machines), but I want to let it working on this user with perlbrew but ensure it runs on startup and it is always running. Any advice?
19:29 whee diegok: I use daemontools
19:31 diegok whee: and you give it the hypnotoad command and make it not daemonize?
19:31 diegok whee: how that works with graceful restart?
19:32 whee http://hastebin.com/lotiroqoko.bash
19:32 diegok whee: does it work using the user perlbrew env?
19:32 whee yes
19:32 whee also, what do you mean about graceful restarts
19:33 whee as long as hypnotoad doesn't exit, it won't know any better
19:33 whee if it does, it restarts it
19:34 diegok when you have a hypnotoad app running you can send a signal or just re-run hypnotoad and it will restart "graceful".
19:34 diegok it will try to create a new fork with new code
19:34 whee I don't think I've ever tried that
19:34 diegok if it success it then stops one old one and keep going
19:34 diegok whee: that's great feature I don't wanna loose :)
19:35 diegok but I guess I can script that on the restart...
19:35 diegok whee: thank you for your example I'll pick all the env stuff :)
19:36 diegok whee: you should try it ;)
19:37 whee http://hastebin.com/sejibeduxa.txt ...this too, for env
19:37 jnap joined #mojo
19:38 sri HOW COULD YOU HAVE NOT TRIED ZERO DOWNTIME UPGRADES?!
19:38 * sri bonks whee on the noggin
19:40 whee hahah
19:40 whee how: I don't have any customers ;)
19:41 sri it's actually fun too
19:41 sri run apachebench against your app and then upgrade
19:42 whee I don't think it did the right thing because sending QUIT made it restart and become inaccessible for a short while
19:43 sri http://mojolicio.us/perldoc/M​ojo/Server/Hypnotoad#Manager
19:43 whee oh
19:43 whee USR2?
19:45 whee that made something angry
19:48 diegok :)
19:48 whee no idea what it did, but I wouldn't do it again :)
19:48 whee it kept continually restarting
19:49 diegok when I start/restart by hand works perfect
19:50 sri perhaps your watchdog code stepped in and started it twice
19:51 sri right, you use daemontools
19:51 sri don't do that
19:51 whee :|
19:52 diegok sri: what should I use?
19:52 sri diegok: dunno
19:52 diegok I want some kind of supervisor plus full hypnotoad power :)
19:53 sri since hypnotoad can switch PIDs at runtime i doubt a normal watchdog will work
19:53 whee you could probably wrap it in a shell script
19:54 sri the chance of the actual hypnotoad going down is pretty small though, so you might not need one
19:55 diegok sri: yes, but it's nice to reduce that small hole also :)
19:56 sri but who restarts the restarter? :D
19:56 diegok I'm thinking something around ubic...
19:56 diegok oh my!
19:57 diegok I can probably have a poor man watchdog calling my init.d script when no answer...
19:57 sri you need something that can work with the pid file
19:58 sri or of course make an http request
19:58 sri or just connect to the port
20:04 diegok hm... probably we can define a puppet service that ensures the service is running looking at ps output :)
20:05 diegok still, connect/request is much more reliable :)
20:19 bobkare diegok: I have a puppet service with provider => base, start, restart and stop => "/bin/sh -c '$env /usr/bin/hypnotoad --config ... $app'", just with --stop added to the stop command. Then a pattern to check if it runs
20:22 bobkare diegok: if you want to you could write a whole test suite to run from service { status => :)
20:26 jnap joined #mojo
20:28 xaka1 joined #mojo
20:31 mire joined #mojo
20:39 amirite joined #mojo
20:39 nferraz joined #mojo
20:40 nferraz Hi all! I'm trying to upgrade mojolicious in a server running perl 5.10, and get some errors in t/mojolicious/json_config_lite_app.t
20:41 nferraz I inspected the test file and noticed that the errors occur in the $config->{absolute_dev} tests
20:42 nferraz oh... nevermind
20:43 nferraz the test failed because I had MOJO_MODE set to "production"...
20:43 nferraz setting it to "development" temporarily did the trick
20:45 nferraz perhaps the test must be fixed: it should check if $ENV{MOJO_MODE} is "production" before testing "absolute_dev"
21:07 diegok bobkare: nice. We're going to try that. At this time we have puppet installing perlbrew, perl 5.16, checking out our repo and installing deps... next step is something like you have :)
21:08 diegok bobkare: well, passing tests doesn't mean my app is working :-/
21:09 diegok bobkare: we would like to deploy only in one box, test there and then rsync to live boxes (skiping the compile perl and run tests everywhere)
21:10 * bobkare keeps to stable debian packages instead of balancing on bloody edges
21:12 sri bobkare: --config doesn't do anything anymore
21:12 diegok sri: he is not on bloody edges :)
21:12 diegok so, it should work
21:13 andrefs joined #mojo
21:13 bobkare something to note before we upgrade from what you probably consider ancient history then
21:14 sri ancient indeed
21:14 diegok actually I've moved some of my production boxes to 5.15.18 before 5.16 come out because of the f* named captures leak... so 5.16 was going stable for us :)
21:17 diegok before that we where using ancient perl coming with debian :-/
21:17 sri oh my
21:17 diegok (5.10)
21:17 diegok <o>
21:17 * diegok facepalm
21:18 andrefs joined #mojo
21:26 jnap joined #mojo
21:38 lukep joined #mojo
21:44 GitHub193 joined #mojo
21:44 GitHub193 [mojo] kraih pushed 1 new commit to master: http://git.io/AiGGDw
21:44 GitHub193 [mojo/master] a few more synopsis examples - Sebastian Riedel
21:44 GitHub193 left #mojo
22:17 lammel2 joined #mojo
22:35 nferraz joined #mojo
22:38 mattastrophe joined #mojo
23:05 SmokeMachine joined #mojo
23:40 GitHub71 joined #mojo
23:40 GitHub71 [mojo] kraih pushed 1 new commit to master: http://git.io/nTo4UQ
23:40 GitHub71 [mojo/master] simplify option handling for built-in commands - Sebastian Riedel
23:40 GitHub71 left #mojo
23:41 sri at least as a private method it makes sense
23:44 sri hope it doesn't reduce the value of those commands as examples
23:45 SmokeMachine joined #mojo
23:48 sri for a public method this is too ugly https://github.com/kraih/mojo/blob/m​aster/lib/Mojolicious/Command.pm#L95
23:48 sri tempire, marcus, crab: thoughts?

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