ddfreyne changed the topic of #nanoc to: 3.6.5 (sep 29th) | web http://nanoc.ws/ | repo http://bit.ly/XE6e3G | issues http://bit.ly/VfXaSV | forum http://ho.io/n-discuss | irclog http://irclog.whitequark.org/nanoc
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jachymko has quit [Quit: ZNC - http://znc.in]
jugglinmike has quit [Quit: Leaving.]
ics has joined #nanoc
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ics has joined #nanoc
jarr0dsz has joined #nanoc
jaspervdj has quit [Ping timeout: 245 seconds]
jaspervdj has joined #nanoc
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jarr0dsz has joined #nanoc
matjas has quit [Ping timeout: 245 seconds]
_rgn has quit [Ping timeout: 245 seconds]
ics has quit [Ping timeout: 252 seconds]
ics has joined #nanoc
matjas has joined #nanoc
_rgn has joined #nanoc
VitamineD has joined #nanoc
VitamineD has quit [Quit: VitamineD]
number-six has quit [Ping timeout: 246 seconds]
number-six has joined #nanoc
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alerante has joined #nanoc
jugglinmike has joined #nanoc
alerante has quit [Remote host closed the connection]
ics has joined #nanoc
tom[] has joined #nanoc
VitamineD has joined #nanoc
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
VitamineD has quit [Quit: VitamineD]
<tom[]> is nanoc suitable for my new technical documentation project? it is a collection of a few hundred pages authored in markdown, arranged hierarchically (2 or 3 levels) by topic. the generator (nanoc?) needs to produce the pages with sidebar TOC for navigation
jugglinmike is now known as iros__
iros__ is now known as iros___
iros___ is now known as jugglinmike
tantalum has joined #nanoc
<bobthecow> tom[]: yes.
skroon has quit [Read error: Connection reset by peer]
skroon has joined #nanoc
<Evolution> tom[]: I like it for that, yes. though I'd consider asciidoc over markdown for that much doc
<tom[]> Evolution: i'll check out asciidoc. tnx
<tom[]> bobthecow: tnx
<tom[]> can you suggest any "skeleton" projects for nanoc i could use as example or maybe even a basis to adapt?
<bobthecow> github's API docs are written in nanoc, lots of people use those as a basis for things.
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jarr0dsz has joined #nanoc
<bobthecow> there are a couple of people writing courseware using nanoc. i don't remember who. mebbe ddfreyne would?
<bobthecow> those might be a good start as well.
<tom[]> splendid! thanks
<bobthecow> a lot of those have source links as well.
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tom[]> looks like github did their toc nav manually
<bobthecow> tom[]: do you ruby?
<tom[]> not really
<tom[]> it doesn't look like it would be hard to add a toc generator if i did
<bobthecow> yeah, it's pretty straightforward.
<bobthecow> you just want one-entry-per-page in a master TOC, right?
<bobthecow> not per-heading in each entry or anything?
<tom[]> a master toc built from yaml headers would be fine
<bobthecow> it's possible to do both, it's just a different answer depending on what you're looking for.
<tom[]> that would be a partial that can be used as a toc page and a sidebar nav
* tom[] distracted by EC women's points race
<tom[]> .nl gets it
<tom[]> in http://nanoc.ws/docs/tutorial/#writing-some-custom-code i don't understand the syntax: [:ident]
<bobthecow> what (non-human) languages to you speak?
<tom[]> php and js quite well. a few others i'm rusty in
<bobthecow> stop me if i say something you already know :)
<bobthecow> in PHP an "array" is actually two different data types mashed into one.
<bobthecow> it's a list and a dictionary.
<bobthecow> in most other (sane) languages, those two things aren't mashed into one data type, they're separate.
<bobthecow> because they have different uses.
<bobthecow> a PHP "associative array" is a dictionary / hash / object, like javascript's object.
<bobthecow> a PHP "numeric array" is a list / array / tuple, like javascript's array.
<bobthecow> in ruby, they're called arrays and hashes.
<bobthecow> [1,2,3] is an arrya.
<bobthecow> *array
<bobthecow> {'foo' => 1, 'bar' => 2} is a hash
<bobthecow> make sense?
<tom[]> this much i gathered. but the lookup with : i can't find a description
<bobthecow> getting there :)
<tom[]> yes. python and perl(?) use the "hash" name
<bobthecow> python calls 'em dictionaries.
<bobthecow> perl calls 'em hashes, iirc.
<tom[]> there's a number of langs i know only just enough to be dangerous in
<bobthecow> so the @item[:foo] is a hash lookup.
<bobthecow> same as php $item['foo']
<bobthecow> you'll also see @item['foo'] though, because in Ruby hash keys can be lots of things.
<bobthecow> not just strings.
<bobthecow> things like :foo
<bobthecow> which is a symbol.
<bobthecow> kinda like a constant that's only referred to by its identifier, if that makes sense?
<tom[]> yikes, that's asking for trouble
<bobthecow> no, it's a super useful construct.
<bobthecow> one i've always wished php had.
<tom[]> an opaque token
<bobthecow> define('FOO', 1); define('BAR', 1)
<bobthecow> FOO === BAR;
<bobthecow> so not only do you have to define all your constants, you have to be careful to keep 'em from colliding.
ics has joined #nanoc
<bobthecow> using ruby symbols, you don't ever have to worry about that.
<bobthecow> :foo != :bar ever.
<bobthecow> so you use 'em in lots of places that PHP would use a string.
<tom[]> like in js. item = { foo: 4 } item.foo. except js has an equivalence between that a string accessors
<bobthecow> but without the overhead of an actual string being passed around in memory.
<tom[]> ok
<bobthecow> one of the main places is as hash keys.
<tom[]> i can handle that
<bobthecow> note that item[:foo] != item['foo']
<bobthecow> you can have two different values for those.
<tom[]> what does ruby call these things?
<bobthecow> symbols.
<bobthecow> run irb in a terminal
<bobthecow> a = 'foo'
<tom[]> yes. item[:foo] != item['foo'] was what made me yikes!
<bobthecow> a.to_sym
<bobthecow> kinda like how, in a sane language, item['1'] != item[1]
<tom[]> can an expression evaluate to a symbol?
<bobthecow> yes.
<bobthecow> a.to_sym
<tom[]> where a is string?
<bobthecow> yeah.
<bobthecow> open up irb and play around with it for a bit :)
<bobthecow> a = 'foo'
<bobthecow> a.methods
<bobthecow> shows you all the methods on a string in ruby.
<tom[]> and a symbol can be stored in a var, has, array, etc
<bobthecow> anywhere you can store a value.
<bobthecow> that's true of everything in ruby, btw.
<bobthecow> anything can be stored anywhere.
<bobthecow> classes can be stored in hashes.
<bobthecow> :)
<bobthecow> {:foo => Object}
<bobthecow> so ruby's got a couple of properties that make it both incredibly awesome and potentially really confusing.
<bobthecow> the aforementioned putting classes in hashes is a side effect of the first one:
<bobthecow> everything in ruby is an object.
<bobthecow> *everything*
<tom[]> like js. some very nice stuff and a lot of ways to make mistakes and write code most people won't understand
<bobthecow> no, js has some things that aren't objects.
<bobthecow> like 1.
<bobthecow> and null
<tom[]> what i meant was: similarly, js has properties that make it both incredibly awesome and potentially really confusing
<bobthecow> ahh, yes.
<bobthecow> and js ups the confusion ante by using prototypes instead of classical inheritance :)
<tom[]> that part i like
<tom[]> ust takes some learning
<bobthecow> i do to.
<bobthecow> it's just not what people are used to.
<bobthecow> so if you want a glimpse of the Ruby rabbithole...
<tom[]> i want just enough ruby to nanoc
<bobthecow> i like the ruby rabbithole better than the php one :P
<tom[]> php is a gigantic mess. albeit a very useful one
<bobthecow> agreed.
<tom[]> pity there isn't a linter for php as strict and rude as jslint
<bobthecow> do you use PHPCS?
<bobthecow> you can make it as strict as you want.
<tom[]> yes, but it's not as good
<bobthecow> i personally prefer jshint.
<tom[]> exactly. phpcs like jslint is whatever you want. so you can ask it to ok anything
<tom[]> i mean, like jshint
<bobthecow> agreed.
<bobthecow> and that's why i prefer jshint.
<tom[]> and why i don't
<bobthecow> because i don't have to write code exactly like crockford for it to be good.
<bobthecow> it just needs to be consistent and not do stupid things.
<tom[]> my opinion about coding standards and style doesn't matter.
<tom[]> just tell me what it should be
<bobthecow> yeah. and jshint will do that if you run it with default options.
<bobthecow> but it won't berate you about things that don't matter.
<bobthecow> there's "make it standard" and there's "make it exactly like so"
<tom[]> sould like an opinion i'm not competent to hold
<bobthecow> :)
<tom[]> i'm a bad programmer
<tom[]> been doing it for 35 years and learned not to trust myself
<tom[]> marginally competent
<bobthecow> basically for code standards i grab a reasonably well adopted standard that doesn't seem like too much busy work and use that.
<bobthecow> for PHP, that's the PSR standards
<bobthecow> for Ruby, I use GitHub's style guide.
<bobthecow> for JS, I use jslint.
<bobthecow> *jshint
<bobthecow> because it's less work, but catches all the things i need to catch.
<guardian> Evolution: why asciidoc over markdown?
<tom[]> i've been researching that too
<Evolution> guardian: markdown has a few limitations I ran into in the format for my needs. asciidoc can be exported to a wide range of formats, so the same document can be used for website, pdf , etc.
<Evolution> I'm still using markdown for quite a bit, but for 'formal' project documentation, asciidoc was a better fit for us.
<Evolution> entirely personal opinion.
<guardian> ok
<tom[]> md becomes hard, i've found, when i needed to do a lot of references (cross, footnotes, sections, pages)
<tom[]> this was annoying to do in md: http://spinitron.com/sx/cpb-vs-nw.html
<tom[]> but generating pdf from md seems as easy as henerating html
louquillio has quit [Remote host closed the connection]
* tom[] loves pandoc
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tantalum has left #nanoc [#nanoc]
louquillio has joined #nanoc
VitamineD has joined #nanoc
ics has joined #nanoc
skroon has quit [Read error: Connection reset by peer]
skroon has joined #nanoc
<ddfreyne> tom[]: How do you do crossreferences and fotonotes?
<ddfreyne> That's something I've been interesting in too.
VitamineD has quit [Quit: VitamineD]