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

IRC log for #mojo, 2017-06-09

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

All times shown according to UTC.

Time Nick Message
00:22 leaper joined #mojo
00:49 tchaves joined #mojo
01:01 cheako joined #mojo
01:02 aborazmeh joined #mojo
01:41 cheako joined #mojo
02:41 noganex_ joined #mojo
04:04 dboehmer_ joined #mojo
04:46 irqq_ joined #mojo
05:51 dod joined #mojo
05:55 inokenty-w joined #mojo
05:57 dod joined #mojo
06:42 AndrewIsh joined #mojo
06:49 stein joined #mojo
06:54 bpmedley joined #mojo
06:54 rshadow joined #mojo
07:06 trone joined #mojo
07:17 dustinm joined #mojo
07:30 dod joined #mojo
07:31 prg joined #mojo
08:04 karjala_ joined #mojo
08:42 salv0 joined #mojo
08:55 aborazmeh joined #mojo
09:02 rshadow joined #mojo
09:18 irqq joined #mojo
09:34 prg what was the name of that module recommendation bot again?
09:34 dod joined #mojo
10:07 salv0 joined #mojo
10:14 guyincognito joined #mojo
10:14 guyincognito Hello gentlemen
10:15 CandyAngel Aw, they left too fast
10:52 irqq joined #mojo
11:09 tchaves joined #mojo
11:24 mishanti1 Is it just my impression or is the rt.cpan.org bugtracker a place for bugs to go die?
11:25 mishanti1 Projects hosted on github/gitlab seem much more responsive overall.
11:25 haarg depends on the project
11:26 haarg an rt queue is created for every dist, so there's going to be more of them with inactive devs
11:30 mishanti1 Ah. I see. So people might go to rt to report bugs, not knowing that the devs instead use Github/Gitlab?
11:31 haarg that's one case, yeah
11:33 haarg but also if the devs are inactive, they are less likely to have created a repo/issue tracker and added it to metadata
11:33 haarg where the rt queue will always exist no matter what they do
11:35 mishanti1 Thanks for clarifying. :) A little easier to understand now the sheer number of distro/OS-specific patches to packaged perl-modules.
12:07 aborazmeh joined #mojo
12:36 Janos joined #mojo
12:42 gryphon joined #mojo
12:54 gizmomathboy joined #mojo
13:31 gizmomathboy joined #mojo
13:34 CandyAngel There is a typo in Mojo::UserAgent
13:34 CandyAngel Err, the documenation for it
13:34 CandyAngel $ua->websocket('wss://examp ...
13:36 CandyAngel http://mojolicious.org/perldoc/Mojo/UserAgent#websocket
13:37 CandyAngel Second example
13:37 purl Second example is, like, truncated
13:47 haarg what typo?
13:47 purl typo is probably a bitch to run
13:47 CandyAngel isn't "wss" meant to be "ws"?
13:48 pink_mist CandyAngel: no?
13:48 pink_mist CandyAngel: wss is wss, and ws is ws
13:48 pink_mist CandyAngel: both are supported
13:48 CandyAngel Ohh
13:49 CandyAngel Okay, I didn't know wss was a protocol. It looks like someone just accidently hit s twice :P
13:49 CandyAngel Do they mean the same thing?
13:49 pink_mist of course not
13:50 pink_mist wss is to ws like https is to http
13:50 CandyAngel Ah, makes sense
13:51 Intern42 joined #mojo
13:53 karjala_ joined #mojo
14:01 maschine joined #mojo
14:06 gryphon joined #mojo
14:06 kaare joined #mojo
14:07 stryx` joined #mojo
14:16 Pyritic joined #mojo
14:52 Pyritic joined #mojo
14:57 PryMar56 joined #mojo
15:13 Pyritic joined #mojo
15:33 vicash Hello. What is the maximum number of jobs that can be enqueued in Minion ? I have a task that needs to be run for about 300K rows which in turn runs 3 sub-tasks, so about 900K tasks. Can I enqueue them all at once and wait for completion ? If yes, what is the upper limit of enqueued tasks ? Can I enqueue 5-6 million tasks at once ?
15:35 stephan48 i guess theres not really an limit
15:35 stephan48 any*
15:35 stephan48 it all depends on how many workers you start to process them
15:35 stephan48 the waiting for completion bit is a bit more complicated
15:37 vicash well I can have a 48 CPU-core cluster that I can use and so a minimum of 40 workers can be assumed + 8 cores for just the database to do the processing.
15:41 kaare joined #mojo
15:53 sri with the Pg backend a few hundred thousand shouldn't be a problem
15:53 sri at least with the latest version
15:54 sri and if you find bottlenecks we're interested in patches
15:56 sri at work we've had 350k jobs with lots of dependencies and after some fixes everything worked pretty well
15:57 sri don't know if we've had more jobs in the queue since
15:59 stephan48 ahm, sorry yes i forget that Minion has other backends at some times
15:59 stephan48 but yes i mean latest version on actual postgres
16:00 sri looks like this idea has been abandoned... too bad https://github.com/kraih/minion/pull/51
16:01 vicash sri, stephan48: yes using Pg as backend. i will try to setup some monitoring to check performance and see if i can produce anything of value
16:03 sri enqueue/dequeue is pretty heavily optimized and should be fine with millions of jobs
16:03 sri i'm mostly worried about repair/stats/job_info
16:12 PopeF joined #mojo
16:26 cheako joined #mojo
16:31 Janos joined #mojo
17:11 Janos joined #mojo
17:17 dod joined #mojo
17:20 cheako joined #mojo
17:37 ferreira joined #mojo
17:38 ferreira batman: Grinnz: thanks for looking at https://github.com/kraih/mojo/pull/1101
17:40 ferreira I am divided about going with https://gist.github.com/aferreira/76ca4cccd96028ac82e3fc281c0780a5#file-modf-pm-L6 (short form of _modf I mentioned) or https://gist.github.com/aferreira/76ca4cccd96028ac82e3fc281c0780a5#file-modf-pm-L10 with an optimization for the most common case of integer epoch
17:43 ferreira sri: do you feel like the solution in https://github.com/kraih/mojo/pull/1101 is any better than the previous ones?
17:51 someguy joined #mojo
17:52 sri ferreira: not really
17:55 ferreira but do you agree that Mojo::Date not working for negative epochs is a bummer, restricting its usefulness (when internals like timegm() have no trouble with that, up to a certain point)
17:56 ferreira ^ s/timegm/gmtime/
17:56 cheako joined #mojo
17:56 sri never had the need for it, so i don't really care personally
17:58 sri but you don't need me to agree
17:59 ferreira Okay. It is like with https://github.com/kraih/minion/pull/51 that I could not think of a convincing benchmark to motivate the GIN index, since at work we are not really using parent/child job relationships yet
18:02 jberger I have no opinion on the implementation, I haven't really looked tbh
18:03 jberger but from the goal of making Mojo:: a useful general-purpose toolkit I think supporting negative epochs is a worthy goal
18:04 pink_mist is that the goal?
18:04 jberger therefore, get another core member to approve of the implementation and I'll be +1, until then I'm neutral
18:05 ferreira For the record, I also created a pull request to fix the primary issue that led me to Mojo::Date at Mango - as simple as using Mojo::Date->new->epoch($epoch) rather than Mojo::Date->new($epoch) https://github.com/oliwer/mango/pull/26
18:05 jberger pink_mist: http://mojolicious.org/perldoc/Mojolicious/Guides/Contributing#Mission-statement
18:06 pink_mist I don't see "general-purpose toolkit" there
18:06 Grinnz "All components should be reusable in other projects, and in a UNIXish way only loosely coupled." implies that, i think
18:07 pink_mist not when the first paragraph says "web development toolkit" specifically
18:07 Grinnz or rather, sort of defines that
18:07 jberger that's kinda what I mean, yes I guess it isn't stated as I phrased it
18:07 Grinnz well yes, general purpose web development toolkit
18:07 Grinnz not general general purpose :P
18:07 jberger Grinnz++
18:08 pink_mist sure, general purporse web development toolkit, but that's not what jberger said, and not what Mojo::Date sounds like
18:08 pink_mist *purpose
18:08 Grinnz dates are often important to web dev
18:08 jberger ok. lets not debate what I said
18:08 Grinnz and Mojo::Date primarily deals with the HTTP date format
18:09 jberger "general purpose web development toolkit" is what I meant
18:09 ferreira pink_mist: Grinnz: but notice that the trouble with negative epoch in Mojo::Date has been found when it was used by Mango::BSON::Time to represent dates in a database, which extend the original purpose of the module
18:10 xcodejoy joined #mojo
18:10 pink_mist jberger: alright, with your changed meaning I instead disagree that supporting negative epochs is relevant :P
18:11 Grinnz yeah, so the question is, is it worth the bit of extra logic to make it applicable to more use cases not strictly HTTP related
18:11 xcodejoy left #mojo
18:11 Grinnz but still has web dev application
18:12 jberger say a web application wants to deal with user's age and does so via birthdates
18:12 pink_mist I don't see why HTTP dates are needed for that
18:13 Grinnz they aren't, but ->parse/->epoch/->to_datetime are still useful
18:13 ferreira then the developer has to immediately with some other module to represent the birth dates when Mojo::Date could easily be enough for simple uses
18:13 jberger pink_mist: that's the question, is Mojo::Date only for HTTP usage or web application usage?
18:13 Grinnz it already handles more formats than just HTTP Date so it's a bit of a gray area
18:13 jberger truth is, I likely would reach for something more powerful than Mojo::Date if I actually had to do something like ages
18:14 jberger so its an interesting question
18:15 Grinnz side note; the \d in regexes in Mojo::Date probably should all be replaced with [0-9]
18:15 Grinnz the extracted values are all used as numbers afterward
18:18 * sri thinks the feature would be worth adding a one-liner, but not more
18:21 Grinnz https://perlbot.pl/p/so96jd
18:21 Grinnz you don't get a much better result when you throw a string of letters at it, but still...
18:24 arcanez so \d isn't [0-9] when it comes to unicode?
18:24 Grinnz correct
18:24 arcanez everyone must use ascii.
18:24 Grinnz :)
18:25 sri yea, i didn't really care since Mojo::Date is not meant for validation
18:25 Grinnz that, or pass all \d matches through Unicode::UCD::num() ;)
18:25 arcanez also TIL
18:25 sri and it made the regexes smaller
18:25 Grinnz right... i can't think of a way it would cause a security problem so it's fine either way
18:26 arcanez what does [[:digit:]] match
18:26 Grinnz same as \d
18:27 Grinnz https://www.reddit.com/r/perl/comments/69kdit/d_does_not_validate_numbers/dh9vom8/
18:28 Grinnz d'oh. https://metacpan.org/pod/perlrecharclass#POSIX-Character-Classes says "digit  Any decimal digit ("[0-9]"), equivalent to "\d"."
18:28 arcanez I'm going to have to start putting my dates in unicode now
18:28 Grinnz that's confusing :)
18:29 arcanez unicode is quite often overlooked. like ipv6
18:29 Grinnz (my test verifies that it is in fact equivalent to \d for unicode strings)
18:37 sri ferreira: re https://github.com/kraih/minion/pull/51, too bad, that's something i am personally interested in ;)
18:37 cheako joined #mojo
19:00 castaway joined #mojo
19:58 irqq joined #mojo
20:17 cheako joined #mojo
20:55 disputin joined #mojo
21:46 CandyAngel I wish I could design something good. Can't even decide what I want my module to do >.<
21:53 sri in my experience the only way to build something good is to build something you need yourself
21:53 CandyAngel Mhm, I am doing :)
21:54 CandyAngel I want a native/better client for this chat service (rather than running it in Wine)
21:56 CandyAngel The module I'm doing write now isn't for a client itself, but so others could write their own client using it.. like Mojo::IRC
21:57 CandyAngel But I can either have it low level (just emits messages from the server and accept messages to send) which I think makes it a broker
21:58 CandyAngel Or I can make it handle the multiple server connection, emit only events a client need to handle (chat, whisper, movement) and have an api for sending chat/whisper/movement etc.
21:58 Grinnz make both? the low level module then a higher level wrapper
22:06 CandyAngel I'm fine with that, but that brings up issues
22:06 CandyAngel Like, I presume the low level thing should decode the packets (to data structures) and craft packets when given data which is Mojo::Transaction::HTTP
22:06 CandyAngel but this protocol structures the same packets differently.. depending on the servertype, which is a connection attribute
22:07 CandyAngel Like, if the servertype is one, the authentication packet includes a "log me in" flag, but the other servertype doesn't accept it
22:08 jberger are all the servertypes likely to be encountered?
22:08 jberger Mojo doesn't really handle HTTP/1.0
22:08 jberger it is tuned for HTTP/1.1
22:08 CandyAngel There are only 2 the client connects to (User and Room), but there is at least one other server type that the servers connect to (Database)
22:09 Grinnz sounds like different objects using the same superclass/role to me
22:09 CandyAngel So like
22:10 CandyAngel You connect to a server and ask it for the server properties and it responds with a bunch of stuff, including the type of server it is
22:10 Grinnz didnt we discuss this before when you were pondering is_type('foo') and all
22:10 CandyAngel So you connect to User, request properties, it responds, you auth (with the log in flag) then request information about a room and the User server tells you the address/port of the Room server
22:11 CandyAngel Which you then connect to, auth again (without the "log in" flag) and do room stuff (teleport to location, send chat)
22:11 CandyAngel That is one reason I was discussing it, yeah
22:12 Grinnz this chat system lets you teleport??? sign me up
22:13 CandyAngel So for the auth packet to work, whatever generates it needs to know what server it is going to send it to
22:13 CandyAngel Unless.. maybe I'm just putting it at the wrong level, and the thing making the request should include it in the data to be packet-ised
22:14 CandyAngel Which would be the higher-level modules
22:15 CandyAngel Maybe it should be like this (in the higher module): $chat->send(sessinit => {username => 'candy', password => 'authme', logon => 1})
22:17 Grinnz i mean, it depends which level(s) you think would be useful to expose
22:17 CandyAngel or $chat->sessinit(... packetdata ...);
22:17 CandyAngel Mhm
22:18 CandyAngel I also intend on making a server for this, by the way
22:18 CandyAngel Hopefully using the same modules, like Mojolicious does
22:22 CandyAngel So if I did make a broker and a event-emitting client.. would I literally name it like that? ::Service::Broker and ::Server::Client?
22:23 CandyAngel Or would broker be "UserAgent" (and "Daemon" for server-side)
22:26 Grinnz naming: the hardest part of writing new code :P
22:26 CandyAngel :P
22:29 cheako joined #mojo
22:36 CandyAngel okay, I think I have a plan
22:41 CandyAngel Thank you for your time and advice, as always
22:57 rshadow joined #mojo
22:57 sri jberger: you mean HTTP/0.9
22:57 sri we handle HTTP/1.0 very well
22:58 someguy hmm. Is under ... websocket ... not a common use case? it seems that a working client is hung up on with WebSocket closed with status 1006.
23:01 someguy I think its because I have a delay in the route
23:01 karjala_ joined #mojo
23:04 Grinnz are you returning undef in the under initially, then calling $c->continue when the delay completes?
23:04 Grinnz as in the third example in https://metacpan.org/pod/Mojolicious::Guides::Routing#Under
23:06 someguy Yes.
23:08 Grinnz then i dunno, sounds like it should work to me
23:08 someguy Yep
23:08 someguy and If I copy/paste an example into the action
23:08 someguy from a working second lite app
23:09 someguy it breaks in my app.
23:13 cheako joined #mojo
23:15 cheako joined #mojo
23:36 someguy AAh!
23:37 someguy I guess you can't redirect_to when you're a websocket
23:37 tencendur joined #mojo
23:40 Grinnz oh yeah, that would do it :P
23:41 CandyAngel Hm, I just noticed that ::UserAgent actually sets a bunch of values in $tx and it's child objects. I could just do the same and set the servertype in the $tx
23:42 someguy I was only redirecting based on missing params... do :'ed params appear before the 101, but not after?
23:43 Grinnz i don't think establishing the websocket would change the params in the stash
23:44 Grinnz but redirecting after it's established doesn't make any sense

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