<graft>
i.e., your regex is /fo(o|e)/, and your string is "foo", so the matchdata will be "foo"
<Thanatermesis>
yeah, this is what it looks to do after to have played with print messages
<graft>
then when you go back to lookup the matched string in your hash, it doesn't exist, because the hash key is actually "fo(o|e)"
caveat- has quit [Ping timeout: 260 seconds]
<Thanatermesis>
that is
fold has joined #ruby
<eam>
Deele: what will you be doing each loop iter?
mikeric has quit []
pigram86 has joined #ruby
terrell_t has joined #ruby
<graft>
you can try something like: @keywords.each do |k,v| Regexp.new(k).match(m.message) do |r| m.reply v; end; end
<shevy>
Deele just use C man
aspiers has joined #ruby
<eam>
shevy: why do you hate on ruby
<shevy>
I love ruby
<shevy>
but he wants speed
<eam>
ruby can be kinda fast
<Deele>
shevy, I just did a quick search in google, and it says c++ is fastest
<graft>
yeah, if you write a C module, ruby is fast
<shevy>
perl is faster than ruby eam
<eam>
graft: still pretty slow serializing and deserializing objects
shevy has quit [Read error: Connection reset by peer]
<waxjar>
Deele: maybe python would work, they have fast statistics libraries
shevy has joined #ruby
<shevy>
damn it
<eam>
shevy: of course perl is faster and better
<shevy>
peer kicked me
<eam>
doesn't mean you have to hate on ruby though
bmurt has joined #ruby
<shevy>
perl is line noise turned into code
<graft>
perl is faster, it's not better
<shevy>
but the future is almost ready
<shevy>
perl SIX
<shevy>
yeah, that is annoying that perl is faster
<eam>
a lot faster
andrewjanssen has quit [Quit: Leaving...]
mary5030 has joined #ruby
<eam>
(to develop in)
rezzack1 has joined #ruby
<Thanatermesis>
graft, thanks, this seems to work :), btw do you see any reason that i should keep something from the old code ? (its a cinch-bot plugin to answer from keywords, but it not worked as how i wanted)
lw has joined #ruby
terrellt has quit [Ping timeout: 255 seconds]
<Thanatermesis>
i mean, any reason to have all those other calls ?
sepp2k has quit [Ping timeout: 255 seconds]
<graft>
Thanatermesis: i have no idea why you had that sort step in there, but that might be useful to you, maybe
ndrei has quit [Remote host closed the connection]
bthesorceror has quit [Quit: bthesorceror]
awc737 has joined #ruby
<awc737>
!ping
<Thanatermesis>
awc737, pong
<awc737>
thanks
mary5030 has quit [Ping timeout: 240 seconds]
descala has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
hooper has quit [Ping timeout: 264 seconds]
lw has quit [Client Quit]
x1337807x has joined #ruby
fabrice31 has joined #ruby
mrsolo_ has quit [Quit: Leaving]
moritzschaefer has quit [Ping timeout: 240 seconds]
nectarys has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
pigram86 has quit [Remote host closed the connection]
jkline has quit [Quit: jkline]
nectarys_ has joined #ruby
nectarys_ has quit [Client Quit]
philcrissman has quit [Ping timeout: 250 seconds]
pigram86 has joined #ruby
emmesswhy has joined #ruby
snath has quit [Ping timeout: 264 seconds]
jkline has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
rjhunter has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 260 seconds]
pigram86 has quit [Ping timeout: 245 seconds]
Takle has quit [Remote host closed the connection]
<Thanatermesis>
i have recently learned ruby from a book, and i found it a very nice language (except for the hard to type #{combos} & others), but now that im playing a bit with it looks like it is so big that i feel entirely lost, how do you guys deal with it?
advorak has quit [Quit: Ex-Chat]
djcp has quit [Quit: WeeChat 0.4.3]
<mozzarella>
what do you mean so big?
snath has joined #ruby
jkline has quit [Ping timeout: 264 seconds]
patric100e99 has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
alexju has quit [Remote host closed the connection]
caveat- has joined #ruby
sparrovv has joined #ruby
oo_ has joined #ruby
Wolland_ has joined #ruby
rjhunter has joined #ruby
<Thanatermesis>
i mean, there's a ton of different things and different ways to do things, a ton of standard libs with full of options too
<eam>
Thanatermesis: read the docs constantly. break big things up into small things
<waxjar>
you don't learn them by heart, you learn to read the documentation quickly
<eam>
in some languages you do learn the interface by heart, but ruby isn't one of those languages
ffranz has quit [Quit: Leaving]
<Thanatermesis>
i assume that my biggest problem then is my lack of time to play with it
Wolland has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
britneywright has joined #ruby
patric100e99 has quit [Ping timeout: 255 seconds]
sparrovv has quit [Ping timeout: 260 seconds]
bthesorceror has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kies has joined #ruby
AlexRussia has joined #ruby
mmus has quit [Ping timeout: 264 seconds]
bricker`work has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
jailbot has joined #ruby
saarinen has quit [Quit: saarinen]
jailbot has left #ruby ["keep cool, stay in school"]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
rubytor has joined #ruby
lw has joined #ruby
PanPan has joined #ruby
caveat- has quit [Ping timeout: 240 seconds]
dorei has quit []
skolman_ has quit [Remote host closed the connection]
lw has quit [Client Quit]
duggiefresh has joined #ruby
jfutbol has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
caveat- has joined #ruby
oo_ has quit [Remote host closed the connection]
echooo has joined #ruby
goleldar has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
jfutbol has quit [Ping timeout: 255 seconds]
maniacal_ has quit [Remote host closed the connection]
testcore has quit [Quit: Grab life by the BitchX]
oo_ has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
rubytor has joined #ruby
mmus has joined #ruby
Sgeo has joined #ruby
RandyT has quit [Ping timeout: 272 seconds]
aspires has quit []
mikeg has joined #ruby
RandyT has joined #ruby
rubytor has quit [Ping timeout: 240 seconds]
axsuul has quit [Ping timeout: 260 seconds]
Guest84585 has quit [Ping timeout: 245 seconds]
RealMarc has joined #ruby
nectarys has quit [Remote host closed the connection]
sevenseacat has joined #ruby
sylvanica has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pietr0 has joined #ruby
jshultz has quit [Quit: Connection closed for inactivity]
nectarys has joined #ruby
emocakes__ has joined #ruby
caveat- has quit [Ping timeout: 250 seconds]
agrinb has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
rikai has joined #ruby
tkuchiki has joined #ruby
emmesswhy has joined #ruby
emocakes has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
omosoj has quit [Quit: Leaving]
pietr0 has quit [Quit: pietr0]
x1337807x has quit [Client Quit]
charliesome has joined #ruby
Takle has quit [Remote host closed the connection]
dblessing has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rmillerx has joined #ruby
yetanotherdave has quit [Ping timeout: 240 seconds]
Azzurrio has joined #ruby
cndiv has joined #ruby
brothmars has quit [Ping timeout: 250 seconds]
cndiv has quit [Client Quit]
emmesswhy has quit [Ping timeout: 245 seconds]
brothmars has joined #ruby
cndiv has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
emmesswhy has joined #ruby
caveat- has joined #ruby
djbkd has quit [Quit: My people need me...]
ctp has joined #ruby
tlarevo has joined #ruby
crus has joined #ruby
nectarys has quit [Quit: Ex-Chat]
bearish has joined #ruby
skolman_ has joined #ruby
echevemaster has joined #ruby
manolo_ has quit [Ping timeout: 272 seconds]
nectarys has joined #ruby
phutchin1 has quit [Ping timeout: 255 seconds]
bearish has quit [Ping timeout: 245 seconds]
bmurt has quit []
caveat- has quit [Ping timeout: 240 seconds]
nifty has joined #ruby
echevemaster has quit [Ping timeout: 240 seconds]
Cort3z has joined #ruby
<benzrf>
ruby is a terribly complicated language
<benzrf>
im sorry
<benzrf>
this is not wher eto come for simple languages
philcrissman has joined #ruby
gsd has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bthesorceror has quit [Quit: bthesorceror]
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
skolman_ has quit [Remote host closed the connection]
Cort3z has quit [Ping timeout: 264 seconds]
_lexjm has joined #ruby
bthesorceror has joined #ruby
philcrissman has quit [Ping timeout: 255 seconds]
davedev24_ has quit [Client Quit]
lmickh has joined #ruby
mikeg has quit [Remote host closed the connection]
geggam has quit [Remote host closed the connection]
d4nk has quit []
tokik has joined #ruby
skolman has quit [Ping timeout: 255 seconds]
optiz0r has quit [Ping timeout: 240 seconds]
wald0_ has joined #ruby
wald0_ has quit [Client Quit]
britneywright has joined #ruby
axsuul has joined #ruby
Cheezebox has joined #ruby
awc737 has joined #ruby
Lewoco has joined #ruby
Avahey_ has joined #ruby
caveat- has quit [Ping timeout: 240 seconds]
<Lewoco>
With pry how do I change into the parent scope?
Takle has quit [Ping timeout: 240 seconds]
jhass is now known as jhass|off
dblessing has quit [Quit: dblessing]
spyderman4g63 has joined #ruby
<Lewoco>
I can change into and out of objects with 'cd' but trying to go to the parent scope (as per pry-backtrace) using 'cd ..' just doesn't seem to do anything...?
bklane has quit [Quit: Leaving...]
mikepack has joined #ruby
volk_ has joined #ruby
<volk_>
has anybody ever had any problems with heroku not running any of the rails validations
niklasb has quit [Ping timeout: 245 seconds]
<sevenseacat>
volk_: you still havent provided enough information to debug the problem.
<sevenseacat>
and cross-posting is frowned upon.
sleepee has joined #ruby
caveat- has joined #ruby
<volk_>
i posted everywhere and im kind of desperate so thats why im posting here
<volk_>
the problem is in my development environment, my rails validations work just fine. however when i push them up to heroku, none of the work . i can just do User.create and it will persist a user with all nil values.
<volk_>
no idea what in the shit is going on
oo_ has joined #ruby
<sevenseacat>
did you push the code with your validations in it?
moted has quit []
<volk_>
yes i did
<volk_>
i even destroyed the heroku app and made a new and re-pushed
<volk_>
this makes 0 sense unless im doing something wrong in my production environment file
<wallerdev>
try pushing a different change to your site unrelated to validations
<wallerdev>
and seeing if that shows up
<wallerdev>
nothing special about validations vs any other type of code, unless your validations arent doing the work and its your db thats erroring
<sevenseacat>
you probably havent commited the code with your changes, or you're pushing a different branch than the one you commited them to
bthesorceror has quit [Quit: bthesorceror]
saarinen has joined #ruby
joway has joined #ruby
volk__ has joined #ruby
joway has left #ruby [#ruby]
volk_ has quit [Ping timeout: 272 seconds]
volk__ is now known as volk_
lw has quit [Quit: s]
joway has joined #ruby
joway has left #ruby [#ruby]
<Thanatermesis>
i have a piece of code that requires a password, so i have set it in an external ruby file, but how i "include" (get?) the file contents in a specific place of my ruby code?
bthesorceror has joined #ruby
wallerdev has quit [Quit: wallerdev]
<Nowaker>
Thanatermesis: can you explain more?
<hakunin>
grr, never can quite get the Process.spawn call right. Could someone tell me what's wring with this? Process.spawn(env, words, out: wout, err: werr) ? env is a hash with {'foo' => 'bar'} and words is a array of command parts, wout and werr are pipe ends
<Nowaker>
password in an external ruby file? i don't quite understand
<hakunin>
error i'm getting is: "wrong first argument"
<Nowaker>
Thanatermesis: oh, you want a variable that is defined in a separate ruby file?
spyderman4g63 has quit [Ping timeout: 240 seconds]
nectarys has quit [Read error: Connection reset by peer]
<Nowaker>
$var = 'value'
<Nowaker>
then you can reference $var from any place
<Nowaker>
however, you should go for yaml file, not a ruby file with global var definition I believe
starless has joined #ruby
hooper has joined #ruby
Fezzler has joined #ruby
hamakn has joined #ruby
<hakunin>
I also tried Process.spawn(env, *words, out: wout, err:werr), and Process.spawn(env, words.join(' '), out: wout, err: werr), in the last case i get "no implicit conversion of hash into string"
<Thanatermesis>
mmh, ok let me see
optiz0r has joined #ruby
<hakunin>
in both of these actually
AlexRussia has quit [Ping timeout: 272 seconds]
echevemaster has joined #ruby
<Nowaker>
gotta have some sleep, bye
fabrice31 has joined #ruby
<hakunin>
i think i see what i'm doing wrong, and it's not in here…
<havenwood>
Thanatermesis: Maybe consider using an environment variable?
pigram86 has joined #ruby
benlieb has joined #ruby
sinkensabe has joined #ruby
<havenwood>
Thanatermesis: If you want to write a small String to a File, File.write and File.read.
dseitz has joined #ruby
meowington has joined #ruby
<havenwood>
Thanatermesis: For more complicated stuff you can always serialize with YAML, JSON, Marshal, or the like. Or there's YAML::Store for YAML or PStore for Marshal if you want to transactionally serialize and store to disk.
DEA7TH has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<havenwood>
Thanatermesis: Though I'd suggest keeping it as simple as possible. ;)
fabrice31 has quit [Ping timeout: 260 seconds]
<havenwood>
Thanatermesis: Maybe an env var will suffice?: ENV['YOUR_APP_PASSWORD']
pigram86 has quit [Ping timeout: 255 seconds]
hooper has quit [Quit: Leaving.]
<Thanatermesis>
i think that i have done it in yaml :)
sinkensabe has quit [Ping timeout: 240 seconds]
<meowington>
yo so if Im a complete greenhorn where do I got to learn Ruby... for free?
<meowington>
like "Ruby for Greenhorns without any cash"
<sevenseacat>
really dislike that 'i only want it if its free' mentality
lazyguru has joined #ruby
<benlieb>
I've just made a nested extended class (which works) but now there is a name conflict when I try to access my model of the same name (Lesson) app/models/lesson.rb LoadError: Expected ..../lib/resource/lesson.rb to define Lesson
<havenwood>
benlieb: i think you're inheriting from Resource::Resource::Base
BombStrike is now known as bomb
AlexRussia has joined #ruby
wallerdev has joined #ruby
pigram86 has joined #ruby
deric_skibotn has quit [Ping timeout: 240 seconds]
rmillerx has quit [Quit: rmillerx]
volk_ has quit [Ping timeout: 240 seconds]
pigram86 has quit [Remote host closed the connection]
pigram86_ has joined #ruby
volk_ has joined #ruby
bomb is now known as BombStrike
<benlieb>
havenwood: so I should remove the Resource from < Resource::Base?
mikepack has quit [Remote host closed the connection]
meowington is now known as longneckbeard
voodoofish has quit [Read error: Connection reset by peer]
<benlieb>
that doesn't seem to help
voodoofish has joined #ruby
<havenwood>
benlieb: i was thinking: Lesson < Base
<havenwood>
benlieb: but not sure i'm thinking straight, got too multitasked, sec
<benlieb>
havenwood: right, I tried that and no dice
voodoofish has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
_lexjm has quit [Ping timeout: 255 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<havenwood>
benlieb: to be sure, maybe try: ::Resource::Base
nobitanobi has quit [Remote host closed the connection]
siwica has joined #ruby
<benlieb>
nope
<siwica>
what is the rails irc channel?
<benlieb>
I think the problem may be in my file name: lib/resource/lesson.rb
skolma___ has quit [Remote host closed the connection]
voodoofish has joined #ruby
Lewoco has quit [Read error: Connection reset by peer]
<sevenseacat>
siwica: #rubyonrails
shevy has quit [Read error: Connection reset by peer]
<benlieb>
should that be different
<siwica>
thx
<havenwood>
benlieb: require_relative or setup $LOAD_PATH for require to work
<havenwood>
benlieb: you didn't show the require in the code example
<benlieb>
havenwood: the files are getting required
<havenwood>
ah
<benlieb>
havenwood: it's a rails app, and it's configured to load lib/**
<havenwood>
benlieb: i don't see an issue, how're you testing it?
<havenwood>
benlieb: maybe it's your test that is failing :P
<havenwood>
benlieb: maybe try #rubyonrails
<benlieb>
havenwood: hm, I tried ruby, because i thought it would be a ruby thing, but maybe rails would be better.
sparrovv has joined #ruby
Zenigor has quit [Remote host closed the connection]
patric100e99 has joined #ruby
<havenwood>
benlieb: Trying a quick example derived from your gist, everything works fine in Pry.
emmesswhy has quit [Read error: Connection reset by peer]
rmillerx has joined #ruby
sea_local has quit [Remote host closed the connection]
tectonic has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sea_local has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fezzler has quit [Quit: Leaving]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
balazs has joined #ruby
davedev24_ has joined #ruby
saarinen has quit [Quit: saarinen]
sparrovv has quit [Ping timeout: 245 seconds]
rmillerx has quit [Client Quit]
patric100e99 has quit [Ping timeout: 240 seconds]
saarinen has joined #ruby
jack_rabbit has joined #ruby
mikesplain has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sea_local has quit [Ping timeout: 260 seconds]
tlarevo_ has joined #ruby
<zenspider>
benlieb: are you defining your own Resource::Base?
<benlieb>
zenspider: yes, that's the first file
<zenspider>
can you not call it base?
voodoofish has quit [Quit: Leaving.]
gsd has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
tlarevo has quit [Ping timeout: 240 seconds]
<zenspider>
put `p defined? Resource::Base` above lesson
voodoofish has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
michaeldeol has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
hooper has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
emmesswhy has joined #ruby
pu22l3r has quit [Ping timeout: 272 seconds]
shevy has joined #ruby
pu22l3r has joined #ruby
pizzahead has joined #ruby
emmesswhy has quit [Client Quit]
asteve has joined #ruby
<pizzahead>
I'm really confused. I thought I could set a variable , manipulate it in a function or iteration and then use that manipulated value outside of the block.
<zenspider>
pizzahead: you're using a lot of terms there
longneckbeard has left #ruby [#ruby]
<zenspider>
what block?
bmurt has joined #ruby
zorak8 has quit [Ping timeout: 260 seconds]
GriffinHeart has joined #ruby
tlarevo has joined #ruby
balazs has quit [Ping timeout: 255 seconds]
tlarevo_ has quit [Ping timeout: 246 seconds]
davispuh has quit [Ping timeout: 245 seconds]
passcod has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
sometimes I just love helping people in IRC...
<zenspider>
then there's ppl like pizzahead.
bjz has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sevenseacat>
zenspider: theres a lot of those kind of people.
kriskropd has joined #ruby
<volk_>
wallerdev: wanna know what the issue was?
<sevenseacat>
luckily, there are some good ones who aren't actively avoiding the help they seek, too.
<volk_>
for the “validations” not working
<wallerdev>
oh
<wallerdev>
feel free to share
<wallerdev>
im home now though sooo not even paying attention to irc lol
<volk_>
im an idiot and didnt create the unique indices in mongoid … so nothing was being thrown as im not using legitimate validations
<volk_>
in mongo*
<wallerdev>
ahh
<sevenseacat>
what
klmlfl has quit [Remote host closed the connection]
<wallerdev>
mongodb
<wallerdev>
lol
<sevenseacat>
so your validations werent working because you didnt actually write any?
<wallerdev>
lolol
<volk_>
im doing index({:user_id => 1}, { :unqiue => true)}
klmlfl has joined #ruby
<volk_>
and didnt actually run the rake:index etc
<sevenseacat>
thats not a validation
<volk_>
and yeah i didnt actually have any, thats how late
<volk_>
it is
<volk_>
and how tired i am
<volk_>
i thought i had validations (literally just assumed )
<volk_>
anyway , with this i leave you all
<pizzahead>
zenspider: hey I'm so sorry!
<pizzahead>
zenspider: baby....
volk_ has quit [Quit: volk_]
Azzurrio has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pizzahead>
I had thought that because I defined id at the top I would be able to reassign it in the block but I get the original value of 0 while in the block I get the value from the table
Jameser has joined #ruby
<pizzahead>
and please tell me if I'm attempting this completely wrong
balazs has joined #ruby
manolo has joined #ruby
jcoglan has quit [Quit: jcoglan]
<pizzahead>
I feel like I am by iterating over user because of the way I'm assigning it. Feels weird because I just want an integer and not an array.
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bearish has joined #ruby
sleepee has quit [Quit: Leaving]
agrinb has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
GinoMan has joined #ruby
agrinb has joined #ruby
bearish has quit [Ping timeout: 250 seconds]
lw has joined #ruby
bradleyprice has joined #ruby
jack_rabbit has quit [Ping timeout: 272 seconds]
<zenspider>
pizzahead: there's nothing wrong with that code. reassigning id inside the block will affect the value of id out of the block.
braincrash has joined #ruby
<pizzahead>
zenspider: I was setting it manually inside the block and on the outside it kept printing the original value of 0
spastorino has joined #ruby
philcrissman has joined #ruby
lw has quit [Client Quit]
sea_local has joined #ruby
hooper has quit [Quit: Leaving.]
agent_white has quit [Quit: leaving]
InhalingPixels has quit []
philcrissman has quit [Ping timeout: 240 seconds]
earthquake has quit [Quit: earthquake]
cndiv has quit [Ping timeout: 240 seconds]
Neo-- has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lewix has quit [Remote host closed the connection]
tlarevo has quit [Remote host closed the connection]
Cort3z has quit [Ping timeout: 264 seconds]
tlarevo has joined #ruby
nfk has quit [Quit: yawn]
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
<passcod>
I have a weird issue where ERB/Erubis (both have the same behaviour) won't output anything. Worse, it seems execution of the script just stops silently (if I have an instruction below the call to "template.result", it never gets called.) I'm finding it hard to debug that, given this behaviour. Would anyone have any pointers?
<sevenseacat>
do we have to guess what code you have that displays the problem?
duggiefresh has quit []
kenneth has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 240 seconds]
tlarevo has quit [Remote host closed the connection]
<pizzahead>
zenspider: sorry to waste your time with the newb question. thanks for the reply. I think I had a misunderstanding that my output was different and to test I created a function where I did a similar thing with trying to redefine id. I understand now that in that case it would be an instance variable.
<pizzahead>
miah: thanks
mr-foobar has quit [Quit: Leaving...]
ssvo_ has joined #ruby
Wolland_ has quit [Ping timeout: 272 seconds]
ssvo has quit [Read error: Connection reset by peer]
mityaz has quit [Quit: See ya!]
<miah>
i think getting variable scope and such right mentally is one of the harder things of programming
manolo has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
icebourg has quit []
Spami has joined #ruby
manolo has quit [Client Quit]
<zenspider>
except that what he showed was perfectly fine scoping.
hamakn has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
jusmyth has joined #ruby
bluOxigen has joined #ruby
quikilr has joined #ruby
skolman_ has joined #ruby
quantsini_ has quit [Quit: meow]
<quikilr>
hey guys, first time in this channel, so let me know if this question doesn’t belong in here. I have a question about using Passenger with Ruby on Rails. I have setup a .conf file that Passenger uses to load virtual hosts, and it works great. My question is if I want to add CGI, would I add that in the standard apache2/site-enabled file or within the passenger .conf file
benlieb has joined #ruby
jusmyth has left #ruby [#ruby]
mockra_ has quit [Remote host closed the connection]
mockra has joined #ruby
coderhs has joined #ruby
benzrf|offline is now known as benzrf
djbkd has joined #ruby
sea_local has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
lw has joined #ruby
bMalum has joined #ruby
<miah>
zenspider: agreed; maybe the behaviour was unexpected though?
<miah>
(i didn read all scrollback either)
mockra has quit [Ping timeout: 240 seconds]
benzrf|offline is now known as benzrf
<miah>
quikilr: if the cgi isn't stuff being run through passenger, then just basic apache configuration
michaeldeol has joined #ruby
<miah>
or are you trying to do something else? might be a question better for #apache
<miah>
but i work ops and im bored
benzrf is now known as benzrf|offline
<quikilr>
yeah, #apache might be better. I’m looking to see if this line should be in the sites-enabled or passenger config
<quikilr>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
mmus has quit [Ping timeout: 264 seconds]
<quikilr>
I would prefer it in the passenger config
<quikilr>
to keep things organized in while config file
philcrissman has joined #ruby
<zenspider>
miah: I believe the whole situation was inaccurately described
<miah>
quikilr: ScriptAlias's context is only in server config or virtual host config; so as long as your passenger configs context falls into one of those you should be fine
<miah>
been forever since i used passenger i cant remember how its config goes
oo_ has joined #ruby
<quikilr>
sounds good. I’ll play around with it. thanks for the link and the help guys
<miah>
zenspider: almost always the case on irc =)
IceDragon has quit [Quit: Space~~~]
zeroNones has joined #ruby
zeroNones has quit [Max SendQ exceeded]
philcrissman has quit [Ping timeout: 272 seconds]
zeroNones has joined #ruby
zeroNones has quit [Max SendQ exceeded]
anaeem1 has joined #ruby
zeroNones has joined #ruby
zeroNones has quit [Max SendQ exceeded]
Asher has joined #ruby
hamakn has joined #ruby
Spami has quit [Read error: Connection reset by peer]
sea_local has joined #ruby
tlarevo has joined #ruby
sinkensabe has joined #ruby
_cake has quit [Ping timeout: 272 seconds]
arup_r has joined #ruby
phrozen77 has joined #ruby
phrozen77 has quit [Changing host]
kenneth has quit [Ping timeout: 260 seconds]
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby
tlarevo_ has joined #ruby
hooper has quit [Quit: Leaving.]
whyy has joined #ruby
malcolmva has quit [Ping timeout: 250 seconds]
tobago has joined #ruby
tlarevo has quit [Ping timeout: 240 seconds]
bMalum has quit [Quit: bMalum]
kenneth has joined #ruby
banjara has quit [Max SendQ exceeded]
banjara has joined #ruby
timonv_ has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
saarinen has quit [Quit: saarinen]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
quikilr has left #ruby [#ruby]
Sauvin has joined #ruby
Channel6 has quit [Remote host closed the connection]
malcolmva has joined #ruby
philcrissman has joined #ruby
crantron has quit [Ping timeout: 255 seconds]
sinkensa_ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
Scsilver has quit [Quit: Leaving]
grenierm has quit [Quit: grenierm]
<pizzahead>
zenspider: you are right, I had made an assumption that something wasn't working and tried proving it doing a completely different test to 'verify'. I should have pasted what I was able to verify wasn't working instead. Sorry about that.
magic is now known as notmagic
nobitanobi has quit [Ping timeout: 240 seconds]
ptrrr has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
siwica has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
timonv_ has quit [Remote host closed the connection]
<TheTopBloke>
Hello.
siwica has joined #ruby
<TheTopBloke>
Just want to run this by you for confirmation. In creating a new example rails project, I typed the following.
apeiros has quit [Ping timeout: 240 seconds]
<TheTopBloke>
rails new blog /usr/local/bin/ruby
<TheTopBloke>
which is meant to bypass the ruby 2.0.0 the OS on mavericks uses, and utilize ruby-2.1.2
<TheTopBloke>
it appears to have worked. did I miss anything in that command?
<DEA7TH>
I'm not sure how the _or_ keyword works, can I do something like what I said in the comments?
starkhalo has quit [Ping timeout: 260 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
<DEA7TH>
of course, the right hand side must not get evaluated if the left hand side evaluates to true
bthesorceror has quit [Quit: bthesorceror]
_tpavel has joined #ruby
<TheTopBloke>
Im starting to get the feeling that attempting to create a local server environment for development is a complete waste of time on a mac, and that I prob should just pickup a cheap remote dev server and start from scratch. that way there would not be two libraries of everything and messes of file directories everywhere
<sevenseacat>
its very straightforward. what are you having problems with?
<havenwood>
DEA7TH: find_item(params) or create_item(params)
<TheTopBloke>
Its just very confusing. I have a version of something, then its outdated, but Im doing keg-only installs for example, and then I have to build with a path to the right directory for the right version. It seems like I would be fartehr ahead having just picked up a server and installed everything on that instead
<DEA7TH>
havenwood: ah, so my code in the comment happened to do what I want
fabrice31 has joined #ruby
<TheTopBloke>
I got it to run, but I just have to remember where the hell everything is LOL
<sevenseacat>
whats a keg-only install? and i dont know why you have multiple versions of everything - osx comes with ruby, just use that
<sevenseacat>
its not a super up to date version but its good enough for learning on
zz_rubydimond is now known as anildigital
bthesorceror has joined #ruby
siwica has quit [Ping timeout: 255 seconds]
<TheTopBloke>
Right, well maybe Im operating under some bad advice, but the advice I was given on chat and various forums and what have you is that there should be seperate versions of ruby for example, one for the OS and one for DEV
<sevenseacat>
wat
<sevenseacat>
why
<TheTopBloke>
I guess the logic is the OS version doesnt get screwed up
lmickh has quit [Remote host closed the connection]
<sevenseacat>
erm
<sevenseacat>
its not like you're rewriting it, you're just using it
<atmosx>
TheTopBloke: why don't you try RVM and learn one or thing about how paths work under unix? :-)
<TheTopBloke>
But I could pick up a server with some version of linux and just install everything I need
<sevenseacat>
and osx is exactly the same
<sevenseacat>
like im confused
<TheTopBloke>
I did use RVM earlier. And I used brew. Its not so much learning the paths of unix, but rather the speicifc paths on my laptop thats operating mavericks.
<sevenseacat>
okay well i cant teach you how to use your laptop
<miah>
TheTopBloke: learn to use bundler?
<sevenseacat>
but we can teach you how to use ruby :P
<TheTopBloke>
I dunno, like for instance I dont even have a launchd.conf file.
<miah>
it can be a big help to keep things organized
<sevenseacat>
seems irrelevant to ruby
<atmosx>
why do you need a launchd.conf file?
benlieb has quit [Read error: Connection reset by peer]
<TheTopBloke>
Im just using that as an example. forget it.
<miah>
TheTopBloke: the version of ruby should be mostly irrelevant; but the version of gems needed for your project likely needs to remain consistent between hosts. i'd start with setting up a bundler Gemfile and working your way from there
<TheTopBloke>
I'm going to keep this in mind for later use. This seems more like soemthing for when I have everything running happy on dev, before I move it over to a live environment I bundle it and it makes everything transition smoothly.
<sevenseacat>
no, you use bundler all the time.
<miah>
right; always use it
<sevenseacat>
if you have a ruby project and its not using bundler, you're going to have a bad time.
<TheTopBloke>
ok, I'll RTFM more then. :)
<miah>
<3
MrL0ngbowman has joined #ruby
<sevenseacat>
look at the rails project you just generated - it has a Gemfile in it, which is for bundler
lkba has quit [Ping timeout: 240 seconds]
craigp has quit [Remote host closed the connection]
<TheTopBloke>
yep I see it
<miah>
osx ruby is 2.0.0 at least these days; you really shouldn't need to install anything different unless you really need to live on the bleeding edge
dawkirst has joined #ruby
klmlfl has quit [Ping timeout: 246 seconds]
<sevenseacat>
2.0.0 is fine while learning
gaussblurinc1 has joined #ruby
<miah>
exactly
<sevenseacat>
it was 1.8.7 in previous versions of osx which is way too old
<TheTopBloke>
ok, because that was how I originally started with this mess. I think the rails site recommended 2.1.2
<miah>
agree; same problem still in RHEL / Centos
<miah>
recommended ; not required
<TheTopBloke>
and yeah, mavericks is using 2.0.0
<sevenseacat>
we know.
mices has quit [Ping timeout: 255 seconds]
arup_r has quit []
diegoviola has quit [Remote host closed the connection]
fold has quit [Ping timeout: 245 seconds]
pizzahead has quit [Quit: EPIC5-1.1.6[1693] - amnesiac : Guns make holes in people. Weed makes people giggle and eat cake.]
kyb3r_ has joined #ruby
himsin has joined #ruby
MrL0ngbowman has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: zzz]
charliesome has joined #ruby
emocakes has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
sinkensabe has joined #ruby
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
lw has quit [Quit: s]
Sht0 has joined #ruby
lw has joined #ruby
himsin has quit [Quit: himsin]
himsin has joined #ruby
roolo has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
mityaz has joined #ruby
atraylen has joined #ruby
gauke has joined #ruby
ssvo_ has quit [Ping timeout: 240 seconds]
_lexjm has joined #ruby
descala has joined #ruby
renderful has quit [Ping timeout: 240 seconds]
Cort3z has joined #ruby
gauke has quit [Ping timeout: 260 seconds]
emocakes has quit []
bthesorceror has quit [Quit: bthesorceror]
codecop has joined #ruby
krz has quit [Quit: WeeChat 1.0]
krz has joined #ruby
tectonic has quit []
Cort3z has quit [Ping timeout: 240 seconds]
coderhs has quit [Read error: Connection reset by peer]
jprovazn has joined #ruby
Hanmac has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
aganov has joined #ruby
nobitanobi has joined #ruby
dawkirst has joined #ruby
banjara has quit [Quit: Leaving.]
thomasxie has left #ruby [#ruby]
emmesswhy has quit [Quit: Leaving]
nobitanobi has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
OffTheRails has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
Cheezebo_ has quit [Remote host closed the connection]
Takle has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
cocotton has quit [Remote host closed the connection]
timonv_ has quit [Ping timeout: 246 seconds]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
mengu has quit [Read error: Connection reset by peer]
spyderman4g63 has joined #ruby
Wolland has joined #ruby
abuzze has quit [Remote host closed the connection]
timonv_ has joined #ruby
flowerhack has joined #ruby
abuzze has joined #ruby
pontiki has joined #ruby
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
shevy has joined #ruby
<Hanmac>
balder: why are there "ipaddress_*" local variables? why not use ipaddress as a Hash ?
cocotton has joined #ruby
emocakes__ is now known as emocakes
rimenes has quit [Read error: Connection reset by peer]
mijicd has joined #ruby
mengu has joined #ruby
cocotton has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
anildigital is now known as zz_anildigital
banister is now known as banisterfiend
Wolland has quit [Ping timeout: 255 seconds]
<balder>
Hanmac: puppet provides things called facts, i have no controll over what they pass me. unless i reimplment all the
<balder>
work they are already doing.
<balder>
i have updated the gist with what i get from puppet
iamjarvo has joined #ruby
<balder>
in relation to reimplmenting this when i looked at that there seemed to be no libraries for quirying interface information. with most information i found suggesting parsing ip addr or ifconfig
Cheezebox has joined #ruby
<balder>
which is what puppet does
mijicd has quit [Remote host closed the connection]
momomomomo has joined #ruby
<Hanmac>
balder: are you sure that "ipaddress_eth0 => 192.2.0.1" is a local variable? it does look more like a key for a hash
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
agrinb has joined #ruby
mijicd has joined #ruby
ndrei has joined #ruby
<Hanmac>
balder: better than your eval might be: "binding.local_variable_get"
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
LiohAu_ is now known as LiohAu
<balder>
not 100% i can take a look at the facter command which printss a full list of these facts. there may be something more
gaussblurinc1 has joined #ruby
<balder>
low level i can access but in irb i access it via @ipaddress_eth0
mengu__ has joined #ruby
<balder>
ok thanks ill check that out
cocotton has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
mengu has joined #ruby
agrinb has quit [Ping timeout: 240 seconds]
mengu has quit [Read error: Connection reset by peer]
starless has joined #ruby
starless has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
starless has joined #ruby
mengu has quit [Read error: Connection reset by peer]
thomasxie has joined #ruby
emocakes has quit []
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
siwica has joined #ruby
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
pandaant has quit [Quit: Lost terminal]
abuzze_ has joined #ruby
mengu__ has joined #ruby
freerobby has joined #ruby
pandaant has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
tokik has quit [Ping timeout: 246 seconds]
<balder>
Hanmac: thanks for pushing me, looks like there is a library call i can make to puppet
sambao21 has joined #ruby
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
Lewix has quit [Remote host closed the connection]
abuzze has quit [Ping timeout: 246 seconds]
zz_anildigital is now known as anildigital
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ganesh has quit [Quit: Konversation terminated!]
mengu_ has joined #ruby
weems|mac has joined #ruby
weems|mac has quit [Changing host]
weems|mac has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
rubyracer has joined #ruby
bmurt has joined #ruby
mupkoo has joined #ruby
alexju has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
anaeem1 has quit [Remote host closed the connection]
tlarevo has quit [Remote host closed the connection]
tkuchiki has joined #ruby
tokik has joined #ruby
jespada has joined #ruby
tlarevo has joined #ruby
britneywright has joined #ruby
ndrei has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.0]
flowerhack has quit [Remote host closed the connection]
mengu__ has quit [Read error: Connection reset by peer]
alexju has quit [Read error: Connection reset by peer]
alexju has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
Wolland has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
hellangel7 has joined #ruby
mengu has joined #ruby
mockra has joined #ruby
jottr has joined #ruby
mengu has quit [Read error: Connection reset by peer]
sylvanica has quit [Ping timeout: 240 seconds]
tlarevo has quit [Ping timeout: 255 seconds]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
grenierm has joined #ruby
Xiti` has quit [Quit: Leaving]
ndrei has quit [Ping timeout: 245 seconds]
mengu__ has joined #ruby
dblessing has joined #ruby
duggiefresh has joined #ruby
Xiti has joined #ruby
ixti has joined #ruby
mupkoo has quit []
mijicd has quit [Quit: leaving]
mary5030 has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
Wolland has quit [Ping timeout: 250 seconds]
mr-foobar has joined #ruby
mengu_ has joined #ruby
Insanity133 has joined #ruby
mockra has quit [Ping timeout: 272 seconds]
techsethi has quit [Quit: techsethi]
Lewix has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
wombo has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
riotjones has joined #ruby
riotjone_ has quit [Read error: Connection reset by peer]
momomomomo has quit [Ping timeout: 245 seconds]
joonty has quit [Quit: Leaving]
spider-mario has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
spider-mario has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
mengu__ has quit [Ping timeout: 250 seconds]
mengu has joined #ruby
emocakes has joined #ruby
mengu has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mercerist has quit [Quit: Computer has gone to sleep.]
yalue has joined #ruby
mengu has joined #ruby
ndrei has joined #ruby
mengu has quit [Read error: Connection reset by peer]
Cheezebox has quit [Remote host closed the connection]
spider-mario has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
Cort3z has joined #ruby
mengu has joined #ruby
Takle has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
pranny has quit [Quit: Leaving.]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
agrinb has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
koderok has joined #ruby
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
balazs has joined #ruby
alexju has quit [Read error: Connection reset by peer]
alexju has joined #ruby
Zenigor has joined #ruby
Cort3z has quit [Ping timeout: 246 seconds]
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
sethetter has joined #ruby
agrinb has quit [Ping timeout: 240 seconds]
mengu___ has joined #ruby
mengu___ has quit [Read error: Connection reset by peer]
<sethetter>
If I'm using RSpec to test a module that uses an AR model, is it best to stub out the model class as a class with empty methods in the test file, or use something like RSpec double or mocks?
arturaz has joined #ruby
mengu___ has joined #ruby
rimenes has joined #ruby
mengu___ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
mengu___ has joined #ruby
<sethetter>
s/stub out/overwrite
<pontiki>
i prefer the mocks
mengu___ has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
Channel6 has joined #ruby
mengu has joined #ruby
moritzs has joined #ruby
krz has joined #ruby
mikepack has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
arup_r has quit []
mikepack has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
linojon has joined #ruby
mengu has joined #ruby
phutchin1 is now known as phutchins
mengu_ has quit [Ping timeout: 272 seconds]
mengu__ has joined #ruby
mikepack has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
nobitanobi has joined #ruby
djcp has joined #ruby
djcp has left #ruby [#ruby]
<gr33n7007h>
Is IO::NULL equivalent to pythons os.devnull ?
sectionme has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 245 seconds]
mengu___ has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
qwyeth has joined #ruby
mengu___ has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
bjz has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
mengu___ has joined #ruby
mengu has quit [Ping timeout: 250 seconds]
<Thanatermesis>
match /(memo|note|tell) (.+?) ?(that) (.+)/
mengu___ has quit [Read error: Connection reset by peer]
spyderman4g63 has joined #ruby
joast has joined #ruby
<Thanatermesis>
this doesn't seems to work
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<Thanatermesis>
"that" is an optional word to ignore
mengu has quit [Read error: Connection reset by peer]
<canton7>
rubular.com - create and link something which demonstrates the problem
<Thanatermesis>
it is correctly set as ?(that) ?
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
nobitanobi has quit [Ping timeout: 240 seconds]
snath has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
mengu__ has quit [Ping timeout: 260 seconds]
livingstn has joined #ruby
mengu has quit [Read error: Connection reset by peer]
<hoelzro>
Thanatermesis: no
<hoelzro>
(that)?
<hoelzro>
the question mark follows the expr to ignore
mengu_ has quit [Ping timeout: 272 seconds]
Neo-- has joined #ruby
mengu__ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SCHAAP137 has quit [Remote host closed the connection]
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
Neo-- has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
mengu__ has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 255 seconds]
dawkirst has quit [Remote host closed the connection]
Neo-- has joined #ruby
<Hanmac>
gr33n7007h: depends, is " os.devnull " a string or an IO object?
Neo-- has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
Wolland has joined #ruby
Neo-- has joined #ruby
mikepack has joined #ruby
<gr33n7007h>
Hanmac, a string
mikepack has quit [Remote host closed the connection]
yeticry has quit [Read error: Connection reset by peer]
wombo has quit [Ping timeout: 240 seconds]
mengu__ has quit [Read error: Connection reset by peer]
sylvanica has joined #ruby
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
Ankhers has joined #ruby
<gr33n7007h>
Hanmac, Yep, that's better true if accessor else false
<pontiki>
dont' ask me whether it's better
<mr-foobar>
so I can test with the above and dod foo.bar = "xxx" ?
<mr-foobar>
*do
himsin has joined #ruby
arturaz has quit [Remote host closed the connection]
mengu__ has joined #ruby
himsin has quit [Client Quit]
dawkirst has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
phutchin1 has joined #ruby
phutchins has quit [Disconnected by services]
mengu__ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
<Hanmac>
mr-foobar: hm no you need foo.respond_to?(:bar=)
mengu__ has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
qba73 has quit [Read error: Connection reset by peer]
<mr-foobar>
Hanmac: exactly what I need. thx !
dawkirst_ has joined #ruby
brothmars has joined #ruby
mengu has joined #ruby
astav has joined #ruby
anarang has quit [Ping timeout: 240 seconds]
mengu__ has joined #ruby
yeticry has joined #ruby
mercerist has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
phutchin1 is now known as phutchins
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
ndrei has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
jprovazn has quit [Quit: Leaving]
mikesplain has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
mengu_ has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
jprovazn has joined #ruby
mengu has quit [Ping timeout: 260 seconds]
gr33n7007h has quit [Quit: Leaving]
grenierm has quit [Quit: grenierm]
mengu__ has quit [Ping timeout: 250 seconds]
klmlfl has joined #ruby
albedoa has joined #ruby
tkuchiki has quit [Remote host closed the connection]
shackleford has joined #ruby
andrewlio has joined #ruby
mengu___ has joined #ruby
mengu___ has quit [Read error: Connection reset by peer]
noop has quit [Ping timeout: 255 seconds]
iamjarvo has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
definiv has joined #ruby
ptierno has joined #ruby
iamjarvo has joined #ruby
kaspergrubbe_ has quit [Remote host closed the connection]
mengu_ has quit [Ping timeout: 245 seconds]
mengu___ has joined #ruby
relix has quit [Read error: Connection reset by peer]
relix has joined #ruby
emocakes has quit []
mengu__ has joined #ruby
osvico has joined #ruby
mengu__ has quit [Read error: Connection reset by peer]
gaussblurinc1 has quit [Quit: Leaving.]
ghostmoth has joined #ruby
mengu__ has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
phutchins has quit [Quit: leaving]
Cheezebox has joined #ruby
cocotton has quit [Remote host closed the connection]
phutchins has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
mengu___ has quit [Ping timeout: 245 seconds]
jerikl has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu__ has quit [Ping timeout: 240 seconds]
pigram86 has joined #ruby
tkuchiki has joined #ruby
moritzs has quit [Ping timeout: 255 seconds]
mengu__ has joined #ruby
mary5030 has joined #ruby
pigram8__ has joined #ruby
pigram86_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
definiv has quit [Quit: Lost terminal]
freerobby has joined #ruby
dmst has quit []
mengu_ has quit [Read error: Connection reset by peer]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
koderok has quit [Quit: koderok]
agjacome has quit [Quit: leaving]
mengu_ has joined #ruby
cocotton has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
jottr has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
mengu_ has joined #ruby
mengu has quit [Ping timeout: 240 seconds]
ghostmoth has quit [Quit: ghostmoth]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
dmst has joined #ruby
agrinb has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu__ has quit [Ping timeout: 250 seconds]
pigram86 has quit [Ping timeout: 246 seconds]
Cort3z has joined #ruby
Aranshada|W has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
Xeago_ has quit [Remote host closed the connection]
tobago has quit [Remote host closed the connection]
definiv has joined #ruby
mengu_ has quit [Ping timeout: 272 seconds]
Fire-Dragon-DoL has quit [Quit: Leaving.]
agrinb has quit [Ping timeout: 250 seconds]
Cort3z has quit [Ping timeout: 250 seconds]
sectionme has joined #ruby
Lwhite has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
starkhalo has joined #ruby
iamjarvo has joined #ruby
yfeldblum has joined #ruby
_tpavel has quit [Quit: Leaving]
ayaz has joined #ruby
ayaz has quit [Max SendQ exceeded]
ayaz has joined #ruby
sethetter has left #ruby [#ruby]
Takle has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
astav has quit [Quit: astav]
nobitanobi has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
tagrudev has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
bashrw has joined #ruby
Takle has joined #ruby
albedoa has quit [Ping timeout: 240 seconds]
jfutbol has joined #ruby
Lewix has quit [Remote host closed the connection]
zorak8 has quit [Ping timeout: 272 seconds]
nobitanobi has quit [Ping timeout: 240 seconds]
tedwing has joined #ruby
Neo-- has quit [Read error: Connection reset by peer]
Neo-- has joined #ruby
alexju has quit [Read error: Connection reset by peer]
Aranshada|W has joined #ruby
havenwood has joined #ruby
sectionme has quit [Ping timeout: 260 seconds]
alexju has joined #ruby
asteve has joined #ruby
Wolland has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
ldnunes has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anildigital is now known as zz_anildigital
zz_jrhorn424 is now known as jrhorn424
Xeago has joined #ruby
Wolland has quit [Ping timeout: 250 seconds]
spastorino has joined #ruby
sethetter has joined #ruby
mikesplain has quit []
claymore has joined #ruby
<sethetter>
If I have a class that instantiates another class when a method is called and I'm trying to unit test the first class, how can I get around needing to have the second class defined with a proper initialize method?
<sethetter>
(with rspec)
<crome>
sethetter: show some code
Lewix has joined #ruby
aganov has quit [Remote host closed the connection]
<sethetter>
Trying to test the Importer::Bridge class, which instantiates both the Importer::BridgeRow and Importer::BridgeValidation classes. If those aren't defined and required in in the bridge.rb file my tests fail. Can't I mock those in my spec?
relix has quit [Ping timeout: 246 seconds]
max061 has joined #ruby
anaeem1_ has joined #ruby
<waxjar>
i think the file where Importer::Bridge is defined should require them for you
mercerist has quit [Quit: Computer has gone to sleep.]
<waxjar>
you'd want that in production, too
<sethetter>
waxjar: it does
rodfersou has joined #ruby
thomasxie has left #ruby [#ruby]
<sethetter>
as I was working, I hadn't defined the other classes yet, and I thought my RSpec test would have a way of not needing them to actually exist for the tests to pass
<sethetter>
To keep the tests truly isolated.
max06 has quit [Ping timeout: 272 seconds]
<sethetter>
Or am I going overboard here with the whole test isolation idea?
<bashrw>
sethetter: it sounds like you’re using outside-in testing (test driving through mocking what you want)
<sethetter>
That's what I'm going for
<sethetter>
bashrw: RICK?!
<waxjar>
i'd use a placeholder in the meantime, something like class X; def initialize(*); end; end
<bashrw>
until you have Importer::BridgeRow and Importer::BridgeValidation, you just define those in your spec file :)
sambao21 has joined #ruby
<bashrw>
yep :) hey Seth!
<sethetter>
waxjar: Ok cool, I thought about that but wasn't sure if there was an Rspec helper for that
relix has joined #ruby
<sethetter>
bashrw: I thought that was you! haha, how's it going?
<waxjar>
possibly, idk, i do not use rspec :)
<bashrw>
sethetter: waxjar’s example is the common convention imho
<sethetter>
Cool, that's what I needed to know :)
<bashrw>
it’s throw away code, until you have those classes properly defined
<sethetter>
Thanks guys!
<sethetter>
Gotcha, so once the classes are defined I should remove them, so as not needing to maintain matching classes / arity, etc?
<bashrw>
yeah, it’s just a temporary bridge to avoid the undefined constant error
sparrovv_ has quit [Remote host closed the connection]
<sethetter>
Perfect
<sethetter>
You guys are way better than #rubyonrails, lol
sparrovv has joined #ruby
Takle has quit [Remote host closed the connection]
<sethetter>
bashrw: Are you still with 8th Light?
jerikl has quit [Quit: jerikl]
jottr has quit [Ping timeout: 240 seconds]
paulfm has joined #ruby
alexju has quit [Read error: Connection reset by peer]
alexju_ has joined #ruby
Magnus has quit [Ping timeout: 250 seconds]
Neo-- has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FarlaTux has joined #ruby
<bashrw>
sethetter: no, i’m with a company called hireology now
<sethetter>
Cool, still in Chicago?
mockra has joined #ruby
Guest5641 is now known as notmagic
Takle has joined #ruby
notmagic has quit [Changing host]
notmagic has joined #ruby
starless has quit [Quit: Leaving]
sparrovv has quit [Ping timeout: 240 seconds]
bthesorceror has joined #ruby
icefall has joined #ruby
failshell has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
snath has joined #ruby
<Lewix>
bashrw: does hire - o-logy hire?
fantazo has joined #ruby
Neo-- has joined #ruby
gsd has joined #ruby
PHP4Ever has joined #ruby
jprovazn has quit [Quit: Leaving]
<bashrw>
Lewix: we are hiring for a remote Ruby engineer right now
jottr has joined #ruby
mikesplain has joined #ruby
terrellt has joined #ruby
jshultz has joined #ruby
rjhunter has quit [Remote host closed the connection]
relix_ has joined #ruby
spider-mario has joined #ruby
relix has quit [Ping timeout: 255 seconds]
anaeem1_ has quit [Remote host closed the connection]
terrellt has quit [Remote host closed the connection]
terrellt has joined #ruby
nobitanobi has joined #ruby
<icefall>
hello, I'm trying to remember the way to get the file path for a particular module, and my googling has been unsuccessful. I've used pry's functionality for this in the past, but would like to know how to accomplish this using standard irb because I often find myself on servers without extensive development environments set up on them. I've tried source_location like this: <my_class_instance>.method(:<some_method_defined_on_class>).source_location w
<icefall>
hich results in nil. what's the proper invocation of source_location, or is there an easier way to find the location of a particular module without manually traversing the ruby inclusion path?
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
jobewan has joined #ruby
andikr has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
benzrf|offline is now known as benzrf
icebourg has joined #ruby
<jhass>
icefall: on which method did you try that? it returns nil for core methods
icebourg has quit [Max SendQ exceeded]
jerikl has joined #ruby
<icefall>
ahh that may very well be it
Xeago has quit [Remote host closed the connection]
<icefall>
I may have used a method defined on the common ancestor object
microdex has joined #ruby
icebourg has joined #ruby
<icefall>
jhass: that was exactly it! thank you
ffranz has joined #ruby
hooper has joined #ruby
Dev-Gitter has joined #ruby
tlarevo has quit [Remote host closed the connection]
albedoa has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
tlarevo has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
alexju_ has quit [Read error: Connection reset by peer]
<microdex>
I would like to assign a category based upon a value falling anywhere within a Percent range
<microdex>
so if a value is 0-16.66=category1 16.66-33.33=category2 and so forth
<microdex>
is there an easy way to do that ?
geggam has joined #ruby
Squarepy has joined #ruby
Dev-Gitter has quit [Max SendQ exceeded]
Dev-Gitter has joined #ruby
charliesome has joined #ruby
Neo-- has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
I think I'd just built a hash with (0..16.66) => 'category1' and then category = CATEGORIES.find {|range, category| range.include? value }.last
king313 has joined #ruby
king313 has joined #ruby
jmbrown412 has joined #ruby
davispuh has joined #ruby
todor has quit [Ping timeout: 272 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<Hanmac>
jhass: hm you need to be careful because your find might return nil, and then .last does raise an Error
moted has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
<jhass>
def find_category(value); return if value > 100
<jhass>
|| value < 0
hooper has quit [Quit: Leaving.]
spyderma_ has joined #ruby
Spami has joined #ruby
Takle has quit [Remote host closed the connection]
<Hanmac>
hm ok an idea might be that: _, category = CATEGORIES.find {|range, category| range.include? value }
fabrice31 has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 260 seconds]
fabrice31 has joined #ruby
IceyEC has quit [Quit: leaving]
<orolo>
why , (in Rails but that shouldn't matter), I can access object.param but in IRB when a create a Hash and try to reference it's keys the same way, i get method undefined?
moritzs has joined #ruby
IceyEC has joined #ruby
sdwrage has joined #ruby
<jhass>
okay, they're not, but include? is optimized for the numeric case
<orolo>
object.param is an active resource type object
Azzurrio has joined #ruby
<canton7>
orolo, exactly, it isn't a hash
moritzs has quit [Max SendQ exceeded]
Rosa has joined #ruby
<orolo>
canton7, yeah, that's what i was guessing. i should be creating a class in IRB?
tlarevo has quit [Remote host closed the connection]
<havenwood>
Lewix: thanks for reminding me to read it! read through an EAP version, that was great, but it only had a few chapters.
<Lewix>
havenwood: yup , I meant the first edition
<Lewix>
havenwood: is it worth the price though, especially if you have the first edition
Cort3z has joined #ruby
<havenwood>
i didn't have the first edition
alexju has joined #ruby
enebo has joined #ruby
craigp has quit [Remote host closed the connection]
sea_local has quit [Ping timeout: 255 seconds]
<havenwood>
Lewix: probably worth the price to someone just learning, since the detailed examples actually work in modern Ruby - the first edition starts (they provided it with a purchase of the second) starts right off with examples that don't work
wallerdev has joined #ruby
<havenwood>
Lewix: if you've already read the first edition, i'm not sure it's worth it unless you just want it as a reference
max06 has joined #ruby
<Lewix>
havenwood: I see. thanks
ndrei has quit [Ping timeout: 245 seconds]
<havenwood>
though i haven't reviewed the diff, so i've no clue what's really substantively changed!
cocotton has quit [Remote host closed the connection]
definiv has quit [Ping timeout: 246 seconds]
<Lewix>
havenwood: I kind of want to learn Go
ndrei has joined #ruby
<havenwood>
Lewix: the official tutorial actually covers a lot
<Lewix>
havenwood: did you learn it!?
jheg has joined #ruby
momomomomo has quit [Quit: momomomomo]
beneggett has joined #ruby
blueOxigen has quit [Ping timeout: 246 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<havenwood>
Lewix: i've written a bit of Go but i'd not say i've learned it
timonv_ has joined #ruby
<jheg>
hey all
Azzurrio has quit [Ping timeout: 250 seconds]
jerikl has quit [Quit: jerikl]
<havenwood>
hi
mikepack_ has joined #ruby
<jheg>
what is the best way to use the select method on a multi dimensional array
mikepack_ has quit [Remote host closed the connection]
<jhass>
then flatten
cocotton has joined #ruby
<jheg>
the desired output is to return each instance of where the string 'world' appears
<jheg>
cool thanks all
michaeldeol has quit [Client Quit]
notmagic has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
<jhass>
depending on where that arrays come from you may also change the generation
charliesome has joined #ruby
Guest15450 is now known as magic
bthesorceror has joined #ruby
<jhass>
for example with flat_map or something like that
magic has quit [Changing host]
magic has joined #ruby
mikepack has joined #ruby
GhettoJava has joined #ruby
saarinen has quit [Quit: saarinen]
mikesplain has quit [Ping timeout: 240 seconds]
gaussblurinc1 has joined #ruby
michaeldeol has joined #ruby
Takle has quit [Remote host closed the connection]
pietr0 has joined #ruby
hooper has joined #ruby
freeone3000 has joined #ruby
<freeone3000>
!rails
pietr0 has quit [Client Quit]
<jhass>
freeone3000: #rubyonrails
<freeone3000>
jhass: Thanks.
microdex has quit [Remote host closed the connection]
mikesplain has joined #ruby
pietr0 has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
Neo-- has quit [Read error: Connection reset by peer]
Rosa is now known as Jarboe
Neo-- has joined #ruby
craigp has joined #ruby
bricker`work has joined #ruby
max06 has quit [Quit: Leaving.]
yfeldblum has joined #ruby
patrick99e99 has joined #ruby
pu22l3r has quit [Remote host closed the connection]
osvico has quit [Ping timeout: 245 seconds]
Neo-- has quit [Read error: Connection reset by peer]
philcrissman has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
Neo-- has joined #ruby
zeusmns has joined #ruby
philcrissman has joined #ruby
_cpt_yossarian_ has quit [Quit: Leaving]
pietr0_ has joined #ruby
cpt_yossarian has joined #ruby
pietr0 has quit [Ping timeout: 240 seconds]
pietr0_ is now known as pietr0
Neo-- has quit [Client Quit]
albedoa has joined #ruby
terrellt has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 260 seconds]
philcrissman has quit [Ping timeout: 260 seconds]
anildigital is now known as rubydiamond
pu22l3r has joined #ruby
hamakn has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
Moeh has joined #ruby
momomomomo has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
<Moeh>
What is the best way to create a persistent connection between a client and a server in Ruby. Meaning I would like to have one C&C server and several clients that listen for commands from the server (and recreate the connection if it times out etc.)
<Moeh>
Would you suggest TCP sockets?
goshdragon has joined #ruby
mockra_ has joined #ruby
GriffinHeart has joined #ruby
AndChat| has joined #ruby
cndiv has joined #ruby
goshdragon has quit [Client Quit]
sailias has joined #ruby
goshdragon has joined #ruby
goshdragon is now known as goshdarnyou
lkba has quit [Ping timeout: 255 seconds]
mercerist has quit [Quit: Computer has gone to sleep.]
mockra has quit [Ping timeout: 245 seconds]
<havenwood>
Moeh: I'd suggest looking into Server-Sent Events.
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
todor has joined #ruby
<Moeh>
havenwood: The client would not use a server
<Moeh>
* browser
maestrojed has joined #ruby
HelperW_ has joined #ruby
apeiros has joined #ruby
jhc76 has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
ordomoko has quit [Remote host closed the connection]
<havenwood>
Moeh: How about be fancy and use DRb or DCell? :P
awc737 has joined #ruby
<mikecmpbll>
what's the simplest way to get a string repeated x number of times?
<mikecmpbll>
a new string that contains the original string repeated*
<Moeh>
Is it possible to send a json file via a socket?
iMe has quit [Ping timeout: 260 seconds]
<Hanmac>
Moeh: why shouldnt that be possible?
<freeone3000>
Moeh: Given that you can send anything via a socket, and a json file is an element of the set "anything", yes.
<Moeh>
Great, thx!
<havenwood>
Moeh: It's popular even. ;)
axsuul has joined #ruby
CaptainJet has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
<havenwood>
Moeh: Ye ole JSON REST API.
matlle has quit [Ping timeout: 255 seconds]
cocotton has joined #ruby
Moeh has left #ruby [#ruby]
luckyruby has joined #ruby
techsethi has quit [Quit: techsethi]
aspires has quit []
max06 has joined #ruby
geggam has joined #ruby
Takle has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
deric_skibotn has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
ghr has joined #ruby
aspires has joined #ruby
koderok has joined #ruby
kenneth has joined #ruby
koderok has quit [Remote host closed the connection]
saarinen has joined #ruby
terrellt has quit [Remote host closed the connection]
djbkd has joined #ruby
terrellt has joined #ruby
LiohAu has quit [Quit: LiohAu]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cheezebo_ has quit [Remote host closed the connection]
lmickh has joined #ruby
nobitanobi has joined #ruby
sambao21 has joined #ruby
momomomomo has quit [Quit: momomomomo]
ghr has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
mikeric has joined #ruby
Cheezebox has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
wallerdev has joined #ruby
Wolland has joined #ruby
timonv_ has joined #ruby
nanoyak has joined #ruby
skolman_ has joined #ruby
Eiam has joined #ruby
nanoyak has quit [Client Quit]
skolman_ has quit [Remote host closed the connection]
goleldar has joined #ruby
shredding has quit [Quit: shredding]
timonv_ has quit [Remote host closed the connection]
skolman_ has joined #ruby
HelperW_ has quit [Quit: Computer has gone to sleep.]
apeiros has quit [Ping timeout: 245 seconds]
Spami has joined #ruby
HelperW_ has joined #ruby
techsethi has joined #ruby
CaptainJet has quit [Ping timeout: 250 seconds]
CaptainJet has joined #ruby
Sht0 has quit [Ping timeout: 255 seconds]
timonv_ has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
jack_rabbit has quit [Ping timeout: 250 seconds]
<benzrf>
je old
Xeago has joined #ruby
<benzrf>
*ye old
benlieb has joined #ruby
iMe has joined #ruby
pigram8__ has quit []
timonv_ has quit [Remote host closed the connection]
lw has joined #ruby
HelperW_ has quit [Ping timeout: 240 seconds]
<benlieb>
Am I missing something obvious in my case syntax or understanding of how case works? Even when this resource.class is one of the following classes, the block is never entered... https://gist.github.com/pixelterra/60205d33de8f8fb90c97
benlieb has left #ruby [#ruby]
bearish has joined #ruby
benlieb has joined #ruby
chrishough has joined #ruby
<waxjar>
resource alone is enough :)
<benlieb>
waxjar: really?
jonathan_alban has joined #ruby
nanoyak has joined #ruby
hsps_ has quit [Quit: Leaving]
michaeldeol has joined #ruby
sailias has quit [Quit: Leaving.]
<benlieb>
resource is a model instance...
<benlieb>
is case not doing an equiv match?
mercerist has joined #ruby
momomomomo has joined #ruby
cocotton has quit [Remote host closed the connection]
<freeone3000>
When does Etc.sysconfdir() return nil?
<waxjar>
yep, case uses #===, and Class#=== Class returns false, but Class#=== Class.new returns true
gregf has quit [Quit: WeeChat 0.4.3]
Takle has quit [Remote host closed the connection]
shackleford has joined #ruby
iMe has quit [Ping timeout: 260 seconds]
<benlieb>
waxjar: ok, i see that you are right, my test passes. But I'm not sure I fully understand. What is calling the Class.new?
<waxjar>
It's just an example, makes an instance of Class
timonv_ has joined #ruby
beneggett has joined #ruby
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
benlieb: case calls the #=== method on the item in the when clause with the value provided in the case clause
<benlieb>
waxjar: but this: case resource when TheRightClass now works but resource is a TheRightClass instance, not the class itself.
<waxjar>
yes, that's how Class#=== works
<benlieb>
so I guess I don't get why say a lesson instance is === Lesson. Time to read up I guess :)
mercerist has quit [Ping timeout: 246 seconds]
<waxjar>
it checks if the other is an instance
<Mon_Ouie>
SomeClass === x is the same as x.is_a? SomeClass
<waxjar>
because now you're using #=== on the instance, not on the Lesson class
<noshi>
would it be a stupid idea, do you think, to override Kernel#warn to use a special logger?
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
<benlieb>
hm, this from SO: No, it's not like "could be equal, sorta". The comparison of the left and right sides of === changes, depending on what types the objects are; It's a context-sensitive comparison. You need to study and experiment with case/when or === in IRB to see it in action. 1===1 compares two Fixnum for equal values. (1..3)===1 looks in the range to see if 1 is included. It's much more than a simple equality test and because of the
<benlieb>
context-sensitive nature of it you can't necessarily substitute === and ==.
<benlieb>
or would you agree with these, also from SO: " Basically, it's a boolean operator which asks the question "If I have a drawer labelled a would it make sense to put b in that drawer?" "An alternative formulation is "If a described a set"would b be a member of that set?"
chrisramon has joined #ruby
techsethi has quit [Ping timeout: 250 seconds]
chrisramon has quit [Client Quit]
shackleford has quit [Ping timeout: 245 seconds]
techsethi has joined #ruby
magic has quit [Ping timeout: 264 seconds]
<noshi>
hm I think it's a nice idea. let's.
<noshi>
ty
* noshi
afk
<waxjar>
yeah, i don't see anything wrong with them benlieb
zz_jrhorn424 is now known as jrhorn424
bthesorceror has joined #ruby
<benlieb>
waxjar: yet again I'm baffled that I didn't understand this fundamental ruby thing. I've just found that: (1..5) === 1 => true 1 === (1..5) => false
ndrei has joined #ruby
jusmyth has left #ruby [#ruby]
mrsolo has joined #ruby
Zenigor has quit [Remote host closed the connection]
<jhass>
in the end it depends on what you call it on, different classes have different implementations
obs has joined #ruby
jay_ has joined #ruby
havenwood has quit [Remote host closed the connection]
<benlieb>
jhass: yeah, that's sounds a bit disastrous to me right now.
spyderma_ has quit [Remote host closed the connection]
icebourg has quit []
<waxjar>
you generally don't use #=== in your code directly
<jhass>
it's true for like all operators in ruby
HelperW_ has joined #ruby
<jhass>
even !
<waxjar>
in case statements it makes for pretty and clear code
IceDragon has joined #ruby
spyderman4g63 has joined #ruby
jprovazn has joined #ruby
rimenes has joined #ruby
<benlieb>
waxjar: I don't tend to have need for === in my code for some reason. Maybe that's because I didn't understand it. I guess case is the only time I'm forced to use it.
jxf has quit [Ping timeout: 240 seconds]
skolman has joined #ruby
<eam>
which equality method do you use to differentiate 0.0 and -0.0 ?
cy has joined #ruby
sparrovv has quit [Ping timeout: 250 seconds]
sepp2k has quit [Quit: Konversation terminated!]
<benlieb>
eam: unfortunately what you wrote turned into emoticons in my app..
janmuffino_ has quit [Ping timeout: 246 seconds]
definiv has joined #ruby
<eam>
benlieb: you need a better irc client :P floating point zero, and floating point negative zero
Zenigor has joined #ruby
<benlieb>
eam: yeah, that's something I do all the time :)
<yxhuvud>
waxjar: it is not wrong. It behaves as specified by standard.
einarj has quit [Remote host closed the connection]
claymore has joined #ruby
ringarin has joined #ruby
<yxhuvud>
the issue with comparing equality with floating point numbers is more that many operations isn't totally exact, meaning you get an error margin.
<yxhuvud>
(which may end up arbitrarily large)
matlle has joined #ruby
Zimgir is now known as FifthWall
Takle has joined #ruby
cocotton has quit [Remote host closed the connection]
Azulinho has quit [Ping timeout: 272 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
emmesswhy has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
sinkensabe has joined #ruby
W0rmDr1nk has quit [Ping timeout: 240 seconds]
cocotton has joined #ruby
OffTheRails has quit [Ping timeout: 260 seconds]
dawkirst_ has quit [Remote host closed the connection]
<freeone3000>
It won't end up arbitrarily large. In fact, it's fairly easy to calculate exactly how much error you have for any given operation, and it maxes out at 24 ulps.
<eam>
that's why it's an interesting question as to how to tell the difference
Squarepy has quit [Quit: Leaving]
PHP4Ever has quit [Quit: Leaving]
Dev-Gitter has quit [Quit: Leaving]
FarlaTux has quit [Quit: Leaving]
<wallerdev>
good morning
<eam>
the sign of a float value isn't a matter of precision
<eam>
it's a binary state
nanoyak has quit [Quit: Computer has gone to sleep.]
<freeone3000>
eam: That's the function I use, by the way. Positive one divided by positive zero is positive infinity, and positive one divided by positive zero is negative infinity.
gauravagarwalr has joined #ruby
amargherio has quit [Remote host closed the connection]
<freeone3000>
Err. Positive one divided by *negative* zero is negative infinity.
<wallerdev>
i cant think of a limit problem ive done where the answer was -0 haha
<jhass>
fun fact, it's true in my pry
<freeone3000>
wallerdev: Notation for a one-sided limit for x being negative and approaching zero is "x -> -0", so... yes.
<eam>
jhass: neat!
<wallerdev>
oh sure
<wallerdev>
approaching a limit from one side vs the other
matlle has quit [Ping timeout: 250 seconds]
claw has quit [Ping timeout: 264 seconds]
callenb_ has joined #ruby
<yxhuvud>
freeone3000: yes, any *single* operation has a bounded error, but if you have a whole series you may end up with cancellation errors that eat up all precision in no time.
techsethi has quit [Read error: Connection reset by peer]
lynxman has quit [Quit: leaving]
<eam>
wallerdev: then what is the value of x such that x / 0 = negative infinity?
<jhass>
negative 0 is positive 0, it's the same value. but -0.0 and 0.0 can be different because it can be a small value that's outside of the precision the float can represent
<wallerdev>
you can say the limit approaches negative infinity or something
<eam>
and I mean in math, not in integer/float computing
timonv_ has quit [Remote host closed the connection]
<wallerdev>
but without limits that problem isnt solvable
marr has quit [Ping timeout: 245 seconds]
ndrei has joined #ruby
<wallerdev>
theres no x / 0 = anything but undefined
rubydiamond is now known as zz_rubydiamond
relix has quit [Ping timeout: 240 seconds]
momomomomo has quit [Ping timeout: 263 seconds]
momomomomo_ is now known as momomomomo
hellangel7 has quit [Max SendQ exceeded]
alvaro_o has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
<eam>
but we do have limits
moritzs has joined #ruby
hellangel7 has joined #ruby
gauravagarwalr has quit [Remote host closed the connection]
<eam>
your statement is not categorically correct :)
relix has joined #ruby
<wallerdev>
yeah but you cant just apply limits to a problem that isnt defined as asking what the limit is lol
<eam>
well it's an open question across all fields
ybit has quit [Changing host]
ybit has joined #ruby
jonathan_alban has joined #ruby
Xeago has joined #ruby
ybit is now known as heath
<eam>
"usually it's not" is just another way of saying "sometimes it is"
amargherio has joined #ruby
zeroNones has joined #ruby
mikeric has quit []
f_vosberg has joined #ruby
f_vosberg has quit [Client Quit]
hellangel7 has quit [Max SendQ exceeded]
ndrei has quit [Ping timeout: 255 seconds]
niklasb has quit [Ping timeout: 260 seconds]
hellangel7 has joined #ruby
hellangel7 has quit [Max SendQ exceeded]
ndrei has joined #ruby
f_vosberg has joined #ruby
f_vosberg has quit [Max SendQ exceeded]
hellangel7 has joined #ruby
pandaant has quit [Remote host closed the connection]
f_vosberg has joined #ruby
mary5030 has quit [Remote host closed the connection]
f_vosberg has quit [Max SendQ exceeded]
InhalingPixels has joined #ruby
mercerist has joined #ruby
noeden has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
threesixes has joined #ruby
yfeldblum has joined #ruby
britneywright has joined #ruby
mercerist has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
djbkd has quit [Remote host closed the connection]
AlexRussia has joined #ruby
sambao21 has joined #ruby
diegoviola has quit [Ping timeout: 245 seconds]
nDuff has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has quit [Client Quit]
diegoviola has joined #ruby
cocotton has quit [Remote host closed the connection]
gerep has joined #ruby
mikepack has quit [Remote host closed the connection]
jimmyhoughjr has joined #ruby
<gerep>
Hi all. How can I turn this array: ["20777e12f2f94dc4cfab2f9590bc0c1f", "21a8fab89e41a2d3622879ad8e5c6bf7"] into a string like this: "20777e12f2f94dc4cfab2f9590bc0c1f", "21a8fab89e41a2d3622879ad8e5c6bf7" ?
<gerep>
I tried using join but it remove the " on each hash
mikepack has joined #ruby
<gerep>
I need each hash to be between ""
<gerep>
and separated by ,
pu22l3r_ has joined #ruby
<yxhuvud>
gerep: you are making no sense at all.
kaspergrubbe_ has joined #ruby
<gerep>
yxhuvud, why not?
aspires has quit []
yfeldblum has quit [Ping timeout: 264 seconds]
<gerep>
yxhuvud, my question wasn't clear? :)
<jhass>
.map {|hash| %Q{"#{hash}"} }.join(',')
<yxhuvud>
unless you are asking for Array#join
malcolmva has quit [Ping timeout: 246 seconds]
<wallerdev>
haha id just do map(&:inspect).join(', ')
mercerist has joined #ruby
Aaaal has quit [Quit: Aaaal]
mercerist has quit [Client Quit]
<gerep>
yxhuvud, the problem with Array#join is that it will return: "20777e12f2f94dc4cfab2f9590bc0c1f,21a8fab89e41a2d3622879ad8e5c6bf7", I need this: "20777e12f2f94dc4cfab2f9590bc0c1f", "21a8fab89e41a2d3622879ad8e5c6bf7"
<gerep>
jhass and wallerdev thanks I'll try thtat
AlexRussia has quit [Ping timeout: 240 seconds]
max06 has quit [Quit: Leaving.]
<freeone3000>
When does Etc.sysconfpath() return nil?
_sillymarkets has joined #ruby
<jhass>
not that this not sounds like some confusion about representation vs. value or not using the proper serializer
sambao21 has joined #ruby
orolo has joined #ruby
<_sillymarkets>
Has anyone used Scruffy before? Is it possible to label secondary y axis on the right side?
AlexRussia has joined #ruby
<_sillymarkets>
and graph to that axis?
andrewjanssen has joined #ruby
dopie has joined #ruby
<gerep>
jhass, what does the %Q stands for?
<jhass>
string literal
spyderma_ has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
<jhass>
with interpolation
<gerep>
jhass, thanks
mercerist has joined #ruby
agjacome has joined #ruby
lynxman has quit [Quit: leaving]
lynxman has joined #ruby
aspires has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
zorak has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
cocotton has joined #ruby
kriskropd has quit [Ping timeout: 255 seconds]
failshell has joined #ruby
kriskropd has joined #ruby
spyderman4g63 has quit [Ping timeout: 260 seconds]
hephaestus_rg has joined #ruby
momomomomo has quit [Quit: momomomomo]
AlSquire has quit [Ping timeout: 260 seconds]
jerikl has joined #ruby
iMe has quit [Ping timeout: 255 seconds]
mercerist has quit [Ping timeout: 264 seconds]
sdwrage has quit [Quit: Leaving]
agjacome has quit [Ping timeout: 250 seconds]
albedoa has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
IceDragon has quit [Ping timeout: 255 seconds]
IceDragon has joined #ruby
iMe has joined #ruby
jgrevich has joined #ruby
georgelappies has joined #ruby
yairgo has joined #ruby
yairgo has quit [Client Quit]
Ankhers has quit [Ping timeout: 264 seconds]
AlSquire has joined #ruby
yairgo has joined #ruby
sparrovv has joined #ruby
RandyT has quit [Ping timeout: 240 seconds]
timonv_ has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
cpt_yossarian has quit [Quit: Leaving]
Hobogrammer has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
SonicX has joined #ruby
zorak has joined #ruby
gerep has quit [Read error: Connection reset by peer]
PsionTheory has joined #ruby
testcore has joined #ruby
mikepack has quit [Remote host closed the connection]
gerep has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
tlarevo has quit [Remote host closed the connection]
ssvo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IceDragon has quit [Ping timeout: 240 seconds]
Sauvin has quit [Read error: Connection reset by peer]
IceDragon has joined #ruby
sambao21 has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
theo_ has quit [Remote host closed the connection]
sambao21 has joined #ruby
<autojack>
can anyon help me with a strange gem dependency conflict I have? I can't figure out where it's coming from. see http://pastebin.com/5JnZTNgF
krisquigley has joined #ruby
<autojack>
(may be a bundler-specific issue?)
Akagi201 has quit [Ping timeout: 250 seconds]
malcolmva has joined #ruby
txdv has quit [Read error: Connection reset by peer]
jfutbol has quit [Ping timeout: 255 seconds]
txdv has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
Neo-- has joined #ruby
omosoj has joined #ruby
aspires has quit [Ping timeout: 245 seconds]
KnownSyntax_ has quit [Read error: Connection reset by peer]
KnownSyntax_ has joined #ruby
Asher has quit [Quit: Leaving.]
KnownSyntax_ has quit [Read error: Connection reset by peer]
albedoa has joined #ruby
<jhass>
do you have a lock already?
<jhass>
*Gemfile.lock
sh1ken has joined #ruby
jxf has joined #ruby
anarang has joined #ruby
aspires has joined #ruby
mercerist has joined #ruby
mfmfmfmfmfmf has joined #ruby
agjacome has joined #ruby
mikeric has joined #ruby
<autojack>
yeah
<autojack>
but the 1.6.1.3 nokogiri is not mentioned in there.
<autojack>
and even deleting the lock and starting over results in the same problem.
<autojack>
my assumption is that one of the gems listed as a dependency in my gemspec has jumped to a newer nokogiri dep. but I don't know how to tell which one.
mercerist has quit [Client Quit]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saarinen has quit [Quit: saarinen]
djbkd has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HelperW_ has quit [Quit: Computer has gone to sleep.]
<autojack>
half the bundler commands won't even work because it immediately shows this error.
nug has quit [Ping timeout: 244 seconds]
HelperW_ has joined #ruby
aspires has quit [Ping timeout: 260 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<autojack>
aha, I can just comment out dependencies to help narrow it down...
<autojack>
there must be an easier way though.
<jhass>
what happens if you add gem 'nokogiri', '~> 1.5.0' or '~> 1.6.0' to your Gemfile directly?
<jhass>
does the message change?
malkomalko has quit []
<autojack>
well, it appears that s.add_dependency 'fog', '~> 1.15' is the problem.
emmesswhy has quit [Quit: This computer has gone to sleep]
ringarin has quit [Quit: Leaving]
emmesswhy has joined #ruby
<autojack>
but that version is really old, they are way ahead of that now.
<autojack>
I don't see why that would suddenly be requiring a newer nokogiri.
<autojack>
interesting question aboiut the Gemfile...
agjacome has quit [Ping timeout: 272 seconds]
Neo-- has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
fog has nokogiri ~> 1.5 locked, that does include 1.6
Wayneoween_ is now known as Wayneoween
atmosx has joined #ruby
sambao21 has joined #ruby
<autojack>
fg
aspires has joined #ruby
<autojack>
yeah I JUST realized, I think we need to lock ~> 1.15.0
Wayneoween has joined #ruby
Wayneoween has quit [Changing host]
<autojack>
not 1.15
jusmyth1 has joined #ruby
HelperW_ has quit [Ping timeout: 255 seconds]
skolman has quit [Remote host closed the connection]
gnarld_ has joined #ruby
<autojack>
hmm, maybe not.
olivier_bK has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
britneywright has joined #ruby
<autojack>
(this is all a pain because we're trying to maintain 1.8.7 support for this gem but various dependencies have started to break that)
yfeldblum has joined #ruby
<jhass>
~> 1.15 is >= 1.15 < 2, ~> 1.15.0 is >= 1.15.0 < 1.16
SonicX has quit [Ping timeout: 260 seconds]
<autojack>
yeah I get that much. although that change resulted in other dep issues. hrmmm. so basically I'm guessing a new release of fog now requires nokogiri 1.6.
<autojack>
let me try and work that out.
robustus has joined #ruby
jusmyth1 has left #ruby [#ruby]
gregf has joined #ruby
mikepack has joined #ruby
<jhass>
not according to rubygems.org
noop has joined #ruby
<autojack>
hm.
sinkensabe has quit [Remote host closed the connection]
<autojack>
yeah you're right.
<autojack>
wtf is going on then?
<jhass>
post your existing .lock please
<jhass>
and your bundle outdated
ghr has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<jhass>
and while we're at it bundle outdated --strict
<autojack>
OK.
lmickh has quit [Remote host closed the connection]
jay_ has quit [Read error: Connection reset by peer]
jay__ has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
<autojack>
I can't run bundle outdated because it just bails with the version conflict error.
<autojack>
I added the .lock contents to the pastebin.
mikepack has quit [Ping timeout: 260 seconds]
TrailerMonkey has joined #ruby
timonv_ has quit [Ping timeout: 272 seconds]
<autojack>
interestingly, it has now started saying it wants nokogiri nokogiri (1.6.0) instead of the explicit 1.6.3.1...
sincereness has joined #ruby
<autojack>
wonder what caused that to change.
vt102 has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
havenwood has quit []
wombo has joined #ruby
banjara has joined #ruby
<jhass>
where does console_app come from?
lidaaa has joined #ruby
bthesorceror has joined #ruby
<autojack>
oh sorry, that's an internal thing I meant to redact. pointlessly, really. but NOT requiring that doesn't get rid of the error.
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gerep has quit [Read error: Connection reset by peer]
<autojack>
i.e. I commented it out of the gemspec completely but I still get the dependency problem.
carraroj has quit [Ping timeout: 245 seconds]
TrailerMonkey has quit [Client Quit]
gerep has joined #ruby
m8 has joined #ruby
mikepack has joined #ruby
arup_r has quit [Quit: Leaving.]
Squarepy has joined #ruby
codecop has quit [Remote host closed the connection]
hooper has quit [Quit: Leaving.]
saarinen has joined #ruby
Xeago has joined #ruby
SonicX has joined #ruby
jerikl has joined #ruby
codecop has joined #ruby
codecop_ has joined #ruby
qmfnp has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
mikepack has joined #ruby
gsd has joined #ruby
codecop_ has quit [Client Quit]
itspots has joined #ruby
Cheezebox has quit [Remote host closed the connection]
Aaaal has joined #ruby
djbkd has joined #ruby
heftig has joined #ruby
Aaaal has quit [Client Quit]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
codecop has quit [Remote host closed the connection]
amargherio has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 250 seconds]
banjara has quit [Quit: Leaving.]
codecop has joined #ruby
chrishou_ has joined #ruby
claymore has joined #ruby
ghostmoth has joined #ruby
britneywright has joined #ruby
chrishough has quit [Ping timeout: 240 seconds]
omosoj has quit [Quit: Leaving]
sparrovv has quit [Ping timeout: 250 seconds]
nanoyak has joined #ruby
definiv has joined #ruby
shackleford has quit []
rtl_ is now known as rtl
Dr3amc0d3r|away has quit [Ping timeout: 245 seconds]
thams has quit [Quit: thams]
shackleford has joined #ruby
shackleford has quit [Read error: Connection reset by peer]
shackleford has joined #ruby
philcrissman has quit [Remote host closed the connection]
momomomomo_ has joined #ruby
amargherio has joined #ruby
yalue has quit [Quit: Leaving]
<autojack>
ok, I am extremely confused, but I have found the commit that breaks.
emmesswhy has quit [Quit: This computer has gone to sleep]
<autojack>
however, it's a one line change, and not to the gemspec or Gemfile.
ndrei has joined #ruby
<autojack>
seems to make nooooo sense.
guardian has left #ruby ["WeeChat 0.4.3"]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bearish has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 246 seconds]
momomomomo_ is now known as momomomomo
djbkd has quit [Remote host closed the connection]
anarang has quit [Ping timeout: 260 seconds]
michaeldeol has joined #ruby
kaspergrubbe_ has quit [Remote host closed the connection]
skolman_ has joined #ruby
Blizzy has joined #ruby
iMe has quit [Ping timeout: 272 seconds]
freeone3000 has quit [Quit: Konversation terminated!]
shackleford has quit [Remote host closed the connection]
iMe has joined #ruby
RandyT has quit [Ping timeout: 250 seconds]
Dr3amc0d3r|away has joined #ruby
<autojack>
finally figured it out
RandyT has joined #ruby
thams has joined #ruby
Sht0 has joined #ruby
<autojack>
it was something REALLY weird to do with this gem being installed inside of an rbenv.
<autojack>
a weird circular thing.
einarj has joined #ruby
pkrnj has joined #ruby
cDuff has joined #ruby
lmickh has joined #ruby
jhc76 has quit [Remote host closed the connection]
<autojack>
jhass: thanks for trying to help, I appreciate it!
shackleford has joined #ruby
cDuff has quit [Read error: Connection reset by peer]
cDuff has joined #ruby
wallerdev has quit [Quit: wallerdev]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
omosoj has joined #ruby
MrL0ngbowman has joined #ruby
Insanity133 has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
Ankhers has joined #ruby
cDuff has quit [Ping timeout: 240 seconds]
autojack has left #ruby [#ruby]
echevemaster has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
enebo has quit [Quit: enebo]
vramana has joined #ruby
CaptainJet has quit [Ping timeout: 260 seconds]
starless has joined #ruby
yfeldblum has joined #ruby
crdpink has joined #ruby
spider-mario has quit [Ping timeout: 245 seconds]
heftig has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
spider-mario has quit [Remote host closed the connection]
andrewjanssen has quit [Quit: Leaving...]
jack_rabbit has joined #ruby
andrewjanssen has joined #ruby
wombo has quit [Ping timeout: 255 seconds]
adamski2600 has joined #ruby
sepp2k has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
gnarld_ is now known as nug
mattmcclure has joined #ruby
jdguzman has joined #ruby
ssvo has joined #ruby
spider-mario has joined #ruby
DfAsuka has joined #ruby
claymore has quit [Ping timeout: 245 seconds]
vramana has quit [Quit: Page closed]
gaussblurinc1 has quit [Quit: Leaving.]
noop has quit [Ping timeout: 260 seconds]
pietr0 has quit [Quit: pietr0]
MrL0ngbowman has quit [Ping timeout: 240 seconds]
georgelappies has quit [Remote host closed the connection]
andrewjanssen has quit [Ping timeout: 245 seconds]
shackleford has quit [Remote host closed the connection]
kirun has joined #ruby
claymore has joined #ruby
rezzack has quit [Quit: Leaving.]
dorei has joined #ruby
rezzack has joined #ruby
jfutbol has joined #ruby
moritzs has quit [Ping timeout: 246 seconds]
cgaray has joined #ruby
momomomomo has quit [Ping timeout: 245 seconds]
doodlehaus has joined #ruby
moted has quit []
Jarboe has quit [Ping timeout: 260 seconds]
anarang has joined #ruby
timonv_ has joined #ruby
djbkd has joined #ruby
jay_ has joined #ruby
<benlieb>
is the only way to call a class method from inside an instance method to use the name of the class?
ghr has joined #ruby
<benlieb>
where both instance and class methods are in the same class.
dopie has quit [Remote host closed the connection]
heftig has joined #ruby
marr has joined #ruby
HelperW_ has joined #ruby
momomomomo has joined #ruby
phutchins has quit [Ping timeout: 250 seconds]
wallerdev has joined #ruby
<miah>
self.<foo> ?
jay__ has quit [Ping timeout: 240 seconds]
<dorei>
benlieb: you could use self.class.some_method
paulfm_ has joined #ruby
paulfm has quit [Ping timeout: 255 seconds]
<benlieb>
dorei: just found that too. tnx!
aspires has quit []
elaptics is now known as elaptics`away
timonv_ has quit [Ping timeout: 255 seconds]
gerep has quit [Ping timeout: 250 seconds]
djbkd has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 245 seconds]
claymore has quit [Quit: Leaving]
Kryptonic has joined #ruby
Kryptonical has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
CaptainJet has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HelperW_ has quit [Ping timeout: 260 seconds]
bthesorceror has quit [Quit: bthesorceror]
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paulfm has joined #ruby
rodfersou has quit [Quit: leaving]
Akagi201 has joined #ruby
cocotton has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
choke has quit [Read error: Connection reset by peer]
Cheezebox has joined #ruby
yfeldblum has quit [Remote host closed the connection]
paulfm_ has quit [Ping timeout: 240 seconds]
hellangel7 has quit [Read error: Connection reset by peer]
choke has joined #ruby
enebo has joined #ruby
emmesswhy has joined #ruby
Akagi201 has quit [Ping timeout: 240 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
yfeldblu_ has joined #ruby
cgaray has quit [Quit: Page closed]
bthesorceror has joined #ruby
qmfnp has joined #ruby
moted has joined #ruby
nobitano_ has joined #ruby
saarinen has quit [Quit: saarinen]
pkrnj has joined #ruby
Morkel has quit [Quit: Morkel]
MatthewsFace has joined #ruby
moted has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
djbkd has joined #ruby
moritzs has joined #ruby
nobitanobi has quit [Ping timeout: 260 seconds]
chrishough has joined #ruby
Cheezebox has quit [Remote host closed the connection]
moted has joined #ruby
agrinb has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
manzo has joined #ruby
Neo-- has joined #ruby
noeden has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Remote host closed the connection]
jprovazn has quit [Quit: Odcházím]
ptrrr has quit [Quit: ptrrr]
shackleford has joined #ruby
mikepack has joined #ruby
RichardLitt has joined #ruby
benzrf is now known as benzrf|offline
momomomomo_ has joined #ruby
sectionme has joined #ruby
nobitano_ has quit [Remote host closed the connection]
Squarepy has quit [Quit: Leaving]
Cheezebox has joined #ruby
Dreamer3 has joined #ruby
mikesplain has quit [Ping timeout: 272 seconds]
momomomomo has quit [Ping timeout: 245 seconds]
momomomomo_ is now known as momomomomo
paulfm_ has joined #ruby
bearish has joined #ruby
ramfjord has joined #ruby
paulfm has quit [Ping timeout: 250 seconds]
sectionme has quit [Ping timeout: 246 seconds]
hooper has joined #ruby
bearish has quit [Ping timeout: 240 seconds]
Bumptious has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agrinb has joined #ruby
linojon has quit [Quit: linojon]
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jay_ has quit [Remote host closed the connection]
sinkensabe has joined #ruby
Cope_ is now known as Cope
yxhuvud has quit [Ping timeout: 240 seconds]
linojon has joined #ruby
anarang has quit [Ping timeout: 255 seconds]
philcrissman has joined #ruby
agrinb has quit [Read error: Connection reset by peer]
agrinb has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
SonicX has quit [Ping timeout: 264 seconds]
Neo-- has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has joined #ruby
EminenceHC has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby
tectonic has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
fantazo has quit [Ping timeout: 240 seconds]
nanoyak has joined #ruby
tectonic has quit [Client Quit]
crdpink has quit [Ping timeout: 240 seconds]
crdprink2 has joined #ruby
nobitanobi has joined #ruby
chipotle has quit [Quit: cya]
IceDragon has joined #ruby
saarinen has joined #ruby
Wolland is now known as Wolland_afk
<EminenceHC>
I am trying to write some code to find the current bi-weekly pay period. Date.new(2014,8,25) is the monday the pay period starts. Date.new(2014,8,25).cweek => 35. So the pay period will always fall on an odd cweek. How can I create a date from the first monday of every odd cweek?
robbyoconnor has quit [Ping timeout: 250 seconds]
roolo has joined #ruby
<wallerdev>
is it true that it would always be odd?
shackleford has quit [Remote host closed the connection]
godd2 has joined #ruby
Ankhers has quit [Ping timeout: 264 seconds]
<waxjar>
would date.next_day(14) work?
jfutbol has quit [Remote host closed the connection]
ptrrr has joined #ruby
tectonic has joined #ruby
Spami has joined #ruby
aspires has quit []
ptrrr has quit [Client Quit]
jay_ has joined #ruby
duggiefresh has quit []
paulfm has joined #ruby
jfutbol has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<EminenceHC>
waxjar: That might not be now that I think about it, starting next year.
adamski2600 has quit []
<EminenceHC>
waxjar: What does date.next_day(14) do?
<EminenceHC>
waxjar: Oh i see now..
<waxjar>
returns a date 14 days from now
<EminenceHC>
wallerdev: It might not be always odd now that I think about it..
paulfm_ has quit [Ping timeout: 260 seconds]
<wallerdev>
yeah seems like it wouldnt be to me haha
<wallerdev>
adding 14 days sounds good though :)
benzrf|offline is now known as benzrf
Cheezebox has quit [Remote host closed the connection]
pu22l3r_ has quit [Ping timeout: 255 seconds]
Beoran__ has joined #ruby
nobitanobi has joined #ruby
lw has joined #ruby
<EminenceHC>
wallerdev: waxjar: So I could do Date.new(2014,8,25).next_day(14) which would give me the next monday of the pay period.. but three months from now how could I find the closest date that follows that format?
joshbamboo1 has quit [Quit: Leaving]
<wallerdev>
well if you have a start date you can always add 14 days to it til you get a date > than the current day
joshbamboo1 has joined #ruby
joshbamboo1 has quit [Remote host closed the connection]
<wallerdev>
and if its > 7 days then its the one before
momomomomo_ has joined #ruby
shackleford has joined #ruby
Ilyas has quit [Ping timeout: 255 seconds]
WildBamboo-Josh has joined #ruby
goodenough has joined #ruby
momomomomo has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
jfutbol has quit [Remote host closed the connection]
pandaant has joined #ruby
<wallerdev>
might be another strategy but that one seems like itd be quick enough
momomomomo has quit [Client Quit]
<waxjar>
you could use the step method: date.step(date.next_month(3), 14).to_a will give all pay-days in the next 3 months
Beoran_ has quit [Ping timeout: 260 seconds]
MrL0ngbowman has joined #ruby
paulfm has quit []
aspires has joined #ruby
<EminenceHC>
wallerdev: How would that look in code? A while statement?
<wallerdev>
date = 1/2/2003; while date.add_days(14) < Date.today; date = date.add_days(14); end
<wallerdev>
or something
<EminenceHC>
waxjar: Three months is just a number I threw out there. For any day in the future I want to be able to check which pay period it is in.
<wallerdev>
err
<wallerdev>
while date < Date.today sorry
<wallerdev>
added twice haha
<waxjar>
ah, I misunderstood
<EminenceHC>
waxjar: I wasnt clear enough.
<EminenceHC>
waxjar: Off topic but what does your name mean?
<wallerdev>
lol
<EminenceHC>
wallerdev: Thanks I will play around with that approach.
<waxjar>
i couldn't think of a nickname and there was some hairwax on my desk
<EminenceHC>
waxjar: LOL, I thought it meant the fun kind of wax.
definiv has quit [Quit: Lost terminal]
ghr has joined #ruby
spyderma_ has quit []
Neo-- has joined #ruby
Davedo has quit [Ping timeout: 250 seconds]
havenwood has joined #ruby
Neomex has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
mr_foobar_baz has joined #ruby
mr_foobar_baz has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
thams has quit [Quit: thams]
ghr has quit [Ping timeout: 250 seconds]
thams has joined #ruby
bmurt has quit [Ping timeout: 250 seconds]
Jackneill has quit [Ping timeout: 246 seconds]
Davedo has joined #ruby
Akagi201 has joined #ruby
mercerist has joined #ruby
nobitano_ has joined #ruby
lazyguru has left #ruby [#ruby]
jaffachief has quit [Quit: Connection closed for inactivity]
mercerist has quit [Client Quit]
mercerist has joined #ruby
nobitanobi has quit [Ping timeout: 260 seconds]
Akagi201 has quit [Ping timeout: 255 seconds]
qmfnp has joined #ruby
Ilyas has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
Ilyas has quit [Client Quit]
sailias has quit [Quit: Leaving.]
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
livingstn has quit []
Cheezebox has joined #ruby
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
sinkensabe has quit [Remote host closed the connection]
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
Cheezebox has quit [Remote host closed the connection]
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
Neomex has joined #ruby
jottr has joined #ruby
failshel_ has joined #ruby
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
emmesswhy has joined #ruby
eivindml has joined #ruby
CuriousMind has joined #ruby
Cheezebox has joined #ruby
eivindml has quit [Max SendQ exceeded]
<CuriousMind>
Hi.
<CuriousMind>
Hello.
<CuriousMind>
What channel can I go to for college?
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
<wallerdev>
like code school?
peret has joined #ruby
fold has joined #ruby
<havenwood>
CuriousMind: I don't know of any irc colleges. Hem.
momomomomo has joined #ruby
<atmosx>
Try #economics
eivindml has joined #ruby
<wallerdev>
or #cripplingdebt
eivindml has quit [Max SendQ exceeded]
ldnunes has quit [Quit: Leaving]
armyriad has quit [Ping timeout: 246 seconds]
<CuriousMind>
Havenwood! (⊙︿⊙)
Kricir has joined #ruby
<CuriousMind>
Has been a long time since I seen you, hi there.
federicobucchi has joined #ruby
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
<havenwood>
hi
<CuriousMind>
You probably don't know who I am since I changed my username. I am "Noob101", I decided to get a better name.
sambao21 has joined #ruby
<CuriousMind>
Hi havenwood.(◠‿◠)
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
teddyp1cker has quit [Remote host closed the connection]
<CuriousMind>
I need a channel to go to for college, I got bad news!
failshell has quit [Ping timeout: 264 seconds]
<atmosx>
?
failshel_ has quit [Ping timeout: 240 seconds]
<CuriousMind>
If anyone can give me a channel that allows those type of discussions then I would be more than happy to join the channel.
<CuriousMind>
A channel that talks about college.
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wallerdev>
i dont think theres anything on freenode for that
<wallerdev>
try another network
enebo has quit [Quit: enebo]
eivindml has joined #ruby
brothmars has quit [Ping timeout: 260 seconds]
eivindml has quit [Max SendQ exceeded]
dorei has quit [Ping timeout: 245 seconds]
kith_ is now known as kith
qwyeth has quit [Quit: Leaving]
sectionme has joined #ruby
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby
<havenwood>
CuriousMind: #r.trees
<CuriousMind>
Thank you havenwood! (◠‿◠)
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
<shevy>
#pr0nInCollege
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
<CuriousMind>
Awww, no one is in those channels.
<CuriousMind>
:(
<CuriousMind>
Ok, can I just ask the question here for crying out loud?
<atmosx>
CuriousMind: what do you wanna know about college anyway?
<jhass>
CuriousMind: /msg alis * -topic *college*
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
<CuriousMind>
Hi jhass, nice to see you and ok.
benlieb has quit [Read error: Connection reset by peer]
<CuriousMind>
So this is the thing folks.
* CuriousMind
takes a deep deep breath
<havenwood>
there're 141 people in #r.trees
<havenwood>
CuriousMind: ^
<CuriousMind>
Oh ok, I will check it out.
benlieb has joined #ruby
eivindml has joined #ruby
<CuriousMind>
So basically to cut the bullshit and get to the point.
eivindml has quit [Max SendQ exceeded]
linguini has joined #ruby
<CuriousMind>
I Morehouse college wants me.
<atmosx>
you can try on #linux too, I'm sure there are plenty of people there too.
Takle has quit [Remote host closed the connection]
dbasch has joined #ruby
gsd has joined #ruby
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
robbyoconnor has quit [Client Quit]
dbasch has quit [Client Quit]
<atmosx>
CuriousMind: do they want you to play on the basketball team or something?
eivindml has joined #ruby
sylvanica has quit [Quit: sylvanica]
eivindml has quit [Max SendQ exceeded]
sectionme has quit [Ping timeout: 240 seconds]
<CuriousMind>
atmosx, hmm. I don't know. Give me a second please.
<atmosx>
I'm off to bed, so you have more than a second ;-)
<atmosx>
night guys
<CuriousMind>
In the meanwhile, is that college bad? It's a historically black college and I don't like being around so many african americans.
mfmfmfmfmfmf has quit [Remote host closed the connection]
<linguini>
I've written a small gem to interpret a _very_ small language. And now I realize I want to interpret the same language in javascript. Are there any [realistic] alternatives to duplicating all the parsing logic in a javascript library?
eivindml has joined #ruby
eivindml has quit [Max SendQ exceeded]
<havenwood>
linguini: Have you looked at Opal?
mfmfmfmfmfmf has joined #ruby
FL1SK has quit [Read error: Connection reset by peer]
senayar has quit [Remote host closed the connection]
<linguini>
havenwood: I just found Opal a few minutes ago; I haven't read about it (yet).
<havenwood>
linguini: Why do you need it in javascript? For the browser?
armyriad has joined #ruby
atmosx has joined #ruby
FL1SK has joined #ruby
<linguini>
havenwood: Yes.
<wallerdev>
yeah just use a parser generator
<wallerdev>
can use the same rules to generate for both languages
pandaant has quit [Quit: Lost terminal]
<linguini>
racc/yacc == parser generators?
sparrovv has quit [Ping timeout: 272 seconds]
jxf has quit [Ping timeout: 246 seconds]
atmosx has quit [Remote host closed the connection]
nobitano_ has quit []
<shevy>
I assume foo = [] is worse than foo.clear if foo already is an array?
jerikl has quit [Quit: jerikl]
mfmfmfmfmfmf has quit [Ping timeout: 272 seconds]
SCHAAP137 has joined #ruby
tvw has quit []
gccostabr has quit [Quit: ZZZzzz…]
<jhass>
shevy: just not the same thing
tectonic has quit []
benzrf|offline is now known as benzrf
_cake has joined #ruby
andrewlio has quit [Quit: Leaving.]
<wallerdev>
depends what you want to do haha
<shevy>
well I initialize an object to its default state
<shevy>
next I fill up the array
<shevy>
and sometimes I need to empty it again
<wallerdev>
all references to the array will be cleared if you do .clear, if you assign to [] then itll just change what that variable points to
Xeago has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
jay_ has quit [Remote host closed the connection]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<linguini>
foo = bar = [:a]; foo.clear ; foo + bar
<linguini>
foo = bar = [:a]; foo = [] ; foo + bar
treehug88 has quit []
ruby-lang038 has joined #ruby
diegoviola has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
<shevy>
but what if the array already was assigned?
<wallerdev>
tbh i never use clear
<wallerdev>
lol
<shevy>
startup is different from when it is running (it's a jukebox actually)
sparrovv has joined #ruby
<shevy>
yeah
<wallerdev>
if you need all references to be cleared then use clear
skolman_ has quit [Remote host closed the connection]
_sillymarkets has quit [Ping timeout: 246 seconds]
lxsameer has quit [Quit: Leaving]
ghr has joined #ruby
yfeldblu_ has quit [Ping timeout: 240 seconds]
dbasch has joined #ruby
<zeroNones>
I'm reading the Computer Science Programming in Ruby and its talking about for loops. It gives me an example of for i in (0..5) etc. when I say for i is the for essentially asigning i as a variable?
benlieb has quit [Quit: benlieb]
<wallerdev>
lol
<wallerdev>
no one uses for loops in ruby
<wallerdev>
get a new book
mercerist has quit [Quit: Computer has gone to sleep.]
kaspergrubbe_ has joined #ruby
<zeroNones>
That might be so wallerdev but its probably a good idea to understand it
<shevy>
Lewix so that we have one language that beats php
orolo has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 272 seconds]
<shevy>
zeroNones not needed, everybody uses .each
<wallerdev>
but yes it will assign i to the next number in the range with each loop
<waxjar>
yeah, for actually assigns the variable
nanoyak has quit [Quit: Computer has gone to sleep.]
<wallerdev>
so it will run 6 times
<wallerdev>
0, 1, 2, 3, 4, 5
yfeldblum has joined #ruby
<shevy>
just use .each, you won't need to count
<zeroNones>
ok great thanks for the answer
<shevy>
or go the python way
<shevy>
for x in y in z slay_kittens(lambda in a)
<zeroNones>
I understand what it does but I never seen a varaible be assigned like that
<waxjar>
you're probably never gonna need it, unless you need to micro-optimize
<shevy>
yeah, it will stick out in your ruby code
<zeroNones>
it was always i = ...
senayar has joined #ruby
<shevy>
oh yes, speed savvy people use for loops
ssvo has quit [Ping timeout: 255 seconds]
earthquake has joined #ruby
nanoyak has joined #ruby
<matti>
loopy-shevy
ghr has quit [Ping timeout: 240 seconds]
<wallerdev>
yeah it's just a special syntax in ruby to assign a variable to a series of numbers in a loop
<zeroNones>
thanks wallerdev
rimenes_ has joined #ruby
<wallerdev>
most people would write that as (0..5).each { |i| puts i }
dblessing has quit [Quit: dblessing]
<havenwood>
puts *0..5
ssvo has joined #ruby
<wallerdev>
sure haha but trying to relate it to his exact example
<ruby-lang038>
to exclude the 5, do 0...5
<wallerdev>
please dont lol
<wallerdev>
just write (0..4) haha
<ruby-lang038>
3 dots is bad practice?
<waxjar>
it's easily skipped over
<wallerdev>
eh i never use 3 dots
Akagi201 has joined #ruby
<shevy>
I use 4 dots
<wallerdev>
just such a small subtlety, easy to miss
Takle has joined #ruby
<wallerdev>
and id never use it with literals
<waxjar>
i use 1 dot
nanoyak has quit [Client Quit]
jottr has joined #ruby
yfeldblum has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
rimenes has quit [Ping timeout: 272 seconds]
naw has quit [Remote host closed the connection]
dbasch has quit [Quit: dbasch]
<Lewix>
shevy: i dont get it\
<Lewix>
shevy: whats the thing about stroll
<shevy>
stroll!
<shevy>
a troll is hiding
Kricir has quit [Remote host closed the connection]
Aranshada|W has quit [Ping timeout: 245 seconds]
renderful has joined #ruby
<shevy>
hiding in a string like it might be hiding under a bridge
<shevy>
have you not learned in school about the trolls?
amargherio has quit [Remote host closed the connection]
naw has joined #ruby
<waxjar>
looks like #each is even slightly faster than for on 2.1, unless I'm doing something wrong