ddfreyne changed the topic of #nanoc to: 3.6.4 (may 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
jugglinmike has quit [Quit: Leaving.]
pepijndevos has left #nanoc ["Leaving"]
yogsototh has joined #nanoc
gkarekinian has quit [Ping timeout: 240 seconds]
gkarekinian has joined #nanoc
yogsototh1 has joined #nanoc
yogsototh has quit [Ping timeout: 240 seconds]
VitamineD has quit [Quit: VitamineD]
vivien_ has joined #nanoc
<vivien_> Bonjour
<vivien_> Hello ?
<darix> vivien_: just ask your question and wait
<vivien_> ok
VitamineD has joined #nanoc
<vivien_> I want to have a subfolder for my posts in my content folder, but the posts have to be in the root of the output folder. Is it possible ?
<darix> yes via Routes file
<vivien_> I tried but failed, output always reproduce the folder structure from content folder
<vivien_> if I have "content/blog/my-post.md", I get "output/blog/my-post/index.html" instead of "output/my-post/index.html"
<darix> show your routes file
<vivien_> ok
<darix> vivien_: not dccing to me
<darix> pastie.org
<vivien_> ok sorry :)
<darix> item.identifier.chop is probably the whole path
<darix> minus extension
<darix> might have to fiddle with basename or so there
<vivien_> what is basename ?
<darix> File.basename
<darix> a ruby function
<vivien_> ok. Sorry I'm reaaly new to Ruby
<darix> '/' + File.basename (item.identifier.chop) + '.' + item[:extension]
<darix> if that just returns index for everything
<darix> some playing with dirname + basename
<vivien_> compilation crash
<vivien_> SyntaxError: ./Rules:57: syntax error, unexpected ( arg, expecting keyword_end
<vivien_> '/' + File.basename (item.identifier.chop) + '.html'
<darix> uhm
<darix> weird
<darix> ddfreyne: isnt ruby code allowed in rules?
<vivien_> it's ok, crash was due to a space between basename and (
<darix> that would be weird
<darix> it should be alllowed
<vivien_> thanks a lot, it worked
<vivien_> I put my posts in a folder for convenience, but since my blog is in a "blog" category of my website, I didn't want the posts to be in another "blog" folder
<vivien_> thanks again
<darix> happy blogging
<vivien_> not done yet but soon :)
<darix> keep us posted
VitamineD has quit [Ping timeout: 245 seconds]
VitamineD has joined #nanoc
jugglinmike has joined #nanoc
tantalum has joined #nanoc
tantalum has left #nanoc [#nanoc]
tantalum has joined #nanoc
<ddfreyne> Yeah, function calls should not have a space between the name and the (
<darix> ddfreyne: why? plain ruby allows it
<stbuehler> whitespace between tokens shouldn't matter in any sane language
<darix> stbuehler: except for python. ;)
<darix> *scnr*
<stbuehler> except in that special case regarding indentation, ok :)
<stbuehler> haskell uses it too (although i wouldn't consider haskells indent rules sane)
<ddfreyne> !ruby def x(s) ; s ; end ; '/' + x ('aaa') + '/'
<number-six> #<SyntaxError: <script>:2: syntax error, unexpected tLPAREN_ARG
<ddfreyne> Plain Ruby also fails
<darix> ambigious syntax maybe cause of the "+"?
<stbuehler> unexpected token sounds more like "we don't want it"
<ddfreyne> !ruby def x(s) ; s ; end ; '/' + x ('aaa')
<number-six> #<SyntaxError: <script>:2: syntax error, unexpected tLPAREN_ARG
<ddfreyne> !ruby def x(s) ; s ; end ; x ('aaa')
<number-six> => "aaa"
<ddfreyne> Yeah, the + throws it off for some reason
<darix> it smells to me like they parse it as
<ddfreyne> ('/' + x) ('aaa')
<darix> ('/' + x)
<darix> yes
<stbuehler> then you wouldn't get a syntax error
<stbuehler> it'd be a runtime type error, '/' + x not a function/callable object
<darix> let's ask ruby-lang
<stbuehler> !ruby def x(s) ; s ; end ; '/' + x('aaa') + '/'
<number-six> => "/aaa/"
<stbuehler> (just had to check^^)
<ddfreyne> stbuehler: The grammar still needs to accomodate for it
<ddfreyne> If the grammar says function/method calls should be LITERAL LEFTPAREN args RIGHTPAREN then it won't work
<stbuehler> if <'/' + x ('aaa')> parses as <('/' + x)('aaa')>, it would PARSE => no syntax error
<stbuehler> hm
<stbuehler> i get what you mean, lk
<stbuehler> k
<stbuehler> !ruby def x(s) ; s ; end ; ('/' + x)('aaa')
<number-six> #<Racc::ParseError:
<stbuehler> lol :D
<stbuehler> aaah
<stbuehler> !ruby f = 'a'; f(0)
<number-six> #<NoMethodError: undefined method `f' for main:Object>
<stbuehler> separate namespace for variables and methods? didn't know that
<ddfreyne> No
<ddfreyne> !ruby def x ; 1 ; end ; x
<number-six> => 1
<ddfreyne> !ruby x = 2 ; x
<number-six> => 2
<darix> !ruby def x ; 1 ; end ; x ; x = 2 ; x ; x()
<number-six> => 1
<darix> !ruby def x ; 1 ; end ; x ; x = 2 ; x+ x()
<number-six> => 3
<ddfreyne> wtf.
<darix> why?
<ddfreyne> OK, interesting. I never knew that, oddly
<stbuehler> i hereby define ruby as "insane" (yes, that already follows from my statement about whitespace) :)
<darix> stbuehler: the ruby syntax has lots of fun points
<darix> like
<darix> h(){}
<darix> h {}
<darix> h({})
<VitamineD> !ruby x=1, y=2
<number-six> => [1, 2]
<VitamineD> heh :]
pepijndevos has joined #nanoc
pepijndevos has left #nanoc ["Textual IRC Client: www.textualapp.com"]
VitamineD has quit [Ping timeout: 248 seconds]
<bobthecow> !ruby loop { fork }
<number-six> #<NameError: undefined local variable or method `fork' for main:Object>
<bobthecow> !ruby def _; loop { fork { _ } }; end; _
<bobthecow> ddfreyne: if it actually worked and i just killed number-six, sorry :-/
<bobthecow> !ruby 1 + 1
<number-six> => 2
<bobthecow> huh.
<ddfreyne> bobthecow: It runs in a sandbox
<ddfreyne> it uses tryruby iirc
<darix> bobthecow: it didnt leave the channel though
<ddfreyne> darix: "I'll just stay here quietly and cry"
<darix> hehe
VitamineD has joined #nanoc
tantalum has left #nanoc [#nanoc]
yogsototh1 has quit [Remote host closed the connection]
vivien_ has quit [Quit: vivien_]
_br_ has quit [Ping timeout: 260 seconds]
_br_ has joined #nanoc
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc