00:33
jugglinmike has quit [Quit: Leaving.]
07:26
pepijndevos has left #nanoc ["Leaving"]
07:57
yogsototh has joined #nanoc
07:59
gkarekinian has quit [Ping timeout: 240 seconds]
08:02
gkarekinian has joined #nanoc
08:50
yogsototh1 has joined #nanoc
08:51
yogsototh has quit [Ping timeout: 240 seconds]
09:45
VitamineD has quit [Quit: VitamineD]
10:08
vivien_ has joined #nanoc
10:09
<
darix >
vivien_: just ask your question and wait
10:11
VitamineD has joined #nanoc
10:12
<
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 ?
10:14
<
darix >
yes via Routes file
10:15
<
vivien_ >
I tried but failed, output always reproduce the folder structure from content folder
10:17
<
vivien_ >
if I have "content/blog/my-post.md", I get "output/blog/my-post/index.html" instead of "output/my-post/index.html"
10:17
<
darix >
show your routes file
10:20
<
darix >
vivien_: not dccing to me
10:20
<
vivien_ >
ok sorry :)
10:23
<
darix >
item.identifier.chop is probably the whole path
10:23
<
darix >
minus extension
10:23
<
darix >
might have to fiddle with basename or so there
10:24
<
vivien_ >
what is basename ?
10:24
<
darix >
File.basename
10:24
<
darix >
a ruby function
10:24
<
vivien_ >
ok. Sorry I'm reaaly new to Ruby
10:27
<
darix >
'/' + File.basename (item.identifier.chop) + '.' + item[:extension]
10:27
<
darix >
if that just returns index for everything
10:27
<
darix >
some playing with dirname + basename
10:28
<
vivien_ >
compilation crash
10:29
<
vivien_ >
SyntaxError: ./Rules:57: syntax error, unexpected ( arg, expecting keyword_end
10:29
<
vivien_ >
'/' + File.basename (item.identifier.chop) + '.html'
10:29
<
darix >
ddfreyne: isnt ruby code allowed in rules?
10:31
<
vivien_ >
it's ok, crash was due to a space between basename and (
10:31
<
darix >
that would be weird
10:31
<
darix >
it should be alllowed
10:32
<
vivien_ >
thanks a lot, it worked
10:34
<
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
10:34
<
vivien_ >
thanks again
10:35
<
darix >
happy blogging
10:38
<
vivien_ >
not done yet but soon :)
10:41
<
darix >
keep us posted
10:49
VitamineD has quit [Ping timeout: 245 seconds]
12:45
VitamineD has joined #nanoc
13:05
jugglinmike has joined #nanoc
13:45
tantalum has joined #nanoc
13:54
tantalum has left #nanoc [#nanoc]
13:57
tantalum has joined #nanoc
15:17
<
ddfreyne >
Yeah, function calls should not have a space between the name and the (
15:18
<
darix >
ddfreyne: why? plain ruby allows it
15:19
<
stbuehler >
whitespace between tokens shouldn't matter in any sane language
15:21
<
darix >
stbuehler: except for python. ;)
15:24
<
stbuehler >
except in that special case regarding indentation, ok :)
15:24
<
stbuehler >
haskell uses it too (although i wouldn't consider haskells indent rules sane)
15:24
<
ddfreyne >
!ruby def x(s) ; s ; end ; '/' + x ('aaa') + '/'
15:24
<
number-six >
#<SyntaxError: <script>:2: syntax error, unexpected tLPAREN_ARG
15:25
<
ddfreyne >
Plain Ruby also fails
15:25
<
darix >
ambigious syntax maybe cause of the "+"?
15:26
<
stbuehler >
unexpected token sounds more like "we don't want it"
15:26
<
ddfreyne >
!ruby def x(s) ; s ; end ; '/' + x ('aaa')
15:26
<
number-six >
#<SyntaxError: <script>:2: syntax error, unexpected tLPAREN_ARG
15:26
<
ddfreyne >
!ruby def x(s) ; s ; end ; x ('aaa')
15:26
<
number-six >
=> "aaa"
15:27
<
ddfreyne >
Yeah, the + throws it off for some reason
15:27
<
darix >
it smells to me like they parse it as
15:27
<
ddfreyne >
('/' + x) ('aaa')
15:27
<
stbuehler >
then you wouldn't get a syntax error
15:28
<
stbuehler >
it'd be a runtime type error, '/' + x not a function/callable object
15:28
<
darix >
let's ask ruby-lang
15:28
<
stbuehler >
!ruby def x(s) ; s ; end ; '/' + x('aaa') + '/'
15:28
<
number-six >
=> "/aaa/"
15:28
<
stbuehler >
(just had to check^^)
15:28
<
ddfreyne >
stbuehler: The grammar still needs to accomodate for it
15:29
<
ddfreyne >
If the grammar says function/method calls should be LITERAL LEFTPAREN args RIGHTPAREN then it won't work
15:29
<
stbuehler >
if <'/' + x ('aaa')> parses as <('/' + x)('aaa')>, it would PARSE => no syntax error
15:30
<
stbuehler >
i get what you mean, lk
15:30
<
stbuehler >
!ruby def x(s) ; s ; end ; ('/' + x)('aaa')
15:30
<
number-six >
#<Racc::ParseError:
15:32
<
stbuehler >
!ruby f = 'a'; f(0)
15:32
<
number-six >
#<NoMethodError: undefined method `f' for main:Object>
15:32
<
stbuehler >
separate namespace for variables and methods? didn't know that
15:34
<
ddfreyne >
!ruby def x ; 1 ; end ; x
15:34
<
ddfreyne >
!ruby x = 2 ; x
15:35
<
darix >
!ruby def x ; 1 ; end ; x ; x = 2 ; x ; x()
15:35
<
darix >
!ruby def x ; 1 ; end ; x ; x = 2 ; x+ x()
15:35
<
ddfreyne >
OK, interesting. I never knew that, oddly
15:36
<
stbuehler >
i hereby define ruby as "insane" (yes, that already follows from my statement about whitespace) :)
15:37
<
darix >
stbuehler: the ruby syntax has lots of fun points
15:39
<
VitamineD >
!ruby x=1, y=2
15:39
<
number-six >
=> [1, 2]
16:31
pepijndevos has joined #nanoc
17:42
VitamineD has quit [Ping timeout: 248 seconds]
18:02
<
bobthecow >
!ruby loop { fork }
18:02
<
number-six >
#<NameError: undefined local variable or method `fork' for main:Object>
18:04
<
bobthecow >
!ruby def _; loop { fork { _ } }; end; _
18:04
<
bobthecow >
ddfreyne: if it actually worked and i just killed number-six, sorry :-/
18:09
<
bobthecow >
!ruby 1 + 1
18:12
<
ddfreyne >
bobthecow: It runs in a sandbox
18:12
<
ddfreyne >
it uses tryruby iirc
18:17
<
darix >
bobthecow: it didnt leave the channel though
18:17
<
ddfreyne >
darix: "I'll just stay here quietly and cry"
19:32
VitamineD has joined #nanoc
19:33
tantalum has left #nanoc [#nanoc]
20:00
yogsototh1 has quit [Remote host closed the connection]
21:18
vivien_ has quit [Quit: vivien_]
22:02
_br_ has quit [Ping timeout: 260 seconds]
22:04
_br_ has joined #nanoc
22:15
bghost has joined #nanoc
22:15
bghost has quit [Changing host]
22:15
bghost has joined #nanoc