baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.4.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
skryking__ has joined #ruby
skryking_ has quit [Ping timeout: 250 seconds]
sgen has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
Swyper has joined #ruby
comet23 has joined #ruby
<comet23> what is the preferred method of installing ruby on windows?
<havenwood> comet23: Do you use chocolatey package manager or the Windows Subsystem for Linux (WSL)?
<comet23> i think i have wsl preinstalled by default since this is a later version of windows 10 pro
<havenwood> comet23: If "no" and "no," then I'd suggest using the RubyInstaller for Windows: https://rubyinstaller.org/
<comet23> i think i should download the chocolatey package manager though
<havenwood> comet23: Then you might consider just installing Ruby on WSL.
<comet23> i've never head of it
<havenwood> comet23: https://chocolatey.org/
<comet23> i don't relaly like wsl because it feels weird
<comet23> i'm not sure how to explain it
<havenwood> comet23: How about a full Ubuntu VM from the Windows App Store?
<comet23> i have an ubuntu vbox instlaled
<comet23> installed*
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<comet23> i think i tried using that before and it was like a headless ubuntu where you can run bash commands on the dos prompt
<havenwood> comet23: Isn't headless fine for Ruby dev? Or you're using graphics?
<comet23> oh man this chocolatey thing looks great
<comet23> well the ubuntu i was using had a gui and i prefer the gui but you're right about needing to be comfortable with headless setups
kyrylo has joined #ruby
tpendragon_ has quit [Ping timeout: 268 seconds]
kyrylo has quit [Ping timeout: 258 seconds]
tpendragon has joined #ruby
Swyper has quit [Remote host closed the connection]
jcarl43 has quit [Quit: WeeChat 2.4]
Swyper has joined #ruby
krawchyk has joined #ruby
edwardly has quit [Read error: Connection reset by peer]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
AJA4350 has quit [Quit: AJA4350]
cliluw has quit [Read error: Connection reset by peer]
donst has joined #ruby
krawchyk has quit [Quit: krawchyk]
pupsikov has joined #ruby
<IGnorAND> https://gist.github.com/nuheluxulu/7c425025a503c50b991bab75659d64be Anyone understand why Node doesn't see the **opts in the initialize?
def_jam has joined #ruby
eb0t_ has joined #ruby
eb0t has quit [Ping timeout: 258 seconds]
eblip has quit [Ping timeout: 258 seconds]
<IGnorAND> I have a weird hash though: {"node"=>"my_node", "mem"=>65118486528, "cpu"=>0.0878811061129038, "maxcpu"=>16, "id"=>"node/my_node", "status"=>"online", "type"=>"node", "level"=>"", "maxmem"=>84452896768, "disk"=>4445147136, "uptime"=>27682668, "maxdisk"=>38836535296, "ssl_fingerprint"=>"0E:C1:C1:ED:54:33:CD:8D:D0:31:FF:42:DF:21:8A:4D:9E:CB:1D:22:FE:CD:4C:E9:F7:77:0B:EB:60:5E:A5:83"}
darix has quit [Quit: brb]
ramfjord has joined #ruby
renich has joined #ruby
darix has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
cliluw has joined #ruby
code_zombie has quit [Quit: Leaving]
mostlybadfly has joined #ruby
laaron has quit [Remote host closed the connection]
fphilipe has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laaron has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
Swyper has quit [Remote host closed the connection]
<comet23> i have a hard time understanding recursion
arescorpio has joined #ruby
pupsikov has joined #ruby
houhoulis has joined #ruby
ElF3rn4 has joined #ruby
sameerynho has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
<havenwood> IGnorAND: **opts is for keyword arguments, like: Node.new(maxcpu: 42)
<havenwood> IGnorAND: @cpu = opts[:cpu]
<havenwood> IGnorAND: Alternatively, use actual keyword arguments: def initialize(cpu: nil, level: nil)
<havenwood> comet23: keep thinking about it in a loop, each loop thinking a bit more, until you reach and understanding, and at that point break out of the loop with your newfound knowledge
<havenwood> an understanding*
<havenwood> i guess i should say call your understanding function, passing in the incremental knowledge >.>
jenrzzz has joined #ruby
<elomatreb> to understand recursion, start by understanding recursion
<havenwood> but then stop at some point once you understand it
<havenwood> or it's just an infinite loop
tpanarch1st has quit [Quit: Thanks for your help, nice to see you, take care.]
tdy1 has joined #ruby
gnufied has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 258 seconds]
tpanarch1st has joined #ruby
ElF3rn4 has quit [Quit: WeeChat 2.4]
duderonomy has joined #ruby
dar123 has joined #ruby
<quarters> hello. I was wondering if there's a way to get [1,2,3,3,5] from removing [1,2,4] from [1,1,2,2,4,3,3,5] with a single operator. Diff unfortunately removes all instances of the elements [1,2,4] found in the other array
braincrash has quit [Quit: bye bye]
s3nd1v0g1us has quit [Ping timeout: 276 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
ramfjord has joined #ruby
cranq has quit [Ping timeout: 246 seconds]
cranq has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
advorak has joined #ruby
advorak has quit [Client Quit]
duderono_ has joined #ruby
duderonomy has quit [Ping timeout: 276 seconds]
nadir has quit [Quit: Connection closed for inactivity]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dar123 has joined #ruby
podlech has joined #ruby
podlech has quit [Client Quit]
fphilipe has joined #ruby
podlech has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
pupsikov has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has quit [Ping timeout: 250 seconds]
arescorpio has quit [Quit: Leaving.]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pupsikov has quit [Client Quit]
sauvin has joined #ruby
segy has quit [Ping timeout: 268 seconds]
segy has joined #ruby
Swyper has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
weteamsteve1 has quit [Read error: Connection reset by peer]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
fphilipe has joined #ruby
noodle has joined #ruby
reber has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
sagax has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
laaron has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
laaron has joined #ruby
comet23 has quit [Quit: Connection closed for inactivity]
podlech has quit [Quit: WeeChat 2.5-dev]
segy has quit [Ping timeout: 258 seconds]
duderonomy has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
<Swyper> phaul: thanks xD I'm just a second year comp sci student taking a free online bootcamp to learn some skills
hightower2 has quit [Ping timeout: 258 seconds]
hightower2 has joined #ruby
<havenwood> quarters: hi! no, there's not a single operator to do just that.
<quarters> havenwood, thank you
<havenwood> &>> [1,2,4].each_with_object([1,1,2,2,4,3,3,5]) { |n, a| a.delete_at a.index n }
<rubydoc> # => [1, 2, 3, 3, 5] (https://carc.in/#/r/6snb)
<quarters> ah, thanks!
Swyper has quit [Remote host closed the connection]
<havenwood> no prob!
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
segy has joined #ruby
marmotini_ has joined #ruby
cd has quit [Quit: cd]
houhouli_ has joined #ruby
nowhere_man has joined #ruby
houhoulis has quit [Ping timeout: 245 seconds]
nowhere_man has quit [Ping timeout: 258 seconds]
duderonomy has joined #ruby
jefffrails35 has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
nowhere_man has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
dsmythe has quit [Remote host closed the connection]
Dbugger has joined #ruby
laaron has quit [Remote host closed the connection]
prestorium has joined #ruby
queip has quit [Ping timeout: 250 seconds]
laaron has joined #ruby
dsmythe has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
queip has joined #ruby
Dbugger has quit [Quit: Leaving]
Dbugger has joined #ruby
Dbugger has quit [Client Quit]
houhouli_ has quit [Remote host closed the connection]
rindolf has joined #ruby
booboy has quit [Quit: ZNC - https://znc.in]
booboy has joined #ruby
dsmythe has quit [Remote host closed the connection]
renich has quit [Remote host closed the connection]
dsmythe has joined #ruby
sonne has joined #ruby
dsmythe has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
jenrzzz has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
rindolf has quit [Remote host closed the connection]
thadtheman has joined #ruby
<thadtheman> How can I fix this? https://dpaste.de/WJ62
marmotini_ has quit [Ping timeout: 250 seconds]
ta_- has quit [Ping timeout: 276 seconds]
kyrylo has joined #ruby
fanta1 has joined #ruby
ta_ has joined #ruby
fphilipe has joined #ruby
plasticcat420 has joined #ruby
jefffrails35 has quit [Ping timeout: 246 seconds]
waheedi has joined #ruby
conta has joined #ruby
TomyLobo has joined #ruby
waheedi has quit [Client Quit]
conta has quit [Client Quit]
conta has joined #ruby
tdy1 has quit [Ping timeout: 245 seconds]
marmotini_ has joined #ruby
zleap has joined #ruby
zleap has quit [Changing host]
zleap has joined #ruby
RougeR has joined #ruby
RougeR is now known as Guest67925
marmotini_ has quit [Ping timeout: 246 seconds]
tdy1 has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
conta has quit [Quit: conta]
queip has quit [Ping timeout: 245 seconds]
conta has joined #ruby
conta has quit [Client Quit]
conta1 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
conta1 is now known as conta
tdy1 has quit [Ping timeout: 245 seconds]
clemens3_ has joined #ruby
conta has quit [Read error: Connection reset by peer]
queip has joined #ruby
sameerynho has joined #ruby
_whitelogger has joined #ruby
zapata_ has joined #ruby
zapata has quit [Ping timeout: 258 seconds]
<phaul> thadtheman: don't use class variables.
<phaul> you can always use just instance variables. class variables break encapsulation, inheritance, etc.
fphilipe has quit [Ping timeout: 246 seconds]
marmotini_ has joined #ruby
AJA4350 has joined #ruby
cthulchu_ has joined #ruby
conta has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 244 seconds]
conta has joined #ruby
conta has quit [Client Quit]
conta has joined #ruby
plasticcat420 has quit [Ping timeout: 258 seconds]
zleap has quit [Quit: WeeChat 1.6]
conta has quit [Ping timeout: 255 seconds]
conta has joined #ruby
kapil____ has joined #ruby
Fernando-Basso has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
nowhere_man has joined #ruby
jenrzzz has joined #ruby
govg has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
govg has joined #ruby
BTRE has quit [Remote host closed the connection]
Inline has quit [Quit: Leaving]
dionysus70 has joined #ruby
Inline has joined #ruby
marmotini_ has quit [Ping timeout: 246 seconds]
sonne has left #ruby [#ruby]
fphilipe has joined #ruby
clemens3_ has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 268 seconds]
clemens3 has joined #ruby
dsmythe has joined #ruby
dsmythe has quit [Ping timeout: 250 seconds]
ujjain has quit [Ping timeout: 258 seconds]
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
_joes_ has joined #ruby
ujjain has quit [Ping timeout: 255 seconds]
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
BTRE has joined #ruby
_joes_ has quit [Ping timeout: 250 seconds]
clemens3 has quit [Ping timeout: 245 seconds]
clemens3 has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
jasongrossman has joined #ruby
conta has quit [Client Quit]
doodlebug has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
Xeago_ has joined #ruby
doodlebug has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
Xeago_ is now known as Xeago
conta has joined #ruby
fphilipe has joined #ruby
lucasb has joined #ruby
prestori_ has joined #ruby
prestorium has quit [Ping timeout: 246 seconds]
derbie has joined #ruby
cd has joined #ruby
fphilipe has quit [Ping timeout: 264 seconds]
dsmythe has joined #ruby
prestori_ has quit [Ping timeout: 244 seconds]
d^sh has quit [Ping timeout: 245 seconds]
d^sh has joined #ruby
dsmythe has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
dsmythe has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Inline has quit [Ping timeout: 264 seconds]
nowhere_man has quit [Ping timeout: 255 seconds]
endemic has joined #ruby
dionysus70 has quit [Ping timeout: 246 seconds]
shanks8080 has quit [Ping timeout: 245 seconds]
shanks8080 has joined #ruby
Guest67925 is now known as RougeR
RougeR has quit [Changing host]
RougeR has joined #ruby
crankharder has joined #ruby
crankharder has quit [Client Quit]
fphilipe has joined #ruby
conta has quit [Quit: conta]
fphilipe has quit [Ping timeout: 258 seconds]
Inline has joined #ruby
houhoulis has joined #ruby
bvdw6 has quit [Quit: bvdw6]
fphilipe has joined #ruby
bvdw has joined #ruby
bvdw has quit [Client Quit]
bvdw6 has joined #ruby
bvdw6 has quit [Client Quit]
bvdw has joined #ruby
bvdw has quit [Client Quit]
jasongrossman has quit [Ping timeout: 258 seconds]
bvdw has joined #ruby
Nirvash has quit [Quit: Ping timeout (120 seconds)]
Nirvash has joined #ruby
dsmythe has quit [Ping timeout: 276 seconds]
tdy1 has joined #ruby
SCHAPiE has quit [Ping timeout: 245 seconds]
SCHAPiE has joined #ruby
renich has joined #ruby
ricekrispie has joined #ruby
derbie has quit [Quit: Leaving]
ricekrispie2 has quit [Ping timeout: 245 seconds]
sagax has quit [Read error: Connection reset by peer]
_joes_ has joined #ruby
RougeR has quit [Ping timeout: 245 seconds]
kyrylo has joined #ruby
eckhardt has joined #ruby
galeido has quit [Ping timeout: 268 seconds]
_joes_ has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
comet23 has joined #ruby
<comet23> if i wanted to load an external file would i use the load keyword?
shanks8080 has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
galeido has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shanks8080 has joined #ruby
prestorium has joined #ruby
prestorium has quit [Ping timeout: 245 seconds]
<thadtheman> How can I fix this? https://dpaste.de/WJ62
prestorium has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
ivanskie has joined #ruby
weird_error has joined #ruby
doodlebug has quit [Ping timeout: 246 seconds]
prestorium has quit [Ping timeout: 244 seconds]
sagax has joined #ruby
waheedi has joined #ruby
houhouli_ has joined #ruby
agent_white has joined #ruby
houhoulis has quit [Ping timeout: 245 seconds]
waheedi has quit [Ping timeout: 246 seconds]
prestorium has joined #ruby
Dbugger has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
prestorium has quit [Ping timeout: 246 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
houhoulis has joined #ruby
dar123 has joined #ruby
dsmythe has joined #ruby
fphilipe has joined #ruby
houhouli_ has quit [Ping timeout: 250 seconds]
houhouli_ has joined #ruby
houhoulis has quit [Ping timeout: 246 seconds]
dsmythe has quit [Ping timeout: 276 seconds]
houhoulis has joined #ruby
facest has quit [Remote host closed the connection]
facest has joined #ruby
houhoul__ has joined #ruby
houhouli_ has quit [Ping timeout: 245 seconds]
houhouli_ has joined #ruby
houhoulis has quit [Ping timeout: 245 seconds]
houhoulis has joined #ruby
houhoul__ has quit [Ping timeout: 246 seconds]
houhouli_ has quit [Ping timeout: 268 seconds]
prestorium has joined #ruby
r3m has quit [Quit: WeeChat 2.5-dev]
r3m has joined #ruby
waheedi has joined #ruby
<adam12> thadtheman: If it's just to fix the error, initialize @@name before attempting to use it. https://gist.github.com/adam12/4e93b95d91706eac0612c1c23538c651
<adam12> comet23: What kind of file?
weteamsteve has joined #ruby
<adam12> thadtheman: There's better ways to do it tho. I'd suggest avoiding the class variables in favour of class instance variables (single @). They're more commonly used in Ruby and I act a bit more similar to what you might be used to (imho).
prestorium has quit [Ping timeout: 250 seconds]
fphilipe has quit [Ping timeout: 276 seconds]
jefffrails35 has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> thadtheman: Ruby has Singleton in the stdilb if that's really the pattern you want: https://gist.github.com/havenwood/b290ce4db82b41f5a9b501dbec447b1b
<havenwood> thadtheman: consider if you really have a single instance of state?
RougeR has joined #ruby
RougeR is now known as Guest2972
<havenwood> &ri Singleton
waheedi has quit [Quit: waheedi]
jenrzzz has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
dsmythe has joined #ruby
renich has quit [Ping timeout: 246 seconds]
fphilipe has joined #ruby
hightower3 has joined #ruby
dsmythe has quit [Ping timeout: 264 seconds]
hightower2 has quit [Ping timeout: 258 seconds]
<thadtheman> havenwood: I'll look closer at Singleton. but at first blush it looks like overkill. Basically what I am doing is simple enough. Test if @@name exists. If it does return it if it doesn't then initialize it and return the value. So what I really need is a way to test if a class variable is initialized.
<havenwood> thadtheman: Class variables are a thing that Matz wishes he hadn't added to Ruby. They exist for backwards compatibility. Use instance variables.
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
shah^ has joined #ruby
Swyper has quit [Remote host closed the connection]
def_jam is now known as eblip
Swyper has joined #ruby
<phaul> Swyper: I didn't mean you, or anybody specifically. I have a thing against *some* courses, teaching online or otherwise is a humble thing, earning mony for it is OK. Creating expensive courses with a curriculum that you know, is impossible to teach in the timeframe, but still ask for money for the course is what I was speaking about. Not you.
<Swyper> oh okay, well if it helps this is a top bootcamp that made all their course material available online for free xD
<Swyper> phaul, how do you think I should learn or do you have a course you recommend ?
<uplime> havenwood: if you did want to share data across all instances of a class, how would you do that?
<phaul> what you are doing is good, at least for a while. Then when you are compfortable with Ruby, my personal recomendation: do a bunch of !hunders! codewars challanges in Ruby. Compare your sollution to the top voted ones once you complete a task
Swyper has quit [Remote host closed the connection]
eb0t_ is now known as eb0t
fphilipe has quit [Ping timeout: 258 seconds]
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.4]
<phaul> &>> class C; class << self; attr_accessor :foo; end; def blah; self.class.foo ; end end; x = C.new; C.foo = 13; x.blah # uplime
<rubydoc> # => 13 (https://carc.in/#/r/6spl)
Swyper has joined #ruby
<uplime> ah ok, thanks
dionysus69 has quit [Remote host closed the connection]
dsmythe has joined #ruby
dionysus69 has joined #ruby
edwardly has quit [Read error: Connection reset by peer]
pupsikov has joined #ruby
<Swyper> thanks phaul
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsmythe has quit [Ping timeout: 276 seconds]
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
cow[moo] has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
waheedi has joined #ruby
<comet23> can we use .include? in an array with objects in it?
<comet23> brothers = [{name: "john", age: 12}, {name: "mike", age: 10}, {name: "steven", age: 8}]
DTZUZU has quit [Quit: WeeChat 2.2]
<comet23> i would like to do something like brothers.include?("steven")
DTZUZU has joined #ruby
fanta1 has quit [Quit: fanta1]
<canton7> comet23, brothers.map{ |x| x[:name] }.include?("steven") or brothers.any?{ |x| x[:name] == "stephen" }
nowhere_man has joined #ruby
<comet23> thank you canton7
podlech has joined #ruby
<Swyper> hmm
<Swyper> im confused as to why in pry it seems what I am doing works fine but not in my actual code..
Swyper has quit [Remote host closed the connection]
<baweaver> Someone tell Swyper whenever they get back on that - and _ aren't the same
<adam12> O_O nice try Illuminati
Swyper has joined #ruby
<baweaver> Oi Swyper, what character are you using for a placeholder there on line 13?
<Swyper> o m g
<baweaver> ....versus the ones on 50 and 53?
<baweaver> Also use `attr_reader` for guess_word
<kaleido> swyper no swypee
<Swyper> rip
<Swyper> why should I use attr_read? @baweaver
<baweaver> Make sure to read the RSpec errors carefully, it would have probably told you something like this.
<baweaver> `attr_reader :guess_word` will make a method for guess_word
<baweaver> making 22, 50, and 53 unnecessary
AndChat87561 has joined #ruby
fphilipe has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
<Swyper> it did tell me exactly what the error was but my eyes just glazed over it I'm not sure why I did not notice I using "-" as the placeholder instead of "_"
<baweaver> Asterisk is more visually distinct `*`
jottr has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
<quarters> I was wondering how I can use vs code's debugger with bundle exec rspec
jenrzzz has joined #ruby
shtirlic has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
cd has quit [Remote host closed the connection]
<havenwood> Swyper: I left some other comments yesterday. They're here in the logs in case you missed them: https://freenode.irclog.whitequark.org/ruby/2019-04-26#1556317332-1556317856;
<Swyper> quarters: are you going through AA aswell?
dsmythe has joined #ruby
<Swyper> havenwood: ill take a look, sec
<Swyper> thanks
cd has joined #ruby
<quarters> Swyper, yes. haha. how'd you guess
<Swyper> cause im doing the same thing lol
<Swyper> AA = App Academy
<Swyper> what section are you on?
<quarters> but what did I do to give it away?
jottr has quit [Ping timeout: 246 seconds]
<quarters> oh, I thought you meant alcoholics anonymous
<quarters> jk
<Swyper> eh I am running into the same issue with using their predefined tests and not being able to see the actual error messages lol
shtirlic has joined #ruby
<Swyper> >_>
<quarters> I'm on the ruby section now
<quarters> do you have vs code's debugger setup?
<Swyper> i dont
<Swyper> im still doing the foundations section
<Swyper> software engineering fundementals or w.e
<quarters> cool. _just_ finished that
dsmythe has quit [Ping timeout: 276 seconds]
Guest2972 has quit [Ping timeout: 246 seconds]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest2972 has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
Guest2972 has quit [Ping timeout: 245 seconds]
waheedi has quit [Quit: waheedi]
<Swyper> thanks havenwood, I incorporated most of your changes into my code now
fphilipe has joined #ruby
violentE has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
jottr has joined #ruby
<havenwood> Swyper: if you'd like any more suggestions, show your latest code!
<havenwood> Swyper: the rubocop gem has some fancy autocorrections. i'd suggest giving it a try.
<havenwood> Swyper: gem install rubocop
<Swyper> what is rubocop?
<havenwood> Swyper: then add the -a flag to auto-fix issues: rubocop -a your_ruby_file.rb
<havenwood> Swyper: try it without -a to see what the corrections would be
<havenwood> Swyper: rubocop 0_hangman.rb
<Swyper> rubocop -a your_ruby_file.rb when I run it right ?
<havenwood> Swyper: yup
<Swyper> so in terminal type out: rubocop -a your_ruby_file.rb
<Swyper> neato
<havenwood> Swyper: that would "auto-correct" any issues rubocop found
<havenwood> Swyper: it has good suggestions, typically
<havenwood> Swyper: see if it has any fixes for your file?
<havenwood> Swyper: (it's called "linting")
<weteamsteve> rubocop is awesome
<Swyper> I'm somewhat hesitant towards using attr_reader at the moment just because I don't even understand how to define and interact with attributes the long way yet 100%
jottr has quit [Ping timeout: 250 seconds]
<Swyper> do you think thats a valid reason to not use attr_reader, or should I just use it ? ;x
<havenwood> Swyper: attr_reader does only one thing, it exposes an instance variable with an instance method of the same name
<havenwood> Swyper: just know that `attr_reader :x` is EXACTLY the same as `def x; @x; end`
<havenwood> Swyper: that way you don't have to read the method definition - you know `attr_reader :x` is just a method that reads an instance variable of the same name, @x
<havenwood> Swyper: then you can focus reading on the methods that do something beyond merely reading an instance variable
shtirlic has quit [Ping timeout: 250 seconds]
<Swyper> my understand on concepts is still somewhat shaky
<Swyper> def x; @x; end <-- this is a method which exposes (and declares?) and instance variable named @x ?
<Swyper> im not sure if my understanding is correct or not
<havenwood> Swyper: i wouldn't say "declares" really, but it does have a value of `nil` since it's declared
<havenwood> Swyper: instance variables are `nil` when defined without a value
<havenwood> Swyper: but yeah, it's a method which exposes an instance variable
<havenwood> Swyper: instance.x #=> value of @x
<Swyper> I see, so how come we do not just define instance variables at the top of the script normally eg, @@varname
<havenwood> Swyper: so the internal attribute, which is the instance variable @x, is exposed via an attribute reader method #x.
<havenwood> Swyper: don't use the two @@ version (class variable)
<havenwood> Swyper: Yes, it's common practice to declare used instance variables in the #initialize method.
<havenwood> Swyper: @x = nil
<havenwood> Swyper: You'll often see a litany of `@xyz = ...` in an #initialize method.
shtirlic has joined #ruby
<Swyper> ah I see
<phaul> also attr_reader :x pretty much does the same thing as your method
<phaul> (tiny bit more efficient by MRI, but the reason to do with attr_reader is the succintness)
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
<havenwood> you don't have to wonder if the method does something more, or the instance variable name doesn't match the method name subtly or anything else - it *just* exposes an instance variable of the same name
<Swyper> what does MRI mean? phaul
laaron has joined #ruby
<havenwood> CRuby
<havenwood> the reference implementation of Ruby, Matz' Ruby Interpreter (now a VM), written in C
<Swyper> thats interesting =p
shtirlic has quit [Ping timeout: 245 seconds]
<phaul> &ri Module#attr_reader, Swyper
laaron has quit [Remote host closed the connection]
<Swyper> oh my god I can see the C code for it
laaron has joined #ruby
<Swyper> stop it burns
TimApple has quit [Remote host closed the connection]
<Swyper> =p
hightower3 has quit [Ping timeout: 258 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
Dbugger has quit [Ping timeout: 264 seconds]
fphilipe has joined #ruby
dsmythe has joined #ruby
jottr has joined #ruby
dsmythe has quit [Ping timeout: 264 seconds]
houhoulis has quit [Remote host closed the connection]
Fernando-Basso has quit [Ping timeout: 246 seconds]
bga57 has quit [Quit: Leaving.]
jottr has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
kyrylo has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
jefffrails35 has quit [Remote host closed the connection]
cow[moo] has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
mosh has joined #ruby
jenrzzz has joined #ruby
dsmythe has joined #ruby
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
jottr has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
fphilipe has quit [Ping timeout: 264 seconds]
jottr has quit [Ping timeout: 258 seconds]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has joined #ruby
buckworst has joined #ruby
fphilipe has quit [Ping timeout: 240 seconds]
buckworst has quit [Client Quit]
nowhere_man has quit [Ping timeout: 246 seconds]
bga57 has joined #ruby
reber has quit [Remote host closed the connection]
podlech has quit [Quit: WeeChat 2.5-dev]
jottr has joined #ruby
RiPuk has quit [Ping timeout: 246 seconds]
RiPuk has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Ping timeout: 258 seconds]
Swyper has joined #ruby
fphilipe has quit [Ping timeout: 268 seconds]
Swyper has quit [Remote host closed the connection]
clemens3_ has joined #ruby
clemens3 has quit [Ping timeout: 268 seconds]