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

IRC log for #mojo, 2017-09-05

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

All times shown according to UTC.

Time Nick Message
00:23 adv_ pink_mist: Devel::NYTProf or Benchmark?
00:24 adv_ can i save the ancestors call somehow?
00:25 pink_mist why would I ever say "Devel::NYTProf" if what I meant was "Benchmark"? no. NOT Benchmark. I said Devel::NYTProf because that's what I meant.
01:10 mib_oq4h8v joined #mojo
01:18 adv_ pink_mist: thanks
01:26 adv_ gah
01:26 adv_ fails on strawberry
01:51 ilbot2 joined #mojo
01:51 Topic for #mojo is now � nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
01:57 itaipu joined #mojo
02:16 zivester2 joined #mojo
02:20 noganex_ joined #mojo
04:04 dboehmer joined #mojo
05:21 dod joined #mojo
05:28 dod joined #mojo
05:43 inokenty-w joined #mojo
06:01 tyldis Mojo and roles.. Recommendations?
06:07 preaction Role::Tiny was just added as an optional dep to Mojolicious, irrc
06:25 n16gel joined #mojo
06:44 AndrewIsh joined #mojo
06:50 dod joined #mojo
06:56 Vandal joined #mojo
07:15 trone joined #mojo
08:00 bianca joined #mojo
08:12 bianca joined #mojo
08:38 stryx` joined #mojo
08:43 dod joined #mojo
08:49 karjala_ joined #mojo
09:52 sh14 joined #mojo
10:58 rshadow joined #mojo
11:10 tchaves joined #mojo
11:34 dod joined #mojo
11:39 bianca joined #mojo
11:50 dantti_laptop joined #mojo
12:16 marty_ joined #mojo
12:34 marty joined #mojo
12:37 itaipu joined #mojo
13:03 bianca joined #mojo
13:04 * marty had a chance to try vscode today and found it surprisingly useful.
13:08 cosimo joined #mojo
13:14 kes joined #mojo
13:29 gizmomathboy joined #mojo
13:30 gryphon joined #mojo
13:52 rshadow joined #mojo
13:54 sri batman: i've complained a lot about some of your modules recently, but assetpack is pretty great these days
13:54 sri batman++
13:54 batman "some of your modules"...? i thought you only hated mojo-mysql
13:54 batman i hate assetpack.db :(
13:55 batman going to kill that file when i have more time
13:58 sri hmm, i could swear i was complaining about other modules too, but i only remember Mojo::mysql now
13:58 batman pretty happy with the assetpack design though
13:59 batman maybe you have been... i wouldn't know.
13:59 sri assetpack.def is actually quite comfortable to use
14:00 dantti_laptop joined #mojo
14:00 batman yeah. too bad i invented the format, but i'm quite happy with it.
14:00 sri i need a file tree, is bootstrap-treeview the best choice? https://github.com/jonmiles/bootstrap-treeview
14:01 sri bootstrap+jquery project
14:05 cosimo joined #mojo
14:08 vicash sri: https://github.com/idleberg/Bootstrap-Listr is also neat.
14:11 sri hmm, that's a very different approach, but also not bad
14:55 zivester2 joined #mojo
14:59 ChmEarl joined #mojo
15:18 kgoess joined #mojo
15:20 kgoess joined #mojo
15:22 pheleas_frog joined #mojo
15:23 pheleas_frog Hi I have a perl question regarding Mojo::Server::Prefork implementation
15:24 pheleas_frog do all workers use the same file handle to write heartbeats to the manger?
15:27 disputin joined #mojo
15:27 disputin joined #mojo
15:42 CandyAngel pheleas_frog: Looking at the code, I'd say yes
15:42 CandyAngel They send their PID to the manager process
15:43 pheleas_frog is there a chance for the messages to interleave?
15:45 pheleas_frog I guess not but I don't understand why as there is no locking mechanism used for writing
15:50 CandyAngel I think syswrite to the pipe is atomic
15:52 CandyAngel http://www.perlmonks.org/bare/index.pl?node_id=419813
15:53 pheleas_frog great answer couldn't find it myself thanks a lot!
15:54 pheleas_frog also found this https://www.gnu.org/software/libc/manual/html_node/Pipe-Atomicity.html
15:54 CandyAngel ^_^
16:55 disputin joined #mojo
18:01 jacoby joined #mojo
18:08 n16gel joined #mojo
18:20 disputin joined #mojo
18:29 disputin joined #mojo
19:06 kubrat joined #mojo
19:16 bianca joined #mojo
19:36 PopeFelix joined #mojo
19:58 rshadow joined #mojo
21:14 gryphon joined #mojo
21:15 disputin joined #mojo
21:25 rickbol_ joined #mojo
21:32 maschine joined #mojo
21:32 maschine been a while since I've had a question - I think I'm going about my routes in the wrong way
21:32 maschine let's say I have a route that looks like this: get "/S/:region/:client/:project/:dir1/:dir2" => sub { ... };
21:33 maschine where :dir1, :dir2, and maybe even :dir3 may not exist
21:33 maschine I'd rather not have to make 3 copies of each route for the "variable" :dirs, so how do I handle that?  Under?
21:34 maschine basically the action is the same except it uses the :dir parameters to look for files/folders in different locations on the server
21:34 marty joined #mojo
21:34 marty joined #mojo
21:58 maschine can groups be nested?
21:58 pink_mist sure
22:10 jberger are the dirs essentially free form paths?
22:10 jberger you could just make that match *dirs and then reparse that variable
22:15 maschine so I would do /*dirs and then basically split out dir1/dir2/dir3 manually inside the controller?
22:17 cfedde pretty much
22:20 maschine wierd.  I didn't even have do that - I just changed it to *dir1 to test, and it works on all of them.  I swear I tried it before and it didn't work.
22:21 maschine it must just pass /dir1/dir2/dir3 etc. automatically then?
22:22 cfedde I might want to know exacty what is getting into the parameter.   maybe by generating a logging message in debug mode.
22:28 maschine yeah that's exactly what it does - thanks to the mojo team for making my life easy when i wanted to make it hard :)
22:29 maschine Another question..  let's say I want to save an array that will stay in scope unless it's asked to redefine itself.
22:29 maschine Something like stash - but if another user accesses the app, they will get the same array values unless they redefine it.
22:29 maschine I tried stash but after about 4-5 connections it resets
22:30 cfedde I would not have expected state to persist between transactions.
22:30 maschine I also tried setting up a new $config->{'foo'} on the fly, but I think that is wrong
22:30 maschine generally no, but in this case yes
22:32 maschine it's basically a list of clients / projects, I can't pre-define them in config because they change all the time, but if I send somebody a link to www.myapp.com/client I want them to at least see the last "state" of projects that was last loaded
22:34 maschine actually the problem is I'm going to /client/project/foo/bar and it's losing the array that contains the clients/projects
22:35 PopeFelix I'm creating a toy Mojolicious app to test the behavior of an HTTP client. Am I correct in assuming that running a server via Mojo::Server::Daemon->ioloop would block, requiring me to run the toy app in a separate process/thread?
22:35 rickbol joined #mojo
22:37 maschine I could have it look back into the /client folder and redefine the projects array every time but that's a waste of resources, they don't change *that* often..
22:48 jberger maschine the * allows the route pattern to match slashes
22:48 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Wildcard-placeholders
22:48 maschine of course, I should have thought of that..  I must have read that section of the docs 4-5 times. lol
22:49 jberger As to sharing data between clients
22:49 jberger You need a storage backend for that
22:49 jberger A db, even if just a memory one
22:49 maschine yeah, that's kind of where I was leading too
22:50 jberger For very low volume DBM::Deep is easy and nice
22:50 jberger But you quickly hit its limits
22:51 maschine it would only need to store an array of maybe 100 values
22:51 maschine and maybe only 1-2 people accessing it at one time
22:51 jberger That isn't really the problem, the problem is write looking IIUC
22:52 jberger Locking
22:52 jberger Also it is only a single server
22:52 jberger Well on a single server
22:54 maschine probably easy enough to use SQLite
22:54 maschine or even postgres
22:56 maschine assuming I can access it inside the template?
23:02 dotan_convos joined #mojo
23:21 rickbol joined #mojo
23:25 dotan_convos joined #mojo
23:28 rickbol_ joined #mojo
23:53 kgoess joined #mojo

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