webopsx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
CuriousMind has joined #ruby
chouhoulis has quit [Remote host closed the connection]
BackEndCoder has quit [Excess Flood]
chouhoulis has joined #ruby
dminuoso has joined #ruby
<CuriousMind>
I don't know how to ask this question but...when would you use instance variables and class variables? To my understanding, instance variables belong to instances of the class while class variables belong to the class. I just don't get why
<zenspider>
strongcode: OptionParser. Look at minitest's process_args for an example
<zenspider>
CuriousMind: you don't get what?
SeepingN_ has quit [Quit: The system is going down for reboot NOW!]
blackmesa has quit [Ping timeout: 244 seconds]
skweek has quit [Ping timeout: 250 seconds]
<CuriousMind>
zenspider: Class variables and instance variables. Someone explained it to me in programming
hello_skywalker has joined #ruby
<CuriousMind>
zenspider: To my understanding, class variables are unique to the class and instance variables are unique to each instance from the class. Is that correct?
hello_skywalker has left #ruby [#ruby]
CloCkWeRX has quit [Ping timeout: 265 seconds]
ziprar has joined #ruby
zipace has quit [Disconnected by services]
maddmaxx has joined #ruby
xemehc has quit [Quit: ZZZzzz…]
patrick99e99 has quit [Quit: Lost terminal]
sonikspin has joined #ruby
RedNifre_ has quit [Read error: Connection reset by peer]
RedNifre_ has joined #ruby
redpants has quit [Ping timeout: 240 seconds]
sneakers has quit [Ping timeout: 255 seconds]
csk has quit [Quit: ZZZzzz…]
Nanuq has quit [Quit: brb]
<zenspider>
CuriousMind: mostly
polysics has joined #ruby
<zenspider>
@@class_vars are available to both instances and and the class + its subclasses
gizmore has joined #ruby
<zenspider>
@instance_vars are unique to a single instance
<zenspider>
and since classes are instances of Class, they can have their own. We call those class instance vars, or civars
<CuriousMind>
zenspider: Ah ok, thank you so much
<CuriousMind>
civars, interesting
Nanuq has joined #ruby
CloCkWeRX has joined #ruby
_sfiguser has quit [Ping timeout: 250 seconds]
LambdaSix has joined #ruby
polysics has quit [Ping timeout: 244 seconds]
hammond is now known as j2ee
dn5 has quit [Ping timeout: 240 seconds]
kus_ubuntui686 has joined #ruby
kus_ubuntui686 has quit [Max SendQ exceeded]
dn5 has joined #ruby
Azure has joined #ruby
kus_ubuntui686 has joined #ruby
Azure|dc has quit [Ping timeout: 244 seconds]
LambdaSix has quit [Ping timeout: 265 seconds]
gp has joined #ruby
LambdaSix has joined #ruby
greg_ has joined #ruby
greg_ has quit [Read error: Connection reset by peer]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<s2013>
oh wait i think it does it in an asc order.. k no wonder
jaequery has joined #ruby
blackmesa has joined #ruby
<s2013>
thanks
kegster has quit [Quit: Shiner, TX makes good beer.]
kegster has joined #ruby
jaequery has quit [Client Quit]
ropeney has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
jaequery has joined #ruby
Bellthoven has joined #ruby
ResidentBiscuit has joined #ruby
jamlee has joined #ruby
<s2013>
k im trying to do a new hash with indifferent access but i keep getting undefined method. Hash.new { |hash, key| hash[key] = { count: 0, sentiments: { positive: 0, negative: 0, neutral: 0, not_set: 0}}} where should i put the with_indifferent_access
<s2013>
i tried setting it after first } and second }
MyMind has joined #ruby
duderonomy has quit [Ping timeout: 250 seconds]
Sembei has quit [Ping timeout: 255 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JoshS has quit [Quit: Leaving]
optiz0r has quit [Ping timeout: 240 seconds]
leea has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
polysics has joined #ruby
Rodya_ has quit [Remote host closed the connection]
ajsharma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
Bellthoven has quit []
prawnzy has quit [Remote host closed the connection]
nankyokusei has joined #ruby
Vingador has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 255 seconds]
whathappens has joined #ruby
Immune has joined #ruby
ajsharma has joined #ruby
whathappens has quit [Client Quit]
nankyokusei has quit [Ping timeout: 276 seconds]
dviola has quit [Quit: WeeChat 1.5]
Mintyl has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
Mintyl has joined #ruby
mikecmpbll has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
ur5us has joined #ruby
nando293921 has joined #ruby
gp has quit [Quit: Leaving]
ajsharma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamlee has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
ajsharma has joined #ruby
ap4y has quit [Remote host closed the connection]
sonikspin has quit [Ping timeout: 265 seconds]
djbkd_ has quit [Quit: My people need me...]
dminuoso has joined #ruby
jamlee has quit [Remote host closed the connection]
ajsharma has quit [Ping timeout: 264 seconds]
jackjackdripper has joined #ruby
dminuoso has quit [Ping timeout: 265 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 265 seconds]
tmtwd has quit [Ping timeout: 265 seconds]
ResidentBiscuit has quit [Ping timeout: 250 seconds]
redpants has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
Rakko has joined #ruby
<Rakko>
Does Ruby 2.3 do some lazy thing by default? I keep finding that work that I expect to be done in my script's main class's constructor is being deferred until after I try accessing members of that class.
Trynemjoel has quit [Ping timeout: 244 seconds]
Trynemjoel has joined #ruby
prawnzy has joined #ruby
<Rakko>
And, does it depend on whether I end a line with semicolon (in irb)?
<eam>
Rakko: gist some code
ixti has quit [Ping timeout: 244 seconds]
<Rakko>
I think I figured out it has something to do with semicolon
<Rakko>
I thought I could put semi on the end to suppress printing its value, but apparently I'm wrong and/or that's changed
NetSage has quit [Remote host closed the connection]
pokalyis has joined #ruby
blabl has joined #ruby
blabl has left #ruby [#ruby]
<Rakko>
when I want to have one uniform way of creating an object, but the object may be an instance of one of several (sub)classes, is it still recommended to use a factory method in Ruby?
redpants has joined #ruby
polysics has joined #ruby
AnoHito_ has quit [Quit: Leaving]
ur5us has quit [Remote host closed the connection]
finisherr has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
braincras has quit [Quit: bye bye]
dhollinger has quit [Ping timeout: 240 seconds]
polysics has quit [Ping timeout: 244 seconds]
AndyBotwin has joined #ruby
Sonja has joined #ruby
<Sonja>
can i import the variables from foo.rb in bar.rb ?
Rodya_ has joined #ruby
<Nilium>
Did you try?
<Sonja>
#load './vocab'
<Sonja>
#require_relative 'vocab.rb'
<Sonja>
#include 'vocab'
<Sonja>
require './vocab.rb'
<Sonja>
none of these work
<Rakko>
toki, jan sonja
<Sonja>
Rakko!
<Rakko>
:)
optiz0r has joined #ruby
<Rakko>
I don't believe variables work that way. You should put any relevant variables in classes and then require the class files.
<Rakko>
but the non-class-held variables in one file are private to that file
braincrash has joined #ruby
braincrash is now known as braincras
Vile` has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Ping timeout: 255 seconds]
<Sonja>
thanks for the help!!
hopsoft has joined #ruby
<Rakko>
any time
AnoHito has joined #ruby
jaequery has joined #ruby
LoneHerm_ has joined #ruby
JoshS has joined #ruby
chouhoul_ has joined #ruby
JeanCarloMachado has joined #ruby
brent__ has quit [Quit: Connection closed for inactivity]
_sfiguser has quit [Read error: Connection reset by peer]
s2013 has quit [Read error: Connection reset by peer]
arescorpio has quit [Quit: Leaving.]
dminuoso has joined #ruby
ejnahc has quit [Ping timeout: 265 seconds]
craigp has joined #ruby
ejnahc has joined #ruby
skweek has joined #ruby
vdamewood has joined #ruby
dhollinger has joined #ruby
dminuoso has quit [Ping timeout: 276 seconds]
Ebok has joined #ruby
Sonja has quit []
hakunin has quit [Ping timeout: 244 seconds]
duderonomy has joined #ruby
<CuriousMind>
Can someone help me understand this? Trying replace a key in a hash and the StackOverflow best response had this code `hash[:new_key] = hash.delete :old_key`
<havenwood>
baweaver: #=> 4
<CuriousMind>
How do I use that code
<baweaver>
you run it through ruby?
_djbkd has joined #ruby
<baweaver>
Sorry, that seems fairly straightforward, what's the issue?
<_sfiguser>
how can i apply software engineering principles if no abstract classes or interfaces exist ?
gix has joined #ruby
Guest56_ has joined #ruby
Guest56_ is now known as AlexxNica
prawnzy has quit [Remote host closed the connection]
<CuriousMind>
baweaver: I have a question. Why is it when I had put `hash` in the method change_key, it didn't work? But when I passed it in it works? hash is a global variable, I don' get it
<baweaver>
no it's not
<havenwood>
_sfiguser: There is more than one way to apply software engineering principles. Rubyists tend to embrace tests. It's also quite a flexible language so you can built what you like.
<baweaver>
the thing about patterns and principles is they vary heavily depending on language.
<baweaver>
ESPECIALLY on things like Haskell or functional languages.
<baweaver>
It'd be absurd to make a commander pattern in Haskell
<havenwood>
_sfiguser: `[1, 2, 3].each { |n| puts n }` is another way to write `puts [1, 2, 3]`
<havenwood>
_sfiguser: Just he return value of the first is `[1, 2, 3]` and the second is `nil`.
<baweaver>
CuriousMind: $hash is global, but don't use globals
rsampaio_ has joined #ruby
<CuriousMind>
baweaver: Uhhh ok so hash in my program is local?
<baweaver>
bingo
<CuriousMind>
How wait baweaver
<CuriousMind>
I declare hash at the top of the editor so why is it not accessed in a method/
<CuriousMind>
?*
<baweaver>
scope
<baweaver>
hash is a local in your main scope
<baweaver>
your function has no idea what locals are there.
<CuriousMind>
Ohhhhhh baweaver Ok so there is a difference between main and local scope
<CuriousMind>
I mean main and global scope
<baweaver>
yep
<baweaver>
locals are always local to _their_ scope
<baweaver>
instance variables to an instance of a class
<baweaver>
etc etc
gizmore has quit [Ping timeout: 244 seconds]
A_Drone has quit [Remote host closed the connection]
gizmore has joined #ruby
<CuriousMind>
So that's why you pass in variables because you bring variables from different scopes? It's like introducing two people from two different countries baweaver ?
<baweaver>
something like that.
sai_ has joined #ruby
<CuriousMind>
baweaver: Explain, I am trying to understand this
<baweaver>
The method cannot see the variable hash
<CuriousMind>
baweaver: Ok my question is. The method is being made in the main scope correct? Explain that
<CuriousMind>
Oh wait no, the method has it's OWN scope
<baweaver>
yep
JeanCarloMachado has quit [Ping timeout: 244 seconds]
<CuriousMind>
I'm confused but ok. I understand this on a surface level. Ok thank you
<baweaver>
You might want to read through a book like Eloquent Ruby or The Ruby Way.
Tharbakim has quit [Ping timeout: 244 seconds]
nofxx has quit [Ping timeout: 244 seconds]
<CuriousMind>
Yeah definitely baweaver
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
polysics has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
Tharbakim has joined #ruby
polysics has quit [Ping timeout: 250 seconds]
alfiemax has quit [Ping timeout: 265 seconds]
sai__ has joined #ruby
sai_ has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
Rodya_ has joined #ruby
nankyokusei has joined #ruby
Axy has joined #ruby
Rodya_ has quit [Ping timeout: 248 seconds]
nertzy has joined #ruby
nankyokusei has quit [Ping timeout: 272 seconds]
SteenJobs has joined #ruby
Mia has quit [Ping timeout: 255 seconds]
jswe has quit [Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in]
gnufied has quit [Ping timeout: 272 seconds]
pwnd_nsfw` has joined #ruby
leea has joined #ruby
leea has quit [Client Quit]
pwnd_nsfw has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
jswe has joined #ruby
nertzy has quit [Ping timeout: 255 seconds]
jswe has quit [Client Quit]
dminuoso has joined #ruby
kerframil has quit [Ping timeout: 265 seconds]
roger_rabbit has quit [Ping timeout: 240 seconds]
dminuoso has quit [Ping timeout: 265 seconds]
leea has joined #ruby
jswe has joined #ruby
leea has quit [Read error: Connection reset by peer]
bronson has joined #ruby
tdy has joined #ruby
finisherr has quit [Quit: finisherr]
Fernando-Basso has quit [Ping timeout: 265 seconds]
sai__ has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
sai_ has joined #ruby
petercooper has joined #ruby
bronson has quit [Read error: Connection reset by peer]
bronson_ has joined #ruby
Fernando-Basso has joined #ruby
ARCADIVS has joined #ruby
finisherr has joined #ruby
finisherr has quit [Client Quit]
Emmanuel_Chanel has quit [Quit: Leaving]
SteenJobs has quit [Quit: SteenJobs]
Emmanuel_Chanel has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
bronson_ has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
blackwind_123 has quit [Ping timeout: 244 seconds]
saneax-_-|AFK is now known as saneax
bronson has quit [Ping timeout: 248 seconds]
dminuoso has joined #ruby
bronson has joined #ruby
polysics has joined #ruby
Tempesta_ has quit [Quit: See ya!]
alfiemax has joined #ruby
chelly has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Ping timeout: 272 seconds]
dminuoso has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 248 seconds]
araujo has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
polysics has quit [Ping timeout: 244 seconds]
nando293921 has quit [Ping timeout: 248 seconds]
JoshS has quit [Read error: Connection reset by peer]
JoshS has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
grh has joined #ruby
jenrzzz has joined #ruby
ichkv has quit [Ping timeout: 255 seconds]
TheMoonMaster has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
Caelum has quit [Ping timeout: 272 seconds]
LoneHermit has joined #ruby
harfangk has joined #ruby
ur5us has quit [Remote host closed the connection]
moos3 has quit [Ping timeout: 244 seconds]
yeticry has quit [Ping timeout: 260 seconds]
TheMoonMaster has joined #ruby
Devalo has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
Ebok has quit [Quit: Leaving]
yeticry has joined #ruby
LoneHermit has quit [Ping timeout: 272 seconds]
tubuliferous_ has joined #ruby
bocaneri has joined #ruby
sai_ has quit [Remote host closed the connection]
A_Drone has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
A_Drone has quit [Remote host closed the connection]
bronson has joined #ruby
Caelum has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
moos3 has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
A_Drone has joined #ruby
bronson has joined #ruby
_djbkd has quit [Quit: My people need me...]
sai_ has joined #ruby
dionysus69 has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
grh has quit [Ping timeout: 265 seconds]
last_staff has joined #ruby
sai_ has quit [Ping timeout: 244 seconds]
djbkd_ has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
araujo has quit [Ping timeout: 265 seconds]
polysics has joined #ruby
peterhu has quit [Quit: leaving]
A_Drone has quit [Remote host closed the connection]
tonini has joined #ruby
sandelius has joined #ruby
dminuoso has joined #ruby
bronson_ has joined #ruby
bronson has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
Caelum has quit [Ping timeout: 272 seconds]
Devalo has quit [Remote host closed the connection]
<zenspider>
_sfiguser: > <_sfiguser> [20:51:39] how can i apply software engineering principles if no abstract classes or interfaces exist ?
A_Drone has quit [Remote host closed the connection]
araujo has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
araujo has quit [Max SendQ exceeded]
bronson has quit [Ping timeout: 248 seconds]
araujo has joined #ruby
minimalism has quit [Quit: minimalism]
Trynemjoel has joined #ruby
bronson has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
firstdayonthejob has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
nankyokusei has joined #ruby
djbkd_ has quit []
bronson_ has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
shortCircuit__ has joined #ruby
<shortCircuit__>
hi
nankyoku_ has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
craigp has joined #ruby
<shortCircuit__>
when should I use cucumber. I have a file called parse_csv_data .. which takes a csv file. and then inserts each record to database .. how to test this ?
bronson has joined #ruby
bronson_ has quit [Ping timeout: 248 seconds]
<shortCircuit__>
I have written a class called Review .. which has an insert method
<shortCircuit__>
so I should stub/mock that method ?
blackmesa has joined #ruby
vdamewood has quit [Quit: Life beckons.]
dminuoso has quit [Ping timeout: 265 seconds]
ziprar has quit [Ping timeout: 255 seconds]
ichkv has joined #ruby
xcesariox has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
marktwo has joined #ruby
LoneHermit has joined #ruby
bronson has joined #ruby
marktwo is now known as Guest71613
JoshS has quit [Ping timeout: 265 seconds]
anisha has joined #ruby
bronson has quit [Read error: Connection reset by peer]
LoneHermit has quit [Ping timeout: 244 seconds]
A_Drone has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
sonikspin has joined #ruby
aufi has joined #ruby
kies has quit [Remote host closed the connection]
Guest71613 has quit [Quit: Leaving]
HaikuUser has joined #ruby
nankyoku_ has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
p0p0pr37 has quit [Quit: p0p0pr37]
ur5us has quit [Remote host closed the connection]
submitnine has joined #ruby
prawnzy has quit [Read error: Connection reset by peer]
prawnzy has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
CloCkWeRX has joined #ruby
biberu has joined #ruby
andikr has joined #ruby
araujo_ has joined #ruby
araujo has quit [Ping timeout: 272 seconds]
claudiuinberlin has joined #ruby
sai_ has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wugy has joined #ruby
TomyWork has joined #ruby
Vivekananda has quit [Ping timeout: 265 seconds]
AlexxNica has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
dn5 has quit [Ping timeout: 260 seconds]
Guest56_ has joined #ruby
rsup has joined #ruby
rsup has quit [Client Quit]
dn5 has joined #ruby
aidalgol has joined #ruby
araujo_ has quit [Ping timeout: 265 seconds]
toretore has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 255 seconds]
RegulationD has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Quit: Leaving.]
RegulationD has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Emmanuel_Chanel has joined #ruby
prawnzy has quit [Remote host closed the connection]
ichkv has quit [Remote host closed the connection]
ichkv has joined #ruby
Rodya_ has joined #ruby
braderhart is now known as techntoke
techntoke is now known as braderhart
pawnbox has quit [Ping timeout: 240 seconds]
araujo_ has joined #ruby
Silthias1 has joined #ruby
Guest8435 is now known as sts
Silthias has quit [Ping timeout: 244 seconds]
braderhart is now known as techntoke
bsrd has joined #ruby
Rodya_ has quit [Ping timeout: 272 seconds]
pawnbox has joined #ruby
Axy has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ta__ has joined #ruby
elenatanasoiu has joined #ruby
the_drow has joined #ruby
sai_ has quit [Remote host closed the connection]
Chelsea has quit [Ping timeout: 265 seconds]
naviaa has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
marr has joined #ruby
JoshS has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
A_Drone has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ruby-lang006 has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
ruby-lang006 has left #ruby [#ruby]
<hightower3>
Hey folks, I have a problem in my Ruby app which opens a TCP socket, and in case the connection drops at some point it reconnects. However, when it attempts to reconnect, it does a hostname lookup, and instead of getting the IP for it, it gets #<SocketError: getaddrinfo: Name or service not known>
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
salut has joined #ruby
<hightower3>
(This is in no way related to my DNS or hostname resolving. When I restart the app it works, it only fails within the app, when a reconnection attempt is made, and only fails sometimes (like 1 out of 20 times))
<hightower3>
I've searched the web and found that Ruby ships with a module resolv-replace to fix this known problem
<hightower3>
However, I have the same behavior both with the standard/C resolving and resolv-replace; the difference is only in the cases/conditions under which the bug shows up
<hightower3>
Any hints?
ocbtec has joined #ruby
LoneHerm_ has joined #ruby
chichou has joined #ruby
tomphp has joined #ruby
flying has joined #ruby
jaruga___ has joined #ruby
LoneHerm_ has quit [Ping timeout: 255 seconds]
Couch has joined #ruby
shortCircuit__ has quit [Ping timeout: 260 seconds]
koma has left #ruby ["Leaving"]
nankyokusei has joined #ruby
sandelius has joined #ruby
rsampaio_ has quit [Ping timeout: 250 seconds]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nadir has quit [Quit: Connection closed for inactivity]
bsrd has quit [Quit: WeeChat 1.5]
Burgestrand has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
bsrd has joined #ruby
petercooper has quit [Ping timeout: 260 seconds]
chichou has quit [Quit: Bye! 1.5]
mikecmpbll has joined #ruby
<CuriousMind>
Difference between `require` and `include` in ruby?
senayar has joined #ruby
gingray has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
singalaut has joined #ruby
<ljarvis>
CuriousMind: did you check the documentation?
mkl has quit [Read error: Connection reset by peer]
DaniG2k has quit [Quit: leaving]
xemehc has joined #ruby
lxsameer has joined #ruby
<devil_tux>
shortCircuit__: ? whats in Logger?
xemehc has quit [Client Quit]
<devil_tux>
You haven't initialized Logger
<shortCircuit__>
for now its just class Logger def self.log(str); p str if ENV["ENABLE_LOGGING"}; end end end
<toretore>
shortCircuit__: gist all the code you have
<shortCircuit__>
ok
zeroDi has joined #ruby
dionysus69 has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
aidalgol has quit [Ping timeout: 265 seconds]
<shortCircuit__>
updated
hanmac has quit [Ping timeout: 255 seconds]
pragmaticus has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 265 seconds]
<_sfiguser>
canton7, ops sorry i mean beginning ruby
<_sfiguser>
is it a good book beginning ruby ?
<toretore>
shortCircuit__: `Logger` inside `FetchFromApi means` `HTTParty::Logger`, not `Logger`
<toretore>
because you `include HTTParty`
<darix>
shortCircuit__: you never instanciate your logger anywhere
<shortCircuit__>
but why
<toretore>
which has a Logger
<shortCircuit__>
oh
<shortCircuit__>
that's why
<shortCircuit__>
shit
<darix>
shortCircuit__: use the ruby logger class btw
<shortCircuit__>
everyone has a Logger
<toretore>
if you want to reference a top level Logger (which you shouldn't), use ::Logger
<darix>
shortCircuit__: you can just play with log levels
<darix>
to filter messages you dont want that way
<shortCircuit__>
oh .. I have to log those messages and send them to some storage like aws or something
<shortCircuit__>
in production
blackmesa has joined #ruby
nikivi has quit [Quit: zzz]
<darix>
you will handle it
Rodya_ has joined #ruby
TheWhip has joined #ruby
<shortCircuit__>
for which I need a custom class. I will wrap it in my own module
<hightower4>
Hey, I'm running 'gem install openssl' as I've always been doing, but now I get: ERROR: Could not find a valid gem 'openssl' (>= 0) in any repository
<hightower4>
Any hints?
<toretore>
openssl is part of ruby
<toretore>
stdlib
symm- has quit [Ping timeout: 244 seconds]
<shortCircuit__>
c
<shortCircuit__>
oh
nikivi has joined #ruby
<shortCircuit__>
I should write everything in one method, will make unit testing easier .. less methods to deal with XD
Rodya_ has quit [Ping timeout: 250 seconds]
chichou has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<devil_tux>
shortCircuit__: don't.
<devil_tux>
seperate your project but seperate it smart
<shortCircuit__>
I know .. I am always in the look for making the design better
GodFather has joined #ruby
<shortCircuit__>
^ naic
<_sfiguser>
you guys think it is a good book to start with ruby "Beginning Ruby" ?
hanmac has joined #ruby
<shortCircuit__>
yes yes .. begin somewhere
<shortCircuit__>
there are others too, POODR, MR, MR2 etc etc
<shortCircuit__>
it would be fun if you said 'you guys think it is a good book to start with "Beginning Ruby" ?' . I would have said for perl ? probably not
<shortCircuit__>
XD
nikivi has quit [Read error: Connection reset by peer]
CuriousMind has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
FINbit has joined #ruby
<FINbit>
hi
<FINbit>
LoadError: no such file to load -- rubygems
<FINbit>
i keep getting this error when trying t start some app
LoneHermit has joined #ruby
<FINbit>
ive tried to install that dependency and it says it doesnt exist
<FINbit>
any ideas /
<FINbit>
?
<devil_tux>
no matter how nice we are we never help people who gives no details
ctp has joined #ruby
<shortCircuit__>
which app
JeanCarloMachado has joined #ruby
Burgestrand has joined #ruby
<shortCircuit__>
teach them to help themselves :hand:
<shortCircuit__>
:D
CloCkWeRX has joined #ruby
<shortCircuit__>
and then probably they will meet God .. coz God helps them ...
Guest22395 has quit [Ping timeout: 240 seconds]
dreamyspell has quit [Quit: Leaving]
LoneHermit has quit [Ping timeout: 248 seconds]
nuck has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
johnmilton has quit [Remote host closed the connection]
Ananthu has joined #ruby
Samysam has joined #ruby
LoneHermit has quit [Ping timeout: 265 seconds]
sdothum has joined #ruby
rndUser__ has joined #ruby
<Samysam>
Hello all. I'm fighting against gitlab upgrade and I have this error Sass::SyntaxError: Undefined mixin 'webkit-prefix'. It seems I miss a gem. Any idea which one ?
<Samysam>
rndUser__: Seems's strange since I don't changed the source code and I don't see any gitlab-related post about this on the web.
TheWhip has joined #ruby
sai_ has quit [Remote host closed the connection]
TheWhip has quit [Remote host closed the connection]
<Ananthu>
Hello. I'm Ananthu.I'm a first year cse student and I"m very much interested in learning ruby. Could anyone please give me an idea on the best place to start? I have not much of prior knowledge in programming language. Is there any pre-requisite knowledges or any needed knowledge on any other programming language?
Snowy has joined #ruby
chouhoulis has joined #ruby
tubuliferous_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<cr3>
hi folks, I'm getting "could not find gem 'devise (~> 3.2.0)'..." but my Gemfile has "source 'https://rubygems.org'" at the top, so what might be wrong?
tonini has quit [Quit: Connection closed for inactivity]
djbkd_ has joined #ruby
antgel has joined #ruby
LoneHermit has quit [Ping timeout: 265 seconds]
sarbs has joined #ruby
tyang_ has quit [Ping timeout: 255 seconds]
submitnine has quit []
<maddmaxx>
cr3 I had no issues getting devise. What does your line look like in the Gemfile?
Samysam has quit [Quit: Konversation terminated!]
<cr3>
maddmaxx: "gem 'devise', '~> 3.2.0'" (I didn't forget the comma :)
nankyokusei has joined #ruby
xemehc has quit [Quit: ZZZzzz…]
cibs has quit [Ping timeout: 268 seconds]
xemehc has joined #ruby
nikivi has quit [Quit: zzz]
<maddmaxx>
cr3 This is exactly what I have, omitting the double quotes though (unless you put those in for the msg).
hopsoft has joined #ruby
platzhirsch has joined #ruby
gingray has joined #ruby
<cr3>
yes, in for the msg, I should also mention that I'm testing with ruby 1.9.3. I'm currently trying to reproduce in an isolated environment within a ruby:1.9.3 docker container.
<cr3>
docker run -it --rm ruby:1.9.3 sh; gem install devise; ERROR: Error installing devise: rack requires Ruby version >= 2.2.2.
nikivi has quit [Client Quit]
csk has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<maddmaxx>
Well there is your answer.
<cr3>
I'm not sure that reproduces exactly what I was experiencing with bundle install but it seems to be conclusive.
<maddmaxx>
Devise requires rack, and rack requires ver. 2.2.3
<maddmaxx>
sorry, 2.2.2
harfangk_ has joined #ruby
rlex has quit [Ping timeout: 276 seconds]
harfangk has quit [Ping timeout: 248 seconds]
optiz0r has quit [Quit: No Ping reply in 180 seconds.]
<cr3>
maddmaxx: but the error I was seeing was "could not find gem devise" whereas that error is that it couldn't actually find rake
mim1k|work has quit [Read error: Connection reset by peer]
tyang_ has joined #ruby
<cr3>
maddmaxx: I'll try pinning to an earlier version
s2013 has joined #ruby
<maddmaxx>
Yes, it seems the code is requiring devise, so it could not find it. The reason it could not find it is because it could not be installed, because it is dependent on rack.
nankyokusei has quit [Ping timeout: 255 seconds]
Rodya_ has joined #ruby
optiz0r has joined #ruby
polishdub has joined #ruby
<cr3>
it's a it annoying that it took so much work to figure that out when proper error reporting would've spared me all this time (and yours too :)
inco6 has left #ruby [#ruby]
inco6 has joined #ruby
rlex has joined #ruby
<maddmaxx>
haha true, its the story of my life though :(
redpants has quit [Ping timeout: 264 seconds]
inco6 has quit [K-Lined]
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
qba73__ has joined #ruby
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
dionysus69 has quit [Ping timeout: 272 seconds]
qba73 has quit [Ping timeout: 260 seconds]
tyang_ has quit [Ping timeout: 255 seconds]
<cr3>
maddmaxx: on the upside, it's a good reminder to be careful in our own code. I'm not saying proper error reporting is easy because it really isn't :(
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
SteenJobs has joined #ruby
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
inco6 has joined #ruby
inco6 has quit [Max SendQ exceeded]
<apeiros>
!fixcon inco6
djbkd_ has quit []
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
rahulKumi has joined #ruby
tmi has quit [Quit: .]
GodFather has quit [Ping timeout: 244 seconds]
<_sfiguser>
do ruby programmers put round parenthesis around to specify if conditions ? i'm reading "beginning ruby" and it always cite if without round parenthesis anyway i get no errors when using round parenthesis
rodfersou is now known as rodfersou|lunch
ghostlight has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 265 seconds]
<elomatreb>
_sfiguser: You can use parentheses, but they're completely redundant if you just wrap the entire condition
<baweaver>
I just know what a garbage fire it turned Unix channels into for a few months
<ropeney>
thats because people dislike change
<chris2>
i forgot everything i ever knew about yaml. is it possible to load a yaml file in such way that the custom types are not used and i get something json-style?
<ropeney>
but Monit is definitely a good choice
govg has quit [Quit: leaving]
gregf_ has joined #ruby
<baweaver>
I've seen a lot of talk on Runit as well, but I never trust anything that has a website that looks like a man page
<baweaver>
frivolous, maybe, but dang has it saved me time
antgel has quit [Ping timeout: 276 seconds]
<baweaver>
this goes doubly true for anything apache related.
<chris2>
a better approach is to not trust anything that has a website that doesnt look like a manpage :P
cr3 has left #ruby [#ruby]
cdg has joined #ruby
jhack has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
<baweaver>
to each their own. I just find that sites that don't tend to be more comprehensive and easier to navigate. It's like someone put thought into the UI instead of `man program > website.html`
jhack has joined #ruby
<ropeney>
hmmmm, is nmap man pagey enough?
blaxter has quit [Quit: foo]
A124 has joined #ruby
Samysam has joined #ruby
<elomatreb>
baweaver: Agreed. The design of man pages is dictated by the limitations of the terminal, no reason to replicate it in a medium that supports better
synthroid has quit [Remote host closed the connection]
sai_ has quit [Remote host closed the connection]
nikivi has joined #ruby
qba73 has joined #ruby
gregf_ has left #ruby [#ruby]
gregf_ has joined #ruby
andikr has quit [Remote host closed the connection]
jaruga___ has quit [Quit: jaruga___]
inkog has quit [Ping timeout: 272 seconds]
chouhoulis has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
dhk has joined #ruby
snebel has joined #ruby
grh has quit [Ping timeout: 265 seconds]
prawnzy has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
nando293921 has quit [Ping timeout: 272 seconds]
<toretore>
baweaver: my experience has led me to be skeptical of any oss project that has a pretty website. the experience is that they are good at marketing but not much for substance
Rajamaa has quit [Quit: Konversation terminated!]
<ropeney>
Or it shows a diversified team working on the project
<toretore>
if the web site looks like it was made by someone with questionable personal hygiene and food stuck in their beard, on the other hand
JRajamaa has joined #ruby
<toretore>
any project that drones on about diversity too i'm usually skeptical of
pawnbox has quit [Remote host closed the connection]
<ropeney>
Personal hygiene affects code? :s
<snebel>
I'm having some troubles to build a systemd unit that points to a thin webserver, I'd really appreciate if someone can point me to something working..
<toretore>
?code snebel
<ruby[bot]>
snebel: We can't help you without your code, please post it to https://gist.github.com
|prawnzy has joined #ruby
prawnzy has quit [Read error: Connection reset by peer]
<Biciato>
using sqlite3 i want to repeat the query in case that the query finds nothing , how can i do this ?
<apeiros>
Biciato: you write a loop?
mallu has joined #ruby
<Biciato>
yeah but how would be the conditioning for finding nothing ?
<mallu>
noob here.. how do I write output of this to a file? ec2.describe_instances(filters:[{name: 'instance-state-name', values:['running']}])
VladGh has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
<apeiros>
mallu: File.write(path_to_file, data)
thisguy123 has joined #ruby
VladGh has joined #ruby
<apeiros>
Biciato: how do you do the query?
nitric has joined #ruby
<apeiros>
_sfiguser: yeah, you're welcome. no need to have the manners to say "thank you" or somesuch…
<Biciato>
db.execute("select * from Card where face = '#{vet_s}'") do |row| while row == NIL do db.execute print row end
<apeiros>
I don't think row will ever be nil there
<Biciato>
the problem is with "while row == NIL"
<apeiros>
so you can either place a variable outside, initializing it with nil, and set it to true in your do/end, or you can change the way you query.
<_sfiguser>
apeiros, sorry i come from perl :) where people is touchy and having an answer is hard without things like "you *** stupid, go read the docs"
mikecmpbll has quit [Ping timeout: 260 seconds]
<apeiros>
_sfiguser: I have no idea how that relates. but sure.
ebbflowgo has joined #ruby
<Biciato>
let me explain better, the variable vet_s holds a string selected randomly from a array of strings
MyMind has quit [Read error: Connection reset by peer]
conta has joined #ruby
LoneHermit has joined #ruby
<Biciato>
and there are some strings that have the same value of the database's rows but also there are some that haven't
VladGh has quit [Remote host closed the connection]
MyMind has joined #ruby
<ropeney>
you do a loop, checking the count of the results
VladGh has joined #ruby
<apeiros>
Biciato: ok. still the same answer :)
<Biciato>
example: "John" is in the array and is also inside db but Kerry is in the array but isn't inside db
<Biciato>
vet_s variable select a "name" randomly from array so sometimes the query will match but sometimes won't
<Dysp>
Hey guys. I am trying to solve a problem. I hope you can help me.
qba73 has quit [Ping timeout: 240 seconds]
<Dysp>
Say I have a given array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. I want to do a rolling average, where I iterate over n amount of elements and take the mean of these.
<Dysp>
I then want to move forward one element and do it again for the next n elements.
Cohedrin has joined #ruby
<havenwood>
Dysp: each_cons
<Dysp>
havenwood: Yep. Exactly that.
dionysus69 has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 265 seconds]
ponga has quit [Quit: Connection closed for inactivity]
<apeiros>
if you want to optimize performance - it can be done with a single addition and subtraction per rolling element instead of summing all n elements on each iteration. but only if you need the perf. otherwise it'll just needlessly make the code more complex.
lxsameer has joined #ruby
be_______ has quit [Ping timeout: 265 seconds]
<Dysp>
apeiros: Can you clarify?
<Dysp>
I always want to learn new things, especially performance.
SuperLag has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
redpants has joined #ruby
SuperLag has joined #ruby
heftig has quit [Remote host closed the connection]
_djbkd has quit [Read error: Connection reset by peer]
<Dysp>
Also, havenwood; I don't get what 1.upto(array.size) is for?
aryaching has joined #ruby
_djbkd has joined #ruby
Guest19031 is now known as zrl
<havenwood>
Dysp: I must have misunderstood what you wanted. I thought you wanted each cons of every possible size up to the whole array. Nevermind!
sylario has joined #ruby
<Dysp>
Odds are higher that I didn't express myself properly.
chris2 has quit [Ping timeout: 272 seconds]
_sfiguser has joined #ruby
salut has quit [Quit: salut]
rodfersou|lunch is now known as rodfersou
armin has quit [Quit: relate to the matter as i drop the bomb]
<apeiros>
Dysp: basically you sum n elements as a setup, then you subtract 1st element and add n+1 nth element, and you do that ary.size - n - 1 times (one time less because the initial has to be special cased)
replay has joined #ruby
elenatanasoiu has quit [Ping timeout: 255 seconds]
<apeiros>
i.e. first iteration: subtract index 0, add index n+1, 2nd iter: subtract idx 1, add idx n+2, etc.
grh has joined #ruby
armin has joined #ruby
<Dysp>
I think I understand it a little bit, but not entirely. But it's okay, thank you for explaining. It's getting a bit too mathy :p
Devalo has joined #ruby
redpants has quit [Ping timeout: 272 seconds]
jackjackdripper has quit [Quit: Leaving.]
garethrees has quit []
claudiuinberlin has joined #ruby
ocbtec has quit [Quit: leaving]
whathappens has joined #ruby
huggy has quit [Ping timeout: 272 seconds]
tdy has quit [Ping timeout: 240 seconds]
mallu has quit [Quit: Page closed]
minimalism has joined #ruby
<Dysp>
If I want to make sure a passed parameter/argument is an integer, is this an okay way to do it? n.class != Integer
<Dysp>
?
<Dysp>
Oh, it raises if not.
<toretore>
what you probably want is to call to_i on it
<toretore>
then document that
ropeney has quit [Quit: Leaving]
A124 has quit [Ping timeout: 244 seconds]
camilasan has quit [Remote host closed the connection]
<Dysp>
But I wanna make sure that user do not expect that the method will work with anything else than an integer.
<Dysp>
Because it shouldn't. If a float is passed, then an error should be thrown; not just convert it into an integer. In that case unexpected errors would rise in the end result and then they have to figure out why without proper knowledge of programming
sai_ has joined #ruby
<toretore>
again, why?
<toretore>
what sort of disaster happens if i pass 1.1 instead of 1?
sai_ has quit [Read error: Connection reset by peer]
sai__ has joined #ruby
Johne has left #ruby ["bye"]
RedNifre_ is now known as RedNifre
heftig has joined #ruby
<eam>
toretore: are you really arguing that methods should fudge inputs?
zacts has quit [Ping timeout: 250 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
strict input validation is a good practice
<Dysp>
toretore: I cannot iterate over 1.1 elements in an array
<apeiros>
1.1 vs. 1 isn't exactly the same quacking either
<Dysp>
And if user expects that, things will just go wrong
Mrgoose has quit []
elaptics has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 248 seconds]
<eam>
Dysp: I'd #is_a? Integer
<toretore>
you basically have two choices: 1) strictly require that class == Integer; 2) require that it responds to to_i
dhk_ has joined #ruby
p0p0pr37_ has joined #ruby
chris2 has joined #ruby
<eam>
well you just need to know it inherits from Integer
GinoManWorks has joined #ruby
<eam>
Bignum and Fixnum are both ok
<toretore>
same thing, basically
<eam>
yeah
<toretore>
my point is that 1 is static typing and 2 is duck typing
<eam>
I'd get freaked out if I could foo["lolwut"]
p0p0pr37 has quit [Ping timeout: 260 seconds]
p0p0pr37_ is now known as p0p0pr37
<eam>
where foo was an integer indexed array
ebbflowgo has joined #ruby
<eam>
cuz sure you could return index zero
<eam>
but should you?
KnownSyntax has quit [Ping timeout: 240 seconds]
SteenJobs has joined #ruby
<baweaver>
Meanwhile, hash will take whatever you can stuff in there
<toretore>
Dysp: if you have users who don't understand programming, then there should be a layer separating them and your method, and it is in this layer that the validation should occur
<eam>
well yeah, but that's explicit in the hash functionality
<baweaver>
eam: Did I ever show you how I abused that fact?
<eam>
baweaver: nope, please do tell
<baweaver>
to precurse it though, what do Hash and Proc have in common?
<eam>
I really wish ruby had a obj{} syntax as well as obj[]
<baweaver>
Let there be Lambda
whathappens has quit [Remote host closed the connection]
marxarelli has joined #ruby
A124 has joined #ruby
whathappens has joined #ruby
<baweaver>
eam: Do you now know fear?
<eam>
nope
<baweaver>
you get what it's doing yet
<baweaver>
?
whathapp_ has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
twe4ked has quit [Ping timeout: 248 seconds]
prawnzy has joined #ruby
<apeiros>
[1,2,3,4]["foo"] *obviously* should return the index at "foo".hash!!!1!elf!
<apeiros>
Dysp: did you try to implement the rolling average yet?
<eam>
baweaver: yeah that's neat :D
<baweaver>
I'll probably refactor it to work as a tree select
<baweaver>
get all nodes down the tree where this condition matches and return a new hash
blackmesa has joined #ruby
twe4ked has joined #ruby
<baweaver>
problem is [:*] on the end would require a call with something explicit to tell it stop the tree
<Dysp>
Got into a discussion about databases
mikecmpbll has quit [Quit: inabit. zz.]
<baweaver>
Seems like a conversation with a lot in store
ben______ has quit [Remote host closed the connection]
<Dysp>
We are newbs. Of course ^^
GodFather has quit [Ping timeout: 244 seconds]
* baweaver
grumbles about missed puns
ben______ has joined #ruby
sai_ has joined #ruby
sai__ has quit [Read error: Connection reset by peer]
prawnzy has quit [Ping timeout: 272 seconds]
ben______ has quit [Remote host closed the connection]
ben______ has joined #ruby
sai_ has quit [Read error: Connection reset by peer]
<apeiros>
Dysp: ok. pondering to implement Enumerable#rolling_average(n). but don't want to do it if you haven't done it yourself already :-p
<Dysp>
toretore: There actually is. It's simply for my developer to get exceptions if he acts up
ben______ has quit [Remote host closed the connection]
AlexxNica has quit [Quit: AlexxNica]
sai_ has joined #ruby
ben______ has joined #ruby
<Dysp>
apeiros: Did I awake some curiousity in you? :D
alfiemax has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<Dysp>
But show me your solution. I of course learn things by doing them myself, but that doesn't mean I cannot get inspiration. I also don't have an interest in becoming a software developer
banisterfiend has joined #ruby
mikecmpbll has joined #ruby
RobertBirnie has joined #ruby
<apeiros>
Dysp: I usually want to see an implementation (working or near-working) from a help-seeker before revealing mine.
<banisterfiend>
anyone here familiar with kafka?
<banisterfiend>
apeiros U?
zacts has joined #ruby
<banisterfiend>
:P:P
platzhirsch has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
SteenJobs has joined #ruby
gingray has quit [Ping timeout: 265 seconds]
<apeiros>
banisterfiend: I only know kafka, not his works.
<apeiros>
and I'm still waiting for godot.
<banisterfiend>
apeiros lol i mean the message queue
<apeiros>
aha!
<apeiros>
in that case, no
<bougyman>
banisterfiend: yes, used it a bunch
<apeiros>
do you have to kafka.wait_for_godot there too?
<banisterfiend>
bougyman awesome! you're my homie then
<banisterfiend>
bougyman can i have two consumers belong to the same consumer group but subscribed to different topics?
<apeiros>
and: hi banisterfiend, long time no see :D
<banisterfiend>
i'm getting mad errors when i try that
<banisterfiend>
apeiros ya :( RL etc...
<bougyman>
banisterfiend: I don't think so. consumer groups pull different partitions from the same topic.
DoubleMalt has quit [Ping timeout: 265 seconds]
<bougyman>
banisterfiend: which version of kafka?
jphase-afk is now known as jphase
<banisterfiend>
bougyman yeah i thought so, but you can setup a consumer to read from multiple topics
<bougyman>
last we were on was 0.8x
<bougyman>
banisterfiend: you can, but we didn't (read from multiple topics)
<bougyman>
we had tons of busy partitions, each worker concentrated on only one partition of one topic.
<banisterfiend>
bougyman we're on 0.9 i think with the new consumer API
nando293921 has joined #ruby
<Dysp>
apeiros: That's fair. I will return shortly :D
<bougyman>
banisterfiend: so things may have changed, though ours was a capacity/performance requirement.
<bougyman>
banisterfiend: word to the wise: always have a replay method available.
<bougyman>
at least with 0.7/0.8, we had to wipe and replay partitions probably 1x/month
<banisterfiend>
bougyman it's so trivially easy to get a consumer to subscribe to multiple topics, u can even use a regex as a topic, so i'd have expected there to be more direction in the API to prevent from having two consumers in the same group subscribing to different topics
<bougyman>
this was billions of messages/day, though.
<bougyman>
The Producer API is currently beta level and used in production. There's an alpha level Consumer Group API that has not yet been used in production and that may change without warning. Feel free to try it out but don't expect it to be stable or correct quite yet.
<colept>
Howdy! I'm making a Gem and wondering how do I add a submodule to a module (from another gem)?
AlexRussia has joined #ruby
aegis3121 has quit [Ping timeout: 240 seconds]
<colept>
I've tried `/lib/existing_module.rb` with the submodule in it but nothing
<chrisseaton>
colept: I'm not totally sure what you are trying to do, but you can just write module ExistingModule; module MySubModule; end; end to create a submodule to an existing module from another gem
<colept>
Yeah I tried that, however only ExistingModule will load
sai_ has quit [Read error: Connection reset by peer]
7GHAAC3YG has joined #ruby
32NAB2183 has joined #ruby
sai_ has joined #ruby
<colept>
I have to manually require 'existingmodule/mysubmodule'
<colept>
where as 'existingmodule' is autoloaded by rails
gizless has joined #ruby
<colept>
(this may be a rails-specific problem)
<colept>
Should I ask there instead?
<chrisseaton>
Yeah sounds like it
ramortegui has joined #ruby
<colept>
okie doke thanks!
<chrisseaton>
Your question isn't totally clear to me - you might get a better response if you word it differently
chouhoulis has joined #ruby
<chrisseaton>
For example I don't know what submodules have to do with requiring things, or why it matters what gem the module is in
gizmore has quit [Ping timeout: 272 seconds]
7GHAAC3YG is now known as despai
32NAB2183 has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Alina-malina is now known as Samsepiol
Samsepiol is now known as Alina-malina
chouhoulis has quit [Ping timeout: 272 seconds]
tyang_ has joined #ruby
<apeiros>
colept: the proper term is "nested module"
<apeiros>
colept: and rails only autoloads /app, not /lib
<apeiros>
but yeah, #rubyonrails
<colept>
To clarify, Im building a gem
ramfjord has joined #ruby
<apeiros>
yes, read that :)
<colept>
Yeah I see that
blackmesa has joined #ruby
platzhirsch has quit [Quit: WeeChat 1.4]
<colept>
Im trying to extend `graphql-ruby`
<colept>
which AFAIK has no rails integration
<colept>
And it's autoloaded
<apeiros>
then it won't be autoloaded by rails either, unless you explicitly told it to.
Biciato has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
<colept>
Weird, it is being autoloaded
JoshS has quit [Quit: Leaving]
<apeiros>
that means you somewhere tell it to
<apeiros>
or you're using a reeeeally ancient version of rails (iirc. 2.x autoloaded everything)
tomphp has joined #ruby
<colept>
hmmm
Rodya_ has joined #ruby
pragmaticus has quit [Ping timeout: 264 seconds]
kerframil has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<colept>
Using Rails 5 and `graphql-ruby` is required by Bundler
<colept>
I don't think #RubyOnRails is helpful when it comes to publishing gems
<colept>
that may be a quick observation tho
Rodya_ has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<colept>
Ill keep looking, thanks tho!
redpants has joined #ruby
<apeiros>
you mean you have a `require` in your gemfile?
Devalo has quit [Remote host closed the connection]
yasu has quit [Ping timeout: 250 seconds]
stamina has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
<colept>
@aperios yes
<apeiros>
though, I'm not even sure. might even be that rails requires all in the Gemfile unless explicitly having a require: false
elenatanasoiu has quit [Ping timeout: 264 seconds]
<colept>
I think the issue is in my gem itself
<apeiros>
colept: well, if you have a *require*, then there's no autoloading anyway :-p
nofxx has joined #ruby
Ananthu has quit [Quit: Connection closed for inactivity]
<colept>
yeah
<colept>
I think my Gem is being loaded, I just think I monkey patched the other gem incorrectly
SteenJobs has quit [Quit: SteenJobs]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
you don't have to guess. this is programming. you can verify.
<colept>
That is the goal
GodFather has joined #ruby
tdy has joined #ruby
zipace has quit [Disconnected by services]
ziprar has joined #ruby
banisterfiend has joined #ruby
dionysus69 has joined #ruby
Devalo has quit [Ping timeout: 255 seconds]
elenatanasoiu has joined #ruby
SteenJobs has joined #ruby
aegis3121 has joined #ruby
miqlas-H has joined #ruby
chouhoulis has joined #ruby
diamonds has joined #ruby
<diamonds>
Newb here apologies in advance if my question is OT
Mark-6ma has joined #ruby
<diamonds>
attempting to run Jekyll locally (someone elses project), I keep getting in this loop of "gem missing" "run bundle install" "gem missing" "run bundle install"
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<diamonds>
having got past the "gem missing" "run bundle install" "gem missing" "run bundle install" "gem missing" "run bundle install" "gem missing" "run bundle install" issue (for now) I'm now wrestling with nokogiri
tomphp has quit [Client Quit]
<dyjakan>
weird, i'm still on el capitan but i was rolling jekyll site circa 3 days ago
<diamonds>
nothing I do seems to get it to install :/ I'm trying all the suggestions but it's outside my normal domain so I don't really know what I'm doing
banisterfiend has quit [Client Quit]
<dyjakan>
no problems at all
<diamonds>
dyjakan, can I borrow your computer to work on?
<dyjakan>
i'm using rbenv and up-to-date ruby system wide
qba73 has joined #ruby
<dyjakan>
2.3.1
Devalo has quit [Remote host closed the connection]
<baweaver>
How much do you know about case statements?
<strongcode>
I feel like I'm being baited into a Dunning-Kruger admission....
dmtd has joined #ruby
<baweaver>
Moreover I don't want to give you an exhaustive explain if you already know the basics of how they work
<strongcode>
i believe they are merely syntactic sugar around if/else statments
jenrzzz has quit [Ping timeout: 248 seconds]
<baweaver>
Not quite, just a sec.
<baweaver>
So a case statement actually uses === for comparing things
<baweaver>
=== happens to be overwritten for certain classes
<dmtd>
Hi all, new at ruby. Trying to run a gem, and getting unkown command after already doing the gem install on the gem name. this is the project https://github.com/warwickshire/saml_tools
<baweaver>
you just call `saml_tools` if it has a bin component
<baweaver>
or include it in your script with `require`
rodfersou has quit [Quit: leaving]
<baweaver>
in this case you need `require`
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dmtd>
baweaver: so my ruby knowledge is minimal - to run a ruby file, do I need a script? or can I call it with arguments? how exactly does the running part work? is it like php where it needs to be run as part of a webpage or something?
ledestin has joined #ruby
<baweaver>
though I have a feeling you'll be far less frustrated with this if you read through a ruby book
<baweaver>
Then I would definitely recommend reading through a Ruby book to get started
<baweaver>
most of this will be covered early on in more detail than you'd likely get here.
aarkerio has quit [Quit: Leaving]
last_staff has quit [Quit: last_staff]
Vile` has joined #ruby
<baweaver>
Consider: Programming Ruby, The Well Grounded Rubyist, Eloquent Ruby, The Ruby Way
elastix has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
<strongcode>
dmtd a basic ruby script would be a `filename.rb` file (note .rb extension) containing your code. It can be run with `ruby filename.rb`
loinclot_ has quit []
erlingur has quit [Ping timeout: 265 seconds]
<strongcode>
however to use external gems, you need to install them with `gem install gemname`
banisterfiend has joined #ruby
<strongcode>
then, require it inside your script file with `require gemname` at the top
<strongcode>
I agree with baweaver though, a quick 30 minute primer on ruby and ruby gems would suffice
<baweaver>
make sure gemname is in quotes
<strongcode>
oops, good catch
despai has quit [Quit: This computer has gone to sleep]
LoneHerm_ has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 272 seconds]
<strongcode>
w/ 6
hulk_smash has quit [Quit: GONE]
erlingur has joined #ruby
<_sfiguser>
how are the "%q" and "%w" called ? and are there mnemonics associated ? how can i remember them ?
<_sfiguser>
which is the fastest way to sum up all the values in an array ?
symm- has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
symm- has quit [Client Quit]
<baweaver>
_sfiguser: You might want to have a read through Eloquent Ruby
hutch34_ has quit [Ping timeout: 272 seconds]
<_sfiguser>
baweaver, any idea ?
<baweaver>
I know the answer, yes
<baweaver>
but
<baweaver>
you've been asking quite a few basic questions that are very quickly answered through either a search of google or reading a solid book on Ruby
<baweaver>
and I'd be doing you no favors by answering all of them
<_sfiguser>
baweaver, i'm actually reading Beginning Ruby, half of the book
<baweaver>
What have you tried so far?
miqlas-H has joined #ruby
<_sfiguser>
baweaver, i at the end used inject :)
<_sfiguser>
baweaver, i started today with ruby ! It is fantastic!!! Icome from perl
<baweaver>
I tend to use reduce myself, but that's just an alias.
<baweaver>
looks like most *nix docs mention an n flag too
<NGCS>
I have included my code, and the test I'm struggling with. If anyone can help me make sesne of it?
<_sfiguser>
what's the difference between a constant defined with "$my_const" and a constant defined with "My_Constant" ?
crdpink has quit [Remote host closed the connection]
<_sfiguser>
i mean are those two equal ways of defining constants
<baweaver>
no
<pontiki>
the first is not a constant
<baweaver>
one is a global variable
SteenJobs has joined #ruby
<pontiki>
^
<_sfiguser>
ahh ok ok
<_sfiguser>
mistook sorry7
<baweaver>
NGCS: what problem are you having specifically
<baweaver>
pontiki: leaving in ~5 minutes so might need you to take over on that one :P
<baweaver>
meetings :(
cdg has quit [Ping timeout: 265 seconds]
<pontiki>
seeya!
crdpink has joined #ruby
<pontiki>
oh, not for fun, then
<NGCS>
baweaver: I don't understand how this very last evaluation is supposed to come to the result it gives.
<baweaver>
ha, I wish
cdg_ has quit [Ping timeout: 255 seconds]
<baweaver>
you're making that pretty complicated
<baweaver>
RPN can be solved in one line if you're not looking for errors.
<baweaver>
did the teacher state that you need to catch them?
<NGCS>
Do you think so? I'm trying to get into a coding bootcamp, and this is one of the required assignments for me..
<NGCS>
Everything here has been self taught, so I am probably doing a lot of stuff stupidly.
Ebok has joined #ruby
rcvalle has quit [Quit: rcvalle]
ponga has joined #ruby
<pontiki>
is the test passing or failing
<baweaver>
if you're still at it whenever I get back, I'll go through it.
<Nilium>
Neither. It's just saying it doesn't "feel like it right now, buddy"
<NGCS>
It's failing. I'll keep at it..
SteenJobs has quit [Quit: SteenJobs]
Moosashi has joined #ruby
Moosashi has quit [Client Quit]
UserOO7 has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
NGCS: what value is it giving?
<NGCS>
21
jphase has joined #ruby
bjh13 has quit [Remote host closed the connection]
miqlas-H has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
<pontiki>
alright, i'm going to suggest you drop byebug in evaluate's while loop and check to see what's actually happinging inside it. this is going to give you greatest insight for debugging
miqlas-H has joined #ruby
xemehc has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
Devalo has joined #ruby
getxsick has joined #ruby
hopsoft has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tdy has joined #ruby
<getxsick>
i might be blind but...i can't find a ruby doc for Test::Unit for the 2.3.1
<getxsick>
where can i find it?
ctp has joined #ruby
solocshaw has joined #ruby
t3rax has joined #ruby
Devalo has quit [Ping timeout: 255 seconds]
Gar-Bob has joined #ruby
Rodya_ has quit [Remote host closed the connection]