havenwood changed the topic of #ruby to: Rules & more: http://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/
postmodern has joined #ruby
whathapp_ has quit [Quit: Leaving...]
horaceheaven has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmesa has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
<|2701> >> (1..100).to_a.combinations(3).select{|a,b,c| (a*a)+(b*b)==(c*c)}
devyn has joined #ruby
<kaleido> rubybot bein rude this evening
<|2701> in case you want to get nerdy and find some right triangles
|2701 has quit [Changing host]
|2701 has joined #ruby
|2701 has joined #ruby
<|2701> gotta be ident'd, should work now
jenrzzz has quit [Ping timeout: 260 seconds]
<|2701> >> (1..100).to_a.combinations(3).select{|a,b,c| (a*a)+(b*b)==(c*c)}
<ruby[bot]> |2701: # => undefined method `combinations' for #<Array:0x421b1920> ...check link for more (https://eval.in/572321)
<|2701> >> (1..100).to_a.combination(3).select{|a,b,c| (a*a)+(b*b)==(c*c)}
<ruby[bot]> |2701: # => [[3, 4, 5], [5, 12, 13], [6, 8, 10], [7, 24, 25], [8, 15, 17], [9, 12, 15], [9, 40, 41], [10, 24, 26 ...check link for more (https://eval.in/572322)
labaleine has quit [Ping timeout: 276 seconds]
moeabdol has joined #ruby
davedev24 has quit []
rkazak has joined #ruby
replay has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
jancel has joined #ruby
drewo has joined #ruby
idefine has joined #ruby
stannard has joined #ruby
marr has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
idefine has quit [Ping timeout: 276 seconds]
jancel has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 260 seconds]
hackeron has quit [Ping timeout: 276 seconds]
KINGSABRI has quit [Ping timeout: 250 seconds]
<shevy> wrkrcoop you can define them like: module Foo; def self.foo; puts 'hi from foo()'; end; def foo; Foo.foo; end; end; Foo.foo
KINGSABRI has joined #ruby
Nanuq has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
ixti has quit [Quit: WeeChat 1.5]
nankyokusei has joined #ruby
saneax is now known as saneax_AFK
karmatr0n has quit [Ping timeout: 260 seconds]
Nanuq has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Read error: No route to host]
CloCkWeRX has joined #ruby
Azure has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
hackeron has joined #ruby
arescorpio has joined #ruby
joneshf-laptop has quit [Ping timeout: 246 seconds]
djbkd has quit [Quit: My people need me...]
jhack has joined #ruby
roshanavand_ has quit [Quit: This computer has gone to sleep]
govg has quit [Ping timeout: 260 seconds]
nareiber has joined #ruby
govg has joined #ruby
dsea has quit [Read error: Connection reset by peer]
wolffles has quit [Quit: wolffles]
jancel has joined #ruby
chouhoulis has quit [Remote host closed the connection]
roshanavand_ has joined #ruby
jhack has quit [Ping timeout: 276 seconds]
dsea has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
zeroDi has quit [Quit: WeeChat 1.5]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
swills has joined #ruby
sneakerhax has quit [Ping timeout: 246 seconds]
skolman_ has quit [Remote host closed the connection]
skolman_ has joined #ruby
amclain has quit [Quit: Leaving]
idefine has quit [Ping timeout: 260 seconds]
der-landgraf has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
skolman_ has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
der-landgraf has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
someish has joined #ruby
idefine has joined #ruby
<someish> Why do I have to write application_results[“app_name”][0][0] to get the first result for that particular “app_name”? Why doesn’t the code I wrote allow me to access it like this application_results[“app_name”][0] … https://gist.github.com/saturday/64daae33bd3050885b7c45a03fc410b4
qasaur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaxter has quit [Read error: Connection reset by peer]
skweek has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
hahuang65 has quit [Ping timeout: 276 seconds]
psf has quit [Changing host]
psf has joined #ruby
idefine has quit [Ping timeout: 252 seconds]
xall has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 252 seconds]
zigzag_ has joined #ruby
emptyflask has quit []
govg has joined #ruby
idefine has joined #ruby
hahuang65 has joined #ruby
ropeney has joined #ruby
idefine has quit [Ping timeout: 260 seconds]
<Radar> someish: because you're using the shovel operator
<Radar> observe this
<Radar> a = []; a << [1]
<Radar> >> a = []; a << [1]
<ruby[bot]> Radar: # => [[1]] (https://eval.in/572328)
<Radar> >> a = []; a += [1]
<ruby[bot]> Radar: # => [1] (https://eval.in/572329)
hellcode has joined #ruby
<someish> Radar: Thanks. I’ll read up.
xall has joined #ruby
ruby-lang194 has joined #ruby
govg has quit [Ping timeout: 244 seconds]
OTORelic has joined #ruby
govg has joined #ruby
idefine has joined #ruby
AndroidLoverInSF has quit [Ping timeout: 240 seconds]
kasisnu has quit [Remote host closed the connection]
kasisnu has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
kasisnu_ has joined #ruby
kasisnu__ has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
kasisn___ has joined #ruby
A5101 has joined #ruby
rbennacer has joined #ruby
kasis____ has joined #ruby
kasisnu has quit [Ping timeout: 244 seconds]
idefine has quit [Ping timeout: 250 seconds]
kasisnu has joined #ruby
kasisnu_ has quit [Ping timeout: 276 seconds]
zigzag__ has joined #ruby
joneshf-laptop has joined #ruby
kasisnu__ has quit [Ping timeout: 252 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
kasisnu_ has joined #ruby
kasisn___ has quit [Ping timeout: 240 seconds]
zigzag__ has quit [Client Quit]
kasis____ has quit [Ping timeout: 260 seconds]
wigust has quit [Remote host closed the connection]
kasisnu has quit [Ping timeout: 276 seconds]
kasisnu_ has quit [K-Lined]
OTORelic has quit [Read error: Connection reset by peer]
OTORelic has joined #ruby
tannarchy has joined #ruby
zigzag_ has quit [Quit: Page closed]
blackmesa has quit [Ping timeout: 260 seconds]
roshanavand_ has quit [Quit: This computer has gone to sleep]
yqt has quit [Ping timeout: 260 seconds]
karmatr0n has joined #ruby
ruby-lang194 has quit [Ping timeout: 250 seconds]
Nahra has quit [Ping timeout: 244 seconds]
tannarchy has quit [Quit: leaving]
jaguarmagenta has joined #ruby
oetjenj has quit [Ping timeout: 244 seconds]
jancel has quit [Ping timeout: 260 seconds]
LoneHerm_ has joined #ruby
oetjenj has joined #ruby
jancel has joined #ruby
tannarchy has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
der-landgraf has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
ponga has quit []
LoneHerm_ has quit [Ping timeout: 246 seconds]
rbennacer has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
FooMunki has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
tannarchy has quit [Client Quit]
idefine has quit [Ping timeout: 244 seconds]
tannarchy has joined #ruby
tannarchy has quit [Client Quit]
horaceheaven has quit [Quit: horaceheaven]
fmcgeough has joined #ruby
rbennacer has joined #ruby
idefine has joined #ruby
nsuria has joined #ruby
raz has left #ruby ["*fump*"]
whathappens has joined #ruby
OTORelic has quit [Ping timeout: 260 seconds]
moeabdol has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
der-landgraf has joined #ruby
idefine has joined #ruby
OTORelic has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
halfamind has quit [Quit: Leaving.]
moeabdol has quit [Ping timeout: 260 seconds]
banister has joined #ruby
nsuria has quit [Quit: nsuria]
jancel has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 252 seconds]
kies has quit [Ping timeout: 252 seconds]
mosez has quit [Ping timeout: 265 seconds]
mosez has joined #ruby
lucidity has joined #ruby
idefine has joined #ruby
lucidity has quit [Client Quit]
Akuma has joined #ruby
FooMunki has quit [Quit: FooMunki]
aphprentice has quit [Quit: Connection closed for inactivity]
FooMunki has joined #ruby
idefine has quit [Ping timeout: 260 seconds]
nerium has quit [Read error: Connection reset by peer]
nerium has joined #ruby
FooMunki has quit [Ping timeout: 276 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
fmcgeough has quit [Quit: fmcgeough]
nerium has quit [Client Quit]
jackjackdripper has quit [Quit: Leaving.]
youch has joined #ruby
stannard has quit [Remote host closed the connection]
jancel has joined #ruby
sumobob has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
kies has joined #ruby
ta_ has joined #ruby
agarie has joined #ruby
agarie has quit [Client Quit]
replay has quit []
idefine has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
nanoz has joined #ruby
arlek has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 252 seconds]
nankyokusei has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
jancel has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 252 seconds]
jancel has joined #ruby
|ifei5g00d has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
jancel has quit [Ping timeout: 244 seconds]
halfamind has joined #ruby
allcentury has joined #ruby
stardiviner has joined #ruby
nerium has joined #ruby
<nerium> Is there another way of checking the current ruby version then RUBY_VERSION?
<hellcode> ruby --version
|ifei5g00d has joined #ruby
<nerium> Sorry, I ment in a script
LoneHerm_ has joined #ruby
jancel has joined #ruby
Slackman1 has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
<nerium> Is there a way to define dependencies based on ruby version?
<nerium> in a gemspec
<pipework> nerium: `ruby --version`
<pipework> nerium: I think you can publish a gemspec for each ruby version constraint,maybe.
<hellcode> lol
<pipework> >> `ruby --version`
<ruby[bot]> pipework: # => (https://eval.in/572344)
<nerium> Having to parse that output feels really error pone
<nerium> *pron
<nerium> There must be a better way
serafin88 has joined #ruby
LoneHerm_ has quit [Ping timeout: 246 seconds]
<serafin88> Hello Pals, I newbie with Ruby
idefine has joined #ruby
PlasmaStar has quit [Ping timeout: 250 seconds]
wilbert has joined #ruby
akiTendo has quit [Quit: akiTendo]
tmtwd has quit [Quit: Leaving]
serafin88 has quit [Quit: Leaving]
PlasmaStar has joined #ruby
LinuxHippie has joined #ruby
idefine has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
halfamind has quit [Quit: Leaving.]
zacts has quit [Quit: WeeChat 1.4]
nekomune has joined #ruby
halfamind has joined #ruby
<morenoh149> I'm using homebrew to install chruby. but I can't call it from the terminal?
<morenoh149> do I have path issues?
<morenoh149> homebrew say chruby is already installed. I reinstalled it using homebrew as well.
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<someish> morenoh149: Did you try restarting the terminal?
Akuma has quit [Quit: So long sukkas!]
<pipework> morenoh149: Did you `brew info chruby`?
<pipework> Gotta read the output bruh
<morenoh149> no the problem is more fundamental. Why is a homebrew package not executable from the terminal? must be path issue
<morenoh149> brew info chruby prints instructions I already followed
codeurge has joined #ruby
<morenoh149> I opened a new terminal and sourced my .zshrc file multiple times
<Arcaire> cat ~/.zshrc | curl -F "sprunge=<-" https://sprunge.us/
<Arcaire> http apparently, not https
<Arcaire> we live in 2013
Kallis has joined #ruby
braincras has quit [Quit: bye bye]
stardiviner has quit [Ping timeout: 240 seconds]
jancel has quit [Remote host closed the connection]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
c355e3b has quit [Quit: Connection closed for inactivity]
Nice_BikeMaN has joined #ruby
|2701 has quit [Quit: Connection closed for inactivity]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
gix has quit [Ping timeout: 265 seconds]
braincrash has joined #ruby
<morenoh149> what about this openssl stuff?
<morenoh149> ERROR: While executing gem ... (Gem::Exception)
<morenoh149> Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
<Nice_BikeMaN> Does anyone know if the Ruby and Rails plugin will work for Netbeans 8.0.2?
gix has joined #ruby
gheegh has quit [Ping timeout: 240 seconds]
zast has joined #ruby
stannard has joined #ruby
zast has left #ruby [#ruby]
moeabdol has joined #ruby
p1k has joined #ruby
hydr8d has joined #ruby
OTORelic has quit [Read error: Connection reset by peer]
ruskie has quit [Excess Flood]
OTORelic has joined #ruby
karmatr0n has quit [Read error: Connection reset by peer]
Nice_BikeMaN has quit [Quit: Leaving]
Insti has quit [Ping timeout: 246 seconds]
jackjackdripper has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
karmatr0n has joined #ruby
Insti has joined #ruby
govg has quit [Quit: leaving]
govg has joined #ruby
stardiviner has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
nando293921 has joined #ruby
Coldblackice has quit [Ping timeout: 260 seconds]
chosen1 has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
xall has quit [Ping timeout: 250 seconds]
mooe has quit [Quit: Connection closed for inactivity]
theRoUS` is now known as theRoUS
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
whathappens has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
whathappens has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 240 seconds]
karmatr0n has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
chopin has joined #ruby
morenoh149 has quit [Ping timeout: 276 seconds]
Kallis has quit [Read error: Connection reset by peer]
moeabdol has quit [Ping timeout: 276 seconds]
allcentury has quit [Ping timeout: 240 seconds]
A5101 has quit [Ping timeout: 244 seconds]
ruskie has joined #ruby
lxsameer has joined #ruby
agent_white has joined #ruby
rbennacer has quit [Remote host closed the connection]
<agent_white> Evenin'
gregf has quit [Ping timeout: 244 seconds]
zzak has quit [Remote host closed the connection]
zzak has joined #ruby
ledestin has quit [Ping timeout: 246 seconds]
rbennace_ has joined #ruby
ledestin has joined #ruby
bluOxigen_ has joined #ruby
bluOxigen_ has left #ruby [#ruby]
karmatr0n has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
kgrz has joined #ruby
someish has quit [Quit: someish]
jaguarmagenta has quit [Remote host closed the connection]
someish has joined #ruby
someish has quit [Client Quit]
bazzy has quit [Quit: ZNC - http://znc.in]
jaguarmagenta has joined #ruby
rbennace_ has quit [Ping timeout: 276 seconds]
bazzy has joined #ruby
hellcode has quit [Quit: goodbye cruel internet]
kareeoleez has joined #ruby
halfamind has quit [Quit: Leaving.]
zacts has joined #ruby
halfamind has joined #ruby
halfamind has quit [Client Quit]
kgrz has quit [Ping timeout: 260 seconds]
kareeole_ has joined #ruby
jose9991 has joined #ruby
koooge has quit [Quit: Leaving...]
ferr has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
smathy is now known as smathy_afk
kareeoleez has quit [Ping timeout: 250 seconds]
_kraken has joined #ruby
<_kraken> Is this the main ruby irc?
_kraken has left #ruby ["Leaving"]
_kraken has joined #ruby
smathy_afk is now known as smathy
<_kraken> Do I need to initialize all my variables in an initialize method for a particular class or can I define them outside the methods in that class?
<_kraken> Is a class just composed of methods? AKA, nothing outside the methods?
mbreedlove has quit [Ping timeout: 252 seconds]
mbreedlove has joined #ruby
koooge has joined #ruby
astrobunny has joined #ruby
arescorpio has quit [Quit: Leaving.]
kareeole_ is now known as kareeoleez
xall has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
ur5us has quit [Remote host closed the connection]
nankyokusei has joined #ruby
m_antis has quit [Ping timeout: 276 seconds]
znz_jp has quit [Remote host closed the connection]
blackmesa has joined #ruby
xall has quit [Ping timeout: 250 seconds]
LoneHerm_ has joined #ruby
idefine has quit [Ping timeout: 260 seconds]
znz_jp has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<pipework> _kraken: Ruby is quite dynamic.
allcentury has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
<pipework> Methods needn't even exist until runtime, and sometimes don't exist at all times in runtime.
<pipework> Quite the magical thing.
blackmesa has quit [Ping timeout: 244 seconds]
voucher has joined #ruby
LoneHerm_ has quit [Ping timeout: 240 seconds]
beauby has quit [Ping timeout: 244 seconds]
tildes_ has joined #ruby
jose9991 has left #ruby [#ruby]
voucher has left #ruby [#ruby]
kgrz has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
karmatr0n has joined #ruby
yfeldblum has quit [Remote host closed the connection]
chopin has quit [Remote host closed the connection]
TheWhip has joined #ruby
beauby has joined #ruby
p1k has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
terminalrecluse has joined #ruby
bronson has joined #ruby
nerium has quit [Quit: nerium]
tref has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
crystal77 has joined #ruby
johnbat26 has joined #ruby
idefine has joined #ruby
<tref> anyone used the mapbox-rails gem?
<beauby> Hi there. I have a conditional module inclusion in my gem (`if defined?(ActionController); require 'rails-specific-stuff'; end;`). For testing purposes, how can I load ActionController before my gem itself? (using rspec)
idefine has quit [Ping timeout: 252 seconds]
stannard has joined #ruby
kareeoleez has quit [Remote host closed the connection]
gusrub has joined #ruby
ta_ has joined #ruby
anisha has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
viz has joined #ruby
viz has quit [Client Quit]
yaewa has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
paatalaBhairavi has joined #ruby
tildes_ has quit [Ping timeout: 250 seconds]
paatala_bhairavi has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
moei has quit [Ping timeout: 240 seconds]
paatala_bhairavi has quit [Client Quit]
paatalaBhairavi has quit [Client Quit]
yfeldblum has joined #ruby
<_kraken> Do you guys use blocks and procs alot with methods? These confuse me so fucking much
SilverKey has joined #ruby
<beauby> _kraken: Yeah they are useful when you want to pass an arbitrary function around (for instance taking a `formatter` lambda/prock as a parameter)
<bazzy> change your spec before changing the code!!
blackmesa has joined #ruby
<pipework> _kraken: They can be really useful, but I typically try not to make an excuse for them where they aren't necessary in code I share with others.
<pipework> Though DSLs and nice method interfaces are welcome.
<beauby> bazzy: was your comment for me?
araujo_ has quit [Quit: Leaving]
<bazzy> it's for everyone!~
<bazzy> I'm learning TDD :D
<beauby> Oh I see :)
<bazzy> does this sound right?
<bazzy> to answer (why change spec before change code)
<bazzy> if you created tests already .. and then you think "Ou .. I am going to change how my thingy works.. then you want to change your spec (tests) FIRST! before changing the code! it helps breath life into your idea and provides the new tests first so you can work on getting them to pass!
<bazzy> is there a better clearer answer to "WHY change spec before code" ?
allcentury has joined #ruby
hk238 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
jenrzzz_ has quit [Ping timeout: 250 seconds]
ravishankarjha has joined #ruby
karmatr0n has quit [Ping timeout: 250 seconds]
<beauby> bazzy: Philosophically, in TDD, you define behavior in your spec, and you make your code fulfill the specs. The spec is the contract. Plus, if you change your code first and your spec later, you're clouded with your implementation.
duncannz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
<bazzy> beauby, elaborate
duncannz has quit [Max SendQ exceeded]
<bazzy> "clouded with your impl"
<bazzy> you mean mentally
<bazzy> impl details are extranneous
duncannz has joined #ruby
bobbycvi_ has quit [Quit: ...]
allcentury has quit [Ping timeout: 276 seconds]
<beauby> bazzy: There's a chance if you write code first you will be biased when writing the spec
sauvin has joined #ruby
<bazzy> Are there any considerations to take when you maintain a codebase that lacks a testing framework, and you want to create one.. or an approach proven?
moeabdol has joined #ruby
moeabdol has quit [Client Quit]
xall has joined #ruby
moeabdol has joined #ruby
pushpak has joined #ruby
pushpak has quit [Client Quit]
A5101 has joined #ruby
LoneHerm_ has joined #ruby
kareeoleez has joined #ruby
kareeoleez has quit [Remote host closed the connection]
kareeoleez has joined #ruby
wilbert has quit [Ping timeout: 260 seconds]
Coldblackice has joined #ruby
galeido_ has joined #ruby
galeido has quit [Ping timeout: 276 seconds]
tref has quit [Quit: tref]
galeido_ is now known as galeido
galeido has quit [Changing host]
galeido has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
d0nn1e has quit [Ping timeout: 265 seconds]
aganov has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
d0nn1e has joined #ruby
_kraken has quit [Remote host closed the connection]
neanderslob has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
noobsu has joined #ruby
emilkarl is now known as emilkarl[away]
emilkarl[away] is now known as emilkarl
binaryplease has joined #ruby
neanderslob has joined #ruby
crdpink has quit [Excess Flood]
crdpink has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duoi has quit [Ping timeout: 260 seconds]
emilkarl has quit [Quit: Textual IRC Client: www.textualapp.com]
nankyokusei has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duoi has joined #ruby
nando293921 has quit [Quit: Lost terminal]
blackmesa has joined #ruby
pawnbox has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
allcentury has joined #ruby
blackgoat has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
ravishankarjha has quit []
<bazzy> how come, for attr_accessor :var , you can read 'var' but you cannot do 'var =' you must do `self.var =` or `@var =`
<apeiros> bazzy: because how'd it otherwise know you mean the method `var =` and don't want to assign to a local variable?
<bazzy> apeiros, same for reading tho, wouldn't you think?
<apeiros> no. at the time of reading it can look what exists.
<apeiros> and local variable takes precedence.
<bazzy> but not for assignment?
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> so if you postulate the same for writing, then local variable also takes precedence -> i.e. you can't invoke a method with it
<bazzy> oh I GET IT .. yeah the local would be created in that moment
* bazzy slaps self
allcentury has quit [Ping timeout: 244 seconds]
jgt3 has joined #ruby
<bazzy> I wrote my first RSpec tests tonight (just following a tut tho)
<bazzy> actually Radar's book ;)
<Radar> Hi.
<bazzy> I saved my bacon bro
Devalo has joined #ruby
gregf has joined #ruby
binaryplease has quit [Quit: WeeChat 1.5]
<bazzy> `RSpec.describe Bacon` does Bacon actually need to be a constant in that declaration?
rkazak has joined #ruby
<bazzy> erm, I'm actually operating under the assumption that a class name is a constant
noService has joined #ruby
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
noobsu has quit [Remote host closed the connection]
<bazzy> ....
<bazzy> the answer is yes (I tried modifying it)
<bazzy> is there any bonus to using a constant in the describe statement vs. a string?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
A5101 has quit [Ping timeout: 244 seconds]
noServic1 has joined #ruby
agent_white has quit [Quit: leaving]
ravishankarjha has joined #ruby
<Radar> bazzy: Yes, you can reference it as described_class
<Radar> bazzy: and then examples get access to a "subject" method which will return Bacon.new
<Radar> handy for the one-liner it blocks you'll see later
<bazzy> example?
noService has quit [Ping timeout: 260 seconds]
<Radar> Oops, I don't think we have one.
czerasz__ has joined #ruby
bronson has joined #ruby
codecop has joined #ruby
drale2k has quit [Ping timeout: 276 seconds]
TheWhip has quit [Remote host closed the connection]
czerasz_ has quit [Ping timeout: 250 seconds]
<bazzy> "we recommend that you reserve it for support of custom
<bazzy> matchers and/or extension libraries that hide its use from examples." -- now i want an example of that!
drale2k has joined #ruby
<bazzy> does that mean like .. a private testing framework? i don't get it
<bazzy> oh no
<bazzy> i get the "custom matcher" use (even tho i've never seen one)
<bazzy> pardon the lowercase 'i' xD
<bazzy> but "extension library"?
bronson has quit [Ping timeout: 252 seconds]
rxgcow has joined #ruby
<bazzy> ..ok i get it
<bazzy> wow i need sleep.. that was a bad sign
rkazak has quit [Quit: rkazak]
bluOxigen has joined #ruby
TheWhip has joined #ruby
mark_66 has joined #ruby
antgel has joined #ruby
Ishido has joined #ruby
isxek has joined #ruby
ur5us has joined #ruby
ta_ has joined #ruby
rkazak has joined #ruby
stannard has joined #ruby
ur5us has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
gusrub has quit [Quit: Leaving]
duoi has quit [Excess Flood]
duoi has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ravishankarjha has quit [Remote host closed the connection]
saneax_AFK is now known as saneax
stannard has quit [Ping timeout: 240 seconds]
flughafen has joined #ruby
<adaedra> Hello
duoi has quit [Max SendQ exceeded]
<apeiros> moin adaedra
stardiviner has quit [Ping timeout: 276 seconds]
Couch has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
patrick_star_3 has quit [Ping timeout: 260 seconds]
noServic1 has quit [Ping timeout: 246 seconds]
patrick_star_2 has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
toretore has joined #ruby
siovene has joined #ruby
duoi has joined #ruby
solars has joined #ruby
AlexRussia has quit [Ping timeout: 246 seconds]
Devalo has quit [Remote host closed the connection]
blackmesa has joined #ruby
aufi has joined #ruby
biberu has joined #ruby
codecop has joined #ruby
drewo has quit [Ping timeout: 260 seconds]
labaleine has joined #ruby
N0de has joined #ruby
<N0de> hey guys :)
blackmesa has quit [Ping timeout: 250 seconds]
<apeiros> hi girl
skade has joined #ruby
noService has joined #ruby
Madplatypus has joined #ruby
Hyuk has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
N0de has quit [Quit: Page closed]
nischay has joined #ruby
ta_ has quit [Remote host closed the connection]
brunto has joined #ruby
ur5us has joined #ruby
TvL2386 has joined #ruby
vaejor has quit [Ping timeout: 250 seconds]
Ch4rAss has joined #ruby
wbsgrepit has joined #ruby
wbsgrepit has left #ruby ["WeeChat 1.4"]
noService has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
kgrz has quit [Ping timeout: 260 seconds]
ravishankarjha has joined #ruby
ferr has joined #ruby
Ch4rAss has quit [Ping timeout: 276 seconds]
the_drow has joined #ruby
noService has joined #ruby
Ch4rAss has joined #ruby
djellemah has quit [Remote host closed the connection]
labaleine has quit [Read error: Connection reset by peer]
djellemah has joined #ruby
neanderslob has quit [Quit: No Ping reply in 180 seconds.]
Dimik has quit [Ping timeout: 244 seconds]
tgeeky has quit [Ping timeout: 260 seconds]
kies has quit [Ping timeout: 260 seconds]
jwang has quit [Ping timeout: 276 seconds]
neanderslob has joined #ruby
tgeeky has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
Biopandemic has quit [Ping timeout: 260 seconds]
jwang has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
ramfjord has joined #ruby
Biopandemic has joined #ruby
stardiviner has joined #ruby
hays has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
hays has joined #ruby
drewo has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
jds has joined #ruby
d0lph1n98 has quit [Ping timeout: 250 seconds]
isxek has quit [Remote host closed the connection]
emilkarl has joined #ruby
labaleine has joined #ruby
drewo has quit [Ping timeout: 260 seconds]
etehtsea has joined #ruby
noService has quit [Ping timeout: 246 seconds]
noService has joined #ruby
hightower2 has joined #ruby
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
etehtsea has quit [Client Quit]
Devalo has joined #ruby
swills has quit [Ping timeout: 244 seconds]
pawnbox_ has joined #ruby
horaceheaven has joined #ruby
noService has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
AlexJakeGreen has joined #ruby
senayar has joined #ruby
blackmesa has joined #ruby
noobsu has joined #ruby
noobsu has quit [Remote host closed the connection]
noobsu has joined #ruby
ropeney has joined #ruby
tax has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
psf has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
skade has joined #ruby
aupadhye has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
ferr has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
duoi has quit [Max SendQ exceeded]
antgel has joined #ruby
WhatsGoingOn has joined #ruby
TomyWork has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
duoi has joined #ruby
haxrbyte has quit [Quit: Leaving...]
allcentury has joined #ruby
startupality has joined #ruby
Coldblackice_ has joined #ruby
Coldblackice has quit [Ping timeout: 276 seconds]
antgel has quit [Ping timeout: 250 seconds]
DoubleMalt has joined #ruby
marr has joined #ruby
antgel has joined #ruby
nischay has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 260 seconds]
Guest41523 has quit [Ping timeout: 244 seconds]
john3 has quit [Ping timeout: 252 seconds]
terlar has joined #ruby
twistedpixels has quit [Ping timeout: 265 seconds]
kgrz has joined #ruby
twistedpixels has joined #ruby
twistedpixels has joined #ruby
LoneHerm_ has joined #ruby
roshanavand_ has joined #ruby
roshanavand_ has quit [Client Quit]
jackjackdripper has quit [Quit: Leaving.]
wigust has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
xall has quit [Ping timeout: 252 seconds]
WhatsGoingOn has quit [Remote host closed the connection]
wigust has quit [Remote host closed the connection]
perniciouscaffei has quit [Quit: Textual IRC Client: www.textualapp.com]
neanderslob has quit [Ping timeout: 244 seconds]
neanderslob has joined #ruby
wigust has joined #ruby
duoi has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
Ballo has quit [Ping timeout: 250 seconds]
weaksauce has quit [Ping timeout: 276 seconds]
noobsu_ has joined #ruby
WhatsGoingOn has joined #ruby
czerasz__ has quit [Quit: Ex-Chat]
AlexJakeGreen_ has joined #ruby
Devalo has quit [Remote host closed the connection]
duoi has joined #ruby
noobsu has quit [Ping timeout: 276 seconds]
haxrbyte has joined #ruby
blackgoat has joined #ruby
drewo has joined #ruby
bronson has joined #ruby
Shashikant86 has joined #ruby
blackgoat has quit [Client Quit]
duoi has quit [Ping timeout: 250 seconds]
duoi has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
prestorium has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
startupality has quit [Quit: startupality]
duoi has quit [Ping timeout: 260 seconds]
AlexJakeGreen_ has quit [Quit: Mutter: www.mutterirc.com]
astrobunny has quit [Remote host closed the connection]
duoi has joined #ruby
shlomo has joined #ruby
blackgoat has joined #ruby
troulouliou_div2 has joined #ruby
FooMunki has joined #ruby
astrobunny has joined #ruby
wigust has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
brunto has quit [Ping timeout: 260 seconds]
ma489 has joined #ruby
startupality has joined #ruby
WebDevB has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
noService has joined #ruby
pawnbox has joined #ruby
blackgoat has quit [Ping timeout: 276 seconds]
LoneHerm_ has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 244 seconds]
astrobunny has quit [Remote host closed the connection]
roshanavand_ has joined #ruby
roshanavand_ has quit [Client Quit]
blackgoat has joined #ruby
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
binaryplease has joined #ruby
codeurge has joined #ruby
brunto has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
minimalism has quit [Quit: minimalism]
chipotle_ has quit [Ping timeout: 252 seconds]
roshanavand_ has joined #ruby
workmad3 has joined #ruby
hangelo has joined #ruby
blackgoat has quit [Ping timeout: 244 seconds]
psf has joined #ruby
<shevy> power-insta-quitting!
Coldblackice_ has quit [Ping timeout: 244 seconds]
moeabdol has joined #ruby
prestorium has quit [Quit: Leaving]
hangelo has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
psf has quit [Changing host]
psf has joined #ruby
roshanavand_ has quit [Quit: This computer has gone to sleep]
Shashikant86 has joined #ruby
blackgoat has joined #ruby
evidex has joined #ruby
ropeney has quit [Quit: Leaving]
startupality has quit [Quit: startupality]
blaxter has joined #ruby
ropeney has joined #ruby
codecop has quit [Ping timeout: 246 seconds]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has joined #ruby
yosafbridge has quit [Quit: Leaving]
duoi has quit [Ping timeout: 260 seconds]
das_j has joined #ruby
vondruch_ has joined #ruby
duoi has joined #ruby
drewo has joined #ruby
<das_j> Hello, I'm a newbie and I'm currently trying to run a rakefile through bundler using `bundle exec rake rake-target`. The output of the command is "Could not find rake-10.5.0 in any of the sources" and "use bundle install". Using bundle install just tells me that the package is already installed.
Tyrant_ has quit [Quit: Tyrant_]
<das_j> What should I do in this case?
Zggb_ has joined #ruby
duoi has quit [Excess Flood]
horaceheaven has quit [Ping timeout: 260 seconds]
duoi has joined #ruby
Devalo has joined #ruby
vondruch has quit [Ping timeout: 265 seconds]
polysics has joined #ruby
labaleine has quit [Ping timeout: 260 seconds]
chip_ has quit [Ping timeout: 252 seconds]
Masonn has joined #ruby
tgeeky has quit [Ping timeout: 260 seconds]
<das_j> Oh and of course, rake is in my gem path
Masonn has quit [Read error: Connection reset by peer]
drewo has quit [Ping timeout: 244 seconds]
Zggb_ is now known as Zggb
horaceheaven has joined #ruby
tgeeky has joined #ruby
pandaant has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
<das_j> `bundle exec rake --version` shows me 10.5.0 which seems to be correct
codecop has joined #ruby
horaceheaven has quit [Quit: horaceheaven]
das_j has quit [Quit: Page closed]
davidblko has joined #ruby
WhatsGoingOn has quit [Remote host closed the connection]
chip_ has joined #ruby
d0lph1n98 has joined #ruby
allcentury has joined #ruby
brunto has quit [Ping timeout: 246 seconds]
saneax is now known as saneax_AFK
dionysus69 has joined #ruby
stannard has joined #ruby
allcentury has quit [Ping timeout: 260 seconds]
polysics has quit [Ping timeout: 260 seconds]
blaxter has quit [Quit: foo]
yosafbridge has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
startupality has quit [Quit: startupality]
blaxter has joined #ruby
hydr8d has quit [Ping timeout: 244 seconds]
pLaToOn has joined #ruby
<pLaToOn> moin
the_drow has quit [Quit: This computer has gone to sleep]
v0dro has joined #ruby
marr has quit [Ping timeout: 250 seconds]
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
astrobunny has joined #ruby
Gasher has joined #ruby
v0dro has quit [Ping timeout: 276 seconds]
jgt3 has quit [Ping timeout: 240 seconds]
emilkarl has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kholbekj has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
qasaur has joined #ruby
cultureulterior1 has joined #ruby
LoneHermit has joined #ruby
sdothum has joined #ruby
yosafbridge has quit [Read error: Connection reset by peer]
qasaur has quit [Max SendQ exceeded]
blackmesa has quit [Ping timeout: 276 seconds]
c355e3b has joined #ruby
koooge has quit [Quit: Leaving...]
LoneHermit has quit [Ping timeout: 240 seconds]
sdothum has quit [Client Quit]
nareiber has quit [Ping timeout: 250 seconds]
startupality has joined #ruby
sdothum has joined #ruby
the_drow has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
symm- has joined #ruby
mdw has joined #ruby
drewo has joined #ruby
johnmilton has joined #ruby
<jokke> hey
Shashikant86 has joined #ruby
<jokke> i'm having a bit of trouble with minitest and webmock. https://p.jreinert.com/0cU7za/
<jokke> any ideas what might be going wrong here?
<Zarthus> you're doing a thing but you haven't stubbed it yet
<Zarthus> because it doesn't know how to mock it, it throws an error instead
Shashikant86 has quit [Max SendQ exceeded]
<jokke> Zarthus: see the last line
<Zarthus> does it support regexes?
<jokke> according to docs it does
binaryplease has quit [Ping timeout: 240 seconds]
<Zarthus> if it does, should it not be a Regexp class instead of a string?
<jokke> yeah that's what i thought too
<jokke> and that's how i mocked the request
<Zarthus> also your regex seems weird to me
duoi has quit [Ping timeout: 260 seconds]
yosafbridge has joined #ruby
<jokke> it's basically just a /^#{Regexp.escape(url)}.*/
<Zarthus> hm, no nevermind. you just didn't provide a top level domain
<Zarthus> or rather, the url is weird because it's not what you'd normally expect an url to look like
<Zarthus> I think you need to remove the quot marks in your #stub_request code
drewo has quit [Ping timeout: 250 seconds]
<jokke> weirdest of all: if i run the test by itself (by running rake test path/to/test/that/fails.rb) i get no error
duoi has joined #ruby
jds has quit [Quit: Connection closed for inactivity]
mdw_ has joined #ruby
m_antis has joined #ruby
umdstu has joined #ruby
rxgcow has quit [Remote host closed the connection]
ixti has joined #ruby
<jokke> i mock the request in the setup block
<kholbekj> quit
kholbekj has quit [Quit: leaving]
gnufied has joined #ruby
<jokke> of the parent class of my test
cdg has joined #ruby
kam270 has joined #ruby
kam270 has quit [Max SendQ exceeded]
<jokke> (i hate minitest, i just have to use it for this project)
mdw has quit [Ping timeout: 260 seconds]
v0dro has joined #ruby
aupadhye has quit [Quit: Leaving]
jgt3 has joined #ruby
pLaToOn has quit [Quit: Leaving]
noService has quit [Ping timeout: 260 seconds]
pwnd_nsfw` has joined #ruby
crdpink has quit [Excess Flood]
bronson has joined #ruby
<Zarthus> nobody likes mocking http requests
crdpink has joined #ruby
<apeiros> ?nobody
<ruby[bot]> apeiros is nobody
<apeiros> true. I do.
brunto has joined #ruby
noService has joined #ruby
<Zarthus> Nobody much prefers mocking HTTP requests over mocking non-http requests?
* Zarthus stab in the wild
rtl has quit [Ping timeout: 250 seconds]
humding3r has quit [Ping timeout: 250 seconds]
Kallis has joined #ruby
startupality has quit [Quit: startupality]
p1k has joined #ruby
<apeiros> what's a non-http request?
pwnd_nsfw has quit [Ping timeout: 250 seconds]
ferr has joined #ruby
<apeiros> jokke: show your stub_request code?
<p1k> what's a sane way to monkey-patch a class that uses alias to avoid collision
<p1k> e.g. I need to patch :load, but the inheriting class calls alias :load, :_load and then defines a new :load etc.
<apeiros> a sane way to monkey-patch a class is to not monkey-patch it
rtl has joined #ruby
<apeiros> sounds like you want to reinvent alias_method_chain?
kies has joined #ruby
<apeiros> oh, misread
<apeiros> monkey patch the descendant to then?
bronson has quit [Ping timeout: 252 seconds]
<p1k> yeah I need to patch the :load which will become :_load
startupality has joined #ruby
humd1ng3r has joined #ruby
cdg has quit [Remote host closed the connection]
rodfersou has joined #ruby
ravishankarjha has quit [Remote host closed the connection]
jaruga____ has quit [Quit: jaruga____]
v0dro has quit [Ping timeout: 252 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
<shevy> p1k isn't that simple? I mean you can temporarily define/alias methods and also remove them at will again via... either remove_method or undefine_method
<shevy> though the original implementation there sounds quite crazy already
blackmesa has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
Ch4rAss has quit [Ping timeout: 260 seconds]
emilkarl is now known as emilkarl[away]
emilkarl[away] is now known as emilkarl
ldnunes has joined #ruby
Ch4rAss has joined #ruby
Masonn has joined #ruby
mg^ has quit [Ping timeout: 240 seconds]
jancel has joined #ruby
<p1k> buckets of joy monkey patching someone else's library to add logging
<apeiros> ah those moments when you wish ruby had a tiny bit of AOP
evidex has quit [Ping timeout: 240 seconds]
wigust has joined #ruby
wigust has quit [Client Quit]
noobsu_ has quit [Remote host closed the connection]
<shevy> you still want ruby to be hypercard!!!
<apeiros> hypercard didn't have aop
<apeiros> and no, I don't want ruby to be hypercard either :)
mg^ has joined #ruby
neanderslob has quit [Remote host closed the connection]
<TheBrayn> I want everything to be hypercard
vondruch_ has quit [Quit: Ex-Chat]
BaroMeter has joined #ruby
vondruch has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
senayar has quit [Remote host closed the connection]
|2701 has joined #ruby
solars has quit [Ping timeout: 250 seconds]
senayar has joined #ruby
lewis1711 has joined #ruby
shibly has joined #ruby
drewo has joined #ruby
<lewis1711> why can't an enumerator be cloned?
pawnbox has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 250 seconds]
<lewis1711> I mean it's just a glorified pointer surely
shibly has left #ruby [#ruby]
ravishankarjha has joined #ruby
allcentury has joined #ruby
LoneHermit has joined #ruby
drewo has quit [Ping timeout: 244 seconds]
flashpoint9 has joined #ruby
halfamind has joined #ruby
labaleine has joined #ruby
halfamind has quit [Client Quit]
noobsu has joined #ruby
mbreedlove has quit [Ping timeout: 246 seconds]
m_antis has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
wdi14 has joined #ruby
evidex has joined #ruby
LoneHermit has quit [Ping timeout: 252 seconds]
<wdi14> Hello everybody. I'm new to Ruby and I need help to translate this code from javascript to Ruby
duncannz has quit [Remote host closed the connection]
<wdi14> Hello everybody. I'm new to Ruby and I need help to translate this code from javascript to Ruby http://jsbin.com/punasozuti/edit?js,console
jancel has quit [Remote host closed the connection]
ponga has joined #ruby
<gregf_> wdi14: how are you willing to pay? *waits with bated breath*
<apeiros> lewis1711: iirc it's implemented via fibers (and used to be continuations - not sure though)
TheWhip has quit [Remote host closed the connection]
<wdi14> gregf_: Yes but I'd like to learn also
<gregf_> wow, so much business login in the view :|
<gregf_> s/login/logic/
<wdi14> gregf_: otherwise I'd had used fiverr or something else
rodfersou has quit [Ping timeout: 260 seconds]
<apeiros> gregf_: just wait for an actual question? :)
labaleine has quit [Ping timeout: 276 seconds]
mg^ has quit [Ping timeout: 276 seconds]
aries_liuxueyang has quit [Ping timeout: 252 seconds]
nadir has joined #ruby
Devalo has joined #ruby
evidex has quit [Ping timeout: 240 seconds]
hanmac has joined #ruby
mbreedlove has joined #ruby
labaleine has joined #ruby
halfamind has joined #ruby
<apeiros> wdi14: what gregf_ plays at is that at the moment it can be read as "please do it for me", and that's not what we do. you do the work, and we help when you have questions.
senayar has quit [Remote host closed the connection]
<wdi14> apeiros: Thanks
senayar has joined #ruby
GodFather has joined #ruby
<wdi14> apeiros: and gregf_ let me redo my question. Please, anyone here could help me to translate this http://jsbin.com/punasozuti/edit?js,console to Ruby? Thanks
TheWhip has joined #ruby
<wdi14> apeiros: and gregf_ , sorry
lewis1711 has quit [Ping timeout: 260 seconds]
<apeiros> wdi14: how do you imagine that help works?
chouhoulis has joined #ruby
<wdi14> Well, idealist the person should ask for help (politely) and receive
<wdi14> Is that right? for you apeiros
chouhoulis has quit [Remote host closed the connection]
<gregf_> wdi14: what apeiros said is quite true, but tbh, you can map that 1 - 1 in ruby. remove the 'var' and curly braces '{' , '}'?
TheWhip has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<toretore> wdi14: your question makes it seem like you have made no effort on your own and are expecting someone to just do the work for you
<wdi14> toretore:
rodfersou has joined #ruby
<wdi14> Ok
<gregf_> also imho its too much logic. all you need is 4 statements of the type 1) "You must travel through " 2) "Change at Union Square." - almost always 3) "Your journey continues through" 4) "n stops in total." 5) ""
<apeiros> wdi14: ok. not what I meant. yes, we will help you. do you have a specific problem?
Devalo has quit [Ping timeout: 276 seconds]
<gregf_> anyways, we're not here to write the code for you. you learn it better when you try it yourself. come back here after you've tried something as apeiros has said :)
synthroid has joined #ruby
stannard has joined #ruby
<wdi14> apeiros: where could I show you my code in Ruby? Gist?
<apeiros> yes, gist is excellent
<gregf_> wdi14: write tests as well
GodFather has quit [Remote host closed the connection]
<wdi14> apeiros: Here is where I'm at the moment https://gist.github.com/fbi1714/6003f9a1224255221979b057d4f48b97
ma489 has quit [Ping timeout: 246 seconds]
<gregf_> fbi *shudders*
<apeiros> don't worry. it's the fbi from 1714
<gregf_> heh
<wdi14> when I call the function in pry it returns me an error
<apeiros> wdi14: ok. and your issue is?
<apeiros> then you should put that into your gist
<apeiros> I'll assume it's something along "NameError, no method or variable trainLines"?
<wdi14> apeiros: that's the error accordingly to pry
<toretore> wdi14: what is the purpose of all this?
<flips> I understand Rails guidelines to be that I should type myhash = {} instead of Hash.new (?) ... But, how would I then type something like: your_hash = Hash.new { |hash, key| hash[key] = Array.new } ?
<apeiros> wdi14: you have to either run it via `ruby trainSystem.rb` or add a shebang. otherwise your shell thinks it's bash.
<toretore> flips: you wouldn't, don't worry about what the rails guidelines say
<apeiros> flips: I think the rails guide also states that when you make use of the constructor's abilities, it's fine to use it
<toretore> wdi14: so this is homework?
<flips> ;) ok ...
<wdi14> toretore: I did it in javascript and now I need to make in Ruby
<wdi14> toretore: yes
<wdi14> apeiros: I'm doing that at my terminal ruby mta.rb
<wdi14> apeiros: mta.rb is the name of my file
<apeiros> doesn't look like you do from your own gist…
<apeiros> says `mta-ruby $trainSystem`
<apeiros> actually it even says `mta-ruby $trainSystem (:N, "Times Square", :L, "Grande Central")`
<apeiros> and the "bash" part in "bash: syntax error" makes it pretty clear you're in bash context, not ruby
TheWhip has joined #ruby
umdstu has quit [Quit: umdstu]
skweek has quit [Ping timeout: 244 seconds]
<wdi14> apeiros: try here https://repl.it/CReP
<apeiros> no
<wdi14> apeiros: ok
<apeiros> and I'm pretty sure you won't get a "bash syntax error" there either ;-)
<gregf_> flips: it surely works from the rails console
<wdi14> apeiros: so what am I doing wrong?
<apeiros> I told you
roshanavand_ has joined #ruby
solars has joined #ruby
<wdi14> apeiros: I'm not understanding really
<apeiros> you say you run it via `ruby mta.rb` - I suggest you update your gist then where you actually do that and the error you get there.
<apeiros> because again, in your gist, that's not what you do.
TheWhip has quit [Ping timeout: 276 seconds]
norc has joined #ruby
<norc> asm>> defined?(@a)
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/572532
jancel has joined #ruby
<wdi14> apeiros: I just sent you the gist link to show you the code
aufi has quit [Ping timeout: 250 seconds]
halfamind has quit [Quit: Leaving.]
sepp2k has joined #ruby
<apeiros> this is tedious…
KINGSABRI has quit [Ping timeout: 244 seconds]
<apeiros> wdi14: https://gist.github.com/fbi1714/6003f9a1224255221979b057d4f48b97 your code - ok. that part is fine.
<apeiros> wdi14: https://gist.github.com/anonymous/b0057dd6b0b4874734bdd17e7552497e your supposed error - NOT ok. this does NOT show you running your code as `ruby mta.rb` as you later stated.
<apeiros> and the error you get is from *bash*, your *shell*. not ruby. which is expected if you try to run ruby code through bash.
<apeiros> so until you updated your error gist to the proper problem, there's nothing for me to do.
<wdi14> apeiros: forget about this gist with the error
<wdi14> apeiros: it's very confusing
<apeiros> no gist with the full error you get = no help from me.
evidex has joined #ruby
pandaant has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 244 seconds]
<norc> If a derived class has no initializer, and I add one like this; def initialize(*args); @foobar = 1; super(*args); end -- could this possibly have any side effect that Im not seeing directly?
horaceheaven has joined #ruby
swills has joined #ruby
<norc> Actually take away the assignment to an instance variable.
<apeiros> norc: it'll also pass along a block passed to new
<norc> apeiros: Ahh.
<norc> That must be it.
Jet4Fire has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 260 seconds]
<apeiros> and assuming the superclass does not have an initialize method either, you'll probably get an exception from super
<norc> apeiros: Oh it does. The block was the reason.
<norc> apeiros: And interesting that just showed me why keyword_super exists.
Zggb has quit [Quit: Connection closed for inactivity]
<norc> The only way to pass a block along is if you bind it to a proc which is expensive.
<apeiros> I did?
mtkd has joined #ruby
<norc> But keyword_super passes the block without procifying it.
<apeiros> you could also super { |*a| yield(*a) }
<wdi14> apeiros: I'm using pry
aries_liuxueyang has joined #ruby
<norc> apeiros: Mm, that would introduce an additional block still, but not as expensive I supose.
<apeiros> wdi14: and there we are: `NameError: undefined local variable or method `trainLines' for main:Object`
borodin has joined #ruby
<apeiros> 14:13 apeiros: I'll assume it's something along "NameError, no method or variable trainLines"?
nankyokusei has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
<wdi14> apeiros: Yes, you said that
astrobunny has joined #ruby
<apeiros> but great that we now got you up to speed with properly reporting a problem.
Zggb has joined #ruby
<apeiros> rubys variable scoping works differently from javascript
<norc> apeiros: And you meant super(*args) { |*a| yield(*a) } rather than just keyword_super (which I still hate)
<apeiros> `def … end` starts a new lexical context. no outer local variable is accessible by it.
<apeiros> norc: super == super(*args) :)
* norc passes binding_of_caller to apeiros
dstarh has joined #ruby
<apeiros> norc: super != super()
<apeiros> norc: and yes, that's super-quirky ;-)
KINGSABRI_ has joined #ruby
<norc> apeiros: super == super(*args) { |*a| yield(*a) }
<apeiros> yepp
<norc> apeiros: That key difference is what gave me an interesting headache today
<apeiros> your minimal definition of "do something and don't care about args": def initialize(*); super; end
<norc> Hehe.
johnmilton has quit [Remote host closed the connection]
<apeiros> your minimal definition of "do something and don't care about args, but suppress any block passed": def initialize(*args); super(*args, &nil); end
<norc> Which there was a way to forward the block.
<norc> *Wish.
<wdi14> apeiros: so how should I model my code for that?
iamvery_ has joined #ruby
<ytti> norc, block is just proc, you can forward it as any variable, by reference
<norc> ytti: block is not proc.
horaceheaven has quit [Quit: horaceheaven]
<norc> ytti: blocks are not objects, procs are.
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 260 seconds]
swills has quit [Ping timeout: 276 seconds]
astrobunny has quit [Ping timeout: 260 seconds]
drewo has joined #ruby
Guest12433 has quit [Ping timeout: 260 seconds]
<apeiros> seems my message didn't get through the disco
<apeiros> wdi14: proper: make it a class and assign @trainLines to an instance variable
stannard has quit [Remote host closed the connection]
<apeiros> quick-shot: make trainLines a constant like this: TrainLines
<norc> >> def f(&a); p a.class; end; f {} # ytti
<ruby[bot]> norc: # => Proc ...check link for more (https://eval.in/572544)
pawnbox has quit [Remote host closed the connection]
<norc> By doing that you are suddenly creating an object which is what I would like to avoid.
<wdi14> apeiros: Let me try
<ytti> norc, http://p.ip.fi/Logq
<apeiros> norc: yes, would be nice. who knows, maybe ruby optimizes that case if it doesn't see `block` referenced other than as `&block`?
Weavel has joined #ruby
<apeiros> nobu & co have done more amazing optimizations than that before…
SShrike has joined #ruby
pawnbox has joined #ruby
<norc> apeiros: From my experience Ruby only does local optimizations, but I haven't looked at the entire compile.c
aagdbl has joined #ruby
<aagdbl> does anyone know of a migration framework which can be used for non database tasks?
mg^ has joined #ruby
drewo has quit [Ping timeout: 240 seconds]
<p1k> aagdbl: what are you migrating -- curious
halfamind has joined #ruby
<aagdbl> chef data bags
SShrike has quit [Client Quit]
<aagdbl> actually i could use it for quite a few chef operations like uploading cookbooks, databags, etc
<p1k> like a migrationframeworkfactoryframework ?
jancel has quit [Remote host closed the connection]
<aagdbl> i have no clue what that means :)
<norc> apeiros: Come to think of it the best way is actually: def initialize(*args); super(*args, &Proc.new); end
<norc> apeiros: At least that won't create a new proc unconditionally.
<apeiros> but it'll add a method call overhead
<apeiros> and a constant lookup
<aagdbl> just something that creates unique migration, maybe stores the info locally in a yaml or something that is commited. and gives me up and down methods
<norc> apeiros: The method will be called regardless if you bind it using &foo
pawnbox has quit [Ping timeout: 276 seconds]
<norc> (Don't think that bit can be made visible in assembly though)
<apeiros> I mean the ".new" call
<p1k> aagdbl: I think that shouldn't be hard to write yourself -- but I don't know of an abstract one
skweek has joined #ruby
papachan has joined #ruby
blackgoat has quit [Quit: WeeChat 1.4]
cultureulterior1 has left #ruby ["Leaving"]
<apeiros> btw., &proc works too. shorter than &Proc.new (and maybe a const lookup less)
<norc> >> def f(&b); b.call(); end; Proc.send(:define_method, :initialize) { puts "bark" }; f {}
<ruby[bot]> norc: # => nil (https://eval.in/572545)
<norc> That is interesting.
<norc> apeiros: I was wrong. How is this proc object being created o_o
<apeiros> I don't know the inner workings. but proc/Proc.new invoked without a block will use the block of the caller's scope
<p1k> aagdbl: I've done schema where I couldn't use AR and I found that a module wrapping the versioned class with a method for obtaining / caching the correct version from the database worked well enough
hightower2 has quit [Ping timeout: 240 seconds]
<p1k> but it was a different use case
marr has joined #ruby
<norc> apeiros: You must pass a block to Proc.new, and indeed I am passing one in the call at the end f {}
ocbtec has joined #ruby
<apeiros> they'll also complain if the caller's scope doesn't have one
<norc> But it seems like Ruby creates without Ruby methods.
<norc> It just pulls one out of its magical hat.
<norc> So its free, right?
<norc> :-)
wilsonc91 has joined #ruby
<apeiros> noooooo idea :D
<apeiros> I rarely ever look under the hood. I just observe performance metrics. and this is actually one I've never tested.
<norc> apeiros: There are a few benchmarks around that show that procifying is a lot more expensive.
<apeiros> norc: you mean `def foo(&block); bar(&block); end` is always more expensive than `def foo; bar(&block); end`?
<apeiros> whoops
<apeiros> norc: you mean `def foo(&block); bar(&block); end` is always more expensive than `def foo; bar(&proc); end`?
<norc> apeiros: def f(&b); b.call; end is more expensive than def f; yield; end
synthroid has quit []
<apeiros> yes
<norc> apeiros: And the last statement somewhat yes.
<norc> apeiros: If the method can be called without a block its cheaper. If not it is the same.
LoneHermit has joined #ruby
<apeiros> but `def f(&b); @nested.f(&b); end` is less expensive than `def f; @nested.f { |*args| yield(*args) }; end`
<norc> (Proc.new has that habit of not doing anything if no block is around)
<norc> apeiros: Are you sure about that?
<apeiros> yes
<norc> It just introduces a call overhead over turning a block into a proc.
ramortegui has joined #ruby
araujo_ has joined #ruby
<norc> And the only cost there is passing arguments.
<apeiros> though it's a bit dated, might need rechecking. but had a lenghty argument with a rails core dev and they checked and confirmed
ravishankarjha has quit [Read error: Connection reset by peer]
<norc> (Which since they are basically passed as pointers internally is practically for free)
<norc> apeiros: Is that possibly from pre 2.0 times?
ravishankarjha has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
<apeiros> might have been 1.9. and I know arg passing has been heavily reworked in both 2.2 and 2.3, so might indeed be high time to recheck that wisdom :)
Madplatypus has quit [Quit: Connection closed for inactivity]
<norc> apeiros: Ill check into that.
araujo_ has quit [Max SendQ exceeded]
iooner has left #ruby ["Bye!"]
<apeiros> iirc it was both faster and less gc stress
akiTendo has joined #ruby
araujo_ has joined #ruby
araujo has quit [Ping timeout: 252 seconds]
araujo__ has joined #ruby
LoneHermit has quit [Ping timeout: 260 seconds]
brunto has quit [Ping timeout: 240 seconds]
ftnsdf has joined #ruby
araujo_ has quit [Ping timeout: 252 seconds]
johnmilton has joined #ruby
gheegh has joined #ruby
iamvery_ has quit [Quit: Leaving...]
blackmesa has quit [Ping timeout: 260 seconds]
dubin has joined #ruby
perlgod has joined #ruby
youch has quit [Ping timeout: 244 seconds]
moeabdol has joined #ruby
<dubin> Is there a version of Ruby that can be used to script on a windows server?
<adaedra> Ruby is compatible with windows
SilverKey has quit [Quit: Halted.]
bronson has joined #ruby
<adaedra> mh.
<adaedra> didn't notice the automatic language detection :p
ChiefAlexander has joined #ruby
aupadhye has joined #ruby
phrozen77 has quit [Ping timeout: 260 seconds]
araujo__ has quit [Quit: Leaving]
dstarh has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 252 seconds]
aagdbl has quit [Quit: This computer has gone to sleep]
phrozen77 has joined #ruby
malconis has joined #ruby
p1k has quit [Ping timeout: 250 seconds]
M-Kodo has quit [Ping timeout: 246 seconds]
emilkarl has joined #ruby
brunto has joined #ruby
<mc_fail> hi everyone
OTORelic has quit [Ping timeout: 276 seconds]
ramortegui has quit [Quit: Ex-Chat]
<mc_fail> is there any way to have Net::HTTP working with pkcs11 in ruby?
<mc_fail> i see there is a module for pkcs11 on github https://github.com/larskanis/pkcs11
Ch4rAss has quit [Ping timeout: 260 seconds]
M-Kodo has joined #ruby
Ch4rAss has joined #ruby
<mc_fail> but it doesnt seems like it supported by https somehow
diegoaguilar has joined #ruby
mbreedlove has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> are you talking about TLS client authentication?
startupality has quit [Quit: startupality]
ravishankarjha has quit []
hutch4 has joined #ruby
aganov has quit [Remote host closed the connection]
hutch4 has quit [Client Quit]
swills has joined #ruby
hutch34 has joined #ruby
aegis3121 has joined #ruby
phrozen77 has quit [Ping timeout: 240 seconds]
jobewan has joined #ruby
<jhass> mc_fail: ^?
stannard has joined #ruby
mbreedlove has joined #ruby
<dubin> can you use chomp to hide info from a user when running a script on a linux cli
<jhass> dubin: that seems conflated, try to elaborate your actual problem
drewo has joined #ruby
astrobunny has joined #ruby
stannard has quit [Ping timeout: 246 seconds]
Masonn has quit [Remote host closed the connection]
<dubin> In my script I'm trying to prevent the passwords from being displayed when the users are made
arlek has joined #ruby
<jhass> IO#noecho is the correct choice there
stannard has joined #ruby
johnmilton has quit [Ping timeout: 244 seconds]
drewo has quit [Ping timeout: 276 seconds]
<manveru> anyone know when Pathname#/ was added?
dumdedum has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
startupality has joined #ruby
wdi14 has quit [Ping timeout: 250 seconds]
<manveru> damn, looks like 2.2 :P
rodfersou is now known as rodfersou|afk
wilsonc91 has quit [Quit: Textual IRC Client: www.textualapp.com]
<manveru> i thought it was there for ages... but that was Pathname#+
davedev24 has joined #ruby
<heftig> manveru: looking at https://github.com/rubysl/rubysl-pathname/commits/2.0 suggests it might be 2.3
<manveru> not sure if it's 2.2 or 2.3, but the ruby i have to make this work with is 2.1 anyway
<heftig> manveru: eh, just use +
<manveru> yeah :)
griffindy has joined #ruby
jancel has joined #ruby
[ace] has quit [Ping timeout: 244 seconds]
solars has quit [Ping timeout: 260 seconds]
jancel has quit [Remote host closed the connection]
jancel has joined #ruby
duoi has quit [Ping timeout: 260 seconds]
johnmilton has joined #ruby
Rickmast_ has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 244 seconds]
astrobunny has joined #ruby
Dysp has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
horaceheaven has joined #ruby
Rickmasta has joined #ruby
idefine has joined #ruby
johnmilton has quit [Remote host closed the connection]
rodfersou|afk has quit [Ping timeout: 260 seconds]
johnmilton has joined #ruby
idefine has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
duoi has joined #ruby
idefine has joined #ruby
rodfersou|afk has joined #ruby
[ace] has joined #ruby
allcentury has joined #ruby
<Dysp> Hi there! When I return an object from a function, how are they defined? Are they not defined at all and should be manually assigned to a variable I can then pass on to another function/whatever?
OTORelic has joined #ruby
riobe has quit [Ping timeout: 244 seconds]
<benzrf> Dysp: what do you mean?
<Dysp> If I have a function that returns x, how do I - outside that function - address this object?
<benzrf> uh oh
<benzrf> Dysp: do you have a C background?
<Dysp> I could of course do x = function
<Dysp> Nothing. Complete newb.
<benzrf> oh, hold on
<benzrf> are you english as a second language, then?
<benzrf> sorry, just reacting to the word 'address' :p
<Dysp> HAh, yes. I think people are getting to know me a little too well in here ^^
<benzrf> its usage there struck me as either C-user or person-who-doesn't-natively-speak-english
blackmesa has joined #ruby
idefine has quit [Ping timeout: 260 seconds]
<Dysp> Lets go with number two!
<benzrf> not to say that it's not comprehensible - just a little bit unusual :)
<benzrf> when you return a value from a function, the only thing that happens is that the function call expression evaluates to that value
asfasdf has joined #ruby
<Dysp> Indeed. So how to pass on the entire object?
<Dysp> I am working with arrays, to be exact.
<benzrf> in ruby, 'value' is synonymous with 'object'
<benzrf> if you want to result in some object, just return that object
<Dysp> Alrighty.. Thats kinda what I thought, actually.
codecop has quit [Remote host closed the connection]
<Dysp> So, without assigning the object to a variable, how can I use it?
<Dysp> Also, what happens if I return several objects?
<benzrf> 'return several objects'?
<benzrf> you can only return one object
<Dysp> return x, y, z
<benzrf> that returns an array
<Dysp> I see.
<benzrf> it's just shorthand for "return [x, y, z]"
<Dysp> So what I am doing is getting return [[..], [..], [..]]
<benzrf> ok
<benzrf> so then if i say your_func(), that expression will evaluate to that array
pawnbox has joined #ruby
m_antis has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
idefine has joined #ruby
rbennacer has quit [Remote host closed the connection]
WebDevB has quit [Remote host closed the connection]
ixti has quit [Quit: WeeChat 1.5]
rbennacer has joined #ruby
mbreedlove has quit [Ping timeout: 240 seconds]
<Dysp> benzrf: Which mean I would have to assign the individual arrays in the array to variables, before I can pass them on to a new function?
astrobunny has quit [Remote host closed the connection]
eljimmy has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
Devalo has joined #ruby
LoneHerm_ has joined #ruby
araujo has quit [Max SendQ exceeded]
<benzrf> Dysp: not necessarily
araujo has joined #ruby
<Dysp> No?
<benzrf> you can put any expression you want as a function argument
evidex has quit [Ping timeout: 240 seconds]
araujo has quit [Read error: Connection reset by peer]
<benzrf> doesn't have to be a variable
<Dysp> In my case I think it has to
<Dysp> :PÆ
pawnbox has quit [Ping timeout: 252 seconds]
<Dysp> But you have clarified some stuff for me, so I can work around it, that is for sure. So thank you.
moeabdol has quit [Ping timeout: 276 seconds]
duoi has quit [Ping timeout: 260 seconds]
mbreedlove has joined #ruby
startupality has quit [Quit: startupality]
ChiefAlexander has quit [Remote host closed the connection]
evidex has joined #ruby
rbennacer has quit [Ping timeout: 250 seconds]
Devalo has quit [Ping timeout: 250 seconds]
bweston92 has joined #ruby
flughafen_ has joined #ruby
<apeiros> Dysp: `foo(bar())` - takes directly the return value from bar() as argument - no intermediary variable necessary
<apeiros> Dysp: `foo().bar()` - directly call bar on the return value from foo - no intermediary variable necessary
LoneHerm_ has quit [Ping timeout: 276 seconds]
duoi has joined #ruby
hobodave has joined #ruby
rbennacer has joined #ruby
<Dysp> Yes. I get that. My problem is the way I am trying to build the script; if I did that, I would have to call the function several times instead of once.
hutch34 has quit [Quit: WeeChat 1.5]
<Dysp> But it definetly has something to do with me not correctly understanding how to optimize code. But I am learning. I've already made the script work as it should once; I am doing my first rewrite. :p
ixti has joined #ruby
haxrbyte has quit [Remote host closed the connection]
<apeiros>
haxrbyte has joined #ruby
ftj has joined #ruby
hutch34 has joined #ruby
jackdaniel has quit [Quit: Lost terminal]
ChiefAlexander has joined #ruby
kareeoleez has quit [Remote host closed the connection]
nando293921 has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
SilverKey has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
bmurt has joined #ruby
dumdedum is now known as blaxter
<apeiros> it'd have been really swelte if foo(**nil) would work :-/
nando293921 has quit [Ping timeout: 252 seconds]
shlomo has quit [Quit: WeeChat 1.5]
flughafen_ has quit [Ping timeout: 276 seconds]
skade has quit [Quit: Computer has gone to sleep.]
jfabre has joined #ruby
statelesscode has quit [Ping timeout: 260 seconds]
skade has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 244 seconds]
agent_white has joined #ruby
VeryBewitching has joined #ruby
jfabre_ has joined #ruby
jfabre has quit [Client Quit]
jfabre_ is now known as jfabre
jfabre has quit [Client Quit]
drewo has joined #ruby
ule is now known as jsp
jsp has quit [Changing host]
jsp has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<agent_white> Mornin'
pat__ has quit [Ping timeout: 276 seconds]
edwinvdgraaf has joined #ruby
maxxe has joined #ruby
arlek has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
drewo has quit [Ping timeout: 240 seconds]
ChiefAlexander has joined #ruby
synthroid has joined #ruby
Snowy has joined #ruby
cdg has joined #ruby
`tim` has joined #ruby
nankyokusei has joined #ruby
mtkd has quit [Ping timeout: 244 seconds]
aufi has joined #ruby
mtkd has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
Zggb has quit [Quit: Connection closed for inactivity]
skweek has joined #ruby
Zamyatin has joined #ruby
SilverKey has quit [Quit: Halted.]
maxxe has quit [Quit: leaving]
Zamyatin has quit [Max SendQ exceeded]
Zamyatin has joined #ruby
noService has quit [Ping timeout: 252 seconds]
ta_ has quit [Read error: Connection reset by peer]
MadWasp has joined #ruby
ta_ has joined #ruby
aegis3121 has quit [Ping timeout: 240 seconds]
<MadWasp> hi, is there any documentation on how a gem server works internally? like an api you’d have to provide when writing your own server
kareeoleez has joined #ruby
Tyrant_ has joined #ruby
SilverKey has joined #ruby
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
diegoaguilar has quit [Ping timeout: 276 seconds]
DynamicMetaFlow has joined #ruby
kareeoleez has quit [Remote host closed the connection]
karmatr0n has joined #ruby
kareeoleez has joined #ruby
<dubin> it's gpl tho
startupality has joined #ruby
<MadWasp> so it’s a subset of the v1 namespace?
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> dubin: where you read that?
kareeoleez has quit [Remote host closed the connection]
<MadWasp> „RubyGems.org uses the MIT license.“
kareeoleez has joined #ruby
<jhass> MadWasp: you probably should copy the whole API to be safe
<jhass> regarding bundler uses and so
Sp4rKy has quit [Ping timeout: 260 seconds]
jaruga____ has quit [Quit: jaruga____]
<MadWasp> webhooks, activity and search?
<jhass> well not the former too, I'd expect search to be used by gem list -r / gem search though
<jhass> http://guides.rubygems.org/rubygems-org-api/ some docs here I'd go by the code though tbh
chouhoulis has joined #ruby
M-Technic has quit [Remote host closed the connection]
sunya7a has quit [Ping timeout: 276 seconds]
Guest65163 has quit [Ping timeout: 276 seconds]
mbreedlove has quit [Quit: Textual IRC Client: www.textualapp.com]
M-Technic has joined #ruby
sunya7a has joined #ruby
isomorphismes has quit [Remote host closed the connection]
<MadWasp> so i’d need to implement Gem Methods and Gem Version Methods from the api docs?
sunya7a_ has joined #ruby
isomorphismes has joined #ruby
<manveru> MadWasp: also look at gem-in-a-box :)
<jhass> MadWasp: you can also ready rubygems' source and look what's called when ;) https://github.com/rubygems/rubygems
kareeole_ has joined #ruby
ftj has joined #ruby
norc has quit [Ping timeout: 250 seconds]
codeurge has joined #ruby
flughafen_ has joined #ruby
ljames has joined #ruby
rkazak has quit [Ping timeout: 276 seconds]
kareeoleez has quit [Ping timeout: 246 seconds]
stunder has joined #ruby
<manveru> yeah... unless you want to support bundler :)
<MadWasp> i do
cpruitt has joined #ruby
kareeoleez has joined #ruby
jhack has joined #ruby
kareeole_ has quit [Ping timeout: 244 seconds]
aegis3121 has joined #ruby
astrobunny has joined #ruby
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sp4rKy has joined #ruby
dANOKELOFF has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
ftj has joined #ruby
bronson has joined #ruby
allcentury has quit [Ping timeout: 276 seconds]
ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
DynamicM` has joined #ruby
DynamicM` has left #ruby [#ruby]
TomyWork has quit [Ping timeout: 244 seconds]
DynamicMetaFlow has quit [Ping timeout: 240 seconds]
kareeole_ has joined #ruby
chouhoul_ has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
kareeoleez has quit [Ping timeout: 276 seconds]
chopin has joined #ruby
nareiber has joined #ruby
chopin_ has joined #ruby
startupality has quit [Quit: startupality]
chouhoulis has quit [Ping timeout: 252 seconds]
mdw_ has quit [Ping timeout: 260 seconds]
aufi has quit [Ping timeout: 276 seconds]
kareeole_ is now known as kareeoleez
chopin has quit [Ping timeout: 252 seconds]
stunder has quit [Ping timeout: 250 seconds]
siovene has quit [Quit: Connection closed for inactivity]
neanderslob has joined #ruby
labaleine has quit [Ping timeout: 240 seconds]
Coldblackice has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
synthroid has quit [Remote host closed the connection]
dANOKELOFF has quit [Quit: Ex-Chat]
terlar has quit [Quit: WeeChat 1.5]
allcentury has joined #ruby
labaleine has joined #ruby
flughafen_ has quit [Ping timeout: 244 seconds]
skade has quit [Quit: Computer has gone to sleep.]
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
jaruga____ has quit [Client Quit]
ferr has quit [Quit: WeeChat 1.5]
stunder has joined #ruby
labaleine_ has joined #ruby
rodfersou|afk is now known as rodfersou
mikecmpbll has joined #ruby
<mikecmpbll> eeuughg, rspec.
<mikecmpbll> i just want to skip this whole test context for a while, without deleting it.
m_antis has quit [Ping timeout: 260 seconds]
<zacts> morning rubyists
Es0teric has joined #ruby
anisha has quit [Quit: Leaving]
phrozen77 has joined #ruby
labaleine has quit [Ping timeout: 260 seconds]
labaleine_ is now known as labaleine
DynamicMetaFlow has joined #ruby
chromis has joined #ruby
BaroMeter has quit [Remote host closed the connection]
rippa has joined #ruby
thirax has joined #ruby
labaleine has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 246 seconds]
startupality has joined #ruby
smathy has joined #ruby
TomyLobo has joined #ruby
davedev24 has quit []
the_drow has quit [Quit: This computer has gone to sleep]
wilbert has joined #ruby
riobe has joined #ruby
AlexJakeGreen has quit [Remote host closed the connection]
Masonn has joined #ruby
<thirax> hi!
m_antis has joined #ruby
johnbat26 has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
<shevy> yo zacts yo thirax
jwren has joined #ruby
<zacts> yo yo! =)
<zacts> shevy: two ch's to go
<zacts> I'm going to be making a simple Sinatra web server today
<gregf_> er, server or app :)
dsea has quit [Quit: Leaving]
dsea has joined #ruby
kareeoleez has quit [Remote host closed the connection]
purrkode has joined #ruby
kareeoleez has joined #ruby
kareeoleez has quit [Remote host closed the connection]
dsea has quit [Changing host]
dsea has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
amclain has joined #ruby
karmatr0n has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
OTORelic has quit [Quit: WeeChat 1.4]
bluOxigen has quit [Read error: Connection reset by peer]
araujo has joined #ruby
araujo has joined #ruby
bluOxigen has joined #ruby
whathappens has joined #ruby
drewo has joined #ruby
noobsu has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kareeoleez has joined #ruby
norc has joined #ruby
riobe_ has joined #ruby
<norc> There was a module/class that had constants for the C sizeof of various internal types. Can someone give me a pointer at what Im looking for?
<zacts> gregf_: oops s/server/app/
diegoaguilar has joined #ruby
<norc> Ah. They are in Fiddle after all. Must have looked at the wrong page.
startupality has quit [Quit: startupality]
perlgod_ has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
aegis3121 has quit [Ping timeout: 252 seconds]
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
kareeoleez has quit [Ping timeout: 260 seconds]
riobe has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
diegoaguilar has joined #ruby
synthroid has joined #ruby
startupality has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
wrkrcoop has joined #ruby
<wrkrcoop> how can i get my json objects printed in my console in a readable way?
diegoaguilar has joined #ruby
<apeiros> ?jsonobject
<ruby[bot]> there is no such thing as a JSON object. You either have a String containing serialized JSON, or you have ruby objects (usually Hashes/Arrays/Strings). Which is it?
perlgod has quit [Ping timeout: 276 seconds]
<apeiros> @ wrkrcoop ^
stunder001 has joined #ruby
morenoh149 has joined #ruby
senayar has quit []
<wrkrcoop> apeiros: can u repeat that i cleared the chat room
<apeiros> ?logs wrkrcoop
<ruby[bot]> wrkrcoop: You can find a log of this channel at http://irclog.whitequark.org/ruby/
<adaedra> >_>
<apeiros> (no, no I can't)
<wrkrcoop> oh ok
<zacts> oh that's interesting re: JSON, I didn't realize this
<wrkrcoop> i guess i want to print my objects in a way that they are readable
<wrkrcoop> not all smushed together
<apeiros> p obj
<adaedra> &ri p pp
<apeiros> pp obj # needs require 'pp'
<adaedra> no bad `derpy
karmatr0n has joined #ruby
<apeiros> y obj
<zacts> apeiros: p obj does, puts obj.inspect right?
stunder has quit [Ping timeout: 244 seconds]
<apeiros> zacts: simply put yes. it's slightly different, tho
Devalo has joined #ruby
<zacts> ah ok
<norc> zacts: It is amusing that people all over are serializing objects without understanding what they are doing, possibly even why. :)
<norc> (No insult intended)
hutch34 has quit [Quit: WeeChat 1.5]
wldcordeiro has quit [Ping timeout: 240 seconds]
<wrkrcoop> ppwait how do i do it?
<zacts> norc: I'm still a newbie, so I'm just learning
Couch has quit [Ping timeout: 276 seconds]
<adaedra> zacts: p also returns the object, which allows you to just drop it to debug
<zacts> oh I see
<manveru> >> require 'pp'; pp %w[oh hai]
<ruby[bot]> manveru: # => ["oh", "hai"] ...check link for more (https://eval.in/572750)
<norc> zacts: Usually the need to serialize objects comes fairly early when solving the usual problems in books.
platzhirsch has quit [Quit: WeeChat 1.4]
<zacts> norc: it's the last ch of my book
<zacts> I'm not there yet, but will get there
<norc> :)
<norc> Alright gotta catch a train, be back later.
<zacts> laters
<manveru> >> require 'json'; JSON.pretty_unparse(%w[oh hai])
<ruby[bot]> manveru: # => "[\n \"oh\",\n \"hai\"\n]" (https://eval.in/572752)
dh64 has joined #ruby
<manveru> that one is fun too, if you want to output pretty json
<manveru> i still have no clue why they chose such a weird name though
dionysus69 has joined #ruby
<wrkrcoop> soo pp comes with standard library?
<manveru> yeah
<manveru> stdlib is full of fun and scary things
hutch34 has joined #ruby
<wrkrcoop> so require ‘pp’ then pp(obj)?
Gasher has quit [Ping timeout: 260 seconds]
<wrkrcoop> so easy
howdoi has joined #ruby
<manveru> do you know about irb?
Devalo has quit [Ping timeout: 276 seconds]
norc has quit [Ping timeout: 250 seconds]
<jhass> ?pry
<ruby[bot]> 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
<manveru> yeah, but pry is not in stdlib
<manveru> you can pry irb from my dead cold hands :P
DynamicM` has joined #ruby
CJKinni has joined #ruby
DynamicMetaFlow has quit [Remote host closed the connection]
perlgod_ is now known as perlgod
jsp is now known as ule
ule has quit [Changing host]
ule has joined #ruby
KINGSABRI_ has quit [Quit: No Ping reply in 180 seconds.]
nettoweb has joined #ruby
KINGSABRI_ has joined #ruby
kareeoleez has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> manveru: no worries. you can keep it ;-p
<manveru> :D
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> pry > irb by a landslide.
perlgod has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt3 has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
ChiefAlexander has quit [Read error: Connection reset by peer]
riobe_ has quit [Ping timeout: 250 seconds]
karmatr0n has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 276 seconds]
horaceheaven has quit [Quit: horaceheaven]
riobe_ has joined #ruby
labaleine has joined #ruby
ChiefAlexander has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
<tubbo> irb is still useful to learn
<tubbo> in cases where pry is not an option
astrobunny has joined #ruby
saneax_AFK is now known as saneax
thirax has left #ruby ["Leaving"]
<labaleine> Hello ! I want to delete a task from an array which is quite easy arr.delete(x). But it is actually not working in my code. The only way I find is to put an index to my array and then use delete_at. But I don't want this.
horaceheaven has joined #ruby
<toretore> ?code labaleine
<ruby[bot]> labaleine: We can't help you without your code, please post it to https://gist.github.com
<labaleine> I specifically want the user to type exactly what needs to be deleted
ferr has joined #ruby
blackmesa has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
noService has joined #ruby
<toretore> labaleine: user input => String, your value = ?
moeabdol has joined #ruby
evidex has quit [Remote host closed the connection]
brunto has quit [Ping timeout: 260 seconds]
Gasher has joined #ruby
DynamicM` has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
rbennacer has quit [Remote host closed the connection]
<labaleine> Maybe I am doing it in a wrong way or its not working
astrobunny has quit [Ping timeout: 260 seconds]
kareeoleez has joined #ruby
<toretore> labaleine: your array inside List has Tasks, you are asking it to delete a String
<toretore> Task.new('a string') != 'a string'
mark_66 has quit [Remote host closed the connection]
<toretore> and Task.new('a string') != Task.new('a string') because Task doesn't specify how to compare it to another Task
<apeiros> (which means it'll use identity comparison, aka Object#equal? - in case anybody wonders)
wrkrcoop has quit [Quit: wrkrcoop]
sumobob has joined #ruby
<labaleine> hum I think i got
Guest38 has joined #ruby
<toretore> (which is basically (or exactly?) obj1.object_id == obj2.object_id)
ChiefAlexander has quit [Remote host closed the connection]
ctp has joined #ruby
kareeoleez has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
phrozen77_ has joined #ruby
phrozen77 has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
mog has joined #ruby
skade has joined #ruby
<mog> hi i am trying to build a bundle and it gets tuck on a package Gem::InstallError: string-scrub requires Ruby version < 2.1, >= 1.9.3.
<mog> but i am running ruby 2.0
<labaleine> ok thanks !
<labaleine> it works
<mog> so not sure why i keep getting that error
danostrowski has joined #ruby
drewo has quit [Ping timeout: 276 seconds]
riobe_ has quit [Remote host closed the connection]
Dysp has quit [Quit: Page closed]
riobe_ has joined #ruby
skarrg has joined #ruby
emilkarl has joined #ruby
ta_ has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
nankyokusei has joined #ruby
<manveru> adaedra: i use pry mostly when i want to set a breakpoint, but otherwise i don't see how it's much better
mikecmpbll has quit [Ping timeout: 252 seconds]
<apeiros> $ and ?
cdg has quit [Remote host closed the connection]
jancel has quit [Remote host closed the connection]
<apeiros> mostest hugestest timesaver ever
perlgod has joined #ruby
cdg has joined #ruby
<apeiros> I guess ls is also nice, though I'd love a toned down version for crazy bananas like everything-rails
<Papierkorb> also pry-coolline
<zacts> when to use regex and when not to (I do know HTML should NOT use regex)
horaceheaven has quit [Quit: horaceheaven]
<Papierkorb> zacts: don't use regexes, except if you have to ..? That question is too vague
nankyokusei has quit [Ping timeout: 244 seconds]
<eam> generally, use regex when matching patterns of text is called for
<shevy> regex all the things!
Snowy has quit [Remote host closed the connection]
<apeiros> use regex to determine whether an integer is prime
Zamyatin has joined #ruby
<apeiros> for everything else, use ordinary string stuff
banister has joined #ruby
zast has joined #ruby
perlgod has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wrkrcoop has joined #ruby
kareeoleez has joined #ruby
labaleine has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
perlgod has joined #ruby
ftnsdf has quit [Remote host closed the connection]
Dimik has joined #ruby
kgrz has quit [Quit: leaving]
kareeoleez has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
antgel has quit [Ping timeout: 244 seconds]
arlek has joined #ruby
m_antis has quit [Ping timeout: 276 seconds]
xue has quit [Ping timeout: 276 seconds]
Madplatypus has joined #ruby
tatsuo has joined #ruby
perlgod has quit [Quit: Textual IRC Client: www.textualapp.com]
<smathy> :)
elaptics is now known as elaptics`away
codecop has quit [Remote host closed the connection]
mwlang has joined #ruby
aegis3121 has joined #ruby
izzimus has joined #ruby
Cohedrin has joined #ruby
<shevy> zacts are you very pleased with these answers
norc has joined #ruby
mikecmpbll has joined #ruby
<norc> >> class Object; def f; end; end; "".f
<ruby[bot]> norc: # => nil (https://eval.in/572776)
horaceheaven has joined #ruby
<norc> Brr. https://repl.it/CRnD doesn't let me do this. :(
riobe_ has quit [Remote host closed the connection]
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
riobe_ has joined #ruby
AndroidLoverInSF has joined #ruby
rbennacer has quit [Remote host closed the connection]
xue has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewo has joined #ruby
ChiefAlexander has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has joined #ruby
<jhass> can we throw repl.it into the trashcan already?
saneax is now known as saneax_AFK
Ch4rAss has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
noService has quit [Ping timeout: 276 seconds]
chopin_ has quit []
<ullu> I find this curious: h = Hash.new([]); h[:one] << "foo"; h[:two] << "bar" # => ["foo","bar"]
<ullu> h.class # => Hash
codecop has quit [Remote host closed the connection]
<ullu> what happened to the keys?
<jhass> ullu: Hash doesn't clone #default, it just assigns the same object
<ullu> or is the array the key?
kareeoleez has joined #ruby
<norc> ullu, it becomes more obvious this way:
emilkarl is now known as emilkarl[away]
skolman_ has joined #ruby
riobe_ has quit [Remote host closed the connection]
riobe_ has joined #ruby
emilkarl[away] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<aegis3121> The key :one doesnt exist, so it pulls up its default and pushes that in there. The key :two doesn't exist so it pulls up its default (the same Array) and pushes them into there. None of these are assignments, so it's never assigned.
<ullu> jhass: so the key refs are essentially ignored/absorbed?
riobe_ has quit [Remote host closed the connection]
mog has left #ruby ["Leaving"]
<jhass> no, I'm not sure what you're going at with the keys
<norc> >> ary = []; h = Hash.new(ary); h[:one] << "foo"; h[:two] << "bar"; p ary # ullu
riobe_ has joined #ruby
<ruby[bot]> norc: # => ["foo", "bar"] ...check link for more (https://eval.in/572786)
<jhass> >> h = Hash.new([]); h[:one] << "foo"; h[:two] << "bar"; h.keys
<ruby[bot]> jhass: # => [] (https://eval.in/572787)
<ullu> aegis3121: ahh, ok that makes sense!
<aegis3121> Yea. if you want a default of an empty array for each, you'd need Hash.new { |h, k| h[k] = [] }
<jhass> oh wait, #default does not create the keys, right
<jhass> always forgetting that
dionysus70 has joined #ruby
kobain has joined #ruby
<aegis3121> >> h = Hash.new { |h, k| h[k] = [] }; h[:a] << 'harold'; h[:c] << 'carrot'; puts h
<ruby[bot]> aegis3121: # => {:a=>["harold"], :c=>["carrot"]} ...check link for more (https://eval.in/572788)
emilkarl has joined #ruby
<ullu> aegis3121: interesting behavior
dionysus70 is now known as dionysus69
dionysus69 has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
<norc> https://eval.in/572789 # jhass all I wanted is try this in repl.it :(
<aegis3121> That creates a new array for each default and then allows you to mutate that instance of an array
* norc had this brilliant idea today.
<jhass> >> h = Hash.new; b = [h[:foo], h.default]; h.default = 1; [b, [h[:foo], h.default]]
SilverKey has quit [Quit: Halted.]
<ruby[bot]> jhass: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
kareeoleez has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
<jhass> heh
<jhass> >> h = Hash.new; b = [h[:foo], h.default]; h.default = 1; [b, [h[:foo], h.default]]
<ruby[bot]> jhass: # => [[nil, nil], [1, 1]] (https://eval.in/572791)
<jhass> ullu: ^ Hash.new's first argument is simply setting #default
<jhass> #default's value is returned for missing keys
<jhass> norc: crashes ruby if you try to access an instance var the other doesn't have, right?
* ullu schooled on hashes
<norc> jhass, nope. Instance variables will return nil if not defined.
<norc> jhass, but if the classes are not compatible this will very quickly crash you are correct.
<ullu> jhass: yes, I was aware of the default arg, but the behavior threw me -- thanks to y'all for clarifying
nareiber has quit [Ping timeout: 250 seconds]
tatsuo has quit [Remote host closed the connection]
mozzarella has quit [Ping timeout: 246 seconds]
kareeoleez has joined #ruby
last_staff has joined #ruby
<norc> jhass, though the more I think about it, I cannot see a reason this should ever crash.
mtkd has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
v0dro has joined #ruby
riobe_ has quit [Ping timeout: 244 seconds]
<norc> All the rbasic klass is used for is method dispatch, and some interrogation like #ancestors.
mtkd has joined #ruby
<norc> It will probably cause problems if your class has its own allocator though.
Symbiosisz has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 244 seconds]
mozzarella has joined #ruby
Symbiosisz has joined #ruby
<ullu> norc: your example above prints [] (empty array) -- now I'm confused again, is the default val not getting populated because no key assignments have been made?
mog has joined #ruby
riobe_ has joined #ruby
<mog> how do i point bundle to my rubygems dir properly?
kareeoleez has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
<mog> it keeps trying to find gems in my system dir
<mog> but not where it actually installed them
<norc> ullu, check your code. You didnt paste it right if you got an empty array.
dionysus69 has joined #ruby
ruby-lang745 has joined #ruby
<norc> >> ary = []; h = Hash.new(ary); h[:one] << "foo"; h[:two] << "bar"; p ary # ullu
<ruby[bot]> norc: # => ["foo", "bar"] ...check link for more (https://eval.in/572799)
<norc> As ruby[bot] told you, the object that ary points at is quite populated.
ChiefAlexander has quit [Remote host closed the connection]
spider-mario has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<ullu> norc: my bad -- mixed up my names on the hash variable
codeurge has joined #ruby
<norc> >> ary = []; h = Hash.new(ary); p [h[:a].__id__, ary.__id__] # ullu
<ruby[bot]> norc: # => [545721700, 545721700] ...check link for more (https://eval.in/572805)
<jhass> mog: bundler should respect GEM_HOME and I'd expect it to respect GEM_PATH too
<norc> This is proof that they are in fact pointing at the same object.
<mog> i have gem_home set
<mog> not gem_path though
<ullu> norc: got it, thanks
<norc> jhass, okay okay. Apparently instance variable access is... dubious. Looks like I have to dig some.
ruby-lang745 has quit [Ping timeout: 250 seconds]
GinoManWorks has joined #ruby
kareeoleez has joined #ruby
<mog> jhass, that did nt do it , still looking for json in systemdir
mozzarel1 has joined #ruby
<norc> Wow. When did +@ get added to Ruby?! Has this always been there?
marr has joined #ruby
<jhass> yes
<jhass> as long as I can remember
<apeiros> for things like x = +y
<norc> I have never. Ever seen this being used in production code anywhere.
tatsuo has joined #ruby
ChiefAlexander has joined #ruby
<norc> apeiros, mmm. Math libraries?
<jhass> yes, math
wldcordeiro has joined #ruby
stunder001 has quit [Ping timeout: 260 seconds]
<jhass> -@ is a thing too
<eam> I've seen it used accidentally, when people put a newline after an operand instead of after an operator in a long math expression ...
mozzarella has quit [Ping timeout: 276 seconds]
<norc> Makes sense.
<eam> the funny thing about stuff like -@ is it's only sometimes a method
<norc> asm>> puts 1 + (-2)
<ruby[bot]> norc: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<norc> o_o
<eam> >> class Fixnum; def -@; 5; end; end; x = 7; [-7, -(7), - 7, -x]
<norc> ruby[bot], give me a stack trace, sucker. :(
<eam> why does the bot hate me
<mog> fixed it
<mog> i was using system bundler somehow
kareeoleez has quit [Ping timeout: 260 seconds]
eam has quit [Changing host]
eam has joined #ruby
<eam> >> class Fixnum; def -@; 5; end; end; x = 7; [-7, -(7), - 7, -x]
<norc> eam, that makes sense. -7 should be handled by the lexer.
<ruby[bot]> eam: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<eam> norc: yeah
<eam> wow, bot's hosed
skarrg has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
morenoh149 has quit [Ping timeout: 250 seconds]
<norc> eam: # => [-7, 5, 5, 5] ...check link for more (https://eval.in/572813)
skade has quit [Quit: Computer has gone to sleep.]
<norc> If I take over this job, do you think apeiros will pay me?
<eam> I'll pay attention, how about that
hahuang65 has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> manveru: coloration, completion, $ and ? like apeiros said, ls, and binding.pry invocation
tatsuo has quit [Remote host closed the connection]
<eam> +@ and -@ are super dangerous, I think, considering the unreliable behavior of them being parsed as methods
m_antis has joined #ruby
<eam> a non issue if you don't touch 'em I mean, but if you do ...
skade has joined #ruby
<norc> It immediately became clear they could be abused to a great extend to write obfuscated code.
saush has joined #ruby
rbennacer has joined #ruby
skade has quit [Client Quit]
meatchicken has joined #ruby
allcentury has quit [Quit: WeeChat 1.2]
karmatr0n has joined #ruby
<saush> I followed ruby repo on github and wanted to know how is a new version released? As in, whenever someone contributes it goes on the truck branch now. So what happens when a new version has to be released?
<apeiros> meeh, bot
<apeiros> I ducked something up in the user & channel manager. after a while its track of the users starts to become incorrect
skweek has quit [Ping timeout: 246 seconds]
SilverKey has joined #ruby
mistermocha has quit []
<eam> ruby is authoritatively developed out of a subversion repo, but the info is mirrored over to github
kareeoleez has joined #ruby
<eam> there are release tags in most SCM systems
<eam> afaik the ruby on github uses trunk instead of master because of svn
nofxx has quit [Ping timeout: 260 seconds]
Masonn has quit [Ping timeout: 250 seconds]
symm- has joined #ruby
nofxx has joined #ruby
ramfjord has joined #ruby
kareeoleez has quit [Ping timeout: 244 seconds]
aupadhye has quit [Quit: Leaving]
drewo has quit [Ping timeout: 240 seconds]
v0dro has quit [Ping timeout: 260 seconds]
<saush> eam: I see that that there are branches made such as ruby_2_2, ruby_2_3 etc. So at the time of release all the commits from trunk have to be merged with this branches. Is this the way it is?
<mog> rake cant seem to find my gems LoadError: cannot load such file -- google/api_client
<mog> even though it was running from within my gems /home/mog/rubygems/gems/rake-11.1.2/bin/rake:33:in `<top (required)>'
<eam> saush: usually the way to reason about it is tagging a particular point on trunk
<jhass> mog: it sounds like you're reinventing chruby/rvm/rbenv
trav408 has joined #ruby
<jhass> or chgems at least
<mog> i dont have root on this box so i set the gems dir to my home dir
<mog> but it doesnt seem like its looking correctly when rake is run
jackjackdripper has joined #ruby
startupality has quit [Quit: startupality]
giz|work has joined #ruby
<mog> my gem env looks right too
drewo has joined #ruby
<jhass> mog: might be easier to just bundle install --path vendor/bundle and bundle exec everything
<mog> trying that now
oetjenj has joined #ruby
Devalo has joined #ruby
emilkarl has joined #ruby
brendan- has joined #ruby
kareeoleez has joined #ruby
IrishGringo has joined #ruby
<mog> jhass, same thing http://pastebin.com/ZMezykkM
<ruby[bot]> mog: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9c2256902b3a376262ce3fc5b66da0aa
<ruby[bot]> mog: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<mog> oh thanks ruby[bot] wont do it again.
<jhass> mog: then whatever gem provides that (google-api_client ?) is not in your Gemfile
Yiota has joined #ruby
mdw has joined #ruby
<mog> gem "google-api-client", require: 'google/api_client'
<mog> is in my gemfile
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
nofacade has joined #ruby
opaqe has joined #ruby
<mog> and the file is in the bundler dir
blandflakes has joined #ruby
kareeoleez has quit [Ping timeout: 250 seconds]
opaqe has left #ruby ["Leaving"]
ramfjord has quit [Ping timeout: 260 seconds]
purrkode has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sumobob has quit [Quit: WeeChat 1.3]
ramfjord has joined #ruby
skolman_ has quit [Remote host closed the connection]
sumobob has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skolman_ has joined #ruby
morenoh149 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 260 seconds]
banister has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
stunder001 has joined #ruby
banister has quit [Client Quit]
skolman_ has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
djbkd has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
saush has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
beauby has quit [Ping timeout: 276 seconds]
skalfyfan has joined #ruby
djbkd has joined #ruby
<shevy> do you people write a lot of boilerplate for your classes? or are you classes minimalistic
aegis3121 has quit [Ping timeout: 252 seconds]
zast has quit [Remote host closed the connection]
<Zarthus> i write far too much and complete far too little
m_antis has quit [Remote host closed the connection]
<Zarthus> i divide my classes like I'm writing java, not ruby.
<Zarthus> ¯\_(ツ)_/¯
chosen1 has joined #ruby
kareeoleez has joined #ruby
purrkode has joined #ruby
halfamind has quit [Quit: Leaving.]
<nofxx> Zarthus, I often don't believe it's working... so few lines =D
<shevy> Zarthus yeah I am noticing that in my classes too
aegis3121 has joined #ruby
<shevy> not just the code itself though, also more and more comments and structures within the comments
<nofxx> then, "exceptions" make it ugly... haha noticed? 80% of the code for 5% of the problem? only the exception
<nofxx> yeah, worst than paretto
<Zarthus> I do a lot of comments when they're necessary
B1n4r10 has joined #ruby
<Zarthus> but if my class is about keeping a list of potatoes on Jerries farm, just a class named PotatoList should give a sufficient description of what it is
yfeldblum has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
<nofxx> use rubocop/lint integrated on your editor, I'm coding way better with yellow/red arrows next to the line number
finisherr has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
<Zarthus> the rubocop intelij plugin doesn't work on windows
<nofxx> emacs ftw
<norc> Zarthus, so you try to adhere to the Law of Demeter? Java strongly encourages Wrapper classes ontop of Factories ontop of Wrappers classes to its extremes...
finisherr has quit [Client Quit]
<Zarthus> nah, not that much
finisherr has joined #ruby
rbennacer has joined #ruby
mistermocha has joined #ruby
roshanavand_ has quit [Quit: This computer has gone to sleep]
mrgrieves has quit [Quit: leaving]
kareeoleez has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
oetjenj has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> yeah the editor helps but it's still more on the wall of text to look at :(
ramfjord has joined #ruby
<Zarthus> if i didn't like writing i wouldn't be on irc
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Zarthus> if anything bugs me it's that ruby doesn't have multiline comments
ocbtec has quit [Quit: leaving]
<aegis3121> it does, they just aren't pretty
<jhass> when are multiline comments pretty anyway
<jhass> get a proper editor
astrobunny has joined #ruby
<Zarthus> helps write multiline comments, yo
<shevy> irc is a lot easier than coding!
<Zarthus> I just miss the /**<enter> from my editor I guess for automatically generating documentation
<shevy> see :)
startupality has joined #ruby
danostrowski has joined #ruby
stunder001 has quit [Ping timeout: 246 seconds]
kirun has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
wrkrcoop has quit [Quit: wrkrcoop]
jackjackdripper has joined #ruby
sauvin has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
tatsuo has joined #ruby
Tempesta has quit [Ping timeout: 240 seconds]
kareeoleez has joined #ruby
ramfjord has joined #ruby
davidblko has quit [Remote host closed the connection]
sergey_makagon has joined #ruby
nanoz has joined #ruby
kareeoleez has quit [Remote host closed the connection]
kareeoleez has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper1 has joined #ruby
saneax_AFK is now known as saneax
nankyokusei has joined #ruby
tatsuo has quit [Ping timeout: 260 seconds]
izzimus has quit [Quit: Textual IRC Client: www.textualapp.com]
gregf has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Ping timeout: 260 seconds]
saneax is now known as saneax_AFK
nankyokusei has quit [Ping timeout: 244 seconds]
tildes_ has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
halfamind has joined #ruby
Masonn has joined #ruby
symm- has joined #ruby
sergey_makagon has quit []
AndroidLoverInSF has quit [Quit: Leaving]
mozzarel1 is now known as mozzarella
banister has joined #ruby
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wrkrcoop has joined #ruby
banister has quit [Client Quit]
diegoaguilar has quit [Remote host closed the connection]
skade has joined #ruby
banister has joined #ruby
weaksauce has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
startupality has quit [Quit: startupality]
bluOxigen has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
geekbri has joined #ruby
nofacade has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
Regulati_ has joined #ruby
hightower2 has joined #ruby
ramfjord has joined #ruby
johnathon has joined #ruby
minimalism has joined #ruby
maucar has joined #ruby
johnathon is now known as disconnekted
RegulationD has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
tildes_ has quit [Ping timeout: 244 seconds]
asher128__ has joined #ruby
<asher128__> Hi I'm a beginner. Can you please tell me what the unless does here: has_command(:puppet, puppet_path) unless puppet_path.nil?
<asher128__> I need to adapt it and use if instead of unless
<asher128__> Thank youi
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<weaksauce> it runs that line unless the puppet_path variable is nil.
<Zarthus> asher128__: unless is a negation. It means 'if !puppet_path.nil?'
<Zarthus> converting it to use an if is redundant
<asher128__> weaksauce, ok, i'll use if !puppet_path.nil?
dionysus69 has quit [Ping timeout: 260 seconds]
<asher128__> weaksauce, zenguy_pc thank you guys
<Zarthus> why the arbitrary change?
<shevy> asher128__ if puppet_path
<asher128__> shevy, yeah it is simpler :)
<asher128__> weaksauce, zenguy_pc, shevy, Zarthus: I'm a Python programmer and I'm thinking about learning ruby. What are, for you guys, the advantages of Ruby over Python?
<weaksauce> insignificant whitespace
<shevy> I found that my brain needs a bit longer for "unless" statements... my brain works faster with "if"
xall has joined #ruby
<asher128__> shevy, you are not the only one :)
<weaksauce> sane package manager
<shevy> asher128__ you can model ruby how you think
<asher128__> shevy, is it because there is not 1 way to do something? you are free to do things as you want?
<shevy> the whole rails ecosystem sorta is like that - a way to think
duoi has quit [Ping timeout: 260 seconds]
<shevy> nah
<shevy> perl has the same philosophy but I always found it to get into my way
<shevy> I even kept on stumbling over forgetting to use a ";" as line terminator every now and then
<weaksauce> asher128__ everything is an object and you can metaprogram things to do what you want (to your own downfall sometimes)
<asher128__> weaksauce, everything is an object on Python too
d0nn1e has quit [Ping timeout: 244 seconds]
<asher128__> weaksauce, what I want to know is what is the big advantage of ruby
<shevy> everything is an object in bioperl too! http://bioperl.org/howtos/SeqIO_HOWTO.html
<asher128__> weaksauce, from your point of you
yfeldblum has quit [Ping timeout: 260 seconds]
<weaksauce> ruby is a less rigid way of looking at things.
<shevy> my $seqio_object = Bio::SeqIO->new(-file => $file);
bronson has joined #ruby
<shevy> there is so much superfluous content there
duoi has joined #ruby
blackmesa has joined #ruby
<asher128__> weaksauce, shevy: what about the performance? Some people told me ruby is slower than Python. Is it still the case?
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
d0nn1e has joined #ruby
<asher128__> weaksauce, shevy: is there any way to write C extensions?
<weaksauce> asher128__ it doesn't really matter for 99% of the cases
<weaksauce> and yes c extensions are possible
<asher128__> weaksauce, shevy: is there a GIL like python that limits the threads?
<asher128__> weaksauce, ok
<jhass> oh I never realized python had a GIL too
emilkarl has joined #ruby
<shevy> asher128__ do you think that speed matters?
<shevy> we have C!
<shevy> or crystal
<shevy> you will probably find fewer articles these days about speed differences. a lot of the articles originated from the 1.8.x era
PedramT has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
<asher128__> shevy, ;) yeah speed matter less than before, especially with the CPUs we have
<asher128__> jhass, yeah it has ;)
<toretore> cpus plural
Masonn has quit [Ping timeout: 260 seconds]
<shevy> sounds like a tooth paste
<asher128__> shevy, :D
davedev24 has joined #ruby
tildes_ has joined #ruby
jhack_ has joined #ruby
<wrkrcoop> my teammate is trying to use each loop and im saying use reduce, we are trying to filer an array
<wrkrcoop> is reduce better because it saves memory?
<wrkrcoop> i need a convincing reason
giz|work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<toretore> they're the same
jhack has quit [Ping timeout: 260 seconds]
jhack_ is now known as jhack
JesseH has joined #ruby
<jhass> wrkrcoop: use .select because it reads a lot better
<wrkrcoop> jhass: is .each not better than .select / reduce?
<jhass> ?better
<ruby[bot]> "Best" and "better" are subjective. Try to use a different term.
<wrkrcoop> jhass: so reduce select have no benefits over each?
<jhass> they do quite different stuff
<jhass> almost incomparable I'd say
<jhass> for "filtering an array" select/reject are the best because they require the least boilerplate code and read thus a lot better
Snowy has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wrkrcoop> jhass: got it
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nareiber has joined #ruby
tfitts has quit [Quit: Connection closed for inactivity]
skade has quit [Quit: Computer has gone to sleep.]
wrkrcoop has quit [Quit: wrkrcoop]
noService has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
curses has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
brunto has joined #ruby
ma489 has joined #ruby
blackmesa has joined #ruby
Weavel has quit [Quit: There's nothing dirtier than a giant ball of oil]
<weaksauce> asher128__ the best reason to use ruby is because exit works and doesn't give you a snarky response
brunto has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
tildes_ has quit [Ping timeout: 276 seconds]
ctp has joined #ruby
hutch34 has joined #ruby
Devalo has quit [Remote host closed the connection]
brunto has joined #ruby
brunto has quit [Read error: Connection reset by peer]
skolman_ has joined #ruby
PedramT has quit [Remote host closed the connection]
Devalo has joined #ruby
ta__ has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
yfeldblum has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
Yxhuvud has quit [Remote host closed the connection]
dopie has joined #ruby
johnny56_ has joined #ruby
dopie has quit [Client Quit]
stunder001 has joined #ruby
harrymoreno has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
Snowy has quit [Remote host closed the connection]
noobsu has joined #ruby
morenoh149 has quit [Ping timeout: 246 seconds]
s1kx has joined #ruby
impi0us has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
impi0us has left #ruby [#ruby]
flashpoint9 has joined #ruby
harrymoreno is now known as morenoh149
flashpoint9 has quit [Read error: Connection reset by peer]
Asher has joined #ruby
flashpoint9 has joined #ruby
blackthor has joined #ruby
maucar has quit [Quit: Leaving]
<zacts> shevy: this opal looks cool for Ruby -> JavaScript
ur5us has joined #ruby
<zacts> I might try to make some Atom editor plugins with Opal
<tgeeky> hmm... I must be missing something. How does one load a .rb file into IRB (or pry, in this case), and keep the context of the file in the interactive sesions?
<tgeeky> session*
<tgeeky> it loads the file fine (with require, or -r), runs whatever is in the file, then forgets the context and gives me a blank pry shell
<zacts> I do bash-$ irb -I .
<zacts> and then
<jhass> tgeeky: better to turn it around, add require "pry"; binding.pry to the file and run the file
<zacts> irb-$ require 'file-without-rb-extension'
<zacts> (perhaps my way isn't the best)
<jhass> zacts: -r does basically that ;)
<zacts> ah cool
<zacts> :-)
geekbri has quit []
<jhass> won't let you access local variables from the file, which I gather they want
ta_ has joined #ruby
<tgeeky> yeah
<tgeeky> i need to inspect them
nando293921 has joined #ruby
<tgeeky> ah, so binding.pry is basically a breakpoint
<jhass> yeah
<tgeeky> roger. thanks jhass!
<tgeeky> jhass: out of curiosity, why does the alternate method not show the local context?
<tgeeky> I guess in libraries without any state, it doens't make sense to
purrkode has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> because local variables at the top level are file local
<jhass> your irb/pry session is basically a new "file"
<tgeeky> jhass: any plugins to make this process killer, or at least better?
<jhass> (unless specially invoked in the context of one, which binding.pry does, Binding describes a scope)
<jhass> tgeeky: I like pry-byebug, pry-rescue, pry-doc and pry-stack_explorer for my debugger pry
nettoweb has joined #ruby
weemsledeux has joined #ruby
Snowy has joined #ruby
xall has quit [Ping timeout: 252 seconds]
nankyokusei has joined #ruby
shinnya has quit [Ping timeout: 276 seconds]
<tgeeky> jhass: thanks again. I got them all plus pry-nav.
<jhass> looks like pry-nav recommends to use pry-byebug instead ;)
<tgeeky> oh. yes. pry-nav is old
<tgeeky> it failed lol
duoi has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
wrkrcoop has joined #ruby
yqt has joined #ruby
xall has joined #ruby
jancel has joined #ruby
labaleine has joined #ruby
duoi has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danostrowski has joined #ruby
Yxhuvud has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
mdw has joined #ruby
purrkode has joined #ruby
minimalism has quit [Quit: minimalism]
cdg has joined #ruby
skolman__ has joined #ruby
skolman_ has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
chris2 has quit [Ping timeout: 260 seconds]
astrobunny has quit [Ping timeout: 276 seconds]
jhack has joined #ruby
ta_ has quit [Remote host closed the connection]
labaleine has quit [Read error: Connection reset by peer]
jhack has quit [Ping timeout: 240 seconds]
swills has quit [Ping timeout: 260 seconds]
dopie has joined #ruby
sneakerhax has joined #ruby
idefine has quit [Remote host closed the connection]
opus_ has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
mynameisbrian has joined #ruby
<mynameisbrian> self.each { |current_num| result = yield(result, current_num) }
<mynameisbrian> is there a better way to write that? I don't want each's return value, I want result
karmatr0n has quit [Ping timeout: 260 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mynameisbrian> so if I write a method, I would have to put result after each
SilverKey has quit [Quit: Halted.]
<Papierkorb> mynameisbrian: what is that method supposed to really do?
drewo has quit [Ping timeout: 276 seconds]
<mynameisbrian> It's inject()
<mynameisbrian> I'm rewriting it just to learn how to do it
nando293921 has quit [Ping timeout: 240 seconds]
SilverKey has joined #ruby
synthroid has quit []
<Papierkorb> mynameisbrian: in that case, looks fine to me. It's a three-liner.
tjohnson has joined #ruby
<Papierkorb> Well, that's something /like/ #inject ;)
danostrowski has joined #ruby
<mynameisbrian> does inject have other features?
hutch34 has quit [Quit: WeeChat 1.5]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karmatr0n has joined #ruby
<mynameisbrian> well yeah it just does that
kaleido has quit [Remote host closed the connection]
opus_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
<mynameisbrian> yeah mine only handles arrays, I haven't learned about ranges yet
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
bobbycvi has joined #ruby
<mynameisbrian> well when I added it to Range it still worked for that example
labaleine has joined #ruby
<tgeeky> jhass: it seems that pry-stack_explorer was causing a warning/error, so I removed the gem (someone claimed that byebug provides identical functionality)
<tgeeky> jhass: but now, my binding.pry lines are ignored
<tgeeky> jhass: instead, when pry opens I see a debuger of Pry#evaluate_ruby
<jhass> :o
<tgeeky> jhass: not actually ignored; if I remove all binding.pry statements, then it just runs cleanly (no output)
<tgeeky> any suggestions? :O
<Papierkorb> mynameisbrian: add it to module Enumerable instead :P
Don_John has joined #ruby
Don_John has quit [Remote host closed the connection]
<jhass> tgeeky: haven't seen that before, sorry :(
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaleido has joined #ruby
banister has joined #ruby
<mynameisbrian> yeah I'll try that
<mynameisbrian> do people commonly use loop?
<mynameisbrian> loop do and so on
<Papierkorb> mynameisbrian: I don't need an infinite that often, no. (But when you do, ...)
<Papierkorb> *infinite loop
mistermocha has quit [Remote host closed the connection]
riobe__ has joined #ruby
jhack has joined #ruby
<mynameisbrian> I see, thanks for all the info Papierkorb
riobe__ has quit [Remote host closed the connection]
mistermocha has joined #ruby
<mynameisbrian> I need to find another learning resource. I'm using Perl Monk, when I'm finished, I'll read a book or something
<mynameisbrian> I'm only on the beginnner of Perl Monk right now though
<Papierkorb> mynameisbrian: Begin building something cool and then learn on the way what you're missing
<mynameisbrian> yeah I have some project ideas
<Papierkorb> mynameisbrian: you already understood enumerables and stuff, IMO you're wasting your time by continuing on writing micro 'projects'
riobe_ has quit [Ping timeout: 260 seconds]
<hightower2> Hey, how can I place a bunch of text as "DATA" section at the end of a Ruby script? (I'm looking for an equivalent of Perl's __DATA__ and <DATA>)
blackgoat has joined #ruby
dopie has quit [Ping timeout: 260 seconds]
<mynameisbrian> well that's what I mean, I have ideas of things I'm going to build
<hightower2> Papierkorb++
zeroDi has joined #ruby
moeabdol has quit [Ping timeout: 252 seconds]
mynameisbrian has quit [Quit: Page closed]
TomyLobo has quit [Ping timeout: 260 seconds]
Guest43 has joined #ruby
ur5us has quit []
Guest43 has quit [Changing host]
Guest43 has joined #ruby
ELLIOTTCABLE is now known as ec
blackgoat has quit [Quit: WeeChat 1.4]
SilverKey has quit [Quit: Halted.]
pawnbox has quit [Remote host closed the connection]
blackthor has quit []
neanderslob has quit [Ping timeout: 246 seconds]
jancel has quit [Remote host closed the connection]
haxrbyte has quit [Read error: Connection reset by peer]
Masonn has joined #ruby
haxrbyte has joined #ruby
ldnunes has quit [Quit: Leaving]
drewo has joined #ruby
banister has quit [Ping timeout: 276 seconds]
purrkode has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
swills has joined #ruby
djbkd has quit [Remote host closed the connection]
nettoweb has quit [Ping timeout: 244 seconds]
neanderslob has joined #ruby
johnmilton has quit [Quit: Namaste]
CJKinni has quit [Ping timeout: 260 seconds]
platzhirsch has joined #ruby
ptx0 has quit [Ping timeout: 276 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
cpruitt has quit [Quit: cpruitt]
e4xit has joined #ruby
ur5us has joined #ruby
ptx0 has joined #ruby
ocbtec has joined #ruby
whathappens has joined #ruby
whathapp_ has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
morenoh149 has quit [Quit: WeeChat 1.4]
flashpoint9 has quit [Remote host closed the connection]
eljimmy has quit [Quit: This computer has gone to sleep]
Es0teric has quit [Quit: Computer has gone to sleep.]
drewo has quit [Ping timeout: 252 seconds]
whathappens has quit [Ping timeout: 260 seconds]
ChiefAlexander has quit [Quit: Leaving...]
akiTendo_ has joined #ruby
stunder001 has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
akiTendo_ has quit [Client Quit]
codeurge has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
akiTendo has quit [Ping timeout: 260 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
idefine has joined #ruby
platzhirsch has quit [Ping timeout: 276 seconds]
disconnekted has quit [Remote host closed the connection]
hutch34 has joined #ruby
drewo has joined #ruby
mistermocha has quit [Remote host closed the connection]
stunder001 has joined #ruby
rodfersou has quit [Quit: leaving]
mistermocha has joined #ruby
zapata has joined #ruby
norc has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 260 seconds]
brendan- has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kareeoleez has quit [Remote host closed the connection]
A124 has quit [Read error: No route to host]
edwinvdgraaf has joined #ruby
lewis1711 has joined #ruby
B1n4r10 has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<lewis1711> if I have an array "xs", how to get an enumerator starting at a particular index in the array?
firstdayonthejob has joined #ruby
A124 has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lewis1711> oh nm, xs[index..-1].to_enum
<kyle__> Can you have a class methind something like def keys<<(newkey)
ChiefAlexander has joined #ruby
* kyle__ could have sworn there were a way of doing that, but can't make it work atm.
bollullera has joined #ruby
johnmilton has joined #ruby
beauby has joined #ruby
akiTendo has joined #ruby
Es0teric has joined #ruby
noobsu has quit [Read error: Connection reset by peer]
Masonn has quit [Ping timeout: 244 seconds]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
e4xit has quit [Quit: Right I'm out!]
ctp has joined #ruby
johnmilton has quit [Remote host closed the connection]
minimalism has joined #ruby
bollullera has left #ruby [#ruby]
johnmilton has joined #ruby
e4xit has joined #ruby
<jhass> kyle__: in a.b << c the method b is called on a with no arguments and then the method << is called on the return value of b with the argument c
nanoz has quit [Ping timeout: 276 seconds]
sepp2k has quit [Quit: Leaving.]
sphex has quit [Remote host closed the connection]
tfitts has joined #ruby
<kyle__> jhass: So in that case b would have to be it's own class?
<kyle__> Ahh.
pawnbox has joined #ruby
moeabdol has joined #ruby
<jhass> kyle__: you could in fact rewrite the expression to a.b.<<(c), still valid ruby
<kyle__> Yeah, but it's not what I was intending. Also explains why what I was doing wasn't working. I'll use the word 'append' instead of << instead. Easy enough.
johnmilton has quit [Ping timeout: 260 seconds]
rbennacer has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 252 seconds]
arlek has quit [Ping timeout: 240 seconds]
akiTendo has quit [Quit: akiTendo]
hutch34 has quit [Quit: WeeChat 1.5]
sphex has joined #ruby
eljimmy has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
hobodave has quit [Ping timeout: 240 seconds]
nwhirschfeld has quit [Ping timeout: 240 seconds]
aegis3121 has quit [Ping timeout: 260 seconds]
jancel has joined #ruby
halfamind has quit [Quit: Leaving.]
chouhoul_ has joined #ruby
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
horaceheaven has quit [Quit: horaceheaven]
jancel has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
XxJMGxX has joined #ruby
curses has quit [Remote host closed the connection]
skolman__ has quit [Remote host closed the connection]
skolman_ has joined #ruby
dopie has joined #ruby
crystal77 has joined #ruby
johnmilton has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
purrist has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
purrist has quit [Remote host closed the connection]
greg has joined #ruby
skalfyfan has joined #ruby
greg has quit [Remote host closed the connection]
RegulationD has joined #ruby
tax has joined #ruby
Oclair has joined #ruby
skolman_ has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
Regulati_ has quit [Ping timeout: 250 seconds]
aghalarp has joined #ruby
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
skalfyfan has quit [Ping timeout: 240 seconds]
astrobunny has joined #ruby
skylerto has joined #ruby
<aghalarp> Newbie question: Am I supposed to update Ruby and RubyGems separately? Or are the two things the same? Rubygems is part of Ruby? So if I update Ruby, I'll have also updated Rubygems?
wilbert has quit [Ping timeout: 260 seconds]
<skylerto> uh, afaik you don't ever update Rubygems specifically.
astrobunny has quit [Read error: Connection reset by peer]
<skylerto> You can update your copy of gems.
pawnbox has quit [Ping timeout: 250 seconds]
astrobunny has joined #ruby
<Radar> aghalarp: Ruby and RubyGems are updated separately.
<skylerto> +1
Gasher has quit [Quit: Leaving]
jancel has joined #ruby
<smathy> gem update --system
<aghalarp> Is it recommended to update rubygems then?
<aghalarp> or only if there's an issue
zeroDi has quit [Quit: WeeChat 1.5]
<skylerto> depends
<skylerto> your system wide gems you should keep up to date.
<Radar> Yes, it's recommended to update rubygems.
<aghalarp> Btw I'm completely new to ruby so I have no gems at all yet
<aghalarp> and I pretty much have no idea what I'm doing! :)
noobsu has joined #ruby
<smathy> At least you know that much.
<aghalarp> The plan is to type and click things until they break.
ChiefAlexander has quit [Quit: Leaving...]
<Radar> aghalarp: that's what I get paid to do every day
<smathy> So say we all.
<toretore> just put a rescue nil after youll be fine
skylerto has quit [Quit: leaving]
skylerto_ has joined #ruby
<aghalarp> Also I guess now is a good time to ask: RVM vs rbenv?
nettoweb has joined #ruby
skylerto_ has quit [Client Quit]
stunder001 has quit [Ping timeout: 276 seconds]
skylerto has joined #ruby
<jhass> RVM but chruby before both ;)
<smathy> rbenv, but chruby before both.
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vdamewood has joined #ruby
<aghalarp> hm... never really gave chruby a look
<havenwood> no switcher, but chruby if you must
<aghalarp> What's the most popular these days?
stunder001 has joined #ruby
dopie has quit [Ping timeout: 244 seconds]
<jhass> rvm is probably still the most used but chruby should be used more often than rbenv
<jhass> note that chruby is younger, and rvm is the oldest, you got some legacy and some people who never had a reason to move
toretore has quit [Ping timeout: 260 seconds]
<jhass> popularity is usually a bad measure
zenlot6 has quit [Ping timeout: 260 seconds]
<aghalarp> yeah that's a good point
gheegh has quit [Ping timeout: 260 seconds]
dopie has joined #ruby
danostrowski has joined #ruby
last_staff has quit [Quit: last_staff]
zenlot6 has joined #ruby
skylerto has quit [Quit: leaving]
nankyokusei has joined #ruby
dopie has quit [Client Quit]
<Radar> aghalarp: what OS are you?
gtsai has joined #ruby
<Radar> are you on*
<aghalarp> mac
horaceheaven has joined #ruby
Snowy has quit [Remote host closed the connection]
<aghalarp> ah cool, thanks. Was reading another guide but I'll look through this one too
e4xit has quit [Quit: Right I'm out!]
noobsu has quit [Remote host closed the connection]
nerium has joined #ruby
Luigi has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
spider-mario has quit [Read error: Connection reset by peer]
Gasher has joined #ruby
gtsai_ has joined #ruby
gtsai has quit [Ping timeout: 260 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hightower3 has joined #ruby
ma489 has quit [Ping timeout: 246 seconds]
JesseH has quit [Remote host closed the connection]
Tyrant_ has quit [Quit: Tyrant_]
grs has quit [Ping timeout: 260 seconds]
aghalarp has quit [Read error: Connection reset by peer]
gtsai_ has quit [Read error: Connection reset by peer]
aghalarp has joined #ruby
gtsai has joined #ruby
hightower2 has quit [Read error: Connection reset by peer]
Nahra has joined #ruby
Tyrant_ has joined #ruby
kirun has quit [Quit: Client exiting]
zapata has quit [Ping timeout: 260 seconds]
firstdayonthejob has quit [Ping timeout: 244 seconds]
RegulationD has quit [Remote host closed the connection]
nankyokusei has quit [Remote host closed the connection]
<hightower3> Hey, how do I create a here document that is effectively surrounded by ' and not " ?
IrishGringo has quit [Ping timeout: 260 seconds]
agent_white has quit [Quit: leaving]
<hightower3> (i.e. no interpolation in it)
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gtsai_ has joined #ruby
hahuang65 has joined #ruby
<weaksauce> hightower3 surround the token with single quotes
crystal77 has quit [Ping timeout: 276 seconds]
astrobunny has quit [Remote host closed the connection]
B1n4r10 has quit [Ping timeout: 276 seconds]
<hightower3> Oh ok, didn't think it was the same as in Perl, thanks!
grs has joined #ruby
<weaksauce> other options
Luigi has quit [Quit: Page closed]
jobewan has quit [Ping timeout: 252 seconds]
gtsai has quit [Ping timeout: 276 seconds]
impermanence has joined #ruby
symm- has quit [Ping timeout: 252 seconds]
symm-_ has joined #ruby
gtsai_ has quit [Remote host closed the connection]
gtsai has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
zapata has joined #ruby
startupality has joined #ruby
Synthead has joined #ruby
bronson has joined #ruby
karmatr0_ has joined #ruby
youch has joined #ruby
jancel has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 240 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
impermanence has quit [Quit: leaving]
impermanence has joined #ruby
biberu has quit []
aghalarp has joined #ruby
moei has quit [Quit: Leaving...]
trav408 has quit [Quit: WeeChat 1.4]
bronson has quit [Ping timeout: 252 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
idefine has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
lewis1711 has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
youch has quit [Quit: Konversation terminated!]
Gasher has quit [Quit: Leaving]
lewis1711 has joined #ruby
wrkrcoop has joined #ruby
idefine has joined #ruby
ocbtec has quit [Quit: leaving]
lewis1712 has joined #ruby
rkazak has joined #ruby
IrishGringo has joined #ruby
mwlang has quit [Read error: Connection reset by peer]
grs has quit [Ping timeout: 246 seconds]
mwlang has joined #ruby
A124 has quit [Read error: No route to host]
lewis1711 has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
finisherr has quit [Quit: finisherr]
chris2 has joined #ruby
A124 has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
jwren has quit [Quit: Lost terminal]
drewo has quit [Ping timeout: 260 seconds]
lewis1712 has quit [Ping timeout: 260 seconds]
ur5us_ has joined #ruby
labaleine has quit [Read error: No route to host]
Limix has joined #ruby
aeterne has joined #ruby
ur5us has quit [Ping timeout: 276 seconds]
crystal77 has joined #ruby
koooge has joined #ruby
youch has joined #ruby
grs has joined #ruby
startupality has quit [Quit: startupality]
moeabdol has joined #ruby
<tgeeky> can I pass an object (say, a ProgressBar) in a options hash to a function?
<tgeeky> and expect it to work?
<tgeeky> i seem to be getting a reference to the object, but it's all valueless and reset :/
karmatr0_ has quit [Ping timeout: 240 seconds]
<Radar> ?code tgeeky
<ruby[bot]> tgeeky: We can't help you without your code, please post it to https://gist.github.com
<Radar> p.s. good morning
<tgeeky> Radar: ayyyy
moeabdol has quit [Ping timeout: 260 seconds]
<tgeeky> first file is in a Kiba-ETL format (it's just ruby though)
<tgeeky> i create the progress bar
<tgeeky> then try to pass it to the source thing
<tgeeky> then to the transformation thing
<Radar> Why are you using class variables.
<tgeeky> because i haven't fixed that yet
<Radar> Use instance variables instead.
<tgeeky> yeah, i plan to
<tgeeky> i was having trouble and used it as a workaround
<Radar> It might work with instance variables?
<Radar> I don't know for certain. I would need to fiddle with it
<tgeeky> @@ is class, @ is instance?
<tgeeky> oh, I see what's going on
<tgeeky> nevermind.