jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<brent_> never heard of it
<epitron> You don't have to initialize it anywhere...
htmldrum_ has quit [Ping timeout: 276 seconds]
htmldrum has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
<brent_> i'll take a look
biberu has quit [Read error: Connection reset by peer]
<brent_> thanks for the help havenwood Ox0dea shevy
spider-mario has quit [Remote host closed the connection]
<Ox0dea> brent_: Sure thing. :)
jobewan has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
Rutix has quit []
blackmesa has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
jnj has joined #ruby
<brent_> sure i'll be back asking for help again soon
<smathy> There are very few.
<smathy> (scrolled back, talking about hoping to find a use for @@ :)
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<shevy> we all hope so!
<Ox0dea> @@ is for when you don't want the warning associated with redefining a constant. :)
sandstrom has joined #ruby
Azure has joined #ruby
<shevy> lol
preyalone has joined #ruby
yatish27 has quit [Remote host closed the connection]
<brent_> a constant in the class would be betterthan @@?
yatish27 has joined #ruby
<Ox0dea> brent_: It's essentially the same thing.
s2013 has quit [Quit: Textual IRC Client: www.textualapp.com]
sandstrom has quit [Client Quit]
SuperLag has joined #ruby
<brent_> seems like it
<Ox0dea> brent_: The equivalence breaks when it comes to assignment, though.
<brent_> but you said it will proivde a warning while @@ doesnt'
<havenwood> Which reminds me, I think Pry needs a private_constant patch.
<SuperLag> I have someone else's rails app code, and I'm trying to set it up. Do I have to manually install all the gems in the Gemfile, or is there a way to get all that done automatically?
<havenwood> SuperLag: bundle
BillSussman has quit [Quit: Leaving]
<havenwood> SuperLag: As in from the root dir of the project type: bundle
<smathy> Ox0dea, except you CAN redefine a constant in a subclass without overwriting the base class's value.
<havenwood> SuperLag: (After installing Bundler: gem install bundler)
<Ox0dea> smathy: Right, that's the crucial distinction.
jobewan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azure has quit [Remote host closed the connection]
yatish27 has quit [Ping timeout: 268 seconds]
Timba-as has joined #ruby
<Ox0dea> brent_: https://eval.in/542709
danielpclark has joined #ruby
Azure has joined #ruby
<Ox0dea> So, for sharing data with subclasses, constants suffice unless you actually *want* the data to be modifiable by all relevant parties, which is rarely a great idea.
<brent_> makes sense
<brent_> thanks
tesuji has quit [Ping timeout: 250 seconds]
tesuji has joined #ruby
Blaguvest has joined #ruby
<Ox0dea> >> x = 1; -x.class rescue $! # This kinda sucks.
<ruby[bot]> Ox0dea: # => #<NoMethodError: undefined method `-@' for Fixnum:Class> (https://eval.in/542712)
Rutix has joined #ruby
Rutix has joined #ruby
<danielpclark> >> RUBY_VERSION
<danielpclark> Does the bot require a specific format to process code?
<adaedra> It requires to be registered.
roshanavand has quit [Quit: This computer has gone to sleep]
hightower2 has quit [Ping timeout: 246 seconds]
hiyosi has joined #ruby
bronson has joined #ruby
<danielpclark> >> eval "#{"!" * rand(2)}:quarter ? :heads : :tails" # coin toss
<ruby[bot]> danielpclark: # => :heads (https://eval.in/542717)
Timba-as has quit [Read error: Connection reset by peer]
superfox_il_volp has quit []
<danielpclark> That's awesome :-)
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
Timba-as has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
<Ox0dea> This is nifty: https://eval.in/542718
bronson has quit [Ping timeout: 252 seconds]
mjuszczak has joined #ruby
<Ox0dea> But the precedence of method calls over unary + makes chaining on them ugly. :/
ascarter has joined #ruby
blackgoat has joined #ruby
houhoulis has joined #ruby
torandu has joined #ruby
jnj has quit [Ping timeout: 244 seconds]
mjuszcza_ has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mjuszczak has quit [Ping timeout: 240 seconds]
rkazak has quit [Quit: Sleep.....ing....]
mjuszcza_ has quit [Client Quit]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Evan- has joined #ruby
saneax is now known as saneax_AFK
marcdel_ has quit [Ping timeout: 248 seconds]
<rehat> what does "rvm reinstall 2.2.1 --disable-binary" do? that fixed a OpenSSL error I was having. Does that just reinstall ruby? It took forever to finish lol
htmldrum_ has quit [Ping timeout: 248 seconds]
htmldrum has quit [Ping timeout: 248 seconds]
Cohedrin has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
huyderman has quit [Remote host closed the connection]
tesuji has joined #ruby
huyderman has joined #ruby
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dvinciguerra has quit [Ping timeout: 260 seconds]
Musashi007 has quit [Quit: Musashi007]
elifoster has joined #ruby
shaman42 has quit [Ping timeout: 244 seconds]
nw has quit [Ping timeout: 240 seconds]
Timba-as_ has joined #ruby
Timba-as has quit [Read error: Connection reset by peer]
tubuliferous_ has joined #ruby
mistermocha has joined #ruby
dasher^0_o has joined #ruby
mgorbach has quit [Ping timeout: 244 seconds]
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #ruby
ytti has joined #ruby
Es0teric has quit [Remote host closed the connection]
ytti has quit [*.net *.split]
mgorbach has joined #ruby
dasher00 has quit [Ping timeout: 276 seconds]
tubuliferous_ has quit [Ping timeout: 244 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
glcx has joined #ruby
youch has quit [Quit: Konversation terminated!]
ytti has joined #ruby
shaman42 has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
nw has joined #ruby
nw is now known as Guest45216
ytti has quit [Ping timeout: 240 seconds]
uglybandersnatch has joined #ruby
Musashi007 has joined #ruby
shaman42 has quit [Ping timeout: 276 seconds]
Timba-as_ has quit [Quit: Be back later ...]
htmldrum_ has joined #ruby
htmldrum has joined #ruby
ytti has joined #ruby
u404 has quit [Remote host closed the connection]
xxneolithicxx has joined #ruby
u404 has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
xxneolithicxx has joined #ruby
jpfuentes2 has joined #ruby
Guest45216 has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
u404 has quit [Remote host closed the connection]
shaman42 has joined #ruby
Guest45216 has joined #ruby
astrobun_ has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
tvon has joined #ruby
htmldrum_ has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
`tim` has joined #ruby
diego1 has joined #ruby
cpup has joined #ruby
fullofcaffeine has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola is now known as Guest18990
diego1 is now known as diegoviola
astrobun_ has quit [Ping timeout: 276 seconds]
Es0teric has joined #ruby
Guest18990 has quit [Ping timeout: 264 seconds]
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #ruby
ytti has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
ytti has quit [*.net *.split]
arescorpio has joined #ruby
<brent_> Ox0dea https://eval.in/542725 does this make sense. board is defaulted to a str of "_" for unguessed letters
<brent_> trying to give some logic to have the computer pick the most likely letters
tvon has quit [Ping timeout: 244 seconds]
<Ox0dea> brent_: You want it to make the optimal guess?
<brent_> yeah
kfpratt has joined #ruby
<brent_> so w/ letters defined
binaryplease has joined #ruby
<brent_> i will then have it select the most frequent letter
smathy is now known as smathy_afk
<brent_> which i need to figure out how to do
Hoffman has joined #ruby
<Hoffman> hello
freerobby has joined #ruby
<brent_> but wonder if that makes sense to reduce the dictionary to words that have correclty guessed letters in the same index
<Hoffman> I am playing around with hashes, and I see that you can specify that the key is neither a string (it isnt quoted) nor a symbol (it isnt prefixed with a colon), so it must be a variable name. Yet that key can only be accessed by a symbol
<Hoffman> why is that?
<Ox0dea> Hoffman: Huh? Hash keys can be pretty much anything.
<Hoffman> yeah, but if I specify myHash={key: "value"}
<Hoffman> key is neither a string nor a symbol
<Ox0dea> brent_: Yes, that makes sense. In general, you want to reduce it down to all the words that it could be.
<Hoffman> but I need to do myHash[:key] to get the value
<Ox0dea> Hoffman: It's a Symbol there.
<Hoffman> I thought symbols had to be preceded by a colon
<Ox0dea> `{a: 1}` is syntactic sugar for `{:a => 1}`.
<Ox0dea> >> {a: 1} # Told ya.
<Hoffman> what if a actually was a variable holding a string
<ruby[bot]> Ox0dea: # => {:a=>1} (https://eval.in/542726)
<Hoffman> and I wanted to use that string as the key
andywojo has quit [Ping timeout: 240 seconds]
<Ox0dea> Then you'd have to use `=>`.
<Ox0dea> Without the colon.
<Ox0dea> >> s = 'foo'; h = {s => 42}; h['foo']
<ruby[bot]> Ox0dea: # => 42 (https://eval.in/542727)
<Hoffman> ok -- and that's true even in the latest version of ruby?
<Ox0dea> The sugar is a 1.9-ism.
<Hoffman> so it's not true in versions after 1.9?
<Ox0dea> ¯\_(ツ)_/¯
<brent_> do you have a recommendation for finding the most frequent str in that letters array?
<brent_> is there a way thats better than making a hash?
tristanp has joined #ruby
al2o3-cr has quit [Ping timeout: 244 seconds]
<Ox0dea> brent_: I'd set it up so that I could eventually call #max_by.
dextertzu has quit [Quit: WeeChat 1.3]
<brent_> i saw something about group_by
<brent_> but trying to understand how it works
freerobby has quit [Quit: Leaving.]
<Hoffman> I also see, when discussing methods, the way to name a method is Class#Method
<Hoffman> why isn't it Class.Method, the way it is called?
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> Because a distinction needs to be made between class methods and instance methods.
<brent_> letters.group_by { |letter| letter }.max_by(&:size)
freerobby has joined #ruby
<brent_> that look right?
kfpratt has quit [Remote host closed the connection]
<Ox0dea> Not quite; #group_by gives you back a Hash, and all your elements there are going to be of size 2.
<Hoffman> Ox0dea: so # refers to instance methods, whereas X refers to class (static?) methods
<Hoffman> is that right, and what is 'X'
<Ox0dea> Hoffman: X is `.` or `::`.
<Ox0dea> Prefer the former.
htmldrum has joined #ruby
<brent_> letters.group_by { |letter| letter }.max_by(&:size).first wouldn't work? seemed to in pry
htmldrum_ has joined #ruby
<Hoffman> and is a class method synonymous with a static method in Java?
<brent_> what do you mean by the size of 2, feel free to take your time as you're helping others
<Ox0dea> >> 'abbccc'.chars.group_by(&:itself).map(&:size) # brent_
<ruby[bot]> Ox0dea: # => [2, 2, 2] (https://eval.in/542728)
rubie has joined #ruby
<Ox0dea> Hoffman: No, not quite; `Hash.new` is a class method, in that it's defined on Hash itself, whereas Hash#size is available on instances thereof.
freerobby has quit [Client Quit]
<Hoffman> Ox0dea: sure, but regarding my question?
<Hoffman> that seems synonymous with java and s/class/static/
<Hoffman> static methods are called on the Class itself, whereas instance methods are available on instances thereof
blackgoat has quit [Ping timeout: 268 seconds]
<brent_> >> "aaabbcc".chars.group_by {|e| e }.max_by(&:size).first
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<brent_> lol
htmldrum_ has quit [Ping timeout: 248 seconds]
htmldrum has quit [Ping timeout: 248 seconds]
jpfuentes2 has joined #ruby
<Hoffman> Ox0dea: Integer.parseInt() for instance
solocshaw has joined #ruby
ytti has joined #ruby
jpfuentes2 has quit [Client Quit]
<Ox0dea> Hoffman: The analogy more or less holds, sure.
<Hoffman> cool, thanks
<Hoffman> for both @s
<Ox0dea> No worries.
<Hoffman> Qs*
<danielpclark> >> 'The cat in the hat eats his green eggs and ham'.chars.reduce({}) {|h,v| h[v] = h[v].to_i + 1; h}
<ruby[bot]> danielpclark: # => {"T"=>1, "h"=>5, "e"=>6, " "=>10, "c"=>1, "a"=>5, "t"=>4, "i"=>2, "n"=>3, "s"=>3, "g"=>3, "r"=>1, "d ...check link for more (https://eval.in/542729)
uglybandersnatch has quit [Ping timeout: 252 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
goodroot has joined #ruby
tvon has joined #ruby
diego1 has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
<brent_> Ox0dea can you elaborate on what you mean by size 2?
uglybandersnatch has joined #ruby
aef has quit [Remote host closed the connection]
aef has joined #ruby
<danielpclark> >> 'abbcccddddeeee'.chars.reduce({}) {|h,v| h[v] = h[v].to_i + 1; h}.max_by {|k,v| v } # max by value character count
<ruby[bot]> danielpclark: # => ["d", 4] (https://eval.in/542730)
diegoviola has quit [Ping timeout: 252 seconds]
<Ox0dea> brent_: Sure. Did you get clear on what #group_by does?
<brent_> looks like it returns a hash w/ the key as the value and an array of each time the value occurs
<Ox0dea> >> [1,2,3,4].group_by { |x| x.even? }
<ruby[bot]> Ox0dea: # => {false=>[1, 3], true=>[2, 4]} (https://eval.in/542731)
<brent_> 'a' => [a, a ,a]
<Ox0dea> brent_: The results of the predicate are used as the keys.
<brent_> right
Axy has joined #ruby
<brent_> are you talkinga bout size of 2, because of the key/value?
gh has joined #ruby
ytti has quit [*.net *.split]
<Ox0dea> brent_: When you use any Enumerable method other than #select/#reject on a Hash, it gets converted to an Array of key-value pairs; the size of any pair is of course 2.
Mia has quit [Ping timeout: 252 seconds]
spuk has quit [Ping timeout: 252 seconds]
<brent_> so is it a performance consideration?
yfeldblum has joined #ruby
<Ox0dea> In hindsight, I think I probably just misinterpreted something. :P If you have a frequency hash, you can say `hash.sort_by { |_, v| v.size }.last.first`.
<Hoffman> So to include INSTANCE methods from another class into your class, you can use INCLUDE... to include CLASS methods from another class into your class, you can use EXTEND.... but, to include INSTANCE methods from another class into your OBJECT, you use... EXTEND?
<Hoffman> Why wouldn't the third be INCLUDE, since we're referring to instance methods and not class methods?
<Ox0dea> Hoffman: Because you want those instance methods to be added to the object's singleton class.
<Hoffman> just that single object instance
<Hoffman> no other instances of the object
<Ox0dea> A singleton class belongs to exactly one object, yes.
fullofca_ has joined #ruby
<Hoffman> I thought a singleton class is a class which can only have a single instance
<Ox0dea> No, that's a singleton.
<Ox0dea> "The hardest part of computer science is naming things."
<Hoffman> so a singleton class is effectively a singleton for that instance
patrick-sartent has joined #ruby
<Hoffman> since no other instances will share that singleton class
fullofcaffeine has quit [Ping timeout: 264 seconds]
<Ox0dea> That's right; you can't make new instances from singleton classes.
BTRE has quit [Ping timeout: 276 seconds]
<Ox0dea> >> singleton_class.new rescue $!
<ruby[bot]> Ox0dea: # => #<TypeError: can't create instance of singleton class> (https://eval.in/542732)
<Hoffman> Ox0dea: but that still doesnt really address the initial question, because INCLUDE vs. EXTEND can both be used to extend a class, and the one you use depends on whether you want to include instance methods or class methods
abort has quit [Quit: leaving]
<Hoffman> so why would you use the one meant to include class methods if your intention is to include instance methods
<Ox0dea> Hoffman: foo.extend(bar) adds bar's instance methods to foo's singleton class.
<Hoffman> right
<Ox0dea> It works the same for classes as for individual objects.
<Ox0dea> Since, y'know, classes *are* individual objects. :P
abort has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<Hoffman> if you put in a class foo that it EXTENDS bar, then bar's CLASS methods go into foo. If you put in a class foo that it INCLUDES bar, then bar's INSTANCE methods go into foo
TomyLobo has quit [Ping timeout: 268 seconds]
<Hoffman> so the difference between "extend" and "include" in ruby appears to be that "extend" is for including class methods, whereas "include" is for including instance methods
<Hoffman> but then, if you want to include those same instance methods into an object, rather than a class, it's backwards
<Ox0dea> It's not.
<Hoffman> if you want to include INSTANCE methods in a class, you use INCLUDE. If you want to include INSTANCE methods in an object, you use EXTEND
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
<Hoffman> if you're doing the same thing, why is it two different keywords?
<Ox0dea> They're methods, not keywords.
<Hoffman> method names are keywords
<Ox0dea> Wat.
<Hoffman> by the dictionary definition
<Hoffman> lemme fix it then
<Hoffman> if you're doing the same thing, why is it two different *words*
spuk has joined #ruby
<Hoffman> "I want to put instance methods into this thing" should be extend, or it should be include, so why is it both?
<Hoffman> depending on the scenario
<shevy> you operate on different scopes
<Hoffman> sure, but there was a conscious decision to use two different words depending on scope, instead of the intuitive one
<Hoffman> why?
ytti has joined #ruby
glcx has quit [Quit: Quitte]
<shevy> you'd have to ask matz about the distinction. I don't even think that the distinction between classes or modules makes any sense either
gh has quit [Quit: Leaving]
postmodern has joined #ruby
fedexo has quit [Ping timeout: 250 seconds]
<shevy> we can even do Module.new!
BTRE has joined #ruby
<Ox0dea> Hoffman: I hope this helps. https://eval.in/542733
LoneHermit has joined #ruby
gregf has joined #ruby
dextertzu has joined #ruby
<Ox0dea> A class is "just an Object", an instance of the Class class.
jaequery has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
xxneolithicxx has quit [Quit: Leaving.]
duncannz has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
astrobun_ has joined #ruby
dn5 has joined #ruby
<dn5> heey
bronson has joined #ruby
rubie has quit [Remote host closed the connection]
<dn5> how would I generate from A to Z respectively like: QQWE QQWR QQWT etc. instead of A..Z rand
<dn5> ehm more like QQQQ QQQW QQQE
dtzuzu has quit [Ping timeout: 248 seconds]
<Mendenhall_> More details?
astrobun_ has quit [Ping timeout: 252 seconds]
<dn5> Ox0dea: would this go further like WWWW etc.
<Ox0dea> dn5: Nix the `first(10)` bit if you want all 456976 of 'em. :)
andywojo has joined #ruby
kfpratt has joined #ruby
<Hoffman> Ox0dea: I guess it makes sense in that context
bronson has quit [Ping timeout: 252 seconds]
<dn5> Ox0dea: I do want all of them. You are truly a master :) ty
<Ox0dea> dn5: Happy to help.
<Hoffman> Since a class method is just an instance method of the superclass
<Ox0dea> s/superclass/singleton class/
<Hoffman> or something
trinaldi has quit [Quit: WeeChat 1.5-dev]
Musashi007 has joined #ruby
<Hoffman> so when I define but do not instantiate a class in Ruby, I am still instantiating an object, which is called a singleton class, which extends Class
<Hoffman> right?
<Ox0dea> Not really. :/
<Hoffman> so when I define but do not instantiate a class in Ruby, I am still instantiating an object <--- right so far?
<Hoffman> since a class is an object
<Ox0dea> Right so far.
<Hoffman> and any class methods added to that class, are actually instance methods of Class
<Hoffman> since that class is an instance of Class
<Ox0dea> Way off.
<Hoffman> So when that class is defined, it becomes an object, whose template is the superclass "Class"
andywojo has quit [Ping timeout: 252 seconds]
<Hoffman> and that template is copied and stored with the defined class/object
<Hoffman> and that copy is the singleton class?
ytti has joined #ruby
<Ox0dea> "Copied" isn't quite right; it's a little more implicit than that.
yqt has quit [Ping timeout: 276 seconds]
<Hoffman> go on
<Hoffman> how was that inheirited after the fact?
<Hoffman> doesn't inheiritance mean, by definition, that the parent had it?
<Ox0dea> In Ruby, it means that the parent *has* it.
<Hoffman> oh nvm, I read it backwards
<Hoffman> I am thinking more along the lines of...
<Ox0dea> That was only meant to demonstrate why "copied" isn't perfectly applicable.
<Hoffman> if defining a class just creates an instance of Class, how can you do stuff like add methods to that instance?
<Hoffman> Shouldn't you need to add methods to an actual class before you can use those methods in an instance of that class?
<Hoffman> Seems to violate OO somehow
b|ackwolf has quit [Ping timeout: 244 seconds]
<Ox0dea> It's not perfectly clear to me what's being asked.
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> Method lookup in Ruby is pretty dynamic compared to other OO languages, but it's still reasonably intuitive.
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<Hoffman> If you can modify the definition of a class used by an instance, instead of modifying the definition in the class and then constructing an instance of the now-modified class, doesn't that violate OO?
<Hoffman> how can you be sure your instance is actually an instance of the class at all?
tubuliferous_ has joined #ruby
<Hoffman> If you give me an instance Y of class X, I expect it to be able to do everything class X can do, but you're saying that you can modify Y in-place to be completely different than any other instance of class X
yatish27 has joined #ruby
fullofca_ has quit [Remote host closed the connection]
<Ox0dea> Well, yes, I suppose that's the case; you just have to be aware of the fact that an object's singleton class takes precedence.
<Hoffman> is an objects singleton class also an object, then?
<Ox0dea> It's a class, isn't it?
<Hoffman> So if you, say, add a method to an instance, how does Ruby know that it should modify the singleton class to include that new method?
fexilal has quit [Ping timeout: 276 seconds]
ytti has quit [*.net *.split]
GodFodder has quit [Ping timeout: 248 seconds]
<Ox0dea> Could you say exactly what you mean by "add a method to an instance"?
htmldrum_ has quit [Ping timeout: 250 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
<Hoffman> sec, thinking of how I might express it in code
<Ox0dea> Now you're speaking my language. :P
tubuliferous_ has quit [Ping timeout: 240 seconds]
tvon has quit [Remote host closed the connection]
tvon has joined #ruby
tvon has quit [Remote host closed the connection]
tvon has joined #ruby
ytti has joined #ruby
brt has quit [Ping timeout: 276 seconds]
braincrash has quit [Quit: bye bye]
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #ruby
blackgoat has joined #ruby
<Hoffman> I guess I was mistaken
<Hoffman> I thought that since every class is an object, every object is a class, but that doesnt appear to be the case
pawnbox has joined #ruby
<Ox0dea> That's probably whence came your confusion regarding #extend.
ytti has quit [Ping timeout: 240 seconds]
<Ox0dea> It is the case that most any object can have a singleton class, but they sort of "spring into existence".
solocshaw has quit [Ping timeout: 250 seconds]
kfpratt has quit [Remote host closed the connection]
<Hoffman> Ox0dea: so every class in Ruby has 2 parent classes
<Ox0dea> Hoffman: How'd you get there?
<Hoffman> the actual parent class (Class if there is none), and the singleton_class
<Hoffman> and singleton_class takes precedence
<Ox0dea> Well, we have "ancestors" for cleaning up the potential ambiguity there.
pawnbox has quit [Ping timeout: 264 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
<Hoffman> Ox0dea: so the parent class is always the singleton class, and the grandparent class is the OO-parent class (like Class)?
<Ox0dea> Hoffman: Only if the Object does in fact have a singleton class.
nanoz has joined #ruby
<Hoffman> Ox0dea: why wouldn't it?
<Ox0dea> Hoffman: They spring into existence.
<Hoffman> What's the trigger?
<Hoffman> besides asking for it with .singleton_class
<Ox0dea> Defining a method which requires its creation.
braincras has joined #ruby
<Hoffman> what type of method would require that?
<Ox0dea> Any singleton method, really.
dn5 has quit [Quit: Lost terminal]
mistermocha has joined #ruby
<Ox0dea> Hoffman: https://eval.in/542744
<Hoffman> what are the characteristics of a method which make it a singleton method
<Ox0dea> It is defined on a single object.
Mendenhall_ is now known as Mendenhall
<Ox0dea> In that example, no other instance of Class receives the method, just C.
<Hoffman> Ox0dea: but if you hadnt used self, then it would still be defined on a single object
<Hoffman> since thats the only object which exists
GodFodder has joined #ruby
<Ox0dea> Hoffman: Sure, but it would be an instance method on C, available to all Cs.
GodFodder has quit [Max SendQ exceeded]
a11 has joined #ruby
a11 has quit [Remote host closed the connection]
GodFodder has joined #ruby
GodFodder has quit [Max SendQ exceeded]
mistermocha has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
saneax_AFK is now known as saneax
GodFodder has joined #ruby
GodFodder has quit [Max SendQ exceeded]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Hoffman> brb
Hoffman has quit []
Hoffman has joined #ruby
<Hoffman> Ox0dea: I just dont understand why this works: https://eval.in/542745
<Ox0dea> Hoffman: Er, which part doesn't make sense?
<Hoffman> Ox0dea: how does Baz incorporate method1() , if not by inheiritance?
<Hoffman> inheritance
<Ox0dea> Hoffman: Ruby has open classes; you can add to them whenever you wish.
<Hoffman> Right, but what is the Class for the Instance which is baz?
<Ox0dea> It's a Foo with a singleton class.
<Hoffman> can you rephrase "with a"
<Hoffman> where is each in the inheritance chain
<Hoffman> parent, grandparent, etc
xcesariox has joined #ruby
<Ox0dea> >> 'foo'.singleton_class.ancestors # Hoffman
<ruby[bot]> Ox0dea: # => [#<Class:#<String:0x40a41c18>>, String, Comparable, Object, Kernel, BasicObject] (https://eval.in/542746)
ytti has joined #ruby
ytti has quit [*.net *.split]
<Hoffman> Ox0dea: foo --> Foo in my code?
<Ox0dea> Pardon?
<Hoffman> My code doesnt have foo
<Hoffman> in the context of my code, are you asking me to run Foo.singleton_class.ancestors?
<Hoffman> Or baz.singleton_class.ancestors?
bb010g has quit [Quit: Connection closed for inactivity]
<Ox0dea> No, I was demonstrating that an Object with a singleton class has that singleton class at the front of its "inheritance chain".
gix has quit [Ping timeout: 244 seconds]
<Hoffman> but baz.instance_of? baz.singleton_class returns false
pawnbox has joined #ruby
<Ox0dea> Sure, singleton classes can't be instantiated.
<Hoffman> so baz is not an instance of its singleton class?
<Ox0dea> That's correct.
<Ox0dea> `instance_of?(some_singleton_class)` will never be `true`.
<Hoffman> using the terms "child", "parent", "grandparent", "instance of", etc, where does a singleton class for an object fit in the OO class hierarchy
saneax is now known as saneax_AFK
Spami has quit [Quit: This computer has gone to sleep]
<Ox0dea> "Soul".
<Hoffman> So it's a special relation that exists outside of traditional OO hierarchies
<Hoffman> Does such a concept exist in Java?
<Ox0dea> I'm not sure.
dp_ has joined #ruby
gix has joined #ruby
<Ox0dea> No, it doesn't seem so.
pawnbox has quit [Ping timeout: 250 seconds]
<Hoffman> it just seems weird that you can modify the class definition of a single object without actually modifying the class that it's an instance of
andywojo has joined #ruby
tristanp has quit [Remote host closed the connection]
<dp_> Hey folks, I am summing a set of values from an API response but getting confused flipping between hashes and arrays. This feels like it should be really simple.
<Ox0dea> dp_: You've misunderstood the #each method. What you really want is #map.
<Hoffman> dp_: shouldnt line2 be requests =
<Hoffman> ?
ytti has joined #ruby
<Hoffman> er, request
<dp_> Yeah you are right
<Ox0dea> Hoffman: I guess it boils down to whether or not you think an object should be able to have behavior independent of its superclass.
<dp_> I ripped it out
<dp_> What was the comment about map vs. each there?
sneakerhax has quit [Ping timeout: 240 seconds]
<Hoffman> and yea what Ox0dea said. if you're consuming an array, and producing an array as a result, on an element-wise basis, then map is the tool for you
<Ox0dea> dp_: After Line 16, `orders == request['orders']`, which is not what you want.
devbug has joined #ruby
andywojo has quit [Ping timeout: 244 seconds]
<dp_> Ox0dea: awesome thanks will get up to speed on map
devbug_ has quit [Ping timeout: 244 seconds]
<Ox0dea> #each "does something" with the collection and then *evaluates to* that same collection. You want to perform a transformation, so you want #map.
tristanp has joined #ruby
Sammichmaker has quit [Ping timeout: 244 seconds]
ytti has quit [Ping timeout: 240 seconds]
madgen_ has quit [Ping timeout: 268 seconds]
baweaver has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
hiyosi has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
Axy has quit [Read error: Connection reset by peer]
<dp_> Ox0dea: Map makes sense now that I am changing the values. What is the simplest way to add each of those from that block. Is inject overkill?
Mia has joined #ruby
<Ox0dea> dp_: I prefer to spell it #reduce, but it's a fine method for tallying up a sum.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
htmldrum_ has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
gizless has joined #ruby
dp_ has quit [Quit: Page closed]
snoobydoo has joined #ruby
gizmore has quit [Ping timeout: 252 seconds]
diegoviola has quit [Quit: WeeChat 1.4]
zenergi has joined #ruby
hk238 has joined #ruby
rubie has joined #ruby
astrobun_ has joined #ruby
jhn has joined #ruby
ytti has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
astrobun_ has quit [Ping timeout: 276 seconds]
devbug has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ytti has quit [*.net *.split]
greister has quit [Quit: WeeChat 1.3]
greister has joined #ruby
mistermocha has joined #ruby
LoneHerm_ has joined #ruby
skweeke has quit [Remote host closed the connection]
skweek has quit [Remote host closed the connection]
LoneHerm_ has quit [Ping timeout: 264 seconds]
Puffball has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
skweek has joined #ruby
devbug has joined #ruby
rubie has quit [Remote host closed the connection]
Puffball has joined #ruby
trosborn has joined #ruby
marienz has quit [Quit: Lost terminal]
elifoster has quit [Ping timeout: 276 seconds]
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
valetudo has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby
trosborn has quit [Read error: Connection reset by peer]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trosborn has joined #ruby
trosborn has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
jnj has joined #ruby
ytti has joined #ruby
Zg0mY has joined #ruby
LoneHermit has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #ruby
vdamewood has quit [Quit: Life beckons.]
bronson has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
andywojo has joined #ruby
ytti has joined #ruby
baweaver has joined #ruby
jonee has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
rehat has quit [Ping timeout: 250 seconds]
andywojo has quit [Ping timeout: 260 seconds]
ytti has quit [Ping timeout: 240 seconds]
htmldrum_ has joined #ruby
htmldrum has joined #ruby
arlek has quit [Read error: Connection reset by peer]
goodroot has quit [Ping timeout: 276 seconds]
duderonomy has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
htmldrum_ has quit [Ping timeout: 246 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
duderonomy has joined #ruby
AnoHito has quit [Quit: Leaving]
pawnbox has joined #ruby
hiyosi has quit [Quit: Textual IRC Client: www.textualapp.com]
last_staff has joined #ruby
hiyosi has joined #ruby
htmldrum_ has quit [Ping timeout: 246 seconds]
htmldrum has quit [Ping timeout: 246 seconds]
trosborn has joined #ruby
babblebre has joined #ruby
baweaver has quit [Remote host closed the connection]
trosborn has quit [Client Quit]
ytti has joined #ruby
hiyosi has quit [Client Quit]
hiyosi has joined #ruby
yfeldblum has joined #ruby
pawnbox has quit [Remote host closed the connection]
AnoHito has joined #ruby
last_staff has quit [Quit: last_staff]
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yatish27 has quit [Remote host closed the connection]
ytti has quit [Ping timeout: 240 seconds]
duderonomy has quit [Ping timeout: 276 seconds]
nanoz] has joined #ruby
nanoz has quit [Ping timeout: 244 seconds]
LoneHermit has quit [Remote host closed the connection]
pawnbox has joined #ruby
cabargas has joined #ruby
ytti has joined #ruby
yatish27 has joined #ruby
trosborn has joined #ruby
astrobun_ has joined #ruby
Sammichmaker has joined #ruby
CloCkWeRX has joined #ruby
djbkd has joined #ruby
astrobun_ has quit [Ping timeout: 252 seconds]
arescorpio has quit [Quit: Leaving.]
mistermocha has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 244 seconds]
skweek has joined #ruby
x77686d has quit [Quit: x77686d]
diegoviola has joined #ruby
trosborn has quit [Quit: trosborn]
hinbody has joined #ruby
IrishGringo has quit [Ping timeout: 268 seconds]
houhoulis has quit [Remote host closed the connection]
BTRE has quit [Quit: Leaving]
tvon has quit [Remote host closed the connection]
yatish27 has quit [Remote host closed the connection]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
tvon has joined #ruby
tvon has quit [Remote host closed the connection]
tvon has joined #ruby
tesuji has quit [Ping timeout: 250 seconds]
rubie has joined #ruby
jonee has quit [Remote host closed the connection]
third has joined #ruby
Apocalypse has quit [Ping timeout: 246 seconds]
Guest72543 has quit [Ping timeout: 246 seconds]
nanoz] has quit [Ping timeout: 260 seconds]
htmldrum_ has quit [Ping timeout: 252 seconds]
htmldrum has quit [Ping timeout: 252 seconds]
rubie has quit [Ping timeout: 252 seconds]
DarkBushido has joined #ruby
DarkBushido has joined #ruby
Apocalypse has joined #ruby
JohnBat26 has joined #ruby
devbug_ has joined #ruby
jnj has quit [Ping timeout: 264 seconds]
rippa has joined #ruby
BTRE has joined #ruby
gizmore has joined #ruby
jt__ has joined #ruby
gizless has quit [Ping timeout: 260 seconds]
mistermocha has joined #ruby
binaryplease1 has joined #ruby
LoneHermit has joined #ruby
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
mondok has joined #ruby
binaryplease has quit [Ping timeout: 276 seconds]
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
tjbiddle has joined #ruby
LoneHermit has quit [Ping timeout: 252 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leon_e has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sudoubuntu has joined #ruby
sudoubuntu has quit [Client Quit]
diegoviola has quit [Quit: WeeChat 1.4]
infra-red has joined #ruby
bob434 has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<bob434> Hello. Suppose I have an array of first names and another array of last names. Is there a ruby method to generate a resulting array of full names?
blackgoat has quit [Quit: WeeChat 1.4]
tristanp has quit [Remote host closed the connection]
<bob434> So for example, ["Bill", "John"].method(["Smith", "Johnson"]) would produce [["Bill", "Smith"],["Bill", "Johnson"],["John", "Smith"],["John", "Johnson"]]
tvon has quit [Remote host closed the connection]
jaequery has joined #ruby
bronson has joined #ruby
cabargas has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has joined #ruby
andywojo has joined #ruby
statelesscode has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
Mia has quit [Ping timeout: 240 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jcdesimp_ has quit [Remote host closed the connection]
<jt__> bob434: Array#zip
mistermocha has quit [Ping timeout: 250 seconds]
shinnya has joined #ruby
ReK2 has joined #ruby
andywojo has quit [Ping timeout: 248 seconds]
<bob434> Array#zip only produces [["Bill", "Smith"], ["John", "Johnson"]] though. I'm looking for all first+last name combinations.
diegoviola has joined #ruby
<bob434> I think what I was looking for was Array#product
jaequery has quit [Ping timeout: 244 seconds]
jpfuentes2 has joined #ruby
Zg0mY has quit [Quit: Leaving]
jaequery has joined #ruby
fullofcaffeine has joined #ruby
goodroot has joined #ruby
gizmore has quit [Ping timeout: 276 seconds]
goodroot has quit [Ping timeout: 276 seconds]
User458764 has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
tjbiddle has quit [Ping timeout: 244 seconds]
sq271 has quit [Quit: leaving]
tvon has joined #ruby
johnny56_ has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
johnny56 has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
fexilal has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
rubie has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
Hoffman has quit [Ping timeout: 260 seconds]
rubie has quit [Ping timeout: 252 seconds]
nofxx has quit [Ping timeout: 260 seconds]
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
spuk has quit [Ping timeout: 252 seconds]
astrobun_ has joined #ruby
bmf_ has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
babblebre has quit [Quit: Connection closed for inactivity]
tristanp has joined #ruby
astrobun_ has quit [Ping timeout: 246 seconds]
agit0 has quit [Quit: zzzZZZ….]
baweaver has joined #ruby
tristanp has quit [Ping timeout: 248 seconds]
robbyoconnor has joined #ruby
mistermocha has joined #ruby
bmf_ has quit [Quit: Leaving]
baweaver has quit [Ping timeout: 244 seconds]
hightower2 has joined #ruby
djellemah_ has quit [Quit: Leaving]
edwinvdgraaf has quit [Ping timeout: 250 seconds]
nocontrol has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
djellemah has joined #ruby
rehat has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
the_drow has joined #ruby
htmldrum_ has quit [Ping timeout: 244 seconds]
firstdayonthejob has joined #ruby
CloCkWeRX has quit [Ping timeout: 244 seconds]
ytti has quit [*.net *.split]
goodroot has joined #ruby
diegoviola has quit [Quit: WeeChat 1.4]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
goodroot has quit [Ping timeout: 260 seconds]
LoneHermit has joined #ruby
Dimik has quit [Ping timeout: 250 seconds]
Don_John has quit [Read error: Connection reset by peer]
devbug_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
devbug_ has joined #ruby
devbug_ has quit [Client Quit]
shwouchkster has joined #ruby
<shwouchkster> Hello
LoneHermit has quit [Ping timeout: 252 seconds]
<shwouchkster> I have ruby 2.1.3 installed via rvm. However, when I run "ruby -rubygems -e 'puts Gem.user_dir'", I get ~/.gem/ruby/2.1.0. I look at $PATH and I see there ~/.rvm/gems/ruby-2.1.3/bin. What is going on and how do I reconcile all these?
<shwouchkster> oh, and I should mention that "which ruby" gives ~/.rvm/rubies/ruby-2.1.3/bin/ruby
<shwouchkster> why oh why?
sandstrom has joined #ruby
<hanmac> shwouchkster: you mean 2.1.3 and 2.1.0? the first one is API version, the second one if ABI version ... or do you mean the different paths? checkout 'gem environment' then you see "INSTALLATION DIRECTORY" and "USER INSTALLATION DIRECTORY"
<shwouchkster> hanmac: I'm not sure I understand the question. It seems that different programs are working with different paths somehow, which is obviously incorrect. For example, I started getting errors regarding gems installed without extensions and prompts to reinstall pristine versions
tvon has quit [Remote host closed the connection]
<shwouchkster> hanmac: so curiously, gem environment only has 2.1.3 paths
yfeldblum has quit [Ping timeout: 250 seconds]
<hanmac> okay if you get such errors, i am not sure if your ruby does point to the right file ... what does "which ruby" returns for you?
brent_ has quit [Quit: Connection closed for inactivity]
<shwouchkster> hanmac: '11:21:55 <shwouchkster> oh, and I should mention that "which ruby" gives ~/.rvm/rubies/ruby-2.1.3/bin/ruby'
andywojo has joined #ruby
agit0 has joined #ruby
<hanmac> maybe something is wrogn with the gems, so it might help if you reinstall them
Musashi007 has joined #ruby
<shwouchkster> hanmac: while I appreciate your attempt, i came here to get some more illumination rather than advice on how to poke in the dark for a solution. Thanks.
yfeldblum has joined #ruby
agit0 has quit [Ping timeout: 252 seconds]
andywojo has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
agit0 has joined #ruby
agentmeerkat has joined #ruby
devbug has quit [Ping timeout: 268 seconds]
statelesscode has quit [Quit: statelesscode]
bronson has quit [Ping timeout: 252 seconds]
doublemalt_ has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
devbug has joined #ruby
DoubleMalt has quit [Ping timeout: 260 seconds]
htmldrum_ has quit [Ping timeout: 250 seconds]
htmldrum has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
dc2 has joined #ruby
codecop has joined #ruby
ytti has joined #ruby
goodroot has joined #ruby
Musashi007 has joined #ruby
ytti has quit [*.net *.split]
Musashi007 has quit [Client Quit]
rohit has joined #ruby
goodroot has quit [Ping timeout: 250 seconds]
moss has quit [Ping timeout: 268 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Meow-J has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
djbkd has quit [Quit: My people need me...]
saneax_AFK is now known as saneax
mistermocha has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
mistermocha has quit [Ping timeout: 250 seconds]
tvon has joined #ruby
jt__ has quit [Ping timeout: 250 seconds]
tvon has quit [Ping timeout: 248 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
Guest24521 has joined #ruby
Guest24521 has left #ruby [#ruby]
hightower2 has quit [Ping timeout: 250 seconds]
CloCkWeRX has joined #ruby
duncannz has quit [Remote host closed the connection]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has joined #ruby
agit0 has quit [Read error: Connection reset by peer]
third is now known as voo
astrobun_ has quit [Ping timeout: 250 seconds]
sinanislekdemir has joined #ruby
ok has joined #ruby
infernix has quit [Ping timeout: 248 seconds]
sepp2k has joined #ruby
ok has left #ruby [#ruby]
tristanp has joined #ruby
TheRealGitGud has quit [Quit: You had my curiosity. But now you have my attention]
ok has joined #ruby
ok has left #ruby [#ruby]
htmldrum_ has joined #ruby
htmldrum has joined #ruby
TheGreatGudsby has joined #ruby
valetudo has joined #ruby
User458764 has joined #ruby
hinbody has quit [Quit: leaving]
LoneHerm_ has joined #ruby
tristanp has quit [Ping timeout: 246 seconds]
agit0 has joined #ruby
Synthead has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Read error: Connection reset by peer]
LoneHerm_ has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
JohnBat26 has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
infernix has joined #ruby
htmldrum_ has quit [Ping timeout: 276 seconds]
htmldrum has quit [Ping timeout: 276 seconds]
rohit has quit [Quit: Leaving]
nando293921 has quit [Ping timeout: 240 seconds]
valetudo has quit [Ping timeout: 250 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
goodroot has joined #ruby
Snowy has joined #ruby
th0m_ has joined #ruby
chrissonar has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Synthead has joined #ruby
goodroot has quit [Ping timeout: 244 seconds]
Silex has quit [Quit: WeeChat 0.4.3]
dmr8 has joined #ruby
DanielJack has joined #ruby
<DanielJack> hi guys, im trying to set a variable in a block on my own
<DanielJack> def func(&block); block.binding.local_variable_set(:nesamone, 123); block.call; end;
<DanielJack> but it won't set it for some reason
TheGreatGudsby has quit [Quit: You had my curiosity. But now you have my attention]
<apeiros> you can't introduce a new local variable into a binding
TheGreatGudsby has joined #ruby
<apeiros> the only case it works is if you use eval on the binding for all future code
<DanielJack> too bad
<DanielJack> have my infinite gratitude
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 248 seconds]
andywojo has joined #ruby
blackgoat has joined #ruby
andywojo has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
alem0lars__ has joined #ruby
Snowy has quit [Remote host closed the connection]
tvon has joined #ruby
pawnbox has joined #ruby
agit0 has quit [Read error: Connection reset by peer]
tvon has quit [Ping timeout: 250 seconds]
hiyosi has joined #ruby
agit0 has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
User458764 has joined #ruby
baweaver has joined #ruby
bronson has joined #ruby
baweaver has quit [Ping timeout: 244 seconds]
<lxsameer> any spanish ruby user in here?
<apeiros> they're probably in either #ruby-es or #ruby.es
leon_e has quit [Read error: Connection reset by peer]
<lxsameer> thanks
bronson has quit [Ping timeout: 252 seconds]
th0m_ has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 268 seconds]
lkba_ has joined #ruby
yfeldblum has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Remote host closed the connection]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
goodroot has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
drptbl has joined #ruby
goodroot has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
Gasher has joined #ruby
skydiver has joined #ruby
spider-mario has joined #ruby
tesuji has joined #ruby
madgen_ has joined #ruby
postmodern has quit [Quit: Leaving]
davee_ has quit [Ping timeout: 268 seconds]
infra-red has quit [Remote host closed the connection]
aryaching has joined #ruby
andywojo has joined #ruby
mistermocha has joined #ruby
TomyLobo has joined #ruby
skislak has quit [Ping timeout: 260 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
andywojo has quit [Ping timeout: 268 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
SCHAAP137 has joined #ruby
tvon has joined #ruby
<fexilal> I was wondering, since it seems like a big deal for other languages, but is ruby's development well-funded and secure?
moeabdol has quit [Ping timeout: 240 seconds]
<fexilal> ruby-lang doesn't even ask for donations.
<Gasher> so many companies base on it that it shouldn't be a problem
<Gasher> like Twitter
<fexilal> and basecamp too I presume
<fexilal> well, that's great to know.
tvon has quit [Ping timeout: 250 seconds]
mostlybadfly has joined #ruby
<Gasher> Twitter is based on Rails
htmldrum_ has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
<darix> Gasher: was
mondok has quit [Ping timeout: 246 seconds]
<apeiros> afaik, parts of it still are
<Gasher> darix; how come? what is it on now?
dtzuzu has joined #ruby
<apeiros> they've rewritten a good bit of their infrastructure in scala
<Gasher> I see
astrobun_ has joined #ruby
<apeiros> though, that's 6y old
<apeiros> so it may no longer be accurate
<Gasher> thanks
<Gasher> "Ruby mostly on the frontend"
<Gasher> wuuuut?
voo has quit [Read error: Connection reset by peer]
Coldblackice_ has quit [Ping timeout: 240 seconds]
<Caerus> i read somewhere that it turned out the reason for going to scala were wrongly founded and that the things they wanted to do showed to be harder on scala
Coldblackice_ has joined #ruby
hyperdri- has quit [Read error: Connection reset by peer]
<Caerus> is that true??
<apeiros> no idea
nocontrol has quit [Remote host closed the connection]
bob434 has quit [Quit: This computer has gone to sleep]
<Caerus> something to think about
hanmac has quit [Ping timeout: 248 seconds]
<Caerus> but wait. aren't code blocks basically lamdas?
hyperdrive has joined #ruby
astrobun_ has quit [Ping timeout: 264 seconds]
bob434 has joined #ruby
<Gasher> that presentation is from 6 years ago
skydiver has quit [Ping timeout: 244 seconds]
<Gasher> so I'd rather believe that they switched from Scala to Ruby rather than the other way around
tristanp has joined #ruby
codecop has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
TheGreatGudsby has quit [Quit: You had my curiosity. But now you have my attention]
mistermocha has joined #ruby
tristanp has quit [Ping timeout: 276 seconds]
Spami has joined #ruby
<Caerus> the guy from scribd started the discussin by saying he wouldnt use rails for a new company. a very interesting discussion ensued
darkf has quit [Quit: Leaving]
<Caerus> and someone there talked about twitter and scala
mistermocha has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
moss has joined #ruby
hanmac has joined #ruby
<apeiros> "percentage in growth rate" - nice graph. but utterly pointless on its own.
<apeiros> from 0.1% to 1% job share - woooow, 1000% growth.
SCHAAP137 has quit [Remote host closed the connection]
rippa has joined #ruby
SCHAAP137 has joined #ruby
<Caerus> yeah the guy got kinda burned but i like that it didn't turn into a flame war.
nocontrol has joined #ruby
nocontrol has quit [Remote host closed the connection]
bob434 has quit [Quit: This computer has gone to sleep]
<Caerus> the first instance of "scala" in the comments has the paragraph i was phrasing. alas, anonymous :(
<Papierkorb> Many heroic beings in there who're jumping for JavaScript. Thanks to these people, we don't have to.
saltsa_ has quit [Quit: Reconnecting]
saltsa has joined #ruby
goodroot has joined #ruby
tesuji has quit [Ping timeout: 260 seconds]
skydiver has joined #ruby
<apeiros> my hopes lie with webasm. lets implement better and nicer languages on top of that.
TomyLobo has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
<Papierkorb> Uargh, the attack surface goes through the roof with webasm
goodroot has quit [Ping timeout: 244 seconds]
<Papierkorb> not to mention that now every other page will have to download huge applications to just render their websocket infested Todo list
yfeldblum has quit [Ping timeout: 250 seconds]
<Caerus> how so?
<apeiros> meh. cdn + versioned language = lots of cachable data.
<apeiros> not half as bad as you make it :)
<Papierkorb> Even if you cache it, the attack surface is homongous
<apeiros> not larger than with js either.
<Papierkorb> Binary data is more complex to parse than text data, not to mention that JS is script where that ASM stuff is much much closer to being a full blown virtual machine (in the OS sense)
<apeiros> uh, lol, no.
<apeiros> that blanket statement about text vs. binary is just plain BS
<Papierkorb> Let's just hope that people implement all of that are more competent than those who did Flash or Java web start stuff
snoobydoo has quit [Quit: leaving]
<apeiros> yes. it's as with all technologies which execute code. if you have bugs in your runtime, it's attackable. see JS CVEs. whether that stuff is text or binary, javascript or asm doesn't make that much of a difference.
Gasher has quit [Quit: Leaving]
<apeiros> heck, even something which seems as simple as a json parser provides an attack surface (I'm still amazed how that's possible, but apparently it is)
* Caerus twitches
<Caerus> really?
<apeiros> sadly really
nanoz has joined #ruby
<Caerus> o.0
<apeiros> yeah, that's akin to my reaction when hearing about it
infra-red has joined #ruby
<Papierkorb> Caerus: in the beginnings: function parseJson(str){ eval(str); } - People quickly got away from that, still, some thought this would be a good idea for years, getting as far as runnin regexes over the string to "prove" it's safe to eval()
<apeiros> Papierkorb: the one I heard about was in ruby's json parser
<Papierkorb> If you give everyone a hammer some will try real hard to hit themselves repeatedly
<Papierkorb> apeiros: Because sometimes stuff isn't that simple to do, even for "such a simple language" like JSON
<Papierkorb> There may always be some completely insane corner cases which you've not thought about
<Papierkorb> That happens all the time
<apeiros> dunno. the only "hard" thing about json is that its original spec didn't mention any limits (at least iirc)
sdothum has joined #ruby
tvon has joined #ruby
lkba has joined #ruby
infra-red has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
lkba_ has quit [Ping timeout: 246 seconds]
danielpclark has quit [Remote host closed the connection]
<Caerus> so basically eval() == evil :P
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<apeiros> you do realize that almost every require in your ruby code is eval()? :)
<Caerus> not really, i'm a ruby newbie :)
<apeiros> well, now you know
roshanavand has joined #ruby
nicoulaj has joined #ruby
<Papierkorb> Same for almost any scripting language out there
<apeiros> yupp
<apeiros> and so there it goes: blanket statements are generally wrong ;-p
<Caerus> so not evil but more like.. use with extreme caution?
<Papierkorb> Caerus: use only when you really want to run ruby code.
<Papierkorb> Caerus: Do not use for anything but that. Not to "quickly parse stuff" or anything
nicoulaj_ has joined #ruby
nicoulaj_ has quit [Read error: Connection reset by peer]
nicoulaj has quit [Read error: Connection reset by peer]
<Papierkorb> And of course as always, before you run arbitrary ruby code, make sure you can trust the code to run in your environment
<apeiros> I think the underlying principle is: don't trust user input
<Caerus> got it. i'm sure it will stay in the back of my head so i don't go taking shortcuts in the future.
<apeiros> eval on your own data is fine. if you know it's truly your data and does not contain user input (easy to miss - simple things like "." in $LOAD_PATH can throw you up there)
bihi has quit [Ping timeout: 260 seconds]
hk238 has joined #ruby
nicoulaj has joined #ruby
<Caerus> that makes sense, i reckon there is no way to be absolute sure user input is safe
blackmesa has joined #ruby
<apeiros> depends on what you intend to use it for. things like whitelists help. but a whitelist isn't always feasible.
<apeiros> and the more complex your vetting works, the easier it is to have an exploitable bug in it.
araujo__ has joined #ruby
<Caerus> well, since i don't believe ill be having any code in production anytime soon, i'm sure my newbie mistakes regarding security will be pointed out promptly
<Caerus> when i start bashing my head against something and ask for help here :)
araujo_ has quit [Ping timeout: 276 seconds]
<apeiros> that's a good idea.
araujo__ has quit [Max SendQ exceeded]
<Caerus> right now i'm just reading, a lot. and little bits of experimental irb
<Caerus> i absolutely love ruby
araujo__ has joined #ruby
<apeiros> have fun then. ruby is definitively one of the more enjoyable languages out there :)
araujo__ has quit [Max SendQ exceeded]
bihi has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
<Caerus> been doing it for like 2 weeks or so. once i get the rhythm of reading and coding ruby on a daily basis, the ventures will sure take me to knowledge walls thehe
moeabdol has joined #ruby
nanoz has quit [Ping timeout: 260 seconds]
araujo__ has joined #ruby
araujo__ has quit [Max SendQ exceeded]
<Caerus> got to go now, see you all later, thanks for the inputs apeiros, Papierkorb :)
valetudo has joined #ruby
skydiver has quit [Quit: WeeChat 1.4]
dome22xl has joined #ruby
bronson has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
skislak has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
brt has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
bob434 has joined #ruby
sdothum has joined #ruby
Mutter has joined #ruby
dome22xl has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
roshanavand has joined #ruby
gregf has joined #ruby
Mutter has quit [Remote host closed the connection]
devbug has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bob434 has quit [Quit: This computer has gone to sleep]
chrissonar has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
lajksdfhdskjaj has joined #ruby
goodroot has joined #ruby
<lajksdfhdskjaj> how to write line#4 http://dpaste.com/2B5F9WA
<lajksdfhdskjaj> such that .. I get expected result, mentioned as in-line comment in line#4.
<lajksdfhdskjaj> ??
<yxhuvud> start by not using two #{} inside each other
<lianj> and d2 = d1
<lajksdfhdskjaj> can you show with an example, what you meant?
hnagamin has joined #ruby
<lajksdfhdskjaj> can't do that way .. let me show a real use-case.
<apeiros> was gonna ask for that. smells like xy.
<lajksdfhdskjaj> In this http://dpaste.com/1JXF3NT .. at line#44 I'm calling parameters() ..
<apeiros> the current problem would need local_variable_get (or eval in older rubies)
<lajksdfhdskjaj> to populate keys, similarly .. I would like to fill in values using same paramters.
Mon_Ouie has joined #ruby
goodroot has quit [Ping timeout: 276 seconds]
<lajksdfhdskjaj> apeiros: can you show an example?
<lajksdfhdskjaj> or pointer to read?
<apeiros> lajksdfhdskjaj: so you've activemodel, yet you choose to use an incredibly insecure way to execute a statement with values? why?
phredus has joined #ruby
<lajksdfhdskjaj> because .. that is a pseudo ActiveRecord .. by that I mean, that's not really a ActiveRecord at all .. it's just look like that but doesn't really inherit that.
<apeiros> if you'd use AR's capabilities, you'd a) have a much more secure way and b) your immediate problem solved
<lajksdfhdskjaj> because I'm writing ORM-implementation myself.
<apeiros> you don't know about bind variables and want to write an ORM?
<apeiros> I strongly suggest you stop right there.
<lajksdfhdskjaj> apeiros: thanks for the suggestion .. I think, I'll manage.
agit0 has quit [Quit: zzzZZZ….]
aryaching_ has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
rbennacer has joined #ruby
agit0 has joined #ruby
tesuji has joined #ruby
tesuji has quit [Changing host]
tesuji has joined #ruby
rubie has joined #ruby
<apeiros> lajksdfhdskjaj: it seems to me you've already learnt about Object#send. so you've got that puzzle piece.
<lajksdfhdskjaj> :)
<apeiros> depending on the level of abstraction you want to choose, there's also instance_variable_get.
<lajksdfhdskjaj> basically what I need is - a way to escape #{} in string.
<apeiros> either way, go and educate yourself about bind variables.
<apeiros> that'd be \#{}, and no, that's not what you need.
<lajksdfhdskjaj> right
<lajksdfhdskjaj> something little more then just escape .. offcourse I tried regular escape.
<lajksdfhdskjaj> reading about bind-variables.
rubie has quit [Ping timeout: 252 seconds]
<lajksdfhdskjaj> but so far, not getting a feel .. that(bind-variables) is what I need.
infra-red has joined #ruby
bob434 has joined #ruby
LoneHermit has joined #ruby
Jackneill has joined #ruby
infra-red has quit [Ping timeout: 248 seconds]
LoneHermit has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
<apeiros> can't help with your feels. only with questions.
<lajksdfhdskjaj> BTW - I solved it. thanks.
<lajksdfhdskjaj> apeiros: thanks.
<apeiros> let me guess - you didn't use bind variables? have fun with sql injections in your orm then.
felltir has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
stannard has joined #ruby
Gasher has joined #ruby
stannard has quit [Client Quit]
<lajksdfhdskjaj> apeiros: you are right, I've skipped bind-vars .. can you please help me with some pointer to read bind-variables.
<apeiros> any single google term on "sql bind variables" or probably even "cassandra bind variables" will get you there.
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lajksdfhdskjaj> ok
<apeiros> the basic idea is that you do not let user values be part of your query in the first place.
<lajksdfhdskjaj> okay .. got it.
<lajksdfhdskjaj> I guess you meant .. use some preapred-statement or boudn-statement .. and pass vars to that.
astrobun_ has joined #ruby
<lajksdfhdskjaj> actually I'm doing that.
<lajksdfhdskjaj> dont create query yourself and populate vars yourself .. else you will in SQL-injection victim .. correct me, if I'm wrong.
<lajksdfhdskjaj> **dont create query yourself and also don't populate variables yourself using string-replacement etc. .. else you will be SQL-injection victim .. please correct me, if I'm wrong.
<lajksdfhdskjaj> thanks for the care. :)
tvon has quit [Remote host closed the connection]
<apeiros> line 44 of your paste. values right in the sql.
<apeiros> well, 44-45 actually
<lajksdfhdskjaj> hmm .. got it.
<lajksdfhdskjaj> I've changed that, when things were not working out for me ..
<lajksdfhdskjaj> that's a modified one .. and then I got into asking wrong question.
<lajksdfhdskjaj> First I populated keys, using parameters() then I thought .. why not populate values also like that, since both of them are sharing same names.
<lajksdfhdskjaj> and I got it wrong.
astrobun_ has quit [Ping timeout: 240 seconds]
stannard has joined #ruby
moeabdol has joined #ruby
tristanp has joined #ruby
IrishGringo has joined #ruby
krz has joined #ruby
kuroro has left #ruby [#ruby]
tristanp has quit [Ping timeout: 264 seconds]
User458764 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
futilegames has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
ramfjord has quit [Ping timeout: 244 seconds]
FooMunki has quit [Quit: FooMunki]
pawnbox has joined #ruby
FooMunki has joined #ruby
futilegames has quit [Client Quit]
NinjaPanzer has joined #ruby
futilegames has joined #ruby
<lajksdfhdskjaj> apeiros: thanks once again.
<lajksdfhdskjaj> code became neat now.
<lajksdfhdskjaj> :)
matp has joined #ruby
jak has quit [Quit: leaving]
idle_task has joined #ruby
idletask has quit [Ping timeout: 248 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
symm- has quit [Ping timeout: 244 seconds]
futilegames has quit [Remote host closed the connection]
blackgoat has quit [Quit: WeeChat 1.4]
unreal_ is now known as unreal
goodroot has joined #ruby
agit0 has joined #ruby
A124 has quit [Ping timeout: 240 seconds]
Meow-J has joined #ruby
th0m_ has joined #ruby
goodroot has quit [Ping timeout: 252 seconds]
Mon_Ouie has quit [Ping timeout: 264 seconds]
Vile` has joined #ruby
last_staff has joined #ruby
tesuji has quit [Ping timeout: 252 seconds]
nocontrol has joined #ruby
tesuji has joined #ruby
solocshaw has joined #ruby
cajone has quit [Remote host closed the connection]
nocontro_ has joined #ruby
dc2 has quit [Ping timeout: 260 seconds]
cajone has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
infra-red has joined #ruby
nocontrol has quit [Ping timeout: 264 seconds]
sideshowcoder has quit [Quit: Connection closed for inactivity]
dling` has joined #ruby
infra-red has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has left #ruby [#ruby]
blackgoat has joined #ruby
last_staff has quit [Quit: last_staff]
rubie has joined #ruby
hogetaro_ has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
hogetaro has quit [Ping timeout: 268 seconds]
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
Spami has quit [Read error: Connection reset by peer]
Spami has joined #ruby
rubie has joined #ruby
hnagamin has quit [Ping timeout: 248 seconds]
agit0 has joined #ruby
Es0teric has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
last_staff has joined #ruby
DynamicMetaFlow has joined #ruby
lajksdfhdskjaj has quit [Quit: Page closed]
DynamicMetaFlow has left #ruby [#ruby]
astrobun_ has joined #ruby
nanoz has joined #ruby
bob434 has joined #ruby
rubie has quit []
DynamicMetaFlow has joined #ruby
chrissonar has joined #ruby
tvon has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
robbyoconnor has joined #ruby
rubie has joined #ruby
astrobu__ has joined #ruby
DynamicMetaFlow has left #ruby [#ruby]
astrobun_ has quit [Ping timeout: 244 seconds]
tvon has quit [Ping timeout: 250 seconds]
rubie has quit [Ping timeout: 252 seconds]
astrobu__ has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
rubie has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
tesuji has quit [Ping timeout: 244 seconds]
bronson has quit [Ping timeout: 244 seconds]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Remote host closed the connection]
_blizzy_ has quit [Quit: Leaving]
moeabdol has quit [Ping timeout: 240 seconds]
uglybandersnatch has joined #ruby
jpfuentes2 has joined #ruby
goodroot has joined #ruby
`tim` has joined #ruby
Mia has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
uglybandersnatch has quit [Ping timeout: 240 seconds]
d0lph1n98 has joined #ruby
LoneHermit has joined #ruby
rbennacer has quit [Remote host closed the connection]
stannard has joined #ruby
theRealAlexz has quit [Quit: No Ping reply in 180 seconds.]
goodroot has quit [Ping timeout: 260 seconds]
gix has quit [Quit: Client exiting]
pawnbox has joined #ruby
theRealAlexz has joined #ruby
pawnbox has quit [Remote host closed the connection]
nando293921 has joined #ruby
pawnbox has joined #ruby
DynamicMetaFlow has joined #ruby
x77686d has joined #ruby
infra-red has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
LoneHermit has quit [Ping timeout: 252 seconds]
sudoubuntu has joined #ruby
felltir has quit [Remote host closed the connection]
<shevy> "code became neat now"
<shevy> cool
<shevy> I need a feature like that
davee_ has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
drptbl has joined #ruby
felltir has joined #ruby
wreet has joined #ruby
felltir has quit [Client Quit]
drptbl has quit [Max SendQ exceeded]
d0lph1n98 has quit [Quit: leaving]
drptbl has joined #ruby
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azure has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
Gasher has quit [Ping timeout: 252 seconds]
awasum has joined #ruby
awasum has quit [Client Quit]
xcesariox has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
gix has joined #ruby
xlegoman has quit [Remote host closed the connection]
qhp has quit [Ping timeout: 244 seconds]
chrissonar has quit [Remote host closed the connection]
Gasher has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobunny has quit [Quit: Leaving...]
Vile` has quit [Quit: .]
SCHAAP137 has joined #ruby
cdg has joined #ruby
User458764 has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
Vile` has joined #ruby
matp has joined #ruby
dikaio has joined #ruby
astrobunny has joined #ruby
infra-re_ has joined #ruby
mistermocha has joined #ruby
hays has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
infra-red has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
goodroot has joined #ruby
hays_ has joined #ruby
dionysus69 has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
hays has quit [Ping timeout: 246 seconds]
nofxx has joined #ruby
hays_ is now known as hays
tubuliferous_ has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
agentmeerkat has quit [Ping timeout: 276 seconds]
d0nn1e has quit [Ping timeout: 248 seconds]
sinanislekdemir has quit [Remote host closed the connection]
d0nn1e has joined #ruby
idle_task is now known as idletask
tesuji has joined #ruby
`tim` has quit [Ping timeout: 244 seconds]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdw has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
NinjaPanzer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
goodroot has quit [Ping timeout: 244 seconds]
infra-re_ has quit []
bob434 has quit [Quit: This computer has gone to sleep]
ascarter has quit [Ping timeout: 276 seconds]
mnrmnaugh_ has quit [Quit: Leaving]
tubuliferous_ has quit [Ping timeout: 244 seconds]
tvon has joined #ruby
shinnya has quit [Ping timeout: 252 seconds]
mnrmnaugh has joined #ruby
griffindy has joined #ruby
ascarter has joined #ruby
tvon has quit [Read error: Connection reset by peer]
tvon_ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
cdg has quit [Remote host closed the connection]
blackgoat has quit [Quit: WeeChat 1.4]
LoneHerm_ has joined #ruby
nocontro_ has quit []
mistermocha has joined #ruby
chandlerbing has quit [Quit: ZNC - http://znc.in]
tesuji has quit [Ping timeout: 244 seconds]
chandlerbing has joined #ruby
tesuji has joined #ruby
Yzguy has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Yzguy has quit [Client Quit]
rippa has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
moeabdol has joined #ruby
sudoubuntu has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
dvinciguerra has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
sudoubuntu has quit [Client Quit]
User458764 has joined #ruby
SCHAAP137 has quit [Ping timeout: 276 seconds]
bob434 has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 276 seconds]
Gasher has quit [Ping timeout: 260 seconds]
chandlerbing has quit [Quit: ZNC - http://znc.in]
chandlerbing has joined #ruby
thevaliantx has joined #ruby
gokulnath has joined #ruby
dvinciguerra has quit [Ping timeout: 264 seconds]
Success has joined #ruby
Success has quit [Read error: Connection reset by peer]
stannard has joined #ruby
z4phod has joined #ruby
<z4phod> hi !
<z4phod> i trying to debug circular dependency ...
<z4phod> RuntimeError: Circular dependency detected while autoloading constant Compta_line from /home/z4ppy/.rvm/gems/ruby-2.2.1/gems/activesupport-4.1.14/lib/active_support/dependencies.rb:478:in `load_missing_constant' from /home/z4ppy/.rvm/gems/ruby-2.2.1/gems/activesupport-4.1.14/lib/active_support/dependencies.rb:180:in `const_missing'
<z4phod> ...
<z4phod> i changed dependencies.rb ... BUT NOTHING HAPPEN :(
<z4phod> i can do some bullshit in the file, alway works ...
gizmore has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
<z4phod> ruby lies ? where i am wrong
wreet has quit [Quit: Leaving]
Success has joined #ruby
Success has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
tubuliferous_ has joined #ruby
Success has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<gizmore> z4phod: it´s german and means read!
<z4phod> i need rebuild the gem ?
<z4phod> i thinked wasn't build
cpup has joined #ruby
<z4phod> like interpreter
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
myntcake has joined #ruby
<shevy> z4phod someone else wrote the code?
stannard has quit [Ping timeout: 250 seconds]
safe has joined #ruby
SCHAAP137 has joined #ruby
<apeiros> z4phod: changing dependencies.rb is pointless. not sure what you even changed there. it's just where the exception is being reported. check the full backtrace. the origin is somewhere in your own code.
<z4phod> i know
<z4phod> but i can't find without more info, so i wanted add some debug info
<z4phod> and i changed /home/z4ppy/.rvm/gems/ruby-2.2.1/gems/activesupport-4.1.14/lib/active_support/dependencies.rb but nothing happen
sepp2k has quit [Read error: Connection reset by peer]
<apeiros> that's not what you said, though.
<apeiros> um…
bronson has joined #ruby
<apeiros> so you did some stuff and some stuffs did not happen? I guess you should do some other stuffs then.
<apeiros> alternatively: try to make some sense. those vague informations you give are useless.
vdamewood has joined #ruby
jaequery has joined #ruby
<z4phod> now i add bullshit error, and alway run, seem like my modification doesn't do something
davedev24 has joined #ruby
<apeiros> z4phod: this is not helpful information.
<z4phod> so i changed dependencies.rb, why nothing happen ?
<shevy> z4phod you are trolling
blackmesa has joined #ruby
<z4phod> i mean you can't see my circular error, but why i can't change the gem ?
Gasher has joined #ruby
<adaedra> shevy: could you stop telling everyone they're trolling?
<shevy> adaedra I don't tell "everyone" so stop insinuating something that is unfounded
<z4phod> no i only want change gem code and run with my patch, but i don't know why ruby doesn't reload the gem
<apeiros> shevy: you are very quick to accuse people of trolling
<shevy> apeiros yeah - 20 lines without showing any code, no reply to my question either?
<apeiros> and I'd support adaedra request to not be that quick
<z4phod> yes, no troll, i promese
vdamewood has quit [Max SendQ exceeded]
<apeiros> z4phod: but you see how you're being perceived. I suggest you try to add useful information. because until now, you haven't given any.
<z4phod> i said you, i changed gem code and nothing happen... i just want patch gem
<z4phod> ok
<z4phod> so
<z4phod> /home/z4ppy/.rvm/gems/ruby-2.2.1/gems/activesupport-4.1.14/lib/active_support/dependencies.rb
astrobun_ has joined #ruby
vdamewood has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<z4phod> lign 481 i added "BOUM", line without sense, but alway run
sepp2k has joined #ruby
<z4phod> so i mean i missed something in the patch
<z4phod> maybe rebuild ?
<z4phod> i am noob in ruby
<z4phod> (and in english sorry)
skweek has joined #ruby
merida has joined #ruby
<apeiros> the exception originates in line 478
<apeiros> why do you expect line 481 to be run?
<apeiros> execution stops at exceptions.
<z4phod> i only check if i can modifie code and i can't
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<z4phod> oh
<apeiros> also that kind of change will almost certainly not help you debug a rails app.
<z4phod> if loaded.include?(expanded)
<z4phod> raise "Circular dependency detected while autoloading constant #{qualified_name} #{expanded} !!!!"
<z4phod> bouh
<z4phod> else
<adaedra> z4phod: don't paste code here please, use a gist at least
<z4phod> i alway see "Circular dependency .." in error message, without "!!!"
<adaedra> but yeah, you should not be changing the code of the gem to debug your thing
<z4phod> only for debug, no release
<adaedra> even just for debug
astrobunny has quit [Ping timeout: 268 seconds]
<z4phod> ruby don't tell me many thing about the circular dependencies error :(
<apeiros> read the full backtrace. check which of your files is affected.
<z4phod> is a BIG file
<z4phod> with many dependencies
<apeiros> so?
<z4phod> no mind
<apeiros> the backtrace comes with linenumbers
arlek has joined #ruby
<z4phod> so i wanted look the dependencies tree when ruby load it
<apeiros> it's not like you'd have to riddle
<z4phod> but i can't modifie gem
<adaedra> you don't need to.
<apeiros> z4phod: you came here for help. I tell you how to proceed. you don't seem to care.
<apeiros> tell me why I should continue to try helping
<z4phod> you said "dont modify gem"
<z4phod> i want
<apeiros> you want to do pointless stuff or solve your problem?
<adaedra> z4phod: we're telling you there's a better way and we're trying to show it to you, can you follow us this way?
<z4phod> i want know why my patch dont work...
<z4phod> ok
<z4phod> for dependencies i want too :)
<z4phod> you're nice, sorry for my poor english
Suntzu has quit [Quit: changing servers]
<adaedra> z4phod: what's your native language?
<z4phod> so backtrace contain only trace of gem
<z4phod> C/C++
<z4phod> french
<adaedra> :o)
rehat has quit [Remote host closed the connection]
<apeiros> might be worth a shot to try #ruby.fr (or #ruby-fr?)
<apeiros> the reason why your patch didn't work I told you too
<apeiros> error in line 478, your change in line 481 - won't be hit.
<z4phod> i added info in error message
<z4phod> only
blackmesa has quit [Ping timeout: 252 seconds]
<adaedra> z4phod: you're sure there's only gem context in your stacktrace?
<z4phod> i wanted see the tree
<z4phod> i will paste
<adaedra> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
Success has quit [Ping timeout: 260 seconds]
drptbl has joined #ruby
tristanp_ has joined #ruby
<adaedra> "from (irb):3"
<z4phod> z4ppy@compta:~/luna/lunacompta-dev$ ls -l app/models/compta_line.rb
<z4phod> -rw-r--r-- 1 z4ppy z4ppy 6090 Feb 15 15:50 app/models/compta_line.rb
<adaedra> ah yes, I see the IRB prompt now
<z4phod> yes first
<adaedra> if your file is compta_line.rb, your model should be ComptaLine
<z4phod> the first error is strange too
<z4phod> omg thx
<z4phod> so much time on it (before go here), ty VERY MUCH
<adaedra> De rien.
<z4phod> :D
tenderlove has quit [Remote host closed the connection]
<z4phod> (the error message was so ...)
tenderlove has joined #ruby
<adaedra> But next time, try to follow what we're telling you sooner, so it's better for everyone
<apeiros> z4phod: you changed the line and did not restart the rails console?
<apeiros> if you didn't - rails does not autoload gems. only the stuff in app
<z4phod> i did
Success has joined #ruby
<apeiros> do you use spring?
<z4phod> i restarted all process using the model, but nothing happen
<z4phod> i mean yes
pawnbox has quit [Remote host closed the connection]
<z4phod> isn't my project, i'm starting with ruby
<apeiros> if you use spring, even restarting the rails console won't pick up changes in gems
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
nando293921 has quit [Quit: Lost terminal]
dvinciguerra has joined #ruby
nando293921 has joined #ruby
phredus has quit [Read error: Connection reset by peer]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<z4phod> gem 'spring'
<z4phod> gem 'spring-commands-rspec'
<z4phod> (in the Gemfile)
<z4phod> in group :development, :test do
<adaedra> so yeah
minimalism has quit [Quit: minimalism]
<adaedra> spring keeps a version of you app alive so you can use some tools like the console more quickly
<adaedra> so gem code is already loaded and modifying it won't change the loaded version
GodFather has joined #ruby
griffindy has quit [Read error: Connection reset by peer]
diegoaguilar has joined #ruby
Gasher has quit [Ping timeout: 250 seconds]
tvon_ has quit []
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
silentpost has quit [Ping timeout: 260 seconds]
andywojo has joined #ruby
Guest52539 is now known as ndrst
aryaching_ has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
Suntzu has joined #ruby
xcesariox has joined #ruby
biberu has joined #ruby
smathy has joined #ruby
User458764 has joined #ruby
goodroot has joined #ruby
goodroot has joined #ruby
smathy_afk is now known as smathy
spuk has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
DynamicM` has joined #ruby
DynamicMetaFlow has quit [Ping timeout: 260 seconds]
DynamicM` has quit [Remote host closed the connection]
symm- has joined #ruby
RegulationD has joined #ruby
andywojo has quit [Read error: Connection reset by peer]
andywojo has joined #ruby
Regulati_ has quit [Ping timeout: 244 seconds]
codecop has joined #ruby
LoneHerm_ has joined #ruby
codecop has quit [Remote host closed the connection]
nanoz has quit [Read error: Connection reset by peer]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GodFather has quit [Ping timeout: 252 seconds]
Success has quit [Read error: Connection reset by peer]
LoneHerm_ has quit [Ping timeout: 252 seconds]
Success has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
dome22xl has joined #ruby
merida has quit [Remote host closed the connection]
GodFather has joined #ruby
blackmesa has joined #ruby
andywojo has quit [Read error: Connection reset by peer]
cdg has joined #ruby
silentpost has joined #ruby
zmartAway has left #ruby ["Leaving"]
mistermocha has joined #ruby
hinbody has joined #ruby
<havenwood> export DISABLE_SPRING=1
nofxx has quit [Ping timeout: 268 seconds]
nofxx has joined #ruby
drptbl has quit [Max SendQ exceeded]
drptbl has joined #ruby
<shevy> lol
andywojo has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
abort has quit [Ping timeout: 244 seconds]
tildes has joined #ruby
drptbl has quit [Max SendQ exceeded]
cdg has quit [Remote host closed the connection]
GodFather has quit [Remote host closed the connection]
Gasher has joined #ruby
GodFather has joined #ruby
dvinciguerra has quit [Ping timeout: 260 seconds]
dmr8 has quit [Ping timeout: 268 seconds]
abort has joined #ruby
dmr8 has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
rbennacer has joined #ruby
NinjaPanzer has joined #ruby
sandstrom has joined #ruby
djellemah has quit [Quit: Leaving]
Dimik has joined #ruby
jkahn has joined #ruby
rolha has joined #ruby
ljames has joined #ruby
pawnbox_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
djellemah has joined #ruby
gokulnath has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 264 seconds]
tildes has quit [Ping timeout: 244 seconds]
fullofcaffeine has joined #ruby
ruby[bot] has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
marcdel has joined #ruby
stannard has joined #ruby
grepsuzette has joined #ruby
hinbody has quit [Ping timeout: 244 seconds]
patrick_star_3 has quit [Quit: Leaving]
lxsameer has joined #ruby
imperator has joined #ruby
MagisterQuis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
andywojo has quit [Read error: Connection reset by peer]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andywojo has joined #ruby
dvinciguerra has joined #ruby
Success has quit [Read error: Connection reset by peer]
Success has joined #ruby
Success has quit [Read error: Connection reset by peer]
Success has joined #ruby
<MagisterQuis> Hi. I'm trying to install a program's gems with 'bundle install'
<MagisterQuis> One requires a C library for which the header's not where bundler expects it.
<MagisterQuis> How can another include path be specified, globally?
<MagisterQuis> Like -I/usr/local/include
andywojo has quit [Client Quit]
tubuliferous_ has quit [Ping timeout: 260 seconds]
<darix> MagisterQuis: it depends on the build system
<darix> export CFLAGS="-I..."
Success has quit [Read error: Connection reset by peer]
<darix> export LDFLAGS="-L..."
<darix> might work
FooMunki has quit [Quit: FooMunki]
Success has joined #ruby
FooMunki has joined #ruby
User458764 has joined #ruby
thevaliantx has quit [Quit: Leaving]
lxsameer has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
tristanp_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
weemsledeux has joined #ruby
tubuliferous_ has joined #ruby
<MagisterQuis> darix: I'll give it a go.
tristanp has joined #ruby
<MagisterQuis> Seems to just be using make under the hood.
lxsameer has joined #ruby
<MagisterQuis> CFLAGS worked, apparently I don't know where the library itself lives :D
<MagisterQuis> No, it's not using LDFLAGS, hm.
lxsameer has quit [Read error: Connection reset by peer]
arthropododo has joined #ruby
lxsameer has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
krobzaur_ has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
rehat_ has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
moei has quit [Quit: Leaving...]
Danishman has joined #ruby
sq271 has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
lxsameer has joined #ruby
dome22xl has quit [Read error: Connection reset by peer]
dome22xl has joined #ruby
dome has joined #ruby
dome has quit [Client Quit]
fullofcaffeine has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
jcdesimp has joined #ruby
hinbody has joined #ruby
QualityAddict has quit [Remote host closed the connection]
QualityAddict has joined #ruby
jpfuentes2 has joined #ruby
jpfuentes2 has quit [Client Quit]
grepsuzette has left #ruby ["WeeChat 1.4"]
<darix> MagisterQuis: export LIBS maybe
Mia has quit [Read error: Connection reset by peer]
Success has quit [Ping timeout: 252 seconds]
diegoaguilar has quit [Remote host closed the connection]
lxsameer has quit [Read error: Connection reset by peer]
Inside has joined #ruby
Inside has joined #ruby
lxsameer has joined #ruby
nando293921 has quit [Ping timeout: 250 seconds]
lxsameer has quit [Read error: Connection reset by peer]
bronson has joined #ruby
mdw has joined #ruby
scepticulous has joined #ruby
Moosashi has joined #ruby
Moosashi has quit [Client Quit]
mdw has quit [Read error: Connection timed out]
mdw has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
imperator has quit [Quit: Leaving]
solocshaw has quit [Quit: solocshaw]
yqt has joined #ruby
weemsledeux has quit [Ping timeout: 244 seconds]
solocshaw has joined #ruby
jaequery has joined #ruby
A124 has joined #ruby
uglybandersnatch has joined #ruby
agit0 has quit [Read error: No route to host]
th0m_ has quit [Ping timeout: 248 seconds]
brent_ has joined #ruby
nofxx has quit [Ping timeout: 260 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
rehat_ has quit []
rehat has joined #ruby
znz_jp has quit [Quit: kill -QUIT $$]
arthropododo has quit [Quit: Leaving]
jaequery has quit [Ping timeout: 268 seconds]
dome22xl has quit [Read error: Connection reset by peer]
uglybandersnatch has quit [Ping timeout: 248 seconds]
znz_jp has joined #ruby
Musashi007 has joined #ruby
jaequery has joined #ruby
_blizzy_ has joined #ruby
scepticulous has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
GnuYawk has quit [Ping timeout: 246 seconds]
hinbody has quit [Quit: leaving]
IrishGringo has quit [Ping timeout: 250 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicoulaj has quit [Quit: nicoulaj]
<shevy> does anyone know off-hand, without testing - if we have two .rb files in a project, one has "frozen_string_literal: true" and the other has "# frozen_string_literal: false" as part of the expanded shebang-header, will this be valid on a per-file basis? that is, code in one file for strings will be frozen and the other strings will not?
Musashi007 has quit [Quit: Musashi007]
Silex has joined #ruby
IrishGringo has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
fedexo has joined #ruby
silentpost has quit [Ping timeout: 252 seconds]
agit0 has joined #ruby
Silex has quit [Client Quit]
gizless has joined #ruby
rbennacer has quit [Remote host closed the connection]
moeabdol has joined #ruby
lxsameer has joined #ruby
vdamewood has quit [Quit: Life beckons.]
djellemah_ has joined #ruby
gizmore has quit [Ping timeout: 246 seconds]
<darix> shevy: should be per file
dikaio has quit [Ping timeout: 240 seconds]
gizless has quit [Ping timeout: 248 seconds]
lxsameer has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby
LoneHerm_ has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
<shevy> hmm
silentpost has joined #ruby
blackmesa has joined #ruby
dikaio has joined #ruby
tubuliferous_ has quit [Ping timeout: 276 seconds]
dikaio has quit [Max SendQ exceeded]
dikaio has joined #ruby
GnuYawk has joined #ruby
p0wn3d has quit [Quit: WeeChat 1.2]
stannard has joined #ruby
p0wn3d has joined #ruby
tubuliferous_ has joined #ruby
marcdel has quit [Ping timeout: 244 seconds]
pawnbox_ has quit [Remote host closed the connection]
p0wn3d has quit [Client Quit]
alem0lars__ has quit [Quit: Leaving]
p0wn3d has joined #ruby
p0wn3d has quit [Client Quit]
pawnbox has joined #ruby
Ebok has joined #ruby
Inside has quit [Ping timeout: 240 seconds]
Silex has joined #ruby
Silex has quit [Client Quit]
tubuliferous_ has quit [Ping timeout: 250 seconds]
kloeri has quit [Write error: Connection reset by peer]
rubie has quit [Remote host closed the connection]
<MagisterQuis> darix: LIBS did it, thanks much.
agit0 has quit [Quit: zzzZZZ….]
pawnbox has quit [Ping timeout: 244 seconds]
nando293921 has joined #ruby
mistermocha has joined #ruby
rubie has joined #ruby
kloeri has joined #ruby
fedexo has quit [Ping timeout: 250 seconds]
Don_John has joined #ruby
ramfjord has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
mistermocha has quit [Ping timeout: 248 seconds]
dvinciguerra has quit [Ping timeout: 264 seconds]
stannard has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
htmldrum_ has quit [Ping timeout: 276 seconds]
fullofcaffeine has quit [Remote host closed the connection]
parduse has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
parduse has joined #ruby
krz has quit [Ping timeout: 276 seconds]
<riceandbeans> given json, what's the best way to report an error if any key has a nil/'' value
<Zarthus> riceandbeans: to the programmer or to the user?
<riceandbeans> right now I'm having a method do foo.each do |x| return true unless x.nil? end
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<riceandbeans> I'm half awake and realize it's wrong
<Zarthus> riceandbeans: `return' stops the loop, you probably want return false if x.nil?
<apeiros> a) you say "key", implying it's an object with key/value but you use .each with only a single variable, implying it's an array - what is it now?
<apeiros> b) you say nil/'' value, which I read as "any key which is either nil or ''", but you only test for nil? - what is it now?
<riceandbeans> it's parsed json but you can reference it like foo['bar']
bob434 has joined #ruby
fullofcaffeine has quit [Ping timeout: 248 seconds]
<riceandbeans> I just need to make sure the value is something at the moment
<apeiros> that'd be an Object, which in ruby is represented by a Hash. so .each do |x| is wrong no matter what. since x will be a [key, value] array.
<apeiros> "is something" is rather unspecific. is an empty string something?
<riceandbeans> I'm just trying to write a method to validate an API that's accepting json and returning json
<apeiros> gawd
<apeiros> can't you just answer the question instead of saying something unrelated?
<riceandbeans> no, an empty string is not something
<riceandbeans> ' ' would be something, it would fail, but it would be something
<apeiros> then your block is wrong too, since "".nil? is false.
LoneHerm_ has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
Melpaws has joined #ruby
<apeiros> you probably want .any? or none? on foo.values and a block which tests for `value.nil? || (value.is_a?(String) && value.empty?)`
kfpratt has quit [Remote host closed the connection]
<Ox0dea> Why the check for String?
<riceandbeans> I'm not opposed to better ideas for checking
<apeiros> Ox0dea: because plenty of valid json values do not respond to .empty?
<Ox0dea> apeiros: Well, just the numbers, no?
<apeiros> so?
<apeiros> that's still values where you'd get an exception without the check
<apeiros> but true/false/nil too
MagisterQuis has left #ruby [""Thanks darix""]
<riceandbeans> for instance, I want a json blob to be able to create a user by an API, but I have to check that the username doesn't already exist and create it, but if the username passed in is '' or nil, then it won't work
pawnbox has joined #ruby
LoneHermit has joined #ruby
LoneHermit has quit [Remote host closed the connection]
stannard has joined #ruby
Melpaws has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
Melpaws has joined #ruby
Es0teric has joined #ruby
uglybandersnatch has joined #ruby
GnuYawk has quit [Ping timeout: 268 seconds]
tenderlove has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
Gasher has quit [Quit: Leaving]
htmldrum_ has joined #ruby
htmldrum has joined #ruby
unsymbol_ has quit [Ping timeout: 268 seconds]
mistermocha has joined #ruby
spacemud has quit [Ping timeout: 264 seconds]
Gasher has joined #ruby
NinjaPanzer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 250 seconds]
sebyx07 has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
QualityAddict has quit [Remote host closed the connection]
QualityAddict has joined #ruby
blackmesa has joined #ruby
<sebyx07> does anyone know how to disable logging for a particular url? I receive some images as base64 in post requests and they are pretty big, so the log file gets bloated with that
rubie has quit [Remote host closed the connection]
gix has joined #ruby
<apeiros> sebyx07: wrong channel? or did you just omit to name the context (application/framework) within which you have logging?
Inside has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
sebyx07 has left #ruby [#ruby]
Es0teric has quit [Quit: Computer has gone to sleep.]
Azure has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
skweek has joined #ruby
<apeiros> classy. leaving without another word.
JohnBat26 has joined #ruby
TheGreatGudsby has joined #ruby
<adaedra> IRC is hard.
<apeiros> manners are hard too, as it seems.
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ebok> patience is even harder
stannard has joined #ruby
<riceandbeans> apeiros: when I do values instead of each I don't hit binding.pry statements in the block
elifoster has joined #ruby
<riceandbeans> apeiros: wait, is it supposed to be foo.values.each?
<apeiros> neither. foo.values.any? or foo.values.none?, depending on what result you want.
<riceandbeans> changing .values to .values.each returned the correct response...
Trynemjoel has quit [Quit: Quitting]
mdw has quit [Quit: Sleeping Zzzzz]
Trynemjoel has joined #ruby
spacemud has joined #ruby
unsymbol has joined #ruby
bronson has joined #ruby
jkahn has quit [Ping timeout: 250 seconds]
Balzrael has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.4]
agit0 has joined #ruby
Guest11 has joined #ruby
th0m_ has joined #ruby
firstdayonthejob has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
Guest11 has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
chris2 has quit [Ping timeout: 250 seconds]
dvinciguerra has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
trinaldi has joined #ruby
Trynemjoel has quit [Quit: Quitting]
Trynemjoel has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
SenpaiSilver has joined #ruby
cjheath_ has quit [Quit: cjheath_]
threh has joined #ruby
chris2 has joined #ruby
blackmesa has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
uglybandersnatch has quit [Ping timeout: 248 seconds]
TheGreatGudsby has left #ruby ["nah bro..."]
moeabdol has joined #ruby
Trynemjoel has quit [Quit: Quitting]
cjheath has joined #ruby
CloCkWeRX has joined #ruby
darkf has joined #ruby
Trynemjoel has joined #ruby
TheGreatGudsby has joined #ruby
TheGreatGudsby has quit [Max SendQ exceeded]
patrick-sartent has quit [Quit: .]
TheGreatGudsby has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
spuk has joined #ruby
Whiz has joined #ruby
jcdesimp has quit [Ping timeout: 268 seconds]
Es0teric has joined #ruby
martin290 has joined #ruby
<martin290> hey everyone
mistermocha has joined #ruby
northfurr has joined #ruby
martin290 has left #ruby [#ruby]
Xiti has quit [Quit: Xiti]
Trynemjoel has quit [Quit: Quitting]
Es0teric has quit [Ping timeout: 244 seconds]
cjheath has quit [Quit: cjheath]
mistermocha has quit [Ping timeout: 250 seconds]
Xiti has joined #ruby
threh has quit [Ping timeout: 240 seconds]
jcdesimp has joined #ruby
rubie has joined #ruby
bmf has joined #ruby
bmf_ has joined #ruby
bmf_ has quit [Remote host closed the connection]
bmf_ has joined #ruby
Silex has joined #ruby
Silex has quit [Read error: Connection reset by peer]
bmf_ has quit [Client Quit]
bmf_ has joined #ruby
bmf_ has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
bmf has left #ruby [#ruby]
bmf has joined #ruby
rubie has quit [Ping timeout: 252 seconds]
tubuliferous_ has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
russt has quit [Quit: That's all, folks!]
Trynemjoel has quit [Ping timeout: 244 seconds]
gizmore has joined #ruby
davedev24 has quit [Remote host closed the connection]
hightower3 has joined #ruby
Ebok has joined #ruby
brent_ has quit [Quit: Connection closed for inactivity]
roshanavand has quit [Quit: This computer has gone to sleep]
zotherstupidguy has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
jaequery has joined #ruby
northfurr has quit [Quit: northfurr]
bob434 has joined #ruby
russt has joined #ruby
ccmc has joined #ruby
northfurr has joined #ruby
xlegoman has joined #ruby
CloCkWeRX has joined #ruby
Inside has quit [Ping timeout: 244 seconds]
davedev24 has joined #ruby
jenrzzz has joined #ruby
jhack has joined #ruby
GnuYawk has joined #ruby
Melpaws has quit [Ping timeout: 248 seconds]
Melpaws1 has joined #ruby
jcdesimp_ has joined #ruby
CloCkWeRX has quit [Client Quit]
bmf has quit [Quit: Leaving]
threh has joined #ruby
jcdesimp has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
Melpaws1 has left #ruby [#ruby]
djellemah_ has quit [Ping timeout: 260 seconds]
htmldrum_ has quit [Ping timeout: 276 seconds]
htmldrum has quit [Ping timeout: 276 seconds]
vdamewood has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
Yzguy has joined #ruby
zotherstupidguy has quit [Ping timeout: 252 seconds]
gregf has joined #ruby
last_staff has quit [Quit: last_staff]
rkazak has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
sepp2k has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 244 seconds]
Silex has joined #ruby
Trynemjoel has joined #ruby
sandstrom has joined #ruby
Noxilex has joined #ruby
fexilal has quit [Ping timeout: 240 seconds]
[gmi] has joined #ruby
yatish27 has joined #ruby
cjheath has joined #ruby
Silex has quit [Client Quit]
bluestreak0 has joined #ruby
bb010g has joined #ruby
vdamewood has quit [Ping timeout: 248 seconds]
Outlastsheep has quit [Ping timeout: 260 seconds]
qhp has joined #ruby
biberu has quit []
codecop has joined #ruby
vdamewood has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
gregf has quit [Quit: WeeChat 1.4]
symm- has joined #ruby
zenlot6 has joined #ruby
htmldrum_ has quit [Ping timeout: 240 seconds]
htmldrum has quit [Ping timeout: 240 seconds]
zenlot has quit [Ping timeout: 268 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
Whiz has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
davee_ has quit [Ping timeout: 240 seconds]
stannard has quit [Remote host closed the connection]
[gmi] has quit [Quit: Leaving]
skweek has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
Yzguy has quit [Quit: Zzz...]
htmldrum_ has quit [Ping timeout: 260 seconds]
htmldrum has quit [Ping timeout: 264 seconds]
threh has quit [Ping timeout: 244 seconds]
jnj has joined #ruby
sudoubuntu has joined #ruby
bluestreak0 has quit [Read error: Connection reset by peer]
silentpost has quit [Ping timeout: 240 seconds]
Jackneill has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
chipotle has quit [Quit: cheerio]
chipotle has joined #ruby
jnj has quit [Ping timeout: 276 seconds]
krobzaur_ has quit [Quit: WeeChat 1.2]
code_[BNC] has quit [Quit: BNC - Hosted by EpicKitty]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
bronson has quit [Ping timeout: 252 seconds]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Es0teric has joined #ruby
jonatin has joined #ruby
code_ has joined #ruby
QualityAddict has quit [Quit: Konversation terminated!]
dmr8 has quit [Quit: Leaving]
Danishman has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
minimalism has joined #ruby
Noxilex has quit [Remote host closed the connection]
blackgoat has joined #ruby
pawnbox has joined #ruby
smathy is now known as smathy_afk
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sudoubuntu has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
jhack has quit [Quit: jhack]
kfpratt has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
jhn has joined #ruby
tristanp has quit [Remote host closed the connection]
jhn has quit [Client Quit]
ur5us has joined #ruby
davedev24 has quit []
kfpratt has quit [Ping timeout: 250 seconds]
diegoaguilar has joined #ruby
bob434 has quit [Ping timeout: 260 seconds]
diegoaguilar has quit [Max SendQ exceeded]
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
LoneHerm_ has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sudoubuntu has joined #ruby
vdamewood has quit [Ping timeout: 240 seconds]
brent_ has joined #ruby
hiyosi has joined #ruby
diegoaguilar has joined #ruby
tristanp has joined #ruby
mistermocha has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Outlastsheep has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
codecop has quit [Quit: Išeinu]
mistermocha has quit [Ping timeout: 250 seconds]
<zacts> hi rubyists
hightower3 has quit [Ping timeout: 276 seconds]
<apeiros> hi zacts
Gasher has quit [Quit: Leaving]
djbkd has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
Ebok has quit [Ping timeout: 276 seconds]