jhass changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
pawnbox has joined #ruby
pickandmix has quit [Quit: WeeChat 1.5]
macsteps has joined #ruby
nando293921 has quit [Ping timeout: 264 seconds]
LoneHerm_ has joined #ruby
<leea> have you tried using a puts
pawnbox has quit [Ping timeout: 244 seconds]
<rain1> where
<leea> wherever you think it might be in an infinite loop
<rain1> but thats the thing i dont' know
<leea> can you post a gist of your code?
<rain1> no its 30,000 lines long
pickandmix has joined #ruby
<leea> you can try using pry and putting binding.pry statements throughout your code
<pickandmix> Anyone can help with rvm weechat issue?
<pickandmix> I can't seem to install any ruby version with rvm due to some weechat problem?
macsteps has quit [Ping timeout: 240 seconds]
jottr has quit [Quit: WeeChat 1.5]
ecnalyr has joined #ruby
<soLucien> how can i get all methods of a object ?
LoneHerm_ has quit [Ping timeout: 244 seconds]
<agent_white> soLucien: Pass it methods? "obj.methods"
<soLucien> ok i did that .. still not working properly .. here's a gist of what i'm doing. I want the function to return this string. In the future, i want the return value to change, but for now this is the mocked output https://gist.github.com/s0lucien/37dc48463393359cd0ff3dd3487f5870
<soLucien> ok i got what i was doing wrong
<soLucien> was calling :hyperv_switches
spudowiar has joined #ruby
<soLucien> instead of hyperv_switches to get the value
<agent_white> obj.send(:hyperv_switches) would be a valid way to call it via a symbol.
JeanCarloMachado has quit [Ping timeout: 264 seconds]
davedev24 has joined #ruby
<al2o3-cr> just call hyperv_switches simply
nankyokusei has joined #ruby
cdg has joined #ruby
qguv has joined #ruby
douglascorrea has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
saneax is now known as saneax_AFK
JeanCarloMachado has joined #ruby
Guest92294 has quit [Quit: Leaving]
nankyokusei has quit [Ping timeout: 244 seconds]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullfxn has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
helllojesus12 has joined #ruby
<helllojesus12> Hello, I was hoping someone could help me with an installation of ripper. The error I get is No rule to make target /parse.y needed by ripper.y. Stop.
<helllojesus12> whoami
pawnbox has joined #ruby
qguv has quit [Quit: bye]
qguv has joined #ruby
Vingador has joined #ruby
yfeldblum has joined #ruby
rubie has joined #ruby
Rodya_ has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 252 seconds]
tubuliferous has joined #ruby
rodfersou has joined #ruby
killerkamel has quit [Ping timeout: 250 seconds]
qguv has quit [Quit: bye]
Rodya_ has joined #ruby
pawnbox has joined #ruby
<pickandmix> Anyone can help with rvm? :/
hahuang61 has joined #ruby
rodfersou has quit [Quit: leaving]
Rodya_ has quit [Ping timeout: 250 seconds]
A_Drone has joined #ruby
mfb2 has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
hahuang61 has quit [Ping timeout: 260 seconds]
rain1 has left #ruby ["Leaving"]
byteflame has quit [Ping timeout: 244 seconds]
Derperperd has quit [Quit: Derperperd]
araujo__ has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
houhoulis has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
araujo_ has quit [Ping timeout: 276 seconds]
houhoulis has joined #ruby
Rodya_ has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
pickandmix has quit [Quit: WeeChat 1.5]
slash_me has joined #ruby
pickandmix has joined #ruby
pickandmix has quit [Client Quit]
pickandmix has joined #ruby
<pickandmix> Anyone can help out on RVM make j issues?
vinleod has joined #ruby
vdamewood has quit [Ping timeout: 264 seconds]
synaps3 has quit [Quit: Connection closed for inactivity]
<slash_me> Hey, I'm looking for some help using Newton#nlsolve ... I can't quite figure out how to use it. My code is here: https://gist.github.com/rthbound/65e17675dc95d3a6d25fc254ce215265
freerobby has quit [Quit: Leaving.]
cdg has quit [Remote host closed the connection]
helllojesus12 has quit [Ping timeout: 264 seconds]
vinleod is now known as vdamewood
hipertracker has quit [Quit: hipertracker]
freerobby has joined #ruby
pawnbox has joined #ruby
A_Drone has quit [Remote host closed the connection]
LoneHermit has joined #ruby
karapetyan has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
ekinmur has joined #ruby
mburns_ has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 276 seconds]
mburns has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
freerobby has quit [Quit: Leaving.]
pickandmix has quit [Quit: WeeChat 1.5]
vdamewood has quit [Ping timeout: 244 seconds]
agent_white has quit [Quit: brb sec]
Meeh has quit [Read error: Connection reset by peer]
pickandmix has joined #ruby
helllojesus12 has joined #ruby
Meeh has joined #ruby
ponga has quit []
killerkamel has joined #ruby
cyphase has quit [Ping timeout: 258 seconds]
pickandmix has quit [Quit: WeeChat 1.5]
pawnbox has joined #ruby
cyphase has joined #ruby
slash_me has quit [Ping timeout: 258 seconds]
max1 has joined #ruby
max1 has quit [Client Quit]
pawnbox has quit [Ping timeout: 244 seconds]
pickandmix has joined #ruby
RegulationD has joined #ruby
saneax_AFK is now known as saneax
RegulationD has quit [Ping timeout: 240 seconds]
roflmyeggo has joined #ruby
slash_me has joined #ruby
elifoster has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
mfb2 has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
howdoi has quit [Quit: Connection closed for inactivity]
hahuang61 has joined #ruby
Guest34914 has quit [Ping timeout: 260 seconds]
zacts has quit [Quit: WeeChat 1.4]
mfb2 has quit [Ping timeout: 244 seconds]
A_Drone has joined #ruby
MarkBilk has quit [Ping timeout: 250 seconds]
Guest34914 has joined #ruby
A_Drone has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 250 seconds]
Axy has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 258 seconds]
Ropeney has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
Rodya_ has quit [Remote host closed the connection]
ecnalyr has quit [Remote host closed the connection]
helpa has quit [Remote host closed the connection]
Radar has quit [Quit: ZNC - http://znc.in]
c355e3b has quit [Quit: Connection closed for inactivity]
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
<pickandmix> guys how to use zsh with rvm?
<pickandmix> the commands are all bash -s
<pickandmix> zsh -s doesn't seem to work
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
<slash_me> Got it I think (wrt nlsolve)
jaguarma_ has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
nankyokusei has joined #ruby
A_Drone has joined #ruby
diegoviola has quit [Ping timeout: 250 seconds]
tmtwd has joined #ruby
syndikate has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
rubie has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 250 seconds]
matp has joined #ruby
benlieb has joined #ruby
jaguarmagenta has joined #ruby
pickandmix has quit [Quit: WeeChat 1.5]
jaguarma_ has quit [Ping timeout: 264 seconds]
allcentury has quit [Ping timeout: 240 seconds]
helllojesus12 has quit [Ping timeout: 258 seconds]
helllojesus12 has joined #ruby
Derperperd has joined #ruby
saneax is now known as saneax_AFK
Hopz has joined #ruby
benlieb has quit [Quit: benlieb]
Nanuq has quit [Quit: .]
Vingador has quit [Ping timeout: 252 seconds]
houhoulis has quit [Remote host closed the connection]
Hopz has quit []
mfb2 has joined #ruby
davedev24 has joined #ruby
davedev24 has quit [Client Quit]
pickandmix has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mfb2 has quit [Ping timeout: 276 seconds]
A_Drone has quit [Ping timeout: 244 seconds]
KnownSyntax has quit [Quit: Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is]
Phanes has quit [Quit: ...shout as you did in rome...]
Phanes has joined #ruby
Phanes has quit [Changing host]
Phanes has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
Channel6 has joined #ruby
slash_me has quit [Ping timeout: 264 seconds]
A_Drone has joined #ruby
CrazyEddy has quit [Ping timeout: 250 seconds]
slash_me has joined #ruby
saneax_AFK is now known as saneax
ec0 has quit [Ping timeout: 258 seconds]
braincras has quit [Quit: bye bye]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A_Drone has quit [Remote host closed the connection]
Nanuq has joined #ruby
A_Drone has joined #ruby
karapetyan has joined #ruby
slash_me has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 250 seconds]
Devalo has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
Limix has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
braincrash has joined #ruby
alfiemax has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
Limix has quit [Quit: Limix]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Radar has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Client Quit]
rubie has joined #ruby
pickandmix has quit [Quit: WeeChat 1.5]
RegulationD has joined #ruby
Rickmasta has joined #ruby
slash_me has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
Spami has joined #ruby
saneax is now known as saneax_AFK
cibs has quit [Quit: leaving]
bkxd has joined #ruby
jishankai has joined #ruby
Rickmasta has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
Rickmasta has joined #ruby
MadGrin has joined #ruby
ecnalyr has joined #ruby
MadGrin has quit [Client Quit]
jaguarmagenta has quit [Ping timeout: 250 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 244 seconds]
alfiemax has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
hahuang61 has joined #ruby
ecnalyr has quit [Ping timeout: 258 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 258 seconds]
craigp has quit [Ping timeout: 252 seconds]
gix has quit [Ping timeout: 276 seconds]
slash_me has quit [Ping timeout: 244 seconds]
gix has joined #ruby
slash_me has joined #ruby
jaguarmagenta has joined #ruby
Skelz0r has joined #ruby
JesseH has joined #ruby
A_Drone has quit [Remote host closed the connection]
Channel6 has quit [Ping timeout: 249 seconds]
enterprisey has joined #ruby
svkurowski has quit [Remote host closed the connection]
svkurowski has joined #ruby
<soLucien> if switchToFind is 'autodetect' or 'autocreate'
<soLucien> how do i write this in ruby ?
aryaching has quit [Ping timeout: 258 seconds]
<soLucien> i created an array and used include?
Channel6 has joined #ruby
jidar has quit [Quit: brb]
nankyokusei has joined #ruby
arescorpio has joined #ruby
jidar has joined #ruby
grenierm has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 250 seconds]
rubie has quit [Remote host closed the connection]
Azure has joined #ruby
Yacker has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has joined #ruby
Yacker has joined #ruby
Yacker has quit [Client Quit]
mfb2 has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
rubie_ has joined #ruby
Cyrus has joined #ruby
rubie has quit [Ping timeout: 252 seconds]
jaguarmagenta has joined #ruby
mfb2 has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
Limix has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
LoneHermit has quit [Remote host closed the connection]
Apocalypse has quit [Quit: Input/Output Error]
slash_me has quit [Ping timeout: 240 seconds]
nerdinstalling has joined #ruby
Limix has quit [Client Quit]
agent_white has joined #ruby
johnmilton has quit [Ping timeout: 244 seconds]
p1k has quit [Ping timeout: 244 seconds]
p1k has joined #ruby
bkxd has joined #ruby
jaguarma_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
alfiemax has joined #ruby
pawnbox has joined #ruby
jaguarma_ has quit [Ping timeout: 240 seconds]
BTRE has quit [Ping timeout: 258 seconds]
roflmyeggo has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 276 seconds]
roflmyeggo has joined #ruby
johnmilton has joined #ruby
svkurowski has quit [Read error: Connection reset by peer]
nerdinstalling has quit [Quit: Page closed]
karapetyan has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
ensyde has quit [Ping timeout: 258 seconds]
svkurowski has joined #ruby
jottr has joined #ruby
jottr has quit [Client Quit]
karapetyan has quit [Ping timeout: 244 seconds]
BTRE has joined #ruby
govg has joined #ruby
Guest34914 has quit [Read error: Connection reset by peer]
Guest34914 has joined #ruby
Channel6 has quit [Quit: Leaving]
craigp has joined #ruby
jaguarmagenta has quit [Read error: Connection timed out]
astrobun_ has joined #ruby
jaguarmagenta has joined #ruby
VA3VNA has quit [Remote host closed the connection]
roflmyeggo has quit [Ping timeout: 265 seconds]
jetpack_joe has joined #ruby
anon5724 has joined #ruby
Devalo has joined #ruby
houhoulis has joined #ruby
pawnbox has joined #ruby
tmtwd has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
arescorpio has quit [Quit: Leaving.]
Spami has joined #ruby
anon5724 has quit [Read error: Connection reset by peer]
jaguarma_ has joined #ruby
Spami has quit [Remote host closed the connection]
A_Drone has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
lizard2010 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
A_Drone has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
enterprisey has quit [Ping timeout: 250 seconds]
howdoi has joined #ruby
jaguarmagenta has joined #ruby
A_Drone has joined #ruby
Mia has joined #ruby
pawnbox has joined #ruby
Nanuq has quit [Quit: leaving]
jaguarma_ has quit [Ping timeout: 244 seconds]
skade has joined #ruby
LoneHermit has joined #ruby
Nanuq has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
jaguarmagenta has joined #ruby
rubie_ has quit [Remote host closed the connection]
jaguarmagenta has quit [Remote host closed the connection]
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
Devalo has quit [Ping timeout: 264 seconds]
tomchapin has joined #ruby
A_Drone has quit [Remote host closed the connection]
byteflame has joined #ruby
max1 has joined #ruby
jaguarmagenta has joined #ruby
pawnbox has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 244 seconds]
Macaveli has joined #ruby
max1 has quit [Client Quit]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
RegulationD has joined #ruby
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
ta_ has joined #ruby
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jaguarmagenta has quit [Ping timeout: 260 seconds]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
tubuliferous has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
hk238 has joined #ruby
raeoks has joined #ruby
nando293921 has joined #ruby
tmtwd has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
mradmacher has joined #ruby
dminuoso has joined #ruby
bkxd has joined #ruby
pawnbox has quit [Remote host closed the connection]
svkurowski has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
svkurowski has joined #ruby
dminuoso has quit [Client Quit]
dminuoso has joined #ruby
A_Drone has joined #ruby
DoctorMonocular has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
<DoctorMonocular> hey everyone
hahuang61 has joined #ruby
pawnbox has quit [Remote host closed the connection]
MrBusiness has joined #ruby
jishankai has quit [Ping timeout: 260 seconds]
hahuang61 has quit [Ping timeout: 260 seconds]
cfec0b8d has joined #ruby
minotep has joined #ruby
last_staff has joined #ruby
nhhc has quit [Remote host closed the connection]
max1 has joined #ruby
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
skade has quit [Quit: Computer has gone to sleep.]
jetpack_joe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has quit [Remote host closed the connection]
der-landgraf has joined #ruby
der-landgraf has quit [Changing host]
der-landgraf has joined #ruby
alfiemax has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
aryaching_ has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
aufi has joined #ruby
max1 has quit [Quit: WeeChat 1.4]
max1 has joined #ruby
alfiemax has joined #ruby
nankyokusei has joined #ruby
max1 is now known as PickAndMix
Dimik has joined #ruby
PickAndMix has quit [Quit: WeeChat 1.4]
dminuoso has quit [Ping timeout: 264 seconds]
max1 has joined #ruby
dminuoso has joined #ruby
max1 has quit [Client Quit]
max1 has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
max1 has quit [Client Quit]
pawnbox_ has joined #ruby
rubie has joined #ruby
firstdayonthejob has joined #ruby
govg has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
max1 has joined #ruby
existensil has quit [Quit: WeeChat 0.4.2]
spudowiar has quit [Quit: usbmon f*cked up, gotta reboot]
<soLucien> is there a cleaner alternative to https://gist.github.com/s0lucien/998426bfe2bc8265a5fcfd4142b68e93 ?
<soLucien> where auto_internal and auto_external are functions
max1 is now known as PickAndMix
rubie has quit [Ping timeout: 252 seconds]
spudowiar has joined #ruby
<dminuoso> soLucien: They are called methods, and yes, use Object#send
<dminuoso> &ri Object#sen
<`derpy> No results
<dminuoso> &ri Object#send
existensil has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
syndikate has quit [Quit: Leaving]
<dminuoso> soLucien: Point of interest, that smalltalk like "send" is how all methods in Ruby are called.
[dmp] has joined #ruby
yardenbar has joined #ruby
<soLucien> how would the code look instead ?
<soLucien> self.send ?
<soLucien> i don't have access to the instance of k , as in the example
firstdayonthejob has quit [Ping timeout: 264 seconds]
<soLucien> to_sym ?
<dminuoso> soLucien: send requires a symbol.
PickAndMix has quit [Quit: WeeChat 1.4]
<dminuoso> actually, you can pass a string too.
<dminuoso> So drop the .to_sym
<soLucien> symbol = pointer to the method ?
DoubleMalt has joined #ruby
<dminuoso> A symbol is almost, but not quite, entirely unlike strings.
<dminuoso> It's basically just a number with a string-like representation.
<dminuoso> At any rate, remove the .to_sym - I did not realize it was unnecessary.
<dminuoso> (send will automatically convert strings to symbols)
colegatron_origi has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
max1 has joined #ruby
mark_66 has joined #ruby
colegatron_origi has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
CrazyEddy has joined #ruby
max1 is now known as PickAndMix
kavanagh has joined #ruby
bkxd has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
dminuoso has quit [Remote host closed the connection]
A_Drone has quit [Read error: Connection reset by peer]
spudowiar has quit [Quit: Leaving.]
aryaching_ has quit [Ping timeout: 250 seconds]
haxrbyte has joined #ruby
A_Drone has joined #ruby
nando293921 has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 250 seconds]
yeticry has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
tmtwd has joined #ruby
ecnalyr has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
jaruga____ has quit [Client Quit]
karapetyan has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
PickAndMix has quit [Quit: WeeChat 1.4]
ecnalyr has quit [Ping timeout: 264 seconds]
<soLucien> dminuoso doesn't work
byteflame has quit [Ping timeout: 240 seconds]
<soLucien> tried both to_sym and without
<soLucien> it cannot find the method
yeticry has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
LoneHermit has quit [Remote host closed the connection]
djbkd_ has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<soLucien> i guess i'll stick to the switch-case
max1 has joined #ruby
max1 has quit [Client Quit]
<soLucien> send makes it way less comprehensible
jondot has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
aganov has joined #ruby
haxrbyte has quit [Quit: Leaving...]
nertzy has quit [Ping timeout: 244 seconds]
Macaveli has quit [Ping timeout: 240 seconds]
blaxter has joined #ruby
pmyjavec has joined #ruby
dminuoso has joined #ruby
bigkevmcd has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
<soLucien> i want to get a path relative to the gem root
<soLucien> how do i do that ?
bigkevmcd has joined #ruby
<dminuoso> soLucien: Where is the method defined on?
karapetyan has joined #ruby
jondot has quit [Quit: Leaving.]
<soLucien> /lib/gemname/action/my_action.rb
<soLucien> i actually want to get the absolute path to /lib/gemname/driver
<dminuoso> soLucien: I meant regarding your previous problem.
<soLucien> oh .. here's the full file ..
andikr has joined #ruby
jaruga____ has quit [Ping timeout: 276 seconds]
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soLucien> line 36 is where it is
<soLucien> i'll leave it as it is
jaruga___ has joined #ruby
jishankai has joined #ruby
jaruga___ is now known as jaruga____
karapetyan has quit [Ping timeout: 244 seconds]
bocaneri has joined #ruby
<soLucien> now what i need is the absolute path to the gem root
djbkd_ has quit [Remote host closed the connection]
douglascorrea has quit [Remote host closed the connection]
ta_ has joined #ruby
<dminuoso> soLucien: https://eval.in/615008 -- just to demonstrate how it works.
haxrbyte has joined #ruby
<soLucien> i have used send, and i realized the code became very hard to comprehend
<dminuoso> soLucien: It is much easier to comprehend than what you are doing.
<dminuoso> It is also very explicit about what you are doing.
hahuang61 has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
<dminuoso> soLucien: At any rate, send has a flaw though - using it in this manner requires care - as if the method is based on user input, it can give a user direct control over methods being controlled.
framling has joined #ruby
jishankai has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
max1 has joined #ruby
Hyuk has joined #ruby
tmtwd has quit [Ping timeout: 258 seconds]
yeticry has quit [Ping timeout: 264 seconds]
pmyjavec has joined #ruby
yeticry has joined #ruby
jaguarmagenta has joined #ruby
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DoctorMonocular has quit [Remote host closed the connection]
craysiii has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
hipertracker has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ruby
xall has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
Bish has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 240 seconds]
pawnbox_ has quit [Ping timeout: 276 seconds]
kavanagh has quit [Quit: That's all folks!]
ur5us has quit [Remote host closed the connection]
Silthias has joined #ruby
A_Drone_ has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
antgel has joined #ruby
cibs has joined #ruby
pawnbox has quit [Remote host closed the connection]
UserInNeed has quit [Changing host]
UserInNeed has joined #ruby
A_Drone_ has quit [Remote host closed the connection]
Guest34914 has quit [Ping timeout: 258 seconds]
jondot has joined #ruby
teclator has joined #ruby
spectrum has quit [Ping timeout: 258 seconds]
kedare has joined #ruby
teclator has quit [Client Quit]
teclator has joined #ruby
jondot has quit [Client Quit]
mrgrieves has joined #ruby
naftilos76 has joined #ruby
xall has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
elaptics`away is now known as elaptics
sami has joined #ruby
bluOxigen has quit [Ping timeout: 258 seconds]
M4dH4TT3r has joined #ruby
xall has quit [Ping timeout: 250 seconds]
M4dH4TT3r is now known as Guest51709
BTRE has joined #ruby
bluOxigen has joined #ruby
bkxd has joined #ruby
pmyjavec has joined #ruby
douglascorrea has joined #ruby
ddffg has joined #ruby
tvw has joined #ruby
vondruch has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 260 seconds]
douglascorrea has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
tvw has quit [Client Quit]
kavanagh has joined #ruby
xall has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
pawnbox has joined #ruby
skade has quit [Client Quit]
xall has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
pandaant has joined #ruby
Snowy has joined #ruby
Guest51709 has quit [Ping timeout: 252 seconds]
saneax_AFK is now known as saneax
Dimik has quit [Ping timeout: 276 seconds]
max1 is now known as PickAndMix
joonty has joined #ruby
Guest51709 has joined #ruby
ec0 has joined #ruby
A_Drone has joined #ruby
marr has joined #ruby
jondot has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
yardenbar has quit [Ping timeout: 258 seconds]
xall has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
govg has joined #ruby
vdamewood has joined #ruby
aupadhye has joined #ruby
xall has quit [Ping timeout: 276 seconds]
yardenbar has joined #ruby
Billias has quit [Ping timeout: 276 seconds]
nadir has quit [Quit: Connection closed for inactivity]
Sashimi has joined #ruby
binaryplease1 has joined #ruby
antgel has quit [Ping timeout: 276 seconds]
araujo__ has quit [Quit: Leaving]
binaryplease has quit [Ping timeout: 265 seconds]
antgel has joined #ruby
pawnbox_ has joined #ruby
xall has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
dhollinger has quit [Ping timeout: 264 seconds]
karapety_ has joined #ruby
binaryplease1 is now known as binaryplease
dhollinger has joined #ruby
Chair has joined #ruby
xall has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
houhoulis has quit [Remote host closed the connection]
jishankai has joined #ruby
fergal has joined #ruby
jondot has quit [Quit: Leaving.]
astrobun_ has quit [Remote host closed the connection]
Macaveli has quit [Ping timeout: 250 seconds]
astrobun_ has joined #ruby
<fergal> hi guys, currently i have `res = @myobj.some_check? arg1, arg2 if @myobj`, so i’m calling some_check? if myobj isn’t nil. is there a nice way of returning false to res if myobj is nil?
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> fergal: first, use .nil? if you want to check against nil specifically, otherwise it will just check if its truthy.
<dminuoso> fergal: second, use "unless" to negate the if.
<dminuoso> fergal: Also, since Ruby 2.3 you can use the safe navigation operator instead:
<dminuoso> >> nil&.method
<ruby[bot]> dminuoso: # => nil (https://eval.in/615098)
<dminuoso> (Which will only send the method name if the receiver is not nil)
<dminuoso> So for your case: @myobj&.some_check?(arg1, arg1)
astrobun_ has quit [Remote host closed the connection]
<fergal> dminuoso: unfortunately we aren’t allowed to use 2.3, but that’s cool!
<dminuoso> fergal: Are you using Rails by any chance?
Vingador has joined #ruby
jobat has joined #ruby
<fergal> nope
hipertracker has quit [Quit: hipertracker]
<dminuoso> fergal: You could reimplement Object#try if you use this a lot.
blaxter has quit [Ping timeout: 265 seconds]
<dminuoso> It's the pre-2.3 solution to the problem, where you simply do: receiver.try(:method, arg)
<dminuoso> (It's trivial to implement this)
Macaveli has joined #ruby
spider-mario has joined #ruby
<fergal> dminuoso: i’m very much a ruby noob, so all this syntax is very new to me, are there any ruby learning resources geared towards people who already know java/c++?
elaptics is now known as elaptics`away
haxrbyte has quit [Ping timeout: 264 seconds]
<dminuoso> I'll pass that question on to others. Not an expert on Ruby books beyond those that detail its internals.
toretore has joined #ruby
<dminuoso> fergal: Is a really simple implementation of .try/.try!
elaptics`away is now known as elaptics
MarkBilk has joined #ruby
hahuang61 has joined #ruby
hipertracker has joined #ruby
gregf1 has joined #ruby
hahuang61 has quit [Ping timeout: 276 seconds]
gregf has quit [Ping timeout: 258 seconds]
minotep has quit [Ping timeout: 276 seconds]
xall has joined #ruby
aupadhye has quit [Quit: Leaving]
duncannz has joined #ruby
glcx has joined #ruby
glcx has quit [Changing host]
glcx has joined #ruby
djellemah has joined #ruby
xall has quit [Ping timeout: 258 seconds]
syndikate has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
blaxter has joined #ruby
Gasher has joined #ruby
RegulationD has joined #ruby
<dminuoso> https://eval.in/615127 - Is this syntax error for real?
<dminuoso> Although, it chokes on empty lines too. Nevermind.
karapety_ has quit [Ping timeout: 244 seconds]
mradmacher has quit [Ping timeout: 265 seconds]
RegulationD has quit [Ping timeout: 258 seconds]
Vingador has quit [Ping timeout: 244 seconds]
govg has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
xall has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
anisha has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
Derperperd has quit [Quit: Derperperd]
karapetyan has joined #ruby
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
xall has quit [Ping timeout: 258 seconds]
HelloNoob has joined #ruby
karapety_ has quit [Read error: Connection reset by peer]
<HelloNoob> Hello friends. Can anyone help with File.open and f.each_line statement to remove UTF 8 error
zeroDi has joined #ruby
anon426 has joined #ruby
karapetyan has joined #ruby
anon426 has quit [Client Quit]
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapety_ has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
pawnbox has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
<syndikate> Anybody here uses rubocop with gitgutter on sublimetext?
pawnbox has quit [Ping timeout: 250 seconds]
xall has joined #ruby
snebel has joined #ruby
crgkhn has joined #ruby
crgkhn has left #ruby [#ruby]
minotep has joined #ruby
xall has quit [Ping timeout: 240 seconds]
<snebel> Hi
<snebel> I'm doing some katas in codewars and found this solution
<snebel> was wondering what exactly means the inject(:+)
<snebel> I can wonder that is doing memo + element
<snebel> but don't completely understand...
pawnbox has joined #ruby
dminuoso_ has joined #ruby
<snebel> I know you can use &:method in blocks as shorthand but never saw this :+ before..
<snebel> any clues?
<syndikate> Summation
<snebel> yeah but where the memo and element are ?
<snebel> what the colon means here ?
<jhass> inject/reduce has a special case there, if the argument is a symbol and no block is given, it's equivalent to &symbol
dminuoso has quit [Ping timeout: 244 seconds]
<snebel> thanks, I'm going to review how this "hack" works :-)
TheCubeLord has joined #ruby
glcx has quit [Quit: This computer has gone to sleep]
<TheCubeLord> I Wrote a program that encodes a string in Base64 SHA1 Base32 and MD5 then I mixed it up
<TheCubeLord> here is 1234: R0EyRElaSlFHUTNEQ1lSWkhGUkdLTUpUTU5SR01ZVEVIRlJUQ1pSUUdFWVRN
<TheCubeLord> TkRGTU1aREtaQldHUlNUSVlURw==
bkxd has joined #ruby
xall has joined #ruby
<jhass> I wouldn't call SHA1 or MD5 encodings
douglascorrea has joined #ruby
kavanagh has quit [Quit: That's all folks!]
pmyjavec has joined #ruby
ponga has joined #ruby
kavanagh has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
govg has joined #ruby
nankyokusei has joined #ruby
xall has quit [Ping timeout: 244 seconds]
douglascorrea has quit [Ping timeout: 276 seconds]
last_staff has quit [Quit: last_staff]
sheperson has joined #ruby
soLucien has quit [Quit: Leaving]
<TheCubeLord> its base 64 encoded of SHA1 witch encoded MD5 and so on
minimalism has quit [Quit: minimalism]
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
ecnalyr has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
elaptics is now known as elaptics`away
ur5us has joined #ruby
last_staff has joined #ruby
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
duncannz has quit [Remote host closed the connection]
ecnalyr has quit [Ping timeout: 244 seconds]
cdg has joined #ruby
ruid has joined #ruby
xall has joined #ruby
leitz has joined #ruby
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hipertracker has quit [Quit: hipertracker]
mostlybadfly has joined #ruby
sheperson has quit [Quit: sheperson]
bluOxigen has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
xall has quit [Ping timeout: 258 seconds]
bluOxigen has joined #ruby
johnmilton has quit [Remote host closed the connection]
Pumukel has joined #ruby
<leitz> The object I'm working on has attributes that are hashes. Is there a better solution than "@char['character'].stuff['benefits'].count" or is that sort of normal?
haxrbyte has quit [Remote host closed the connection]
pmyjavec has joined #ruby
haxrbyte has joined #ruby
<jhass> TheCubeLord: to me an encoding is two way, there's a corresponding decoding function. MD5 and SHA1 are hash functions, one of the properties of a hash function is to have no inverse function
<jhass> leitz: sort of
<jhass> it can make sense to turn the hashes into little databag classes
bluOxigen has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
bluOxigen has joined #ruby
<TheCubeLord> i know
<leitz> jhass, thanks. I wasn't sure if it was just me the newbie doing things the hard way. As I go forward, some of the hashes can turn into classes.
<TheCubeLord> for password databases it is important
<heftig> there's Struct and OpenStruct if you want to avoid hashes
<TheCubeLord> so I made that program in ruby as a proof of concept
Gasher has quit [Quit: Leaving]
<heftig> TheCubeLord: no, baseX is pretty useless for passwords
<heftig> it's just a transfer encoding
xall has joined #ruby
<jhass> btw chaining hash functions doesn't necessarily strengthen them, I even vaguely remember reading something about certain combinations to weaken the properties of each
<TheCubeLord> people still use it
<heftig> no, they don't
<heftig> if you want to store passwords, use scrypt or bcrypt
Mia has quit [Quit: Leaving]
<TheCubeLord> in MySQL
<heftig> don't use simple hash functions
<TheCubeLord> dude its going to be in the web the database
<TheCubeLord> at least Onli I can access it
<tobiasvl> do not
<tobiasvl> do that
<TheCubeLord> but if there is a Database leak
<TheCubeLord> its encoded as f***
Sashimi has quit [Quit: Textual IRC Client: www.textualapp.com]
<heftig> it's pointless
<jhass> scrypt and bcrypt are proving password hashing schemes, be smart and make use of the expertise of hundreds of people with more experience than you, don't make up your own scheme
jaruga____ has quit [Quit: jaruga____]
<jhass> *are proved
<workmad3> well, 'proven' (assuming the problem they're based on is actually hard... but that's the weak point in pretty much every piece of crypto currently in existence)
haxrbyte has quit [Read error: Connection reset by peer]
<workmad3> scrypt and bcrypt are decent schemes though because they can be scaled up by work factors, allowing existing hashes to be strengthened as computational power increases
ec0 has quit [Ping timeout: 250 seconds]
<workmad3> TheCubeLord: btw, both md5 and sha1 should be pretty much ignored because they're badly compromised nowadays
xall has quit [Ping timeout: 276 seconds]
haxrbyte has joined #ruby
elaptics`away is now known as elaptics
<TheCubeLord> workmad3: so wha
pawnbox has quit [Remote host closed the connection]
<jhass> TheCubeLord: why don't you just store plaintext passwords then?
<jhass> ffs rspec
<jhass> -"tags" => (a collection containing exactly "cee" and "loo"),
<jhass> +"tags" => ["cee", "loo"],
HelloNoob has quit [Ping timeout: 250 seconds]
<TheCubeLord> jhass: cause if there is a database leak everyone will know everyone's password
<tobiasvl> ?
LoneHerm_ has joined #ruby
<tobiasvl> TheCubeLord: they will know them if there is a database leak and you've used hashes that can be broken
<workmad3> TheCubeLord: using your own hash based off md5 and sha1, a database leak is likely to cause that within about 20 minutes of the breach anyway
<TheCubeLord> How do you make your own Hash then
<workmad3> (or less, if you happen to have achieved a weakening of already weak functions with your chaining)
<tobiasvl> read up on rainbow tables
<tobiasvl> at least salt your hashes
<heftig> TheCubeLord: you don't, you use bcrypt
<TheCubeLord> heftig: No I make my own
<heftig> you're setting yourself up for failure
sylario has joined #ruby
<workmad3> TheCubeLord: pretty much, you don't... creating a secure, one-way hashing function is a very long, involved process that involves quite a bit of maths, a lot of verification and then quite a bit of time making sure it's implemented in a secure way
pawnbox has joined #ruby
<TheCubeLord> kk
jishankai has quit [Ping timeout: 260 seconds]
adc-soft-dev-03 has joined #ruby
<TheCubeLord> thanks Google
<TheCubeLord> lol
<workmad3> TheCubeLord: I think the SHA3 standard took about 5 years before people were happy it was actually a good algorithm, and it'll probably be a year or two more before people really trust the implementations to not have issues
<jhass> 5 years of competing proposals to be developed and evaluated
<tobiasvl> you need to first make a good hashing algorithm, and then prove that it's strong enough. and even then the collision space might be smaller than was originally thought, as was the case with MD5
llua has quit [Ping timeout: 250 seconds]
<workmad3> oh wait, *9* years from opening up submissions for SHA3 standards to it being an actual standard...
<workmad3> just double-checked my dates :)
<TheCubeLord> great
<TheCubeLord> ill get started then
<workmad3> TheCubeLord: or you could just use bcrypt or scrypt...
allcentury has joined #ruby
<tobiasvl> what a weird conversation
haxrbyte has quit [Read error: Connection reset by peer]
<workmad3> (or some other PBKDF standard)
craigp has quit [Ping timeout: 265 seconds]
sebstrax has joined #ruby
mrmortondk has joined #ruby
xall has joined #ruby
jishankai has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
rumikk has joined #ruby
xall has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 252 seconds]
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jobat> Cubelord: no-one's trying to insult you, they're just trying to help you understand why rolling your own crypto is a really bad move. You should really listen to them.
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
JeanCarloMachado has joined #ruby
nettoweb has joined #ruby
mark_66 has quit [Quit: Leaving.]
mark_66 has joined #ruby
aries_liuxueyang has quit [Ping timeout: 260 seconds]
rodfersou has joined #ruby
kavanagh has quit [Quit: That's all folks!]
hanmac has quit [Ping timeout: 258 seconds]
mark_66 has quit [Read error: Connection reset by peer]
kavanagh has joined #ruby
mark_66 has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
xall has joined #ruby
umdstu has joined #ruby
hk238 has joined #ruby
xall has quit [Ping timeout: 240 seconds]
A_Drone has quit [Remote host closed the connection]
leitz has quit [Quit: Nappy time]
fergal has quit [Quit: fergal]
hanmac has joined #ruby
johnmilton has joined #ruby
hipertracker has joined #ruby
RegulationD has joined #ruby
xall has joined #ruby
A_Drone has joined #ruby
jishankai has quit [Ping timeout: 258 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
xall has quit [Ping timeout: 252 seconds]
adc-soft-dev-03 has quit [Quit: Leaving]
kobain has joined #ruby
cyphase has quit [Ping timeout: 250 seconds]
spectrum has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
rodfersou has quit [Ping timeout: 258 seconds]
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
pmyjavec has joined #ruby
cyphase has joined #ruby
Doow has joined #ruby
c355e3b has joined #ruby
rodfersou has joined #ruby
jaguarmagenta has joined #ruby
aries_liuxueyang has joined #ruby
ldnunes has joined #ruby
Yacker has joined #ruby
A_Drone has quit [Remote host closed the connection]
cfec0b8d has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
syndikate has quit [Ping timeout: 258 seconds]
agent_white has quit [Quit: leaving]
cfec0b8d has joined #ruby
xall has joined #ruby
fmcgeough has joined #ruby
pmyjavec has quit [Read error: Connection reset by peer]
synthroid has joined #ruby
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Ping timeout: 244 seconds]
xall has quit [Ping timeout: 264 seconds]
craigp has joined #ruby
aibot has quit [Ping timeout: 258 seconds]
Ishido has joined #ruby
snebel has quit [Ping timeout: 260 seconds]
A_Drone has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
A_Drone has quit [Remote host closed the connection]
aibot has joined #ruby
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
diegoviola has joined #ruby
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jondot has joined #ruby
jaguarma_ has joined #ruby
Yacker has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hipertracker has quit [Quit: hipertracker]
last_staff has joined #ruby
xall has joined #ruby
jaguarmagenta has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
glcx has joined #ruby
glcx has quit [Changing host]
glcx has joined #ruby
Snowy has quit [Remote host closed the connection]
slash_me has joined #ruby
craigp has joined #ruby
ecnalyr has joined #ruby
strigonLeader has joined #ruby
xall has quit [Ping timeout: 240 seconds]
Guest51709 has quit [Ping timeout: 260 seconds]
snebel has joined #ruby
ur5us has joined #ruby
spectrum has quit [Ping timeout: 244 seconds]
ecnalyr has quit [Ping timeout: 244 seconds]
kavanagh has quit [Quit: That's all folks!]
ur5us has quit [Ping timeout: 264 seconds]
kavanagh has joined #ruby
nankyokusei has joined #ruby
hipertracker has joined #ruby
zarubin_ has joined #ruby
giz|work has joined #ruby
millerti has joined #ruby
griffindy has joined #ruby
ruid has quit [Ping timeout: 252 seconds]
xall has joined #ruby
zarubin has quit [Ping timeout: 244 seconds]
nankyokusei has quit [Ping timeout: 244 seconds]
slash_me has quit [Ping timeout: 250 seconds]
koooge has quit [Quit: Leaving...]
ecnalyr has joined #ruby
evie_hammond has quit [Quit: WeeChat 1.5]
xall has quit [Ping timeout: 244 seconds]
alfiemax has quit [Ping timeout: 252 seconds]
Yacker has joined #ruby
Yacker has quit [Client Quit]
mahlon has quit [Ping timeout: 276 seconds]
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
evie_hammond has joined #ruby
slash_me has joined #ruby
jondot has quit [Quit: Leaving.]
DanyC has joined #ruby
syndikate has joined #ruby
AgentVenom has joined #ruby
ekinmur has joined #ruby
slash_me has quit [Ping timeout: 276 seconds]
Snowy has joined #ruby
cdg has quit [Remote host closed the connection]
DanyC has quit []
bmurt has joined #ruby
helllojesus12 has quit [Quit: Leaving]
freerobby has joined #ruby
jaguarma_ has quit [Ping timeout: 240 seconds]
AndyBotwin has quit [Ping timeout: 258 seconds]
fergal has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Akuma has joined #ruby
joonty has joined #ruby
AgentVenom has quit [Quit: Textual IRC Client: www.textualapp.com]
axisys has joined #ruby
Ishido has quit [Ping timeout: 260 seconds]
jetpack_joe has joined #ruby
last_staff has quit [Quit: last_staff]
byteflame has joined #ruby
soLucien has joined #ruby
<soLucien> is it possible to specify a gem on remove custom action ?
JeanCarloMachado has quit [Ping timeout: 240 seconds]
dhodgkin_ has joined #ruby
<soLucien> as in: stop a service
<soLucien> run a shell command, etc
dhodgkin has quit [Ping timeout: 252 seconds]
byteflame has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
<matthewd> soLucien: If you want to do those sorts of things, you probably shouldn't be distributing as a gem
<soLucien> the gem installs a service and controls it. when i uninstall it i have to ensure it is stopped
<matthewd> Yeah, that doesn't sound like it should be a gem
nadir has joined #ruby
<soLucien> otherwise the lock file makes it impossible to remove it
<soLucien> what should it be ?
<matthewd> An OS package
<soLucien> it's a vagrant plugin. It relies on a 3rd party application (running as a service) to proxy apt packages
Ishido has joined #ruby
Beast has joined #ruby
<soLucien> and other kinds of resources (github zip files, .msi packages, anything else)
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soLucien> the service is started by Vagrant. When i do vagrant plugin uninstall, i want the gem to forcefully kill the service
aphprentice has quit [Quit: Connection closed for inactivity]
AgentVenom has joined #ruby
<soLucien> so that i can remove the contents of the gem folder (otherwise locked)
<soLucien> what are my options ?
millerti has joined #ruby
axl_ has joined #ruby
axl_ has quit [Client Quit]
JeanCarloMachado has joined #ruby
c0mrad3 has joined #ruby
douglascorrea has joined #ruby
xall has joined #ruby
aryaching has joined #ruby
tvw has quit [Ping timeout: 240 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<evie_hammond> I'm on Arch and trying to debug in RubyMine. I have permissions problems installing gems. Anyone know what to do here?
dvinciguerra has joined #ruby
slash_me has joined #ruby
govg has quit [Ping timeout: 265 seconds]
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
xall has quit [Ping timeout: 276 seconds]
govg has joined #ruby
hahuang61 has joined #ruby
ChiefAlexander has joined #ruby
kavanagh has quit [Quit: That's all folks!]
axl_ has joined #ruby
andikr has quit [Remote host closed the connection]
byteflame has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
millerti has quit [Client Quit]
kavanagh has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
hahuang61 has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
griffindy has joined #ruby
Ishido has quit [Remote host closed the connection]
douglascorrea has quit [Remote host closed the connection]
Pumukel has joined #ruby
xall has joined #ruby
ekinmur has joined #ruby
Ishido has joined #ruby
jmignault has joined #ruby
jrafanie has joined #ruby
harfangk has joined #ruby
alfiemax has joined #ruby
xall has quit [Ping timeout: 244 seconds]
meeto has joined #ruby
disconnekted has joined #ruby
RegulationD has joined #ruby
roflmyeggo has joined #ruby
jaguarmagenta has joined #ruby
GodFather has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
<jhass> evie_hammond: just system ruby installed? does gem install foo on the command line work?
cfec0b8d has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
GodFather has joined #ruby
xall has joined #ruby
kavanagh has quit [Quit: That's all folks!]
habitullence has joined #ruby
jetpack_joe has quit [Read error: Connection reset by peer]
Doow has quit [Quit: Page closed]
millerti has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
CloCkWeRX has quit [Remote host closed the connection]
xall has quit [Ping timeout: 258 seconds]
jondot has joined #ruby
yardenbar has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
giz|work has quit [Ping timeout: 265 seconds]
spudowiar has joined #ruby
craigp has quit [Quit: WeeChat 1.5]
craigp has joined #ruby
<ardian_> Hello I am using the mediawiki API, and when creating an article, I need to get the id of that article, using IRB i am able to see the pageid, but in a script not
<ardian_> how would I go with returning the pageid or saving it
Macaveli has quit [Ping timeout: 260 seconds]
kavanagh has joined #ruby
newbism has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<DefV> can I deconstruct an array in while? e.g. arr = [[1,2], [3,4]]; while a, b = arr.pop; p a + b; end
<DefV> (that doesn't work, which is why I'm asking)
howdoi has joined #ruby
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
Macaveli has joined #ruby
mhenrixon has quit [Ping timeout: 252 seconds]
axisys has quit [Ping timeout: 258 seconds]
mroth has quit [Read error: Connection reset by peer]
knowtheory has quit [Read error: Connection reset by peer]
troter__________ has quit [Read error: Connection reset by peer]
apipkin_ has quit [Ping timeout: 250 seconds]
<hanmac> DefV: why you using while and no each?
amitchellbullard has quit [Read error: Connection reset by peer]
im0b has quit [Ping timeout: 260 seconds]
jmhmccr has quit [Ping timeout: 260 seconds]
pizzaops has quit [Ping timeout: 258 seconds]
podman has quit [Ping timeout: 258 seconds]
yo61 has quit [Ping timeout: 258 seconds]
JackMc has quit [Ping timeout: 258 seconds]
twodayslate has quit [Read error: Connection reset by peer]
jpinnix_______ has quit [Ping timeout: 264 seconds]
Expanse has quit [Ping timeout: 264 seconds]
peteretep has quit [Ping timeout: 264 seconds]
err_ok has quit [Ping timeout: 264 seconds]
rfv has quit [Ping timeout: 264 seconds]
acalewin has quit [Ping timeout: 264 seconds]
jxf has quit [Ping timeout: 264 seconds]
jmcc___________ has quit [Ping timeout: 264 seconds]
gmci has quit [Ping timeout: 264 seconds]
korben has quit [Read error: Connection reset by peer]
frode15243 has quit [Read error: Connection reset by peer]
chrisseaton has quit [Read error: Connection reset by peer]
bedouin has quit [Ping timeout: 250 seconds]
daemonwrangler has quit [Read error: Connection reset by peer]
ponga has quit [Read error: Connection reset by peer]
danzilio has quit [Read error: Connection reset by peer]
shelling__ has quit [Write error: Connection reset by peer]
sylario has quit [Read error: Connection reset by peer]
jcp has quit [Read error: Connection reset by peer]
lancetw has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
skmp has quit [Read error: Connection reset by peer]
zipkid has quit [Read error: Connection reset by peer]
jimcroft has quit [Read error: Connection reset by peer]
c0mrad3 has quit [Read error: Connection reset by peer]
sebstrax has quit [Read error: Connection reset by peer]
Lewix has quit [Read error: Connection reset by peer]
Eleeleth has quit [Read error: Connection reset by peer]
HashNuke has quit [Read error: Connection reset by peer]
howdoi has quit [Read error: Connection reset by peer]
swgillespie has quit [Write error: Connection reset by peer]
Travis-42 has quit [Read error: Connection reset by peer]
zrl has quit [Read error: Connection reset by peer]
hayden__ has quit [Write error: Connection reset by peer]
Lloyd has quit [Read error: Connection reset by peer]
digitalfiz has quit [Write error: Connection reset by peer]
Tony-St4rk has quit [Write error: Connection reset by peer]
ewilliam has quit [Write error: Connection reset by peer]
jhill has quit [Read error: Connection reset by peer]
kireevco has quit [Read error: Connection reset by peer]
imanc has quit [Read error: Connection reset by peer]
mchelen2 has quit [Read error: Connection reset by peer]
braderhart has quit [Read error: Connection reset by peer]
ggherdov has quit [Read error: Connection reset by peer]
vcoinminer has quit [Read error: Connection reset by peer]
dukedave has quit [Read error: Connection reset by peer]
davidmichaelkarr has quit [Read error: Connection reset by peer]
rann has quit [Read error: Connection reset by peer]
bove has quit [Read error: Connection reset by peer]
machty has quit [Write error: Connection reset by peer]
incomprehensibly has quit [Read error: Connection reset by peer]
boxrick1 has quit [Read error: Connection reset by peer]
deimos__ has quit [Read error: Connection reset by peer]
zero7 has quit [Read error: Connection reset by peer]
adambeynon has quit [Read error: Connection reset by peer]
zzak has quit [Write error: Connection reset by peer]
Guest4184_______ has quit [Write error: Connection reset by peer]
caw has quit [Read error: Connection reset by peer]
[diecast] has quit [Read error: Connection reset by peer]
cstrahan has quit [Read error: Connection reset by peer]
jlyndon has quit [Read error: Connection reset by peer]
borkdude has quit [Ping timeout: 250 seconds]
braincrash has quit [Ping timeout: 240 seconds]
xall has joined #ruby
chrisseaton has joined #ruby
M-manveru has quit [Ping timeout: 260 seconds]
danzilio has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
braincrash has joined #ruby
lancetw has joined #ruby
<jhass> ?code ardian_
<ruby[bot]> ardian_: We can't help you without your code, please post it to https://gist.github.com
binaryplease has quit [Ping timeout: 240 seconds]
fedruantine has quit [Ping timeout: 260 seconds]
<jhass> show the working irb session too
dionysus69 has quit [Quit: dionysus69]
borkdude has joined #ruby
jxf has joined #ruby
bove has joined #ruby
howdoi has joined #ruby
bkxd has quit [Quit: leaving]
xall has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
caw has joined #ruby
ta_ has quit [Remote host closed the connection]
dionysus69 has joined #ruby
binaryplease has joined #ruby
jmhmccr has joined #ruby
<JakeP> Hey guys, how can I debug my program to see where it hangs? I've tried using "ruby -rdebug" but it hangs in there too, leaving me unable to continue debugging.
<jhass> DefV: you can't. Perhaps there's an elegant solution to your actual problem
<jhass> ?pry JakeP
<ruby[bot]> JakeP: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<JakeP> Ah thank you, I'll give that a try.
<jhass> add pry-byebug and you can even step through
M-manveru has joined #ruby
knowtheory has joined #ruby
mroth has joined #ruby
millerti has joined #ruby
skade has joined #ruby
jhack has joined #ruby
<ardian_> jhass: https://paste.fedoraproject.org/399367/ this is the input and output I get in IRB
<dminuoso_> JakeP: Yes you can actually!
hayden__ has joined #ruby
<dminuoso_> JakeP: SIGBUS the process and then enjoy your proper ruby debug data.
c0mrad3 has joined #ruby
rfv has joined #ruby
<ardian_> but not in a script, so I want to save the pageid
<jhass> ardian_: you realize we don't see your script?
<ardian_> jhass: the script only has that line, but it doesn't do the same return as in IRB
<dminuoso_> JakeP: That will give you full debug information about ruby stack frames, and lots of internal magic that can help narrow things down.
frode15243 has joined #ruby
twodayslate has joined #ruby
troter__________ has joined #ruby
<jhass> ardian_: well yes, you should use a method on the returned object to get it
korben has joined #ruby
amitchellbullard has joined #ruby
daemonwrangler has joined #ruby
Es0teric has joined #ruby
peteretep has joined #ruby
zacts has joined #ruby
craigp has quit [Ping timeout: 276 seconds]
shelling__ has joined #ruby
ponga has joined #ruby
skade has quit [Client Quit]
zipkid has joined #ruby
jmcc___________ has joined #ruby
<ardian_> jhass: would I just return the value, with a return pageid ?
gmci has joined #ruby
Eleeleth has joined #ruby
skmp has joined #ruby
sylario has joined #ruby
HashNuke has joined #ruby
podman has joined #ruby
Tony-St4rk has joined #ruby
jcp has joined #ruby
fedruantine has joined #ruby
yo61 has joined #ruby
jimcroft has joined #ruby
im0b has joined #ruby
bedouin has joined #ruby
apipkin_ has joined #ruby
mchelen2 has joined #ruby
imanc has joined #ruby
JackMc has joined #ruby
Lloyd has joined #ruby
irregular has joined #ruby
tvon has quit [Quit: System is sleeping...]
rann has joined #ruby
<jhass> literally? no
kireevco has joined #ruby
Lewix has joined #ruby
sebstrax has joined #ruby
boxrick1 has joined #ruby
jpinnix_______ has joined #ruby
MarkBilk_ has joined #ruby
acalewin has joined #ruby
zrl has joined #ruby
zero7 has joined #ruby
digitalfiz has joined #ruby
swgillespie has joined #ruby
Expanse has joined #ruby
machty has joined #ruby
jhill has joined #ruby
Travis-42 has joined #ruby
Guest4184_______ has joined #ruby
jlyndon has joined #ruby
vcoinminer has joined #ruby
ggherdov has joined #ruby
dukedave has joined #ruby
incomprehensibly has joined #ruby
ewilliam has joined #ruby
braderhart has joined #ruby
davidmichaelkarr has joined #ruby
zzak has joined #ruby
adambeynon has joined #ruby
deimos__ has joined #ruby
<jhass> ardian_: http://www.rubydoc.info/gems/mediawiki_api/0.6.0/MediawikiApi/Response#%5B%5D-instance_method I suppose or perhaps data, so response = client.create_page(...); response["pageid"] or response.data["pageid"] or perhaps response["edit"]["pageid"], play around a bit
err_ok has joined #ruby
pizzaops has joined #ruby
[diecast] has joined #ruby
matp has quit [Remote host closed the connection]
acalewin has quit [Client Quit]
kapo has joined #ruby
<ardian_> jhass: I will thanks a lot
malconis has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has joined #ruby
MarkBilk has quit [Ping timeout: 250 seconds]
dell has joined #ruby
mfb2 has joined #ruby
<DefV> hanmac: not using each because this is a contrived example, the while does a pop from a remote queue
cstrahan has joined #ruby
mfb2 has quit [Remote host closed the connection]
ggherdov has quit [Excess Flood]
<dell> Hi there, just wonder which book on basic ruby that cover the latest 2.3x version of ruby for newbies
cschneid_ has joined #ruby
mfb2 has joined #ruby
<dell> which are recommended to startup with ruby then to dev with rails
<dell> thanks
braincrash has quit [Ping timeout: 240 seconds]
leea has joined #ruby
ggherdov has joined #ruby
DirtyF has joined #ruby
nankyokusei has joined #ruby
xall has quit [Ping timeout: 244 seconds]
<hanmac> DefV: jhass: you say you cant use pop like that in while? I say you can if you use ()
<hanmac> >> array = [[1,2],[3,4]]; while (a,b = array.pop); p a + b; end
<ruby[bot]> hanmac: # => /tmp/execpad-febb7a29372c/source-febb7a29372c:2: multiple assignment in conditional (https://eval.in/615292)
<jhass> hanmac: you can't ;)
<hanmac> jhass: hm i can on my local maschine ;P
<DefV> I also get the multiple assignment issue
dhollinger has quit [Ping timeout: 264 seconds]
slash_me has quit [Ping timeout: 244 seconds]
<hanmac> maybe that was allowed in later ruby version
matp has joined #ruby
<DefV> hanmac: what version are you on?
<jhass> bot runs 2.3
<hanmac> RUBY_RELEASE_DATE +
<hanmac> => "2016-07-31"
<jhass> dell: didn't notice any new books, but the basics didn't change since 2.0 or perhaps even 1.9
<dminuoso_> >> Process.kill(:SIGBUS, $$)
<ruby[bot]> dminuoso_: # => (https://eval.in/615294)
* dminuoso_ does not like eval.in
<DirtyF> hi I'm a Ruby noob, what's the recommended way to avoid too long lines for URLs? For instance how would your rewrite an URL like : "https://res.cloudinary.com/#{settings["cloud_name"]}/image/fetch/c_scale,w_#{natural_width},q_auto,f_auto/#{image_url}"
braincrash has joined #ruby
kapo has quit [Quit: WeeChat 1.5]
<dell> @jhass: so any book on ruby is okay, right?
<jhass> dell: pretty much
<jhass> don't get any 1.8 stuff though
nankyokusei has quit [Ping timeout: 244 seconds]
<jhass> DirtyF: seems still okayish to me
Doow has joined #ruby
KCmetro has joined #ruby
BaroMeter has joined #ruby
soLucien has quit [Read error: Connection reset by peer]
<jhass> hide it in a method
<DirtyF> yep but Rubocop rules tell to keep it under 90 chars
<jhass> I told rubocop otherwise ;)
<DefV> Rubocop is drunk & should go home
<DirtyF> the rules are defined by the maintainers of an open-source project, I don't get to choose :)
<jhass> you can do something like "foo" \[newline] "bar"
<dell> is version 1.8 obsolete and no more in use. I think so.
<JakeP> So guys, I'm wondering if some of you can help me with my ongoing issue. I'm trying to make a username variable that contains a set string with an incrementing integer on the end. I'm using a counter already programmed that counts how many loops have completed, which fits perfect in theory, but my program hangs right after the username is created
<JakeP> .. puts @username shows the correct value, but I can't figure out why it hangs..
caw has quit [Ping timeout: 250 seconds]
<DirtyF> jhass: will try that thanks
bkxd has quit [Quit: leaving]
<jhass> dell: yes, it is. Technically 1.9 and 2.0 are EOL too, 2.1 will be in february, but for basic guides just using 2.3 with the examples should still work
douglascorrea has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
jaiks has quit [Ping timeout: 250 seconds]
<JakeP> Here's my program source if anyone would be kind enough to take a look https://gist.github.com/anonymous/61059965b68cdc409c09cbfa439bd34a
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
caw has joined #ruby
<jhass> JakeP: you're saying custom_names.txt has more than one entry, you get to line 67 for the first, but not for the second?
rubie has joined #ruby
dminuoso_ has quit [Ping timeout: 244 seconds]
<JakeP> Oops, I've two halves of code there!
discopatrick has quit [Ping timeout: 250 seconds]
<JakeP> I'm not even referencing that file anymore, it seems to be just holding my statement together.
<jhass> gist supports multiple files, if you got more than one file create more than one file on gist too
tvon has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
douglascorrea has quit [Ping timeout: 250 seconds]
hwcomcn has joined #ruby
<JakeP> Just to clarify, I can use custom_names to create generated usernames from a list, but it's still too disorganised when dealing with 200+ accounts
dionysus69 has joined #ruby
discopatrick has joined #ruby
hwcomcn has quit [Max SendQ exceeded]
hwcomcn has joined #ruby
dminuoso has joined #ruby
<jhass> btw are you a spammer or what's your motivation here anyway? Did you check whether the services ToS allows for what you're doing?
tvon has quit [Client Quit]
nerium has joined #ruby
hwcomcn has quit [Max SendQ exceeded]
<JakeP> It's just creating multiple accounts within a game, no spam at all
<Papierkorb> Botting is most likely against their ToS
<JakeP> Nothing mentioned within the sign up ToS, obviously in game botting is, but theres none of that.
RegulationD has joined #ruby
hwcomcn has joined #ruby
AndyBotwin has joined #ruby
<JakeP> This is just account creation, nothing more than that
xall has quit [Ping timeout: 264 seconds]
<leea> >> a = [1,2,3,4]; while (b = a.pop); puts b; end;
hipertracker has quit [Quit: hipertracker]
<ruby[bot]> leea: # => 4 ...check link for more (https://eval.in/615304)
<leea> .pop works?
douglascorrea has joined #ruby
<leea> hanmac jhass
<jhass> leea: multiple assignment was the question, not pop
<leea> oh
jaguarmagenta has joined #ruby
GodFather has quit [Read error: No route to host]
habitullence has quit [Quit: habitullence]
douglascorrea has quit [Client Quit]
zacts has quit [Quit: WeeChat 1.4]
RegulationD has quit [Ping timeout: 258 seconds]
jaiks has joined #ruby
mfb2 has quit [Remote host closed the connection]
saneax is now known as saneax_AFK
mfb2 has joined #ruby
<jobat> dell: bit late to the party, but eloquent ruby was pretty good for me
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
hipertracker has joined #ruby
Uranio has joined #ruby
<leea> does anyone have recommendations for active open source ruby projects to contribute to?
davedev24 has joined #ruby
Uranio has quit [Client Quit]
ponga has quit [Quit: Connection closed for inactivity]
<dminuoso> leea: Yes. Browse github and possibly ruby-toolbox
<dminuoso> Find something you enjoy.
mfb2 has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
mfb2 has joined #ruby
polishdub has joined #ruby
<jhass> and ideally use
<jhass> or want to use
<dminuoso> Or all 3.
cyphase has quit [Ping timeout: 258 seconds]
hwcomcn_ has joined #ruby
jxf has quit [Ping timeout: 250 seconds]
<DirtyF> leea: Jekyll could use some help from experienced Ruby developers
hexhaxtron has joined #ruby
xall has joined #ruby
weckl has joined #ruby
dhollinger has joined #ruby
jxf has joined #ruby
<al2o3-cr> would it be considered ok to use Struct over OpenStruct for options parsing?
Spami has joined #ruby
hwcomcn has quit [Ping timeout: 250 seconds]
<dminuoso> al2o3-cr: OpenStruct always feels like unsuitable for production use, but Struct is totally fine for any use really.
<al2o3-cr> dminuoso: ok, great
MarkBilk_ has quit [Ping timeout: 250 seconds]
cyphase has joined #ruby
<dminuoso> Consider Struct to be a shortcut for boilerplate "Class with data initializer and accessors" - you can implement a regular class with this.
xall has quit [Ping timeout: 250 seconds]
rails has quit [Changing host]
rails has joined #ruby
<jhass> but don't copy the class Foo < Struct.new(...) antipattern, use Foo = Struct.new(...) do ... end
<al2o3-cr> ok, duly noted thanks dminuoso jhass
jrafanie has quit [Ping timeout: 250 seconds]
jrafanie_ has joined #ruby
swills_ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
<dell> Thanks Jobat
killerkamel has quit [Ping timeout: 244 seconds]
drahosj has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
bweston92 has quit [Quit: Leaving]
MarkBilk_ has joined #ruby
dminuoso has quit [Remote host closed the connection]
<dell> one more thing. Where can I find sample Ruby application to study include code fragments.
dionysus69 has quit [Remote host closed the connection]
AndyBotwin has quit [Quit: Leaving]
aeruder has joined #ruby
aeruder has left #ruby ["WeeChat 1.5"]
aeruder has joined #ruby
dhodgkin_ is now known as dhodgkin
ule has quit [Ping timeout: 258 seconds]
slash_me has joined #ruby
ule has joined #ruby
macsteps has joined #ruby
ELCALOR has quit [Ping timeout: 250 seconds]
ELCALOR has joined #ruby
axisys has joined #ruby
synthroid has quit [Remote host closed the connection]
paultreny has joined #ruby
paultreny has quit [Changing host]
paultreny has joined #ruby
axisys has quit [Client Quit]
killerkamel has joined #ruby
axisys has joined #ruby
pawnbox has quit [Remote host closed the connection]
paultreny has quit [Client Quit]
pawnbox has joined #ruby
cdg has joined #ruby
leea has quit [Ping timeout: 258 seconds]
dminuoso has joined #ruby
grenierm has quit [Quit: grenierm]
shinnya has joined #ruby
twe4ked has quit [Ping timeout: 250 seconds]
aganov has quit [Quit: Leaving]
leea has joined #ruby
twe4ked has joined #ruby
hahuang61 has joined #ruby
elaptics is now known as elaptics`away
AgentVenom has quit [Quit: Textual IRC Client: www.textualapp.com]
fullstack has quit [Ping timeout: 240 seconds]
cibs has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
fullstack has joined #ruby
shmulik has joined #ruby
Derperperd has joined #ruby
<shmulik> i need help with string encoded in gsm and then in binary
bmurt has joined #ruby
<jhass> binary is not an encoding
hahuang61 has quit [Ping timeout: 258 seconds]
JakeP has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<shmulik> need the algorithm to convert back this str = c8329bfd06d1d1e939283d07d1cb733a to original str = "hello this is test"
<shmulik> whatever
<shmulik> the encoded is taken from smsc that probably encoded with gsm 7 bit
ekinmur has quit [Quit: Textual IRC Client: www.textualapp.com]
teclator has quit [Ping timeout: 252 seconds]
AndyBotwin has joined #ruby
joast has quit [Quit: Leaving.]
AndyBotwin has quit [Read error: Connection reset by peer]
dell has quit [Ping timeout: 260 seconds]
zacts has joined #ruby
dminuoso has quit [Read error: Connection reset by peer]
dell has joined #ruby
<jhass> dunno, with c8 as the first byte?
nerium has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
sepp2k has joined #ruby
<jhass> also just 16 bytes in your "encoded" version and 20 bytes in the input?
<jhass> seems more like a hash to me?
<shmulik> what you mean ?
<jhass> 16 bytes is the length of a MD5 hash for example
[Butch] has joined #ruby
<shmulik> so that encrypted?
craigp has joined #ruby
<hanmac> no its hashed
<jhass> following that assumption the correct term would be hashed
<shmulik> so how i convert this 'hash' back ?
<hanmac> no way
<jhass> again, if the assumption is even right
<jhass> if you could be a whole lot more specific about where you got that string from, it might be easier
rodfersou is now known as rodfersou|lunch
pawnbox has quit [Remote host closed the connection]
xall has joined #ruby
minotep has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
<shmulik> i send sms from mobile to another, in the smsc with debugger i read the userData and that what i got
<aeruder> this is just the gsm 7 bit encoding
<aeruder> it isn't a hash
<shmulik> so how i convert it if i assume that all chars is only ascii
roflmyeggo has quit [Ping timeout: 276 seconds]
<aeruder> 18 characters stored in 8-bit encoding = 18 bytes, but in 7 bit encoding = (18*7)/8 = 15.75 bytes
<shmulik> for ucs-2 encoding i used this code as well: str.pack('H*').force_encoding('utf-16be').encode('utf-8')
nerium has joined #ruby
<aeruder> shmulik: there's not going to be any simple way to do this afaik, easiest way would be to sequence to bits and then pull out 7 at a time
bweston92 has joined #ruby
zacts has quit [Ping timeout: 258 seconds]
<aeruder> i don't know that any of the string encoding/decoding stuff supports characters packed at non-byte boundaries
newbism has quit [Ping timeout: 250 seconds]
xall has quit [Ping timeout: 250 seconds]
<jhass> aeruder: mh, I'm not following, wouldn't the first nibble still need to be < 0x70 anyway?
<jhass> <=
M-manveru has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 240 seconds]
TheGillies has quit [Ping timeout: 244 seconds]
allcentury has quit [Ping timeout: 240 seconds]
M-mistake has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
mtkd has joined #ruby
M-shine has quit [Ping timeout: 252 seconds]
giz|work has joined #ruby
<aeruder> jhass: so, 0xc8, if you take the top 7 bits = 0x64 == 'd'
DoubleMalt has quit [Remote host closed the connection]
<aeruder> so uhh maybe different string than he described
<aeruder> lol
hipertracker has quit [Quit: hipertracker]
<jhass> well, if you continue you get garbage
<aeruder> yea, i'm trying to find some details on how it is packed into the bytes
M-manveru has joined #ruby
amclain has joined #ruby
M-manveru has quit [K-Lined]
<jhass> http://smstools3.kekekasvi.com/topic.php?id=288 can convert it, we can either reverse engineer it or get a hold of "GSM 03.38 version 5.6.1 (ETS 300 900) page 1"
xall has joined #ruby
<jhass> page 17
<shmulik> yes i know this tool, but i need the way to pack only first 7 bits
Spami has quit [Quit: This computer has gone to sleep]
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
mrgrieves has quit [Ping timeout: 260 seconds]
joonty has quit [Quit: This computer has gone to sleep]
mark_66 has quit [Remote host closed the connection]
xall has quit [Ping timeout: 276 seconds]
Snowy has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
zarubin_ has quit [Read error: Connection reset by peer]
tablespork has joined #ruby
zarubin has joined #ruby
marxarelli has joined #ruby
hipertracker has joined #ruby
craigp has quit [Ping timeout: 250 seconds]
ponga has joined #ruby
Chair has quit [Ping timeout: 264 seconds]
glcx has quit [Quit: Quitte]
aep-shoutlet has joined #ruby
<dell> hi there, is there any ruby RVM equivalent for windows. I found in the book saying that for Unix-liked only
<jobat> I think there's an RVM for cygwin
hotter has joined #ruby
rlex has joined #ruby
tablespork has quit [Quit: WeeChat 1.5]
<rlex> hello, how i can check if key exists in hash?
elaptics`away is now known as elaptics
xall has joined #ruby
<ljarvis> hash.key?(keyname)
<rlex> for example, i have {:sw1_core_stuff_eth0=>"asd", :"sw4-serv2_5"=>"123", :sw4_serv2_5=>"asd"} hash
<rlex> but port_load_history.has_key?('sw4-serv2_5') returns false as well
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
jaruga____ has quit [Remote host closed the connection]
<ljarvis> that's because 'sw4-serv2_5' != :sw4-serv2_5
dennisvennink has joined #ruby
<ljarvis> one is a string, the other is a symbol
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
fergal has quit [Quit: fergal]
<rlex> hm
<rlex> does it translates dashes to underscores as well?
<rlex> because sw4_serv2_5 returns true as well
<ljarvis> I don't understand your question
<rlex> mhm, my english is bad...
<leea> https://gist.github.com/drwl/9781a55a20955829f0a0ea45f1fd9a67 is there a way to do this with instance_eval? using metaprogramming to do variable assignment with different types
<rlex> ah, my bad. Just fucked up hash table. Sorry, first time dealing with ruby.
tablespork has joined #ruby
Beast has quit [Quit: Leaving]
noregret has quit [Quit: leaving]
kedare has quit [Quit: Leaving]
xall has quit [Ping timeout: 240 seconds]
<matthewd> leea: instance_eval probably isn't the metaprogramming method you want there; there's a more.. direct option
<shmulik> so i can split the binary string to hex and then i take only the top 7 bits?
<leea> what do you mean?
<shmulik> the ruby way,
<ljarvis> leea: you probably want instance_variable_set
<leea> oh
<leea> good point i forgot about that
kavanagh has quit [Ping timeout: 244 seconds]
gdonald has joined #ruby
hwcomcn_ has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
AndyBotwin has joined #ruby
antgel has quit [Ping timeout: 244 seconds]
nerium has quit [Quit: nerium]
kavanagh has joined #ruby
TomyLobo has joined #ruby
dminuoso has joined #ruby
shmulik_mobile has joined #ruby
ule has quit [Changing host]
ule has joined #ruby
rajdesai has joined #ruby
nankyokusei has joined #ruby
axl_ has quit [Quit: axl_]
<shmulik> there is a way to deal with 7 bit string ?
tablespork has quit [Quit: WeeChat 1.5]
nerium has joined #ruby
xapak_ has joined #ruby
tablespork has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 252 seconds]
xall has joined #ruby
Limix has joined #ruby
<p1k> if I use a refinement, is there a place on the object where the old methods are stored ?
blaxter has quit [Quit: foo]
aufi has quit [Ping timeout: 265 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
KCmetro has quit [Quit: Leaving...]
Gasher has joined #ruby
shmulik has left #ruby [#ruby]
joast has joined #ruby
Derperperd has quit [Quit: Derperperd]
shmulik has joined #ruby
tablespo_ has joined #ruby
rodfersou|lunch is now known as rodfersou
PlasmaStar has quit [Ping timeout: 240 seconds]
M-shine has joined #ruby
tablespork has quit [Quit: WeeChat 1.5]
<al2o3-cr> shmulik: this is crude as shit but....
agent_white has joined #ruby
<al2o3-cr> >> "c8329bfd06d1d1e939283d07d1cb733a".scan(/../).reverse_each.map { |h| h.to_i(16) }.pack('C*').unpack('B*')[0][2..-1].scan(/.{7}/).map.with_object("") { |x, s| s << x.to_i(2) }
<ruby[bot]> al2o3-cr: # => "tset si siht olleH" (https://eval.in/615351)
xall has quit [Ping timeout: 264 seconds]
<dminuoso> p1k: No, refinements work a bit different.
PlasmaStar has joined #ruby
<shmulik> al2o3-cr: you are the hero
Silthias has quit [Read error: Connection reset by peer]
<al2o3-cr> shmulik: note: this won't work for all; just this example i'll try to refactor it a bit for you
tablespo_ has quit [Client Quit]
SCHAAP137 has joined #ruby
snebel has quit [Quit: Leaving]
<al2o3-cr> or if someone else could refactor be my guest :p
tablespork has joined #ruby
<p1k> dminuoso: alias_method_chain maybe instead ?
dell has quit [Ping timeout: 260 seconds]
<matthewd> p1k: It depends what you want to do
tablespork has quit [Client Quit]
dell has joined #ruby
<p1k> matthewd: say I have method chain a-> b-> c, I have changed c, so 'a' will produce a different result, but I want to keep the old 'a->b->c' for migration purposes
dvinciguerra has quit [Ping timeout: 240 seconds]
<matthewd> That doesn't sound easy
<al2o3-cr> my problem is i need get rid of the first 0's on the left the split by 7 and nothings coming to be at the moment on how to do that :(
AzureStigma has joined #ruby
<dminuoso> p1k: Note that alias_method_chain is a deprecated construct in favour of Module#prepend
hk238 has joined #ruby
<dminuoso> p1k: The cleanest solution would be to not rely on rubys dispatch algorithm, but to dispatch yourself if you have some custom needs.
irregular has left #ruby ["ERC (IRC client for Emacs 24.5.3)"]
pawnbox has quit [Remote host closed the connection]
airdisa has joined #ruby
Limix has quit [Quit: Limix]
xall has joined #ruby
axl_ has joined #ruby
<p1k> dminuoso: prepend won't keep the old chain though
weckl has quit [Quit: Leaving]
<p1k> dminuoso: e.g. if you overwrite 'c' the old 'a' will call to the new 'c'
<agent_white> Moin' folks
fergal has joined #ruby
roflmyeggo has joined #ruby
peteykun has joined #ruby
mfb2 has quit []
skade has joined #ruby
alfiemax has quit [Ping timeout: 244 seconds]
<dminuoso> p1k: alias_method will be your solution then.
<dminuoso> p1k: (It lets you change and undo any change as you please)
<dminuoso> Whether you copy ActiveSupports alias_method_chain is up to you.
xall has quit [Ping timeout: 250 seconds]
<dminuoso> p1k: Though depending on what you are doing, refinements may do the same too (as they allow you to locally monkey patch functionality)
shmulik_mobile has quit [Read error: No route to host]
<dminuoso> the "original functionality" is kept in the original class wherever the refinement was not activated.
_djbkd has joined #ruby
<dminuoso> i.e. module WithRefinement; using FooExtension; *code*; end; end
_djbkd has quit [Read error: Connection reset by peer]
<p1k> dminuoso: alias_method won't keep old references
<p1k> dminuoso: so the chain will use the new methods
_djbkd has joined #ruby
<p1k> dminuoso: I guess you could clone a class and refine or prepend, mhm
tablespork has joined #ruby
hotter has left #ruby [#ruby]
skade has quit [Ping timeout: 250 seconds]
_djbkd has quit [Remote host closed the connection]
pawnbox has joined #ruby
_djbkd has joined #ruby
<dminuoso> p1k: Why clone?!
<dminuoso> p1k: The whole idea of refinements is that you don't need to clone anything.
<dminuoso> The whole idea of alias_method chaining is that you can keep old methods if you want.
anisha has joined #ruby
bsmith has joined #ruby
dvinciguerra has joined #ruby
rajdesai has quit [Read error: Connection reset by peer]
rajdesai_ has joined #ruby
rajdesai_ has quit [Read error: Connection reset by peer]
rajdesai has joined #ruby
rajdesai has quit [Remote host closed the connection]
shmulik_mobile has joined #ruby
Spami has joined #ruby
TheGillies has joined #ruby
xall has joined #ruby
symm- has joined #ruby
Limix has joined #ruby
<p1k> dminuoso: .. you can keep the old 'a' but if old a reads def a; return b; end -- that will call the new 'b'
bkxd has joined #ruby
hipertracker has quit [Quit: hipertracker]
jondot has quit [Quit: Leaving.]
<p1k> dminuoso: because b is looked up on the lexical scope it's not bound to a particular function at declaration
<p1k> dminuoso: refinements alter the lexical scope which is great, but I don't have access to the old scope anymore ?
hipertracker has joined #ruby
<p1k> unless there is a with_refinement Refinement do .. end kind of thing ?
<dminuoso> 18:52 < dminuoso> i.e. module WithRefinement; using FooExtension; *code*; end; end
<dminuoso> That is exactly what refinements do p1k.
<dminuoso> Though keep in mind they can completely bust method calling performance.
<p1k> dminuoso: is there a block based syntax by chance?
<p1k> I guess Module.new do using FooExtension end will work? idk how performant that is tho..
<dminuoso> p1k: You can activate a refinement anywhere and use class_eval later on.
<p1k> dminuoso: can you remove a refinement ?
<dminuoso> (And that by the way is the precise reason why refinements completely destroy method calling performance)
<dminuoso> p1k: Not that I am aware of.
s2013 has joined #ruby
<dminuoso> Well, other than not class_evaling on the module/class that activated the refinement.
dell has quit [Ping timeout: 260 seconds]
nerium has quit [Ping timeout: 260 seconds]
<dminuoso> So you can easily define a "with_refinement" wrapper method if you want.
<p1k> dminuoso: Ideally I'd like to do without_refinement, but I guess I could just add an extra scope
nerium has joined #ruby
<dminuoso> p1k: think the other way around. Have the functionality you need like that packed inside a refinement.
bkxd has quit [Ping timeout: 250 seconds]
<bsmith> Hey, I'm attempting to test a rails / react app using rspec, capybara, and selenium. The react component simply fails to render. I am using qt5.6. Any ideas would be greatly appreciated!!!
<dminuoso> p1k: use alias_method to swap the logic around and then just use a refinement.
firstdayonthejob has joined #ruby
<dminuoso> bsmith: ?rails
<dminuoso> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
craigp has joined #ruby
TheCubeLord has quit [Quit: Leaving]
<bsmith> dminuoso: okay, rails is about the most irrelevant detail in the description of my question. That's okay though have a good one
Billias has joined #ruby
<dminuoso> bsmith: You mentioned a huge stack of ruby parts that are more used by the rails community. If you feel your problem has nothing to do with rails feel free to stick around, but your chances are getting some insights might be better over there.
teclator has quit [Remote host closed the connection]
vuoto has joined #ruby
<dminuoso> (Though Im really curious what react, ruby, rspec, capybara, selenium or ruby have to do with Qt)
bsmith has left #ruby [#ruby]
rcvalle has joined #ruby
xall has quit [Ping timeout: 244 seconds]
nerium has quit [Quit: nerium]
wrkrcoop has joined #ruby
teclator has joined #ruby
<wrkrcoop> im trying to force a timeout response using this gem manticore. but when i set connect_timeout: 0.0 i still get a response … that isn’t a timeout response … anyone know how i can get this to timeout? https://github.com/cheald/manticore
JeanCarloMachado has quit [Quit: Lost terminal]
vuoto has quit [Remote host closed the connection]
<wrkrcoop> 0.0
<wrkrcoop> “0.0”
Eiam has joined #ruby
JeanCarloMachado has joined #ruby
Billias has quit [Quit: ZNC - http://znc.in]
tmtwd has joined #ruby
Billias has joined #ruby
johnmilton has quit [Remote host closed the connection]
<al2o3-cr> shmulik: this should work for ascii only: https://gist.github.com/gr33n7007h/3231c2512ef5ad917b127d7602a24209
jobat has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
spider-mario has quit [Remote host closed the connection]
xall has joined #ruby
sebstrax has quit [Quit: Connection closed for inactivity]
tablespork has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jondot has joined #ruby
chouhoulis has joined #ruby
allcentury has joined #ruby
hahuang61 has quit [Ping timeout: 265 seconds]
disconnekted has quit [Remote host closed the connection]
hosttor has joined #ruby
<jhass> wrkrcoop: why?
<jhass> for tests? rspec?
<wrkrcoop> jhass: i want to see what the error code is
hosttor has quit [Read error: Connection reset by peer]
<wrkrcoop> so i can right a conditional if timeout retry in 15 minutes
<wrkrcoop> im guessing itll be 500 …
<wrkrcoop> write*
joonty has joined #ruby
macsteps has quit [Remote host closed the connection]
<jhass> it'll raise Manticore::Timeout
<wrkrcoop> oh really?
<wrkrcoop> how do u know that?
<jhass> ttps://github.com/cheald/manticore/blob/master/lib/manticore/client.rb#L29
<wrkrcoop> oh interesting. so i can do a rescue Manitocore::Timeout right?
<jhass> yes
sneakers has joined #ruby
yardenbar has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
sepp2k1 has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
bsmith has joined #ruby
triangles has joined #ruby
bsmith has quit [Remote host closed the connection]
bsmith_ has joined #ruby
bsmith_ has quit [Client Quit]
zotherstupidguy has joined #ruby
<wrkrcoop> thank you
sjums has quit [Quit: Connection reset by beer]
sjums has joined #ruby
sjums has quit [Client Quit]
<shmulik_mobile> al2o3-cr: thank you very mutch, what the different from ascii to another encoding ?
sjums has joined #ruby
ta_ has joined #ruby
<al2o3-cr> shmulik_mobile: i just meant it won't work with characters like «»ðđðße
Billias has quit [Quit: ZNC - http://znc.in]
Azure has joined #ruby
<shmulik_mobile> Uhh that's ok for me, i need only for english, another languages send as ucs-2 with 16bit big-endian
tercenya has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edulix_ has quit [Read error: Connection reset by peer]
ddffg has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
tercenya has quit [Client Quit]
cyphase has quit [Ping timeout: 258 seconds]
Billias has joined #ruby
whathappens has joined #ruby
finisherr has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
ChiefAlexander has quit [Remote host closed the connection]
DirtyF has quit []
replay has joined #ruby
replay has quit [Max SendQ exceeded]
macsteps has joined #ruby
Billias has quit [Client Quit]
replay has joined #ruby
replay has quit [Max SendQ exceeded]
saneax_AFK is now known as saneax
cyphase has joined #ruby
replay has joined #ruby
icarus has joined #ruby
vdamewood has quit [Ping timeout: 244 seconds]
ChiefAlexander has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
replay has quit [Ping timeout: 276 seconds]
elaptics is now known as elaptics`away
<workmad3> shmulik_mobile: wow, things still use ucs-2? I thought pretty much everything had shifted to UTF-16 properly by now
elifoster has joined #ruby
wrkrcoop_ has joined #ruby
mistermocha has joined #ruby
<shmulik_mobile> Yea our smsc support that ucs2
<T2ya> Hello. I've been learning ruby for the past few days. i managed to create this https://repl.it/Chij/6 . Initially my goal in mind after replacing multiples of 3 and 5 was to have it replace any number that began with a 1. I noticed that what i wrote ends up replacing anything with a 1 instead of looking at the first number.Can someone point in the right direction as to how i can go about replacing only the number in the tenth's or hundredth's p
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
wrkrcoop has quit [Ping timeout: 260 seconds]
wrkrcoop_ is now known as wrkrcoop
whathappens has quit [Read error: Connection reset by peer]
leea has joined #ruby
cschneid_ has quit [Remote host closed the connection]
whathappens has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
umdstu has quit [Quit: umdstu]
mistermocha has quit [Remote host closed the connection]
<dminuoso> T2ya: While Im looking at your code, please try to avoid repl.it - use eval.in to share snippets with us, it's not as buggy.
umdstu has joined #ruby
<T2ya> My apologies, it was the only one site i was familiar with. will do.
<dminuoso> T2ya: Not an issue, just a friendly reminder. Alright the issue is very simple - gsub is a method that quite explicitly replaces things.
<dminuoso> T2ya: What you want to use is either string.match(regular_expression) or the more perl-like version string =~ regular_expression
umdstu has quit [Client Quit]
slash_me has quit [Ping timeout: 250 seconds]
<dminuoso> (Personally I much prefer the first since it also returns match data and is far more rubyeque)
swills_ has quit [Quit: Leaving]
AzureStigma has quit [Quit: Gotta run..]
BaroMeter has quit [Ping timeout: 258 seconds]
<T2ya> I'm going to read up on it now and attempt to apply it. Cheers!
firstdayonthejob has quit [Quit: WeeChat 1.5]
<dminuoso> ?cookie
<ruby[bot]> here's your cookie:
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FooMunki has joined #ruby
bocaneri has quit [Read error: Connection reset by peer]
FooMunki has quit [Client Quit]
solars has quit [Quit: WeeChat 0.4.2]
M-manveru has joined #ruby
M-mistake has joined #ruby
peteykun has quit [Quit: Leaving]
solars has joined #ruby
saneax is now known as saneax_AFK
nankyokusei has joined #ruby
Devalo has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
sjums has quit [Quit: Connection reset by beer]
replay has joined #ruby
halfdan has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 240 seconds]
sjums has joined #ruby
halfdan has joined #ruby
wrkrcoop has joined #ruby
macsteps has quit [Remote host closed the connection]
xapak_ has quit [Quit: Connection closed for inactivity]
hipertracker has quit [Quit: hipertracker]
nerium has joined #ruby
chouhoulis has quit [Remote host closed the connection]
hakunin has joined #ruby
chouhoulis has joined #ruby
ta_ has quit [Remote host closed the connection]
last_staff has joined #ruby
giz|work has quit [Ping timeout: 276 seconds]
swills_ has joined #ruby
firstdayonthejob has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
aep-shoutlet has quit [Quit: Connection closed for inactivity]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<wrkrcoop> is sub a keyword in ruby? i looked it up and it seems like it is … my coworker is using it as variable name so im wondering if he is overriding it ...
veloutin has quit [Quit: ZNC - http://znc.in]
hipertracker has joined #ruby
blandflakes has joined #ruby
<Papierkorb> wrkrcoop: it's not
<al2o3-cr> wrkrcoop: sub isn't a keyword
<wrkrcoop> are you sure?
<wrkrcoop> why is it getting highlighted in my code then?
xapak_ has joined #ruby
xapak_ has quit [Client Quit]
<al2o3-cr> sure you haven't got perl highlighting :P
<Papierkorb> wrkrcoop: Yes, we are sure. And how should we know why your editor highlights it?
<wrkrcoop> nope its ruby
whathappens has quit [Ping timeout: 260 seconds]
Xiti has quit [Ping timeout: 276 seconds]
Xiti has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
<Papierkorb> wrkrcoop: Why should the String#sub method suddenly be special? Why do you trust a random page on the internet on a core language feature?
<Papierkorb> He's gone. How boring.
johnmilton has joined #ruby
rajdesai has joined #ruby
minimalism has joined #ruby
spider-mario has joined #ruby
<kegster> heh
<kegster> what a wanker
ReK2 has quit [Remote host closed the connection]
johnmilton has quit [Ping timeout: 276 seconds]
<kegster> ruby has been interesting
finisherr has quit [Quit: finisherr]
<kegster> is there any practical reason to use var[:foo] vs var["foo"] ?
shmulik_mobile has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
cyphase has quit [Ping timeout: 252 seconds]
<lupine> well, if var is a Hash that's symbol-keyed, it's rather important
freerobby has joined #ruby
AzureStigma has joined #ruby
<jhass> :foo and "foo" are entirely different things
<lupine> rails messes things up a lot by introducing HashWithIndifferentAccess
<jhass> >> :foo == "foo"
<ruby[bot]> jhass: # => false (https://eval.in/615402)
ec0 has joined #ruby
jaruga____ has quit [Quit: jaruga____]
<lupine> if it's a literal in your code, you probably want a symbol. if you ever derive it from input data, you probably want a string
QORRiE has joined #ruby
QORRiE has quit [Changing host]
QORRiE has joined #ruby
hahuang65 has joined #ruby
hahuang61 has joined #ruby
cyphase has joined #ruby
<Papierkorb> kegster: You could say, using a symbol or a string also indicates an intent to the reader
Spami has quit [Quit: This computer has gone to sleep]
rajdesai has quit [Remote host closed the connection]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
naftilos76 has quit [Quit: Αποχώρησε]
Spami has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
jhack has quit [Quit: jhack]
cZk has joined #ruby
zyriuse has joined #ruby
ledestin has joined #ruby
eljimmy has joined #ruby
macsteps has joined #ruby
johnmilton has joined #ruby
ec0 has quit [Ping timeout: 250 seconds]
AzureStigma is now known as AzureStigma|Away
spudowiar has quit [Quit: livin' la vida loca]
AzureStigma|Away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
MarkBilk_ has quit [Ping timeout: 250 seconds]
jackjackdripper has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
vdamewood has joined #ruby
jackjackdripper has quit [Client Quit]
dminuoso has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
sebstrax has joined #ruby
Ishido has quit [Remote host closed the connection]
Devalo_ has joined #ruby
davic has joined #ruby
minimalism has quit [Quit: minimalism]
kavanagh has quit [Quit: That's all folks!]
last_staff1 has joined #ruby
Devalo has quit [Ping timeout: 276 seconds]
AzureStigma has joined #ruby
rajdesai has joined #ruby
dionysus69 has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Ping timeout: 252 seconds]
last_staff1 is now known as last_staff
pandaant has quit [Remote host closed the connection]
borodin has joined #ruby
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
<borodin> hey fellas. Suppose I have an array of hashes, and I need to pick hashes from the array based on values. How do I do that? for example: [{"a"=>1},{"b"=>2},{"c"=>3}]
<borodin> something like data.select{|k,v| v>2}
Dimik has joined #ruby
<toretore> select will give you each object in the array, i.e. each individual hash
<borodin> toretore: I don't follow
ec0 has joined #ruby
<havenwood> >> [{"a"=>1},{"b"=>2},{"c"=>3},{"d"=>2}].find { |h| h.rassoc 2 } # borodin
<ruby[bot]> havenwood: # => {"b"=>2} (https://eval.in/615427)
zyriuse has quit [Ping timeout: 250 seconds]
<borodin> never heard of rssoc
<borodin> thanks!
Facts has joined #ruby
<havenwood> borodin: or try that ^ with select instead of find, or with hashes with multiple keys and values!
<Facts> hey
<havenwood> Facts: hey
hiyosi has joined #ruby
<Facts> Are you a developer with answers ?
jenrzzz has joined #ruby
Facts has quit [Client Quit]
<Nilium> There are no answers. These are dark times, Facts, these are trying times. We have not seen an answer in many moons now. The well of knowledge has all dried up.
tvon has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
Danny__ has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
<Danny__> im trying to do DateTime.strptime with this value, and it's saying invalid date: 2016-08-02T01:31:36.473Z
AndyBotwin has quit [Ping timeout: 264 seconds]
<Danny__> DateTime.strptime('2016-08-02T01:31:36.473Z', '%a %b %-d %l:%M %p')
<Danny__> whats wrong with what im doing?
<Mon_Ouie> That string doesn't match your format (there are spaces in the format, none in the date string)
fmcgeough has quit [Quit: fmcgeough]
sneakers has quit [Ping timeout: 265 seconds]
AndyBotwin has joined #ruby
<jhass> then there are things like %l is 12-hour clock, ISO8601 isn't
<jhass> >> require "date"; DateTime.iso8601("2016-08-02T01:31:36.473Z")
<ruby[bot]> jhass: # => #<DateTime: 2016-08-02T01:31:36+00:00 ((2457603j,5496s,473000000n),+0s,2299161j)> (https://eval.in/615435)
<al2o3-cr> Danny__: DateTime.parse('2016-08-02T01:31:36.473Z').strftime '%a %b -%d %l:%M %p'
<Papierkorb> >> require 'time'; Time.strptime('2016-08-02T01:31:36.473Z')
<ruby[bot]> Papierkorb: # => wrong number of arguments (given 1, expected 2..3) (ArgumentError) ...check link for more (https://eval.in/615436)
<Papierkorb> >> require 'time'; Time.parse('2016-08-02T01:31:36.473Z')
<ruby[bot]> Papierkorb: # => 2016-08-02 01:31:36 UTC (https://eval.in/615437)
<jhass> don't use parse here
<jhass> use iso8601
<jhass> no need to guess things
<al2o3-cr> ah, ok
Devalo_ has quit [Remote host closed the connection]
<Danny__> thanks all!
Devalo has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
dminuoso has joined #ruby
<Danny__> one more thing, how do i get it back to into my timezone?
<Danny__> US/New York GMT -4
<jhass> plain Ruby or with Activesupport/Rails?
<Danny__> plain ruby
slash_me has joined #ruby
<jhass> is DateTime.iso8601("2016-08-02T01:31:36.473Z").to_time.getlocal good enough?
vuoto has joined #ruby
<jhass> or .localtime is the nicer alias I guess
Devalo has quit [Ping timeout: 244 seconds]
Skelz0r has quit [Ping timeout: 250 seconds]
aep-shoutlet has joined #ruby
dminuoso has quit [Ping timeout: 244 seconds]
cyphase has quit [Ping timeout: 258 seconds]
<Danny__> thanks! ok ONE more....trying to isntall mysql2 on ubuntu, getting an error about not being able to build native extensions....any ideas on that one?
<xpitr> apt install libmysqld-dev
<jhass> libmysqlclient-dev or libmariadbclient-dev
djellemah_ has joined #ruby
<xpitr> lucky you have error message. i had gem install stuck for hour before i realized it silently fails and tries again over and over
<Danny__> lol
yfeldblum has joined #ruby
<Danny__> thanks guys! trying now
djellemah has quit [Ping timeout: 240 seconds]
_djbkd has quit [Remote host closed the connection]
<Danny__> hmm...still getting the error. here's a screenshot: https://cl.ly/1w3V2j1D2s1E
cyphase has joined #ruby
<xpitr> how did you install ruby?
<xpitr> you need one of the libruby-dev
<Danny__> sudo apt-get install ruby
<xpitr> its hella outdated btw. rvm.io if you want recent without this pain
<Danny__> how do i do that
jmignault has quit [Remote host closed the connection]
ec0 has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 244 seconds]
<xpitr> in short: curl -sSL https://get.rvm.io/ | bash -s stable
JeanCarloMachado has joined #ruby
MarkBilk_ has joined #ruby
AzureStigma has quit [Quit: Gotta run..]
<xpitr> or for now try apt install ruby-dev
<xpitr> but really, rvm is nice :3
<xpitr> then rvm get head ; rvm install ruby-2.3.1
blackmesa has joined #ruby
<Danny__> installed rvm and ruby, same error
jondot has quit [Quit: Leaving.]
<xpitr> you're still using this 1.9.1 from apt
<Danny__> how do i change?
<havenwood> Danny__: When you use `sudo` it's dropping your environment, and along with it the RVM environment variables.
<jhass> ?abi xpitr
<ruby[bot]> xpitr: Each Ruby release has actually two versions, the interpreter version and the ABI version. The interpreter version is what commonly is referred to, like 2.1.5. The ABI version is for the binary interface used by compiled extensions and it is what you see in your paths. It's shared among one re
<ruby[bot]> lease series, for example for the Ruby versions 2.1.0 to 2.1.5 the ABI version is 2.1.0.
<xpitr> rvmsudo prevents that iirc. or just don't install with sudo
<xpitr> or better yet, use bundler and install to project's dir
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> Danny__: Don't use `sudo` to install gems with RVM. If you need sudo without dropping the RVM environment, there's `rvmsudo`.
<Danny__> gotcha
<Danny__> that worked!
killerkamel has quit [Ping timeout: 252 seconds]
<xpitr> ruby 1.9.1 is over 7 years old, heh
<jhass> it's 1.9.3
TPug has joined #ruby
<jhass> still old, but to be correct
pawnbox has quit [Remote host closed the connection]
symm- has joined #ruby
pawnbox has joined #ruby
<xpitr> oh i see. this ubuntu version is weird. named after abi, yes? >>Inst ruby1.9.1 (1.9.3
goofy has joined #ruby
<jhass> yes
<ytti_> it's because dpkg, rpm etc have not been designed to support multiple versions
jhack has joined #ruby
<xpitr> i should use nix :P
hipertracker has quit [Quit: hipertracker]
yfeldblum has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
TomyLobo has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
ec0 has joined #ruby
blackgoat has joined #ruby
nankyokusei has joined #ruby
Danny__ has quit []
borodin has quit [Ping timeout: 250 seconds]
swills_ has quit [Quit: Leaving]
chouhoul_ has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
Guest13 has joined #ruby
govg has quit [Remote host closed the connection]
LBRapid has quit [Ping timeout: 250 seconds]
Guest13 has left #ruby [#ruby]
chouhoulis has quit [Ping timeout: 240 seconds]
LBRapid has joined #ruby
GodFather has joined #ruby
gregf1 is now known as gregf
ur5us has joined #ruby
GodFather has quit [Max SendQ exceeded]
rajdesai has quit [Remote host closed the connection]
GodFather has joined #ruby
_djbkd has joined #ruby
nerium has quit [Quit: nerium]
symm- has joined #ruby
OTORelic1 has joined #ruby
vuoto has quit [Remote host closed the connection]
zyriuse has joined #ruby
<zyriuse> hy all
<zyriuse> i've a question
OTORelic has quit [Ping timeout: 250 seconds]
ur5us has quit [Ping timeout: 260 seconds]
<tvon> An oft repeated phrase is "Don't ask to ask, just ask".
<zyriuse> i create file with different methode like ( select_mysql, update_mysql etc..)
jaguarmagenta has joined #ruby
<zyriuse> what i try to do is to call only the methode for example select_mysql and return the value
synthroid has quit []
killerkamel has joined #ruby
<toretore> ?gist-usage zyriuse
minotep has joined #ruby
<zyriuse> toretore: sorry :)
AzureStigma has joined #ruby
icarus has quit [Ping timeout: 244 seconds]
icarus has joined #ruby
<jhass> what's the question?
<aeruder> i think the answer is change the last line to s = StreamMysql.new; puts s.mysql_select("foo").inspect
ta_ has joined #ruby
djellemah_ is now known as djellemah
zyriuse_ has joined #ruby
<zyriuse_> excuse me
<zyriuse_> maybe i m confuse
davorb has joined #ruby
jdawgaz has joined #ruby
zyriuse has quit [Ping timeout: 250 seconds]
jdawgaz has quit [Client Quit]
dminuoso has joined #ruby
last_staff has quit [Remote host closed the connection]
last_staff has joined #ruby
<xpitr> tvon i prefer "asking for asking is asking for axing" :3
<tvon> That does have a certain ring to it
joonty has joined #ruby
vdamewood has quit [Quit: Life beckons.]
jdawgaz has joined #ruby
killerkamel has quit [Ping timeout: 258 seconds]
dminuoso has quit [Ping timeout: 252 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kith_ has joined #ruby
ur5us has joined #ruby
kith has quit [Ping timeout: 258 seconds]
Coldblackice has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
banisterfiend has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
Limix has quit [Quit: Limix]
chouhoulis has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 244 seconds]
MaraJade has joined #ruby
s2013 has joined #ruby
dionysus70 has joined #ruby
dionysus70 has quit [Remote host closed the connection]
Coldblackice has joined #ruby
s2013 has quit [Client Quit]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
dionysus70 is now known as dionysus69
meeto has quit [Remote host closed the connection]
yfeldblum has joined #ruby
nerium has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
ldnunes has quit [Quit: Leaving]
gdonald has quit [Read error: Connection reset by peer]
hipertracker has joined #ruby
<MaraJade> Hey guys, I have a require error I can't figure out: https://pastebin.osuosl.org/41256/ The source of the error is this file: https://github.com/osuosl/rimesync/blob/develop/lib/rimesync.rb, which is being imported into here: https://github.com/osuosl/fenestra/blob/issues/31/timesync_widget/jobs/example.rb. Can anyone help me figure out what's going wrong?
gdonald has joined #ruby
<havenwood> MaraJade: You might need to install the gem deps for the project by running `bundle` from the rimesync root dir.
<baweaver> MaraJade: Install bcrypt
macsteps has quit [Remote host closed the connection]
<havenwood> MaraJade: If you weren't using a project with a Gemfile, you'd just: gem install bcrypt
<baweaver> ^
framling has quit [Remote host closed the connection]
skade has joined #ruby
<MaraJade> I've done that, but it still gives me the error
<MaraJade> I bundle installed, I gem installed, I installed from several different locations... It just doesn't seem to want to work
hahuang61 has joined #ruby
<havenwood> MaraJade: Confirm you've installed bundler with the RVM Ruby you're using for this project.
icarus has quit [Ping timeout: 240 seconds]
<havenwood> MaraJade: gem which bundler
<havenwood> MaraJade: which bundle
<havenwood> MaraJade: You may need to: gem install bundler
<havenwood> (Presuming you're indeed bundling but using a bundler binary from a different version of Ruby.)
<MaraJade> Those result in "/home/goossenm/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler.rb" and "/home/goossenm/.rvm/gems/ruby-2.2.2/bin/bundle"
icarus has joined #ruby
tvon has quit [Quit: System is sleeping...]
millerti has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
rodfersou has quit [Quit: leaving]
<havenwood> MaraJade: And what command are you running to get the error?
<MaraJade> havenwood: "dashing start"
<havenwood> MaraJade: And same Ruby with?: gem which dashing
<havenwood> MaraJade: Confirm same error with?: bundle exec dashing start
minimalism has joined #ruby
<MaraJade> Yep. Ruby 2.2.2 for all of them, bundle exec dashing start results in the same error
Derperperd has joined #ruby
l4v2 has joined #ruby
<havenwood> MaraJade: Is bcrypt in your Gemfile? Can you link to the Gemfile you're using? (It seems it's not exactly the same as the one on the Githubs you linked to.)
<MaraJade> This is rimesync's gemfile, but I changed the ruby version to 2.2.2 to see if that would help: https://github.com/osuosl/rimesync/blob/develop/Gemfile
<MaraJade> bcrypt is in there
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
zacts has joined #ruby
Sembei has joined #ruby
wrkrcoop has joined #ruby
<wrkrcoop> anyone know if Swift is hard?
zyriuse_ has quit [Ping timeout: 250 seconds]
byteflame has quit [Ping timeout: 244 seconds]
<havenwood> MaraJade: Distracted at the moment but confirm the dir where you're running the command from has the Gemfile with bcrypt. Did you add this gem to the dashboard project?
<havenwood> wrkrcoop: Give it a try!
<adaedra> wrkrcoop: #ruby-offtopic is the other door ;)
<MaraJade> havenwood: The gemfile that I'm running it from doesn't have it, actually. Let me try that...
nogic has joined #ruby
nogic has quit [Max SendQ exceeded]
<MaraJade> Hey that worked!
<MaraJade> Alright, so I just had to add all the gems to the top project's gemfile, and now it works
<MaraJade> Thanks for the help
<havenwood> You're welcome, happy coding!
nogic has joined #ruby
nogic has quit [Max SendQ exceeded]
MaraJade has left #ruby [#ruby]
nogic has joined #ruby
AzureStigma is now known as AzureStigma|Away
AzureStigma|Away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jrafanie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ChiefAlexander has joined #ruby
ChiefAlexander has quit [Client Quit]
nettoweb has quit [Ping timeout: 240 seconds]
Log1x has quit [Ping timeout: 260 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AzureStigma has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
last_staff has quit [Quit: last_staff]
Dysp has joined #ruby
<Dysp> Hi! Is there any destructive alternative to drop?
sp3 has joined #ruby
skweek has joined #ruby
<jhass> .tap(&:shift) ?
anisha has quit [Quit: This computer has gone to sleep]
MarkBilk__ has joined #ruby
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
skade has quit [Ping timeout: 244 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.5]
SilverKey has joined #ruby
hipertracker has quit [Quit: hipertracker]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz_ has quit [Ping timeout: 244 seconds]
MarkBilk_ has quit [Ping timeout: 250 seconds]
bzb has joined #ruby
dminuoso has joined #ruby
guacamole has quit [Quit: leaving]
fergal has quit [Quit: fergal]
guacamole has joined #ruby
dminuoso has quit [Ping timeout: 250 seconds]
hipertracker has joined #ruby
minotep has quit [Ping timeout: 244 seconds]
zacts has joined #ruby
guacamole has quit [Client Quit]
rajdesai has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
jenrzzz has joined #ruby
mlehrer has quit [Ping timeout: 276 seconds]
mlehrer has joined #ruby
zacts has quit [Read error: Connection reset by peer]
swills_ has joined #ruby
zacts has joined #ruby
<Dysp> Okay, maybe I am a serious retard.
<Dysp> But how is
<Dysp> self.map! { |x| (x - self.max.abs) * -1.0 }
<Dysp> not the same as
<Dysp> self.map! { |x| x - self.max.abs}
<Dysp> followed by
guacamole has joined #ruby
<Dysp> self.map! { |x| x * -1.0}
<Dysp> Doing two maps work, doing the first one doesnt.
dvinciguerra has quit [Read error: Connection reset by peer]
<jhass> self.max changes within the loop as you modify the array
<Dysp> I actually just thought so
guacamole has quit [Client Quit]
<Dysp> Sometimes you just need to ask the right question to understand what is wrong
<Dysp> Thank you nevertheless
<aeruder> honestly i think even the self.map! { |x| x - self.max.abs } may not work for all inputs
<jhass> ^
<aeruder> you should capture it first anyway
<Dysp> I will
tvon has joined #ruby
<jhass> so a third variant that _I guess_ is closer to what you want and doesn't just work by accident is max = self.max.abs; map! {|x| (x - max) * -1.0 }
guacamole has joined #ruby
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
guacamole has quit [Client Quit]
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<Dysp> Yes. Got it. Thank you
guacamole has joined #ruby
ensyde has joined #ruby
macsteps has joined #ruby
QORRiE has quit [Quit: Leaving]
<Dysp> Can this be written more beautifully? And how?
jdawgaz has joined #ruby
<Dysp> And by beautifully, I mean.. with less code and more Rubyish
skweek has quit [Ping timeout: 250 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lupine> buh
<jhass> >> :"L#{1+1}"
<ruby[bot]> jhass: # => :L2 (https://eval.in/615479)
<lupine> in short: yes
<jhass> idk what's up with all the intermediate hashes
<Dysp> Like?
<lupine> or the counters
Pumukel has joined #ruby
Log1x has joined #ruby
<jhass> raw_data is a terrible method/local variable name
<jhass> what is the data about/what does it represent?
<Dysp> Haha, yes. I really have a difficult time naming data.
<Dysp> But this is a calculation that are very specific to only one type of data
macsteps has quit [Ping timeout: 258 seconds]
<Dysp> So all the code written here will not be used to do anything to anything else but that data.
<lupine> so move this code into that type?
<baweaver> &ri Enumerable#group_by
<jhass> Dysp: doesn't matter
<Dysp> So much to learn
<Dysp> :D
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lupine> it's solidly procedural
<lupine> I recommend a course of POODR and Clean Code
<Dysp> I've actually read poodr.
<lupine> ah, but did you internalise it?
<Dysp> internalise?
<Papierkorb> Dysp: Enumerable#partition could be worth a look too for this case
<lupine> reconstruct your mental models and thought processes in light of its contents
joonty has quit [Quit: This computer has gone to sleep]
<Dysp> Yes and no. Since I am learning to program, I don't really have a mental model yet. It's more like learning by doing.
SilverKey has quit [Quit: Halted.]
<lupine> for wonky stuff I sometimes start from procedural code ands refine it, myself, but it's relatively rare
<baweaver> kicks.group_by(&:type)
<Dysp> I've definetly understood some key parts and some I didn't. Time will come for a reread. You can only read so much before actually practicing.
<lupine> clean code talks in java but it's still a worthwhile read
<Dysp> Gotta actually start to code before I can refine the ability ^^
<Dysp> I've noted down all other suggestions, by the way. Will read up on them.
Log1x has quit [Ping timeout: 276 seconds]
<lupine> yeah, my first game was tetris. I worked out the matrix transforms for piece rotation in advance, in giant case tables
<lupine> it worked, but it wasn't pretty :D
GodFather has quit [Read error: Connection reset by peer]
<Dysp> Haha. That's the way! And the same approach I have, I believe.
<Dysp> Sometimes you just gotta get something to work to feel successful. Then you can improve.
bzb has quit [Remote host closed the connection]
<Dysp> I've been on this channel for 5 months or so now
zach2825 has joined #ruby
GodFather has joined #ruby
<zach2825> hi does anybody here know how to install the Process module?
GodFather has quit [Read error: Connection reset by peer]
<Dysp> And I've been working on the exact same program/script. It has been rewritten 3 times so far. Doing the exact same, but slow implements better ideas and concepts.
nankyokusei has joined #ruby
<zach2825> i keep getting this error uninitialized constant Process::CLOCK_REALTIME (NameError)
TPug has joined #ruby
<lupine> anyway, code generally belongs with the data it's operating on, which is the point baweaver is also making, I think.
<jhass> zach2825: it's a core ruby class, it should be just available
Rickmasta has joined #ruby
<lupine> not all platforms will have a realtime clock, will they?
<jhass> that probably means your Ruby version is too old, it was a fairly recent addition iirc, 2.2 or 2.3
<baweaver> More of saying this is as simple as a one liner, and not to worry about complicating it with objects unless you really need to.
<zach2825> what the hek then. im really starting to HATE ruby
<Dysp> I have class that represents some data type; in this class I do all the calculations. I've started to actually move some of the functions that could be useful elsewhere to modules, which is a big improvement. But I guess the correct way is more classes
Log1x has joined #ruby
Log1x has quit [Changing host]
Log1x has joined #ruby
<lupine> it's a oneliner once you move the discriminatory code into the class
<Dysp> I just fail to recognize those cases. Also duck types got me confused.
<lupine> get_kick_type(d) => d.type, etc
<jhass> Dysp: what do you actually need the :Lxx or :Rxx keys for? you'll hardly have a literal :L123 in your code later on, right? (which means symbols are the wrong choice)
<Dysp> Each key represents a "kick".
<Dysp> So eventually I will call the specific kick data from the hash using the key
<jhass> is the group_by result enough? ({:left_kick => [series_a, series_c], :right_kick => [series_b, series_d]})
<zach2825> jhass: thank you just running "rvm get stable" to update and try that resolution
<Dysp> Let me show you how an object looks when done
<Dysp> With zero formatting
<lupine> Dysp: is there any reason why the key needs to be that specific format? does it matter if you use, I dunno, object_id instead?
chouhoulis has quit [Ping timeout: 276 seconds]
bzb has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
<Dysp> moment. Making it readable
<Dysp> Just a bit
solars has quit [Ping timeout: 240 seconds]
<jhass> just write it readable in the first place! ;)
<Radar> ^
spudowiar has joined #ruby
<Dysp> haha
<Dysp> Its not code
<Dysp> Its output
<jhass> so why the :Lx, why not a plain array?
<Dysp> Because I need to know which kick it is.
<jhass> btw the code you've shown wouldn't produce that
<jhass> also did you monkeypatch normalize! into hash then?
<lupine> they look perfectly well generatable on the fly
<Dysp> Oh I know. This output is from an older version.
<Dysp> Into array
<lupine> your outputter can do the thing
<Dysp> I am using this output to write tests (first time!) to actually build it again from scratch
<lupine> and then you can use an array, which will preserve order :D
byteflame has joined #ruby
<Dysp> Yes and no
<jhass> .each_with_index(1) {|kick, i| puts "L#{i}: #{kick.inspect}" }
<Dysp> Its a little complicated
polishdub has quit [Quit: Leaving]
<Dysp> My input data (an excel sheets) doesn't explicitly show which leg nor which order the kicks are performed in.
spider-mario has quit [Remote host closed the connection]
<Dysp> I guess they do a little bit, however I cannot rely on written strings by humans
<Dysp> So I analyze the data and from this I can determine the kick, but never the sequence.
<Dysp> It's a little complicated and I am a big newb
mgorbach has quit [Quit: ZNC - http://znc.in]
<jhass> structure your data so it's easiest to consume by your program, defer any formatting for the human to the latest point possible, ideally directly in the output producing code
mgorbach has joined #ruby
<jhass> those :Lxx keys don't look easily consumable by a program
<Dysp> How come not?
jenrzzz has quit [Ping timeout: 250 seconds]
<Dysp> I mean, what am I "losing" to do it this way? Does it take longer to compute?
rajdesai has quit [Remote host closed the connection]
<jhass> possibly, at least it takes more memory
<lupine> Dysp: presumably you're sorting at some point?
Apocalypse has joined #ruby
<Dysp> Sorting?
<Dysp> I know what sorting means. But what would I sort?
<lupine> the output. so it goes L1, then L2, then L3, etc
<Dysp> Hm. It never outputs per se
axl__ has joined #ruby
JeanCarloMachado has joined #ruby
<Dysp> It should simply produces an object with @data = what-you-saw
[Butch] has quit [Quit: I'm out . . .]
<Dysp> And then I will be using rails to take care of that object
<Dysp> ... I think
axl__ has quit [Read error: Connection reset by peer]
<Dysp> :D
<lupine> so the IDs are never used?
kavanagh has joined #ruby
<zach2825> how do you tell bundle install to use the new version of ruby 2.2?
axl_ has quit [Ping timeout: 264 seconds]
jhack has quit [Quit: jhack]
<Dysp> Well, I havent researched at all into database and such
<Radar> zach2825: depends on what you're using to manage your Ruby versions
<zach2825> on a linux(ubuntu) server
<Dysp> But I was thinking to serialize the object into a database, then to receive the whole object whenever it is need.
<Radar> zach2825: rvm? rbenv? chruby? basic Ubuntu apt-get install?
<Dysp> So yes, I will be using the ids/symbols to correctly refer to the kick I want
gregf has quit [Quit: WeeChat 1.4]
SCHAAP137 has joined #ruby
jhack has joined #ruby
axl_ has joined #ruby
<Dysp> I do like these conversations. It help me understand the world of programming. But I the probability of me picking the most efficient and optimized way of doing things are slim. I am simply building a prototype to present to my bosses, so I can hopefully get funding to supervise a redevelopment with 'real' developers.
rajdesai has joined #ruby
solars has joined #ruby
<Dysp> They help*
RegulationD has quit [Remote host closed the connection]
AzureStigma is now known as AzureStigma|Away
<Dysp> And the objects serialized are rather small, so I don't think it matters much how I store the data. As long as it works.
bluOxigen has quit [Ping timeout: 252 seconds]
<Dysp> The calculations are what take the time. But that is a problem I will deal with whenever I get the rails part going.
gregf has joined #ruby
bluOxigen has joined #ruby
killerkamel has joined #ruby
bzb has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 260 seconds]
aep-shoutlet has quit [Quit: Connection closed for inactivity]
axl_ has quit [Ping timeout: 258 seconds]
saneax_AFK is now known as saneax
dionysus69 has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
rajdesai has quit [Remote host closed the connection]
xxneolithicxx has joined #ruby
firstdayonthejob has quit [Ping timeout: 265 seconds]
AzureStigma|Away is now known as AzureStigma
AzureStigma is now known as AzureStigma|Away
passbe has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dminuoso has joined #ruby
nogic has quit [Ping timeout: 250 seconds]
slash_me has quit [Quit: leaving]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
whathappens has quit [Quit: Leaving...]
jenrzzz has joined #ruby
ecnalyr has quit [Remote host closed the connection]
rajdesai has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
Devalo has quit [Ping timeout: 258 seconds]
dminuoso has quit [Ping timeout: 250 seconds]
rajdesai has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
rajdesai has joined #ruby
OTORelic1 has quit [Ping timeout: 244 seconds]
rajdesai has quit [Remote host closed the connection]
bkxd has joined #ruby
AzureStigma|Away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
M-shine has quit [Ping timeout: 250 seconds]
M-manveru has quit [Ping timeout: 244 seconds]
bkxd has quit [Ping timeout: 250 seconds]
xcyclist has joined #ruby
TheGillies has quit [Ping timeout: 264 seconds]
M-mistake has quit [Ping timeout: 260 seconds]
_djbkd has joined #ruby
rajdesai has joined #ruby
jaguarmagenta has joined #ruby
ElFerna has joined #ruby
leea has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rajdesai has quit [Remote host closed the connection]
leea has quit [Client Quit]
macsteps has joined #ruby
cdg has quit [Remote host closed the connection]
SilverKey has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
jhack has quit [Quit: jhack]
hahuang61 has joined #ruby
ElFerna has quit [Ping timeout: 276 seconds]
macsteps has quit [Remote host closed the connection]
macsteps has joined #ruby
SCHAAP137 has quit [Quit: Exiting...]
d0nn1e has quit [Ping timeout: 265 seconds]
hipertracker_ has joined #ruby
d0nn1e has joined #ruby
dhodgkin has left #ruby ["Leaving"]
hipertracker has quit [Ping timeout: 264 seconds]
hipertracker_ is now known as hipertracker
hahuang61 has quit [Ping timeout: 258 seconds]
agent_white has quit [Quit: leaving]
rajdesai has joined #ruby
rajdesai has quit [Remote host closed the connection]
AzureStigma has joined #ruby
griffindy has joined #ruby
Gasher has quit [Quit: Leaving]
_djbkd has quit [Remote host closed the connection]
Jayson_Virissimo has joined #ruby
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
craysiii has joined #ruby
craysiii has quit [Client Quit]
_djbkd has joined #ruby
postmodern has joined #ruby
equivalent8 has joined #ruby
byteflame has quit [Ping timeout: 250 seconds]
<equivalent8> Hi guys I've just published article on Ruby Enumerators / Enumerable and how to use them in collection classes that map your domain, if interested here is a link -> http://www.eq8.eu/blogs/28-ruby-enumerable-enumerator-lazy-and-domain-specific-collection-objects
<baweaver> equivalent8: s/squize/squeeze/
gdonald has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Quit: Lost terminal]
<baweaver> lots of typos
leea has joined #ruby
<baweaver> you should proofread that and run it through a spellchecker
<drbrain> equivalent8: I thiny you want a ; not a , for mfu = Membership.new.tap { |m| m.type = 'free', m.owner = nil }
<baweaver> that and a lot of grammatical errors
equivalent8_ has joined #ruby
gdonald has joined #ruby
RegulationD has joined #ruby
koooge has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
JeanCarloMachado has joined #ruby
SilverKey has quit [Quit: Cheerio!]
equivalent8 has quit [Ping timeout: 250 seconds]
<drbrain> equivalent8: your explanation of lazy is pretty good
<equivalent8_> thank you :) much appreciated
<drbrain> I might move the "consume all memory" explanation higher since it's the main reason you would use lazy
deimos__ is now known as deimos
<equivalent8_> good point I'll put it in bold
RegulationD has quit [Ping timeout: 276 seconds]
sebstrax has quit [Quit: Connection closed for inactivity]
<equivalent8_> thank you again for feedback, I'm going to sleep, took me 5 hours to finish it ;) good night everybody
JeanCarloMachado has quit [Remote host closed the connection]
icarus has quit [Quit: leaving]
gusrub has joined #ruby