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

IRC log for #mojo, 2018-01-25

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

All times shown according to UTC.

Time Nick Message
00:08 Gedge_ joined #mojo
01:09 aborazmeh joined #mojo
01:16 Guest69 joined #mojo
02:18 Afristar_ joined #mojo
02:54 aborazmeh joined #mojo
02:55 ilbot2 joined #mojo
02:55 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
04:54 jamesaxl joined #mojo
05:05 dboehmer_ joined #mojo
05:05 jamesaxl joined #mojo
05:16 jamesaxl joined #mojo
05:20 mohawk jberger++ CandyAngel++ # nice collaboration
05:25 Afristar joined #mojo
06:05 jberger They really don't get it do they? https://rakudup.github.io/
06:26 inokenty-w joined #mojo
06:33 Vandal joined #mojo
06:34 sri so, how do we feel about anti perl 6 shirts this week?
06:41 sri btw. could it be that cpython doesn't have copy on write optimizations?
06:41 sri nice advantage for perl
06:42 sri (for fork i mean)
07:29 McA joined #mojo
07:33 AndrewIsh joined #mojo
07:37 karjala_ joined #mojo
07:39 dod joined #mojo
08:10 trone joined #mojo
08:36 dhg joined #mojo
09:00 Edward joined #mojo
10:01 pink_mist sri: hmm? I think the fork cow is implemented by the OS?
10:07 ribasushi sri: actually the way perl5 does string-cow is *terrible* for forked environments
10:08 ribasushi pre 5.18 ( iirc when string-cow came in ) it was just bad, now it is double-bad
10:09 ribasushi each SV head ( regardless of perl version ) stores the value refcount we can expose in perl-land
10:09 ribasushi so when you fork, and do different things with the same variable - bam the *page* holding the particular SV gets unshared
10:10 ribasushi ( also why it is extremely expensive to shut down a perl process - the END GC cycle touches every single refcount there is bringing it down to 0, which forces an OS-level unshare for all pages that happen to have an SV ( which usually means: *all* of them ). This is why folks use POSIX::_exit in a pinch )
10:10 ribasushi but with 5.18 it gets "better"
10:11 ribasushi the PV storage ( the area to which the SvPv points ) now isn't just a \0 terminated C string
10:11 ribasushi no, it has 2 bytes tacked onto it to store - you guessed it, *another* refcount for the string-bytes themselves
10:11 ribasushi guaranteeing that during runtime you are *really* going to unshare as many pages a practically possible
10:11 ribasushi progress.
10:11 purl i heard progress was progress
10:14 ribasushi on a tangent - you've all probably heard of https://rt.perl.org/Public/Bug/Display.html?id=132252 ( look towards the end how many dists still need fixing )
10:15 ribasushi but that's not the kicker - the core of this "improvement" is that now all functions have their typeglobs lazy-reified ( or something like that, I forget the details )
10:15 ribasushi which saves 157 bytes ( yes, bytes ) per function
10:15 ribasushi this saving is lost when you actually call the function/method/whatever - which guess what? usually happens post-fork, ensuring whatever pages were still shared after the above are going to be unshared
10:16 ribasushi but hey, we should not question the competency of the leadership as p5p likes to remind everyone who did and didn't ask
10:16 ribasushi </rant>
10:22 CandyAngel That.. goes against what I thought was Perl's approach
10:22 CandyAngel Breaking a bunch of code to save a few kilobytes of RAM?
10:26 ribasushi CandyAngel: you should read http://blogs.perl.org/users/aristotle/2016/05/coro-vs-5022.html
10:27 ribasushi note - I am not exaggerating anything, everything above is verifiable and as dumb as it originally sounds
10:27 tyldis jberger: get -u... I haven't checked, but it will be url-encoded before being used?
10:28 tyldis Or do you require it bo be url-encoded
10:28 tyldis In which case it should probably say so
10:28 tyldis Which reminds me about an "issue" in Mojo::UserAgent. The docs are not explicit there either, but it has to be url-encoded ahead of time
10:29 tyldis Or else passwords containing stuff like [:?] will break
10:31 markong joined #mojo
10:33 * CandyAngel facepalms
10:33 purl facepalms are certainly another important measure
10:33 CandyAngel 4K per process is so not worth breaking stuff
10:34 CandyAngel Unless there is a big Perl-on-Amiga crowd I don't know about :P
10:34 ribasushi CandyAngel: this is how we roll.
10:35 CandyAngel Head over feet, rather than arm over arm?
10:36 ribasushi head firmly planted somewhere safe to ensure utmost roundness
10:46 CandyAngel but like.. 360 processes (at the same time) to save a whopping.. 1.44MB of RAM
10:47 CandyAngel Pretty sure anyone running 360 Perl processes at the same time has that to spare :P
10:59 sri ribasushi: oh shit, had no idea about the second refcount
11:03 sri as far as i understood it, cpython actually forces all pages containing python object to be unshared after fork
11:06 sri with the reasoning that the refcount of all objects will change anyway and therefore this is more efficient or so
11:07 ribasushi sri: nod, I have 0 exposure to (c)python, just chimed in that touting perl5 as "fork-friendly" is... problematic
11:17 kes joined #mojo
11:19 dhg joined #mojo
12:00 coolo joined #mojo
12:16 jberger tyldis no, this is basic auth, you don't need url encoding
12:54 reetp joined #mojo
13:26 reetp joined #mojo
13:50 Edward joined #mojo
14:12 PrEdAtOr joined #mojo
14:17 marty joined #mojo
14:24 PrEdAtOr left #mojo
14:25 gizmomathboy joined #mojo
14:35 itaipu joined #mojo
14:38 gryphon joined #mojo
14:44 PrEdAtOr joined #mojo
14:44 PrEdAtOr left #mojo
15:08 dod joined #mojo
15:15 dotan_convos joined #mojo
15:21 dod joined #mojo
15:40 jberger haarg / ribasushi : is that change being rolled back or is it still in?
15:41 jberger cause, tbh, if that rolls out, I don't want to hear any more about how perl5's primary value is backwards compatibility
15:42 jberger or, do it, then finally we can make some breaking changes to the user-facing api. I mean, why not?
15:52 disputin joined #mojo
15:54 ribasushi jberger: it is still in ( as of last blead release, maybe it will come out, but with sawyer's MO I doubt it )
15:54 ChmEarl joined #mojo
15:57 ribasushi jberger: I won't comment on your latter remark ( you can do it mentally for me )
15:58 jberger yep
16:02 sri jberger: which change are you talking about?
16:03 sh14 joined #mojo
16:03 * sri can't seem to find anything in the backlog involving haarg
16:04 haarg https://rt.perl.org/Public/Bug/Display.html?id=132252
16:08 jberger I knew he was involved because he was referenced (commented?) in the thread
16:09 sri :S
16:09 sjn joined #mojo
16:10 sri that really does not seem worth breaking half of cpan
16:11 jberger I'd argue that dot in @INC wasn't either once I heard what the problem was
16:11 jberger and yes the problem was bad
16:11 jberger but it was fundamentally a problem on debians' side
16:11 sjn o/
16:11 ribasushi and debian fixed it, and *after that* went "It is our issue right?" in one of the RT tickets
16:11 sri dot in @INC was bad, but necessary i think
16:11 * sjn bumped into something weird
16:12 jberger sjn: o/
16:12 haarg ribasushi: the subs get glob-ified when called as methods
16:12 haarg or a ->can check
16:13 sri sjn right now http://i0.kym-cdn.com/entries/icons/original/000/015/976/homer-simpson-bush-gif.gif
16:13 sjn perl -e 'use Mojo::Base "Mojolicious", -signatures, -role; sub startup ($c) { ... }' # works
16:13 sjn perl -e 'use Mojo::Base "Mojolicious", -role, -signatures; sub startup ($c) { ... }' # as documented, but doesn't work
16:13 haarg the de-optimization isn't applied for direct calls
16:13 ribasushi haarg: ah, I somehow thought it's both methods *and* functions, but same difference practically - it's still dumb
16:15 sri sjn: i very much doubt that is documented
16:16 haarg looks like it is
16:17 haarg "On Perl 5.20+ you can also append a -signatures flag ...", example shows "use Mojo::Base -role, -signatures;"
16:18 sjn sri: yes, I've added «"Mojolicious",» to the example
16:19 jberger sjn, why are you setting a base class and declaring a role?
16:19 jberger "Mojolicious" and -role are exclusive
16:19 jberger *mutually* exclusive
16:19 sjn jberger: yeah, good question :). By reflex, I gather :)
16:19 haarg ah yeah that makes more sense
16:20 * haarg reads bad apparently
16:20 jberger so ... yep, that's your problem :-D
16:20 jberger haarg: no worries, I read it that way too the first time
16:20 dotan_convos joined #mojo
16:20 jberger sjn's later comment jogged me
16:20 sjn good to have people around that have learned to think :)
16:20 jberger sjn: no worries
16:21 * sri wonders how hard it will be to upgrade bootstrap from 3 to 4 in minion
16:21 sjn still, then the question just changes to "why does this work"? :)
16:21 jberger yeah, the initial string is either a base class, -base to declare it as its own class but with no parent, -role to declare a role or -strict to declare none of those
16:21 jberger sjn: it surely doesn't actually work as a role, does it?
16:22 jberger signatures will work because it is in the right argument slot
16:22 jberger (ie, the second one)
16:27 reetspetit joined #mojo
16:28 reetp_x5 joined #mojo
16:47 maschine joined #mojo
17:06 Grinnz sjn: making a package both a class and a role is nonsense
17:06 Grinnz sjn: but the reason it specifically breaks is because the parsing of the -signatures flag is very specific like jberger said
17:06 disputin joined #mojo
17:07 Grinnz because Mojo::Base only expects one import argument currently, -signatures is an exception so it's always second
17:08 jberger I think in the future, if more flags get added, I'd assume that any following the first would be unordered
17:08 Grinnz regarding dot in @INC. if we hadn't fixed it now, we would just have another crisis in a year, and another in two, at some point it needed to be fixed so the sooner the better
17:08 jberger but the first is definitely the base/role/strict slot
17:09 jberger Grinnz: perhaps, and yet each time it weakens the case of "stability is our strength"
17:09 Grinnz that's why it only should happen one time
17:09 Peppard joined #mojo
17:09 jberger heh, funny I was just going to make the opposite case
17:39 jamesaxl Where can we donate mojolicous?
17:48 jberger sri ^^
17:48 trone joined #mojo
17:48 sri jamesaxl: http://mojolicious.org/perldoc/Mojolicious/Guides/Contributing#DONATIONS
17:49 sri minion admin converted to bootstrap 4 looks really shitty
17:53 jamesaxl sri: thank you very much
18:01 sri minion admin converted to bootstrap 4 looks really shitty
18:07 kaare joined #mojo
18:11 jamesaxl sri: the last message, is it for me ?
18:14 sri no
18:15 sh14 joined #mojo
18:15 sri bootstrap 4 https://i.imgur.com/5yIkac9.png
18:18 CandyAngel I know I complain about the Fisher Price levels of whitespace usually.. but there is not enough whitespace in some parts there :P
18:18 sri don't look at me, i'm just using bootstrap
18:18 sri that's what it gave me with the defaults
18:20 Grinnz i had to do some fiddling when changing cpanmeta.grinnz.com to bootstrap 4, the margins are declared manually now
18:21 Grinnz https://github.com/Grinnz/cpan-meta-browser/blob/master/templates/packages.html.ep#L4 for example
18:21 Grinnz 'mr-sm-2 mb-2 mb-sm-0' is all new stuff i had to add to get the spacing right
18:21 Grinnz basically, margin-right 2 on everything but xs, margin-bottom 2 on xs and 0 on everything else (because on xs it folds the form into lines)
18:23 Grinnz https://getbootstrap.com/docs/4.0/utilities/spacing/
18:23 good_news_everyon joined #mojo
18:23 good_news_everyon [minion] kraih created bootstrap4 (+1 new commit): https://git.io/vNijQ
18:23 good_news_everyon minion/bootstrap4 0f834ca Sebastian Riedel: start converting the admin ui to bootstrap 4
18:23 good_news_everyon left #mojo
18:23 sri well, i've pushed what i have, help would be very much appreciated
18:24 sri would be nice if it could look somewhat like the bootstrap 3 version in the end
18:25 Grinnz as a start i'd try adding mr-2 to each badge span
18:25 sri i might have done something wrong though, since it looks like navbar links are supposed to be black
18:25 Grinnz or the li if that doesn't work
18:27 sri for testing, i run examples/minion_bench.pl to fill a database
18:27 sri and then run "perl -Ilib `which morbo` examples/linkcheck/script/linkcheck" against it
18:27 sri which enables http://127.0.0.1:3000/minion
18:28 Grinnz looks like you should add the nav-link class to the <a>
18:29 dod joined #mojo
18:32 good_news_everyon joined #mojo
18:32 good_news_everyon [minion] kraih pushed 1 new commit to bootstrap4: https://git.io/vNPeV
18:32 good_news_everyon minion/bootstrap4 7e59ed2 Sebastian Riedel: use nav-link classes
18:32 good_news_everyon left #mojo
18:32 sri that looks a little bit better https://i.imgur.com/BzcSIPD.png
18:33 itaipu joined #mojo
18:34 Grinnz the stuff right below the navbar looks like it needs some margin futzing
18:35 sri those buttons are killing me
18:35 Grinnz not sure how they looked in bootstrap 3
18:35 sri the old ones used to look so nice
18:36 preaction i suspect they're supposed to be in a container of some kind which provides some margin
18:36 preaction if it's still an issue, i'll be able to take a look at the branch tonight
18:36 sri bootstrap 3 look https://i.imgur.com/ME40F0D.png
18:36 sri for comparison
18:36 preaction i went with 4 for Yancy and got it working pretty nicely, but i also have less stuff on the page
18:37 Grinnz that is weird... the buttons on cpanmeta didn't change that much
18:37 Grinnz and they dont look like that here https://getbootstrap.com/docs/4.0/components/button-group/
18:39 preaction it might need the additional class. i noticed you can't just have class="btn" anymore
18:39 Grinnz it has btn btn-outline-secondary
18:39 Grinnz which should be fine
18:39 preaction yeah
18:41 Grinnz i wonder if it's the <i>
18:42 sri with .btn-sm they just get narrower
18:42 sri height stays the same
18:42 Grinnz something is forcing them to taller than they should be
18:43 sri not the <i>
18:43 sri same when removed
18:43 Grinnz center-md on the row div?
18:44 sri nope
18:44 sri it's the .row
18:45 Grinnz huh
18:52 good_news_everyon joined #mojo
18:52 good_news_everyon [minion] kraih pushed 1 new commit to bootstrap4: https://git.io/vNPJJ
18:52 good_news_everyon minion/bootstrap4 7cb76e1 Sebastian Riedel: fix navbar formatting
18:52 good_news_everyon left #mojo
18:53 sri ok, i think the layout is fine now
18:53 sri now the individual pages need fixing
18:53 sri positioning all the elements on the jobs page will be really annoying
18:56 Grinnz https://getbootstrap.com/docs/4.0/utilities/flex/ might be useful, but i havent tried it
18:57 mohawk ribasushi, re the "save 157 bytes, break CPAN" - jesus H christ
19:00 preaction that's per subroutine in the package stash, which gets pretty big pretty quick. it's still not an excuse to break cpan modules
19:00 sri Grinnz: wow, justify-content-between :O
19:01 jberger per-unused subroutine in the package stash though right?
19:02 preaction so it seems. i'm hoping that's temporary, but who knows what's going on
19:02 Grinnz i advise reading and responding to the p5p thread
19:02 Grinnz and avoiding hysterics
19:03 mohawk "and you thought the slightly-vapoury existence of perl 6 was your biggest problem"
19:04 mohawk another horrifying thing from the ticket: a merge to master happened "while perl wasn't passing its tests"
19:04 mohawk what the actual heck
19:04 mohawk do these people know what CI is?
19:04 preaction yes, they have CI
19:05 preaction except that requires its own amount of maintenance, and maintainers for everything are hard to come by
19:05 mohawk how come it's not a prereq for merge to master?
19:06 preaction likely because of what i just said
19:06 mohawk indeed
19:07 preaction there's been efforts to make travis work, but i'm not sure where they are. so it's just the Jenkins servers run by whoever
19:07 mohawk i am slightly boggling that literally anything takes precedence over "the CI isn't currently working"
19:07 preaction that sounds like volunteering
19:08 mohawk p5p have previously made me sad-face
19:08 mohawk so they can sort it out themselves
19:09 preaction okay, well, the problem is lack of people, so i'm not sure what they're supposed to do about it
19:09 mohawk prioritise
19:09 preaction and i open my p5p folder for the first time in 6 months and am greeted by another civility control debacle
19:10 jberger you can find anything in a p5p folder after 6 months?
19:10 preaction open source is always prioritised for the enjoyment of the volunteers, yes
19:10 preaction i mean, i just peeked at the last few days
19:25 sri ok, d-flex is awesome
19:26 sri so many hacks gone
19:26 Grinnz \o/
19:26 sri the big mystery now is why the buttons grow
19:26 sri i just can't explain it, and it's just the buttons on the left side
19:27 sri d-flex or row makes no difference, buttons on the left just grow
19:33 sri no wait, it's applied to all buttons
19:33 sri the other element is a styled <li>
19:33 sri for the pager
19:33 sri which does not grow
19:35 preaction the flexbox is making them stretch. it's either align-items or justify-items that will fix that (justify is the cross axis, so that should be the right answer)
19:35 sri i have to wrap them in a <div> it seems
19:36 preaction that will isolate them from the flexbox's settings yes
19:59 sri Grinnz: what was your fix for the spacing between navbar and the stuff below?
20:00 good_news_everyon joined #mojo
20:00 good_news_everyon [minion] kraih pushed 1 new commit to bootstrap4: https://git.io/vNPYv
20:00 good_news_everyon minion/bootstrap4 cb5f1c7 Sebastian Riedel: fix many more formatting problems
20:00 good_news_everyon left #mojo
20:02 sri this is where i'm at now https://i.imgur.com/ftmZcr8.png
20:04 preaction that's probably where you need to add justify-content: center; to the row
20:05 sri that can't work
20:06 sri also, vertical, not horizontal
20:07 sri i need space under the navbar
20:08 sri i have stuff like this happening now https://i.imgur.com/X2N17im.png
20:08 sri all rows have reasonable spacing in between, just the navbar doesn't
20:10 sri am i supposed to just do that manually?
20:12 Grinnz sri: i don't use navbar, but where i needed more vertical spacing i added mb-2
20:14 preaction align-* for flexbox is the "flex axis", for rows, that's horizontal. justify-* is the "cross axis", for rows, that's vertical
20:18 preaction with Mojo::Redis2, how do I prevent a race condition with a conditional update? I want to check a timestamp and only update data if the timestamp is older, but i can't seem to make a watch expression before getting the timestamp
20:20 Grinnz my $tx = $redis->multi; $tx->watch('timestamp_key'); my $current = $redis->get('timestamp_key'); if (...) { $tx->set(whatever); $tx->exec; }
20:21 preaction i'm using hget(), and the value it is returning is "QUEUED"
20:21 Grinnz details shouldnt matter
20:21 preaction huh?
20:22 preaction QUEUED isn't the timestamp
20:22 Grinnz um
20:22 Grinnz apparently it is?
20:22 preaction no, it isn't
20:22 Grinnz hget doesn't return random strings
20:23 Grinnz what's your code look like?
20:23 preaction here is what redis-cli does: https://gist.github.com/preaction/8043c4dc2b32e96490cbeb59ce54e3a9 if this is what Mojo::Redis2 does, then this is where QUEUED is coming from
20:24 preaction Mojo::Redis2 special-cases certain things that must come before MULTI. MULTI is the write part, but the read part must come before MULTI
20:24 Grinnz well yes, the transaction isn't run until exec, so you can't do reads from the $tx
20:24 Grinnz my example had $redis->get for a reason
20:25 Grinnz the only ordering that matters is $tx->watch, $redis->read, $tx->exec
20:26 preaction and this is all on the same connection?
20:26 Grinnz it would use a different connection i believe
20:29 sri this is starting to look reasonable https://i.imgur.com/YiHvQF3.png
20:41 ribasushi <preaction> [Thu 20:00:01] that's per subroutine in the package stash, which gets pretty big pretty quick.
20:41 ribasushi preaction: you can't be serious...
20:41 preaction if you want to fix my understanding, go ahead. but don't fake incredulity like i'm an idiot or something
20:44 ribasushi I don't know whether you are an idiot or not, what you said however is... I shouldn't use the language I want to use while here
20:44 ribasushi a 64bit `perl -e 'sleep 10'` takes 22mb of vsize
20:44 ribasushi let's say we want to *double* that, rounding down
20:45 ribasushi 22 * 1024 * 1024 / 157 = 146,934
20:45 ribasushi to "feel" an appreciatable difference you need to have that many *methods* in your app
20:46 ribasushi preaction: does my incredulity make sense to you now?
20:46 ribasushi ( leaving aside what jberger said: they have to be unused to be saved )
20:49 good_news_everyon joined #mojo
20:49 good_news_everyon [minion] kraih pushed 1 new commit to bootstrap4: https://git.io/vNPZK
20:49 good_news_everyon minion/bootstrap4 05722a7 Sebastian Riedel: make everything look the same as before
20:49 good_news_everyon left #mojo
20:50 good_news_everyon joined #mojo
20:50 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vNPZj
20:50 good_news_everyon minion/master 21db820 Sebastian Riedel: update Changes
20:50 good_news_everyon left #mojo
20:50 sri well, it's now in minion master
20:51 sri patches welcome!
20:51 purl patches welcome is always true or even for metacpan.org or swahili for "Put up or shut up."
20:52 sri since the admin ui is meant as a best practice example, correctness patches are very welcome too
20:52 Grinnz oh, bootstrap 4 is stable now, neat
20:52 sri just keep the look the same or make it look better
20:52 sri yes, since yesterday
20:53 Grinnz time to convert my other hobby sites i guess
20:53 sri a lot of things got easier, so that's nice
20:54 Grinnz indeed
20:54 sri the bright default blue i don't really like
20:54 sri old one was better
20:55 Grinnz my nav bar is mostly what simplified https://github.com/Grinnz/cpan-meta-browser/compare/d4df9c4c80ed30309887a6f6b719c1cdb9192a08...master#diff-95501b7a1714b586f9db17f59ceb11f0
20:56 Grinnz didn't need the ul anymore
20:56 Grinnz nav tabs*
21:01 Pyritic joined #mojo
21:09 good_news_everyon joined #mojo
21:09 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vNPCg
21:09 good_news_everyon minion/master dfcd53a Sebastian Riedel: link_to on multiple lines does not look good
21:09 good_news_everyon left #mojo
21:34 gryphon joined #mojo
21:50 disputin joined #mojo
22:07 itaipu joined #mojo
22:08 disputin joined #mojo
22:10 [1]mohawk joined #mojo
23:10 dod joined #mojo
23:39 disputin joined #mojo

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