apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
ikrima has joined #ruby-lang
csaunders has joined #ruby-lang
julweber has quit [Ping timeout: 240 seconds]
csaunders has quit [Client Quit]
ikrima has quit [Client Quit]
xxaM has joined #ruby-lang
saarinen has quit [Quit: saarinen]
nathanstitt has joined #ruby-lang
kek has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
IteratorP has quit [Ping timeout: 240 seconds]
Guest85414___ has quit [Ping timeout: 256 seconds]
kireevco_ has joined #ruby-lang
io_syl has joined #ruby-lang
kitak has joined #ruby-lang
kireevco has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby-lang
vxxr has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
symm- has quit [Ping timeout: 240 seconds]
a1ph4g33k has quit [Quit: Leaving]
tkuchiki has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
fijimunkii has joined #ruby-lang
tylersmith has quit [Ping timeout: 248 seconds]
richardburton has quit [Quit: Leaving.]
kurko_ has quit [Quit: Computer has gone to sleep.]
julweber has joined #ruby-lang
mistym has quit [Quit: Leaving]
hogeo has joined #ruby-lang
julweber has quit [Ping timeout: 245 seconds]
erik_ has quit [Read error: Operation timed out]
erik_ has joined #ruby-lang
<zenspider>
rawr! I just started dehydrating about 4lbs of hatch chile. om nom nom
cored has quit [Ping timeout: 240 seconds]
ikrima has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
hahuang61 has quit [Ping timeout: 245 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
tkuchiki has joined #ruby-lang
stamina has quit [Ping timeout: 245 seconds]
<banisterfiend>
zenspider just curious what happened with yozzy? (yorick)
dhruvasagar has joined #ruby-lang
<bougyman>
he was complaining about paris hotel prices earlier
<banisterfiend>
bougyman what the heck are you doing in ukraine?
<bougyman>
my fiancee is here.
<banisterfiend>
cool
* bougyman
prepares for obligatory mail-order-bride joke
<banisterfiend>
nah
<banisterfiend>
bougyman what's it like there? it looks pretty bleak from the pics i've seen (i have a friend from there)
<bougyman>
I'm in Odessa, it's not as bleak as I expected.
<bougyman>
the people have a hard life, tho
<banisterfiend>
lots of old soviet buildings
<bougyman>
wages are 1/10 of american wages, but prices are only about 70% of american prices.
<bougyman>
yeah, that's for sure.
<bougyman>
but odessa has a lot of new developments, too
<bougyman>
they're just too expensive for anyone from here to afford.
<banisterfiend>
bougyman i got those jokes when i had a filipina girlfriend too ;)
<banisterfiend>
didn't change things when i told them she was a lawyer..
<bougyman>
funnily enough, my fiancee runs one of those agencies.
<bougyman>
she's also an international translator and has a show import business in italy, tho
<bougyman>
she speaks like 9 lingos
<bougyman>
*shoe
<banisterfiend>
yeah, eastern european girls are smart
<bougyman>
not all
<bougyman>
i've met some of her girls.
<bougyman>
they're dumb as a box of rox
<banisterfiend>
how did u meet her if u don't mind me asking
<bougyman>
on vk.com
<bougyman>
my son got me on vk, he had friends in ukraine from his video game stuff
skade_ has quit [Quit: Computer has gone to sleep.]
<banisterfiend>
vk is russian Facebook, right?
<bougyman>
she liked country music, of all things.
<bougyman>
yeah.
<bougyman>
after a few months I came to visit for a few weeks.
<bougyman>
a month later we took a trip to torremolinos.
<banisterfiend>
what's her english like?
<bougyman>
that's where I proposed.
<bougyman>
it's perfect, she has a master's in English and German.
<banisterfiend>
impressive
<banisterfiend>
congrats
<banisterfiend>
:)
<bougyman>
her italian is pretty good, too, though she learned that on her own.
<bougyman>
no idea about her swedish, I don't speak it.
<bougyman>
her spanish sucks, i'm trying to teach her that :)
<bougyman>
but everyone here speaks russian and ukrainian natively
<banisterfiend>
do you speak it?
<banisterfiend>
(one of the two)
<bougyman>
russian yes, ukrainian no
<banisterfiend>
why/how did you learn russian?
<bougyman>
for her family/son and to get around here.
<bougyman>
I speak about as well as a 5 year old.
cored has quit [Ping timeout: 248 seconds]
Asher has quit [Quit: Leaving.]
<banisterfiend>
i've always found russian language attractive, dostoevsky is still brilliant in english translation
<banisterfiend>
can only imagine what he's like in russian
<bougyman>
I can read and write quite well.
<bougyman>
much better than I speak it.
<banisterfiend>
have you read 'notes from underground' by dost? :)
jonathanmarvens has joined #ruby-lang
<bougyman>
of course.
<bougyman>
I loved dost.
<bougyman>
I alwaays wanted to learn russian so I could read him native.
<banisterfiend>
did it negatively impact your life? :) i think 'notes from underground' has ruined many good men.. ;)
<bougyman>
also want to learn german so I can read nietzsche
<bougyman>
hah, nietzsche's ruined as many :)
<banisterfiend>
i'd want to read kafka in native german, too ;)
<banisterfiend>
haha, nietzsche, self-proclaimed first true artist of the german language (along with schiller)
nofxx has quit [Quit: Leaving.]
nofxx1 has joined #ruby-lang
<banisterfiend>
bougyman did you read "ecce homo" ? :)
vxxr has quit [Ping timeout: 248 seconds]
<bougyman>
he was a philologist by education, makes sense
<bougyman>
of course, I've read them all.
<bougyman>
even the travesty his sister published (will to power)
<bougyman>
he was only about 1/3 lucid writing ecce homo
<banisterfiend>
i loved his insanity the best "my genius is in my nostrils"
<bougyman>
they say he had to write with his eyes like 2 inches from the paper, scribbling madly.
<banisterfiend>
"the origin of the german spirit is disturbed intestines"
<bougyman>
by then he was mostly blind
<banisterfiend>
yeah
<banisterfiend>
i loved the crap he wrote about his moustache
<bougyman>
twilight of the idols, the antichrist, gay science, and genealogy of morality are more my faves.
ldnunes has quit [Quit: Leaving]
<bougyman>
I could do without Zarathustra
<bougyman>
too much bloat.
<banisterfiend>
he deconstructed himself too much until there was nothing left but a quivering shape in the corner of a room
<banisterfiend>
yeah, zarathustra was a bit epic 4 me
<banisterfiend>
but i guess that was what he was going for, a kind of religious text
<banisterfiend>
bougyman have you read unbearable lightness of being? (by milan kundera)
<bougyman>
yep
<banisterfiend>
i liked his analysis of eternal recurrence, i never understood it before
<bougyman>
indeed.
<bougyman>
though I read that enough with N to get the gist before
<bougyman>
he does do a great job explaining it clearer than nietzsches obfuscation
GeissT has joined #ruby-lang
<bougyman>
i always like how at the beginning of all of N's book he says something on the order of: This book probably isn't for you, and if it is, you're as crazy as me.
<banisterfiend>
he will have never have any readers ;)
jonog has joined #ruby-lang
<banisterfiend>
anyway nietzsche is something for your youth, i could never bring it into adulthood
<banisterfiend>
IME
brianpWins has quit [Quit: brianpWins]
mistym has joined #ruby-lang
grandy has joined #ruby-lang
<banisterfiend>
bougyman what i found kind of interesting, is the movement from eastern mysticism through schopenhaur into nietzsche. At this stage i find the eastern mystics (like buddha) more compelling
<bougyman>
he generally had disdain for nihilism
<bougyman>
it's strange that people who only glance nietzsche think he was a nihilist
<banisterfiend>
i don't think of buddhism as nihilism
<bougyman>
it's debatable
<bougyman>
plus there are many forms of buddhism
<banisterfiend>
i can see how at first blush buddhism appears to be nihilism but IMO it's simply about clarity, and seeing things clearly requires no preconceptions, a kind of stillness/emptiness
vlad_starkov has joined #ruby-lang
<banisterfiend>
*babble*
<bougyman>
I can't believe the mosquitos are still rampant here
<bougyman>
it's 4C for chrissakes.
<bougyman>
die already
chinno998 has joined #ruby-lang
chinno998 has left #ruby-lang [#ruby-lang]
<banisterfiend>
bougyman wait, isn't it like 5am for u?
<bougyman>
something like that
<bougyman>
insomniacal, woke up with a strange nightmare
<bougyman>
worked for a bit, now drinking some stella to try and sleep
<banisterfiend>
bougyman are you staying in one of those brutalist style apartment complexes?
<bougyman>
nah, I rented a beach house on the black sea
<bougyman>
$400 for the month :)
<banisterfiend>
nice
<bougyman>
shit's cheap here if it's not summer
<bougyman>
in summer this place would be $120/night
vlad_starkov has quit [Ping timeout: 245 seconds]
jonog has quit [Quit: Konversation terminated!]
jonog has joined #ruby-lang
IteratorP has joined #ruby-lang
vxxr has joined #ruby-lang
Bosox20051 has joined #ruby-lang
linc01n has quit [Remote host closed the connection]
Coincide_ has quit [Remote host closed the connection]
<yorickpeterse>
accidently left a tmux running on $PROD for a month
<yorickpeterse>
woops
x0f has quit [Ping timeout: 240 seconds]
x0f has joined #ruby-lang
mucker has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
x0f has quit [Ping timeout: 252 seconds]
x0f has joined #ruby-lang
knu has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
vlad_starkov has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
malusalexandru has joined #ruby-lang
breakingthings has joined #ruby-lang
schaerli has joined #ruby-lang
yfeldblum has quit [Ping timeout: 248 seconds]
bastilian has quit [Quit: Leaving...]
fijimunkii has joined #ruby-lang
jxpx777 has joined #ruby-lang
jxpx777_ has joined #ruby-lang
TCMSLP has joined #ruby-lang
DEac- has joined #ruby-lang
DEac-_ has quit [Read error: Connection reset by peer]
jxpx777 has quit [Ping timeout: 240 seconds]
<maloik>
sigh, people ordering tickets a day before a conference and requiring to pay via bank transfer and to receive a formal invoice
<ljarvis>
:D
<maloik>
gp home you're drunk, it's 2013 so get a visa :(
lfox has joined #ruby-lang
pothibo has joined #ruby-lang
bastilian has joined #ruby-lang
cored has quit [Ping timeout: 246 seconds]
<malusalexandru>
Hi. If I have a select tag in my .erb file and pass the form results to a Controller, how can I handle the option selected? params[:x], where x is the name of the select_tag ?
cored has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
wallerdev has joined #ruby-lang
alexju has joined #ruby-lang
Kabaka has quit [Ping timeout: 240 seconds]
nathanstitt has joined #ruby-lang
yfeldblum has joined #ruby-lang
badeball has quit [Ping timeout: 256 seconds]
badeball has joined #ruby-lang
alexju has quit [Read error: Connection reset by peer]
alexju has joined #ruby-lang
soba has quit [Ping timeout: 240 seconds]
<ljarvis>
malusalexandru: did you try it?
<ljarvis>
uh cross posting
ssb123 has joined #ruby-lang
<malusalexandru>
yup
<malusalexandru>
in my controller I have a simple if params[:x] == 1) do something
<malusalexandru>
made a condition: || defined? params[:employee_table_id] == nil
<malusalexandru>
and it returns true
<malusalexandru>
shouldn't do that as the action for the form is the controller itself, so that param should be passed and saved
scampbell has joined #ruby-lang
<malusalexandru>
x is employee_table_id for that example
mindriot101 has quit [Remote host closed the connection]
rickhull2 has quit [*.net *.split]
nhmood has quit [*.net *.split]
JoL1hAHN has quit [*.net *.split]
jinie has quit [*.net *.split]
rtlong has quit [*.net *.split]
hagabaka has quit [*.net *.split]
canton7 has quit [*.net *.split]
shtirlic_ has quit [*.net *.split]
djinni` has quit [*.net *.split]
go|dfish has quit [*.net *.split]
andrewvos has quit [*.net *.split]
lupine has quit [*.net *.split]
Joni_79 has quit [*.net *.split]
crazysim has quit [*.net *.split]
lunarjar has quit [*.net *.split]
DarkBushido has quit [*.net *.split]
MartynKeigher has quit [*.net *.split]
dvorak has quit [*.net *.split]
znz_jp has quit [*.net *.split]
justinmcp has quit [*.net *.split]
cschneid has quit [*.net *.split]
segy has quit [*.net *.split]
_whitelogger___ has quit [*.net *.split]
lele has quit [*.net *.split]
duckinator has quit [*.net *.split]
Paradox has quit [*.net *.split]
tommylommykins has quit [*.net *.split]
redgetan has quit [*.net *.split]
buranshe has quit [*.net *.split]
fallenhi1okiri has quit [*.net *.split]
[dmp] has quit [*.net *.split]
FastJack has quit [*.net *.split]
naquad has quit [*.net *.split]
heath has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
bmaland has quit [*.net *.split]
drakkhen_ has quit [*.net *.split]
Mellett68 has quit [*.net *.split]
lupine_85 is now known as lupine
amateurhuman_ has quit [*.net *.split]
segy_ is now known as segy
jinie has joined #ruby-lang
lunarjar has joined #ruby-lang
Marco__ has quit [Quit: Connection closed for inactivity]
DarkBushido has joined #ruby-lang
naquad has joined #ruby-lang
cschneid has joined #ruby-lang
arBmind has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
amateurhuman has joined #ruby-lang
duckinator has joined #ruby-lang
vlad_starkov has joined #ruby-lang
relix has joined #ruby-lang
kek has joined #ruby-lang
retro|cz has quit [Ping timeout: 264 seconds]
kgrz has joined #ruby-lang
micalexander has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
richardburton has joined #ruby-lang
kek has quit [Ping timeout: 245 seconds]
<micalexander>
I have a hidden file with variables being declared on it. I would like to have ruby read in those variables and make them available to me with out having to change the file extension to .rb. Any ideas?
jonahR has left #ruby-lang [#ruby-lang]
<toretore>
load('filename')
<micalexander>
toretore: can I do that with in a class method?
vlad_starkov has quit [Remote host closed the connection]
<toretore>
yes. but i'm not sure what scope it will be run in
mmorga has joined #ruby-lang
<micalexander>
ok
<micalexander>
thanx
kgrz has quit [Ping timeout: 240 seconds]
<heftig>
might want to do eval(File.read("filename")) instead
<heftig>
otherwise the local variables might not stick
<toretore>
"In no circumstance will any local variables in the loaded file be propagated to the loading environment."
<toretore>
i was wrong about that
<toretore>
kind of just assumed that's how it works
tommylom1ykins has quit [Quit: leaving]
tommylommykins has joined #ruby-lang
deception has joined #ruby-lang
richardburton has quit [Ping timeout: 245 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby-lang
kurko_ has quit [Ping timeout: 264 seconds]
solars has joined #ruby-lang
<waxjar>
micalexander, you might want to use environment variables in stead
v is now known as agile
<micalexander>
waxjar can you clarify
kurko_ has joined #ruby-lang
<waxjar>
well, it sounds a bit like you've got a configuration file. environment variables are great for configuration
hhatch has quit [Ping timeout: 260 seconds]
<micalexander>
are you referring to like the $PATH variables etc?
<micalexander>
$HOME etc
<waxjar>
yea
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonathanmarvens has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
<micalexander>
I guess im not understanding cause I just want this file to be accessible to the program. These variables wold be changed from time to time. Not really sure how setting them as environment variables would help me. Would you like to explan?
Joni_79 has joined #ruby-lang
<waxjar>
it's clean and easy. getting local variables from another file seems like a weird thing to me.
solars has quit [Ping timeout: 240 seconds]
[dmp] has joined #ruby-lang
[dmp] has quit [Changing host]
[dmp] has joined #ruby-lang
<waxjar>
if you are using it to configure, have a look at dotenv. it's a great way to read and set env vars from a file
go|dfish has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<micalexander>
thanks, checking it out now
naktinis has quit []
havenwood has joined #ruby-lang
<micalexander>
figured this is the same thing that sass does when it store dir variables in the config.rb right? These are local variable right?
havenwood has quit [Ping timeout: 248 seconds]
kgrz has joined #ruby-lang
nofxx has quit [Ping timeout: 252 seconds]
<micalexander>
waxjar: ok this seems like it is specific to building webapps, is this a correct assumption?
<waxjar>
nope
diegoviola has quit [Ping timeout: 248 seconds]
relix has joined #ruby-lang
bantic has joined #ruby-lang
<waxjar>
it can be used for any kind of script
<micalexander>
ok
andrewvos has joined #ruby-lang
<andrewvos>
.
vlad_starkov has joined #ruby-lang
kgrz has quit [Ping timeout: 240 seconds]
seanlerner has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
schaerli has quit [Remote host closed the connection]
nofxx has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
mucker has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
mucker has joined #ruby-lang
metus_violarium has quit [Quit: Konversation terminated!]
<micalexander>
waxjar: ok let me give you some background to make sure we are booth on the same page. Typically I would store a hidden file in the $HOME director, read from and reload this file when necessary. When a command was run to execute my app/script it would source the file making these variables accessible. I have decided to rewrite this bash script/app in ruby cause I love the oop nature of it. So my question is knowing a little bit
<micalexander>
more about what I am trying to accomplish, do you still think environment variables are the best way to go about this?
<yorickpeterse>
well fuck
<yorickpeterse>
I just ran rm -rf ~/.rubies
<yorickpeterse>
there goes my evening
mouse_ has joined #ruby-lang
<micalexander>
well, dang
<yorickpeterse>
pfew, only jruby/rbx-git affected
<yorickpeterse>
quick enough to hit ^C
<brixen>
hah
<micalexander>
haaha
<micalexander>
nice!
<yorickpeterse>
good thing I was going to re-install rbx-git anyway
<yorickpeterse>
(I was supposed to run `rm -rf ~/.rubies/rbx-git`
<andrewvos>
yorickpeterse: Dude I had slow golang builds for like a week. Turns out my cpu frequency was just set to minimum on my macbook :(
<andrewvos>
I tried everything. Even profiling the build.
<yorickpeterse>
andrewvos: heh, that's cpufreq for ya
mmorga has quit [Read error: Connection reset by peer]
mouse__ has quit [Ping timeout: 248 seconds]
<yorickpeterse>
set it to conservative/powersave
mmorga has joined #ruby-lang
<andrewvos>
I had it on "on demand"
<yorickpeterse>
heh
<andrewvos>
yorickpeterse: Seen any good movies lately?
havenwood has joined #ruby-lang
<yorickpeterse>
No, though I'm thinking of watching Thermae Romae again
Uranio has quit [Quit: while you reading this, a kitty dies]
<yorickpeterse>
because it makes total sense to invest time in shutting down a website
<yorickpeterse>
"Hundreds of thousands of Federal employees including many charged with protecting us from terrorist threats, defending our borders, inspecting our food, and keeping our skies safe will work without pay until the shutdown ends."
<yorickpeterse>
Imagine the sudden rise of terro...oh wait the gov is already doing that
<apeiros_>
yorickpeterse: it makes sense. pressure.
<yorickpeterse>
well yeah, if it's a way to strike then sure
<yorickpeterse>
but it feels a bit like christian related websites shutting down on Sunday
scampbell has quit [Remote host closed the connection]
<apeiros_>
I find the USA hilarious by now
apeiros_ is now known as apeiros
<apeiros>
go away, tail!
Johz has joined #ruby-lang
havenwood has joined #ruby-lang
havenn has joined #ruby-lang
nofxx has quit [Ping timeout: 246 seconds]
havenwood has quit [Read error: Connection reset by peer]
<andrewvos>
yorickpeterse: Apparently nasa will miss their mars launch window now
ldnunes has quit [Quit: Leaving]
<andrewvos>
According to some random dude on the internet
<yorickpeterse>
heh
<andrewvos>
And now according to another random dude on the internet
nofxx has joined #ruby-lang
havenn has quit [Ping timeout: 240 seconds]
<chris2>
at least time.gov ntp servers are up
<yorickpeterse>
So....the US is basically like Belgium now?
malev has quit [Ping timeout: 240 seconds]
<imperator>
no
mannyt has joined #ruby-lang
JoL1hAHN has joined #ruby-lang
<imperator>
we've had shutdowns before; 17 times i think
FastJack_ has joined #ruby-lang
NemesisD_ has quit [Quit: WeeChat 0.4.1]
NemesisD has joined #ruby-lang
<NemesisD>
is it possible to rebind a block's context with instance_eval *and* pass an argument to the block
<apeiros>
NemesisD: instance_exec
s0ber_ has joined #ruby-lang
<apeiros>
or: no, it isn't :-p
alekst has quit [Quit: Computer has gone to sleep.]
<NemesisD>
i'm considering dynamically defining methods instead of doing this. lots of my search results come up with refinements
breakingthings has quit []
s0ber has quit [Ping timeout: 248 seconds]
loincloth has quit [Remote host closed the connection]
s0ber_ is now known as s0ber
enebo has joined #ruby-lang
<NemesisD>
apeiros: oh wait, instance_exec did it!
<NemesisD>
WITCHCRAFT SAVES THE DAY AGAIN! *rides off cackling*
dhruvasagar has quit [Read error: Connection reset by peer]
flip_digits has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
dsferreira has quit [Quit: This computer has gone to sleep]
micalexander has joined #ruby-lang
musl has joined #ruby-lang
ikrima has joined #ruby-lang
mbj has quit [Ping timeout: 260 seconds]
headius has quit [Quit: headius]
kurko_ has quit [Quit: Computer has gone to sleep.]
saarinen has joined #ruby-lang
flip_digits has joined #ruby-lang
workmad3 has joined #ruby-lang
musl has quit [Quit: WeeChat 0.4.1]
ldnunes has joined #ruby-lang
musl has joined #ruby-lang
ingof has quit [Ping timeout: 252 seconds]
iliketurtles has quit [Quit: zzzzz…..]
flip_digits has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
tonni has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
ndrst has quit [Ping timeout: 268 seconds]
serroft has quit [Quit: Leaving.]
iliketurtles has joined #ruby-lang
havenwood has joined #ruby-lang
kingman has joined #ruby-lang
tubbo has quit [Ping timeout: 248 seconds]
richardburton has joined #ruby-lang
richardburton has quit [Client Quit]
enebo has quit [Quit: enebo]
deception has quit [Ping timeout: 245 seconds]
musl has quit [Quit: WeeChat 0.4.1]
kurko_ has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
flip_digits has joined #ruby-lang
musl has joined #ruby-lang
musl has quit [Client Quit]
mucker has quit [Remote host closed the connection]
bantic has quit [Quit: bantic]
apeiros has quit [Ping timeout: 240 seconds]
woollyams has joined #ruby-lang
flip_digits has quit [Ping timeout: 240 seconds]
cads has quit [Read error: Operation timed out]
musl has joined #ruby-lang
benlovell has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
benlovell has quit [Ping timeout: 240 seconds]
musl has quit [Quit: WeeChat 0.4.1]
musl has joined #ruby-lang
musl has quit [Client Quit]
musl has joined #ruby-lang
musl has quit [Client Quit]
nathanstitt has quit [Quit: I growing sleepy]
znz_jp has joined #ruby-lang
nathanstitt has joined #ruby-lang
musl has joined #ruby-lang
musl has quit [Client Quit]
nathanstitt has quit [Client Quit]
musl has joined #ruby-lang
<zenspider>
yorickpeterse & others: please stick to ruby
JoshuaPaling has joined #ruby-lang
bastilian has quit [Read error: Connection reset by peer]
bastilian has joined #ruby-lang
mdedetrich has joined #ruby-lang
flip_digits has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
bastilian_ has joined #ruby-lang
flip_digits has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby-lang
<micalexander>
I have a hidden file that has some variables in it. when I try to puts the variables I get "undefined local variable error".
<micalexander>
Anybody know away that I can accomplish this
<mistym>
micalexander: Can you provide an example / some more detail?
bastilian has quit [Ping timeout: 246 seconds]
hahuang61 has quit [Read error: Connection reset by peer]
<micalexander>
mistym: in the file that I am calling from the command line, I have load 'filename' and puts variable that is located in the file that I am loading
grough has quit [Quit: Computer has gone to sleep.]
<micalexander>
when I run that file from the command line, I get a undefined variable error
<micalexander>
mistym: does that make sense?
<mistym>
micalexander: Yes, makes sense.
jonog has joined #ruby-lang
<micalexander>
mistym: what am I missing, I imagine that this should be possible
<mistym>
micalexander: You may have been declaring them as local variables, which would be out of scope for your main script. If you are only setting these variables once, and won't be changing their values when the program is running, consider setting them as constants. Constants are variables whose names start with capital letters, for example `FOO = 'bar'`
x0f_ has joined #ruby-lang
<micalexander>
mistym: these variables will be changed based on the users input. the script will gsub the variables. Do you still think this calls for constance variables?
elia has joined #ruby-lang
<mistym>
micalexander: What about storing data in a structured format like JSON or YAML in your file, then parsing that into a local variable in your main script?
hahuang61 has joined #ruby-lang
x0f has quit [Ping timeout: 248 seconds]
<micalexander>
mistym: I considered that. I was trying to mimic programs like git and such that store hidden files in the $HOME directory without any file extensions. As far as I understand, this is not possible with yaml. Is that correct?
ndrst has joined #ruby-lang
julweber has quit [Remote host closed the connection]
<workmad3>
micalexander: you want a dot config file?
<micalexander>
yes
<workmad3>
micalexander: well go for it :) they can contain anything
<workmad3>
micalexander: it's up to the program using it to load and interpret it appropriately (it could be yaml, json, whatever... could be a dsl... could be pure ruby)
<micalexander>
mistym: so what are the benefits of using yaml vs the way that Im doing it (with straight variables)?
<workmad3>
micalexander: well, for starters, yaml has a chance of worknig
<workmad3>
*working
<mistym>
micalexander: Well, you've run into one of the problems with straight variables already ;) Using local variables won't work, and using global variables would pollute your program's global namespace unnecessarily.
<workmad3>
micalexander: while declaring local variables in one file and trying to use them in another just won't
mannyt has quit [Ping timeout: 245 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
<micalexander>
workmad3: gotcha, so I guess I can say thats one thing I like about bash over ruby (trust me there are not many) :)
elia has quit [Quit: (IRC Client: textualapp.com)]
<workmad3>
micalexander: I bet if you declared a local var in bash in one script and tried to use it in another, you'd have the same issue ;)
tubbo has joined #ruby-lang
<workmad3>
micalexander: it's just that bash vars default to global, not local
<micalexander>
workmad3: actually I'm rewriting a bash script in ruby now and I haven't had a single prob. Just new to ruby.
<workmad3>
micalexander: well, just keep in mind that 'foo = "bar" ' in ruby is the equivalent of 'local foo=bar' in bash ;)
<workmad3>
(ish)
nathanstitt has joined #ruby-lang
<micalexander>
workmad3: nice! thx
elia has joined #ruby-lang
tubbo has quit [Ping timeout: 248 seconds]
flip_digits has joined #ruby-lang
julweber has joined #ruby-lang
benanne has quit [Quit: kbai]
flip_digits has quit [Ping timeout: 245 seconds]
VTLob has quit [Quit: VTLob]
vlad_starkov has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
jaimef has quit [Excess Flood]
CoreData has quit [Ping timeout: 256 seconds]
apeiros has joined #ruby-lang
CoreData has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]