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

IRC log for #mojo, 2016-12-17

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

All times shown according to UTC.

Time Nick Message
00:08 suede sri: How do I check if a field returned from a Mojo::Pg query is null? defined()?
00:08 suede I read the docs but if there's something there about it I missed it
00:10 howitdo joined #mojo
00:10 jberger suede the records from Mojo::Pg are effectively the same as come from DBI
00:11 * suede navigates to the DBI docs
00:11 jberger (DBI is used under the hood)
00:11 jberger Anyway, yes, null maps to undef
00:11 suede jberger: I actually knew that but I didn't even think to check it. Whoops
00:11 suede Okay, thanks
00:31 stephan48
00:31 stephan48 his domain :D
00:38 bpmedley joined #mojo
00:49 polettix joined #mojo
00:58 aborazmeh joined #mojo
01:00 jontaylor joined #mojo
01:39 bpmedley karjala , pink_mist , preaction : I do have the beginnings of a book here: http://bmedley.org/mojo.pdf  Any type of feedback would be golden.. :-0
01:41 karjala bpmedley: don't forget to mention Minion!
01:41 bpmedley karjala : Fantastic idea, thanks..
02:06 karjala I wonder if ordinary minion jobs (without special priority) are executed in the order they were created, if there's only one process doing the work
02:09 bpmedley karjala : https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm#L234 <-- I believe this answers that question for the Pg backend
02:10 karjala thanks
02:13 Gedge joined #mojo
02:14 karjala on the SQLite backed, the order is not on "id", but on "created": https://metacpan.org/source/DBOOK/Minion-Backend-SQLite-0.007/lib/Minion/Backend/SQLite.pm#L244
02:14 karjala which means if more than one job was created on the same second, the order will be random
02:16 sri think i changed that in the Pg backend a few months ago
02:16 sri SQLite backend might not have been updated yet
02:25 karjala I'll tell DBOOK, but what's his nickname here?
02:26 bpmedley karjala : Grinnz
02:27 karjala MySQL can't index properly on "field1 DESC, field2 INC"
02:28 karjala it can't search fast such a query
02:28 karjala it will only use the index on field1
02:28 karjala i wonder if Postgres is better at this
02:29 karjala but it's not so important, ok
02:46 Grinnz sri: ah i remember that, i skipped it because i thought it was just a performance improvement
02:46 Grinnz i'm not sure whether the index is that useful for sqlite either
02:46 Grinnz ah, sqlite indexes can have a sort order, it may work then
03:02 asarch joined #mojo
03:05 noganex joined #mojo
03:08 Grinnz ordering on id is not always the best idea because it can eventually wrap, but it turns out for sqlite this doesn't happen until the id hits 9223372036854775807
03:08 Grinnz so i don't think it is a problem... :)
03:09 Grinnz actually that's not even true, if the id hits that, then the auto increment will fail any further attempts to insert entirely
03:10 Grinnz so it is much nicer than mysql, as usual
03:12 genio That's a biiig number
03:30 Grinnz yay typeless systems :P
03:32 Grinnz however, doing anything like the index added to the "parents" field in ::Pg is far beyond my mere ability in sqlite :P
03:33 Grinnz it does take expression indexes, but making one that would actually be effective for the queries used, i don't know about that
03:42 zivester joined #mojo
03:43 Grinnz https://metacpan.org/release/DBOOK/Minion-Backend-SQLite-0.008
03:44 bpmedley Grinnz++
03:44 Grinnz needed an excuse to make a new release of that dist anyway
03:44 Grinnz the modified benchmark script is added in examples
03:48 karjala Grinnz++
03:53 bpmedley_ joined #mojo
04:01 gizmomathboy joined #mojo
04:09 aborazmeh joined #mojo
05:04 dboehmer_ joined #mojo
05:36 howitdo joined #mojo
05:56 asarch joined #mojo
06:55 Vandal15263 joined #mojo
07:36 rshadow joined #mojo
09:53 sh14 joined #mojo
10:16 howitdo joined #mojo
10:30 dod joined #mojo
10:45 polettix joined #mojo
11:21 sri karjala: the indexes are designed for postgres, so yes, it can take advantage of all of them
11:22 sri they are only added after extensive testing
11:25 sri Grinnz/genio: if my math is correct, you'd have to insert 292471208 jobs per second to run out of ids in 1000 years ;p
11:25 sri god luck with that!
11:25 sri *+o
11:28 sri btw. re activating csrf in tag helpers
11:28 sri i suppose a magical attribute would work too
11:29 sri %= button_to Foo => '/bar', '=csrf' => 1
11:30 ivi joined #mojo
11:50 karjala does everything work correctly, if TWO minion worker are started? Each doing many concurrent jobs
11:54 karjala When my devs first fire up their dev VM with vagrant, they'll already have a single-process minion worker running in the background. But to get the initial job done (which is processing 17.000 CPAN releases) they might want to launch a script that fires Minion Worker with -j 20
11:54 karjala SO there will be two minion workers running. Is that safe?
12:04 karjala Will the two act as one with the combined number of concurrent job executions?
12:07 sri you can have as many workers as you like
12:08 sri and add/remove workers at any time
12:10 karjala thanks
12:16 batman joined #mojo
12:33 rshadow joined #mojo
12:36 rshadow joined #mojo
12:40 zamanf joined #mojo
14:39 asarch joined #mojo
14:47 zivester joined #mojo
15:15 ivi joined #mojo
15:26 rshadow joined #mojo
16:03 genio sri: wow.  that's a _lot_ of jobs.
16:17 jontaylor joined #mojo
16:18 pink_mist so that's the y3k16 problem
16:47 dod joined #mojo
16:51 jontaylor joined #mojo
16:52 dod joined #mojo
17:01 jberger https://twitter.com/joelaberger/status/810168008257785857
17:10 howitdo joined #mojo
17:14 PryMar56 joined #mojo
17:15 kes joined #mojo
17:17 kes Hi. I can not figure out how to render DOC of mojo application modules with PODRenderer?
17:19 PryMar56 joined #mojo
17:32 rshadow joined #mojo
17:58 marcus kes: just generate any app and start the server - it's available at http://localhost:3000/perldoc/Mojo::Base
18:08 kes I have tried /perldoc/MyApp but got Not found. The problem were because of no any POD were in MyApp
18:09 kes forgot to write about that I resolve the question.
18:09 kes sorry
18:12 dod joined #mojo
18:27 rshadow joined #mojo
18:47 Adura joined #mojo
19:16 stephan48 jberger: you recommedated a tool which assists in handling a latex rendering workflow... do you maybe have a hint what it was? planing on rendering mojolicious templates as pdf
19:16 howitdo joined #mojo
19:26 rshadow joined #mojo
19:31 jberger stephan48: latexmk
19:31 jberger great tool
19:31 stephan48 thank you!
19:34 stephan48 perfect looks like i can just render the template to a temp file and then run latexmk via subprocess to handle rendering & delivering to the client
19:45 dod joined #mojo
20:07 jberger yep, that's how I'd do it
20:07 jberger I mean, latexmk can't render to the client
20:08 jberger once the compiling subprocess completes you'll have to slurp the file an serve (or place in a publically accessible folder)
20:08 jberger but generally yes
20:11 stephan48 yup
20:26 disputin joined #mojo
21:10 howitdo joined #mojo
21:15 rshadow joined #mojo
21:16 howitdo joined #mojo
21:35 polettix joined #mojo
22:37 polettix joined #mojo
23:12 disputin joined #mojo

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