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

IRC log for #mojo, 2016-10-23

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

All times shown according to UTC.

Time Nick Message
01:53 aborazmeh joined #mojo
02:30 disputin joined #mojo
02:53 noganex joined #mojo
02:54 suede joined #mojo
03:53 kaare_ joined #mojo
05:16 polettix joined #mojo
06:34 irqq joined #mojo
07:13 kryp joined #mojo
07:23 polettix joined #mojo
07:29 polettix joined #mojo
07:40 parv joined #mojo
08:55 parvx joined #mojo
09:35 Vandal joined #mojo
09:43 dotan_convos joined #mojo
09:44 sri SOCKS works again with the new IO::Socket::Socks release
09:44 marcus sri: *phew*
09:45 good_news_everyon joined #mojo
09:45 good_news_everyon [mojo] kraih tagged v7.09 at c7cade4: https://git.io/vPbr1
09:45 good_news_everyon left #mojo
09:45 sri and it looks like there is a test case for how we use IO::Socket::Socks now, maybe that will make it more reliable in the future
09:47 good_news_everyon joined #mojo
09:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vPbrS
09:47 good_news_everyon mojo/master 86b822a Sebastian Riedel: bump version
09:47 good_news_everyon left #mojo
09:48 parv joined #mojo
09:58 rshadow joined #mojo
10:06 sri odd how postgres refuses to use my index https://github.com/kraih/minion/issues/46
10:27 sri btw. for the atom users here, this terminal plugin is excellent https://github.com/platformio/platformio-atom-ide-terminal
11:14 sri interesting, apple has added support for an ARM cpu to macOS 10.12
11:43 rshadow joined #mojo
12:16 aborazmeh joined #mojo
12:19 kes joined #mojo
12:23 sh14 joined #mojo
12:27 lluad joined #mojo
12:55 irqq joined #mojo
13:57 rshadow joined #mojo
14:02 marty joined #mojo
14:48 lluad joined #mojo
14:51 kryp joined #mojo
14:58 PopeFelix joined #mojo
15:50 sri re postgres being odd
15:50 sri turns out he disabled sequential scans...
15:53 suede sri: what does that change internally in postgres?
15:53 suede what are sequential scans?
16:21 lluad joined #mojo
16:45 zivester joined #mojo
16:49 dpiwowarski joined #mojo
16:49 dpiwowarski Hi
16:53 dpiwowarski I want to pass an array via html form to mojo controller. This the result I get. {"params":{"animals[]":["Dog","Horse","Cat"]}}. Does Mojo parse [] in params name somehow? I would like to acces all animals via $c->every_param('animals').
17:03 suede dpiwowarski i don't know the answer to your question but is rootbox.com any good?
17:04 lluad joined #mojo
17:19 tchaves joined #mojo
17:30 jberger dpiwowarski: no, it sees them literally
17:30 jberger $c->every_param('animals[]')
17:36 lluad joined #mojo
18:01 marty_ joined #mojo
18:02 marty joined #mojo
18:03 lluad joined #mojo
18:09 Grinnz suede: sequential scan in a relational DB is when it reads in the table row by row (usually because it thinks there are few enough rows where it's not worth going through an index, or if there is no appropriate index to use)
18:10 suede Oh, I see
18:10 suede Grinnz: I read something talking about a Bitmap scan but I didn't really understand that either.
18:10 Grinnz don't know about that
18:10 suede Also, with modern RDBMS, how hard is it to produce a query that basically forces it to use sequential scan?
18:11 Grinnz SELECT * FROM tablename;
18:11 Grinnz will of course use sequential scan since it needs the whole table anyway
18:12 suede Well I more meant like
18:12 suede Complex queries, if you know what I mean
18:13 Grinnz if you screw up a join statement and cross-join a table with no reference point, maybe
18:13 suede This is a bad example because when I write code with an ORM, I do complex queries manually, but imagine something like DBIX or SQLAlchemy in Python doing complex relational stuff, how often in normal use would you encounter a query that really breaks it?
18:14 Grinnz and also, if you just don't have indexes in the table
18:14 Grinnz autogenerated queries arent likely to break it since they are usually doing simple joins
18:28 bobkare joined #mojo
18:29 lluad joined #mojo
18:40 lluad joined #mojo
18:41 xinming_ joined #mojo
18:42 xinming_ left #mojo
18:43 xinming joined #mojo
18:43 xinming Hi, directed from #perl in freenode
18:44 xinming for minion job queue, If I have a worker with 16G memory, and there different types which require different memory, let's say, 4G or 8G, In this case, What is the best approach to "delay" the 8G job?
18:45 xinming In #perl, people recommends 2 separate workers, one with 4G*3, and one handles single 8G.
18:46 xinming Or, Is there a better way to solve this?
18:46 bpmedley xinming : http://mojolicious.org/perldoc/Minion/Job#retry <-- can you use the retry options in Minion?
18:46 xinming I also think about "fail" the job directly, so it'll "retry" later.
18:47 xinming But what I'm thinking is, In some cases, some job may never be processed in some special cases when we have to deal with "backoff"
18:47 xinming As when we fight with "backoff", and the next time the job enters, The resource is still limited, It'll backoff longer and longer.
18:47 xinming I've talked about this in #perl
18:50 xinming bpmedley: Do you have any good idea for this?
18:51 xinming I do have a idea which is, "block" the job when resource is limited. But what is the right way to do this?
18:53 bpmedley xinming : I don't really have a general solution.  In the limited time I've thought about the issue all I can think of is a hackish way.. :)
18:54 xinming bpmedley: It's ok to have hackish way, As I need ideas :-)
18:54 xinming I just think that I can use "flock" in the subprocess.
18:57 lluad joined #mojo
18:57 bpmedley When I got a job that needed more ram than was available I'd set a flag somewhere and check the flag for all new jobs.  If the new job didn't match the flag criteria, then I'd do a retry.  does that make sense?
18:59 xinming bpmedley: This is what I think
19:00 xinming And yes, That makes sense.
19:00 xinming Will Minion be extended to support this? :-)
19:05 sri xinming: you can manually reschedule the job from itself
19:06 sri there's no backoff involved then
19:10 lluad joined #mojo
19:12 xinming sri: Could you give more hints?
19:12 sri it's so weird that postgres refuses to use a gin index even though it's orders of magnitude faster
19:12 sri xinming: kinda busy with something else i'm afraid
19:13 xinming ok, sorry, Will trouble you next day. :-)
19:16 sri what's even more weird, i managed to force postgres to use the gin index by using the @> operator in psql
19:16 sri but in the actual minion code it refuses to use the index
19:17 dod joined #mojo
19:43 asarch joined #mojo
19:46 stryx` joined #mojo
19:46 PryMar56 joined #mojo
19:46 lluad joined #mojo
19:52 sri little creative solution to the gin index problem https://github.com/kraih/minion/commit/a42fae8a19439f1095c5b55bcca18f5b638a1ee3
19:53 sri the "= any(...)" seems to make postgres favor sequential scans
19:56 sri this also confirms my suspicion http://stackoverflow.com/a/29245753
19:56 sri good to know
19:58 sri important tidbit , the indexed expression needs to be on the left side of the operator
20:02 polettix joined #mojo
20:18 lluad joined #mojo
20:18 Grinnz interesting
20:51 lluad joined #mojo
20:51 mgrimes_ joined #mojo
21:32 sri coolo: these are the kind of optimizations for which i like raw sql instead of an orm ;)
21:32 suede sri
21:33 sri suede
21:33 suede i think that raw sql is better than an ORM in most cases that aren't just direct SELECT/INSERT/UPDATE queries
21:33 suede because an ORM can only do so much
21:33 suede it's probably not hard to come up with a query that murders performance when doing cross-table anything
21:34 sri the big advantage of using an orm is supporting multiple databases at once
21:34 suede I see
21:34 sri many people still like the sqlite for development and postgres in production setup
21:35 suede yeah, that's true
21:35 sri of course ultimately it is doomed to fail once your app requires non-trivial things from the database
21:35 suede yes
21:35 suede this is true
21:51 Grinnz it also could be helpful if your developers aren't experienced in SQL
21:54 polettix joined #mojo
21:54 lluad joined #mojo
22:50 lluad joined #mojo
23:25 lluad joined #mojo

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