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

IRC log for #mojo, 2017-11-17

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

All times shown according to UTC.

Time Nick Message
00:49 PsimanX1 joined #mojo
01:26 aborazmeh joined #mojo
02:56 zivester joined #mojo
03:02 mib_ib9ebv joined #mojo
03:10 noganex joined #mojo
04:28 ccakes_ joined #mojo
04:45 kaare joined #mojo
04:58 rickbol joined #mojo
05:04 Seth joined #mojo
05:04 dboehmer_ joined #mojo
06:32 jamesaxl joined #mojo
07:00 inokenty-w joined #mojo
07:13 dod joined #mojo
07:16 ccakes joined #mojo
07:20 dod joined #mojo
07:39 geospeck joined #mojo
07:40 ccakes joined #mojo
07:55 Vandal joined #mojo
08:08 ccakes joined #mojo
08:14 zafa joined #mojo
08:30 trone joined #mojo
08:36 AndrewIsh joined #mojo
08:39 dexteruk joined #mojo
08:39 dexteruk Hi Everyone is there away for mojo useragent to get the http and exicute the jquery script like it would when a browser accesses the page
08:52 marcus dexteruk: https://metacpan.org/pod/Mojo::Phantom
08:55 dod joined #mojo
10:00 dod1 joined #mojo
10:47 gregf_ joined #mojo
11:04 kes joined #mojo
11:15 sri hackweek is over, that means minion admin will get released soonish
11:15 sri this is what it looks like now btw. https://i.imgur.com/VvIbRaA.png
11:16 sri if anyone feels like helping a little bit, i couldn't get the "1-5 of 567" vertically aligned
11:19 sri the column https://github.com/kraih/minion/blob/master/lib/Mojolicious/Plugin/Minion/resources/templates/minion/jobs.html.ep#L53-L59
11:22 sri you can test it with this app https://gist.github.com/anonymous/e61b2d17ec869d39f963c59aa99da94f
11:25 pink_mist so, going to watch punisher tonight? =)
11:25 sri most definitely :)
11:27 itaipu joined #mojo
11:29 pink_mist let's hope it's got nothing to do with the hand >_>
11:35 kes Hi. Is there a way to run route action by route name?
11:35 karjala_ joined #mojo
11:35 mib joined #mojo
11:39 sri hmm, so there's a new public dns service at 9.9.9.9 now
11:42 sri the site is not very clear on who actually runs it... quad9.net
11:42 sri smells like ibm
11:56 tchaves joined #mojo
11:59 kaare joined #mojo
12:02 geospeck joined #mojo
12:14 kaare joined #mojo
12:25 pink_mist https://twitter.com/rootsecdev/status/931488886324449285
12:25 foursixnine sri, https://quad9.net/#/about :P Ibm indeed
12:29 kaare joined #mojo
12:29 foursixnine otoh, few days ago i thought on having openQA workers to use the minion for handling certain type of tasks... but more on that in few sprints :P
12:32 jberger dexteruk phantom works but it is effectively deprecated since the upstream project is defunct
12:33 jberger I'm working on a replacement, Mojo::Chrome, but it isn't released yet
12:33 dexteruk jberger: so what is the best way to achieve this?
12:33 pink_mist dexteruk: for the time being, still ::Phantom
12:34 jberger Yeah, or you're welcome to try ::Chrome from my github
12:35 dexteruk its seem such a simple idea to have a backend system that can process a frontend script
12:35 sri foursixnine: there's a progress item too https://progress.opensuse.org/issues/18462
12:35 jberger Honestly it is pretty much done (in initial form), the big problem is handling chrome side errors
12:36 dexteruk i have also been looking at node.js so i can request it to process the js and parse the answer to mojo
12:36 jberger Node doesn't have a dom/browser though
12:37 jberger There's a big difference between a headless browser and a JavaScript interpreter
12:38 sri headless browser is the only sensible way
12:38 dexteruk basically im trying to create microservices that a frountend developers could write without having to get into dockers
12:38 dexteruk i would love them to write in perl
12:39 * jberger cannot parse that statement
12:40 jberger Does that effective say that you are trying to do client side Perl?
12:40 jberger +ly
12:40 sri foursixnine: the site only says ibm is a "founding organization", but not that they actually run the infrastructure
12:41 pink_mist https://heise.cloudimg.io/width/700/tjpeg.q90.webp-lossy-90.foil1/_www-heise-de_/imgs/18/2/3/1/7/9/4/7/quad9-feature-matrix-72311e6ae96e13b1.png
12:42 dexteruk The situation im trying to fix is this.  Im using IPFS (great project if anyone is not familiar with this) i want to allow frount end developers to be able to use language they are familiar with
12:42 dexteruk to process a json script and return an answer
12:43 dexteruk to process a json file and return an answer
12:43 dexteruk to process a json  and return an answer
12:44 dexteruk currently microservices seem to be done thoguht dockers
12:44 dexteruk i have tried doing it thought a non-blocking command
12:45 dexteruk STDIN/STDOUT seems to be very restrictive
12:45 dexteruk and designed for another age
12:46 jberger It sounds to me like you are just implementing json rpc
12:47 dexteruk yes
12:48 jberger So that's fine. I'm not sure where node or headless browser come in?
12:50 dexteruk ok IPFS when you add a file it is servered as a standard HTTP GET request
12:50 dexteruk so yes i can call the code and get a script and run that natively in perl
12:51 dexteruk but if i can return a HTML page that contains the link for the data and javascript, then phantom can do the processing and simply return the answer to mojo UA
12:53 pink_mist to mojo ua?
12:53 pink_mist what?
12:54 jberger Yeah, I'd need to see some diagrams of this before I could help further
13:43 sri sooo, i guess nobody here actually knows how to vertically align text in a bootstrap row :o
13:50 genio sri: You could always cheat: https://mdbootstrap.com/utilities/bootstrap-vertical-align/
13:52 sri did you just link  malware site?
13:52 sri *a
13:52 genio I don't think so. it was just a copy of this https://v4-alpha.getbootstrap.com/utilities/vertical-align/
13:53 * genio had the wrong one in the clipboard.
13:53 genio if I did, sorry about that. it wasn't my intent
13:54 genio my browser blocks so many ads/malware things that I tend to not see anything wrong (no overlays, requests for notifications, etc. for me)
13:56 genio Apparently the proper way is with flexbox in BS3, but if you use BS4, you get the alignment helpers (which is what I meant by cheating)
13:58 sri i don't know for sure, but that site looks shady as hell
13:59 sri with flexbox in BS3?
13:59 sri also, it doesn't work at all
14:00 sri those classes from BS4 just set vertical-align: middle
14:00 sri which does nothing
14:00 genio https://css-tricks.com/snippets/css/a-guide-to-flexbox/ <-- flexbox
14:03 sri i know what flexbox is
14:03 sri i
14:03 sri minion admin is all flexbox
14:04 sri what i want to know is how to vertically align with flexbox
14:04 geospeck joined #mojo
14:04 nicomen did any of you have to use jqgrid in mojolicious? there is a catalyst module that does some magic, but just wondering if it's easy to just do by hand, or one should make a plugin?
14:09 kaare joined #mojo
14:11 gizmomathboy joined #mojo
14:13 sri and speaking of flexbox, there are prolly ways to make this width look better too https://i.imgur.com/aouKRhV.png
14:15 sri super narrow might just need a media query to center the buttons above the table https://i.imgur.com/DHkCfzE.png
14:16 dexteruk joined #mojo
14:16 sri i would very much appreciate a patch
14:16 sri it's all on github already
14:16 sri https://github.com/kraih/minion
14:18 ChmEarl joined #mojo
14:20 perlpilot joined #mojo
14:20 batman sri: do you need to be able to select the number of rows? i think i would just default to 60 or something, allow it to manually be set in the url if necessarily.
14:20 genio https://codepen.io/anon/pen/GOOBLN  simple, stupid vertical center (not sure if this is the way you meant)
14:20 sri batman: what kind of question is that? do you "need to be able to"?
14:21 sri what do you really "need"?
14:21 batman as "do you need those 10/20/50/100 buttons" ?
14:21 batman or are they for something else than number of rows..?
14:22 genio part of the data-tables pagination. show x number of rows, alters the number of pages to flip through
14:23 sri batman: i don't understan the question
14:23 batman i know how they works. i just don't see why i want to have buttons to change the number.
14:23 sri argh, so many typos today
14:24 sri genio: now that seems useful!
14:24 batman sri: what does the buttons above the table do? the buttons with "10", "20", "50" and "100" inside them?
14:25 sri they change how many jobs are shown per page
14:25 batman so why do you need buttons for that? why not just have a default that makes sense?
14:26 sri because it's convenient
14:26 sri 60 is a shitty default i find very inconvenient personally for example
14:26 batman so which default do you find convenient?
14:26 genio what makes sense depends on how many results you have. if there are 25 jobs, I may want to see all of them on one page. if there are 50000 I may only want to see 20 at a time
14:27 sri i like to browse 10 at a time, and 100 when i need to retry a lot of failed jobs
14:27 pink_mist if there are 50k and I needed to get to all of them eventually, I'd at least want 100 results per page
14:27 sri go to failed jobs, select 100, click the top checkbox, all selected automatically, click retry, done
14:28 batman then i would change the default to 10 and then to 100 when i go to failed.
14:29 sri because you only go to failed to retry a lot of jobs?
14:29 sri that's not how i work
14:29 batman because i would want to get rid of the buttons :)
14:29 batman s/would//
14:29 batman anyways... guess we won't agree on this, so i'll stop
14:30 batman how about moving them under the pagination?
14:30 sri patch it, make screenshot of the result, and have a vote
14:30 sri that's how design decisions will be made after the 80 release :)
14:31 sri grr
14:31 sri 8.0
14:31 batman ok.
14:31 sri my code today is just as full of typos... i need a weekend of no hacking
14:32 sri well, at least i got minion 8 ready in time
14:32 genio \o/ now go for a long run and then enjoy an alcoholic (if that's your thing) beverage and relax with some netflix for a while
14:32 sri one metric i was thinking about showing too was storage space used in MB or GB
14:33 sri genio: still a few hours of $work, then minion release cleanup, then watching punisher
14:36 gryphon joined #mojo
14:40 dod joined #mojo
15:12 exp-innit joined #mojo
15:12 exp-innit heya, i'm writing some tests, and i have a bunch of identical elements accessible through css selector
15:12 exp-innit and i'd like to check each one, but content_is seems to check the entire page
15:12 exp-innit and text_is seems to only take a generic css selector
15:12 exp-innit which would match every element in my page
15:15 exp-innit i should say, they're not 100% identical, but they represent menu items, so i'd like to check they all exist explicitly
15:19 pink_mist Grinnz: perhaps a ->reduce for the Collection UtilsBy role? (I mean, it's not quite a ***By thing, but I don't think there's a reduce-alike on the base?)
15:22 pink_mist no wait, there is a reduce
15:22 pink_mist how have I never seen that before?
15:22 pink_mist (Mojo::Collection)++
15:24 Grinnz l
15:25 Grinnz lol
15:31 Grinnz exp-innit: you can access the dom yourself with $t->tx->res->dom then select elements and test them however you need to. i see the Test::Mojo methods as mostly convenience for the common case
15:32 exp-innit Grinnz: yeah i've realised that now, and am trying to do that :)
15:38 stephanj the problem with page size limits is that you can't please everyone - you will need a way to change page size to fit different usecases. if it is buttons or a cleverly placed dropdown in a little options menu - users will hate you otherwhise and you end up discussion about what makes sense. also it makes sense to make the defaults configurable
16:04 dod joined #mojo
16:05 sh14 joined #mojo
16:07 dod joined #mojo
16:07 dod left #mojo
16:44 sri ok, lets get minion 8 out the door
16:56 dod joined #mojo
16:56 sri think i got it now https://i.imgur.com/DkijhRK.png
16:56 sri that's xs
16:57 disputin joined #mojo
16:58 sri not with genios solution though, that had a few side effects in md size
16:59 sri (ul and buttons were not properly aligned and stuff...)
17:03 maschine can't wait to try it - I love that I can use it as a plugin to my app. :)
17:06 sh14|2 joined #mojo
17:08 sri hmm, wonder if i can add the ui screenshot to the perldoc on metacpan
17:08 [1]mohawk joined #mojo
17:08 sri anyone got a safe html block i could include that resizes to a good size for metacpan?
17:10 haarg what kind of resizing did you have in mind?  metacpan doesn't let much through.
17:16 sri not sure, 600px width?
17:17 sri on github it's 900 or so https://github.com/kraih/minion#minion-
17:17 sri i guess 800 would be better
17:19 sri i'd like for it to look somewhat similar on metacpan
17:21 sri hmm, if i insert the github img tag on metacpan it looks pretty good actually
17:23 sri <img src="https://camo.githubusercontent.com/5a0fc3be2070870e7a78cb2f6f9c59a9f2f122ec/68747470733a2f2f7261772e6769746875622e636f6d2f6b726169682f6d696e696f6e2f6d61737465722f6578616d706c65732f61646d696e2e706e673f7261773d74727565" alt="Screenshot" data-canonical-src="https://raw.github.com/kraih/minion/master/examples/admin.png?raw=true" style="max-width:600px;">
17:23 sri oops
17:23 sri sorry about that
17:24 sri https://i.imgur.com/ntt2G1T.png
17:24 sri that's the 600px version
17:25 sri max-width:100% looks better at small window sizes, but gets ridiculous at full screen :)
17:26 sri haarg: i assume metacpan won't let style attributes through?
17:26 haarg no
17:27 haarg we would like to add white listing for some style attributes, but i haven't gotten around to it
17:30 sri haarg: you think that would work? https://github.com/kraih/minion/commit/6982ebf03c08166c300179d703254c57ac13eed2
17:31 haarg it should
17:45 sri also looks good on our site http://mojolicious.org/perldoc/Minion#DESCRIPTION
17:50 [1]mohawk joined #mojo
17:52 sri and done https://twitter.com/kraih/status/931580527483682818
17:53 sri Grinnz: please update the SQLite backend :)
17:53 preaction minion 8 has some backend changes (i'm using/maintaining the mysql backend) i need to make before i can use the admin ui, right?
17:53 preaction okay, so yes
17:54 sri preaction: yes, it's not too bad, ->job_info and ->worker_info are gone
17:54 sri ->list_jobs and ->list_workers now accept an ids option to limit the results
17:54 preaction okay. i'll make that the next thing i do here at meta::hack after i get cpan/backpan fixed on the new box
17:54 sri and they return a total value with the number of results without paging
17:55 preaction hmm... mysql's going to hate that i suspect, but i'll see. i've got the perfect set of test data to see ;)
17:55 sri and ->stats now returns an uptime value
17:55 sri in seconds
17:56 preaction (by "hate" i mean "perform poorly", since COUNT(*) on InnoDB performs poorly, known issue, closed as won't fix)
17:56 sri preaction: worst case you make two queries
17:56 sri ah
17:56 preaction yeah, that's what i'll have to do likely
17:56 sri postgres does it surprisingly efficient
17:56 sri cost me like 3 rps at 300rps
17:57 preaction but meh, i already do COUNT(*) a _lot_ on very large tables and it takes like 5 minutes (80m records). my minion monitors do a few count(*) and take only a few seconds
17:58 sri the stop feature of the ui will also not work i guess
17:58 preaction so it should be fine. the "performs poorly" is a multiplication factor, not a base cost, so if my test data does well (i do thousands of jobs an hour) it should be just fine
17:58 sri since you never had ->broadcast
17:58 preaction hum. i might have to add that then
17:59 preaction and maybe the other few things i left off just to get something shipping
17:59 sri ->note is missing, but not required
17:59 preaction yeah, i think that one's easy though
17:59 sri worker status too
18:00 sri that means less data on the ui
18:00 sri not required either though
18:00 sri that's the big ones
18:01 preaction eh, it's good impetus for me (or outside contributor) to do these things ;)
18:01 Seth joined #mojo
18:01 preaction i've had a guy sending in a whole slew of PRs last few weeks, which has been _wonderful_. nothing better than a whole bunch of PRs
18:01 sri screenshot works https://metacpan.org/pod/release/SRI/Minion-8.0/lib/Minion.pm#DESCRIPTION
18:02 mohawk preaction, #winning
18:02 preaction but sri++ this looks great and i might still end up making the CMS look exactly like it just because consistency is fun
18:02 sri preaction++
18:02 preaction (i'm using Bootstrap 4 right now, which i kind of hate the look of really...)
18:03 sri not used bootstrap 4 yet, still getting used to 3 :)
18:04 Seth1 joined #mojo
18:17 sri btw. anyone here is free to steal whatever they like from the admin ui app (aside from the logo), it's supposed to be an example app
18:23 genio sri++ # looks good
18:24 sri genio: don't look how i actually did it -.-
18:24 sri really... don't
18:24 sri i'm not proud of it, but i just couldn't see another way
18:25 genio heh. :)
18:29 mohawk sri, do you think there is mileage in exposing minion as a REST API maybe with an OpenAPI spec?
18:29 mohawk (thinks about putting GraphQL in there too if so)
18:30 sri not for core minion, but as a 3rd party plugin sure
18:35 mohawk i'll ponder the most idiomatic way
18:36 mohawk i'm thinking a REST API spec would be easy, then just have to do: plugin OpenAPI => blah (not got to grips with yet); plugin GraphQL => { convert => [ 'OpenAPI', blah ] };
18:39 karjala_ joined #mojo
18:41 kaare joined #mojo
18:55 zivester joined #mojo
19:36 Grinnz irccloud just added unicode 10 emoji 🥪 🥧
19:37 Grinnz 🤪
19:44 mohawk great, irclog isn't showing those
19:44 mohawk guess my firefox fonts suck ;-)
19:46 mohawk one large/one small eye, sandwich, pie apparently
19:47 karjala_ When will Linux get nice color emoji fonts?
19:47 karjala_ I only see black & white emojis (if I see anything at all)
19:48 mohawk dang, reading an OpenAPI spec with jhthorsen's JSON::Validator which uses Mojo::JSON::Pointer is ludicrously easy
19:51 genio yea, linux emoji support is kind of... meh
19:51 genio I get used to being on my mac at work and then I go home and nothing shows up the same way
19:54 mohawk #FirstWorldProblems? :-)
19:54 genio haha. indeed
19:55 karjala_ It looks like it could be a serious reason to not go to Linux
19:56 karjala_ you can't tell people that linux is just as good and they won't miss anything
19:56 genio 12pt Andale Mono on iTerm2 displays them nicely. I'd like to have the same on my linux box
19:56 pink_mist it's really not linux's fault - it's up to the distro; android is a type of linux after all, and on there most emoji I've seen are supported just fine
19:57 mohawk genio, is that not available on linux?
19:57 pink_mist genio: remember that there's likely also font substitution going on
19:57 genio ah, true
19:59 disputin joined #mojo
20:04 karjala_ http://www.omgubuntu.co.uk/2017/11/ubuntu-finally-long-last-time-support-color-emoji
20:04 Grinnz those show up fine in the irclog in linux here
20:04 karjala_ title says: ubuntu 18.04 will show color emoji
20:05 Grinnz not colored, but thats up to the browser to do
20:05 Grinnz eugh
20:07 disputin1 joined #mojo
20:08 genio gotta figure that out for 17.10
20:11 Grinnz sri: stats->{uptime} is the server uptime? irrelevant for sqlite then?
20:11 purl Since Fri Nov 10 21:27:45 2017, there have been 200 modifications and 46 questions.  I have been awake for 6 days, 22 hours, 43 minutes, 50 seconds this session, and currently reference 990415 factoids. Addressing is in optional mode.
20:11 disputin joined #mojo
20:19 sri Grinnz: yes
20:26 Grinnz sri: https://metacpan.org/pod/Minion::Backend::Pg#list_jobs says "Meant to be overloaded in a subclass", don't think that belongs there
20:45 kaare joined #mojo
20:48 disputin joined #mojo
20:52 disputin1 joined #mojo
21:30 sri as long as that's the only bug :)
21:30 mohawk i guarantee that was the only and last bug #trolling
21:40 jabberwok Minion AdminUI looks grand.  ... altho Minion-Backend-SQLite-2.004 fails build and won't install, choking on list_jobs mismatch on (not) returning hash
21:41 pink_mist jabberwok: yeah, Grinnz needs to update it
21:42 pink_mist pretty sure he's actively working on that right this minute
21:43 jabberwok purl, Cake all round !  in celebration for the majorly spiffy adminUI
21:43 purl jabberwok: i'm not following you...
22:20 Grinnz no appreciable difference in getting job info in the benchmark script, just slightly slower with the second query
22:21 mohawk i would like to take back anything i said about parsing OpenAPI specs being easy. this "additionalProperties" thing is "challenging" (but doable)
22:25 perlpilot isn't there a module for that on CPAN?
22:25 mohawk i am using it
22:25 jberger mohawk: enjoy the security definitions ;-P
22:25 mohawk JSON::Validator is very good
22:25 mohawk jberger, not touching that with a bargepole
22:25 jberger hehe
22:25 mohawk however, the semantic meaning of a few things is a bit tricky
22:25 jberger JSON::Validator's works, I should know
22:25 mohawk used it in anger?
22:26 jberger hmmmm, no, just the definitional standards
22:26 jberger ie, how you define things
22:26 mohawk (to be clear, "in anger" = "for real")
22:26 jberger yes, I know
22:26 mohawk ok
22:26 mohawk what were you using it for? :-)
22:26 jberger btw, metacpan's autocomplete search should now be much better :-P
22:26 mohawk w00t
22:26 mohawk how come?
22:27 jberger secret sauce
22:27 purl secret sauce is a spicy mayo with some kind of roe in it.
22:27 jberger botsnack
22:27 purl :)
22:27 mohawk (eye-roll emoji) ;-)
22:27 jberger a combination of a new elasticsearch suggester and using the ++ as part of the final sort
22:27 mohawk very cool
22:28 jberger as to security definitions, I helped batman be sure that the code was right because I WILL be using it at work
22:28 jberger but I'm not yet
22:28 mohawk fingers crossed
22:28 mohawk what's the worst that can happen?
22:28 purl the worst that can happen is, like, I get fired and come looking here for a job. ;-)
22:28 mohawk that would be pretty bad
22:29 mohawk ;-)
22:29 * jberger pats purl
22:29 * purl stabs
22:29 mohawk fear leads to hate
22:29 mohawk hate leads to anger...
22:29 jberger there should totally be a factoid in purl for that
22:30 mohawk go nuts :-)
22:31 karjala_ joined #mojo
22:38 mohawk so for this additionalProperties business, which is supposed to be an arbitrary map or dict which GraphQL does not really do, i'll make it a list of objects that have key, and a value of the appropriate type
22:41 jberger ?
22:41 jberger that doesn't seem right
22:41 mohawk how so?
22:42 mohawk my reading of https://apihandyman.io/writing-openapi-swagger-specification-tutorial-part-4-advanced-data-modeling/ is that it's supposed to describe an arbitrary map from key to value-of-specified-type
22:43 jberger but taking a hashref and instead considering it an arrayref of pairs is not the same thing
22:43 jberger unless I'm completely missing something
22:43 jberger (which I well might be)
22:43 mohawk the problem is that gql does *not* have a concept of arbitrary hashes
22:44 mohawk the closest i can get is the above
22:44 ccakes_ joined #mojo
22:44 jberger "arbitrary hashes" meaning a hash without defined keys?
22:44 mohawk correct
22:45 jberger this is for input or output? seems like munging output to fit that format would be pretty tough
22:45 jberger but for input I guess it doesn't matter
22:45 mohawk in this case, i don't think it matters whether it's input or output
22:46 mohawk where the translator gets the hash, and knows it needs to turn it into this key/value pair thing, it can
22:58 mohawk jberger, btw the munging seems to me like it would be: map { +{ key => $_, value => $output->{$_} } } keys %$output
22:58 mohawk add a [] around that, job's a good'un
23:17 sri hmm, now that i think about it, i guess the admin ui could also list active locks and allow unlocking
23:17 sri number of locks would be added to stats
23:19 sri have to think about it
23:35 mmp sri: is it running somewhere publicly? would be curious to take a look
23:37 sri included in minion 8 https://metacpan.org/pod/Minion#DESCRIPTION
23:39 mmp ah cool. thanks

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