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

IRC log for #mojo, 2017-07-07

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

All times shown according to UTC.

Time Nick Message
01:17 gizmomathboy joined #mojo
02:00 tchaves joined #mojo
02:14 noganex joined #mojo
02:16 karjala_ joined #mojo
04:20 jberger is it expected that path('file.t')->basename('.t') is 'file.t'?
04:24 Grinnz i didn't even know basename took an argument tbh
04:24 jberger shouldn't it be sub basename { File::Basename::basename ${shift()}, @_ }
04:24 jberger rather than sub basename { File::Basename::basename ${$_[0]}, @_ }
04:24 Grinnz oh, it's the suffixes list for File::Basename
04:24 Grinnz that makes sense
04:24 jberger yeah
04:24 Grinnz and yeah, probably
04:25 Grinnz sounds like something needs a test :P
04:25 jberger it has one
04:25 Grinnz a better test!
04:25 purl somebody said a better test was probably [string totitle "one simple String" 5 15]
04:25 jberger which passes if you give it an absolute path
04:25 jberger which it does
04:25 Grinnz huh
04:25 jberger I can't figure out why that matter
04:25 jberger s
04:25 Grinnz that doesn't make any sense lol
04:30 jberger adding this test fails
04:30 jberger is path('file.t')->basename('.t'), basename('file.t', '.t'), 'same path';
04:31 jberger vs
04:31 jberger is path('file.t')->to_abs->basename('.t'), basename(rel2abs('file.t'), '.t');
04:31 jberger which passes
04:31 jberger (and which is already in the test suite)
04:33 good_news_everyon joined #mojo
04:33 good_news_everyon [mojo] jberger created fix-relative-basename (+1 new commit): https://git.io/vQoUa
04:33 good_news_everyon mojo/fix-relative-basename bd95b92 Joel Berger: fix basename on a relative path
04:33 good_news_everyon left #mojo
04:36 Grinnz btw this is the only reason passing the Mojo::File object as a suffix doesn't break everything lol https://metacpan.org/source/XSAWYERX/perl-5.26.0/lib/File/Basename.pm#L224-226
04:37 Grinnz also, that's actually probably why it doesn't work
04:38 Grinnz the relative path you're passing has no "directory", so the "suffix" is the same as the basename
04:39 Grinnz but in an absolute path or if the relative path has a directory component then the filename will be stripped as a "suffix" and i guess the other suffix of .t takes precedence somehow
04:39 jberger except that the first thing it gets seems to be the blessed scalar referene not the string
04:39 Grinnz yes, a blessed scalar reference that has a string overload to teh filename
04:39 Grinnz and is interpolated into a qr//
04:39 jberger ah
04:40 Grinnz i bet if you test something like foo/test.t it will work the same as the absolute path
04:40 jberger yep
04:42 Grinnz oh, right, the regex is only tested against it once it's already a basename, thats why anything with the directory component doesn't break
06:01 inokenty-w joined #mojo
06:06 arcanez purl: forget a better test
06:06 purl arcanez: I forgot better test
06:06 arcanez purl: Grinnz?
06:06 purl well, Grinnz is having a hell of a time recreating a POLLHUP
06:06 arcanez purl: jberger?
06:06 purl well, jberger is http://i.imgur.com/UPfFmXF.jpg or Foreman
06:34 dod joined #mojo
06:39 romel joined #mojo
06:41 leont_ joined #mojo
06:52 AndrewIsh joined #mojo
06:56 mbudde joined #mojo
07:14 salv0 joined #mojo
07:20 Vandal joined #mojo
07:23 dod joined #mojo
07:29 dod joined #mojo
07:36 trone joined #mojo
08:00 dod joined #mojo
08:02 prg joined #mojo
08:31 rshadow joined #mojo
08:33 rshadow1 joined #mojo
08:43 good_news_everyon joined #mojo
08:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vQoZp
08:43 good_news_everyon mojo/master a995a50 Sebastian Riedel: Merge pull request #1104 from kraih/fix-relative-basename...
08:43 good_news_everyon left #mojo
08:47 good_news_everyon joined #mojo
08:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vQonC
08:47 good_news_everyon mojo/master 9c86f37 Sebastian Riedel: update Changes
08:47 good_news_everyon left #mojo
09:01 leont_ left #mojo
09:09 CHYC joined #mojo
09:33 sri jberger: the auto migrate leak was a double dequeue
09:35 sri because the connection used for the auto migrate was dequeued after the first connection that triggered it had already been created
10:47 ribasushi once in a while there is a perl6-related post that actually makes sense: https://perl6.party/post/The-Hot-New-Language-Named-Rakudo
10:53 sri lol, he quoted me
10:53 * sri waves at the irclog
11:00 CandyAngel I'm curious.. will Perl (as in, "Perl 5") have to skip to Perl v7 if it gets a major change warranting it?
11:02 sri the major version is 26
11:02 sri see perl -v
11:02 sri "This is perl 5, version 26, subversion 0 (v5.26.0)"
11:02 CandyAngel o.o
11:02 CandyAngel Oh, I always read that as major.minor.patch..
11:05 sri hmm, seeing comments like this i'm wondering if maybe we should just refocus the core docs to be more book like http://blogs.perl.org/users/dmitri/2017/07/--end.html#comment-1788665
11:06 CandyAngel So you roll the cost of "writing a book" into "writing the documentation"?
11:07 tchaves joined #mojo
11:09 sri i suppose
11:10 sri the core docs currently have a very narrow focus, just presenting facts in a somewhat resonable order
11:11 sri more book like would to me mean for the guides to follow a narrative, and clearer organization
11:12 sri think most would agree that postgres has the best docs out there, perhaps more like that
11:14 sri of course it would require more volunteers
11:23 CandyAngel Maybe something like Mojo::URL would be a good testbed for it? It's pretty decoupled from everything
11:24 sri not the module reference docs
11:24 sri i mean the guides
11:25 sri someone would have to act as an editor for the guides
11:26 sri reorganize, give it a narrative, and poke people on the team to add stuff that's missing
11:26 CandyAngel Oh I see
11:28 marcus sounds like hard work.
11:29 marcus That goes against my religion.
11:32 sri i can volunteer to write stuff that's deemed missing, but i can't be the editor
11:36 sri and really anyone can volunteer for the position, just take the guides and start reorganizing in your own repo, if we like it you get to be the mojo documentation czar
11:38 pink_mist I might take that up after august if nobody does it before then
11:39 pink_mist (and unless things change in my schedule)
11:41 aborazmeh joined #mojo
11:56 pink_mist zoffix++ # just saw his blog; finally a voice of sanity in that debate
12:04 karjala_ joined #mojo
12:22 jberger zoffix++ indeed
12:23 jberger I've been wondering when someone inside that world would realize that they shouldn't want the branding
12:24 jberger And if and when they do finally rebrand, I will eventually push for either Perl 7 or Perl 28 or whatever
12:25 jberger It should happen when stevan's mop goes into core
12:25 jberger Maybe ffi too
12:25 jberger Signatures and strict by default
12:26 sri hehe, i made a rakudo perl 6 logo six years ago http://blog.kraih.com/post/43193421658/a-logo-for-perl
12:28 ribasushi jberger: can you also push for /usr/bin/perl7 ?
12:28 jberger ribasushi yes that will be the hard part
12:28 ribasushi this way people like myself will get off your case as well, and you get strict/warnings by default and a lot more toys
12:28 jberger php7 did it
12:28 ribasushi python3 did it too
12:29 jberger They are my new model
12:29 ribasushi ( and distros have no problem shipping python 2.7 forever, which si great )
12:29 sri i've not seen anyone talk about ffi in core
12:29 jberger python's transition has been harder
12:29 jberger sri it should be
12:29 sri definitely should
12:30 jberger The ffi stuff on cpan is getting really good
12:30 jberger But of course ffi is nicer in core
12:30 ribasushi jberger: I will even pledge to always make sure my software works on "fancy perl" in addition to /usr/bin/perl ;)
12:30 sri one thing we are lacking in the community atm is quality bindings for new-ish c libraries
12:30 jabberwok ahh, perl7 .. and we can all look back and sigh in relief
12:32 jberger ribasushi it already would work on fancy perl, since your code is strict safe
12:33 ribasushi I mean the next time something like the .-@INC embarrassment takes place, I will still work around it, even though I'd likely not be using /usr/bin/perlX myself
12:33 ribasushi hence "pledge to..."
12:44 eseyman ribasushi: s/distros have no problem
12:44 eseyman ribasushi: s/distros have no problem/distros have massive problems/
12:46 PryMar56 joined #mojo
12:48 * sri thinks mojo doc editor could become a core team position in the future
12:56 ranguard sri: what's the pay :) ?
12:58 sri karma, lots of karma!
13:00 sri maybe beer
13:00 sri that will have to be negotiated
13:02 marcus Where is my core-beer? :-o
13:02 gizmomathboy joined #mojo
13:03 sri you didn't negotiate!
13:20 batman marcus: ????
13:21 ribasushi eseyman: elaborate?
13:21 pink_mist batman: that looks like a guinness in my font
13:21 pink_mist batman: nice
13:21 batman ;)
13:22 batman looks like a mug of orange juice in my font :see_no_evil:
13:22 batman not really a font... http://cdn.jsdelivr.net/emojione/assets/png/1f37a.png?v=2.2.6
13:25 pink_mist ????
13:26 genio sri: You got a minute or two for a conversation in PM?
13:27 sri sure
13:27 gryphon joined #mojo
13:43 sri i suppose aside from a plan for reorganizing the guides we could also use a plan for making it easier to contribute
13:44 sri anyone know how the postgres docs are managed?
13:44 CandyAngel Ugh, I hate it when a site that uses JS to work, doesn't even work if I enable JS :|
13:54 sri so, what we need first is someone to lead the documentation effort, perhaps with some doc editing experience
13:55 sri then a repo where the current guides are imported
13:55 sri and then people can join the effort and try to produce a better documentation
13:56 sri which we later on merge back into core
13:58 eseyman ribasushi: shipping python2.7 is a constant source of headaches in the Fedora project
13:59 eseyman python modules have to be shipped twice or automagically work with both python2 and python3
14:01 ribasushi right, but that's a problem for maintainers/individual packagers really, not the distros in terms of "we can't possibly go forward"
14:02 eseyman correct
14:06 karjala_ joined #mojo
14:08 ptolemarch joined #mojo
14:13 jberger re the docs, yeah, an editor would be nice
14:13 jberger I think we have the content pretty well nailed down
14:15 sri it's actually pretty hard for me to deal with doc contributions, especially bigger ones
14:16 sri having an editor to handle that would be a big help
14:17 jberger if no one here has that experience I wonder if vmbrasseur might know someone that could help
14:19 SparkeyG joined #mojo
14:33 sri i guess the editor could also curate a wiki page with topics that he/she thinks are missing from the docs
14:33 * sri would not actually expect the editor to write that much, just organize
14:50 SparkeyG joined #mojo
14:54 SparkeyG joined #mojo
15:01 maschine joined #mojo
15:05 dod joined #mojo
15:31 zivester joined #mojo
16:23 sri actually strange that http://mojolicious.org/perldoc/Mojo/Pg#max_connections doesn't default to just 1
16:23 jberger Is it?
16:23 purl it's it!
16:24 * jberger pats purl
16:24 purl don't mess with me
16:24 sri yea, since it only affects connections currently in the queue
16:24 sri you can make more connections, they just won't be cached
16:24 sri and i think most people create more connections accidentally
16:24 jberger isn't part of the efficiency of a connection pool that there are often already connections available to be used
16:25 sri sure, but most queries will be blocking, you don't really benefit there from using more than one
16:25 jberger oh, I guess that's true
16:26 jberger but doesn't dequeue/enqueue mostly handle that too
16:26 Grinnz even though DBIx::Connector sort of works similarly, it only ever maintains one connection (but of course it doesn't do anything non-blocking)
16:27 jberger once you are done with the blocking connection it goes back into the pool, so it is selected out again next time
16:27 jberger ?
16:27 jberger I'm not saying I'm opposed to changing the default if that's what's best
16:27 Grinnz so one queued connection default seems reasonable to me, with maybe a note to increase it if you heavily use nonblocking queries
16:27 jberger (it would benefit from some documentation on "if you do a lot of nonblocking queries ...")
16:28 jberger Grinnz++
16:28 Grinnz also i should definitely change that default in Mojo::SQLite :)
16:30 sri well, i'm glad Mojo::Pg supports connection sharing for Minion, already got that deployed at work
16:31 sri was as easy as this https://github.com/kraih/minion/commit/ffdd43a811f769da690c32bc11e13717e7657f9d#diff-4daa30a64834cf927e5987b6904ccf41L22
16:33 sri postgres with its 97 connection default doesn't leave a lot of room for leaking :)
16:34 Grinnz interesting number :P
16:35 sri 3 connections are reserved for admin access
16:36 sri connection leaks are actually worse than you might expect, since postgres forks a process for every connection
16:36 sri lots of wasted resources
16:37 sri think they are planning to put another process in front to manage connections with an event loop for the future
16:38 sri then it might become a non-issue
16:50 dod joined #mojo
17:06 sri weird to see basho just fade away
17:06 sri you'd think someone would have at least bought them
17:10 genio I'm sad that RethinkDB has seemingly died away
17:10 sri the nosql boom is over
17:11 * genio tries to tell that to his coworkers
17:11 genio "database schemas are hard!"
17:11 sri to be fair, they kinda are
17:13 jberger <3 Mojo::Migrations
17:13 jberger I don't think I could have embraced SQL databases without it
17:14 jberger and now, the concept of not versioning (and version controlling) my schemas seems insane (and nosql has schemas too, just not declared/enforced)
17:15 jberger RethinkDB was one that I had meant to give some attention to
17:15 jberger but now ...
17:17 genio we use it in one of our production apps.  it's really nice to use, and that means moving away from it is going to make some people angry :/
17:18 sri conceptually i did like riak
17:21 rshadow joined #mojo
17:21 jberger https://rethinkdb.com/blog/rethinkdb-joins-linux-foundation/
17:23 genio yea. no commits for 23 days and no other info since that blog. the activity took a nose dive
17:23 jberger well, its better than nothing I suppose
17:47 sh14 joined #mojo
18:17 trone joined #mojo
18:20 sri Grinnz: doomfist hype!
18:21 Grinnz he does sound unique :) I need to hop on pts sometime this weekend to try him
19:55 FROGGS joined #mojo
20:06 zivester2 joined #mojo
20:44 Craftsmanship joined #mojo
21:01 simbabque joined #mojo
21:14 matt_ joined #mojo
21:15 trone joined #mojo
21:15 abracadaniel joined #mojo
21:30 marty joined #mojo
22:50 CandyAngel Do I lose anything by using apache/mod_proxy rather than hypnotoad/prefork directly?
22:52 tchaves joined #mojo
22:55 pink_mist not really
22:55 pink_mist as long as you configure it right
22:56 Grinnz websockets are a little trickier to get through/impossible if your apache is too old
22:56 pink_mist it's not that tricky
22:56 Grinnz on the other hand, apache is much better at SSL
22:56 pink_mist (if your apache isn't too old)
22:56 Grinnz and probably better at static file serving
22:58 CandyAngel Like, have Apache serve static files?
22:58 preaction yes
22:59 CandyAngel That should work, I want to have aspects like that separate
22:59 CandyAngel Like, if the account administration Mojo script goes down, it won't break static files being served (which is kind of its own thing in this deployment) :)
23:03 Grinnz personally, I prefer nginx which is much better at passing through websockets and still has the SSL/static file serving benefits of apache
23:03 Grinnz it may not have as much mindshare as apache, but it still has plenty where you can google about it easily
23:03 Grinnz plus (and this is my main personal reason) the configuration is way less of a pain
23:05 pink_mist I'm a firm disbeliever of the sunk cost fallacy, so all the time I've sunk into learning apache config is damn well not going to go to waste :P
23:06 Grinnz all the time I've sunk into learning apache config does not make me hate doing it less
23:06 Grinnz see also: mysql
23:06 CandyAngel See also: Excel
23:08 sri actually surprising how strong apache still is even among the biggest sites on the web https://news.netcraft.com/archives/2017/06/27/june-2017-web-server-survey.html
23:09 Grinnz i always forget that so many people use microsoft servers *boggle*
23:34 tchaves joined #mojo
23:46 arcanez azure?
23:46 purl i guess azure is the microsoft cloud
23:46 Grinnz yeah that's part of it i guess
23:56 simbabque I'm working on a custom logger and my tests break when they are run during the build phase... https://github.com/simbabque/Mojo-Log-Colored/blob/master/t/via_mojo.t
23:57 simbabque it seems like the app only does fatal log message and all the others are empty
23:57 simbabque but when I run the tests directly with prove -lv everything is fine
23:57 simbabque I think it's because of the -v in prove
23:57 simbabque because with prove -l they also fail
23:59 simbabque ouch
23:59 simbabque "If it is not already defined, the MOJO_LOG_LEVEL environment variable will be set to debug or fatal, depending on the value of the HARNESS_IS_VERBOSE environment variable.
23:59 simbabque "
23:59 simbabque in Test::Mojo
23:59 purl hmmm... in Test::Mojo is there an equivalent to WWW::Mech's submit_form_ok?
23:59 simbabque (headbang)

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