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

IRC log for #mojo, 2017-10-26

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

All times shown according to UTC.

Time Nick Message
00:12 tardisx joined #mojo
00:24 EvanCarroll joined #mojo
00:47 aborazmeh joined #mojo
00:56 itaipu joined #mojo
01:42 EvanCarroll joined #mojo
01:56 ilbot2 joined #mojo
01:56 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
02:00 aborazmeh joined #mojo
02:19 noganex joined #mojo
02:40 mohawk joined #mojo
02:50 purl joined #mojo
03:12 hkclark joined #mojo
03:16 hkclark joined #mojo
04:04 dboehmer_ joined #mojo
04:20 irqq_ joined #mojo
05:37 Vandal joined #mojo
05:56 zivester joined #mojo
06:15 inokenty-w joined #mojo
06:37 batman +1 on the change, as long as you think hard about the breakage
06:39 dod joined #mojo
06:44 AndrewIsh joined #mojo
06:45 dod joined #mojo
06:47 dod joined #mojo
07:00 ashimema joined #mojo
07:15 plicease joined #mojo
07:17 trone joined #mojo
08:15 sri hmm, having to clean up like 50 failed jobs... one of the priorities for the minion ui will be to show jobs of a certain state with results in a big list and the ability to perform operations like retry/remove on all of them at once :S
08:37 rshadow joined #mojo
09:01 prg joined #mojo
09:23 iamb joined #mojo
09:30 irqq joined #mojo
09:44 itaipu joined #mojo
10:03 aborazmeh joined #mojo
10:23 dotan_convos joined #mojo
10:28 dotan_convos joined #mojo
10:55 dotan_convos joined #mojo
11:00 pau4o joined #mojo
11:01 tchaves joined #mojo
12:25 karjala_ joined #mojo
12:37 pirateFinn joined #mojo
12:46 ChmEarl joined #mojo
12:47 itaipu joined #mojo
13:22 gryphon joined #mojo
13:28 tcohen joined #mojo
13:41 Pyritic joined #mojo
14:13 kes joined #mojo
15:09 itaipu joined #mojo
15:10 rick_soc1 joined #mojo
15:11 rick_soc1 😑☕️
15:28 CandyAngel rick_soc1 is hacking us all!
15:32 jberger too many coffee memes, posting this instead: https://www.youtube.com/watch?v=OTVE5iPMKLg
15:38 rick_soc1 mmm
15:40 rick_soc1 you win 1 internets 🏆
15:41 sri 🎉
15:42 jberger \o/
15:43 jberger oh are we using emoji to poke at Phil21? then 💯
15:44 genio heh. too much fun being had this morning.
15:53 ghenry joined #mojo
16:11 good_news_everyon joined #mojo
16:11 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFJS8
16:11 good_news_everyon mojo/master 359e455 Sebastian Riedel: show flow-control helpers and promises side by side in the cookbook
16:11 good_news_everyon left #mojo
16:12 mohawk sri, eyes-that-are-hearts emoji
16:13 maschine What's the functional difference between $self->reply->asset(); and $self->reply->static(); ?  Serving a text file generated by the app - they both appear to have the same results
16:27 Phil21 sigh
16:30 mohawk #MojoBanter
16:31 jberger camel case in perl makes my skin itch
16:32 maschine I used to use both.  Ugh.
16:33 maschine in the same program even. :p
16:33 * jberger sets maschine on fire
16:33 good_news_everyon joined #mojo
16:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFJQv
16:33 good_news_everyon mojo/master 2f5ee3d Sebastian Riedel: MetaCPAN now always wants to use HTTPS
16:33 good_news_everyon left #mojo
16:33 * CandyAngel has totally written wrappers around modules that want camel-case before
16:34 * jberger sets tianon on fire too, on principle
16:34 CandyAngel e.g. Win32::GuiTest
16:34 * tianon http://jshn.org/wp-content/uploads/2017/03/fire000-2.jpg
16:34 jberger Win32 has always been a strange place
16:34 jberger tianon: hehe
16:39 mohawk graphql-js is camelCase, fairly obviously
16:40 mohawk i couldn't bear to read it in my beautiful perl so i snake_cased it all
16:40 EvanCarroll joined #mojo
16:40 mohawk however, that caused a gotcha or two for me as the introspection stuff (in client-side JS) expects camel
16:40 maschine reading all the mojo examples has really made my code a lot more redable though
16:40 maschine s/reda/read/
16:41 mohawk readble? that's unpossible!
16:47 maschine i should dig up some of my old scripts from my cgi-lib.pl days.  hahaha.  I would probably never want to code again.
16:48 mohawk guhh
16:49 sh14 joined #mojo
16:49 jberger the mojo codebase has been a great inspiration for me too
16:51 maschine It just feels like if one of my subs has more than 5-6 lines then it's probably too long.
16:51 mohawk yeah
16:57 itaipu joined #mojo
16:59 jberger I mean, sometimes mine are longer than that, but usually when I'm doing insane stuff like: https://github.com/jberger/Mojo-Chrome/blob/master/lib/Mojo/Chrome.pm
17:02 sh14|2 joined #mojo
17:05 rshadow joined #mojo
17:16 gizmomathboy joined #mojo
17:33 dod joined #mojo
17:50 simbabque joined #mojo
17:51 simbabque https://stackoverflow.com/questions/46960660/how-do-i-fake-the-client-ip-address-in-a-unit-test-for-a-mojolicious-app
17:51 simbabque How do I fake the client IP address in a unit test that uses Test::Mojo?
17:53 mohawk shurely they should be faking the config that it matches against instead
17:54 simbabque the asker is me mohawk
17:54 mohawk shurely you should....
17:54 simbabque and I don't get your meaning
17:54 mohawk ok
17:54 simbabque my code hashes the IP address and saves it in a storage sink
17:54 good_news_everyon joined #mojo
17:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFJhb
17:54 good_news_everyon mojo/master 6544a40 Sebastian Riedel: fix all MetaCPAN examples
17:54 good_news_everyon left #mojo
17:55 simbabque my test checks if different IPs will produce different records
17:55 mohawk guess i'd better actually read the question, hold on
17:55 simbabque :D
17:56 mohawk sadly, all i can think of is that you would pull that hashing/checking out of where it lives, call it from there, but test it in a "pure" way by just passing two different static IP addresses in
17:57 mohawk my experience has always been that if one has a problem testing code, it's not right yet
17:57 simbabque yes, and actual unit test would work
17:57 simbabque -d
17:57 simbabque but I was hoping to test the whole process top to bottom
17:57 mohawk possibly this is a missing feature in T::Mojo
17:57 sri there are some X-Forwarded-For tests in the mojo dist that demonstrate faking the request ip by acting like a reverse proxy
17:58 simbabque ok, thanks sri, looking
17:58 mohawk Test::Mojo->new(with_ip_origin => ...
17:58 mohawk aha!
17:58 sri we have reverse proxy support, faking the ip is a feature there
17:58 mohawk boom
17:59 simbabque ah it uses MOJO_REVERSE_PROXY in the tests I think
17:59 simbabque https://grep.metacpan.org/search?size=20&q=X-Forwarded-For&qd=Mojolicious&qft=
18:02 simbabque neat, that works
18:02 simbabque but the server needs to be restarted
18:02 simbabque thanks
18:02 simbabque I'll write up my own answer if you don't want to answer sri
18:03 sri don't care much for stackoverflow points
18:03 simbabque I care about the question having an answer for future readers, so I'll do it :)
18:04 sri simbabque++ # that will get you more answers from me in the future
18:07 simbabque sri++
18:22 [0xAF] Guys, how can I get perl warnings and errors from a minion job? It seems it fails w/o telling me anything?
18:23 [0xAF] my $job->app->log->... are printed into worker, but if there is some perl warning or error it's not printed...
18:23 preaction [0xAF]: the minion command allows for re-running the job in the foreground, which should give you the error messages you seek
18:24 preaction otherwise, if you figure it out, let me know, as i've also had strange issues with errors not erroring under a worker (but mine involve DBI for some reason)
18:26 [0xAF] yeah, mine are too DBI
18:27 [0xAF] but thanks for the hint...
18:27 preaction yeah, that's what i had to do. it's weirder because i'm trapping the exceptions, but they're still not being propagated...
18:27 sri actually errors are caught and stored in the job result
18:27 [0xAF] it seems after I enqueue the job, later I can use "minion job -f <JOBID>" to watch it...
18:28 sri and yea job -f shows those errors on the terminal too
18:28 sri maybe your version is old?
18:29 sri i think i added that in a later version after adding -f
18:29 [0xAF] sri: I will update, but can you hint me how to see the job results (with these errors)?
18:30 sri minion job <JOBID>
18:30 [0xAF] ahh, thanks.
18:34 sri crazy how quickly every operating system got blue light filters
18:35 jberger built-in to android now
18:35 jberger <3
18:35 sri i remember when f.lux fixed my sleep schedule in 2016
18:35 sri now i have it on macos, android and linux natively
18:37 jberger its in macos natively? must be in the major update I haven't done yet
18:37 sri oh, windows also has it natively now
18:37 sri yea, it's everywhere natively now
18:38 [0xAF] sri: I was with 7.46, now I've updated to 7.48, but still can't see the errors in job result. I'll go with the -f option for now.
18:39 sri that's not a minion version
18:39 [0xAF] oh, sorry, my Minion was 7.06, now it's 7.09
18:40 [0xAF] I'm using "carton" for the project, but I guess this does not matter, just noticed the versions in carton output
18:43 karjala_ joined #mojo
19:37 kiwiroy joined #mojo
19:50 trone joined #mojo
19:51 perlpilot joined #mojo
20:07 kiwiroy joined #mojo
20:19 sri looks like nobody can find a solution for the signatures problem
20:19 sri i guess we are giving up on that one
20:20 mohawk sri, Filter::signatures not up to snuff?
20:21 sri seems to be no way to make the filter work from caller perspective
20:23 Grinnz oh, yeah, source filters don't work lexically
20:23 Grinnz that would be problematic
20:23 haarg what caller do you mean?  not quite parsing that sentence.
20:24 sri haarg: make this work basically https://github.com/kraih/mojo/issues/1142
20:24 kiwiroy joined #mojo
20:24 sri Mojo::Base::import has to run the source filter from Filter::signatures in MyApp
20:33 good_news_everyon joined #mojo
20:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFUnQ
20:33 good_news_everyon mojo/master dbf81f6 Sebastian Riedel: show some callback examples
20:33 good_news_everyon left #mojo
20:36 haarg sri: Filter::signatures->import ?
20:37 mohawk would import::into help?
20:37 haarg it wouldn't really change anything
20:38 haarg the difference between import::into and just import is that import::into also makes the caller package/file/line match what it should
20:38 haarg but source filters don't care about caller
20:39 * mohawk has forgotten what he knew 3.5 years ago about source filters
20:41 mohawk https://metacpan.org/source/ETJ/Gimp-2.32/lib/Gimp/Fu.pm#L100-106
20:43 mohawk and that FILTER gets done on Gimp::Fu's caller
20:43 good_news_everyon joined #mojo
20:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFUCo
20:43 good_news_everyon mojo/master f64c0b4 Sebastian Riedel: more examples
20:43 good_news_everyon left #mojo
20:45 mohawk and this looks like it's lexical: https://metacpan.org/pod/Filter::Simple#SYNOPSIS
20:45 mohawk i am almost certainly missing something
20:46 Grinnz it's line based, not lexical
20:46 good_news_everyon joined #mojo
20:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFUCA
20:46 good_news_everyon mojo/master 3c5338f Sebastian Riedel: more consistent examples
20:46 good_news_everyon left #mojo
20:47 mohawk ah, indeed - you'd have to fake it by doing { use MyF; ... no MyF; } rather than it just stopping at end of scope
20:48 Grinnz also, you can't put things on the same line as the use
20:49 Grinnz or more importantly, no ModuleName has to be on its own line
20:49 jberger and I suppose nothing that needs the keyword api is acceptable
20:49 jberger since that would require xs?
20:49 Grinnz that would require perl 5.14
20:49 jberger I have no problem bumping the minimum version soon
20:50 Grinnz i think a lot of people would :P
20:50 Grinnz it also wouldn't affect me, but many people still use the stock 5.10 on centos 6 for whatever reason
20:50 mohawk if you went to 5.14 you could just use Function::Parameters proper
20:51 jberger https://i.imgflip.com/1ybd9r.jpg
20:51 sri that's not even a polyfill for core signatures
20:52 jberger (that was intended to come after the "a lot of people would" but it took too long to make ;-p )
20:52 sri my work code mostly targets 5.18 these days, so meh
20:53 jberger if there's a source filter that does the job, couldn't it be modified to use the keyword api rather than the filter?
20:53 sri i wouldn't mind a bump to 5.14 and an xs polyfill that's only required for old perl
20:53 jberger that was going to be my proposal (though I don't know if that's possible)
20:53 Grinnz sure
20:53 haarg i don't know if the keyword api can take over 'sub'
20:53 sri newer versions of perl would use core signatures
20:53 Grinnz haarg: you can tell Function::Parameters to, and it works
20:54 haarg "modify to use keyword api" basically means rewriting from scratch
20:54 Grinnz yes, but it's possible :P
20:54 sri sadly nobody wants to do it
20:54 jberger you know, after damian's talk at tpc::na ...
20:54 jberger haarg: the code doesn't overlap at all?
20:54 haarg i mean, you could add a thing to Filter::signatures to have it use a keyword api based module if available, similar to how it uses native signatures on new perls
20:55 sri i think a good polyfill module is the only way to make signatures popular in the next 10 years or so
20:55 haarg jberger: not at all
20:55 jberger sad
20:55 jberger #sad even
20:55 Grinnz sri: making it non-experimental would help, too
20:55 jberger Grinnz: surely that's on the books for this release, no?
20:55 Grinnz i haven't heard anything
20:55 jberger it would have been in the last one but for the attributes change
20:56 Grinnz if there's a change to the api then it needs to be stable for 2 releases
20:56 jberger and by my counting it has been now
20:56 Grinnz the question is whether any more changes are planned which i also don't know
20:56 jberger not to the public facing api, or not that I've heard
20:57 jberger there are always debates about the internals
20:57 jberger I agree if if never goes non-experimental then its never gaining any traction at all
20:57 jberger I hadn't even given a thought to it not being upgraded this upcoming release
20:59 haarg there are some issues relating to the attribute change
20:59 haarg not sure if that will impact anything
20:59 jberger wasn't that in the first major release after it was introduced?
20:59 jberger that's what cost us one release
21:01 jberger so if it was released in 5.20, modified in 5.22, then experimental/stable in 5.24 and 5.26 then it should be non-experiemental in 5.28
21:02 pink_mist https://rt.perl.org/Public/Bug/Display.html?id=121481 doesn't even mention the 5.22 modification ... that issue should probably get some attention
21:03 sri my trust in the current pumpkin is low
21:04 sri wish rjbs was still in charge, even though we never got along
21:05 jberger he did get saddled with a pretty massive problem out of the gate
21:05 jberger I'm glad I wasn't pumpkin for dot in @inc
21:06 Seth joined #mojo
21:07 sri what rjbs did that really impressed me was working out specs on the p5p list
21:07 sri he got shit done
21:11 jberger that he did
21:45 CandyAngel Probably the wrong time to ask about changing a jobs parents in Minion.. :P
21:49 sri you can't
21:49 CandyAngel I know. Would adding that be too many lines/not wanted?
21:50 sri depends on how good the use case is
21:50 sri and how bad the code
21:52 CandyAngel Well, how my code currently works is it just makes requests with increasing page numbers until it fails, which means I don't know how many parents the last job (which puts it all together) will have until I'm done
21:52 CandyAngel but I could change it so the first request figures out how many pages and schedules all the subsequent jobs
21:56 rick_soc1 👻
22:06 CandyAngel I dunno, trying to convince you might be more fun than dealing with the HTML :P
22:06 CandyAngel But I'll just try it..
22:06 CandyAngel Oh
22:23 sri i'm about to go to sleep, so no more convincing today
22:23 CandyAngel :P Hope you rest well!
22:24 Grinnz lies, sri doesn't sleep
22:26 sri echo mem > /sri/power/state
22:29 itaipu joined #mojo
22:44 CandyAngel jberger: I am really liking building as much as possible using the helpers, it so much cleaner
22:45 Grinnz putting things in helpers, and putting things in commands, were two big cleanup days for me :P
22:45 Grinnz always having the app available by default is so helpful
22:45 CandyAngel I meant the tag helpers in templates, but that too!
22:45 pink_mist I've not really done commands much yet
22:45 pink_mist but I know I should really look into those
22:46 Grinnz i had lots of utility scripts that i converted into commands, bascially just wrap the script into the run sub, write some usage docs, and account for the arg passing, and it was so much nicer just having the app there
22:47 CandyAngel ^ so much this
22:47 CandyAngel Makes it all neat and tidy
22:47 Grinnz plus subcommands help for organization
22:50 good_news_everyon joined #mojo
22:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFUr9
22:50 good_news_everyon mojo/master f0ca264 Sebastian Riedel: more consistent method descriptions
22:50 good_news_everyon left #mojo
22:51 Grinnz see, told you he doesn't sleep
22:52 pink_mist lmao
22:57 CandyAngel Weird, I'm sure Geany used to show me the changed lines but now it doesn't :|
22:59 CandyAngel Ah, it's a different plugin
23:06 CandyAngel Well, that's new
23:06 CandyAngel I've actually lost a lite app :P
23:06 CandyAngel I have no idea where I saved it
23:08 CandyAngel Aha, found it :)
23:08 CandyAngel If in doubt, check ~/tmp
23:28 EvanCarroll joined #mojo

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