apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
nari has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
uxp has quit [Ping timeout: 252 seconds]
liluo has joined #ruby
<novochar> how does this work? (5..10).inject {|sum, n| sum + n }
uxp has joined #ruby
<novochar> i get it now
itnomad has quit [Ping timeout: 246 seconds]
<novochar> 5 = sum, 6 = n, 5+6 = 11 = sum, 7 = n, etc.
<seanstickle> Yup
h4mz1d has joined #ruby
itnomad has joined #ruby
artOfWar has quit [Ping timeout: 245 seconds]
<novochar> is (5..10).reduce(1, :*) using this iteration method: reduce(initial, sym) → obj
<novochar> this example definitely confuses me
igotnolegs has joined #ruby
hunglin has joined #ruby
<seanstickle> It's basically (5..10).inject(1) {|product, n| product * n}
<seanstickle> Using "1" as the initial value, and the * method as the means of reduction
<seanstickle> Your earlier example could be recast (5..10).reduce(0, :+)
<novochar> is the .inject(initial) the step?
ianbishop has quit [Quit: Lost terminal]
<novochar> the initial in .inject(initial)
<novochar> that wouldn't make sense with (5..10).reduce(0, :+) though
<seanstickle> It sets the default value of the accumulator, in your example named "sum"
<heftig> the forms without "initial" use the first value as the starting value of the accumulator, and start iterating with the second value
richo has joined #ruby
cherrypeel has quit [Quit: Leaving]
itnomad has quit [Ping timeout: 245 seconds]
<dekz> anyone know of a faster shortcut way of going from base64 -> urlsafe_base64 -> base64 without having to do full encodes and decodes?
vladiim has quit [Quit: vladiim]
ramblex has quit [Quit: ramblex]
jhunter has quit [Ping timeout: 252 seconds]
jxf has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
l2trace99 has joined #ruby
jxf has joined #ruby
jhunter has joined #ruby
liluo has quit [Remote host closed the connection]
vladiim has joined #ruby
itnomad has joined #ruby
kah_ has joined #ruby
<kah_> I have a string encapsulated in brackets and quotes.. if I just wanted the text in the middle how could I do that? ["A"]
l2trace99 has quit [Quit: Leaving]
l2trace99 has joined #ruby
<Spooner_> kah_ : You mean ["A"].first or you mean via a regexp?
josefig has quit [Quit: Computer has gone to sleep.]
itnomad has quit [Quit: Leaving]
keymone_ has joined #ruby
itnomad has joined #ruby
<kah_> anyone?
kah_ has quit [Quit: Leaving]
kah_ has joined #ruby
keymone has quit [Ping timeout: 260 seconds]
keymone_ is now known as keymone
peindt has joined #ruby
niku4i has quit [Remote host closed the connection]
jxf has quit [Read error: Operation timed out]
peindt has quit [Client Quit]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
tiripamwe has quit [Ping timeout: 245 seconds]
<dekz> kah_: you need to specify a little more
<dekz> kah_: does Spooners response answer your question?
jgrevich has quit [Read error: No route to host]
jarred has joined #ruby
<kah_> dekz: I didn't see Spooners response
jgrevich has joined #ruby
Synthead has quit [Read error: Connection reset by peer]
<jarred> Within a class that's inside a module, how do I call methosd from different gems? It assumes that the class is within the same namespace. For example, if the class calling the method is A, the module is B, and the gem is C, then It's running B::A::C, but I just want it to invoke the method on C
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<jarred> (Wow, that grammar was horrible)
hakunin has quit [Read error: Connection reset by peer]
<Spooner_> kah_: I suspect you mean regexp: '["A"]' =~ /\["(\w+)"\]/; $1
hakunin has joined #ruby
igaiga has joined #ruby
<Spooner_> jarred : gems don't have namespaces in that way. They might have modules or classes in them, but there isn't a standard "gem" way to call them. Can you give a better example?
<jarred> Spooner: I'm trying to run RestClient.post inside a class that's within a module. It thinks I'm trying to call ModuleName::ClassName::RestClient, when I just want RestClient
<kah_> Spooner_: I do, I would like to pull all of the alphabet characters from a string
<Spooner_> You just do RestClient.post in that case, jarred.
beilabs has quit [Disconnected by services]
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
skinny_much has joined #ruby
<Spooner_> RestClient is a module in the gem, which contains a method.
beilabs has joined #ruby
beilabs has quit [Disconnected by services]
<jarred> Spooner_: The error is: "uninitialized constant ModuleName::ClassName::RestClient (NameError)"
Zol has quit [Ping timeout: 252 seconds]
beilabs__ has joined #ruby
<Spooner_> kah_ : Well, that would do it, but if you just want alphabet specifically, you can do '["Abcd"]' =~ /\["([A-Za-z]+)"\]/; $1 #=> "Abcd"
<jarred> Spooner_: and I'm calling RestClient like so: "RestClient.post url do ..."
Zol has joined #ruby
<Spooner_> That is because it tries to look in the class for it and can't find it, but it will also have looked in the global namespace and not found it there. That means you probably haven't required the gem?
sepp2k has joined #ruby
<jarred> oh I see. I required RestClient in a parent file
robotmay has quit [Remote host closed the connection]
<Spooner_> That shouldn't be a problem, jarred, as long as it was required before you try to access RestClient module.
iocor has quit [Quit: Computer has gone to sleep.]
sam113101 has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
emmanuelux has quit [Read error: No route to host]
<Spooner_> jarred : Try putting require 'rest_client' just before you use RestClient, just to make sure.
<Spooner_> If that works, then you aren't requiring rest_client before you are trying to use it.
dsa has joined #ruby
cherrypeel has joined #ruby
<kah_> Spooner_: what am I doing wrong here? http://pastie.org/4145769
qos has quit [Quit: Linkinus - http://linkinus.com]
<Spooner_> What, you did mean an array, not a string. Oops! Try: a = ["Abcd"]; a[0]
EzeQL has quit [Ping timeout: 255 seconds]
dr_Poggs has quit [Ping timeout: 240 seconds]
liluo has joined #ruby
alek_b has joined #ruby
drPoggs has joined #ruby
malias has joined #ruby
gtuckerkellogg has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
ZachBeta has quit [Quit: Computer has gone to sleep.]
dsa has quit []
savage- has joined #ruby
apok has quit [Quit: apok]
<dekz> Haha Spooner_!
<dekz> kah_: you have an array there, Spooner thought you meant a string represented array like '["a"]' not an Array construct. You should be able to access the contents using any Array operations, a[0], a.first etc.
chaingun has joined #ruby
<dekz> kah_: That will give you the string element inside the array (at the first position) obviously, but if you want "A" then "B" then "c" individually you can also access the string like an array, something like a[0][0]
<kah_> yeah, I hear you.. I'm trying to fix this error
AndChat| has joined #ruby
BrianJ has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
chaingun has quit [Ping timeout: 240 seconds]
<Spooner_> Oh right, so the value in the db is a string '["A"]'
Synthead has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
<icy`> or '["GOOG"]' i'm assuming
iori has joined #ruby
krusty_ar has joined #ruby
<Spooner_> Keeping it simple, you could just do d = open("#{YURL}#{sym[/A-Za-z/]}")
<Spooner_> Oops: d = open("#{YURL}#{sym[/[A-Za-z]+/]}")
Banistergalaxy has joined #ruby
Scrivener has quit [Remote host closed the connection]
chaingun has joined #ruby
sam113101 has joined #ruby
<Spooner_> Ah no, but then you still have a filename called ["A"], so you would probably want to do sym = sym[/[A-Za-z]+/] after line 24 instead
albemuth has joined #ruby
<Spooner_> I'll leave you to pick up the pieces, dekz :P I'm off to bed.
Spooner_ has quit []
jgrevich_ has joined #ruby
AndChat| has quit [Ping timeout: 264 seconds]
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
banisterfiend has quit [Remote host closed the connection]
emmanuelux has joined #ruby
caveat- has joined #ruby
cherrypeel has quit [Quit: Leaving]
sam113101 has quit [Remote host closed the connection]
jgrevich has quit [Read error: Connection reset by peer]
sam113101 has joined #ruby
jgrevich has joined #ruby
banghouseAFK is now known as banghouse
sam113101 has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
sam113101 has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
nari has joined #ruby
malias has quit [Quit: Leaving]
<BrianJ> would this be a good place to ask questions about using rake?
platzhirsch has joined #ruby
jamesaxl has quit [Ping timeout: 245 seconds]
<platzhirsch> Short alternative to receive max element and its index of an array without using .max and .index?
sam113101 has quit [Remote host closed the connection]
<platzhirsch> arr.index arr.max
banghouse2 has joined #ruby
banghouse has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
sam113101 has joined #ruby
CalvinR has joined #ruby
lolsuper_ has joined #ruby
lolsuper_ has quit [Changing host]
lolsuper_ has joined #ruby
yoklov has joined #ruby
havenn has quit [Remote host closed the connection]
CalvinR has quit [Ping timeout: 240 seconds]
h4mz1d has quit [Ping timeout: 264 seconds]
wargasm has quit [Ping timeout: 276 seconds]
havenn has joined #ruby
raja has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
artOfWar has joined #ruby
KDr2 has joined #ruby
prometheus has quit [Ping timeout: 250 seconds]
artOfWar has quit [Remote host closed the connection]
mdaisuke has joined #ruby
artOfWar has joined #ruby
yankhates has joined #ruby
chaingun has quit [Ping timeout: 272 seconds]
banghouse2 is now known as banghouse
vladiim has quit [Quit: vladiim]
wargasm has joined #ruby
yankhate1 has joined #ruby
<offby1> ooh, is it "Talk Like A Pirate" day already?
blankverse has joined #ruby
<offby1> platzhirsch: something with "inject", I suspect
<blankverse> is it a bad decision to use socket.io in ruby?
<deryl> arr.inject would that be a druggy pirate?
<blankverse> https://github.com/dkastner/Socket.io-ruby , I would like to use it in a sinatra app
<offby1> platzhirsch: interesting question; I can't think of a really simple way to do it.
<offby1> "inject" won't help because its block doesn't get passed the index, and you probably can't count on the block being called on the array's elements in order.
<offby1> deryl: or one who doubles as a doctor
<platzhirsch> offby1: well max and index is just fine I think
<deryl> offby1: <snicker>
vladiim has joined #ruby
frishi has joined #ruby
<offby1> how I'd do it in "Racket" (a Lisp flavor): https://gist.github.com/2986020
ken_barber1 has joined #ruby
sam113101 has quit [Remote host closed the connection]
<offby1> using "max" and "index" suggests we're gonna walk the array twice, which tastes bad
<offby1> and makes the baby Jesus cry, etc
banisterfiend has joined #ruby
ken_barber has quit [Ping timeout: 260 seconds]
radic has quit [Disconnected by services]
robotmay has joined #ruby
radic_ has joined #ruby
radic_ is now known as radic
Banistergalaxy has quit [Ping timeout: 264 seconds]
delinquentme has quit [Remote host closed the connection]
Yarou has joined #ruby
yankhate2 has joined #ruby
yankhate3 has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
skinny_much has quit [Quit: Linkinus - http://linkinus.com]
yankhate1 has quit [Ping timeout: 250 seconds]
yankhates has quit [Ping timeout: 245 seconds]
jianxioy has quit [Quit: leaving]
platzhirsch has left #ruby [#ruby]
yankhate3 has left #ruby [#ruby]
freezey has quit [Remote host closed the connection]
eph3meral has joined #ruby
vladiim has quit [Quit: vladiim]
<eph3meral> is there a good canonical/standard reference download? like so I can read docs on stuff like Enumerable#map while I'm offline?
Enekoos has quit [Read error: Connection reset by peer]
<eph3meral> the best I've found so far is rdoc but it doesn't seem to generate quite the same docs that are available online
<eph3meral> at least, not the same in terms of navigation and organization
vonsar has joined #ruby
<ryanf> by online you mean rdoc.info?
<ryanf> /rubydoc.info?
<ryanf> if so, what you want is YARD, not RDoc
yannis has joined #ruby
<ryanf> oh you actually mean ruby-doc.org I guess. I'm pretty sure those are generated by rdoc
<ryanf> you might just need a different theme
bitsar2 has quit [Ping timeout: 260 seconds]
albemuth has quit [Quit: Leaving...]
atmosx has quit [Ping timeout: 276 seconds]
atmosx has joined #ruby
SpinningWheels has joined #ruby
lusory has joined #ruby
prometheus has joined #ruby
keymone has quit [Read error: Connection reset by peer]
d1zzYLuLz has joined #ruby
peterhil` has quit [Quit: Must not waste too much time here...]
keymone has joined #ruby
ceradon has joined #ruby
frishi has quit [Quit: Leaving...]
ben_m has quit [Quit: Leaving]
Guest99926 has quit [Read error: Operation timed out]
<eph3meral> ryanf, k thx I'll look in to all of the above
Guest39968 has joined #ruby
h4mz1d has joined #ruby
jxf has joined #ruby
yankhate2 has quit [Ping timeout: 252 seconds]
demet8 has joined #ruby
h4mz1d has quit [Ping timeout: 245 seconds]
rbanffy has quit [Ping timeout: 260 seconds]
sailias has joined #ruby
emmanuelux has quit [Ping timeout: 252 seconds]
<kah_> hey what does d.read mean? http://pastie.org/4146122
h4mz1d has joined #ruby
TheHunter_1039 has quit [Ping timeout: 260 seconds]
<ryanf> kah_: it is impossible to know from what you just pasted
<fowl> call `read` on d
<kah_> ryanf: sorry, d is a csv filed from a url
<kah_> and ok thkx
<kah_> one other quick question. I have rows = Nokogiri::HTML(open(URL)).css('table.sortable tr')[1..-1] .. URL is a URL... what does [1..-1] mean? ascending?
ZachBeta has joined #ruby
<ryanf> it means leave out the first one
<ryanf> [0..-1] would be all of them
<fowl> rYaNf [[da F is for FReaK]]
havenn has quit [Remote host closed the connection]
<SpinningWheels> can anyone tell me what noob trap i fell into? http://pastebin.com/TdkGJSjJ
azm has quit [Ping timeout: 260 seconds]
<fowl> SpinningWheels, ncurses for windows?
noganex has quit [Ping timeout: 246 seconds]
atmosx has quit [Ping timeout: 276 seconds]
<SpinningWheels> so... not all packages found in gem search are cross platform?
emmanuelux has joined #ruby
noganex has joined #ruby
atmosx has joined #ruby
<dekz> SpinningWheels: do you have ncurses libraries installed?
freeayu has joined #ruby
wpaulson has joined #ruby
CalvinR has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
vladiim has joined #ruby
<richo> eph3meral: dash seems pretty reasonable
frishi has joined #ruby
yankhates has joined #ruby
mvensky has joined #ruby
minijupe has joined #ruby
malkomalko has quit [Remote host closed the connection]
seanstickle has quit [Quit: Nihil sub sole novum]
CheeToS has quit [Ping timeout: 245 seconds]
Ethan has joined #ruby
Ethan has quit [Changing host]
Ethan has joined #ruby
igaiga has quit [Remote host closed the connection]
zalesz has joined #ruby
<banisterfiend> richo: dash is great, but it's $20 :P
<banisterfiend> i use it for objc
<richo> banisterfiend: if you contribute a docset it's free
<richo> that's my big plan to save $20
<banisterfiend> cool
<richo> by investing about $500 worth of my time butting my head against it's docset format
freeayu has quit [Ping timeout: 244 seconds]
<banisterfiend> i just didnt u[\pgard
<banisterfiend> upgaade
<banisterfiend> still have free version
<richo> .. upgrade?
<banisterfiend> (yeah, driving :P)
<eph3meral> RichGuk, what's dash, sorry?
<eph3meral> blerp
<eph3meral> richo, what's dash, sorry?
<richo> eph3meral: http://kapeli.com/docsets/
<fgwaegeawgfwa> Does anyone have a clear understanding of the practical difference between Separation of Concerns and Single responsibility principle? (I've already googled it, and read the 10 first pages about that topic, but still...)
<richo> and yaeh, I upgraded but it hasn't annoyed me yet
Bosma has quit [Quit: leaving]
savage- has quit [Remote host closed the connection]
<banisterfiend> y did u upgrade
<richo> there was meant to be an update to it's search algorithm, I wanted to try it
ringotwo has joined #ruby
<banisterfiend> cool
<richo> plus tbh it's probably worth the $20
<banisterfiend> speedier?
<richo> much
<eph3meral> richo, my question is not about how to document my own code, rather I want a nicely/sanely formatted set of ruby docs that I can download... is there something like that for ruby? or must I use the online references only?
<banisterfiend> eph3meral: that's what dash is...
<banisterfiend> eph3meral: dash is a cocoa app that lets you search/read ruby docs
<eph3meral> ahh, well, good thing I don't have mac os
<eph3meral> otherwise I could use it
<banisterfiend> s/good/bad ? :)
pygospa has quit [Disconnected by services]
<eph3meral> exactly :)
<richo> eph3meral: `ri Array`
pygospa has joined #ruby
jxf has quit [Ping timeout: 265 seconds]
jxf has joined #ruby
<eph3meral> richo, "Nothing known about Array"
<eph3meral> i'm using rvm
<richo> .. well that's got to be a good sign
<richo> so am I
<eph3meral> 1.9.3-p194
<richo> yup.. same
<richo> do you have a .gemrc ?
<eph3meral> nope
<richo> and did you disable ri or rdoc somewhere?
<eph3meral> that should only matter for gems though
<eph3meral> no?
<eph3meral> nope
<eph3meral> i know what you're talking about, I usually do
<banisterfiend> eph3meral: you need to generate the docs
freeayu has joined #ruby
<eph3meral> but this is a fresh install of 12.04
<eph3meral> and i haven't added a .gemrc yet
<banisterfiend> eph3meral: something like: rvm generate docs
<banisterfiend> eph3meral: type rvm help it should tell u
<eph3meral> ahh ok i'll go poke around thanks
<richo> oh. Maybe I forgot doing that
<richo> I'll add that to the default on RVM though
<richo> not generating docs is a stupid default
perryh is now known as perryh_away
ananthakumaran has joined #ruby
<banisterfiend> eph3meral: but, i of course just use pry instead of ri :) it gives u access to core/stdlib (with pry-doc) and can return docs for gems without requiring docs to be pregenerated :P
sailias has quit [Ping timeout: 248 seconds]
ringotwo has quit [Ping timeout: 244 seconds]
<richo> wait what
<richo> since when?
yankhates is now known as tankhates
<eph3meral> banisterfiend, ahh, ok well that might be a good reason to finally try it
<richo> I've only been using pry as an introspective debugger
<banisterfiend> richo: since always, pretty muh
<richo> D:
<eph3meral> i hear it's nicer than irb, but I haven't bothered to mess with it yet
austinbv has joined #ruby
<austinbv> can you give prereqs to a file task in rake
<banisterfiend> richo: really? you dont even use it as an irb replacement?
<richo> banisterfiend: I rarely if ever start irb. irb is pissed off with readline wchih makes line editing very awkward for me
<banisterfiend> richo: pry can also show core source (C code), so u can go: show-source Array#sort_by
macmartine has joined #ruby
CalvinR has left #ruby [#ruby]
<richo> if I have a proof of concepty type thing, I generally write it, stick a few binding.pry's in at key points and then commit the finished file to my ruby-hax repo
<richo> so I have a bunch of proof of concepts for interesting things/edge cases
indian has joined #ruby
<richo> I read about show-source at one point and promptly forgot. I'm still pretty annoyed with the whole gem ecosystem, so the "use a gem, find out it doesn't work, fork and fix" workflow is pretty much daily
<banisterfiend> richo, eph3meral: https://gist.github.com/2986330
Aaton_off is now known as Aaton
<richo> \o/
<richo> That's awesome. Note to self, use pry more
<banisterfiend> richo: you need to gem install pry-doc to get access to core doc/source though
<richo> I installed it before when you mentioned it :)
Aaton is now known as Aaton_off
<banisterfiend> pry will automatically detect and use pry-doc if it finds it though, so u dont have to bother with it once it's installed
hemanth has joined #ruby
mayankkohaley has quit [Ping timeout: 264 seconds]
robotmay has quit [Remote host closed the connection]
<dekz> anyone a master of relational db in datamapper?
Ethan has quit [Ping timeout: 272 seconds]
silentpost has quit [Ping timeout: 265 seconds]
<banisterfiend> eph3meral: let me know if pry + pry-doc works for u, does what u want etc
<eph3meral> banisterfiend, yeah that works
<eph3meral> banisterfiend, I'm really looking for something a bit more navigable though, ideally HTML
<eph3meral> but yeah, within pry
<eph3meral> ri Array#map
<eph3meral> and ri Array
<eph3meral> both seem to work
<banisterfiend> eph3meral: hmm ok, i think using show-doc Array#map inside pry is nicer
<banisterfiend> eph3meral: or ? Array#map for shorthand
<banisterfiend> it uses a different technique to extract docs, show-doc/? is more flexible IMO
<eph3meral> ahh, indeed, purty colors :P
<banisterfiend> well, hehe, not just that, it always extracts docs from the source on demand each time, so it doesnt require you to have installed the ri/rdocs separately
macmartine has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
h4mz1d has quit [Ping timeout: 245 seconds]
frishi has quit [Quit: Leaving...]
freeayu has quit [Ping timeout: 255 seconds]
lolsuper_ has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
<richo> ok, this is properly shiny
h4mz1d has joined #ruby
blankverse has quit [Quit: Page closed]
freeayu has joined #ruby
jimmy1980 has quit [Ping timeout: 244 seconds]
alanp has quit [Read error: Connection reset by peer]
balki has quit [Write error: Broken pipe]
balki has joined #ruby
IrishGringo has joined #ruby
demet8 has left #ruby [#ruby]
k_89 has quit [Ping timeout: 240 seconds]
zalesz has quit [Ping timeout: 246 seconds]
macmartine has quit [Quit: macmartine]
hunglin has quit [Quit: Leaving.]
austinbv has quit [Ping timeout: 244 seconds]
krz has joined #ruby
emmanuelux has quit [Remote host closed the connection]
vladiim has quit [Quit: vladiim]
ananthakumaran has quit [Read error: Connection reset by peer]
<deryl> banisterfiend: ? Kernel fails, but ri Kernel works
<richo> deryldoucette?
<deryl> ? Kernel doesn't show the kernel docs, but ri Kernel in pry does. so its not dropping down to ri if ? fails to find any docs
seanfchan has joined #ruby
<banisterfiend> deryl: can you paste the docs? cos 'ri Kernel' doesn't actually show me any docs, it just shows a list of methods. I don't think Kernel is documented
<deryl> sec
<banisterfiend> but it could just be my setup
<SirFunk> is there a name for how you can do things like: "<<: *defaults" in yaml?
ceradon has quit [Read error: Connection reset by peer]
<deryl> banisterfiend: i think you're right. I was reading additional but thats because ri was pulling anyhting with the word Kernel in it as well.
<deryl> like activesupport etc
<banisterfiend> deryl: oh ok
<deryl> but the _Kernel_ related (specific doc) was all the methods
krusty_ar has quit [Remote host closed the connection]
<deryl> but ? Kernel didn't even show taht
ceradon_ has joined #ruby
ceradon_ is now known as ceradon
<banisterfiend> deryl: Yeah, show-doc only shows the docs, it doesn't bother to show a list of methods since you can get that with the 'ls' command
<deryl> ok
<banisterfiend> deryl: it seems 'ri' always shows both docs + methods
<deryl> got ya
<banisterfiend> deryl: which may be a useful option to show-doc
<banisterfiend> to include a list of methods, coudl be handy i guess
L-----D has joined #ruby
<deryl> yeah a fast dump
austinbv has joined #ruby
andreime has joined #ruby
adeponte has joined #ruby
AlbireoX`Laptop has quit [Remote host closed the connection]
<banisterfiend> deryl: oh
<banisterfiend> deryl: check this out
<banisterfiend> deryl: a pretty awesome replacement for the very broken 'gist' gem
cakehero has quit [Quit: Computer has gone to sleep.]
AlbireoX`Laptop has joined #ruby
<deryl> yeah going to have to replace it
<deryl> haven't yet, but that was mentioned so ill replace with that and alias to 'gist'
<deryl> pry going to be made to work with jist?
<banisterfiend> deryl: it does already
<banisterfiend> :P
<deryl> oh sweet
<banisterfiend> deryl: the guy who wrote 'jist' is on the pry team, and wrote it relaly because pry needed a working gister :)
RainbowD_ has joined #ruby
<banisterfiend> really*
<deryl> got it
<Paradox> banisterfiend, thank god
<Paradox> i fucking hate how gist wants me to put all my passwords and shit in system-readable variables
cirwin has joined #ruby
<banisterfiend> Paradox: well 'jist' lets you gist anonymously by default
<Paradox> does it use my keychain?
<Paradox> like hub does?
<banisterfiend> Paradox: not sure how jist deals with authentication tbh, ask criwin :)
<Paradox> or do i have to do more dumb hacks
<banisterfiend> Paradox: cirwin*
<Paradox> speaking of hub
<Paradox> someone should needle defunkt to update it
<cirwin> Paradox: it just uses an oauth token
<Paradox> ah it uses oauth
<Paradox> thats even better
<andrewhl> sounds like nice bedtime reading
CheeToS has joined #ruby
<andrewhl> oops, wrong chan
mikeycgto has quit [Remote host closed the connection]
dr0id has joined #ruby
dr0id has left #ruby [#ruby]
<banisterfiend> deryl: what do you currently use 'gist' gem for?
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<banisterfiend> deryl: i see you were quite active on the gist issue threads
<Paradox> up till now
<Paradox> i've used sublimetext2's gist plugin for my gistification
<deryl> banisterfiend: i share TONS of stuff I do using gist
<Paradox> i love gists
<Paradox> single-file scripts and stuff?
<Paradox> why waste a repo for "junk" when gists are essentially all you need
<Paradox> also work as a pastebin
<deryl> I use it for sharing code with others, doing things in pry and gisting them to show users trying to do stuff, get help with my own code, help RVM users etc
<deryl> rather convenient core tool
td123 has quit [Quit: WeeChat 0.3.8]
<Paradox> banisterfiend, so jist works with pry
<cirwin> it will do for the next version
<cirwin> at the moment we depend on gist, but it's not very working
<banisterfiend> deryl, Paradox: feel free to upvote; http://www.reddit.com/r/ruby/comments/vk1t6/jist_a_modern_oauth2based_gist_gem/
<deryl> hahaha look what it does
<deryl> look at the = stuff
<cirwin> heh
<deryl> thats jist doing that
Scrivener has joined #ruby
<cirwin> deryl: did you pipe something that wasn't plain text through it?
tankhates has quit [Ping timeout: 245 seconds]
<banisterfiend> deryl: whhhhhyyy is itttt tallkkinnggg likkee thhiissss
<deryl> cirwin: ri Kernel | jist
<deryl> banisterfiend: that command i just posted is doing that. well gist itself is
<deryl> err jist. damn fingers keep thinking gist
<cirwin> deryl: hmm, interesting
<banisterfiend> Paradox: looks like a definite yard bug
<Paradox> banisterfiend, i've had yard spit those at me when my code has problems with it
<cirwin> I wonder if there's a way to de-ansify input
<cirwin> particularly as ri is using horrible double-printing for bold
<deryl> is that ri or yard doing that?
<Paradox> yard
<Paradox> ri just goes fine
<deryl> ok
kill-9_ has quit [Ping timeout: 260 seconds]
<banisterfiend> deryl: did that used to work in 'gist' ?
<deryl> hrmm and jist isn't reading my $HOME/.gitconfig and picking up my git token etc so its posting as anonymous
<banisterfiend> deryl: ri Kernel | jist ?
<deryl> banisterfiend: yes
<deryl> when gist worked that is
<banisterfiend> deryl: interesting, maybe he's stripping ansi
<Paradox> deryl, jist --login
<cirwin> deryl: not true!
<banisterfiend> cirwin could probalby just steal that code
<cirwin> https://gist.github.com/2986519 <-- I just tried
<deryl> cirwin: dude, I used to do that all the time
<banisterfiend> we have a method in pry that strips ansi code but it's not that reliable :P
<cirwin> deryl: hmm
<deryl> and that jist --login returns unknown method login
<cirwin> deryl: if you're inside pry you need to call it gist --login
<cirwin> I'll add an alias
mayankkohaley has joined #ruby
<deryl> if i call gist it calls the broken gem
<banisterfiend> deryl: you need to install pry head
<cirwin> deryl: .jist --login also works
mvensky has quit [Quit: mvensky]
<deryl> what about pry-doc?
<deryl> they;re matched correct?
<deryl> so if i :git => ""https://github.com/pry/pry.git" then I have to do the same with pry-doc?
<cirwin> the old version of pry-doc will continue working with HEAD pry; you'll need gem install method_source --pre tohugh
Weems has quit []
<deryl> ok. i got this in my gemspec (add_developement_dependency) so gimme a bit
<deryl> trying to talk on phone and do this,.
<cirwin> heh, thanks!
<deryl> ok this is actually in my gemspec so i gotta go google how to add the git to the gemspec. doens't seem to like the Gemfile style addition
minijupe has quit [Quit: minijupe]
<SirFunk> for some reason when I dump my yaml with YAML.dump and try to reload it it fails
<SirFunk> it's writing invalid yaml?
<SirFunk> It's giving me stack level too deep
<deryl> damn, seems I have to do it in the actual Gemfile, seems the .gemspec doesn't allow for :git =>
<banisterfiend> cirwin: hey for ruby18_source_location do you define methods directly on Method or do you include a Ruby18SourceLocation module?
<cirwin> banisterfiend: directly on method, why?
<banisterfiend> cirwin: cos im just wondering if pry-doc could find the c code
<banisterfiend> i dont think it could
<cirwin> hmm, no
<cirwin> I don't have any yard-docs on the C methods either :)
<banisterfiend> if they were defined on a module and *then* included into Method it could, though
macmartine has joined #ruby
<banisterfiend> cirwin: Yeah, me either :) but, yard may still be able to extract the code
<banisterfiend> but it's not a big deal
Vert has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
<deryl> wait a second. *can* you use *both* a group *and* 'gemspec' in a Gemfile and both be honored?
ZachBeta has quit [Read error: Connection reset by peer]
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
ZachBeta has joined #ruby
<deryl> *sigh* nothing like forgetting to change back from the global gemset to the one you were using
<deryl> knucklehead
yannis has quit [Read error: Operation timed out]
<cirwin> :)
<cirwin> gemsets are the "right" way
yoklov has quit [Quit: computer sleeping]
* cirwin has no idea why yard dislikes his comments
<banisterfiend> can someone name some c extensions?
<banisterfiend> i wanna try some shiznite out
<deryl> hrmm, now with the new pry-head i can no longer do ri Kernel | gist
<deryl> err jist
<banisterfiend> preferably c extensions that dont need any 3rd party libs installed
<banisterfiend> deryl: in pry, you can just do: gist -d Kernel
<cirwin> banisterfiend: nokogiri
<banisterfiend> and i'll gist the documentation for Kernel (though there's no docs for it afaik :)
dr0p has joined #ruby
<banisterfiend> deryl: hmm i also didnt check if -d worked on classes
yannis has joined #ruby
<cirwin> banisterfiend: try ryanf's jsminc
<banisterfiend> i only verified it worked on methods
<banisterfiend> cirwin: cool
<deryl> oooo
<cirwin> heh
<deryl> and this: Error: The method 'Kernel' could not be found. (for gist -d Kernel)
* cirwin blames banisterfiend ;)
<banisterfiend> with jsminc
<banisterfiend> deryl: yeah, i didnt add support for modules/classes yet
<banisterfiend> deryl: can u file an issue?
<deryl> also, Gist created at https://gist.github.com/a2a04f86a43969148994 and added to clipboard. is a lie! (on osx, it didn't copy to the clipboard)
<deryl> banisterfiend: yeah sec
<bnagy> anyone know a font that doesn't look like ass in ST2 with antialias turned off?
yannis has quit [Client Quit]
<deryl> on jist correct?
dr0p has quit [Remote host closed the connection]
<bnagy> monaco works with macvim, not with ST :/
<ryanf> oh I was just going to say monaco
<cirwin> deryl: those errors should be reported to pry
<ryanf> I dunno then, might not be anything
<cirwin> it's failing before it gets to Jist
<bnagy> I'll give envy code r a shot
<deryl> ok
<bnagy> works well in st in windows
<deryl> ya know it helps if you read the actual error output deryl
<deryl> duh
<ryanf> I dunno IME it is really rare for a font to look decent on a mac without AA
<deryl> told me it was pry in the error
<ryanf> I think monaco is actually the only one I've seen
<ryanf> have you considered just liking aa instead :)
tewecske has joined #ruby
<bnagy> it makes me crazy
emmanuelux has quit [Remote host closed the connection]
<bnagy> partly this monitor I think
<bnagy> andale mono works as a terminal font - trippy thing is that monaco is fine in vim
<deryl> cirwin: should I open one on jist not correctly dumping the gist url to the osx clipboard, though it reports it does? :)
<cirwin> deryl: technically that's a pry bug too :)
AllanMacGregor has quit [Remote host closed the connection]
<deryl> oh so pry is handling the clipboard usage, not jist before handing back to pry
<cirwin> yeah
<deryl> ok
<cirwin> jist should probably gain clipboard support; I'll steal it from pry when it's working :)
<cirwin> it's trying to use pbcopy or xclip or putclip
BrianJ has quit [Quit: Computer has gone to sleep.]
<cirwin> do you have any of those programs installed?
Aristata has joined #ruby
<Aristata> Anyone have a clue why a rescue clause would be thrown without an error?
<deryl> pbcopy yes. comes with the os
<cirwin> deryl: hmm; ok I'll find my mac machine and testit
<deryl> lives in /usr/bin/pbcopy
<bnagy> Aristata: it wouldn't
<deryl> cirwin: I'm on Lion 10.7.4. -rwxr-xr-x 1 root wheel 47K 1 Mar 20:33 /usr/bin/pbcopy*
<cirwin> thanks
<deryl> np
iamjarvo has joined #ruby
<iamjarvo> is the only way to make a custom error type is to inherit from standard error?/
banisterfiend has quit [Ping timeout: 246 seconds]
<cirwin> iamjarvo: you can inherit from any exception type
<cirwin> but StandardError is the best
beilabs__ has quit [Read error: Operation timed out]
beilabs_ has quit [Ping timeout: 255 seconds]
beilabs__ has joined #ruby
<iamjarvo> cirwin: I see. care to explain why its the best?
<cirwin> it is caught by default by rescue
beilabs_ has joined #ruby
<deryl> damn banister left
fantazo has joined #ruby
<iamjarvo> cirwin: thank you
manizzle has joined #ruby
<cirwin> iamjarvo: if you want to get really advanced, read "Exceptional Ruby".
<cirwin> it has some amazing ideas for cool stuff you can do with exceptions
seanfchan has left #ruby [#ruby]
bbuegler1 has joined #ruby
Hanmac1 is now known as Hanmac
maesbn has joined #ruby
iamjarvo has quit [Quit: Leaving.]
ParadoxQuine has joined #ruby
Banistergalaxy has joined #ruby
<ParadoxQuine> anyone around that wouldnt mind giving me some simple rails routing help? the rails irc channel isnt talking :(
adeponte has quit [Remote host closed the connection]
manizzle has quit [Remote host closed the connection]
c0rn_ has joined #ruby
kylemcgill has quit [Remote host closed the connection]
<offby1> only if it's super-ultra easy
<offby1> I'm just learning rails mysel
<offby1> f
<Paradox> anyone know a fix for tilt shitting redcarpet?
<offby1> wow, that's hard to parse
<offby1> I am guessing "tilt" and "redcarpet" are open-source projects, whereas "shitting" has the usual meaning :)
<offby1> whop it on the nose with a rolled-up newspaper, I guess
<bnagy> what, you don't use shitting? It's the best gem evar
<offby1> every time I require it, it wants to pull in "giggling" too
<bnagy> yeah they should use bundler on those
<Paradox> yup
<Paradox> basically tilt doesn't pass all the markdown options to redcarpet
<Paradox> in fact, it passes none of them
<Paradox> so you can use smarty or ``` syntax or anything
<Paradox> supposedly its fixed in head
<Paradox> but i cant seem to get head to run
<Paradox> even with gemfiles
andreime has quit [Quit: Konversation terminated!]
<ParadoxQuine> offby1: i'm trying to use link_to and include an extra param that isn't part of the url
<ParadoxQuine> i tried adding it as an argument to link_to, like so: link_to clickme, url, :title => @title
<SirFunk> Is there a way I can use an array of strings as keys of a hash? like ['a','b'] would do my_hash['a']['b'] ?
<Paradox> SirFunk, you could use an iterator, but there probably is some more elegant way i dont know of
k_89 has joined #ruby
itnomad has quit [Quit: Leaving]
tewecske has quit [Quit: Leaving.]
ij has quit [Read error: Connection reset by peer]
<bnagy> inject, but I wouldn't call it elegant
nipra has joined #ruby
RainbowD_ has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
<SirFunk> Paradox: yeah.. trying to come up with something better than iterating
<SirFunk> i don't see how inject would help?
vladiim has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
<Hanmac> 'a,b'.split(',').inject(my_hash,:[])
<Paradox> no
<Paradox> he wants an array like this [a,b,c,d] to be a hash of {a => b, c => d }
<Paradox> if i read him right
<SirFunk> Paradox: nope that's not what i meant
<Paradox> oh ok
<bnagy> uh Hanmac's thing is what I meant as well
<bnagy> except I normally use the clunky syntax
<SirFunk> Hanmac's solution is what i wanted
<SirFunk> i'm not entirely sure how it works though :-P
<Paradox> neither am i
<SirFunk> anyone care to explain to a newb?
<Paradox> i was going to tease it apart in pry
<Hanmac> "Hanmac - its what you want" :P
<Paradox> but since someone else asked i wont bother
<bnagy> ['a','b'].inject(h) {|hsh,k| hsh[k]} if that helps
<Paradox> how does work?
<bnagy> hsh keeps getting set to the 'deeper' element
<SirFunk> oh ok
<SirFunk> yeah
apok has joined #ruby
<SirFunk> i'm just not sure of the args sent to inject in Hanmac
<bnagy> well the initial is the hash
<bnagy> using :[] is short for what I wrote
<bnagy> it sends that method to the accumulator with the injectd var as the argument
<Paradox> inject = reduce for those that didnt know
Scrivener has quit [Remote host closed the connection]
<SirFunk> can anyone else not help seeing :[] as a face?
<Paradox> :[] is here to eat your arrays
<Paradox> omnomnom
banisterfiend has joined #ruby
ABK has joined #ruby
<SirFunk> Hanmac: is there any way I could then set a value to the end of it
bigkevmcd has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
h4mz1d has quit [Ping timeout: 264 seconds]
<SirFunk> like.. my_hash['a']['b'] = 'foo' but 'a,b'.split(',').inject(my_hash,:[])='bar'
<bnagy> eh?
nowthatsamatt has joined #ruby
<bnagy> h={'a'=>{'b'=>'c'}} that code gives me 'c'
<bnagy> both versions
<bnagy> what does your hash look like?
<SirFunk> bnagy: like yours.. in this example.. but it could be N levels deep
uc has joined #ruby
<bnagy> doesn't matter how deep it isa
<Hanmac> keys = 'a,b'.split(','); keys[0..-2].inject(my_hash,:[])[keys[-1]]='bar'
<bnagy> as long as the key array is correct
<SirFunk> Hanmac: wooo that's ugly ;-)
<SirFunk> oh.. actually it's not that bad
<SirFunk> just looks horrific on one line
hemanth has quit [Read error: Connection reset by peer]
<bnagy> that makes no sense
RainbowDashh has joined #ruby
hemanth has joined #ruby
<bnagy> you'll get whatever the last key in your keyarray gives me, assuming it doesn't raise before then
<SirFunk> bnagy: makes perfect sense to me
h4mz1d has joined #ruby
<SirFunk> i think
<SirFunk> testing it now
<bnagy> why would you use soe of the key array p front and then the last one at the end? It's retarded
Sgeo has joined #ruby
<SirFunk> so that you can set it
<SirFunk> otherwise it just returns the value
<bnagy> then use a key vector that's one shorter
Sgeo has left #ruby [#ruby]
<bnagy> or use *keys,to_set=%w(a b c d e); keys.inject(h,:[])[to_set]=new
<bnagy> so at least it's halfway readable
indian has quit [Ping timeout: 260 seconds]
<SirFunk> to_set can't be an array though?
perryh_away is now known as perryh
<Paradox> i had someone claim that ruby sucked because it didnt have a dictionary splat like python did
<bnagy> SirFunk: to_set will be the last element of your array
<Paradox> i just told him to opts = {} and do what you want
<cirwin> Paradox: real keyword arguments are kind of nice
<cirwin> which I guess that's a symptom of
<Paradox> cirwin, yeah i wouldn't mind a ** splat
<Paradox> but i dont miss it
<bnagy> 'e' in this case
<cirwin> opts = args.pop if args.last.is_a?(Hash) :)
<SirFunk> bnagy: oh! nice. I didn't know what *keys did :-P
umttumt has joined #ruby
<bnagy> magic splat
jianxioy has joined #ruby
<bnagy> it's a bit of a cheap syntax trick
<Paradox> aka syntax sugar
<Paradox> depends on who you ask
macmartine has quit [Quit: macmartine]
<Paradox> heh
<bnagy> no I just meant in this csae
ananthakumaran has joined #ruby
<bnagy> there are times when splt is perfect for the job
uc has quit [Ping timeout: 248 seconds]
<bnagy> here to_set=ary.pop; ary.inject ...[to_set]='foo' would have been more readable probably
<bnagy> but it's one more statement
jxf has quit [Ping timeout: 255 seconds]
uc has joined #ruby
manizzle has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<SirFunk> can someone look at: https://gist.github.com/3b7d3d3b77b9c9ec685e quick and see if there's a way to make it simpler? i.e. not having the keys.inject stuff 3x? (should i just make a function of it?)
h4mz1d has quit [Ping timeout: 248 seconds]
<Paradox> yes
vladiim has quit [Quit: vladiim]
<Paradox> if you use something more than 2x you should make it into a method
ckrailo has quit [Quit: Computer has gone to sleep.]
<bnagy> don't need to here though
<SirFunk> is there some way to do like a = keys.inject(Settings.get('instance'),:[])[to_set] and then like hold a pointer to it instead of returning the value.. so i could do a.class or a.update or a = ?
<bnagy> you're working on the same item three timers, just assign that item to a variable
monkegjinni has joined #ruby
<SirFunk> bnagy: but then if i later do a='foo' it won't change it on the original hash
<Paradox> cirwin, i presume your trick of `stty -echo` doesn't work on windows platforms?
<cirwin> Paradox sadly not
<bnagy> SirFunk: yeah it will
<Paradox> damnit
<cirwin> hence the rescues :)
<Hanmac> a = keys.inject(Settings.get('instance'),:[])
<Hanmac> a[to_set]=value
<Paradox> was hoping i didnt have to use highline for my simpler scripts
<Paradox> ah well
<bnagy> if it's a hash anyway
<cirwin> Paradox: in python I'd just use the standard library </trollin'>
<Paradox> yeah ಠ_ಠ
<cirwin> Paradox: yeah
<bnagy> if it's a string you probably need to do replace
<SirFunk> Hanmac: ahh, that would cut down on it some
<cirwin> I figured that having a password echoed once was not too bad
<Paradox> hopefully one day ruby will have a better stdlib
<cirwin> though no doubt I'll get complaints
<Paradox> its already pretty good
<cirwin> I thought they were moving away from stdlibrary work
<Paradox> what sets ruby apart is the third party shit is SOOOOO much better than the python crap
<Paradox> probably are
<cirwin> and encouraging the use of manygems
Gurpartap has joined #ruby
<cirwin> yeah
<Paradox> sad part is
<Paradox> for things like image processing
<Paradox> you have about 900 choices
atmosx has quit [Ping timeout: 276 seconds]
<Paradox> and none of them are as good as python's Image
<Gurpartap> Can blocks be called in context of when they are .call'd (later on)?
<cirwin> Gurpartap: I think you can pass a block to eval
<cirwin> probably possible to do something like binding.eval(&block)
<cirwin> but I might have made that up
<bnagy> no that's right
<bnagy> not sure about the actual syntax, but that's what you have to do
atmosx has joined #ruby
banseljaj is now known as imami|afk
jarred has quit [Ping timeout: 260 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<Gurpartap> i see
<Gurpartap> thanks cirwin. i'll let you know how it gos
<Gurpartap> and thanks bnagy, as usual :)
<bnagy> in general, if you're doing that it's a bad design smell
<ParadoxQuine> how do i pass params to my controller when using rspec?
Nies has quit [Quit: Saliendo]
<bnagy> blocks are supposed to carry their binding, that's what they're for
<bnagy> if you need a block to use some different variable, make it a block var
<Paradox> ParadoxQuine, depends on the type of request
<SirFunk> ok. must hit bed.. wakeup time is in 4 hrs
<SirFunk> thanks for the help
<Paradox> get or post or delete
<Paradox> or other verbage
<ParadoxQuine> Paradox: trying to test delete, so i assume it's doing a post
<Paradox> delete ≠ post
<Paradox> delete = delete
<Paradox> im not sure and i dont have my copy of pragmatic rails lying around
<Paradox> might be a better question for #rails
<Hanmac> nope its #rubyonrails
TheHunter_1039 has joined #ruby
TheHunter_1039 has quit [Client Quit]
gibsonfs has quit [Ping timeout: 255 seconds]
<Paradox> that
TheHunter_1039 has joined #ruby
<ParadoxQuine> oh no wonder no one was responding in #rails
<ParadoxQuine> thanks Hanmac
TheHunter_1039 has quit [Client Quit]
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
gibsonfs has joined #ruby
ebanoid has joined #ruby
samuel02 has joined #ruby
brianpWins has joined #ruby
jarred has joined #ruby
vladiim has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<Gurpartap> bnagy: the block would be called later during runtime though, instead of during it's collection from args in my init method. i'll try it a bit to make my mind clear about whether passing variable would have desired result
yonggu_ has joined #ruby
adeponte has joined #ruby
banisterfiend has joined #ruby
<bnagy> Gurpartap: everyone turns into a bit of an idiot when they first start metaprogramming
<bnagy> there are so many ways to do stuff it's hard to see the 'right' way
<richo> bnagy: Nope, there's exactly one "right" way to do it, and that way is the preferred method of whoever you ask
<richo> and everything else is bloody heresy
<Gurpartap> bnagy: haha :p
<Gurpartap> my best way's that i know. :p
ciopte7 has joined #ruby
sleetdrop has joined #ruby
williamcotton has quit [Quit: williamcotton]
h4mz1d has joined #ruby
manizzle has quit [Read error: No route to host]
<Hanmac> preferred method ? ... so if everyone use eval, because they dont know it better, is eval then the right way? oO
manizzle has joined #ruby
nowthatsamatt has left #ruby [#ruby]
<Gurpartap> for the time being, since they would be aware that they need something better later
seitensei has joined #ruby
<Gurpartap> that's why we'll have ruby 2.0 :p
<richo> Hanmac: My point was that metaprogramming is so subjective that any argument culminating in the "best" way is pointless
<richo> the only reasonable way to discuss it is with specific pros and cons to any given approach and a judgement call made at implementation time
jarred has quit [Read error: Connection reset by peer]
havenn has joined #ruby
wallerdev has quit [Quit: wallerdev]
hemanth has quit [Read error: Connection reset by peer]
brianpWins has quit [Quit: brianpWins]
hemanth has joined #ruby
Synthead has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 250 seconds]
imami|afk is now known as banseljaj
Bosma has joined #ruby
tvw has joined #ruby
maesbn has quit [Remote host closed the connection]
<austinbv> anyone have anyexperience with mocha and zombie
maesbn has joined #ruby
RainbowDashh has joined #ruby
timonv has quit [Remote host closed the connection]
senny has joined #ruby
Niamkik has joined #ruby
freezey has joined #ruby
seitensei has quit [Remote host closed the connection]
fantazo has quit [Remote host closed the connection]
djdb has joined #ruby
RainbowDashh has quit [Client Quit]
Gurpartap has quit [Ping timeout: 245 seconds]
jmuniz has joined #ruby
|ivan| has joined #ruby
jmuniz has quit [Client Quit]
uc has quit [Remote host closed the connection]
jmuniz has joined #ruby
jmuniz has left #ruby [#ruby]
vladiim has quit [Quit: vladiim]
ceradon has quit [Ping timeout: 255 seconds]
havenn has quit [Remote host closed the connection]
gtuckerkellogg has joined #ruby
h4mz1d has joined #ruby
<banisterfiend> Paradox: what's a jimmi
<Paradox> banisterfiend, a jimmy is the state
<Paradox> of being trolled
<Paradox> if a jimmy is rustling or has been rustled
<Paradox> someone has been trolled
L-----D has quit [Quit: Leaving]
LowKey has joined #ruby
<Paradox> so, p trolled if jimmies.rustled?
vladiim has joined #ruby
<otters> postfix if is difficult to write
ceradon has joined #ruby
<Paradox> but elegant to read
brianpWins has joined #ruby
<otters> yeah
RainbowDashh has joined #ruby
<Paradox> reads like english
andrewhl has quit [Remote host closed the connection]
<Paradox> probably the reason why so many goddamn DSLs use it
<otters> I usually put a modifier before the phrase if I'm going to use postfix if though
<otters> "only do xyz if abc"
<fowl> otters, try finding a good use for postfix while/until
andreime has joined #ruby
<otters> otherwise prefix if really makes more sense
<Paradox> my favorite is rescue ArgumentError unless (1..100).include? derp
<Paradox> or something similar
<Paradox> otters, i didnt know about the only trick
quest88 has quit [Quit: quest88]
<otters> "only" doesn't exist in ruby
<Paradox> aw shucks
<otters> I mean, that was a phrase in english
wargasm has quit [Read error: Connection reset by peer]
<Paradox> didnt think it did
<otters> you could define it as id
<Hanmac> but rescue false is evil
<otters> my favorite construct is while with no body
<otters> or for with no body
<Paradox> Hanmac, yeah, but makes bulletproof methods
h4mz1d has quit [Ping timeout: 272 seconds]
<Hanmac> the problem is that is even resuce fatal stuff
wargasm has joined #ruby
ph^ has joined #ruby
<Paradox> well you can invert it
LowKey has quit [Quit: changing servers]
<fowl> () until false
<Paradox> if this do method shit else rescue
<Paradox> but :/
jprovazn has joined #ruby
LowKey has joined #ruby
AlbireoX`Laptop has quit [Remote host closed the connection]
Morkel has joined #ruby
<shevy> lol
qwerxy has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
austinbv has quit [Ping timeout: 265 seconds]
hemanth has joined #ruby
kaisukaru has joined #ruby
brianpWins has quit [Ping timeout: 255 seconds]
austinbv has joined #ruby
<kaisukaru> What would be faster than ObjectSpace.each_object(Class)?
Criztian has joined #ruby
<Hanmac> i think its a bad way in general ...
<Hanmac> kaisukaru: what do you want?
wvdschel has joined #ruby
<Tasser> might anyone explain to me why nokogiri outputs &#xEC; in an xml document?
<kaisukaru> Hanmac: I need to know what classes are defined, and I need this to be fast (I am asking it more than once)
HaikuUser has joined #ruby
<Tasser> ... and not é
TPFC-SYSTEM has joined #ruby
brianpWins has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
jimeh has joined #ruby
ciopte7 has quit [Quit: ciopte7]
prometheus has quit [Ping timeout: 272 seconds]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
Ethan has joined #ruby
h4mz1d has joined #ruby
<cirwin> Tasser: serialize(:encoding => 'utf-8')
<Tasser> cirwin, apparently nokogiri messes stuff up nontheless here :-/
<cirwin> grumbledore
tonini has joined #ruby
<Hanmac> Tasser, show me your code
<Tasser> hmm, unicode fail I assume
bbuegler1 has quit [Quit: Leaving.]
<HaikuUser> Hello. Where can I read how "require" exactly works? It is very weird to me that modules and classes in the required file do appear in the current ns and variables don't :\
banseljaj is now known as imami|afk
vectorshelve has joined #ruby
iocor has joined #ruby
jgrevich has quit [Quit: jgrevich]
<Tasser> ... apparently not
<Paradox> HaikuUser, you can look at the source
<ryanf> HaikuUser: top-level variables are basically "script local"
hoelzro|away is now known as hoelzro
<ryanf> but ruby doesn't really have namespacing, so constants in files that you require will always be available
shadoi has quit [Quit: Leaving.]
<HaikuUser> "Script local"? Does it mean that these variables should be garbage-collected after file is loaded?
<vectorshelve> hemanth: hai bhai
<Paradox> take a look yourself
<HaikuUser> Paradox, thanks
<Paradox> its in lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb @ line 34:
h4mz1d has quit [Ping timeout: 245 seconds]
<cirwin> Paradox: I'm not sure the scoping rules are there
<Paradox> cirwin, i just did show-source require
<cirwin> so I see :)
workmad3 has joined #ruby
<cirwin> all the real juice is in gem_original_require
<Paradox> yup
<Paradox> but he wanted to see how require worked
<Paradox> not gem_original_require
<cirwin> ah
<Paradox> lol
ickmund has quit [Quit: ickmund]
ickmund has joined #ruby
monkegjinni has quit [Remote host closed the connection]
heftig has quit [Quit: leaving]
manizzle has quit [Read error: No route to host]
yxhuvud has joined #ruby
<shevy> HaikuUser what kind of variables? local variables like "foobar" can't be defined in other modules
<shevy> you could have a constant
<shevy> gaaaah it is raining and I have to leave here now... :(
adeponte has quit [Remote host closed the connection]
<HaikuUser> shevy, I meant usual local variables. I know that I can use constants, but I'm just trying to understant rationale behind ruby behaviour :)
zommi has joined #ruby
manizzle has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
<Paradox> HaikuUser, makes more sense than a lot of other ways
<Paradox> esp @@
hakunin has quit [Read error: Connection reset by peer]
<Paradox> @@ is so damn useful if you use it right
hakunin has joined #ruby
havenn has joined #ruby
schaerli has joined #ruby
<ryanf> most people try to avoid @@ actually
<ryanf> afaict
* cirwin agrees with ryanf
<cirwin> class-level @vars are supremely superiour
<ryanf> the main reason being that it has annoying behavior in class hierarchies
<ryanf> yep
<davidcelis> and cmon
<davidcelis> @@this_shit_is_ugly
<Paradox> i know
schaerli has quit [Remote host closed the connection]
<davidcelis> @@my_mother_never_loved_me
<Paradox> but recently i wrote an irc relay that used 2 threads of the same class
freezey has quit [Quit: freezey]
<Paradox> and it worked quite nicely
<davidcelis> @@please_just_kill_me
<Paradox> anyway
<davidcelis> Paradox: @@let_me_die
<Paradox> $no
<davidcelis> ಠ_ಠ
<Paradox> (づ。◕‿‿◕。)づ
<Paradox> (づಠ_ಠ)づ
<Paradox> (づಠ‿ಠ)づ
Eldariof-ru has joined #ruby
yugui_zzz is now known as yugui
freezey has joined #ruby
arturaz has joined #ruby
HaikuUser has quit [Ping timeout: 252 seconds]
yugui is now known as yugui_zzz
QaDeS has joined #ruby
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
austinbv has quit [Ping timeout: 240 seconds]
sleetdrop has quit []
kevinbond has quit [Quit: kevinbond]
<richo> ... wat
richo has quit [Quit: laterz, norbs.]
Helius has joined #ruby
RainbowDashh has joined #ruby
liuchong has joined #ruby
keymone has left #ruby [#ruby]
berserkr has joined #ruby
blacktulip has joined #ruby
wubino has joined #ruby
<ggreer> /人◕ ‿‿ ◕人\
<davidcelis> (╯°□°)╯︵ ┻━┻
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
artOfWar has quit [Ping timeout: 246 seconds]
<vectorshelve> ....................................
vladiim has left #ruby [#ruby]
dv_ has joined #ruby
RainbowDashh has joined #ruby
Niamkik has quit [Remote host closed the connection]
<Hanmac> … ... … ... … :P
<wubino> I am new to ruby and am comming from python
affix has quit [Ping timeout: 260 seconds]
<wubino> how can I create a list of hashs?
<wubino> I have tried this: http://pastebin.com/544P4NZe
<wubino> but when I run the script photos is an unkown object
bbuegler1 has joined #ruby
<hoelzro> wubino: that works for me
<hoelzro> is that the full script?
igotnolegs has quit [Quit: Computer has gone to sleep.]
indian has joined #ruby
<wubino> no
_md has joined #ruby
<hoelzro> wubino: please post the full script
dhruvasagar has joined #ruby
<wubino> I am running it on ruby 1.9 via pry
<hoelzro> and you're loading that file via pry?
tramm has joined #ruby
<wubino> hoelzro: yes. require "./file.rb"
<cirwin> wubino: local variables inside files don't get into the pry console
<hoelzro> wubino: I'm not a Ruby expert, but I'm pretty sure photos is local to that file
<cirwin> you'd have to use a global $photos = []
<cirwin> or define a method; def photos; []; end
Eldariof-ru has quit []
<wubino> thank you both
bbuegler1 has quit [Quit: Leaving.]
<wubino> $photos worked
roolo has joined #ruby
<cirwin> woot
<wubino> does it need to be explicit in the script $photos or can I just call it?
cantonic has joined #ruby
<wubino> explicit int he script I jsut tried it
qwerxy has quit [Quit: offski]
wvdschel is now known as ssspiff
Eldariof-ru has joined #ruby
timonv has joined #ruby
vlad_starkov has joined #ruby
<wubino> can I turn a hash into an instant object ( with reflection maybe??) ?
ryanf has quit [Quit: leaving]
ParadoxQuine has quit [Quit: ParadoxQuine]
<hoelzro> wubino: you mean so you can say h.foo instead of h['foo']?
<banisterfiend> wubino: Yeah, load it up through OpenStruct.new(hash)
wpaulson_ has joined #ruby
mockra has joined #ruby
<tramm> i'm trying localisation of date/time on ruby with i18n. do i really need to hardcode link to lang.yml in order to enable I18n.l(Time.now, :format => "%a") or alike? my code: http://pastebin.com/yiPY19BL
<wubino> hoelzro: yes
iocor has quit [Quit: Computer has gone to sleep.]
<hoelzro> wubino: see what banisterfiend said
<hoelzro> banisterfiend: that's a neat trick; I'll have to remember that =)
<banisterfiend> its not so good really
<hoelzro> oh? why not?
mockra has quit [Remote host closed the connection]
* tramm doesn't know any ruby, but thought localization would be built in somehow
skinny_much has joined #ruby
gilead has joined #ruby
bbuegler has joined #ruby
heftig has joined #ruby
<banisterfiend> hoelzro: cos you end up with an openstruct :)
<wubino> banisterfiend: works great, thanks
wpaulson has quit [Ping timeout: 245 seconds]
wpaulson_ is now known as wpaulson
jamesaxl has joined #ruby
<wubino> anyway to pull up a list of all the nonstandard methods on an object?
<banisterfiend> wubino: inside pry you mean?
<banisterfiend> and what on earth is nonstandard? :)
<wubino> nonstandard meaning not inherited from the standard library
<banisterfiend> wubino: ls -m obj, in pry
<wubino> in pry I tab twice and I can get thousands of methods on some objects
wargasm has quit [Ping timeout: 244 seconds]
<wubino> how can I get just the self.methods ?
ipoval has quit [Quit: ipoval]
<banisterfiend> wubino: i just told u
<banisterfiend> wubino: listen to what i say, or ill cut u
<banisterfiend> wubino: ls -m obj
<wubino> banisterfiend: I did but I got the OpenStruct#methods too
<wubino> banisterfiend: I admit its better then the normal way
<banisterfiend> wubino: well it tells u which is which :) i think we show both because it's generally more useful, and since showing openstruct's doesn't get in the way, why not ? :)
charliesome has joined #ruby
<icy`> hi, is there an easier way to step through an array, two elements at a time? I was doing 0.step(ar.size-1, 2) {|ind| <do stuff with ar[ind] and ar[ind+1]> } but this feels ugly
<banisterfiend> icy`: array.each_slice(2) { |a, b| }
<banisterfiend> icy`: though maybe u want each_cons(2)
<Hanmac> array.each_slice(2)
* icy` nods
<icy`> that's the one =)
BiHi has joined #ruby
perryh is now known as perryh_away
<icy`> i keep forgetting to look at the enumerable module when browsing array methods ;P
<icy`> thanks
Guest41099 has joined #ruby
freezey has left #ruby [#ruby]
igaiga has joined #ruby
CheeToS has quit [Ping timeout: 265 seconds]
|ivan| has quit []
|ivan| has joined #ruby
ciopte7 has joined #ruby
ssspiff has quit [Remote host closed the connection]
igaiga has quit [Remote host closed the connection]
BeLucid_ has quit [Remote host closed the connection]
neku has joined #ruby
smoochict has joined #ruby
ssspiff has joined #ruby
iori has quit [Remote host closed the connection]
rakunHo has joined #ruby
<smoochict> Hello
dr0p has joined #ruby
mengu has joined #ruby
ephemerian has joined #ruby
BeLucid has joined #ruby
zz_chrismcg is now known as chrismcg
tvw has quit [Ping timeout: 272 seconds]
tatsuya_o has joined #ruby
Criztian has quit [Remote host closed the connection]
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
nipra has quit [Read error: Operation timed out]
rakunHo_ has joined #ruby
rakunHo has quit [Ping timeout: 260 seconds]
nipra has joined #ruby
iocor has joined #ruby
monkegjinni has joined #ruby
cirwin has quit [Ping timeout: 255 seconds]
Floydzy has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<bbuegler> hello
<smoochict> hi bbuegler
<bbuegler> hey there
<smoochict> how come no one else is talking? lol
<bbuegler> well i don't know
<bbuegler> probably because there is no interesting question around
<smoochict> it's a ghost town lol
<smoochict> take a look at #python, so active compared to here
maletor has joined #ruby
francisfish has joined #ruby
dr0p has quit [Remote host closed the connection]
dekroning has joined #ruby
freeayu has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby
<hemanth> vectorshelve, yo
pk1001100011 has joined #ruby
Progster has joined #ruby
bbuegler has quit [Quit: Leaving.]
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
freeayu has joined #ruby
atmosx has joined #ruby
|ivan| has quit []
cousine has joined #ruby
bambanx has joined #ruby
<bambanx> hi
<smoochict> hi
<bambanx> guys how i can compare time example, time.now compared if is < to other time ?
kaisukaru has quit [Ping timeout: 255 seconds]
<Hanmac> time1 < time2 ?
<bnagy> mark=Time.now #do stuff p TIme.now - mark
<bambanx> yeah
<bambanx> i mean
<bambanx> my problem is how i can assign time to a variable , for example my Time.now is 2012-06-25 05:23:37 -0400 if i wanna assign 7pm to a variable a for example
<bambanx> p Time.now
<bambanx> a = "2012-06-25 05:23:37 -0400"
<bambanx> p Time.now < a
<bambanx> is not work
<bambanx> i should parse it?
<bnagy> a is a String there
<bnagy> read the docs for Time and find out how you can make Times out of Strings
<bnagy> from memory, new, strftime ...
<bnagy> you might also want to look at DateTime - it has a really easy to get along with parse method
<bambanx> ok
<bnagy> DateTime.parse '19:00'
qwerxy has joined #ruby
bbuegler has joined #ruby
darthdeus has joined #ruby
umttumt has quit [Remote host closed the connection]
<banisterfiend> what are ppls styles for git commit messages here? how many chars do you allow yourself on the first line?
gibsonfs has quit [Ping timeout: 255 seconds]
robotmay has joined #ruby
Guest41099 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
gibsonfs has joined #ruby
flype has joined #ruby
<wubino> how do I return only the keys for a hash?
<apeiros_> hash.keys
<apeiros_> I know, this must be very surprising :-p
<wubino> how do I find the type of an object?
<apeiros_> wubino: `ri Hash` in your console (bash/shell, not irb) shows you all methods for the class Hash
<Hanmac> object.class
<wubino> Thats what I thought but i must not be working with a hash
schovi has joined #ruby
<wubino> Hanmac: thanks that it
igaiga has joined #ruby
<bnagy> banisterfiend: personally, 50
<apeiros_> beware, some classes are evil and delegate .class (ActiveRecord/Rails is a notorious offender)
<bnagy> caise that's where gitX draws its ruler
<banisterfiend> bnagy: why 50
<banisterfiend> hmm
<banisterfiend> 50 is always too damn small
<bnagy> be more succinct
<banisterfiend> it's hard :P
<bnagy> and save it for the detailed desc :)
<Hanmac> apeiros_ Object.method(:class).bind(object).call :D
dr0p has joined #ruby
dr0p has quit [Read error: Connection reset by peer]
<apeiros_> Hanmac: I have a shortcut for that in my irbrc ;-)
dr0p has joined #ruby
dr0p has quit [Remote host closed the connection]
<Hanmac> how does it look?
tyman has quit [Quit: tyman]
<Paradox> banisterfiend, old versions of git shit themselves if the first line of a commit is longer than 50 chats
<apeiros_> def cm(obj, meth=:class, src=Object, *args)
<Paradox> chars
<apeiros_> so: `cm object` for this case
Floydzy has left #ruby [#ruby]
<Paradox> as for today, i don't believe in hard wraps
<Paradox> even nano can do word wrap
niklasb has joined #ruby
AllanMacGregor has joined #ruby
<banisterfiend> can someone name a bunch of gems with C extensions, preferably ones that are pure c with no ruby
<Paradox> uh…
<Paradox> sundown?
<Paradox> no, that has ruby bindings
fermion has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
<bambanx> exist some like include? example , givin two range a and b and return true if my time c is within this range ?
<Hanmac> bambanx (1..10).include?(3)
<smoochict> http://flaskapp.apps.ejl.im/ does this load fast or slow for you?
<bambanx> but how i can use this using times objects Hanmac ?
maesbn_ has joined #ruby
<bambanx> i need to know if my time.now is within 6:30pm - 6:40pm Hanmac
maesbn has quit [Ping timeout: 272 seconds]
<Hanmac> it should work for time objects too
ramblex has joined #ruby
<bambanx> but how i should write my time a and my time b , for assign to my variables? Hanmac
<banisterfiend> how do i split on "/lib/" or "/lib$" (where $ is regex end of line)
<Hanmac> range = DateTime.parse("6:30pm") .. DateTime.parse("6:40pm")
<banisterfiend> is this ok? /\/lib(\/|$)/
vlad_starkov has quit [Remote host closed the connection]
<sepp2k> banisterfiend: Not if you don't want to end up with a bunch of "/"s in the resulting array.
<sepp2k> Meaning you should make the group non-capturing.
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<hoelzro> I would use %r{...} as well
<banisterfiend> sepp2k: how would you do it?
<hoelzro> fewer leaning sticks =)
bluenemo has joined #ruby
vlad_starkov has joined #ruby
<Hanmac> bambanx ok parse("6:30pm") does not work ...
<Hanmac> oh it does?
<bambanx> nope
<bnagy> yeah it does
<sepp2k> banisterfiend: Like you did but with ?:. And probably using %r as hoelzro suggested.
Axsuul has quit [Remote host closed the connection]
<Hanmac> bambanx: (DateTime.parse("6:30pm") .. DateTime.parse("6:40pm")).cover?(DateTime.parse("6:35pm"))
<bambanx> this give me false all time , (DateTime.parse("6:30pm") .. DateTime.parse("6:40pm")).cover?(DateTime.parse("6:35pm")) Hanmac
<bambanx> sorry this:
<bambanx> range = DateTime.parse("6:00am") .. DateTime.parse("6:10am")
<bambanx> p range.include?(Time.now)
umttumt has joined #ruby
bluenemo has quit [Ping timeout: 240 seconds]
<Hanmac> bambanx ... depend on your time zone ... try range.cover?(Time.now)
<bambanx> false Hanmac
<sepp2k> Don't mix Time and DateTime.
<sepp2k> They're not comparable to each other.
<Hanmac> sepp2k in cover? they are
bhuey has joined #ruby
<bhuey> if I'm using Kernel.system("ls", n) where n is a string how can I deal with paths that have whitespace in them and have it quoted correctly by that shell command
<bhuey> ?
robotmay has quit [Remote host closed the connection]
<hoelzro> I thought system already did that...
* hoelzro checks the docs
<hoelzro> well, I mean that it properly handles quotes by passing the list of args directly to exec()
<bhuey> I'm getting something bizzare
banisterfiend has quit [Read error: Connection reset by peer]
<hoelzro> bhuey: oh?
bbuegler2 has joined #ruby
<bhuey> I have a list of pathnames that are quoted with %Q btw
federic has joined #ruby
<sepp2k> Hanmac: No, they're not.
bbuegler2 has left #ruby [#ruby]
<bhuey> is that correctly used ?
<hoelzro> bhuey: could you paste your code?
<bhuey> yeah where
<bhuey> ?
vampirnata has quit [Quit: leaving]
<hoelzro> gist? pastebin?
<hoelzro> just not here =)
kartheek has joined #ruby
bigkevmcd has quit [Ping timeout: 252 seconds]
kartheek has quit [Client Quit]
bigkevmcd has joined #ruby
bbuegler has quit [Ping timeout: 264 seconds]
<bhuey> shorten version of that list
<hoelzro> ok
<hoelzro> that's not really a list, though
<hoelzro> that's a string with embedded newlines
banisterfiend has joined #ruby
<bhuey> hmm
<bhuey> I'd like an array of strings
<hoelzro> throw a .split(/\n/) after the closing bracket
<bhuey> is that what it is ?
<bhuey> I do a %list.each and it prints out the correct pathnames
<bhuey> I mean $list.each {|n| code here...}
<hoelzro> bhuey: what version of Ruby are you on?
<bhuey> and it works perfectly
<bhuey> 1.8.x
<bhuey> under OS X
hemanth has quit [Read error: Connection reset by peer]
<hoelzro> that's because in 1.8, String#each iterates over the lines
AllanMacGregor has quit [Remote host closed the connection]
<sepp2k> bhuey: Only in 1.8 and only because String#each iterates by line in 1.8
<bhuey> 1.8.7
hemanth has joined #ruby
<hoelzro> but when you say system('ls', $lines), you're throwing a single filename at ls
<bhuey> hoelzro: yeah so that correct then right ? it's getting me the string that I need eh ?
<sepp2k> bhuey: Note that the string yielded by each will include the newline.
<hoelzro> and it's like "newlines, wtf?"
<bhuey> oh
<Hanmac> string.each is dead i would not use it
<bhuey> shit
<bambanx> Hanmac,
<hoelzro> so you should try system('ls', *$lines.split(/\n/))
<bambanx> this work Hanmac http://pastie.org/4147597
<bambanx> :)
<bhuey> with the "*" ?
<hoelzro> yes
<bhuey> is that a mistake or something special ?
<sepp2k> hoelzro: I don't think he wants to do one ls call on them all.
<hoelzro> it's the splat operator
<bhuey> sepp2k: correct, one at a time
* bhuey goes wtf
umttumt has quit [Remote host closed the connection]
<hoelzro> oh, that's fine too
<bhuey> never heard of that
<hoelzro> $lines.each_line do |line| system('ls', line) end
<hoelzro> does each_line including the newline at the end?
* bhuey googles for the splat op
<sepp2k> hoelzro: That's what he's doing now, that doesn't work because of the newline at the end
<bhuey> hoelzro: will that work as well ?
<hoelzro> sepp2k: ah, thanks
liuchong has quit [Quit: Leaving]
<hoelzro> bhuey: you'll probably need to chomp the line before passing it to ls
bluenemo has joined #ruby
<bhuey> ok
<bhuey> damn that blows
<sepp2k> bhuey: Do what you're doing now, but call .chomp on the filename to remove the newline. And use each_line instead of each for 1.9 compatibility.
KDr2 has quit [Remote host closed the connection]
<sepp2k> Or use .split("\n").each
<bhuey> chomp just removes the very last character ?
KDr2 has joined #ruby
<hoelzro> if it's a newline
<sepp2k> Or use an array of strings to begin with. That would be ["file name 1", "file name 2"]
<bhuey> ok
<bhuey> sepp2k: it's printed out as a text file that I'm converting over to a scrtip
<bhuey> script
<bhuey> love you guys
<bhuey> thanks :)
<sepp2k> Note that the version with the splat would have called ls once with all the filenames as arguments.
<bambanx> sleep 1 = one second ?
<bhuey> would have spent hours trying to figure this out
<bhuey> sepp2k and hoelzro thanks guys
<Hanmac> bambanx ... i knew why my code is not working ... its becuse of the f**king offset :/
<sepp2k> And what the splat does is to turn an array into a list of arguments, i.e. system("ls", *array) == system("ls", array[0], array[1], ..., array[-1])
<bambanx> lol
<bhuey> bad thing about unicode and and ruby on OS X is that it doesn't work right
<bambanx> gn thanks Hanmac , bnagy
bambanx has quit [Quit: Saliendo]
<bhuey> I wish I had a newer Ruby
<bhuey> sepp2k: that's cool
<bhuey> didn't know that it existed
<smoochict> bhuey, get RVM and install 1.9.3
* Hanmac has the newest ruby as system package
ramblex has quit [Quit: ramblex]
zii has joined #ruby
* bhuey installs a newer version of 'git'
KDr2 has quit [Ping timeout: 272 seconds]
schaerli has joined #ruby
bosphorus has joined #ruby
mpereira_ has quit [Ping timeout: 255 seconds]
mohits has quit [Remote host closed the connection]
eurek has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
* bhuey really loves Ruby as a scripting language
<bhuey> I get so much dirty work done in it without much fuss
<Paradox> its perl++
<Hanmac> sepp2k but i get still offset Problems
<Paradox> thats why its so awesome
<vectorshelve> When will windows 8 be released ?
cousine has quit [Remote host closed the connection]
gyre007 has joined #ruby
<bhuey> install 1.9.2 or 1.9.3 ?
neku has quit [Ping timeout: 272 seconds]
<bhuey> which is the latest stable stuff ?
<apeiros_> 1.9.3-p194
<bhuey> I just install it using a plain 1.9.3 on OS X
<Paradox> and 194 is just a security patch on rubygems
<bhuey> ok
<apeiros_> Paradox: no
<Paradox> well there are a few other things
<apeiros_> p194 is the patchlevel of ruby. not rubygems.
workmad3 has joined #ruby
<Paradox> i know
<Paradox> but that particular patch didnt do much outside rubygems
<apeiros_> it's also not only security related fixes. it contains bugfixes as well.
<apeiros_> Paradox: compared to what?
<Paradox> i dont know
<Paradox> the booze is starting to wear off and im starting to get tired
<Paradox> lol
<apeiros_> he didn't ask for the differences between the latest and the second latest patch.
ankakusu has joined #ruby
b26 has quit [Remote host closed the connection]
Foxandxss has joined #ruby
apok has quit [Quit: apok]
<zii> Has anyone here embedded mri into his C app?
heftig has quit [Ping timeout: 245 seconds]
umttumt has joined #ruby
cousine has joined #ruby
nari has quit [Ping timeout: 245 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
cousine has quit [Remote host closed the connection]
<ankakusu> Hi! I want to split the words in a string. I'm doing this by the following code:
<ankakusu> splitStr = str.split(/\b/)
freeayu has quit [Ping timeout: 245 seconds]
liluo has quit [Remote host closed the connection]
<ankakusu> is it a nice way to split the words? or do you suggest any other way?
iocor has quit [Ping timeout: 255 seconds]
dr_diamond has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<bnagy> if you want just the words, scan /\w+/
<bnagy> is traditional, anyway
Guedes has joined #ruby
<bhuey> ok night
<bhuey> and thanks again hoelzro and sepp2k
bhuey has left #ruby [#ruby]
ph^_ has joined #ruby
<banisterfiend> sepp2k: do u like our organization logo: https://github.com/pry (the gravatar at top left)
<ankakusu> ok. thanks bnagy.
iocor has joined #ruby
iocor has quit [Changing host]
iocor has joined #ruby
ben_m has joined #ruby
ph^ has quit [Ping timeout: 246 seconds]
wpaulson has quit [Ping timeout: 250 seconds]
kah_ has quit [Ping timeout: 260 seconds]
freeayu has joined #ruby
<sepp2k> banisterfiend: Looks fine. Though it kinda looks as if the P-cube was just softly leaning against the crowbar - it doesn't look as if any prying is going on :p
ryanw has left #ruby ["God gave us Rock 'n' Roll, but Satan gave us Heavy Metal!"]
hyperboreean has quit [Ping timeout: 272 seconds]
hyperboreean has joined #ruby
iocor has quit [Ping timeout: 250 seconds]
<zii> HA~!
<zii> What's ruby_sysinit for?
<banisterfiend> sepp2k: yeah ,there's more prying in the official logo i think: http://pry.github.com
jekhokie has joined #ruby
iocor has joined #ruby
Lachryma has joined #ruby
wpaulson has joined #ruby
Criztian has joined #ruby
Darkfang has joined #ruby
havenn has quit [Remote host closed the connection]
ramblex has joined #ruby
<Darkfang> Hi. Has anyone noticed noticed the horrible performances issues of Rby doc > 1.9.2 (vs 1.8.x) ?
<banisterfiend> Darkfang: wtf is Rby doc
<banisterfiend> never heard of Rby doc
<Darkfang> ruby doc / rdoc sorry
<banisterfiend> Darkfang: u mean during gem installation? i think most ppl turn it off
apincombe has joined #ruby
<Darkfang> I'm building my own Ruby module (from C) and building doc for users. It used to take ~30s and now takes over 10 minutes
<banisterfiend> Darkfang: what's your ruby module called?
<Darkfang> It's not available online. It's generated code for parsing/dumping databases
d3vic3 has joined #ruby
<Darkfang> It's about 100 classes and 4k methods alltogether
ramblex has quit [Client Quit]
ramblex has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
eurek has quit [Quit: Computer has gone to sleep.]
<Paradox> yardoc is better than rdoc anyway :p
Foxandxss has joined #ruby
freeayu has quit [Quit: 离开]
tk___ has joined #ruby
ZachBeta has joined #ruby
d3vic3 has quit [Ping timeout: 246 seconds]
fgwaegeawgfwa has left #ruby [#ruby]
apincombe has quit [Remote host closed the connection]
d3vic3 has joined #ruby
iocor has quit [Ping timeout: 245 seconds]
bier has quit [Ping timeout: 248 seconds]
atmosx has quit [Ping timeout: 276 seconds]
Progster has quit [Ping timeout: 260 seconds]
iocor has joined #ruby
mdaisuke_ has joined #ruby
flype has quit [Ping timeout: 252 seconds]
mayankkohaley has quit [Ping timeout: 250 seconds]
mdaisuke has quit [Ping timeout: 245 seconds]
flype has joined #ruby
mdaisuke_ has quit [Ping timeout: 248 seconds]
jekhokie has quit [Quit: Leaving]
frishi has joined #ruby
atmosx has joined #ruby
wpaulson has quit [Ping timeout: 245 seconds]
wpaulson has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
bier has joined #ruby
mwilson_ has quit [Excess Flood]
beilabs_ has quit [Ping timeout: 260 seconds]
mwilson_ has joined #ruby
beilabs__ has quit [Ping timeout: 265 seconds]
<zii> Any idea how to trace where is method defined?
<zii> Tired of resultless grepping.
<apeiros_> obj.method(:name).source_location
<workmad3> zii: you can do it with pry, or you can (in, 1.9) do 'some_obj.method(:method_name).source_location'
<apeiros_> only works for methods defined in ruby
<workmad3> apeiros_: :)
<zii> Nice.
<apeiros_> and yes, pry makes the whole thing easier: `$ obj.methodname` and `? obj.methodname`
ZachBeta has joined #ruby
chrislgibson has joined #ruby
nanderoo has joined #ruby
deryl has quit [Quit: deryl]
carloslopes has joined #ruby
<wubino> any good reads on developing / running rails apps locally
<wubino> locally => for local machine use in lieu of gui programming
<apeiros_> wubino: #rubyonrails
BiHi has joined #ruby
indian has quit [Ping timeout: 240 seconds]
liluo has joined #ruby
beilabs__ has joined #ruby
_md has quit [Quit: Leaving...]
<Paradox> i just threw out all my local documentation and got 6 gb back
eurek has joined #ruby
<Paradox> jesus
hemanth has quit [Read error: Connection reset by peer]
beilabs_ has joined #ruby
hemanth has joined #ruby
<ankakusu> Suppose I have a hash such as: game = [ [ "hede", "x" ], [ "hodo", "y" ] ] and I want to check whether the key value is equal to "x" or "y". Do you have any idea to do this?
chintanparikh has joined #ruby
<apeiros_> that's not a hash
indian has joined #ruby
<apeiros_> hashes are those things with the curly braces: {"hede" => "x", "hodo" => "y"}
<chintanparikh> Hey everyone. Is it possible to create a ruby script (say hello.rb) that's accessible by typing `hello` in the command line?
<hoelzro> chintanparikh: just call it hello
<apeiros_> chintanparikh: sure. as with every other language
<hoelzro> and set your shebang line appropriately
<apeiros_> and chmod it correctly
<workmad3> chintanparikh: call it 'hello' add a shebang, chmod +x it and add '.' to your PATH
<ankakusu> apeiros_ ok. Lets say (key,value) pair. Thanks for correction.
<workmad3> chintanparikh: or put it in a dir already in your PATH
<chintanparikh> Gotcha, cheers guys
<workmad3> chintanparikh: unless you're talking windows...
<chintanparikh> Wait, so I wouldn't need ruby hello.rb
<chintanparikh> Haha no, I'm not
<chintanparikh> Though, I may need to add support for it at some time
timonv has quit [Remote host closed the connection]
<chintanparikh> But eh, who cares about them
hemanth has quit [Read error: Connection reset by peer]
<workmad3> chintanparikh: if you have a #! line, that tells the shell what to run it with
<chintanparikh> Got it
<chintanparikh> Cheers mate
geekbri has joined #ruby
gyre007 has quit [Quit: Ex-Chat]
<workmad3> chintanparikh: '#!/usr/bin/env ruby' is probably what you want btw
<chintanparikh> Yup :)
hemanth has joined #ruby
timonv has joined #ruby
umttumt has quit [Remote host closed the connection]
larissa has joined #ruby
<chintanparikh> After putting the shebang bit in, how do I handle requires?
Progster has joined #ruby
<chintanparikh> As this seems to have broken the requires
<hoelzro> chintanparikh: your script is broken up into several files?
<Hanmac> use require_relative
Phlogistique has quit [Quit: leaving]
<chintanparikh> Nope, just a single, but it requires 'time' and 'yaml'
<chintanparikh> Hanmac: Cheers
<hoelzro> chintanparikh: what does 'which ruby' print out?
<hoelzro> actually, that probably wont help
<hoelzro> nevermind
<chintanparikh> Actually, require_relative isn't what I need
<chintanparikh> Hmm
<Hanmac> 'time' isnt something from the stdlib
umttumt has joined #ruby
<Mon_Ouie> It is, just like yaml
Darkfang has left #ruby [#ruby]
<chintanparikh> Yah, allows you to do Time.now, etc
<Mon_Ouie> Except Time.now is already in core, but some time methods aren't
rbanffy has joined #ruby
<Hanmac> oO i can do Time.now without require "time" oO
<chintanparikh> Oh, in that case I can probably remove time :)
<apeiros_> ankakusu: I'm not sure what your question is. if you have a key and a hash, then you can do hash[key] to get the value
<Mon_Ouie> e.g. Time.parse is in stdlib
<chintanparikh> :D
<apeiros_> and you can use that value to compare it to whatever you want
<chintanparikh> Any chance YAML.load is in stdlib haha?
<Mon_Ouie> It is, just like the whole YAML library — are you sure you know what I mean by "stdlib"?
<Mon_Ouie> stdlib is a set of libraries that come with ruby, but you still need to require them to use them
<apeiros_> Mon_Ouie: sadly the apt maintainers don't know what is meant by 'stdlib' :(
<chintanparikh> Ah
<apeiros_> /randomrant
<chintanparikh> Right, in that case, I do need require 'time'
iamlacroix has joined #ruby
mucker has joined #ruby
<chintanparikh> So that's what's brekaing then? The stdlib stuff when I add the shebang?
freeayu has joined #ruby
lxsameer has joined #ruby
<ankakusu> apeiros_, my key value pair is as follows: game = [ [ "hede", "x" ], [ "hodo", "y" ] ]
<ankakusu> the following code is as follows:
<ankakusu> game.each { |key,value| puts value == [/[^xyz]/]}
<apeiros_> ankakusu: and why don't you use a hash?
<Mon_Ouie> Probably not. Hard to guess what you mean by "broken" though…
lxsameer has quit [Max SendQ exceeded]
<chintanparikh> I'll post code + errors, two seconds
Faris has joined #ruby
<apeiros_> ankakusu: also not sure what you want to do with puts value == [/[^xyz]/]
<ankakusu> let me explain
<apeiros_> I'd assume what you wanted to do is: puts value if value =~ /[^xyz]/
<ankakusu> I want to check whether the values are equal to x,y,z or not
<ankakusu> I just print the values to console to debug the code.
<chintanparikh> Code's pretty terrible
<chintanparikh> Actually, looking at that, I'd say the Shebang isn't working?
<Mon_Ouie> How are you running your script?
<chintanparikh> script_name on the command line
<chintanparikh> In this case `timetracker`
<chintanparikh> If I do `ruby timetracker` it works perfectly
<Mon_Ouie> Unless that directory is in your $PATH, you'd normally need to use ./timetracker
<chintanparikh> It is on my path :)
<ankakusu> apeiros_, but even though the "value" is different than x,y,z the result is always false.
<ankakusu> in codes:
<Mon_Ouie> ankakusu: That's because value isn't [/[^xyz]/] — which isn't "x" or "y" or "z"
<Mon_Ouie> It's an array containing a regexp
<chintanparikh> I might have the shebang line wrong, is there a way to find what it should be?
`brendan has joined #ruby
<Mon_Ouie> It should be just that
y2h4ck has joined #ruby
<chintanparikh> Hm
gregorg_taf has joined #ruby
<chintanparikh> Could it be because I'm using RVM?
gregorg has quit [Read error: Connection reset by peer]
<Mon_Ouie> Maybe if it's not set up properly although it would be weird
<ankakusu> Mon_Ouie, can you check the code http://pastebin.com/Z2ZVuF9A please? I explained my question in more detail.
<chintanparikh> Any idea how I'd check?
Spooner has joined #ruby
<Mon_Ouie> chintanparikh: Ask on #rvm if it could be related
<Mon_Ouie> ankakusu: value still is a string, not an array
* matti winks at Mon_Ouie
<Mon_Ouie> See what apeiros_ suggested
<Mon_Ouie> 'alut matti ;)
<matti> So banisterfiend can be offended again ;p
<matti> Mon_Ouie: Hi hi
<matti> ;]
iamjarvo has joined #ruby
heftig has joined #ruby
mvangala_home has joined #ruby
mucker has quit [Quit: leaving]
nipra has quit [Ping timeout: 272 seconds]
<chintanparikh> Mon_Ouie: Will do, thanks for the help
chintanparikh has left #ruby [#ruby]
frishi has quit [Quit: Leaving...]
Nigel has quit [Remote host closed the connection]
abionic has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
krusty_ar has joined #ruby
ABK has quit [Ping timeout: 240 seconds]
Dreamer3 has joined #ruby
chintanparikh has joined #ruby
emmanuelux has joined #ruby
iamlacroix has quit [Remote host closed the connection]
<chintanparikh> Fixed my issue. I'm an idiot, I renamed the file to remove the .rb extension and was still editing the old file in my text editor
<chintanparikh> So the shebang wasn't on the new file D:
Nigel has joined #ruby
<workmad3> chintanparikh: d'oh :)
ciopte7 has quit [Quit: ciopte7]
Faris has quit [Ping timeout: 260 seconds]
havenn has joined #ruby
freeayu has quit [Ping timeout: 265 seconds]
juo100 has joined #ruby
atmosx has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
freeayu has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
`brendan has joined #ruby
skinny_much has quit [Quit: Linkinus - http://linkinus.com]
ph^_ has quit [Remote host closed the connection]
chson has quit [Remote host closed the connection]
lorandi has joined #ruby
ph^ has joined #ruby
seoaqua has joined #ruby
vectorshelve has quit [Quit: Page closed]
rbanffy has quit [Quit: Ex-Chat]
awarner has joined #ruby
banghouse has quit [Remote host closed the connection]
wangr has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
skinny_much has joined #ruby
Faris has joined #ruby
nari has joined #ruby
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
Faris has left #ruby [#ruby]
jjp has quit [Remote host closed the connection]
smoochict has quit [Ping timeout: 248 seconds]
hunglin has joined #ruby
telling has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
wataken44 has quit [Remote host closed the connection]
liluo has quit [Remote host closed the connection]
wataken44 has joined #ruby
jjp has joined #ruby
fantazo has joined #ruby
selvakumaran has joined #ruby
liluo has joined #ruby
vlad_sta_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
wubino has quit [Quit: Leaving]
_md has joined #ruby
hemanth has joined #ruby
td123 has joined #ruby
krusty_ar_ has joined #ruby
krusty_ar has quit [Ping timeout: 260 seconds]
yoklov has joined #ruby
vlad_starkov has quit [Read error: Operation timed out]
<selvakumaran> How can i implement 2D array in ruby?
theRoUS has quit [Ping timeout: 260 seconds]
yoklov has quit [Client Quit]
atmosx has quit [Ping timeout: 276 seconds]
iocor has quit [Quit: Computer has gone to sleep.]
<Spooner> selvakumaran : Just have an array of arrays
fmcgeough has joined #ruby
mdaisuke has joined #ruby
Guest43857 has quit [Ping timeout: 240 seconds]
<selvakumaran> Spooner, Yup
<selvakumaran> QKO, i got it., thanks
hoelzro is now known as hoelzro|away
vlad_sta_ has quit [Ping timeout: 260 seconds]
hoelzro|away is now known as hoelzro
vlad_starkov has joined #ruby
Cork has quit [Remote host closed the connection]
RainbowDashh has quit [Read error: No route to host]
RainbowDashh has joined #ruby
mayankkohaley has joined #ruby
tommyvyo has joined #ruby
atmosx has joined #ruby
Cork has joined #ruby
bem has joined #ruby
cakehero has joined #ruby
bem has quit [Remote host closed the connection]
k_89 has quit [Ping timeout: 260 seconds]
bem has joined #ruby
tvw has joined #ruby
cuppsy has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
awarner has quit [Remote host closed the connection]
jxf has joined #ruby
crankycoder has joined #ruby
mwilson_ has quit [Excess Flood]
liluo has quit [Remote host closed the connection]
mwilson_ has joined #ruby
iocor has joined #ruby
jrist-afk is now known as jrist
dv310p3r has joined #ruby
b26 has joined #ruby
rorider has joined #ruby
KDr2 has joined #ruby
<rorider> join #rubyonrails
<rorider> oops
<rorider> x)
tzvi has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
<bem> Hello, I'm looking to implement an oauth2/xauth service provider. I've been looking around the web for an *active* project, but hvae been unable to find this (most proejcts haven't been updated for months or years). Am I missing something , or will I have to write my own OAuth 2 provider (seems somewhat crazy…)? Thank you...
the_jeebster has joined #ruby
iamjarvo has joined #ruby
igaiga has quit [Remote host closed the connection]
mwilson_ has quit [Excess Flood]
krusty_ar_ is now known as krusty_ar
mwilson_ has joined #ruby
chrislgibson has quit [Quit: Linkinus - http://linkinus.com]
rorider has quit [Quit: Leaving]
reverseblade has joined #ruby
<reverseblade> si14, you are an idiot
<reverseblade> just wanted to tell you
reverseblade has left #ruby ["Leaving"]
ph^ has joined #ruby
explody has quit [Remote host closed the connection]
Sgeo_ has joined #ruby
explody has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
JStoker has quit [Excess Flood]
mwilson_ has quit [Excess Flood]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Sgeo_ has left #ruby [#ruby]
mwilson_ has joined #ruby
bbuegler has joined #ruby
bbuegler has quit [Client Quit]
gianlucadv has quit [Ping timeout: 272 seconds]
y2h4ck has quit [Quit: Leaving]
shevy has quit [Ping timeout: 260 seconds]
kedare has joined #ruby
nari has quit [Ping timeout: 248 seconds]
eurek has quit [Quit: Computer has gone to sleep.]
chintanparikh has left #ruby [#ruby]
skinny_much has quit [Quit: Leaving...]
DanBoy_ has joined #ruby
atmosx has quit [Quit: Changing server]
jgrevich has joined #ruby
atmosx has joined #ruby
indstry has joined #ruby
atmosx has quit [Client Quit]
atmosx has joined #ruby
JStoker has joined #ruby
bbuegler has joined #ruby
selvakumaran has quit [Ping timeout: 264 seconds]
chson has joined #ruby
rook_flood has joined #ruby
dr_diamond has quit [Quit: Bye !]
bem has quit [Quit: bem]
shevy has joined #ruby
plastics has joined #ruby
delinquentme has joined #ruby
EzeQL has joined #ruby
<delinquentme> when using RVM ... what shows up with "gem list" are those files which should be made available through using require 'rubygems'
<delinquentme> right?
undeclaredx has quit [Disconnected by services]
kevinbond has joined #ruby
<Spooner> delinquentme you only need to require 'rubygems' in 1.8.7, but yes, those are the available gems for that version of Ruby
eurek has joined #ruby
<delinquentme> so ive got require 'rubygems'
<delinquentme> and verified that a gem is installed
<delinquentme> however its unavailable when i specifically attempt to include it with " require 'bio' "
telling has joined #ruby
telling has quit [Changing host]
telling has joined #ruby
alup has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<banisterfiend> delinquentme: sounds like bundler retardation
vlad_starkov has joined #ruby
carlyle has joined #ruby
TheHunter_1039 has joined #ruby
<novochar> i'm wanting to make something like a pointer to another variable
lorandi has quit [Ping timeout: 252 seconds]
<novochar> that is, i have an array and i don't like it's name
flip_digits has joined #ruby
blast_hardcheese has quit [Ping timeout: 248 seconds]
<novochar> i want to change it from i_of to iof
<novochar> i was wanting to do i_of = iof
<novochar> but i think it's complaining because iof hasn't been declared
<hoelzro> novochar: do you mean iof = i_of?
niklasb has joined #ruby
<Hanmac> pointer? ... ruby does not have some kind of pointer
uris has joined #ruby
`gregorg` has quit [Changing host]
`gregorg` has joined #ruby
rakunHo has joined #ruby
`gregorg` is now known as gregorg
wallerdev has joined #ruby
zii is now known as herro87
awarner has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
herro87 has quit [Quit: WeeChat 0.3.8]
z1 has joined #ruby
z1 is now known as herro87
vlad_starkov has joined #ruby
rakunHo_ has quit [Ping timeout: 260 seconds]
pu22l3r has joined #ruby
herro87 is now known as s8
<shevy> delinquentme normally when this gem is installed, and shows up in the gem list, requiring it works. perhaps RVM is being silly
blast_hardcheese has joined #ruby
s8 has quit [Changing host]
s8 has joined #ruby
Caius has quit [Ping timeout: 252 seconds]
pradeepto has quit [Remote host closed the connection]
<shevy> novochar you can "alias" a variable to another variable. x = y = [1,2,3]
<shevy> and when you modify one, you modified the same object
<shevy> so it is a "pointer"
ananthakumaran has quit [Quit: Leaving.]
<Spooner> shevy everything in Ruby is a reference, not a pointer (although some immediates just "act" like references).
<sepp2k> shevy: That's not a pointer to a variable though.
<hoelzro> aren't Fixnums not references?
<Hanmac> fixnums, bool, and symbol are differect
<sepp2k> hoelzro: I imagine that's what he meant by "some immediates just act like references"
blast_hardcheese has quit [Read error: Operation timed out]
<hoelzro> oh, I didn't see that bit
whitenoise has joined #ruby
<novochar> if variable a is already declared, how do you instantiate another variable (var b) as a reference/pointer to variable a
monkegjinni has quit [Remote host closed the connection]
<hoelzro> novochar: b = a
<sepp2k> novochar: You can't have references to variables in ruby. Just references to objects.
<sepp2k> hoelzro: Again: that's *not* a reference or pointer to a variable.
<hoelzro> ah, sorry
<hoelzro> I'm only reading half the sentence =/
abra has quit [Ping timeout: 276 seconds]
Caius has joined #ruby
<Spooner> Yes, fixnums et al are stored as immediate values in the value which would be the pointer to the referenced object (not sure I'm explaining that as well as I could). However, they act, to all intents and purposes, like references to objects, so you don't need to worry about the implementation details.
krz has quit [Read error: Connection timed out]
<sepp2k> novochar: I'm not quite clear what you want to accomplish. You said you don't like the name of your variable... why not just rename the variable?
alup has joined #ruby
senny has quit [Remote host closed the connection]
lorandi has joined #ruby
<shevy> novochar use what hoelzro wrote
Caius has quit [Ping timeout: 252 seconds]
juo100 has quit [Quit: juo100]
monkegjinni has joined #ruby
beilabs__ has quit [Ping timeout: 245 seconds]
beilabs_ has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
blacktulip has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
blacktulip has joined #ruby
sailias has joined #ruby
xaq has joined #ruby
rbanffy has joined #ruby
wallerdev has quit [Quit: wallerdev]
glutton has quit [Ping timeout: 245 seconds]
tankhates has joined #ruby
k_89 has joined #ruby
Caius has joined #ruby
abra has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
senny has joined #ruby
Araxia_ has quit [Quit: Araxia_]
jxf has quit [Read error: Connection reset by peer]
jxf has joined #ruby
lorandi has quit [Ping timeout: 260 seconds]
deryl has joined #ruby
Ethan has quit [Quit: bestest breastests]
g0bl1n has joined #ruby
joshman_ has joined #ruby
beilabs__ has joined #ruby
beilabs_ has joined #ruby
tiripamwe has joined #ruby
robotmay has joined #ruby
randomautomator has joined #ruby
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 255 seconds]
kpshek has joined #ruby
andrewhl has joined #ruby
eurbach has joined #ruby
tonini has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
td123 has quit [Quit: WeeChat 0.3.8]
pdtpatrick has joined #ruby
markab has quit [Quit: Leaving.]
markab has joined #ruby
kedare|2 has joined #ruby
sbanwart has joined #ruby
cakehero has joined #ruby
mnaser has joined #ruby
kedare has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
tiripamwe2 has joined #ruby
CheeToS has joined #ruby
ben_m has left #ruby ["Leaving"]
tiripamwe has left #ruby [#ruby]
prometheus has joined #ruby
dr0p has joined #ruby
wvms has quit [Read error: Connection reset by peer]
wvms has joined #ruby
deryl has quit [Quit: Time To Go, Too Bad, So Sad!]
abionic has quit [Ping timeout: 245 seconds]
niklasb has quit [Ping timeout: 244 seconds]
mnaser has quit [Ping timeout: 240 seconds]
prometheus has quit [Ping timeout: 240 seconds]
chomp has joined #ruby
nimred has quit [Ping timeout: 265 seconds]
bbuegler has quit [Quit: Leaving.]
Vendethiel has joined #ruby
mnaser has joined #ruby
plastics has quit [Ping timeout: 272 seconds]
jcromartie has joined #ruby
beilabs_ has quit [Ping timeout: 265 seconds]
oooPaul has joined #ruby
beilabs__ has quit [Ping timeout: 264 seconds]
Progster has quit [Ping timeout: 260 seconds]
deryl has joined #ruby
mdaisuke has quit [Remote host closed the connection]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
senny has quit [Remote host closed the connection]
ben_alman has quit [Excess Flood]
workmad3 is now known as workmad
workmad is now known as workmad4
workmad4 is now known as workmad5
workmad5 is now known as workmad3
theRoUS has joined #ruby
lorandi has joined #ruby
indstry has quit [Remote host closed the connection]
workmad3 is now known as workmad9000
zommi has quit [Remote host closed the connection]
itnomad has joined #ruby
workmad9000 is now known as workmad3
ychaouche has joined #ruby
ychaouche has left #ruby ["Leaving"]
krz has joined #ruby
workmad3 is now known as workmad2
workmad2 is now known as workmad3
andreime has quit [Quit: Lost terminal]
workmad3 is now known as workmad1
workmad1 is now known as workmad3
senny has joined #ruby
uris has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
tiripamwe2 has quit [Quit: Leaving]
mahmoudimus has joined #ruby
SQLStud has joined #ruby
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
ben_alman has joined #ruby
zemanel has joined #ruby
tk___ has quit [Quit: ばいばい]
jparishy has joined #ruby
beilabs__ has joined #ruby
beilabs_ has joined #ruby
senny has quit [Remote host closed the connection]
wangr has quit [Ping timeout: 240 seconds]
narshlob has quit [Quit: leaving]
senny has joined #ruby
hex`` has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
darthdeus has quit [Ping timeout: 265 seconds]
senny has quit [Remote host closed the connection]
sbanwart_ has joined #ruby
ghanima has joined #ruby
senny has joined #ruby
sbanwart has quit [Ping timeout: 252 seconds]
sbanwart_ has quit [Client Quit]
ceradon has quit [Ping timeout: 245 seconds]
bbuegler1 has joined #ruby
thone has joined #ruby
d3c has joined #ruby
tymat has joined #ruby
Kevin__ has joined #ruby
jprovazn is now known as jprovazn_away
KDr2 has quit [Remote host closed the connection]
fulmato has joined #ruby
thone_ has quit [Ping timeout: 248 seconds]
liluo has joined #ruby
rbanffy has quit [Quit: Ex-Chat]
ckrailo has joined #ruby
rbanffy has joined #ruby
monkegjinni has quit [Remote host closed the connection]
Sou|cutter has joined #ruby
rbanffy has quit [Remote host closed the connection]
d3c has quit [Read error: Connection reset by peer]
mucker has joined #ruby
cantonic has quit [Quit: cantonic]
schaerli has quit [Remote host closed the connection]
andrewhl has joined #ruby
schaerli has joined #ruby
larissa has quit [Quit: Saindo]
Spooner has quit [Ping timeout: 264 seconds]
josefig has joined #ruby
jianxioy has quit [Quit: leaving]
mikepack has joined #ruby
prometheus has joined #ruby
blast_hardcheese has joined #ruby
schaerli has quit [Ping timeout: 260 seconds]
<lectrick> I want to String#split on space characters, NOT just whitespace (ex: I don't want to split on tabs). Unfortunately, both String#split(' ') and String.split(/\s/) will split tabs and spaces so when I later .join, I have no idea what to join on. Anyone?
quest88 has joined #ruby
<markab> gsub out the tabs?
<apeiros_> lectrick: um, that's not correct
<apeiros_> str.split(' ') will not split on tabs.
atmosx has quit [Ping timeout: 276 seconds]
<lectrick> apeiros_: Check the docs. String.split(' ') will split on tabs too.
<apeiros_> wtf…
<apeiros_> it does…
wvms has quit [Quit: wvms]
<apeiros_> well, / / does not
yonggu_ has joined #ruby
<lectrick> apeiros_: >> "word\ttab".split(' ')
<lectrick> => ["word", "tab"]
<apeiros_> lectrick: use / / instead of ' '
baroquebobcat has joined #ruby
<lectrick> apeiros_: let me try
<apeiros_> must be one of those f*d up special cases…
rbanffy has joined #ruby
* apeiros_ is glad now he never uses strings as argument to String#split
<lectrick> apeiros_: Yes, yes it was. I covered it with a test and boom :) But thanks for the / / answer!!
<lectrick> apeiros_: Also just FYI, String#split(' ') will also treat all runs of spaces as one space (!)
<apeiros_> this is a serious wtf…
<lectrick> :)
hemanth has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
uris has joined #ruby
<apeiros_> yeah, usually split(str) is split(Regexp.escape(str))
<apeiros_> but seems split(' ') is split(/\s+/)
hemanth has joined #ruby
<lectrick> I don't mind it... Like you I tend to use regexes there anyway, which are much more concise
<lectrick> apeiros_: yeah i think it specifically special-cases that input
yonggu has quit [Ping timeout: 260 seconds]
kill-9_ has joined #ruby
ixti has joined #ruby
flype has joined #ruby
ixti has quit [Client Quit]
ixti has joined #ruby
davidcelis has quit [Ping timeout: 244 seconds]
tymat has quit [Quit: kthnxbye!]
jrist is now known as jrist-mtg
kenperkins has quit [Quit: Computer has gone to sleep.]
prometheus has quit [Ping timeout: 264 seconds]
Synthead has joined #ruby
maesbn_ has quit [Remote host closed the connection]
zacstewart has left #ruby [#ruby]
niklasb has joined #ruby
nowthatsamatt has joined #ruby
quest88 has quit [Quit: quest88]
eurek has quit [Quit: Computer has gone to sleep.]
williamcotton has joined #ruby
liluo has quit [Remote host closed the connection]
atmosx has joined #ruby
cantonic has joined #ruby
bbuegler1 has quit [Quit: Leaving.]
williamcotton has quit [Client Quit]
ryan0x2 has joined #ruby
apeiros_ has quit [Remote host closed the connection]
carloslopes has quit [Ping timeout: 252 seconds]
bbuegler has joined #ruby
bbuegler has left #ruby [#ruby]
mikepack has quit [Read error: Connection reset by peer]
g0bl1n has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
nowthatsamatt has left #ruby [#ruby]
mikepack has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
lupine_85 has quit [Ping timeout: 248 seconds]
lorandi has quit [Quit: Leaving]
dekroning has quit [Ping timeout: 255 seconds]
abionic has joined #ruby
jrist-mtg is now known as jrist
abionic has quit [Read error: Connection reset by peer]
gilead has quit [Quit: Leaving]
abionic has joined #ruby
abionic has quit [Read error: Connection reset by peer]
cbuxton has joined #ruby
Spooner has joined #ruby
altious has joined #ruby
kedare|2 has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
abionic has joined #ruby
abionic has quit [Read error: Connection reset by peer]
itnomad has quit [Quit: Leaving]
abionic has joined #ruby
abionic has quit [Read error: Connection reset by peer]
mfridh has joined #ruby
mdhopkins has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
mdhopkins has left #ruby [#ruby]
tcopp has joined #ruby
Beoran_ has quit [Read error: Operation timed out]
freeayu has quit [Ping timeout: 272 seconds]
tatsuya_o has quit [Remote host closed the connection]
williamcotton has joined #ruby
sleetdrop has joined #ruby
mdaisuke has joined #ruby
headius has joined #ruby
Eldariof-ru has quit [Ping timeout: 265 seconds]
macmartine has joined #ruby
sleetdrop has quit [Client Quit]
headius has quit [Client Quit]
hoelzro is now known as hoelzro|away
freeayu has joined #ruby
kenichi has joined #ruby
tatsuya_o has joined #ruby
jonathancutrell has joined #ruby
mdaisuke has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby
mikepack has joined #ruby
prometheus has joined #ruby
ph^ has quit [Remote host closed the connection]
abra has quit [Ping timeout: 276 seconds]
ph^ has joined #ruby
abra has joined #ruby
kenperkins has joined #ruby
havenn has quit [Remote host closed the connection]
tiripamwe has joined #ruby
<tramm> i still wonder about date/time localization in ruby... do i really always need to independently provide lang.yml with my code if i use I18n.localize(Time.now, :format => "%a")?
rippa has joined #ruby
kevinbond has quit [Quit: kevinbond]
ph^ has quit [Ping timeout: 250 seconds]
berserkr has quit [Quit: Leaving.]
getbitcoin1 has joined #ruby
Beoran_ has joined #ruby
aantix has joined #ruby
flype has quit [Ping timeout: 252 seconds]
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
emmanuelux has quit [Ping timeout: 252 seconds]
rakm has joined #ruby
abra has quit [Quit: Leaving]
flype has joined #ruby
graspee has joined #ruby
carloslopes has joined #ruby
bradhe has quit [Remote host closed the connection]
jxf has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
moted has joined #ruby
bricker88 has joined #ruby
tyman has joined #ruby
Progster has joined #ruby
lupine_85 has joined #ruby
altious has quit [Quit: Leaving]
ananthakumaran has quit [Quit: Leaving.]
rizzylt has joined #ruby
jparishy is now known as jparishy`lunch
artOfWar has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
artOfWar_ has joined #ruby
dekroning has joined #ruby
ipoval has joined #ruby
minijupe has joined #ruby
wubino has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
<wubino> anyone get a redcar.desktop file to launch correctly on ubuntu?
mneorr1 has joined #ruby
krusty_ar has joined #ruby
stkowski has joined #ruby
cirwin has joined #ruby
CheeToS has quit [Ping timeout: 272 seconds]
artOfWar has quit [Ping timeout: 245 seconds]
savage- has joined #ruby
schovi has quit [Remote host closed the connection]
mikepack has quit [Read error: Connection reset by peer]
rbanffy has quit [Ping timeout: 240 seconds]
mneorr has quit [Ping timeout: 245 seconds]
brianpWins has quit [Quit: brianpWins]
Helius has quit [Remote host closed the connection]
litheum has left #ruby [#ruby]
iocor has quit [Quit: Computer has gone to sleep.]
dekroning has quit [Ping timeout: 272 seconds]
jimeh has quit [Ping timeout: 265 seconds]
adeponte has joined #ruby
francisfish has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
erichmenge has joined #ruby
mikepack has joined #ruby
maletor has joined #ruby
RainbowDashh is now known as in
bradhe has joined #ruby
kkiero has quit [Ping timeout: 260 seconds]
tvw has quit [Remote host closed the connection]
kkiero has joined #ruby
senny has quit [Remote host closed the connection]
ipoval has quit [Quit: ipoval]
josefig has quit [Ping timeout: 260 seconds]
abra has joined #ruby
cirwin has quit [Ping timeout: 260 seconds]
AlbireoX`Laptop has joined #ruby
minijupe has quit [Quit: minijupe]
niku4i has joined #ruby
headius has joined #ruby
jonathancutrell has quit [Quit: jonathancutrell]
tewecske has joined #ruby
jonathancutrell has joined #ruby
in is now known as RainbowDashh
AlbireoX`Laptop has quit [Remote host closed the connection]
lexy0202 has joined #ruby
Guest71971 has joined #ruby
carlyle has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
headius has quit [Ping timeout: 265 seconds]
QaDeS has quit [Quit: Ex-Chat]
<jonathancutrell> Does anyone in here know how to filter out params from logging in Sinatra? (already asked in #sinatra - channel is super dead)
carlyle has joined #ruby
Synthead has quit [Remote host closed the connection]
AlbireoX`Laptop has joined #ruby
sailias has quit [Ping timeout: 272 seconds]
SegFaultAX|work2 has joined #ruby
thecreators has quit [Read error: Connection reset by peer]
sepp2k has quit [Remote host closed the connection]
headius has joined #ruby
Araxia has joined #ruby
thecreators has joined #ruby
dnyy has joined #ruby
alup has quit [Ping timeout: 240 seconds]
yeggeps has joined #ruby
havenn has joined #ruby
AlbireoX`Laptop has quit [Read error: Connection reset by peer]
Sheehan has joined #ruby
yeggeps_ has joined #ruby
yeggeps_ has quit [Client Quit]
havenn_ has joined #ruby
havenn has quit [Read error: Connection reset by peer]
Kevin__ has quit [Remote host closed the connection]
EvanR has left #ruby [#ruby]
lxsameer has quit [Quit: Leaving]
yeggeps has quit [Ping timeout: 252 seconds]
apok has joined #ruby
schovi has joined #ruby
<workmad3> jonathancutrell: well, it looks like sinatra just sets up Rack::CommonLogger for you, so it's whether you can filter params with that
Guest71971 has quit [Ping timeout: 255 seconds]
<workmad3> jonathancutrell: or if you'll need to set up a different logger that lets you filter params
<jonathancutrell> workmad3: Makes sense.
cakehero has quit [Quit: Computer has gone to sleep.]
wubino has quit [Quit: Leaving]
minijupe has joined #ruby
mockra has joined #ruby
<Jackneill> is there a good why to check os? RUBY_PLATFORM.downcase.include?("mswin") seems not working.
lexy0202 has left #ruby [#ruby]
bluenemo has quit [Read error: Connection reset by peer]
c0rn_ has joined #ruby
lexy0202 has joined #ruby
<Jackneill> http://codepad.org/3RGLszn1 i have thta method but in windows i got "unknown"
DrShoggoth has joined #ruby
ringotwo has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
dhruvasagar has quit [Ping timeout: 246 seconds]
Lachryma has quit [Ping timeout: 265 seconds]
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
brianpWins has joined #ruby
Synthead has joined #ruby
Lachryma has joined #ruby
iocor has joined #ruby
fulmato has quit [Ping timeout: 264 seconds]
josefig has quit [Read error: Connection reset by peer]
flype has quit [Ping timeout: 252 seconds]
lusory has quit [Read error: Operation timed out]
roolo has quit [Quit: Linkinus - http://linkinus.com]
musl has joined #ruby
albemuth has joined #ruby
flype has joined #ruby
ringotwo has quit [Ping timeout: 260 seconds]
schaerli has joined #ruby
davidw has quit [Ping timeout: 265 seconds]
Kevin__ has joined #ruby
dekroning has joined #ruby
punkrawkR has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
whitenoise has quit [Read error: Connection reset by peer]
sekretskwerl has joined #ruby
rbanffy has joined #ruby
rowanu has joined #ruby
schaerli has quit [Remote host closed the connection]
schovi has quit [Remote host closed the connection]
andreime has joined #ruby
fantazo has quit [Remote host closed the connection]
AlbireoX`Laptop has joined #ruby
mrbrdo has quit [Quit: mrbrdo]
mockra has quit [Remote host closed the connection]
TPFC-SYSTEM has joined #ruby
freeayu has quit [Quit: 离开]
RainbowDashh has joined #ruby
tacheshun has joined #ruby
gyre007 has joined #ruby
tatsuya_o has joined #ruby
alfism has joined #ruby
RainbowDashh has quit [Client Quit]
tatsuya_o has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
qwerxy has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
<lectrick> Anyone know why "this\n".split(/\n/) will return ["this"] and not ["this",""] ?
erichmenge has quit [Quit: Be back later]
<matled> lectrick: by default split ignores trailing empty elements
albemuth has quit [Quit: Leaving...]
umttumt has quit [Remote host closed the connection]
<lectrick> matled: is there a way to not have it do that
<matled> lectrick: there is an extra parameter that changes this behaviour
<lectrick> matled: I will look into it, thank you
tacheshun has left #ruby [#ruby]
RainbowDashh has joined #ruby
tacheshun has joined #ruby
tacheshun has left #ruby [#ruby]
erichmenge has joined #ruby
albemuth has joined #ruby
shadoi has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
tacheshun has joined #ruby
jesly has joined #ruby
zalesz has joined #ruby
adamkittelson has joined #ruby
mockra has joined #ruby
mnaser has quit [Ping timeout: 272 seconds]
RainbowDashh has quit [Ping timeout: 255 seconds]
mnaser has joined #ruby
vlad_starkov has joined #ruby
Helius has joined #ruby
albemuth has quit [Ping timeout: 264 seconds]
<jesly> i need bit help on slim
RainbowDashh has joined #ruby
francisfish has joined #ruby
lusory has joined #ruby
Lachryma has quit [Ping timeout: 265 seconds]
nicksmith has quit [Ping timeout: 265 seconds]
albemuth has joined #ruby
zalesz has quit [Quit: Wychodzi]
flype has quit [Ping timeout: 252 seconds]
chrismcg is now known as zz_chrismcg
mjb2k has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
mjb2k has quit [Client Quit]
tatsuya_o has quit [Remote host closed the connection]
tacheshun has quit [Remote host closed the connection]
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
tacheshun has joined #ruby
mjb2k has joined #ruby
randomau_ has joined #ruby
bbuegler has joined #ruby
randoma__ has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
_md has quit [Quit: Leaving...]
federic has quit [Remote host closed the connection]
randomautomator has quit [Ping timeout: 240 seconds]
jonathanwallace has quit [Remote host closed the connection]
raythecat has joined #ruby
<Spooner> jesly : You can just ask your question, but you may have more luck in #rails than here
jonathanwallace has joined #ruby
mockra has quit [Remote host closed the connection]
Helius has quit [Remote host closed the connection]
randomau_ has quit [Ping timeout: 260 seconds]
raythecat has quit [Client Quit]
hasrb has joined #ruby
moos3 has joined #ruby
<moos3> how can make erb process all .each 's in a template ? right now its stopping after the first one
<atmosx> 7/clear
flype has joined #ruby
<jesly> Spooner: http://pastie.org/4149521
<jesly> my plan is to print track names in the page
jonathanwallace has quit [Ping timeout: 240 seconds]
jd__ has joined #ruby
<jesly> but wot i get output is track['name'] n times
<jd__> how can i clear the outputted text?
flexd is now known as flexd_
<jesly> i just started with slim today
<jesly> could find a soln in stackoverflow
mxweas has quit [Ping timeout: 260 seconds]
Morkel has quit [Quit: Morkel]
<moos3> i have this erb http://pastie.org/4149545 its only processing the firest .each
ceradon has joined #ruby
niku4i has quit [Remote host closed the connection]
ianbrandt has joined #ruby
pdtpatrick has joined #ruby
nai has joined #ruby
Lachryma has joined #ruby
<Spooner> jesly : I think you want h1=track['name'] (I've only used HAML, but as you've written it, I assume, means that it is text, not code.
<jd__> is there no ++ method in ruby?
<jd__> count++?
<Spooner> jd__ : Nope, we just use += 1
<jd__> rather i use count+=1?
<jd__> thanks Spooner
trend has joined #ruby
lkba has joined #ruby
<jesly> Spooner: wow, that was cool, so var evaluation happens on an '='
<Spooner> It gets away from all the pre/post increment confusion (well, I have no idea exactly why we don't have ++)
<jesly> thanks
luckyruby has joined #ruby
sailias has joined #ruby
<Spooner> jesly Or you could have used: h1 #{track['name']} ...since strings are still interpolated
mjb2k has quit [Quit: Leaving]
<Spooner> = means evaluate and print, - means evaluate, otherwise it is just print (simplifying things)
<Hanmac> normaly even count += 1 is not used, because ruby has buildin functions for counting
headius has quit [Quit: headius]
Lachryma has quit [Ping timeout: 252 seconds]
tacheshun has quit [Remote host closed the connection]
mrsolo has joined #ruby
<moos3> any takers on my erb issue
<jesly> #{track['name']} didn't work for me
<Spooner> OK, sorry, jesly, as I said, I'm used to the way HAML does it, not slim.
ramblex_ has joined #ruby
<jesly> okay, its fyn
<jesly> ur help was life saver
<jesly> :)
znowi has joined #ruby
<jesly> Spooner: ++ in ruby stands for *2 i guess not sure
<jesly> there was reason
<jesly> mentioned in eloquent ruby
<jesly> dnt remember it
tacheshun has joined #ruby
znowi has left #ruby [#ruby]
<Hanmac> jesly: hm no ... ++ is not possible per syntax
<davidcelis> No, ++ gives syntax errors
<Spooner> I haven't read it. I don't miss it, since as Hanmac said, we don't use ++ in loops anyway.
ramblex has quit [Ping timeout: 260 seconds]
erichmenge has quit [Quit: Be back later]
<jesly> b = 10
<jesly> b++
<jesly> b
<jesly> give 20
<jesly> :O
<davidcelis> jesly: No
<Spooner> No that is parsed as b = 10; b + +b
zxiest has joined #ruby
<davidcelis> b+++++++++++++b
Axsuul has joined #ruby
<davidcelis> ^ this should not be okay
<davidcelis> oh, ruby
ramblex_ has quit [Ping timeout: 260 seconds]
cakehero has joined #ruby
rook_flood has quit [Ping timeout: 244 seconds]
erichmenge has joined #ruby
<zxiest> why does "33.92032,35.647".match(/^(?<lat>[1-9]+[0-9]*(.[0-9]+)),(?<lng>[1-9]+[0-9]*(.[0-9])+)$/) return a match but "33.92032,35.6471" doesn't?
<Spooner> That makes sense to my mental parser, davidcelis. It is just horrid :D
rasbonics has joined #ruby
<jesly> okay, i get it.. i was wrong
carloslopes has quit [Quit: Leaving.]
<davidcelis> Spooner: go back to brainfuck
jonathanwallace has joined #ruby
carloslopes has joined #ruby
<Hanmac> its parsed at: b+(+(+(+(+(+(+(+(+(+(+(+(+b))))))))))))
eywu has joined #ruby
voodoofish430 has joined #ruby
jrist is now known as jrist-afk
<Spooner> moos3 : Your erb looks fine. Sure the data is an array with more than one value in it?
<elektronaut> zxiest: try "33.92032,35.6471".match(/^(?<lat>[1-9]+[0-9]*(.[0-9]+)),(?<lat>[1-9]+[0-9]*(.[0-9]+))$/)
moshee has quit [Ping timeout: 264 seconds]
bbuegler has quit [Quit: Leaving.]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
bbuegler has joined #ruby
<zxiest> elektronaut haha.. good eye! thanks man :-)
<elektronaut> zxiest: i forgot to swap lat with lng in the last part, but yeah
rouss has joined #ruby
<Spooner> moos3 : Doesn't tell me what data is though
<zxiest> elektronaut well this is what fixed it.. it looks like "lng" is a keyword ?
bbuegler has left #ruby [#ruby]
<elektronaut> nah, look at the end, you have a parenthesis mixed up i think
<zxiest> elektronaut oh okay.. cool.. thanks :-)
<matled> can I change a signal handler temporarily? i.e. change it and restore it to its previous value, without knowing its previous value
<matled> I cannot find a way to get the current handler
<Spooner> Yeah, that is it. (.[0-9]+) != (.[0-9])+
gyre007 has quit [Quit: Ex-Chat]
<zxiest> elektronaut thank you very much =)... working now
r0bby has joined #ruby
<Spooner> Oh, I see. Still, I don't know how many results are returned. If it is printing out the first results correctly, then it is probably your database is only returning the first row, not all of them *shrugs*
snearch has joined #ruby
piotr_ has joined #ruby
<moos3> Spooner whats the best way to take mysql results and convert them to a rray
pk1001100011 has quit [Ping timeout: 255 seconds]
Eldariof-ru has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
<Spooner> Not sure - while since I've used it. #to_a would probably work.
vlad_starkov has joined #ruby
nai has quit [Remote host closed the connection]
<moos3> fixed it spooner thanks for the help
rbanffy_ has joined #ruby
<Spooner> Goodo :)
ryanf has joined #ruby
rbanffy has quit [Write error: Connection reset by peer]
lorandi has joined #ruby
Enekoos has joined #ruby
nai has joined #ruby
iamjarvo has quit [Quit: Leaving.]
Ontolog has joined #ruby
SQLStud has quit [Quit: Leaving]
<Ontolog> On OS X Lion, Ruby 1.9.3-p125 (via rvm), irb 0.9.6, I am having trouble in irb entering utf-8 characters. Inputting the character, I see the actual character code displayed in irb. This only happens in irb. UTF-8 works fine in the shell, terminal, in vim and Ruby files, etc.
SQLStud has joined #ruby
tramm has quit [Quit: Ex-Chat]
<jd__> is it possible to run multiple blocks / loops at once?
<Spooner> Not sure what you are trying to do, jd__ - you can nest them.
gyre007 has joined #ruby
<atmosx> any quick ideas on this error? http://codepad.org/MR5yspsE
<jd__> say i have a list of links that i'm downloading with ruby to get info from right now i have one loop getting all 500 files can i break it up and have 2 loops at once each getting 250 files?
<jd__> to speed it up
rowanu has quit [Remote host closed the connection]
pk1001100011 has joined #ruby
fermion has quit [Quit: P]
<carloslopes> jd__: you can use threads
<jd__> ok any good links for using threads?
<carloslopes> jd__: but, with MRI they won't run in parallel.. they will be concurrent
<jd__> concurrent and parallel are different?
<carloslopes> jd__: sure
<jd__> thanks carloslopes
<jd__> but it will still be faster right?
<Spooner> No.
<Spooner> Unless you are using a Ruby that supports parallelism (jruby, for example).
<jd__> thanks RBV
<carloslopes> jd__, Spooner: sometimes concurrent jobs are good.. like, when you have many I/O operations
andrewpthorp has joined #ruby
stephenjudkins has joined #ruby
apeiros_ has joined #ruby
ken_barber1 is now known as ken_barber
<RBV> jd__: it gets tricky, because you have to create the threads, keeep them busy, etc
c0rn_ has quit [Quit: Computer has gone to sleep.]
<RBV> Coordinate which thread is downloading which file
<jd__> i see
<jd__> good article thanks RBV
luckman212_ has joined #ruby
king313 has joined #ruby
king313 has quit [Changing host]
king313 has joined #ruby
iamjarvo has joined #ruby
<RBV> But that looks like it's doing something similar to what you want so maybe all the hard stuff is figured out
<Hanmac> my c++ libs i bind are not thread-safe ... so my bindings cant be too ...
<moos3> anyone use ruby to diff two files and then overwrite the changes ?
mockra has joined #ruby
banghouse has joined #ruby
Eldariof-ru has quit [Remote host closed the connection]
jxpx777 has joined #ruby
luckman212 has quit [Ping timeout: 248 seconds]
jparishy`lunch is now known as jparishy
Tasser has quit [Ping timeout: 260 seconds]
rowanu has joined #ruby
Eldariof-ru has joined #ruby
rking has quit [Read error: Connection reset by peer]
jesly has quit [Ping timeout: 245 seconds]
<macmartine> How can I combine objects in a loop by the | (or) operator? https://gist.github.com/009dceb481046a028951
pipeline has joined #ruby
pipeline has left #ruby [#ruby]
<davidcelis> inject?
<davidcelis> days_of_week.inject([]) { |memo, d| memo | DIWeek.new(...) }
<davidcelis> macmartine: ^
<macmartine> ah, ok, trying it -- thanks!
zxiest has quit []
tacheshun has left #ruby [#ruby]
Aaton_off is now known as Aaton
bluOxigen has joined #ruby
cc has joined #ruby
cc has left #ruby [#ruby]
<Spooner> I think you'd want: days_of_week.inject { |memo, d| memo | DIWeek.new(...) }, since you don't want it in an array, do you?
<davidcelis> what would he want it in
<d1zzYLuLz> is there an iis web log parser library that anyoen knows of?
schovi has joined #ruby
<davidcelis> oh true, maybe his DIWeek has a | operator
ramblex has joined #ruby
<davidcelis> i dont know what the fuck a DIWeek is
<Spooner> That is what I assumed based on the last line in the gist.
<apeiros_> davidcelis: a DoublyIrritatingWeek? :)
<davidcelis> If that is the case, then yeah, remove the argument passed to inject and just leave the block
<macmartine> yeah, not an array, and expressions. And a DIWeek is from the runt gem http://runt.rubyforge.org/doc/files/doc/tutorial_schedule_rdoc.html
<macmartine> *an expression
<davidcelis> macmartine: Take Spooner's then; remove the ([]) from inject
mnaser has quit [Ping timeout: 244 seconds]
Helius has joined #ruby
chienpo has joined #ruby
wallerdev has joined #ruby
sekretskwerl is now known as whitenoise
whitenoise has quit [Changing host]
whitenoise has joined #ruby
mnaser has joined #ruby
tiripamwe has quit [Ping timeout: 240 seconds]
<apeiros_> that won't work. the first element isn't a DIWeek, so memo isn't a DIWeek
<macmartine> wait, doesn't this return the result of the expression DIWeek.new('Mon') | DIWeek.new('Tue')? I'm wanting the result to be the expression itself so I can combine it with other expressions, if that makes sense
<davidcelis> unless DIWeek | nil returns DIWeek
<Jackneill> can you help me data.each do |var|, i got undefined method `each' for #<String:0x84f0224> (NoMethodError), but i did data.inspect, so data is an array now :/
<davidcelis> which is possible; i can't see the docs for that class
<davidcelis> Jackneill: gist your code
ryan0x2 has quit [Remote host closed the connection]
<apeiros_> Jackneill: seems ruby disagrees with your assessment of data being an array…
iamlacroix has joined #ruby
<Jackneill> davidcelis: http://codepad.org/4R7fAhwX
<davidcelis> apparently data is a String
<apeiros_> um, line 4 doesn't output anything… so how did you conclude from that line that it was indeed an array?
Helius has quit [Remote host closed the connection]
<Jackneill> i didnt, yet
regedarek has quit [Read error: Connection reset by peer]
jesly has joined #ruby
<Jackneill> :/
Eldariof-ru has quit [Remote host closed the connection]
Kevin__ has quit [Remote host closed the connection]
headius has joined #ruby
<Jackneill> apeiros_ data.inspect: ":irc.rizon.no 439 * :Please wait while we process your connection."
<Jackneill> thats the content of it
<apeiros_> and you think that's an array because…?
<Jackneill> yes it's a string
<Jackneill> ;p(
<apeiros_> then your question is answered, I guess
<Jackneill> but inspect makes an array isnt it?
<apeiros_> no
<Jackneill> .to_a ?
<Jackneill> then?
<apeiros_> inspect is for inspecting data. hence the name
<apeiros_> what do you expect String#to_a to do?
arturaz has quit [Read error: Operation timed out]
lexy0202 has quit [Quit: lexy0202]
Eldariof-ru has joined #ruby
<Jackneill> then .split
berserkr has joined #ruby
<apeiros_> Jackneill: the point of the question wasn't to make you jump to just another answer
Araxia has quit [Read error: No route to host]
Araxia_ has joined #ruby
<apeiros_> it was to make you think about what you intend to do and phrase it
<Jackneill> anyway my problem solved. thanks.
<apeiros_> …ok
Tasser has joined #ruby
<apeiros_> and just to have it said, String#split can't be used to properly break up IRC messages.
austinbv has joined #ruby
<Tasser> apeiros_, \n ?
dr0p has quit [Remote host closed the connection]
<Jackneill> apeiros_ i want it to be splitted by space
<Jackneill> not to break it up
<apeiros_> Tasser: \r\n, but it's not about separating messages but breaking up an individual message into its components
<apeiros_> Jackneill: yes. that's wrong for irc messages.
mockra has quit [Remote host closed the connection]
<Jackneill> apeiros_, then what?
<Jackneill> regex?
<apeiros_> you may want to read the BNF of the relevant RFCs (1429 and 2812 iirc)
CodeVision has joined #ruby
<apeiros_> nope, 1429 is wrong… it was 1459
<d1zzYLuLz> http://rubygems.org/gems/iis-access-log-parser does anybody know anything about that?
<apeiros_> 2812 is correct
ghanima has quit [Remote host closed the connection]
rbanffy_ has quit [Ping timeout: 240 seconds]
<Jackneill> thanks apeiros_
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
manizzle has quit [Quit: Leaving]
rbanffy_ has joined #ruby
Eldariof-ru has quit [Read error: Operation timed out]
Aristata has quit [Read error: Connection reset by peer]
hex`` has quit [Ping timeout: 248 seconds]
ryan0x2 has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
Aristata has joined #ruby
Eldariof-ru has joined #ruby
d1zzYLuLz has left #ruby [#ruby]
krusty_ar has quit [Read error: Connection reset by peer]
pk1001100011 has quit [Ping timeout: 252 seconds]
krusty_ar has joined #ruby
nai has quit [Remote host closed the connection]
jonathancutrell has quit [Quit: jonathancutrell]
jonathanwallace has quit [Remote host closed the connection]
headius has quit [Ping timeout: 272 seconds]
the_jeebster has quit [Ping timeout: 245 seconds]
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
dhruvasagar has joined #ruby
iamlacroix has quit [Remote host closed the connection]
mosheee has joined #ruby
moshee has quit [Read error: Connection reset by peer]
headius has joined #ruby
nicksmith has joined #ruby
Eldariof-ru has quit []
hasrb_ has joined #ruby
<lectrick> Anyone know of an encryption that will hide text inside other plaintext?
<lectrick> so you have your secret message, you want to hide it inside some innocuous looking text
hasrb has quit [Read error: Connection reset by peer]
<atmosx> ?
<lectrick> atmosx: Doesn't that only deal with hiding messages in images?
<atmosx> nope
<atmosx> In digital steganography, electronic communications may include steganographic coding inside of a transport layer, such as a document file, image file, program or protocol. (from wikipedia)
erichmenge has quit [Quit: Be back later]
<lectrick> interesting
<atmosx> anyway if you takea look at the links you'll find plenty of open source software
rowanu has quit [Remote host closed the connection]
mockra has joined #ruby
<atmosx> iirc ther eare some sort of email proxy servers that use steganography, you give them a message and they turn it into spam-email
<jd__> how can i save a page to a string using wget?
<atmosx> then the other party must find the email, and use the same portal to *decrypt* it, in order to make the spam-looking message readable
dekroning has quit [Ping timeout: 265 seconds]
<atmosx> jd__: curl -O isn't good?
<jd__> oh i could try that
<jd__> and just use backticks?
<jd__> data = `curl -0 url` like that?
havenn_ has quit [Remote host closed the connection]
itnomad has joined #ruby
CoverSlide has quit [Read error: No route to host]
jesly has quit [Ping timeout: 245 seconds]
skise-mou has joined #ruby
Eldariof-ru has joined #ruby
bosphorus has quit [Remote host closed the connection]
ceradon has quit [Ping timeout: 255 seconds]
enroxorz is now known as JohnRedcorn
<atmosx> jd__: y
iamjarvo has quit [Quit: Leaving.]
mikepack has joined #ruby
Boohbah has joined #ruby
<jd__> thanks atmosx
<skise-mou> vote for the best muscle man (from powermen,muscle hunks and muscle gallery) please vote to all groups and pages thanks
skise-mou has quit [Killed (idoru (Spam is off topic on freenode.))]
ceradon has joined #ruby
ringotwo has joined #ruby
jeff_sebring has quit [Quit: Leaving]
pk1001100011 has joined #ruby
jeff_sebring has joined #ruby
erichmenge has joined #ruby
JohnRedcorn has quit [Quit: Leaving]
cbuxton has quit [Quit: Leaving.]
ananthakumaran has quit [Quit: Leaving.]
stephenjudkins has quit [Quit: stephenjudkins]
Eldariof-ru has quit []
fulmato has joined #ruby
trend_ has joined #ruby
trend has quit [Read error: Connection reset by peer]
trend_ is now known as trend
headius has quit [Read error: Connection reset by peer]
k_89 has quit [Quit: Leaving]
gogiel has quit [Ping timeout: 244 seconds]
tankhates has quit [Quit: leaving]
yankhates has joined #ruby
maletor has quit [Ping timeout: 248 seconds]
azm has joined #ruby
gogiel has joined #ruby
pygospa has joined #ruby
Eldariof-ru has joined #ruby
headius has joined #ruby
mnaser has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
azm has quit [Client Quit]
TheRealPygo has quit [Ping timeout: 245 seconds]
wvdschel has joined #ruby
manizzle has joined #ruby
mnaser has joined #ruby
maletor has joined #ruby
ssspiff has quit [Ping timeout: 260 seconds]
jrist-afk is now known as jrist
PaciFisT has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iamjarvo has joined #ruby
nai has joined #ruby
rizzylt has quit [Ping timeout: 260 seconds]
<jd__> how do i convert a string to a float?
<atmosx> .to_f
<jd__> thanks
dagnachewa has joined #ruby
ringotwo has quit [Remote host closed the connection]
rbanffy_ has quit [Ping timeout: 240 seconds]
Eldariof-ru has quit [Read error: No route to host]
deryldoucette has joined #ruby
deryl has quit [Ping timeout: 272 seconds]
deryldoucette is now known as deryl
mikepack has joined #ruby
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
Eldariof-ru has joined #ruby
pk1001100011 has joined #ruby
Toumar has joined #ruby
Eldariof-ru has quit [Client Quit]
mikepack has quit [Read error: Connection reset by peer]
randomautomator has joined #ruby
randoma__ has quit [Read error: Connection reset by peer]
timonv has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fantazo has joined #ruby
cbuxton has joined #ruby
Eldariof-ru has joined #ruby
medik has quit [Remote host closed the connection]
zalesz has joined #ruby
Helius has joined #ruby
dagnachewa has quit [Quit: Leaving]
ZachBeta has quit [Read error: Connection reset by peer]
<shevy> how do i write a rubyOS?
ZachBeta has joined #ruby
banghouse is now known as banghouseAFK
kirun has joined #ruby
<Hanmac> shevy: in C :D
ebanoid has quit [Ping timeout: 264 seconds]
<davidcelis> shevy: someone is already writing a shell in ruby
<Paradox> rush
mdhopkins has joined #ruby
<Paradox> its not very mature
<davidcelis> it's still a baby
ebanoid has joined #ruby
<Paradox> needs real cd before it can take off
<Paradox> but fuck if it doesnt have potential
krz has quit [Quit: krz]
<Paradox> more than FiSH
<Paradox> anyway
<Paradox> FiSH: the shell that doesn't understand --help
<Hanmac> davidcelis: i saw mRuby as Efi shell "without" an OS ;P
<davidcelis> Paradox: how can you write a shell that doesn't understand --hel
<davidcelis> --help
vlad_starkov has quit [Remote host closed the connection]
<Paradox> davidcelis, fish claims to automatically make its completions by scanning manfiles
<Paradox> but they dont support scanning --help files
<Paradox> so 99% of the shit i use is borked
<Paradox> such as gem
<Paradox> or hub
rippa has quit [Ping timeout: 264 seconds]
nai has quit [Remote host closed the connection]
bier has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
Helius has quit [Remote host closed the connection]
atmosx has quit [Ping timeout: 276 seconds]
<Tasser> --help isn't really standardized
<Paradox> enough things use it though that a shell should recognize it
<Boohbah> No manual entry for gem
td123 has joined #ruby
bier has joined #ruby
atmosx has joined #ruby
mnaser has quit [Ping timeout: 260 seconds]
nanderoo has quit [Quit: Leaving.]
kaneda has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
jbk1 has joined #ruby
mpereira has joined #ruby
jbk1 has left #ruby [#ruby]
getbitcoin1 has quit [Remote host closed the connection]
audy has joined #ruby
Toumar has left #ruby [#ruby]
Jackneill has quit [Read error: Connection reset by peer]
jxf has joined #ruby
c0rn_ has joined #ruby
ghanima has joined #ruby
<shevy> Paradox fish has a few other cool things though. the colouring is really awesome, I'd wish bash would have an option to enable that too
<Paradox> shevy, meh, i have a hyper-customized zsh
<Paradox> fish didnt impress me much
<Paradox> if i was coming from bash it would have
banseljaj is now known as imami|afk
<shevy> zsh allows colouring when it can find / does not find an existing command?
<Paradox> yup
<shevy> (as you type)
<Paradox> well not as you type
<Paradox> i liked that about fish
<Paradox> but zsh has such absurdly large community support
<Paradox> maybe in a few years fish will too
<shevy> :(
<Paradox> but here's a thing i did in both bash and zsh
<Paradox> that fish cant do yet
<shevy> I think fish won't really succeed
<Paradox> command timers
<shevy> what's that?
<Paradox> shows you how long a command took to run
<Paradox> in bash, you bind it to trap DEBUG
<Paradox> in zsh, you bind it to pre-prompt and pre-cmd
<Paradox> so if i did, say, gem install herp
<Paradox> and it took 5 minutes
<Paradox> at my next prompt, it tells me (>> elapsed 5m34s
<Paradox> or something similar
davidw has joined #ruby
<shevy> I see
whitenoise has quit [Read error: Connection reset by peer]
<shevy> I don't understand that
schaerli has joined #ruby
<shevy> the "in ~"
dross has quit [Ping timeout: 248 seconds]
binaryplease has joined #ruby
TaTonka has quit [Ping timeout: 260 seconds]
<drizz> jeff at jeffs macbook pro in home
<Paradox> thats my path
TaTonka has joined #ruby
audy has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
<Paradox> drizz, i change hosts all the fucking time
<Paradox> so thats just my hostname
<Paradox> heh
<drizz> personally I'd ditch the brackets around the current time
<Paradox> i like em
dross has joined #ruby
rbanffy_ has joined #ruby
the_jeebster has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
zz_chrismcg is now known as chrismcg
headius has quit [Quit: headius]
Asher has quit [Quit: Leaving.]
atmosx has quit [Ping timeout: 276 seconds]
Asher has joined #ruby
bigkevmcd has quit [Ping timeout: 248 seconds]
Cpudan80 has joined #ruby
<Cpudan80> Hello folks
<Cpudan80> Im having some trouble with a ruby app on windows (ruby 1.8.6)
cirwin has joined #ruby
whitenoise has joined #ruby
erichmenge has left #ruby [#ruby]
<Cpudan80> the app needs iconv -- and when the ruby thing runs it comes up telling me that the specified file is not found (iconv.so)
cbuxton has quit [Quit: Leaving.]
atmosx has joined #ruby
<Cpudan80> then it gives a path to where iconv.so actually is.... so Im not sure what's going on
andrewpthorp has quit [Ping timeout: 256 seconds]
saschagehlich has joined #ruby
austinbv has quit [Ping timeout: 244 seconds]
Eldariof-ru has quit []
sailias has quit [Quit: Leaving.]
<shevy> 1.8.6 is really old
affix has joined #ruby
<shevy> what is that path saying for you on windows
<shevy> also where did you install ruby into at, on windows. the path it has
bosphorus has joined #ruby
schaerli has quit [Remote host closed the connection]
apok has quit [Quit: apok]
<Cpudan80> Yeah 1.8.6 is really old, but im using rub with sketchup
<Cpudan80> so that's what skp provides
pu22l3r has quit [Read error: Operation timed out]
<shevy> ack
<Cpudan80> I didnt really install ruby, it came with sketchup... it's installed as part of the app
banghouseAFK is now known as banghouse
<shevy> google's old masterplan to show that they hate ruby
<cakehero> when I install with gem (and I have ruby version manager if that matters) do I install gems globally for that version of ruby or per-project (if the folder I'm in has an .rvmrc file, for instance)
<shevy> not really sure what can be done, I dont think there is more than one or two other people here who use 1.8.6, on windows
andreime has quit [Read error: Operation timed out]
kevinbond has joined #ruby
<shevy> RVM installs somewhere into $HOME as far as I know
carloslopes has quit [Quit: Leaving.]
bigkevmcd has joined #ruby
<shevy> otherwise, gems usually can be found in $SITE_PREFIX/lib/ruby/gems/1.9.1/ or hmm... $SITE_PREFIX/lib/ruby/gems/1.8/ for 1.8.x
TheFuzzball has joined #ruby
<Cpudan80> shevy: the forums mention something about the $LOAD_PATH array
<Cpudan80> is that something I can puts to the console?
<shevy> Cpudan80 well you can append to this array
<shevy> like $LOAD_PATH << "path/to/iconv/" or something like that.
<shevy> you can do that in any .rb script. or perhaps globally too
<Cpudan80> the funny thing is that it works on one machine, but fails on another
<Cpudan80> and I did a diff of the relevant directories and saw nothing interesting...
zaychenok has joined #ruby
<shevy> hmmmm
schovi has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
uris has quit [Quit: leaving]
<Cpudan80> now, the computer it works on does have a full blown ruby dev env
<Cpudan80> but I dont see how that really makes a difference
ghanima has quit [Quit: Leaving.]
<shevy> no clue. I used to use 1.8.7 for many years on linux... moved to 1.9.3 about 4 or 5 weeks ago finally
mikepack has quit [Read error: Connection reset by peer]
medik has joined #ruby
<cakehero> Cpudan80 you can output it to the console
<cakehero> puts $:
booginga has joined #ruby
<Cpudan80> right yeah I figured that out
<cakehero> k
<Cpudan80> But the path is the same...
<Cpudan80> and the file it is asking for, is in the path!
<Cpudan80> grr
<cakehero> permissions….?
Aristata has quit [Quit: Leaving.]
jparishy has quit []
Aaton is now known as Aaton_off
yankhates has quit [Quit: leaving]
yankhates has joined #ruby
silentpost has joined #ruby
uris has joined #ruby
mikepack has joined #ruby
atmosx has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 265 seconds]
Jay_Levitt has joined #ruby
<Cpudan80> cakehero: hmm
<Cpudan80> don't think so
blacktulip has quit [Remote host closed the connection]
plastics has joined #ruby
altivec has quit [Quit: WeeChat 0.3.0]
medik has quit [Quit: ...]
deanh has joined #ruby
otherj has joined #ruby
headius has joined #ruby
<otherj> guys, why would File.basename(photo.file.to_s, '.*').gsub!('_',' ') result in a blank return when photo.file = BSO?
ceradon has quit [Ping timeout: 260 seconds]
beneggett has joined #ruby
geekbri has quit [Remote host closed the connection]
atmosx has joined #ruby
kaneda has quit [Remote host closed the connection]
digitalcakestudi has joined #ruby
<regularfry> BSO?
<otherj> well, bso.pdf for example
<otherj> the result is good for filenames that have _, but not for those that don't
<Ontolog> On OS X Lion, Ruby 1.9.3-p125 (via rvm), irb 0.9.6, I am having trouble in irb entering utf-8 characters. Inputting the character, I see the actual character code displayed in irb. This only happens in irb. UTF-8 works fine in the shell, terminal, in vim and Ruby files, etc...
<otherj> and i thought gsub should only mess with those that have -
<otherj> _
kaneda has joined #ruby
minijupe has quit [Quit: minijupe]
<Tasser> Ontolog, tried another terminal?
Morkel has joined #ruby
<Tasser> Ontolog, Encoding.default_internal/external are what?
<shevy> otherj via .gsub! you modify in place
<shevy> otherj change .gsub! to .gsub and everything should be fine
ceradon has joined #ruby
<otherj> oooh
<otherj> yeah
<otherj> thanks shevy
<shevy> I usually dont like the ! methods
<shevy> it makes code shorter sometimes though
<shevy> x = x.gsub(/python is better than ruby/,'')
<shevy> x.gsub!(/python is better than ruby/,'')
cantonic has quit [Quit: cantonic]
<otherj> oddly ehough, i think it was a typo
<shevy> hehehe
jxf has quit [Ping timeout: 260 seconds]
fantazo has quit [Remote host closed the connection]
atmosx has quit [Ping timeout: 276 seconds]
s0ber has quit [Read error: Connection reset by peer]
deanh has quit [Quit: deanh]
stewart_1 has joined #ruby
s0ber has joined #ruby
Gavilan has joined #ruby
<otherj> oh man
<otherj> ontent_type: "application/vnd.openxmlformats-officedocument.sprea..."
<otherj> longest content_type ever
rouss has quit [Quit: Computer has gone to sleep.]
Vendethiel has quit [Quit: je ne suis plus là, tqvu]
wvdschel has quit [Ping timeout: 260 seconds]
<shevy> lol
akem has quit [Read error: Connection timed out]
wmoxam_ has joined #ruby
akem has joined #ruby
timonv has quit [Remote host closed the connection]
hunglin1 has joined #ruby
hunglin has quit [Ping timeout: 244 seconds]
schovi has joined #ruby
iamjarvo has quit [Quit: Leaving.]
hunglin1 has quit [Client Quit]
monkegjinni has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
MrGando has joined #ruby
<lectrick> What is the algorithm that generates the ruby .hash value?
<shevy> lectrick dunno but there is a nice pdf about hashes in ruby
fulmato has quit [Ping timeout: 260 seconds]
stephenjudkins has joined #ruby
<Hanmac> shevy no he means the hash method
<lectrick> shevy: yeah i mean the .hash method on all objects, thanks Hanmac
<shevy> aha
mucker has quit [Ping timeout: 245 seconds]
<Hanmac> lectrick it depends, i think some classes use they own methods
atmosx has joined #ruby
ciopte7 has joined #ruby
graft has quit [Ping timeout: 246 seconds]
MrGando has quit [Ping timeout: 248 seconds]
samuel02 has quit [Remote host closed the connection]
samuel02 has joined #ruby
DrShoggoth has quit [Quit: Leaving]
ph^ has joined #ruby
graft has joined #ruby
fulmato has joined #ruby
Drewch has joined #ruby
<shevy> Hanmac are you on github?
<Hanmac> did you try to search me?
cantonic has joined #ruby
samuel02 has quit [Ping timeout: 260 seconds]
SpinningWheels has quit [Ping timeout: 260 seconds]
ben_alman has quit [Excess Flood]
mdaisuke has joined #ruby
cantonic has quit [Client Quit]
mikepack has quit [Read error: Connection reset by peer]
<Hanmac> yeah thats me
mikepack has joined #ruby
<shevy> \o/
ben_alman has joined #ruby
joshman_ has quit [Ping timeout: 245 seconds]
wvms has joined #ruby
Tyr0 has joined #ruby
Nisstyre has quit [Quit: Leaving]
Morkel has quit [Quit: Morkel]
affix has quit [Quit: ZNC - http://znc.in]
chrismcg is now known as zz_chrismcg
SpinningWheels has joined #ruby
mengu has quit [Quit: Konversation terminated!]
<Jay_Levitt> My Gemfile depends on 'resque', it has some gems that depend on 'resque >= 1.8.0', nothing else - but 'bundle update' isn't moving past resque 1.8.2, even though 1.20.0 is the newest...?
binaryplease has quit [Ping timeout: 244 seconds]
gmci has quit [Read error: Connection reset by peer]
jcromartie has quit [Quit: jcromartie]
fulmato has quit [Ping timeout: 246 seconds]
minijupe has joined #ruby
<Jay_Levitt> .. in fact, a fresh 'bundle install' also resolves to resque 1.8.2.
chomp has quit [Quit: Leaving]
wmoxam_ is now known as evilWolf
eurbach has quit [Quit: Leaving.]
IHateHavingToReg has joined #ruby
<IHateHavingToReg> thomas: this is for you buddy
<IHateHavingToReg> <ttuttle> yeah i have a bit of a cp collection <-- FUCKING CHILD FAGGOT RAPIST
<IHateHavingToReg> <ttuttle> yeah i have a bit of a cp collection <-- FUCKING CHILD FAGGOT RAPIST
<IHateHavingToReg> <ttuttle> yeah i have a bit of a cp collection <-- FUCKING CHILD FAGGOT RAPIST
IHateHavingToReg has quit [Killed (idoru (Spam is off topic on freenode.))]
plastics- has joined #ruby
gmci has joined #ruby
plastics has quit [Ping timeout: 246 seconds]
justinmcp has quit [Ping timeout: 252 seconds]
<davidcelis> .....
theRoUS has quit [Ping timeout: 244 seconds]
chson has quit [Remote host closed the connection]
justinmcp has joined #ruby
<evilWolf> someone gots MAD
<Jay_Levitt> inorite?
zemanel has quit [Quit: Remote hottie closed the connection]
<davidcelis> dafuq
bosphorus has quit [Remote host closed the connection]
bosphorus has joined #ruby
<shevy> lol
<shevy> best nick ever though
<evilWolf> the evilWolf questions if that was a real word
<shevy> "IHateHavingToRegister!
<shevy> I should get a new nick and be on #ruby-lang "I Hate Having To Wait For Voice"
rbanffy_ has quit [Quit: Ex-Chat]
bosphorus has quit [Read error: No route to host]
bosphorus has joined #ruby
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
b26 has quit [Remote host closed the connection]
balki_ has joined #ruby
balki_ has quit [Read error: Connection reset by peer]
Jay_Levitt has quit [Quit: Linkinus - http://linkinus.com]
<Hanmac> shevy: yeah lets go all to #ruby-lang, there is no tintin :P
balki_ has joined #ruby
Guedes is now known as Guedes_out
balki has quit [Read error: Operation timed out]
MrGando has joined #ruby
PaciFisT has quit [Quit: Leaving.]
savage-_ has joined #ruby
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
cherrypeel has joined #ruby
jxpx777 has quit [Quit: Mac is sleeping…]
tomb_ has quit [Quit: Computer has gone to sleep.]
dr_diamond has joined #ruby
dr_diamond has quit [Changing host]
dr_diamond has joined #ruby
savage- has quit [Ping timeout: 245 seconds]
yankhates has quit [Ping timeout: 240 seconds]
alfism has quit [Quit: alfism]
ciopte7 has quit [Quit: ciopte7]
tommyvyo has joined #ruby
savage-_ has quit [Remote host closed the connection]
jimeh has joined #ruby
indeterminate has joined #ruby
binaryplease has joined #ruby
macmartine has quit [Quit: macmartine]
gibsonfs_ has joined #ruby
bosphorus has quit [Remote host closed the connection]
liluo has joined #ruby
gibsonfs has quit [Ping timeout: 245 seconds]
mattonrails has joined #ruby
andrewhl has quit [Remote host closed the connection]
saschagehlich has quit [Quit: saschagehlich]
tzvi has quit [Read error: Connection reset by peer]
cakehero has quit [Quit: Computer has gone to sleep.]
aces23up has joined #ruby
davidboy is now known as RonPaul
chaingun has joined #ruby
RonPaul is now known as davidboy
dnyy_ has joined #ruby
iamjarvo has joined #ruby
Ontolog_ has joined #ruby
jmeeuwen_ has joined #ruby
aces1up has quit [Read error: Connection reset by peer]
dnyy has quit [Read error: Connection reset by peer]
Ontolog has quit [Read error: Connection reset by peer]
qpt has joined #ruby
jmeeuwen has quit [Remote host closed the connection]
abra has quit [Ping timeout: 276 seconds]
jmeeuwen_ is now known as jmeeuwen
carlyle has quit [Remote host closed the connection]
Ontolog_ has quit [Read error: No route to host]
ciopte7 has joined #ruby
Ontolog has joined #ruby
rakm has quit [Ping timeout: 264 seconds]
jxf has joined #ruby
dv310p3r has quit [Ping timeout: 260 seconds]
kpshek has quit []
whitenoise has quit [Changing host]
whitenoise has joined #ruby
rakm has joined #ruby
Maniacal has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
wpaulson has joined #ruby
chaingun has quit [Changing host]
chaingun has joined #ruby
Nick____ has joined #ruby
robotmay has quit [Remote host closed the connection]
shikamaru has quit [Ping timeout: 248 seconds]
Tyr0 has quit [Quit: Tyr0]
becom33 has joined #ruby
<becom33> can you guys recomend me a simple to install and easy crawler
minijupe has quit [Quit: minijupe]
<epochwolf> Okay, I have a LibXml document and I need to add a bunch of xml to it. Is there an easy way to do this without creating thousands of little LibXML::XML::Node objects by hand?
Targen has joined #ruby
<Hanmac> epochwolf: look at nokogiri
apeiros_ has quit [Remote host closed the connection]
<epochwolf> Hanmac: not an option. I'm limited to libxml. Our production server doesn't have a compiler and IT refuses to add new gems.
<Hanmac> no compiler? oO
gyre007 has quit [Quit: Ex-Chat]
evilWolf has quit [Quit: leaving]
matti has left #ruby ["8-X"]
<Sou|cutter> epochwolf: wow, they're really tying your hands there. stinks
<epochwolf> Hanmac: no compiler. It's a "security risk"
<epochwolf> Hanmac: IT is mostly windows admins.
<epochwolf> I'm in a .net company on the single rails team.
<epochwolf> I actually function as tech support for the macs. :/
<becom33> epochwolf, i'm so you want me to write a crawler with that ?
<epochwolf> since IT doesn't do it.
<Hanmac> and the others are java "experts" right? :D
<Sou|cutter> can you install new gems if they don't have native extensions?
<epochwolf> Hanmac: yup
<epochwolf> Sou|cutter: IT would have to audit the commands and get that done on 5 different servers.
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 13.0.1/20120614114901]]
<Hanmac> XDDD java experts, and saying something about "security risks" XD
<epochwolf> Sou|cutter: 1~2 weeks until that would be finished.
jxpx777 has joined #ruby
<epochwolf> Hanmac: we have this fancy Web Application Firewall that uses 1000+ regexen to filter http requests and responses for maliciousness.
hunglin has joined #ruby
carlyle has joined #ruby
<epochwolf> IT has caused almost 12 hours of production downtime during peak hours this year alone.
mengu has joined #ruby
<Hanmac> you mean the same firewall that blocks fsf.org? http://www.fsf.org/blogs/community/dear-microsoft-fsf.org-is-not-a-gambling-site
<epochwolf> and we have one server that vanishes from the internet for 20 minutes out of every 4 hours.
<jd__> i use puts hash.sort_by {|k,v| v} to sort a hash by values and output it but it puts out a line after the key and after the values how would i get the key and value on one line?
<Sou|cutter> epochwolf: I don't think I could take that
<Sou|cutter> epochwolf: you have my sympathy
plastics- has quit [Ping timeout: 252 seconds]
<epochwolf> in short, I am stuck using LibXML and I would not like to have to insert a node like <13917ECE-238B-4287-8717-0DE628DE3B4B/> and do a regex replace.
<epochwolf> Sou|cutter: I don't have to deal with this application too much. My other project uses nokogiri.
<epochwolf> and ruby 1.9.3
<epochwolf> I was able to get a new project started with more modern technology so I didn't have to deal with this on a daily basis.
<epochwolf> So, any good solutions?
dnyy_ has quit [Remote host closed the connection]
<epochwolf> What does LibXML::XML::Node#content do?
jxf has quit [Ping timeout: 260 seconds]
graspee has quit [Quit: brb]
Jake232 has joined #ruby
awarner has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
king313 has quit [Quit: .]
<epochwolf> LibXML::XML::Node.new("forms", "<form/>") # => "<forms>&lt;form/&gt;</forms>"
savage- has joined #ruby
<epochwolf> today will be a long day.
workmad3 has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
jwmann has quit [Remote host closed the connection]
wpaulson has quit [Ping timeout: 265 seconds]
booginga has quit [Quit: This computer has gone to sleep]
liluo has quit [Remote host closed the connection]
chaingun has quit [Remote host closed the connection]
jxf has joined #ruby
<Spooner> jd__ : Sorting converts the hash into an array of key-value pairs (arrays). You would use something like hash.sort_by {|k,v| v }.each {|k,v| puts "#{k}: #{v}" }
ciopte7 has quit [Quit: ciopte7]
wpaulson has joined #ruby
atmosx has joined #ruby
tcopp has quit [Quit: Lost terminal]
<jd__> that's what i thought but when i try that i get this -:2:in `<main>': undefined method `sort_by' for -3174409964720891477:Fixnum (NoMethodError)
<jd__> oh wait let me try again
jwmann has joined #ruby
uris has quit [Quit: leaving]
otherj has left #ruby [#ruby]
ph^ has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
ilyam has joined #ruby
ken_barber has quit [Remote host closed the connection]
ph^ has joined #ruby
wpaulson has quit [Ping timeout: 240 seconds]
<jd__> Spooner: that worked, thanks could you explain the logic on that ? thanks
nari_ has joined #ruby
<Spooner> Well, when sorted, { a: 5, b: 2 } becomes [[:b, 2], [:a, 5]]
monkegjinni has quit [Remote host closed the connection]
rizzylt has joined #ruby
davidcelis has quit [Ping timeout: 272 seconds]
<Spooner> And then you iterate through the (sorted) array, each of the sub-arrays being assigned into the second |k, v| - make sense?
trend has quit [Quit: trend]
<jd__> yes i think that does make sense, thanks
trend has joined #ruby
ph^ has quit [Ping timeout: 272 seconds]
Targen has quit [Quit: No Ping reply in 180 seconds.]
eph3meral has quit [Quit: Leaving]
libertyprime has quit [Quit: Lost terminal]
<Spooner> If you try to puts an array (or nested array) it just displays it very simply. If you just want to inspect it, you could try using p or pp (the latter requires you require 'pp')
Sheehan has quit [Quit: Sheehan]
libertyprime has joined #ruby
cherrypeel has quit [Read error: Connection reset by peer]
chaingun has joined #ruby
digitalcakestudi has quit [Ping timeout: 265 seconds]
macmartine has joined #ruby
crankycoder has quit [Remote host closed the connection]
sailias has joined #ruby
kirun has quit [Quit: Client exiting]
SQLStud has quit [Quit: Leaving]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
ciopte7 has joined #ruby
binaryplease has quit [Quit: WeeChat 0.3.8]
wpaulson has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
davidw has quit [Ping timeout: 264 seconds]
mdaisuke has quit [Remote host closed the connection]
carlyle has joined #ruby
Siphonblast has joined #ruby
MrGando has quit [Quit: Computer has gone to sleep.]
wilersh has joined #ruby
ph^ has joined #ruby
eurek has joined #ruby
dnyy has joined #ruby
wpaulson has quit [Ping timeout: 264 seconds]
headius has quit [Quit: headius]
berserkr has quit [Quit: Leaving.]
sam113101 has joined #ruby
ph^ has quit [Ping timeout: 244 seconds]
Aaton_off is now known as Aaton
jrist is now known as jrist-afk
atmosx has quit [Quit: leaving]
atmosx has joined #ruby
mockra has quit [Remote host closed the connection]
<ggreer> I know paretheses are optional when calling functions in ruby, but is one way preferred?
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<davidcelis> ggreer: omit parens unless passing a method to a method
<ggreer> ah, thanks
<davidcelis> well, assuming that passed method takes args
<davidcelis> like
<atmosx> hmm
<davidcelis> puts "hello" / puts hello(name)
<workmad3> davidcelis: heh :) I actually tend to prefer keeping parens, apart from with most class macros and 0-param methods
<ggreer> is there something like pep8 that I should follow?
<davidcelis> i think it's pretty subjective; its one thing about Ruby that I hear the most differing opinions about
<davidcelis> pep8 as in the assembly teacher?
the_jeebster has quit [Quit: Leaving.]
Nick____ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<ggreer> as in the python style guides
<davidcelis> lol
<davidcelis> ggreer: you can look at GitHub's ruby style guide
<ggreer> thanks
chson has joined #ruby
<Paradox> also: pickaxe book
ZachBeta_ has joined #ruby
<canton7> most style guides I've seen say to omit parens for no-arg methods and things which are part of a DSL, and always add them otherwise
wpaulson has joined #ruby
<workmad3> davidcelis: methods just look wrong to me without parens... does depend a lot on context though
<workmad3> davidcelis: I mean, something like 'attr_accessor :attr' is a no-parens no-brainer :)
<davidcelis> I even kind of prefer to omit parens when defining methods
<workmad3> davidcelis: every time I see a method like that, I need to do a double-take to work out where the parens are
<davidcelis> unless defining a one-liner method
<workmad3> *params
kevinbond has quit [Quit: kevinbond]
<davidcelis> the params are the rest of the line
<davidcelis> which is why i find it unnecessary
<canton7> it's just ugly to do that imo
ZachBeta has quit [Read error: Connection reset by peer]
ElderFain_ has joined #ruby
ElderFain has quit [Read error: Connection reset by peer]
Jake232 has quit [Ping timeout: 272 seconds]
<davidcelis> i think this is an ok thing to disagree on
<davidcelis> its not like i'm advocating for six-space tabs :)
<workmad3> davidcelis: agreed :)
<canton7> yeah, each to their own
iamjarvo has quit [Read error: Connection reset by peer]
wpaulson has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
oooPaul has quit [Quit: Ciao for now!]
jimeh has quit [Ping timeout: 248 seconds]
cousine has joined #ruby
<t_j> how do I set a variable to null? "var = nil" ?
locriani has quit [Remote host closed the connection]
<davidcelis> yes
<workmad3> t_j: that's how you set it to nil, yes
cantonic has joined #ruby
<workmad3> t_j: there isn't a 'null' in ruby, only a 'nil' though ;)
whitenoise has quit [Quit: Leaving]
<t_j> and if I pass nil to a ActiveRecord model's new() it will set the value in the DB to null and not crash?
Chryson has joined #ruby
<davidcelis> what
MrGando has joined #ruby
<davidcelis> t_j: #rubyonrails
atmosx has quit [Ping timeout: 276 seconds]
bitsar2 has joined #ruby
hasrb_ has quit [Remote host closed the connection]
rakunHo_ has joined #ruby
tomb_ has joined #ruby
cantonic has quit [Client Quit]
Nick____ has joined #ruby
rakunHo has quit [Ping timeout: 260 seconds]
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
vonsar has quit [Ping timeout: 260 seconds]
MrGando has quit [Ping timeout: 244 seconds]
tomb_ has quit [Read error: Connection reset by peer]
Criztian has quit [Remote host closed the connection]
jxf has quit [Ping timeout: 260 seconds]
ankakusu has quit [Ping timeout: 245 seconds]
alindeman has quit [Ping timeout: 240 seconds]
imami|afk has quit [Ping timeout: 244 seconds]
SeySayux has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
ramblex has quit [Quit: ramblex]
emmanuelux has joined #ruby
banseljaj has joined #ruby
iocor has quit [Ping timeout: 244 seconds]
enherit has quit [Ping timeout: 244 seconds]
jeekl has quit [Ping timeout: 244 seconds]
shikamaru has joined #ruby
epitron has quit [Read error: Connection reset by peer]
BadAtom has quit [Ping timeout: 240 seconds]
sejo has quit [Ping timeout: 240 seconds]
epitron has joined #ruby
epitron has joined #ruby
epitron has quit [Changing host]
ianbrandt has quit [Ping timeout: 240 seconds]
Guest39968 has quit [Ping timeout: 240 seconds]
joppe has quit [Ping timeout: 240 seconds]
sejo has joined #ruby
<t_j> whats wrong with this: if a == "A" and b == "b"
enherit has joined #ruby
sirecote has quit [Ping timeout: 244 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
atmosx has joined #ruby
ebanoid has quit [Ping timeout: 240 seconds]
dasuchin has quit [Ping timeout: 240 seconds]
oc has quit [Ping timeout: 240 seconds]
dasuchin has joined #ruby
joppe has joined #ruby
hunglin has quit [Quit: Leaving.]
oc has joined #ruby
wpaulson has joined #ruby
canton7 has quit [Ping timeout: 240 seconds]
yonggu_ has quit [Quit: yonggu_]
iocor has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 244 seconds]
devdazed has quit [Ping timeout: 244 seconds]
BadAtom has joined #ruby
sailias has quit [Ping timeout: 260 seconds]
emmanuelux has quit [Ping timeout: 244 seconds]
jalljo has quit [Ping timeout: 240 seconds]
RubyPanther has quit [Ping timeout: 240 seconds]
mrmist has quit [Read error: Connection reset by peer]
ebanoid has joined #ruby
Progster has quit [Ping timeout: 252 seconds]
SegFaultAX|work2 has joined #ruby
mrmist_ has joined #ruby
sirecote has joined #ruby
sernin has quit [Ping timeout: 240 seconds]
Yugo has joined #ruby
skinny_much has joined #ruby
sernin has joined #ruby
sailias has joined #ruby
josefig has quit [Ping timeout: 244 seconds]
emdub has quit [Ping timeout: 244 seconds]
klaas has quit [Ping timeout: 244 seconds]
jxf has joined #ruby
devdazed has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
emdub has joined #ruby
Nick____ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
SeySayux has joined #ruby
BadAtom has quit [Ping timeout: 240 seconds]
wpaulson has quit [Ping timeout: 272 seconds]
minijupe has joined #ruby
cakehero has joined #ruby
Kwpolska has quit [Ping timeout: 244 seconds]
yannis has joined #ruby
etank has quit [Quit: WeeChat 0.3.8]
BadAtom has joined #ruby
cuppsy has quit [Ping timeout: 240 seconds]
etank has joined #ruby
Kwpolska has joined #ruby
Yugo has quit [Read error: Connection reset by peer]
sirecote has quit [Ping timeout: 244 seconds]
klaas has joined #ruby
cuppsy has joined #ruby
Tearan has quit [Ping timeout: 244 seconds]
shoosty has joined #ruby
wpaulson has joined #ruby
shoosty has left #ruby [#ruby]
vladiim has joined #ruby
mmercer has quit [Ping timeout: 244 seconds]
nari_ has quit [Ping timeout: 240 seconds]
Yugo has joined #ruby
manizzle has quit [Ping timeout: 240 seconds]
Rizzle has quit [Ping timeout: 240 seconds]
kaneda has quit [Ping timeout: 248 seconds]
yankhates has joined #ruby
Rizzle has joined #ruby
manizzle has joined #ruby
sirecote has joined #ruby
ceradon has quit [Ping timeout: 244 seconds]
mmercer has joined #ruby
rizzylt has quit [Read error: Operation timed out]
albemuth has quit [Ping timeout: 244 seconds]
kaneda has joined #ruby
tiripamwe has joined #ruby
x0F has quit [Ping timeout: 244 seconds]
Kwpolska has quit [Ping timeout: 240 seconds]
Kwpolska has joined #ruby
Kwpolska has quit [Changing host]
Kwpolska has joined #ruby
cuppsy has quit [Remote host closed the connection]
ceradon has joined #ruby
baroquebobcat has quit [Ping timeout: 264 seconds]
cuppsy has joined #ruby
alindeman has joined #ruby
albemuth has joined #ruby
jalljo has joined #ruby
x0F has joined #ruby
jeekl has joined #ruby
RubyPanther has joined #ruby
sirecote has quit [Ping timeout: 240 seconds]
itnomad has quit [Quit: Leaving]
ianbrandt has joined #ruby
wpaulson_ has joined #ruby
zaychenok has quit [Ping timeout: 252 seconds]
alindeman has quit [Remote host closed the connection]
sirecote has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mikepack_ has joined #ruby
Nick____ has joined #ruby
wpaulson has quit [Ping timeout: 250 seconds]
wpaulson_ is now known as wpaulson
pdtpatrick has quit [Quit: pdtpatrick]
jxpx777 has quit [Quit: Be back later]
AllanMacGregor has joined #ruby
brianpWins has quit [Quit: brianpWins]
amacgregor_osx_ has joined #ruby
AllanMacGregor has quit [Read error: Connection reset by peer]
iocor has quit [Quit: Computer has gone to sleep.]
alindeman has joined #ruby
umttumt has joined #ruby
andrewhl has joined #ruby
dnyy has quit [Remote host closed the connection]
jxf has quit [Ping timeout: 260 seconds]
josefig has quit [Quit: Leaving]
kenperkins has quit [Ping timeout: 246 seconds]
albemuth has quit [Quit: Computer has gone to sleep.]
rasbonics has quit [Quit: rasbonics]