Camelia, the Perl 6 bug

IRC log for #mojo, 2013-11-01

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

All times shown according to UTC.

Time Nick Message
00:05 asarch joined #mojo
00:26 russum joined #mojo
01:04 dvinciguerra_ joined #mojo
01:12 preflex_ joined #mojo
01:43 d4rkie joined #mojo
02:00 d4rkie joined #mojo
02:24 russum joined #mojo
02:45 duncanthrax joined #mojo
02:57 asarch joined #mojo
03:27 asarch joined #mojo
03:29 johnny5_ joined #mojo
03:40 laouji joined #mojo
03:52 d4rkie joined #mojo
03:52 d4rkie joined #mojo
03:53 laouji_ joined #mojo
04:02 cfedde joined #mojo
04:16 asarch joined #mojo
04:33 asarch joined #mojo
04:37 tba joined #mojo
04:52 preflex_ joined #mojo
05:05 dqw113 joined #mojo
05:16 beyondcreed joined #mojo
05:35 arpadszasz joined #mojo
05:58 davido joined #mojo
06:08 davido_ joined #mojo
06:33 d4rkie joined #mojo
06:37 d4rkie joined #mojo
06:57 Vandal joined #mojo
06:58 denisboyun joined #mojo
07:00 Kundun joined #mojo
07:02 avkhozov joined #mojo
07:06 themage joined #mojo
07:08 dotandimet joined #mojo
07:11 tba_ joined #mojo
07:23 D4RK-PH0ENiX joined #mojo
07:43 rem_lex joined #mojo
07:45 plu joined #mojo
07:52 denis_boyun__ joined #mojo
08:21 hrupp joined #mojo
08:22 KindTwo joined #mojo
08:24 dotandimet joined #mojo
08:54 basiliscos joined #mojo
09:27 basic6 joined #mojo
09:39 dpetrov_ joined #mojo
10:00 rem_lex joined #mojo
10:09 marty joined #mojo
10:10 KindTwo joined #mojo
10:21 TitanOfOld joined #mojo
10:22 dqw113 joined #mojo
10:26 mire joined #mojo
10:28 preflex joined #mojo
10:35 tba joined #mojo
10:46 dotandimet joined #mojo
10:50 marcos batman: wtf?
10:50 batman ?
10:53 batman marcos: wtf what?
10:59 marcos "fiddling with environment variables are stupid"
11:01 batman because you can't leek environment variables into hypnotoad when you hot reload it.
11:02 batman MOJO_LOG_LEVEL=debug hypnotoad script/foo; MOJO_LOG_LEVEL=info hypnotoad script/foo; # the log level will still be "debug" after the hot reload
11:02 batman not "info".
11:02 batman *leak
11:09 marcos ok.
11:09 mst I'm confused
11:10 batman mst: i know the feeling :(
11:10 mst that doesn't seem like "leaking environment variables"
11:10 mst that seems like hypnotoad ignoring one
11:10 batman it's not. it's just that hypnotoad is just signalling your actual process. it's not starting anything the second time.
11:10 batman it's called hot reload. not "fuck your clients! i'm going to restart"
11:12 mst yeah, and it could hot reconfigure the log level as well
11:12 mst so, yes, it's fucking ignoring it.
11:13 batman no, hypnotoad is NOT FUCKING IGNORING IT.
11:13 batman but hypnotoad is not your web server.
11:13 mst eh?
11:13 batman mst: why do you care? it's not your problem.
11:14 kanishka joined #mojo
11:15 mst because I'm trying to think about this from a consistency and usability POV
11:16 mst it seems to me that an env var to the hypnotoad invocation should, within reason, either always be honoured or always be ignored
11:16 batman hypnotoad is consistent if you do it the right way: use a config file.
11:16 batman err... not hypnotoad. your web app
11:16 mst "hypnotoad doesn't handle env vars consistently so I shall blame env vars"
11:16 mst lolwut
11:17 batman hypnotoad/morbo/... only starts your server it's not actually running it. at least not from my perspective.
11:17 batman sri: please correct me if i'm wrong
11:18 mst right, but the point is that a hot reload is meant to be "like a full restart, but transparent to clients"
11:18 mst so, again, if the env var is only honoured -sometimes-, that's an inconsistency
11:19 batman you make it sound random. it's not.
11:20 batman and no. it's not like a full restart.
11:30 marcos well, i'm glad i know that environment variables are stupid now.
11:33 batman i have no idea how to respond to that.
11:33 batman second most stupid comment today.
11:33 d4rkie joined #mojo
11:35 batman s/stupid/**not-constructive**/
11:37 mst given your refusal to actually think about the situation and instead use the "you're not running it so clearly your opinion is invalid" line on me
11:37 mst his comment is a pretty reasonable sarcastic response to your complete failure to be constructive
11:38 mst but, honestly, it's clear you don't actually want to talk or think about this, so I won't bother
11:40 mire joined #mojo
11:45 exonity joined #mojo
11:53 maxhq joined #mojo
11:59 d4rkie joined #mojo
12:00 d4rkie joined #mojo
12:04 asarch joined #mojo
12:16 batman i've been in the situation and found myself doing something which wasn't designed for.
12:16 batman and i understood that his comment was sarcastic. it still doesn't make any sense.
12:16 mst that's because it was parodying the nonsense you've been talking
12:17 batman i don't want to talk about this, because it's like discussing why we use "->" instead of "." to make method calls.
12:17 mst anyway. I laughed. you didn't understand.
12:17 mst can we move on now?
12:17 batman i'm trying to make my case. i'm pretty sick of people not telling me what's on their mind.
12:18 batman glad i could make you laugh matt. that makes one of us at least.
12:25 asarch joined #mojo
12:34 nic joined #mojo
12:41 marcos batman: when someone has a problem with MOJO_LOG_LEVEL=debug, and you tell them something wrong (probably), and then say "well, but doing that is stupid anyway" when someone says it's not wrong, that's... not sure. baffling, perhaps.
12:41 marcos so that's what was on my mind.
12:42 batman marcos: sorry, i think my client must have missed out on you not being in the room when i told you not to do it, why and what to do instead
12:43 asarch joined #mojo
12:43 garu jberger: what's up? :)
12:44 marcos batman: i wasn't actually asking for advice about what to do. you may recall that it wasn't my problem in the first place. i was only wondering specifically why you said MOJO_LOG_LEVEL is ignored depending on MOJO_MODE, because I didn't see any code to do that.
12:45 marcos maybe i missed something in the scrollback, though.
12:45 batman right. i think i told you to look in Mojolicious.pm..?
12:45 batman though i don't think you should need to do that, but that's up to you...
12:46 marcos need to do what? look in Mojolicious.pm?
12:46 batman nevermind that last sentence. i'm just going to start another meaningless discussion.
12:46 marcos i'm just trying to understand what you said.
12:46 batman so what don't you understand now?
12:47 marcos did you mean you didn't think i should set MOJO_LOG_LEVEL? if so, ok. i understand.
12:48 batman of course i think it's a super bad idea to use that TOGETHER with hypnotoad, since you can't change it during hot reload
12:48 batman but it's not (very) stupid with "myapp daemon" and morbo myapp"
12:48 batman i still think it's a bad idea, but it's not the worst idea
12:50 denisboyun joined #mojo
12:51 marcos ok.
12:53 marcos i suspect you mis-remember or misunderstood the code.
12:53 marcos but it doesn't matter.
12:53 batman please tell me more.
12:54 marcos well, is "$self->log->level('info') unless $mode eq 'development'" what you were referring to?
12:55 batman yes. as i told you, it won't have any effect unless $mode is development.
12:55 batman i said MOJO_MODE...
12:56 marcos the thing is, MOJO_LOG_LEVEL's value is not used to set ->log->level at startup. it's checked in the Log.pm internals on each call, and in fact overrides any level you set in the code.
12:56 batman did you look in Mojo.pm ?
12:56 batman ah! that's true.
12:56 batman sorry about that
12:57 marcos i thought i was missing something there, which is why i asked. i wasn't at all advocating the use of MOJO_LOG_LEVEL or otherwise. it's just that what you said contradicted my experience, and i wasn't sure what was right.
12:58 marcos it's quite possible that $whoever's problem had to do with hypnotoad and restarts, but it didn't have to do with $mode. that's all.
12:58 batman my main issue is that somewhere you added "hypnotoad" into the mix, which makes things very confusing
12:59 marcos batman: someone else, not me.
12:59 marcos i don't even remember who is was now. but it doesn't matter.
13:00 batman then i guess i'm the big idiot here. i will drink my cup of stfu now.
13:02 SmokeMachine joined #mojo
13:07 laouji joined #mojo
13:08 russum joined #mojo
13:16 trone joined #mojo
13:22 sri mst: of course env vars are used consistently by hypnotoad, and you can change them between hot restarts
13:23 sri using MOJO_LOG_LEVEL is not a smart thing to do, but of course you can
13:23 mst sri: but batman was saying that a second run of hypnotoad would ignore them
13:23 sri yea, he's wrong
13:24 batman sri: when did that start working?
13:24 sri it always worked that way
13:24 sri hypnotoad couldn't work at all if it didn't
13:24 mst batman: surely given you kept trying to convince me it shouldn't, you mean "when did that break?" :)
13:24 batman hot restart = kill -USR2 $pid ?
13:24 nicomen how do you pass in ENV vars to a running app?
13:24 sri second server inherits all env vars, including MOJO_LOG_LEVEL
13:25 batman but not from the "reload command"
13:25 batman MOJO_LOG_LEVEL=debug hypnotoad script/foo; MOJO_LOG_LEVEL=info hypnotoad script/foo; # the log level will still be "debug" after the hot reload
13:25 batman ^^
13:25 sri you can change env vars in a running hypnotoad with your app BEGIN { delete $ENV{MOJO_LOG_LEVEL} }
13:26 sri batman: yea, that's incorrect
13:26 sri the second script invocation is not a new server, just a script that checks the app and sends a signal to the real server
13:26 batman how can you make that second MOJO_LOG_LEVEL *get into* the running application that you only signal with USR2 ?!?
13:26 batman exactly.
13:26 sri read what i wrote above
13:27 batman but the running server. the one that listen to a port. still log with level debug after my second command.
13:27 mst sri: right, which I think is unexpected
13:28 mst it makes the 'start or reload' behaviour non-transparent
13:28 sri umm
13:28 mst if it can be ignored, it'd be better if it was always ignored
13:28 sri ok, now i'm getting annoyed too... it's 100% consistent and couldn't work any other way
13:29 sri LETS REMOVE ALL THE ENV VARS BECAUSE MST THINKS IT'S MORE CONSISTENT
13:30 mst well, personally I'd rather fix it so the second invocation honours them, but that'd require a more intelligent reload system, and I'm not volunteering to write it for you
13:31 * mst shrugs
13:31 sri wtf is a more intelligent reload system?
13:32 sjn env is nice for settings that are shared per-user or per-system
13:33 sjn e.g. "all application servers running under $APP_USER, should connect to $APP_DBI_DSN"
13:33 sri sjn: i don't think you understand the discussion
13:33 exonity joined #mojo
13:33 sjn sri: ok
13:33 sjn then I'll shut up and read :)
13:35 mst sri: what happens if I run 'hypnotoad script/foo; hypnotoad script/bar;' ?
13:35 batman http://p.thorsen.pm/181d7a9e36d7 # this is what happening
13:36 batman mst: you hot reload
13:36 mst batman: even though I passed a different app the second time?
13:36 batman sorry!
13:36 mst how does the running server know to reload script/bar ?
13:36 batman i read foo and foo
13:36 mst http://trout.me.uk/facepaw2.jpg
13:37 batman no idea what happens really. it looks weird :P
13:37 batman i think it will hot reload "foo" unless you specify a pid file
13:37 sri it can't change the app, it tries to detect the pid file based on the second app, and reloads what's defined in the pid file
13:38 * batman is better at guessing than knowing :(
13:38 batman sri: ...you agree on my paste?
13:39 sri what's there to agree on, you've hopefully tried it
13:39 batman i did try it. just got confused about what you where trying to say earlier...
13:41 * sjn sees now that his comment is spot on... Mojo is allowing env variables to be used in a confusing manner o/
13:41 batman mst: and it's consistenly a bad idea to do what's in my paste :)
13:41 batman sjn: it's not confusing if you understand what's going on.
13:41 sri hot reload is hard, lets go shopping
13:41 batman ..given you understand how a shell works
13:42 batman sri: i think hot reload is fucking fantastic!
13:42 mst sjn: it's not confusing if you ignore everything batman said about it and read just sri's comments
13:42 batman \o/
13:42 sjn batman: I know very well how a shell works :)
13:42 batman mst: did you look at my paste?
13:42 sri oh fuck it... i'll describe it in the docs
13:42 batman sjn: i barely know how a shell works :(
13:43 mst I think everybody already noticed that.
13:43 batman mst: DID YOU LOOK AT MY PASTE??
13:44 sjn what happens when you run hypnotoad and there's already one running on a specific port?
13:44 mst sri: the hot reload is "reload the app's classes in-process so we don't drop connections", right?
13:45 batman sjn: doesn't matter what port your listening to. hypnotoad relies on pid file.
13:46 bluescreen joined #mojo
13:46 sjn batman: sure it matters
13:46 batman sjn: it matters. but not not in a hypnotoad specific matter.
13:46 sri mst: no, it's real hot reload, fork/exec
13:47 sri the hardcore way
13:47 batman sjn: 1) hypnotoad finds a pid file, the app is alive and it will reload the first 2) it will try to bind to the same port and die
13:47 sri exactly the same nginx does
13:47 sjn if the new hypnotoad process finds out there's already one running, it can do a lot.. bail with an error (common); send some signal to the first process (not so common); kill the first process then take over the port (stupid)
13:47 batman sjn: have you ever worked with hypnotoad?
13:48 sjn ok, if it reloads the first, and the first is NOT killed (keeps running), then the first one keeps it's environment
13:48 sjn as it should
13:48 asarch joined #mojo
13:48 sjn you can't "copy" an environment to other processes by any means, other than fork()
13:48 batman yes! it keeps the environment, but it will not get new environment variables from the second hynotoad command. which is what i've been trying to explain for 12 hours :(
13:49 sjn yes, it won't get the env from the new process, and that's how it's been on unices since the 80's
13:49 batman (crap. i should never said i didn't know anything about shell... it just makes thing more confusing)
13:50 batman ...
13:51 sjn batman: if I understand you, you want to change some env variable on the current running hypnotoad process... right?
13:51 mst sjn: no
13:51 mst *I* was talking about the ...
13:51 mst oh for fuck's sake
13:51 batman I DON'T FUCKING WANT DO DO JACK SHIT. I'M TRYING TO EXPLAIN HOW STUFF WORKS.
13:51 batman ^ sjn
13:51 sjn hehe
13:51 sjn ok then
13:51 mst welcome to #reading-comprehension-fail
13:51 sri "This second invocation will load the application again, detect the process id file with it, and send a C<USR2> signal to the already running web server. Which will then C<fork> a new manager process, C<exec> the original script to reload the application, and start a new pool of worker processes before stopping the old manager process."
13:51 sri this is what i have so far
13:52 mst sri: I don't see a QUIT handler
13:52 mst do you expect the old manager to drop any outstanding HTTP connections, or are you relying on the worker processes staying active until their connections drop?
13:53 batman mst: both. but they are killed after x seconds (i think default is 20)
13:53 batman they = workers
13:54 sri mst: the code is split between Hypnotoad.pm, Prefork.pm, Daemon.pm and IOLoop.pm
13:54 sri there is of course a QUIT handler
13:54 batman sri: maybe you want to say L</USR2> or something and skip the "Which will then C<fork>..." part
13:54 sri which starts a graceful shutdown
13:54 batman ?
13:55 batman sri: i like this https://metacpan.org/pod/Mo​jo::Server::Hypnotoad#USR2
13:56 sri so i should not explain the dirty details of zero downtime software upgrades?
13:56 batman i'm not the right guy to ask :(
13:57 batman i user to be stupid enough thinking %ENV was magically passed on from the signaling hypntoad -> USR2 -> to the running manager for some time...
13:57 mst I think the important part is to document what the hypnotoad command does
13:57 batman that's the only confusing part i guess...
13:58 batman mst: i agree. and i think sri did that with the first part of the his "This second invocation will..."
13:58 mst if somebody'd said right at the start "looks for a pid file based on the app name and if it finds one sends SIGUSR2 to trigger a reload and then exits"
13:58 mst I'd've gone "oh. right. yeah, ok."
13:59 sri tough luck, NOW I WANT TO EXPLAIN FORK/EXEC
13:59 batman :(
14:00 sri BECAUSE UNIX ROCKS!
14:00 batman why did i stop smoking.... ... .. .
14:00 sh4 joined #mojo
14:00 sjn yeah, fork/exec is rather basic unix stuff. :-\
14:01 batman how is that basic?
14:01 sjn basic=fundamental
14:01 batman i've explained that to tons of people who have used unix/shell for quite some time
14:02 sjn it's basic knowledge that's needed in order to understand a lot of other things about how unices work
14:02 batman i got exec() after programming
14:02 batman ooops
14:02 batman i didn't know what exec() was until after seven years of unix i think...
14:03 batman why know stuff when you don't need to?
14:03 good_news_everyone joined #mojo
14:03 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pTW0rA
14:03 good_news_everyone mojo/master a0a2038 Sebastian Riedel: explain how the hypnotoad script works
14:03 good_news_everyone left #mojo
14:04 mst that's the attitude that leads to PHP
14:04 sri sjn: but it's fork/exec with descriptor inheritance
14:05 batman sri: wanna change that C<USR2> to L</USR2> ?
14:05 batman mst: why do i want to know PHP when i don't need to? ;D
14:07 sjn sri: don't understand what the "but" refers to...
14:07 batman it refers to "how simple stuff are"
14:07 sjn environment and descriptors (sockets, filehandles) have always been inherited when forking and exec'ing...
14:07 sjn "always"
14:08 sri yea, that's incorrect
14:08 sjn it is?
14:08 mst FD_CLOEXEC
14:09 sri they are only inherited up to a certain fd number, usually 3 i believe (for STDIN/STDOUT/STDERR), you have to raise this value before creating new descriptors in perl to be able to inherit anything else
14:11 mst the close on exec flag is set for any fd with a number >= $^F IIRC
14:11 sri right
14:11 sjn FD_CLOEXEC is by default off, right?
14:12 dqw113 joined #mojo
14:12 sjn aah
14:12 sjn never mind, just read
14:13 sjn s/just read/I just read what you wrote/
14:16 sjn reading comprehension ftw
14:22 tba_ joined #mojo
14:28 tba joined #mojo
14:30 r0b3rt joined #mojo
14:34 tba_ joined #mojo
14:49 beyondcreed joined #mojo
14:50 arpadszasz joined #mojo
14:53 good_news_everyone joined #mojo
14:53 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/A65laA
14:53 good_news_everyone mojo/master 1d78824 Sebastian Riedel: more links
14:53 good_news_everyone left #mojo
14:53 tba_ joined #mojo
14:54 iSlug joined #mojo
14:56 batman \o/
14:57 asarch joined #mojo
15:09 gryphon joined #mojo
15:23 denis_boyun joined #mojo
15:34 ryozi joined #mojo
16:09 exonity joined #mojo
16:19 * tempire is starting to fall for adobe
16:19 tempire cc gives you all the things
16:19 marcos cc?
16:20 tempire creative cloud
16:20 tempire subscription
16:20 batman http://screencloud.net/img/screenshots​/761f235736c4f316d29776a36f9d8bb2.png # is it just me or does mojolicio.us look weird?
16:21 exonity same problem
16:21 tempire browser?
16:21 exonity MacOS => Chrome
16:22 batman ubuntu chrome
16:22 exonity macos safari is ok
16:23 tianon it's intermittent here - Chrome on Gentoo
16:23 exonity macos firefox (http://mojolicio.us/unicorn.png) => Die grafik "http://mojolicio.us/unicorn.png" kann nicht angezeigt werden, weil sie Fehler enthält"
16:24 tianon if I hard refresh (Ctrl+Shift+R), it loads completely sometimes, doesn't load at all sometimes, and sometimes I get the odd image glitching batman is seeing
16:24 exonity can't be viewed, because it contains errors
16:37 sri that happens every now and then, no clue why
16:38 sri reading DATA sections seems to fail randomly every 100 restarts or so
16:39 sri i've only seen it on ubuntu linux so far, with different perl versions
16:45 powerman sri: if that happens only on your site, but not for other Mojo users, then it may be hardware issue on your server
16:47 exonity Whats the best way, to generate my script by "mojo generate"? Do you copy the mojo application in your current project? Or did you add it to your enviroment home path?
16:59 sri powerman: it's not, happened on different servers
17:02 nic exonity: It works both ways
17:03 nic I prefer to always install Mojolicious (and all other dependencies) locally to the project
17:03 nic but if you're happy with using a globally installed version, that's probably the more common choice
17:03 exonity yeah, i think it was a problem on my installation. In the documentation, they use "mojo" in every directory and it still works. On my system, i can't do this, because there is no entry in the home path
17:04 exonity I installed it globally, i think, with curl
17:04 nic for me it's always ./dep/bin/mojo or ./bin/myapp
17:04 * sri uses perlbrew
17:04 exonity and was your home path set automaticly?
17:05 nic exonity: what os are you on?
17:05 exonity on macos
17:05 exonity http://nopaste.info/d15d80dfbe.html
17:05 exonity thats how i installed it
17:06 nic it'll just be a case of adding mojo's bin dir to your bin path
17:06 exonity yeah, i know, but should happen this in the installation?
17:06 exonity but its no problem, i add it by myself
17:08 nic there are many different ways of installing; eg if you use local::lib then it modifies your path for you
17:09 exonity okay
17:09 exonity thanks!
17:13 mire joined #mojo
17:23 batman just built an application as a plugin: http://screencloud.net/img/screenshots​/a9d843b0e90d11ef7d07ab91036a5831.png :)
17:24 batman https://metacpan.org/releas​e/Mojolicious::Plugin::Ubic # soon there i hope...
17:24 batman i've become a big ubic fan. hope it doesn't bit me :)
17:24 exonity ohhh just to set homepath doesnt work
17:26 dvinciguerra joined #mojo
17:27 exonity i added /Users/markus/perl5/bin what mojo etc contains. When i now run "mojo generate app TestApp" i got the following message "Can't locate Mojolicious/Commands.pm in @INC ([...]"
17:27 exonity When i run it in the downloaded dir, it works
17:28 sri exonity: if you're not sure what you're doing, perhaps you should pick a standard solution
17:29 exonity Hm i did, what i read in a book
17:29 sri as in perlbrew, or install to system perl with root
17:29 exonity he was installing with "curl
17:30 exonity oka
17:30 exonity "okay
17:30 sri just a thought
17:32 batman sri: it's much easier to do it the hard way.
17:32 batman or...?
17:32 batman i'm confused :)
17:32 sri that appears to be your normal state ;p
17:32 dod joined #mojo
17:33 batman fortunately for me as well :/
17:33 batman oops unfortu...? /me gives up
17:36 exonity I really try to find an easy way,.. perhaps it doesnt look so, but i try ;D
17:37 batman so which command or which tutorial do you use to set perl up?
17:37 exonity perl was allready installed on macos i think
17:37 exonity but now I reinstall everything, with only ONE system perl
17:38 exonity and perlbrew
17:38 exonity hope, that this is working better
17:40 batman https://metacpan.org/pod/App::perlbrew#SYNOPSIS <-- did you do this?
17:40 exonity no, i read on http://perlbrew.pl/
17:41 exonity but, only for installing it
17:41 exonity the next steps i can do like your tutorial
17:42 alnewkirk u266B
17:42 batman exonity: right. it's pretty much the same, just more shiny :)
17:43 exonity which perl version, do you guys advise me?
18:00 good_news_everyone joined #mojo
18:00 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/HgwRsQ
18:00 good_news_everyone mojo/master 062f18d Sebastian Riedel: even more links
18:00 good_news_everyone left #mojo
18:01 sri i guess hooks deserve their own section, like events... http://mojolicio.us/perldoc/Mojolicious#HOOKS
18:09 exonity so, everything works
18:09 exonity Thanks a lot!
18:09 exonity ;-)
18:10 exonity Now, one more small question, is it the right way, that I generate a basic app, and after it is generated, I edit my Application file and the controllers?
18:11 exonity last time i wrote everything by hand and batman was crying on me :D
18:11 batman uhm... yes. and templates and static files
18:11 exonity yes.
18:11 batman generate a lite app is probably easiest if you're new
18:11 batman read the Mojolicious::Lite tutorial
18:11 exonity hmm the logic i wrote was working without problems
18:12 batman exonity: i'm using 5.16, but if you can, use the latest. 5.18 or 5.19
18:12 exonity my problem was to run the script. I run it with "Mojolicious::Commands->start_app("YAFProto", "daemon", "-l", "http://*:8080");"
18:12 exonity what was working
18:13 Vandal joined #mojo
18:13 exonity but my problem is, that this should be a webinterface for an existing server. I want run my script in this existing application, because i have to edit and read some variables from the main script
18:14 exonity so i have to run my web application with a daemon? or?
18:15 batman that is just not right.
18:16 exonity okay
18:16 batman perl script/yourapp daemon -l http://*:8080 # that's how
18:16 batman or morbo script/yourapp -l http://*:8080
18:16 exonity is there no way, to run it from a exisiting programm?
18:16 batman i have no idea what you're asking about
18:17 exonity okay, i try to explain it.
18:17 batman script/yourapp <-- that file is generated and you should use that
18:17 sri don't use 5.19!
18:17 batman "yourapp" is just an example
18:17 exonity There is a big application for house automation. This is written in perl.
18:17 exonity there you can write plugins for, in perl.
18:17 batman sri: what's going on with 5.19?
18:18 sri it's broken all the time
18:18 batman ok :)
18:18 exonity And what i want to do is, to write a webinterface for this existing application
18:19 exonity do you now know?
18:19 batman i can't even start to describe how little i understand.
18:19 exonity hmm
18:19 batman have you tried to generate an app?
18:19 exonity yeah, that works
18:19 exonity no problem
18:20 exonity i can run it
18:20 exonity everything works
18:20 batman "mojo generate My::App"
18:20 exonity thats not my problem ;)
18:20 * batman gives up.
18:20 exonity :D
18:20 exonity sorry
18:20 batman i'm betting 100 bottles of beer you've set things up is wrong.
18:21 batman s/is//
18:23 gtodd joined #mojo
18:25 bluescreen joined #mojo
18:25 exonity so, that you belive me, that it was correct.
18:26 exonity http://nopaste.info/234c886770.html
18:26 exonity thats what i generated
18:26 exonity This is a correct application i think? ;)
18:26 batman how does mojo_test look?
18:26 batman script/mojo_test <--- do you use that script?
18:27 exonity http://nopaste.info/320314dd3f.html
18:27 exonity thats mojo_test
18:27 exonity i dont use this at the moemnt
18:27 exonity it was generated, too
18:28 batman so why are you messing around with Mojolicious::Commands->start_app("YAFProto", "daemon", "-l", "http://*:8080");" ?
18:28 exonity That was my first try, some days back
18:28 exonity Today i started to generate the application
18:29 batman \o/
18:30 nic ah, I think I know what exonity is getting at
18:30 nic He has an existing non-mojo script or app and wants to start up his mojo app from within that
18:35 batman that sounds super weird
18:36 exonity yes
18:36 exonity right
18:36 exonity why sounds this super weird?
18:37 batman sorry, it's not weird.
18:38 exonity okay, you think it is stupid ;)
18:39 batman not really. i've spent two weeks trying to start a mojo app from within an incredible awful internal process control system
18:39 batman that's why i'm using ubic now.
18:39 batman during two hours i managed to install it and start most of my daemons + write a toadfarm starter for ubic
18:40 batman but i'm not sure what "from within another app" means.
18:40 exonity http://fhem.de/fhem.html
18:41 exonity this is the programm, for that i want to write a new web interface
18:42 exonity its an existing code, where I am writing a module for
18:43 exonity at the moment there is a small webinterface, written by thereself... only working with GET and yeah....
18:43 exonity I like mojolicious and want to integrate a new webinterface written in mojolicous
18:44 exonity the problem is, that when I start the webinterface as stand alone
18:44 exonity i have no access to the internal variables
18:56 bluescreen joined #mojo
18:57 bluescreen joined #mojo
19:01 exonity It would be nice to run a Majo app in a new thread ;D
19:01 batman why not start with something basic? you might find it easier to copy/paste old code into the new app than trying to make mojo fit into a way too small glove
19:02 d4rkie joined #mojo
19:05 exonity You mean to copy fhem code in a new Mojo App?
19:06 batman yes
19:07 exonity thats not possible
19:07 batman you know you can use Modules; from the existing project?
19:07 batman no. of course it's not possible...
19:07 exonity not possible in sense of my problem.
19:07 exonity I want write a FHEM module, which user can download over FHEM update
19:08 exonity when i write a complete new script, nobody will use it
19:13 Mike-PerlRecruiter_ joined #mojo
19:18 d4rkie joined #mojo
19:31 bluescreen joined #mojo
19:33 bowtie_ joined #mojo
19:39 good_news_everyone joined #mojo
19:39 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ipJ06A
19:39 good_news_everyone mojo/master 701073e Sebastian Riedel: fixed Mojo::Log typo
19:39 good_news_everyone left #mojo
20:08 dpetrov_ joined #mojo
20:14 kanishka joined #mojo
20:42 good_news_everyone joined #mojo
20:42 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/X1__og
20:42 good_news_everyone mojo/master 88e782c Sebastian Riedel: fixed support for links within a page in Mojolicious::Plugin::PODRenderer
20:42 good_news_everyone left #mojo
20:47 denisboyun joined #mojo
21:19 bluescreen joined #mojo
21:21 good_news_everyone joined #mojo
21:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/3bFmQA
21:21 good_news_everyone mojo/master 01f1640 Sebastian Riedel: documentation tweak
21:21 good_news_everyone left #mojo
21:48 good_news_everyone joined #mojo
21:48 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/p1uX1w
21:48 good_news_everyone mojo/master c888e50 Sebastian Riedel: isolate mojobar handling
21:48 good_news_everyone left #mojo
22:32 jberger_ joined #mojo
22:33 jberger_ o/
22:33 jberger_ Wow I see things got a little heated today
22:34 jberger_ Related to env, but not returning to the day's discussion I hope:
22:35 jberger_ Is there an easy way to start an app with a specific config file?
22:36 jberger_ Galileo has an env var in which you can specify a config file to load
22:36 jberger__ joined #mojo
22:37 jberger__ But for my new app being able to pass the file to the app would make more sense
22:38 jberger__ It's the next iteration of my presentation app/abuse of mojo template
22:39 jberger__ Was M::P::SimpleSlides will be App::SimpleSlides
22:41 jberger__ so the config file defines the presentation, and therefore it would be nice to be able to run 'simple_slides mypresentation.pl'
22:45 jberger__ For now I have a simple hack in my application script, but I was wondering if there could or should be a more generic way to specify a config file to load
22:46 jberger__ (At the command line)
22:52 sri a) we don't load the config plugin by default b) morbo and hypnotoad don't do many command line options, especially not so high level ones
22:54 sri if anything, i think we might want to remove command line options :)
22:54 sri like --home
22:59 jberger__ All true, however core functionality is driven by the config plugin, especially for hypnotoad
23:03 jberger__ I would argue that if we wanted, if we could specify a config file on the command line in some sane way, we could move more command line options to a config file approach
23:05 tianon isn't that what MOJO_CONFIG is for?
23:05 tianon https://metacpan.org/pod/Mojo​licious::Plugin::Config#file -> "Full path to configuration file, defaults to the value of the MOJO_CONFIG environment variable or myapp.conf in the application home directory."
23:05 sri jberger: that's incorrect, hypnotoad knows nothing about the plugin, just app->config
23:09 sri in fact, i'm pretty sure it's too late now to make config files more powerful, since we already have too many plugins to support
23:10 sri not to mention having to choose one format
23:10 sri GOOGLE Y U NO SEND ME NEXUS 5! :S
23:12 gblade joined #mojo
23:17 jberger__ sri: yep, got me there
23:17 johnny5_ joined #mojo
23:18 jberger_ joined #mojo
23:18 * sri has been fighting with google play and lost :(
23:22 johnny5_ joined #mojo
23:25 johnny5_ joined #mojo
23:28 jberger_ joined #mojo
23:28 jberger_ GOOGLE PLAY WHY YOU NO LET sri WIN?
23:33 * jberger_ wishes for a Mojolicious::Command::nopaste or the like
23:33 * jberger_ adds it to the mental list
23:38 jberger_ sri: this is my current hack, simple but effective and works for all 3 servers
23:38 jberger_ http://pastie.org/8449247
23:38 jberger_ the env var is then used as the file arg to Config
23:38 jberger_ does this seem sane?
23:39 jberger_ I can then still do this: perl bin/simple_slides ex/mypres.pl get /
23:53 gblade joined #mojo

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