havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.7.0-preview1: 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!
orbyt_ has joined #ruby
crankharder has quit [Ping timeout: 268 seconds]
CCDelivery has joined #ruby
staticx has joined #ruby
exmortus has quit [Ping timeout: 268 seconds]
daemonwrangler_ has quit [Quit: ZNC 1.6.5 - http://znc.in]
crankharder has joined #ruby
daemonwrangler has joined #ruby
AJA4350 has quit [Quit: AJA4350]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
cschneid_ has quit [Remote host closed the connection]
duderonomy has joined #ruby
Guest21977 has quit [Ping timeout: 245 seconds]
code_zombie has quit [Quit: Leaving]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_dbugger has joined #ruby
dbugger has quit [Ping timeout: 252 seconds]
violentE has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CCDelivery has quit [Remote host closed the connection]
orbyt_ has joined #ruby
tranch has joined #ruby
crankharder has quit [Ping timeout: 272 seconds]
tranch has quit [Quit: tranch]
cow[moo] has quit [Ping timeout: 244 seconds]
tranch has joined #ruby
crankharder has joined #ruby
duderonomy has joined #ruby
fphilipe_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vjacob has quit [Ping timeout: 248 seconds]
fphilipe_ has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
maryo has joined #ruby
drezdin has joined #ruby
ellcs1 has quit [Ping timeout: 252 seconds]
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 257 seconds]
agent_white has joined #ruby
ellcs1 has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
agent_white has quit [Ping timeout: 248 seconds]
cschneid has joined #ruby
agent_white has joined #ruby
cschneid has quit [Ping timeout: 245 seconds]
maryo has quit [Ping timeout: 268 seconds]
fphilipe_ has joined #ruby
podlech has joined #ruby
fphilipe_ has quit [Ping timeout: 258 seconds]
cschneid has joined #ruby
braincrash has quit [Quit: bye bye]
cschneid has quit [Ping timeout: 268 seconds]
braincrash has joined #ruby
redlegion has joined #ruby
gix has quit [Ping timeout: 268 seconds]
cschneid has joined #ruby
haxx0r has quit [Ping timeout: 248 seconds]
cschneid has quit [Ping timeout: 272 seconds]
podlech has quit [Quit: WeeChat 2.5-dev]
greypack has quit [Ping timeout: 272 seconds]
crankharder has quit [Ping timeout: 248 seconds]
cschneid has joined #ruby
greypack has joined #ruby
cschneid has quit [Ping timeout: 244 seconds]
brer has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
brer has joined #ruby
donofrio has quit [Remote host closed the connection]
cschneid has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid has quit [Ping timeout: 268 seconds]
cschneid has joined #ruby
cschneid has quit [Ping timeout: 244 seconds]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
tranch has quit [Quit: tranch]
crankharder has joined #ruby
agent_white has quit [Quit: later]
sauvin has joined #ruby
tranch has joined #ruby
sameerynho has joined #ruby
vondruch has joined #ruby
exmortus has joined #ruby
cats has quit [Ping timeout: 245 seconds]
dviola has joined #ruby
staticx has quit [Ping timeout: 244 seconds]
conta has joined #ruby
bga57 has quit [Quit: Leaving.]
bga57 has joined #ruby
houhoulis has quit [Remote host closed the connection]
sameerynho has quit [Ping timeout: 268 seconds]
conta has quit [Ping timeout: 246 seconds]
fphilipe_ has joined #ruby
ur5us has quit [Remote host closed the connection]
conta has joined #ruby
cats has joined #ruby
_whitelogger has joined #ruby
haxx0r has joined #ruby
fphilipe_ has quit [Ping timeout: 252 seconds]
fphilipe_ has joined #ruby
ur5us has joined #ruby
jmcgnh has quit [Ping timeout: 246 seconds]
jmcgnh has joined #ruby
fphilipe_ has quit [Ping timeout: 258 seconds]
lxsameer has joined #ruby
aupadhye has joined #ruby
fphilipe_ has joined #ruby
schne1der has joined #ruby
crankharder has quit [Ping timeout: 248 seconds]
rubydoc has joined #ruby
ged_ has joined #ruby
ur5us has quit [Remote host closed the connection]
ged has quit [Ping timeout: 258 seconds]
ged_ is now known as ged
mahlon_ has joined #ruby
mahlon has quit [Read error: Connection reset by peer]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
TomyWork has joined #ruby
mayurvpatil_ has joined #ruby
deepreds1 has quit [Ping timeout: 245 seconds]
ellcs1 has quit [Ping timeout: 250 seconds]
ellcs1 has joined #ruby
schne1der has quit [Ping timeout: 258 seconds]
fphilipe_ has quit [Ping timeout: 245 seconds]
queip has quit [Ping timeout: 246 seconds]
fphilipe_ has joined #ruby
mayurvpatil_ has quit [Ping timeout: 268 seconds]
indopku has joined #ruby
indopku has left #ruby [#ruby]
nowhereman has quit [Ping timeout: 245 seconds]
queip has joined #ruby
dviola has quit [Quit: WeeChat 2.5]
ramfjord has joined #ruby
Azure has quit [Ping timeout: 258 seconds]
Azure|dc has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
schne1der has joined #ruby
deepreds1 has joined #ruby
mayurvpatil_ has joined #ruby
ramfjord has joined #ruby
mayurvpatil_ has quit [Read error: Connection reset by peer]
schne1der has quit [Ping timeout: 245 seconds]
envex has quit [Remote host closed the connection]
envex has joined #ruby
schne1der has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
Momentum has quit [Ping timeout: 252 seconds]
Momentum has joined #ruby
conta has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
dviola has joined #ruby
conta has joined #ruby
teardown has joined #ruby
mayurvpatil_ has joined #ruby
yasumi2136 has joined #ruby
miskatonic has joined #ruby
dhollin3 has joined #ruby
dhollinger has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 272 seconds]
kent\n has quit [Ping timeout: 268 seconds]
crankharder has joined #ruby
mayurvpatil_ has quit [Quit: This computer has gone to sleep]
mayurvpatil_ has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
kent\n has joined #ruby
crankharder has quit [Ping timeout: 272 seconds]
crankharder has joined #ruby
mayurvpatil_ has quit [Client Quit]
conta has joined #ruby
queip has quit [Ping timeout: 244 seconds]
queip has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
mayurvpatil has joined #ruby
marc_ has joined #ruby
<marc_> Marshal.dump shows 'failed to allocate memory' but ulumit -m and -Sm show unlimited.
<marc_> I have 20 GB swapfile what might be the cause and is there a simple workaround?
<marc_> I try marshalling simple structures (arrays and hashes).
lol768 has joined #ruby
<lol768> Hey, I have some dumb questions as to why jekyll build fails with a "Could not find 'bundler' (= 2.0.1) - did find: [bundler-2.0.2]" error
<lol768> Does jekyll support different versions of Bundler? Can I make it work with 2.0.2? Where does this constraint come from?
mayurvpatil has quit [Quit: This computer has gone to sleep]
ryakh has joined #ruby
NL3limin4t0r_afk is now known as NL3limin4t0r
conta has quit [Ping timeout: 245 seconds]
DTZUZO has quit [Ping timeout: 245 seconds]
conta has joined #ruby
cisco has joined #ruby
cisco is now known as Guest79199
BTRE has quit [Ping timeout: 244 seconds]
BTRE has joined #ruby
themsay has quit [Ping timeout: 268 seconds]
AJA4350 has joined #ruby
tranch has quit [Quit: tranch]
tranch has joined #ruby
mayurvpatil has joined #ruby
queip has quit [Ping timeout: 258 seconds]
Swyper has joined #ruby
dviola has quit [Quit: WeeChat 2.5]
queip has joined #ruby
Fernando-Basso has joined #ruby
matled has joined #ruby
mayurvpatil_ has joined #ruby
mayurvpatil has quit [Ping timeout: 245 seconds]
themsay has joined #ruby
chalkmonster has joined #ruby
queip has quit [Ping timeout: 245 seconds]
rubydoc has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 245 seconds]
rubydoc_ has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
themsay has joined #ruby
queip has joined #ruby
codefriar has joined #ruby
codefriar has quit [Client Quit]
GodFather has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Ping timeout: 245 seconds]
crankharder has joined #ruby
ramfjord has joined #ruby
ua has quit [Ping timeout: 272 seconds]
mayurvpatil_ has quit [Quit: This computer has gone to sleep]
ramfjord has quit [Ping timeout: 248 seconds]
ua has joined #ruby
mayurvpatil_ has joined #ruby
mayurpatil11 has joined #ruby
mayurvpatil_ has quit [Ping timeout: 246 seconds]
cschneid_ has joined #ruby
clemens3 has joined #ruby
conta has quit [Ping timeout: 248 seconds]
tdy1 has quit [Ping timeout: 245 seconds]
cschneid_ has quit [Ping timeout: 258 seconds]
mayurpatil11 has quit [Quit: This computer has gone to sleep]
mayurpatil11 has joined #ruby
r3m has quit [Quit: WeeChat 2.6-dev]
duckpuppy has quit [Remote host closed the connection]
r3m has joined #ruby
duckpuppy has joined #ruby
conta has joined #ruby
tranch has quit [Quit: tranch]
gix has joined #ruby
tranch has joined #ruby
schne1der has quit [Ping timeout: 248 seconds]
vondruch has quit [Ping timeout: 248 seconds]
mayurvpatil_ has joined #ruby
mayurpatil11 has quit [Ping timeout: 245 seconds]
vondruch has joined #ruby
donofrio has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
mayurvpatil_ has quit [Quit: This computer has gone to sleep]
mayurvpatil_ has joined #ruby
mayurvpatil_ has quit [Client Quit]
tranch has quit [Quit: tranch]
vondruch has quit [Ping timeout: 272 seconds]
schne1der has joined #ruby
crankharder has quit [Ping timeout: 244 seconds]
crankharder has joined #ruby
themsay has quit [Ping timeout: 245 seconds]
themsay has joined #ruby
AJA4350 has joined #ruby
mayurvpatil_ has joined #ruby
galaxie has quit [Remote host closed the connection]
ua has quit [Ping timeout: 246 seconds]
ua has joined #ruby
Inline_ has joined #ruby
Inline_ has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 250 seconds]
Inline_ has joined #ruby
Inline_ has quit [Remote host closed the connection]
Inline has joined #ruby
solars has joined #ruby
ramfjord has joined #ruby
conta has quit [Ping timeout: 248 seconds]
lucasb has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
Inline has quit [Quit: Leaving]
Guest79199 has quit [Ping timeout: 248 seconds]
codefriar has joined #ruby
spectra has quit [Ping timeout: 258 seconds]
Inline has joined #ruby
spectra has joined #ruby
cthulchu_ has joined #ruby
mayurvpatil_ has quit [Quit: This computer has gone to sleep]
codefriar has quit [Ping timeout: 246 seconds]
doodlebug has joined #ruby
mayurvpatil_ has joined #ruby
aupadhye has quit [Remote host closed the connection]
d10n-work has joined #ruby
doodlebug has quit [Ping timeout: 252 seconds]
dhollin3 is now known as dhollinger
queip has quit [Ping timeout: 272 seconds]
clemens3 has quit [Quit: WeeChat 1.6]
AJA4350 has quit [Ping timeout: 246 seconds]
queip has joined #ruby
jeremycw has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
<al2o3-cr> &>> $; = ?&; "foo&bar&baz".split
<rubydoc_> # => ["foo", "bar", "baz"] (https://carc.in/#/r/73cn)
<TomyWork> is there something like python's matplotlib, except in ruby?
<TomyWork> i.e. 2d graph plotting
<al2o3-cr> TomyWork: not to that extent
codefriar has joined #ruby
<TomyWork> well i need to plot a bunch of stuff, but first i need to grab some data from a database, then do ungodly things with the data and then plot that. i'd probably hate doing the ungodly things with python
<al2o3-cr> either gruff or gnuplot
<TomyWork> maybe i should do the data wrangling with ruby and then save it as a json and invoke python
<al2o3-cr> but maybe there is more, idk ;|(
<TomyWork> harhar
<al2o3-cr> TomyWork: it's no way extensive like python's matplotlib.
<TomyWork> it's a wrapper
<al2o3-cr> yeah
<al2o3-cr> not fully
<al2o3-cr> no where near infact
<al2o3-cr> use what you want dude
<TomyWork> maybe I'll just figure out how to do the data wrangling part in python
<TomyWork> or write really pedestrian code for that
<al2o3-cr> TomyWork: might be best.
<adam12> TomyWork: Likely not a comprehensive solution but zenspider's graphics gem can do some visuals. Maybe it's a portion of the solution you're looking for.
<al2o3-cr> TomyWork: ?
mayurvpatil_ has quit [Quit: Leaving]
<al2o3-cr> gruff can graph. depends what they want
<al2o3-cr> or shell out to gnuplot and be done
marc_ has quit [Ping timeout: 268 seconds]
SeepingN has joined #ruby
marc_ has joined #ruby
<al2o3-cr> TomyWork: YOU CODE RUBY?
conta has joined #ruby
<al2o3-cr> oops caps on
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has joined #ruby
r29v has joined #ruby
<al2o3-cr> TomyWork: show me?
queip has quit [Ping timeout: 258 seconds]
<TomyWork> i havent written anything yet
<TomyWork> will do that tomorrow
r29v has quit [Ping timeout: 245 seconds]
<TomyWork> still some technology decisions to be made
<TomyWork> like, whether to use ruby/python at all
<TomyWork> and not just dump the whole thing in excel and use HLOOKUP :D
<TomyWork> hmm, that could actually be an option
<al2o3-cr> TomyWork: ask python their input?
r29v has joined #ruby
queip has joined #ruby
r29v has quit [Quit: r29v]
r29v has joined #ruby
sagax has quit [Ping timeout: 245 seconds]
ellcs has quit [Remote host closed the connection]
yasumi2136_ has joined #ruby
tdy1 has joined #ruby
cschneid_ has joined #ruby
yasumi2136 has quit [Ping timeout: 268 seconds]
wald0 has joined #ruby
queip has quit [Ping timeout: 245 seconds]
wrkrcoop has joined #ruby
<wrkrcoop> hey i’m having trouble upgrading rvm
<wrkrcoop> i run rvm get stable
<wrkrcoop> and get Could not update RVM, please report to https://github.com/rvm/rvm/issues
<wrkrcoop> im on mac
queip has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
Brian-W-Gray has joined #ruby
Rapture has joined #ruby
meinside_ has joined #ruby
Argorok_ has joined #ruby
peteretep_ has joined #ruby
thunderbirdtr_ has joined #ruby
mkaito- has joined #ruby
discopatrick_ has joined #ruby
AndroidKK has joined #ruby
mochiyoda_ has joined #ruby
hays_ has joined #ruby
Yxhvd has joined #ruby
wolfshappen_ has joined #ruby
tdy1 has quit [Ping timeout: 246 seconds]
camilasan_ has joined #ruby
Bish_ has joined #ruby
yokel_ has joined #ruby
marahin_ has joined #ruby
szulak_ has joined #ruby
Argorok has quit [*.net *.split]
discopatrick has quit [*.net *.split]
peteretep has quit [*.net *.split]
noobineer has quit [*.net *.split]
yokel has quit [*.net *.split]
meinside has quit [*.net *.split]
Yxhuvud has quit [*.net *.split]
foxxx0 has quit [*.net *.split]
hays has quit [*.net *.split]
mochiyoda has quit [*.net *.split]
AndroidKitKat has quit [*.net *.split]
Bish has quit [*.net *.split]
wolfshappen has quit [*.net *.split]
thunderbirdtr has quit [*.net *.split]
szulak has quit [*.net *.split]
kashike has quit [*.net *.split]
camilasan has quit [*.net *.split]
BrianWGray has quit [*.net *.split]
marahin has quit [*.net *.split]
mkaito has quit [*.net *.split]
Argorok_ is now known as Argorok
peteretep_ is now known as peteretep
meinside_ is now known as meinside
yokel_ is now known as yokel
fluxAeon has quit [Quit: Textual IRC Client: www.textualapp.com]
mkaito- is now known as mkaito
mkaito has joined #ruby
mkaito has quit [Changing host]
infernix has quit [Ping timeout: 258 seconds]
fluxAeon has joined #ruby
rippa has joined #ruby
kashike has joined #ruby
foxxx0 has joined #ruby
noobineer has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 272 seconds]
AJA4351 is now known as AJA4350
LtHummus has quit [Quit: ZNC 1.7.3 - https://znc.in]
AndroidKK is now known as AndroidKitKat
AndroidKitKat has quit [Quit: バイバイ〜!]
AndroidKitKat has joined #ruby
orbyt_ has joined #ruby
LtHummus has joined #ruby
infernix has joined #ruby
orbyt_ has quit [Client Quit]
_dbugger has quit [Quit: Leaving]
fphilipe_ has quit [Ping timeout: 244 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
cisco has joined #ruby
cisco is now known as Guest96502
NL3limin4t0r is now known as NL3limin4t0r_afk
fphilipe_ has joined #ruby
orbyt_ has joined #ruby
<adam12> wrkrcoop: No idea but my first guess would be permissions on the rvm install.
<wrkrcoop> adam12: i figured it out
<wrkrcoop> hey im trying to create a new model in rails. if a user has an id, and i want to create a posts model, should the posts have an id and then also a field called user_id? or should user id come first?
orbyt_ has quit [Client Quit]
fphilipe_ has quit [Ping timeout: 250 seconds]
fphilipe_ has joined #ruby
Guest96502 has quit [Ping timeout: 245 seconds]
cisco has joined #ruby
deepreds1 has quit [Ping timeout: 268 seconds]
cisco is now known as Guest40466
SeepingN has joined #ruby
code_zombie has joined #ruby
rhythmx has joined #ruby
conta has quit [Quit: conta]
<Net> A common pattern I encounter is writing a class with only one public method so that instance variables can be shared amongst its private methods. Is there a superior way of handling such cases?
mahlon_ is now known as mahlon
fphilipe_ has quit [Ping timeout: 252 seconds]
<wrkrcoop> how do i open up postgres to view my rails database?
<wrkrcoop> psql doesnt seem to work
<Net> psql -d <your_db_name>
deepreds1 has joined #ruby
<Net> wrkrcoop: I would do id, user_id, but it doesn't really matter
Guest40466 has quit [Ping timeout: 246 seconds]
<wrkrcoop> ty
AJA4350 has quit [Ping timeout: 244 seconds]
conta has joined #ruby
deepreds1 has quit [Ping timeout: 246 seconds]
<wrkrcoop> hey im trying to create a new route
<wrkrcoop> for snapshots
<wrkrcoop> i need post /api/renderers/:uuid/snapshots to work
<wrkrcoop> does that look right?
<wrkrcoop> oops wrong channel
rubydoc_ has quit [Remote host closed the connection]
rubydoc has joined #ruby
<Net> wrkrcoop: #RubyOnRails :)
<Net> oh, you found it
<wrkrcoop> how do i convert a string to a uuid?
mynameisdebian has joined #ruby
<Net> not sure what you mean by that
<wrkrcoop> like im trying to insert into active record its expecting a uuid but im passing in a string as a param so i need to convert it to a uuid i believe
<Net> I'd expect it to handle a string fine
<Net> as long as the string is a uuid
cthu| has joined #ruby
cthulchu_ has quit [Ping timeout: 244 seconds]
haxx0r has quit [Ping timeout: 258 seconds]
fluxAeon has quit [Quit: Textual IRC Client: www.textualapp.com]
queip has quit [Ping timeout: 272 seconds]
haxx0r has joined #ruby
fluxAeon has joined #ruby
queip has joined #ruby
KDiddy has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
KDiddy has quit [Client Quit]
AJA4350 has joined #ruby
ramfjord has joined #ruby
ryakh has quit [Ping timeout: 245 seconds]
sauvin has quit [Ping timeout: 258 seconds]
themsay has quit [Ping timeout: 244 seconds]
ua has quit [Ping timeout: 272 seconds]
deepreds1 has joined #ruby
ua has joined #ruby
vjacob has joined #ruby
deepredsky has joined #ruby
deepreds1 has quit [Ping timeout: 258 seconds]
conta has quit [Quit: conta]
themsay has joined #ruby
marc_ has quit [Quit: Lost terminal]
conta has joined #ruby
deepreds1 has joined #ruby
deepredsky has quit [Ping timeout: 258 seconds]
fphilipe_ has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
infernix has quit [Ping timeout: 252 seconds]
<adam12> Sorbet went open source today.
<leftylink> o
<leftylink> interesting
infernix has joined #ruby
<redlegion> what is Sorbet?
<redlegion> other than something tasty
reber has joined #ruby
fphilipe has joined #ruby
<adam12> redlegion: Static type checker for Ruby from the Stripe folks.
fphilipe_ has quit [Ping timeout: 250 seconds]
galaxie has joined #ruby
<redlegion> nice
<redlegion> that's pretty cool
<mynameisdebian> I'm stupid. What is a type checker?
RyanMcCoskrie has joined #ruby
<leftylink> I think https://www.destroyallsoftware.com/compendium/types?share_key=baf6b67369843fa2 probably explains it better than I can
<mynameisdebian> thx
<mynameisdebian> Link is a lefty.
<leftylink> that's the point of the username
<mynameisdebian> nice
AJA4351 has joined #ruby
tdy1 has joined #ruby
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
conta has quit [Quit: conta]
queip has quit [Ping timeout: 258 seconds]
skyikot has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
queip has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ramfjord has quit [Ping timeout: 248 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
jinie_ is now known as jinie
vjacob has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 252 seconds]
reber has quit [Remote host closed the connection]
fphilipe has joined #ruby
ramfjord has joined #ruby
maryo has joined #ruby
queip has quit [Ping timeout: 248 seconds]
bjpenn_ has joined #ruby
queip has joined #ruby
<bjpenn_> i have some ruby code here: https://pastebin.com/xtJ8q4FZ can anyone tell me if line 4 is bad style? how im calling a variable within a class, from outside of the class?
<ruby[bot]> bjpenn_: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<bjpenn_> ah ok ill use gist
<bjpenn_> ohh gist cant be used anonymously anymore?
<phaul> https://dpaste.de/, bjpenn_
maryo has quit [Ping timeout: 272 seconds]
<bjpenn_> nice, way better than crappy pastebin
<bjpenn_> https://dpaste.de/r0G0 is the new link
<adam12> bjpenn_: Not necessarily bad style. Why would you think so? There's some indirection, but that's just how Ruby works.
<bjpenn_> whats the point of attr_methods then?
<bjpenn_> if you can just call that var directly
<adam12> bjpenn_: Not sure I follow.
<adam12> The attr_ method you call sets up the getter.
<adam12> Without attr_reader, authentication.profile would raise NoMethodError.
<bjpenn_> ahh ok
<bjpenn_> so its assumed theres already an attr_reader if my code works
<bjpenn_> i didnt know that...
<adam12> bjpenn_: attr_reader is basically def authentication; @authentication; end. Not sure if that helps explain things?
<bjpenn_> let me fix my code paste, and add more info
<leftylink> I didn't follow. who is doing the assuming? "it's assumed there's already"
<bjpenn_> sorry, i meant to say it is "implied"
Swyper has joined #ruby
<bjpenn_> heres a new paste https://dpaste.de/KF1o , line 18, if that didn't exist, I would get NoMethodError?
<adam12> bjpenn_: Right.
fphilipe has quit [Ping timeout: 252 seconds]
<bjpenn_> just to clarify, i was saying that since my code from line 1 to 15 works, that it was implied Auth was implemented with attr_reader on :profile
<bjpenn_> i was asking the question without knowing how class Auth was implemented, i was under the thinking attr_reader :profile wasn't there
<bjpenn_> and that it still worked
<adam12> bjpenn_: I'm not following 100%, but if I was looking at a class that inherited from another class, and had no include/extend calls, the method you're calling would live on the base class or another ancestor.
<phaul> There is some misunderstanting with the definition of Auth as well. The attr_reader :profile has 0 relation with the class instance variable @profile. It was probablymeant to be in an instance method
<phaul> &>>class X; @x = 13; attr_reader :x; end; X.new.x
<rubydoc> # => nil (https://carc.in/#/r/73fa)
<leftylink> very tempted to break out the quote
<leftylink> "correct! nil"
<leftylink> I'd include the word afterward, but this is not really an example of wat
<bjpenn_> interesting.. @pha
<bjpenn_> interesting.. phaul
ramfjord has quit [Ping timeout: 248 seconds]
<bjpenn_> i didn't realize attr_reader :foo is only supposed to be for a method "foo", not @foo
<bjpenn_> i see it littered all over the code base, that something like attr_reader :foo references @foo
<phaul> you can put @vars at class level, but they don't mean instance vars for the instances of the class
<leftylink> it defines a `foo` that just returns `@foo`, that's it
<bjpenn_> ohh ok
AJA4350 has quit [Ping timeout: 246 seconds]
<bjpenn_> its not instance vars then, its at the class level
ramfjord has joined #ruby
jcalla has quit [Quit: Leaving]
<bjpenn_> was a little confused by this: There is some misunderstanting with the definition of Auth as well. The attr_reader :profile has 0 relation with the class instance
<bjpenn_> variable @profile. It was probablymeant to be in an instance method
<bjpenn_> why does attr_reader :profile have 0 relation with the class instance variable @profile?
<leftylink> well you saw the code right? `class X; @x = 13; attr_reader :x; end; X.new.x`
<leftylink> that was nil, not 13.
<leftylink> because @x in class has nothing to do with @x in an instance
<bjpenn_> but doesnt that conflict with what you said "it defines a `foo` that just returns `@foo`, that's it"
<leftylink> it doesn't conflict with what I said because @x in class has nothing to do with @x in an instance
<bjpenn_> oh, if you did X.x it would work right?
<phaul> you are on the right track but no. .x is a method call and variables can't be accessed via method call
<phaul> it would be with X.instance_veriable_get(:@x)
<bjpenn_> ah ok i see what youre saying
RyanMcCoskrie has quit [Ping timeout: 272 seconds]
sameerynho has joined #ruby
<bjpenn_> heres the url for reference again: https://dpaste.de/KF1o so in line 18, if i do not have that, would line 4 still work?
<bjpenn_> simply because line 20 makes it a class var?
buckworst has joined #ruby
houhoulis has joined #ruby
<leftylink> &>> class X; class << self; attr_reader :x end; attr_reader :x; @x=:completely_unrelated; def initialize; @x=:to_one_another end end; [X.x, X.new.x]
<rubydoc> # => [:completely_unrelated, :to_one_another] (https://carc.in/#/r/73ft)
<bjpenn_> ahhh!!!
<leftylink> if you remove line 18, then you can run it for yourself and see wha thappen.
<leftylink> &>> class Foo; end; Foo.new.hello
<rubydoc> stderr: -e:2:in `<main>': undefined method `hello' for #<Foo:0x000055bb00d6e2a8> (NoMethodError) (https://carc.in/#/r/73fx)
<leftylink> tehre you go, that's what will happen
<phaul> without line 18 it would give NoMethodError. With line 18 the NoMethodError disappears, but you get nil as nobody defined profile in any instances of Auth.
<leftylink> I admit I'm also aware that I'm being unnecessarily rude and unhelpful in my answers. I'll recuse myself.
<leftylink> with my apologies
<bjpenn_> you were helpful, just fyi :)
<bjpenn_> heres a new paste
<bjpenn_> i added a `def initialize` in line 20
<phaul> bjpenn_: that change makes perfect sense
<bjpenn_> does this change anything at all? it seems like it would be the same as my previous
<phaul> no as leftylink and myself demonstrated with the bot the two codes are different
<bjpenn_> because @profile is class wide? so why does it matter whether its within `initialize` or not
<bjpenn_> let me re-read, maybe theres somethign i missed most liekly
<bjpenn_> (from the explanations above)
<phaul> now it's not class wide. now it's instance wide
wrkrcoop has joined #ruby
ur5us has joined #ruby
<bjpenn_> is there something special to the `initialize` method that makes @vars non-class?
rick_ has joined #ruby
<phaul> what you have to know is what self is in each context. That drives most of ruby semantics. Let me recommend you a ~1.5 hr video about the ruby object model : https://www.youtube.com/watch?v=X2sgQ38UDVY
fphilipe has joined #ruby
<bjpenn_> phaul: thanks!
vjacob has joined #ruby
<bjpenn_> ill come back in 1.5 hours if i do not understand :) maybe less because ill probably watch it in 1.5x
<phaul> it's not the initialize. it's the fact that inside def; end you swith self to the instance
<phaul> from the class
<bjpenn_> :lightbulb moment:
<bjpenn_> thanks for spelling it out so clearly
<bjpenn_> these little intracacies, that i probably didnt develop from READING a lot of code, and making small changes, rather than actually WRITING a lot of code
griffindy has joined #ruby
mynameisdebian has quit [Ping timeout: 244 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
ur5us has quit [Remote host closed the connection]
go|dfish has quit [Ping timeout: 245 seconds]
cisco has joined #ruby
cisco is now known as Guest93791
themsay has quit [Read error: Connection reset by peer]
griffindy has quit [Ping timeout: 268 seconds]
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthu| has quit [Ping timeout: 246 seconds]
themsay has joined #ruby
codefriar has joined #ruby
go|dfish has joined #ruby
ur5us has joined #ruby
bjpenn_ has quit [Quit: leaving]
Guest93791 has quit [Ping timeout: 244 seconds]
doodlebug has joined #ruby
fluxAeon has quit [Quit: Textual IRC Client: www.textualapp.com]
nolanv has quit [Read error: Connection reset by peer]
CCDelivery has joined #ruby
juio has joined #ruby
juio has quit [Client Quit]
nolanv has joined #ruby
orbyt_ has joined #ruby
sameerynho has quit [Ping timeout: 248 seconds]
rick_ has quit [Read error: Connection reset by peer]
Freshnuts has joined #ruby
mynameisdebian has joined #ruby
houhoulis has quit []
jeremycw has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
vjacob has quit [Ping timeout: 258 seconds]
mynameisdebian has quit [Ping timeout: 272 seconds]
wrkrcoop has joined #ruby
<wrkrcoop> anywhere able to answer a rails question?
<wrkrcoop> i have posts and they belong to a user. im not sure how to look up posts using the user_id
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wrkrcoop> I was trying this Post.find(10, :conditions => "user_id = #{params[:user_id]}", :order => "created_on DESC")
Swyper has quit [Remote host closed the connection]
codefriar has joined #ruby
vjacob has joined #ruby
fphilipe has quit [Ping timeout: 252 seconds]
schne1der has quit [Ping timeout: 244 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
houhoulis has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
queip has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
fphilipe has joined #ruby
queip has joined #ruby
fphilipe_ has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
yasumi2136_ has quit [Remote host closed the connection]
yasumi2136 has joined #ruby
Dreamer3 has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
exmortus has quit [Remote host closed the connection]
exmortus has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
bambanx has joined #ruby
fphilipe_ has quit [Ping timeout: 245 seconds]
lxsameer has quit [Ping timeout: 245 seconds]
DTZUZO has joined #ruby
r29v has quit [Ping timeout: 268 seconds]