ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
_whitelogger has joined #ruby-lang
_whitelogger0 has joined #ruby-lang
_whitelogger0 has joined #ruby-lang
VladGh has joined #ruby-lang
dfr|lghtninghall has joined #ruby-lang
sj26 has joined #ruby-lang
<avdi> apeiros_: rdiscount is nice, but I believe the GitHub folks have an even better one now
<Mon_Ouie> I like Kramdown
mistym has joined #ruby-lang
Pip has joined #ruby-lang
Pip has joined #ruby-lang
PhilCK has joined #ruby-lang
<canton7> I like the ability to create your own parser which Redcarpet gives you
Karmaon has joined #ruby-lang
<apeiros_> now I've 3 people giving 3 different libs :)
<canton7> am I correct in thinking that github use rdiscount?
francisfish has joined #ruby-lang
<canton7> ah, no, redcarpet still
<apeiros_> time for MultiMarkdown?
francisfish has joined #ruby-lang
<apeiros_> great
<andrewvos> Hasn't this conversation been going on for days? Why no rdiscount?
<andrewvos> Just use it, and move on to your next yak shaving mission.
<andrewvos> ruby-lang: ^
<canton7> I dunno -- first time I've come across it has been now
fukushima has joined #ruby-lang
<apeiros_> andrewvos: not by me
<apeiros_> btw., I'm still looking for input on https://github.com/apeiros/directory_template/
savage- has joined #ruby-lang
andrewhl has joined #ruby-lang
<andrewvos> apeiros_: Some example usages on the readme would be nice. It's not particularly apparent what it would be used for.
<apeiros_> andrewvos: hu? it has? or do you mean the 2 examples are not clear enough?
solars has joined #ruby-lang
<apeiros_> ok, I'll clarify in the readme, that the two examples given are working examples and exist in the gem/github repo
<andrewvos> apeiros_: I did see the examples. I mean that it's not immediately apparent what someone would use the gem for.
<andrewvos> apeiros_: Maybe just a better description is what I mean.
<apeiros_> ok, can you help me with coming up with a clearer description then?
<apeiros_> how about:
<apeiros_> Create directory structures and files from a template, optionally processing paths (variables in the path) and contents (e.g. render ERB templates).
tbuehlmann has joined #ruby-lang
cantonic has joined #ruby-lang
<andrewvos> Yeah sounds a bit better
<andrewvos> Create directory structures from a simple template.
<andrewvos> Generate directory structures is better
<andrewvos> Because the former implies manual process.
<andrewvos> "I immediately want to use this for a sinatra site generator." - Andrew Vos
<andrewvos> hehehe
<telemachus> apeiros_: I like the look of the dir templating project. (I had a real need for that some time back when creating a sort of project kickstarter gem. Ended up doing something very weird, as I recall.)
<andrewvos> I wrote this https://github.com/AndrewVos/tony
<andrewvos> And then promptly never used it again.
<apeiros_> :)
<telemachus> andrewvos: I wrote something called layouter (now gone) to layout _any_ sort of project - and promptly never used _it_ again.
<apeiros_> andrewvos: I use the origin of this all the time
j`ey has joined #ruby-lang
<telemachus> :)
<apeiros_> It was part of gem-new
<j`ey> [[[0, 0], "a"], [[1, 0], "b"], [[2, 2], "c"], [[3, 3], "d"]] I need to turn this into a Hash
<apeiros_> which is a very simple gem plugin, to create gem skeletons
<andrewvos> apeiros_: The origin of what?
<apeiros_> the origin of DirectoryTemplate
<j`ey> but I cant do Hash[*ary.flatten], since flatten is deep
<andrewvos> Oh ok
<j`ey> any ideas?
Manhose has joined #ruby-lang
<telemachus> But the idea is that I would have project templates, and to do _that_ was a pain.
<apeiros_> j`ey: tell us how the hash should look?
<apeiros_> it's not obvious from the array structure…
wallerdev has joined #ruby-lang
<telemachus> are the letters the keys?
<andrewvos> apeiros_: Is there a directory_templates.org?
<seanstickle> j`ey: [ [[0, 0], "a"], [[1, 0], "b"], [[2, 2], "c"], [[3, 3], "d"] ].inject({}) {|a,x| a[x[1]] = x[0]; a }
<apeiros_> andrewvos: no
<telemachus> Github pages makes that easy, if you really want it.
<apeiros_> you mean as a place for other peoples templates?
<andrewvos> `directory_template generate http://directorytemplates.org/templates/sinatra`
<andrewvos> apeiros_: I do
<telemachus> Oh, I thought he meant a project page...never mind
<canton7> j`ey, Hash[ary.first] ?
<telemachus> andrewvos: Wouldn't it need another level though? home/templates/user/sinatra - since not everyone makes the same choices?
<andrewvos> Make it the one directory generator to rule them all.
<telemachus> Or that.
<andrewvos> telemachus: Yeah. It would need options too.
<canton7> j`ey, no, ignore me
fattastic has joined #ruby-lang
<j`ey> seanstickle: eek
<andrewvos> `directory_template generate sinata --mongo --coffee-script
<andrewvos> `
<j`ey> apeiros_: {[0,0] => "a" etc
<apeiros_> andrewvos: ooh, nice idea. you mean use an url as template source? nifty
<apeiros_> j`ey: just Hash[ary] then
<apeiros_> no *, no flatten
<andrewvos> apeiros_: Well yeah, or just do a `directory_template update` to download newest templats.
<telemachus> agreed
<j`ey> oh
<telemachus> on the nice idea of a templates url
nofxxx has joined #ruby-lang
<apeiros_> andrewvos: I see. that's what gem-new does.
<j`ey> apeiros_: Im silly :D
<telemachus> is an array a good candidate for a Hash key?
<andrewvos> apeiros_: Cool, but I want it to generate *everything*
<apeiros_> andrewvos: ok, I think downloading templates is beyond the scope of the lib
<andrewvos> hehe
<apeiros_> but using url as templates sounds like a nice idea
<apeiros_> or also, using git repos as templates
<apeiros_> I'll add that to the todo
* apeiros_ away for a couple of minutes…
<andrewvos> Yeah more likely git repos.
<andrewvos> directory_template-sinatra <- if that's a repo then all the files are the template for example.
<andrewvos> Hmm just use the entire repo and clone it because that's easier than crawling urls?
workmad3 has joined #ruby-lang
<andrewvos> apeiros_: If you make people prefix their templates with "directory_template" or something then you can do a search in github as part of the command line.
<j`ey> workmad3: hey!
<canton7> this is starting to sound a bit like monk?
<andrewvos> `directory_template search sinatra`
<andrewvos> Right Glee is over. I get to watch cool things again. Peace
<telemachus> later
<j`ey> andrewvos: you mean, Glee is starting ;)
flebel has joined #ruby-lang
jey` has joined #ruby-lang
<kyrylo> j`ey, jey` hello, friends.
<j`ey> o_O
jey` has quit [#ruby-lang]
<j`ey> aww
<Tasser> now fight to see which is the real one and which the evil twin.
<j`ey> Well, obviously I'm the real one, since Im still here :D
<kyrylo> But jey` is still *there*.
<j`ey> damn :<
<Tasser> and then let's kill the survivor because he's the evil twin ;-)
publicvoid_ has joined #ruby-lang
workmad3_ has joined #ruby-lang
wallerdev has joined #ruby-lang
slyphon has joined #ruby-lang
boo11 has joined #ruby-lang
sholden has joined #ruby-lang
A124 has joined #ruby-lang
fgomez has joined #ruby-lang
macmartine has joined #ruby-lang
tenderlove has joined #ruby-lang
rippa has joined #ruby-lang
KillerFox has joined #ruby-lang
Radium has joined #ruby-lang
burgestrand has joined #ruby-lang
Manhose_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
jaimef has joined #ruby-lang
roha has joined #ruby-lang
Manhose__ has joined #ruby-lang
savage- has joined #ruby-lang
mistym has joined #ruby-lang
dv310p3r has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
Boohbah has joined #ruby-lang
fayimora has joined #ruby-lang
boo12 has joined #ruby-lang
diegoviola has joined #ruby-lang
perryh_away has joined #ruby-lang
kiddorails has joined #ruby-lang
igotnolegs has joined #ruby-lang
olesu has joined #ruby-lang
<andrewvos> j`ey: I would rather cut myself than watch Glee.
Sonja has joined #ruby-lang
andrewhl has joined #ruby-lang
<erikh> +1
srbaker has joined #ruby-lang
dejongge has joined #ruby-lang
mikeric has joined #ruby-lang
tekin has joined #ruby-lang
Sonja has quit ["Konversation terminated!"]
workmad3_ has joined #ruby-lang
burgestrand has joined #ruby-lang
andrewvos has joined #ruby-lang
travisjeffery has joined #ruby-lang
echiu has joined #ruby-lang
indeterminate has joined #ruby-lang
dv310p3r has joined #ruby-lang
havenn has joined #ruby-lang
erikh has joined #ruby-lang
rolfb has joined #ruby-lang
erikh has joined #ruby-lang
<_Setsuna_> manveru, FYI Netbeans 7.1.1 which finally also support Ruby provides inherited methods completion too :p
<Mon_Ouie> That's not really the point. I doubt it can accurately guess the class of the object an expression evaluates to in that many cases.
andrewvos has joined #ruby-lang
andrewvos has joined #ruby-lang
<canton7> ooh, have they finally put ruby support back in?
<canton7> I got bored and moved away anyway
<_Setsuna_> canton7, here is a workaround for 7.1.1 ( http://blog.enebo.com/2012/01/workaround-for-ruby-support-on-netbeans.html )
<canton7> arighty, ta
<_Setsuna_> I tried Ruby's Editors/IDE all day long, and fact is Netbeans just rocks them all :)
<_Setsuna_> best IDE for Java, PHP and Ruby too :p
<canton7> if you haven't tried it yet, give Sublime Text 2 a shot
<_Setsuna_> Netbeans is free :)
<canton7> the occasional nag screen is worth it imo
fgomez has joined #ruby-lang
<TTilus> if i would be an ide guy, i think i'd go with netbeans
<canton7> yeah, I used it for a long time, and it was pretty godo
<canton7> *goosd
<canton7> argh, you get it
erikh has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
srbaker has joined #ruby-lang
mistym has joined #ruby-lang
sei has joined #ruby-lang
fayimora has joined #ruby-lang
<andrewvos> How long till new GoT?
gsav_ has joined #ruby-lang
<foca> andrewvos: 5 hours, 11 minutes
lsegal has joined #ruby-lang
<andrewvos> foca: I WILL BE ASLEEP BY THEN! :(
boo12 has quit [#ruby-lang]
<foca> coffee, mate
<foca> or an alarm clock :p
<andrewvos> I could take off work tomorrow
<foca> hahaha, ok, that might be a bit extreme
<andrewvos> heh
<foca> I mean, it's a good show, but taking off Mondays…
<foca> …well, actually, fuck Mondays
<andrewvos> Indeed
toloykhan has joined #ruby-lang
justinmcp has joined #ruby-lang
kiddorails has joined #ruby-lang
VegetableSpoon has joined #ruby-lang
<rue> Which markdown tool has the best command-line program? Any winners?
<erikh> markdown.pl ?
<erikh> isn't that the original?
<canton7> apparently that has a ton of edge cases
<manveru> erikh: it is
jondot_ has joined #ruby-lang
dejongge has joined #ruby-lang
mikeric has joined #ruby-lang
kvirani has joined #ruby-lang
Watcher7 has joined #ruby-lang
Zolrath has joined #ruby-lang
boo12 has joined #ruby-lang
jarred has joined #ruby-lang
boo1 has joined #ruby-lang
<boo1> I have 2 hashes a = {:k => [1, 2]} amd b = [:k => [3,4]], how can I get c = {:k => [1, 2, 3, 4]} ?
<Defusal> my ruby application is definitely a lot slower when using 8GB ram
<Defusal> i really need to find the memory leak :(
francisfish has joined #ruby-lang
<zenspider> erikh: best?
headius has joined #ruby-lang
bryancp has joined #ruby-lang
benanne has joined #ruby-lang
<macmartine> How do I take a time '2012-05-03 07:45:00 UTC' and get the exact same time but with a new offset such as '2012-05-03 07:45:00 -0700' ?
<zenspider> arbitrary offset? or your current offset?
<macmartine> an offset from a tzinfo object
<zenspider> that's kinda a bitch
<macmartine> i've discovered that
<zenspider> afaik, and I could be wrong, you can set ENV['TZ'] and use #local... however... I've not bothered looking to see if there are gems to help with this
<macmartine> So, I'm creating a time that's in UTC. I push that time to Google Calendar, but the time is then converted to the timezone of the calendar. But I want it the display as the exact time that was set in utc, if that makes sense.
<macmartine> I can get the timezone of the calendar beforehand.
kvirani has joined #ruby-lang
boo1 has quit [#ruby-lang]
<zenspider> no, that doesn't make sense. does google calendar actually convert it? or does in munge it?
<virunga> boo1: if the values are only arrays h1.each_key {|x| h1[k] += h2[k] }
<macmartine> well, it displays the time in the timezone of the calendar. But if I send it 2pm I want it to display in the calendar as 2pm
<zenspider> so YOU want to munge it to be the raw value of utc
<zenspider> that really doesn't make sense... why would you want to do that?
<macmartine> Because if I send it 2pm I want it to display in the calendar as 2pm
<zenspider> so I have a calendar event that is 00:00 UTC it will display (properly) as 16:00 PST here (pacific) and you want it to read as 00:00 PST
<zenspider> that's heresy
<macmartine> User says 'make an appointment at 2pm'. My server then makes a time object for 2pm but in UTC b/c that the timezone of the server. When I send it to google calendar it displays in the timezone of the calendar, so it's converted and no longer shows 2pm.
<macmartine> So I need a Time object that is 2pm in whatever timezone their calendar is in
<zenspider> so the easiest way to do that is to look up their GMT offset BEFORE you make the time object and set ENV['TZ']
mistym has joined #ruby-lang
mistym has joined #ruby-lang
<zenspider> I gotta run
<zenspider> good luck
<macmartine> k, thanks
workmad3 has joined #ruby-lang
krz has joined #ruby-lang
dv310p3r has joined #ruby-lang
postmodern has joined #ruby-lang
thorncp has joined #ruby-lang
slaytanic has joined #ruby-lang
brownies has joined #ruby-lang
brownies has joined #ruby-lang
brownies has joined #ruby-lang
petercooper has joined #ruby-lang
mistym has joined #ruby-lang
igotnolegs has joined #ruby-lang
kvirani has joined #ruby-lang
savage- has joined #ruby-lang
Watcher7 has joined #ruby-lang
kvirani has joined #ruby-lang
roha has joined #ruby-lang
indeterminate has joined #ruby-lang
mistym has joined #ruby-lang
mikeric has joined #ruby-lang
headius has joined #ruby-lang
<postmodern> drbrain, hey does rdoc support markdown syntax now?
fayimora has joined #ruby-lang
dfr|lghtninghall has joined #ruby-lang
urbanmonk has joined #ruby-lang
tonesfrommars has joined #ruby-lang
gregf has joined #ruby-lang
Mchl has joined #ruby-lang
mistym has joined #ruby-lang
dreieins has joined #ruby-lang
roha has joined #ruby-lang
j`ey has quit [#ruby-lang]
codewrangler has joined #ruby-lang
elight has joined #ruby-lang
dreieins has joined #ruby-lang
srbartlett has joined #ruby-lang
imajes has joined #ruby-lang
savage- has joined #ruby-lang
<oddmunds> :( rmagick gem won't install with the (i guess) new, imagemagick
dejongge1 has joined #ruby-lang
Indian has joined #ruby-lang
mistym has joined #ruby-lang
Manhose has joined #ruby-lang
digestives has joined #ruby-lang
igotnolegs has joined #ruby-lang
<Cope> if I require something, how do I find out where it came from on the machine?
<Cope> eg require 'uri'
<jorgenpt> Cope: I don't know if there's a direct way, but you can look at $LOAD_PATH
<jorgenpt> Cope: Search through $LOAD_PATH for "#{module}.rb"
<jorgenpt> (i.e. for the first directory that contains it)
<postmodern> also $LOADED_FEATURES
<Cope> I'm trying to work out why i have a machine on which require 'uri' fails
<Cope> i thought uri was standard library
<Cope> so if it's not there, i'm wondering where it is on other systems which do work
<postmodern> Cope, do you have a backtrace?
<jorgenpt> Cope: $LOADED_FEATURES.select {|f| f.end_with?('/uri.rb') }
<postmodern> Cope, or is it just returning false?
<Cope> just false
<postmodern> Cope, then it's already required
<jorgenpt> Or better, $LOADED_FEATURES.select {|f| File.basename(f) == 'uri.rb' }
<postmodern> Cope, to check for require failures, simply begin ... rescue LoadError => e; ... end
<Cope> irb(main):001:0> URI
<Cope> NameError: uninitialized constant Object::URI
spuk has joined #ruby-lang
<postmodern> Cope, wow that's an odd one