<    March 2010    >
Su Mo Tu We Th Fr Sa
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
00:11 ibacchus joined
00:30 ngw joined
01:00 postmodern joined
01:02 harryv joined
01:02 sr joined
01:08 russm left
01:21 bradgonesurfing joined
01:42 RichGuk joined
01:51 khaase joined
01:54 ph^_ joined
02:05 crohr joined
02:07 ph^_ joined
02:29 mitkok joined
02:58 RichGuk joined
03:01 khaase_ joined
03:02 huma left
03:08 phiggy left
03:12 yawniek joined
03:23 hipertracker joined
03:53 <Tass`> is there a way to to 'take file X and let it behave as it would be here' in HAML?
03:54 anathematic joined
03:54 <Tass`> partial only? :-/
04:04 <harryv> = haml :foo, :layout => false
04:04 <harryv> the `haml` method in sinatra just renders a template and returns it as a string. no magic.
04:08 Tuplanolla joined
04:15 fbru02 joined
04:23 wadner joined
04:24 <wadner> hi, anyone deploying on passenger + nginx?
04:30 fbru02 joined
04:32 pdelgallego joined
04:32 lalala joined
04:37 <wadner> my files in the public folder works - but the ones inside the main.rb doesn't
04:37 <wadner> so close
04:46 crohr joined
04:56 <Tuplanolla> I've now spent 20 hours trying to print out an unordered list and I'm sick of it.
04:57 <Tuplanolla> Would someone mind giving a hand?
04:57 <namelessjon> Tuplanolla: Pastie what you have so far?
04:58 <Tuplanolla> I've erased it a few times, but here's the basic structure...
04:58 <Tuplanolla> http://pastebin.com/YXzbam3z
04:58 <Tuplanolla> http://pastebin.com/xQQmTtiL
04:58 <Tuplanolla> It's a simple problem I should be able to solve, but apparently can't. :<
05:01 pdelgallego joined
05:02 <Tuplanolla> (It has to be solved that way, because the actual A is not just an array of arrays.)
05:02 <cypher23> not just?
05:03 <cypher23> what else can be in there?
05:05 <Tuplanolla> The values can point to files.
05:06 <Tuplanolla> And it uses the .sort function, so their order is important.
05:06 <cypher23> ok, so instead of strings, they can also be File objects
05:06 mitkok joined
05:07 <Tuplanolla> No, I mean... the actual problem is what I pasted.
05:08 <Tuplanolla> The solution just has to follow the same idea, because otherwise it would mess up the rest.
05:13 anathematic joined
05:13 futurechimp joined
05:23 qwerxy joined
05:35 khaase joined
05:36 <cypher23> Tuplanolla, what I'd do is transform the array into an actual tree (using hashes)
05:36 <cypher23> (And use an OrderedHash if you're using Ruby 1.8)
05:37 <Tuplanolla> I knew you'd say that...
05:40 <cypher23> you did? :)
05:40 <cypher23> To be honest, I've been trying to come up with an algorithm to convert your array of arrays into a tree, but haven't been quite successful
05:40 <Tuplanolla> It's out of question in this case, however, I have a solution to that.
05:45 <Tuplanolla> Here: http://pastebin.com/c3Buc6jC
05:52 stepheneb joined
05:54 erthad joined
05:56 <wadner> what other files should be in the folder when you deploy in passenger?
05:57 <wadner> config.ru and .gems?
05:57 <wadner> i've got haml and it doesn't load somehow
05:59 <cypher23> have you got haml installed?
05:59 <cypher23> and did you require it?
05:59 <cypher23> also, you may need "require 'rubygems'" at the very top
06:00 <cypher23> (If you're using rubygems, that is)
06:00 <wadner> anyone?
06:02 <wadner> darn thing works fine with shotgun
06:04 <cypher23> wadner, as I said, you might be missing the rubygems require
06:09 <Tuplanolla> Can anyone solve the non-tree problem?
06:10 <cypher23> Tuplanolla, sorry, I'm at work right now
06:13 hipe joined
06:15 <Tuplanolla> Maybe later then... I've spent a week on it, so there's no rush.
06:15 <Tuplanolla> (The project, not the single method.)
06:31 soveran joined
06:59 imajes joined
07:02 Scyllinice joined
07:23 hipe joined
07:32 djanowski joined
07:32 imajes joined
07:42 mjw2 joined
07:42 hipe joined
07:46 mjw2 joined
07:47 stepheneb joined
07:51 mjw2 joined
08:05 Swimming_Bird joined
08:07 joeconyers joined
08:13 kristopher joined
08:13 gma joined
08:15 arnaudsj joined
08:16 arnaudsj left
08:19 erpuds joined
08:20 brainproxy joined
08:21 imajes joined
08:34 tbuehlmann joined
08:35 <* Tuplanolla> just failed at the tree thing for the 7th time.
08:39 <cypher23> you should keep at it. eventually something's gonna work :)
08:40 karmi joined
08:41 <Tuplanolla> After 20 hours I really doubt it.
08:41 <Tuplanolla> I usually figure things out in an instant.
08:42 <Tuplanolla> Frustration just causes more mistakes.
08:48 <cypher23> true. often, sleeping helps me with my problems
08:48 <cypher23> (or taking a shower. but sleeping helps more)
08:50 <Tuplanolla> Doesn't seem to.
08:50 <Tuplanolla> I work in 2...6 hour periods.
08:51 <cypher23> hm.
08:55 foca joined
08:57 foca joined
08:59 <Tuplanolla> I also eat healthy and jog every other day.
08:59 <Tuplanolla> There's no use trying to find excuses.
09:00 markwithout joined
09:02 qrush joined
09:02 quirkey joined
09:12 <Tuplanolla> Sometimes I wish I had studied computer science...
09:17 brainproxy_ joined
09:21 pdelgallego joined
09:21 khaase joined
09:23 stouset joined
09:35 r11t joined
09:36 josephholsten joined
09:41 khaase_ joined
09:43 khaase joined
09:47 erthad joined
09:49 mattly joined
09:54 drev1 joined
09:58 futurechimp joined
10:00 mitkok joined
10:10 <erpuds> i have get '/foo/:bar' and later '/foo/new' .. when hitting "/foo/new" the former template is being returned
10:10 <harryv> move '/foo/new' up to be before '/foo/:bar'
10:10 <erpuds> shouldn't the flow continue to find the match?
10:10 <harryv> routes are added in the order they are defined.
10:11 <harryv> '/foo/:bar' matches '/foo/new', right?
10:15 <cypher23> erpuds, sinatra uses the first route that matches, and as harryv said, they are ordered in the same way as you define them
10:16 <erpuds> yes, for some reason i thought the more specific match would be called - thanks!
10:16 <cypher23> (though you can call `pass' to fall through to the next matching route)
10:20 <erpuds> oh good, thanks!
10:20 <erpuds> i preferred not to reorder them
10:22 <cypher23> uhm. IMO it's cleaner to have the more specific routes first, then the more general ones
10:22 gma joined
10:25 loincloth joined
10:26 <erpuds> yeah i could see how this wouldn't be the best case to use pass
10:26 <khaase> also, you can reorder routes afterwards. it's not much use, but it shows sinatras felxibility.
10:32 <khaase> in related new: how do you guys feel about conditional before/after filters?
10:32 <khaase> like before('foo/*') { ... }
10:33 <cypher23> khaase, I've been thinking about implementing them, but on the other hand, that just feels like something that should be done in a rack middleware
10:33 <cypher23> on the other other hand, if it's something that e.g. uses the database...
10:33 <khaase> cypher23: yeah, exactly
10:34 <khaase> i just gave it a shot
10:34 <khaase> http://github.com/rkh/sinatra/compare/b5057~2...b5057
10:34 <cypher23> ah, so that's what you wanted the patch file for? :)
10:34 <khaase> exactly :)
10:34 <cypher23> it's sufficient if you create a lighthouse ticket w/ a link to your branch & compare view
10:35 <cypher23> I think
10:35 <khaase> ok
10:41 kjs3 joined
10:46 stepheneb joined
10:57 futurechimp joined
10:59 matehat joined
11:00 matehat joined
11:02 mjw2 joined
11:06 hadees joined
11:09 kjs3 joined
11:13 kjs3 joined
11:19 qwerxy joined
11:24 zodiak joined
11:33 pdelgallego joined
11:41 markwithout joined
11:41 <khaase> do i have to send a pull request when i forked sinata.github.com?
11:44 qrush joined
11:44 <Tuplanolla> No, because that's the wrong server.
11:47 icco joined
11:47 codeswing joined
11:51 gma left
11:52 <icco> Hi guys. So I've been following http://www.sinatrarb.com/intro learning the basics of Sinatra. I am trying to use erubis and less though, and the examples provided don't work. I did install the gems, but I am getting a method not found error from sinatra for both erubis and less.
11:52 <icco> Any suggestions?
11:55 khaase_ joined
12:06 <cypher23> icco, what version of sinatra are you using?
12:06 <icco> cypher23, 0.9.6
12:09 RichGuk joined
12:10 has_rb joined
12:12 <cypher23> icco, I think that only works with 1.0
12:12 <icco> ahh lame.
12:13 <icco> The intro should probably mention in it that it is written for 1.0 then...
12:13 <cypher23> though it should be trivial to backport those two from 1.0
12:14 <icco> I may do that, although I was trying to avoid modifying sinatra so I could easily deploy to heroku.
12:15 <icco> Alrighty, I just installed 1.0b and looks like that fixed it, thanks cypher23
12:16 <cypher23> just remember it's still in a beta state
12:16 <cypher23> and we'd love to have feedback/bug reports
12:18 bradgonesurfing joined
12:18 <icco> I'll definitely file any bugs I find.
12:27 joeconyers joined
12:32 pedrobelo joined
12:43 <Tuplanolla> Still at work, cypher23?
12:54 khaase joined
12:59 joeconyers joined
13:00 Swimming_Bird joined
13:10 benlovell joined
13:14 hipe joined
13:15 coderdad joined
13:16 matflores joined
13:18 kjs3 joined
13:23 hadees joined
13:25 hipe joined
13:40 mattly joined
13:41 ujihisa joined
13:41 has_rb_ joined
13:45 joeconyers joined
13:45 mattly_ joined
13:46 coderdad joined
13:47 mattly_ joined
13:50 mattly joined
13:50 cpg joined
13:53 qrush joined
14:04 mjw2 joined
14:07 eddanger joined
14:10 karmi joined
14:17 evan_luck joined
14:22 evan_luck joined
14:27 hadeees joined
14:28 tbuehlmann joined
14:29 stepheneb joined
14:33 ylluminate joined
14:37 joshpeek joined
14:46 fermion joined
14:46 jstad joined
14:51 <Tuplanolla> Still at work, cypher23?
14:57 bphogan joined
15:00 stepheneb joined
15:01 soveran joined
15:05 bmizerany joined
15:09 icco joined
15:13 qrush joined
15:16 future_chimp joined
15:20 ajgenius joined
15:22 <ajgenius> well that was easy. faq ftw. :)
15:23 aaroninfidel joined
15:24 ajgenius left
15:24 imajes joined
15:28 karmi joined
15:40 <Tuplanolla> Would it be too much asked for someone to help me with this problem?
15:40 <Tuplanolla> I've spent over 20 hours on this myself without much progress.
15:40 <Tuplanolla> Most of you could probably solve it in 10 minutes.
15:41 eladmeid_ joined
15:41 <tbuehlmann> pastie spam it
15:41 <tbuehlmann> you may get an answer
15:41 hadees joined
15:42 djanowski joined
15:42 hassox joined
15:44 aaroninfidel_ joined
15:45 <Tuplanolla> http://pastebin.com/Gi7zGYfS
15:46 <johnny> Tuplanolla, never ask to ask..
15:46 <johnny> just ask..
15:46 <johnny> and then describe what your problem is..
15:46 <johnny> nobody is gonna click a link without context..
15:48 <Tuplanolla> It's explained right there.
15:49 <Tuplanolla> I need to print out an array of strings as a tree with that construct and marking terminal nodes.
15:50 <johnny> also.. try #ruby for generic ruby questions
15:50 <johnny> instead of this sinatra specific channel
15:51 <Tuplanolla> It's not just ruby.
15:51 <johnny> and perhaps there is a gem that does what you want
15:51 <johnny> in that it generates a "widget" type thing based on similiar input data
15:51 <johnny> well it's certainly not sinatra related.. as sinatra does so little :)
15:52 <Tuplanolla> I have yet to see a channel that stays on topic.
15:53 <johnny> sure.. doesn' mean you'll get an answer here tho
15:53 <johnny> thus i was suggesting an alternative
15:54 <johnny> if it was busy.. you would certainly be suggested to stay on topic
15:54 <Tuplanolla> I'll go there later...
15:58 qrush joined
16:07 ylluminate joined
16:12 qrush joined
16:22 bmizerany joined
16:23 jacius joined
16:24 kjs3 joined
16:25 jbrennan joined
16:31 fbru02_ joined
16:33 xperience joined
16:38 ph^_ joined
16:41 hipe joined
16:41 ylluminate joined
16:46 stepheneb joined
16:50 loincloth joined
16:53 russm joined
16:54 <Tuplanolla> People at #ruby refuse to help.
17:01 bphogan joined
17:10 postmodern joined
17:24 bphogan joined
17:27 ujihisa joined
17:33 bphogan joined
17:36 johnny left
17:37 johnny joined
17:40 cored joined
17:40 cored joined
17:42 loincloth joined
17:45 markwithout joined
17:56 hadees joined
17:59 hipe joined
18:00 kristopher joined
18:01 kristopher joined
18:24 bphogan joined
18:25 kohei joined
18:36 Swimming_Bird joined
18:49 loincloth joined
18:57 erpuds joined
19:00 hadees joined
19:05 cpg joined
19:07 aaroninfidel_ joined
19:12 alexmchale_ joined
19:15 pdelgallego joined
19:16 kristopher joined
19:20 greg8si joined
19:22 ngw joined
19:25 kristopher joined
19:26 <zodiak> so, did anyone else think that Tuplanolla's question was either (a) homework or (b) job interview test ?
19:27 bphogan joined
19:31 dark joined
19:31 kristopher_ joined
19:33 markwithout joined
19:49 alexmchale_ joined
20:11 aaroninfidel_ joined
20:11 aaroninfidel_ left
20:15 loinclot_ joined
20:16 imajes joined
20:24 GitHub180 joined
20:24 <GitHub180> sinatra: 07master 03Ryan Tomayko * e1638a4 (2 files in 1 dirs): skip haml / sass tests when they fail to load due to stupid bullshit ... - http://bit.ly/9JamMQ
20:24 GitHub180 left
20:26 has_rb joined
20:32 alexmchale_ joined
20:40 zodiak joined
20:41 quirkey joined
20:41 dark joined
20:48 loincloth joined
20:50 imajes joined
20:54 loincloth joined
20:58 maddox__ joined
21:04 loinclot_ joined
21:08 jbrennan joined
21:19 alexmchale_ joined
21:21 jrhicks joined
21:22 jrhicks left
21:26 kematzy joined
21:34 <kematzy> Q: What's the syntax for making a new Tilt extension? ie: I want to have a rjs(...) method, that loads 'views/app.js.erb'
21:34 jstad joined
21:34 loincloth joined
21:34 <kematzy> btw, that's inside of a Sinatra app.
21:37 has_rb joined
21:38 alexmchale_ joined
21:41 erpuds joined
22:03 hassox joined
22:08 mattly joined
22:12 shilin left
22:18 eddanger joined
22:21 quirkey joined
22:23 hipe joined
22:38 lala joined
22:50 loinclot_ joined
22:57 kjs3 joined
23:02 hipe joined
23:07 hipe joined
23:12 hipe joined
23:13 kjs3 joined
23:13 jbrennan left
23:20 hipe joined
23:23 victori joined
23:40 ujihisa joined
23:41 stepheneb joined
23:46 loincloth joined