apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p286: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
Cicloid has joined #ruby
nopoliti1a has quit [Ping timeout: 268 seconds]
sotu has quit [Quit: sotu]
carlyle has joined #ruby
davidcelis has quit [Quit: K-Lined.]
jonathanwallace has joined #ruby
Takehiro has quit [Remote host closed the connection]
jeffreybaird has quit [Quit: jeffreybaird]
Araxia has joined #ruby
shinobi_one has joined #ruby
<shinobi_one> in python [1,2,3][1:] returns [2,3], what is the equivalent in ruby?
irleif has quit [Quit: Computer has gone to sleep.]
robertotauille has joined #ruby
manizzle has joined #ruby
<swarley> [1,2,3][1,2]
nari_ has quit [Ping timeout: 260 seconds]
<shinobi_one> swarley: in the python version you don't need to know the length of the array
<swarley> [1,2,3][1..-1]
<shinobi_one> yep
<otters> better is [1,2,3].drop(1)
Tearan has quit [Quit: Sleepy Badger....]
<shinobi_one> ^
<shinobi_one> that's what i used
<swarley> i assumed you were looking for a similar syntax
elico has joined #ruby
elico has quit [Client Quit]
caleb_io has quit [Quit: caleb_io]
thecreators has quit [Quit: thecreators]
<shinobi_one> swarley: that is what i was asking
fumduq has joined #ruby
<shinobi_one> i just wanted to see the different answers i would get
<shinobi_one> lol
Takehiro has joined #ruby
rkneufeld has joined #ruby
<swarley> oh lol
<matti> Haha
<matti> Interesting tactic.
<matti> ;d
<shinobi_one> ;p
codezombie has joined #ruby
ephemerian has quit [Quit: Leaving.]
blendedbychris has quit [Ping timeout: 245 seconds]
<matti> I can see totaly you proposing in the future to a wife of choice.
<matti> Using this tactic ;d
kiyoura has joined #ruby
<shinobi_one> aha yes i am sure that will work xD
amoe_ has quit [Ping timeout: 256 seconds]
amoe has joined #ruby
greasegum has joined #ruby
greasegum has quit [Client Quit]
<matti> shinobi_one: Yeah, and rememebr to start asking using double-negative.
<matti> shinobi_one: ;]
eignerchris has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
<shinobi_one> matti: i can only assume that would be for the best ;]
yshh has joined #ruby
tyfighter has quit [Quit: tyfighter]
treyryan_ has joined #ruby
hbpoison has joined #ruby
mrsolo_ has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
treyryan has quit [Ping timeout: 244 seconds]
treyryan_ is now known as treyryan
mrsolo has quit [Read error: Connection reset by peer]
<matti> shinobi_one: :)
<matti> shinobi_one: Switching from Python?
F1skr has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
Araxia_ has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Araxia_ is now known as Araxia
rkneufeld has quit [Quit: Computer has gone to sleep.]
<shinobi_one> matti: nah, I code in Python mostly at work and ruby for everything else.
Nisstyre has joined #ruby
<shinobi_one> matti: and even here at work I write my personal stuff in ruby ;p
arubin has joined #ruby
<shinobi_one> personal scripts and stuff*
<shinobi_one> although I'll be honest, switching back and forth between Python and Ruby is confusingggg
mrsolo_ has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
nadirvardar has quit [Quit: Computer has gone to sleep.]
<matti> shinobi_one: Can imaine.
<matti> imagine*
LucasK has joined #ruby
cousine has joined #ruby
cousine has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
<shinobi_one> I put colons everywhere in my ruby code and end everywhere in my python
niklasb has quit [Ping timeout: 244 seconds]
<LucasK> Is there a more specific word for a property of a property? i.e obj.position.x, the x
rismoney has quit [Ping timeout: 252 seconds]
gabrielrotbart has joined #ruby
reuf has quit [Read error: Connection reset by peer]
<ablankfield> Whoever recomended I read whys poignant guide to ruby. Thank you for entertaining tangents.
<matti> LucasK: Hm, sub-property?
<matti> LucasK: ;s
<LucasK> matti: heh my first guess, but all properties are sub eh :P
<matti> sub-sub? ;p
omry has quit [Ping timeout: 252 seconds]
<matti> ugly-sister-property?
<blazes816> x is a property of position, which itself is an object. that object is the value of property 'position' on obj
postmodern has joined #ruby
reuf has joined #ruby
wallerdev has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
<LucasK> blazes816: thank you for the basics but that doesn't address the question at hand, hehe
yshh has quit [Remote host closed the connection]
<shinobi_one> red-headed step-child sub-property?
<blazes816> then I don't seem to understand the question, sorry
<LucasK> shinobi_one: ah thats it, tip of the tongue I swear..
<LucasK> blazes816: oh thanks anyway, no worries
<blazes816> t0rc: it called Array#<< which is method that appends the argument to the array
<shinobi_one> Array#<<
<blazes816> '<<' not '< <'
<shinobi_one> shovel it in man shovel it in
<blazes816> lol
<t0rc> oh neat. Thanks. What's # mean in the #<< member method or class ?
<shinobi_one> It separates the class from the method
<shinobi_one> class Array method <<
jaygen has quit [Remote host closed the connection]
Nisstyre has quit [Ping timeout: 260 seconds]
statarb3 has quit [Quit: Leaving]
<waxjar> t0rc: a dot is usually used to speak about a class method: Array.new, a hash sign (?) is usually used to speak about an instance method: Array#each :)
<shinobi_one> thanks waxjar: i totally read his question wrong
<shinobi_one> more specific the better
<shinobi_one> well i didn't read his question wrong i just responded with less verboseness ;o
LucidDreamZzZ has quit [Remote host closed the connection]
<blazes816> waxjar: # === octothorp
<shinobi_one> Me.verbose? => false
<waxjar> oh wow, what a name :P
rabidpraxis has quit [Remote host closed the connection]
emergion has quit [Ping timeout: 255 seconds]
<shinobi_one> number sign, hash symbol, octothorp, whatever
<shinobi_one> hashtag
<shinobi_one> #thankstwitter>.<
<waxjar> in dutch it's called a fence :p
mrsolo has quit [Ping timeout: 245 seconds]
<shinobi_one> a fence, interesting
<shinobi_one> i wonder if that's where mr. wilson went..
nopolitica has joined #ruby
mercwithamouth has joined #ruby
whowantstolivefo has quit [Quit: quit]
emergion has joined #ruby
<shinobi_one> or just wilson rather, eh.. lame joke
<shinobi_one> /afk
dmiller has quit [Remote host closed the connection]
dpatel has quit [Quit: dpatel]
blazes816 has quit [Quit: blazes816]
<mercwithamouth> i'm looking at prime.rb.... what are they doing when they do class Integer.....def Integer.from_prime_division i've never seen a class name prepending a method name like that
hron84 has quit [Quit: Leaving.]
yshh has joined #ruby
phelps has left #ruby ["Linkinus - http://linkinus.com"]
<mercwithamouth> http://cl.ly/image/1I2k37470D3S sorry i don't have clipboard working at the moment
<shinobi_one> can you post a link to the source mercwithamouth
<shinobi_one> ah k
<shinobi_one> a strange way of doing class methods?
brianpWins has quit [Quit: brianpWins]
<mercwithamouth> hmm possibly
<shinobi_one> yeah it is
rkneufeld has joined #ruby
<mercwithamouth> gotcha, makes sense. just wondering...i'm beginning to look at rubys code
<shinobi_one> typically i think self.from_prime_division would be better
d2dchat has joined #ruby
<shinobi_one> generally self.method_name is used for class methods in ruby
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
shadoi has quit [Ping timeout: 268 seconds]
<shinobi_one> you can do class methods in a stranger way than that even
<mercwithamouth> hrmm at first i was going to say self.method makes me think of instance or keeping something in scope but i believe i'm thinking of python
<mercwithamouth> do tell
<shinobi_one> yeah python self.whatever is always instance, but not in ruby
<shinobi_one> confuses me all the time because I program in Python while at work for the most part
<shinobi_one> @classmethod decorators were always ugly to me though
t0rc has quit [Quit: WeeChat 0.3.9]
<mercwithamouth> agreed
greasegum has joined #ruby
eignerchris has joined #ruby
nga4 has joined #ruby
Takehiro_ has joined #ruby
<shinobi_one> class Dog
<shinobi_one> puts "bark class method"
<shinobi_one> def bark
<shinobi_one> end
<shinobi_one> class << self
<shinobi_one> end
<shinobi_one> end
supe has joined #ruby
<supe> hi
supe has quit [Client Quit]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<mercwithamouth> ahh! i think i wrote that example down to ask someone about later. thank you. class << self
<mercwithamouth> yeah def self.bar is much better
<shinobi_one> class Dog; end
<shinobi_one> def Dog.bark
<shinobi_one> end
<shinobi_one> puts "bark class method"
dmiller has joined #ruby
love_color_text has joined #ruby
<shinobi_one> yeah use self when you're coding ;p
blendedbychris has joined #ruby
blendedbychris has quit [Changing host]
blendedbychris has joined #ruby
dmiller_ has joined #ruby
<mercwithamouth> will do
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jonathanwallace has quit [Remote host closed the connection]
Ziioynx has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 240 seconds]
bricker has quit [Ping timeout: 260 seconds]
rabidpraxis has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
jaygen has joined #ruby
SeanTAllen has quit [Remote host closed the connection]
anildigital_work has quit [Remote host closed the connection]
fcoury has quit [Read error: Connection reset by peer]
randym has quit [Write error: Connection reset by peer]
patricksroberts has quit [Remote host closed the connection]
dkannan has quit [Remote host closed the connection]
arubin- has quit [Remote host closed the connection]
dreamfall has quit [Remote host closed the connection]
im0b has quit [Remote host closed the connection]
sr___ has quit [Read error: Connection reset by peer]
Guest38 has quit [Remote host closed the connection]
pkondzior_ has quit [Read error: Connection reset by peer]
octarine has quit [Remote host closed the connection]
rcsheets has quit [Remote host closed the connection]
lectrick has quit [Write error: Broken pipe]
notbrent has quit [Write error: Broken pipe]
davidboy has quit [Remote host closed the connection]
moeSeth has quit [Write error: Broken pipe]
shiroginne has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
randym has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
SeanTAllen has joined #ruby
daniel_-_ has quit [Quit: WeeChat 0.3.9]
davidcelis has joined #ruby
nyrb has quit [Remote host closed the connection]
Trioke has quit [Ping timeout: 244 seconds]
hbpoison has joined #ruby
Araxia has quit [Quit: Araxia]
patricksroberts has joined #ruby
Ivo has quit [Quit: WeeChat 0.3.9]
SCommette has joined #ruby
<waxjar> wrapping everything in class << self is easier sometimes, when you have to define a bunch of class methods
emergion has quit [Quit: Computer has gone to sleep.]
octarine has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<shinobi_one> waxjar: true
<shinobi_one> waxjar: or for extending/including
dnyy has quit [Remote host closed the connection]
Vert has quit [Read error: Connection reset by peer]
<waxjar> like class << self; include SomeModule; end?
rcsheets has joined #ruby
<shinobi_one> class << self; include SomeModule; extend Something; def some_method; method_code end; end
nopolitica has quit [Ping timeout: 268 seconds]
fgro has quit [Ping timeout: 260 seconds]
SCommette has quit [Quit: SCommette]
<waxjar> hmm, a lot of potential for things to break there :P but that's clever, never thought of that
dnyy has joined #ruby
sr___ has joined #ruby
<shinobi_one> ;p
shiroginne has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
gridaphobe has quit [Ping timeout: 255 seconds]
kaawee has quit [Ping timeout: 248 seconds]
dnyy has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
<swarley> oh god someone help me
<swarley> i'm doing real math
<shinobi_one> lol real math?
<swarley> yes, trying to create a memory growth algorithm..
treyryan has quit [Quit: treyryan]
<shinobi_one> i see
JonnieCache has joined #ruby
justinmc_ has quit [Ping timeout: 260 seconds]
swarley has quit [Read error: Connection reset by peer]
Tricks has joined #ruby
swarley has joined #ruby
dakine has quit [Quit: Leaving]
justinmcp has joined #ruby
h4mz1d has joined #ruby
dakine has joined #ruby
marius has quit []
moeSeth has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
notbrent has joined #ruby
dreamfall has joined #ruby
Slivka has joined #ruby
lectrick has joined #ruby
shinobi_one has left #ruby [#ruby]
Tricks has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
cpruitt has joined #ruby
<RubyPanther> what's the problem swarley?
<RubyPanther> Ruby is good at "real math" if you use the right classes...
Juul has joined #ruby
<swarley> RubyPanther; doing it in C
<swarley> Also, the problem is that the math has to be pretty accurate, all of the time.. if not i'll end up with some nasty overflows
LucidDreamZzZ has joined #ruby
<RubyPanther> swarley: You just use Ruby objects from C, just use BigDecimal
<RubyPanther> swarley: if you really wanted something more, you can use my dec_number as an example of using IBM's IEEE decnumber implementation... https://github.com/rubypanther/dec_number
bradhe has quit [Remote host closed the connection]
Nisstyre has joined #ruby
<RubyPanther> but BigDecimal is about 20% faster than DecNumber :(
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<swarley> RubyPanther; this is without the ruby framework though
<RubyPanther> From the Ruby side, I didn't benchmark just from C
<RubyPanther> swarley: well, it is easy regardless, you're just using a lib either way not actually doing the math ;)
whaley has quit [Remote host closed the connection]
yourmysin has joined #ruby
<swarley> :p not if i'm doing the direct calls to realloc
<RubyPanther> you wouldn't want to be in the position of rolling your own square wheel and then trying to do something complicated with it
therod has joined #ruby
<swarley> Its honestly not that hard. I'm just looking for a one line memory expansion algorithm
<swarley> I already have all of the code, i just need a better system for when and how much memory i allocate
forced_request has quit [Ping timeout: 264 seconds]
<RubyPanther> That is why you're expected to use libs, because if you're trying to do your own memory allocations you're just asking for bugs.
r1ddl3r has joined #ruby
freezey has joined #ruby
rburton- has quit [Quit: Leaving...]
chichou has quit [Remote host closed the connection]
im0b has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
davidboy has joined #ruby
richardjortega has joined #ruby
awarner has joined #ruby
shadoi has joined #ruby
richardjortega_ has quit [Ping timeout: 244 seconds]
JonnieCache has quit [Ping timeout: 265 seconds]
jaygen has quit [Remote host closed the connection]
artnez has joined #ruby
nga4 has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
drago757 has joined #ruby
headius has quit [Quit: headius]
sent-hil has joined #ruby
jrajav has joined #ruby
ejholmes has quit [Quit: ejholmes]
Nisstyre has quit [Ping timeout: 240 seconds]
jrajav has quit [Client Quit]
pkondzior_ has joined #ruby
AlbireoX has joined #ruby
ttt has joined #ruby
AlbireoX has quit [Remote host closed the connection]
AlbireoX has joined #ruby
therod has quit [Ping timeout: 244 seconds]
r1ddl3r has quit [Quit: Leaving.]
Goles has joined #ruby
eignerchris has quit [Remote host closed the connection]
LucasK has quit [Quit: LucasK]
monkegjinni has joined #ruby
ckrailo has joined #ruby
Ruler_Of_Heaven_ has joined #ruby
pipopopo has quit [Ping timeout: 260 seconds]
ablankfield has quit [Read error: Operation timed out]
rakl has quit [Quit: sleeping]
h4mz1d has quit [Ping timeout: 265 seconds]
monkegjinni has quit [Ping timeout: 256 seconds]
dylanjha has quit [Quit: Leaving...]
john2x has joined #ruby
Trioke has joined #ruby
nari_ has joined #ruby
hbpoison has quit [Ping timeout: 265 seconds]
sent-hil has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
lampe2 has quit [Quit: Leaving]
Nisstyre has joined #ruby
dylanjha has joined #ruby
freezey has quit [Quit: freezey]
caleb_io has joined #ruby
slainer68 has joined #ruby
jaygen has joined #ruby
xargoon has quit [Ping timeout: 264 seconds]
ablankfield has joined #ruby
thone has joined #ruby
xargoon has joined #ruby
recycle has joined #ruby
thone_ has quit [Read error: Operation timed out]
slainer68 has quit [Ping timeout: 248 seconds]
davidcelis has quit [Quit: K-Lined.]
bradhe has joined #ruby
dakine_ has joined #ruby
mkillebrew has quit [Ping timeout: 255 seconds]
rabidpraxis has quit [Remote host closed the connection]
dakine has quit [Read error: Connection reset by peer]
mkillebrew has joined #ruby
Trioke has quit [Ping timeout: 240 seconds]
crocket has joined #ruby
<crocket> Does rake leave any log?
<rking> crocket: Not by default.
k610 has joined #ruby
<rking> That would irritate me if it did. ☺ "Hai haev som noi-z fielz!"
maletor has quit [Quit: Computer has gone to sleep.]
dylanjha has quit [Quit: Leaving...]
anildigital_work has joined #ruby
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
k610 has quit [Ping timeout: 246 seconds]
arubin- has joined #ruby
dkannan has joined #ruby
SCommette has joined #ruby
SCommette has quit [Client Quit]
kapowaz has joined #ruby
yaymukund has quit [Ping timeout: 256 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
rkneufeld has quit [Quit: Computer has gone to sleep.]
yourmysin has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
fcoury has joined #ruby
jarred_ has joined #ruby
hsbt has quit [Read error: Connection reset by peer]
hsbt has joined #ruby
rabidpraxis has joined #ruby
<mr-rich> rking: you awake?
maletor has joined #ruby
recycle has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 252 seconds]
hvq has quit [Read error: Connection reset by peer]
<alvaro_o> Can someone tell me why this code can't read the user's input? https://gist.github.com/3950163
hbpoison has quit [Ping timeout: 260 seconds]
Uranio has quit [Read error: Connection reset by peer]
headius has joined #ruby
rburton- has joined #ruby
<alvaro_o> when I try to read the user's input, gets() stores a line of the code I printed, not what the user entered
<Karunamon> gets is a method of File?
stephenjudkins has quit [Quit: stephenjudkins]
<alvaro_o> I think it does
havenn_ has joined #ruby
<Karunamon> hm. doesn't look out of sorts then at first glance..
<Karunamon> anyone aware of a gem to handle database migrations that isn't named activerecord?
g-ram has joined #ruby
nga4 has joined #ruby
caleb_io has quit [Quit: caleb_io]
Uranio has joined #ruby
dnyy has joined #ruby
k0nichiwa has quit [Ping timeout: 252 seconds]
dylanjha has joined #ruby
dakine_ is now known as dakine
ABK has quit [Ping timeout: 260 seconds]
rburton- has quit [Ping timeout: 260 seconds]
awarner has quit [Remote host closed the connection]
therod has joined #ruby
cableray has quit [Quit: cableray]
cpruitt has quit [Quit: cpruitt]
ZubKonst has joined #ruby
reuf has quit [Quit: Leaving]
i8igmac has joined #ruby
robertotauille has quit [Quit: Leaving...]
therod has quit [Ping timeout: 245 seconds]
<i8igmac> any one familiar with libpcap or packetfu ?
ZubKonst_ has quit [Ping timeout: 244 seconds]
<rking> mr-rich: What's up?
cableray has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
robertotauille has joined #ruby
jrist is now known as jrist-afk
cableray has quit [Client Quit]
CaptainJet has quit []
glyytchy has joined #ruby
eignerchris has joined #ruby
sambio has quit []
jarred_ has quit [Quit: jarred_]
yekta has quit [Quit: yekta]
rabidpraxis has quit [Remote host closed the connection]
swarley has quit [Ping timeout: 240 seconds]
nadirvardar has joined #ruby
apok_ has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
apok_ has quit [Read error: Connection reset by peer]
apok_ has joined #ruby
recycle has joined #ruby
medik has quit [Quit: Leaving]
<mercwithamouth> anyone know of any good articles on multidimensional arrays?
apok has quit [Ping timeout: 244 seconds]
Cicloid has quit [Remote host closed the connection]
Takehiro_ has quit [Remote host closed the connection]
Nisstyre has quit [Read error: Operation timed out]
<mercwithamouth> like arr = [[1,2,3], [4,5,6], [7,8,9]] how would i access the 2nd value in the 2nd array?
<mercwithamouth> ahh i see it seems to flatten them still...hrmm
<_jesse_> arr[1][1]?
dylanjha has quit [Quit: Leaving...]
apok_ has quit [Ping timeout: 255 seconds]
freezey has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
Takehiro_ has joined #ruby
Uranio has quit [Remote host closed the connection]
ablankfield has quit [Ping timeout: 246 seconds]
thecreators has joined #ruby
GeekOnCoffee has quit [Ping timeout: 244 seconds]
GeekOnCoffee has joined #ruby
chriskk has quit [Quit: chriskk]
chriskk has joined #ruby
Nisstyre has joined #ruby
krz has joined #ruby
baroquebobcat has joined #ruby
Cicloid has joined #ruby
drago757 has quit [Quit: drago757]
jumpingcloud has joined #ruby
<jumpingcloud> So, the other night I was drinking...
<jumpingcloud> now that I have your attention, Okay, I've got a weird question!
baroquebobcat has quit [Quit: baroquebobcat]
<jumpingcloud> I want to mount a remote fs not using pure ssh, how would i even begin writing something like that?
chessguy_ has quit [Remote host closed the connection]
<jumpingcloud> um i meant *using pure ssh.
<jumpingcloud> not over sftp
Cicloid has quit [Ping timeout: 272 seconds]
Edmonto91 has joined #ruby
areil has joined #ruby
xpen has joined #ruby
c0rn_ has joined #ruby
<jumpingcloud> or how would I have ruby make a virtual directory? one i could 'cd' into?
jcaudle has joined #ruby
k0nichiwa has joined #ruby
treyryan has joined #ruby
<jumpingcloud> and these are linux filesystems im talking about.
Edmonto91 has quit [Ping timeout: 245 seconds]
c0rn_ has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
<jumpingcloud> Does this not sound like a cool project?
c0rn_ has joined #ruby
h4mz1d has joined #ruby
<mercwithamouth> what does !!@instance_variable_name do? the '!!'
c0rn_ has quit [Client Quit]
aantix has joined #ruby
c0rn_ has joined #ruby
chriskk has quit [Quit: chriskk]
baroquebobcat has joined #ruby
blendedbychris has quit [Quit: Leaving.]
hbpoison has joined #ruby
jcaudle has quit [Quit: jcaudle]
robertotauille has quit [Quit: Leaving...]
a_a_g has joined #ruby
recycle has quit [Remote host closed the connection]
c0rn_ has quit [Client Quit]
<waxjar> mercwithamouth !! makes sure you get a Boolean (either true or false)
rabidpraxis has joined #ruby
<waxjar> !false # => true; !!false # => false
WhoNeedszzz has joined #ruby
<WhoNeedszzz> Hey guys
hbpoison has quit [Ping timeout: 260 seconds]
<WhoNeedszzz> Are there simple ways in ruby to avoid repetitive code?
headius has quit [Quit: headius]
<waxjar> yes
<mercwithamouth> waxjar: ah i see, thanks
gngrwzrd has joined #ruby
<WhoNeedszzz> waxjar, Cool. What would they be?
<waxjar> define a method for repeated bits of code, abstract away the differences
<waxjar> mixins
<waxjar> inheritance
ryanf has joined #ruby
Cicloid has joined #ruby
<Karunamon> so, functional question
ryanf has quit [Ping timeout: 255 seconds]
<Karunamon> i know when you define an activerecord database, you call ActiveRecord::Base.establish_connection
horofox has quit [Quit: horofox]
<Karunamon> then later you create your classes and connect AR to them by something like my_class < ActiveRecord::Base
<Karunamon> How does it know what database it should associate with that class?
<Karunamon> I mean, it works obviously, I just don't see how
Cicloid has quit [Read error: Operation timed out]
<jumpingcloud> Karunamon: isn't that rails?
<Karunamon> yeah it's part of rails
<jumpingcloud> check out the rubyonrails channel, they might be better able to assist you.
quest88 has joined #ruby
<Karunamon> ah ok, thanks
<jumpingcloud> Karunamon: i think it's in a config file in /config tho, i could be wrong.
rburton- has joined #ruby
<Karunamon> right, that's how it associates the connection with a given physical database
<Karunamon> that much makes sense
Soliah has quit [Quit: Soliah]
treyryan has quit [Quit: treyryan]
<Karunamon> i just don't see how you call a superclass with no parameters and it "knows" to use the database i connected to earlier
dmiller_ has quit [Remote host closed the connection]
<Karunamon> where is that data being shared
<WhoNeedszzz> So say you are creating a book "manager" and you wanted the user to be able to modify details of the book (implemented with a simple class). If this statement kept occurring is there a better way to go about it or is it fine?: @books.find { |book| book.isbn.eql? isbn }
<jumpingcloud> Karunamon: grep for it? (linux fs)
<jumpingcloud> grep dbname ./* -R
rakl has joined #ruby
cableray has joined #ruby
<jumpingcloud> WhoNeedszzz: so books is an array?
eignerchris has quit [Remote host closed the connection]
<jumpingcloud> WhoNeedszzz: put your code in a pastebin or something, i want to see
burgestrand has joined #ruby
<jumpingcloud> sounds like you want to refactor.
bigmcq77 has quit [Quit: Computer has gone to sleep.]
<WhoNeedszzz> jumpingcloud, http://codepad.org/EXRoWULx
gabrielrotbart has quit [Ping timeout: 245 seconds]
<WhoNeedszzz> remaining methods are those to change the other book information
<WhoNeedszzz> which would have the same general code
gabrielrotbart has joined #ruby
invapid has joined #ruby
yaymukun1 has joined #ruby
yaymukun1 is now known as yaymukund
joeycarmello has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
<Paradox> egg nog
<Karunamon> too early in the year
bigmcq77 has joined #ruby
<Paradox> also used to be a useful nokogiri extension
rburton- has quit [Ping timeout: 276 seconds]
<jumpingcloud> WhoNeedszzz: yeah if you want to get rid of those i'd say to a separate method and pass in the part that changes
glyytchy has quit [Quit: glyytchy]
xpen_ has joined #ruby
xpen has quit [Read error: Connection reset by peer]
<jumpingcloud> WhoNeedszzz: sorry i'm don't have a better solution. =/
<WhoNeedszzz> It's probably fine to keep it the way it is
<WhoNeedszzz> Does ruby not have lambdas?
joeycarmello has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
<jumpingcloud> yeah, but i'm a noob ;)
<jumpingcloud> I couldn't tell you a thing about it.
burgestrand has quit [Quit: Leaving.]
<jumpingcloud> how much data are you working with?
<WhoNeedszzz> Low
<WhoNeedszzz> I'm writing this conceptually
<Paradox> WhoNeedszzz, ruby has excellent lambdas
slainer68 has joined #ruby
<Paradox> lambdas that blow python lambdas out of the water
<Paradox> multiple syntaxes for lamdbas even
<Paradox> spiky ones and regular ones
JonnieCache has joined #ruby
<WhoNeedszzz> Would a lambda apply in my situation or am i thinking of something else?
joeycarmello has quit [Remote host closed the connection]
dmiller has joined #ruby
<Paradox> in ruby, there are at least 3 ways to do any one thing
<Paradox> lambdas, blocks, and procs
<Paradox> id say blocks would probably suit you better
<jumpingcloud> i'm getting excited...
<WhoNeedszzz> I'm asking what way would be the most efficient
havenn_ has quit [Remote host closed the connection]
<Paradox> none, they are all handled the same way by the C
<Paradox> blocks are the most idiomatic though
cableray has joined #ruby
<WhoNeedszzz> Also what's the wort case performance of the default Array.sort?
<Paradox> its a quicksort i believe
<Paradox> so
<WhoNeedszzz> Paradox, http://codepad.org/EXRoWULx. Would you simplify that?
<WhoNeedszzz> Quicksort worst case is n
<WhoNeedszzz> That would be terrible
<WhoNeedszzz> I thought it was supposed to be fast
<Paradox> im pulling up docs
<Paradox> it might be a hybridized search
<yaymukund> is there a good way to find out where a module was defined?
<WhoNeedszzz> n^2 rather
<Paradox> yaymukund, pry lets you know
<WhoNeedszzz> Which is the worst
Cicloid has joined #ruby
<WhoNeedszzz> It has a best case of nlogn which is ideal
<jumpingcloud> yaymukund: grep?
<yaymukund> I've done `grep module | grep Name`
slainer68 has quit [Ping timeout: 244 seconds]
<WhoNeedszzz> man grep
dmiller has quit [Remote host closed the connection]
<yaymukund> er, git grep module | grep Name
<jumpingcloud> yaymukund: grep 'def yourmod'sname' ./* -R
<jumpingcloud> oof sorry that looks bad... do you get the idea?
dmiller has joined #ruby
marius has joined #ruby
<jumpingcloud> yaymukund: grep 'def yourmodsname' ./* -R
<yaymukund> yeah. hmm, def to define a module? giving it a shot
cableray has quit [Client Quit]
<jumpingcloud> right on man
JonnieCache has quit [Ping timeout: 244 seconds]
<yaymukund> nope. hm, weird.
<yaymukund> ty, I'll try pry and search around a bit.
<jumpingcloud> it's case sens
<jumpingcloud> gl!
<yaymukund> it's a rails app, so maybe there's some magic doing this. but it's not an AR module, so I figured ruby methods would work
<jumpingcloud> I can't help with pry but Paradox knows his stuff.
<jumpingcloud> What's the method you're looking for?
Cicloid has quit [Ping timeout: 276 seconds]
<jumpingcloud> er mod?
<yaymukund> er, that made no sense. I don't think rails is creating this module dynamically
c0rn_ has joined #ruby
<Paradox> WhoNeedszzz, http://codepad.org/p2EmfDfy
<Paradox> find returns the FIRST result that matches
<jumpingcloud> oh yeah that's a possibility!
<Paradox> select returns all
<Paradox> also i might have fucked something up earlier
<WhoNeedszzz> Ah ok
<WhoNeedszzz> Though that delete won't work
<Paradox> yeah
<Paradox> use a delete_if
Cicloid has joined #ruby
<jumpingcloud> ^ one of my fav's!
<WhoNeedszzz> won't work either
<Paradox> yeah it will…
<WhoNeedszzz> isbn is an attribute of the class Book
<Paradox> yeah
<Paradox> so look at the code i just pasted
<WhoNeedszzz> delete checks all attributes?
<Paradox> no
<Paradox> just look at the code
<WhoNeedszzz> ah ok
mvangala_ has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
cableray has joined #ruby
Slivka has quit [Remote host closed the connection]
<WhoNeedszzz> Ok cool
<Paradox> i recommend reading over array's docs
<WhoNeedszzz> Now what if the isbn doesn't exist for the select blocks?
<Paradox> then just throw in an || ! b.isbn.nil?
dnyy has quit [Remote host closed the connection]
<Paradox> oh
<Paradox> if the one passed to delete_if?
<Paradox> it cant find a match
<Paradox> and so it doesnt delete any
<WhoNeedszzz> No
<WhoNeedszzz> For the mod methods
<Paradox> again
<Paradox> doesnt return any
<Paradox> and so nothing is changed
philcrissman has quit [Remote host closed the connection]
c0rn_ has quit []
<Paradox> but you dont want select
<Paradox> thats not right either
<Paradox> hold on
bairui has quit [Ping timeout: 245 seconds]
ABK has joined #ruby
Cicloid has quit [Ping timeout: 245 seconds]
bradhe has quit [Remote host closed the connection]
cableray has quit [Ping timeout: 252 seconds]
<Paradox> WhoNeedszzz, http://codepad.org/Ahj1DexQ
digitalcakestudi has quit [Quit: Leaving.]
gngrwzrd has quit [Quit: gngrwzrd]
rburton- has joined #ruby
<WhoNeedszzz> Paradox, thanks that works nicely
<WhoNeedszzz> Gotta love stuff like that
<WhoNeedszzz> So did you find the worst case performance of sort?
DarthGandalf has quit [Ping timeout: 260 seconds]
geggam has joined #ruby
<Paradox> still looking it
<Paradox> yup
<Paradox> quicksort
ryanf has joined #ruby
<jumpingcloud> how are you testing for performance?
h4mz1d has quit [Ping timeout: 240 seconds]
<Paradox> using time
<Paradox> and the benchmark suite
Cicloid has joined #ruby
<jumpingcloud> awesome, yeah i knew time, but don't know about ruby's benchmark suite
<Paradox> WhoNeedszzz, since it sounds like you're in a freshman CS class, i'd recommend filing that away for later, as its very useful
<jumpingcloud> Thanks Paradox you're incredible ;)
<Paradox> np (づ。◕‿‿◕。)づ
<WhoNeedszzz> Haha no I'm a junior CS student
<WhoNeedszzz> We've been doing Java and C up to this point
hbpoison has joined #ruby
kiyoura has quit [Quit: Leaving]
<jumpingcloud> wait you guys do ruby in school?
<WhoNeedszzz> I'm studying ruby to compare programming language structure
<Paradox> no, when i was in CS i had to do crap in java
<Paradox> which made me eventually change majors
<Paradox> and learn ruby
<WhoNeedszzz> Comparing with Haskell and C
<Paradox> lol
<WhoNeedszzz> I like Haskell
<WhoNeedszzz> Hate C
<jumpingcloud> Java is the reason i'm not in school.
<Paradox> ruby aint gonna beat either
<Paradox> sorry to say
quest88 has quit [Quit: quest88]
<Paradox> ruby, you trade runtime efficiency for programmer efficiency
<WhoNeedszzz> Right
moshee has quit [Ping timeout: 260 seconds]
<jumpingcloud> word.
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<Paradox> other languages do too
<Paradox> but ruby does so more efficiently
<jumpingcloud> absolute.
<jumpingcloud> and beautifully.
dhruvasagar has quit [Ping timeout: 260 seconds]
bairui has joined #ruby
<jumpingcloud> haskell looks really interesting, functional programing is still a myth to me tho.
Cicloid has quit [Ping timeout: 244 seconds]
<WhoNeedszzz> It's quite elegant
<jumpingcloud> by that i mean i don't understand it ;)
<Paradox> meh, it seems complexity for the sake of complexity
<jumpingcloud> yeah, my mentor really likes it.
<Paradox> it was developed for educational purposes only, and has little use outside academia
<Paradox> that isnt saying people wont use it
<Paradox> but its like using a mag-lite to hammer in a nail
<jumpingcloud> hmmm, but things have been developed on it. and funtion really well.
<Paradox> it works
<Paradox> but not well
<WhoNeedszzz> It works quite well actually
<Paradox> they could have been built in C faster, and run faster too
<jumpingcloud> it's very fast!
<WhoNeedszzz> Read Real World Haskell
<Paradox> C is faster
<Paradox> and Fortran is even faster still
<jumpingcloud> yeah yaeh.
<yaymukund> oh, man. it's rspec. weird weird weird
<jumpingcloud> ;)
<Paradox> yaymukund, learn to love rspec
<Paradox> its way better than minitest
<WhoNeedszzz> Haskell isn't complex
<jumpingcloud> wtf is minitest?
<WhoNeedszzz> It's pure math
<yaymukund> Paradox: I like rspec, but it defined a module for me, I think.
<yaymukund> Paradox: I got pry, and am trying to figure this module out
g-ram has quit [Quit: Computer has gone to sleep.]
<yaymukund> btw, pry is pretty nifty
<yaymukund> I am going to keep this around
<Paradox> yup
<Paradox> stick pry-doc in for real-time documentation
<jumpingcloud> pry looks a little complex, but i only reat the readme.
<jumpingcloud> *read
<Paradox> gem install pry-doc
<Paradox> then you can ? Array#sort
horofox has joined #ruby
<Paradox> or whatever
<Paradox> and get documentation on the fly
rburton- has quit [Ping timeout: 255 seconds]
<yaymukund> how do I get where this module is defined? I'm trying instance methods and finding that many of them *aren't* defined
<yaymukund> I think it's some kind of stub or mock that rspec created, because it's got stuff like share_examples_for
<jumpingcloud> Whats the modules's name?
<Paradox> show-source method signature
<yaymukund> (a method)
adamjleonard has quit [Quit: Leaving...]
<yaymukund> jumpingcloud: Beta? it's from my repo, which is why it's driving me a bit nuts haha
<jumpingcloud> lets see some output in a paste bin!
h4mz1d has joined #ruby
<Paradox> yaymukund, pry show-source
<jumpingcloud> seconded.
<yaymukund> `pry show-source Beta`?
<Paradox> beta is a constant
<Paradox> try ls Beta
<Paradox> constant means its either a class, method, or actual constant
bradhe has joined #ruby
g-ram has joined #ruby
<jumpingcloud> wait ls wouldn't show it though, right?
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<yaymukund> it's showed some subclasses
<yaymukund> Channel, Feature, Payments, User, etc.
<yaymukund> I know where these are all defined
<yaymukund> as class Beta::User < User ; ... ; end
havenn has joined #ruby
<Paradox> it shows where every method in the current tree came from
<jumpingcloud> puts Beta.class
<yaymukund> module
<yaymukund> (*Module)
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<yaymukund> I can gist this stuff if you think that would help
<jumpingcloud> yaymukund: yeah, do it
Vinz_` is now known as Vinz_
joofsh has joined #ruby
Vinz_ is now known as Vinz_`
invapid has quit [Ping timeout: 268 seconds]
<Paradox> yaymukund, beta belongs to Kernel
<Paradox> probably was monkeypatched in there
stnly has quit [Ping timeout: 260 seconds]
<yaymukund> yuck
<Paradox> nothing wrong with that
<yaymukund> I remember reading a bit about Kernel
<yaymukund> it's where puts lives
<Paradox> its from rspec-expectations
arubin has quit [Quit: Computer has gone to sleep.]
<Paradox> /Users/mukund/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-expectations-2.9.0/lib/rspec/expectations/extensions/kernel.rb:23
<Paradox> to be precise
<Paradox> also 1.8.7
<Paradox> ಠ_ಠ
<yaymukund> right, but this app has subclasses of Beta running in production.
<yaymukund> Beta::User, etc.
baroquebobcat has quit [Quit: baroquebobcat]
<Paradox> well you have 3 courses
<Paradox> make sure rspec only loads in test mode (which you should do anyways)
<Paradox> rename Beta
stnly has joined #ruby
maletor has joined #ruby
therod has joined #ruby
<Paradox> or patch rspec and rename it
baroquebobcat has joined #ruby
joofsh has quit [Remote host closed the connection]
<Paradox> oh
<Paradox> derp
<yaymukund> but I don't think rspec is creating Beta in there...
<Paradox> thats your beta
<Paradox> rspec is patching kernel
<Paradox> which is being included into Object
<Paradox> which has an implicit include into Beta
<Paradox> thats how rspec works
<Paradox> it lets you do Beta::User.find(f).should = "f"
<yaymukund> oo, so that just tells me where should_not was defined
<yaymukund> not Beta itself?
<Paradox> nope
<Paradox> its in kernel
<Paradox> via rspec
DarthGandalf has joined #ruby
<yaymukund> ok so that still leaves Beta an open question, right?
<Paradox> walso
<Paradox> you're running an ancient version of rspec
hbpoison_ has joined #ruby
<yaymukund> yup, this is an old project, sorry :(
Goles has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Paradox> Beta is defined wherever you define it
<Paradox> in ruby classes are never closed
hbpoison has quit [Read error: Connection reset by peer]
therod has quit [Ping timeout: 244 seconds]
<Paradox> lets you (or someone else) come back later and add features, even when they cant view the source
<Paradox> depending on how its used it can improve or destroy your stability
<yaymukund> right, I've spent a bit of time reading about the guts of Ruby. that stuff is pretty interesting, and very powerful
<Paradox> yup
rburton- has joined #ruby
<WhoNeedszzz> mmm Volcano
<WhoNeedszzz> A coder's best friend :)
nga4 has quit []
baroquebobcat has quit [Quit: baroquebobcat]
<yaymukund> haha I think I had better give up for now. Beta.methods - Object.methods - Kernel.methods is []
<Paradox> you've basically removed all methods
burgestrand has joined #ruby
<yaymukund> well, wouldn't the Beta-specific methods remain?
<Paradox> no
hbpoison_ has quit [Ping timeout: 268 seconds]
<Paradox> oh
<Paradox> yeah they should
<Paradox> weird
<yaymukund> so there's nothing in there
kil0byte has joined #ruby
<WhoNeedszzz> Beta.methods(false)
allyraza has joined #ruby
<yaymukund> oh yeah, that's nifty
<yaymukund> so my strategy of "find the file where this is defined by running stat Beta.methodname" is doomed to fail
<yaymukund> haha
Cicloid has joined #ruby
<Paradox> you already found the source of should_not
baroquebobcat has joined #ruby
<Paradox> /Users/mukund/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-expectations-2.9.0/lib/rspec/expectations/extensions/kernel.rb:23
kdridi has quit [Quit: This computer has gone to sleep]
jarred_ has joined #ruby
<jumpingcloud> Paradox: who are you? are you a Ruby dev?
aantix has quit [Quit: aantix]
<yaymukund> right, but that's not defining the Beta constant itself
vipaca has joined #ruby
artnez has quit [Quit: artnez]
blendedbychris has joined #ruby
john2x has quit [Read error: Connection reset by peer]
* jumpingcloud is super impressed.
<Paradox> nah, im just a developer who uses ruby
<yaymukund> thanks for your patience, Paradox. I think I'm going to catch some zzzs and go bother the author of the Beta code tomorrow :)
<Paradox> i worked at pivotal over the summer
<Paradox> and have a blog
<yaymukund> you're not the same paradoxx in #nethack, are you?
<yaymukund> :p
<Paradox> no
<Paradox> i used to work for reddit
<yaymukund> oo, cool!
<yaymukund> our designer made the reddit alien :p
elico has joined #ruby
<Paradox> alexis?
Cicloid has quit [Ping timeout: 260 seconds]
<yaymukund> oh right alexis did that right
<yaymukund> nbm
<yaymukund> I'm dumb
<yaymukund> hahaha
vipaca has quit [Changing host]
vipaca has joined #ruby
blendedbychris has joined #ruby
blendedbychris has quit [Changing host]
<Paradox> i didnt think hipmunk was using ruby
<yaymukund> hahaha no I am dumb. alexis came to our school to talk and talked about that
<yaymukund> I'm mixing up anecdotes
<yaymukund> I can't even humblebrag correctly :p
<jumpingcloud> hey, so i have a question, do i need to go to school? I want to advance. I'm a hosting support guy right now. trying to get into dev.
a_a_g has quit [Read error: Connection reset by peer]
<vipaca> can you compile default encoding?
a_a_g has joined #ruby
<jumpingcloud> i'm just looking for advice.
<yaymukund> jumpingcloud: you don't need to go to school to become a dev in the bay area
<jumpingcloud> yaymukund: i could move there ;)
<burgestrand> jumpingcloud: school will teach you the very basics and give you a degree. The basics won’t make you good, and the basics won’t make you ready for anything. Either way you’ll learn a lot at your first real job, most likely much more than your entire education into the field combined.
<crocket> No!!
<jumpingcloud> but the competition is fierce
slainer68 has joined #ruby
<burgestrand> jumpingcloud: degree is useful to clients, because it gives a sense of credibility, even though most other developers very well know a degree is not the most important thing, most of your clients probably won’t know that.
a_a_g has quit [Read error: Connection reset by peer]
gngrwzrd has joined #ruby
a_a_g has joined #ruby
<vipaca> WTF anyone know exactly how ruby pics default encoding when no env var is present
<jumpingcloud> =) burgestrand: yeah i feel like, i know more than most ppl out of school. When i talk to grads i feel like they offer little.
<burgestrand> jumpingcloud: even so, some companies care about degrees, some don’t; the usual saying is that if they require a degree maybe that’s not a good place to work. In here you’ll most likely find a mix of people with a degree, and people without.
<Paradox> yes you need to go to school
baroquebobcat has quit [Quit: baroquebobcat]
<Paradox> no you dont need to go to school for CS
<Paradox> most programmers i've worked with dont have CS degrees
<Paradox> CS degrees typically are for people who spend their entire life in academia
<Paradox> should be called CM
<Paradox> computer math
<jumpingcloud> Paradox: haha is that some kind of paradigm ? =)
<Paradox> jumpingcloud, a personal one
<Paradox> but yeah
<jumpingcloud> Paradox: ah i see your point.
ckrailo has quit [Quit: Computer has gone to sleep.]
<jumpingcloud> so what kind of school am I looking for? i'm almost 30 which is making me feel too old./
<burgestrand> jumpingcloud: personally I’d go to school if I could afford the time, but where I live we have free education and social education support.
<jumpingcloud> also im in chicago, just a btw
Cicloid has joined #ruby
<Paradox> well Im a comm major
<Paradox> and i love it
<Paradox> but do whatever interests you
<Paradox> you can change majors at any time
slainer68 has quit [Ping timeout: 256 seconds]
chriskk has joined #ruby
hakunin has quit [Ping timeout: 244 seconds]
<jumpingcloud> Paradox: yeah... i'm just wondering what an old guy like me is going to do working full time and trying school again.
<jumpingcloud> Communications is awesome though!
<burgestrand> jumpingcloud: just keep in mind, CS school is often not enough, it won’t make you a good developer on it’s own
<jumpingcloud> burgestrand: sweden? sounds pretty awesome!
<burgestrand> jumpingcloud: free education is sweet :)
<jumpingcloud> burgestrand: Yeah, i hear ya, I really want to take my skillset to the next level. and i'm wondering how.
<burgestrand> jumpingcloud: by being here you’re already doing it, really
<rburton-> In terms of keeping code clean, when do you put logic in a model vs. say a module
<burgestrand> jumpingcloud: even so, you might want to check out coursera (and the likes) for interesting topics
<jumpingcloud> i feel like i'm a smart guy, but thinking about having to sit through a MS word class kills me.
* jumpingcloud googles coursera
<burgestrand> yeah, I can related to that feeling for sure, it’s pretty much what I needed to endure the first year of my education
<Paradox> rburton-, depends
<Paradox> models are for dealing with data
<Paradox> modules are ways of compartmentalizing reusable code that you dont want in a class
Cicloid has quit [Ping timeout: 268 seconds]
<burgestrand> rburton-: ^ often the reusable component is behaviour
jarred_ has quit [Quit: jarred_]
<Paradox> also modules are for holding classes in a namespace
elsifaka has joined #ruby
<Paradox> which is nice
<Paradox> so you dont pollute the global
ABK has quit [Ping timeout: 256 seconds]
<jumpingcloud> burgestrand: & Paradox: Thanks guys. I'm off to study, you guys are awesome!
<burgestrand> jumpingcloud: also, user groups are always nice for ideas and inspiration, can be awful fun too
joeycarmello has joined #ruby
<jumpingcloud> burgestrand: yeah? i
xorgnak has joined #ruby
<jumpingcloud> burgestrand: yeah? i'm unfamilliar with user groups. You mean local folk or online?
c0rn_ has joined #ruby
yaymukund has quit [Ping timeout: 260 seconds]
<burgestrand> jumpingcloud: usually it’s a small group of people sharing a common interest in a local area; either doing mini-conferences (with presentations) or hackatons or whatever. Essentially your regular chess club but for developers.
<burgestrand> jumpingcloud: depending on the crowd it can be good or bad, but it’s worth checking it out at least once
<jumpingcloud> burgestrand: hey thanks for the suggestion, i really appreciate it . I'm looking into some groups via meetup right now.
<jumpingcloud> The more i get into ruby, the better i feel.
<jumpingcloud> it might be a calling.
<jumpingcloud> ;)
<burgestrand> (:
joeycarmello has quit [Ping timeout: 272 seconds]
dnyy has joined #ruby
dnyy has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 264 seconds]
daemos has joined #ruby
hakunin has joined #ruby
daemos has quit [Quit: Bye]
tagrudev has joined #ruby
bradhe has quit [Remote host closed the connection]
awestroke has joined #ruby
savage- has joined #ruby
c0rn_ has quit []
c0rn_ has joined #ruby
Mon_Ouie has joined #ruby
xpen_ is now known as xpen
davidcelis has joined #ruby
jamw has joined #ruby
Cicloid has joined #ruby
bitZero__ has quit [Read error: Connection reset by peer]
mars26 has joined #ruby
bitZero__ has joined #ruby
jamjam has quit [Ping timeout: 240 seconds]
gngrwzrd has quit [Quit: gngrwzrd]
c0rn_ has quit []
allyraza has quit [Ping timeout: 245 seconds]
jaygen has quit [Remote host closed the connection]
mars26 has left #ruby [#ruby]
Cicloid has quit [Ping timeout: 240 seconds]
c0rn_ has joined #ruby
i8igmac has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
AlbireoX`Laptop has joined #ruby
vlad_starkov has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
AlbireoX has quit [Ping timeout: 265 seconds]
WhoNeedszzz has left #ruby ["P00f!"]
vlad_sta_ has joined #ruby
greasegum has quit [Quit: Leaving]
horofox has quit [Quit: horofox]
savage- has quit [Quit: savage-]
hbpoison has joined #ruby
kn330 has joined #ruby
yxhuvud has joined #ruby
h4mz1d has quit [Ping timeout: 244 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
<kn330> given a 2-D array "A" and an element "a" that belongs to that Array, what would be the best way to get the location (Row,Column) of "a" ?
freezey has quit [Quit: freezey]
hbpoison has quit [Ping timeout: 268 seconds]
Nanuq has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
blendedbychris has quit [Quit: Leaving.]
xpen has quit [Remote host closed the connection]
xpen has joined #ruby
c0rn_ has quit []
dylanjha has joined #ruby
mahmoudimus has joined #ruby
Cicloid has joined #ruby
xpen_ has joined #ruby
timonv has quit [Remote host closed the connection]
c0rn_ has joined #ruby
xpen has quit [Ping timeout: 256 seconds]
maesbn has joined #ruby
dhruvasagar has joined #ruby
zomgbie has joined #ruby
Cicloid has quit [Ping timeout: 265 seconds]
Russell^^ has quit [Quit: Russell^^]
tonini has joined #ruby
Nanuq has joined #ruby
yaymukund has joined #ruby
stnly has quit [Ping timeout: 260 seconds]
aganov has joined #ruby
vipaca has quit [Quit: Leaving...]
stephenjudkins has joined #ruby
stnly has joined #ruby
stephenjudkins has quit [Client Quit]
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
jeff_sebring has joined #ruby
JonnieCache has joined #ruby
Cicloid has joined #ruby
jumpingcloud has quit [Ping timeout: 255 seconds]
AlbireoX`Laptop has quit [Remote host closed the connection]
rippa has joined #ruby
Katniss has quit [Ping timeout: 246 seconds]
Morkel has joined #ruby
kn330 has quit [Ping timeout: 265 seconds]
Cicloid has quit [Ping timeout: 256 seconds]
kdridi has joined #ruby
tomku has quit [Read error: Operation timed out]
tomku has joined #ruby
nlpplz has quit [Ping timeout: 240 seconds]
rtl has quit [Ping timeout: 244 seconds]
zomgbie has quit [Ping timeout: 245 seconds]
answer_42 has joined #ruby
nlpplz has joined #ruby
jumpingcloud has joined #ruby
dr_bob has joined #ruby
piotr_ has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
nadirvardar has quit [Quit: Computer has gone to sleep.]
eboaz has quit [Ping timeout: 255 seconds]
dylanjha has quit [Quit: Leaving...]
c0rn_ has quit []
kil0byte has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
bradleyprice has joined #ruby
araujo has quit [Quit: Leaving]
ABK has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
Morkel_ has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
dylanjha has joined #ruby
Cicloid has joined #ruby
Dreamer3 has quit [Ping timeout: 276 seconds]
Morkel has quit [Ping timeout: 268 seconds]
Morkel_ is now known as Morkel
<crocket> "Fetching gem metadata from http://rubygems.org/.." fails
jenrzzz has joined #ruby
hotovson_ has joined #ruby
<crocket> "bundle install" installs nothing due to that failure.
dekroning has joined #ruby
rtl has joined #ruby
Cicloid has quit [Ping timeout: 265 seconds]
<crocket> I keep seeing "Enter your password to install the bundled RubyGems to your system:"
rippa has quit [Ping timeout: 260 seconds]
a_a_g has quit [Quit: Leaving.]
g-ram has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
<shevy> hehe
<shevy> one day we all have overcome bundler
difrezio has joined #ruby
<shevy> jumpingcloud did you use another language before ruby?
cezar has joined #ruby
<jumpingcloud> shevy: not really. qbasic =)
difrezio has left #ruby [#ruby]
<shevy> hmm
<shevy> last time I used BASIC was... on atari? commodore? I dont remember... there was this fat manual and I typed in stuff like
thinkdevcode has joined #ruby
<shevy> 30 goto 20
<shevy> man this was fun
dylanjha has quit [Quit: Leaving...]
noxoc has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
eboaz has joined #ruby
hoelzro|away is now known as hoelzro
cezar has quit [Client Quit]
vjt has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 244 seconds]
<jumpingcloud> i like bash too, and i can speak that pretty okay.
djdb has joined #ruby
fantazo has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
yxhuvud has quit [Ping timeout: 255 seconds]
lolmaus has joined #ruby
zmo_ has joined #ruby
zommi has joined #ruby
Juul has quit [Ping timeout: 255 seconds]
chriskk has quit [Quit: chriskk]
filipe has joined #ruby
margle has joined #ruby
chichou has joined #ruby
justinmcp has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 252 seconds]
<shevy> I need to replace bash one day
LucidDreamZzZ has quit [Remote host closed the connection]
LucidDreamZzZ has joined #ruby
Takehiro_ has joined #ruby
jeff_sebring has quit [Quit: Leaving]
k611 has joined #ruby
<hoelzro> shevy: with?
vjt has joined #ruby
Cicloid has joined #ruby
vlad_starkov has joined #ruby
wallerdev has quit [Quit: wallerdev]
<shevy> hoelzro some kind of shell that optionally also allows one to use ruby syntax
<hoelzro> embed Ruby into bash, then ;)
chendo_ has quit [Ping timeout: 240 seconds]
nyrb has joined #ruby
<RubyPanther> I used to keep a page of notes for each program with a list of the line numbers for each chunk of code... kindof like a method, but without a name or a clear border... 5000-5099 refresh player sprite 5500-5599 refresh monster sprite 6000-6999 background music
Cicloid has quit [Ping timeout: 244 seconds]
<RubyPanther> If you don't anticipate code growth and leave enough room for line numbers, you'll have to on a renumbering adventure
wmoxam has joined #ruby
haxrbyte has joined #ruby
chriskk has joined #ruby
chendo_ has joined #ruby
morf has joined #ruby
<RubyPanther> they say it causes brain damage, but how would one ever know?
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
hbpoison has joined #ruby
LouisGB has joined #ruby
robustus has joined #ruby
a_a_g has joined #ruby
workmad3 has joined #ruby
vlad_starkov has quit [Ping timeout: 244 seconds]
heftig has quit [Quit: leaving]
justinmcp has joined #ruby
Elhu has joined #ruby
k0nichiwa has quit [Ping timeout: 252 seconds]
Virunga has joined #ruby
JonnieCache has quit [Ping timeout: 265 seconds]
blacktulip has joined #ruby
fantazo has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
nemesit has joined #ruby
jimeh has joined #ruby
flype has joined #ruby
zigomir has joined #ruby
charliesome has joined #ruby
JohnBat26 has joined #ruby
therod has joined #ruby
lkba has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Cicloid has joined #ruby
hamed_r has joined #ruby
ryanf has quit [Quit: leaving]
kramutils has joined #ruby
Cicloid has quit [Ping timeout: 240 seconds]
therod has quit [Quit: Leaving...]
<clocKwize> RubyPanther, that sounds awesome.
thecreators has quit [Quit: thecreators]
bradleyprice has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
dakine has quit [Quit: Leaving]
<RubyPanther> clocKwize: and even better, the background music would be a series of POKE commands with the memory addresses (on the sound ROM) of the different commands
dakine has joined #ruby
adambeynon has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
<RubyPanther> And if, for some reason, you want to introspect the graphics, you can always PEEK at a memory address in the video ROM to get back a pixel value...
Axsuul has quit [Ping timeout: 248 seconds]
Johan2 has joined #ruby
h4mz1d has joined #ruby
marius has quit []
Johan2 has left #ruby [#ruby]
leoncamel has joined #ruby
manizzle has quit [Ping timeout: 268 seconds]
elaptics`away is now known as elaptics
<clocKwize> RubyPanther, you should have considered using a framework like cocoa2d ;)
berserkr has joined #ruby
shtirlic has joined #ruby
<RubyPanther> I guess we just didn't have a ROM for it
slainer68 has joined #ruby
<RubyPanther> the Apple ][e did have some large number of expansion slots, but I never saw anything go into one... even the external HD went into the parallel port.
allyraza has joined #ruby
h4mz1d has quit [Ping timeout: 244 seconds]
mtkd has quit [Quit: closed]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
bluOxigen has joined #ruby
marius has joined #ruby
<crocket> rake is so slow that I want to rake it.
<crocket> I want to rake it so hard.
haxrbyte has quit [Ping timeout: 265 seconds]
whaley has joined #ruby
icooba has quit [Quit: Computer has gone to sleep.]
Ivo has joined #ruby
hron84 has joined #ruby
Slivka has joined #ruby
marius has quit [Client Quit]
xorgnak has quit [Remote host closed the connection]
monkegjinni has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
manizzle has joined #ruby
Cicloid has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
allyraza has quit [Ping timeout: 244 seconds]
baphled has joined #ruby
skum has joined #ruby
Cicloid has quit [Ping timeout: 255 seconds]
MrSamuel has joined #ruby
<MrSamuel> Question: Rakefile vs rakefile.rb - which one and why?
MrSamuel has left #ruby [#ruby]
MrSamuel has joined #ruby
<crocket> Why is it so slow to start a ruby process?
timonv has joined #ruby
workmad3 has joined #ruby
<crocket> python and php scripts are so fast.
<MrSamuel> crocket: what version of ruby are you using?
<crocket> 1.9.3
timmow has joined #ruby
<MrSamuel> crocket: I found 1.9.3 quite fast
<MrSamuel> how are you measuring speed?
<MrSamuel> can I test it on my system?
<crocket> MrSamuel, It was because several thousands of lines had to be executed before a simple task began.
anderse has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wmoxam has quit [Ping timeout: 252 seconds]
<MrSamuel> crocket: where did those lines come from?
<MrSamuel> did you require some external libraries?
robotmay has joined #ruby
<crocket> MrSamuel, A rake job in RoR program, which is chiliproject.
wmoxam has joined #ruby
_rob_ has joined #ruby
<MrSamuel> I guess rake will be a small-medium overhead
d2dchat has quit [Remote host closed the connection]
wmoxam has quit [Read error: Operation timed out]
Progster has joined #ruby
Xeago has joined #ruby
_rob_ has quit [Quit: 离开]
wmoxam has joined #ruby
Cicloid has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
LouisGB has quit [Ping timeout: 264 seconds]
Mon_Ouie has joined #ruby
darthdeus has joined #ruby
darthdeus has quit [Client Quit]
Takehiro_ has quit [Remote host closed the connection]
darthdeus has joined #ruby
Hanmac has joined #ruby
Progster has quit [Ping timeout: 240 seconds]
Cicloid has quit [Ping timeout: 255 seconds]
skcin7 has joined #ruby
mklappstuhl has joined #ruby
Beoran_ has quit [Ping timeout: 244 seconds]
chriskk has quit [Quit: chriskk]
und3f has joined #ruby
postmodern has quit [Quit: Leaving]
hotovson_ has quit [Remote host closed the connection]
Iszak has joined #ruby
ephemerian has joined #ruby
armenb has quit [Ping timeout: 260 seconds]
heftig has joined #ruby
roadt has joined #ruby
zeromodulus has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 245 seconds]
darthdeus has quit [Quit: Leaving...]
nari_ has quit [Ping timeout: 260 seconds]
roadt has left #ruby [#ruby]
roadt has joined #ruby
sepp2k has joined #ruby
Beoran_ has joined #ruby
cdt has joined #ruby
shtirlic has quit [Remote host closed the connection]
shtirlic has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
darthdeus has joined #ruby
vlad_starkov has joined #ruby
jumpingcloud has quit [Ping timeout: 255 seconds]
Cicloid has joined #ruby
armenb has joined #ruby
arturaz has joined #ruby
araujo has joined #ruby
nari_ has joined #ruby
jamesaxl has quit [Read error: No route to host]
coffer has joined #ruby
freeayu has joined #ruby
kil0byte has joined #ruby
Cicloid has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby
jgrevich has quit [Quit: jgrevich]
mukesh-rk has joined #ruby
xpen_ has quit [Remote host closed the connection]
bluenemo has joined #ruby
chriskk has joined #ruby
armenb has quit [Ping timeout: 256 seconds]
bier has quit [Ping timeout: 248 seconds]
Slivka has quit [Read error: Connection reset by peer]
armenb has joined #ruby
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
JonnieCache has joined #ruby
Slivka has joined #ruby
<mukesh-rk> hi guys i want to knw wht does the colon means in this line in the user model before_save :create_rem_token where create_rem_token is a fn to create a remember toker for the user.
<hoelzro> mukesh-rk: :create_rm_token is a symbol
<JonnieCache> whats everyones opinon on the ruby 2.0 feature freeze then?
<hoelzro> symbols have many uses; one of them is to specify a message to send
d3vic3 has joined #ruby
<hoelzro> (ie. method invocation)
<Xeago> JonnieCache: could you link to a resource?
<banisterfiend> JonnieCache: really annoyed if they didnt push a debugging API
<hoelzro> ex. 3.send :to_s
<JonnieCache> banisterfiend: theres a replacement for set_trace_func
<JonnieCache> banisterfiend: i think youre getting your wish
<JonnieCache> tenderlove posted some stuff here: http://news.ycombinator.com/item?id=4695834
<JonnieCache> banisterfiend: heres the stuff thats relevant to pry: https://bugs.ruby-lang.org/issues/6895
haxrbyte has joined #ruby
Asher has quit [Ping timeout: 248 seconds]
armenb has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
<banisterfiend> JonnieCache: we were already using the C API for that anyway, so it's not really a game changer for us (though is cool it's not exposed to plain ruby). What i really want is a way of doing bindnig_of_caller
haxrbyte has joined #ruby
<banisterfiend> they hid a number of the functions i was relying on in 1.9.3
Asher has joined #ruby
zz_chrismcg is now known as chrismcg
<banisterfiend> JonnieCache: this: http://www.ruby-forum.com/topic/4406887#new
<JonnieCache> so youre saying 2.0 will actually make pry harder?
<Hanmac> hoelzro for something funny like this? [2,3,4].map(&10.method(:to_s))
<mukesh-rk> hoelzro: so. 3.send :to_s is same as of 3.to_s??
Asher2 has joined #ruby
armenb has joined #ruby
<hoelzro> mukesh-rk: basically, yes
<banisterfiend> JonnieCache: yes, currently it looks like stack_explorer and pry-rescue, and things like that will be significantly crippled
<hoelzro> mukesh-rk: so what before_save probably does is store a list of messages to send to an object before a save operation
<JonnieCache> fuck
<JonnieCache> well its only a feature freeze
<Hanmac> banisterfiend hm you could try to anoy the guys at #ruby-dev ... maybe they are more helpful then we ...
<JonnieCache> maybe there should be a list of bug reports that pry supporters should be nagging on :)
<banisterfiend> Hanmac: it seems emtpy :P
<banisterfiend> JonnieCache: any idea where i find the ruby bug tracker? hehe
<mukesh-rk> hoelzro: a hash??
<banisterfiend> ah found it
dangerousdave has joined #ruby
<Hanmac> banister hm it was #ruby-lang
<hoelzro> mukesh-rk: what about a hash?
Asher has quit [Ping timeout: 240 seconds]
Rydefalk has quit [Read error: Connection reset by peer]
* Hanmac looks into this bookshelf for a book named "about a hash" :P
manizzle has quit [Ping timeout: 244 seconds]
<JonnieCache> banisterfiend: https://bugs.ruby-lang.org ?
Rydefalk has joined #ruby
armenb has quit [Remote host closed the connection]
<JonnieCache> is there much uptake of pry in japan?
armenb has joined #ruby
tk__ has joined #ruby
<banisterfiend> JonnieCache: i saw a lulzy tweet by a ruby core contributor the other day that speaks a bit to the issue
<banisterfiend> JonnieCache: i think we have a fairly big user base, but i dont think ruby core are using it, so they're unlikely to do us any favors
irleif has joined #ruby
kdridi has quit [Quit: This computer has gone to sleep]
<banisterfiend> JonnieCache: can u think of an issue title that is likely to get attention? they just ignored my last one
<banisterfiend> which was maybe a bit obscure :P "rb_vm_make_env_object function now inaccessible in ruby 2.0"
<banisterfiend> hehe
kdridi has joined #ruby
mukesh-rk has quit [Ping timeout: 244 seconds]
kdridi has quit [Client Quit]
Cicloid has joined #ruby
<Hanmac> maybe they did it on purpose to destroy pry? :D
mukesh-rk has joined #ruby
<banisterfiend> it doesn't destroy us it just makes us a lot less cool
darthdeus has quit [Quit: Leaving...]
banisterfiend has quit [Read error: Connection reset by peer]
tonini has quit [Remote host closed the connection]
Cicloid has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
heftig has quit [Quit: leaving]
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
irleif has quit [Quit: Computer has gone to sleep.]
heftig has joined #ruby
tre has joined #ruby
tre is now known as liquidangle
eataix has joined #ruby
eataix has quit [Excess Flood]
irleif has joined #ruby
eataix has joined #ruby
carlzulauf has quit [Ping timeout: 252 seconds]
darthdeus has joined #ruby
carlzulauf has joined #ruby
chussenot has joined #ruby
mukesh-rk has quit [Ping timeout: 244 seconds]
thinkdevcode has quit [Remote host closed the connection]
Ivo has quit [Quit: WeeChat 0.3.9]
darthdeus has quit [Client Quit]
mfridhfreenode is now known as mfridh
Ivo has joined #ruby
mukesh-rk has joined #ruby
Slivka has quit [Quit: Slivka]
Slivka has joined #ruby
mukesh-rk has left #ruby [#ruby]
<JonnieCache> erm, i dont really know much about the politics of open source
nemesit|osx has joined #ruby
<JonnieCache> maybe you could state it in terms of the specific functionality youre losing out on
lkba has joined #ruby
<JonnieCache> so, "ruby 2.0 breaks support for advanced debugging tools"
<JonnieCache> its just a question of exposed interfaces isnt it? so it isnt a massive change we're asking for
chriskk has quit [Quit: chriskk]
<workmad3> banisterfiend: heh :) you could fork ruby's build and add in a new '--with-pry-support' flag that enables the interfaces you want :D
<JonnieCache> that wont cause any controversy :)
Slivka has quit [Client Quit]
Slivka has joined #ruby
<workmad3> JonnieCache: none... none at all :P
<kalleth> i like pry :(
<workmad3> kalleth: so just always build your ruby with pry support!
nemesit has quit [Ping timeout: 252 seconds]
* workmad3 will stop trolling now
<JonnieCache> banisterfiend: got a link to the bug that got ignored?
<kalleth> it just magically works
<kalleth> right now
<kalleth> but this is 2.0-speak, right?
<JonnieCache> yes
<kalleth> also, i just did a masterfull troll in #-lang
<banisterfiend> JonnieCache: http://www.ruby-forum.com/topic/4406887#new
Ivo has quit [Quit: WeeChat 0.3.9]
Ivo has joined #ruby
<JonnieCache> hmm i really want to use scrypt but the ruby binding is unmaintained :(
<JonnieCache> banisterfiend: thats a mailing list post rather than a bug so maybe the next step is to make a bug
<banisterfiend> JonnieCache: yeah that's what im doing now
<JonnieCache> banisterfiend: gist a draft and we can all impove it together
<clocKwize> banisterfiend, as per your second post - can't you find where ruby_debug uses those symbols, then see what the 2.0 version of ruby_debug uses?
robertotauille has joined #ruby
<banisterfiend> clocKwize: ruby-debug is a 3rd party project, it's not maintained by ruby core
<banisterfiend> clocKwize: and like when 1.9.3 came out, i assume ruby-debug is also broken on 2.0
<clocKwize> oh, I see
<banisterfiend> ruby-debug / debugger
<clocKwize> yeah
<clocKwize> I think debug support is a top priority and should be part of the ruby core, not a third party project
Cicloid has joined #ruby
<banisterfiend> clocKwize: ruby does have a built in debugger but it's a bit shit
<JonnieCache> more than a bit
<clocKwize> yeah
<clocKwize> so shit nobody uses it
<banisterfiend> debugger & pry are a little more adventurous
<clocKwize> therefore it doesn't exist :p
<clocKwize> if a tree falls and all that..
amoe has quit [Read error: Connection reset by peer]
<clocKwize> still like 80% of ruby coders I speak to don't use debugger
<clocKwize> it amazes me how they get anything done
<JonnieCache> yeah i often think that
amoe has joined #ruby
<banisterfiend> clocKwize: do you use a debugger?
<JonnieCache> a staggering portion of programmers dont know how to use a debugger properly, or at all
<clocKwize> banisterfiend, yes
bier has joined #ruby
<JonnieCache> even in industry
<banisterfiend> clocKwize: just 'debugger' or 'pry' ?
<clocKwize> debugger
<clocKwize> I didn't know pry existed until you kept talking about it :p
<clocKwize> haven't used it yet
<banisterfiend> ah, ok..
<clocKwize> but it looks good
<banisterfiend> it's a slightly different concept to 'debugger', but (with plugins) it provides the same features
<ninegrid> I'm having a problem with Capybara-webkit and Cucumber wherein I have a simple Scenario (that I did put @javascript above) that tests some basic jQuery. However when I run Cucumber I get the error: undefined|0|ReferenceError: Can't find variable: $
hamed_r has quit [Quit: Leaving]
Cicloid has quit [Ping timeout: 244 seconds]
jamesaxl has joined #ruby
<ninegrid> Which confuses me greatly because I cannot find any answers on SO or they Capybara group... I'm using Rails 3.2.8 on archlinux
tvw has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
<ninegrid> My guess is that Capybara-webkit is not loading jquery through the asset pipeline but I have no idea how to verify this, any advice would be greatly appreciated
banisterfiend has quit [Read error: Connection reset by peer]
codecaster has joined #ruby
<codecaster> Hi all
<codecaster> is there a way to add a development dependency to a gemspec based on the ruby platform?
<codecaster> I am developing a lib that depends on mongoid, but if you are using 1.9.2 you can't use mongoid 3.X
Mon_Ouie has quit [Ping timeout: 244 seconds]
pskosinski has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
whaley has quit [Remote host closed the connection]
banisterfiend has joined #ruby
samphippen has joined #ruby
<banisterfiend> JonnieCache: draft
amoe_ has joined #ruby
amoe has quit [Ping timeout: 248 seconds]
<banisterfiend> JonnieCache: ok to post?
<banisterfiend> anyone else have feedback?
dakine has quit [Ping timeout: 240 seconds]
whaley has joined #ruby
<workmad3> banisterfiend: 'Can you please inform me where I can ...' rather than 'Can you please inform me of where I can ...'
mucker has joined #ruby
<clocKwize> banisterfiend, add "bitches" to the end
<JonnieCache> how many users does pry have?
<JonnieCache> im just writing some changes
fermion has joined #ruby
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
<JonnieCache> i want to put a bit in saying "we have 100k users and this project is important to many developers so basically you should help us out"
banister_ has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
<banister_> JonnieCache: dc, did u get the link?
<JonnieCache> yeah
<JonnieCache> banister_: do you have an estimate of how many users pry has?
<banister_> JonnieCache: we have 750K gem downloads
<banister_> not sure how many users that translates to
<JonnieCache> some fraction of that obviously
<JonnieCache> 100k maybe?
zaki[] has quit [Read error: Operation timed out]
<banister_> could be
helichopter has quit [Ping timeout: 240 seconds]
amoe has joined #ruby
<banister_> JonnieCache: so should i post it as-is ?
whaley has quit [Remote host closed the connection]
k611 has quit [Ping timeout: 248 seconds]
amoe_ has quit [Ping timeout: 260 seconds]
whaley has joined #ruby
Cicloid has joined #ruby
whaley has quit [Ping timeout: 256 seconds]
<Poapfel> is it possible to do get the value of an element in a array.each_index block?
darthdeus has joined #ruby
<heftig> Poapfel: array.each_with_index
<banister_> Poapfel: or just: array[index]
<Poapfel> ah yeah
<Poapfel> that was obvious :3
Cicloid has quit [Ping timeout: 244 seconds]
vectorshelve has joined #ruby
<banister_> Poapfel: which one? eah_with_index or array[index] ?
slainer68 has quit [Remote host closed the connection]
nari_ has quit [Ping timeout: 260 seconds]
zaki[] has joined #ruby
whaley has joined #ruby
<banister_> JonnieCache: posted http://bugs.ruby-lang.org/issues/7214
<Poapfel> banister_: array[index] ;)
kil0byte_ has joined #ruby
<banister_> ah ok
kil0byte has quit [Ping timeout: 245 seconds]
flype has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
kendosan has joined #ruby
<kendosan> can ruby be used as bash ?
Cicloid has joined #ruby
<kendosan> for example, im using bash to do ffmpeg encoding , can i use ruby to do the same thing ? which is faster bash or ruby
<codecaster> Gonna add more engines in a bit
ltsstar has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
JonnieCache has quit [Ping timeout: 252 seconds]
Asher2 has quit [Quit: Leaving.]
Asher has joined #ruby
Cicloid has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
niklasb has joined #ruby
hotovson has joined #ruby
banister_ has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
<elliot98> what's the way to use subsequencing () in =~?
<elliot98> one can do "123456"[/12(.*)/,1] but how does one do if "123456" =~ /12(.*)/,1 ?
bigmcq77 has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
slainer68 has quit [Ping timeout: 244 seconds]
icooba has joined #ruby
irleif has joined #ruby
icooba has quit [Client Quit]
icooba has joined #ruby
carlzulauf has quit [Ping timeout: 246 seconds]
carlzulauf has joined #ruby
arietis has joined #ruby
fermion has quit [Read error: Operation timed out]
sertaconay has joined #ruby
demian`_ has joined #ruby
areil_ has joined #ruby
chussenot has joined #ruby
<clocKwize> it would be awesome if you could tell ruby debugger to break on unhandled errors
areil has quit [Ping timeout: 244 seconds]
Cicloid has joined #ruby
<Hanmac> elliot98: $1 or better: /12(?<value>.*)/ =~ "123456" ? value : nil
tpe11etier has quit [Ping timeout: 244 seconds]
daniel_- has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
Ruler_Of_Heaven_ is now known as pipopopo
workmad3 has quit [Ping timeout: 240 seconds]
k610 has joined #ruby
zomgbie has joined #ruby
Cicloid has quit [Ping timeout: 240 seconds]
codefyre has joined #ruby
zmo_ has quit [Ping timeout: 276 seconds]
havenn has quit [Remote host closed the connection]
bbttxu has joined #ruby
dakine has joined #ruby
a_a_g has quit [Quit: Leaving.]
zomgbie has quit [Quit: leaving]
kaawee has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<elliot98> Hanmac: where does the $1 go?
<shevy> elliot98 it is automatically assigned always
<shevy> for regex () capture matches
<shevy> if you need to use it in the .gsub, you usually can do "\\1"
<shevy> or "\1" i dont remember offhand :\
<shevy> or, in the block form of .gsub ...
<clocKwize> use of any $ varaibles makes me feel a bit sick
jimeh has quit [Ping timeout: 240 seconds]
<clocKwize> I compare it to baby rape
<shevy> "hello".gsub(/./) {|s| s.ord.to_s + ' '} # => "104 101 108 108 111 "
<shevy> lol baby rape?
<clocKwize> baby rape isn't funny shevy.
<clocKwize> and neither is $
<shevy> that's a strong comparison
<clocKwize> brb, reboot
<shevy> $1 is there to be used
iamjarvo has joined #ruby
<shevy> just like other global variables, it sucks
<Hanmac> clockwize that why i said /12(?<value>.*)/ =~ "123456" ? value : nil is more cool
<shevy> and it's not there to stay for long, so it should be used quickly, or not
clocKwize has quit [Remote host closed the connection]
<Hanmac> shevy the bigger problem, $1-$9 only looks global but they arent ... they are kindof local
undersc0re97 has quit [Quit: i use linux l o l]
<shevy> they are cheaters
jimeh has joined #ruby
haxrbyte_ has joined #ruby
haxrbyte has quit [Ping timeout: 244 seconds]
<shevy> if I would make a new ruby like language
<shevy> I'd probably simplify the hell out of it
kendosan has quit [Quit: Leaving]
codecaster has quit [Read error: Connection reset by peer]
<shevy> no @@, semi-global variables residing in namespaces, no class vs. module distinction
<shevy> though I probably wont use $ for globals
<shevy> hmm
<shevy> won't work... if one wants features, one needs syntax :(
beiter has joined #ruby
codecaster has joined #ruby
xorigin has joined #ruby
kaawee has quit [Read error: Connection reset by peer]
clocKwize has joined #ruby
samphippen has joined #ruby
nanderoo has joined #ruby
carloslopes has joined #ruby
darthdeus has quit [Quit: Leaving...]
daniel_- has quit [Ping timeout: 244 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
areil_ has quit []
Cicloid has joined #ruby
djbpython has quit [Ping timeout: 244 seconds]
rkneufeld has joined #ruby
ltsstar has quit [Ping timeout: 240 seconds]
darthdeus has joined #ruby
Cicloid has quit [Ping timeout: 255 seconds]
slainer68 has joined #ruby
ephemerian has quit [Quit: Leaving.]
yshh has quit [Remote host closed the connection]
Zai00 has joined #ruby
bigmcq77 has joined #ruby
noxoc has quit [Ping timeout: 245 seconds]
mark_locklear has joined #ruby
havenn has joined #ruby
bigmcq77 has quit [Client Quit]
codecaster has left #ruby [#ruby]
andrewh has quit [Quit: Lost terminal]
rkneufeld has quit [Quit: Computer has gone to sleep.]
Astral has joined #ruby
zmo_ has joined #ruby
Astral is now known as Guest18807
Astral_ has quit [Ping timeout: 246 seconds]
irleif has joined #ruby
AndrzejKrzywda has left #ruby [#ruby]
Takehiro has joined #ruby
ly_gs has joined #ruby
daniel_- has joined #ruby
haxrbyte has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
sertaconay has quit [Read error: Connection reset by peer]
jrist-afk is now known as jrist
PapaSierra has joined #ruby
zomgbie has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
ttt has quit [Remote host closed the connection]
[Neurotic] has quit [Remote host closed the connection]
haxrbyte_ has quit [Ping timeout: 246 seconds]
Uranio has joined #ruby
Elhu has joined #ruby
bryan has joined #ruby
Cicloid has joined #ruby
ablankfield has joined #ruby
bryan is now known as Guest71353
noxoc has joined #ruby
zomgbie has quit [Ping timeout: 244 seconds]
nyrb has quit [Ping timeout: 276 seconds]
liquidangle has left #ruby [#ruby]
v0n has joined #ruby
sterNiX has joined #ruby
Cicloid has quit [Ping timeout: 265 seconds]
nyrb has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
Guest71353 has quit [Ping timeout: 264 seconds]
<withnale> is there a valid syntax similar to this: 'b=a || raise ArgumentError' ?
<mr-rich> rking: good morning ... sorry, went to bed last night ... my brain hurt.
ablankfield has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
<heftig> withnale: b=a || raise(ArgumentError)
<withnale> cool. thanks
roadt` has joined #ruby
Uranio has quit [Read error: Connection reset by peer]
roadt has quit [Ping timeout: 244 seconds]
rkneufeld has joined #ruby
answer_42 has quit [Ping timeout: 276 seconds]
Cultofmetatron has joined #ruby
ojongerius has left #ruby [#ruby]
Cultofmetatron has quit [Remote host closed the connection]
havenn has joined #ruby
freeayu has quit [Ping timeout: 260 seconds]
freeayu has joined #ruby
RJ3000_ has joined #ruby
<mr-rich> rking: whenever you wake up, I have a question or two ...
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
ffranz has joined #ruby
khoa has joined #ruby
gaara has joined #ruby
ltsstar has joined #ruby
<khoa> gaara: sup
xorigin has quit [Ping timeout: 272 seconds]
arielpts has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
xorigin has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Ping timeout: 244 seconds]
haxrbyte_ has joined #ruby
gaara has left #ruby [#ruby]
Cicloid has joined #ruby
gaara has joined #ruby
ABK has quit [Read error: Connection reset by peer]
sailias has joined #ruby
Uranio has joined #ruby
invisime has joined #ruby
workmad3 has joined #ruby
invisime has left #ruby [#ruby]
gaara has left #ruby [#ruby]
invisime has joined #ruby
havenn has quit [Ping timeout: 244 seconds]
haxrbyte has quit [Ping timeout: 244 seconds]
gaara has joined #ruby
gaara has left #ruby [#ruby]
<rakl> Can someone explain what this is doing Hash[*{1=>"1"}.to_a.flatten]
<khoa> gaara: bam
<rakl> I don't understand the Hash[*] part
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iPhoneMRZ has joined #ruby
khoa has quit [Read error: Operation timed out]
gaara has joined #ruby
<Hanmac> hm the * is currently not needed Hash[{1=>"1"}.to_a] works too
khoa has joined #ruby
Cicloid has quit [Ping timeout: 255 seconds]
<Politoed> rakl: Hash[k1,v1,k2,v2,..] yields {k1=>v1, k2=>v2, ...}
<rakl> it just takes alternate elements?
<rakl> to make keys and vals?
<Politoed> yeah
beiter has left #ruby [#ruby]
yshh has joined #ruby
sotu has joined #ruby
<invisime> which is equivalent to Hash[*[1, "1"]]
<rakl> and does the * do theoretically?
JonnieCache has joined #ruby
<Hanmac> * is the splat operator which turns an array into an list of arguments
sotu has quit [Client Quit]
<invisime> so it becomes the same as Hash[1,"1"]
<rakl> hmm, ok
samphippen has joined #ruby
<invisime> <3 splats.
chichou has joined #ruby
<rakl> I will leave it in then for now if it is not making a different. <3 legacy code
<rakl> s/ent/ence
arielpts has joined #ruby
arielpts has quit [Excess Flood]
<gaara> good to know, Hash[*[1, 2, 3, 4]] => {1=>2, 3=>4}
arielpts has joined #ruby
arielpts has quit [Excess Flood]
<Hanmac> gaara: Hash[1, 2, 3, 4] works too
iPhoneMRZ has quit [Client Quit]
arielpts has joined #ruby
arielpts has quit [Excess Flood]
<Hanmac> where you need the *: Hash[{1=>"1"}.to_a.flatten.reverse] works not, Hash[*{1=>"1"}.to_a.flatten.reverse] works
ly_gs has left #ruby ["Leaving..."]
arielpts has joined #ruby
arielpts has quit [Excess Flood]
arielpts has joined #ruby
arielpts has quit [Excess Flood]
cantonic_ has joined #ruby
arielpts has joined #ruby
geekbri has joined #ruby
digitalcakestudi has joined #ruby
<invisime> Hanmac: why does it work with some arrays there without a splat but not others?
wallerdev has joined #ruby
digitalcakestud1 has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
<invisime> [1,"1"].flatten.reverse.class and [1,"1"].flatten.class are both just Array.
Guest18807 has quit [Ping timeout: 245 seconds]
<Hanmac> it seems to be some kind of syntax magic
cantonic has quit [Ping timeout: 268 seconds]
cantonic_ is now known as cantonic
Astral has joined #ruby
<invisime> Hanmac: if you assign either to a variable first, you need the splat in both cases.
awarner has joined #ruby
Astral is now known as Guest4864
nari_ has joined #ruby
digitalcakestudi has quit [Ping timeout: 252 seconds]
<Hanmac> yeah ... then the ruby parser is kind to you :P
adamjleonard has joined #ruby
<invisime> what a weird thing for a parser to do.
Bdawk_ has joined #ruby
jeffreybaird has joined #ruby
Gonzih has quit [Quit: WeeChat 0.3.5]
<Hanmac> invisime: look that this: /12(?<value>.*)/ =~ "123456" ? value : nil
Gonzih has joined #ruby
* invisime shrugs.
<invisime> that doesn't seem surprising.
g-ram has joined #ruby
<Hanmac> when you use regex-literal =~ something it does assign local variables ... it does not work with regex-value =~ something :D
<Hanmac> and it does not work with string =~ regex
kil0byte has joined #ruby
flype has joined #ruby
<invisime> oh, so if the left-hand side of that example were a variable or a stringified regex, it would return nil? o_O
GoGoGarrett has joined #ruby
khoa has quit [Read error: Connection timed out]
<Hanmac> better: "123456" =~ /12(?<value>.*)/ ? value : nil raises an NameError :D
<Hanmac> while /12(?<value>.*)/ =~ "123456" ? value : nil works
irleif has joined #ruby
kil0byte_ has quit [Ping timeout: 248 seconds]
<invisime> that's kind of just the same example though, since the =~ is a method on the lefthand side.
hbpoison has quit [Read error: Connection reset by peer]
<Morkel> I have a problem with carrierwave. When i click on delete carrierwave dont delete the file it sets it to nil in the db
<invisime> but it means that regexp-literals are a different class under the hood, right? am I going insane about how ruby works, Hanmac?
khoa has joined #ruby
<darthdeus> any idea how can I get to my gempath in rbenv? something similar to rvm gemdir?
<Hanmac> this raises an NameError too: regex=/12(?<value>.*)/;regex =~ "123456" ? value : nil
<Hanmac> invisime regexp-literals are no extra class but have extra magic :D
<darthdeus> i'm looking for a solution to generate ctags for all of my gems
<invisime> ಠ_ಠ
<Morkel> darthdeus: you can do this with xargs
jcaudle has joined #ruby
<Morkel> darthdeus: bundle show --paths | xargs ctags -R
<Hanmac> invisime its the same when you use regex-literals in an case ... when //; end code
hbpoison has joined #ruby
answer_42 has joined #ruby
Cicloid has joined #ruby
Morkel has quit [Quit: Morkel]
<Poapfel> what is the most simple way to convert a array with the elements ["foo", "bar"] to a string with the content foobar?
ShiintoRyuu has joined #ruby
<Poapfel> string = ""; array.map { |e| string = string + e }.last would work but it is really dirty
Cultofmetatron has joined #ruby
<Hanmac> Poapfel did you look at the methods Array has?
<dekroning> is there a way to drop into a pry shell when I get a NoMetherError or something? or exception?
<Hanmac> what about join?
<Poapfel> Hanmac: well .to_s is not doing this kind of thing
thisirs has joined #ruby
joofsh has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
<Poapfel> Hanmac: ah totaly forgot that this methods exists *facepalm*
<darthdeus> Morkel: cool thanks, any idea how to add my own app's kode to this?
cdzombak has joined #ruby
<darthdeus> code*
adamjleonard has quit [Quit: Leaving...]
Cicloid has quit [Ping timeout: 246 seconds]
hbpoison_ has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
chichou has quit [Remote host closed the connection]
adamjleonard has joined #ruby
tpe11etier has joined #ruby
awarner has quit [Remote host closed the connection]
dmerrick has joined #ruby
mmitchell has joined #ruby
d3vic3 has quit [Ping timeout: 255 seconds]
Welington has joined #ruby
<Poapfel> let's say I have an array in an array e.g [["foo", "bar"], ["bla", "blu"]] and I want to insert a \n betweet 'bar' and 'bla' is this possible with the join method?
irleif has quit [Quit: Computer has gone to sleep.]
<Poapfel> because when I run .join("\n") that it also inserts a \n between foo, bar, bla and blu
d3vic3 has joined #ruby
rabidpraxis has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
<hoelzro> Poapfel: so you want "foo bar\nbla blu"?
<Poapfel> yes
<hoelzro> array.map { |a| a.join(' ') }.join("\n")
<hoelzro> I *think* that would do it.
iamvery has joined #ruby
workmad3 has joined #ruby
carlzulauf has quit [Ping timeout: 264 seconds]
gauloises has joined #ruby
<Poapfel> hoelzro: yep, it does - thanks
kaawee has joined #ruby
daniel_- has joined #ruby
hbpoison_ has quit [Ping timeout: 264 seconds]
_kW has joined #ruby
havenn has quit [Ping timeout: 244 seconds]
_kW is now known as Guest85651
chussenot has quit [Quit: chussenot]
khoa has quit [Read error: Connection timed out]
krofna has joined #ruby
hbpoison has joined #ruby
carlzulauf has joined #ruby
shtirlic has quit [Remote host closed the connection]
haxrbyte_ has quit [Remote host closed the connection]
kaawee has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
krofna has left #ruby ["Leaving"]
hydra__ has joined #ruby
chussenot has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
irleif has joined #ruby
darthdeus has quit [Quit: Leaving...]
Dreamer3__ has joined #ruby
<hydra__> Hi. I'm using soap/wsdlDriver and I need to override it's http client current behaviour in such way that server ssl certificate is not validated. Is it possible?
philcrissman has joined #ruby
<Xeago> hydra__: you're better off adding the certificate in question to your CA list
nadirvardar has joined #ruby
<invisime> also, the answer is yes, it's possible.
<invisime> mmm, monkey-patching. ;-)
<hydra__> Xeago: looks good. Do you know where ruby reads that list from?
<Xeago> OS, I reckon
<hydra__> invisime: do you mean by modifying the original file?
<Xeago> monkeypatching implies opening the class/module at runtime and changing it
Virunga has quit [Remote host closed the connection]
<invisime> hydra__: no, I mean by overriding their definition of some important function from within your code. aka monkey patching. what Xeago said.
<orion> Hi. I am trying to run a large Ruby application in a VM. If I get random bus errors, does that mean that the resources of my VM are not sufficient enough to run the application?
ffranz has quit [Quit: Leaving]
Virunga has joined #ruby
Welington has quit [Quit: Saindo]
bgy has joined #ruby
Vert has joined #ruby
<invisime> and no, it wasn't a serious suggestion. it's just that you asked if it were possible. because of monkey patching, damn near anything is possible. it just doesn't also imply that it's a good idea. :-P
<bgy> hi
<hydra__> cool. although i'll try your suggestion, Xeago
Welington has joined #ruby
<invisime> orion: it could mean that. it could also mean that your program is doing something weird.
xpen has joined #ruby
<bgy> i'm getting rake aborted! can't activate activesupport-3.2.8, already activated activesupport-2.3.5 any ideas?
iamvery has quit [Remote host closed the connection]
ffranz has joined #ruby
<mr-rich> rking: ping
gaara has quit [Quit: gaara]
nitti has joined #ruby
aisbaa has quit [Quit: Lost terminal]
nopolitica has joined #ruby
Cicloid has joined #ruby
theRoUS has joined #ruby
<Hanmac> bgy ask at #rubyonrails
nopolitica has quit [Client Quit]
nopolitica has joined #ruby
Cicloid_ has joined #ruby
Cicloid has quit [Read error: Connection reset by peer]
therod has joined #ruby
<hydra__> Xeago: I've updated the OS CA certificate list but ruby is still returning "OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed"
<hydra__> Xeago: maybe that's because it is a self signed certificate?
dnstbr has joined #ruby
darthdeus has joined #ruby
mikepack has joined #ruby
<hydra__> got any clue?
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<rking> mr-rich: P₀ng.
<Xeago> hydra__: you have to add it your certificate as manually verified
<mr-rich> rking: Good morning!
<Xeago> on OSX you can do so by opening the certificate with Keychain.app
<mr-rich> rking: I have a question about savon: Can I dump out the request xml code to see what savon built?
<rking> mr-rich: Yes
Serial_Killer_C has joined #ruby
<mr-rich> rking: thank god ...
<rking> mr-rich: Let me find out where you do it. I just "bundle open xml-mapper" or something then instrument that. ☺ The joys of a language like Ruby.\
treyryan has joined #ruby
ZubKonst_ has joined #ruby
morf has quit [Quit: eof]
havenn has joined #ruby
<mr-rich> rking: I'm trying a simple call to a service that doesn't require and arguments passed. It works in SoapUI, but not in a script ...
tvw has quit [Ping timeout: 244 seconds]
davorb_laptop has joined #ruby
lolmaus has quit []
stopbit has joined #ruby
<hydra__> Xeago: how do I add it as manually verified?
skaczor has joined #ruby
areil has joined #ruby
tvw has joined #ruby
<Xeago> depends on your system
<rking> mr-rich: K. We'll get it.
<hydra__> Xeago: centos
xpen has quit [Remote host closed the connection]
<Xeago> hydra__: no idea
ZubKonst has quit [Ping timeout: 240 seconds]
xpen has joined #ruby
cakehero has joined #ruby
savage- has joined #ruby
<mr-rich> rking: Ruby is a joy ... I like it better than perl for some uses ...
lolzie has joined #ruby
<lolzie> hi
<rking> mr-rich: Just a few more minutes. I'm looking for the spot in savon itself
<lolzie> Why is ensure needed after a rescue? Couldn't you just have code after the end?
<lolzie> I mean, isn't that equivalent?
<mr-rich> rking: no rush ... but hurry up ... :)
jprovazn_away is now known as jprovazn
Guest46294 is now known as patronus
AlbireoX has joined #ruby
patronus is now known as Guest19575
JohnBat26 has joined #ruby
<rking> mr-rich: bundle open savon then navigate to lib/savon/soap/request.rb then find 'def response'. Make its first line be: puts self.http.body
Neomex has joined #ruby
<rking> mr-rich: Then you might want to run it through Nokogiri to clean its ugly face up
<rking> require 'nokogiri'; puts Nokogiri::XML(self.http.body).to_xml
havenn has quit [Ping timeout: 244 seconds]
<rking> Or you can use htmltidy like tidy -xml -qi (or paste it on some web site that does similar)
<mr-rich> rking: so, it's not built in to savon?
<rking> Nope
<rking> We could pull req that, though, I imagine it'd be a common desire.
<rking> E.g. if you made it conditional on ENV['SAVON_DEBUG']
fantazo has joined #ruby
<Bdawk_> Anyone good with SOAP? I'm using the f5-icontrol gem and having issues changing an elements value
<rking> LOL
<rking> Bdawk_: mr-rich is working with f5 also.
<Bdawk_> oh ya? :)
mercwithamouth has joined #ruby
<mr-rich> Bdawk_: HOLY COW! ... another one ...
skaczor has quit [Remote host closed the connection]
<mr-rich> cool
<Bdawk_> It's working well, i can get the objects returned with the data i need. Just can't seem to edit them...
<Bdawk_> and i dont know jack about soap
skaczor has joined #ruby
eph3meral has quit [Quit: eph3meral]
<mr-rich> Bdawk_: What are you trying to do?
<mr-rich> Bdawk_: I'm learing soap/wsdl myself ...
<Bdawk_> change nodes from enabled to disabled
<Bdawk_> and vice versa i guess
<Bdawk_> i can pull the node port and enabled state in a soap object
<mr-rich> Bdawk_: I'm trying a different approach with savon ...
<mr-rich> Bdawk_: I want to use iControl to add/delete users, but the data type to add a user is VERY complex ...
<Bdawk_> fun, i havent looked into that yet
v0n has joined #ruby
<mr-rich> rking: will that line "be:puts self.http.body" dump everything? (envelope, etc)
peterhellberg has joined #ruby
dnyy has joined #ruby
iamjarvo has joined #ruby
<kapowaz> anyone here familiar with Guard? I'm getting an error about my guardfile being invalid… not quite sure how to diagnose (the error it's giving me doesn't seem to be one others have stumbled upon, exactly)
nadirvardar has quit [Quit: Computer has gone to sleep.]
<Bdawk_> i can puts my variable and get #<SOAP::Mapping::Object:0x7f03553c2300>, puts var.inspect and get <SOAP::Mapping::Object:0x3fbe72e50a7c {}member=#<SOAP::Mapping::Object:0x3fbe72e50540 {}address="192.168.1.11" {}port=80> {}session_state="STATE_ENABLED">
<Bdawk_> but how do i edit the specific elements of the soap object
samphippen has quit [Quit: Computer has gone to sleep.]
<kapowaz> and this is my guardfile: https://gist.github.com/1ddc36beb7faf4535d8c
Guest19575 is now known as patronus_
lolzie has quit [Quit: Page closed]
<rking> kapowaz: That require './application' looks highly odd.
<mr-rich> Bdawk_: have you looked at the iControl SDK?
<Bdawk_> nope
<mr-rich> Bdawk_: and iControl Wiki?
<Bdawk_> that i have
tagrudev has quit [Quit: not again]
<kapowaz> rking: how so? it was originally ./app but the main application file is application.rb
<rking> kapowaz: What example are you following? (URL?)
whaley has quit [Remote host closed the connection]
<kapowaz> also, I have the exact same guardfile in another app, with the same layout, and it fails
<mr-rich> Bdawk_: download the SDK or view it online ...
uris has joined #ruby
<kapowaz> s/fails/works/
<kapowaz> rking: I'm not following an example as such — I set it up on another project a few months ago and am migrating the same config over
joshman_ has joined #ruby
<kapowaz> the error is when I run bundle exec guard from command line.
<rking> kapowaz: Looks to me like guard-sprockets is more up to date than guard-sprockets2, at least going by gem realeases.
<kapowaz> I'll gist my Gemfile.lock
daniel_- has quit [Ping timeout: 244 seconds]
shtirlic has joined #ruby
codefyre has quit [Ping timeout: 260 seconds]
codefyre has joined #ruby
<kapowaz> I have a feeling that the specific version of sprockets I'm bundling is old, that may be the issue
dnyy has quit [Remote host closed the connection]
<kapowaz> I'm specifying a version of sprockets, but not a version of guard-sprockets2
dnyy has joined #ruby
a_a_g has joined #ruby
<mr-rich> rking: do I run it through nokogiri in request.rb ?
<rking> mr-rich: Sure. It's just a debug line
<kapowaz> I've just removed my dependencies to older versions of sprockets, uglifier and bundled again and the issue has gone away. However it now seems that running be guard doesn't do the whole ‘watching’ thing any more? It just drops you into a guard commandline?
<mr-rich> rking: so the "be:" is debug?
kil0byte_ has joined #ruby
<rking> mr-rich: Hehe
<rking> No
<rking> That's English.
<rking> "make your first line be: _______"
<rking> Sorry.
<mr-rich> rking: ohhhhhhhhhh!
<mr-rich> :)
Servidorv has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
<kapowaz> I'll take a look. Annoying that it appears to have changed substantially in just a few months…
d2dchat has joined #ruby
kpshek has joined #ruby
<kapowaz> not sure why the gem I was using was called guard-sprockets2 ?
kil0byte has quit [Ping timeout: 260 seconds]
sambio has joined #ruby
codefyre has quit [Quit: Leaving]
noxoc has quit [Read error: Operation timed out]
havenn has joined #ruby
<Servidorv> hey guys how are you
<Servidorv> ??
<Servidorv> hey i just need to check something
<Servidorv> is this alright ?? if action == 'add'
noxoc has joined #ruby
<rking> servidorv: Yep
jaygen has joined #ruby
tommyvyo has quit [Read error: Connection reset by peer]
<rking> servidorv: Though I like to swap those: if 'add' == action
<Servidorv> ok so is better 'add' == action
<Servidorv> ??
<rking> (one because it puts the usually-more-interesting part in a more prominent place, and two because if you accidentally forget the 2nd '=' it will error in languages that let you do it)
<rking> Yeah, but that's a small detail. It should work either way.
hbpoison has joined #ruby
Neomex has quit [Quit: Neomex]
<Servidorv> ok thanks guys
tommyvyo has joined #ruby
zodiak has joined #ruby
Guest38 has joined #ruby
dekroning has quit [Quit: leaving]
sent-hil has joined #ruby
mikepack has quit [Remote host closed the connection]
h4mz1d has joined #ruby
rocky has joined #ruby
jaygen has quit [Ping timeout: 245 seconds]
treyryan has quit [Quit: treyryan]
krz has quit [Quit: krz]
daniel_- has joined #ruby
heftig has quit [Quit: leaving]
bbttxu has quit [Quit: bbttxu]
servidorv_ has joined #ruby
<servidorv_> sorry got disconected
<servidorv_> can any one see if that method will work??
irleif has quit [Quit: Computer has gone to sleep.]
Servidorv has quit [Ping timeout: 260 seconds]
treyryan has joined #ruby
akemEikko has joined #ruby
treyryan has quit [Client Quit]
polysics_ has joined #ruby
dgonz has joined #ruby
<polysics_> hello
havenn has quit [Ping timeout: 240 seconds]
<polysics_> comparing object_id is a surefire way to tell if they are *really* the same object, right?
<kapowaz> so now I've got guard running, it's not actually compiling stuff with sprockets — it's just copying the raw files directly into the output asset directory
<kapowaz> is there some new configuration required to tell it to run stuff through (e.g.) the less compiler?
<davorb_laptop> servidorv_ well it *could* work depending on how pages_coll.remove is written. i don't like the way you use hashes, though.
Agis__ has joined #ruby
<servidorv_> what will be the best way to write it?? sorry im learning ruby, not a pro yet.
sent-hil has quit [Remote host closed the connection]
<davorb_laptop> polysics_ that's what object.equal? does
Virunga has quit [Remote host closed the connection]
<polysics_> I was reading the same article :-)
horofox has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<davorb_laptop> servidorv_ depends on what you want that function do do. if you know that you're always going to send a user_id and id to remove, then you should just define remove as `def remove(user_id, id)`. it really depends on how remove works / what you want it to do, i can think of a number of things that it should remove.
<mr-rich> rking: Ran the test again and got the desired DEBUG output. Can you look at: http://pastebin.com/KVts96ck ?
Guest85651 is now known as kaawee
ernad has joined #ruby
joeycarmello has joined #ruby
<servidorv_> it should just remove the record that contains user_id and id
Virunga has joined #ruby
ltsstar has quit [Quit: ltsstar]
mucker has quit [Quit: leaving]
<kapowaz> okay, the way guard-sprockets is configured now is just plain confusing.
<rking> mr-rich: (SOAP-ENV:Client) Unknown method "{urn:iControl}:get_version" ← Un-good.
<kapowaz> you can specify multiple asset_paths to watch, but only one to output to?
nari_ has joined #ruby
davorb_laptop has quit [Quit: Computer has gone to sleep.]
savage- has quit [Quit: savage-]
<kapowaz> plus it seems that since it's not actually compiling assets down, the only files in the public assets directory are the raw uncompiled files
<kapowaz> this whole thing is turning into an enormous pain in the hole
<kapowaz> I had it *working* on another project ;(
<kapowaz> PROGRESS.
<rking> kapowaz: Guard isn't really in charge of that config
<mr-rich> rking: I know ... I'm using a local wsdl ... it should build the request using that, correct?
<rking> kapowaz: It just triggers the existing config to do its thing.
<kapowaz> I'm guessing a newer version of sprockets is responsible then
servidorv_ has quit [Quit: Take my advice. I don't use it anyway]
zmo_ has quit [Quit: Leaving]
joeycarmello has quit [Remote host closed the connection]
<rking> I don't know about a "newer" version
<rking> kapowaz: Here's the deal with Guard (and with every piece of software): divide & conquer.
Cicloid_ has quit [Remote host closed the connection]
<rking> Get the stuff to work outside of guard, *then* get it to work under guard control.
<kapowaz> I'm thinking for this project I'll just skip it and come back to it. I was hoping to work on some CSS/JS stuff today and this is just eating up my time
SCommette has joined #ruby
<kapowaz> but yeah, good advice. I will come back to it later.
joeycarmello has joined #ruby
savage- has joined #ruby
ephemerian has joined #ruby
savage- has quit [Client Quit]
rakl has quit [Quit: sleeping]
bradleyprice has joined #ruby
bbttxu has joined #ruby
<mr-rich> rking: do you see the difference between what SoapUI & what was actually sent? is savon using the local wsdl to build the request?
jaygen has joined #ruby
samphippen has joined #ruby
<rking> mr-rich: It's completely failing on that iControl get_version part.
mikepack has joined #ruby
<rking> I'm downloading f5-icontrl to look at the WSDL for clues.
rakl has joined #ruby
rakl has quit [Client Quit]
<rking> mr-rich: By the way, until last week I'd never so much as seen a SOAP request, so we're both in the same guessing boat here.
* Xeago thinks soap is bad!
* Xeago prefers lotion
<mr-rich> rking: me either ...
darthdeus has quit [Ping timeout: 244 seconds]
fantazo has quit [Remote host closed the connection]
kil0byte has joined #ruby
mucker has joined #ruby
<workmad3> yay, SOAP issues
Morkel has joined #ruby
Morkel has quit [Client Quit]
<workmad3> rking: are you using the same tool to generate SOAP requests as was used to create the SOAP endpoint in the first place?
BryanWB has joined #ruby
Morkel has joined #ruby
invapid has joined #ruby
<mr-rich> workmad3: you good with soap/savon?
<rking> workmad3: Definitely not.
kil0byte_ has quit [Ping timeout: 268 seconds]
maesbn has quit [Remote host closed the connection]
ABK has joined #ruby
<mr-rich> workmad3: you good with soap/savon?
nadirvardar has joined #ruby
niklasb has quit [Ping timeout: 255 seconds]
maesbn has joined #ruby
BryanWB has quit [Quit: Ex-Chat]
sspiff has quit [Ping timeout: 244 seconds]
<clocKwize> mr-rich, nobody is good with savon
<DefV> we all just live with it
h4mz1d has quit [Ping timeout: 244 seconds]
sspiff has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<mr-rich> ok ... better than me with savon ... :)
<mr-rich> ?
<workmad3> rking: any idea what was used to build the SOAP endpoint?
<workmad3> rking: because some of the SOAP tooling for things like C# and Java produces endpoints that can pretty much only ever be talked to by clients generated by the same tools...
<rking> workmad3: Nope. Actually I'm having a really hard time finding the f5-icontrol gem he's using.
jprovazn has quit [Quit: Leaving]
havenn has joined #ruby
maesbn has quit [Ping timeout: 264 seconds]
<mr-rich> rking: you have to be a member of F5 DevCentral to get it ...
tk__ has quit [Quit: ばいばい]
<rking> So lame.
eataix has quit [Quit: ZNC - http://znc.in]
<workmad3> mr-rich: I've tried to never touch SOAP... but I've heard enough horror stories to know that something that *should* be easy can be made pretty much impossible if certain tools (that I don't know the names of) are used
<rking> mr-rich: gist me (and please use https://gist.github.com instead of pastebin) the WSDL
whaley has joined #ruby
<mr-rich> I can send you the gem ...
<mr-rich> rking: let's see if irc can send a file ...
activedecay has joined #ruby
* rking dusts off the old DCC'er.
headius has joined #ruby
<rking> mr-rich: Nono
<rking> This is a big pain
<Xeago> put.io
<Xeago> cloud.io
<Xeago> fi.le
<Xeago> there are so many
<Xeago> ad free services
kil0byte_ has joined #ruby
<rking> Just gem install jist && jist /home/rjwiii/.rvm/gems/ruby-1.9.3-p194/gems/f5-icontrol-11.0.0.1/lib/wsdl/System.SystemInfo.wsdl
horofox has quit [Quit: horofox]
<rking> If you pass the "-c" flag to jist you don't even have to copy the URL
baroquebobcat has joined #ruby
morozovm has joined #ruby
kil0byte has quit [Ping timeout: 245 seconds]
zommi has quit [Quit: Leaving.]
samphippen has quit [Quit: Computer has gone to sleep.]
ddd has quit [Quit: Leaving.]
daniel_- has quit [Ping timeout: 240 seconds]
<mr-rich> rking: done ...
irleif has joined #ruby
<mr-rich> rking: do you want the gem? the f5 gem uses soap4r, not savon
tazz has joined #ruby
<rking> I just want the WSDL for now.
horofox has joined #ruby
havenn has quit [Ping timeout: 260 seconds]
davidcelis has quit [Quit: K-Lined.]
<rking> BTW you have to paste me the URL that jist said. ☺
dhruvasagar has joined #ruby
* rking should make an rking-jist gem that instantly sends him the URLs.
joeycarmello has quit [Remote host closed the connection]
therod has quit [Quit: Leaving...]
zmo_ has joined #ruby
carloslopes has quit [Remote host closed the connection]
sent-hil has joined #ruby
irleif has quit [Client Quit]
<mr-rich> rking: I'm actually developing on an Ubuntu VM on a vbox ...
<mr-rich> rking: this is my main box ... kubuntu
daniel_- has joined #ruby
nari_ has quit [Ping timeout: 240 seconds]
<JonnieCache> can anyone reccommend me a postgis book?
ltsstar has joined #ruby
<rking> Man, I can't see what would be wrong with just requesting :get_version, as you are.
<mr-rich> rking: ok ...
<rking> mr-rich: What about switching to soap4r and mimicking the f5-icontrol gem (at least for a start)
g-ram has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
samphippen has joined #ruby
ssspiff has joined #ruby
k610 has quit [Ping timeout: 246 seconds]
<mr-rich> rking: well, the f5 gem uses soap4r and I can get it to work with that ...
<mr-rich> rking: but ...
<mr-rich> rking: soap4r doesn't play well with ruby 1.9.3 ... the version of ruby my boss wants me to use ...
<Xeago> mr-rich: it is also the version of ruby you should want to use
heftig has joined #ruby
<mr-rich> rking: I get all kinds of warnings about depricated stuff ...
<mr-rich> pm me your e-mall addy and I'll send you the f5 gem ...
morozovm has quit [Read error: Connection reset by peer]
<mr-rich> rking: ^^^
sspiff has quit [Ping timeout: 265 seconds]
morozovm has joined #ruby
<mr-rich> Xeago: Granted ... but some gems have not been updated to be used with 1.9.3 ...
freeayu__ has joined #ruby
aganov has quit [Remote host closed the connection]
freeayu__ has quit [Remote host closed the connection]
<mr-rich> Xeago: soap4r is one of them ... someone did write a wrapper, but I still get warnings ...
freeayu has quit [Ping timeout: 244 seconds]
Uranio has quit [Quit: WeeChat 0.3.8]
a_a_g has quit [Quit: Leaving.]
codefyre has joined #ruby
horofox has quit [Quit: horofox]
allyraza has joined #ruby
arturaz has quit [Ping timeout: 272 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
hbpoison has quit [Ping timeout: 264 seconds]
chrishunt has quit [Quit: Leaving...]
psycho_one has joined #ruby
_alejand_ has joined #ruby
akemEikko has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
xpen has quit [Remote host closed the connection]
BadProphet has joined #ruby
rocky has quit [Quit: Ex-Chat]
vlad_starkov has quit [Remote host closed the connection]
ltsstar has quit [Quit: ltsstar]
<JonnieCache> a/j sequel
daniel_- has quit [Ping timeout: 245 seconds]
Morkel has quit [Quit: Morkel]
darthdeus has joined #ruby
shtirlic has quit [Remote host closed the connection]
freezey has joined #ruby
rippa has joined #ruby
peneconleche|awa has quit [Read error: Connection reset by peer]
freezey has quit [Client Quit]
areil_ has joined #ruby
whowantstolivefo has joined #ruby
Vinz_` is now known as Vinz_
mucker has quit [Quit: leaving]
Xeago_ has joined #ruby
rocky has joined #ruby
hoelzro is now known as hoelzro|away
samphippen has joined #ruby
areil has quit [Ping timeout: 244 seconds]
darthdeus has quit [Quit: Leaving...]
Welington has quit [Quit: Saindo]
morozovm has quit [Read error: Connection reset by peer]
Seus has joined #ruby
moos3 has joined #ruby
morozovm has joined #ruby
Jonah11_ has joined #ruby
daniel_- has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
havenn_ has joined #ruby
<linnea> what is easiest way to add hash's info to new string?
<linnea> I want only somepart of that info
<Jonah11_> It's 11:50 right now in NYC, so I don't understand why this irb output is showing 10:50: http://pastie.org/5115198
nitti_ has joined #ruby
Jellyg00se has quit [Ping timeout: 256 seconds]
<linnea> summer time?
Xeago_ has quit [Ping timeout: 260 seconds]
ssspiff has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<banisterfiend> Veejay: heya
<banisterfiend> you here?
leoncamel has quit [Remote host closed the connection]
krz has joined #ruby
ShiintoRyuu has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
nitti has quit [Read error: Operation timed out]
<Jonah11_> linnea, so does the zone_offset not auto-detect daylight savings?
<linnea> Jonah11_: i'm not sure, it was just guess
therod has joined #ruby
carloslopes has joined #ruby
<tazz> Hey I am trying to convert csv data to yaml. Here is what i coded so far. http://pastebin.com/w1nBKqBm
zmo_ has quit [Quit: Leaving]
heftig has quit [Quit: leaving]
Slivka has joined #ruby
advorak has quit [Quit: This computer has gone to sleep]
<Jonah11_> linnea, looks like there is 3rd party gem for this: http://tzinfo.rubyforge.org/. bizarre that it's not included in the standard time class
<workmad3> tazz: why are you splitting on ','?
cezar has joined #ruby
cezar has quit [Read error: Connection reset by peer]
xpen has joined #ruby
<tazz> workmad3, because the values are comma separated.
xpen has quit [Remote host closed the connection]
Doc_X has joined #ruby
<workmad3> tazz: not by the time they've been read by CSV
<workmad3> tazz: that's kinda the point of the CSV library...
areil_ has quit []
<workmad3> tazz: or did you think that you'd have a CSV library that would then require you to process the CSV file manually? :/
Trioke has joined #ruby
manizzle has joined #ruby
Takehiro has quit [Remote host closed the connection]
peterhellberg has quit [Remote host closed the connection]
havenn_ has quit [Ping timeout: 264 seconds]
Virunga has quit [Ping timeout: 272 seconds]
<tazz> workmad3, yea i was kind of thinking that i'd have to process the data manually. :p
<tazz> anyways arr_of_arrs.to_yaml works :)
<tazz> thanks workmad3
Takehiro has joined #ruby
__zfn__ has joined #ruby
cezar has joined #ruby
piotr_ has quit [Ping timeout: 240 seconds]
cezar has quit [Read error: Connection reset by peer]
<Dreamer3__> ok inside class how can i break into the class instance instead of using def self.
xorigin has quit [Quit: leaving]
danneu has joined #ruby
<banisterfiend> Dreamer3__: instance_eval ?
tommyvyo has quit [Quit: Computer has gone to sleep.]
<Dreamer3__> hmmm i don't think that's it…. there is some weird syntax
<Dreamer3__> class < self ?
ABK has quit [Ping timeout: 276 seconds]
<Dreamer3__> but pretty sure that's not right
JohnBat26 has quit [Ping timeout: 244 seconds]
kramutils has quit [Quit: Leaving.]
<banisterfiend> Dreamer3__: it depends what yu're trying to do
carloslopes has quit [Ping timeout: 252 seconds]
<banisterfiend> Dreamer3__: if you're just defining methods, use MyClass.instance_eval
<banisterfiend> Dreamer3__: if you want to access the eigenclass (not the class instance, as you said) then use class << MyClass
<banisterfiend> but it's different, as 'self' is different in each case
<wca> IO#gets() seems to return less-than-a-line from streams with an active writer on the other end. Is there a way to get only complete lines or nil, with a standard method?
therod has quit [Ping timeout: 245 seconds]
Jellyg00se has joined #ruby
timonv has quit [Remote host closed the connection]
areil has joined #ruby
<danneu> I have a 10-line EventMachine proxy.rb that's just an http gateway -- relays incoming requests from my app to a remote endpoint. I'm trying to deploy it to EC2. Do I just need a reverse proxy sitting on front of it to let the EventMachine proxy relay the requests appropriately? (https://raw.github.com/gist/3948890/47d9df96e98cf21640e8a54bddd79df55c9b837f/proxy.rb)
Virunga has joined #ruby
<Bdawk_> any clue? `array2soap': undefined method `each' for #<SOAP::Mapping::Object:0x7fc84afc9cb0> (NoMethodError)
carloslopes has joined #ruby
pu22l3r has joined #ruby
<linnea> Bdawk_: you are using each with not array or hash?
gauloises has quit [Ping timeout: 255 seconds]
davidcelis has joined #ruby
aantix has joined #ruby
chrxn has quit [Ping timeout: 252 seconds]
<Dreamer3__> banisterfiend: i want to define class methods
havenn has joined #ruby
rocky has quit [Quit: Ex-Chat]
<Dreamer3__> class << self maybe?
<Bdawk_> hmm
<banisterfiend> Dreamer3__: there's so many ways to do it
<Dreamer3__> class << self is what i was thinking of :)
<banisterfiend> Dreamer3__: MyClass.instance_eval, class << MyClass, and class MyClass; class << self; end; end all work
filipe has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
* wca wonders how hard it would be to get a new method added to the standard IO class
hbpoison has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
tazz has quit [Ping timeout: 276 seconds]
yxhuvud has joined #ruby
burgestrand has joined #ruby
stephenjudkins has joined #ruby
elsifaka has quit [Quit: Veloma e!]
dhruvasagar has joined #ruby
irleif has joined #ruby
<banisterfiend> wca: too late now ;) ruby 2.0 is under feature freeze
bluenemo has quit [Remote host closed the connection]
<wca> banisterfiend: any idea if there is an equivalent to what I mentioned?
JonnieCache has quit [Quit: Lost terminal]
<wca> banisterfiend: I basically wrote a IO#fgetln() to do what I wanted.
gauloises has joined #ruby
blazes816 has joined #ruby
`brendan has joined #ruby
Takehiro has quit [Remote host closed the connection]
nitti has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
<linnea> @seqHash.each do |name, seqna| <- is that valid?
haxrbyte has quit [Ping timeout: 265 seconds]
advorak has joined #ruby
<linnea> i get errors
nateberkopec has joined #ruby
<linnea> it seems that no :P
daniel_- has quit [Ping timeout: 245 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 240 seconds]
Bosma has quit [Ping timeout: 240 seconds]
<banisterfiend> linnea: you're not saying what the error is, what type @seqHash is (though i assume it's a hash) or the rest of the code, which may/may not generate teh error
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<banisterfiend> linnea: u're a big boy u should know how to ask questions
<linnea> banisterfiend: I would copy paste the errror if I could
nitti_ has quit [Ping timeout: 240 seconds]
<banisterfiend> linnea: flippers instead of hands?
<banisterfiend> :P
cezar has joined #ruby
<linnea> haha no. but Shoes on mac doesn't let you copy from it's console
haxrbyte has joined #ruby
cezar has quit [Client Quit]
maletor has joined #ruby
<linnea> maybe I should show the full code of that method
Bosma has joined #ruby
JonnieCache has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
cezar has joined #ruby
cezar has quit [Client Quit]
<linnea> I'm trying to learn use hashes but it's rocky way
flype has joined #ruby
Virunga has quit [Remote host closed the connection]
ryanlecompte has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
morozovm has joined #ruby
cezar has joined #ruby
mklappstuhl has quit [Ping timeout: 244 seconds]
<wca> banisterfiend: I guess not? :)
erichmenge has joined #ruby
beit has joined #ruby
cezar has quit [Client Quit]
ukwiz has joined #ruby
artOfWar has joined #ruby
jonathanwallace has joined #ruby
dpatel has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
rabidpraxis has joined #ruby
badkins has joined #ruby
samphippen has joined #ruby
khakimov has joined #ruby
<ukwiz> I am trying to install the RedCloth gem on OpenSuse 12.2, and it fails with message: (RuntimeError)You have to install development tools first. What development tools are these?
dhruvasagar has quit [Ping timeout: 245 seconds]
jdtornow has joined #ruby
artOfWar has quit [Remote host closed the connection]
areil has quit [Remote host closed the connection]
artOfWar has joined #ruby
rabidpraxis has quit [Ping timeout: 255 seconds]
jaygen has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
elliot98 has quit [Remote host closed the connection]
etank has quit [Quit: WeeChat 0.3.9]
elliot98 has joined #ruby
etank has joined #ruby
jdtornow has left #ruby [#ruby]
skcin7 has quit [Read error: Operation timed out]
<JonnieCache> gcc and the like
<JonnieCache> is there a build-essential package on opensuse?
chrishunt has joined #ruby
<Hanmac> ukwiz do you have something like ruby*-devel or libruby-devel or something similar?
Takehiro has joined #ruby
<ukwiz> i have ruby-dev installed
JonnieCache has quit [Quit: Lost terminal]
<Hanmac> ukwiz does the error still happen?
skcin7 has joined #ruby
darthdeus has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
chrxn has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
nitti_ has joined #ruby
whaley_ has joined #ruby
sent-hil has quit [Remote host closed the connection]
glyytchy has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
nitti has quit [Ping timeout: 260 seconds]
glyytchy has quit [Client Quit]
zigomir has quit [Ping timeout: 260 seconds]
morozovm has quit [Read error: Connection reset by peer]
rabidpraxis has joined #ruby
nitti has joined #ruby
morozovm has joined #ruby
glyytchy has joined #ruby
stephenjudkins has joined #ruby
whaley has quit [Ping timeout: 255 seconds]
<ukwiz> Hanmac: It seems to be the system dev tools like make, gcc that were not installed
nitti__ has joined #ruby
roadt` has quit [Ping timeout: 244 seconds]
anachronistic has joined #ruby
nitti_ has quit [Ping timeout: 246 seconds]
jimeh has quit [Ping timeout: 268 seconds]
nitti_ has joined #ruby
cdt has quit [Quit: Ex-Chat]
nitti has quit [Ping timeout: 240 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
__zfn__ has quit [Ping timeout: 246 seconds]
_alejand_ is now known as alejandro_
adamjleonard has quit [Read error: Connection reset by peer]
adamjleonar has joined #ruby
jaygen has joined #ruby
x82_nicole has joined #ruby
tyfighter has joined #ruby
nitti__ has quit [Ping timeout: 265 seconds]
d2dchat has quit [Remote host closed the connection]
therod has joined #ruby
mensvaga has joined #ruby
carlzulauf has quit [Ping timeout: 252 seconds]
<mensvaga> so, == doesn't convert a fixnum to string when I'm comparing it to a string
<mensvaga> but it doesn't complain about it
caleb_io has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
skum has quit [Quit: Leaving...]
activedecay has quit [Read error: Connection reset by peer]
<mensvaga> is there a comparison operator that throws an exception when I try to compare 2 things of a different class, for which one of those couldn't be converted to a class suitable for comparison?
mmealling has joined #ruby
theRoUS is now known as theRoUS|mtg
Agis__ has quit [Quit: Agis__]
m_3 has quit [Remote host closed the connection]
d3vic3 has quit [Quit: leaving]
nitti has joined #ruby
codefyre has quit [Quit: Leaving]
chussenot_ has joined #ruby
etank has quit [Quit: WeeChat 0.3.9]
therod has quit [Ping timeout: 244 seconds]
PapaSierra has quit [Ping timeout: 244 seconds]
nitti__ has joined #ruby
<mmealling> what is the return type of RARRAY_LEN? "int nl = RARRAY_LEN(rlist);" keeps giving me a "return makes integer from pointer without a cast" warning...
activedecay has joined #ruby
hikimonk has joined #ruby
carlzulauf has joined #ruby
<banisterfiend> mmealling: it should return an unsigned long i think
chussenot_ has quit [Client Quit]
<wca> obviously not, since it says "integer from *pointer*"
noxoc has quit [Ping timeout: 252 seconds]
<wca> it may return a VALUE, though it beats me why it would
dgonz has quit [Quit: dgonz]
chussenot has quit [Ping timeout: 244 seconds]
apok has joined #ruby
jslowe has joined #ruby
nitti_ has quit [Ping timeout: 272 seconds]
k610 has joined #ruby
dgonz has joined #ruby
<mmealling> sigh… nevermind… stupid compiler had line numbers wrong.
etank has joined #ruby
whaley_ has quit [Remote host closed the connection]
nitti has quit [Ping timeout: 272 seconds]
<mmealling> function signature was "static VALUE foo(VALUE rlist)" and I was returning a naked NULL on the line previous to that. Casting the NULL to (VALUE) fixed it.
Xeago has joined #ruby
<mmealling> (I'm porting algorithm implementations from mlpy to ruby)
__zfn__ has joined #ruby
<wca> have you considered using ffi?
savage- has joined #ruby
<banisterfiend> wca: the function returns an int
<Hanmac> wca ffi is not allways your help
PapaSierra has joined #ruby
__zfn__ has quit [Client Quit]
<matti> banisterfiend: banisterfiend
<matti> ;-)
ablankfield has joined #ruby
etank has quit [Client Quit]
<wca> Hanmac: could you clarify?
hotovson has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
<mmealling> no but it looks interesting…. once I verify the code works in C I might use that when (if) I release a gem for it
Iszak has quit [Quit: User has gone to sleep.]
etank has joined #ruby
<Hanmac> wca ffi can only bind C functions ... not C++
ryanlecompte has quit [Ping timeout: 240 seconds]
<mmealling> (this is C)
<Hanmac> i bind c++ libs into ruby ... there i can use something like OGRE or wxWidgets in ruby
<mmealling> if I could put it in an FPGA and run it on raw silicon, I would. ;-)
hbpoison has joined #ruby
Araxia has joined #ruby
bemson has joined #ruby
kaawee has quit [Ping timeout: 240 seconds]
<banisterfiend> wca: yeah it just returns the raw RArray.heap.len
<wca> Hanmac: Ahh. I never use C++ libraries, but that's good to know.
hikimonk has quit [Quit: Leaving.]
datafirm has joined #ruby
<datafirm> hi!
<wca> banisterfiend: yeah, I wasn't convinced that the error was for that line, but he said it was at the time, so.
Zai00 has quit [Quit: Zai00]
<datafirm> Read a lot of ruby code, and I've never seen this syntax used.. where a #begin..end block is preceded by =
<datafirm> like =begin … =end
<datafirm> what does that mean?
<Hanmac> datafirm block commentar
Synthead has joined #ruby
<darthdeus> i think i've lost faith in ruby :\
<datafirm> ok, so they code is effectively commented out!
<darthdeus> any ideas on getting it back? :p
<datafirm> Hanmac: correct?
<Hanmac> datafirm yes
<wca> darthdeus: you'd have to explain why you lost faith.
hbpoison has quit [Ping timeout: 255 seconds]
PapaSierra has quit [Ping timeout: 244 seconds]
<Hanmac> dartheus.extend(Faith)
<darthdeus> wca: i've been trying to do SOA, and everything i looked at so far just seems like a bad design
<datafirm> Hanmac: OK, because it was pushed out to the document edge zero position, reminded me of some Heredoc style.
<darthdeus> wca: activeresource is broken, httparty include is just wrong, and there is not much else
<darthdeus> wca: i've looked at typhoeus but i can't find a way to fit it into a rails app in a clean way
<darthdeus> so i started digging into some gems
<darthdeus> looking at their source code
<darthdeus> and everything just seems so wrong :D
thinkdevcode has joined #ruby
<darthdeus> but i have no idea how to do it right
<wca> darthdeus: how is activeresource broken?
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
datafirm has quit [Client Quit]
sullenel has joined #ruby
<Hanmac> darthdeus looks like rails problems :D
<darthdeus> wca: in so many ways, it doesn't care about the returned attributes, just status codes
coffer has quit [Ping timeout: 240 seconds]
<wca> it hardly seems appropriate to blame Ruby for broken libraries built on top of it
<darthdeus> i'd prefer something which separates the data object from the http transport
mklappstuhl has joined #ruby
robotmay has quit [Remote host closed the connection]
zomgbie has joined #ruby
<darthdeus> yeah, but when i try to implement this myself, i feel like i'm reinventing static typing with my tests
<darthdeus> and doing a lot of redundant testing
<wca> darthdeus: ActiveResource is a generic REST interface, so why would it be appropriate for it to look at the data at all?
Russell^^ has joined #ruby
<darthdeus> wca: because when you do PUT /resource/1/foo and the foo alters the attributes and sends them back, you might expect it to take that into account
<darthdeus> but it just forces you to do .reload, which does GET /resource/1
m_3 has joined #ruby
<darthdeus> and since activeresource is being removed from rails, i don't expect it to be moving forward anyway
<darthdeus> damn :D i'm one whiny baby
<wca> darthdeus: are you expecting PUT and a subsequent GET to be different?
<darthdeus> wca: I'm expecting PUT to alter something, so it should take into account what data gets back
dnstbr has quit [Quit: Computer has gone to sleep.]
bricker has joined #ruby
dylanjha has joined #ruby
<wca> darthdeus: it's been a while since I wrote any REST, but I thought PUT requests only return success/failure?
<darthdeus> wca: POST doesn't work either
k610 has quit [Ping timeout: 244 seconds]
* darthdeus wca: I'd generally expect if i return a payload of data, that it takes that into account, not to require me to do 2 requests whenever I update a model
<darthdeus> wrong button >.<
PapaSierra has joined #ruby
<darthdeus> and also activeresource managets the connections for you, so there's not much space to tweak it
sullenel has quit [Quit: Leaving.]
<wca> darthdeus: well, it depends on your controllers, does it not? if they return the updated resource, then I could see how you'd avoid the subsequent GET.
<darthdeus> wca: yes they return the updated data
mahmoudimus has joined #ruby
<darthdeus> wca: basically render json: resource, or respond_with resource ... tried both, same JSON, same ignorance from activeresource
haxrbyte has quit [Remote host closed the connection]
haveaniceday has joined #ruby
matti has quit [Ping timeout: 245 seconds]
<wca> darthdeus: hmm.. googling around a bit, they seem to have replaced AR with "representers"?
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
rakl has joined #ruby
BadProphet is now known as HabeasPorpoise
BSaboia has joined #ruby
savage- has quit [Read error: Operation timed out]
sullenel has joined #ruby
adamjleonar has quit [Quit: Leaving...]
philcrissman has quit [Remote host closed the connection]
haveaniceday has left #ruby [#ruby]
apok_ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
ryanlecompte has joined #ruby
nitti__ has quit [Quit: Leaving...]
jrajav has joined #ruby
d2dchat has joined #ruby
ffranz has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Quit: Computer has gone to sleep.]
PapaSierra has quit [Ping timeout: 244 seconds]
zomgbie has quit [Read error: Connection reset by peer]
<mr-rich> rking: ping
megaman has quit [Quit: Leaving]
<wca> darthdeus: I guess so? I'm not really keeping up with Rails. More interested in other areas of Ruby.
<rking> mr-rich: (barely) pong.
* wca grumbles about IO not having a fgetln().
apok has quit [Ping timeout: 265 seconds]
apok_ is now known as apok
<darthdeus> wca: i don't really need it to be uber rails compatibly if it's a good REST client library ... i'm already thinking of packaging the whole client side in a gem and just using that in the rails app
yshh has quit [Remote host closed the connection]
ablankfield has quit [Ping timeout: 264 seconds]
<mr-rich> rking: Ok, I'm getting closer to matching the input xml ...
beit has quit [Quit: beit]
flype has quit [Ping timeout: 252 seconds]
<mr-rich> rking: SoapUI has "sys:get_version", but the input xml has "tsn:get_version" ... do you know the option to change "tns" to "sys"?
bluOxigen has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
Katniss has joined #ruby
jamesaxl has quit [Quit: Leaving]
sepp2k has joined #ruby
<sjuxax> Hello. I am using ruby-mysql in my scripts. I have an environment where this is fast, and an environment where this is slow. They are contacting the same local MySQL server. I am trying to pinpoint what the difference is, why the one env is fast and the other is about 5x slower. Anyone have some general suggestions here? What is required to make mysql-ruby go fast?
anderse has quit [Quit: anderse]
<rking> mr-rich: Maybe try fully qualifying it, like client.request "sys:get_version", but I don't know.
rakl has quit [Quit: sleeping]
daniel_- has joined #ruby
sent-hil has joined #ruby
shevy has quit [Ping timeout: 268 seconds]
ffranz has joined #ruby
<mr-rich> rking: tried that ... still came out "tns" ... Thanks for trying ...
chriskk has joined #ruby
<rking> mr-rich: Hehe
<rking> mr-rich: I still really advise just using soap4r and copy the existing gem for a start
erichmeng has joined #ruby
slainer68 has joined #ruby
erichmenge has quit [Ping timeout: 244 seconds]
jgrevich has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
<mr-rich> rking: I may end up doing that at some point, but my boss is stuck on savon ... plus soap4r still has issues with ruby 1.9.x ...
irleif has joined #ruby
<rking> That's fine
<rking> Just get a version that works and then bridge the gap
slainer68 has joined #ruby
chrishunt has quit [Quit: Leaving...]
<rking> mr-rich: But maybe not, in this case. I'd roll up my sleeves and help you but I'm behind for the day on my $actual_work.
Mon_Ouie has quit [Ping timeout: 240 seconds]
morozovm has quit [Read error: Connection reset by peer]
<mr-rich> rking: the latest soap4r is 1.5.8 and someone wrote a wrapper gem for 1.9, but I still get a boatload of deprication warnings ...
Mon_Ouie has joined #ruby
brianpWins has joined #ruby
morozovm has joined #ruby
stkowski has joined #ruby
ejholmes has joined #ruby
baphled has quit [Ping timeout: 264 seconds]
dekroning has joined #ruby
glyytchy has quit [Quit: glyytchy]
sent-hil has quit [Remote host closed the connection]
alem0lars has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
sent-hil has joined #ruby
heftig has joined #ruby
chrishunt has joined #ruby
Serial_Killer_C has joined #ruby
kaawee has joined #ruby
glyytchy has joined #ruby
mark_locklear has quit [Remote host closed the connection]
shevy has joined #ruby
therod has joined #ruby
chichou has joined #ruby
flype has joined #ruby
niklasb has joined #ruby
jrajav has quit []
zomgbie has joined #ruby
elaptics is now known as elaptics`away
adamjleonard has joined #ruby
jwang has quit [Remote host closed the connection]
therod has quit [Ping timeout: 260 seconds]
dylanjha has quit [Quit: Leaving...]
krz has quit [Quit: krz]
nopolitica has quit [Ping timeout: 240 seconds]
flip_digits has joined #ruby
danneu has left #ruby ["WeeChat 0.3.8"]
krz has joined #ruby
iamjarvo has joined #ruby
rakl has joined #ruby
kaawee has quit [Ping timeout: 244 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
sent-hil has quit [Remote host closed the connection]
dylanjha has joined #ruby
Dreamer3__ has quit [Quit: Computer has gone to sleep.]
answer_42 has joined #ruby
clj_newb has joined #ruby
danneu has joined #ruby
sent-hil has joined #ruby
danneu has left #ruby [#ruby]
alem0lars has quit [Ping timeout: 244 seconds]
tvw has quit [Remote host closed the connection]
Virunga has joined #ruby
brianpWins has quit [Quit: brianpWins]
craigp has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
<craigp> anyone know why my thin instances wouldn't share cooke info?
<craigp> using Rack::Session::Cookie
<craigp> using the same key/location/secret
hbpoison has joined #ruby
Xeago has quit [Remote host closed the connection]
philcrissman has joined #ruby
jbw has quit [Ping timeout: 244 seconds]
kil0byte_ has quit [Remote host closed the connection]
Xeago has joined #ruby
lxsameer has joined #ruby
<lxsameer> is there any thing like python's struct module in ruby ?
irleif has joined #ruby
greasegum has joined #ruby
Coolhand has quit [Read error: Operation timed out]
hbpoison has quit [Ping timeout: 260 seconds]
greasegum has quit [Max SendQ exceeded]
Xeago has quit [Ping timeout: 252 seconds]
love_color_text has quit [Remote host closed the connection]
love_color_text has joined #ruby
sambio has quit [Ping timeout: 240 seconds]
<banisterfiend> lxsameer: what is python's struct module
omry has joined #ruby
nopolitica has joined #ruby
<lxsameer> banisterfiend: This module performs conversions between Python values and C structs represented as Python strings. This can be used in handling binary data stored in files or from network connections, among other sources. It uses Format Strings as compact descriptions of the layout of the C structs and the intended conversion to/from Python values.
amoe_ has joined #ruby
amoe has quit [Read error: Operation timed out]
Zai00 has joined #ruby
gauloises has quit [Ping timeout: 255 seconds]
samphippen has joined #ruby
<banisterfiend> lxsameer: probably our FFI module does that, but i haven't used it so much
<lxsameer> banisterfiend: thanks man
gauloises has joined #ruby
Virunga has quit [Remote host closed the connection]
kaawee has joined #ruby
samphippen has quit [Client Quit]
atmosx has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
alem0lars has joined #ruby
Virunga has joined #ruby
Tuxist has joined #ruby
c0rn_ has joined #ruby
BSaboia__ has joined #ruby
chriskk has quit [Quit: chriskk]
skipper has joined #ruby
skipper is now known as Guest23797
c0rn_ has quit [Client Quit]
love_color_text has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
Guest23797 has quit [Remote host closed the connection]
ablankfield has joined #ruby
c0rn_ has joined #ruby
c0rn_ has quit [Client Quit]
BSaboia has quit [Ping timeout: 244 seconds]
axl_ has joined #ruby
c0rn_ has joined #ruby
daniel_- has quit [Ping timeout: 244 seconds]
ddd has joined #ruby
Nisstyre has quit [Read error: Operation timed out]
ablankfield has quit [Ping timeout: 245 seconds]
sent-hil has quit [Remote host closed the connection]
activedecay has quit [Quit: f*** windows]
anderse has joined #ruby
recycle has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
jipiboily has quit [Read error: Connection reset by peer]
<burgestrand> lxsameer: https://rubygems.org/gems/bindata I’ve heard of people using
<lxsameer> burgestrand: thanks man
<burgestrand> FFI module structs are not really not really that useful for computation, they’re more for practical use of actually casting memory pointers to ruby objects for easier reading
mklappstuhl has quit [Read error: Operation timed out]
Servidorv has joined #ruby
<burgestrand> (to be used with the rest of FFI, in other words)
sebastianb has quit [Read error: Connection reset by peer]
sebastianb has joined #ruby
havenn has quit [Remote host closed the connection]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<Servidorv> hey guys, quick question, lets say i have an array, and inside this array i have a bunch of other array wich contain type: 'image' , type: 'post' how can i remove all the arrays that contain 'post' as type??
havenn has joined #ruby
c0rn_ has joined #ruby
awestroke has quit [Remote host closed the connection]
rming has joined #ruby
zomgbie_ has joined #ruby
<lxsameer> does ruby has any docstring for classes or methods ?
irleif has joined #ruby
<stenno> docstring?
<stenno> as in rubydoc ?
<lxsameer> stenno: nope , a short description for the object , something like comments. (python docstring)
jlwestsr has joined #ruby
<stenno> # comment
zomgbie has quit [Ping timeout: 244 seconds]
<burgestrand> servidorv: Array#select
<Servidorv> oh ok thanks man
<Servidorv> :)
c0rn_ has quit [Client Quit]
Neomex has joined #ruby
jrajav has joined #ruby
ernad has quit [Ping timeout: 268 seconds]
<stenno> lxsameer: i am a bit confused. like this? http://rdoc.sourceforge.net/doc/
c0rn_ has joined #ruby
<lxsameer> stenno: nope like this http://dpaste.com/818291/
<lxsameer> stenno: notice the document between """ asdas """
xorigin has joined #ruby
<stenno> and... what does that do?
<stenno> isn't that exactly the same as rdoc?
morozovm has quit [Read error: Connection reset by peer]
<mr-rich> rking: I AM A SOAP GOD!!!!!
<rming> Hey guys. Anybody know if there's a best practice for handling enums in Ruby?
<mr-rich> rking: got the simple request working ... :)
ABK has joined #ruby
morozovm has joined #ruby
chriskk has joined #ruby
havenn has quit [Remote host closed the connection]
sweet_kid has quit [Read error: Connection reset by peer]
<lxsameer> stenno: not exactly , it's like a short comment for the object, also can be used in test units or doc generators or even like this ABS.__doc__
ABK has quit [Read error: Connection reset by peer]
<lxsameer> stenno: can you please dpaste a class that you wrote for me, so that i can use your experiences , i'm new to ruby
<stenno> don't think there is something like that, but i haven't followed ruby dev for some time now
<mmealling> as I'm porting this I'm finding that all of the array manipulation is making me call rb_ary_entry() and NUM2INT/INT2NUM a lot. I'm calling so many built in Ruby calls to access the Ruby data structure that I'm wondering if I'm affecting performance.
<stenno> class Foo; end
ABK has joined #ruby
timonv has joined #ruby
<stenno> lxsameer: look at github.com/junethack/junethack
<lxsameer> stenno: thanks man
<mmealling> should I take the memory hit and copy the data into C structures and operate on them or are the macros and calls like rb_ary_entry() fast enough that I'm still better off sticking to native Ruby data structures?
psycho_one has quit [Remote host closed the connection]
<stenno> its terrible and written for 1.8.7
<stenno> but maybe it can give you some ideas
niklasb has quit [Ping timeout: 245 seconds]
<lxsameer> stenno: thanks do you have any excellent example for 1.9 ?
jumpingcloud has joined #ruby
<stenno> lxsameer: just search the web...
<stenno> lxsameer: or github, for that matter
havenn has joined #ruby
<stenno> maybe you want to look at the code of the datamapper project or something, i really don't know
<lxsameer> stenno: thanks
Ryhnn has joined #ruby
<stenno> i think there are lot of other people here that have much clearer idea on what an excellent example of 1.9 code is :)
axl_ has quit [Quit: axl_]
therod has joined #ruby
bwlang has joined #ruby
tazz has joined #ruby
tazz has quit [Client Quit]
<RubyPanther> mmealling: the ruby stuff is all written in C already, you'd only want to worry about it yourself if you'd benchmarked and found a bottleneck there, or you were absolutely sure you wanted to skip the sanity checking that Ruby does
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<RubyPanther> or if it makes more sense alongside whatever other C code you already have
Takehiro has quit [Remote host closed the connection]
LouisGB has joined #ruby
<mmealling> RubyPanther, OK… good to know. I'll keep doing it this way and then benchmark it.
irleif has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
axl_ has joined #ruby
vonsar has joined #ruby
timonv has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 264 seconds]
<Jonah11_> i'm getting a loaderror on 'require "activesupport"' even though the gem is installed and show up in "gem list" -- what could be wrong?
therod has quit [Ping timeout: 268 seconds]
<Ryhnn> New to Ruby, looking for program ideas to stretch the new muscle. Strait up Ruby, not Rails(want to establish a good base first) Any suggestions?
ABK has quit [Read error: Connection reset by peer]
awestroke has joined #ruby
ABK has joined #ruby
<burgestrand> Jonah11_: activesupport file to require is "active_support"
jcaudle has quit [Quit: jcaudle]
<burgestrand> burgestrand: you don’t require the gem name, you require files in the gem, and the file for activesupport is "active_support.rb"
changedNicks has joined #ruby
<burgestrand> (you can require other files in it as well, but that’s the one you tried to require)
dakine has quit [Quit: Leaving]
<burgestrand> lxsameer: no, no docstrings in the way that ruby have a default way of extracting them. There are standards for commenting methods, however.
dakine has joined #ruby
<lxsameer> burgestrand: thanks man
c0rn_ has quit [Quit: Computer has gone to sleep.]
<Jonah11_> Ryhnn, projecteuler.net
<burgestrand> lxsameer: rdoc (is in ruby standard library), yardoc (popular for a while now, http://yardoc.org/) and tomdoc are the ones I see in the wild
<Jonah11_> burgestrand, ty.
<burgestrand> lxsameer: they are different styles of commenting things
c0rn_ has joined #ruby
sent-hil has joined #ruby
changedNicks has quit [Changing host]
changedNicks has joined #ruby
<Ryhnn> Jonah11_: I've done quite a bit of project euler in java already, rather bored with it.
<burgestrand> lxsameer: yardoc have an API for extracting documentation, querying it, and reading it’s metadata but it’s not commonly used
n1x has joined #ruby
<lxsameer> burgestrand: thanks, let me read about them
daniel_- has joined #ruby
flype has quit [Quit: Computer has gone to sleep.]
changedNicks is now known as sweet_kid
<burgestrand> lxsameer: and finally, pry (an alternative to the ruby default interpreter irb — http://pry.github.com/) has a command to show you the documentation for ruby methods (and some C methods, if you are using pry-doc gem)
havenn has quit [Remote host closed the connection]
sailias has joined #ruby
timonv has joined #ruby
<lxsameer> burgestrand: i like pry
<Jonah11_> Ryhnn, I'd try your questoin on http://programmers.stackexchange.com/ if no one else here answers
<burgestrand> lxsameer: so do I :)
<atmosx> burgestrand: i've read about pry, is it any good?
<burgestrand> atmosx: yes
<atmosx> I'll try to use it
<atmosx> stackexchagne is awesome
<burgestrand> Ryhnn: make something for yourself, or for somebody else
whaley has joined #ruby
<burgestrand> Ryhnn: just making some shit up rarely works, there’s always people in here asking for "WHAT TO CODE?"
mklappstuhl has joined #ruby
morozovm has quit [Quit: morozovm]
havenn has joined #ruby
heisenmink has joined #ruby
manizzle has quit [Ping timeout: 276 seconds]
kpshek has quit []
<atmosx> to add text to a file it's File.open(filename, 'w+') {|f| f.write(word)} ??
flype has joined #ruby
flype has quit [Client Quit]
Astral has joined #ruby
vectorshelve has quit [Ping timeout: 245 seconds]
<Ryhnn> burgestrand, trying to find something new to code is always a problem. Already converted most of my old admin scripts, its not the same as writing something new.
<linnea> is it possible to store in one hash this data http://pastebin.com/LA4HAKeB ?
Astral is now known as Guest76085
flype has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<burgestrand> linnea: yes
sent-hil has quit [Remote host closed the connection]
brianpWins has joined #ruby
kirun has joined #ruby
hbpoison has joined #ruby
emmanuelux has joined #ruby
<burgestrand> you could store it in just a string as well but it would likely not be very useful
psycho_one has joined #ruby
<burgestrand> how you store it depends on what you are planning to do with it
<linnea> burgestrand: I need to be able to call dna for certain name
flype has quit [Client Quit]
<burgestrand> linnea: names are unique?
<linnea> burgestrand: yeah
sent-hil has joined #ruby
therod has joined #ruby
<burgestrand> linnea: then I would store it in a hash that maps { name => { key, name, dna, protein } }
awestroke has quit [Ping timeout: 260 seconds]
<burgestrand> linnea: you could then look it up by proteins[name] (for example)
chriskk has quit [Quit: chriskk]
Guest4864 has quit [Ping timeout: 268 seconds]
<linnea> burgestrand: yeaaaah! I haven't found any help for that on net.. all hash tutorials and info are simple stuff dont go depper
araujo has quit [Ping timeout: 260 seconds]
chrishunt has quit [Quit: Leaving...]
dgonz has quit [Quit: dgonz]
<burgestrand> linnea: depper than what?
rakl has quit [Quit: sleeping]
Mon_Ouie has quit [Ping timeout: 244 seconds]
<burgestrand> linnea: sorry, deeper, can't read and type at the same time
<linnea> burgestrand: how would I for example print things "name: dna then next one and so on
Mon_Ouie has joined #ruby
<linnea> hash.each do?
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
<burgestrand> linnea: assuming you have your hash, you would loop over it with hash.each { |name, info| puts "#{info[:name]}: …" }
hbpoison has quit [Ping timeout: 260 seconds]
erichmeng is now known as erichmenge
ernad has joined #ruby
alvaro_o has joined #ruby
cdzombak has quit [Ping timeout: 276 seconds]
<burgestrand> linnea: a hash is just a key => value storage, like a table with two columns, except your first column (keys) is your name, and your second column (values) is itself a table where the keys are what information it is (key, name, protein, dna) and the value is the actual value
<burgestrand> linnea: I don’t want to write the code for you since it sounds like you need to do it yourself
helichopter has joined #ruby
RubyRails has joined #ruby
<linnea> burgestrand: I think I can again try myself.. I was trying to create hash with "multiple columns"
cdzombak has joined #ruby
<linnea> that hash map is new term for me. but I think I can find info with that
<burgestrand> linnea: you can’t, but you can create a hash where the values are themselves hashes
ABK has quit [Read error: Connection reset by peer]
<mr-rich> rking: if you have a minute, quick question: Once I have a soap result, how do I extract the returned value?
chriskk has joined #ruby
ABK has joined #ruby
swarley has joined #ruby
anderse has quit [Quit: anderse]
BSaboia__ has quit [Read error: Connection reset by peer]
Servidorv has quit [Quit: Pull the pin and count to what?]
margle has quit [Quit: Computer has gone to sleep.]
darthdeus has joined #ruby
psycho_one has quit [Remote host closed the connection]
<burgestrand> linnea: just like you can store a string in a hash, { "Cow" => "Moo", "Cat" => "Miau" }, you can store numbers, { "weight" => 13, "height" => 130 }, and pretty much any other object like an array { "dates" => [1, 2, 3, 4, 5, 6], "ticket_numbers" => [23, 10, 20, 10] }, or a hash
margle has joined #ruby
<burgestrand> anyhow I’m off, gl
Xeago has joined #ruby
rippa has quit [Ping timeout: 244 seconds]
<swarley> Any object*
<RubyRails> Hi, I can't run a rake task because of this error:
<RubyRails> libruby.so.1.9: cannot open shared object file: No such file or directory - /home/mrdeploy/newce.logmycalls.com/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2/mysql2.so
anderse has joined #ruby
<RubyRails> but i have that file there
rakl has joined #ruby
<RubyRails> any ideas?
<lxsameer> does require method loads a rb file in same directory ?
kpshek has joined #ruby
chessguy has joined #ruby
<burgestrand> lxsameer: no, given an absolute path it uses that, given a relative path it looks in all directories in $LOAD_PATH (it's an array) and searches those until it finds a match
rming has quit [Remote host closed the connection]
<burgestrand> now going for real, bb ^^
<swarley> To load a file in the same directory you have to prefix the name with ./
<burgestrand> ^ usually a bad idea if you run the script from another directory that won’t work
ABK has quit [Read error: Connection reset by peer]
<burgestrand> I'm bad at leaving
<swarley> Assuming you execute in the same directory
<lxsameer> burgestrand: so current current working directory is not in $LOAD_PATH
ukwiz has quit [Quit: Leaving]
ABK has joined #ruby
<burgestrand> lxsameer: it was in ruby 1.8, but was removed in ruby 1.9 for security reasons
Ankhers has joined #ruby
<lxsameer> burgestrand: aha thanks
<burgestrand> lxsameer: you can modify the load path yourself if you like, it is mutable
Tearan has joined #ruby
flype has joined #ruby
<lxsameer> burgestrand: thanks
<burgestrand> lxsameer: $LOAD_PATH.unshift(".") will make relative requires look in the current working directory first of all
<swarley> Otherwise $:.unshift File.expand_path(File.dirname __FILE__)
<burgestrand> lxsameer: there is also require_relative, which only works in ruby 1.9+, that works from the current file
whaley has quit [Quit: o/]
<swarley> I would personally just use what I just posted
<burgestrand> lxsameer: most often people just find the root to the current file (File.dirname(__FILE__)) and go somewhere from there
<swarley> And them require the filter normally
whaley has joined #ruby
<swarley> File
<burgestrand> lxsameer: like what swarley said
manizzle has joined #ruby
<lxsameer> thanks guyes
<burgestrand> don’t do that in gems though, modifying load path in gems is annoying and evil
apok has quit [Read error: Connection reset by peer]
<Hanmac> there is an reason why "." is not in the load path anymore ... and the guys who dont respect that are dump
<havenn> linnea: You could alternatively use a Struct if your columns are always the same, e.g.: https://gist.github.com/3954864
apok has joined #ruby
geekbri_ has joined #ruby
daniel_- has quit [Ping timeout: 245 seconds]
geekbri_ has quit [Remote host closed the connection]
sent-hil has quit [Remote host closed the connection]
rabidpraxis has quit [Remote host closed the connection]
Katniss has quit [Ping timeout: 260 seconds]
sent-hil has joined #ruby
<swarley> Im in favor of using the solution I posted. I do that in my main executable so I can require local project files throughout
Nisstyre has joined #ruby
glyytchy has quit [Quit: glyytchy]
<swarley> Or main library file if that's the case
geekbri has quit [Ping timeout: 244 seconds]
daniel_- has joined #ruby
<havenn> linnea: Just updated gist above with iteration example.
craigp has quit [Quit: craigp]
<linnea> havenn: ah thanks, that looks useful too
<havenn> Err, I called my array a hash >.> Need more coffee...
Katniss has joined #ruby
<linnea> :)
<atmosx> coffee, I don't like coffee
<atmosx> I might one of a kind, like Sheldon Cooper
<havenn> atmosx: Heresy!
<atmosx> havenn: I know, it's embarassing but I don't like to force myself for small things
<havenn> atmosx: Do you like the taste of beer?
irleif has joined #ruby
<havenn> atmosx: Cilantro?
jarred has joined #ruby
veinofstars has joined #ruby
<atmosx> havenn: no, I'm in a country where everyone drinks litres of beer and I dislike it
<swarley> I need to work on my library, sigh
<atmosx> havenn: I like coca-cola, does it count?
<atmosx> and sweet hot chocolate!
<atmosx> Also I like girls!!!
jenrzzz has quit [Ping timeout: 265 seconds]
ABK has quit [Read error: No route to host]
<havenn> atmosx: I only agree with you on the last two.
<havenn> atmosx: A lot of taste is genetic. http://www.nytimes.com/2010/04/14/dining/14curious.html
<linnea> i like boys :x
<linnea> I wouldn't be able to code my program without freenode :D it's amazing how much help you can get from here
<havenn> As long as we agree on liking Ruby, the rest is trivial. =P
sent-hil has quit [Remote host closed the connection]
skipper has joined #ruby
sent-hil has joined #ruby
glyytchy has joined #ruby
skipper is now known as Guest80278
c0rn_ has quit [Quit: Computer has gone to sleep.]
<linnea> yeah I'm liking ruby. I found it via rails girls.
<havenn> Seems like a lot of geneticists fall backwards into coding!
kil0byte has joined #ruby
sent-hil has quit [Remote host closed the connection]
dakine has quit [Read error: Connection reset by peer]
dakine has joined #ruby
daniel_- has quit [Ping timeout: 272 seconds]
<lxsameer> a concept question: how should i separate my classes in my rb files in a gem ?
swarley_ has joined #ruby
<atmosx> linnea: r u gay?
PragCypher has joined #ruby
Morkel has joined #ruby
sent-hil has joined #ruby
PragCypher has quit [Read error: Connection reset by peer]
<atmosx> no offence, I seriously have no issues with gay ppl.
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<linnea> atmosx: no
<atmosx> linnea: u sure?
<havenn> atmosx: If she is into guys, that means not gay.
<atmosx> I dislike coffee
<atmosx> I mean, I said it
<havenn> atmosx: Mmm.
<linnea> atmosx: I have no issues with no coffee ppl
c0rn_ has joined #ruby
<atmosx> linnea: good to know! :D
chrishunt has joined #ruby
riley526 has joined #ruby
<linnea> but I'm not really sure if I'm gay.
Araxia_ has joined #ruby
caleb_io has quit [Quit: caleb_io]
Guest80278 has quit [Ping timeout: 245 seconds]
riley526 has left #ruby [#ruby]
<linnea> but havenn got it right
Solnse has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Araxia_ is now known as Araxia
Serial_Killer_C has quit [Remote host closed the connection]
<atmosx> Guys, I want to look-up a web-site first and then I'd like to make about 407.000 google requests in order to put some sort of 'tag' into keywords
theRoUS|mtg is now known as theRoUS
<atmosx> you think google will have a problemw ith that?
<havenn> lxsameer: Each class in its own file. Each concern in its own class. Minimal logic in /lib/app_name.rb and rest of classes in /lib/app_name/classes.rb. Not sure I quite understand the question.
n1x has quit [Quit: 'night!']
<shevy> atmosx that's a lot
carloslopes has quit [Remote host closed the connection]
robertotauille has quit [Quit: Leaving...]
<shevy> atmosx I'd think google would have something in place to prevent that perhaps
<havenn> lxsameer: I shoulda said class_name_here.rb, I mean separate files.
<shevy> atmosx, linnea is learning bioruby :)
<lxsameer> havenn: so if i want to have more classes i have to create a app_name and put them into it ?
<shevy> and shoes at the same time (for some reason)
<atmosx> shevy: yeah me too, how to deal with this? maybe wait for like 10 seconds between requests?
Neomex has quit [Quit: Neomex]
marius has joined #ruby
<havenn> lxsameer: Yes, that is the convention.
<shevy> atmosx hmm dunno, you could try that too, 407.000 that sounds like really much
<shevy> I dont think I ever had to do that
<shevy> not sure how many other folks had to :)
sjuxax has left #ruby [#ruby]
<lxsameer> haven thanks man
RubyRails has left #ruby [#ruby]
<linnea> but but shoes is great!
<havenn> lxsameer: No prob. Happy gem cutting!
<linnea> when it is working..
<shevy> hehe
<shevy> yeah perhaps
<shevy> I just found it a big combination
<shevy> I went to ruby-gnome only after I understood the basics of ruby
<shevy> learning both ruby and a toolkit at the same time... I would be too lazy to try this these days :)
<linnea> I want to first do something and then learn more :P
<shevy> hehehe
Solnse has quit []
craigp has joined #ruby
<linnea> more like web design approach
<linnea> first design site, then code it
arielpts has quit [Excess Flood]
rkneufeld has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Tearan has quit [Quit: Sleepy Badger....]
<havenn> lxsameer: I like bundler's gem structure: bundle gem gem_name_here
arielpts has joined #ruby
caleb_io has joined #ruby
<lxsameer> havenn: nice, i'm reading a tutorial about that now
Solnse has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
Solnse has quit [Client Quit]
Araxia has quit [Read error: Connection reset by peer]
caleb_io has quit [Client Quit]
Serial_Killer_C has joined #ruby
Araxia has joined #ruby
mensvaga has quit [Quit: Leaving.]
<havenn> lxsameer: I really like gem-release too. I'm lazy and getting the git-commit, tag update, version update, build and push is win!: https://github.com/svenfuchs/gem-release
<atmosx> shevy: I could route all requests through Tor
<atmosx> shevy: but I think it will take a lifetime
iamjarvo has quit [Quit: Computer has gone to sleep.]
<lxsameer> havenn: let me read about that too
c0rn_ has joined #ruby
nohonor has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
michael_mbp has joined #ruby
<atmosx> let's see... 48 days
<michael_mbp> how can I save the output of a case statement?
<atmosx> if I put a gap of 10 seconds between them
<atmosx> it's acceptabel.
<michael_mbp> seems it's implicit return based?
<canton7> michael_mbp, output = case blah .......
<havenn> michael_mbp: saved_var = case.../
Solnse has joined #ruby
<michael_mbp> ha cheers!
<atmosx> shevy: but if I put a 5 second gap.. you think is a problem?
jarred has quit [Ping timeout: 240 seconds]
<havenn> More excited about Passenger 4 or Puma?
<shevy> atmosx dunno... I think so, they probably may count in time intervals anyway
carloslopes has joined #ruby
Tearan has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
<x82_nicole> Can someone explain what "describe" means in Ruby? Got some code that says "describe whatever do .. end"
daniel_- has joined #ruby
<havenn> x82_nicole: It is spec style testing, take a look at the "Specs" section of minitest: https://github.com/seattlerb/minitest
<canton7> x82_nicole, it's a function
nobitanobi has joined #ruby
irleif has joined #ruby
HabeasPorpoise has quit [Quit: This computer has gone to sleep]
<x82_nicole> Ahh, so you use it when you want to test things out?
mib_mib_ has joined #ruby
<canton7> it's defined by the minitest library. You use it if you're using minitest
<havenn> x82_nicole: Yeah, some really popular testing libraries use it, mostly rspec then minitest/spec.
artnez has joined #ruby
shtirlic has joined #ruby
<x82_nicole> Alright, cool. Just going through a huge rails app, googling everything I don't know. :p
<havenn> x82_nicole: Rspec is more widely used, but minitest/spec is included in Ruby.
imami|afk is now known as banseljaj
<nobitanobi> I have a question... If I have a hash like this: { "peanut" => "food", "ipod" => "electronics", ....} ... If I look for "ipod", is the lookout always O(1) ?
<nobitanobi> *lookup complexity
apeiros_ has joined #ruby
<x82_nicole> nobitanobi, just learned about hashes the other day, haha. What is O(1)?
<mib_mib_> hi guys, i'm profiling my application using ruby-prof, can someon help me interpret the results? https://gist.github.com/57b0dd0c11620f8edadf - specifically - i on line 38 it says 1.26 seconds spent in method_missing
manizzle has quit [Ping timeout: 244 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<canton7> mib_mib_, I'm not familiar with that output format, but method_missing will be doing other method calls
shadoi has joined #ruby
c0rn_ has joined #ruby
<nobitanobi> non ruby related...Do you know of any API that given a word would tell me if it's food related or not?
<shevy> lol
<havenn> nobitanobi: Here is the hash.c for Hash#[]: https://gist.github.com/3955113
<shevy> one of the best questions ever asked here
miphe has joined #ruby
pskosinski has quit [Quit: A few unofficial Red Eclipse 1.3.1 (r4131) servers: http://altred.tk/toggle.rb]
<nobitanobi> shevy: I know
<nobitanobi> haha
<nobitanobi> havenn: thanks.
<Mon_Ouie> The actual complexity depends more on the hashing function
caleb_io has joined #ruby
<havenn> Over my head!
swarley has quit [Ping timeout: 272 seconds]
<Mon_Ouie> Also, it will need to call String#eql? to ensure there were no hash collisions, meaning lookup complexity does end up depending on the size of the keys
<nobitanobi> Mon_Ouie: fair enough...thank you.
anderse has quit [Quit: anderse]
<nobitanobi> I am trying to find a way that given a sentence, know if I can classify them in food/electronics/music. Using some kind of keywords dictionary.
pskosinski has joined #ruby
<ernad> exit
ernad has quit [Quit: leaving]
aquaranto has quit [Remote host closed the connection]
billy_ran_away has joined #ruby
s0ber has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
<billy_ran_away> Anyone know of an elegant of way to collect the string output of an array of methods on an array of objects?
Nanuq has quit [Ping timeout: 245 seconds]
Isis has joined #ruby
nitti has joined #ruby
<Mon_Ouie> A simple way to do that would be to have your program read a lot of texts you know are related to one of those topics to build a probably table
<Mon_Ouie> Then you can compute how likely it is for a new text to be related to one of those topics
<apeiros_> *probability
<billy_ran_away> For example… [:capitalize, :downcast, :upcase] and [ "foo", "bar", "baZ"]
<Mon_Ouie> Right :)
s0ber has joined #ruby
<nobitanobi> Mon_Ouie: interesting
<apeiros_> a bayesian categorizer might be an idea
<nobitanobi> Mon_Ouie: seems machine learning
artnez has quit [Quit: artnez]
<apeiros_> billy_ran_away: see #send and #map
alejandro_ is now known as _alejandro
<apeiros_> or #zip
<apeiros_> Object#send, Array#map, Array#zip
<billy_ran_away> apeiros_: Perfect, thanks!
Isis has quit [Client Quit]
artnez has joined #ruby
mmealling has quit [Quit: Leaving.]
iamjarvo has joined #ruby
<havenn> nobitanobi: Google has an unofficial suggestion API that you could mine maybe? >.>: http://google.com/complete/search?output=toolbar&q=bacon,asparagus
kil0byte has quit [Ping timeout: 268 seconds]
jrajav has quit []
mib_mib_ has quit [Quit: Page closed]
<nobitanobi> havenn: thank you!!
<nobitanobi> apeiros_: this is really interesting: http://classifier.rubyforge.org/ -- Thanks for that idea.
amacgregor_osx has quit [Read error: Operation timed out]
postmodern has joined #ruby
mmealling has joined #ruby
<havenn> I love that google has suggestions for the terms "bacon" and "unicorn"... ["bacon-loving unicorns", "unicorns bacon wings", "bacon unicorn"
<billy_ran_away> apeiros_: This the most elegant you can think of? [ "foo", "bar", "baZ"].map { |string| [:capitalize, :downcast, :upcase].map { |method| string.send(method) } }.join(', ')
<havenn> People actually search for "bacon-loving unicorns"
JarJar has joined #ruby
krz has quit [Quit: krz]
alek_b has joined #ruby
instinkt has joined #ruby
<havenn> If they don't love bacon, how can we trust them?
<atmosx> uhm
<linnea> how long method keeps variable?
<nobitanobi> havenn: this is hilarious :D
cableray has joined #ruby
<linnea> I have problem that it only gives the newest
<havenn> nobitanobi: "god hates straight unicorns"
apok_ has joined #ruby
Nanuq has joined #ruby
<havenn> nobitanobi: I wish it returned JSON instead of XML, or at least prettier XML. >.>
sent-hil has quit [Remote host closed the connection]
sent-hil has joined #ruby
apok has quit [Ping timeout: 248 seconds]
apok_ is now known as apok
omg765 has joined #ruby
<atmosx> linnea: what's the problem?
amacgregor_osx has joined #ruby
<linnea> atmosx: ah that paste is missing line, but I tried to say @sequence.text = array2.to_s
geekbri has joined #ruby
<linnea> but that gives only the last one
<apeiros_> linnea: array2 != @array2
robustus has quit [Quit: ZNC - http://znc.in]
riley526 has joined #ruby
sent-hil has quit [Remote host closed the connection]
<atmosx> yeah.. and isnt' a good practice putting all your instance variables in the upper part of the code?
<apeiros_> also, x = []; foo.each do |y| x << y end <-- just use map: x = foo.map { |y| y }
<atmosx> so that you can follow through? makes it more readable
mercwithamouth has quit [Ping timeout: 252 seconds]
jlwestsr has quit [Quit: Ex-Chat]
<havenn> So Ohm is really nice interface to Redis, and Redis is binary safe... so I'm thinking of marshaling and storing Ruby Objects in Redis. Sane?
<apeiros_> and constructing a new class on every invocation of your method is not the best idea. create the Struct once, assign it to a constant, and use that.
hbpoison has quit [Ping timeout: 245 seconds]
<atmosx> apeiros_: can you explain to me, why array's '-' was insanely faster in comparing arrays than each.include?
<wca> havenn: as long as you're using yaml, and both the writer and reader use the same object definitions, it works fine.
<apeiros_> atmosx: because with a.each do b.include, you do a.length * b.length lookups
<linnea> apeiros_: hmm true, that struct is blanking the data everytime
<apeiros_> atmosx: with Array#- you only do a.length lookups
swarley_ has quit [Quit: Leaving]
swarley_ has joined #ruby
<havenn> wca: Was thinking I'd use Marshal instead of YAML, since I don't need it to be human readable.
sullenel has quit [Quit: Leaving.]
<havenn> wca: For serialization*
swarley_ is now known as swarley
nobitanobi has quit [Ping timeout: 245 seconds]
clj_newb has joined #ruby
<apeiros_> atmosx: Array#include? is a loop internally. it loops over every item in the array until it finds one which is == the value you pass it. so 2 nested loops -> O(n^2) (or actually n*m)
<wca> havenn: is Marshal that much more efficient that it's worth bothering?
medik has joined #ruby
<rking> Proposal %:, which acts like %w but for symbols instead of arrays. E.g.: %:|one two three| == [:one, :two, :three]
<swarley> i second
<apeiros_> wca: bench it. last I did, YAML was at least 3x slower than marshal.
<atmosx> yeah it's n*m
<wca> rking: you mean symbols instead of strings
<apeiros_> rking: you're late to the game
<rking> wca: Yes, I mean that.
<apeiros_> rking: %I is already accepted in ruby
<billy_ran_away> Why can a defined singleton method access the instance variables present when it was created?
* swarley throws caution to the wind
<rking> Yeah!
Nanuq has quit [Quit: leaving]
<rking> apeiros_: What does "I" stand for there?
<apeiros_> dunno. internal maybe?
<apeiros_> (to_sym was originally intern)
<havenn> wca: Marshal is an order of magnitude faster for serializing, but yeah for deserializing it is marginal.
<swarley> it still is in the C api
mercwithamouth has joined #ruby
<rking> apeiros_: Is it in 2.0 already?
<swarley> rb_intern("method_name")
<billy_ran_away> My attempt is here: http://cl.ly/KPGN
<apeiros_> rking: I think so
axl__ has joined #ruby
<apeiros_> billy_ran_away: you used a block with define_singleton_method?
<rking> apeiros_: Cool. Glad you were here to point that out. I'll call it the apeiros syntax when it comes out.
Araxia has quit [Read error: Connection reset by peer]
Araxia has joined #ruby
<apeiros_> rking: wasn't my suggestion, though
cakehero has quit [Quit: Computer has gone to sleep.]
<billy_ran_away> I'm attempting to define a singleton method :references? for a string instance and yet @methods is nil...
<rking> apeiros_: But you were the one that brought it up to me. ☺
axl__ has quit [Client Quit]
<billy_ran_away> apeiros_: Yea… would you have first defined a proc block then passed that proc as the 2nd argument to define_singleton_method?
xcvd`` has joined #ruby
<swarley> olawd
f0ster has joined #ruby
vonsar has quit [Quit: This computer has gone to sleep]
xcvd`` has quit [Read error: Connection reset by peer]
<f0ster> is this an appropriate channel for rails as well?
<billy_ran_away> I left a typo in that last paste. http://cl.ly/KP4Y
<apeiros_> billy_ran_away: though, doesn't really matter if you really refer to @ivar variables and not local_variables
<swarley> more or less
<f0ster> I am new to ruby and rails. I've modified some code in both a controller and a model, but it doesnt appear my changes have taken effect. do I have to restart?
chessguy has quit [Remote host closed the connection]
<atmosx> f0ster: yeah
MoMo_ is now known as MoMo
<atmosx> it's good to restart when you apply changes
<atmosx> in general
nitti_ has joined #ruby
axl_ has quit [Ping timeout: 244 seconds]
<f0ster> atmosx: so I have to restart passenger
michael_mbp has quit [Ping timeout: 244 seconds]
<havenn> f0ster: Rails channel: #RubyOnRails
punkrawkR has joined #ruby
<billy_ran_away> apeiros_: So inside of the singleton method I defined, @methods should not be nil right?
nitti has quit [Ping timeout: 240 seconds]
<rking> apeiros_: Yep, been in 2.0 since a couple of months ago. "Feature #4985"
<f0ster> thx
<rking> apeiros_: How do you keep up on the news?
adamjleonar has joined #ruby
<havenn> f0ster: Yeah, restart Passenger - or use something like Thin and Shotgun in development to auto-reload on each request.
vonsar has joined #ruby
jrist is now known as jrist-afk
<apeiros_> rking: I don't
<f0ster> havenn: well that'd be nice but i'm in some crazy environment for maintenance
<f0ster> thanks for your help
<havenn> f0ster: g'luck!
Nanuq has joined #ruby
omry has quit [Read error: Connection reset by peer]
<billy_ran_away> apeiros_: Can you clarify what you said earlier? Should I have that instance variable available in the defined singleton method?
adamjleonard has quit [Ping timeout: 255 seconds]
f0ster has left #ruby [#ruby]
<atmosx> f0ster: I use unicorn but yeah, whatever you use you need to restart it in order to re-read the files.
<billy_ran_away> apeiros_: Cause it's not… http://cl.ly/KP3Y
pothibo has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Chryson has joined #ruby
invisime has quit [Quit: Leaving.]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
mwillhite has joined #ruby
timonv has quit [Remote host closed the connection]
sambio has joined #ruby
<billy_ran_away> apeiros_: Got go take the kids trick-or-treating, thanks for helping me earlier. Always appreciate your expertise, take it easy!
<rking> apeiros_: Hehe, you just happened across that one somewhere?
noxoc has joined #ruby
<swarley> Yup, i think i found my new project
instinkt has quit [Quit: leaving]
<apeiros_> billy_ran_away: I'm not really sure what your problem exactly is, but if you do obj.define_singleton_method, the defined method is executed in the context of obj, for that reason it will see all instance variables of obj
Mon_Ouie has quit [Ping timeout: 255 seconds]
<apeiros_> rking: I just know stuff. for no reason at all. it just happens.
Mon_Ouie has joined #ruby
sent-hil has joined #ruby
<billy_ran_away> apeiros_: Hmm…. maybe because I'm doing this whole thing within a proc itself for defining an Rspec matcher…
caleb_io has quit [Quit: caleb_io]
<apeiros_> that has no effect on the instance context of the method, no
geekbri has quit [Remote host closed the connection]
toadmecca has joined #ruby
heisenmink has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
<billy_ran_away> apeiros_: You get a chance to see my rdb paste?
dylanjha has quit [Quit: Leaving...]
jipiboily has joined #ruby
whaley has quit [Remote host closed the connection]
lurch_ has joined #ruby
yxhuvud has quit [Ping timeout: 252 seconds]
nitti_ has quit [Remote host closed the connection]
havenn has joined #ruby
billy_ran_away has quit []
Sieben has joined #ruby
adambeynon has joined #ruby
nitti has joined #ruby
<lurch_> hi, is there a way to programmatically access a multi-level hash using an array as the keys? e.g.: I have an array: a=[:a, :b, :c] and a hash that has a value at: h[:a][:b][:c] = 'blah'
spanner has quit [Ping timeout: 268 seconds]
Sieben has left #ruby [#ruby]
nanderoo has quit [Quit: Leaving.]
billy_ran_away has joined #ruby
gmci has joined #ruby
<apeiros_> there's no direct method. but you can use inject
k610 has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
<apeiros_> keys.inject(hash) { |h,k| h[k] } # get
jenrzzz has joined #ruby
<apeiros_> keys[0..-2].inject(hash) { |h,k| h[k] }[keys.last] = v # set
<apeiros_> you may want to reconsider your data structure instead, though. classes are cheap.
<billy_ran_away> apeiros_ just logged back on with my iphone incase you had a good answer...
sailias has quit [Quit: Leaving.]
<apeiros_> billy_ran_away: I didn't
<lurch_> apeiros_: thank you
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Serial_Killer_C has quit [Remote host closed the connection]
cakehero has joined #ruby
veinofstars has left #ruby [#ruby]
spanner has joined #ruby
Serial_Killer_C has joined #ruby
k610 has quit [Ping timeout: 244 seconds]
Serial_Killer_C has quit [Remote host closed the connection]
mmealling has quit [Quit: Leaving.]
k610 has joined #ruby
billy_ran_away has quit [Ping timeout: 255 seconds]
carloslopes has quit [Remote host closed the connection]
cakehero has quit [Client Quit]
gauloises has quit [Quit: leaving]
Ryhnn has quit [Ping timeout: 268 seconds]
nitti_ has joined #ruby
toadmecca has left #ruby [#ruby]
cakehero has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
apok has quit [Remote host closed the connection]
apok has joined #ruby
jipiboily has quit [Ping timeout: 245 seconds]
k610 has quit [Ping timeout: 272 seconds]
k610 has joined #ruby
lxsameer has joined #ruby
nitti has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
answer_42 has quit [Ping timeout: 276 seconds]
<Hanmac> http://www.youtube.com/watch?v=mBXGBbEbXZY << this Symbol video is cool
margle has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
nitti_ has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
k610 has quit [Ping timeout: 244 seconds]
flype has quit [Quit: Computer has gone to sleep.]
mwillhite has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
omry has joined #ruby
BrianJ has joined #ruby
k610 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
nopolitica has quit [Ping timeout: 255 seconds]
artnez has quit [Quit: artnez]
cakehero has quit [Quit: Computer has gone to sleep.]
dylanjha has joined #ruby
JarJar has quit [Quit: Leaving]
[Neurotic] has joined #ruby
Ankhers has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 260 seconds]
nitti has joined #ruby
maletor has joined #ruby
namidark has quit [Ping timeout: 244 seconds]
skcin7 has quit [Quit: Computer has gone to sleep.]
k610 has joined #ruby
sweet_kid has quit [Ping timeout: 260 seconds]
nitti has quit [Remote host closed the connection]
cakehero has joined #ruby
ned has joined #ruby
<ned> does anyone here use rush as their main shell?
jrist-afk is now known as jrist
cakehero has quit [Client Quit]
changedNicks has joined #ruby
x82_nicole has quit [Quit: Textual IRC Client: www.textualapp.com]
<ned> if so, i know this is a ruby channel so there'll be inherent skew, but can someone give me a pro/con against rush vs bash/fish/zsh ?
tommyvyo has joined #ruby
jipiboily has joined #ruby
<rking> ned: Hehe, it's not even close, my man.
<rking> zsh is golfed down beyond what Rush could possibly achieve
bbttxu has quit [Quit: bbttxu]
<rking> ned: And Pry has more than Rush. Just toss in a few shellish classes and you're ahead (in fact, I bet you could require the rush classes themselves.)
jipiboily has left #ruby [#ruby]
k610 has quit [Ping timeout: 272 seconds]
blacktulip has quit [Remote host closed the connection]
<rking> I think the use case of rush is that you can use it interactively to build Ruby code for later execution.
<ned> rking: hrm i use pry on a regular basis. whats your setup like?
Mon_Ouie has quit [Ping timeout: 244 seconds]
<rking> Which, again: Pry.
k610 has joined #ruby
_md has joined #ruby
<rking> ned: Can you be more specific with that question?
<ned> rking: well, i'm assuming you use either pry or rush as your default setup? what classes did you require to make it useable? or could you paste a 'dotfile' or equivalent so i can work off that
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ned> i realize it wont be as easy as just dropping in a few conf files and 'chsh'ing but still, having a blueprint to work off of helps
und3f has quit [Quit: Leaving.]
dekroning has quit [Ping timeout: 255 seconds]
Dave has joined #ruby
fumduq has quit [Quit: Linkinus - http://linkinus.com]
iamjarvo has quit [Quit: Computer has gone to sleep.]
Dave is now known as Guest23458
<havenn> ned: What platform are you working off of? Windows, OS X, linux?
<ned> havenn: linux
<havenn> ned: Distro?
<ned> ubuntu
<ned> a little bit of arch here and there when im feeling fiesty
dangerousdave has quit [Ping timeout: 244 seconds]
<rking> ned: I don't think it's ready for chsh by any means.
<rking> ned: It's just too syntax-heavy.
<ned> rking: well, i didnt mean to imply as much; just a direction to point me in, my friend
bigmcq77 has joined #ruby
thisirs has quit [Remote host closed the connection]
<havenn> ned: sudo apt-get install zsh; curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sudo sh
_md has quit [Client Quit]
<havenn> ned: gem install pry-full
<rking> ned: Yeah, it's cool. I like the idea. And I've thought about it as a goal as well, but I decided that it's more sensible to use various languages as the fit better.
hbpoison has joined #ruby
<havenn> ned: Pry with Zsh and oh-my-zsh is a lovely setup!
k610 has quit [Ping timeout: 272 seconds]
<ned> hmm
<ned> rking: hmm yeah hm fair enough
xorigin has quit [Quit: leaving]
elijah has joined #ruby
<havenn> ned: If you then add in the oh-my-zsh plugins for the commands you use, auto completion is yummy
elijah has left #ruby [#ruby]
k610 has joined #ruby
<havenn> ned: autojump is nice too
<ned> havenn: do you have a good screencast/guide for how this would ultimately turn out / what workflow to follow
Slivka has quit [Remote host closed the connection]
adamjleonar has quit [Ping timeout: 264 seconds]
flagg0204 has quit [Quit: leaving]
Araxia has joined #ruby
artnez has joined #ruby
<havenn> ned: This is a good example of what zsh oh-my-zsh can look like, depending on your theme (I like 'simple'): https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
<havenn> ned: And the Pry page has a good screencast and links: http://pryrepl.org/
<ned> havenn: much obliged
und3f has joined #ruby
<havenn> ned: I don't know of a good zsh globbing and jumping tutorial.
Morkel has quit [Quit: Morkel]
changedNicks has quit [Changing host]
changedNicks has joined #ruby
changedNicks is now known as sweet_kid
<havenn> ned: To get a good understanding of the oh-my-zsh plugins I'd recommend reading the plugin files: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins
hbpoison has quit [Ping timeout: 264 seconds]
<havenn> ned: And enable the ones you'd actually use.
<havenn> ned: In your .zshrc.
Dreamer3 has joined #ruby
noxoc has quit [Ping timeout: 255 seconds]
jonathanwallace has quit [Remote host closed the connection]
<havenn> ned: What text editor do you use?
k610 has quit [Ping timeout: 265 seconds]
<ned> emacs
k610 has joined #ruby
<havenn> ned: There are some great opinionated dot files, depending on what you consider ideal.
jonathanwallace has joined #ruby
mklappstuhl has quit [Ping timeout: 260 seconds]
und3f has quit [Client Quit]
<ned> noted
<havenn> ned: If you decide to stick with bash: bash-it
alem0lars has quit [Quit: quit]
<ned> i actually am currently using fish
<havenn> ned: aha
DrShoggoth has joined #ruby
<ned> ive played around with zsh (oh-my-zsh actually, with j) but it didnt strike my fancy for some reason
<ned> for a reason i cant quite articulate; just prejudice i suppose
lurch_ has quit [Quit: lurch_]
atmosx has quit [Quit: quiting...]
bwlang has left #ruby [#ruby]
<havenn> ned: I find j magical. There are only a couple oh-my-zsh plugins I care about.
<havenn> ned: To be fair, I haven't given fish a shot.
Vinz_ is now known as Vinz_`
jonathanwallace has quit [Ping timeout: 240 seconds]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
k610 has quit [Ping timeout: 264 seconds]
tvw has joined #ruby
sertaconay has joined #ruby
<havenn> ned: fish or fishfish?
bigmcq77 has joined #ruby
Vinz_` is now known as Vinz_
k610 has joined #ruby
nopolitica has joined #ruby
<ned> havenn: i'm unaware of the existence of fishfish, so fish?
nitti has joined #ruby
Monie has joined #ruby
<havenn> ned: Last I heard, fish development stalled but the fishfish fork was progressing (not sure): http://ridiculousfish.com/
<ned> oh huh. good to know. thanks
<havenn> ned: Trying out fishfish now. :)
k610 has quit [Ping timeout: 245 seconds]
<havenn> ned: I really like the parsing of man files for completions....
k610 has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
chrismcg is now known as zz_chrismcg
sweet_kid has quit [Ping timeout: 260 seconds]
Guest23458 has quit [Quit: Linkinus - http://linkinus.com]
mockra has joined #ruby
dangerousdave has joined #ruby
ddd has quit [Quit: Mountain Lion here I come. Disappoint me at your peril!]
changedNicks has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
nopolitica has quit [Ping timeout: 255 seconds]
nga4 has joined #ruby
badkins has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
robotmay has joined #ruby
sterNiX has quit [Ping timeout: 255 seconds]
k610 has quit [Ping timeout: 252 seconds]
nemesit|osx has quit [Quit: Linkinus - http://linkinus.com]
manizzle has joined #ruby
cdzombak has quit []
k610 has joined #ruby
statarb3 has quit [Quit: Leaving]
changedNicks has quit [Changing host]
changedNicks has joined #ruby
changedNicks is now known as sweet_kid
slainer68 has quit [Remote host closed the connection]
medik has quit [Quit: Leaving]
slainer68 has joined #ruby
sterNiX has joined #ruby
skcin7 has joined #ruby
robertotauille has joined #ruby
k610 has quit [Ping timeout: 256 seconds]
k610 has joined #ruby
anachronistic has left #ruby [#ruby]
chumpy_ has joined #ruby
slainer68 has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
ltsstar has joined #ruby
ltsstar has quit [Client Quit]
craigp has quit [Quit: craigp]
nohonor has quit [Quit: Leaving]
cousine has joined #ruby
BrianJ has quit [Quit: BrianJ]
namidark has joined #ruby
cousine has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
<lxsameer> how can i subclass Hash to have some fixed key names ?
philcrissman has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 245 seconds]
zz_chrismcg is now known as chrismcg
chussenot has joined #ruby
k610 has quit [Ping timeout: 256 seconds]
elico has quit [Quit: elico]
chriskk has quit [Quit: chriskk]
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
polysics_ has quit [Remote host closed the connection]
k610 has joined #ruby
alanp has quit [Read error: Connection reset by peer]
riley526 has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
alanp has joined #ruby
riley526 has joined #ruby
<apeiros_> lxsameer: Hash is an ordinary class. you subclass it like any other class.
Araxia has quit [Read error: Connection reset by peer]
Araxia_ has joined #ruby
<lxsameer> apeiros_: i know, but how can i make a key name fixed?
jumpingcloud has quit [Ping timeout: 255 seconds]
chriskk has joined #ruby
<apeiros_> I have no idea what you mean by that
<lxsameer> apeiros_: i want to each instance of my class have two key , that user can't change their name
jumpingcloud has joined #ruby
stopbit has quit [Quit: Leaving]
<apeiros_> sounds like totally wrong use of hash
<apeiros_> you may want to use a Struct instead
k610 has quit [Ping timeout: 256 seconds]
<apeiros_> X = Struct.new(:key1, :key2)
Juul has joined #ruby
<lxsameer> apeiros_: hmmmm ok thanks man
Araxia_ has quit [Read error: No route to host]
k610 has joined #ruby
mmitchell has quit [Remote host closed the connection]
Araxia has joined #ruby
baphled has joined #ruby
nitti has quit [Remote host closed the connection]
fantazo has joined #ruby
justinmcp has joined #ruby
caleb_io has joined #ruby
cakehero has joined #ruby
hbpoison has joined #ruby
<dpk> is there any production-quality library for using POSIX semaphores in Ruby?
cakehero has quit [Client Quit]
<dpk> There's process_shared, but it's still in alpha
jumpingcloud has quit [Ping timeout: 240 seconds]
_alejandro has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 245 seconds]
BrianJ has joined #ruby
cakehero has joined #ruby
cakehero has quit [Client Quit]
jeffreybaird has quit [Quit: jeffreybaird]
nadirvardar has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
BrianJ has quit [Client Quit]
jeffreybaird has joined #ruby
jumpingcloud has joined #ruby
iamjarvo has joined #ruby
cakehero has joined #ruby
iamjarvo has quit [Client Quit]
jeffreybaird has quit [Client Quit]
Russell^^ has quit [Quit: Russell^^]
eataix has joined #ruby
iamjarvo has joined #ruby
pskosinski has quit [Ping timeout: 272 seconds]
bradleyprice has quit [Remote host closed the connection]
k0nichiwa has joined #ruby
robertotauille has quit [Quit: Leaving...]
Virunga has quit [Remote host closed the connection]
jumpingcloud has quit [Ping timeout: 244 seconds]
<RubyPanther> dpk: there is sysvipc
jslowe has quit [Quit: Leaving]
berserkr has quit [Quit: Leaving.]
jumpingcloud has joined #ruby
<RubyPanther> dpk: it can also be done by hand via fcntl 0.x
<dpk> RubyPanther: ok
<dpk> RubyPanther: thanks
h4mz1d has joined #ruby
gabrielrotbart has joined #ruby
Xeago has quit [Remote host closed the connection]
skcin7 has quit [Quit: Computer has gone to sleep.]
jumpingcloud has quit [Ping timeout: 255 seconds]
chriskk has quit [Quit: chriskk]
dpatel has quit [Quit: dpatel]
jumpingcloud has joined #ruby
theRoUS has quit [Ping timeout: 255 seconds]
forced_request has joined #ruby
sepp2k has quit [Remote host closed the connection]
gabrielrotbart has quit [Remote host closed the connection]
chrishunt has quit [Quit: Leaving...]
joshman_ has quit [Ping timeout: 244 seconds]
monkegjinni has quit [Remote host closed the connection]
Cultofmetatron has joined #ruby
robertotauille has joined #ruby
chrishunt has joined #ruby
gabrielrotbart has joined #ruby
slainer68 has joined #ruby
_main_ has joined #ruby
dpatel has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
__main__ has quit [Ping timeout: 256 seconds]
skcin7 has joined #ruby
kirun has quit [Quit: Client exiting]
hbpoison has quit [Ping timeout: 252 seconds]
mwillhite has joined #ruby
_main_ is now known as __main__
mwillhite has left #ruby [#ruby]
* dpk . o O ( alternatively, it would be nice if Ruby's Mutex worked with this stuff to work cross-platform )
emmanuelux has quit [Remote host closed the connection]
bbttxu has joined #ruby
allyraza has quit [Quit: Leaving]
<RubyPanther> Matz came from a fork and external IPC world
timonv has quit [Remote host closed the connection]
lavois has joined #ruby
slainer68 has quit [Ping timeout: 246 seconds]
elico has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
<heftig> mvm will work similarly, i guess
Pip has joined #ruby
<Pip> Can I define a function within another function?
dpatel_ has joined #ruby
dpatel_ has quit [Client Quit]
miphe has quit [Remote host closed the connection]
<havenn> Pip: nope, no methods defined within methods - but you can call a method that is outside the method within a method
lxsameer has quit [Quit: Leaving]
kpshek has quit []
glyytchy has quit [Quit: glyytchy]
<Pip> havenn, Python can do that
dpatel has quit [Ping timeout: 244 seconds]
Slivka has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
<yaymukund> Paradox: I figured out my "where's this module defined?" question from yesterday. it turned out to be a rails thing... :[ If you put a model in app/models/beta/user.rb, Rails will complain unless user.rb defines Beta::User. If you define Beta::User < User in models/beta/user.rb, Rails creates the Beta module as part of its model loading process somehow. haven't dug in past that.
<yaymukund> makes sense now though.
fantazo has quit [Ping timeout: 255 seconds]
<havenn> Pip: Yeah, Python works that way but in Ruby it would be unseemly.
<Pip> fine
darthdeus has quit [Quit: Leaving...]
Tearan has quit [Quit: Sleepy Badger....]
jamw has quit [Ping timeout: 264 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
<havenn> Pip: Ruby just uses object oriented design for method lookup. You get the same result, but we just don't think of methods as nested.
<Pip> So which one is better?
<havenn> Pip: Methods are callable from inside methods. This is #ruby channel, so Ruby is better... >.>
v0n has quit [Ping timeout: 244 seconds]
straind` has quit [Read error: Connection reset by peer]
<Pip> Alright
<sent-hil> is there a simple way to get the body of a proc?
straind has joined #ruby
<havenn> Pip: On that subject.... pip needs an update all: pip update all
<havenn> Pip: Why package manager can no update packages?
chumpy_ has quit [Remote host closed the connection]
<havenn> Pip: I thought I was being trolled at first, but pip really has no way to list installed packages or to update them without hax.
<havenn> Pip: I just find that mind boggling. Patch to add update is like years old.
mercwithamouth has joined #ruby
<havenn> The equiv of 'gem update' is (no joke): pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U
<Pip> :D
khoa has joined #ruby
khoa has quit [Client Quit]
axl__ has joined #ruby
chrishunt has quit [Quit: Leaving...]
chumpy_ has joined #ruby
chrishunt has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
samphippen has joined #ruby
chussenot has quit [Quit: chussenot]
Cultofmetatron has joined #ruby
<havenn> I so want to troll this thread...: https://github.com/pypa/pip/issues/59
mercwithamouth has joined #ruby
<havenn> "So I hear Pip has no upgrade?"
tpe11etier has quit [Ping timeout: 252 seconds]
elico has quit [Quit: elico]
straind has quit [Ping timeout: 252 seconds]
levity_island has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
nari_ has joined #ruby
<levity_island> hey, pry question: if i'm in a session that i started with binding.pry, how can i turn off that breakpoint and continue?
<havenn> levity_island: Lots of #pry folk here, but #pry channel is hopping.
<levity_island> oh thanks havenn
chrismcg is now known as zz_chrismcg
uris has quit [Quit: Leaving]
gabrielrotbart has quit [Remote host closed the connection]
vonsar has quit [Quit: This computer has gone to sleep]
SCommette has joined #ruby
gabrielrotbart has joined #ruby
SCommette has quit [Client Quit]
straind has joined #ruby
nitti has joined #ruby
jeffreybaird has joined #ruby
butblack has joined #ruby
justinmc_ has joined #ruby
GoGoGarrett has joined #ruby
jeffreybaird has quit [Client Quit]
nitti has quit [Ping timeout: 244 seconds]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
banseljaj is now known as imami|afk
gridaphobe has joined #ruby
justinmcp has quit [Ping timeout: 244 seconds]
richardjortega_ has joined #ruby
butblack has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 245 seconds]
hbpoison has joined #ruby
apeiros_ has quit [Remote host closed the connection]
kaushik__ has joined #ruby
richardjortega has quit [Ping timeout: 260 seconds]
richardjortega_ is now known as richardjortega
hakunin has quit [Ping timeout: 240 seconds]
Cultofmetatron has quit [Remote host closed the connection]
marius has quit []
bemson has quit [Quit: bemson]
butblack has joined #ruby
glyytchy has joined #ruby
chriskk has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
sertaconay has quit [Remote host closed the connection]
elico has joined #ruby
mercwithamouth has joined #ruby
r1ddl3r has joined #ruby
elico has quit [Client Quit]
Trioke_ has joined #ruby
mmealling has joined #ruby
<havenn> Hypothesis: Rubyists are more likely to sleep in hammocks, futons, and other alternative bedding than Pythonistas. (Our package manager also actually works.)
<havenn> Despite dramz, RubyGems is fantastic. :)
mmealling has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
ffranz has quit [Quit: Leaving]
mmealling has joined #ruby
stkowski has quit [Quit: stkowski]
anachronistic has joined #ruby
Trioke has quit [Ping timeout: 260 seconds]
anachronistic has quit [Client Quit]
jenrzzz has joined #ruby
elico has joined #ruby
elico has quit [Client Quit]
eboaz has quit [Quit: Leaving]
r1ddl3r has quit [Quit: Leaving.]
hbpoison has quit [Ping timeout: 268 seconds]
freeayu has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Remote host closed the connection]
jjang has joined #ruby
glyytchy has quit [Quit: glyytchy]
chriskk has quit [Quit: chriskk]
tommyvyo has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
slainer68 has joined #ruby
rubynewb has joined #ruby
<rubynewb> Hi all
SCommette has quit [Client Quit]
<rubynewb> Anyone willing to check out some newb code?
<havenn> rubynewb: Paste a gist!
<dpk> gist a paste!
clj_newb has quit [Ping timeout: 244 seconds]
Nanuq has quit [Read error: Operation timed out]
<havenn> pastegistepastegist
horofox has joined #ruby
<rubynewb> That's cool - I haven't used gist before
lavois has quit [Ping timeout: 260 seconds]
<rubynewb> The problem I'm having is that the chapter numbers is not increasing
straind` has joined #ruby
<rubynewb> I should've checked my code before I dumped it
<havenn> rubynewb: You probably need to have chapter be and instance variable (@chapter) instead of local variable (chapter).
<havenn> an*
<yaymukund> rubynewb: you can edit gists
<havenn> rubynewb: And add multiple files to a single gist, which is great.
<rubynewb> That is cool
slainer68 has quit [Ping timeout: 276 seconds]
<rubynewb> is there a big difference between an instance variable and a local variable?
straind has quit [Ping timeout: 252 seconds]
butblack has quit [Quit: butblack]
`brendan has joined #ruby
<havenn> rubynewb: My battery is about to die, but the difference is scope restriction and copies per object.
<havenn> rubynewb: Forget class variables and global variables, learn local variables and instance variables.
<rubynewb> Ok - I'll mess around with it and study up on them
<rubynewb> Thanks for the heads up
lkba has joined #ruby
straind` has quit [Ping timeout: 252 seconds]
<rubynewb> And that is why ruby is incredible
rasbonics has quit [Quit: rasbonics]
<rubynewb> I'll be back if Im still confused after this
<rubynewb> thx havenn
<havenn> rubynewb: You can safely ignore global variables, class variables, and constants (in that order) until necessary.
havenn has quit [Remote host closed the connection]
<rubynewb> sweet
butblack has joined #ruby
horofox has quit [Quit: horofox]
morozovm has joined #ruby
rubynewb has left #ruby [#ruby]
Nanuq has joined #ruby
swarley has quit [Read error: Connection reset by peer]
headius has quit [Quit: headius]
straind has joined #ruby
robotmay has quit [Ping timeout: 264 seconds]
swarley has joined #ruby
love_color_text has joined #ruby
Tearan has joined #ruby
Cultofmetatron has joined #ruby
chendo_ is now known as chendo
Cultofmetatron has quit [Remote host closed the connection]