ddfreyne changed the topic of #nanoc to: 3.6.2 (mar 23th) | 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
hakunin has quit [Ping timeout: 258 seconds]
jadd_ has joined #nanoc
jadd_ has quit [Quit: Leaving...]
bghost has joined #nanoc
bghost has quit [Ping timeout: 245 seconds]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
hakunin has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 246 seconds]
bghost has quit [Ping timeout: 252 seconds]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 240 seconds]
jadd_ has joined #nanoc
alerante has quit [Remote host closed the connection]
rolfb has joined #nanoc
<ddfreyne> guardian: Nice, really cool design ;)
<ddfreyne> guardian: There’s an empty space below the footer (in Chrome)
<ddfreyne> I’d also decrease the width of the text. It’s too wide to read nicely I think
jaspervdj has quit [Read error: Operation timed out]
jaspervdj has joined #nanoc
jadd_ has quit [Quit: Leaving...]
<guardian> ddfreyne: space == intended
<guardian> ddfreyne: too many words per sentence?
pavelkunc has joined #nanoc
kitallis has joined #nanoc
<ddfreyne> guardian: Too many words per line, I would say
yogsototh has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 252 seconds]
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 276 seconds]
kitallis has quit [Ping timeout: 264 seconds]
pavelkunc has quit [Quit: Leaving.]
bghost has quit [Quit: leaving]
pavelkunc has joined #nanoc
kitallis has joined #nanoc
<stbuehler> ddfreyne: i think @item.find can be overloaded for the glob matching (original #find takes either no argument or a Proc), although #find_all is probably better - #find is supposed to only return one entry
jadd_ has joined #nanoc
<stbuehler> ddfreyne: but similar to Dir #glob could a good name too
<ddfreyne> Hmmm, #glob could be a good name
yogsototh has left #nanoc [#nanoc]
jadd_ has quit [Ping timeout: 245 seconds]
<ddfreyne> And #find for finding a single element (because that is necessary too)
<darix> well you could use the more recent rails query syntax
<darix> @items.where(:identifier => '/foo').first
<darix> and also allow chaining ala rails 3+
<darix> :p
<darix> fooitems = @items.where(:identifier => '/foo*')
<ddfreyne> darix: Ohh, that would be quite useful, because I already am looking for a way to do intelligente item queries
<ddfreyne> intelligente... I am not Italian!
<darix> fooitems.where(:publish_at => "=< 2013-04-15")
<ddfreyne> @items.query(:kind, eq: 'article').and(:author, in: %w( Denis Steve Bill ))
<ddfreyne> Is what I had in mind
<ddfreyne> I prefer #where though
<ddfreyne> "=< 2013-04-15" is ugly IMO
<darix> not sure if they have a better way for that :)
<darix> there might
<ddfreyne> fooitems.where(:published_at, lte: '2013-04-15')
<ddfreyne> lte meaning less than or equal
<ddfreyne> '<=': '2013-04-15'
<ddfreyne> '<=': Date.parse('2013-04-15')
<darix> do you read that as { :published_at => { :lte => '2013-04-05' }} ?
<darix> or
<darix> :published_at, { :lte => '2013-04-05' }
<ddfreyne> The latter would reslut in a nicer syntax. The hash would only contain a single key, ever, though
<stbuehler> hehe, create another DSL and do @items.query { published_at :lte => '2013-04-05' }
<guardian> ddfreyne: https://github.com/nanoc/nanoc/pull/251#issuecomment-15692579 are you still waiting for a test from my part btw? you told me it would be complicated to test and I still don't know where to start to provide nanoc tests
<ddfreyne> @items.query { published_at <= '2013-04-05' } <- this could work, but too magic fo rmy tastes
<ddfreyne> guardian: ah yeah, I havne't looked at that yet... I'll do it
<darix> ddfreyne: well the only magic you really need is casting the query parameter to the type of the field that you are querying
<darix> and for readability .... i would rather write:
<darix> items.query { published_at <= '2013-04-05' }
<darix> than
<darix> items.query { published_at <= Date.parse('2013-04-05') }
<guardian> ddfreyne: ok thx
<ddfreyne> darix: Yeah, but I imagine it wouldn't be that easy to figure out the type of the field
<darix> one of the things i was missing when I started thinking about hidden galleries .... that I would like to be able to subclass Nanoc::Item ... for the hidden/public galleries and then store like common queries as scope as rails has
<darix> e.g. public galleries list not returning the hidden ones
<ddfreyne> darix: Why would you need to subclass Nanoc::Item for that?
<darix> because i need to do @items.select {|e| e[:hidden].nil? } in more than one place?
<darix> i could also monkey patch things into nanoc::item to have
<darix> @items.public
<darix> @items.hidden
<darix> but not sure that would be nice :)
<darix> nanoc::itemarray for the collection of course
<ddfreyne> darix: one of the ideas I have for nanoc 4.0 is to provide wrappers around Nanoc::Item (say, Nanoc::UI::Item) which behave as actual items but can be customised and extended easily
<ddfreyne> That way, the "core" of nanoc is still protected
<darix> ddfreyne: what about "class: HiddenGallery" and nanoc would instanciate that when reading in the file?
<darix> in worst case I could use the !ruby/object:<classname> syntax :)
<ddfreyne> darix: metadata is pretty much ignored entirely (used as-is) by nanoc core, and giving special meaning to some attributes is something I would like to avoid
<darix> ok
<darix> hmm
<ddfreyne> Being able to define different classes is an interesting idea though... but I am not sure how to handle that.
<darix> routing would be an option
<darix> or we really create some kind of "model" files with a fallback to nanoc::item if nothing specified
jadd_ has joined #nanoc
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
jadd_ has quit [Ping timeout: 248 seconds]
pavelkunc has quit [Read error: Connection reset by peer]
yogsototh has joined #nanoc
jadd_ has joined #nanoc
kitallis has quit [Ping timeout: 245 seconds]
kitallis has joined #nanoc
jadd_ has quit [Ping timeout: 276 seconds]
yogsototh1 has joined #nanoc
yogsototh has quit [Ping timeout: 246 seconds]
jimjimovich has joined #nanoc
<jimjimovich> anyone know how to get nanoc watch working on Ubuntu 12.04? I included "listen" in my Gemflie, but now both nanoc watch and nanoc aco do not see any changes.
<guardian> try adding gem 'rb-inotify', '~> 0.9' in your gemfile
<jimjimovich> guardian: it actually works if I take that line out (I had entered it because listen gives a warning saying to add it)
<guardian> then maybe gem pristine rb-inotify
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 260 seconds]
jimjimovich has quit [Quit: Leaving.]
Rym has quit [Quit: Rym]
jadd_ has joined #nanoc
rolfb has quit [Quit: Leaving...]
jadd_ has quit [Ping timeout: 256 seconds]
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Rym has joined #nanoc
rolfb has joined #nanoc
jadd_ has joined #nanoc
rolfb has quit [Quit: Linkinus - http://linkinus.com]
jadd_ has quit [Quit: Leaving...]
jadd_ has joined #nanoc
jadd_ has quit [Quit: Leaving...]
jadd_ has joined #nanoc
jadd_ has quit [Read error: Connection reset by peer]
jadd_ has joined #nanoc
jadd_ has quit [Quit: Leaving...]
<guardian> I remember seeing nanoc sites sources on github
<guardian> with something to deal with a file for google
<guardian> but can't remember the purpose
<guardian> was it for analytics?
pavelkunc has joined #nanoc
<bobthecow> what are you talking about guardian?
<ddfreyne> guardian: Probably to verify site ownership for Google Analytics
<bobthecow> oh, yeah. those are a thing :)
<guardian> ok analytics
<guardian> I just confimed ownership with webmaster tools
<guardian> you upload a file, you click verify, done
<guardian> and it seems it's a one shot process
<guardian> I don't think I need to keep the file on the server then
<guardian> once my google account records I own that domain
<ddfreyne> Yeah, maybe not
<bobthecow> some services require it to stay there, some don't
<bobthecow> i figure it never hurts.
<bobthecow> i split up my rules files into chunks, and i've got one called rules/verification.rb ... it's currently got four of those in it.
<guardian> damn I'm a bit disappointed nobody seems to have interest in my tmux mazimize pane hack, found it handy though :)
<guardian> KISS :)
<bobthecow> if i used tmux i'd be all over it :P
<guardian> I use tmux alot. and I'm totally fond of my ssh auto rebound + autossh + tmux
<guardian> I close laptop lid at work, commute back home, open it again and every terminal is still there
<guardian> no interruption
<bobthecow> i do almost everything locally these days, so i do the same thing :P
<ddfreyne> I don’t use tmux
<ddfreyne> I use screen, but only really basically
bghost has quit [Quit: leaving]
rolfb has joined #nanoc
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
<darix> guardian: not sure how well eu data privacy rules and GA work together. JFYI
<guardian> i don't use ga
<guardian> just wanted to give webmaster tools a try
<guardian> but google didn't even crawl robots.txt yet...
jadd_ has joined #nanoc
pavelkunc has quit [Quit: Leaving.]
<bobthecow> darix: aren't the cookie laws in the process of being neutered right now anyway?
<darix> bobthecow: why would they be? they are useful imho
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<bobthecow> 1. it doesn't actually keep you from storing information about users, it just limits a specific implementation of storing users.
<bobthecow> 2. it throws babies out with bathwater, making it harder to do legitimate things with cookies, while not prohibiting the kind of tracking it's actually intended to prohibit.
pavelkunc has joined #nanoc
<bobthecow> as far as i understand, the cookie laws only prohibit the first bullet on that list.
<bobthecow> and even if *all* of those were prohibited, you can get enough of a fingerprint from a user's user agent + installed plugins + screen size to get an almost-unique identifier for everyone on the internet without storing anything on the user's computer at all. then you use that to key storage on the server side.
jugglinmike has quit [Quit: Leaving.]
<darix> bobthecow: well all that you need is a dialog where an user can agree with cookie usage
<bobthecow> what i'm saying is you don't even need to do that.
<bobthecow> because the laws just forbid a single implementation of user tracking.
<darix> well yeah i hope they add all the other things soon
<bobthecow> forbidding rgb values stored in the pixels of force-cached png images read out using the HTML5 Canvas api?
<bobthecow> so if that's forbidden, what about the next crazy hack?
<bobthecow> imo this is something much better handled at the browser level, not the website level.
<bobthecow> if browsers had an integral panel, like the one when you install a chrome plugin or auth a facebook connected app, it would empower users, let them *actually enforce their preferences* and save all sorts of effort on the part of webdevs.
<bobthecow> Maybe add a cookie manifest to your site, like the appcache manifest, saying what cookies you set and why. Then the browser can say "example.com wants to use X, Y and Z for the following purposes:"
<bobthecow> until then, it's all like the stupid IE P3P headers, where everyone just copypastes the one header string that actually works and prevents IE from spitting out stupid warnings.
<darix> bobthecow: just disallow 3rd party user tracking no matter which technique
<bobthecow> that's not viable though.
<bobthecow> you realize most of the internet is free because of ads, right?
<darix> you do realize that the amount of user tracking is far beyond what is healthy?
jugglinmike has joined #nanoc
pavelkunc has quit [Quit: Leaving.]
pavelkunc has joined #nanoc
pavelkunc has quit [Ping timeout: 252 seconds]
jugglinmike has quit [Quit: Leaving.]
yogsototh1 has quit [Remote host closed the connection]
bghost has quit [Read error: Connection reset by peer]
bghost has joined #nanoc
bghost has joined #nanoc
<Rym> bobthecow: 'you realise _currently_ most of the internet is free because of ads, right?' FTFY :)
<bobthecow> Rym: and will remain that way as long as it's viable.
<bobthecow> just something to keep in mind when decreasing the efficiency of advertising targeting.
<darix> bobthecow: I would rather pay for services than getting tracked all the time
<bobthecow> you're a minority.
<bobthecow> i would rather pay for services too.
<bobthecow> but most people wouldn't.
<darix> bobthecow: the problem is ... most people dont think about "how they pay"
<bobthecow> again, i agree.
<darix> imagine all the facebook lemmings would actually understand facebooks business model
<Rym> bobthecow: As long as it's viable yes :) But costs are becoming less and less, p2p will be common in the browser in the next year or so, costs will nosedive, theres going to be a lot of 'like X but without ads' kinda sites popping up to fill a gap, having ads/mining users is going to hurt a lot of businesses…. *he says wishfully*
<Rym> but yes, currently yes, let's dream a better future though ;)
jadd_ has quit [Quit: Leaving...]