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

IRC log for #mojo, 2018-01-19

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

All times shown according to UTC.

Time Nick Message
00:05 gryphon joined #mojo
00:41 aborazmeh joined #mojo
00:41 robx joined #mojo
00:56 gordonfush joined #mojo
01:00 robx joined #mojo
02:06 zakame joined #mojo
02:58 jamesaxl joined #mojo
03:14 jamesaxl joined #mojo
03:43 jamesaxl joined #mojo
04:15 karjala_ joined #mojo
04:22 CandyAngel joined #mojo
04:25 Xyem joined #mojo
04:45 karjala_ Have you ppl considered making this in Mojolicious? https://github.com/gothinkster/realworld It's been done in most other frameworks/languages
04:47 mohawk now that looks awesome
04:47 mohawk what a way to prove perl is still alive and kicking
04:47 karjala_ yes, thought so too
04:48 mohawk but oh no, the perl 6 folks will beat us to it
04:48 * mohawk ells oh ell
04:48 karjala_ he
05:04 dboehmer_ joined #mojo
05:22 Grinnz seems straightforward enough
05:24 mohawk well volunteered!
05:24 mohawk my thought is an openapi spec-driven rest backend first
05:24 mohawk entirely possible also to start from yancy
05:26 Grinnz i mean i was just thinking... mojo
05:26 mohawk so fullstack
05:26 mohawk (i was thinking mojo too, obvs)
05:27 mohawk you may be stunned to know i'm thinking of approaching it from a graphql angle
06:09 mohawk joined #mojo
06:14 mohawk mojo folks, any further thoughts on the "ojo roles" issue?
07:11 Vandal joined #mojo
07:13 inokenty-w joined #mojo
07:31 AndrewIsh joined #mojo
07:32 McA joined #mojo
07:57 dod joined #mojo
08:11 dod joined #mojo
08:25 trone joined #mojo
08:28 plicease_ joined #mojo
08:29 Peppard joined #mojo
08:43 xdg joined #mojo
08:51 Edward joined #mojo
09:09 kes joined #mojo
09:14 cng joined #mojo
10:02 disputin joined #mojo
10:06 Ricaz I have a (class) module I would like to use multiple places in my Mojo app. I figured the best way to do this is register it as a helper in a plugin. Can I do something like $app->helper(myClass => $myClass->new)? Or do I have to make a helper function for each of the class' methods?
10:15 Ricaz So I can do something like this: $c->myClass->checkUser('username'); elsewhere
10:16 pink_mist $app->helper(my_class => sub { state My::Class->new(); });
10:16 pink_mist wait
10:16 pink_mist $app->helper(my_class => sub { state $obj = My::Class->new(); });
10:18 mib_xz1ppq joined #mojo
10:18 CandyAngel Ricaz: Looks like you are just describing having a model class. There is an example on the Mojolicious calender for that: https://mojolicious.io/blog/2017/12/18/day-18-the-wishlist-model/
10:22 Ricaz CandyAngel, maybe, but it's kind of a special case where I use a module shared between other applications
10:23 Ricaz pink_mist, will try that, that seems to be exactly what I want
10:24 CandyAngel It doesn't matter if you use it in other applications. Actually, one of the reasons for having a model class is so you can.. :P
10:25 pink_mist Ricaz: note that my dromedaryCase to snake_case conversion was not arbitrary - having perl methods or functions in dromedaryCase or CamelCase is much frowned upon for good reasons in perl
10:27 Ricaz CandyAngel, I mean the end result looks the same, yes? It also just registers the model as a helper
10:28 CandyAngel That's all that happens in the article I linked anyway
10:28 Ricaz I'm also not using any database as I need to be syncing users from LDAP into files on different network shares
10:29 Ricaz pink_mist, name of $obj doesn't matter, I presume
10:30 CandyAngel Oh, on the subject of LDAP.. that reminds me
10:56 pink_mist Ricaz: no, it doesn't =)
11:05 trone it's correct to assume  $chunk here is always defined ? https://github.com/kraih/mojo/blob/master/lib/Mojo/Asset/Memory.pm#L15
11:06 trone I was wondering if the sub need a quick fix as $chunk //= '' or the case is managed from caller
11:10 pink_mist trone: mojo doesn't usually check arguments because of speed concerns; you're expected to pass in the correct kind of thing
11:10 pink_mist at least afaik
11:10 sri that is correct
11:27 Ricaz pink_mist works perfectly, thank you for the snippet
11:35 trone perfect, for me is ok.
11:38 trone Indeed i get the warning «Use of uninitialized value $chunk in concatenation (.) or string at /home/sim/perl5/lib/perl5/Mojo/Asset/Memory.pm line 15» just doing user_agent->post(). I'll check asap to see what server is responding. :)
11:44 markong joined #mojo
12:02 disputin joined #mojo
12:27 jamesaxl joined #mojo
12:40 disputin joined #mojo
13:22 aborazmeh joined #mojo
13:30 gizmomathboy joined #mojo
14:33 disputin joined #mojo
14:47 gryphon joined #mojo
14:51 Pyritic joined #mojo
15:26 maschine joined #mojo
15:29 ChmEarl joined #mojo
15:50 dod joined #mojo
16:00 disputin joined #mojo
16:34 Leffe joined #mojo
16:38 disputin joined #mojo
16:46 sh14 joined #mojo
16:57 disputin joined #mojo
17:16 tchaves joined #mojo
17:31 karjala_ joined #mojo
17:44 disputin joined #mojo
18:16 dod joined #mojo
18:36 disputin joined #mojo
18:41 gregf_ joined #mojo
18:41 gregf_ hi
18:41 gregf_ im getting a weird error: Can't locate object method "data" via package "Mojo::URL"
18:41 gregf_ would anyone know what this error is linked to please? :/
18:41 Grinnz please show your code and the full error message, via a paste site like perl.bot
18:41 gregf_ i cant see any method name data in Mojo::URL
18:42 pink_mist gregf_: that's the problem - your code is trying to call a method named data in Mojo::URL, but there is no such thing
18:42 jberger gregf_: correct, something is trying to call that method on a Mojo::URL
18:42 gregf_ Grinnz: im just using Swagger2 which internally uses Mojo::URL
18:42 Grinnz gregf_: what's the end of your error message? the file and line part
18:43 karjala_ joined #mojo
18:43 gregf_ Grinnz: Can't locate object method "data" via package "Mojo::URL" at /usr/local/share/perl5/Swagger2.pm line 47
18:43 gregf_ its so annoying and frustrating honestly :/  *sorry for the grumble*
18:43 pink_mist is your Swagger2 up to date?
18:43 gregf_ its failing inside of docker
18:43 jberger is there a module called Swagger2?
18:43 gregf_ yes
18:43 Grinnz pretty sure Swagger2 was replaced
18:44 jberger Mojolicious::Plugin::Swagger2 existed
18:44 gregf_ well the mojolicious one is there as well
18:44 Grinnz https://metacpan.org/release/ASHIMEMA/Swagger2-0.89
18:44 Grinnz unindexed, for some reason
18:44 Grinnz in PAUSE
18:44 gregf_ perl -le ' > use Swagger2; > print $INC{"Swagger2.pm"}; > ' /usr/local/share/perl5/Swagger2.pm
18:45 gregf_ oh - ok
18:45 Grinnz anyway, line 47 does "$self->api_spec->data"
18:45 gregf_ but it works fine on my machine(outside of docker)
18:45 gregf_ Grinnz: yeah
18:45 Grinnz so somehow, the api_spec attribute is being set to a Mojo::URL object, which seems incorrect
18:46 gregf_ very true that
18:46 gregf_ i have'nt even written this code.. im only using those modules :|
18:47 sri you want to contact the author
18:47 gregf_ hmm :|
18:47 gregf_ $self->plugin( Swagger2 => { url  => 'swagger/GroupAppAPI-swagger.yaml' } );  #ive got this in the main app
18:48 gregf_ anyways, let me check and contact the main author.. ive taken that module out of the cpanfile and then it fails saying the module is needed :/
18:49 Grinnz ashimema: do you know why the Swagger2 distribution is not indexed in PAUSE?
18:49 disputin joined #mojo
18:49 Grinnz the main author is batman, but i believe that distribution has been turned over to ashimema for maintenance
18:49 gregf_ ah - ok
18:51 trone joined #mojo
18:51 gregf_ thanks much guys for every help
18:51 gregf_ :)
18:52 gregf_ i was debugging until i finally had to get into the container and run the app :/
18:54 Grinnz gregf_: it appears api_spec is initialized from _load_schema in JSON::Validator; is your version of JSON::Validator up to date?
18:57 Seth joined #mojo
18:57 Pyritic joined #mojo
19:00 Seth1 joined #mojo
19:34 Pyritic joined #mojo
19:39 disputin joined #mojo
19:43 Leffe joined #mojo
20:07 tyldis Grinnz: It has been superceded by OpenAPI plugin
20:08 Grinnz yes, but that doesn't explain why the latest version isn't indexed (it wasn't deleted)
20:25 chansen jberger: While Perl5 and Perl6 are prominent languages with it’s own merits, there are engineering tasks you can only perform with Perl5. I have stayed out of the 5 vs 6 debate, but now I feel it’s time to explain how p5 is superior to p6! I’m also pissed off! Either the author is on hubris or completely disconnected from real world p5 implementations which wouldn’t scale on p6
20:27 sri say it over in #perl6
20:27 jberger what sri said
20:27 jberger this is the choir over here :-P
20:27 * sri did that too
20:27 jberger (for the most part)
20:28 jberger I would say that the sentiment appears not to be universal, keeping a cool head may help get the point across
20:28 * sri was even threatened with a ban
20:28 jberger but I do support getting our points across
20:28 chansen I'll write a blog post on perl.org
20:28 ribasushi https://irclog.perlgeek.de/perl6/2018-01-19#i_15712282
20:29 ribasushi .oO( I am going to FOSDEM... that sounds like my kind of bloody russian mob fun )
20:29 jberger chansen: that's a good idea too
20:29 jberger I've been trying to channel my concerns into something coherent
20:30 jberger so I haven't done so yet
20:30 chansen ribasushi: I'm not angry nor do I dislike Perl 6!
20:31 chansen Perl 6 is is a potentially good language but currently Perl 5 is superior (from an engineers POV)
20:33 sri i just want Perl 6 to die... if it gets reborn with a new name or just vanishes forever i don't care anymore
20:33 chansen sri: threatened?
20:33 jberger chansen: they hold a certain sway over us
20:33 sri so tired of the discussions
20:33 Grinnz chansen: "I’m also pissed off!" "I'm not angry" you're sending mixed messages ;)
20:33 jberger having the greater version number is of its own accord threatening
20:34 jberger all they have to do is change their tune and we become the past
20:34 Grinnz that was why the post elicited so much anger, I think; the author was explicitly starting the process of changing that tune
20:34 jberger exactly
20:34 jberger meanwhile they still don't get it
20:34 jberger they've never thought the numbering was confusing
20:35 Grinnz however I will say, it's clear that the author doesn't have a lot of support in that opinion even in that community
20:35 jberger but notice that they don't want the confusion going the other way either
20:35 jberger Grinnz: I need them to be louder in response
20:35 jberger much louder than they've been
20:35 Grinnz agreed
20:35 jberger and zoffix's "I didn't read it that way" wasn't nearly enough
20:35 jberger it was a start
20:35 jberger but that's about it
20:35 preaction it really wasn't :p
20:36 preaction to me, it blamed the p5 community for their reaction to a poorly-worded letter :p but i really need to not be thinking/talking about this
20:36 ribasushi chansen: I am normally angry, hence why I fit well ;)
20:38 Grinnz preaction: there is that. hence my response; maybe you choose to interpret it that way, but the intention was made plainly obvious
20:39 chansen ribasushi: =)
20:42 chansen Grinnz: Whats the middle between those emotions?
20:42 Grinnz chansen: they're synonyms in english...
20:42 preaction annoyed? perturbed? miffed? incensed?
20:43 preaction those are more gentle than angry/pissed
20:43 Grinnz pissed off is generally a stronger, more specific anger
20:43 Grinnz but it's certainly anger :)
20:45 * sri wants to make perl 6 troll t-shirts
20:48 chansen I could write a blog post why i have used perl5 for almost 20 years, how sri dragged me into open source, and why I'm stilled contracted to write perl5/C/XS ;o)
20:48 Grinnz sri: i appreciate your point of view on this but 'striking back' only distracts from what we want them to do, rather than motivating them, it's a repeating scenario in this argument where someone will just quote one person saying "the other language sucks" and dismiss the whole argument
20:48 Grinnz it's a problem in that reddit thread too
20:49 Grinnz everyone saying "perl 6 will never go anywhere so stop pretending" is not helping anything in that discussion
20:51 preaction that's the problem with people who feel attacked :(
20:51 Grinnz much like the article author saying "perl 5 is nearing the end of its life", which I've tried to point out in several comments
20:52 preaction yes. they are right to feel attacked
20:53 Grinnz indeed, the response is natural, it's just unfortunately not productive
20:53 dylan I gurantee you I'm going to have to answer people at $work over that comment. :(
20:55 chansen let's step back 15 years in perl5, whats new or innovative since 5.8?
20:57 preaction i indeed wrote a whole blog post on the danger of saying technology is "Dead". it's a shame that someone in Perl would do so...
20:57 jabberwok the crux of it all is: Will the True Perl (perl5) community stand up to Larry Wall about the name?
20:57 Grinnz it has already, but that's not done much
20:59 chansen It doesn't mean any thing, look at C, the same is true for Perl!
21:03 chansen preaction: technology is only dead if there is no users/developers
21:04 preaction yes, i said i wrote a blog post about it
21:04 preaction http://preaction.me/blog/2017/12/03/technology-never-dies/
21:06 chansen preaction++
21:28 disputin joined #mojo
21:38 gryphon joined #mojo
22:50 CandyAngel Excel!
22:50 CandyAngel Is pure evil
22:51 preaction nah. i mean, yes, but...
22:51 CandyAngel I know this because.. *has also created valuable solutions using it* :P
22:51 CandyAngel It would be fine if it wasn't so backstab-happy :P
22:52 preaction one of those things where the problem domain is the real evil, and we're lucky to have a solution that does anything at all ;)
22:52 CandyAngel You used Text-to-Columns and changed the delimiter.. haha now your "paste" doesn't work several hours later. Have fun figuring out why!
22:52 CandyAngel Or
22:53 CandyAngel The virus-like behaviour of the "R1C1" setting..
22:53 CandyAngel That was a head-scratcher..
22:53 pink_mist what's that? 0_o
22:53 CandyAngel Oh
22:53 CandyAngel It saves that setting in the workbook
22:54 CandyAngel If you open that one, it changes the *application* setting
22:54 CandyAngel So if you then open another workbook and save it, the setting spreads to that one too..
22:54 pink_mist 0_o
22:54 pink_mist wow
22:54 preaction ... ouch
22:54 CandyAngel It "infected" one of the central spreadsheets at my old site and started changing everyone's setting
22:55 CandyAngel But opening one without it first, it changes it *back*
22:55 CandyAngel It's so bizarre
22:55 CandyAngel Took me a while to figure out what was going on :)
22:57 CandyAngel Maybe if I ever get a blog, I will actually write a post about that sort of stuff that I come across
22:57 pink_mist a friend of mine started doing that last year
22:57 pink_mist he has found some really fun stuff
22:58 CandyAngel Oh? coolies
22:58 pink_mist https://beingwinsysadmin.blogspot.de/2017/07/bug-windows-10-default-user-profile-is.html
22:58 pink_mist that was his first real post =)
22:59 * CandyAngel has a read
22:59 CandyAngel Well, I will when Pale Moon responds..
23:00 pink_mist heh
23:00 pink_mist how's the update viability look for pale moon?
23:01 pink_mist oh it got a new version yesterday
23:01 pink_mist heh
23:01 pink_mist guess that's pretty viable =)
23:02 CandyAngel It's under active development.. I'll say that much :P
23:03 CandyAngel It's funny. I switched to Pale Moon because of losing audio in Firefox
23:03 CandyAngel But now I don't watch youtube in Pale Moon because of a bunch of other issues.. which is what I needed audio in Firefox for
23:04 pink_mist heh :P
23:04 CandyAngel uzbl2 when? :P
23:04 pink_mist oh man, uzbl
23:04 pink_mist that project was the reason I got on freenode in the first place
23:04 CandyAngel Oh nice :)
23:04 pink_mist but I haven't been in the channel in years :(
23:11 marty_ joined #mojo
23:21 kgoess joined #mojo
23:59 Leffe joined #mojo

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