juanpablo____ has quit [Ping timeout: 264 seconds]
pawnbox has quit []
UtkarshRay has joined #ruby
Adran has joined #ruby
havenn has quit [Ping timeout: 264 seconds]
rbowlby has quit []
hawkface has joined #ruby
workmad3 has joined #ruby
symbol has quit [Ping timeout: 252 seconds]
ddarkpassenger has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mendenhall has quit [Ping timeout: 246 seconds]
moeabdol has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
<shevy>
hmm
<shevy>
is there a way to find out these two following conditions in some simple manner: (1) abandoned/inactive gems that (2) seemed to be useful to lots of people (e. g. let's say some downloads like +50.000 downloads from rubygems.org)
workmad3 has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
failshell has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
jaredrhine has quit [Quit: No Ping reply in 180 seconds.]
cindy has joined #ruby
Deep has joined #ruby
jaredrhine has joined #ruby
<Ox0dea>
shevy: `gem search --no-vers` + `gem spec -r foo date` might be a start.
failshell has quit [Ping timeout: 250 seconds]
<Ox0dea>
You'll have to query the rubygems.org API individually to get download counts. :/
bottom has quit [Quit: 离开]
fgo has quit [Ping timeout: 244 seconds]
minimuffins has quit [Ping timeout: 255 seconds]
<Ox0dea>
Eh, you don't need to use `gem spec` to get the date; the rubygems.org API returns a "built_at" datum.
<shevy>
cool thanks
aaeron has joined #ruby
aaeron1 has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
bkxd has joined #ruby
<baweaver>
Github stars
<baweaver>
easier
sevenseacat has joined #ruby
martin_work has quit [Quit: martin_work]
jgpawletko has quit [Quit: jgpawletko]
Mendenhall has joined #ruby
aaeron has quit [Ping timeout: 246 seconds]
yeticry has joined #ruby
<baweaver>
shevy: ^
crowell has quit [Ping timeout: 256 seconds]
<Coraline>
shevy: you can request a data dump from the folks on #rubygems
freerobby has quit [Quit: Leaving.]
Kallis has quit [Read error: Connection reset by peer]
Deep has quit [Quit: Leaving]
bronson has quit [Ping timeout: 268 seconds]
grotewold has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
freerobby has joined #ruby
<Ox0dea>
Coraline: Is that a done thing? Just hand them a query to run?
<Coraline>
No, but they may provide a data dump.
<Coraline>
...that you could load into a db
startupality has joined #ruby
<Ox0dea>
"May" is quite operative there; I suspect ~150GB would be the largest DCC transfer in IRC history.
<Coraline>
Not over IRC!
<Coraline>
You can ask there is what I meant.
clarkenciel has quit [Remote host closed the connection]
Mendenhall has quit [Ping timeout: 250 seconds]
rubie has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<Ox0dea>
"Have you ever had a dream that you, um, you had, your, you, you could, you’ll do, you, you wants, you, you could do so, you, you’ll do, you could, you, you want, you want them to do you so much you could do anything?"
bmurt has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
towski_ has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
martin_work has left #ruby [#ruby]
cindy has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
juanpablo____ has joined #ruby
mahmoudmahfouz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has quit [Quit: startupality]
freerobby has joined #ruby
mahmoudmahfouz has joined #ruby
davispuh has quit [Read error: Connection reset by peer]
mahmoudmahfouz has quit [Client Quit]
Mendenhall has joined #ruby
jalnt has quit [Ping timeout: 246 seconds]
casadei_ has joined #ruby
leat has quit [Ping timeout: 240 seconds]
aaeron1 has quit [Ping timeout: 244 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
juanpablo____ has quit [Ping timeout: 260 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
JDiPierro has quit [Remote host closed the connection]
casadei_ has quit [Ping timeout: 256 seconds]
bazbing80 has quit [Ping timeout: 250 seconds]
aaeron has joined #ruby
gener1c_ has joined #ruby
martin_work_ has joined #ruby
djbkd_ has quit [Remote host closed the connection]
Mendenhall has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
wildlander has joined #ruby
gener1c has quit [Ping timeout: 255 seconds]
braincras has quit [Quit: bye bye]
mcfly_ has joined #ruby
rubie has joined #ruby
<mcfly_>
anyone out there?
arup_r has joined #ruby
sdwrage has joined #ruby
darkf has joined #ruby
govt has joined #ruby
arup_r has quit [Remote host closed the connection]
<mcfly_>
hello word
MrFjords has joined #ruby
KnownSyntax_ has joined #ruby
braincrash has joined #ruby
failshell has joined #ruby
fgo has joined #ruby
<Ox0dea>
Goodbye, sentence.
<govt>
I dont wanna open a can of worms, but I've been watching a lot of Johnathan Worthington and Perl 6 stuff, and it seems like they are able to organize the perl community so effortlessly
<govt>
and i wonder if its in part to the fact that CPAN is a unified effort and RubyGems is much less so
Rutix`away has quit []
iateadonut has quit [Quit: Leaving.]
<shevy>
perl 6 is their last hope
sdwrage has quit [Quit: This computer has gone to sleep]
<govt>
are you kidding? perl 5 isnt by any means dead
Guest84 has joined #ruby
failshell has quit [Ping timeout: 265 seconds]
<govt>
dont let the hivemind delude you, I just turned down a job offer to go write perl
Mendenhall has joined #ruby
Guest84 is now known as MrFjords
<govt>
but im saying that when anybody goes looking for a ruby library, they end up with some weirdly named gem
<govt>
as opposed to Net::WebSocket
<govt>
or w/e
<baweaver>
I turned down a job for RPG and one for COBOL
<baweaver>
jobs do not mean a language is doing well
fgo has quit [Ping timeout: 246 seconds]
<baweaver>
though that does not mean Perl is nearly as heinous as those two....
diegoaguilar has joined #ruby
<govt>
im trying not to talk about perl, but rather the concept of CPAN
<baweaver>
fair
<baweaver>
and there have been those before to make that type of point
<sevenseacat>
not taking the bait
<shevy>
:)
<baweaver>
honestly I don't know what the hype is around it though, BUT that's mainly from not using Perl heavily
<baweaver>
well, I used it, but badly
<govt>
perl has nothing to do with it
<govt>
like i said
<govt>
rubygems has no organization whatsoever
<shevy>
perl is indeed unrelated to CPAN
<govt>
thats what im getting at
<baweaver>
so how would you suggest improving it then
<centrx>
What is this "organization" in CPAN that rubygems doesn't have?
<govt>
the same way the perl community solved this exact issue, with namespaces
<baweaver>
Net::SSH, Net::HTTP, etc do exist
<shevy>
I think that was suggested a while ago for rubygems
rubie has quit [Remote host closed the connection]
<Ox0dea>
~ $ gem search ^net-http | wc -l
<Ox0dea>
22
<baweaver>
that'd definitely take some effort though
govt has left #ruby [#ruby]
govt has joined #ruby
<govt>
well yeah, but wouldnt it be worth it?
<shevy>
usual problem is to find that programmer to do the work
<Ox0dea>
govt: Do you want to be the guy who moderates the names given to new gems?
chipotle has quit [Remote host closed the connection]
<baweaver>
they are govt after all ;)
<baweaver>
gem search ^net- | wc -l
<baweaver>
854
<govt>
no i dont want ANYBODY to control the names of gems, i want people to make the call for themselves that a 'cool' name is less useful than a distinct one
<Ox0dea>
Too bad.
<Ox0dea>
Wrong community. :)
jonnie has quit [Ping timeout: 250 seconds]
<shevy>
you could rename a gem
<baweaver>
inclined to agree admittedly
<Ox0dea>
govt: Out of curiosity, what would you have named Rails?
<shevy>
Picaboo!
<sevenseacat>
gems have distinct names - they just might not indicate what the gem does
<govt>
big projects get their own namespace
<govt>
like Mojo
<govt>
but thats truly large scale projects
chipotle has joined #ruby
<baweaver>
like I tend to name things pry-macro or pry-session
<baweaver>
only works if people agree to namespace as a collective
<baweaver>
which is its own can of worms
<govt>
sure
<baweaver>
ever tried to get a group of unrelated OSS devs on different projects to work together? Pulling teeth in some cases.
<baweaver>
avdi: you about?
Shidash has quit [Ping timeout: 246 seconds]
linc01n has quit [Ping timeout: 246 seconds]
universa1 has quit [Ping timeout: 246 seconds]
<baweaver>
seems like your line of discussion, curious as to what you think
<govt>
which is understandable, to a certain degree
joufflu_ has joined #ruby
<baweaver>
TL;DR: CPAN does a better job of namespacing and we like cool names for gems too much in ruby
<baweaver>
avdi wrote a quip on this not too long ago
<baweaver>
though is probably either getting ready for bed or in bed
<govt>
i just see ruby devs so excited and working so hard on ruby features and implementation
<baweaver>
east coast would be midnight-ish iirc
<govt>
and rather than structure the gems, they just throw them in a pile
dopamean_ has joined #ruby
<govt>
outsiders to perl dont really know it, but theres a LOT of perl just laying around in a repo somewhere
Joufflu__ has joined #ruby
<govt>
but it doesnt stop people from using CPAN the right way
yfeldblum has quit [Remote host closed the connection]
<baweaver>
I'll be happy as long as we don't end up in Java land
<eam>
the nice thing about Perl modules is they actually describe what they do
<baweaver>
so many nested folders....
<eam>
ruby stuff -- you have NO idea what the function of a gem is given the name
Rollabun_ has quit [Ping timeout: 246 seconds]
bmurt has quit []
Synthead has quit [Disconnected by services]
<baweaver>
more dependent on the author really than the language.
<eam>
note: all those XML module you listed had "xml" in the name
<eam>
baweaver: it's totally a cultural thing
Synthmead has joined #ruby
<avdi>
Anyway fun gem names are fun. I get a kick out of them.
<eam>
(perhaps generational as well)
n_blownapart has quit [Quit: Leaving]
<baweaver>
oh, and I now own awesome_gems
<baweaver>
and rapture too, still need something cool for that one
<baweaver>
Radar mentioned the name once and was shocked it wasn't taken
<towler>
<toretore>
how do you own a name that was taken?
<avdi>
I also like that funky gem names mean less godawful acronyms
<baweaver>
probably use it for some type of database adapter or extension, already have enough AR black magic in a box I should put together
<baweaver>
do not understand that question toretore
<baweaver>
I publish a placeholder gem
<toretore>
baweaver: awesome_gems was already a gem, is there a procedure for transferring ownership for gems that are deemed "not in use"?
cubicool has joined #ruby
<baweaver>
though I give them up within 3-4 months if I can't think of anything
<baweaver>
so not completely evil :D
<baweaver>
apparently not
<baweaver>
it's a list and a github repo
<baweaver>
but not an actual gem
<baweaver>
well, wasn't
<toretore>
oh right, you already had it registered when i was looking i guess
fgo has joined #ruby
<cubicool>
If I have a method: foo(a, b, c), is it possible to create a kind of alias/forward/delegate that can act as syntactic shorthand for calling with foo with 2 preset arguments and only accepting the 3rd? i.e., foo0 = foo(1, 2, ...), foo1 = foo1(3, ...), etc.
<baweaver>
I'll probably take it down tomorrow as I don't intend to do anything there
<toretore>
cubicool: def bar(3); foo(1,2,3); end
<baweaver>
def foo2(c); foo(1,2,c) end
<baweaver>
also look into currying if you're especially bold
<baweaver>
but that's not really ruby per-se
<cubicool>
currying?
<toretore>
cubicool: what you're describing is called currying, you can probably find some fun gem that does it for you
djbkd has quit [Remote host closed the connection]
CHVNX has joined #ruby
<toretore>
there's probably a gem names tikka or korma or something else vaguely relevant
<baweaver>
currying is where you can pass n number of arguments to a method and it returns a function that takes the remaining arguments, only fully running when it has all of them
<sevenseacat>
lol tikka
<[k->
partial application*
<baweaver>
so given: foo = fn(a,b,c); foo(1,2) returns a function which wants a c
The_Phoenix has quit [Read error: Connection reset by peer]
darkxploit has quit [Ping timeout: 246 seconds]
juanpablo____ has joined #ruby
devoldmx has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
rushed has quit [Quit: rushed]
<shevy>
are you gangsta coding again Ox0dea
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
ych has joined #ruby
<Ox0dea>
I knew of Kernel#test's existence, but it's such a Bash-ism as to feel out of place. Still, it reminded me that there are interesting methods available from everywhere, and I was hoping somebody had another one on hand.
ych is now known as Guest72420
<Ox0dea>
What even is "gangsta coding", while we're here?
<Guest72420>
anybody familiar with a gem that allows u to create server instances via code?
<shevy>
the act of using rogue methods and renegade classes
juanpablo____ has quit [Ping timeout: 256 seconds]
<pontiki>
webrick?
<Guest72420>
create servers in rackspace/aws/etc
<Guest72420>
create instances
devoldmx has quit [Ping timeout: 240 seconds]
<Ox0dea>
Guest72420: There's the tugboat gem for DigitalOcean.
<Guest72420>
cool
<Guest72420>
do you have expereince with this gem in production environment? create instances for customers automatically?
<Ox0dea>
I don't, but that's certainly one of its features.
<TomyLobo>
is /\/(?<#{sym}>#{constraint})/ equivalent to /\/(?<#{sym.to_s}>#{constraint})/?
<TomyLobo>
so there's no magic behind the curtains?
<Ox0dea>
Interpolation calls #to_s on non-String constituents.
<TomyLobo>
i'm asking because there was some example code that seemed to imply that the match names are strings, but i can access them as match[sym] just as well
<Ox0dea>
The match names are Symbols.
<TomyLobo>
i see
UtkarshRay has quit [Ping timeout: 246 seconds]
<Ox0dea>
TomyLobo: Sorry, they are in fact Strings, but you can access them either way.
<Ox0dea>
Ruby magic is magic.
darkxploit has joined #ruby
<TomyLobo>
i see
Mendenhall has quit [Ping timeout: 264 seconds]
<Ox0dea>
Pretty much every other kind of "identifier" is passed around as a Symbol; that capture names are Strings is an anomaly.
<tejasmanohar>
was that a substitute for ruboto in the channel for some time?
<tejasmanohar>
when it was gone
fgo has quit [Ping timeout: 264 seconds]
<tejasmanohar>
if so... yeah
<apeiros>
hm?
<tejasmanohar>
nvm sorry
<tejasmanohar>
mixed up another thing
<apeiros>
before ruboto was eval-in by charliesome. he gave me eval-in's code (the bot, not the service). that's what I use in ruboto.
<tejasmanohar>
aight
<apeiros>
and it's somewhat similar to the evalso cinch plugin
<tejasmanohar>
... eval.so :)
<tejasmanohar>
so i dont have to mess w/ eval.in like this
<tejasmanohar>
nice
stardiviner has quit [Ping timeout: 246 seconds]
<tejasmanohar>
thanks
nanoz has quit [Ping timeout: 252 seconds]
tejasmanohar has quit [Quit: WeeChat 1.3]
stardiviner has joined #ruby
<Ox0dea>
apeiros: How come you don't use eval.so for ruboto?
<Ox0dea>
It supports Befunge!
<pontiki>
befunge??
<apeiros>
Ox0dea: right now: because I learned about eval.so after having gotten the code from charliesome
<apeiros>
Ox0dea: in the future: because ruboto will no longer be a cinch bot
FalseDeal has joined #ruby
<apeiros>
and wrt befunge: fine. I don't think I want befunge code eval in #ruby :-p
<apeiros>
I might add the functionality to select an arbitrary language supported be eval.in for #ruby-offtopic
<Ox0dea>
The syntax is 2-dimensional, so I'm not sure how that'd even work.
<apeiros>
unless it has a syntax construct for linefolding, it won't work at all :-D
<apeiros>
but now I remember which language befunge was
<Ox0dea>
Well, there are some very clever programs which use reflection to bounce between the walls to perform some "useful" computation on one line, but there aren't many of those.
yardenbar has quit [Ping timeout: 264 seconds]
<Ox0dea>
I need to ask #esoteric whether single-line Befunge is Turing-complete.
arup_r has joined #ruby
daemonism has quit [Quit: WeeChat 1.1.1]
workmad3 has joined #ruby
djbkd has quit [Remote host closed the connection]
<shevy>
apeiros no longer be a cinch bot? will you do the unspeakable... and update butler? :D
<Ox0dea>
There are no :nodoc:s in there; have fun?
<demonlove>
I am not seeing any code and its working there how to get it
<Ox0dea>
*nine :nodoc:s
stamina has joined #ruby
failshell has joined #ruby
<Ox0dea>
demonlove: You're not seeing any code because Yielder's implementation methods have explicit :nodoc: tags. Find them and replace them with thorough explanations of what they do, and don't forget to include examples.
dionysus69 has joined #ruby
<demonlove>
how do you find no doc tag, is it on git?
<jhass>
Ox0dea: I think you're being trolled
<jhass>
maybe not intentionally, but still...
<Ox0dea>
jhass: Hanlon's razor feels right on this one. :/
demonlove has quit [Remote host closed the connection]
shapeshifter has joined #ruby
<shapeshifter>
Question about capistrano: When using 2 stages (staging, production), can I put common settings in config/deploy.rb and stage-specific settings in config/deploy/{staging.rb,production.rb} ? Like, say, set :unicorn_env, "staging" would go in config/deploy/staging.rb ?
isxek has quit [Quit: Page closed]
ghr has joined #ruby
<shapeshifter>
And to follow up, is this generally the case with any config? I.e. can I put common unicorn stuff in config/unicorn.rb and stage-specific stuff in config/unicorn/{staging.rb,production.rb} ? For example, I need a stage-specific app_path for unicorn, so can I put it in config/unicorn/staging.rb ? The app_path variable is used in config/unicorn.rb as well. So I'm not sure which is read first
<jhass>
mmh, there's a #capistrano
<shapeshifter>
Thanks, I'll try ask over there.
Guest72420 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rushed has quit [Quit: rushed]
ap4y has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 246 seconds]
shmilan has joined #ruby
FalseDeal has joined #ruby
symbol has joined #ruby
tvw has quit [Remote host closed the connection]
m8 has joined #ruby
solocshaw has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
juanpablo____ has joined #ruby
alqahtani has joined #ruby
juanpablo____ has quit [Ping timeout: 256 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
shmilan has quit [Ping timeout: 244 seconds]
last_staff has joined #ruby
Rollabunna has quit [Remote host closed the connection]
astrobun_ has joined #ruby
greenbigfrog has left #ruby [#ruby]
khebbie has joined #ruby
KINGSABRI has quit [Remote host closed the connection]
khebbie has quit [Remote host closed the connection]
iateadonut has joined #ruby
stoodfarback has quit [Quit: Connection closed for inactivity]
eightfold has quit [Quit: eightfold]
segmond has joined #ruby
iateadonut has quit [Client Quit]
firstdayonthejob has quit [Read error: Connection reset by peer]
Pupeno has quit [Remote host closed the connection]
tk__ has joined #ruby
<shevy>
gizmore you must write beautiful code!
<gizmore>
:P
emba has joined #ruby
<gizmore>
i am oscillating between hurting myself and starting over with the project
<emba>
morning everyone? any expert in Ruby to explain me a bit of code?
<shevy>
so that code will happily count from 1 up to whatever number you provide. pure awesomeness :P
<bnagy>
we can make computers count now?
workmad3 has joined #ruby
<bnagy>
what a time to be alive!
<emba>
ahhhh
<shevy>
even lazy counting
<emba>
lazy counting research brought me to that code
fgo has quit [Ping timeout: 252 seconds]
platzhirsch has joined #ruby
<shevy>
ok now what can you do with this
symbol has quit [Ping timeout: 252 seconds]
<emba>
I'm testing y << a ~ y.yield a
workmad3 has quit [Ping timeout: 246 seconds]
minotep has joined #ruby
chipotle has quit [Quit: cheerio]
psy_ has quit [Ping timeout: 246 seconds]
<emba>
shevy +1
<shevy>
I think it requires some kind of mental pattern to employ
arup_r has quit [Ping timeout: 246 seconds]
Rollabunna has joined #ruby
greenbigfrog has joined #ruby
greenbigfrog has left #ruby [#ruby]
Kallis has joined #ruby
<moeabdol>
hi, I'm using RSpec 3 to try and test if an object recieves a call
<moeabdol>
I'm using this syntax expect(my_object).to receive(:method)
<moeabdol>
i'm getting 0 times received, although am sure i do receive the call
<moeabdol>
can someone help me please and tell me wither the syntax is correct.
<moeabdol>
I get confused looking it up as the documentation mostly shows doubles rather than real objects.
Spami has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
Rollabunna has quit [Ping timeout: 246 seconds]
closer has quit [Ping timeout: 272 seconds]
darkf_ has joined #ruby
<Papierkorb>
moeabdol: that's the correct syntax, make sure that it's actually my_object which method is called on
ebbflowgo has joined #ruby
<moeabdol>
will do Papierkorb ...thanks for the confirmation
<Papierkorb>
moeabdol: as hack, just call the method after the expect.
<Papierkorb>
moeabdol: then it shouldn't fail
<ebbflowgo>
hi, is it possible to combine a jruby and ruby file in one runtime? i have a java file that is run via jruby and a ruby file that i would like to call
closer has joined #ruby
<Papierkorb>
ebbflowgo: just use jruby for everything in that case?
<havenwood>
ebbflowgo: JRuby is already the Ruby programming language on the JVM.
bkxd has joined #ruby
<moeabdol>
Papierkorb: yes it did work when calling it after the expect...weird!
<Papierkorb>
moeabdol: then the test is wrong, or the tested code :)
<moeabdol>
Papierkorb: I see....I'll check it out again
<moeabdol>
Papierkorb: thanks
darkf has quit [Ping timeout: 250 seconds]
<ebbflowgo>
havenwood: at this point some of the other libraries I'm using are mri
<j416>
Komanda: are camp and darcs very conceptually similar?
codecop has joined #ruby
arup_r has joined #ruby
<havenwood>
Komanda: you can `brew tap homebrew/versions` and then `brew install ruby20` or `brew install ruby187`, but keep in mind that 2.0 is in maintenance mode and anything prior is past end-of-life
<Komanda>
j416: yes similair concepts , darcs is more populair * maintained
<j416>
as for multiple ruby versions on osx, I prefer chruby with ruby-install; it's very simple and it installs everything into $HOME/ so no surprises, if something goes wrong you can just start over
<Komanda>
havenwood: thanks <#
<j416>
thanks!
emba has joined #ruby
<havenwood>
+1 chruby and ruby-install
<j416>
bah so much to learn .. I think I will postpone it indefinitely. thanks :P
<j416>
@ darcs
<j416>
both chruby and ruby-install are in homebrew also
Mon_Ouie has joined #ruby
fgo has joined #ruby
rbennacer has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
pranny has joined #ruby
<apeiros>
Deckweiss: case, not switch
<Deckweiss>
Oh my bad, I am new to ruby, thanks!
based_ has joined #ruby
fgo has joined #ruby
based_ has quit [Client Quit]
grotewold has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kallis has quit [Read error: Connection reset by peer]
darkxploit has joined #ruby
workmad3 has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
rushed has joined #ruby
rushed has quit [Client Quit]
firstdayonthejob has quit [Read error: Connection reset by peer]
jgt has joined #ruby
rushed has joined #ruby
Kallis has joined #ruby
claw has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
veg has joined #ruby
theery has quit [Remote host closed the connection]
mary5030 has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
dgutierrez1287 has joined #ruby
The_Phoenix has joined #ruby
claw has quit [Ping timeout: 264 seconds]
ruby[bot] has quit [Remote host closed the connection]
Kallis has quit [Read error: Connection reset by peer]
ruby[bot] has joined #ruby
claw has joined #ruby
based_ has joined #ruby
krz has joined #ruby
xet7 has quit [Ping timeout: 265 seconds]
mary5030 has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 240 seconds]
ruby[bot] has quit [Remote host closed the connection]
jher has joined #ruby
emba has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
northfurr has joined #ruby
ruby[bot] has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
spider-mario has joined #ruby
firstdayonthejob has joined #ruby
lignux has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
mahmoudmahfouz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
esauOp has joined #ruby
rushed has quit [Quit: rushed]
JDiPierro has joined #ruby
firstdayonthejob has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
failshell has joined #ruby
wnd has quit [Quit: Caught sigterm, terminating...]
pranny has quit [Remote host closed the connection]
Spami has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xet7 has joined #ruby
tmtwd_ has joined #ruby
darkf has quit [Quit: Leaving]
esauOp has quit [Remote host closed the connection]
Spami_ has joined #ruby
Spami has quit [Ping timeout: 252 seconds]
firstdayonthejob has joined #ruby
TomyLobo has quit [Ping timeout: 260 seconds]
pranny has joined #ruby
linuxboytoo has joined #ruby
failshell has quit [Remote host closed the connection]
clarkenciel has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
khebbie has joined #ruby
theery has joined #ruby
Spami_ has quit [Ping timeout: 250 seconds]
theery has quit [Remote host closed the connection]
Spami has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
s1|verfox has quit [Remote host closed the connection]
Hrorek has joined #ruby
pranny has quit [Remote host closed the connection]
Rurik has quit [Read error: Connection reset by peer]
nofxx has quit [Ping timeout: 240 seconds]
GnuYawk has quit [Read error: Connection reset by peer]
nsuke has quit [Remote host closed the connection]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
khebbie has quit [Ping timeout: 246 seconds]
pranny has joined #ruby
Hrorek is now known as Rurik
juanpablo____ has joined #ruby
yosafbridge has quit [Ping timeout: 256 seconds]
aaeron has joined #ruby
Spami has quit [Ping timeout: 256 seconds]
pranny has quit [Remote host closed the connection]
aaeron has quit [Client Quit]
Spami has joined #ruby
juanpablo____ has quit [Ping timeout: 240 seconds]
based_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has quit [Ping timeout: 252 seconds]
tmtwd_ has quit [Ping timeout: 240 seconds]
jher has quit [Ping timeout: 265 seconds]
yosafbridge has joined #ruby
tmtwd_ has joined #ruby
tmtwd has joined #ruby
tjohnson has joined #ruby
gguggi has joined #ruby
AlphaAtom has joined #ruby
bubbys has quit [Ping timeout: 260 seconds]
last_staff has quit [Ping timeout: 265 seconds]
davispuh has joined #ruby
jher has joined #ruby
diegoaguilar has joined #ruby
gguggi has quit [Ping timeout: 268 seconds]
fgo has joined #ruby
bubbys has joined #ruby
based_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
Spami_ has joined #ruby
jher has quit [Ping timeout: 265 seconds]
Spami has quit [Ping timeout: 246 seconds]
Igorshp has quit [Remote host closed the connection]
victortyau has quit [Quit: Leaving]
fgo has quit [Ping timeout: 268 seconds]
hydrozen has joined #ruby
Igorshp has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
xet7 has quit [Ping timeout: 244 seconds]
apt-get_ has quit [Ping timeout: 246 seconds]
Renich has quit [Ping timeout: 244 seconds]
houhoulis has joined #ruby
psy_ has joined #ruby
hydrozen has quit [Client Quit]
David27 has joined #ruby
psy_ has quit [Max SendQ exceeded]
Azure|dc has quit [Ping timeout: 250 seconds]
psy_ has joined #ruby
Azure has joined #ruby
nanoz has joined #ruby
IrishGringo has joined #ruby
JDiPierro has quit [Remote host closed the connection]
based_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
ruby[bot] has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 272 seconds]
tmtwd_ has quit [Ping timeout: 250 seconds]
based_ has joined #ruby
tmtwd has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
firstdayonthejob has quit [Ping timeout: 252 seconds]
Igorshp has quit [Remote host closed the connection]
jenrzzz has joined #ruby
Oka has quit [Quit: o/]
Rurik has quit [Read error: Connection reset by peer]
roxtrongo has joined #ruby
n008f4g_ has joined #ruby
Rurik has joined #ruby
apt-get_ has joined #ruby
Yzguy has joined #ruby
firstdayonthejob has joined #ruby
rushed has joined #ruby
stuartb has joined #ruby
Contigi has joined #ruby
clarkenciel has quit [Remote host closed the connection]
baweaver has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Yzguy has quit [Ping timeout: 264 seconds]
swgillespie has joined #ruby
xet7 has joined #ruby
mary5030 has joined #ruby
Swappticon has joined #ruby
millerti has joined #ruby
mary5030 has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
theery has joined #ruby
yardenbar has quit [Ping timeout: 255 seconds]
theery has quit [Remote host closed the connection]
Contigi has quit [Read error: Connection reset by peer]
rodfersou has joined #ruby
bronson has joined #ruby
jher has joined #ruby
Deckweiss has quit [Quit: ChatZilla 0.9.92 [IceDragon 26.0.0.2/20131218181224]]
bronson has quit [Ping timeout: 240 seconds]
Spami_ has quit [Quit: This computer has gone to sleep]
jher has quit [Ping timeout: 260 seconds]
failshell has joined #ruby
<shapeshifter>
This is killing me.
fedexo has joined #ruby
rushed has quit [Quit: rushed]
<shapeshifter>
I've set up a rails application for a staging/production deployment with capistrano 3. Problem is, the javascripts and stylesheets assets are not being served. In fact, I don't think they're being generated either. I'm using capistrano/rails to build the assets. I can also see in the capistrano output that *some* assets are built, but not css/js.
<shapeshifter>
I don't get it. Nothing makes sense anymore.
failshell has quit [Ping timeout: 268 seconds]
moeabdol has joined #ruby
scripore has joined #ruby
apt-get_ is now known as apt-get
rehat has joined #ruby
roxtrongo has quit [Remote host closed the connection]
yardenbar has joined #ruby
dorei has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
ndrei has quit [Read error: No route to host]
vmatiyko has joined #ruby
apt-get is now known as apt-get_
apt-get_ is now known as apt-get
apt-get is now known as apt-get__
apt-get__ is now known as apt-get
howdoi has quit [Quit: Connection closed for inactivity]
<jhass>
?crosspost shapeshifter
<ruboto>
shapeshifter, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<bootstrappm>
shapeshifter: I haven't used Capistrano for a whiiile but I'd double check to make sure you have node installed and that the capistrano recipe does in fact do `bin/rake assets:precompile`
<shapeshifter>
jhass: thanks for the hint, I'll report if I get advice in other channels.
theery has joined #ruby
<shapeshifter>
bootstrappm: node is installed and I'm sure capistrano does rake assets:precompile because I see some assets are compiled. The same ones which are compiled when I run the command manually on the server.
northfurr has quit [Quit: northfurr]
vmatiyko has quit [Quit: leaving]
fgo has joined #ruby
arup_r has joined #ruby
hydrozen has joined #ruby
JBrickley has quit [Client Quit]
xxneolithicxx has joined #ruby
JBrickley has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
Mon_Ouie has joined #ruby
leafybas_ has quit [Ping timeout: 250 seconds]
fgo has quit [Ping timeout: 256 seconds]
esauOp has joined #ruby
jenrzzz has joined #ruby
roxtrongo has joined #ruby
diegoaguilar has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
northfurr has joined #ruby
claptor has quit [Quit: this channel is bakas]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
northfurr has quit [Quit: northfurr]
fernandezpablo has joined #ruby
freerobby has quit [Quit: Leaving.]
fernandezpablo has left #ruby [#ruby]
yasha0x80 has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
yourname1 has joined #ruby
devbug has joined #ruby
ddrmanxbxfr has quit [Ping timeout: 240 seconds]
tejasmanohar has joined #ruby
<tejasmanohar>
hey
<yourname1>
hey
<tejasmanohar>
how do i source a file (like shell `source .env`) in ruby
<tejasmanohar>
`source .env` seems to not be working as expected O.o
yourname1 has quit [Client Quit]
<apeiros>
you can't change the env of a parent process
<apeiros>
no matter which language
balazs has joined #ruby
<tejasmanohar>
gotchha
<baweaver>
why would you want to?
<tejasmanohar>
doing something similar to ruby's dotenv... except in a code sandbox
<tejasmanohar>
want to read some text from a file into a variable
roxtrongo has quit [Remote host closed the connection]
<tejasmanohar>
i have control of what the text file can say... dynamically
<tejasmanohar>
know how i can read something like "var=5" into a variable `var` set to `5`?
<tejasmanohar>
baweaver:
<tejasmanohar>
(read something as in from a file... or just a string, i know how to get string of file etc)
vmatiyko has joined #ruby
mprelude has joined #ruby
ponga has joined #ruby
based_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gambl0re>
anybody here use haml?
northfurr has joined #ruby
<apeiros>
tejasmanohar: sounds like you want YAML
<apeiros>
?anyone gambl0re
<ruboto>
gambl0re, Just ask your question, if anyone has or can, they will respond.
an0ma1y has quit [Quit: Quit]
JBrickley has quit [Remote host closed the connection]
Blaguvest has joined #ruby
an0ma1y has joined #ruby
segfalt has joined #ruby
emba has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
emba has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
roxtrongo has joined #ruby
stamina has quit [Ping timeout: 256 seconds]
m8 has quit [Ping timeout: 246 seconds]
based_ has joined #ruby
s00pcan has quit [Ping timeout: 268 seconds]
<EllisTAA>
i’m trying to put an instance of a elevatorbank class into my @banks array, it says @banks is nil, i’m guessing bc of attr_accessor it is a method … but even when i get rid of the banks attr_accessor it still gives me the same error … https://gist.github.com/ellismarte/9c622dafc1cd0f747c7c#file-elevator-rb-L47
jenrzzz has joined #ruby
NeverDie_ has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fairyeye has joined #ruby
<EllisTAA>
anyone know why
minimuffins has joined #ruby
<apeiros>
EllisTAA: the problem is not in your gisted code
maokomioko has joined #ruby
<apeiros>
I assume you set it to nil somewhere outside
juanpablo____ has joined #ruby
<EllisTAA>
apeiros: i included everything in that file. i am using coderpad which in my experience kinda sucks
<apeiros>
ah
<apeiros>
I see
<apeiros>
you initialize @banks *after* callink bank()
<apeiros>
-k
<apeiros>
+g
<EllisTAA>
let me see
<EllisTAA>
oh god damnit
<EllisTAA>
thank you
<EllisTAA>
apeiros: could you comment on my oo design?
<apeiros>
EllisTAA: not really in the mood, sorry. not related to you.
<EllisTAA>
no worries, thanks for your help though :) feel better
krz has quit [Ping timeout: 255 seconds]
Mendenhall has joined #ruby
Caius has quit [Ping timeout: 256 seconds]
<gambl0re>
how do i write <div class="alert alert-<%=k%>"><%=v%></div> in haml?
juanpablo____ has quit [Ping timeout: 252 seconds]
<fairyeye>
excuse me, how can i get the ruby 2.2.3, i used 'rvm list known' ,just see 2.2[.1]
<gambl0re>
yes i got it!!!
krz has joined #ruby
IrishGringo has joined #ruby
khebbie has joined #ruby
<gambl0re>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
<gambl0re>
i'll do it for you n****s & do it for myself...
<apeiros>
gambl0re: if that's supposed to be funny - it's not. and it's not welcome here.
fedexo has quit [Ping timeout: 244 seconds]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Caius has joined #ruby
ehth77 has joined #ruby
<nofxx>
gambl0re, .alert{ class: "alert-#{k}" }
<apeiros>
fairyeye: you can just `rvm install 2.2.3`, even if it's not in the list
<gambl0re>
.alert{:class => "alert-#{k}"}= v
<gambl0re>
that worked for me
khebbie has quit [Ping timeout: 244 seconds]
diegoaguilar has quit [Ping timeout: 256 seconds]
segfalt_ has joined #ruby
rodfersou has quit [Quit: leaving]
northfurr has quit [Quit: northfurr]
segfalt has quit [Ping timeout: 272 seconds]
segfalt_ is now known as segfalt
rehat has quit [Remote host closed the connection]
<LostandConfused0>
I'm teaching myself some Ruby, and I have some questions regarding the behavior of arrays. Anyone willing to sit down and exchange a few pms with me?
djbkd has quit [Remote host closed the connection]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
LostandConfused0: if nobody volunteers (which isn't too unlikely) - just ask in the channel
<LostandConfused0>
Fair enough.
stamina has joined #ruby
<LostandConfused0>
Honestly its extremely basic. I have about 3 hours of coding experience with Ruby, so my access to functions is limited. I have discovered that I can call on a specific letter in a string, just as if the string was an array. word=Moron puts(word[0]) prints M. However, this doesn't appear to work when the call is a variable puts(word[x])
FalseDeal has joined #ruby
diegoaguilar has joined #ruby
<LostandConfused0>
Im curious as to why.
blue_deref has joined #ruby
<apeiros>
it does work. so if it doesn't work, something about your code differs from what you think it is
<apeiros>
>> word = "beginner"; index = 0; puts word[index]
<apeiros>
pontiki: I'm sticking to their code (tho, should have used x instead of index)
<LostandConfused0>
Hm
<pontiki>
ah, ok
<apeiros>
but yeah, I want to improve the eval plugin to ignore return value if it's nil and there's stdout.
hashrocket has quit [Quit: Connection closed for inactivity]
phatypus has joined #ruby
<apeiros>
also some other scenarios. but not yet sure how to do it properly and got other more pressing things to do :)
jgt has quit [Ping timeout: 264 seconds]
<LostandConfused0>
Fair
ZeeNoodleyGamer has quit [Quit: Aiyaiyai]
ZeeNoodleyGamer has joined #ruby
<LostandConfused0>
I havent been exposed to variable checking, either for nil, or string, or int. I assume there is a call function to ask what type of variable is being stored in a given variable
<apeiros>
`p variable` will print the content of variable in an inspectable format
<apeiros>
`p variable.class` will tell you the class of the object referenced by variable (and a variable always references an object in ruby)
tmtwd_ has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
emba has quit [Remote host closed the connection]
dfinninger has joined #ruby
tmtwd has joined #ruby
symm- has quit [Ping timeout: 268 seconds]
majjoha has joined #ruby
cajone has joined #ruby
emba has joined #ruby
clarkenciel has joined #ruby
<LostandConfused0>
Cool
phatypus has quit [Quit: .>]
[k- has quit [Ping timeout: 255 seconds]
majjoha has quit [Ping timeout: 246 seconds]
<fairyeye>
which one do you like better in mac, launched or foreman?
codecop has quit [Remote host closed the connection]
Rurik has quit [Ping timeout: 255 seconds]
Narzew has quit [Quit: Leaving]
northfurr has joined #ruby
Swappticon has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
darkxploit has quit [Quit: Leaving]
scripore has joined #ruby
Cust0sLim3n has quit [Ping timeout: 246 seconds]
scripore has quit [Remote host closed the connection]
roxtrongo has quit [Read error: Connection reset by peer]
<LostandConfused0>
I've been using puts("") as a line break in the code's export. Is there a better way to accomplish this?
yasha0x80 has joined #ruby
Cust0sLim3n has joined #ruby
theery_ has joined #ruby
<LostandConfused0>
export shouldve been "output" <_>
fairyeye has quit [Ping timeout: 246 seconds]
<toretore>
just `puts` without any arguments will print a newline
theery has quit [Ping timeout: 244 seconds]
ehth77 has joined #ruby
<LostandConfused0>
Cool. One more while I'm at it. can I print the variables of an array without forcing linebreaks?
<shevy>
:D
Queeniebee has quit [Ping timeout: 252 seconds]
<shevy>
your question gave the answer, it's print
<LostandConfused0>
Oh. ^_^ Cool
<shevy>
if you are very lazy, you can alias puts and print; alias e puts; alias ee print; now you can use e and ee instead
meatherly has joined #ruby
diegoaguilar has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
dseitz has joined #ruby
<LostandConfused0>
Also neat
fxn has joined #ruby
<LostandConfused0>
I know the notations are ##, but I recall there being a multiline notation as well. I was going to use google but someone here might be faster
<Mon_Ouie>
=begin and =end
pranny has joined #ruby
<shevy>
yeah
<shevy>
but people like #
<LostandConfused0>
Fairenougb xD
Rurik has quit [Read error: Connection reset by peer]
<Mon_Ouie>
Also =begin and =end have to be at the beginning of the line (there can be no whitespace before them)
<shevy>
if you need to temporarily disable a chunk of code for a while, you could add a "if false", and indent it to the most left, so that it can stand out
ohaibbq has joined #ruby
<LostandConfused0>
Basically, yeah. that is what Im doing
<shevy>
I think you will find # not so bad, on average you should not need more than e. g. ~12 lines with '#' as a typical comment
<LostandConfused0>
disabling code while I attempt different things.
<shevy>
yeah as you break things
<LostandConfused0>
xD
workmad3 has joined #ruby
bronson has joined #ruby
<LostandConfused0>
I've been having some serious issues with arrays. So I'm step by step figuring out what works and what doesnt
meatherly has quit []
<shevy>
you should not have
<shevy>
there are three main things - you add data to an array, you remove data to an array, you query data from an array
<arup_r>
that's it
<arup_r>
Array is easy
<shevy>
listen to the one-million-karma man!
MrFjords has joined #ruby
I has joined #ruby
meatherly has joined #ruby
I is now known as Guest94276
* arup_r
hides
theery_ has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
dopie has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 246 seconds]
Rurik has joined #ruby
moeabdol has quit [Ping timeout: 265 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
<LostandConfused0>
Yeah. I know.
jamesaxl has joined #ruby
<LostandConfused0>
My arrays keep giving me code errors. Its because Im attempting to use them in ways they want to be used.
Rurik has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
fxn has quit [Quit: zZzZzZ...]
yfeldblum has joined #ruby
zenguy_pc has joined #ruby
Queeniebee has joined #ruby
<LostandConfused0>
Essentially, I was avoiding string.reverse, and attempting to call on each letter of the string, store them in an array, and then print the array.
Rurik has joined #ruby
diegoaguilar has joined #ruby
<LostandConfused0>
that way I could manipulate the string
pranny has quit [Remote host closed the connection]
<arup_r>
do you know ?
<arup_r>
>> p "hello".chars
<ruboto>
arup_r # => ["h", "e", "l", "l", "o"] ...check link for more (https://eval.in/428549)
<arup_r>
>> p "hello".chars.reverse_each.to_a
<ruboto>
arup_r # => ["o", "l", "l", "e", "h"] ...check link for more (https://eval.in/428550)
<LostandConfused0>
Oh
<arup_r>
Any thing more LostandConfused0
<arup_r>
?
<LostandConfused0>
xD
zenguy_pc has quit [Max SendQ exceeded]
<LostandConfused0>
Yeah. If I wanted to print that array without the array's ["","",""] how would I do that?
<shevy>
you don't want to memorize all of them in one day
<LostandConfused0>
I only knew about capitalize, downcase, upcase, length and reverse
<arup_r>
:p this is not for me
<jhass>
and so on
roxtrongo has joined #ruby
zenguy_pc has joined #ruby
<monsieurp>
LostandConfused0: give pry a go
<monsieurp>
LostandConfused0: gem install pry
<LostandConfused0>
Thanks ^_^
omninonsense has joined #ruby
<LostandConfused0>
pry?
<jhass>
?pry
<ruboto>
Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<shevy>
LostandConfused0 you can also alias them if you want to, just as the above example alias e puts, it works for all the other methods too
<arup_r>
?string ruby
<ruboto>
ruby, I don't know anything about string
<LostandConfused0>
I've been using cloud9 for coding
<arup_r>
ok leave it then
<shevy>
ruby uses aliases in core too, see .collect being equivalent to .map
pranny has joined #ruby
pranny has quit [Remote host closed the connection]
meatherly has quit []
<LostandConfused0>
Just curious. is " .+() " using the alias " + " or is that something else?
<shevy>
well you actually gave the answer again in the question haha
<LostandConfused0>
I'll look into that tonight ruboto, thanks
<LostandConfused0>
xD
<shevy>
at least, from your method signature, that should be a method invocation
<jhass>
1 + 2 is syntax sugar for 1.+(2) that is invoking the method + on the object 1 passing it the object 2
<jhass>
?justabot
<ruboto>
I'm just a bot. You don't need to address me.
<shevy>
there you see - jhass gave it: 1.+(2)
k3asd` has quit [Ping timeout: 260 seconds]
<LostandConfused0>
Cool
<LostandConfused0>
I'm very new to this. But it's a lot of fun
nanoz has quit [Quit: <3]
<shevy>
\o/
<shevy>
ruby is so much fun that one can ignore bad docu too!
<LostandConfused0>
docu?
<slash_nick>
mentation
<LostandConfused0>
lol, another word I've never heard
<shevy>
well, some part of the official documentation are missing or not of awesome quality; the core things such as String or Array are fine though
<LostandConfused0>
Oh documentation
<LostandConfused0>
>_> right
roxtrongo has quit [Ping timeout: 260 seconds]
jher has quit [Ping timeout: 244 seconds]
bluOxigen has joined #ruby
<slash_nick>
shevy was expressing the idea that the documentation was incomplete :P
bubbys has quit [Ping timeout: 255 seconds]
<LostandConfused0>
Yeah, I got that now xD
<LostandConfused0>
I also didnt know that
<LostandConfused0>
Did they ... lose it?
<shevy>
in most cases it was never written in the first place
jgt has joined #ruby
<arup_r>
humm true
<LostandConfused0>
Like somsone just added in some function and decided not to tell anyone?
<shevy>
remember you write some C code... then you are tired and don't want to write documentation for 2000 lines of C code
<shevy>
LostandConfused0 yeah
<LostandConfused0>
xD
meatherly has joined #ruby
symm- has joined #ruby
bronson has quit [Remote host closed the connection]
<LostandConfused0>
That's horrible. xD Its like wasting your time almost, epseically if you forget part, or need somsone elses half/bad answer
<arup_r>
How then Python documented each n every thing ?
<arup_r>
LostandConfused0: You mean Ruby don't have people or people in Ruby are lazy ?
<arup_r>
xD
<shevy>
LostandConfused0 well, the ruby core stuff is documented decently; also, check out blogs related to ruby, there is a LOT of knowledge stored in these blogs
<LostandConfused0>
That's what I'm being told
<LostandConfused0>
xD
<LostandConfused0>
Cool
<LostandConfused0>
I'll probably be here alot
rushed has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<LostandConfused0>
I should make up a usable nickname
fgo has joined #ruby
LostandConfused0 is now known as Ebokian
<shevy>
ack
<dotix>
command not found: ack
krz has quit [Quit: WeeChat 1.2]
esauOp has quit [Remote host closed the connection]
<Ebokian>
Are there any blogs that I should just keep up on? idle reading time etc
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
arup_r I dunno... but I think the python guys thought differently about documentation, such as those weird """doc strings""" thingies
aaeron has joined #ruby
jgt has quit [Ping timeout: 255 seconds]
northfurr has joined #ruby
<shevy>
one can get documentation in ruby too, like through those show-doc/method-location stuff but it was more an afterthought... .source_location was not in ruby 1.8.x if I remember correctly
hydrozen has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
hays_ is now known as hays
Guest94276 has quit [Quit: This computer has gone to sleep]
mary5030 has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
yqt has joined #ruby
mandarinkin has joined #ruby
firstdayonthejob has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
omninonsense has quit [Quit: freenode]
omninonsense has joined #ruby
bronson has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
esauOp has joined #ruby
bronson has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
omninonsense has quit [Client Quit]
pranny has joined #ruby
Jardayn has joined #ruby
omninonsense has joined #ruby
pranny has quit [Remote host closed the connection]
fxn has joined #ruby
zenguy_pc has joined #ruby
based_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo____ has joined #ruby
towski_ has joined #ruby
stuartb has quit [Changing host]
stuartb has joined #ruby
towski_ has quit [Remote host closed the connection]
claptor has joined #ruby
zenguy_pc has quit [Read error: No route to host]
Rollabunna has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
zenguy_pc has joined #ruby
juanpablo____ has quit [Ping timeout: 244 seconds]
theery has quit [Remote host closed the connection]
<Mendenhall>
>> "where's the closing tag?
<ruboto>
Mendenhall # => /tmp/execpad-c1db724c5b46/source-c1db724c5b46:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/428555)
<jhass>
?experiment Mendenhall ;)
<ruboto>
Mendenhall, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
n_blownapart has joined #ruby
<Mendenhall>
my bad, I just had to do that at least once
roxtrongo has quit [Remote host closed the connection]
<Mendenhall>
?pry
<ruboto>
Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<Mendenhall>
oh excellent that's exactly what I needed
based_ has joined #ruby
<shevy>
lol
<slash_nick>
lol
<slash_nick>
I didn't know most of that
<slash_nick>
show-source, exit, and exit-program represents the extent of my knowledge of pry
<Mendenhall>
all i care about is tab-completion at this point
moeabdol has quit [Ping timeout: 272 seconds]
<Rurik>
I have a question for someone who knows both python and ruby
bronson has quit [Remote host closed the connection]
<Rurik>
in python if you do 5 * 'foo' it gives you the intended result
<toretore>
>> 'foo' * 5
<Rurik>
but if you do the same in ruby it throws an error
<Rurik>
i gotta find out what python does differently that both 5 * 'foo' and 'foo' * 5 work
emba has quit [Remote host closed the connection]
diegoaguilar has quit [Ping timeout: 256 seconds]
<toretore>
>> class Fixnum; def @*(s); if s.is_a?(String); s * self; else; super; end;end; end; 5 * 'foo'
<ruboto>
toretore # => /tmp/execpad-d02f840849e9/source-d02f840849e9:2: `@*' is not allowed as an instance variable name ...check link for more (https://eval.in/428561)
<jhass>
Probably Integer.__multi__ or whatever it is handles strings
mandarinkin is now known as dodoki
<jhass>
toretore: no @
<toretore>
>> class Fixnum; def *@(s); if s.is_a?(String); s * self; else; super; end;end; end; 5 * 'foo'
<ruboto>
toretore # => /tmp/execpad-04f0724508ed/source-04f0724508ed:2: `@(' is not allowed as an instance variable name ...check link for more (https://eval.in/428562)
<toretore>
shit
<toretore>
ok
Renich has joined #ruby
<toretore>
>> class Fixnum; def *(s); if s.is_a?(String); s * self; else; super; end;end; end; 5 * 'foo'
<toretore>
what it does differently is to not give you an error when you give it a string
Renich has joined #ruby
Kallis has joined #ruby
jgt has joined #ruby
<Mendenhall>
so really it boils down to language design differences
<Mendenhall>
i wonder if there was arguments about whether or not ruby's string*integer method should be commutative
<toretore>
then you'd have people getting user input as "5" and doing `5 * "5"` getting "55555"
<toretore>
then someone says "well, then it should guess if it's a number or not and cast it in that case"
fgo has joined #ruby
jher has joined #ruby
<shevy>
hmmm
jgt has quit [Ping timeout: 244 seconds]
<shevy>
would "5" * 5 yielding "55555" really make a lot of sense?
bluOxigen has quit [Ping timeout: 256 seconds]
<nofxx>
I always write `5 * "5"` to receive a error and reverse it. In my brain "five times '1' is '11111'" is it because english ain't my mother tongue?
tmtwd_ has quit [Remote host closed the connection]
<nofxx>
I mean, don't you? five times 5 or 5 five times
<toretore>
you have to remember which is the receiver
<toretore>
the operation is being done to the receiver, i.e. the left side
dc__ has joined #ruby
<toretore>
so you're asking a string to "multiply yourself 5 times"
<nofxx>
toretore, good mnemonic to use
snath has joined #ruby
<nofxx>
or rationale
dc__ has quit [Client Quit]
<toretore>
asking an integer to "multiply yourself "5" times" doesn't really make sense
<toretore>
and it is most likely to be done in error
<toretore>
i.e. user input
fxn has quit [Quit: zZzZzZ...]
JDiPierro has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
majjoha has joined #ruby
segfalt has quit [Quit: segfalt]
dc__ has joined #ruby
<nofxx>
Anyone using ruby & ruby-electric and emacs is lately completing 'do' with 'DOC' ? Before it opened a line and appended 'end'.
ghr has quit [Remote host closed the connection]
jher has quit [Ping timeout: 246 seconds]
meatherly has quit []
<shevy>
come to notepad man
majjoha has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
cajone has quit [Ping timeout: 272 seconds]
towski_ has joined #ruby
[spoiler] has quit [Quit: WeeChat 1.1]
diprotic has joined #ruby
diprotic has quit [Changing host]
diprotic has joined #ruby
ndrei has quit [Client Quit]
<nofxx>
shevy, running on wine?
monoprotic has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
<shevy>
it is possible!
houhoulis has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 244 seconds]
vmatiyko has quit [Ping timeout: 252 seconds]
diprotic is now known as monoprotic
Jackneill has quit [Remote host closed the connection]
pranny has joined #ruby
kobain has joined #ruby
ghr has joined #ruby
houhoulis has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
juanpablo____ has joined #ruby
failshell has joined #ruby
GnuYawk has joined #ruby
pranny has quit [Ping timeout: 265 seconds]
emba has joined #ruby
phutchins has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
juanpablo____ has quit [Ping timeout: 268 seconds]
cajone has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
yashinbasement has joined #ruby
above has quit []
B5X has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
based_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
B5X has quit [Client Quit]
FalseDeal has left #ruby ["WeeChat 1.3"]
workmad3 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
apt-get has quit [Ping timeout: 268 seconds]
pietr0 has quit [Quit: pietr0]
danieli has quit [Quit: *does an epic backflip into nowhere*]
rushed has joined #ruby
Rodya_ has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
leafybasil has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
quimrsto_ has joined #ruby
rushed has quit [Quit: rushed]
moeabdol has joined #ruby
leafybas_ has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Rurik has quit [Changing host]
Rurik has joined #ruby
snath has left #ruby ["Leaving"]
roxtrongo has joined #ruby
quimrsto_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
apt-get has joined #ruby
leafybasil has quit [Ping timeout: 246 seconds]
quimrsto_ has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
quimrsto_ has quit [Remote host closed the connection]
aaeron has quit [Quit: Leaving.]
DeweyD has joined #ruby
nahtnam has joined #ruby
DeweyD has left #ruby [#ruby]
yashinbasement has quit [Quit: Leaving]
eightfold has joined #ruby
<pontiki>
hi
scripore has quit [Quit: This computer has gone to sleep]
stamina has quit [Remote host closed the connection]
scripore has joined #ruby
<pontiki>
nofxx: i use yasnippet, so haven't noticed that
Ebokian has quit [Ping timeout: 246 seconds]
tmtwd_ has joined #ruby
dotix has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
roxtrongo has quit [Remote host closed the connection]
ndrei has quit [Read error: No route to host]
scripore has quit [Client Quit]
scripore has joined #ruby
jamesaxl|2 has joined #ruby
JDiPierro has quit [Remote host closed the connection]
decoponio has quit [Read error: Connection reset by peer]
Renich has quit [Quit: leaving]
decoponio has joined #ruby
JDiPierro has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
dc__ has quit []
jgt has joined #ruby
dc_ has joined #ruby
n0xff has quit [Ping timeout: 240 seconds]
dc_ has quit [Client Quit]
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
fgo has joined #ruby
sarid has quit [Ping timeout: 255 seconds]
jgt has quit [Ping timeout: 264 seconds]
bronson has quit [Remote host closed the connection]
n_blownapart has quit []
EllisTAA has joined #ruby
Kallis has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 268 seconds]
dc_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
dc_ has quit [Client Quit]
yashinbasement has joined #ruby
jenrzzz has joined #ruby
barhum2013 has joined #ruby
Rodya_ has joined #ruby
blue_deref has quit [Quit: Taking myself out of hear.]
AlexAltea has joined #ruby
failshell has joined #ruby
Rollabunna has joined #ruby
tejasmanohar has joined #ruby
doublemalt__ has joined #ruby
s00pcan has joined #ruby
wookiehangover has quit [Ping timeout: 244 seconds]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
s00pcan has quit [Client Quit]
MrFjords has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has joined #ruby
failshell has quit [Ping timeout: 244 seconds]
s00pcan has quit [Remote host closed the connection]
<shevy>
we use magic here
s00pcan has joined #ruby
kedare has quit [Read error: Connection reset by peer]
Rollabunna has quit [Ping timeout: 250 seconds]
doublemalt_ has quit [Ping timeout: 268 seconds]
WillAmes has joined #ruby
wookiehangover has joined #ruby
<pontiki>
SHEVY'S A WITCH!!
mary5030 has quit [Ping timeout: 256 seconds]
minotep has quit [Ping timeout: 256 seconds]
diegoaguilar has joined #ruby
<shevy>
lol
JDiPierro has quit [Remote host closed the connection]
phatypus has joined #ruby
roshanavand has quit [Ping timeout: 244 seconds]
majjoha has joined #ruby
devbug_ has joined #ruby
apt-get_ has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
apt-get has quit [Ping timeout: 246 seconds]
moeabdol has joined #ruby
vF3hNGxc47h8 has joined #ruby
vF3hNGxc47h8 has joined #ruby
northfurr has joined #ruby
jher has joined #ruby
phatypus has quit [Quit: .>]
diegoaguilar has quit [Ping timeout: 244 seconds]
tubuliferous_ has quit [Ping timeout: 244 seconds]
moeabdol has quit [Ping timeout: 240 seconds]
tejasmanohar has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
tejasmanohar has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Quit: baroquebobcat]
jenrzzz has quit [Ping timeout: 255 seconds]
<craysiii>
so I want to point something out
<EllisTAA>
the onlyy thing i can think of is passing in the elevator queue as an argument
zenguy_pc has joined #ruby
<shevy>
sure you can pass it into the elevator class
northfurr has quit [Quit: northfurr]
<EllisTAA>
craysiii: i was going to pass the master queue into the shaft.grab_job
<craysiii>
i think its a good attempt, but i think it could be refactored a bit. for example, elevator has .shafts, but a single elevator can only have 1 shaft
<EllisTAA>
craysii: can’t an elevator have 3 shafts?
<craysiii>
those are 3 elevators though, in 3 shafts
scripore has joined #ruby
<craysiii>
each elevator belongs to a shaft
<craysiii>
and now that word looks mispelled :P
<shevy>
it is very good to use reallife pictures to model code after!
<craysiii>
I would have ElevatorBank be the top class. It has .shafts, and each shaft has an elevator.
FernandoBasso has joined #ruby
<shevy>
that way you can avoid having a labyrinth of shafts in horizontal position for an elevator that becomes a space ship fighter
<craysiii>
shevy don't kill the dream :P
<shevy>
and don't forget that one can open and close an elevator too
<EllisTAA>
craysiii: that’s a good idea
northfurr has joined #ruby
<EllisTAA>
craysiii: that’s essentially what i wrote, i just used switched elevator and elevator bank
<shevy>
craysiii if construction hasn't been finished then the shaft may not yet contain an elevator
<EllisTAA>
every elevator has a bank & shafts
mprelude has quit [Ping timeout: 246 seconds]
<shevy>
and a door!
ricer has joined #ruby
<craysiii>
each elevator bank consists of an array of tuples (elevator, shaft)
yasha0x80 has quit [Quit: My Brain has gone to sleep. ZZZzzz…]
<craysiii>
though yes a shaft might not have an elevator
<craysiii>
and each shaft may have access to different floors
yasha0x80 has joined #ruby
<shevy>
we have reached a higher level of understanding now
<craysiii>
the ElevatorBank should be where the logic goes when someone requests an elevator, which can do some logic to determine which elevator is closest to the request and take into consideration previous requests etc,
eightfold has quit [Quit: eightfold]
bronson has joined #ruby
omninonsense is now known as [spoiler]
<EllisTAA>
yeah i’m working on that atm
<EllisTAA>
i think i figured out the logic which awesome
<craysiii>
elevator logic is pretty complex
<craysiii>
at least for newer systems
euoia has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
euoia has joined #ruby
roxtrongo has joined #ruby
towski_ has quit [Remote host closed the connection]
apt-get_ has quit [Ping timeout: 240 seconds]
jgt has joined #ruby
<craysiii>
not trying to discourage you though
<EllisTAA>
it might not be perfect but i’m satisfied with my design
duncannz has joined #ruby
<EllisTAA>
it uses a master queue and then 2 ques one for each direction
barhum2013 has quit [Quit: barhum2013]
balazs has quit [Ping timeout: 265 seconds]
fgo has quit [Ping timeout: 246 seconds]
<FernandoBasso>
If I do @name = 'default' inside a class, is it a private property?
Rodya_ has quit [Remote host closed the connection]
<FernandoBasso>
Can I do class Person\n @name = 'foo' end and then p = Person.new and finally puts p.name ?
<craysiii>
no
<craysiii>
its not private i mean.
<FernandoBasso>
I get an error saying there is no method called `name`.
juanpablo____ has joined #ruby
<craysiii>
that doesn't work because you're declaring and assigning an instance variable inside a class definition
majjoha has quit [Ping timeout: 255 seconds]
northfurr has quit [Quit: northfurr]
<FernandoBasso>
That is why I did p = Person.new before doing puts p.name
<craysiii>
you could do class Person; def name; "something"; end; Person.new.name
swgillespie has joined #ruby
<FernandoBasso>
If @name = 'default' is an -instance- variable, why doesn't p = Person.new; puts p.name ?
<FernandoBasso>
Isn't p an instance of Person?
<FernandoBasso>
You mean I should define a method called `name`?
<craysiii>
yeah or an attr_accessor
<FernandoBasso>
I see.
<FernandoBasso>
Thanks.
<craysiii>
im not an expert though, and i'd like one to chime in.
phatypus has joined #ruby
n008f4g_ has quit [Ping timeout: 250 seconds]
towski_ has joined #ruby
<FernandoBasso>
I tried finding some documentation on this subject, but I failed to find something that would be really clear about this.
tmtwd_ has quit [Ping timeout: 272 seconds]
tmtwd has quit [Ping timeout: 250 seconds]
<FernandoBasso>
It is like -all- C books I read so far (even K&R). They say "the name of an array is a pointer to its first element".
juanpablo____ has quit [Ping timeout: 265 seconds]
<FernandoBasso>
That is not 100% true. They neglect to explain that it is a -constant- pointer, because you can't do my_array+ for instance.
<jher>
FernandoBasso: on the `Foo.new.some_instance_var` that doesn't work because it needs a getter method
aaeron has joined #ruby
workmad3 has joined #ruby
<FernandoBasso>
I am kind of seeing similar problem with ruby docs and tutorials about classes, properties and methods.
<FernandoBasso>
jher: So, one cannot access a property directly?
<craysiii>
hm youre right jher
<jher>
You need to make a getter either by hand or by `attr_reader`
<craysiii>
i was wrong
towski_ has quit [Remote host closed the connection]
<FernandoBasso>
jher: What does @name = 'default' really do? Does it create a public property?
<jher>
FernandoBasso: could you give me some more context? I kind of just jumped in here
<craysiii>
he's talking about declaring instance variable inside a class definition
<jher>
That might seem a little convoluted on one line, but that's how you do it.
ghr has quit [Read error: No route to host]
ghr has joined #ruby
<FernandoBasso>
Thank you both for your help, but I still failed to understand. 1) Does declaring @name = 'default' create a public property? 2) If so, can't it be accessed directly?
<jher>
FernandoBasso: @name = 'default' is just an instance variable, but you're able to access it outside of the class when you use attr_accessor :name
<jher>
It's a weird Ruby thing, but when you do attr_accessor :foo, then `@foo = self.foo`
<FernandoBasso>
An instance variable, but it is neither public nor private (or something), it seems.
<jher>
It's not public, it's just accessible
<Mon_Ouie>
Instance variables are always private. You can define methods that return an instance variable's value or set it.
failshell has quit [Ping timeout: 250 seconds]
ReK2 has quit [Read error: Connection reset by peer]
<FernandoBasso>
But methods are public by default, right?
garethrees has joined #ruby
<Mon_Ouie>
attr_accessor :foo is a shortcut to write `def foo; @foo; end; def foo=(new_value); @foo = new_value; end'
<Mon_Ouie>
Sure
<FernandoBasso>
I see.
<FernandoBasso>
Well, thank the three of you.
<FernandoBasso>
It was incredible difficult to find precise information on this subject.
dodoki has quit [Quit: Leaving]
<FernandoBasso>
Perhaps not precise, but understandable.
bootstrappm has quit [Quit: Leaving.]
MrFjords has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<FernandoBasso>
People neglect to write about some of the details.
tmtwd has joined #ruby
Rodya_ has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
<FernandoBasso>
jher: You see, "Obviously we never defined method name. Let's do that." When/where the guy makes it clear that ruby will interpret that as a method?
bronson has quit [Remote host closed the connection]
cengizIO has joined #ruby
<FernandoBasso>
His answer is cool, though.
weemsledeux has joined #ruby
<FernandoBasso>
And in his example, he didn't define an instance variable like I did, therefore, in his example it is more foreseeable that something will not work.
<FernandoBasso>
Also, I was mislead because of the most unclear tutorial about this I could find.
<FernandoBasso>
It got me thinking all wrongly about this.
<FernandoBasso>
Anyway, I'll keep studying and than you all once more for the help. I really appreciate it.
grenierm has joined #ruby
<jher>
FernandoBasso: yeah, it always seems ambiguous how attr_accessor relates directly to instance variables
<Mon_Ouie>
You can't re-explain the entirety of the language every time you answer a question, you always assume the people you're speaking have *some* level of knowledge
tjohnson has quit [Quit: Connection closed for inactivity]
bonhoeffer_ has joined #ruby
<shevy>
There are not many great tutorials available for ruby
<shevy>
FernandoBasso you can sometimes find good information spread out over in several blogs
<cengizIO>
Hello there Rubyists. Please accept my warmest greetings from Istanbul, Turkey.
<FernandoBasso>
shevy: That is what I have been trying to do. I search for specific things I want/need to learn (and make anki cards out of the stuff I feel I need to memorize)
<shevy>
yeah
<shevy>
I survived by storing documentation locally
tmtwd_ has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FernandoBasso>
shevy: I see. I still like trying to memorize some of the stuff.
<shevy>
this will become easier the more code you write
<shevy>
then it will often just be the chaining together of methods to do what you need
<FernandoBasso>
I see now that even if I use attr_accessor or explicit getters/setters, an instance variable cannot be initialized just with @name = 'foo'
<shevy>
the various attr* methods just make life simpler but you can do the very same thing via "def" too
<jher>
FernandoBasso: I suggest just building an application and learning by example
<FernandoBasso>
jher: I learn by example and try to build things. But I hate when I try to use simple methods or do simple things that should be on the tip of my fingers and I can't remember and have to spend time looking it up somewhere.
<jher>
FernandoBasso: sometimes that repetition is what it takes
<FernandoBasso>
jher: For instance, in JavaScript, str = 'foo'; then str[5] gives `undefined` whereas str.charAt(5) producess '' (an empty string). I like to remember those things from memory.
<shevy>
this makes me sad
<FernandoBasso>
And somethings I use once while building something, and takes too long until I need it again, which makes me forget it.
<Mon_Ouie>
i.e. when you write class Person; @name = "John"; end, you are creating an instance variable for the class itself (which is just a special kind of Ruby object). Instances of that classes that will be created later will not have an instance variable called @name as a result of this.