nanoyak has quit [Quit: Computer has gone to sleep.]
<Mia>
and how can I fix it, and make it in a more clever way?
zeroNones has joined #ruby
<Wolland>
there are a lot of examples on stackoverflow, some one liners even
<Mia>
I've seen them, I think it doens't give an array but instead directly give the number
<Mia>
like "5th number of fibonacci"
oo_ has quit [Ping timeout: 258 seconds]
fold has quit [Ping timeout: 272 seconds]
<Wolland>
yeah true
<Andriamanitra>
i would just change line 2 to = {1,1} and line 3 n-1.times
<Mia>
hm
slyslick has quit [Ping timeout: 260 seconds]
northfurr has joined #ruby
zagorskij has joined #ruby
<Mia>
it works but it doens't look clever
Phrogz has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 244 seconds]
<Andriamanitra>
well you can't really do fibonacci series without having 2 numbers to start with
<havenwood>
in Dave Thomas talk i'm watching he suggests this is a pain in Ruby: [1, 2, 2, 2, 3, 4, 4, 5, 6, 6, 6, 6] #=> [1, {2=>3}, 3, {4=>2}, 5, {6=>4}]
kaspergrubbe has quit [Remote host closed the connection]
lw has joined #ruby
solo_ has quit [Quit: Leaving...]
axsuul has joined #ruby
crome has quit [Ping timeout: 245 seconds]
krisquigley has joined #ruby
crome has joined #ruby
Scotteh has quit [Ping timeout: 245 seconds]
amargherio has joined #ruby
Phrogz has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 272 seconds]
angusiguess has joined #ruby
bogeyd6 has quit [Ping timeout: 272 seconds]
mikepack has joined #ruby
stoned has joined #ruby
angusiguess has quit [Ping timeout: 244 seconds]
davasaurous has quit [Remote host closed the connection]
Sawbones has joined #ruby
Kricir has joined #ruby
cajone has joined #ruby
tectonic has joined #ruby
Kricir has quit [Ping timeout: 246 seconds]
justinmburrous has quit [Remote host closed the connection]
zorak8 has quit [Ping timeout: 245 seconds]
justinmburrous has joined #ruby
crome has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
patrick99e99 has joined #ruby
IteratorP has quit [Quit: Leaving...]
jonr22 has quit [Client Quit]
crome has joined #ruby
larsam has quit [Quit: Exit]
justinmburrous has quit [Ping timeout: 250 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cajone has quit [Ping timeout: 260 seconds]
tectonic has quit []
<Mia>
I'm habing hard time to understand the difference of a Proc and a Lambda
<Mia>
can anyone clarify this in a minimal way
patrick99e99 has quit [Ping timeout: 260 seconds]
Scripore has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
braincrash has quit [Quit: bye bye]
axsuul has quit [Read error: Connection reset by peer]
drawingthesun has quit [Read error: Connection reset by peer]
Phrogz_ has joined #ruby
justinmburrous has joined #ruby
<havenwood>
Mia: they differ in locality of return and argument arity
codeFiend has joined #ruby
<Mia>
oh that's why Proc takes the control
Phrogz_ has quit [Read error: Connection reset by peer]
<Mia>
does a block take the control for the return as well?
Phrogz_ has joined #ruby
Phrogz_ has joined #ruby
Phrogz_ has quit [Changing host]
Phrogz_ is now known as Phrogz
braincrash has joined #ruby
Cache_Money has joined #ruby
RichardLitt has joined #ruby
<havenwood>
Mia: for example if you're in a method and use the `return` keyword from a lambda you return from the lambda and keep running the method, but if you `return` from a proc it returns from the method and nothing after the proc is run.
<Mia>
okay
<Mia>
what if I return from a block
davasaurous has joined #ruby
sevvie has quit [Quit: leaving]
<havenwood>
like a proc
yfeldblu_ has quit [Remote host closed the connection]
<havenwood>
Mia: and for arity, a lambda will complain if you pass extra arguments but a proc will not complain
yfeldblum has joined #ruby
<havenwood>
a block will not complain
<Mia>
ok
<havenwood>
lambdas are strict arity like methods
<Mia>
o for general use, proc will be a better friend?
mary5030 has quit [Remote host closed the connection]
afei has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<havenwood>
Mia: for general use it doesn't matter
cajone has joined #ruby
<havenwood>
Mia: i tend to use lambdas, but you see plenty of procs
<havenwood>
Mia: the stabby lambda syntax is common but some folk dislike it. i like it, stab stab!
<havenwood>
-> do
<Mia>
lol
thomasxie has joined #ruby
Phrogz has quit [Remote host closed the connection]
spastorino has quit [Quit: Connection closed for inactivity]
fold has joined #ruby
Takle has joined #ruby
Phrogz_ has joined #ruby
Phrogz_ is now known as Phrogz
duper has quit [Remote host closed the connection]
duper has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
skammer3 has joined #ruby
thomasxie has left #ruby [#ruby]
codeFiend has quit [Quit: codeFiend]
zorak8 has joined #ruby
Takle has quit [Ping timeout: 260 seconds]
zeabra has joined #ruby
davasaur_ has joined #ruby
gilest has joined #ruby
codeFiend has joined #ruby
skammer3 has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 264 seconds]
gilest has left #ruby [#ruby]
gilest has joined #ruby
afei has quit [Ping timeout: 246 seconds]
codeFiend has quit [Client Quit]
davasaurous has quit [Ping timeout: 244 seconds]
greenride has joined #ruby
codeFiend has joined #ruby
benzrf is now known as benzrf|offline
benzrf|offline is now known as benzrf
krisquigley has joined #ruby
codeFiend has quit [Client Quit]
emocakes has quit []
msmith_ has joined #ruby
havenwood has joined #ruby
hmsimha_ has joined #ruby
havenwood has quit [Remote host closed the connection]
ramfjord has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
Guest21370 has quit [Ping timeout: 272 seconds]
AlexRussia has joined #ruby
krisquigley has quit [Ping timeout: 258 seconds]
justinmburrous has quit [Remote host closed the connection]
angusiguess has joined #ruby
justinmburrous has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
kenneth has joined #ruby
axsuul has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
krisquigley has joined #ruby
Sp4rKy has joined #ruby
Sp4rKy is now known as Guest19069
hmsimha_ has quit [Read error: Connection reset by peer]
angusiguess has quit [Ping timeout: 245 seconds]
boombadaroomba has joined #ruby
oo_ has quit [Remote host closed the connection]
justinmburrous has quit [Ping timeout: 260 seconds]
mattjbarlow has quit [Remote host closed the connection]
oo_ has joined #ruby
bmurt has quit []
tanath_ has joined #ruby
gilest has quit [Remote host closed the connection]
boombadaroomba has quit [Ping timeout: 245 seconds]
Kricir has joined #ruby
arescorpio has quit [Excess Flood]
larissa has quit [Quit: Leaving]
tanath has quit [Ping timeout: 264 seconds]
oo_ has quit [Remote host closed the connection]
zeabra has quit [Read error: Connection reset by peer]
ghostmoth has joined #ruby
Phrogz has quit [Remote host closed the connection]
smokingmeth has quit [Ping timeout: 246 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MaciejCzyzewski has joined #ruby
Schmidt has quit [Ping timeout: 244 seconds]
krisquigley has quit [Ping timeout: 260 seconds]
angusiguess has joined #ruby
justinmburrous has joined #ruby
msmith_ has joined #ruby
root3d has joined #ruby
davasaurous has joined #ruby
freerobby has quit [Quit: Leaving.]
angusiguess has quit [Ping timeout: 240 seconds]
therue has joined #ruby
zorak8 has quit [Ping timeout: 245 seconds]
iamcyberbird has joined #ruby
justinmburrous has quit [Ping timeout: 272 seconds]
Schmidt has joined #ruby
msmith_ has quit [Ping timeout: 272 seconds]
sinkensabe has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
Photism has quit [Read error: Connection reset by peer]
Photism has joined #ruby
kyb3r_ has joined #ruby
Kricir has joined #ruby
fgo_ has joined #ruby
mikepack has quit [Remote host closed the connection]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 260 seconds]
ghostmoth has joined #ruby
codeFiend has joined #ruby
gilest has joined #ruby
echooo has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
Kricir has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ruby
willgo has quit [Remote host closed the connection]
thomasxie has joined #ruby
willgo has joined #ruby
ghostmoth has quit [Ping timeout: 245 seconds]
boombadaroomba has joined #ruby
mpistone has joined #ruby
echooo1 has joined #ruby
karupa is now known as zz_karupa
kyb3r_ has quit [Ping timeout: 258 seconds]
ramfjord has joined #ruby
fgo has joined #ruby
justinmburrous has joined #ruby
kyb3r_ has joined #ruby
lxsameer has joined #ruby
Channel6 has quit [Quit: Leaving]
justinmb_ has joined #ruby
oo_ has quit [Remote host closed the connection]
echooo has quit [Ping timeout: 244 seconds]
Soda has quit [Read error: Connection reset by peer]
fgo_ has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
hiyosi has joined #ruby
justinmburrous has quit [Ping timeout: 260 seconds]
TieSoul has joined #ruby
codeFiend has quit [Quit: codeFiend]
codeFiend has joined #ruby
sinkensabe has joined #ruby
mikeg has joined #ruby
hiyosi has quit [Ping timeout: 260 seconds]
MaciejCzyzewski has joined #ruby
dx7 has quit [Remote host closed the connection]
dx7 has joined #ruby
work_op has joined #ruby
vinleod has joined #ruby
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
MaciejCzyzewski has quit [Ping timeout: 244 seconds]
dx7 has quit [Ping timeout: 240 seconds]
<epitron>
Hijiri: Array#<< is the same as Array#push
<epitron>
you'll find you use it much more frequently than you shift bits in ruby :)
<epitron>
it also appends to strings by modifying the string in-place
<epitron>
in case you like reallocs
betafive has joined #ruby
root3d has quit [Quit: Leaving]
tylersmith has quit [Ping timeout: 260 seconds]
<epitron>
but i never use that, because it's faster to collect all your string fragments in an array, and then .join them all at the end
AlexRussia has quit [Ping timeout: 244 seconds]
krisquigley has joined #ruby
ferr has joined #ruby
<epitron>
(and safer -- String#<< mutates the string object..)
skammer3 has joined #ruby
nanoyak has joined #ruby
jusmyth has joined #ruby
jusmyth has left #ruby [#ruby]
GinoMan has quit [Ping timeout: 245 seconds]
gtat12 has joined #ruby
<work_op>
in lisp, macros are AST -> AST transforms, so to speak. if i had a lisp frontend to ruby, would it be possible to implement runtime macros within ruby without having to craft a standalone executable?
<gtat12>
if @input is a string... what does this line do: @input = $'
emmesswhy has joined #ruby
krisquigley has quit [Ping timeout: 260 seconds]
greenride has quit [Ping timeout: 272 seconds]
<epitron>
work_op: not sure i understand... you want to translate lisp to ruby? or ruby to lisp?
krz has joined #ruby
carraroj has joined #ruby
<epitron>
or you want to add AST transforms to ruby?
GriffinHeart has quit [Remote host closed the connection]
<krz>
Hanmac: why do you suggest local_variable_set is a bad style?
<epitron>
Mia: you mean the "map" method?
krisquigley has quit [Ping timeout: 260 seconds]
gilest has quit [Remote host closed the connection]
gilest has joined #ruby
<epitron>
Hanmac: oh nice. i didn't realize ruby 2.1 added that
<Hanmac>
krz because the variables are defined at parse time before you could set them ... and i didnt find a usecase where local_variable_set really could be useful
angusiguess has joined #ruby
<epitron>
yeah, there's probably better ways to do whatever you want to do krz
<Hanmac>
epitron: hm i think local_variable_set might be older ...
<havenwood>
qdbm seemed a good bit faster than gdbm. interesting ruby ships with sdbm. ydbm seems almost useable, being able to serialize more than strings.
<diegoaguilar>
thanks a lot havenwood
<epitron>
sdbm, eh?
<diegoaguilar>
if I install those packages and go and make and make install again
<diegoaguilar>
will my ruby install be updated with whole new stuff?
<havenwood>
diegoaguilar: then it'll link
<epitron>
havenwood: i was actually interested in writing a rubygems accelerator that indexed all your gem .rb files in a fast database whenever you installed 'em
<epitron>
CDB was super-duper fast
<epitron>
i made a silly prototype
<epitron>
if SDBM comes with ruby, that's kinda handy!
<havenwood>
yeah, no need for external deps :)
<havenwood>
epitron: ah, interesting
<epitron>
benchmarking time
emocakes has joined #ruby
tessi_zz is now known as tessi
hooper has quit [Quit: Leaving.]
<diegoaguilar>
havenwood, how do you mean it'll link
lewix has quit [Remote host closed the connection]
<deed02392>
i mean in your example of setting obj.attrib value
<deed02392>
that seems kind of obvious because i would expect the parser to ignore the superfluous parens
<deed02392>
but function definitions would be parsed differently to value assignment
davasaurous has quit [Remote host closed the connection]
<zenspider>
it's prolly just me being tired, but I have no idea what you're getting at
flughafen has quit [Read error: Connection reset by peer]
<canton7>
nah I don't get it either
<zenspider>
deed02392: are you asking specifically about def ?
<deed02392>
it's probably just that you know ruby so well and i'm a total newb
<deed02392>
so if i want to call a method defined like def config=(hash), would I do
<zenspider>
can you ask in code? your last url doesn't really have a question in it
<deed02392>
class.config=(somevar)
<deed02392>
and also in this class is def config
<zenspider>
class is a reserved keyword... but ignoring that...
<deed02392>
that would be called as class.config(), ie no args
bigkevmcd has joined #ruby
<deed02392>
yeah, just an example
<canton7>
deed02392, right! I get it. So, in ruby, objects don't have public fields. Running 'myObject.config = something' calls the method 'config=(hash)', with 'hash' set to 'something'
sigurding has joined #ruby
<zenspider>
ah. thanks canton7 ... that's the part I wasn't connecting
qba73 has joined #ruby
<deed02392>
ohh, understood
<deed02392>
awesome
alem0lars has quit [Quit: AFK..]
<canton7>
deed02392, you could explicitely write 'myClass.config=(something)' if you want, but there's no point - writing 'myClass.config = something' is clearer
<Hanmac>
deed02392: you might want to look at Struct and OpenStruct that does over magic for you if you want something like "public fields"
<canton7>
deed02392, similarly running 'myObject.config' calls the method 'config' on 'myObject'
xcv has joined #ruby
moritzs has joined #ruby
<zenspider>
(sends the message config to the object referenced by myObject--the method config might not be on myObject's class...)
<deed02392>
gotcha. it looks like a field value because i'm used to always needing parens
<deed02392>
if it's a method
<deed02392>
but that's cleared it up! thanks guys
Takle has joined #ruby
oponder has joined #ruby
<zenspider>
"seattle style" is to avoid all parens where not strictly needed. the parens are __almost__ always optional... just used to disambiguate
<zenspider>
def meth arg, arg, arg
<zenspider>
obj.meth 1, 2, 3
<zenspider>
etc
<deed02392>
is it good form to use methods named such as that as a setter/getter technique for class variables?
<canton7>
deed02392, yes
<deed02392>
(if that's what you'd call self.foo)
<deed02392>
ok great
<deed02392>
semantically that comes out pretty good
mollitz has quit [Ping timeout: 245 seconds]
<zenspider>
instance variables
<deed02392>
zenspider, that sounds more accurate
<zenspider>
class variables are a whole different beast
<canton7>
deed02392, there are a couple of magic methods - attr_reader and attr_accessor - which generate the getter and setter methods for a given @instance_variable
moritzschaefer has quit [Ping timeout: 260 seconds]
moritzschaefer has joined #ruby
sigurding has quit [Ping timeout: 245 seconds]
<canton7>
so 'attr_accessor :foo' generates the methods 'def foo; @foo; end' and 'def foo=(foo); @foo = foo; end'
<deed02392>
oh awesome canton7
<deed02392>
you just answered my next question
dANO has joined #ruby
<canton7>
:)
w09x has quit [Ping timeout: 244 seconds]
<zenspider>
ok. must sleep...
shellox has quit [Quit: leaving]
Wolland has joined #ruby
KC9YDN-2 has quit [Quit: In this moment, I am euphoric. Not because of any phony god’s blessing. But because, I am enlightened by my intelligence.]
RichardLitt has joined #ruby
roolo has quit [Remote host closed the connection]
qba73 has quit [Remote host closed the connection]
roolo has joined #ruby
davasaurous has joined #ruby
KC9YDN has joined #ruby
ndrei has quit [Ping timeout: 258 seconds]
kaspergrubbe has quit [Remote host closed the connection]
<Hanmac>
with that you might be able to load the plugins as extra gems
roolo has joined #ruby
<soahccc>
Hanmac: Could be an alternative but this would require a bit more of a change I guess
qba73 has joined #ruby
<soahccc>
Currently it's just a single ruby file (or rather as many as you want) and then I do descendant tracking for the handler class. Rather dumb but it works very well :D
abuzze has joined #ruby
<soahccc>
Hanmac: the advantage is that I can reload them without killing the actual process which I couldn't do when using gems
yaymukund has quit [Ping timeout: 258 seconds]
emocakes has joined #ruby
narcan has joined #ruby
w09x has joined #ruby
ndrei has joined #ruby
kaspergrubbe has joined #ruby
alem0lars has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
kaspergrubbe has joined #ruby
tokik has quit [Ping timeout: 272 seconds]
willbarrettdev has joined #ruby
qqw has quit [Remote host closed the connection]
w09x has quit [Remote host closed the connection]
willbarrettdev has left #ruby [#ruby]
w09x has joined #ruby
ta has quit [Ping timeout: 260 seconds]
joonty has joined #ruby
qba73 has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
w09x has quit [Client Quit]
rkalfane has joined #ruby
qba73 has joined #ruby
abuzze_ has joined #ruby
patrick99e99 has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
elstif has quit [Quit: Leaving.]
Takle has quit [Remote host closed the connection]
abuzze has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
AFKGeek has joined #ruby
patrick99e99 has quit [Ping timeout: 250 seconds]
Gu_______ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zorak8 has joined #ruby
ferr has joined #ruby
threesixes has joined #ruby
marcules has joined #ruby
betafive has quit [Ping timeout: 272 seconds]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rkalfane has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
hiyosi has joined #ruby
nettoweb has joined #ruby
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has quit [Max SendQ exceeded]
angusiguess has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
nettoweb has joined #ruby
hellangel7 has quit [Ping timeout: 250 seconds]
banister has joined #ruby
hiyosi has quit [Ping timeout: 245 seconds]
nettoweb_ has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
guiguidoc has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
nettoweb has quit [Ping timeout: 260 seconds]
robustus|Off is now known as robustus
justinmburrous has joined #ruby
skammer3 has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
larsam has joined #ruby
The has joined #ruby
Guest____ has joined #ruby
lxsameer has quit [Quit: Leaving]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justinmburrous has quit [Ping timeout: 258 seconds]
tkuchiki has quit [Remote host closed the connection]
The has quit [Client Quit]
Wolland has joined #ruby
banister has joined #ruby
robustus is now known as robustus|Off
davasaurous has quit []
MCDev has quit [Ping timeout: 250 seconds]
Tomme has joined #ruby
rkalfane has joined #ruby
Wolland has quit [Ping timeout: 240 seconds]
nouranology has joined #ruby
guiguidoc has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sigurding has joined #ruby
shredding has quit [Quit: shredding]
codecop has quit [Remote host closed the connection]
Hobogrammer has quit [Ping timeout: 258 seconds]
Wolland has joined #ruby
RichardLitt has quit [Quit: RichardLitt]
banister has joined #ruby
zegerjan has joined #ruby
bruno- has quit [Quit: Lost terminal]
dangerousdave has joined #ruby
angusiguess has joined #ruby
alem0lars has quit [Quit: AFK..]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Wolland has quit [Ping timeout: 272 seconds]
guiguidoc has quit [Ping timeout: 260 seconds]
robustus|Off is now known as robustus
therue has quit []
therue has joined #ruby
shakoep has joined #ruby
Takle has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
MCDev has joined #ruby
jacobw` has joined #ruby
bweston92 has quit [Ping timeout: 260 seconds]
phutchin1 has joined #ruby
<jacobw`>
Hi, I actually want print %{X-Forward-For} in a string, I guess this is possible.
<jacobw`>
Ok, I want a literal %{X-Forward-For} to appear in the output of my template evaluation.
agjacome has joined #ruby
AFKGeek has quit [Ping timeout: 245 seconds]
<jacobw`>
i.e. I need to escape the %{var} notation.
<workmad3>
jacobw`: that'll depend on what you're using to template the file with
<jacobw`>
It's an ERB template, I'm working with Puppet.
ciampix has quit [Ping timeout: 260 seconds]
elstif has joined #ruby
tkuchiki has joined #ruby
alem0lars has quit [Ping timeout: 245 seconds]
<workmad3>
jacobw`: hmm... and are you trying to put that at the start of the line?
abuzze_ has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 272 seconds]
<jacobw`>
workmad3: to make matters worse, I'm actually trying to print literal "%{X-Forwarded-For}"
siwica has quit [Ping timeout: 250 seconds]
<jacobw`>
I'm trying to print it in ERB with <%= @var %> in the middle of a line.
<jacobw`>
Would dump help me here?
<workmad3>
jacobw`: ok... then @var needs to contain "%{X-Forwarded-For}"
<jacobw`>
Yeah, that's kind of my problem.
<workmad3>
jacobw`: how you do that will depend on puppet
<jacobw`>
Oh, sorry, I misread.
sk87 has joined #ruby
<jacobw`>
I'll play with evaluating within Ruby and come back later if I need more help.
<workmad3>
jacobw`: I'm guessing at the moment, you're just getting X-Forwarded-For, which would imply that something like '@var = %{X-Forwarded-For}' is happening
<jacobw`>
I'm getting nothing, actually.
<workmad3>
jacobw`: that would imply that nothing is being put in @var then ;)
wald0 has joined #ruby
<workmad3>
jacobw`: which again means going back to puppet to figure out how to populate template variables :)
tokik has joined #ruby
elstif has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
kuanyui has joined #ruby
robustus|Off is now known as robustus
robustus is now known as robustus|Off
fsapo has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
<kuanyui>
If I want to parse options with "parseopt", and let some option can accept an option with space(s), how to do this? (take -e for example: myprogram -e apple banana citrus -v)
fennec has quit [Quit: This computer has gone to sleep]
<Mia>
codecademy ruby training is almost done
<Mia>
any other recommendations?
Xeago has joined #ruby
vt102 has joined #ruby
marcules has quit [Remote host closed the connection]
hiyosi has joined #ruby
<shevy>
YES
<shevy>
WRITE RUBY CODE
HelperW has joined #ruby
<sevenseacat>
:D
fgo has quit []
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
abdulsattar has joined #ruby
mocfive has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
mastr_bennett[x] has joined #ruby
<certainty>
xD
fgo has joined #ruby
aclearman037 has joined #ruby
mastr_bennett[x] has quit [Client Quit]
hiyosi has quit [Ping timeout: 260 seconds]
<kuanyui>
And when using OptionParser, how to get the value without "-" option? e.g. myprogram apple
<shevy>
Mia for instance, my first project in ruby was an IRC bot
<shevy>
I failed to write one in php
<shevy>
kuanyui is that even possible?
<Mia>
shevy, I would love to learn your tricks!
justinmburrous has joined #ruby
<Mia>
I want to reate an irc bot that outputs to a website
<kuanyui>
I don't know so I ask here...
<shevy>
Mia that is the learning part, you need to put yourself into a situation with problems
<Mia>
like, logs
<Mia>
yes I want to create a twitter bot that responds
<shevy>
ok do you know how to actually write files from inside ruby .rb files yet Mia
<sinelaw>
tobiasvl, nvm, the problem was something else: when you call ActiveRecord's .create method with a parameter of the wrong type, it ignores it silently at writes "nil" to the DB instead
Sou|cutter has quit [Ping timeout: 245 seconds]
silkfox has joined #ruby
<sinelaw>
is there a way to make it safer (e.g. throw an error?)
<tobiasvl>
no idea, don't know what activerecord is
<tobiasvl>
isn't that some #RubyOnRails stuff? or maybe not
<sinelaw>
yes. sorry.
<sinelaw>
thanks!
Wolland_ has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
Wolland has quit [Disconnected by services]
Wolland_ is now known as Wolland
moritzschaefer has quit [Quit: Verlassend]
moritzs has quit [Quit: Verlassend]
angusigu1ss has joined #ruby
kuanyui has joined #ruby
tvw has quit []
koell has quit [Ping timeout: 272 seconds]
hamakn has quit [Remote host closed the connection]
koell has joined #ruby
mary5030 has joined #ruby
skolman_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
Takle has joined #ruby
angusigu1ss has quit [Ping timeout: 258 seconds]
SilkFox_ has joined #ruby
mary5030 has joined #ruby
Takle has quit [Remote host closed the connection]
dx7 has joined #ruby
fold has joined #ruby
InhalingPixels has joined #ruby
zeroNones has joined #ruby
centrx has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
andrewlio has quit [Quit: Leaving.]
crazydiamond has joined #ruby
dx7 has quit [Remote host closed the connection]
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
dx7 has joined #ruby
modernbob has quit [Ping timeout: 255 seconds]
anaeem1 has joined #ruby
livingstn has joined #ruby
justinmburrous has joined #ruby
endash has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
antlong has joined #ruby
oo_ has quit [Remote host closed the connection]
ffranz has joined #ruby
SilkFox_ has quit [Ping timeout: 260 seconds]
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Tomme has quit [Ping timeout: 245 seconds]
thane75 has joined #ruby
justinmburrous has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
jobewan has joined #ruby
tagrudev has quit [Remote host closed the connection]
kireevco has joined #ruby
axl_ has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
ivmx has joined #ruby
mradmacher has quit [Ping timeout: 272 seconds]
threesixes has joined #ruby
alem0lars has quit [Quit: AFK..]
terlar has quit [Quit: WeeChat 1.0]
ndrei has joined #ruby
terlar has joined #ruby
mdw has joined #ruby
kobain has joined #ruby
elstif has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
Sou|cutter has joined #ruby
slester has joined #ruby
sinelaw has quit [Quit: Leaving]
oo_ has quit [Remote host closed the connection]
skrite has joined #ruby
failshell has joined #ruby
<skrite>
hello all
<aep>
can i run ruby without gems?
<aep>
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
Takle has joined #ruby
zorak8 has quit [Ping timeout: 246 seconds]
mradmacher has joined #ruby
oo_ has joined #ruby
zz_jrhorn424 is now known as jrhorn424
yeticry has quit [Ping timeout: 260 seconds]
Advocation has quit [Quit: Advocation]
geggam has joined #ruby
yeticry has joined #ruby
codeFiend has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
mkaesz has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
mkaesz has joined #ruby
mikepack has joined #ruby
angusigu1ss has quit [Ping timeout: 245 seconds]
jrhe_ has joined #ruby
statis has joined #ruby
GriffinHeart has joined #ruby
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 260 seconds]
mkaesz has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Remote host closed the connection]
Darryl has quit [Quit: Connection closed for inactivity]
tokik has quit [Ping timeout: 260 seconds]
elstif has joined #ruby
elstif has quit [Client Quit]
AlexRussia has joined #ruby
enodata has joined #ruby
fgo has joined #ruby
shinobi_one has joined #ruby
jottr has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
shinobi_one has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
yalue has joined #ruby
Inhaling_ has joined #ruby
Kricir has joined #ruby
kaspergrubbe has quit [Ping timeout: 260 seconds]
aganov has quit [Quit: Leaving]
mpistone has joined #ruby
starkhalo has joined #ruby
aspires has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
InhalingPixels has quit [Ping timeout: 272 seconds]
hooper has joined #ruby
skolman_ has quit [Remote host closed the connection]
fgo has joined #ruby
skolman_ has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
sevenseacat has quit [Quit: Leaving.]
kenneth has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjr9898 has quit [Remote host closed the connection]
Kricir has joined #ruby
[1]MCDev has joined #ruby
paulfm has quit []
chrishough has joined #ruby
paulfm has joined #ruby
tkuchiki has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
[1]MCDev is now known as MCDev
MaciejCzyzewski has joined #ruby
dangerousdave has joined #ruby
fgo has quit [Ping timeout: 246 seconds]
skolman_ has quit [Ping timeout: 245 seconds]
Advocation has quit [Quit: Advocation]
Darryl has joined #ruby
_maes_ has joined #ruby
alem0lars has joined #ruby
zorak8 has joined #ruby
alem0lars has quit [Client Quit]
CaptainHeavy has joined #ruby
d2dchat has joined #ruby
xcv has joined #ruby
koalallama is now known as ctrlrsf
tkuchiki has quit [Remote host closed the connection]
tjr9898 has joined #ruby
<CaptainHeavy>
Hi everyone, I'm attempting to set the result of a random number generation to a variable by doing the following: a = rand(0...100) however, when I use "a" it always has a different value. I'm guessing this is because, instead of the result of the rand function being stored in "a", the actual function i.e. rand(0...100) is instead. Thus, whenever "a" is called, "a" is set to a new number between 0 and 100. My question is how to assign the result of
joonty has quit [Quit: Leaving]
andy41122 has joined #ruby
<CaptainHeavy>
If that indeed is the problem I'm having...
<apeiros>
CaptainHeavy: no, a = methodcall stores the result
<apeiros>
>> a = rand(0...100); puts a; puts a; puts a
ctrlrsf has quit [Read error: Connection reset by peer]
<canton7>
nothing weird in the stuff you pasted regarding domainTime... what makes you think it's changing?
<CaptainHeavy>
its lines 51 and 52 that are problematic
mesamoo has joined #ruby
aspires has joined #ruby
<CaptainHeavy>
Those "assert_equal" calls are to a testing framework and line 52 always errors i.e. "expectedMindsEyeTerminusTime" and "model.getMindsEyeTerminus(domainTime)" aren't equal
SilkFox_ has joined #ruby
<CaptainHeavy>
now, the "mindsEyeLifespan" that is added to "domainTime" to get "expectedMindsEyeTerminusTime" on line 51 is a constant value, its only the value of "domainTime" that changes
<canton7>
without seeing the source of getMindsEyeTerminus or indeed where mindsEyeLifespan comes from, we can't say anything
<canton7>
also, camelCase is distinctly non-ruby :P
enodata has quit [Quit: quit]
oponder has quit []
<CaptainHeavy>
However, the difference between "domainTime" and "mindsEyeLifespan" should be constant but it isn't
<CaptainHeavy>
(since "mindsEyeLifespan" is always set to 100)
<canton7>
I can only assume that model.getMindsEyeTerminus is broken
<apeiros>
since domainTime does not change, I think your test revealed that mindsEyeLifespan is in fact not constant :)
arup_r has joined #ruby
<apeiros>
or that one of the getters/setters is broken
axl_ has left #ruby [#ruby]
<CaptainHeavy>
ah, apologies about the camel-case, I'm using jRuby out of necessity, I don't normally program in it
<pagios>
can i concatenate 2 hash arrays?
<CaptainHeavy>
I code Java mainly!
ferr has quit [Remote host closed the connection]
<Hanmac>
we are sorry for you ;P
<apeiros>
pagios: there's hash, and there's array. there's no hash array. which do you mean?
<CaptainHeavy>
apeiros: domainTime does change, its the mindsEyeLifespan that is constant but I see your point nonetheless :)
anaeem1_ has quit [Remote host closed the connection]
<charliesome>
probably out of scope of the eval bot
<charliesome>
maybe someone could do a doc bot
ryanleesipes has joined #ruby
hamakn has joined #ruby
angusigu1ss has quit [Ping timeout: 245 seconds]
thaum has quit [Quit: Leaving]
HelperW_ has quit [Ping timeout: 258 seconds]
LiohAu_ has quit [Quit: LiohAu_]
kireevco has joined #ruby
Wolland has quit [Remote host closed the connection]
Dude007 has quit [Remote host closed the connection]
kireevco has left #ruby [#ruby]
Tricon has quit [Quit: Leaving...]
mikepack has quit [Remote host closed the connection]
weems|mac has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
patrick99e99 has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
hamakn has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: zzz]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andikr has quit [Remote host closed the connection]
abdulsattar has quit [Ping timeout: 272 seconds]
thomasxie has joined #ruby
justinmburrous has joined #ruby
gsd_ has joined #ruby
gsd_ has quit [Read error: Connection reset by peer]
gsd has quit [Ping timeout: 245 seconds]
gsd_ has joined #ruby
SilkFox_ has joined #ruby
Takle has joined #ruby
banister_ has joined #ruby
Aaaal has quit [Quit: Aaaal]
banister_ has quit [Max SendQ exceeded]
fgo has joined #ruby
hooper has quit [Quit: Leaving.]
banister_ has joined #ruby
banister_ has quit [Max SendQ exceeded]
ore0s has joined #ruby
banister has quit [Ping timeout: 245 seconds]
jelera has joined #ruby
banister has joined #ruby
justinmburrous has quit [Ping timeout: 250 seconds]
lewix has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
ghostmoth has joined #ruby
ndrei has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
emrox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 244 seconds]
skolman has quit [Remote host closed the connection]
gauke has quit [Quit: gauke]
krisquigley has joined #ruby
klmlfl has quit [Remote host closed the connection]
kaffeebohne has joined #ruby
skolman_ has joined #ruby
mikepack has joined #ruby
SilkFox_ has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Ping timeout: 245 seconds]
<kaffeebohne>
Hi! I installed libv8 global (/usr/lib/) but bundler won’t recognize the gem. I configured gem to install everything global in /etc/gemrc. What am I doing wrong?
thumpba_ has joined #ruby
cocotton has quit [Remote host closed the connection]
roolo has quit [Remote host closed the connection]
thumpba_ has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
x1337807x has joined #ruby
dx7 has quit [Quit: Leaving...]
lkba has joined #ruby
thumpba_ has joined #ruby
cocotton has joined #ruby
<jhass>
did you install a version that matches your Gemfile's requirement?
sepp2k has quit [Quit: Konversation terminated!]
mattmcclure has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
freerobby has joined #ruby
petitchouffe is now known as bri
gsd has joined #ruby
skolman_ has quit [Ping timeout: 250 seconds]
thumpba has quit [Ping timeout: 258 seconds]
jthomp has joined #ruby
<Hanmac>
kaffeebohne: what os? is libv8 only a c lib or a binding too? how did you installed ruby and libv8?
mijicd has joined #ruby
banister has quit [Read error: Connection reset by peer]
x1337807x has quit [Client Quit]
gsd_ has quit [Ping timeout: 260 seconds]
ryanleesipes has quit [Ping timeout: 246 seconds]
threesixes has quit [Remote host closed the connection]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
troyready has joined #ruby
naw_ has joined #ruby
<kaffeebohne>
jhass: Yes. Hanmac: Archlinuxarm, How can I check?, via the package manager and „gem install libv8 --with-system-v8"
St_Marx has quit [Ping timeout: 264 seconds]
kil0byte has joined #ruby
<Hanmac>
kaffeebohne: hm i might smell an outdated ruby version... what version is it?
skammer3 has quit [Ping timeout: 260 seconds]
j_mcnally has joined #ruby
<kaffeebohne>
Hanmac: 2.1.0
<jhass>
kaffeebohne: how sure are you about that? grep libv8 Gemfile.lock and gem list lib8
<jhass>
*libv8
AtumT has quit [Ping timeout: 245 seconds]
terlar has quit [Quit: WeeChat 1.0.1]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ore0s has quit [Ping timeout: 246 seconds]
<jhass>
Hanmac: arch ships 2.1.3 already. not sure about arm but I expect them to follow along. kaffeebohne the 2.1.0 is just the ABI version
x1337807x has joined #ruby
<jhass>
the 2.1.0 in the path that is
<kaffeebohne>
which gem file.lock should I grep? :) It appears in „gem list libv8“ under local gems.
<kaffeebohne>
Yeah, arm is a bit behind
<Hanmac>
i jhass it could have been 1.8 and forgot to require "rubygems" ... i never touched archlinux ...
<jhass>
not "gem file.lock" Gemfile.lock which should exist next to your Gemfile
<kaffeebohne>
sorry, autocorrect :D
maestrojed has joined #ruby
<Hanmac>
the only thing is that it might not work with arm -architecture ... bad that i dont have that architecture to test my stuff ...
<jhass>
Hanmac: for arch suspect it's too new rather than too old ;)
<kaffeebohne>
Hanmac: v8 is available for archlinuxarm, even precompiled.
<kaffeebohne>
libv8 (~> 3.11.8.12)
ndrei has quit [Ping timeout: 245 seconds]
<kaffeebohne>
means what? bigger 3.11?
freerobby has quit [Quit: Leaving.]
anaeem1 has joined #ruby
yfeldblum has joined #ruby
<jhass>
it means >= 3.11.8.12 and < 3.12
<kaffeebohne>
hm, ok
<centrx>
with that lengthly version number it might mean < 3.11.9 ?
<Hanmac>
one day in a future i will test my own gems on arm architecture too ...
jerius has quit []
alex88 has quit [Quit: Leaving...]
<jhass>
oh Hanmac is right
skolman_ has joined #ruby
<jhass>
for some reason I always get those wrong on the first try
<kaffeebohne>
ok, so when I try to install therubyracer 0.11.4 I get this. :( https://paste.xinu.at/h1Bnx/ Any ideas (I know that this is not a support channel for the project, but maybe someone can help me anyway)? Looks like an error with v8?
ctp has joined #ruby
djcp has quit [Client Quit]
einarj has quit [Remote host closed the connection]
wallerdev has joined #ruby
ctp has quit [Read error: Connection reset by peer]
djcp has joined #ruby
ctp has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
lw has quit [Quit: s]
HelperW_ has joined #ruby
reset has quit [Ping timeout: 260 seconds]
icebourg has quit [Ping timeout: 258 seconds]
chrishough has joined #ruby
yaymukund has quit [Ping timeout: 272 seconds]
badhatter has quit [Quit: Leaving]
iamcyberbird has quit [Ping timeout: 260 seconds]
fgo has joined #ruby
lw has joined #ruby
lw has quit [Client Quit]
kmh|2 has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
djcp has quit [Client Quit]
elstif has joined #ruby
djcp has joined #ruby
djcp has quit [Client Quit]
yfeldblum has joined #ruby
djcp has joined #ruby
<centrx>
kaffeebohne, What is that?
robustus|Off is now known as robustus
<centrx>
kaffeebohne, You're compiling a cc file through a ruby script?
mikeg has joined #ruby
fumk has quit [Quit: changing servers]
mikecmpbll has joined #ruby
Hobogrammer has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
<miah>
Embed the V8 Javascript Interpreter into Ruby
<kaffeebohne>
yeah
* miah
walks aways slowly in hopes that javascript doesnt notice her
<kaffeebohne>
but I found nothing that comes close to openproject :(
djcp has quit [Client Quit]
x1337807x has quit [Ping timeout: 258 seconds]
fgo has quit [Ping timeout: 272 seconds]
djcp has joined #ruby
TieSoul has quit [Excess Flood]
TieSoul has joined #ruby
<kaffeebohne>
Right now I am using mantis … but I would love to use open project on my pi. :/
Hightower666 has quit [Quit: If at first you don't succeed, skydiving is not for you.]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
fumk has joined #ruby
x1337807x has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
Hightower666 has joined #ruby
jottr has joined #ruby
arya_ has quit []
SilkFox_ has joined #ruby
nanoyak has joined #ruby
carraroj has joined #ruby
jay has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
miah has quit [Ping timeout: 240 seconds]
jay is now known as rubyonrailed
miah has joined #ruby
icebourg has joined #ruby
Aaaal has quit [Quit: Aaaal]
semw has joined #ruby
bloudermilk has joined #ruby
dopie has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 250 seconds]
JeffBonds has joined #ruby
arup_r has quit [Ping timeout: 260 seconds]
androidbruce has joined #ruby
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cstrahan has joined #ruby
miah has quit [Ping timeout: 260 seconds]
Tricon has quit [Quit: Leaving...]
<androidbruce>
hey there guys/gals. with chef when we converge there is a gem upgrade that happens everytime. does anyone have ideas of caching that, or maybe using some sort of only_if statement to speed that up?
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ptrrr has joined #ruby
SilkFox_ has quit [Ping timeout: 240 seconds]
mleone has joined #ruby
mikeg has quit [Ping timeout: 245 seconds]
anaeem1 has quit [Remote host closed the connection]
mijicd has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
nanoyak has quit [Read error: Connection reset by peer]
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has joined #ruby
Kricir has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
mleone has quit [Client Quit]
krz has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
Kricir has joined #ruby
ghr has joined #ruby
jelera has quit [Ping timeout: 272 seconds]
spyderma_ has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
bigkevmcd has quit [Quit: This computer has gone to sleep]
miah has joined #ruby
lsmola has quit [Ping timeout: 245 seconds]
anaeem1_ has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
adrenaline_ has joined #ruby
jobewan has quit [Quit: Leaving]
ghr has quit [Ping timeout: 272 seconds]
robustus is now known as robustus|Off
troyready has quit [Quit: Leaving]
benzrf|offline is now known as benzrf
ta has quit [Quit: Leaving...]
anaeem1_ has quit [Ping timeout: 260 seconds]
shosti has joined #ruby
sigurding has joined #ruby
pipework has joined #ruby
jobewan has joined #ruby
yaymukund has joined #ruby
jottr has joined #ruby
dANO has quit []
ta has joined #ruby
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
krisquigley has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 245 seconds]
mikepack has quit [Remote host closed the connection]
jonmorehouse has joined #ruby
Kricir has joined #ruby
tjbiddle has joined #ruby
havenwood has joined #ruby
IceDragon has joined #ruby
torspark has left #ruby ["Leaving"]
centrx has joined #ruby
benzrf is now known as benzrf|offline
angusigu1ss has joined #ruby
sigurding has quit [Ping timeout: 272 seconds]
x1337807x has quit [Ping timeout: 272 seconds]
yaymukund has quit [Ping timeout: 246 seconds]
b00stfr3ak has joined #ruby
x1337807x has joined #ruby
bluOxigen has joined #ruby
sigurding has joined #ruby
fgo has joined #ruby
Tricon has joined #ruby
angusigu1ss has quit [Ping timeout: 244 seconds]
carraroj has quit [Ping timeout: 244 seconds]
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
claymore has quit [Quit: Leaving]
Hightower666 has quit [Ping timeout: 258 seconds]
jrhorn424 is now known as zz_jrhorn424
benzrf|offline is now known as benzrf
gsd has quit [Ping timeout: 272 seconds]
Jarboe has joined #ruby
yetanotherdave has joined #ruby
elstif has quit [Quit: Leaving.]
fgo has quit [Read error: No route to host]
fgo has joined #ruby
justinmburrous has joined #ruby
ndrei has joined #ruby
Scotteh has joined #ruby
abdulsattar has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
x1337807x has quit [Ping timeout: 260 seconds]
flowerha_ is now known as flowerhack_
gsd has joined #ruby
Advocation has joined #ruby
jerius has quit []
SilkFox_ has joined #ruby
<wjimenez5271>
hello, I'm trying to write to the stdin of a bash command, similar to piping commands together in bash. Can I use IO.popen to do that?
nonmadden has quit [Quit: Leaving...]
fgo has quit [Ping timeout: 272 seconds]
<wjimenez5271>
so from the bash perspective I'm trying to achieve " echo "xyz" | /bin/command --someflags strings --someflag string "
justinmburrous has quit [Ping timeout: 260 seconds]
jerius has joined #ruby
chipotle has joined #ruby
mark_locklear has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
jthomp has quit [Ping timeout: 272 seconds]
x1337807x has joined #ruby
Skyler has joined #ruby
<wallerdev>
yeah use popen3
chipotle has quit [Client Quit]
agjacome has quit [Quit: leaving]
Advocation has quit [Ping timeout: 255 seconds]
bricker`1ork has joined #ruby
jthomp has joined #ruby
reset has joined #ruby
<wjimenez5271>
wallerdev: so thats different than IO.popen?
SegFaultAX has quit [Ping timeout: 260 seconds]
<wallerdev>
lets you write/read to stdout, stderr, stdin seperately
tjr9898_ has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
GinoMan has joined #ruby
ghr has joined #ruby
b00stfr3ak has quit [Ping timeout: 272 seconds]
robustus has joined #ruby
<_lucid_>
Is there a way to fix race conditions with celluloid without sacrificing speed?
b00stfr3ak has joined #ruby
klmlfl has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
nifty___ has joined #ruby
bricker`1ork has quit [Ping timeout: 245 seconds]
spyderma_ has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
lolmaus has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 250 seconds]
mieko has quit [Ping timeout: 272 seconds]
lolmaus has joined #ruby
<eam>
wjimenez5271: 4k
nanoyak has quit [Quit: Computer has gone to sleep.]
<havenwood>
_lucid_: what are you currently using?
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
abdulsattar has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
x1337807x has quit [Ping timeout: 272 seconds]
modernbob has joined #ruby
modernbob has joined #ruby
icarus has quit [Ping timeout: 260 seconds]
<_lucid_>
I added a mutex.syncrhonize
<_lucid_>
Which fixed it, but drastically slowed down the script(its a network based script)
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
spyderma_ has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
SilkFox_ has joined #ruby
krisquig_ has joined #ruby
<_lucid_>
The script scans up to 5000 hosts and tells me if they are connectable
ramfjord has joined #ruby
coderdad_ has joined #ruby
mkaesz has quit [Read error: Connection reset by peer]
mskaesz has joined #ruby
<_lucid_>
But as of right now the most it'll do is 1020, and if I add a mutex it does the correct amount, but it makes it slow enough to not be worth it
robustus is now known as robustus|Off
coderdad has quit [Ping timeout: 246 seconds]
abdulsattar has quit [Ping timeout: 250 seconds]
<toretore>
_lucid_: define slow, relative to without the mutex
<_lucid_>
5000 hosts takes roughly 10 to 20 seconds
<_lucid_>
vs with the mutex where it takes more like 5000 seconds
<toretore>
what is the race condition?
jthomp has quit [Ping timeout: 250 seconds]
<_lucid_>
Well when I run it without the mutex it takes only 10 to 20 seconds, but it doesn't actually scan all 5000 hosts
gilest has quit [Remote host closed the connection]
cocotton has quit [Ping timeout: 244 seconds]
Wolland has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 272 seconds]
flowerhack_ has quit [Remote host closed the connection]
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claymore has quit [Quit: Leaving]
postmodern has joined #ruby
gilest has joined #ruby
tvw has joined #ruby
govg has quit [Ping timeout: 260 seconds]
manzo has quit [Ping timeout: 260 seconds]
SegFaultAX has joined #ruby
gilest has quit [Remote host closed the connection]
govg has joined #ruby
freerobby1 has quit [Quit: Leaving.]
ldnunes has quit [Quit: Leaving]
gilest has joined #ruby
codezomb has joined #ruby
Skyler has quit [Ping timeout: 244 seconds]
<codezomb>
is there a way to find where a class is being loaded?
<codezomb>
I suspect a gem keeps loading some uneeded classes, and short of removing them one by one, I cannot figure out how to tell which one is doing it.
axsuul has joined #ruby
axsuul has quit [Excess Flood]
gilest has quit [Remote host closed the connection]
Ankhers has quit [Ping timeout: 264 seconds]
coderdad has quit [Remote host closed the connection]
coderdad has joined #ruby
zegerjan has quit [Remote host closed the connection]
gilest has joined #ruby
<hooper>
codezomb: and some pry breakpoints, perhaps?
Takle has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
<hooper>
ah, nm. you don't know which gem is doing it
kirun has quit [Quit: Client exiting]
<codezomb>
heh, yeah :/
gvenkat has quit [Quit: This computer has gone to sleep]
Aaaal has quit [Read error: Connection reset by peer]
Skyler has joined #ruby
<codezomb>
ActiveSupport gave me what I needed
<codezomb>
ActiveSupport.on_load(:active_record)
<codezomb>
turns out rspec-rails is doing it :
Hightower666 has quit [Ping timeout: 246 seconds]
beneggett has joined #ruby
threesixes has joined #ruby
flowerhack has joined #ruby
Kricir has joined #ruby
wjimenez5271 has joined #ruby
skolman_ has quit [Remote host closed the connection]
fgo has joined #ruby
skolman has joined #ruby
SilkFox_ has joined #ruby
justinmburrous has joined #ruby
Takle has quit [Remote host closed the connection]
lewix has joined #ruby
jheg has quit [Quit: jheg]
skolman has quit [Remote host closed the connection]
skolman has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
ndrei has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
fgo has quit [Ping timeout: 245 seconds]
justinmburrous has quit [Ping timeout: 250 seconds]
gilest has quit [Remote host closed the connection]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
AndroUser465 has joined #ruby
gilest has joined #ruby
nettoweb has joined #ruby
JeffBonds has joined #ruby
x1337807x has joined #ruby
nettoweb has quit [Max SendQ exceeded]
pmarreck has joined #ruby
klmlfl has quit [Remote host closed the connection]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
benzrf|offline is now known as benzrf
nettoweb has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
nettoweb has quit [Max SendQ exceeded]
Takle has joined #ruby
nettoweb has joined #ruby
omosoj has quit [Ping timeout: 272 seconds]
slester has quit [Quit: slester]
SilkFox_ has quit [Ping timeout: 272 seconds]
synergyz_ has joined #ruby
tylersmith has quit [Remote host closed the connection]
therue has quit []
gilest has quit [Remote host closed the connection]
Deejay_ has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Read error: Connection reset by peer]
gilest has joined #ruby
Seich has quit [Ping timeout: 260 seconds]
synergyz has quit [Ping timeout: 245 seconds]
x1337807x has quit [Read error: Connection reset by peer]