Logs for #nikola for 2016-09-16

11:36:27 <travis-ci> Wheelhouse build by requires.io: The build passed. See https://travis-ci.org/getnikola/wheelhouse/builds/160420363.
13:24:27 <travis-ci> Wheelhouse build by Chris Warrick: The build passed. See https://travis-ci.org/getnikola/wheelhouse/builds/160444499.
13:24:49 <ToApolytoXaos> hey ralsina, I hope you are doing well. I wanted to ask you; when I have imported my blog content from blogspot, I didn't get any CSS saved in a folder somewhere, but I *do* get that result inside output folder. Is this the default behavior of import_blogger? Cheers
13:25:48 <ChrisWarrick> ToApolytoXaos: Nikola has some built-in CSS files that live in your virtualenv and are copied as part of your theme.
13:26:15 <ToApolytoXaos> ah darn it, I have completely forgot about this lol.
13:26:50 <ToApolytoXaos> OK, what if I want to customize my website? Is there a place where I could add a CSS file that could override the default one?
13:28:12 <ChrisWarrick> ToApolytoXaos: files/assets/css/custom.css
13:28:45 <ToApolytoXaos> you are the best ChrisWarrick, cheers
13:29:33 <ChrisWarrick> you're welcome
13:53:41 <ToApolytoXaos> ChrisWarrick: if I wanted to add locally a font of my desire, where should it be placed?
13:54:04 <ChrisWarrick> be more specific?
13:54:58 <ToApolytoXaos> let's say I downloaded a certain set of fonts
13:55:07 <ToApolytoXaos> that I would like to embed in my webpage
13:55:21 <ToApolytoXaos> for some reason, I don't want to @import a link to load my fonts
13:55:30 <ToApolytoXaos> I want them locally
13:57:11 <ChrisWarrick> By continuing, you state that you know why CDNs are the best way to distribute static assets over the Internet.
13:57:28 * x1101 lol's a bit
13:57:48 <ChrisWarrick> Anything you put in the files/ directory will end up straight in your output directory. So just make files/assets/fonts/whatever.otf and write your own CSS for it in custom.css
13:58:14 <ToApolytoXaos> nice
13:58:30 <ToApolytoXaos> I'm learning new things every single day
13:58:54 <ToApolytoXaos> hey, I wasn't born knowing everything; far from it. I know nothing at all!
16:50:37 <ToApolytoXaos> I was wondering, how fast can nikola build let's say 1,000 posts? Do we have any benchmarks?
16:53:18 <ralsina> It depends
16:53:57 <ralsina> On a machine with a SSD, if the posts are just posts, not image galleries and such, no gists or other things that need network access I'd say a minute or so
16:54:36 <ralsina> ToApolytoXaos: ^
16:55:04 <ToApolytoXaos> that's interesting
16:55:16 * ralsina does a quick check
16:56:37 <ToApolytoXaos> but logically it *should* built faster if those 1,000 aren't all of them modified; isn't that the main reason you use doit?
16:56:45 <ralsina> yes
16:57:44 <ToApolytoXaos> that bloody Hugo built 5,000 posts in ~6 seconds :S I wonder if doit could compete with Hugo which is implemented in Go
16:58:28 <ToApolytoXaos> I'm sure Python can use beautiful tricks deep inside of it
16:58:30 <ralsina> 1000 copies of internals.txt build on exactly 1 minute :-)
16:58:37 <ralsina> real    1m0.019s
16:58:37 <ralsina> user    0m58.880s
16:58:37 <ralsina> sys     0m0.996s
16:58:47 <ToApolytoXaos> if you rerun it?
16:58:55 <ToApolytoXaos> shouldn't be 2 seconds or less?
16:59:01 <ralsina> changed one file
16:59:09 <ralsina> real    0m5.727s
16:59:09 <ralsina> user    0m5.444s
16:59:09 <ralsina> sys     0m0.224s
16:59:20 <ToApolytoXaos> very very nice :D
16:59:43 <ralsina> the 1000 files build may be faster if they are markdown and we use misaka
16:59:49 * ralsina does another quick check
17:00:21 <ToApolytoXaos> is misaka another form of markdown or YAML?
17:04:47 <ralsina> 1000 markdown conversions of internals.txt built using misaka: 21 seconds
17:05:05 <ralsina> misaka is a faster markdown, I think it's implemented in C
17:05:15 <ToApolytoXaos> oh my...that's too slow
17:05:19 <ToApolytoXaos> imagine testing it with 5k
17:06:38 <ralsina> 1000 markdown files using python markdown take ... way longer
17:06:55 <ralsina> oh boy python markdown is slow
17:07:16 <ToApolytoXaos> yeah...that's just sad
17:08:04 <ralsina> python markdown it's taking about 1 second per file
17:08:13 <ralsina> so, if anyone wants to do markdown I'd say, use misaka
17:08:17 <ToApolytoXaos> how exactly is the actual building process working for nikola?
17:08:33 <ralsina> well, it's a long stoy :-D
17:08:51 <ralsina> But basically, doit will find which things are out of date, and then nikola builds each one as a task
17:09:12 <ralsina> using the "compiler plugin" that matches. That builds cache/post/foo.html
17:09:43 <ralsina> then the template engine will take that and build output/post/foo.html with all the things around the post
17:09:56 <ToApolytoXaos> does "nikola build" takes advantage of the available cores a PC could provide?
17:10:01 <ralsina> it can
17:10:07 <ralsina> I didn't try that!
17:10:12 <ralsina> quick check time :-)
17:10:15 <ToApolytoXaos> nice
17:11:17 <ralsina> Using 4 cores, 1000 markdown posts using misaka build in 13 seconds
17:11:25 <ToApolytoXaos> interesting
17:11:50 <ralsina> using 2 cores it takes 15 so probably not worth using more than that
17:11:51 <ToApolytoXaos> so we dropped from 1 minute to 14 seconds?
17:11:58 <ralsina> No, from 21 seconds
17:12:05 <ToApolytoXaos> ah the markdown test
17:12:12 <ralsina> 1 minute is using restructured text (which hugo can't use AFAIK)
17:12:31 <ralsina> I am shocked at how freaking slow python markdown is compared to everything else
17:12:38 <ToApolytoXaos> what about async? is nikola using any asynchronous mechanism somewhere?
17:12:45 <ralsina> no
17:12:52 <ralsina> just a task graph that can be split
17:12:57 <ralsina> everything is sync
17:12:58 <ToApolytoXaos> I see
17:13:29 <ToApolytoXaos> I guess that's what makes Golang kind of "special"
17:13:58 <ToApolytoXaos> now I got tempted for investigation :D
17:14:16 <ralsina> I don t think going async would make much difference here
17:15:56 <ToApolytoXaos> well, you never know
17:16:05 <ToApolytoXaos> without an actual case study we don't know the end result
17:17:32 <ToApolytoXaos> is doit something like "continuous integration"-ish?
17:18:31 <ralsina> it's more like make
17:19:21 <ralsina> but a bit more general because instead of only calculating dependencies between files and running commands, it can calculate dependencies between files, strings, and the output of functions, and it can run commands or functions
17:19:37 <ToApolytoXaos> I see
17:21:02 <ToApolytoXaos> imagine having a CI-like mechanism running as an asynchronous process that would find file changes and built them on the background before we actually proceed to build the entire project
17:23:33 <ralsina> ToApolytoXaos: "nikola auto -b" is your friend :-)
17:25:26 <ToApolytoXaos> -b is for browser?
17:25:38 <ToApolytoXaos> I have been using it without the -b flag
17:26:10 <ToApolytoXaos> anyway, time for a drink and brainstorm with a friend :)
17:26:14 <ToApolytoXaos> keep up the good work mate
17:50:42 <ChrisWarrick> !tell ToApolytoXaos Your /quit message still links to your Blogger blog, where’s your Nikola blog?
17:50:42 <KwBot> ChrisWarrick: acknowledged.