<z3rongod>
Anyone from Sweden? Was hoping to get some career advice
liamkeily has quit [Ping timeout: 246 seconds]
DonRichie has joined #ruby
brianpWins has joined #ruby
raphaelivan has joined #ruby
cameronbarton has joined #ruby
whunt has joined #ruby
lfox has joined #ruby
fschuindt has joined #ruby
stringoO has quit [Quit: stringoO]
zz_michael_mbp is now known as michael_mbp
bklane has joined #ruby
clevermatt has quit [Ping timeout: 246 seconds]
petey has joined #ruby
zz_jrhorn424 is now known as jrhorn424
mmitchell has joined #ruby
ephemerian has quit [Quit: Leaving.]
bradhe has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 264 seconds]
robustus has quit [Ping timeout: 264 seconds]
h0rrorvacui has joined #ruby
jamblack has quit [Quit: jamblack]
brianpWins has quit [Quit: brianpWins]
falood has joined #ruby
jamblack has joined #ruby
MattStra_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
charliesome has joined #ruby
robustus has joined #ruby
ccolorado has joined #ruby
Voodoofish4301 has joined #ruby
axl_ has joined #ruby
Voodoofish430 has quit [Ping timeout: 264 seconds]
sevenseacat has joined #ruby
ccolorado has left #ruby [#ruby]
Davey has quit [Quit: Computer has gone to sleep.]
tedstriker has joined #ruby
hogeo has quit [Remote host closed the connection]
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
hogeo has joined #ruby
kevind has quit [Quit: kevind]
TaxmanBD has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
end_guy has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
end_guy has joined #ruby
jkhwan has quit [Remote host closed the connection]
jamblack has quit [Quit: jamblack]
jkhwan has joined #ruby
jkhwan has quit [Remote host closed the connection]
jamblack has joined #ruby
jkhwan has joined #ruby
dayepa has joined #ruby
ddd has joined #ruby
havenwood has joined #ruby
bkparso has quit [Quit: bkparso]
jamesaanderson has joined #ruby
dorei has joined #ruby
TaxmanBD has quit [Ping timeout: 245 seconds]
i_s has quit []
superscott[8] has joined #ruby
<dorei>
@socket.recv(12)
<dorei>
IOError: recv for buffered IO
<dorei>
any ideas ? i read somewhere that i shouldnt mix buffered and unbuffered methods, i think i've removed all the buffered ones
bkparso has joined #ruby
<dorei>
but i aint 100% sure which are the buffered ones
TaxmanBD has joined #ruby
Davey has joined #ruby
Kricir has quit [Remote host closed the connection]
bkparso has quit [Client Quit]
magoo has quit [Ping timeout: 240 seconds]
lyanchih has joined #ruby
axl_ has quit [Quit: axl_]
asccigcc has joined #ruby
zz_michael_mbp is now known as michael_mbp
Xeago has joined #ruby
ffranz has quit [Quit: Leaving]
asccigcc has left #ruby [#ruby]
burlyscudd has quit [Ping timeout: 252 seconds]
tharindu has joined #ruby
crazymykl has quit [Remote host closed the connection]
tkuchiki has joined #ruby
crazymykl has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<bnagy>
dorei: probably need to see more of your code
aley has quit [Quit: aley]
mark06 has joined #ruby
<dorei>
bnagy: well, is there a list of all the io buffered methods so as to know for sure what to avoid ?
sparrovv has quit [Quit: sparrovv]
ddd is now known as deryl
deryl is now known as ddd
psyl0n has quit [Ping timeout: 272 seconds]
Xeago has quit [Ping timeout: 246 seconds]
burlyscudd has joined #ruby
<mark06>
what is the status of ruby 2.1 previews? there's a bug with Math.log(really_big, base) which is fixed after 2.0 but I would like to have a reasonably stable version
<mark06>
reasonably stable == less bugs than 2.0
psyl0n has joined #ruby
<withnale>
I have two hashes of hashes that should be equivalent. However, one contains string literals for everything, the other contains real values (such as numbers and booleans)... Is there any easy way to convert it to all string literals so I can compare them?
<withnale>
I thought of a map of the values of the hash and using .to_s on the values, but the hash is a complex structure with many levels of hashes...
ddd is now known as pgpkeys
pgpkeys is now known as gpgkeys
<withnale>
is there a trick, like converting it to yaml or json and back that would do it?
<havenwood>
mark06: preview2 is nice, should tide you over till Christmas
yfeldblum has quit [Ping timeout: 248 seconds]
<havenwood>
mark06: There'll be a release candidate here in a bit.
<mark06>
good....
SJr has joined #ruby
<havenwood>
then on to 2.2
drag00n has quit [Ping timeout: 272 seconds]
jenskarlsen has joined #ruby
ldnunes has quit [Ping timeout: 272 seconds]
conor_ has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
elux has joined #ruby
Bosox20051 has joined #ruby
nhhagen has quit [Remote host closed the connection]
jaybonci has joined #ruby
freezey has quit [Remote host closed the connection]
<bnagy>
mark06: don't forget to keep breaking it
coca_rails has joined #ruby
TaxmanBD has quit [Ping timeout: 272 seconds]
mmitchell has quit [Remote host closed the connection]
kevinykchan has quit [Quit: Computer has gone to sleep.]
Davey has quit [Ping timeout: 246 seconds]
<coca_rails>
yo
dhruvasagar has joined #ruby
cameronbarton has joined #ruby
nhhagen has joined #ruby
bradhe has quit [Remote host closed the connection]
hipsteryo has joined #ruby
<mark06>
bnagy: keep? I never got it :)
sambao21 has joined #ruby
amacgregor has joined #ruby
bradhe has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kitak has joined #ruby
lukec has quit [Quit: lukec]
<bnagy>
distinguishable from random for chosen plaintext is as good as broken
vxxr has joined #ruby
mmitchell has joined #ruby
defendguin has joined #ruby
sambao21 has quit [Ping timeout: 272 seconds]
Voodoofish4301 has quit [Quit: Leaving.]
Gowie has joined #ruby
<Gowie>
Anyone know of a gem to convert back and forth between coffeescript and javascript?
<jaybonci>
Hey folks. Am seeing a screwed up problem on a fresh reinstall of ruby-2.0 latest on Mac OS X 10.8.5. I'm getting a Syntax error on the 2.0 hash assignment inside of server.rb in railties. rails -v shows 4.0.1 and ruby -v shows the rvm path to ruby. What might I be missing?
IceDragon has quit [Quit: Space~~~]
elux has quit [Quit: Bye!]
<bnagy>
gist the exact error and the exact line of code
<bnagy>
or check RUBY_VERSION in the code itself before the suspect line
raphaelivan has quit [Quit: Leaving.]
<mark06>
any reason %RUBYLIB% not to work on windows? cannot get it... \\, \ or /, none work as path separator
lfox has joined #ruby
coca_rails has quit [Remote host closed the connection]
<mark06>
$RUBYLIB works in msys (/local/bin) but not on cmd.exe when /local/bin is translated to windows path
<bnagy>
if you need to pass something to a windows API then you need windows\\style\\ otherwise for all ruby code you need ruby/style
coca_rails has joined #ruby
Soda has quit [Remote host closed the connection]
<jaybonci>
Huh, ruby version is showing as 1.8.7 when I run it there. How can I scrub the old ruby out of my path.
cameronbarton has quit [Quit: cameronbarton]
Liothen has joined #ruby
bradhe has quit [Remote host closed the connection]
<bnagy>
jaybonci: that depends on about a million things, some of which are all railsy, so I can't really help
<bnagy>
especially with rvm :<
mmitchell has quit []
<bnagy>
don't go removing usr bin ruby though
jamblack has quit [Quit: jamblack]
<mark06>
jaybonci: type -a ruby
michael_mbp is now known as zz_michael_mbp
cameronbarton has joined #ruby
<jaybonci>
mark06: It has three. One in .rvm/rubies/ruby-2.0.0-p353, the next in .rvm/bin/ruby, the last one in /usr/bin/ruby
<mark06>
bnagy: tried all styles, c:/foo, c:\\foo, c:\foo... none work....it's odd cause it works from MSYS
zz_michael_mbp is now known as michael_mbp
<mark06>
jaybonci: last one is likely a symlink to the old version
<bnagy>
mark06: what are you actually trying to use the string for?
jrhorn424 is now known as zz_jrhorn424
cameronbarton has quit [Client Quit]
<mark06>
bnagy: require's search path... works like a charm in MSYS
<jaybonci>
mark06: Yeah, that's in the Ruby.framework piece.
jacobsmith has quit [Quit: leaving]
<mark06>
jaybonci: ah wait... don't know... .rvm is within your home? well you can decide what to do with that though
<jaybonci>
yeah, rvm is in my path, set by bashrc. It lives in ~/.rvm
veduardo has left #ruby [#ruby]
nobitanobi has quit [Ping timeout: 240 seconds]
otherj has quit []
sambao21 has joined #ruby
yfeldblum has joined #ruby
<mark06>
bnagy: I can require 'parse-options' and it works in MSYS cause ENV['RUBYLIB']=='/local/bin'... but on cmd.exe, even if %RUBYLIB% is C:/Programs/Desenvolvimento/MinGW/msys/1.0/local/bin (the actual location of /local/bin), and with backslashes (single and double), even so it won't find parse-options....
<bnagy>
well I don't have that env var on windows
endash has quit [Ping timeout: 248 seconds]
<jaybonci>
Oh fascinating.
<jaybonci>
This is a bug in RVM.
<jaybonci>
Kind of
<jaybonci>
My terminal isn't running my bash_profile
<jaybonci>
it's running my bashrc
<jaybonci>
Got it nailed, thanks for the pointers guys
asteros has quit [Ping timeout: 246 seconds]
<bnagy>
jaybonci: that's 'normal'
moneydouble has quit [Quit: Leaving.]
<bnagy>
switch to chruby :P
noob101 has joined #ruby
<bnagy>
mark06: did you try just setting it in ENV instead?
<noob101>
hello
<havenwood>
+1 chruby
<bnagy>
I'm not sure how the windows % substitution plays within ruby itself
<bnagy>
like `%SYSTEMROOT%` gets me ""
<bnagy>
as opposed to ENV['SYSTEMROOT']
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby
nhhagen has quit [Remote host closed the connection]
colonolGron has quit [Quit: leaving]
michael_mbp is now known as zz_michael_mbp
<heftig>
bnagy: `%SYSTEMROOT%` makes no sense
<heftig>
try `echo %SYSTEMROOT%`
tedstriker has quit [Quit: Anti-Fraping status set.]
Leighton has quit [Quit: leaving]
zz_michael_mbp is now known as michael_mbp
<Reach>
textmate is amazing
<bnagy>
heftig: yes. Because it's actually a windows command
okinomo has quit [Ping timeout: 272 seconds]
vpretzel has quit [Remote host closed the connection]
<heftig>
bnagy: %SYSTEMROOT% is a directory, not a command
<heftig>
you cannot execute a directory
<bnagy>
echo is a command
vpretzel has joined #ruby
athst has joined #ruby
jaybonci has left #ruby [#ruby]
okinomo has joined #ruby
<bnagy>
anyway, the point is that using windows % subst inside ruby doesn't really make sense at all
kure has joined #ruby
coca_rails has quit [Ping timeout: 245 seconds]
<heftig>
if `` calls cmd it might work
<heftig>
i mean, `echo $PATH` works in unix
<mark06>
bnagy: cannot be set in ENV, but no I didn't... however the value is accessible via ENV...
<bnagy>
but `$PATH` will also give you an exception
<bnagy>
not just ""
<heftig>
bnagy: that might be windows
ViPi2 has joined #ruby
ViPi2 has quit [Max SendQ exceeded]
<mark06>
bnagy: cannot because it varies on each one's machine.... solution I'm using atm is require_relative (so the user needs parse-options in same dir...maybe easier though)
<bnagy>
mark06: just use a gem?
clevermatt has joined #ruby
Davey has joined #ruby
sambao21 has quit [Ping timeout: 272 seconds]
vpretzel has quit [Ping timeout: 252 seconds]
lukec has joined #ruby
<mark06>
bnagy: overkill... we never have time to learn stuff...
<mark06>
but gem sounds good.... gem install my-stufff.....
kaspergrubbe has joined #ruby
athst has quit [Quit: athst]
nhhagen has joined #ruby
ewnd9 has joined #ruby
tharindu has joined #ruby
bklane has quit [Remote host closed the connection]
<mark06>
thanks all anyway
michael_mbp is now known as zz_michael_mbp
asteros has joined #ruby
zz_michael_mbp is now known as michael_mbp
asteros has quit [Client Quit]
chuk has quit [Quit: This computer has gone to sleep]
fgo has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Ping timeout: 252 seconds]
mark06 has left #ruby [#ruby]
mercwithamouth has quit [Ping timeout: 246 seconds]
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
zoite has joined #ruby
diegoviola has joined #ruby
rjhunter has joined #ruby
<bnagy>
dammit now I want to reverse `` instead of working
michael_mbp is now known as zz_michael_mbp
zz_michael_mbp is now known as michael_mbp
Mars` has quit [Remote host closed the connection]
ddd has quit [Quit: Leaving]
liamkeily has joined #ruby
Mars` has joined #ruby
havenwood has quit [Remote host closed the connection]
bklane has joined #ruby
bklane has quit [Remote host closed the connection]
matheuscaceres has quit [Quit: matheuscaceres]
rjhunter has quit [Ping timeout: 245 seconds]
n1x has quit [Ping timeout: 272 seconds]
agent_white has quit [Quit: leaving]
varfoo has joined #ruby
fgo has joined #ruby
hipsteryo has quit [Quit: hipsteryo]
asteros has joined #ruby
Mars` has quit [Ping timeout: 248 seconds]
AndroUser has joined #ruby
liamkeily has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
fgo_ has joined #ruby
fgo has quit [Ping timeout: 246 seconds]
hogeo has quit [Ping timeout: 246 seconds]
michael_mbp is now known as zz_michael_mbp
zz_michael_mbp is now known as michael_mbp
Spami has quit [Quit: This computer has gone to sleep]
hogeo has joined #ruby
moneydouble has joined #ruby
rjhunter has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mr`spock>
reuses the 'symbol' referred to earlier to avoid having me to reallocate the string, yeah?
<tobiasvl>
what is this
Elhu has quit [Quit: Computer has gone to sleep.]
<tobiasvl>
quiz tuesday
<shevy>
Galeforce just write a few ruby scripts, this knowledge will quickly enter your brain the moment you come to have to solve things related with that
<mr`spock>
noob tuesday
<Galeforce>
yeah
xcess_denied has quit [Client Quit]
Gonzih has joined #ruby
<shevy>
wait I got a really simple one
<Galeforce>
i don't know what scripts to write though
<shevy>
Galeforce how do you use a method in ruby?
dhruvasagar has quit [Read error: Connection reset by peer]
<shevy>
oh wait
<shevy>
the pastie returns the right thing, the bot only pasted the first line
<shevy>
Galeforce a method
<Galeforce>
what about a method
dhruvasagar has joined #ruby
<Gonzih>
Hi guys, I'm trying to implement yin-yang puzzle in ruby but have issues with continuations, are there some limitations to ruby version of callcc? here is my code https://gist.github.com/Gonzih/7654912
<shevy>
[] is a method, you can see we could define it via def above
<mr`spock>
pity ruby doesn't appear to have a native rot13 method
<shevy>
Galeforce, class String and class Array have this method defined
Mars`_ has quit [Remote host closed the connection]
neo__ has joined #ruby
Mars` has joined #ruby
neo__ has left #ruby [#ruby]
olivier_bK has joined #ruby
michael_alex has quit [Max SendQ exceeded]
timonv has joined #ruby
mansi has joined #ruby
michael_alex has joined #ruby
rjhunter has joined #ruby
sandeepk has quit [Quit: Leaving...]
rjhunter has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
gr33n7007h has quit [Remote host closed the connection]
Hanmac has joined #ruby
Mars` has quit [Ping timeout: 264 seconds]
choobie has joined #ruby
liamkeily has joined #ruby
nhhagen has joined #ruby
<Hanmac>
shevy & apeiros & others: i have a bug which does segfault in rubytrunk, can someone with different versions please check if it happens for him too? https://bugs.ruby-lang.org/issues/9151
<Hanmac>
from what i think it only happens for 64bit system
choobie has quit [Client Quit]
jacobw has quit [Remote host closed the connection]
rjhunter has joined #ruby
mansi has quit [Ping timeout: 272 seconds]
clevermatt has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
<workmad3>
18>> File.open ("notexisting.txt", "w") do |entry| entry.puts "Hi" end
<eval-in>
workmad3 => /tmp/execpad-15c82f5cb699/source-15c82f5cb699:2: warning: don't put space before argument parentheses ... (https://eval.in/73528)
<workmad3>
shevy: but ('dataset1', 'foo') is invalid
<wald0_>
why is invalid ?
<shevy>
wow
p4d4w4n has quit [Quit: This computer has gone to sleep]
<shevy>
the ruby parser is some crazy thing
<workmad3>
that's not 'crazy thing'
<workmad3>
that's just that you can't use () to define arrays in ruby :P
* wald0_
forks ruby source code in order to be able to put a space before (
<workmad3>
wald0_: it was removed for a reason :P
<tobiasvl>
come oooon, just skip the parentheses
popl has quit [Ping timeout: 248 seconds]
okinomo has quit [Ping timeout: 245 seconds]
<wald0_>
workmad3: then i ^C the fork :)
<wald0_>
tobiasvl: maybe, but i like them
p4d4w4n has joined #ruby
rjhunter has quit [Ping timeout: 264 seconds]
tesuji has quit [Read error: Connection reset by peer]
<workmad3>
wald0_: namely that it caused extra complexity in the parsing to disambiguate between 'method ('something' + 'foo').capitalize' as a single argument or as method('something' + 'foo').capitalize
<wald0_>
workmad3: array? for me its a parameter, im passing the parameter "file" and then the "attribute" to File.open, isn't that?
noob101 has joined #ruby
popl has joined #ruby
<workmad3>
wald0_: my point is that ("foo") on its own is using parentheses for grouping and controlling precedence
popl has quit [Changing host]
popl has joined #ruby
pedda has joined #ruby
<workmad3>
wald0_: and ("foo", "bar") is invalid syntax for that purpose (the logical thing being that it could be an array or tuple literal, but ruby doesn't support that as literal syntax)
<workmad3>
wald0_: some_method ("foo") is then not using () for a parameter list, it's using them for controlling precedence, so ("foo", "bar") is invalid there for exactly the same reasons that it's invalid without the method call
fbernier has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
<wald0_>
mmh, im confused, so its not hte same File.open("file", "w") and File.open "file", "w" ?
<workmad3>
wald0_: yes, those are the same
<workmad3>
wald0_: but File.open ("file", "w") is different
fbernier has joined #ruby
<workmad3>
wald0_: I was just talking about with the space before the parens, which makes the parens no longer an argument list ;)
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
Hanmac has joined #ruby
wendell_ has quit [Read error: Connection reset by peer]
<workmad3>
wald0_: and then you start to see why the space before the parens is ambiguous... e.g. should 'some_method ((a+b)**2) * c' be '(some_method((a+b)**2)) * c' or 'some_method(((a + b)**2) * c)'? :)
<wald0_>
12:42 < tobiasvl> come oooon, just skip the parentheses
<wald0_>
how i should do that without () ?
<tobiasvl>
yeah, you can't
nhhagen has quit [Ping timeout: 265 seconds]
petey has joined #ruby
nones has left #ruby ["Ухожу я от вас (xchat 2.4.5 или старше)"]
<wald0_>
use parentheses or not use parentheses, there's not the question
<workmad3>
wald0_: f = File.open "/tmp/wombat.txt", "r"; f.external_encoding
<Hanmac>
wald0_: PS: never use File.open without a block …
kaspergrubbe has quit [Remote host closed the connection]
<wald0_>
hanmac: why not? because i need to (and may forget) to close it ?
lyanchih has quit [Ping timeout: 272 seconds]
<Hanmac>
yeah, lets let ruby do the work: File.open("/tmp/wombat.txt", "r", &:external_encoding)
rjhunter has joined #ruby
<wald0_>
what means &:external_encoding here ?
lethjakman has quit [Ping timeout: 272 seconds]
<Hanmac>
like that: File.open("/tmp/wombat.txt", "r") {|f| f.external_encoding }
petey has quit [Ping timeout: 265 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
<lupine>
[1,2,3].collect(&:to_s)
<lupine>
=> ["1", "2", "3"]
fijimunkii has quit [Ping timeout: 245 seconds]
<wald0_>
so its &:something the same as .something ?
* wald0_
got confused
<lupine>
it creates a proc object that calls the specified message on its argument
noop has joined #ruby
<lupine>
just another magic shorthand
rjhunter has quit [Ping timeout: 272 seconds]
<wald0_>
i see
Elhu has quit [Quit: Computer has gone to sleep.]
<lupine>
speaking of which, I want to be able to do include Foo, args_to_be_passed_to_module_included
claymore has joined #ruby
<lupine>
but it seems I can't
<wald0_>
i think that i have not arrived yet to the "proc" section of the book :)
sparrovv has quit [Quit: sparrovv]
<Hanmac>
lupine: the problem there is: should that work on the Foo module itself or only at the included place? … there is also the IClass struct in ruby MRI, which is not accessable for ruby code itself
rickruby has quit [Remote host closed the connection]
liamkeily has quit [Ping timeout: 246 seconds]
<lupine>
aye, it's a bit of an ask
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lupine>
oh well, this one can be a copy 'n paste job instead
kaspergrubbe has joined #ruby
mikecmpbll has joined #ruby
jkamenik has joined #ruby
marcgg_ has joined #ruby
ananthakumaran1 has joined #ruby
Mon_Ouie has joined #ruby
utkarsh has quit [Ping timeout: 240 seconds]
preller has quit [Ping timeout: 264 seconds]
preller has joined #ruby
rjhunter has joined #ruby
finch has quit [Ping timeout: 240 seconds]
cschneid has quit [Ping timeout: 240 seconds]
hiyosi has joined #ruby
marcgg has quit [Ping timeout: 246 seconds]
ananthakumaran has quit [Ping timeout: 264 seconds]
<shevy>
rome was not built in a day
<shevy>
it was copy and then pasted
<shevy>
wald0_ after all those years in ruby, procs still confuse me
<Hanmac>
shevy maybe that was only symbolic links? ;P
braoru has joined #ruby
<Hanmac>
shevy: about procs: specialy some stuff like array.map(&"%03d".method(:%)) ? ;P
pskosinski has joined #ruby
cdelo has joined #ruby
<shevy>
I would never use anything crazy like that
rjhunter has quit [Ping timeout: 272 seconds]
Ox6abe has joined #ruby
* Hanmac
would do because he can
finch has joined #ruby
<shevy>
hanmac how are your wxwidget bindings coming along?
cschneid has joined #ruby
wendell_ has quit [Quit: This computer has gone to sleep]
<Hanmac>
shevy: i updated them recently against newest wx code, but there is still stuff missing … last week i tryed to add more classes that i can marshal dump
<wald0_>
"loop do" == "while true" ?
* wald0_
very used of while true in bash
TaxmanBD has joined #ruby
Advocation has quit [Quit: Advocation]
colonolGron has joined #ruby
<Hanmac>
shevy: for sample should wxBitmap and/or wxImage be dumpable?
nbrosnahan has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
utkarsh has joined #ruby
p4d4w4n has joined #ruby
<shevy>
no idea
<shevy>
I never had to ask myself this question when using ruby + GUI
<shevy>
wald0_ this is not functionally the same
<shevy>
wald0_ loop runs without a condition check as such, while true has a condition check
<shevy>
wald0_ also loop is sexier
<shevy>
only for-loops are worse
<Hanmac>
shevy you can use for on Enumerators ,P
<Hanmac>
>> for c in "str".each_char; print c;end; nil
hogeo has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 246 seconds]
okinomo has joined #ruby
obs has joined #ruby
<wald0_>
whats the meaining of catch&throw? i dont quite get it
OdNairy has quit [Ping timeout: 272 seconds]
camilasa_ has quit [Remote host closed the connection]
OdNairy has joined #ruby
<Hanmac>
is ruby's way to play baseball ;P
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
amrit_ has joined #ruby
matheuscaceres has quit [Quit: matheuscaceres]
xcess_denied has quit [Quit: Leaving...]
raphaelivan has quit [Quit: Leaving.]
julweber has joined #ruby
amritanshu_RnD has quit [Quit: Leaving]
amrit_ has quit [Read error: Connection reset by peer]
<wald0_>
if i remove the catch, and replace the throw with an exit/break, its not the same ?
amritanshu_RnD has joined #ruby
drumusician has quit [Ping timeout: 248 seconds]
matheuscaceres has joined #ruby
ce_afk has quit [Ping timeout: 245 seconds]
<Hanmac>
wald0_: like when you are in many many capsuled loops, catch/throw maybe nicer than break
mojjojo has joined #ruby
<wald0_>
mmh, i think that if i end in a such complex loop, i must better rewrite a better algoritm to reach my needs :)
<shevy>
wald0_ catch and throw is another awful thing in ruby nobody likes
jcromartie has joined #ruby
KevinSjoberg has quit [Ping timeout: 272 seconds]
<wald0_>
goto in c looks more useful
<shevy>
wald0_ more importantly, do we need catch/throw when we already have begin/rescue/exit/next/retry
<tobiasvl>
haha what
<Hanmac>
wald0_: ruby can have goto too ;P
andrewh has quit [Ping timeout: 245 seconds]
pranny has quit [Quit: Leaving.]
vadviktor has quit [Quit: No Ping reply in 180 seconds.]
* wald0_
adds a note on his refernece: catch&throw is complex and useless, avoid it
KevinSjoberg has joined #ruby
<shevy>
\o/
<shevy>
and ugly
vadviktor has joined #ruby
rjhunter has joined #ruby
ce_afk has joined #ruby
andrewh has joined #ruby
inad922 has joined #ruby
<inad922>
hello
<shevy>
rule of thumb: when something it is ugly in ruby, it was designed that way to have people avoid it as a feature
<shevy>
especially the -> alias
<inad922>
How can I convince capybara to make a "visit" against an https page with a given pem file?
liamkeily has joined #ruby
nowthatsamatt has joined #ruby
<wald0_>
shevy: nah, its just for not being bored in the next rewrited version :)
<wald0_>
oh, what is -> ? i have see a code with ->(*_) and i thought that was a finger picking in an eeye
realDAB has quit [Quit: realDAB]
mojjojo has quit [Quit: mojjojo]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gr33n7007h>
wald0_, shorthand for lambda
<shevy>
wald0_ sadly, features that are in ruby once, are rarely removed again
jcromartie has joined #ruby
gyre007 has quit [Ping timeout: 245 seconds]
<shevy>
take autoload()
<shevy>
matz hates it
<shevy>
yet it is still aprt of ruby
monkegjinni has joined #ruby
rjhunter has quit [Ping timeout: 240 seconds]
mojjojo has joined #ruby
realDAB has joined #ruby
jcromartie has quit [Client Quit]
<wald0_>
is autoload bad? looks like can improve in memory usage
* wald0_
just readed it in ri
<shevy>
dunno
<shevy>
I never used it
Elhu has joined #ruby
AxonetBE has joined #ruby
varfoo has quit [Ping timeout: 252 seconds]
sandeepk has quit [Quit: Leaving...]
realDAB has quit [Client Quit]
<AxonetBE>
On my production server I have now ruby 1.9.3p327 with apache2 and passenger but I want to update to ruby-1.9.3-p448
<AxonetBE>
can I do this without downtime ?
fijimunkii has joined #ruby
Advocation has joined #ruby
mansi has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<shevy>
you mean like zero seconds downtime
<shevy>
how do you want to do this if the old instance is still running on default ports
<Hanmac>
AxonetBE: let me say this: you are flying in a plane, is it possible to change the Engine without landing? ;P
endash has joined #ruby
havenwood has joined #ruby
<AxonetBE>
hanmac: but downtime is not a problem
<AxonetBE>
but do I have to reinstall all the gems and re-deploy all the apps also?
rjhunter has joined #ruby
<Hanmac>
AxonetBE: i would recomend to jump to ruby2+ on a test server, and if everything works do it also on the product server
<Hanmac>
and yes, you should reinstall all gems, specially the C-ext ones
schnittchen has left #ruby [#ruby]
colonolGron has quit [Read error: Connection reset by peer]
polaco_zZz is now known as polaco
nhhagen has joined #ruby
falten has quit [Ping timeout: 264 seconds]
colonolGron has joined #ruby
amund_ has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 272 seconds]
falten has joined #ruby
amund_ has joined #ruby
BizarreCake has joined #ruby
lkba has joined #ruby
lyanchih has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
simplon has joined #ruby
rjhunter has quit [Ping timeout: 245 seconds]
tesuji has joined #ruby
joonty has quit [Ping timeout: 246 seconds]
nhhagen has quit [Ping timeout: 252 seconds]
okinomo has quit [Ping timeout: 265 seconds]
browndawg has quit [Quit: Leaving.]
Kricir has quit [Ping timeout: 248 seconds]
Ox6abe has quit [Remote host closed the connection]
<Hanmac>
AxonetBE: specially when the major or minor version changes (you can look at the ABI version) … if this one changes, you need to reinstall the gems because they can be broken
avril14th has joined #ruby
lyanchih has quit [Quit: lyanchih]
robbyoconnor has quit [Ping timeout: 248 seconds]
avril14th has quit [Remote host closed the connection]
avril14th has joined #ruby
<AxonetBE>
and if I know that all the gems are working fine in that ruby version, is a reinstall of the gems ( installed with bundler ) still needed?
KevinSjoberg has quit [Ping timeout: 248 seconds]
varfoo has joined #ruby
vadviktor has quit [Quit: No Ping reply in 180 seconds.]
sheepman has quit [Ping timeout: 240 seconds]
falten has quit [Ping timeout: 264 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
vadviktor_ has quit [Quit: No Ping reply in 180 seconds.]
rjhunter has joined #ruby
timmow has quit [Ping timeout: 260 seconds]
wiak has quit [Excess Flood]
movedx has quit [Ping timeout: 245 seconds]
vadviktor has joined #ruby
wiak has joined #ruby
KevinSjoberg has joined #ruby
monkegjinni has quit [Remote host closed the connection]
clevermatt has quit [Remote host closed the connection]
<Hanmac>
AxonetBE: i dont trust bundler, i still would recomend to reinstall them
<shevy>
hehe
<shevy>
hanmac likes bundler
vadviktor_ has joined #ruby
michael_mbp is now known as zz_michael_mbp
wald0_ has quit [Ping timeout: 246 seconds]
naquad has quit [Ping timeout: 252 seconds]
timmow has joined #ruby
fijimunkii has quit [Ping timeout: 240 seconds]
nowthatsamatt has quit [Quit: nowthatsamatt]
<shevy>
bundler makes people smarter
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
falten has joined #ruby
Kabaka has joined #ruby
error404 has quit [Ping timeout: 252 seconds]
matheuscaceres has quit [Quit: matheuscaceres]
rjhunter has quit [Ping timeout: 272 seconds]
schaary has joined #ruby
<shevy>
hanmac!!!
zz_michael_mbp is now known as michael_mbp
vadviktor_ has quit [Client Quit]
ShinySides has quit [Ping timeout: 265 seconds]
naquad has joined #ruby
kevinfagan has quit [Ping timeout: 252 seconds]
mark_locklear has joined #ruby
vadviktor_ has joined #ruby
nateberkopec has joined #ruby
Ox6abe has joined #ruby
banghouse2 has quit [Remote host closed the connection]
fijimunkii has joined #ruby
jamesaanderson has joined #ruby
KevinSjoberg has quit [Ping timeout: 248 seconds]
vadviktor has quit [Quit: No Ping reply in 180 seconds.]
vadviktor has joined #ruby
vadviktor_ has quit [Client Quit]
ShinySides has joined #ruby
vadviktor_ has joined #ruby
kevinfagan has joined #ruby
breakingthings has joined #ruby
havenwood has joined #ruby
sambao21 has joined #ruby
Meistarin has joined #ruby
KevinSjoberg has joined #ruby
<Hanmac>
shevy: bundler makes people more lazy than they should be
<shevy>
yes
<shevy>
and they will also learn less that way
kilophoton has joined #ruby
<lupine>
I agree. we should also remove their keyboards
<lupine>
if they can't do the necessary USB negotiations with a paperclip, they have no business using computers
wind2x_ has joined #ruby
<shevy>
not at all
movedx has joined #ruby
rhunter has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
RaCx has joined #ruby
Lewix has joined #ruby
<Hoozt>
Hello shevy :)
<shevy>
hmm do I remember you
<lupine>
^^
<Hoozt>
haha
wind2x has quit [Ping timeout: 272 seconds]
<shevy>
I have extremely short memory on IRC. I dont keep time stamps either. it's like one neverending scroll
shredding has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<Hanmac>
lupine: lets simulate keyboard input with the audio recorder and a blowing whistle (not whistleblower) ;P
<lupine>
also an option
dhruvasagar has joined #ruby
inad922 has quit [Ping timeout: 260 seconds]
<Hoozt>
Well, what is I say I'm having problems with a debain server.....?
<Hoozt>
"ERROR: Failed to build gem native extension." ? :)
<shevy>
Hoozt that's what you get from following hanmac ;)
naquad has joined #ruby
asobrasil has joined #ruby
<Hanmac>
Hoozt: my first guess is that you miss "make", or "gcc" or other important packags to install gems … which gem is it an particular, and what is the full error message?
ce_afk has joined #ruby
KevinSjoberg has joined #ruby
<Hoozt>
its unicorn
timmow has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
<Hoozt>
and the terminal massage just says "ERROR: Error installing unicorn:"
<Hoozt>
ERROR: Failed to build gem native extension.
<Hanmac>
shevy: the problem is not that most Internet users are to lazy to google … no, most internet users are SO lazy that they dont even click for links that google FOR them …
<shevy>
yeah
<shevy>
I wouldnt click on links either
<GreatSUN>
hanmac: so I have to use this base.extend and a submodule instead of self.something ?
blaskovicz1 has joined #ruby
<GreatSUN>
otherwise it will not be working?
<shevy>
extend that way is so verbose
<Hanmac>
GreatSUN: yes
<GreatSUN>
hanmac: ok, thanks a lot
blaskovicz has quit [Ping timeout: 246 seconds]
n1x has quit [Ping timeout: 246 seconds]
Gowie has quit [Ping timeout: 272 seconds]
tvw has quit []
braoru has quit [Quit: Leaving]
s2013 has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
psyl0n has quit [Remote host closed the connection]
tonni has joined #ruby
tannerburson has quit [Quit: tannerburson]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
virtualize has quit [Read error: Connection reset by peer]
mansi has quit [Remote host closed the connection]
ppppaul has quit [Ping timeout: 265 seconds]
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
falood has quit []
Nies has joined #ruby
rjhunter has joined #ruby
Hanmac has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
Kneferilis has quit [Quit: Leaving]
tagrudev has joined #ruby
mark_locklear has joined #ruby
endash has joined #ruby
seich- has quit [Ping timeout: 240 seconds]
LexicalScope has quit [Ping timeout: 245 seconds]
<GreatSUN>
can someone tell me where to find documentation how to handle missing method in module within the module itself?
<GreatSUN>
I know how to handle not defined constants in general (Object.const_missin(name))
<GreatSUN>
but I don't remember how to do that within a module for methods only
seich- has joined #ruby
Kneferilis has joined #ruby
joonty has joined #ruby
rjhunter has quit [Ping timeout: 272 seconds]
mmitchell has joined #ruby
Advocation has joined #ruby
<GreatSUN>
found it
<GreatSUN>
self.method.missing
baordog has joined #ruby
jamblack has quit [Quit: jamblack]
s2013 has joined #ruby
freezey has quit [Remote host closed the connection]
thams has quit [Quit: thams]
endash has quit [Ping timeout: 240 seconds]
ewnd9 has joined #ruby
Kricir has joined #ruby
mojjojo has quit [Quit: mojjojo]
Squarepy has quit [Quit: Leaving]
jim87 has joined #ruby
mark06 has left #ruby [#ruby]
tannerburson has joined #ruby
<jrhe>
Is there a standard way of conditionally enabling / disabling a piece of middleware per request?
<jrhe>
rack middleware*
<jim87>
hello! I'm starting writing ruby code. I've got a question about threads, buffers and shared memory. My idea is to write a thread which writes data into a buffer object, which is thread safe in order to "pop" data in another thread. In this way the write thread is light and tries to avoid loosing data incoming, while the "read" thread may take more time to process it. Is it possible to do this
<jim87>
in ruby?
carlyle has joined #ruby
havenwood has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.2]
wallerdev has joined #ruby
kayloos has joined #ruby
geekbri has joined #ruby
endash has joined #ruby
nucatus has quit [Remote host closed the connection]
mando has joined #ruby
nucatus has joined #ruby
obs has quit [Ping timeout: 248 seconds]
jbpros has quit [Quit: jbpros]
blueOxigen has quit [Ping timeout: 272 seconds]
rjhunter has joined #ruby
nhhagen has joined #ruby
obs has joined #ruby
tonni has quit [Read error: Connection reset by peer]
mmitchell has quit [Read error: Connection reset by peer]
Czupa has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<jim87>
wuest: how can I wait the threads to end? Thanks :)
wallerdev has quit [Quit: wallerdev]
Hanmac has joined #ruby
gyre007 has quit [Remote host closed the connection]
<wuest>
gerep: What does job.time represent? Time.at(num) assumes you are giving the time in Epoch time format (see: http://en.wikipedia.org/wiki/Epoch_time) so the output you show is _technically_ correct.
<ccolorado>
Can someone explain why this line fails date = Date.strptime( '4/22/2013', '%-m/%-d/%Y' ) with this error `new_by_frags': invalid date (ArgumentError) ?
<wuest>
gerep: subtracting a time object from another will give the difference in time. What are you HOPING to end up with?
Astralum has joined #ruby
<havenwood>
jim87: oh, you want to stagger the output? nvm that ^ then, i mistook you wanting to wait for threads to die to move on.
iamjarvo has quit [Ping timeout: 246 seconds]
zipper has quit [Quit: Lost terminal]
<gerep>
wuest: I'm trying to calculate the time an action took, based on the time it started (job.time) and when it was done (Time.now)
tonni has quit [Read error: Connection reset by peer]
houndstooth has joined #ruby
rdark_ has quit [Ping timeout: 248 seconds]
<jim87>
wuest: thanks for the book suggestion. I'm working on a provider/consumer simple application which grabs data from a network provider and then queues the data for db insert
tannerburson has quit [Quit: tannerburson]
wormwood has quit [Changing host]
wormwood has joined #ruby
browndawg has left #ruby [#ruby]
Gwyxx has joined #ruby
zz_tsykoduk is now known as tsykoduk
varfoo has quit [Ping timeout: 272 seconds]
Gwyxx is now known as SL-RHanson
ewnd9 has quit [Ping timeout: 246 seconds]
s2013 has quit [Ping timeout: 252 seconds]
dangerousdave has joined #ruby
<havenwood>
jim87: A limitless queue or of a specific size? Does the queue timeout?
<jim87>
havenwood: I'm thinking about limiting the queue to avoid huge RAM usage
xtristan has quit [Ping timeout: 272 seconds]
<jim87>
is it possible to limit the queue depending on its real size (MB) instead of an index?
varfoo has joined #ruby
<jim87>
simpliest solution would be to drop packets if queue.size > TOT
<workmad3>
jim87: is this as a learning exercise?
<jim87>
workmad3: yes and nope... I'm trying developing this and I found out ruby is really agile doing this kind of things
<workmad3>
jim87: if it's intended for production use, I'd probably suggest looking @ something like 0mq is all ;)
iamjarvo has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<jim87>
workmad3: I'm indeed contacting a 0mq data provider
<jim87>
I'd like to insert data provided into a MongoDB database
iamjarvo has joined #ruby
<workmad3>
jim87: err, ok... I don't see why you're setting up your own internal queue/buffer then :)
zerign has quit [Ping timeout: 245 seconds]
<jim87>
workmad3: because if I don't thread the things, I'll loose a lot of packets. Data doesn't have a constant incoming rate
rdark has joined #ruby
maletor has joined #ruby
Qerub has joined #ruby
<jim87>
workmad3: thus I can handle a (relatively) small queue to prevent data loss
<workmad3>
jim87: you won't lose packets with 0mq... it's not a raw network connection
<workmad3>
jim87: you take data off as messages with 0mq, iirc...
<jim87>
workmad3: it listens for incoming data, but if the thread is not free it will loose the data in the mean while
<jim87>
and thus the producer/consumer thread architecture
<Qerub>
Hi! I'm running JRuby through a custom wrapper script called vendor/jruby. `vendor/jruby -S bundle exec <command>` doesn't work because Bundler can't find my Ruby ("env: jruby: No such file or directory"). Any suggestions?
Monie has joined #ruby
<havenwood>
jim87: Why not use 0MQ as the Queue though? Multiple threads writing to 0MQ?
<havenwood>
DRb FTW! (I don't know what we're talking about, but I'm pretty sure DRb is the answer.)
<workmad3>
jim87: hmm... I think you're misusing 0mq then
<workmad3>
jim87: 0mq *is* the queue in a producer/consumer architecture, you don't need to set it up yourself :)
<jim87>
uhmhmhm...
iamjarvo has quit [Ping timeout: 245 seconds]
Gonzih has joined #ruby
<jim87>
workmad3: thus if I put, let's say, a sleep(1) I'll get all the messages sent in that second?
<workmad3>
jim87: pretty sure you will, unless you've got something weird setup with 0mq
<workmad3>
jim87: as long as you don't unsubscribe from the 0mq publisher while processing, you should, afaik, be fine
wallerdev has joined #ruby
mojjojo has joined #ruby
<jim87>
but wouldn't be this a somewhat form of memory-leak library, accumulating messages if they're not processed in time?
tjad has quit [Ping timeout: 246 seconds]
gerep has quit [Quit: gerep]
<workmad3>
jim87: you always have that risk with a producer/consumer architecture
Lewix has joined #ruby
<workmad3>
jim87: your own strategy wouldn't solve that, unless you're willing to lose messages
<workmad3>
jim87: and there are strategies you can use with 0mq on that front too
tsykoduk is now known as zz_tsykoduk
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jim87>
workmad3: yep, but I can then select "double" messages to be lift from the queue
<jim87>
(they've got an ID)
<jim87>
i.e. every time the queue reaches 10000 messages, run the "cleaner" function/method
f0ster_ has joined #ruby
jkhwan has joined #ruby
f0ster_ is now known as f0ster
f0ster has quit [Changing host]
f0ster has joined #ruby
gasbakid has joined #ruby
mojjojo has quit [Client Quit]
<katherinem13>
Hi, I'm having a problem with rbenv on OS X. When I run 'rbenv exec gem install bundler', it complains about permissions on an RVM (not rbenv) directory (/usr/local/rvm). Anyone have any ideas on why it's trying to use this directory and how I can make it stop?
bluenemo has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
<workmad3>
jim87: I'd be very surprised if you couldn't do that sort of thing directly with 0mq too, it's certainly worth investigating ;)
<havenwood>
katherinem13: Seems you have both RVM and rbenv installed. (I vote ditch them both and go with chruby!) But for real, you'll want to uninstall RVM: rvm implode
bluenemo_ has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
<jim87>
workmad3 yep indeed, I'm gonna do some tests
gr33n7007h has quit [Quit: Leaving]
<jim87>
simple, practical way is to execute the two versions and then compare the two results
mansi has quit [Read error: Connection reset by peer]
gr33n7007h has quit [Read error: Connection reset by peer]
mansi has joined #ruby
zz_tsykoduk is now known as tsykoduk
Kricir has quit [Remote host closed the connection]
<katherinem13>
havenwood: Not really an option here, I've got to duplicate a particular production environment in which we use rbenv.
<havenwood>
katherinem13: Then implode rvm and see what breaks then. :)
<katherinem13>
havenwood: If I already removed RVM's directory and binaries, I guess I have to reinstall it and then implode it?
<havenwood>
katherinem13: PS - Usually there is an #rvm and #chruby channel but no #rbenv, but the usual solution seems to be `rbenv rehash` or to uninstall it. :P
<havenwood>
katherinem13: Is rvm installed at all?
<havenwood>
katherinem13: Any output for: command -v rvm
<katherinem13>
havenwood: it was previously installed, but I went around rm-ing all of it's files.
thams has joined #ruby
<havenwood>
katherinem13: aha, yeah will work better to use it's own command for imploding.
<katherinem13>
havenwood: nope, empty output.
<katherinem13>
havenwood: okay, will try that
<havenwood>
katherinem13: Or to be moar stylish you can `rvm seppuku` (alias to `rvm implode`).
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mzdravkov has quit [Ping timeout: 272 seconds]
marr has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
sputnik13 has joined #ruby
sputnik13 has quit [Client Quit]
pel_daniel has joined #ruby
ssvo has joined #ruby
nhhagen has joined #ruby
<Paradox>
banister, someone wrote about pry in sitepoint
tylersmith has joined #ruby
<banister>
Paradox what is sitepoint
maletor has quit [Quit: Computer has gone to sleep.]
<Paradox>
moderately decent web dev/design blog
<Paradox>
with some programming stuff here and there
<jim87>
mofo even double quoted strings with no dynamic contents
theRoUS is now known as theRoUS|feeding
tedstriker has quit [Remote host closed the connection]
<jim87>
yeah I'm learning how to write code again xD
mzdravkov has quit [Remote host closed the connection]
kayloos has quit [Remote host closed the connection]
lethjakman has quit [Ping timeout: 264 seconds]
bklane has quit [Quit: Leaving...]
thams has quit [Quit: thams]
rjhunter has joined #ruby
digital-ghost has joined #ruby
nomenkun has quit [Ping timeout: 248 seconds]
mikesplain2 has quit [Quit: WeeChat 0.4.2]
myappleguy has joined #ruby
s2013 has joined #ruby
buscon_ has quit [Ping timeout: 245 seconds]
TaxmanBD has quit [Ping timeout: 245 seconds]
Lindrian has quit [Ping timeout: 265 seconds]
jalcine has quit [Excess Flood]
rjhunter has quit [Read error: Connection reset by peer]
workmad3 has quit [Read error: Operation timed out]
<jim87>
http://codepad.org/SC7itCya <-- it says: Favor modifier if/unless usage when you have a single-line body. Another good alternative is the usage of control flow &&/||... what does it mean exactly? *confused*
apeiros has joined #ruby
axl_ has quit [Quit: axl_]
momomomomo has quit [Quit: momomomomo]
nhhagen has joined #ruby
pwh has joined #ruby
shaunbaker has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
cads has quit [Read error: Operation timed out]
shaunbaker has joined #ruby
stkowski has joined #ruby
rjhunter has joined #ruby
tharindu has quit [Read error: Connection reset by peer]
luckyruby has quit [Remote host closed the connection]
carraroj has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Thanatermesis has left #ruby ["ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ"]
luckyruby has joined #ruby
thams has joined #ruby
zz_scottstamp is now known as scottstamp
inad922 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0.1/20131112160018]]
nhhagen has quit [Ping timeout: 252 seconds]
theRoUS|feeding is now known as theRoUS
tharindu has joined #ruby
rjhunter has quit [Ping timeout: 240 seconds]
shaunbaker has quit [Ping timeout: 252 seconds]
cameronbarton has quit [Quit: cameronbarton]
evolved has joined #ruby
iamjarvo has joined #ruby
julweber has joined #ruby
petey_ has joined #ruby
petey has quit [Read error: Operation timed out]
<havenwood>
jim87: `next if buffer.empty?` or `buffer.empty? && next`
<havenwood>
jim87: basically never use `then`
Al__ has quit [Quit: Al__]
tannerburson has joined #ruby
smathieu has quit [Remote host closed the connection]
RaCx has quit [Quit: Computer has gone to sleep.]
<jim87>
rubocop: "main.rb:43:80: C: Line is too long. [85/79]" <-- SERIOUSLY? xD
smathieu has joined #ruby
jbpros has joined #ruby
jalcine has joined #ruby
<jle`>
yea man don't have long lines.
<jle`>
it's a bad idea.
<jle`>
please feel bad.
<jim87>
:(
timonv_ has quit [Remote host closed the connection]
<jim87>
I'm feeling very bad
<jle`>
thank you
<jim87>
btw... next unless data['resultType'] == 'orders' || data['columns'].include?('orderID')
aspires has joined #ruby
<jim87>
should I split them into variables?
<jim87>
it's such a waste of memory...
<jle`>
memory is cheap
<jim87>
not as much as I'd like it to be eheheh
<jle`>
and i think it'll be gc's as soon as the function is done anyway
whunt has joined #ruby
whunt has quit [Client Quit]
<jle`>
actualy not too sure about how gc works in ruby
<jle`>
but
<jle`>
in any case
<jle`>
"premature optimization is the root of all evil"
<jle`>
etc. etc.
<jim87>
yes, it will, but it's still a 2*sizeof(bool) waste of memory ahahah
saarinen has joined #ruby
<jle`>
prioritize expressiveness/everything besides optimization first
whunt has joined #ruby
<jle`>
go back and work on optimization later if you have a bottleneck
kilophoton has quit [Quit: leaving]
<jle`>
prioritizing optimization considered harmful.
tharindu has quit [Quit: Leaving...]
<jim87>
"no offence detected". I'm VERY sad now ahahah
s2013 has quit [Ping timeout: 245 seconds]
<jle`>
:)
smathieu has quit [Ping timeout: 272 seconds]
Hoozt has quit [Remote host closed the connection]
noop has quit [Read error: Operation timed out]
evolved has quit [Quit: Leaving]
julweber has quit [Remote host closed the connection]
scottstamp is now known as zz_scottstamp
Snaury1 has joined #ruby
jonathanwallace has quit [Ping timeout: 246 seconds]
Lindrian has joined #ruby
havenwood has quit [Remote host closed the connection]
Snaury has quit [Read error: Operation timed out]
rippa has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
banister has joined #ruby
ambushsabre has joined #ruby
cpruitt has quit [Read error: Connection reset by peer]
zeade has joined #ruby
cpruitt has joined #ruby
tobago has quit [Read error: Operation timed out]
kayloos has joined #ruby
<jim87>
when I use symbols (i.e. :symbol), will it always be a string, i.e. puts :symbol outputs "symbol"?
ananthakumaran has quit [Quit: Leaving.]
geekbri_ has joined #ruby
<jle`>
um
<jle`>
symbols aren't strings, if that's what you are asking
tommyvyo_ has quit [Read error: Connection reset by peer]
tenjack has joined #ruby
<jim87>
the problem is: should I use symbols to put data into databases?
<shevy>
jim87 if you use puts, you get a string
tommyvyo has joined #ruby
<shevy>
jim87 as opposed to string objects? Yes
<tobiasvl>
puts calls to_s on the symbol, jim87
<tobiasvl>
that doesn't mean that the symbol IS a string
<jim87>
i.e. I create an object using symbols (:var => val) and then insert the object in a MangoDB database
<jle`>
yeah, puts puts strings no matter what you put in there.
<jle`>
so does inspect
<jle`>
jim87: what kind of database are you talking about?
<jle`>
usually your ORM will have some kind of specification.
barratt has joined #ruby
<jim87>
MongoDB*
<jle`>
yeah puts 5 does not mean 5 is a string
luckyruby has quit [Read error: Connection reset by peer]
carlyle has joined #ruby
luckyruby has joined #ruby
<jle`>
jim87: you should be following what mongodb wrappers tell you to use
luckyruby has quit [Remote host closed the connection]
iz has joined #ruby
luckyruby has joined #ruby
xcess_denied has quit [Ping timeout: 240 seconds]
<shevy>
he will use symbols from now on
geekbri has quit [Ping timeout: 248 seconds]
lethjakman has joined #ruby
zerign has joined #ruby
<jim87>
symbols AFAIK have two advantages: less memory usage (you create a symbol only once) and symbols easy comparison
s2013 has joined #ruby
<shevy>
and now he even answers his own questions. I like that :)
<jim87>
:P
dtcrshr has joined #ruby
<shevy>
imagine if people who come to #ruby no longer would have any questions
<shevy>
we could all idle to PERFECTION, in peace ...
<jim87>
nope, connecting/disconnecting people would still disturb the peace :P
RichardBaker has quit [Quit: RichardBaker]
tylersmith has quit [Read error: Connection reset by peer]
Advocation has quit [Quit: Advocation]
nisstyre has joined #ruby
tylersmith has joined #ruby
jprovazn has joined #ruby
geekbri_ has quit []
kayloos has quit [Remote host closed the connection]
smathieu has joined #ruby
geekbri has joined #ruby
<jle`>
twenty channels open and not a single new message in any of them, how am i supposed to procrastinate
lfox has quit [Quit: ZZZzzz…]
jbpros has quit [Quit: jbpros]
athst has joined #ruby
VTLob has joined #ruby
Snaury1 is now known as Snaury
<apeiros>
jle`: meet i-am-bored.com
<zoo-zed>
jle`: procrastination is an art, so create something.
<apeiros>
jle`: the art of procrastination is usually to create an excuse :)
iamjarvo_ has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
gyre008 has joined #ruby
iamjarvo_ has joined #ruby
<shevy>
jim87 I dont see those notifications luckily
iamjarvo_ has quit [Read error: Connection reset by peer]
<shevy>
jle` the way I do this is by just writing random crap to any of the channels I am :>
<shevy>
and if everything fails
<shevy>
I visit my friends at #python and speak in their native savage tongue
<shevy>
zzShshh shshszsh?
Gonzih has quit [Ping timeout: 246 seconds]
jdguzman has joined #ruby
<shevy>
damn
<shevy>
why is this not #python :(
jhaals has joined #ruby
<shevy>
they ignore me on #python!
<shevy>
WARRRRR
<shevy>
wow damn... almost 1500 people there
gyre007 has quit [Ping timeout: 252 seconds]
iamjarvo has quit [Ping timeout: 272 seconds]
axl_ has joined #ruby
gyre008 has quit [Ping timeout: 264 seconds]
<shevy>
tuple(sum(x) for x in zip((1, 2), (3, 4)))
<shevy>
an alien language
lfox has joined #ruby
Tuxist has joined #ruby
Nies has quit [Read error: Connection reset by peer]
smathieu has quit [Remote host closed the connection]
asteros has quit [Client Quit]
bean__ has joined #ruby
sambao21 has joined #ruby
smathieu has joined #ruby
asteros has joined #ruby
bean__ has quit [Client Quit]
nhhagen has quit [Ping timeout: 252 seconds]
pleal_ has joined #ruby
pleal has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smathieu has quit [Ping timeout: 264 seconds]
amoli has quit []
virtualize has quit [Quit: Leaving...]
rhunter has joined #ruby
p0wn3d has quit [Remote host closed the connection]
arthurnn has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
arthurnn has joined #ruby
virtualize has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
aagdbl1 has quit [Quit: Leaving.]
rhunter has quit [Ping timeout: 272 seconds]
pwh has quit []
luckyrub_ has joined #ruby
framling has quit [Ping timeout: 260 seconds]
laphlaw has joined #ruby
smathieu has joined #ruby
virtualize has quit [Ping timeout: 272 seconds]
geekbri has quit [Remote host closed the connection]
bklane has joined #ruby
virtualize has joined #ruby
wpgreenway has joined #ruby
geekbri has joined #ruby
ringaroses has joined #ruby
iliketur_ has joined #ruby
ehc has joined #ruby
dcope has left #ruby [#ruby]
adambeynon has joined #ruby
luckyruby has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby
thelorax123 has quit [Remote host closed the connection]
Mars` has joined #ruby
mando has quit []
b00stfr3ak has joined #ruby
ShortWave has joined #ruby
<ShortWave>
Hi all.
nobitanobi has joined #ruby
mklappst_ has quit [Remote host closed the connection]
thelorax123 has joined #ruby
momomomomo has quit [Client Quit]
Virtualize|work has joined #ruby
virtualize has quit [Ping timeout: 272 seconds]
mikepack has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 248 seconds]
<unstable>
Hello ShortWave
aspires has quit []
<ShortWave>
Situation: I have a client whose site is on a shared host, therefore no access to the system to do installations. I'd like to have a local installation of compass, but I have no access to modify the system (see previous). So I'm curious if anyone has advice about the feasability of this, just how much of a pain is it to use like this?
Es0teric has joined #ruby
gasbakid has joined #ruby
aspires has joined #ruby
coder_neo has quit [Ping timeout: 245 seconds]
petey has quit [Remote host closed the connection]
jrhe has quit [Quit: jrhe]
arthurnn has quit [Ping timeout: 245 seconds]
petey has joined #ruby
tommyvyo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matheuscaceres has joined #ruby
<unstable>
ShortWave: What operating system?
rjhunter has joined #ruby
Gowie has joined #ruby
virtualize has joined #ruby
<ShortWave>
Linux
Virtualize|work has quit [Ping timeout: 272 seconds]
<unstable>
ShortWave: Why not just modify the bash variables, install rbenv and setup your own local ruby/gem environment?
Gowie has quit [Client Quit]
<ShortWave>
Because that's a little bit of a pain.
m8 has joined #ruby
<ShortWave>
but that sort of answers the question, doesn't it?
banister has joined #ruby
madhatter has quit [Ping timeout: 272 seconds]
<unstable>
I do it all the time, it's a few commands and 15 minutes of waiting while rbenv/gem install everything.
RaCx has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
lethjakman has quit [Read error: Connection reset by peer]
<ShortWave>
I don't use ruby tools that often, and in most cases, I'm in control of the system, so I never have to use rbenv...Just seems like a whole pile of support for a single tool.
<unstable>
I gave you all the commands you have to type in one simple gist.
virtualize has quit [Read error: Connection reset by peer]
dallasm has quit [Remote host closed the connection]
<unstable>
First modify your ~/.bash_profile, log out, then back in.. then type those git/gem commands.
virtualize has joined #ruby
<unstable>
ruby2.sh can literally be one copy/paste command into the terminal.
<unstable>
Then you just wiat 15 minutes and your environment will be setup.
dallasm has joined #ruby
<unstable>
The only thing you have to change is "mylocalrailsproject/"
pwh has joined #ruby
coder_neo has joined #ruby
<jrobeson>
for local compass installation use binstubs ShortWave
<jrobeson>
then it'll be in bin/
<jrobeson>
bundler binstubs
framling has joined #ruby
<jrobeson>
alongside bundler --deployment
tjad has joined #ruby
ehc has quit [Ping timeout: 272 seconds]
lkba has quit [Ping timeout: 252 seconds]
tommyvyo has joined #ruby
jibi has quit [Ping timeout: 246 seconds]
ehc has joined #ruby
jkhwan_ has quit [Remote host closed the connection]
jibi has joined #ruby
virtualize has quit [Ping timeout: 245 seconds]
ringaroses has quit [Quit: Leaving]
yalue has quit [Quit: Leaving]
virtualize has joined #ruby
jkhwan_ has joined #ruby
kirun has joined #ruby
momomomomo has joined #ruby
leonardorb has quit []
Dev_ryanrr has joined #ruby
Jetchisel has joined #ruby
mercwithamouth has joined #ruby
<ShortWave>
unstable: Thank you.
Virtualize|work has joined #ruby
SL-RHanson has quit [Remote host closed the connection]
p4d4w4n has quit [Quit: Saindo]
virtualize has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
weszlem has joined #ruby
canton7 has quit [Remote host closed the connection]
shredding has joined #ruby
<ShortWave>
unstable: Most appreciated
virtualize has joined #ruby
rjhunter has joined #ruby
Virtualize|work has quit [Read error: Connection reset by peer]
canton7 has joined #ruby
canton7 has quit [Remote host closed the connection]
<ShortWave>
unstable: stuck it in snippets. I realize, I was sitting here stressing about work I didn't actually have to do. Go figure.
canton7 has joined #ruby
blumner has joined #ruby
jkamenik has quit [Quit: Leaving.]
smathieu has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smathieu has joined #ruby
Dev_ryanrr has quit [Client Quit]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asteros has quit [Quit: asteros]
shredding has quit [Client Quit]
Virtualize|work has joined #ruby
mansi has quit [Remote host closed the connection]
Monie has joined #ruby
aspires has quit []
mansi has joined #ruby
dallasm has quit [Remote host closed the connection]
iz has quit [Remote host closed the connection]
Dev_ryanrr has joined #ruby
virtualize has quit [Ping timeout: 264 seconds]
ringaroses has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
benwoody has quit [Quit: benwoody]
rjhunter has quit [Ping timeout: 272 seconds]
iz has joined #ruby
pleal_ has quit [Remote host closed the connection]
mansi_ has quit [Remote host closed the connection]
havenwood has joined #ruby
<unstable>
ShortWave: Let me know if it works and your local environment is setup. eg, ruby -v gives you 2.0.0p353, and you can 'gem install compass' without a problem.
freezey has quit [Remote host closed the connection]
<jrobeson>
bricker`1A, why are you bothering defining your assets like that in the first place?
<bricker`work>
jrobeson: :P
<jrobeson>
if you flipped the keys and values it'd already be an array? where is the source
vky has quit [Remote host closed the connection]
<bricker`work>
jrobeson: I see you think you have a complete understanding of the entire application based on 2 lines of theoretical code
mansi has quit [Ping timeout: 272 seconds]
<jrobeson>
bricker`work, uhm.. no i dont
Dev_ryanrr has quit [Quit: Leaving]
<jrobeson>
i'm asking based on the code i see
zoo-zed has quit [Quit: Leaving.]
<jrobeson>
that's the point.. i don't in facdt know your application
<bricker`work>
jrobeson: It doesn't matter, the code in that gist is all I'm asking about.
mikepack has joined #ruby
<bricker`work>
*sigh*
virtualize has quit [Ping timeout: 245 seconds]
Old_dev has joined #ruby
freezey has joined #ruby
virtualize has joined #ruby
larissa has joined #ruby
<bricker`work>
right before lunch is a bad time to ask questions, I guess
jmccune has joined #ruby
newbiehacker has quit [Quit: Leaving]
mansi has joined #ruby
mojjojo has quit [Client Quit]
<jrobeson>
bricker`work, why not just hash.invert ?
<bricker`work>
jrobeson: Because I thought that was only available in 2.0 :O
jbpros has joined #ruby
<jrobeson>
well you didn't mention that was a requirement :)
<bricker`work>
jrobeson: but it's also in 1.9.3 apparently
<jrobeson>
bricker`1A, what is your ruby version reqruiement?
<jrobeson>
yep
<apeiros>
bricker`work: it's also in 1.8
<bricker`work>
Guess I've just never used it
<jrobeson>
so does that complete your answer?
carraroj has quit [Quit: Konversation terminated!]
virtualize has quit [Ping timeout: 272 seconds]
Virtualize|work has joined #ruby
petey has joined #ruby
BizarreCake has quit [Ping timeout: 246 seconds]
ereslibre has quit [Ping timeout: 245 seconds]
<bricker`work>
jrobeson: Not really, but I didn't really ask the question I wanted to ask in the first place so you can pat yourself on the back or whatever you need to do.
<jrobeson>
uhmm?
nhhagen has joined #ruby
MrZYX is now known as MrZYX|off
<jrobeson>
now you're just being an ass
barratt has quit [Quit: Leaving...]
carraroj has joined #ruby
havenwood has quit [Remote host closed the connection]
bean__ has joined #ruby
<bricker`work>
jrobeson: just trying to keep you entertained
bluOxigen has quit [Ping timeout: 264 seconds]
rjhunter has joined #ruby
reset has quit [Quit: Leaving...]
Virtualize|work has quit [Ping timeout: 252 seconds]
virtualize has joined #ruby
jbpros has quit [Ping timeout: 264 seconds]
Elhu has joined #ruby
mikepack_ has joined #ruby
ldnunes has quit [Quit: Leaving]
nhhagen has quit [Ping timeout: 245 seconds]
MrZYX|off is now known as MrZYX
RaCx_ has joined #ruby
pel_daniel has quit [Ping timeout: 272 seconds]
RaCx has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby
RaCx_ is now known as RaCx
rjhunter has quit [Ping timeout: 248 seconds]
mikepack has quit [Ping timeout: 248 seconds]
virtualize has quit [Ping timeout: 272 seconds]
tommyvyo has quit [Ping timeout: 265 seconds]
SHyx0rmZ has joined #ruby
alvaro_o has joined #ruby
Mars` has quit [Remote host closed the connection]
noob101 has joined #ruby
athst has quit [Quit: athst]
<noob101>
Hello.
benwoody has joined #ruby
Mars` has joined #ruby
soulcake has quit [Ping timeout: 260 seconds]
phansch has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
mikepack_ has quit [Remote host closed the connection]
jblack has joined #ruby
<nobitanobi>
noob101, hello
framling has quit [Quit: Lost terminal]
framling has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
framling has quit [Client Quit]
framling has joined #ruby
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
mikepack has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
carraroj has quit [Quit: Konversation terminated!]
hiyosi has joined #ruby
roolo has joined #ruby
kayloos has joined #ruby
tommyvyo has quit [Client Quit]
jim87 has quit []
carraroj has joined #ruby
<noob101>
Can someone help me find the solution to my code. My code---> https://eval.in/73608
<noob101>
Everytime I put in "No", it begins to loop for some reason but I don't want it to loop when I put in "No"
<noob101>
I want it to print something and end the program, any suggestions please?
<ShortWave>
unstable: sadly, no rbenv on this system.
iamjarvo has joined #ruby
<apeiros>
noob101: (user_input != "Yes") || (user_input != "No") is a tautology. it's always true.
smathieu has joined #ruby
<apeiros>
assuming user_input is "Yes", it's != "No", so it's `false || true` => true
hiyosi has quit [Ping timeout: 245 seconds]
<apeiros>
assuming it's not "Yes", the right side of the OR doesn't even matter and it's already true.
mothball has joined #ruby
sparrovv has joined #ruby
Czupa has quit [Ping timeout: 246 seconds]
soulcake has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
brtdv has joined #ruby
<noob101>
apeiros, can you modify my code and show me the link please?
aspires has joined #ruby
rjhunter has joined #ruby
<nobitanobi>
noob101, you will make yourself a favor if you try again, and ask if any doubts
<apeiros>
noob101: I could. but I don't want to write your code for you.
mojjojo has joined #ruby
<noob101>
apeiros, Where shall I imply the strand of code? (user_input != "Yes") || (user_input != "No")
<tobiasvl>
noob101: by De Morgan's laws, (user_input != "Yes") || (user_input != "No") is equivalent to !(user_input == "Yes" && user_input == "No"), which is always true because user_input can't be both at the same time
burlyscudd has quit [Read error: Connection reset by peer]
rjhunter has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
<tobiasvl>
and on line 9, if user_input != ("Yes" || "No")
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
<tobiasvl>
that's always true as well
<tobiasvl>
because the string "Yes" is always true (in ruby, anything that's not false or nil is true)
benwoody has quit [Quit: benwoody]
<noob101>
So should I declare "No" = true?
<tobiasvl>
you're not checking if user_input is equal to the strings, you're checking if it's equal to the evaluation: does either "Yes" or "No" evaluate to true?
RaCx has joined #ruby
<tobiasvl>
noob101: uh no that's impossible
<tobiasvl>
you should read up on some basic programming principles
<canton7>
note that line 9 isn't parsed the way you think it is. The ("Yes" || "No") is evaluated first, and results in "Yes". Then you end up with "if user_input != "Yes""
<apeiros>
("Yes" || "No") # => "Yes", hence `user_input != ("Yes" || "No")` is equivalent to `user_input != "Yes"`
<tobiasvl>
canton7: oh yeah, sorry. that it is of course
benwoody has joined #ruby
phansch has quit [Remote host closed the connection]
jrhe has joined #ruby
xcess_denied has joined #ruby
mojjojo has quit [Quit: mojjojo]
<canton7>
let's revisit line 7. You're currently saying "if the user input is not equal to Yes, OR it's not equal to No". Did you mean "if the user input is not equal to Yes, AND it's not equal to No"?
smathieu has quit [Remote host closed the connection]
<noob101>
I'm confused
barratt has joined #ruby
<noob101>
This is not helping me
<ShortWave>
bundler isn't installed either.
smathieu has joined #ruby
jlast_ has joined #ruby
<ShortWave>
oh well
barratt has quit [Client Quit]
<canton7>
noob101, any idea what *would* help you?
<tobiasvl>
noob101: what do you think line 7 means, and what would you like it to mean?
mojjojo has joined #ruby
ereslibre has joined #ruby
RealMarc has joined #ruby
freerobby has quit [Quit: Leaving.]
<noob101>
I am thinking hold on please
jlast has quit [Ping timeout: 245 seconds]
<noob101>
tobiasvl, I would like line 7 to basically go into the loop when user_input != "Yes" or "No"
liamkeily has joined #ruby
<tobiasvl>
ok. now write that last thing into ruby code.
<tobiasvl>
user_input != "Yes" or "No"
<noob101>
what line would that go on if I have it on like 7 for looping?
<noob101>
I don't get this.
smathieu has quit [Ping timeout: 272 seconds]
<tobiasvl>
ok. what don't you get?
<canton7>
tobiasvl, are you claiming that that's the valid ruby he should be using?
<tobiasvl>
canton7: haha. no.
<noob101>
Does that condition become an instance of my while loop on line 14?
<canton7>
might be worth making that clear ;)
<noob101>
What do you mean it goes on the last line?
Elhu has quit [Quit: Computer has gone to sleep.]
<tobiasvl>
noob101: no, no. your line 7 is wrong. your logic there is fauly
parduse has quit [Read error: Connection reset by peer]
<tobiasvl>
noob101: no no no.
Kricir has joined #ruby
<tobiasvl>
canton7: (well actually it is)
<noob101>
Huh?
Mars` has joined #ruby
<canton7>
syntactically valid, but not logically :P anyway!
<tobiasvl>
21:38:12 <canton7> let's revisit line 7. You're currently saying "if the user input is not equal to Yes, OR it's not equal to No". Did you mean "if the user input is not equal to Yes, AND it's not equal to No"?
parduse has joined #ruby
Elhu has joined #ruby
<canton7>
I'm going to start drawing venn diagrams if this doesn't sink in soon
<tobiasvl>
noob101: IS that what you mean?
RaCx has joined #ruby
<noob101>
tobiasvl, may we person PM?
<s2013>
data = CSV.open(file).read.shift.flatten <-- does this make sense to read a csv?
<tobiasvl>
noob101: no
<noob101>
All of the entries of others are confusing me making me hard to track your message
<s2013>
it works but i thikn it looks patched
Mars` has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 245 seconds]
<noob101>
tabiasvl, It doesn't work.
rjhunter has joined #ruby
Mars` has joined #ruby
<noob101>
When I type in No as my input. I still go in the loop.
<tobiasvl>
noob101: yes. that's because your logic on line 7 is faulty.
<tobiasvl>
you need to reconsider line 7.
<noob101>
I put this in though --> user_input != "Yes" or "No"
<noob101>
On line 7 after the if statement
<noob101>
It still loops
robbyoconnor has joined #ruby
Reach has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
<noob101>
I have 10 minutes, I hope I can achieve making my program run efficiently before I have to go.
rjhunter has joined #ruby
<tobiasvl>
well who knows
gyre007 has quit [Remote host closed the connection]
<noob101>
tobiasvl, any more suggestions? I just modified my code to this --> user_input != "Yes" or "No"
<noob101>
It still is looping
<s2013>
oops
bgy has joined #ruby
gyre007 has joined #ruby
<noob101>
On line 7
reset has joined #ruby
<apeiros>
s2013: you missed an "L"
<apeiros>
(loops)
carraroj has quit [Quit: Konversation terminated!]
<canton7>
noob101, don't do that. I said that wasn't what you wanted
<noob101>
conton7 what did you say too many people are telling em different. Can you PM me please, I have like 5 minutes before I have to go.
<tobiasvl>
listen, noob101. change your line 7 back to what you had first
iliketur_ has joined #ruby
carraroj has joined #ruby
<Reach>
god
<tobiasvl>
noob101: canton7 gave you the answer. in your old line 7 you were checking that user_input is not equal to "Yes", or that it's not equal to "No". don't you want to check that it's not equal to "Yes" AND THAT IT ALSO is not equal to "No"?
<Reach>
i updated to osx 10.9 to update ruby
<Reach>
this version is garbage
rjhunter has quit [Ping timeout: 246 seconds]
<noob101>
tobiasvl yes
<noob101>
What was his response?
<jle`>
noob101: can you phrase what you want in that if statement in english?
<s2013>
ha ha ha
<jle`>
right now it is saying "if either 'not equal to yes' is true', or 'no' is true..."
kayloos has quit [Remote host closed the connection]
<noob101>
jle [if the user doesn't put in a response as "Yes" or "No" then keep asking the person (go into a loop)] . Break the loop when they say either "Yes" or No"
<canton7>
mwillhite, looks like you're set up the expectation, but it's not being fulfilled?
smathieu has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
<mwillhite>
looks like I'm stubbing HUB wrong
cleverma_ has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby
nhhagen has joined #ruby
rjhunter has quit [Ping timeout: 246 seconds]
Nogbit has joined #ruby
clevermatt has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Ping timeout: 245 seconds]
m8 has quit [Quit: Sto andando via]
dzhulk has quit [Quit: Leaving.]
krawchyk has quit []
jamesaanderson has joined #ruby
aryaching has joined #ruby
shredding has joined #ruby
Kricir has joined #ruby
gr33n7007h has quit [Remote host closed the connection]
weszlem has quit []
buscon has joined #ruby
mojjojo has joined #ruby
dzhulk has joined #ruby
magoo has joined #ruby
saarinen has quit [Quit: saarinen]
kiwi_10898 has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
gr33n7007h has joined #ruby
sng|food is now known as synergy_
drumusician has joined #ruby
kiwi_10898 has quit [Read error: Connection reset by peer]
lastk has quit [Remote host closed the connection]
sepp2k has joined #ruby
Takehiro has joined #ruby
shredding has quit [Quit: shredding]
Leighton has joined #ruby
saarinen has joined #ruby
weszlem has joined #ruby
harrymoreno has joined #ruby
szerated has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
Guest34103 has quit [Ping timeout: 248 seconds]
bcbrown19 has joined #ruby
ereslibre has quit [Ping timeout: 246 seconds]
kaldrenon has quit [Remote host closed the connection]
<unstable>
ShortWave: You install rbenv yourself, locally.
iajrz_ has joined #ruby
<unstable>
ShortWave: Did you type the command? Is git on the system?
mojjojo has quit [Quit: mojjojo]
kaldrenon has joined #ruby
iajrz_ is now known as iajrz
Reach has joined #ruby
<unstable>
If git isn't on the system, you can just download a zip from github as well.
cgore has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mengu has quit [Remote host closed the connection]
RaCx has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
buscon has quit [Ping timeout: 265 seconds]
monkegjinni has quit [Remote host closed the connection]
parduse has quit [Ping timeout: 265 seconds]
capicue has quit [Quit: Leaving...]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
kaldrenon has quit [Ping timeout: 272 seconds]
Al_ has joined #ruby
mojjojo has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<waxjar>
is it bad style to have a mixin that maintains state (in the class it's included in)?
zigomir has quit [Ping timeout: 272 seconds]
swingha has joined #ruby
fschuindt has joined #ruby
bklane_ has joined #ruby
asteros has quit [Quit: asteros]
Tuxist has quit [Remote host closed the connection]
Al_ has quit [Read error: Connection reset by peer]
blumner has quit [Quit: My damn controlling terminal disappeared!]
Al_ has joined #ruby
Xaitec has quit [Remote host closed the connection]
<MrZYX>
I'd say only if the class accesses the state of the mixin or the mixin the state of the class, but if there's no such direct interaction I don't think it'll fall on your foot
spider-mario has quit [Remote host closed the connection]
bklane has quit [Ping timeout: 246 seconds]
mansi has quit [Remote host closed the connection]
iamjarvo_ has quit [Remote host closed the connection]
parduse has joined #ruby
mansi has joined #ruby
dzhulk has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
capicue has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zeade has joined #ruby
asteros has joined #ruby
diosmiux has joined #ruby
Al_ has quit [Ping timeout: 240 seconds]
monkegjinni has joined #ruby
sepp2k has quit [Ping timeout: 265 seconds]
sepp2k has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
blandflakes has quit [Quit: Page closed]
iamjarvo has quit [Ping timeout: 248 seconds]
mansi has joined #ruby
Xaitec has joined #ruby
ArchBeOS-work has quit [Quit: Leaving]
mercwithamouth has joined #ruby
weszlem has quit []
mojjojo has quit [Quit: mojjojo]
danshultz has quit [Remote host closed the connection]
chuk has joined #ruby
pskosinski_ has joined #ruby
pskosinski has quit [Disconnected by services]
danshultz has joined #ruby
pskosinski_ is now known as pskosinski
weszlem has joined #ruby
failshell has quit []
havenwood has quit [Read error: Connection reset by peer]
hiyosi has joined #ruby
Kricir has quit [Ping timeout: 246 seconds]
breakingthings has quit []
stringoO has quit [Quit: stringoO]
<Reach>
is it possible to get ruby on old versions of osx
<Reach>
i simply cannot use osx 10.9
<bnagy>
for aesthetic reasons?
danshultz has quit [Ping timeout: 246 seconds]
blo has quit [Ping timeout: 240 seconds]
<Reach>
swiping reasons
<Reach>
they took out all the swipes that made it elegant and easy-to-use
momomomomo has quit [Quit: momomomomo]
nucatus has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
<bnagy>
better touch tool brah
mojjojo has joined #ruby
emptyflask has joined #ruby
<Reach>
i tried installing latest ruby on my snow leopard last night but it wont go
<bnagy>
anyway, install xcode commandline tools or macports then just install like any unix. I probably recommend chruby.
<Reach>
xcode requires like 10.7
hiyosi has quit [Ping timeout: 272 seconds]
<Reach>
unless you're a developer and have the ability to download older versions of xcode
szerated has quit [Quit: Ex-Chat]
<bnagy>
then just use macports
<Reach>
i've never been so angry
<Reach>
i wasted like 2 hours dling/installing it too
<Reach>
apple ruined my day
<Reach>
im going to get pizza
Monello has joined #ruby
<bnagy>
APPLE MADE ME A SAD
<bnagy>
I CANNOT COMPUTER UNTIL I PIZZA
jragon has quit [Ping timeout: 272 seconds]
amacgregor has joined #ruby
mojjojo has quit [Client Quit]
umadbor has joined #ruby
amacgregor_ has joined #ruby
kofno_ has quit [Ping timeout: 246 seconds]
sergicles has joined #ruby
amacgregor__ has quit [Ping timeout: 246 seconds]
<snkcld>
anyone know how to autostart a job in sidekiq?
<bnagy>
I don't know, probably Apple broke it
<emptyflask>
Reach: use homebrew and install rbenv, ruby-build
brtdv has quit []
<emptyflask>
snkcld: sidekiq should run jobs immediately, as long as the sidekiq worker is running
TigerWolf has joined #ruby
jerius has quit [Ping timeout: 245 seconds]
blo has joined #ruby
jonahR has quit [Quit: jonahR]
amacgregor has quit [Ping timeout: 246 seconds]
sepp2k has quit [Ping timeout: 264 seconds]
blaskovicz1 has quit [Quit: Leaving.]
hiyosi has joined #ruby
claymore has quit [Quit: night]
<snkcld>
emptyflask: so as soon as the class is defined, and i execute sidekiq on the command line, it will execute perform on the clases?
blackmesa has quit [Remote host closed the connection]
moax has quit []
blackmesa has joined #ruby
carlyle has quit []
umadbor has quit []
matheuscaceres has quit [Quit: matheuscaceres]
<snkcld>
emptyflask: i want to "bundle exec sidekiq", and have it run a default worker, which may or may not spawn other workers as necessary
Xaitec has quit [Ping timeout: 245 seconds]
<snkcld>
it also complains WARN: object references itself
<emptyflask>
well, you'll have to perform_async something first
mojjojo has joined #ruby
hollyw00d has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
RaCx has quit [Quit: Computer has gone to sleep.]
noob101 has quit [Ping timeout: 250 seconds]
mojjojo has quit [Client Quit]
<emptyflask>
the worker class is just for defining a method, which you launch an instance of using XWorker.perform_async()
urbanmonk has quit [Ping timeout: 246 seconds]
<emptyflask>
when you do that, a single job it inserted into the queue
rjhunter has joined #ruby
<snkcld>
so where would i put that code, to run the first perform_async call?
<emptyflask>
anywhere in your app
<snkcld>
ohh, im kinda coming from a rails perspective, maybe thats why im confused
<emptyflask>
sidekiq workers don't just run constantly
<snkcld>
i should probably ask where i put initialization code in rails
mark_locklear has quit [Quit: Leaving]
cdelo has quit [Quit: Leaving]
blo has quit [Ping timeout: 240 seconds]
Monie has joined #ruby
<emptyflask>
snkcld: what do you want it to do?
reset has quit [Quit: Leaving...]
TaxmanBD has quit [Ping timeout: 272 seconds]
<snkcld>
well the job starts, and i want it to just puts "hello" and thats it, atleast for now
<snkcld>
but it will eventually be consuming a rabbitmq queue, and updating a database as necessary
axl_ has left #ruby [#ruby]
Xaitec has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
<emptyflask>
sidekiq might not be what you need
<snkcld>
emptyflask: yea... i was starting to think that too
<snkcld>
i just thought it would be a good fit because rabbitmq would spit out messages, and then i could just kick off sidekiq jobs as necessary
blo has joined #ruby
<nobitanobi>
oh ruby I love u. thanks
Solnse has joined #ruby
<bnagy>
there are pretty good asyncy rabbit libs for ruby
<emptyflask>
sidekiq might be able to connect to rabbitmq in the future but it wouldn't really change anything. rabbitmq and redis are basically the same
interactionjaxsn has quit [Remote host closed the connection]
<bnagy>
you can just have your rabbit client do the db
ddd has quit [Client Quit]
<bnagy>
adding an extra worker layer seems weird
Xaitec has quit [Remote host closed the connection]
jcromart_ has joined #ruby
interactionjaxsn has joined #ruby
<Reach>
bnagy: lol
fijimunkii has quit [Ping timeout: 246 seconds]
diosmiux has quit []
havenwood has joined #ruby
rjhunter has quit [Ping timeout: 240 seconds]
jdguzman has quit [Ping timeout: 264 seconds]
mojjojo has joined #ruby
mephux has quit [Ping timeout: 252 seconds]
mephux has joined #ruby
baordog has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0.1/20131112160018]]
interactionjaxsn has quit [Ping timeout: 252 seconds]
jcromart_ has quit [Ping timeout: 252 seconds]
<emptyflask>
seems like it might meet your needs
saarinen has joined #ruby
<snkcld>
emptyflask: ah... i didnt realize bunny had this much to it
<snkcld>
yea, im going to try and leverage bunny as much as possibl
sailias has quit [Quit: Leaving.]
rjhunter has joined #ruby
osvico has joined #ruby
<nobitanobi>
Say I have: @array.each do |el| .... end -- How could I remove an element of the array that I am iterating?
<bnagy>
don't
<nobitanobi>
blah, I knew you would say that
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nobitanobi>
ok, I just needed to confirm ~
ldnunes has joined #ruby
<snkcld>
im confused by this, though: Bunny::Queue#subscribe takes a block that will be called every time a message arrives. This will happen in a thread pool, so Bunny::Queue#subscribe does not block the thread that invokes it.
<emptyflask>
@array.reject{|el| el.nil?}.each{|el| #do something with remainsing el's}
<snkcld>
i would like for it to be blocked, i dont want the program to exit immediately
Jabberwock has quit [Quit: Leaving.]
jmeeuwen has quit [Ping timeout: 246 seconds]
clevermatt has joined #ruby
<bnagy>
snkcld: there are a lot of good threadpool abstractions ( gems ), but the basic principle is just have a loop in your Thread and then #join it somewhere
blo has quit [Remote host closed the connection]
<bnagy>
or an infinite loop in your main thread works, too
frustrum has joined #ruby
frustrum has quit [Client Quit]
rjhunter has quit [Ping timeout: 246 seconds]
Clooth has quit [Quit: Leaving...]
<snkcld>
bnagy: ah, ok, i thought that was it. thanks
dgfdgf has joined #ruby
rjhunter has joined #ruby
ccooke has quit [Read error: Connection reset by peer]
cleverma_ has quit [Ping timeout: 272 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
nhhagen has quit [Remote host closed the connection]
`MArceLL` has quit [Ping timeout: 246 seconds]
rjhunter has quit [Read error: Connection reset by peer]
ddd has joined #ruby
hollyw00d has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rjhunter has joined #ruby
ddd is now known as Guest35716
clevermatt has quit [Remote host closed the connection]
nhhagen has joined #ruby
Guest35716 has quit [Client Quit]
ccooke has joined #ruby
mojjojo has quit [Quit: mojjojo]
roolo has quit [Quit: Leaving...]
magoo has quit [Ping timeout: 264 seconds]
ddd has joined #ruby
ddd has quit [Client Quit]
rjhunter has quit [Ping timeout: 245 seconds]
duggiefresh has quit [Remote host closed the connection]
ddd has joined #ruby
fgo has joined #ruby
ddd has quit [Client Quit]
jmeeuwen has joined #ruby
Jetchisel has joined #ruby
zz_scottstamp is now known as scottstamp
ddd has joined #ruby
kiwi_21799 has joined #ruby
kirun has quit [Quit: Client exiting]
kiwi_21799 has quit [Client Quit]
ddd has quit [Client Quit]
ereslibre has joined #ruby
rjhunter has joined #ruby
ddd has joined #ruby
ddd has quit [Client Quit]
asobrasil has left #ruby [#ruby]
emptyflask has quit []
jgrevich_ has joined #ruby
ddd has joined #ruby
vky has joined #ruby
jgrevich has quit [Ping timeout: 272 seconds]
jgrevich_ is now known as jgrevich
iliketur_ has quit [Quit: zzzzz…..]
enebo has quit [Quit: enebo]
rjhunter has quit [Read error: Connection reset by peer]
ddd has quit [Client Quit]
ddd has joined #ruby
mojjojo has joined #ruby
myappleguy has joined #ruby
burlyscudd has joined #ruby
rjhunter has joined #ruby
zxq9 has quit [Quit: Konversation terminated!]
drumusician has quit [Ping timeout: 245 seconds]
johnnyfuchs has quit [Quit: Leaving.]
Kricir has joined #ruby
i_s has joined #ruby
ddd has quit [Client Quit]
ddd has joined #ruby
freerobby1 has quit [Quit: Leaving.]
iliketur_ has joined #ruby
freerobby has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
chuk has quit [Quit: Leaving]
rjhunter has joined #ruby
Kricir has quit [Ping timeout: 265 seconds]
Monello has left #ruby [#ruby]
rjhunter has quit [Read error: Connection reset by peer]
jblack has quit [Quit: Lost terminal]
rhunter has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
banister has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
petey has quit [Remote host closed the connection]
Nogbit has quit [Read error: Operation timed out]
petey has joined #ruby
rhunter has quit [Read error: Connection reset by peer]
mephux has quit [Ping timeout: 265 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
mephux has joined #ruby
RichardBaker has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
wald0 has quit [Read error: Operation timed out]
Linux_Extremist has joined #ruby
petey has quit [Ping timeout: 246 seconds]
mojjojo has quit [Quit: mojjojo]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
ValicekB has quit [Ping timeout: 264 seconds]
amacgregor has joined #ruby
gyre008 has joined #ruby
RichardBaker has quit [Client Quit]
s2013 has quit [Ping timeout: 264 seconds]
amacgregor_ has quit [Ping timeout: 245 seconds]
saarinen has quit [Quit: saarinen]
dtcrshr has quit [Remote host closed the connection]
bean has quit [Changing host]
bean has joined #ruby
RichardBaker has joined #ruby
Linux_Extremist has quit [Quit: Leaving]
gyre007 has quit [Ping timeout: 246 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
rjhunter has joined #ruby
jamesaanderson has joined #ruby
swingha has quit [Quit: WeeChat 0.4.2]
gyre008 has quit [Ping timeout: 240 seconds]
Takehiro has quit [Remote host closed the connection]
<ravster>
Hey all
Takehiro has joined #ruby
moneydouble has joined #ruby
<ravster>
I'm using the fabrication gem, and I'd like it to create objects with an attribute that has a value from a pre-approved list. So far I've been using sequences, but can't use them anymore.
Clooth has joined #ruby
Takehiro_ has joined #ruby
mansi has quit [Remote host closed the connection]
Takehiro has quit [Read error: Connection reset by peer]
mansi has joined #ruby
banghouse2 has quit [Remote host closed the connection]
banghouse2 has joined #ruby
mojjojo has joined #ruby
ereslibre has quit [Ping timeout: 264 seconds]
threesome has quit [Ping timeout: 246 seconds]
<bnagy>
maybe try #rubyonrails
ValicekB has joined #ruby
Nogbit has joined #ruby
colonolGron has quit [Quit: leaving]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]