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

IRC log for #mojo, 2016-11-03

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

All times shown according to UTC.

Time Nick Message
00:20 polettix joined #mojo
00:26 lluad joined #mojo
00:39 janus joined #mojo
01:08 lluad joined #mojo
01:50 polettix joined #mojo
02:03 lluad joined #mojo
02:26 disputin joined #mojo
02:33 lluad joined #mojo
03:57 noganex joined #mojo
04:45 aborazmeh joined #mojo
05:24 jberger Cubs win!
05:24 jberger \o/
05:34 inokenty-w joined #mojo
06:14 tojo joined #mojo
06:24 dod joined #mojo
06:30 dod joined #mojo
06:37 dod joined #mojo
06:51 polettix joined #mojo
06:54 mbudde joined #mojo
07:01 dod joined #mojo
07:46 AndrewIsh joined #mojo
07:56 Jonis jberger: you a cubs fan?
07:57 stryx` joined #mojo
08:05 polettix joined #mojo
08:08 janl joined #mojo
08:10 rshadow joined #mojo
08:22 trone joined #mojo
08:40 preaction i was until about 30 seconds ago, at 3:39:23am US/Central, when yet another batch of fair-weather Cubs fans woke me up with honking and screaming outside my window
08:41 janl the _cubs_ won something?
08:44 preaction after 108 years, the Chicago Cubs won the World Series
08:44 janl did they refind their mojo?
09:30 meroy joined #mojo
09:33 meroy Hi all. I made https://github.com/marioroy/Mojo-IOLoop-HoboProcess for Mojolicious. It runs on all platforms where MCE::Shared runs including Microsoft Windows. An example is also provided in the documentation where workers share data between themselves.
09:35 rshadow joined #mojo
09:37 meroy I received help by looking at Mojo::IOLoop::Subprocess and Mojo::IOLoop::Subprocess::Sereal. Thank you. I wanted to try MCE::Hobo with Mojolicious and have the ability to share data between workers without any impact to the main event loop.
09:47 osfabibisi joined #mojo
10:18 stryx` joined #mojo
10:30 polettix joined #mojo
10:55 stryx` joined #mojo
11:14 trone joined #mojo
11:18 tchaves joined #mojo
11:52 itaipu joined #mojo
12:00 gregf_ joined #mojo
12:01 polettix joined #mojo
12:02 rubin joined #mojo
12:07 jberger Jonis yessir!
12:31 Jonis jberger: congratulations :)
12:31 janl left #mojo
12:45 dantti_laptop joined #mojo
12:46 aborazmeh joined #mojo
12:56 gizmomathboy joined #mojo
13:00 zivester joined #mojo
13:04 aborazmeh joined #mojo
13:23 ufo joined #mojo
13:37 ramortegui joined #mojo
13:47 rshadow joined #mojo
14:32 asarch joined #mojo
14:41 lluad joined #mojo
15:05 blonewolfs joined #mojo
15:06 Grinnz he left, but I was going to say, that INSTALL file is generated by Dist::Zilla::Plugin::InstallGuide
15:13 zivester joined #mojo
15:36 disputin joined #mojo
16:57 dod joined #mojo
17:03 disputin joined #mojo
17:28 flow joined #mojo
17:29 flow hi guys.
17:29 purl well, hi guys. is it common to not get datetime data type from mysql51? i got empty variable...
17:29 Grinnz purl: forget hi guys.
17:29 purl Grinnz, I didn't have anything matching hi guys
17:30 Grinnz :/
17:33 spicyjack purl: forget hi guys.
17:33 purl spicyjack, I didn't have anything matching hi guys
17:33 spicyjack oops, I didn't see you already tried it with the period
17:33 spicyjack sorry
17:34 flow after I could solve my yesterday's problem, well, at least a part of it, I cannot manage to reset the status code suggested by my exception object.
17:35 flow And I wonder why my exception object is serialized in the first place :-/
17:37 flow Can I tell Mojolicious somehow that if an object of my app-specific exception class is thrown, it is not to serialize it?
17:38 flow Feel like I do not know enough of Mojo to fiddle with these things.
17:43 flow What I am basically trying to achieve is that any exception thrown that is an instance of my custom exception class must be rendered to json if json is expected by client, otherwise it is to be rendered with a custom template.
17:44 flow plus, the http response status must be in line with what the exception suggests
17:59 flow the unwanted serialisation I can work around. My exception class has a class method last_error() to call in favour of the exception of mojolicious. But the code is all but impressive.
18:03 disputin joined #mojo
18:08 flow but how can I set $c->res->code(...) in my before_render hook and have it respected when an exception is thrown?
18:16 flow have to quit now
18:17 flow will post an issue on github on that one.
18:22 flow looks like the code is set somewhere after rendering the exception.
18:39 stryx` joined #mojo
19:05 Oleg joined #mojo
19:06 Oleg Anybody using windows's 10 ubuntu bash?
19:07 Oleg The strange thing is that I can't install any perl module here. Some problem with @INC
19:09 genio Oleg: There's an open issue with them on installing modules.
19:09 genio with a work-around
19:09 Oleg do u have a link with discussion?
19:10 trone joined #mojo
19:11 genio https://github.com/Microsoft/BashOnWindows/issues/186
19:12 genio https://github.com/Microsoft/BashOnWindows/issues/186#issuecomment-210900975
19:12 marty_ joined #mojo
19:14 genio sorry, took me a while to remember where it was ^^
19:14 Oleg Thank you! Really some problems with hard/soft links in their linux subsystem
19:15 genio hope that helps!
19:16 Oleg this helped much, thanks again :)
19:32 janus joined #mojo
19:40 demian joined #mojo
19:43 demian I have programmed a websocket that takes drag and drop file uploads, does some work, and dynamically updates the page with results (mojolicious rocks!);  I would like to keep a running count of the uploads/work
19:45 demian I thought I could do so in the session with a session('count' => 0), and then increment as the websocket exits (this would keep the count between file drops), but the updated value returns to 0 the next time the websocket fires
19:46 demian is there a way to do this with the session or is there a better way?
19:51 asarch Sorry if I ask this twice but I cannot find the answer: how could I create an object on the fly?
19:51 asarch A Moose-alike object
19:52 asarch Is it Moo or Mouse?
19:55 * asarch cannot find it on his notes...
20:03 pink_mist uhm, you create objects by running their constructor
20:03 pink_mist no idea what you mean by "on the fly"
20:04 pink_mist whether it's Moo, Moose, Mouse, Mojo::Base, pure perl objects ... the same is true for every kind
20:04 pink_mist you run their constructor
20:05 PryMar56 joined #mojo
20:06 pink_mist or did you mean you wanted to create a *class* "on the fly"? that's a different pattern .. one I'm not familiar with, so no idea :P
20:07 genio bless ?
20:07 purl bless is create an object or bless %b, 'The'; tie %that, 'Binds';
20:07 pink_mist genio: bless doesn't create a class, no ... it creates an object of a class
20:08 genio pink_mist: I'm guessing based on some other content
20:11 pink_mist demian: I don't actually know much about how websockets behave, but afaik they are a persistent connection that doesn't actually use http to talk inside it, so trying to change a session value, which relies on cookies, which relies on http headers, which relies on the protocol being http ... will not actually do anything at the end of a connection..? you'd probably need to have some javascript read from
20:11 pink_mist the socket and update the cookie if you want to do it that way
20:13 demian That helps!  thanks, pink_mist!
20:32 asarch I mean, I could in Point.pm: package Point; use Moose; has 'x' => (is => 'rw'); ... 1;
20:32 asarch And then I could: use Point; my $p1 = Point->new(x => 10, y => 15, ...);
20:33 asarch I mean, to have something similar to "Point" but with actually not using a separate module for it
20:33 Grinnz asarch: you need a separate module for "use Point" to work anywhere else, but if you don't need that, you can just define the package in your file
20:34 Grinnz I think jberger may have also written something for anonymous object classes
20:34 asarch Even a Moose object?
20:34 Grinnz sure
20:34 Grinnz package Point { use Moose; .... } my $p1 = Point->new;
20:35 asarch I remember somebody told me how but I can't find it... :'-(
20:35 Grinnz (the package {} syntax requires perl 5.14 I believe)
20:35 asarch Thank you
20:35 Grinnz alternatively: {package Point; use Moose; ... } my $p1 = Point->new;
20:35 asarch Thank you very much :-)
20:35 asarch Ok
20:36 Grinnz as soon as you leave either of those blocks, you're back in the original namespace
20:37 asarch Ok
20:37 CW joined #mojo
20:39 meroy joined #mojo
20:41 zivester joined #mojo
20:42 meroy demian: Another way is constructing a shared scalar or hash variable with MCE::Shared.  my $counter = MCE::Shared->scalar(0);  Then, increment with $counter->incr; The shared-manager process runs independently without impacting the main event loop.
20:45 meroy Another possibility is for Mojo::Cache to have sugar methods; ( e.g. ->incr, ->decr, etc. ) without having to call get and set explicitly.
20:46 jberger meroy: sorry I haven't had time to look at things yet
20:46 jberger these have been a very busy couple weeks for me
20:46 meroy When running multiple workers, this is possible: my $cache = MCE::Shared->share( Mojo::Cache->new( max_keys => 50 ) );
20:47 meroy jberger, no problem at all
20:47 jberger and then I've promised to look over the RabbitMQ module first, so I'll take a look after that
20:57 meroy jberger, thank you
20:57 jberger if I don't get back to you in a week or so, ping me
20:58 meroy okay
23:15 polettix joined #mojo
23:17 jnbek joined #mojo
23:34 bpmedley joined #mojo

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