roamingdog has quit [Remote host closed the connection]
harushimo has joined #ruby
roamingdog has joined #ruby
splud has quit [Quit: splud]
Guest66 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 256 seconds]
roamingdog has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
roamingdog has joined #ruby
<zacts>
hello #ruby
harushimo has quit [Quit: This computer has gone to sleep]
dminuoso_ has joined #ruby
matp has quit [Quit: ZZzzzZz...]
roamingdog has quit [Remote host closed the connection]
xall has joined #ruby
axisys has quit [Ping timeout: 252 seconds]
roamingdog has joined #ruby
dminuoso_ has quit [Ping timeout: 245 seconds]
xall has quit [Ping timeout: 245 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jameser has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
boombox_ has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
doublemalt__ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doublemalt_ has quit [Ping timeout: 265 seconds]
Bellthoven has quit []
d^sh has quit [Ping timeout: 256 seconds]
JeanCarloMachado has quit [Ping timeout: 265 seconds]
ccmcdee-sfc has quit [Ping timeout: 265 seconds]
d^sh has joined #ruby
flashpoint9 has quit [Ping timeout: 245 seconds]
Aquazi has quit [Quit: Leaving]
ResidentBiscuit has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 250 seconds]
Torkable has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
jenrzzz has joined #ruby
Bellthoven has joined #ruby
ccmcdee-sfc has joined #ruby
passerine has joined #ruby
nankyokusei has joined #ruby
shayan_ has joined #ruby
harushimo has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
<shayan_>
Would sum = sum + parseInt(num), represent a string concatenation, or is that an addition operator?
moeSizlak has left #ruby ["Leaving"]
Mia has quit [Ping timeout: 258 seconds]
nankyokusei has quit [Ping timeout: 250 seconds]
<shayan_>
more specifically, is, sum + parseInt(num) representing a string concatenation, or is that an addition operator?
axisys has joined #ruby
bjh13 has joined #ruby
rakm has joined #ruby
<passerine>
it would probably depend on the class of sum and the class of the return value of parseInt, whether they are of a numeric class, or String
<shayan_>
The parseInt() function parses a string and returns an integer.
<passerine>
and sum?
<shayan_>
var sum;
<shayan_>
sum = 0
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shayan_>
sum = sum + parseInt(num);
tvw has quit [Ping timeout: 250 seconds]
roamingdog has quit [Remote host closed the connection]
harushimo has quit [Quit: This computer has gone to sleep]
* passerine
probably missed something before joining the channel
splud has joined #ruby
splud has quit [Client Quit]
splud has joined #ruby
splud has quit [Remote host closed the connection]
splud has joined #ruby
ResidentBiscuit has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
passerine has left #ruby [#ruby]
bmurt has joined #ruby
matp has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
solocshaw has joined #ruby
ramfjord has joined #ruby
solocshaw has quit [Ping timeout: 245 seconds]
modlin has quit [Ping timeout: 256 seconds]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ccmcdee-sfc has quit [Ping timeout: 245 seconds]
harushimo has joined #ruby
dminuoso_ has joined #ruby
roamingdog has joined #ruby
optiz0r has quit [Ping timeout: 245 seconds]
kwatz has joined #ruby
lel has joined #ruby
kwatz is now known as destructure
destructure has quit [Changing host]
destructure has joined #ruby
Rodya_ has quit [Remote host closed the connection]
astrobunny has joined #ruby
dminuoso_ has quit [Ping timeout: 250 seconds]
dnicole has joined #ruby
Silthias1 has joined #ruby
meshsmith has quit []
Silthias has quit [Ping timeout: 256 seconds]
Jameser has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
meshsmith has joined #ruby
LoneHerm_ has joined #ruby
dnicole has quit [Remote host closed the connection]
chessguy has joined #ruby
LoneHerm_ has quit [Ping timeout: 250 seconds]
<chessguy>
so i'm hoping someone can give me a hand with popen. i have this code: IO.popen("/path/to/some/executable", "rw") {|io| io.puts "foo"; io.close_write; io.read(nil); }. some of the time, though, i'm getting a broken pipe on the puts line
<chessguy>
is there some way to diagnose what's happening with the process i'm spinning up?
Felipe__ has joined #ruby
JesseH has quit [Ping timeout: 250 seconds]
roamingdog has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aupadhye has joined #ruby
roamingdog has quit [Remote host closed the connection]
Dohplay has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
baiyang has joined #ruby
solocshaw has quit [Ping timeout: 245 seconds]
roamingdog has joined #ruby
Devalo has quit [Remote host closed the connection]
harfangk has joined #ruby
jaguarmagenta has joined #ruby
dminuoso_ has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jaguarmagenta has quit [Remote host closed the connection]
Karunamon has joined #ruby
jaguarmagenta has joined #ruby
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
dminuoso_ has quit [Ping timeout: 265 seconds]
symm- has joined #ruby
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarma_ has joined #ruby
jaguarma_ has quit [Client Quit]
Immune_ has quit [Read error: Connection reset by peer]
Hyuk has joined #ruby
k200 has joined #ruby
<k200>
hi
wugy has joined #ruby
<k200>
i have a recursive function http://paste.ubuntu.com/23352230/ . I wont to know that, will the function call in if block return the key to main call if its teh same key or it will just return that value only to if block and not back to original caller? e.g. if mykey = change_api_key(key) and assume that here the key == new_key will "mykey" get a new_key eventually or not?
jcao219 has quit [Ping timeout: 250 seconds]
<k200>
i am confused because i am not using "return" statement in if block. its used only in else block.
jcao219 has joined #ruby
last_staff has joined #ruby
Joufflu has quit [Quit: Leaving]
amclain has quit [Quit: Leaving]
aidalgol has joined #ruby
Ishido has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us_ has quit [Remote host closed the connection]
<Burgestrand>
k200 I don't quite understand your question. For one, `return` here is redundant, Ruby returns the value of the last expression implicitly without using return
AlexRussia has joined #ruby
ur5us has joined #ruby
ur5us_ has joined #ruby
<Burgestrand>
k200 Your recursive method will keep going forever until key != new_key (random), and eventually return new_key.
dionysus69 has joined #ruby
baiyang has quit [Remote host closed the connection]
<Burgestrand>
k200 If it helps, your method will behave the same if you have a return in both branches of the if-statement, if that helps.
symm- has quit [Quit: Leaving...]
<Burgestrand>
k200 Hm, maybe I understand. Yes, it will return the value of change_api_key(key) to the main call.
allomov has quit [Remote host closed the connection]
conta has joined #ruby
jaequery has joined #ruby
govg has quit [Ping timeout: 250 seconds]
<k200>
Burgestrand: yes. thanks.
ur5us_ has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
djbkd_ has joined #ruby
Silthias1 has quit [Ping timeout: 252 seconds]
baiyang has joined #ruby
roamingdog has quit [Remote host closed the connection]
_sfiguser has quit [Remote host closed the connection]
roamingdog has joined #ruby
bocaneri has joined #ruby
balazs has quit [Remote host closed the connection]
bturker has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
davidt has quit [Remote host closed the connection]
baiyang has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
johnny56 has quit [Ping timeout: 246 seconds]
xall has quit [Ping timeout: 256 seconds]
Xiti` has joined #ruby
roamingdog has quit [Remote host closed the connection]
xall has joined #ruby
MrBusiness2 has quit [Read error: Connection reset by peer]
MrBusiness2 has joined #ruby
Xiti has quit [Ping timeout: 250 seconds]
jgnagy has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
kicksled has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
Jameser has joined #ruby
Pixi_ has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
ahri has quit [Quit: Page closed]
doxterpepper has joined #ruby
vuoto has joined #ruby
Xiti` has quit [Ping timeout: 252 seconds]
djbkd_ has quit []
baweaver_away is now known as baweaver
nankyokusei has joined #ruby
sdwrage has joined #ruby
raeoks has joined #ruby
Silthias1 has joined #ruby
dminuoso1 has joined #ruby
aufi has joined #ruby
dminuoso_ has quit [Ping timeout: 260 seconds]
trampi has quit [Quit: Ping timeout (120 seconds)]
astrobunny has quit [Remote host closed the connection]
kicksled has joined #ruby
kicksled has joined #ruby
kicksled has quit [Changing host]
Silthias has quit [Ping timeout: 256 seconds]
nankyokusei has quit [Ping timeout: 245 seconds]
tcrypt has quit [Quit: _ノ乙(、ン、)_]
elastix has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby
nuclearsandwich has quit [Read error: Connection reset by peer]
<Garo__>
let's say I have an object. Is there some kind of special function (like there is [] and []= functions) which I could create so that my instance would be evaluated to false when I do "if instance" ?
SesMan has joined #ruby
nuclearsandwich has joined #ruby
<tobiasvl>
Garo__: no :/
roamingdog has quit [Remote host closed the connection]
crdpink has quit [Ping timeout: 268 seconds]
crdpink has joined #ruby
<dminuoso1>
Garo__: Ruby has the following logic hardwired: Nil and false are false - *anything* else is true.
<Garo__>
I'm trying to make an object which contains a Hash. I have [] and []= set which modifies this hash, so that the object feels like hash. if I try to [] a symbol which doesn't exists, it will return a new instance, so that I can set nested objects easily: a = Node.new; a[:foo][:bar] = "foobar" will just work. I just want to handle a special case: "if a[:doesnotexists]" would not evaluate into true
<dminuoso1>
You can't change this without modifying Ruby itself.
johnny56 has joined #ruby
<dminuoso1>
Garo__: If you have the need for such semantics, provide a helper method that returns the boolean state you want.
SesMan has quit [Client Quit]
lenwood has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
charliesome has joined #ruby
mark_66 has joined #ruby
<djellemah>
>> ha = Hash.new{|hash,key| hash[key] = []}; ha[:new_key] << 1; ha #Garo__
<djellemah>
Yeah, that fills in all the missing pieces ;-)
<Garo__>
baweaver: thanks for the idea. the default_proc indeed solves this issue, but it can't be Marshalled - which was the reason why I stopped using that and started to write my own class :/
<Garo__>
sorry, should have said to you that I already tried that and I hit the marshall issue :(
<djellemah>
It's also pretty easy to put the default_proc machinery in a Hash subclass (alternatively Delegator), which will marshal as long as you have the class on both ends.
bihi has joined #ruby
SesMan has joined #ruby
anuxivm has joined #ruby
anuxivm has left #ruby [#ruby]
xall has quit [Ping timeout: 260 seconds]
aswen has joined #ruby
dminuoso1 has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dminuoso_ has joined #ruby
ocx has joined #ruby
<ocx>
hi all, can i consider a block of a function and the function definition to be in the same scope?
mim1k|work has joined #ruby
tlaxkit has joined #ruby
mikecmpbll has joined #ruby
qwertyco has joined #ruby
jsrn_ has joined #ruby
doublemalt__ has quit [Remote host closed the connection]
Humdai has joined #ruby
andikr has joined #ruby
crdpink has quit [Read error: Connection reset by peer]
crdpink has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ruby
AlexRussia has quit [Ping timeout: 252 seconds]
tomphp has joined #ruby
biberu has joined #ruby
tachikomas has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tachikomas has left #ruby [#ruby]
ziarkaen has joined #ruby
vuoto has quit [Remote host closed the connection]
astrobunny has joined #ruby
<ocx>
what is the equiv to each do {x} ..
<ocx>
each do |x| ...
<ocx>
for each what?
elastix has quit [Quit: Leaving]
tvw has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
astrobunny has quit [Ping timeout: 252 seconds]
xall has joined #ruby
<ocx>
?
shayan_ has quit [Quit: shayan_]
<canton7>
ocx, it's not clear what your question is
<tobiasvl>
ocx: what do you mean here
<tobiasvl>
ocx: array.each do |x| do_something_with x end
<tobiasvl>
with a little ; in there
<tobiasvl>
ocx: is the same as array.each {|x| do_something_with x }
<tobiasvl>
and it does something with each x in array
xall has quit [Ping timeout: 250 seconds]
alexherbo2 has quit [Quit: WeeChat 1.5]
<ocx>
tobiasvl: i mean when the tatemenr start with each
<ocx>
not .each
baiyang has joined #ruby
<tobiasvl>
do you have an example?
shayan_ has joined #ruby
<ocx>
class Array def hello each do |x| p x end end end [1,2,3].hello
<ocx>
guess each is like args.each?
<ocx>
shortcut
radic has quit [Ping timeout: 244 seconds]
ichkv1 has joined #ruby
radic has joined #ruby
blackmesa has joined #ruby
<tobiasvl>
well, inside Array simply calling "each" will have self as the receiver
tomphp has quit [Read error: Connection reset by peer]
<tobiasvl>
it's not a shortcut, it's just that when you call [1,2,3].each you will call Array's each method, and the same happens if you just call each inside Array
<constant>
manveru this is a ruby variable? I'm looking for something from the command line
<constant>
like "gem environment gemdir"
<constant>
but the local variant
<manveru>
ruby -e 'puts Gem.dir'
Derperperd has quit [Quit: Derperperd]
<constant>
that gives me the non-local version :/
<constant>
/opt/local/lib/ruby2.3/gems/2.3.0
pawnbox has quit [Ping timeout: 252 seconds]
<manveru>
that gives you the location that `gem install` tries to use
<constant>
how about gem install --user ?
Aquazi has quit [Quit: Leaving]
<constant>
erm --user-install
<manveru>
did you put that in your .gemrc?
saneax-_-|AFK is now known as saneax
<constant>
no, I specify it on the command line
alaibe has joined #ruby
<manveru>
well, there's always Gem.user_dir
<constant>
that's the one. Thanks!
pawnbox has joined #ruby
ferr has joined #ruby
Aquazi has joined #ruby
Aquazi has quit [Read error: Connection reset by peer]
Aquazi has joined #ruby
Aquazi_ has joined #ruby
ziarkaen has quit [Ping timeout: 265 seconds]
ziarkaen has joined #ruby
ichkv1 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 244 seconds]
Aquazi has quit [Quit: Leaving]
JeanCarloMachado has joined #ruby
fbt has quit [Ping timeout: 250 seconds]
phredus has joined #ruby
tubuliferous has joined #ruby
constant has quit [Quit: found 1 in /dev/zero]
Hyuk has joined #ruby
Silthias has joined #ruby
fbt has joined #ruby
Jameser has joined #ruby
LoneHermit has joined #ruby
ocx has joined #ruby
<ocx>
module Auxiliary def self.module_list <--- here module_list is a method?
<ocx>
why did we do self. and not def module_list
Silthias1 has quit [Ping timeout: 250 seconds]
djellemah_ has quit [Ping timeout: 252 seconds]
pawnbox has quit [Ping timeout: 265 seconds]
<dminuoso_>
ocx: Do you want the technical explanation, or just the users perspective?
<ocx>
both
<dminuoso_>
ocx: In Ruby only classes can have methods (and modules for the purpose of this discussion are just classes)
<dminuoso_>
ocx: So when users talk about "instance methods" and "class methods", instance methods obviously belong to the class, but where do class methods go?
<ocx>
in modules
<dminuoso_>
No.
dionysus69 has quit [Ping timeout: 250 seconds]
<dminuoso_>
Ignore the word modules, there is no real difference between modules and classes.
<dminuoso_>
(Ruby just wont let you do somethings to either, but they are not really any different)
<ocx>
class methods in a class
<dminuoso_>
ocx: The key is, that a class is also an object.
<dminuoso_>
ocx: And every object has a singleton class attached to it, a special class that exists just for that single object.
<dminuoso_>
ocx: Class methods go to the class objects singleton class.
<ocx>
ok
last_staff has quit [Quit: last_staff]
<dminuoso_>
ocx: now the reason this works with "def self.foobar" is as follows -> inside the block "self" refers to the class object itself.
pawnbox has joined #ruby
<dminuoso_>
And when you do "def object.method" its always defining a method on objects singleton class
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
tubuliferous has quit [Ping timeout: 252 seconds]
ziarkaen has quit [Ping timeout: 260 seconds]
shayan_ has quit [Client Quit]
shayan_ has joined #ruby
nankyokusei has joined #ruby
varsha has joined #ruby
marr has joined #ruby
<veloutin>
Porfa: maybe you want to be doing dat_pneucity.at_css inside your each block
nankyokusei has quit [Ping timeout: 244 seconds]
<veloutin>
Porfa: or any other relevant method to access the content you want
<porfa>
what sort of other revelant method?
AlexRussia has joined #ruby
<veloutin>
Porfa: well, I don't know what you have available in that loop, all I can see is that you are looping over something, but repeatedly calling the same method on the same object inside
RedFromage has quit [Read error: Connection reset by peer]
jaruga___ has joined #ruby
jaruga___ is now known as jaruga
SesMan has joined #ruby
bturker has joined #ruby
colegatron has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
colegatron has joined #ruby
ziarkaen has joined #ruby
tk__ has joined #ruby
shinnya has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
zacstewart has quit [Ping timeout: 250 seconds]
allomov has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
pawnbox has joined #ruby
GodFather has quit [Ping timeout: 244 seconds]
GodFather has joined #ruby
frankiee_ has joined #ruby
quazimodo has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman has joined #ruby
tlaxkit has quit [Remote host closed the connection]
tlaxkit has joined #ruby
hinbody has joined #ruby
zacstewart has joined #ruby
modlin has quit [Remote host closed the connection]
spiette has joined #ruby
cdg has joined #ruby
shayan_ has quit [Quit: shayan_]
brendan- has joined #ruby
ramortegui has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
braincras has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
govg has joined #ruby
malconis has joined #ruby
Xeago has joined #ruby
shayan_ has joined #ruby
braincrash has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has joined #ruby
elaptics has joined #ruby
blackmesa has joined #ruby
nadir has joined #ruby
harushimo has joined #ruby
SesMan has joined #ruby
armin has quit [Quit: relate to the matter as i drop the bomb]
<dminuoso_>
manveru: Thanks, I knew I could rely on someone being arsed. :p
<manveru>
:P
platzhirsch has quit [Quit: WeeChat 1.4]
<manveru>
there must be a prettier way... but not with only one iteration
yeticry has quit [Ping timeout: 260 seconds]
bturker has quit [Ping timeout: 256 seconds]
tcrypt has joined #ruby
porfa has quit [Quit: Porfa]
nuclearsandwich has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tlaxkit has quit [Quit: tlaxkit]
pawnbox_ has quit [Ping timeout: 244 seconds]
SesMan has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
Heffree has quit [Ping timeout: 260 seconds]
harushimo has quit [Quit: This computer has gone to sleep]
ccmcdee-sfc has quit [Quit: WeeChat]
<ccooke>
Technically any operator with three arguments is *a* ternary operator, but ?: is the only one that is actually common; almost all the languages since at least C forty-odd years ago have have it.
RubyBerinner has quit [Ping timeout: 260 seconds]
hexerrus has joined #ruby
<hexerrus>
Hi everyone )
emilkarl has quit [Read error: Connection reset by peer]
harushimo has joined #ruby
ichkv has quit [Remote host closed the connection]
Hyuk has joined #ruby
modlin has joined #ruby
emilkarl has joined #ruby
PlasmaStar has quit [Ping timeout: 260 seconds]
rodfersou is now known as rodfersou|lunch
c355e3b has joined #ruby
patarr has joined #ruby
mim1k|work has joined #ruby
PlasmaStar has joined #ruby
nikivi has joined #ruby
Bish has quit [Ping timeout: 260 seconds]
<manveru>
also interesting, there are also unary and binary operators :)
<manveru>
unary is like !foo, binary is like foo|bar
<dminuoso_>
manveru: Once you start looking at formal grammars, this becomes much more obvious too. :)
<manveru>
yeah, i first realized that when i wrote my own language
<dminuoso_>
manveru: The C grammar for example has a set of rules that can be reduces to "unary_expression" (which applies to stuff as ++i, sizeof(i), alignof(i) )
dinoangelov has joined #ruby
<dminuoso_>
The last two examples are less obvious to the user.
cgfbee has quit [Read error: Connection reset by peer]
<manveru>
unary is basically any function that takes one argument, while in ruby methods have two arguments at least
matata has joined #ruby
<matata>
Hi
<manveru>
so they're binary :)
mim1k|work has quit [Ping timeout: 260 seconds]
harushimo has quit [Quit: This computer has gone to sleep]
<manveru>
since you always pass the object you want to work on
synthroid has quit [Remote host closed the connection]
malconis has quit [Ping timeout: 244 seconds]
<manveru>
in python that's the 'self' you always get
Expanse is now known as nOgAnOo
<manveru>
while in ruby it's implicit
SteenJobs has joined #ruby
nOgAnOo has quit [Changing host]
nOgAnOo has joined #ruby
nOgAnOo has joined #ruby
nOgAnOo was kicked from #ruby by ruby[bot] [was banned before]
gingray has quit [Ping timeout: 260 seconds]
<manveru>
once i realized that, i was much more ready to move to functional languages
<djellemah>
matata: hakuna
<matata>
What's the best way to read first 2 lines from the STDIN ? I'm using STDIN.read but not really sure how I can read only few lines. The problem is that file is really big and I just want to check first 2-3 lines and exit.
<dminuoso_>
manveru: next up on my list is to learn Haskell
<dminuoso_>
manveru: You can use IO#readline (which is essentially just IO#gets)
aupadhye has quit [Ping timeout: 250 seconds]
ferr has joined #ruby
<manveru>
actually, print gets, since it has a newline already
Akuma0n3 has quit [Read error: Connection reset by peer]
<manveru>
but yeah
harushimo has joined #ruby
<chris2>
doesnt matter for puts
<manveru>
true that :)
Akuma0n3 has joined #ruby
<dminuoso_>
matata: and that last lane regarding IO#readline was meant for you
<dminuoso_>
matata: Its probably a good thing if you get familiar with the entire IO class
<dminuoso_>
(It gives you a better understanding on how IO interaction in general works. The knowledge can be applied to other languages such as C too)
<apeiros>
chris2: the month length is irrelevant with that method. or do you see a case where it would matter?
<chris2>
no, i think you are right
<chris2>
should have come up with that myself :P
flashpoint9 has quit [Ping timeout: 256 seconds]
AndrewIsHere has joined #ruby
<apeiros>
:D
Snowy has quit [Ping timeout: 250 seconds]
patarr has joined #ruby
dinoangelov has quit [Read error: Connection reset by peer]
bradland has joined #ruby
bradland has quit [Client Quit]
synthroid has joined #ruby
sepp2k has quit [Quit: Leaving.]
porfa has joined #ruby
amclain has joined #ruby
synthroi_ has joined #ruby
chopin has quit []
GodFather has joined #ruby
aufi has quit [Quit: Leaving]
RedFromage has joined #ruby
synthroid has quit [Ping timeout: 260 seconds]
jsrn_ has quit [Quit: Leaving]
SesMan has quit [Ping timeout: 256 seconds]
harushimo has quit [Quit: This computer has gone to sleep]
flashpoi_ has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
harushimo has joined #ruby
tyang_ has joined #ruby
RedFromage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
Akuma has joined #ruby
Torkable has joined #ruby
tyang has quit [Ping timeout: 244 seconds]
Torkable is now known as Guest80927
ChiefAlexander has joined #ruby
Guest80927 is now known as Torkable
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Akuma0n3 has quit [Ping timeout: 260 seconds]
tlaxkit has quit [Quit: tlaxkit]
shayan_ has joined #ruby
aswen has quit [Quit: WeeChat 1.5]
shayan_ has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
jphase has joined #ruby
skweek has quit [Remote host closed the connection]
ltd has quit [Ping timeout: 260 seconds]
ltd has joined #ruby
elifoster has joined #ruby
mim1k|work has quit [Ping timeout: 256 seconds]
skweek has joined #ruby
alaibe has quit [Ping timeout: 260 seconds]
alaibe has joined #ruby
tomphp has quit [Ping timeout: 260 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davidt has quit []
mim1k|work has joined #ruby
nitric has joined #ruby
flashpoint9 has joined #ruby
claudiuinberlin has quit []
InternetFriend has joined #ruby
Derperperd has quit [Quit: Derperperd]
cdg has joined #ruby
blackwind_123 has quit [Read error: Connection reset by peer]
igniting has joined #ruby
psmolen has quit [Ping timeout: 265 seconds]
flashpoint9 has quit [Read error: Connection reset by peer]
flashpoi_ has joined #ruby
aryaching has joined #ruby
Devalo has quit [Remote host closed the connection]
gusrub has joined #ruby
JoshS has quit [Ping timeout: 260 seconds]
psmolen has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
patarr has quit [Quit: patarr]
Yzguy has joined #ruby
tyang_ has quit [Read error: Connection reset by peer]
davidt has joined #ruby
tyang_ has joined #ruby
arashb has joined #ruby
hahuang65 has joined #ruby
jcao219 has joined #ruby
blackwind_123 has joined #ruby
Derperperd has joined #ruby
Derperperd has quit [Client Quit]
wldcordeiro has quit [Ping timeout: 265 seconds]
<guardian>
hello, it seems including a module and then undef foo to undefine method foo works, but is this the proper way to do it?
arashb has quit [Ping timeout: 250 seconds]
synthroid has joined #ruby
Devalo has joined #ruby
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
<porfa>
help me im rusted, i lost my old works and can’t get this new one to work
hahuang65 has quit [Ping timeout: 256 seconds]
synthroi_ has quit [Ping timeout: 265 seconds]
allomov has quit [Remote host closed the connection]
Silthias1 has joined #ruby
<havenwood>
porfa: ##rust is for rust-related discussion
mtkd has joined #ruby
Silthias has quit [Ping timeout: 256 seconds]
<porfa>
hahah
ziarkaen has quit [Ping timeout: 245 seconds]
SeepingN has joined #ruby
<havenwood>
guardian: why do you want to undef a method from the included module?
jackjackdripper has joined #ruby
ziarkaen has joined #ruby
harushimo has quit [Quit: This computer has gone to sleep]
hahuang65 has joined #ruby
<havenwood>
guardian: buy yeah, undef is prim and proper
harushimo has joined #ruby
asahi has joined #ruby
<guardian>
because I only want a few from the module and I don't own the module
SCHAAP137 has joined #ruby
ziarkaen has quit [Ping timeout: 252 seconds]
Yzguy has quit [Quit: Zzz...]
JoshS has joined #ruby
Yzguy has joined #ruby
rodfersou has quit [Ping timeout: 265 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
TPug has joined #ruby
mim1k|work has quit [Ping timeout: 265 seconds]
Humdai has quit [Quit: Leaving]
<Mrgoose>
Do you all separate integration and unit tests into different folders?
<asahi>
I use rbenv, and when I call "ruby -v" in a directory that has a Gemfile in it, I get a different version from "rbenv local". The Gemfile doesn't specify a ruby version, so where is the ruby version being specified?
wldcordeiro has joined #ruby
<havenwood>
asahi: Is there a .ruby-version file?
gusrub has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
flashpoint9 has quit [Ping timeout: 256 seconds]
yardenbar has joined #ruby
gizmore has quit [Ping timeout: 244 seconds]
gizmore has joined #ruby
flashpoint9 has joined #ruby
JoshS has joined #ruby
kegster has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
hahuang61 has joined #ruby
flashpoi_ has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Ping timeout: 245 seconds]
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
flashpoi_ has joined #ruby
whathappens has joined #ruby
bturker_ has quit [Ping timeout: 256 seconds]
hypercube32 has joined #ruby
n8o has joined #ruby
kyle__ has quit [Quit: WeeChat 1.6]
chouhoulis has joined #ruby
flashpoint9 has quit [Ping timeout: 265 seconds]
rajdesai has quit [Ping timeout: 260 seconds]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
flashpoint9 has joined #ruby
icio has joined #ruby
flashpoi_ has quit [Ping timeout: 256 seconds]
rcvalle has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
icio has left #ruby [#ruby]
whathappens has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
malconis has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
malconis has joined #ruby
flashpoi_ has joined #ruby
quazimodo has quit [Ping timeout: 244 seconds]
BTRE has quit [Ping timeout: 265 seconds]
merlin2049er has joined #ruby
cr3 has joined #ruby
merlin2049er has left #ruby [#ruby]
flashpoint9 has quit [Ping timeout: 245 seconds]
flashpoint9 has joined #ruby
bocaneri has quit [Remote host closed the connection]
<cr3>
hi folks, might there be a way to use a cache on the filesystem with bundle install/update? I'm seeing ~/.bundle and ~/.gem populated but they don't seem to contain gems, so the next bundle install/update seems to download everything again.
<porfa>
the problem i guess, in the comand line it shows as space
<porfa>
but i guess it isn’t
<porfa>
its this “ “ inside the quotes.
<sagax>
hm, strange, i test this "245/65 17 ".gsub(/\s/, ",") and it work
<porfa>
it’s not a space, i did the gsub with physical pressed space, it didn’t work.. i copy pasted the space from the string, psted it the gsub and it worked...
<porfa>
it replaced hmm
jaykill has joined #ruby
<eam>
you may have unprintable characters in your string
<porfa>
anyone used “COURSERA” ? thinking about enrroling in a ruby course