<aaronds>
Hi, I'm new to Ruby and was wondering if anyone can explain how the following code works: http://pastebin.com/XXd2XZcV. post is something defined elsewhere followed by the string and then a code block... What is this equivalent to in other languages?
chouhoulis has joined #ruby-lang
<|jemc|>
aaronds - the do...end block is a closure
<|jemc|>
the closure is a block of code passed to the 'post' method
<aaronds>
Oh i see!
<aaronds>
Thanks for clearing that up |jemc|
<|jemc|>
the post method can choose to execute the code immediately or later, in the original context or with a different receiver
<|jemc|>
often DSLs like this will execute the block in a context with a different implicit receiver so that method calls in the block get directed implicitly to the internal DSL receiver object
symm- has quit [Ping timeout: 245 seconds]
b_hoffman has joined #ruby-lang
<|jemc|>
see also "yield" and "block arguments" for further reading
gwendall has quit [Remote host closed the connection]
<aaronds>
of course - one other thing... I'm seeing this being used directly in a class? Rather than within a method body within a class... How does that work? Usually one cannot call methods from outside a function when writing a class.
gwendall has joined #ruby-lang
<|jemc|>
aaronds: in ruby, all layers of syntax are imperative
<|jemc|>
so any executable code can go in your class definition
<|jemc|>
it will be executed when the file where your class definition is loaded
<weaksauce>
^ good overview of what blocks are
nathanstitt has joined #ruby-lang
<aaronds>
Ah ok I understand, thanks for that resource weaksauce
<|jemc|>
there are a few restrictions on what kind of code can go where - ruby doesn't like method defs inside of method defs, for example - but in general the main difference between different sections of code are what the current implicit receiver is, the lexical scope boundaries being open or closed, and the current scope for constant lookup
<|jemc|>
so a chunk of code that defines a class is just more executable code
enebo has quit [Quit: enebo]
gwendall has quit [Ping timeout: 252 seconds]
<aaronds>
ah I see, that makes sense
<aaronds>
ok great thanks a lot, time to go and play around with this
Bwild has quit [Ping timeout: 244 seconds]
Kejento has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
znz_jp has quit [Quit: kill -QUIT $$]
Aova has quit [Read error: Connection reset by peer]
konr has joined #ruby-lang
cdtaylor has quit [Remote host closed the connection]
aaronds has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby-lang
znz_jp has joined #ruby-lang
tkuchiki has joined #ruby-lang
roamingdog has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby-lang
Bwild has joined #ruby-lang
Aova has joined #ruby-lang
chadwtaylor has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
roamingdog has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
charliesome has joined #ruby-lang
shazaum has quit [Quit: Leaving]
roamingdog has joined #ruby-lang
|jemc| has quit [Ping timeout: 245 seconds]
iamninja has quit [Quit: ZZZzzz…]
yusuf1 has joined #ruby-lang
yusuf1 has quit [Max SendQ exceeded]
yusuf1 has joined #ruby-lang
matrisking has quit [Quit: leaving]
riotjones has joined #ruby-lang
rbpd5015 has quit [Ping timeout: 246 seconds]
tkuchiki_ has joined #ruby-lang
tkuchiki has quit [Ping timeout: 250 seconds]
riotjones has quit [Ping timeout: 265 seconds]
rbowlby has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
ta_ has joined #ruby-lang
dziemid has joined #ruby-lang
shinnya has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 245 seconds]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghostpl has quit [Remote host closed the connection]
chadwtaylor has quit [Remote host closed the connection]
crdpink has joined #ruby-lang
nofxx has quit [Ping timeout: 255 seconds]
crdpink2 has quit [Ping timeout: 245 seconds]
hendranata_ has joined #ruby-lang
hendranata_ has joined #ruby-lang
nofxx has joined #ruby-lang
Lewix has joined #ruby-lang
marr has quit []
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
Aova has quit [Read error: Connection reset by peer]
gwendall has joined #ruby-lang
cdtaylor has joined #ruby-lang
dziemid has quit [Remote host closed the connection]
gwendall has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby-lang
Aova has joined #ruby-lang
|jemc| has joined #ruby-lang
cdtaylor has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
yatish27 has joined #ruby-lang
ta_ has joined #ruby-lang
oleo__ has joined #ruby-lang
oleo is now known as Guest10153
rbowlby has joined #ruby-lang
Guest10153 has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 252 seconds]
mshieldsdunn has joined #ruby-lang
redgetan has joined #ruby-lang
ta_ has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 245 seconds]
ta_ has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby-lang
<mshieldsdunn>
I'm new to Ruby (and a new dev) and was wondering if someone could briefly look at a gist with me...
<|jemc|>
mshieldsdunn: a common IRC idiom is "don't ask to ask, just ask" - it's unlikely that anyone wants to commit spending time with you to help you solve your problem before you've presented it
dziemid has quit [Remote host closed the connection]
b_hoffman has quit [Quit: b_hoffman]
dziemid has joined #ruby-lang
postmodern has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby-lang
ottlikg has joined #ruby-lang
djbkd has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yatish27 has quit [Ping timeout: 252 seconds]
yatish27 has joined #ruby-lang
marcdel has quit []
morton has joined #ruby-lang
riotjones has joined #ruby-lang
<morton>
ok, i have implemented prime sieve in ruby, and it is many times faster than the standard library function, when getting the first million primes. why is this
Randroid has quit [Quit: Randroid]
<bnagy>
which stdlib function are you comparing it to?
<morton>
Prime.each(1_000_000).to_a
<bnagy>
and also, a lot of Prime in the stdlib is asscode
<ericwood>
wow didn't know that was in stdlib
tkuchiki has joined #ruby-lang
<bnagy>
unfortunately
tkuchiki_ has quit [Ping timeout: 252 seconds]
<morton>
my somewhat clunky implementation in ruby itself is about 10 times faster
<eval-in__>
bnagy => libssl.so.1.0.0: cannot open shared object file: No such file or directory - /execpad/interpreters/ruby-2.1.3/lib/ruby/2.1.0/i686-linux/openssl.so (LoadError) ... (https://eval.in/277490)
oleo__ has quit [Quit: Verlassend]
maso has quit [Remote host closed the connection]
<bnagy>
ok well post 2.0 it obviously changed to be less stupid
<morton>
haha
<morton>
yea
<morton>
im on linux,
<morton>
i just used what istalled
roamingdog has quit [Remote host closed the connection]
<bnagy>
os packages for ruby are typically not-great
<havenwood>
morton: what distro?
<morton>
xubuntu
<bnagy>
most people recommend / use chruby ( or rbenv or rvm )
<morton>
i had a hard time getting this damn thing installed
<morton>
i don't know if i could handle chruby lol
<morton>
need to learn more linux
<havenwood>
morton: "Brightbox are a UK cloud provider." As a public service they provide up-to-date Ruby packages for Ubuntu.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<morton>
ok, thanks, i will try it
<morton>
by the way havenwood
<morton>
have u been listening to our prime sieve discussion?
<havenwood>
partially, yeah
<morton>
basically, i am finding that the library function to get me the first million primes is very slow compared to my manual implementation
<morton>
bnagy says the library has ass-code
<morton>
he posted his version using the openssl library
<morton>
i want to post this in stackoverflow, but forgot my password and am too lazy to recover it
morton has quit [Quit: Page closed]
apeiros_ has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby-lang
<bnagy>
for the record, my version is a joke
<bnagy>
I expect it to be slow
|jemc| has joined #ruby-lang
Lord_xeo_ has joined #ruby-lang
Lord_xeo has quit [Read error: Connection reset by peer]
Lord_xeo_ has quit [Max SendQ exceeded]
amclain has quit [Quit: Leaving]
yusuf1 has quit [Quit: Leaving.]
yatish27 has quit [Remote host closed the connection]
<havenwood>
mort, hem, left?
yusuf has joined #ruby-lang
yatish27 has joined #ruby-lang
<havenwood>
ruby -rprime -e "Prime.each(1_000_000, Prime::Generator23.new).to_a" 0.10s user 0.01s system 97% cpu 0.113 total
<havenwood>
ruby -rprime -e "Prime.each(1_000_000, Prime::EratosthenesGenerator.new).to_a 0.22s user 0.01s system 98% cpu 0.232 total
ta_ has quit [Ping timeout: 255 seconds]
<havenwood>
ruby -ropenssl -e "1.upto(1_000_000).select { |i| OpenSSL::BN.new(i).prime? } 14.36s user 0.08s system 99% cpu 14.493 total
<havenwood>
bnagy: hehe, not bad considering
apeiros__ has quit [Remote host closed the connection]
yatish27 has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby-lang
charliesome has quit [Quit: zzz]
<havenwood>
ruby -rprime -e "1.upto(1_000_000).select &:prime?" 8.15s user 0.05s system 99% cpu 8.221 total
wallerdev has quit [Quit: wallerdev]
AKASkip has joined #ruby-lang
ottlikg has quit [Ping timeout: 256 seconds]
vipaca has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
okay, just one more... from the proposed update to #prime?
<havenwood>
ruby -e "def prime? n; return false if n.even? || n < 2; (3..(n ** 0.5).floor).step 2 do |i|; return false if n % i == 0 && n != 2; end; true; end; 1.upto(1_000_000).select { |n| prime? n }" 2.80s user 0.02s system 99% cpu 2.828 total
<bnagy>
havenwood: what is the size in the first one?
<bnagy>
I thought Generator23 was a hack
Averna has quit [Quit: Leaving.]
<havenwood>
bnagy: yeah, way wrong >.>
morton has joined #ruby-lang
apeiros_ has quit [Ping timeout: 265 seconds]
<havenwood>
bnagy: i didn't actually check that the answers were right, just typed em in with: time ...
<havenwood>
oops
<morton>
so ruby bros, what can i make without rails?
<havenwood>
bnagy: but it's fast! :P
<morton>
hi bnagy and havenwood
<havenwood>
morton: hi
<bnagy>
ah Eratosthenes is correct and fast
<bnagy>
ok Prime I forgive you slightly
<morton>
what u mean
<bnagy>
havenwood was benchmarking
<bnagy>
14:51 < havenwood> ruby -rprime -e "Prime.each(1_000_000, Prime::EratosthenesGenerator.new).to_a 0.22s user 0.01s system 98% cpu 0.232
<morton>
yea, eratosthenes is the default if you dont specify. it is slow
<havenwood>
morton: Web stuff other than Rails? Or you just mean generally?
<morton>
i also printed the answer, which takes time
<havenwood>
morton: Telephony, prototyping aerospace hardware and software, server automation or a wide variety of other things. Depends on what you want to do.
<bnagy>
morton: uh one possible reason is that yours is wrong
fclausen has quit [Ping timeout: 272 seconds]
<havenwood>
so it should compete with Generator23!
<bnagy>
like, I get 168 for primes.size with yours
<morton>
hmmmm
<havenwood>
ditto
<bnagy>
but it should be 78497
<morton>
shit you are right
<morton>
however
wallerdev has joined #ruby-lang
<morton>
my original code was correct
<havenwood>
where's that?
<morton>
and still fast
<morton>
let me get it
Aova has quit [Read error: Connection reset by peer]
<morton>
ok i updated the page
<morton>
the sieve is the same
<morton>
i just changed the way i retrieved the primes
riotjones has joined #ruby-lang
Bwild has joined #ruby-lang
<havenwood>
morton: morton: from your updated one I got 0.274 total compared to 0.232 total with: Prime.each(1_000_000).to_a
<havenwood>
morton: ruby-2.2.0
<bnagy>
yeah same, you're slower now
<morton>
ok, then it must be my old 1.9.3
<bnagy>
and still wrong
<bnagy>
but only by 1
<morton>
omg
<morton>
i give up
yfeldblum has joined #ruby-lang
<havenwood>
morton: but yeah, primes are getting faster in Ruby. issues are open to improve things further yet.
Aova has joined #ruby-lang
dziemid has quit [Remote host closed the connection]
morton has quit [Quit: Page closed]
<havenwood>
morton: looks like 14.10 has a ruby21 package
yfeldblum has quit [Ping timeout: 245 seconds]
|jemc| has quit [Ping timeout: 244 seconds]
SuMo_D has quit [Quit: Off into this... Real world place...]
ottlikg has joined #ruby-lang
WhiskeyWinter has joined #ruby-lang
lytol has joined #ruby-lang
cdtaylor has joined #ruby-lang
kith_ is now known as kith
fragamus has joined #ruby-lang
kwd has joined #ruby-lang
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marcdel has quit []
solars has joined #ruby-lang
ta_ has joined #ruby-lang
ta_ has quit [Ping timeout: 246 seconds]
Antivan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hanjin has joined #ruby-lang
mkaesz has joined #ruby-lang
yfeldblum has joined #ruby-lang
yatish27 has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
nofxx has quit [Ping timeout: 245 seconds]
nofxx has joined #ruby-lang
yatish27 has quit [Ping timeout: 244 seconds]
Bwild has quit [Read error: No route to host]
yfeldblum has quit [Ping timeout: 252 seconds]
djbkd has quit [Quit: My people need me...]
cdtaylor has quit [Remote host closed the connection]
cdtaylor has joined #ruby-lang
_shinnc has joined #ruby-lang
roamingdog has joined #ruby-lang
roamingdog has quit [Ping timeout: 246 seconds]
cmckni3 has quit [Ping timeout: 244 seconds]
Aova has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
Aova has joined #ruby-lang
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fragamus has quit [Quit: Computer has gone to sleep.]
ta_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
Bwild has joined #ruby-lang
twe4ked has joined #ruby-lang
benlovell has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
greenarrow has joined #ruby-lang
riffraff has joined #ruby-lang
hahuang61 has quit [Ping timeout: 245 seconds]
twe4ked has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Ping timeout: 265 seconds]
TheMoonMaster has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
ta_ has joined #ruby-lang
Integralist has joined #ruby-lang
ta_ has quit [Ping timeout: 265 seconds]
fclausen has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
mikecmpbll has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
mkaesz has quit [Remote host closed the connection]
mkaesz has joined #ruby-lang
mkaesz has quit [Remote host closed the connection]
<yorickpeterse>
morning
ghostpl has joined #ruby-lang
<tbuehlmann>
moin
cmckni3 has joined #ruby-lang
hahuang65 has joined #ruby-lang
nofxx has quit [Read error: Connection timed out]
Aova has quit [Read error: Connection reset by peer]
ta_ has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
qba73 has joined #ruby-lang
Aova has joined #ruby-lang
<ljarvis>
howdy
ta_ has quit [Ping timeout: 244 seconds]
fullybaked has joined #ruby-lang
kyb3r_ has quit [Quit: Leaving]
arBmind1 has quit [Quit: Leaving.]
_shinnc has quit [Quit: _shinnc]
mkaesz has joined #ruby-lang
ta_ has joined #ruby-lang
ta_ has quit [Ping timeout: 255 seconds]
jxie has quit [Quit: leaving]
Integralist has quit [Ping timeout: 245 seconds]
marr has joined #ruby-lang
yatish27 has joined #ruby-lang
yatish27 has quit [Ping timeout: 255 seconds]
mkaesz has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 245 seconds]
mkaesz has joined #ruby-lang
Caius has quit [Ping timeout: 276 seconds]
ottlikg has quit [Ping timeout: 264 seconds]
j4cknewt has quit [Remote host closed the connection]
rbowlby_ has joined #ruby-lang
jo__ has quit [Quit: Connection closed for inactivity]
twe4ked has joined #ruby-lang
stamina has joined #ruby-lang
Caius has joined #ruby-lang
hendranata_ has quit [Remote host closed the connection]
greenarr_ has joined #ruby-lang
stamina has quit [Client Quit]
greenarrow has quit [Read error: Connection reset by peer]
arBmind has joined #ruby-lang
greenarr_ is now known as greenarrow
gwendall has joined #ruby-lang
ta_ has joined #ruby-lang
Integralist has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
Aova has quit [Read error: Connection reset by peer]
Integralist has quit [Ping timeout: 264 seconds]
verto_ is now known as verto
lytol has quit [Remote host closed the connection]
Aova has joined #ruby-lang
WhiskeyWinter has quit [Quit: Nettalk6 - www.ntalk.de]
postmodern has left #ruby-lang ["Leaving"]
Bwild has quit [Ping timeout: 265 seconds]
Bwild has joined #ruby-lang
workmad3 has joined #ruby-lang
arBmind1 has joined #ruby-lang
b_hoffman has joined #ruby-lang
pico-pete has quit []
arBmind has quit [Ping timeout: 245 seconds]
Integralist has joined #ruby-lang
fclausen has joined #ruby-lang
ta_ has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
Bwild has quit [Quit: leaving]
b_hoffman has quit [Quit: b_hoffman]
fujimura has quit []
fujimura has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby-lang
ldnunes has joined #ruby-lang
ta_ has quit [Ping timeout: 245 seconds]
rbowlby_ has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
benlovell has quit [Read error: Connection reset by peer]
whippythellama has joined #ruby-lang
tdy has joined #ruby-lang
tmpo has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
ottlikg has joined #ruby-lang
symm- has joined #ruby-lang
roamingdog has joined #ruby-lang
yusuf has quit [Quit: Leaving.]
fclausen has quit [Ping timeout: 272 seconds]
Aova has quit [Read error: Connection reset by peer]
AlexAltea has joined #ruby-lang
roamingdog has quit [Ping timeout: 246 seconds]
stef204 has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
Aova has joined #ruby-lang
eban has quit [Quit: WeeChat 1.0.1]
fclausen has joined #ruby-lang
eban has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
ocko has joined #ruby-lang
rikkipitt has joined #ruby-lang
nofxx has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby-lang
yatish27 has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
yatish27 has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
Mon_Ouie has joined #ruby-lang
stamina has joined #ruby-lang
stamina has quit [Client Quit]
ghostpl has quit [Remote host closed the connection]
stamina has joined #ruby-lang
nofxx has joined #ruby-lang
Vivex has joined #ruby-lang
intinig has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
the_real_intinig has joined #ruby-lang
intinig has quit [Ping timeout: 240 seconds]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
tcopeland has quit [Quit: Leaving.]
iamninja has joined #ruby-lang
the_real_intinig has quit [Remote host closed the connection]
ghostpl has joined #ruby-lang
intinig has joined #ruby-lang
Xzyx987X_ has joined #ruby-lang
Asher2 has joined #ruby-lang
djbkd has joined #ruby-lang
mqt has joined #ruby-lang
AKASkip1 has joined #ruby-lang
ryotarai_ has joined #ruby-lang
thang_ has joined #ruby-lang
f_canela has joined #ruby-lang
shinnya has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
shawnatyger has joined #ruby-lang
sonne_ has joined #ruby-lang
brixen_ has joined #ruby-lang
AKASkip has quit [*.net *.split]
j2p2 has quit [*.net *.split]
enkristoffer has quit [*.net *.split]
djbkd_ has quit [*.net *.split]
stardiviner has quit [*.net *.split]
fcanela has quit [*.net *.split]
Xzyx987X has quit [*.net *.split]
mqt_ has quit [*.net *.split]
sonne has quit [*.net *.split]
ryotarai has quit [*.net *.split]
weaksauce has quit [*.net *.split]
brixen has quit [*.net *.split]
thang has quit [*.net *.split]
malev has quit [*.net *.split]
Asher has quit [*.net *.split]
shawnacscott has quit [*.net *.split]
ryotarai_ is now known as ryotarai
enkristoffer_ has joined #ruby-lang
nofxx has quit [Read error: No route to host]
enkristoffer_ is now known as enkristoffer
Aova has joined #ruby-lang
j2p2 has joined #ruby-lang
ledestin has quit [Quit: ledestin]
ledestin has joined #ruby-lang
intinig has quit [Remote host closed the connection]
fullybaked has quit []
marr has quit [Ping timeout: 245 seconds]
stardiviner has joined #ruby-lang
greenarrow has quit [Quit: 500]
gwendall has joined #ruby-lang
roamingdog has joined #ruby-lang
gwendall_ has joined #ruby-lang
gwendall has quit [Ping timeout: 252 seconds]
yatish27 has joined #ruby-lang
greenarrow has joined #ruby-lang
yatish27 has quit [Ping timeout: 245 seconds]
Antivan has joined #ruby-lang
mskaesz has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
mkaesz has quit [Ping timeout: 245 seconds]
jo__ has joined #ruby-lang
wprice has joined #ruby-lang
sarkyniin has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 245 seconds]
intinig has joined #ruby-lang
AKASkip1 has quit [Ping timeout: 250 seconds]
<wiggl3>
How do I `gem install gist` into my user dir? Getting `Permission denied - /var/lib/gems`
houhoulis has joined #ruby-lang
Pugsley_ has joined #ruby-lang
<yorickpeterse>
gem install gist --user-install
<yorickpeterse>
you might then have to add the bin path to your shell's $PATH variable
rikkipitt has joined #ruby-lang
ta_ has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
<wiggl3>
thanks yorickpeterse :P
ta_ has quit [Ping timeout: 252 seconds]
Aova has joined #ruby-lang
Lewix has joined #ruby-lang
ta_ has joined #ruby-lang
ghostpl has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 250 seconds]
Integralist has quit [Ping timeout: 244 seconds]
Forgetful_Lion has quit [Remote host closed the connection]
Antivan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby-lang
yatish27 has joined #ruby-lang
tcopeland has joined #ruby-lang
ghostpl has joined #ruby-lang
yatish27 has quit [Ping timeout: 250 seconds]
rikkipitt has quit [Read error: Connection reset by peer]
rikkipitt has joined #ruby-lang
sudoubuntu has joined #ruby-lang
jxie has joined #ruby-lang
intinig has quit [Ping timeout: 250 seconds]
intinig has joined #ruby-lang
charliesome has quit [Quit: zzz]
terabytest has joined #ruby-lang
ta_ has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
rbowlby has joined #ruby-lang
sankaber has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
marr has joined #ruby-lang
rbowlby has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby-lang
hanjin has left #ruby-lang [#ruby-lang]
rikkipitt has quit [Quit: Leaving...]
Rylee has left #ruby-lang ["WeeChat 1.1-dev"]
terabytest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
bougyman: But yeah, RVM is a more feature-packed option. :) Including MRVM for chruby support!
<havenwood>
whippythellama: Also rbenv uses ruby-build to install rubies, which ships its own OpenSSL instead of using the package manager's. I've seen folk update OpenSSL, rebuild rbenv Ruby thinking they've linked against the package manager's OpenSSL when really they're linking against ruby-build's dated one. Anyways, ruby-install knows about package manager packages and uses them like RVM does.
<whippythellama>
havenwood: thanks, that's good to know
<whippythellama>
i could see getting bitten by that hard
AlexAltea has joined #ruby-lang
<havenwood>
whippythellama: Aye, most people assume ruby-build is using package manager packages. Especially when you install it with a package manager...
<havenwood>
But alas.
<whippythellama>
yeah, somewhat reasonable assumption to make
<bougyman>
I wonder how many package managers ruby-install knows about, and what it does when it doesn't know them?
<bougyman>
rvm finally handles this sanely, it used to blow up on crazy package managers
<havenwood>
bougyman: it knows about apt, yum, pacman, macports, brew and there's unlanded support for pkg and zypper
momomomomo has quit [Quit: momomomomo]
<havenwood>
bougyman: when it doesn't know, it relies on you to install the deps
<havenwood>
bougyman: you can also flag --no-install-deps too
fragamus has joined #ruby-lang
<bougyman>
sounds the same as rvm
<bougyman>
I mean insofar as how it handles that and what it supports.
momomomomo has joined #ruby-lang
<bougyman>
i've been meaning to add xbps support to rvm one of these days.
momomomomo has quit [Client Quit]
arBmind has quit [Quit: Leaving.]
<havenwood>
bougyman: xbps?
* havenwood
googles
symm- has joined #ruby-lang
lapide_viridi has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
<epitron>
havenwood: oh, nice! that package manager manager should be a gem!
<epitron>
gem install manman
<epitron>
i was going to write one for my scripts repo, so that scripts automatically install their dependencies
<epitron>
(only when you try to run them)
<havenwood>
epitron: hmmmmm
apt-get_ has joined #ruby-lang
Aova has joined #ruby-lang
sarkyniin has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
shinnya has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
b_hoffman has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
skade has joined #ruby-lang
rikkipitt has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
_djbkd has joined #ruby-lang
intinig has quit [Ping timeout: 240 seconds]
mrgoodcat_ is now known as mrgoodcat
jam___ has quit [Quit: Connection closed for inactivity]
ottlikg has joined #ruby-lang
Integralist has joined #ruby-lang
dellavg_ has joined #ruby-lang
Integralist has quit [Ping timeout: 245 seconds]
brooks has joined #ruby-lang
ur5us has joined #ruby-lang
intinig has joined #ruby-lang
weaksauce has joined #ruby-lang
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirin` has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
yatish27 has joined #ruby-lang
lapide_viridi has quit [Quit: Leaving]
fragamus has quit [Quit: Computer has gone to sleep.]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fragamus has joined #ruby-lang
fragamus has quit [Read error: Connection reset by peer]
intinig has quit [Remote host closed the connection]
malconis has joined #ruby-lang
twe4ked has quit [Ping timeout: 245 seconds]
intinig has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
yatish27 has quit [Ping timeout: 256 seconds]
spuk has quit [Ping timeout: 245 seconds]
b_hoffman has quit [Quit: b_hoffman]
spuk has joined #ruby-lang
twe4ked has joined #ruby-lang
kirin` has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
intinig has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby-lang
RobertBirnie has joined #ruby-lang
roamingdog has quit [Read error: Connection reset by peer]
roamingd_ has joined #ruby-lang
setanta has joined #ruby-lang
yatish27 has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
solars has joined #ruby-lang
cytoskeletor has joined #ruby-lang
Aova has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
thebastl has joined #ruby-lang
kirin` has joined #ruby-lang
cytoskeletor has quit [Client Quit]
ta_ has joined #ruby-lang
cytoskeletor has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
lytol has joined #ruby-lang
nathanstitt has joined #ruby-lang
hahuang65 has quit [Ping timeout: 250 seconds]
kirin` has quit [Ping timeout: 245 seconds]
gwendall has quit [Remote host closed the connection]
kirin` has joined #ruby-lang
unsymbol has quit [Ping timeout: 255 seconds]
ta_ has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby-lang
momomomomo has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
b_hoffman has joined #ruby-lang
kirin` has joined #ruby-lang
solars has quit [Quit: WeeChat 0.4.2]
solars has joined #ruby-lang
intinig has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
intinig has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby-lang
intinig has joined #ruby-lang
kirin` has quit [Ping timeout: 244 seconds]
kirin` has joined #ruby-lang
Integralist has joined #ruby-lang
mshieldsdunn has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
nathanstitt has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
j4cknewt has joined #ruby-lang
amsi has joined #ruby-lang
intinig has quit [Ping timeout: 264 seconds]
nathanst_ has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
Integralist has quit [Ping timeout: 265 seconds]
kirin` has quit [Ping timeout: 240 seconds]
chadwtaylor has quit [Remote host closed the connection]
kirin` has joined #ruby-lang
ta_ has joined #ruby-lang
unsymbol has joined #ruby-lang
gwendall has joined #ruby-lang
momomomomo has quit [Ping timeout: 245 seconds]
whippythellama has quit [Quit: whippythellama]
kirin` has quit [Ping timeout: 240 seconds]
kirin` has joined #ruby-lang
momomomomo has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
diegoviola has joined #ruby-lang
chadwtaylor has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has joined #ruby-lang
ta_ has joined #ruby-lang
kirin` has quit [Ping timeout: 245 seconds]
malconis has joined #ruby-lang
Sadin has joined #ruby-lang
kirin` has joined #ruby-lang
intinig has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
b_hoffman has quit [Quit: b_hoffman]
kirin` has quit [Read error: Connection reset by peer]
kamaz has joined #ruby-lang
kirin` has joined #ruby-lang
<kamaz>
Здрасти
ldnunes has quit [Quit: Leaving]
<kamaz>
Люди добрые есть кто нибудь РусскоГоворящие?
wallerdev has quit [Quit: wallerdev]
Aova has quit [Read error: Connection reset by peer]
b_hoffman has joined #ruby-lang
Serpent7776 has joined #ruby-lang
apeiros_ has joined #ruby-lang
b_hoffman has quit [Client Quit]
ta_ has quit [Ping timeout: 252 seconds]
ghostpl has joined #ruby-lang
Aova has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
ta_ has joined #ruby-lang
chadwtaylor has quit [Quit: Leaving...]
cytoskeletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kamaz has quit []
ghostpl has quit [Ping timeout: 252 seconds]
mshieldsdunn has quit [Max SendQ exceeded]
AlexAltea has quit [Ping timeout: 252 seconds]
cbog has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
AlexAltea has joined #ruby-lang
<cbog>
rubyists! I'm trying to make an app, TDD-style, with sinatra. First test involves asserting that I got an empty array. The variable IS an empty array. But the test fails because ruby, or maybe sinatra specifically, decides that my empty array [] is REALLY an empty string ''
<cbog>
I'm looking up stuff on var coercion and not having much luck
<cbog>
so I guess my question is why's it doing that? and how should I deal?
fclausen has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
momomomomo has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
nathanst_ has quit [Quit: I growing sleepy]
djellemah has joined #ruby-lang
lytol has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 264 seconds]
chadwtaylor has joined #ruby-lang
dzejrou has quit [Quit: Leaving]
djellemah has quit [Ping timeout: 245 seconds]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
fclausen has quit [Ping timeout: 272 seconds]
intinig has quit [Remote host closed the connection]
Integralist has joined #ruby-lang
lytol has joined #ruby-lang
lytol_ has joined #ruby-lang
lytol has quit [Read error: Connection reset by peer]
ottlikg has quit [Ping timeout: 265 seconds]
symm- has quit [Ping timeout: 256 seconds]
kirin` has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
Integralist has quit [Ping timeout: 265 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
qba73 has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
cmisenas has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
nathanstitt has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby-lang
kirin` has joined #ruby-lang
rikkipitt has joined #ruby-lang
charliesome has joined #ruby-lang
workmad3 has joined #ruby-lang
kirin` has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby-lang
TeuflischEinhorn has joined #ruby-lang
kirin` has joined #ruby-lang
amsi has quit [Ping timeout: 245 seconds]
Aova has quit [Read error: Connection reset by peer]
ta_ has joined #ruby-lang
charliesome has quit [Quit: zzz]
tunaCanBruh has joined #ruby-lang
kirin` has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
Aova has joined #ruby-lang
nathanstitt has quit [Ping timeout: 245 seconds]
nathanstitt has joined #ruby-lang
ghostpl has joined #ruby-lang
riffraff has quit [Quit: This computer has gone to sleep]
symm- has joined #ruby-lang
cmisenas has quit [Ping timeout: 245 seconds]
cmisenas has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
_djbkd has quit [Remote host closed the connection]
Sadin has quit [Remote host closed the connection]
Sadin has joined #ruby-lang
vipaca has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kirin` has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
fclausen has joined #ruby-lang
Sadin has quit [Ping timeout: 245 seconds]
ta_ has joined #ruby-lang
fusillicode has quit [Quit: Leaving.]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
gwendall has quit [Remote host closed the connection]
ta_ has joined #ruby-lang
apt-get_ has quit [Remote host closed the connection]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
cbog has quit [Ping timeout: 246 seconds]
yatish27 has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
tcopeland has quit [Ping timeout: 244 seconds]
ta_ has quit [Ping timeout: 245 seconds]
<bougyman>
gah why doesn't bundler honor a .netrc?
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<KINGSABRI>
wallerdev: in my situation I'll get the hex values from an array as string so I've to convert it to Fixnum then do some calculations
<wallerdev>
:) k
<KINGSABRI>
wallerdev: appretiated!
kirin` has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
kirin` has joined #ruby-lang
chinmay_dd has quit [Quit: Connection closed for inactivity]
Serpent7776 has quit [Quit: Leaving]
skade has joined #ruby-lang
AKASkip has quit [Quit: Leaving.]
ta_ has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
shinnya has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
vipaca has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
ta_ has joined #ruby-lang
yatish27 has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
stefff has joined #ruby-lang
yatish27 has quit [Ping timeout: 245 seconds]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
dziemid has joined #ruby-lang
Averna has joined #ruby-lang
gwendall has joined #ruby-lang
dziemid has quit [Remote host closed the connection]
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
ghostpl has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 245 seconds]
brooks has quit [Quit: brooks]
gwendall has quit [Ping timeout: 252 seconds]
skade has quit [Quit: Computer has gone to sleep.]
test4868 has quit [Remote host closed the connection]
kirin` has joined #ruby-lang
wallerdev_ has joined #ruby-lang
<stefff>
Hi
<stefff>
I have two Strings "02:33:55" and "04:02:12" which are durations in HH:MM:SS. How could I add up these Strings as Hours/Minutes/Secs is there a best practice? Or do I have to convert these strings to Time Objects and then add up the hours, minutes and secs?
thebastl has quit [Quit: Leaving...]
qba73 has quit [Ping timeout: 246 seconds]
wallerdev has quit [Ping timeout: 264 seconds]
wallerdev_ is now known as wallerdev
momomomomo has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
Lewix has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
workmad3 has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
riotjone_ has joined #ruby-lang
ghostpl has joined #ruby-lang
Lewix has quit [Ping timeout: 250 seconds]
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
_djbkd has joined #ruby-lang
riotjones has quit [Ping timeout: 246 seconds]
gwendall has joined #ruby-lang
Aova has joined #ruby-lang
ghostpl has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 246 seconds]
dziemid has joined #ruby-lang
kirin` has joined #ruby-lang
momomomomo has quit [Ping timeout: 245 seconds]
tcopeland has joined #ruby-lang
hramrach has quit [Remote host closed the connection]
KINGSABRI has quit [Ping timeout: 264 seconds]
cmisenas has quit [Ping timeout: 264 seconds]
hramrach has joined #ruby-lang
enebo has quit [Quit: enebo]
ghostpl has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
ledestin has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby-lang
ghostpl has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
apeiros_ has quit [Ping timeout: 264 seconds]
chadwtaylor has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
chadwtaylor has joined #ruby-lang
cmisenas has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 252 seconds]
chadwtaylor has quit [Ping timeout: 250 seconds]
lele has quit [Ping timeout: 276 seconds]
cmisenas has quit [Quit: cmisenas]
kirin` has quit [Ping timeout: 264 seconds]
kirin` has joined #ruby-lang
lele has joined #ruby-lang
dziemid has quit [Remote host closed the connection]