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

IRC log for #mojo, 2016-03-21

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

All times shown according to UTC.

Time Nick Message
00:00 atom I have a controller that I want to output a SVG image, "/service/sparkline" ... I make the sparkline and try to render the SVG:  $self->render( svg => $sl1->to_string );
00:00 atom then when I call it in a webpage <img src="/servcie/sparkline"> ...  mojo can't find the route
00:01 atom I added to my App.pm:  $self->types->type( svg => 'image/webp' ); ... because my browser is asking for a 'image/webp' in the Accept key
00:02 atom what would be the proper way of making a controller return SVG text to render in another template as an image?
00:02 good_news_everyon joined #mojo
00:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vaMLu
00:02 good_news_everyon mojo/master eb79af2 Sebastian Riedel: better examples for method arguments
00:02 good_news_everyon left #mojo
00:09 atom hmm.... it seemed to have worked by replacing $self->render( svg => $sl1->to_string ); with $self->render( data => $sl1->to_string );
00:10 Rubes joined #mojo
00:13 sri svg is not a reserved stash value
01:00 ivi joined #mojo
01:04 Rubes joined #mojo
01:09 atom if I have App::Controller::Service::Sparkline and I use $logged_in->any('/service/sparkline')->to('Service::Sparkline#index') ... how would I call the sparkline controller in ->render_to_string?
01:23 atom I think this is close:   $self->render_to_string( controller => 'service_sparkline', action => 'index' );
01:23 atom but all the variations I try for the controller name don't work ~:/
01:29 sri you might want to take a closer look at the guides
01:29 sri http://mojolicious.org/perldoc
01:29 atom I've been all over the guides... can't figure out what I'm missing
01:30 sri rendering a controller is not a mojolicious concept, so you won't find it there
01:30 atom oh, that's what I thought "render_to_string" was for
01:31 atom okay, thanks... I'll try doing it a different way
01:31 atom I thought this from the perldoc:  Sometimes you might want to use the rendered result directly instead of generating a response, for example, to send emails, this can be done with "render_to_string" in Mojolicious::Controller.
01:32 atom meant that I could grab another controllers output
01:34 good_news_everyon joined #mojo
01:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vaMO7
01:34 good_news_everyon mojo/master 9a9965e Sebastian Riedel: use more generic stash values
01:34 good_news_everyon left #mojo
01:35 sri you might have misinterpreted that example
01:35 sri it only used controller/action to generate a template name
01:36 sri http://mojolicious.org/perldoc/Mojolicious/Controller#render
01:36 sri it's gone now
01:36 sri what you want is a helper i believe
01:46 atom so can a helper render info from a controller?  I'm making an external module to make the data that was in the controller I was trying to get data from
02:04 Rubes joined #mojo
02:05 inokenty-w joined #mojo
02:06 aborazmeh joined #mojo
02:15 marty_ joined #mojo
02:16 Grinnz oh man that last scene
02:23 mcsnolte joined #mojo
02:25 bradjm joined #mojo
02:28 sri i liked jessica jones more i guess
02:29 sri even though the punisher may just be my favorite character in the marvel/netflix universe, the actor is killing it (pun intended!)
02:33 * sri does not like ninjas :o
02:35 jberger I have to ask again, cause I keep forgetting
02:35 jberger which order am I supposed to watch these in
02:35 * jberger ducks
02:35 sri season 1 before season 2 ;p
02:36 jberger hahaha
02:36 jberger I mean JJ vs DD
02:36 sri i think it doesn't matter much
02:36 sri it was released as dd1, jj, dd2
02:37 sri but there's little references between the shows
02:37 jberger I need a new show
02:37 jberger I haven't even finished this house of cards season yet
02:37 jberger wasn't holding my attention
02:38 sri just the nurse mentions that she knows all the heroes and shows up in all shows
02:38 sri but that's very minor
02:39 sri jessica jones is more psycho thriller, and daredevil pure action
02:39 jberger I'll probably like JJ better then
02:39 jberger I like some action but I have to care about the characters or I'll get bored
02:40 jberger I'm still really sad that my plot for House of Cards season 3 didn't happen
02:40 sri house of cards season 3 was so boring
02:40 jberger I'm actually kinda bummed that the white house was all they were aspiring to, I actually wanted them to have been thinking more
02:41 sri season 4 was better, and visibly more expensive, but at the end nothing really happened
02:41 jberger now that this isn't gonna happen, I'll give you my 2 min fan fic :-P
02:41 jberger I wanted it to be about her and her african NGO
02:41 jberger once he got the white house she starts taking over africa
02:42 sri lol
02:46 jberger I wanted world domination
02:46 jberger and I wanted her to be the real genius of it
02:46 sri maybe world destruction in season 5
02:46 jberger who knows
02:46 sri btw. daredevil does have good characters too
02:46 sri the big name villains are top notch, kingpin and punisher are some of the best acting ever
02:46 kaare_ joined #mojo
02:46 Grinnz Foggy's friend also mentions jessica jones but I don't think she's actually been on that show
02:46 Grinnz and yeah the characters in daredevil are great too
02:46 sri and both shows mention the alien invasion in new york from the avengers movie
02:47 jberger I've seen those
02:47 sri then you're all prepared ;p
02:47 jberger (though the details escape me at the moment :P)
02:48 sri wormholes in the sky...big flying dragon thingy... hulk smash
02:48 jberger hahahah
02:48 Grinnz "I'm always angry"
02:48 jberger I did like the second avengers too
02:48 Grinnz I haven't actually seen the second one yet lol
02:48 jberger Grinnz: gosh man, catch up!
02:49 Grinnz not on netflix, means there's effort involved :P
02:58 genio Man, Fisk is there benching 495lbs like it's nothing
03:00 genio Very few people in this world can do that and none of them are as weak looking as Fisk
03:09 sri he's not weak lookin
03:10 sri could pass as an olympic weightlifter
03:11 genio not really, his arms are pretty skrawny.  as is his chest.  He's a large man, but nothing about him screams "strong"
03:13 upasana joined #mojo
03:14 sri joined #mojo
03:15 upasana_ joined #mojo
03:19 Zx3 joined #mojo
03:19 stephan48 joined #mojo
03:20 sri joined #mojo
03:24 crab joined #mojo
03:26 sri joined #mojo
03:28 Zx3 joined #mojo
03:34 crab joined #mojo
03:35 noganex_ joined #mojo
03:39 stephan48 joined #mojo
03:41 sri joined #mojo
03:46 stephan48 joined #mojo
03:48 s1037989 I'm getting a timeout on mojolicious.org
03:50 s1037989 ...and we're back!  :D
03:57 stephan48 joined #mojo
04:50 Rubes joined #mojo
05:10 asarch joined #mojo
05:11 melo joined #mojo
06:31 marty_ joined #mojo
07:21 kes joined #mojo
07:25 dod joined #mojo
07:29 eseyman joined #mojo
07:29 dod joined #mojo
07:37 melo joined #mojo
07:38 ichi joined #mojo
07:48 punter joined #mojo
07:51 McA joined #mojo
07:55 Rubes joined #mojo
07:57 salva joined #mojo
08:03 sugar joined #mojo
08:13 punter joined #mojo
08:13 osfabibisi joined #mojo
08:17 Vandal joined #mojo
08:19 AndrewIsh joined #mojo
08:23 trone joined #mojo
08:24 bjakubski joined #mojo
08:45 crab joined #mojo
08:49 bc547 joined #mojo
08:52 arthas joined #mojo
09:22 esh joined #mojo
09:36 irqq joined #mojo
09:37 Shaeto joined #mojo
09:49 marty joined #mojo
10:21 melo joined #mojo
11:03 mishanti1 Accidentally added Moose as a requirement in a cpanfile, so now I have a local clone of CPAN.
11:05 eseyman :-)
11:14 dvinciguerra joined #mojo
11:38 marty joined #mojo
11:53 Shaeto joined #mojo
11:56 Shaeto1 joined #mojo
12:08 Shaeto joined #mojo
12:13 batman joined #mojo
12:24 kes joined #mojo
12:28 Shaeto joined #mojo
12:45 neilhwatson joined #mojo
12:50 dod joined #mojo
12:51 dod joined #mojo
13:06 bwf joined #mojo
13:08 mitya joined #mojo
13:13 Shaeto joined #mojo
13:14 perlpilot_ joined #mojo
13:18 Shaeto1 joined #mojo
13:20 perlpilot joined #mojo
13:22 vicash hi, i want to embed an svg file on the HTML page that is rendered by my Mojo controller. Do I use the <object> tag or do I use inline-SVG rendering ? My svg files are stored in a database, so I have to create a new file each time the page is rendered.
13:23 Shaeto joined #mojo
13:30 pink_mist well first of all, you most certainly don't need to create a file on your filesystem every time. you can have a route handler that gets the data from the database.
13:30 pink_mist second of all, your question will be answered by a html tutorial. it has nothing to do with mojo really
13:31 vicash thanks.
13:54 dabudabu Why is it stored in a database?
14:02 asarch joined #mojo
14:17 jnbek joined #mojo
14:26 CandyAngel Is it just me or is "is_fatal" not in the deprecated list (replaced by is_level)?
14:30 CandyAngel Ah, nevermind, it was removed in 6.35
14:30 CandyAngel Or something
14:31 CandyAngel Oh.. or 6.0
14:43 sri is_fatal is completely pointless, since it's always true ;p
15:02 vicash dabudabu: because it isn't static svg. it changes as the application updates it, so i store it in a database.
15:04 mishanti1 I'm curious, do people here have their own darkpans set up for internal code? If so, what do you use for managing it?
15:10 preaction teams i've been on have used orepan and pinto
15:13 mishanti1 preaction: Thanks for the feedback. Orepan seems decent.
15:23 PryMar56 joined #mojo
15:28 sri some javascript drama to start the week :) http://thefullstack.xyz/history-express-javascript-framework/
15:29 jberger I've been enjoying Vue.js this last week
15:29 jberger and amazingly, I still am enjoying it this week
15:34 CandyAngel sri: Yeah, I read that. logf tries to use it though *prods batman*
15:34 CandyAngel Want some patches?
15:34 sri knowing batman, he does
15:35 batman CandyAngel: oh! that's awful :(
15:35 batman i will fix it now
15:35 Grinnz_ CandyAngel: I don't see it used in the logf plugin
15:36 batman Grinnz_: https://metacpan.org/source/JHTHORSEN/Mojolicious-Plugin-Logf-0.08/lib/Mojolicious/Plugin/Logf.pm#L14
15:36 Grinnz_ is_level, not is_fatal
15:36 Grinnz_ OH
15:36 Grinnz_ $level, derp
15:36 CandyAngel Lightbulb moment right there
15:37 CandyAngel OH <-- even looks like a lightbulb (on its side)
15:37 Grinnz_ lol
15:38 jberger sri: that article is what ribasushi's nightmares are made of
15:39 bradjm joined #mojo
15:40 good_news_everyon joined #mojo
15:40 good_news_everyon [mojo] jhthorsen pushed 1 new commit to master: https://git.io/vayvc
15:40 good_news_everyon mojo/master 0ac1f6f Jan Henning Thorsen: Fix deprecated message for is_$level()
15:40 good_news_everyon left #mojo
15:42 s1037989 jberger: Speaking of updates, did you see this PR? https://github.com/jberger/Mojolicious-Plugin-SimpleSlides/pull/2
15:42 jberger s1037989: oh, yeah I did
15:42 jberger I guess I can merge and release it, but I've kinda moved past my first two presentation modules
15:43 sri 6.0 is already one year and one month old :o
15:43 jberger s1037989: do you use that? do  you want to take it over?
15:43 jberger otherwise I'm deprecating it
15:43 cpan_mojo Mojolicious-Plugin-Logf-0.09 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Logf-0.09
15:44 batman CandyAngel: ^^^ enjoy
15:44 s1037989 jberger: I just used it for a presi the other day.  I started with App::MojoSlides but I couldn't figure out how to mount the app.  The plugin method worked well for me tho.
15:45 s1037989 Do you know, should I be able to mount App::MojoSlides just fine?
15:45 jberger Mojolicious::Plugin::SimpleSlides was basically v0, App::MojoSlides was v1 and now Mojolicious::Plugin::RevealJS is v2 of whatever this series is
15:45 mcsnolte joined #mojo
15:46 s1037989 Oh, cool!  Didn't know that!
15:46 CandyAngel batman: Yay, thank you :)
15:46 s1037989 I'll probably happily upgrade to RevealJS.
15:46 jberger it makes much nicer looking presentations
15:47 jberger http://jberger.github.io/MojoliciousIntroduction/#/
15:47 jberger http://jberger.github.io/TestingWithPhantom/#/
15:47 s1037989 Good!  Yeah, my current is kind of blah.  :D  But it worked great for me!  Very rapid build.  I further modified SimpleSlides to support Markdown.  Will your latest support md?
15:48 jberger the first two were attempts to make my own version of LaTeX Beamer
15:48 jberger which was of course only limited success
15:48 jberger Like I said, I'm happy if you/someone wants to take them over
15:48 jberger but I'm not gonna use them anymore
15:49 jberger speaking of the mojolicious introduction, I'm giving that talk tomorrow in milwaukee
15:49 jberger sri: got updated SLOC and number of tests for me?
15:49 s1037989 jberger: Sure, I'll take over SimpleSlides.  It's simple.  :D
15:50 jberger what is your PAUSEID?
15:50 s1037989 SADAMS
15:52 sri jberger: 8491 lines of code and 11237 tests
15:52 jberger sri: thanks
15:53 jberger s1037989: added you on the github and pause, have at it
15:53 sri for comparison, catalyst core is 8474 lines of code :)
15:53 s1037989 jberger: Thanks!
15:55 CandyAngel That is a lot of tests
15:56 jberger last update was Feb 10, 2015
15:57 jberger at which point the numbers were: 8778 lines and 10773 tests
15:57 genio sri++ # I'm amazed you can keep the LOC that close while not 'use'ing half of the modules on the CPAN
15:57 jberger both numbers going the right directions! \o/
15:57 jberger genio: that's the entire point of the slide in the talk
15:57 jberger :D
15:58 jberger sri: got a coverage metric?
15:58 genio I should make that (entire core team)++
15:58 sri mojolicious 2.0 was still 11703 lines of code
15:58 jberger I forgot that I added the coverage metric last time around
15:58 sri 3.0 went down to 9137
15:58 jberger if you don't have it I can remove that bit
15:58 sri 4.0 to 8789
15:59 sri jberger: don't have it
15:59 jberger k
15:59 sri jberger: what was it back then?
15:59 jberger 91.3$
15:59 jberger %
15:59 sri ah, definitely increased, let me try to run it
15:59 genio doesn't take that long to run a cover test does it?
16:01 sri have to remove deprecations and can't run tests parallel
16:04 sri jberger: oh, btw. this would be quite a bit fater with data instead of text https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Perl/mojolicious/app.pl#L57
16:04 sri text is pointless there
16:04 sri +s
16:05 jberger I was trying to keep with the spirit of "realistic implementation"
16:06 sri fwiw. i do use data instead of text when i can
16:06 jberger I know everyone cheats
16:07 Rubes joined #mojo
16:07 * sri is now running coverae tests
16:07 sri takes forever
16:13 zivester joined #mojo
16:13 sri jberger: it's now 92.8%
16:13 jberger cool thanks!
16:14 jberger sri++
16:14 sri https://gist.github.com/anonymous/67a42bf6f5cb2ff1768c
16:21 jberger ok slides updated
16:21 jberger thanks again
16:24 mroy joined #mojo
16:25 mroy Greetings all. I'm wanting to create Mojo::IOLoop::HoboCall
16:25 mroy A highlight is working on all platforms including Windows, Cygwin, etc. Obviously Unix is supported.
16:26 binlei joined #mojo
16:27 mroy I can make Mojo::IOLoop::HoboCall compatible with Mojo::IOLoop::ForkCall.
16:28 mroy It will be an IOLoop interface to MCE::Hobo.
16:28 disputin joined #mojo
16:43 hesh joined #mojo
16:48 mroy Demonstration: https://gist.github.com/marioroy/9ee06ce95ce62f88d79d
16:53 mroy jberger: I'm not sure about passing back undef; e.g. $serializer->([undef, $job->(@$args)]) inside ForkCall. The undef is not used or set from what I can see.
16:53 Rubes joined #mojo
16:56 mroy Will mention both Mojo::IOLoop::ForkCall (jberger) and Mojo::IOLoop::ProcBackground (bpmedley) before releasing Mojo::IOLoop::HoboCall. Thank you guys.
16:57 Grinnz_ mroy: the undef is a placeholder for the error, when the args are checked on return, IIRC
16:57 mroy Ah.
16:59 bpmedley mroy++
16:59 Grinnz_ MCE looks interesting. I have not looked at it before
16:59 mroy I'm not seeing where the undef is replaced with an actual error in ForkCall. That's why I'm not sure.
17:00 mroy will post another Mojo demonstration involving many Hobos and MCE::Shared::Queue.
17:00 Grinnz_ mroy: https://metacpan.org/source/JBERGER/Mojo-IOLoop-ForkCall-0.17/lib/Mojo/IOLoop/ForkCall.pm#L59
17:01 mroy Grinnz_: Thank you so much. Got it now.
17:01 kes Hi
17:01 kes How better to change headers when rendering data?
17:01 kes $self->render( data =>  scalar `cat $exe` )
17:02 kes should I use 'res': $self->res->headers... ?
17:03 Grinnz_ kes: sure
17:04 kes ok. Thanks
17:05 Grinnz_ kes: if you are just trying to set the content type, you can set format => 'foo' with any of these: https://metacpan.org/pod/Mojolicious::Types
17:05 Grinnz_ and add new types if you need
17:06 kes do you mean this: $c->render(data => $exe, format => 'exe') ?
17:07 pink_mist I don't see exe among those types
17:07 pink_mist did you mean bin?
17:08 kes actually that is file.exe. I think I should add manually the $app->types->type( exe => 'octet...' )
17:09 pink_mist the filename doesn't much matter for that
17:09 mroy Mojolicious + MCE::Hobo + MCE::Shared demonstration: https://gist.github.com/marioroy/b3567d1ccdad5d8a1936
17:09 Grinnz_ you could just do format => 'bin', but yeah
17:09 mroy Works on Windows
17:10 kes My task is send dinamically genereted programm.exe file
17:10 kes I am not sure about 'bin'
17:10 pink_mist we're pretty sure.
17:11 sri jberger: re Mojo::ACME, is there a way to make a plugin where you don't have to do anything?
17:11 sri as in, it automatically renews your cert for you whenever necessary?
17:12 Grinnz_ kes: 'bin' is appropriate for any "binary executable" or "black box data"
17:12 Grinnz_ "opaque data" probably is a better term
17:13 kes so this I need just: $c->render(data => $exe, format => 'bin');
17:13 Grinnz_ yes
17:13 kes Grannz_: thank you
17:13 sri jberger: would be nice to get sites like mojolicious.org as hands-off as possible
17:14 sri i for one don't want to manually renew my cert every 3 months
17:15 Grinnz_ cronjob :P
17:15 jberger sri: its the same old scheduler problem
17:16 jberger so yeah, like Grinnz_ says the idea is you put it into cron
17:16 sri not good enough for me ;p
17:16 jberger recurring minion :-P
17:16 jberger what else could I use for a trigger?
17:17 kes does it be better? http://paste.scsys.co.uk/508235
17:21 sri jberger: ioloop timer with flock to make the renew unique?
17:22 jberger how often are you planning to renew?
17:22 sri 2 weeks before expiration?
17:22 jberger hypnotoad workers are alive for like a fraction of a day
17:22 sri who cares? ;p
17:23 jberger oh you mean run a persistent acme client?
17:23 sri all you need is a next_tick that checks the expiration time and schedules a timer for renew
17:23 sri so, whenever a worker starts up, it could be the one doing the renew
17:23 jberger at that point why even have a timer?
17:24 sri ?
17:24 jberger if some next_tick finds that its within the expiration window, just do it then
17:24 sri what if the workers don't restart in time?
17:24 jberger ah gotcha
17:25 sri your benchmark app even uses accepts => 0
17:25 sri which means no worker restarts
17:26 sri hmm, already expired is an interesting case
17:26 sri i guess you have to resquedule a timer whenever your timer runs
17:27 sri *rescedule
17:27 sri argh!
17:27 * sri gives up
17:28 sri i know it's a little complicated, but also soooooo cool
17:28 sri "just load the plugin, and have ssl certs for life"
17:31 ssm that would actually be rather neat :)
17:35 jberger think up the workflow and I'll give it a go
17:35 mroy So not to introduce a new API, will make Mojo::IOLoop::HoboCall compatible with Mojo::IOLoop::ForkCall.
17:35 s1037989 That should become part of Mojo core!
17:35 Grinnz_ rofl
17:36 Grinnz_ despite the fact that it has SSL deps which are not currently feasible in pure perl
17:36 * jberger can just see Mojolicious depending on Crypt::OpenSSL::PKCS10
17:37 jberger talk about jumping up in the CPAN river!
17:38 sri we've done core plugins with optional deps before ;p
17:38 s1037989 Couldn't it still be an optional dep?
17:38 s1037989 Yeah see! :)
17:39 jberger I tell you one thing, a web framework with SSL cert issuance built-in would make it to the top of hackernew
17:39 jberger s
17:39 sri not saying it's gonna happen, but if the plugin reaches critical mass it's totally possible we'll add it
17:39 jberger it certainly needs a little time and effort to shake out real-world use cases
17:39 jberger and tighten up the internals
17:39 jberger but yeah
17:40 mroy ++ for https and automation around certs
17:41 jberger mroy, if HoboCall is amenable to following the same pattern as ForkCall then that's fine, but I dont' think ForkCall is so ubiquitous as to need to follow the api to encourage adoption
17:42 jberger on the other hand, I include the fork_call wrapper function which is essentially compatible with AnyEvent::Util::fork_call (just lacking the fork queuing) so that people could port more easily
17:42 Grinnz_ jberger: its API is the same as most similar mojo addons though
17:42 jberger yeah
17:46 mroy jberger: thanks. ok, will at least be mostly compatible if not 100%. Thanks to Grinnz_, now understand why undef is passed.
17:51 jberger it is a very typical pattern for mojolicious modules to pass the error as the first argument to a non-blocking callback
17:53 mroy Gotcha. Am making this so that folks wanting something like ForkCall on the Windows platform. That's the reason for the attempt at ForkCall compatibility.
17:53 jberger ForkCall is so very close to working on Windows, its very sad
17:54 mroy The other reason is MCE::Shared between the controller and Hobo worker.
17:54 jberger officially it does work on windows, but in practice it can't actually do real work in a mojolicious app on windows
17:54 mroy jberger; it's possible if you want ForkCall to work on Windows.
17:54 jberger see the open bug
17:55 jberger there is an unimplemented function in Perl's windows file io subsystem
17:55 mroy I too experience sockets aborting or something on the windows platform. I nearly gave up with MCE::Shared.
17:55 mroy But found a way.
17:55 mroy will look up the lines
17:55 jberger no the problem is fork-emulation
17:55 jberger communication works just fine
17:56 mroy https://github.com/marioroy/mce-shared/blob/master/lib/MCE/Shared/Server.pm#L1303
17:57 jberger mroy: I've never had that problem
17:57 mroy That is the reason for MCE::Shared at least for running on Windows while other processes are forking new workers.
17:57 mroy The sockets hang while forking new workers.
17:58 jberger I get an abort
17:58 jberger as I said, see the open bug
17:58 mroy Supporting Windows is so difficult.
17:58 jberger https://github.com/jberger/Mojo-IOLoop-ForkCall/issues/5
17:59 jberger https://github.com/Perl/perl5/blob/622abdef571eb35e5982acde3b3b85b2cac8eb40/win32/perllib.c#L52
18:00 jberger btw, I still am offering $100 for fixing this https://rt.perl.org/Public/Bug/Display.html?id=120767 in a way that fixes #5
18:01 mroy MCE::Hobo forks new workers and not having any problem on Windows. But that required the logic in MCE::Shared::Server to accommodate the Windows platform.
18:02 mroy Without that, sockets may hang as workers are spawned. Also, when exiting.
18:03 mroy Ah.
18:03 mroy wait.  I had to do another thing.
18:03 jberger my bug basically boils down to no IO can happen at all while forking
18:04 jberger and in a web server that is basically impossible to assure
18:04 mroy yes. that's the same problem I had.
18:04 mroy Even exiting
18:04 jberger the CLONE method specifically
18:04 jberger any code in your interpreter that implements CLONE
18:05 jberger the very existence causes it to blow up during fork if the interpreter also does any io
18:05 mroy Saddly, this is only a problem on the Windows platform.
18:06 jberger right, its a known unimplemented function in Perl
18:06 jberger all we need is someone who knows what they are doing to implement that function
18:06 jberger the fact that bulk88 hasn't done it himself makes me worry though
18:07 jberger because basically he's who I'd have asked
18:07 mroy :(
18:07 jberger and reading the git history once, this was actually the root problem: http://www.perlmonks.org/?node_id=575058
18:08 mroy In both MCE and MCE::Hobo, I'm having to serialize workers exiting; e.g. one at a time for extra reliability. https://github.com/marioroy/mce-shared/blob/master/lib/MCE/Hobo.pm#L468
18:09 jberger I don't think I've ever had a problem exiting
18:09 jberger but you can't call POSIX::_exit on windows
18:10 mroy MCE::Hobo loads threads on Windows. But still calls forks for new Hobo workers.
18:10 mroy The lock works on Windows for forked workers.
18:11 mroy It doesn't call POSIX::_exit on Windows.
18:16 mroy The lock hack for the Windows platform (spawning and exiting) is what allowed me to remove many sleep statements in MCE 1.608; applied to MCE 1.7x.
18:20 melo joined #mojo
18:26 mroy jberger; basically worked around the CLONE bug with non-blocking IO for the Windows platform in MCE::Shared::Server. Also, ensured to *not* hog the CPU while doing so.
18:27 mroy That is the reason why MCE::Hobo is possible on Windows.
18:29 mroy and thinking that ForkCall is possible on Windows too :)
18:40 dod joined #mojo
18:51 ichi joined #mojo
18:54 punter joined #mojo
18:56 disputin joined #mojo
19:06 Rubes joined #mojo
19:20 asarch joined #mojo
19:32 irqq joined #mojo
19:37 jacoby left #mojo
19:47 Rubes joined #mojo
20:03 sri really don't like what is happening to apple
20:03 sri they are pushing so hard for that ipad pro thing to become a pc replacement
20:03 sri and completely ignore macbooks
20:05 sri guess they want to be a fashion brand
20:09 jberger apple has always felt that way
20:10 sri naah, not like this
20:10 Grinnz_ Ever since they lost Jobs they just haven't cared about innovation anymore
20:10 jberger since the first iPod which was incredibly overpriced for an mp3 player, everyone only wanted the apple earbuds
20:10 jberger so their friends would see them
20:10 batman Grinnz_: +1
20:11 sri in the event today they kept repeating how they made those smaller iphones/ipads because customers asked for it... it's a very different apple
20:13 sri jobs made you buy stuff you had no idea you ever wanted
20:13 sri cook just reacts to market research
20:13 batman :D
20:13 lluad They're not ignoring macbooks so much as waiting for Intel to get their skylake show on the road.
20:13 meredith to be a little fair to them, i can't make my hand any bigger for the larger phone trends, no matter how much i'm convinced i need them ;)
20:14 meredith they should've had that -and- something else though
20:14 jberger it seems like I heard so much about the big iphones (6) that that was actually the problem and now they are making the reactionary move
20:15 sri lluad: from what i hear the chips are ready
20:16 sri honestly... if perl development on windows was feasible, i guess i'd just get one of these next ;p http://www.razerzone.com/gaming-systems/razer-blade-stealth
20:17 jberger buy it, put linux on it
20:17 * batman will rather switch back to ubuntu
20:17 batman i miss ubuntu a bit, but not enough to switch
20:17 sri apparently lots of stuff doesn't work with linux yet, like wifi -.-
20:17 sri on the razer blade
20:18 jberger I had wifi working just fine as of 2007
20:18 * sri actually looked at the dell xps 13 linux laptop... but the build quality is actually pretty pathetic up close :S
20:19 jberger that razor is an interesting idea
20:19 sri this macbook air will have to last a little longer
20:19 jberger external video juice
20:19 * sri pats his macbook
20:20 batman wifi was the main reason why i changed from thinkpad to macbook
20:20 sri jberger: indeed
20:20 batman wifi isn't flawless on the macbook, but at least consistent :)
20:21 jberger my biggest complaint on the mac is that the instant the mac's screen turns off it drops your ssh connections
20:22 batman jberger: in osx?
20:22 jberger yeah
20:22 batman it doesn't do that here
20:22 jberger you can't tell it what not to spin down
20:25 sri guess i'll be getting myself a google.com cert from startssl ;p http://oalmanna.blogspot.de/2016/03/startssl-domain-validation.html
20:26 jberger batman: http://imgur.com/Mb4Fcqx
20:26 batman which version is that?
20:26 jberger Power Adapter tab lets me "prevent from sleeping when display is off"
20:26 jberger but not on battery
20:27 jberger 10.11.3 El Capitan
20:29 batman jberger: can you pastebin sudo pmset -g ?
20:30 meredith i kinda like knowing the  network is gonna shut off, and use mosh for stuff i want to recover (like this irc session!)
20:30 batman this is mine https://ssl.thorsen.pm/paste/be8f46cb1abc
20:30 jberger batman: https://gist.github.com/jberger/f333d0eface974319d4e
20:31 jberger it is plugged in currently, if that matters
20:31 batman yeah, it matters
20:34 sugar joined #mojo
20:34 jberger updated
20:35 jberger I'm assuming that the "problem" is the "sleep: 1" when on battery
20:35 jberger but the gui doesn't let me disable that
20:35 jberger and as soon as I start hacking it, I'm in Linux again
20:36 batman haha
20:36 batman ok, then i give up :-)
20:36 jberger $%^&*&^%$ apple, let me choose my own settings!!
20:36 genio my MBP will have to be pulled from my death grip.  It's working great with my SSD and I can't see ever buying a mac with that annoying USB-C thingy
20:36 batman spent about two weeks tweaking sleep and then ended up removing all the apps
20:36 jberger "I'm sorry Joel, we know that this is better for you, so $%^%$ deal with it"
20:36 batman not sure what is custom and what i default now :/
20:36 batman *is default
20:38 batman so sleep, displaysleep and lidwake are different from mine
20:39 * batman got 0 on all of them
20:39 * sri kinda likes usb-c, reversible connectors are awesome
20:42 genio sri: I cannot see this ever being something I'd condone: http://o.aolcdn.com/hss/storage/midas/c9d2b5677a2940082776395c88f29a94/201872541/macbook-usb-c-port-2015-04-17-04.jpg
20:43 jberger the power connector was already reversible ... and magnetic
20:45 sri lol
20:46 sri if you mean as a replacement for the magnetic conenctor... yea... that's a horrible idea
20:46 sri i meant simply as a replacement for the normal usb ports
20:46 jberger sure, put 3 of those and a mag power and I'm game
20:46 * sri nods
20:47 Grinnz_ the best part of usb-a is the mini connectors which you can physically put in both directions but only one direction makes contact
20:47 genio exactly.  USB-C in addition to a power port and I'm less crabby
20:48 jberger I think its cute that it can charge on usb, but apple already had the worlds best power connectors
21:04 batman i wonder if we would break anything if we optionally used cmp_deeply() instead of is_deeply() in Test::Mojo, if Test::Deep is loaded
21:04 batman jberger, sri ^
21:05 jberger batman: no idea
21:05 jberger I do know that preaction just released a Test::Mojo::Role::Deep
21:06 batman i think the output is the only thing that differ, but i'm not quite sure
21:07 lluad The advantage of USB-C is that you can do a single cable dock - power, peripherals, network, video, storage, ... - on one cable. Given me three USB-C connectors and I'd be fairly happy (though I might invest in one of the third-party USB-C magsafe adapter things).
21:08 preaction the disadvantage is that it locks in and you'll destroy either the cord or the port if your computer gets knocked over
21:12 lluad Hence the znaps or griffsafe or whatever usb-c magsafe adapter.
21:14 coolo joined #mojo
21:15 genio yea, I'm just going to remain a firm "no" on that.  separate them back out and I'll happily reconsider when the time comes for a new computer
21:24 disputin joined #mojo
21:41 amdbcg joined #mojo
21:42 amdbcg greetings; hi; I gots some questions;
21:43 amdbcg how do you point mojolicious to an html file to use? right now my html is under the DATA tag.
21:43 amdbcg __DATA__
21:45 pink_mist if it's a template, you can put it in a template/ directory .. if it's just a bare file, you can put it in a public/ directory
21:46 amdbcg was there a command I was supposed to run that builds those directories or does /template just work?
21:47 batman amdbcg: you can use "mojo inflate"
21:47 pink_mist it'll just work, though you can... yeah that
21:47 batman or "./app.pl inflate"
21:47 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#External-templates
21:49 Grinnz_ wait, usb-c locks in? :/
21:52 good_news_everyon joined #mojo
21:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vaSK9
21:52 good_news_everyon mojo/master b628081 Sebastian Riedel: create the template too
21:52 good_news_everyon left #mojo
21:53 good_news_everyon joined #mojo
21:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vaS6k
21:53 good_news_everyon mojo/master 5a758b5 Sebastian Riedel: fix formatting
21:53 good_news_everyon left #mojo
21:59 disputin1 joined #mojo
22:02 disputin joined #mojo
22:15 Rubes joined #mojo
22:23 Rubes joined #mojo
22:40 asarch joined #mojo
22:44 cpan_mojo Paws-0.22 by JLMARTIN https://metacpan.org/release/JLMARTIN/Paws-0.22
23:27 dvinciguerra joined #mojo
23:30 zivester joined #mojo

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