<joshu>
yes all five take calls and make calls. but making calls doesn't come into play in our discussion. It's the incoming calls during office hours that are the issue I'm trying to solve
<pontiki>
joshu: let me tell you something. the problem is a social one. it won't be solved by technology.
<joshu>
pontiki I totally agree with you
humbolt has quit [Quit: Leaving.]
<pontiki>
much as they may all like this notion of never having to log in/out, there will come a time if this is in place where it will not work for them in just as bad a way as whatever system is in place now
<pontiki>
so, i guess i feel a little sad for your situation
<pontiki>
right now, if i were The Doctor, i'd take your hand and yell "RUN"
<joshu>
pontiki It's stupid but it's not something I can control as much as I'd like. The previous system of logging/in out has been in place for almost 2 years and despite repeated reminders some not all forget to do it, so as the technical guy in charge I'm trying to find a technical solution which helps as best I can.
<joshu>
pontiki lol
<pontiki>
how secure is your employment? how secure do you need it to be? these are the questions
<pontiki>
i have the advantage of age and treachery
anonymuse has joined #ruby
heftig has quit [Ping timeout: 264 seconds]
<pontiki>
so it's kind of easy to tell people "this isn't going to solve your problem."
idlemich1el has left #ruby [#ruby]
<joshu>
so my system has been working ok for 2 weeks just that I need to recfactor the code in such a way that the time matching is not global as I have it now but user defined with the possibility of overriding when needed
<pontiki>
easy for me*
<pontiki>
yeah, ok
devoldmx has quit [Quit: Bye]
heftig has joined #ruby
devoldmx has joined #ruby
aryaching has joined #ruby
<pontiki>
is this a web app?
<pontiki>
so, rails-ish?
xcv has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
<pontiki>
doesn't have to be
devoldmx has joined #ruby
<joshu>
well I'm looking for new work opportunities but it's not due to this project specifically. I'm trying to get more into dev and leave sysadminish stuff behind but that's a different discussion ;)
<pontiki>
(and sorry for being all earnest hemingway with my lines. i'm just having bursty thoughts)
xcv has joined #ruby
<joshu>
no worries I appreciate the discussion!
<pontiki>
yupyup, good, we leave that one for laterz
<pontiki>
see, i'd do something like this:
<joshu>
at the moment it's a ruby app which is hosted in the telephony cloud provider Tropo.
rcosta has quit [Remote host closed the connection]
<pontiki>
right
<pontiki>
the shift start and end need some structure as well
<joshu>
I'm still unsure how each user's "shift" or office hours would be defined. If I understand your Shift structure then :shift_start and "shift_end would be some like :shift_start => 8:30 and :shift_end => 17:00. How would I "remove" the lunch hour 12:00 - 13:00 and specify different hours for different weekdays…hmm
tealmage has joined #ruby
<pontiki>
not quite; but close
<pontiki>
that's what i was alluding to
nari has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
<pontiki>
you need basically you need the day of week, and the time for each end of the shift (start and end)
<pontiki>
and a method that will convert that into something that can be compared easily with the current date and time
<pontiki>
thinking as i type
zeade has joined #ruby
fridim__ has joined #ruby
zeade has quit [Client Quit]
rcosta has joined #ruby
keyvan has joined #ruby
jokke1 has quit [Read error: Operation timed out]
thomasvs has quit [Read error: Operation timed out]
henn1nk has quit [Read error: Operation timed out]
preller_ has quit [Read error: Operation timed out]
<joshu>
so the @shifts array is an array of Shift structs? so if we take User 1 that array would look like [ Shift.new(Monday, 8:30, 12:00), Shift.new(Monday, 13:00, 17:00) ]
preller has joined #ruby
jokke1 has joined #ruby
henn1nk has joined #ruby
sallybeckerman has joined #ruby
jrobeson has quit [Read error: Operation timed out]
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
jrobeson has joined #ruby
qhartman has quit [Read error: Operation timed out]
dodosan has quit [Remote host closed the connection]
<sallybeckerman>
Can someone help me troubleshoot validating my Jekyll-based blog with Technorati? I'm placing the token on my blog but Technorati is not finding it still, for some reason. I can't isolate the problem.
qhartman has joined #ruby
zacts has quit [Ping timeout: 256 seconds]
caju has joined #ruby
<sallybeckerman>
i've made a similar connection with a wordpress blog but can't seem to do it with jek
zacts has joined #ruby
SteveBenner9 has joined #ruby
h4mz1d has joined #ruby
h4mz1d has quit [Max SendQ exceeded]
h4mz1d has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
hamakn has joined #ruby
justsee has quit [Ping timeout: 246 seconds]
JimmyNeutron has quit [Quit: Leaving]
axeman- has joined #ruby
axl_ has joined #ruby
gstamp has quit [Read error: Connection reset by peer]
aryaching_ has joined #ruby
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
tkuchiki has joined #ruby
xcv_ has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
gstamp has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
<joshu>
ok i'm off to bed good night! Thanks pontiki for your help maybe we can continue tomorrow if you're around ;)
Rym_ has joined #ruby
snovak has joined #ruby
brunoro has joined #ruby
Rym has quit [Ping timeout: 246 seconds]
Rym_ is now known as Rym
iliketur_ has quit [Quit: zzzzz…..]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
xcv has quit [Ping timeout: 268 seconds]
Mon_Ouie has quit [Ping timeout: 276 seconds]
larissa has joined #ruby
diegoviola has joined #ruby
dLog has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
snovak has quit [Read error: Operation timed out]
chrisja has quit [Quit: leaving]
tyfighter has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
staafl_123 has joined #ruby
DanBoy has joined #ruby
cloke has quit [Quit: cloke]
<mostlybadfly>
hola
staafl_alt has quit [Ping timeout: 240 seconds]
<mostlybadfly>
i figured out my first few problems and having a good time lol
brunoro has quit [Quit: WeeChat 0.3.8]
brennanMKE has joined #ruby
michaeldeol has quit [Remote host closed the connection]
ryandeussing has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
andrew565 has joined #ruby
axl_ has quit [Quit: axl_]
ryandeussing has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
emergion has joined #ruby
keyvan has quit [Ping timeout: 256 seconds]
mmitchell has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
wmoxam has joined #ruby
brennanMKE has quit [Ping timeout: 264 seconds]
love_color_text has joined #ruby
nogal has joined #ruby
ryandeussing has quit [Ping timeout: 256 seconds]
thesheff17 has quit [Ping timeout: 248 seconds]
<nogal>
hello.. im having a strange issue which i just cant work out. I have a line within a function which reads from a file. it works, however if i call that function from another function, it gives me a File not found... what was the way to fully inspect a variable as that is the only thing which could have possibly have an issue?
tealmage has quit [Remote host closed the connection]
<nogal>
i cant seem to locate it in the docs, but i know i used it a few months back
emergion has quit [Ping timeout: 260 seconds]
neiled has joined #ruby
duracrisis has joined #ruby
endash has quit [Quit: endash]
rburton- has quit [Quit: Leaving...]
caju has quit [Remote host closed the connection]
pitzips has quit [Ping timeout: 256 seconds]
tealmage has joined #ruby
<Rym>
nogal: are you looking for blah.inspect ?
<nogal>
quite possibly /me goes to check docs
mengu_ has joined #ruby
zph has joined #ruby
<nogal>
thank you!
<nogal>
i couldnt find that for the life of me
vlad_starkov has joined #ruby
ewnd9 has joined #ruby
MrZYX is now known as MrZYX|off
<Rym>
:) no problem
mengu has quit [Read error: Connection reset by peer]
tealmage has quit [Remote host closed the connection]
zph has quit [Client Quit]
mengu_ has quit [Client Quit]
love_color_text has quit [Ping timeout: 240 seconds]
jonathanwallace2 has quit [Ping timeout: 240 seconds]
xcv_ has quit [Remote host closed the connection]
soulcake has quit [Ping timeout: 248 seconds]
sevenseacat has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
duracrisis has quit [Changing host]
duracrisis has joined #ruby
burlyscudd has joined #ruby
soulcake has joined #ruby
duracrisis has quit [Quit: Leaving]
eka has quit [Quit: Computer has gone to sleep.]
duracrisis has joined #ruby
thesheff17 has joined #ruby
duracrisis_ has joined #ruby
fenicks has quit [Remote host closed the connection]
duracrisis has quit [Client Quit]
love_color_text has joined #ruby
caju has joined #ruby
havenwood has joined #ruby
burlyscudd has quit [Ping timeout: 276 seconds]
Mekkis has quit [Remote host closed the connection]
iliketur_ has joined #ruby
nari has joined #ruby
_maes_ has joined #ruby
__maes_ has joined #ruby
Quashie has joined #ruby
ivanf has joined #ruby
<ivanf>
Hiya all
ewnd9 has quit [Read error: Operation timed out]
stuartrexking has quit [Quit: Leaving...]
<ivanf>
<- Newbie here. I want to ask is Ruby a good programming language for a first timer who has just simple HTML experince and really not much more.
Megtastique has joined #ruby
<havenwood>
ivanf: Yes, perfect for that. There are some great starter guides and Ruby gives you tons of room to keep learning in the language.
momomomomo has joined #ruby
<Rym>
It's good for it, but if you've got friends who can program it might be worth picking up whatever they know, unless it's PHP, then you need new friends
<havenwood>
ivanf: A popular recommendation for folks just starting coding is Learn to Program by Chris Pine: http://pine.fm/LearnToProgram/
adeponte has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
jonathanwallace2 has quit [Ping timeout: 245 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
io_syl has quit [Quit: io_syl]
Chat7211 has joined #ruby
<Chat7211>
hey
Chat7211 has left #ruby [#ruby]
mlpinit has quit [Remote host closed the connection]
andrew565 has quit [Quit: andrew565]
Dekade has joined #ruby
ryandeussing has joined #ruby
zenergi has joined #ruby
zenergi has quit [Client Quit]
mary5030 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<Dekade>
question: I'm trying to create a little app that will help me save some data so I can go through it more easy later, nothing big. For now I'm saving some key/value pairs in a hash and push it to an array. The thing I'm so bothered with is that I can't get the array to display all the key/value pairs without the brackets and stuff, I know pretty noobish :p I'm kind of new so.
<xybre>
Dekade: Why put it in an array? Keep it in the hash.
hakunin has quit [Ping timeout: 256 seconds]
hakunin has joined #ruby
<xybre>
Dekade: Then you can do this my_hash_of_stuff.each {|key, value| puts "My key: #{key}", "My value: #{value}"} to display it.
snath has quit [Ping timeout: 276 seconds]
<Dekade>
I understand, I was trying to do that on the array lol
<Dekade>
shouldn't that work also? like my_hash.each.each? or am I getting it wrong
osvico has quit [Ping timeout: 246 seconds]
<Dekade>
ehh my_array.each.each*
<Dekade>
when I push hashes to my array?
nogal has quit [Ping timeout: 240 seconds]
<xybre>
You don't use .each.each
<xybre>
MAybe an example of what you're trying to do would help. Gist?
bleubeard has joined #ruby
P1RATEZ has quit [Quit: Read error: Text overflow]
radic__ has joined #ruby
anonymuse has joined #ruby
breakingthings has quit [Quit: breakingthings]
baroquebobcat has joined #ruby
radic_ has quit [Ping timeout: 245 seconds]
snovak has joined #ruby
mary5030 has quit [Remote host closed the connection]
rezzack has quit [Quit: Leaving.]
neiled has joined #ruby
oddraisin has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
cj3kim has joined #ruby
baroquebobcat has quit [Client Quit]
DanKnox is now known as DanKnox_away
dankest has quit [Quit: dankest]
lyanchih has joined #ruby
dankest has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
cj3kim has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 256 seconds]
solrize_ has quit [Ping timeout: 245 seconds]
cj3kim has joined #ruby
adeponte has joined #ruby
ryandeussing has joined #ruby
pweems has joined #ruby
St_Marx has joined #ruby
adeponte has quit [Remote host closed the connection]
neiled has quit [Ping timeout: 240 seconds]
ryandeussing has quit [Ping timeout: 264 seconds]
hadees has quit [Quit: hadees]
wesside has quit [Quit: I think I heard an ice cream truck..]
Spami has quit [Quit: This computer has gone to sleep]
hasrb has joined #ruby
SJr has quit [Ping timeout: 240 seconds]
baroquebobcat has joined #ruby
deol has quit [Remote host closed the connection]
pyx has joined #ruby
pyx has quit [Client Quit]
pweems is now known as justweems
justweems is now known as weeems
SJr has joined #ruby
weeems is now known as unlovedweems
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
Targen has joined #ruby
krz has quit [Quit: krz]
unlovedweems is now known as pweems
aeontech has quit [Quit: aeontech]
axeman- has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
pen has quit [Remote host closed the connection]
huoxito has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
Lewix has joined #ruby
mikepack has joined #ruby
mansi has quit [Ping timeout: 268 seconds]
zachrab has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
bsaboia_ has joined #ruby
burlyscudd has joined #ruby
lyanchih has quit [Quit: lyanchih]
Dekade has quit []
alvaro_o has quit [Quit: Ex-Chat]
marsLantern has joined #ruby
rmcafee has joined #ruby
dodosan has joined #ruby
burlyscudd has quit [Ping timeout: 264 seconds]
hasrb has quit [Remote host closed the connection]
pen has joined #ruby
<pontiki>
joshu: still up?
baroquebobcat has quit [Quit: baroquebobcat]
krz has joined #ruby
<pontiki>
guess they went to bed...
postmodern has quit [Quit: Leaving]
mrsolo has joined #ruby
bsaboia_ has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
fridim__ has quit [Ping timeout: 240 seconds]
priyam_ has quit [Quit: Connection closed for inactivity]
dodosan has quit [Ping timeout: 240 seconds]
ravster has quit [Quit: Leaving.]
akells`` has quit [Remote host closed the connection]
jerome__ has joined #ruby
postmodern has joined #ruby
UnderCrux has joined #ruby
<jerome__>
hello all
<staafl_123>
what's the most eloquent way to count gsub!'s substitutions
<jerome__>
someone now how to really delete a ref to an object from a variable ?
<bnagy>
staafl_123: use the block form and increment a counter?
<staafl_123>
bnagy, yeah, that's valid
<jerome__>
staafi, i think it is to create a method for do it easy
<bnagy>
jerome__: well you can set it to nil
<bnagy>
but if this is a GC question that won't automatically trigger GC
brianpWins has quit [Quit: brianpWins]
<jerome__>
binagy, no, make it nil doesn't unref the variable
<jerome__>
and then, i can not do it from the object inside the variable
<jerome__>
.destroy not works
<bnagy>
uh
<bnagy>
a=b, a is a ref to b. a=nil -> "deletes" that reference
<bnagy>
or as close as you can in ruby
<bnagy>
if that's the last ref to b it's eligible for GC now, but no guarantees as to when it will happen
<jerome__>
the only way i arrived is to round the problem by, inside the object, make an other instance variable to nil and ask the instance method ".nul?" for this variable (from anywhere) question of the variable
<jerome__>
binagy, not really
<jerome__>
close same...
yxhuvud2 has joined #ruby
<jerome__>
not really works, because all the other instance herit from other object stay, and the object inside is not really unreferenced
yxhuvud has quit [Ping timeout: 264 seconds]
<bnagy>
I don't know what you're talking about with 'object inside' etc
brianpWins has joined #ruby
<bnagy>
write some short code to illustrate?
<jerome__>
i have this problem from a code with wxruby2 that call a method (who is in an other file) from a class and attribute it to a instance variable of this class (this methode open a window)
<jerome__>
so, inside this instance variable, there is an object (a method) who contain all the windows and there own widgets and instances vars
<bnagy>
well with some C extension / FFI stuff you really have no choice but to manually free your unmanaged objects
<jerome__>
from this window, if i want to close, it is really complicate... seems like to closed visually, but in fact not really.
<bnagy>
but it depends how to extension / wrapper is written
mrsolo has quit [Quit: This computer has gone to sleep]
<jerome__>
i would like to not kill a proc for do it...
osvico has joined #ruby
mlpinit has joined #ruby
<bnagy>
usually with wrappers around native stuff I just create a destroy or close or whatever method in the high level wrapper
<jerome__>
yes, sure, i do it also...
jonathanwallace2 has joined #ruby
brennanMKE has joined #ruby
<jerome__>
but in the reallity, the proc is always on the memory
bleubeard has quit [Remote host closed the connection]
<jerome__>
and then, if you ask from class for the var class, it retrun a WXobject class
<jerome__>
and inspect it return all the other var wxobject and ruby object... but it said when error that there are deleted...
<jerome__>
strange
mlpinit has quit [Read error: Operation timed out]
<jerome__>
deleted, but present
<bnagy>
.. yeah code would definitely help here
brianpWins has quit [Read error: Connection reset by peer]
<jerome__>
do you want it ?
<bnagy>
basically, avoid trying to write ruby finalizers, they are a massive pain in the ass
<bnagy>
make sure your high level code tells the low level code to free stuff before it gets deref'ed
<bnagy>
then you should be OK
dv_ has quit [Read error: Operation timed out]
<jerome__>
yes, it is not my level to arrived to do it easy.
<jerome__>
so, my apps works, but i see it is not clean due to the memory obstruction
mary5030 has quit [Remote host closed the connection]
<bnagy>
you also have to be careful diagnosing 'leaks' because a lot of the time the combination of lazy ruby GC and lazy OS ( native ) GC makes it look like there are leaks when there really aren't
<bnagy>
I have wasted weeks like that
dv_ has joined #ruby
<jerome__>
hat is not easy is because the code is divide by files... for cohesion and build comprehension acces...
<jerome__>
i'm on OSX
<bnagy>
you could try setting a test box to low memory and running your app in a loop for a long time, to see if it _actually_ runs out of memory
<bnagy>
or failing that, valgrind :/
fuzai has quit [Quit: No Ping reply in 180 seconds.]
fuzzy has joined #ruby
<jerome__>
i turn around it to limit the memory access by give the same ref to an other windows opened after close... like that, i'm sure there is not obstruction more....
<jerome__>
what is valgrind ?
<bnagy>
the trouble with ruby finalizers is that it's horribly easy to mess up and then the finalizer keeps a ref to the object, and so it can never get GC'd which makes the whole thing worse
<bnagy>
valgrind is a unix tool for identifying and troubleshooting all kinds of memory issues
<bnagy>
including leaks
wallerdev has quit [Quit: wallerdev]
lyanchih has joined #ruby
<jerome__>
ok thanks, i look for this tool
joshu_ has joined #ruby
nhhagen has quit [Read error: Operation timed out]
<jerome__>
with my osx tools i can also see the use of proc memory... i do it
snovak has joined #ruby
edwardly has quit [Read error: Operation timed out]
<jerome__>
but maybe, i imagine that valgrind will be better for more precision
<bnagy>
yeah but that can be a bit deceptive, as I said
rmcafee has quit [Quit: rmcafee]
onewheelskyward has quit [Read error: Operation timed out]
adeponte has joined #ruby
ozzloy has quit [Read error: Operation timed out]
<jerome__>
ok binagy, thanks for informations
ozzloy has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
edwardly has joined #ruby
nhhagen has joined #ruby
onewheelskyward has joined #ruby
trinode_away has quit [Ping timeout: 256 seconds]
hamakn has quit [Remote host closed the connection]
snovak has quit [Read error: Operation timed out]
trinode_away has joined #ruby
joshu has quit [Ping timeout: 256 seconds]
trinode_away is now known as trinode
<jerome__>
so, except of this (due to MY low level knows), i'm really happy with ruby to be able with to write a GUI app with MySQL and WxWidgets (14 tables, also windows) quiclky and with not too much lines of codes (really good for this)
hamakn has joined #ruby
pen has quit [Read error: Connection reset by peer]
lyanchih has quit [Client Quit]
<bnagy>
which gems are you using for the GUI stuff?
<jerome__>
i look this...
pen has joined #ruby
<jerome__>
2.0.6 and ruby-1.9.3-p448
<jerome__>
for the compatibility with the only one wxruby top up i can find for my OSX i386
<jerome__>
and i see that is the optimal compatibility for other os
<jerome__>
really not easy to install it...
sambao21 has quit [Quit: Computer has gone to sleep.]
<jerome__>
and to be working perfect with aptana/eclipse due to the all dependenses
caju has quit [Remote host closed the connection]
<jerome__>
and the lake of information in all the packages way...
hamakn has quit [Ping timeout: 268 seconds]
<jerome__>
i choose rvm to do it for the easy way to change the ruby versus with rails app
neiled has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
<bnagy>
eclipse, rvm and rails
<bnagy>
good luck! :D
<jerome__>
yes
saml_ has joined #ruby
<jerome__>
it works like a charm... after ONE WEEK of installation !!!!
<saml_>
system_orig = system ; def system(cmd) print cmd; system_orig(cmd) end
hamakn has joined #ruby
<saml_>
how do I do this? it tries to call system on system_orig = system
<saml_>
i want to re-define function system. but still use original system
zorg24 has quit [Ping timeout: 256 seconds]
<jerome__>
saml_, in ruby, all is object, so you need to find wich instance of wich object you need to do it, and then create a singleton to mount on the instance method you want to arrange
<saml_>
wat?
<jerome__>
yes, a function is an instance of an object... a method instance i presume for your use.
<bnagy>
system is defined in Kernel, but monkeypatching Kernel is a horrible idea
<saml_>
how can I re-define functions?
neiled has quit [Ping timeout: 256 seconds]
<sevenseacat>
lol
<saml_>
i just want to print out what command this ruby script is actually running
<bnagy>
also, you can't just assign a method to a variable exactly like that
<bnagy>
you'd want to redefine system, do your print and then 'super'
<saml_>
is there set -x or similar?
<jerome__>
the best way will be, i think, to write an other one... like a singleton
<saml_>
in bash , set -x prints out bunch of stuff that its doing
<jerome__>
puts ?
yfeldblum has quit [Ping timeout: 264 seconds]
<saml_>
i'm no ruby programmer...
<jerome__>
or, verbos option in console mode...
senayar has quit [Remote host closed the connection]
<saml_>
is it hard to actually do this?
<saml_>
could you show me plainly instead of quizzing?
<jerome__>
what is set -x ?
Rym has quit [Ping timeout: 268 seconds]
<jerome__>
do you have an exemple
<jerome__>
?
<saml_>
script calls system(x) a lot
<saml_>
every time it calls, i want to print out value of x
Spami has joined #ruby
Spami has joined #ruby
<saml_>
so i thought i'd redefine system()
<jerome__>
with a method or with a class ?
<jerome__>
from where ?
<jerome__>
that's depend from where...
<saml_>
within a method, it calls system()
<saml_>
i'll just s/system/mysystem/ and define mysystem
<jerome__>
do you need something like: var.function(x) (with return or not ?) or just a call
<jerome__>
create a module: module Name
<saml_>
i have no idea what that means
<jerome__>
and a instance method inside: def Name.what_i_need
* sevenseacat
gets popcorn
<saml_>
but thanks. sed -i 's/system/mysystem/g' x.rb and i put def mysystem(cmd) f(); system(cmd) end
<saml_>
that works
<jerome__>
and from out, you can call it like that: Name.what_i_need
<bnagy>
wtf you can't super in Kernel :<
<jerome__>
ok saml_
saml_ has quit [Quit: Leaving]
wallerdev has joined #ruby
<jerome__>
bnagy, what IDE did you use for ruby and rails ?
<jerome__>
which sorry...
<bnagy>
I don't do rails. I use Sublime Text, which isn't really an IDE
<bnagy>
few ruby people use IDEs
momomomomo has quit [Quit: momomomomo]
<jerome__>
ok
tomzx_mac_ has quit [Ping timeout: 268 seconds]
vlad_starkov has joined #ruby
UnderCru1 has joined #ruby
ewnd9 has joined #ruby
michaeldeol has joined #ruby
<jerome__>
and then, what did you do for debug easy or for see your vars in time ?
<bnagy>
p
UnderCrux has quit [Quit: leaving]
UnderCru1 has quit [Client Quit]
<SteveBenner9>
look at Jetbrains RubyMine
<jerome__>
you write codes inside, is it ?
<SteveBenner9>
for an IDE
ananthakumaran has joined #ruby
<jerome__>
are there free ?
<bnagy>
yeah p is short for puts someobj.inspect
<SteveBenner9>
no but its by far worth it. There is a cheap academic only version
<jerome__>
yes, i know
<SteveBenner9>
submlime you can evaluate for free
<SteveBenner9>
indefinitely
<sevenseacat>
lol rubymine
<jerome__>
i use it for read instance_methods
<jerome__>
and methods
UnderCrux has joined #ruby
<SteveBenner9>
WAT sevenseacat
hadees has joined #ruby
<jerome__>
ok, i will take a look on rubymine
<SteveBenner9>
rubymine is the tits
anonymuse has quit [Remote host closed the connection]
zer0px has joined #ruby
Z3tta has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
brennanMKE has quit [Remote host closed the connection]
AlHafoudh has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
SteveBenner9 has quit [Quit: Leaving]
<jerome__>
SteveBenner... what did you said ?
vlad_starkov has quit [Ping timeout: 264 seconds]
crazysim has quit [Ping timeout: 264 seconds]
yonahw_ has joined #ruby
jericon has quit [Ping timeout: 246 seconds]
Amnesia has quit [Ping timeout: 246 seconds]
snath has joined #ruby
Catie is now known as zomgwtf
wallerdev has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
peterhellberg has quit [Ping timeout: 264 seconds]
zeropx has quit [Ping timeout: 264 seconds]
yonahw has quit [Ping timeout: 246 seconds]
zer0px is now known as zeropx
zomgwtf is now known as Catie
wallerdev has quit [Client Quit]
<jerome__>
rubymine is not free
thesheff17 has quit [Ping timeout: 245 seconds]
end_guy has joined #ruby
<jerome__>
and it is not my job... i'm just use ruby and coding like perl and C++ for my personnal use
<jerome__>
for make some apps who don't exist and who are more closed to what i want
Z3tta has joined #ruby
peterhellberg has joined #ruby
jericon has joined #ruby
mrsolo has joined #ruby
burlyscudd has joined #ruby
anonymuse has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<jerome__>
so aybe aptana/eclipse is the only one... is it right ?
<jerome__>
or vim... for some are able to use it...
sayan has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
pen has quit [Remote host closed the connection]
anonymuse has quit [Remote host closed the connection]
mrsolo has quit [Client Quit]
Domon has quit [Read error: Connection reset by peer]
<jerome__>
Paradox, i find the solution for adverts full post... i have a special box for them... and then, after, i bin all them directly (in there place). Before, i had time for resend it by "not in the correct adress" stamp... ads societies like it... lol
Domon has joined #ruby
burlyscudd has quit [Ping timeout: 264 seconds]
<jerome__>
and ads are good for light the barbecue in summer...
mrsolo has joined #ruby
mele- is now known as rburton-
<jerome__>
ok... by all, have a good day.
companion is now known as Companion
Amnesia has joined #ruby
jerome__ has left #ruby [#ruby]
Amnesia is now known as Guest63229
UnderCrux has left #ruby [#ruby]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
urthbound has joined #ruby
noopq has joined #ruby
m104 has joined #ruby
m104 has quit [Max SendQ exceeded]
philcrissman_ has joined #ruby
m104 has joined #ruby
aryaching_ has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
m104 has quit [Max SendQ exceeded]
Domon has quit [Ping timeout: 245 seconds]
urthbound has quit [Client Quit]
osvico has quit [Ping timeout: 276 seconds]
solrize_ has joined #ruby
goleldar has quit [Quit: Leaving]
justsee has quit [Ping timeout: 240 seconds]
Megtastique has joined #ruby
pwh has joined #ruby
justsee has joined #ruby
Davedo has quit [Ping timeout: 276 seconds]
akells`` has joined #ruby
amacgregor_ has joined #ruby
HAPPYFUNBALL has quit [Ping timeout: 245 seconds]
Megtastique has quit [Client Quit]
amacgregor__ has joined #ruby
marcgg has quit [Ping timeout: 268 seconds]
marcgg has joined #ruby
Greenrose has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
jonathanwallace2 has quit [Ping timeout: 264 seconds]
amacgregor has quit [Ping timeout: 264 seconds]
jaredlevitz has joined #ruby
m104 has joined #ruby
aeontech has joined #ruby
amacgregor_ has quit [Ping timeout: 246 seconds]
akells`` has quit [Ping timeout: 264 seconds]
zets has joined #ruby
busty has joined #ruby
Davedo has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
snovak has joined #ruby
obs has joined #ruby
wallerdev has joined #ruby
busty has quit [Quit: Page closed]
freakazoid0223 has joined #ruby
snovak has quit [Ping timeout: 256 seconds]
Companion is now known as companion
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
fuzzy has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
fuzzy has joined #ruby
neiled has joined #ruby
Quashie has quit [Ping timeout: 240 seconds]
hiyosi has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
zoee has joined #ruby
russt has joined #ruby
browndawg has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
momomomomo has quit [Client Quit]
starship has quit [Ping timeout: 245 seconds]
neiled has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
Spami has joined #ruby
twoism has joined #ruby
randomautomator has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Quashie_ has joined #ruby
randomau_ has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
Domon has joined #ruby
apeiros has joined #ruby
randomautomator has quit [Ping timeout: 256 seconds]
zoee has quit [Ping timeout: 264 seconds]
huoxito has quit [Quit: Leaving]
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
reactormonk has quit [Ping timeout: 260 seconds]
rcedillor has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
druonysus has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
bugrum has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
fuzzy has quit [Remote host closed the connection]
Hobogrammer has quit [Ping timeout: 256 seconds]
Hobogrammer has joined #ruby
fuzzy has joined #ruby
burlyscudd has joined #ruby
m104 has quit [Quit: bye]
mansi has joined #ruby
zeropx has quit [Quit: has left the room … Or did he?]
karam has joined #ruby
karam has left #ruby [#ruby]
narcan has joined #ruby
tyfighter has joined #ruby
burlyscudd has quit [Ping timeout: 268 seconds]
haxrbyte_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
Kelet has quit [Quit: Leaving]
mansi has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
lyanchih has joined #ruby
netQT has joined #ruby
netQT has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
sayan has quit [Read error: Connection reset by peer]
tyfighter has quit [Ping timeout: 264 seconds]
Mathieu has joined #ruby
<bugrum>
This maybe off-topic, but to write native Ruby extensions, does one have to use mkmf to generate the makefile or is there a way to compile it properly as an so with an external build system like CMake
tagrudev has joined #ruby
Hobogrammer has quit [Ping timeout: 264 seconds]
swordsmanz has quit [Quit: ooh ponies kinkeyyy]
quazimodo has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby
avril14th_ has joined #ruby
<jrobeson>
bugrum, i wouldn't recommend using another build system unless the extension is only for your use
reactormonk has joined #ruby
<gr33n7007h>
Can someone help me out here I'm just writing a little BMI calculator but when I enter 88 for weight and 1.83 for height it results in 26.3 which would put you in the overweigh category, but it outputs "You are healthy, with a BMI of 26.3." http://paste.debian.net/28327/ ?
rcosta has joined #ruby
Hobogrammer has joined #ruby
<sevenseacat>
gr33n7007h: those ors should probably be ands - 26.9 is > 18.5
akam-it has joined #ruby
<sevenseacat>
26.3 sorry
<jrobeson>
kinda weird to see printf in there..
<gr33n7007h>
sevenseacat, let me just justify 1 sec please
<jrobeson>
been awhile for me
vlad_starkov has joined #ruby
<sevenseacat>
justify? this will be interesting
<bugrum>
This is for an personal extension wrapping a set of native libraries that use CMake as their build system which is why I asked
<pontiki>
i do like printf when i'm doing a lot of constructed output
<gr33n7007h>
sevenseacat, It worked ;) looking at something for so long makes simple things hard to see thanks anyway dude!
Ripp__ has joined #ruby
<sevenseacat>
np
iliketur_ has joined #ruby
kevinykchan has joined #ruby
twoism_ has joined #ruby
vishal has joined #ruby
iliketur_ has quit [Client Quit]
BizarreCake has joined #ruby
larissa has quit [Quit: Leaving]
jonathanwallace2 has joined #ruby
twoism has quit [Ping timeout: 268 seconds]
twoism_ has quit [Ping timeout: 245 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
amacgregor has joined #ruby
bugrum has quit [Remote host closed the connection]
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zph has quit [Quit: Computer has gone to sleep.]
snovak has joined #ruby
twoism has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
narcan has joined #ruby
relix has joined #ruby
apeiros has quit [Remote host closed the connection]
jonathanwallace2 has quit [Ping timeout: 240 seconds]
amacgregor__ has quit [Ping timeout: 246 seconds]
singularity9 has joined #ruby
ananthakumaran has joined #ruby
snovak has quit [Ping timeout: 276 seconds]
neiled has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
ananthakumaran has joined #ruby
neiled has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
eka has joined #ruby
sayan has joined #ruby
ayaz has joined #ruby
tonni has quit [Remote host closed the connection]
timonv has joined #ruby
sparq_ has joined #ruby
love_color_text has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
altamic has joined #ruby
pen has joined #ruby
altamic has left #ruby [#ruby]
michaeldeol has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 264 seconds]
pranny has joined #ruby
browndawg has quit [Ping timeout: 268 seconds]
pipework has quit [Remote host closed the connection]
<Lewix>
Whenever we include a module that does not exist, it's supposed to return an error right?
amacgregor_ has joined #ruby
tyfighter has joined #ruby
yacks has joined #ruby
amacgregor_ has quit [Read error: Connection reset by peer]
amacgregor__ has joined #ruby
Anticom has joined #ruby
yacks has quit [Read error: Connection reset by peer]
noop has joined #ruby
yxhuvud2 has quit [Ping timeout: 264 seconds]
amacgregor has quit [Ping timeout: 264 seconds]
<Anticom>
hi all
<Anticom>
i'm totally new to ruby and gems
<Anticom>
i've installed a few gems now and some errors popped up on my cli. http://pastebin.com/Htmk0Enm just wanted to make sure it's nothing critical
<Anticom>
i'm running on winXP 32Bit
mansi has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
pen has quit [Remote host closed the connection]
pen has joined #ruby
noopq has quit [Ping timeout: 256 seconds]
ffio has joined #ruby
Matriks has joined #ruby
mansi has quit [Ping timeout: 256 seconds]
timonv has quit [Remote host closed the connection]
io_syl has quit [Quit: io_syl]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tonni has joined #ruby
ryandeussing has joined #ruby
quazimodo has joined #ruby
ryandeussing has quit [Ping timeout: 264 seconds]
razi has joined #ruby
codecop has joined #ruby
sparq_ has quit [Ping timeout: 264 seconds]
Ripp__ has quit [Quit: Ripp__]
jprovazn has joined #ruby
vlad_starkov has joined #ruby
ehaliewicz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Domon has quit [Remote host closed the connection]
Villadelfia has quit [Quit: Computer has gone to sleep.]
Bosox20051 has quit [Ping timeout: 264 seconds]
Domon has joined #ruby
Villadelfia has joined #ruby
sparq_ has joined #ruby
Domon has quit [Read error: Connection reset by peer]
Domon has joined #ruby
brtdv has joined #ruby
relix has joined #ruby
amacgregor has joined #ruby
andikr has joined #ruby
amacgregor__ has quit [Ping timeout: 264 seconds]
sparq_ has quit [Quit: Leaving]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
filipe has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
ahawkins has joined #ruby
vlad_starkov has joined #ruby
snovak has joined #ruby
dankest has quit [Quit: dankest]
<pontiki>
those shouldn't be a problem, Anticom -- those are generated by the document formatting process
<Anticom>
pontiki ah okay thank you
<pontiki>
which essentially means you won't have local versions of the gherkin documentation in those various languages
mrsolo has joined #ruby
tyfighter has quit [Quit: tyfighter]
<Anticom>
i can live with that
<Anticom>
^^
<Anticom>
I'm not interested in spannish and greek docs anyway ;)
snovak has quit [Ping timeout: 256 seconds]
<pontiki>
or...
<pontiki>
wait, sorry, i'm looking at the wrong thing
<pontiki>
you won't have gherkin support for those languages
avril14th_ is now known as avril14th
<pontiki>
so you won't be able to write features in those languages
Domon has quit [Remote host closed the connection]
clocKwize has joined #ruby
<pontiki>
so no pirate features for you!
Domon has joined #ruby
Domon has quit [Read error: Connection reset by peer]
Domon has joined #ruby
neiled has joined #ruby
filipe has quit [Read error: Operation timed out]
narcan has joined #ruby
jokke1 is now known as jokke
cntoby has joined #ruby
neiled has quit [Ping timeout: 240 seconds]
aganov has joined #ruby
druonysuse has joined #ruby
druonysuse has joined #ruby
threesome has joined #ruby
sayan has quit [Ping timeout: 276 seconds]
startling has joined #ruby
hanmac has joined #ruby
gr33n7007h has quit [Ping timeout: 245 seconds]
<startling>
I want to 'export' some hashes from a module used as a namespace. How would I do it? Is this a crazy thing to want in ruby?
druonysus has quit [Ping timeout: 264 seconds]
gstamp has quit [Quit: Computer has gone to sleep.]
d45h has quit [Ping timeout: 276 seconds]
cntoby has left #ruby [#ruby]
zoee has joined #ruby
twoism_ has joined #ruby
<pontiki>
what does 'export' mean in this context?
<pen>
github is DOWN!!
filipe has joined #ruby
<startling>
pontiki, I have a module N; I'd like to access some hashes defined in the module body outside of the module body, especially in another file that 'require's the file the first module lives in.
twoism has quit [Ping timeout: 256 seconds]
swordsmanz has joined #ruby
<startling>
pen, the real news is the adorable new 500 page.
twoism_ has quit [Ping timeout: 240 seconds]
<pen>
startling: lol, yea
<pontiki>
startling, perhaps you want mattr_accessor
<pen>
github loves parallex
<pontiki>
so put mattr_accessor :hash1, :hash2, :hash3
<pontiki>
then you can access them as M.hash1 and so on
<pontiki>
of course you could just write module functions for that as well, if you want
huevon has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
<startling>
pontiki, it looks like mattr_accessor is a Rails thing?
<pontiki>
oh, right
druonysuse has quit [Ping timeout: 241 seconds]
<pontiki>
but you get the idea?
<startling>
I'm afraid not.
<pontiki>
module M; def self.hash1; @hash1 ; end def self.hash1=(hash); @hash1=hash;end; end
Domon has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
<pontiki>
sorta like that
<startling>
pontiki, is "self" in the module body the module?
reactormonk has quit [Ping timeout: 276 seconds]
Domon has joined #ruby
_veer has quit [Ping timeout: 240 seconds]
pwh has quit [Quit: pwh]
<pontiki>
basically... although i'm not quite sure what 'body' means
<pontiki>
when you do def self.method in a module, it's no diferent than doing def M.method
reactormonk has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
<pontiki>
it's creating a module function
<startling>
I mean "directly in between 'module Whatever' and 'end'".
<startling>
Right.
burlyscudd has joined #ruby
browndawg has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.1]
freeayu has joined #ruby
<pontiki>
you can also do def method;end;module_function :method
postmodern has joined #ruby
maz-dev has joined #ruby
mansi has joined #ruby
yacks has joined #ruby
Domon has quit [Ping timeout: 256 seconds]
jrp has joined #ruby
<jrp>
Hi, Im trying to figure out the logic behind rubys order of operations. for example, a = true and false
burlyscudd has quit [Ping timeout: 264 seconds]
<jrp>
why is a = true after that? I mean i understand whats happening, i just dont understand why ruby would choose to do it that way
nkts has quit [Quit: -]
lyanchih has quit [Ping timeout: 256 seconds]
lyanchih has joined #ruby
<startling>
OK. I guess my question, then, is: is there an idiomatic way to define module attributes?
<startling>
jrp, I think you want &.
<Nilium>
jrp: From the looks of things, "a = true" comes first, not after.
<jrp>
i understand how its evaluating, i just dont understand what = has a higher precedence than and
mansi has quit [Ping timeout: 264 seconds]
afd__ has joined #ruby
<Nilium>
Are you asking _why_ && and and have differing precedence?
browndawg has quit [Ping timeout: 256 seconds]
<startling>
jrp, maybe "and" isn't boolean and.
<jrp>
Im asking why ='s precedence is higher than ands
yacks has quit [Read error: Connection reset by peer]
<Nilium>
Curse these damn bugs that come in and land on my screen at night
krainboltgreene has joined #ruby
staafl_123 has quit [Ping timeout: 240 seconds]
akam-it has quit [Quit: Leaving]
<clocKwize>
jrp: i think and is more useful for doing multiple things in 1 line
dash_ has joined #ruby
<clocKwize>
more than boolean operations
<jrp>
that was the only thing i could think of, doing something like "if a = 5 and bar()"
browndawg has joined #ruby
<clocKwize>
render :some_other_action and return if some_special_case
<clocKwize>
tbh, I don't like it or use it
<clocKwize>
so I'm probably not the best to try explain good uses :)
d45h has joined #ruby
<clocKwize>
generally if I want to do what I just said, I'd write return render(:some_other_action) if some_special_case
<clocKwize>
which doesn't read as nice
<jrp>
does that code work? the first example
<clocKwize>
yeah should do
<clocKwize>
might need to be render(:some_other_action) and return if blah
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
starfox21 has joined #ruby
dash_ has quit [Ping timeout: 276 seconds]
starfox21 has quit [Client Quit]
maxmanders has joined #ruby
tesuji has joined #ruby
_veer has joined #ruby
_veer has joined #ruby
Coffers has joined #ruby
pwh has joined #ruby
pwh has quit [Client Quit]
camilasan has joined #ruby
marr has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
rickmasta has joined #ruby
tonni has quit [Remote host closed the connection]
zombiebit has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<jrp>
thanks all
jrp has left #ruby [#ruby]
rcosta has quit [Ping timeout: 245 seconds]
rcosta has joined #ruby
Lewix has quit [Ping timeout: 240 seconds]
narcan has joined #ruby
snovak has joined #ruby
graydot has joined #ruby
poga has quit [Remote host closed the connection]
Lewix has joined #ruby
Xeago has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
Maoko has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
troessner has joined #ruby
DanBoy has quit [Quit: Leaving]
Guest63229 has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
neiled has joined #ruby
amacgregor has joined #ruby
zeropx has joined #ruby
Guest99482 has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
tommyvyo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nkts has joined #ruby
nkts has quit [Client Quit]
zoee has quit [Ping timeout: 264 seconds]
rburton- has joined #ruby
ewnd9 has joined #ruby
neiled has quit [Ping timeout: 240 seconds]
<Veejay>
Hello everyone, I'm experiencing a weird issue with the ENV variable where printenv defines RACK_ENV as production but inside a ruby script ENV['RACK_ENV'] is defined as staging, is ENV the proper way to access environment variables in a Ruby script?
moshef has joined #ruby
postmodern has quit [Quit: Leaving]
croco-crunch has quit [Quit: leaving]
<Veejay>
I have defined RACK_ENV inside /etc/environment and I have executed source /etc/environment
<zeroXten>
anyone here used Fog much?
<Veejay>
printenv reports the proper values
Guest48988 has quit [Ping timeout: 246 seconds]
ryandeussing has joined #ruby
rburton- has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
m8 has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
<MrZYX>
Veejay: so running ruby -e "puts ENV['RACK_ENV']" prints staging?
ryandeussing has quit [Ping timeout: 240 seconds]
<jrobeson>
hmm..
graydot has quit [Quit: graydot]
Amnesia has joined #ruby
Amnesia is now known as Guest31786
rickmasta has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
salmonax has joined #ruby
ffio_ has joined #ruby
<Veejay>
MrZYX: It actually prints production
<Veejay>
I think there's some strange interaction with the supervisor
ffio has quit [Ping timeout: 245 seconds]
<Veejay>
Only when the script is started by the supervisor is the ENV badly set
<MrZYX>
then something in the way you start your application or even the application itself is overwriting it
<Veejay>
So I guess this is not a Ruby question
<Veejay>
Thank you MrZYX
<MrZYX>
you're welcome
<Veejay>
MrZYX: Indeed
moshef has quit [Quit: moshef]
niceguyjames has joined #ruby
quazimodo has quit [Ping timeout: 256 seconds]
salmonax has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 264 seconds]
<Veejay>
MrZYX: To display the output of printenv from inside my script, puts system `printenv`?
<Veejay>
It displat true, which I guess might be a return code from the command or something
<MrZYX>
without the system
<Veejay>
displays
<MrZYX>
puts `printenv`
zoee has joined #ruby
<Veejay>
Ah `` is "execute the command already
<Veejay>
Gotcha
<MrZYX>
I'd be highly surprised if it reports anything different than ENV though
<Veejay>
It doesn't
agjacome has joined #ruby
atno has joined #ruby
dangerousdave has joined #ruby
pweems has quit [Ping timeout: 245 seconds]
maz-dev has quit [Remote host closed the connection]
salmonax has quit [Remote host closed the connection]
rburton- has joined #ruby
<Xeago>
would anyone frown about it?
<MrZYX>
begin foo; end while bar is valid ruby true
<MrZYX>
a bit
<MrZYX>
the modifier if is for single line statements IMO
<MrZYX>
since it's executed before the stuff it's modifying, I don't want to rethink all the lines I already read
tapioca_ has joined #ruby
<shevy>
I use that a lot myself but it's harder to read Xeago
codecop has quit [Remote host closed the connection]
ryandeussing has joined #ruby
Domon has quit [Remote host closed the connection]
oddalot has joined #ruby
mikecmpbll has joined #ruby
Domon has joined #ruby
decoponio has joined #ruby
rburton- has quit [Ping timeout: 245 seconds]
kevinykchan has joined #ruby
BRMatt has quit [Ping timeout: 264 seconds]
salmonax has joined #ruby
tapioca has quit [Ping timeout: 260 seconds]
kevinykchan has quit [Client Quit]
razi has joined #ruby
AndChat| has joined #ruby
francisfish has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 246 seconds]
lkba has quit [Read error: Connection reset by peer]
rcosta has quit [Remote host closed the connection]
niceguyjames has quit [Quit: Computer has gone to sleep.]
rcosta has joined #ruby
Domon has quit [Ping timeout: 264 seconds]
salmonax has quit [Remote host closed the connection]
user78 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
salmonax has joined #ruby
<user78>
hi guys, i was wondering if any1 could help me with a basic ruby coding issue
salmonax has quit [Remote host closed the connection]
salmonax has joined #ruby
rcosta has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
Mathieu has quit [Quit: Mathieu]
<clocKwize>
user78: of course, ask away
zathras has joined #ruby
osvico has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
hanmac has joined #ruby
snovak has joined #ruby
burlyscudd has joined #ruby
BRMatt has joined #ruby
seich- has joined #ruby
lemonsparrow has joined #ruby
mansi has joined #ruby
vishal has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 268 seconds]
pweems has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby
wicketn00b has quit [Ping timeout: 264 seconds]
wicketn00b has joined #ruby
<user78>
Well basically, i got this small program written in ruby and some part of it is used to store regexes and is something like this: coldfusion_errors = [ "example1". "example2" ] but i want to put a regex that contain [] like brackets inside brackets, is there any way to do it inside the code or i gotta make a new file that contain only regexs and point program to use that file?
bsaboia_ has quit [Ping timeout: 240 seconds]
<MrZYX>
that should just work
pweems has quit [Ping timeout: 245 seconds]
<MrZYX>
[/[abc]/, /[def]/]
epireve has joined #ruby
jleishman has quit [Remote host closed the connection]
shaunbaker has joined #ruby
soba has quit [Ping timeout: 240 seconds]
jleishman has joined #ruby
<Mon_Ouie>
No, [abc] is one character that's either a, b, or c
mikecmpbll has quit [Quit: Computer has gone to sleep.]
devoldmx has quit [Ping timeout: 240 seconds]
<mostlybadfly>
shevy: that pine text has been a pleasure
tommyvyo has joined #ruby
salmonax has quit [Read error: Connection reset by peer]
andrew565 has joined #ruby
<mostlybadfly>
And I figures out my first error just using what I had learned I was cheesy lol
<shevy>
ok
<shevy>
do you understand keywords like "yield" ?
fgo has joined #ruby
Wildhoney has quit [Quit: Wildhoney]
tonni has quit [Remote host closed the connection]
devoldmx has joined #ruby
seich- has quit [Ping timeout: 260 seconds]
camilasan has quit [Ping timeout: 264 seconds]
quazimodo has joined #ruby
tvw has quit []
Liothen has quit [Quit: System of a down……]
syed_ has joined #ruby
<syed_>
sorry for popping in and immediately asking a question, but...
<mostlybadfly>
shevy: haven't gotten to that one yet
<shevy>
syed_ isn't that the point of IRC :P
joonty has joined #ruby
<syed_>
aw thanks shevy, you guys are awesome
<rcosta>
mostlybadfly: buy a book
cultavix2 has joined #ruby
<rcosta>
that's what I did an don't regret it
viszu has joined #ruby
cultavix has quit [Ping timeout: 256 seconds]
<syed_>
so i'm installing the pg gem, it only gem installs under sudo, anyway, i've build the pg_ext.so through ext_conf. long story short, can i install this gem and specify "please don't try to build native extensions, i've built it, here's the path, do what you need"
Akuma has quit [Quit: So long sukkas!]
oddraisin has joined #ruby
fyz1x has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
<mostlybadfly>
rcosta: which do you recommend?
graydot has joined #ruby
snath has joined #ruby
pinage404 has quit [Excess Flood]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
<syed_>
so i'm hoping for a "gem install --dont-try-to-extconf --path-to-native-so='/path/to/my/lib.so'"
xcv has joined #ruby
zph has joined #ruby
ixti has joined #ruby
tonni has joined #ruby
kpshek has joined #ruby
Akuma has joined #ruby
axl_ has joined #ruby
sevenseacat has joined #ruby
angusiguess has joined #ruby
fantazo has joined #ruby
pinage404 has joined #ruby
fgo has quit [Remote host closed the connection]
jdenen has joined #ruby
gazarsgo has joined #ruby
jonathanwallace2 has joined #ruby
mklappst_ has joined #ruby
afd__ has quit [Ping timeout: 264 seconds]
snovak has joined #ruby
afd__ has joined #ruby
burlyscudd has joined #ruby
rcosta has quit [Remote host closed the connection]
Quadlex has quit [Read error: Operation timed out]
akells`` has joined #ruby
atno has joined #ruby
Neener54 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ChrisLE has joined #ruby
soba has joined #ruby
xue has quit [Ping timeout: 240 seconds]
St_Marx has quit [Remote host closed the connection]
xue has joined #ruby
sailias has joined #ruby
Speed has joined #ruby
kek has quit [Quit: kek]
wicketn00b has joined #ruby
St_Marx has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
Mathieu has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
zachrab has joined #ruby
mpereira has quit [Quit: leaving]
<ChrisLE>
I have a created puppet doc file with == inside of it. I would like to convert it automatically to a markdown file. I have searched and I found rdoc and when I test it: rdoc myfile.txt all is ok and I got this message: Generating Darkfish format into C:/.... After this I see the folder doc with html things and so on. But I want to convert the file to markdown, is this possible with rdoc?
mpereira has joined #ruby
devoldmx3 has joined #ruby
<MrZYX>
if you're lucky pandoc supports rdoc
devoldmx3 has quit [Client Quit]
devoldmx has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
devoldmx3 has joined #ruby
sarkis has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
akemrir has quit [Quit: WeeChat 0.4.1]
blaxter_ has quit [Remote host closed the connection]
devoldmx has joined #ruby
kek has joined #ruby
sambao21 has joined #ruby
<hanmac>
ChrisLE: there is a --markup= flag for this
zathras is now known as zathraz
<hanmac>
ChrisLE: and there is this: "You can also set the comment format for a single file through the :markup: directive"
blaxter_ has joined #ruby
<hanmac>
this infos was listed on the first google result
ehc has joined #ruby
rcosta has joined #ruby
cj3kim has quit [Ping timeout: 264 seconds]
mpereira has quit [Quit: leaving]
mpereira has joined #ruby
soba has quit [Ping timeout: 240 seconds]
_bart_ has joined #ruby
lushious has quit [Remote host closed the connection]
<ChrisLE>
rdoc --markup?
v0n has quit [Ping timeout: 245 seconds]
<hanmac>
ChrisLE: do "rdoc --help" and read about this
Mathieu has quit [Quit: Mathieu]
platzhirsch has joined #ruby
zachrab has quit [Read error: Connection reset by peer]
mpereira has quit [Quit: leaving]
mpereira has joined #ruby
zachrab has joined #ruby
<platzhirsch>
I am a bit unhappy with my class design. I have metrics which are used on a set of metrics to compute the scores. I access the score through an attribute. But effectively this means that I need to reset the score back to 0.0 every time I invoke compute()
<platzhirsch>
I guess the best to not store the score but return it at the end of compute..
vlad_starkov has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
<ChrisLE>
hanmac: yeah I tried this rdoc --markup-markdown C:\Projects\myFileWhichIsGeneratedWithPuppetDoc.txt but no changes
Wildhoney has joined #ruby
<ChrisLE>
it looks like before and the doc folder too
framling has quit [Quit: Lost terminal]
rcedillor has joined #ruby
<hanmac>
ChrisLE what is the diff between "--markup-markdown" and "--markup=markdown" ?
fantazo has quit [Remote host closed the connection]
salmonax has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
dhruvasagar has joined #ruby
ffranz has joined #ruby
rhys has joined #ruby
xue has quit [Ping timeout: 264 seconds]
<pothibo>
How would one use chruby with systemd?
<zendeavor>
depends what you really mean
<zendeavor>
they shouldn't interact at all
pipework has joined #ruby
ewnd9 has quit [Ping timeout: 256 seconds]
<pothibo>
zendeavor: well, I need to start thin from a systemd service, and thin needs to have ruby in order to run
ZenGuy311 has joined #ruby
zoee has quit [Ping timeout: 264 seconds]
<zendeavor>
probably use Environment directives in your systemd units
v0n has joined #ruby
<zendeavor>
chruby doen't enter this equation
<pothibo>
zendeavor: and hardcode ruby's version
ChrisLE has left #ruby [#ruby]
sdomsta has joined #ruby
<zendeavor>
that's technically what you do with chruby too so..
<pothibo>
yeah I know
<pothibo>
just making sure I understood what you said
camilasan has joined #ruby
sayan has quit [Ping timeout: 276 seconds]
bugrum has joined #ruby
sdomsta has quit [Client Quit]
brennanMKE has quit [Remote host closed the connection]
pisquanooo has joined #ruby
<pisquanooo>
hi
<pisquanooo>
!list
pipework has quit [Ping timeout: 240 seconds]
pisquanooo has quit [Client Quit]
pipework has joined #ruby
<zendeavor>
i just spent the past 2 days setting up a --user session in systemd206
<zendeavor>
instead of getting real work done.
<zendeavor>
it's so beautiful now tho
_maes_ has joined #ruby
mansi has joined #ruby
__maes_ has joined #ruby
jstephan has quit [Quit: Konversation terminated!]
fgo has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 246 seconds]
shaunbaker has quit [Remote host closed the connection]
mmitchell has joined #ruby
colonolGron has joined #ruby
zoee has joined #ruby
seich- has quit [Ping timeout: 245 seconds]
visof has quit [Quit: Leaving]
pipework has quit [Remote host closed the connection]
noopq has joined #ruby
shaunbak_ has joined #ruby
noop has quit [Read error: Operation timed out]
senayar_ has joined #ruby
interactionjaxsn has joined #ruby
tagrudev has quit [Remote host closed the connection]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
wallerdev has joined #ruby
hasrb has joined #ruby
zoee has quit [Quit: zoee]
senayar has quit [Ping timeout: 264 seconds]
jlast has joined #ruby
vlad_starkov has joined #ruby
tonni has quit [Remote host closed the connection]
headius has joined #ruby
mansi has joined #ruby
twoism has joined #ruby
zph has joined #ruby
huoxito has joined #ruby
andrew565 has left #ruby [#ruby]
kpshek has quit []
ffranz has quit [Ping timeout: 264 seconds]
user78 has quit []
_veer has quit [Ping timeout: 276 seconds]
pen has quit [Remote host closed the connection]
mary5030 has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
_veer has joined #ruby
rburton- has joined #ruby
ffranz has joined #ruby
senayar_ has quit [Remote host closed the connection]
senayar has joined #ruby
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
camilasan has quit [Remote host closed the connection]
filipe has quit [Ping timeout: 246 seconds]
giarc has joined #ruby
rburton- has quit [Ping timeout: 245 seconds]
mlpinit has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Leaving.]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
ananthakumaran1 has quit [Quit: Leaving.]
failshell has joined #ruby
zorg24 has joined #ruby
Rym has joined #ruby
colonolGron has quit [Remote host closed the connection]
colonolGron has joined #ruby
mlpinit has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
shaunbaker has joined #ruby
pothibo has quit [Quit: pothibo]
vlad_starkov has quit [Remote host closed the connection]
suffix_ is now known as HAPPYFUNBRO
cj3kim has joined #ruby
HAPPYFUNBRO is now known as suffix
FDj has quit [Remote host closed the connection]
FDj has joined #ruby
rcosta has quit [Remote host closed the connection]
RantriX has joined #ruby
<RantriX>
if anyone is here, i'd like to ask a quick question about rails and heroku. when you deploy on heroku what envrionment is heroku using? production or development?
vlad_starkov has joined #ruby
sayan has joined #ruby
jake_ has joined #ruby
nhhagen has quit [Quit: Leaving]
<jake_>
Is there anyone here that could assist me with regular expression building?
tk__ has quit [Quit: ばいばい]
<RantriX>
sure
<RantriX>
i can try
<jake_>
RantriX, Great :)
kobain has joined #ruby
<RantriX>
hit me with it
headius has quit [Quit: headius]
platzhirsch has left #ruby [#ruby]
<fryguy>
rubular
<jake_>
I want to match a string which has an X as long as it has an X before and after it [somewhere] in that string
cj3kim has quit [Ping timeout: 276 seconds]
BillCriswell has joined #ruby
<jake_>
so jbacbXonoiubioubobXoinonbnoibX would match
<fryguy>
X.*X.*X
Neener54 has joined #ruby
<RantriX>
jake_: fryguy solved it lol
filipe has joined #ruby
<jake_>
So simple :-D I will give that a whirl and see how it goes - Cheers!
<RantriX>
jake_: but that wont work if you are looking for exactly 3 Xs only
<RantriX>
say XaaaXaaaXaaaX
<RantriX>
will match too
shaunbak_ has joined #ruby
dsouthard has joined #ruby
Rym_ has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
mikepack has joined #ruby
<jake_>
will it get two matches on that string? Because that is what I need - it should get two results based on that sample string
Rym has quit [Ping timeout: 246 seconds]
Rym_ is now known as Rym
shaunbaker has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
kek has quit [Quit: kek]
Astralum has joined #ruby
<canton7>
what matches do you want?
banisterfiend has joined #ruby
<fryguy>
jake_: TIAS
dodosan has joined #ruby
orionstein_away is now known as orionstein
mansi_ has quit [Remote host closed the connection]
<RantriX>
jake_: can u provide an input example and the result u're looking for?
rippa has joined #ruby
persand has quit [Quit: persand]
<jake_>
XXXXX should match "x" three times. There are 3 X's in there with an X before and after.
mikepack has quit [Remote host closed the connection]
mansi has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<RantriX>
XXXX #=> xxx?
dsouthard is now known as ruby_badger
Neener54 has quit [Quit: Adios muchachos!!!]
senayar_ has joined #ruby
quazimodo has quit [Ping timeout: 268 seconds]
maz-dev has quit [Remote host closed the connection]
tesuji has quit [Ping timeout: 240 seconds]
<canton7>
now I'm even more confused
Fire-Dragon-DoL has quit [Quit: Leaving.]
Rym_ has joined #ruby
ruby_badger has quit [Quit: ruby_badger]
dodosan has quit [Ping timeout: 276 seconds]
ruby_badger has joined #ruby
Rym has quit [Ping timeout: 264 seconds]
Rym_ is now known as Rym
sambao21 has joined #ruby
_bart_ has quit [Ping timeout: 256 seconds]
_veer has quit [Ping timeout: 245 seconds]
colonolGron has quit [Ping timeout: 246 seconds]
<jake_>
If there is an X before it (anywhere) and an X after it (anywhere) I want it to return a match. it = "X". If there is a string "XXXXX" there are 3 X's in there with an X before and after them. I want a result of X 3 times .
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
senayar has quit [Ping timeout: 276 seconds]
zachrab has quit [Remote host closed the connection]
Es0teric has joined #ruby
<RantriX>
it seems like regex might not help you solve that problem
<canton7>
the problem is that your anchors - X's that exist before and after the middle X - are then capture at the same time as that middle X, and so can't form the middle X in another capture
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
Tricon has joined #ruby
<canton7>
if ruby supported variably-width lookahead and lookbehind assertions, it'd be easy
<RantriX>
but i think u can just do 'string'.count(x) - 2
<RantriX>
lol
Tricon has joined #ruby
<rippa>
guys, guys
<rippa>
don't fight
<rippa>
'xxxxx'.scan /(?<=x)x(?=x)/
<rippa>
=> ["x", "x", "x"]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Neener54 has joined #ruby
benwoody has joined #ruby
rippa has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<canton7>
rippa, doesn't work if there are things between the X's
burlyscudd has joined #ruby
bookmage has joined #ruby
<canton7>
hence my statement about ruby not supporting variable-width lookahead and lookbehind assertions :P
<hanmac>
canton7 make a feature request
timonv_ has joined #ruby
<canton7>
hanmac, I suspect it's easier said than done - from what I've seen from some quick googling, only a python library supports it - core python doesn't, perl doesn't...
cj3kim has joined #ruby
aeontech has quit [Quit: aeontech]
<rippa>
regexp with variable-width assertions is turing-complete
pothibo has joined #ruby
michaelhf has joined #ruby
Catie has joined #ruby
Jake232 has joined #ruby
Lewix has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 256 seconds]
ruby_badger has quit [Quit: ruby_badger]
pitzips has joined #ruby
ruby_badger has joined #ruby
framling has joined #ruby
nhhagen has joined #ruby
ruby_badger has quit [Client Quit]
aeontech has joined #ruby
ruby_badger has joined #ruby
pothibo has quit [Client Quit]
saarinen has joined #ruby
sambao21 has joined #ruby
pel_daniel has joined #ruby
twoism has quit [Remote host closed the connection]
michaeldeol has quit [Remote host closed the connection]
Tricon has joined #ruby
mikepack has joined #ruby
aedorn has quit [Ping timeout: 248 seconds]
devoldmx has quit [Read error: Connection reset by peer]
S3Xinfo has quit [Killed (idoru (Spam is off topic on freenode.))]
PapaSierra has joined #ruby
<PapaSierra>
noob here. i have capistrano installed on my mac. i want to upgrade from 2.x to 3. how do i upgrade a gem?
sparq_ has joined #ruby
devoldmx has joined #ruby
blo has quit [Ping timeout: 245 seconds]
filipe has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
Matriks has joined #ruby
sparq_ has quit [Max SendQ exceeded]
zph has quit [Quit: Computer has gone to sleep.]
sparq_ has joined #ruby
Targen has quit [Ping timeout: 276 seconds]
conner has joined #ruby
Lewix has joined #ruby
blo has joined #ruby
kpshek has joined #ruby
sparq_ has quit [Max SendQ exceeded]
aedorn has joined #ruby
<giarc>
$gem help commands ( there you will find update )
hiroyuki has joined #ruby
bklane has joined #ruby
michaeldeol has joined #ruby
sparq_ has joined #ruby
snath has quit [Ping timeout: 245 seconds]
krawchyk has joined #ruby
jtommyvyo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaelhf has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
bsaboia_ has joined #ruby
Guest40703 has quit [Remote host closed the connection]
mengu has quit [Quit: This computer has gone to sleep]
ntus1017 has joined #ruby
siera08 has joined #ruby
snath has joined #ruby
cloke has joined #ruby
bsaboia_ has quit [Client Quit]
nowthatsamatt has joined #ruby
io_syl has quit [Quit: io_syl]
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
verto has joined #ruby
hasrb has joined #ruby
daniel_hinojosa has joined #ruby
timonv_ has quit [Remote host closed the connection]
michaeldeol has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
<PapaSierra>
giarc: ty, but unfortunately not that simple. initially chef installed capistrano for me. for this user the gem list is completely empty! (though i can use the cap command). so i cannot update it. best i can do is sudo gem install capistrano but then that installs it under the wrong user
nowthatsamatt has quit [Quit: nowthatsamatt]
<zendeavor>
mmmm, indirection is my favourite
<zendeavor>
is there a chef user on your system?
guiocavalcanti has quit [Remote host closed the connection]
<PapaSierra>
we use vagrant and chef to spin up of dev VMs so that they match production
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
benwoody has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
noname001 has quit [Ping timeout: 246 seconds]
johnmlocklear_ has joined #ruby
<zendeavor>
k
mark_locklear has quit [Ping timeout: 276 seconds]
rburton- has joined #ruby
<zendeavor>
is there a chef user on the system
michaeldeol has joined #ruby
<PapaSierra>
and installing capistrano is one of the tasks. which might have been wrong. but now there's a phantom installation of capistrano somewhere which is stuck at 2.14
<PapaSierra>
i'll check...
ldnunes has quit [Remote host closed the connection]
<giarc>
@PapaSierra: wont ssh vagrant log you in as the correct user ?
<giarc>
..from the host
<PapaSierra>
giarc: yes, it logs me in as "vagrant"
<zendeavor>
don't do that
<PapaSierra>
which is the right user
Rym has quit [Read error: Connection reset by peer]
vince_prignano has quit [Remote host closed the connection]
andikr has quit [Read error: Connection reset by peer]
Targen has joined #ruby
chrisja has joined #ruby
benwoody has joined #ruby
Astral_ has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
<giarc>
seems to me you should ask the dev/techops who created the guest machine how they've set it up…it could be so many ways
<giarc>
anything i can suggest is just guesswork
<PapaSierra>
hehe it was me ;)
<giarc>
hahah :-)
<PapaSierra>
i just did it as above ^^
<PapaSierra>
ah well, i'll just continue with the old version.
<giarc>
that gem is around someplace...
<giarc>
use find
lotherk has quit [Quit: Leaving.]
shnee has joined #ruby
seich- has quit [Ping timeout: 264 seconds]
obs has quit [Quit: Konversation terminated!]
Astralum has quit [Ping timeout: 276 seconds]
<PapaSierra>
the issue is more that i just don't get gems, so every time something like this comes up nothing works and google searching does not help. i.e. usually you find a handful of solutions to a problem. some are trash and some work. but with gems i have a 100% "does not work" ratio. even when getting the hints from official websites or groups like this
<PapaSierra>
so yeah, pretty confusing introduction to ruby
<zendeavor>
the #vagrant channel should be of utmost assistance
<PapaSierra>
zendeavor: understood
<zendeavor>
at least they won't have to guess as much
havenwood has joined #ruby
noname001 has joined #ruby
Nanuq has joined #ruby
<giarc>
( vagrant is sort of just a 'wrapper' around virtualized guests installs…its mostly still up to the chef/puppet/sh scripts to install the software stack )
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has quit [Remote host closed the connection]
Krajsnick has joined #ruby
klaas has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
johnmlocklear_ has quit [Quit: Leaving]
maxmanders has quit [Quit: Computer has gone to sleep.]
mark_locklear has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nomenkun has quit [Read error: Operation timed out]
rupee has joined #ruby
Monie has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
nanoxd has quit [Ping timeout: 256 seconds]
zph has joined #ruby
<tapioca_>
is there a framework for ruby like flask for python?
zeade has joined #ruby
<tapioca_>
a little more simple, but easy to great apps for?
<tapioca_>
but not really a huge mvc framework?
nanoxd has joined #ruby
<tapioca_>
I'm new to ruby, so Im not really sure how big rails is compared to django
zacts has quit [Quit: leaving]
xcv has quit [Read error: Connection reset by peer]
<jdenen>
tapioca_: sinatra
<terrellt>
tapioca_: ^ Sinatra's the light-weight framework for ruby.
spundun has joined #ruby
<terrellt>
Or at least the most popular one.
xcv has joined #ruby
<tapioca_>
thanks jdenen terrellt
<spundun>
hi guys
<gazarsgo>
sinatra is lighter than flask even, i would say
end_guy has quit [Remote host closed the connection]
tommyvyo has joined #ruby
end_guy has joined #ruby
<havenwood>
tapioca_: Sinatra is to Rails as Flask is to Django. Other Sinatra-like options include Cuba and Scorched, but yeah Sinatra is most popular.
<tapioca_>
is it well documented and popular?
<terrellt>
Sinatra? Yes.
<gazarsgo>
sinatra is very popular, has inspired frameworks in other languages
<tapioca_>
ok, thanks, i will give it a try
<havenwood>
Very popular. Not going anywhere.
<havenwood>
Every other language seems to be cloning it. :P
<sparr>
I am using Chef which includes an embedded copy of Ruby and a bunch of gems. I am modifying one of those gems but my modifications don't seem to be taking effect. Might there be some caching or refreshing requirement that I'm ignoring?
zph has quit [Quit: Computer has gone to sleep.]
zachrab has joined #ruby
siera08 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0.1/20130814063812]]
aeontech has joined #ruby
<ryandeussing>
can someone remind me the proper syntax for installing a gem from a github repo (on the command line)?
<ryandeussing>
gem install new_gem (...)
<ryandeussing>
thanks in advance
brennanM_ has joined #ruby
Eiam has joined #ruby
<banisterfiend>
ryandeussing you can't do that with 'gem' afark
<banisterfiend>
afaik
<banisterfiend>
you can do it in your Gemfile, but that's a bundler thing
<giarc>
@ryandeussing: i think you can gem sources -a http://some.url to add the github repo to the gem source list, then regular gem install
heftig has quit [Ping timeout: 245 seconds]
snovak_ has joined #ruby
zachrab has quit [Ping timeout: 240 seconds]
<sparr>
ok, I simply deleted the file from the gem that's giving me trouble, and it STILL gives me trouble, so I am obviously missing some detail about caching
<ryandeussing>
(blabla is actually a gem name)
<terrellt>
Awesome.
devoldmx has quit [Read error: Connection reset by peer]
<Eiam>
I got into a disagreement with a co-worker the other day about some design patterns.. The issue was If we have an ORM and on any request, an instance variable is created that represents the model for a given front end request, e.g. Model A has many Item X. Item X is unique within a given model, but not unique within all Items. e.g. there could be many Item X, but within Model A, there is only one Item x. His stance seemed to be that "When talking to the
<Eiam>
ORM, you should use the DB unique id for Item X, instead of using the Model A instance to access Item X, that way you know its unique.
<Eiam>
My argument was that you shouldn't be passing database ID's out into the front end, and that people should either a) understand how the model works and use it properly b) use the instance variable provided to interact with Items, or c) write a soft wrapper that protects you from all those problems
tkuchiki has joined #ruby
devoldmx has joined #ruby
<ryandeussing>
@giarc i don't think that's possible now that github has deprecated gems.github.com
brianpWins has quit [Quit: brianpWins]
heftig has joined #ruby
burlyscudd has joined #ruby
<spundun>
you think an app deployed through sinatra will be faster (in terms of performance) than an app deployed through RoR? assume no views, a json based REST api, views in css/js and a database backend (say mongodb)
<terrellt>
Eiam: Wow that's a lot of filler. So this is the choice between user/1/candy/2 and user/1/candy, when a user can only have one candy?
maxmanders has joined #ruby
Wildhoney has quit [Quit: Wildhoney]
<Eiam>
terrellt: hmm, sure
ntus1017 has quit [Remote host closed the connection]
<Eiam>
I guess thats one way you could phrase it
snovak has quit [Ping timeout: 276 seconds]
<terrellt>
I'd do user/1/candy.
<Eiam>
ugh me too =(
<Eiam>
meh.
<Eiam>
(thats how I designed it)
<giarc>
@Eiam: re: /user/1/candy.. is that the pk from teh db for the user?
<Eiam>
giarc: 1 is the unique identifier for the model, yes
<giarc>
…which would sort of moot your objection about leaking db ids
<Eiam>
so within the model 1, there can only be a single candy
<Eiam>
giarc: somewhat, yes. Ultimately, SOMEONE has to know "what we are talking about"
<Eiam>
but the fewer instances where that has to be provided the better
platzhirsch has joined #ruby
<terrellt>
giarc: That's not the primary issue - to me it's more "should we give them this information when we've made the declaration that they'll never need to know what the child ID is - because they can only have one."
ajmal has joined #ruby
c0rn has joined #ruby
<mostlybadfly>
Woo lunch
vlad_starkov has joined #ruby
<platzhirsch>
appending to_a to an array object is a nice alternative to circumvent a null check, nil.to_a is [], great :)
adeponte has joined #ruby
<terrellt>
platzhirsch: Array() ftw.
<giarc>
@terrellt: i'd agree its not the primary issue, was just pointing out they are leaking DB ids either way...
<Eiam>
giarc: you have a suggestion to avoid leaking DB ids?
troessner has quit [Quit: Leaving]
<Eiam>
how would anyone know what model we are talking about if we don't track some sort of ID somewhere?
<giarc>
use a slug or hash
maxmanders has quit [Ping timeout: 240 seconds]
sparq_ has quit [Ping timeout: 264 seconds]
<platzhirsch>
terrellt: yay
graydot has joined #ruby
<Eiam>
how is that any different from putting it in the route
<Eiam>
its still in the route.
<terrellt>
Eiam: If you want to make an argument for your case, the only one I have is this - the URL for a user's ONLY candy should be persistent, even if their candy changes.
<terrellt>
Eiam: So I should be able to bookmark /user/2/candy and it should give me that user's candy.
<Eiam>
right, and you can
<Eiam>
thats exactly how it works
maxmanders has joined #ruby
vlad_sta_ has quit [Ping timeout: 264 seconds]
<Eiam>
the argument is that I should pass back /user/2/candy/5 to uniquely identify the candy among all candy, so that other developers internally don't do the wrong thing
<Eiam>
and assume candy is globally unique
<Eiam>
to which I said "Learn how the model works before you go fuck with the model"
<giarc>
@Eiam: and your right, IMO
<Eiam>
or "wrap the model in an object that simply provides an interface where you don't have to worry about the model, just say "add this candy" and it does the right thing
<Eiam>
which he was very much against
<gazarsgo>
sounds like you should switch to a document object store instead of an RDBMS, Eiam
<Eiam>
gazarsgo: meh, we just moved from couchDB to pgsql =p
marius has quit [Quit: -]
Davey is now known as grumbles
<gazarsgo>
'locally unique' is a terrible idea in an RDBMS imo
vlad_starkov has quit [Remote host closed the connection]
<terrellt>
has_one is valid.
<gazarsgo>
terribly valid? :p
workmad3 has joined #ruby
grumbles is now known as Davey
klaas has joined #ruby
<terrellt>
I gotta bail, last note though
iliketur_ has joined #ruby
<terrellt>
Eiam: Service objects for interactions between multiple models is +10 from terrellt.
Al_ has quit [Quit: Al_]
ferr has quit [Ping timeout: 246 seconds]
<Eiam>
terrellt: by that you mean the wrapper?
<terrellt>
Yes, in Rails they're service objects.
<Eiam>
right
<Eiam>
well i feel somewhat beter
<Eiam>
going to resist making the change =)
<Eiam>
what good is a boss if you can't argue with him =)
rburton- has joined #ruby
<terrellt>
Know when to lose the battle, too. ;)
<Eiam>
terrellt: I'll just keep putting more important work in front of it =)
dodosan has joined #ruby
<Eiam>
"meh it works as is. I've got to support all these feature requests"
<Eiam>
thanks for the input
<Eiam>
see ya terrellt
michaeldeol has quit [Remote host closed the connection]
cdelo has joined #ruby
io_syl has joined #ruby
caju has joined #ruby
ajmal has quit [Ping timeout: 250 seconds]
rburton- has quit [Ping timeout: 264 seconds]
aedorn has quit [Quit: Leaving]
Ripp__ has quit [Quit: Ripp__]
nowthatsamatt has joined #ruby
VTLob has joined #ruby
headius has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
maxmanders has quit [Quit: Computer has gone to sleep.]
splittingred has joined #ruby
seich- has joined #ruby
zorg24 has quit [Ping timeout: 245 seconds]
fsck3r has joined #ruby
Jake232 has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
c0rn has joined #ruby
UnderCru1 has joined #ruby
wicketn00b has joined #ruby
UnderCru1 has quit [Client Quit]
Ripp__ has joined #ruby
robonerd has joined #ruby
randomautomator has joined #ruby
randomautomator has quit [Remote host closed the connection]
randomautomator has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
brennanM_ has quit [Remote host closed the connection]
ebobby has joined #ruby
ebobby has left #ruby [#ruby]
ndrei has quit [Ping timeout: 240 seconds]
randomau_ has joined #ruby
brennanMKE has joined #ruby
tonni has joined #ruby
Ripp__ has quit [Client Quit]
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
brennanMKE has quit [Remote host closed the connection]
_veer has quit [Ping timeout: 240 seconds]
randomautomator has quit [Ping timeout: 276 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
araujo has quit [Read error: Connection reset by peer]
Wildhoney has joined #ruby
araujo has joined #ruby
Kelet has joined #ruby
cjs226 has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
twoism has joined #ruby
brtdv has joined #ruby
hamakn has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
hamakn has joined #ruby
JDHankle has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
fsck3r has quit [Quit: Leaving...]
jonathanwallace has joined #ruby
BRMatt has quit [Ping timeout: 264 seconds]
noname-shaggy has joined #ruby
Fire-Dragon-DoL has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
St_Marx has quit [Remote host closed the connection]
marr has quit [Ping timeout: 264 seconds]
St_Marx has joined #ruby
hamakn has quit [Ping timeout: 268 seconds]
rickmasta has joined #ruby
devoldmx has joined #ruby
xcv_ has joined #ruby
relix has joined #ruby
<noname-shaggy>
host ruby is required??? why does compiling from source require ruby?
<zendeavor>
evidently some ruby evaluations are required
mydog2 has joined #ruby
<mydog2>
hey guys... new to ruby.. not trying to be a dev. but i do have a couple of questions..
xcv has quit [Ping timeout: 264 seconds]
<hanmac>
noname-shaggy: when you try to compile gcc you also need an c compiler ;P
<mydog2>
github has a number of ruby/gem apps that provide "social networking" functions
relix has quit [Client Quit]
lucazi_ has joined #ruby
_veer has joined #ruby
ni745223 has joined #ruby
<ni745223>
hi
<mydog2>
is it usually hard/easy to integrate functionality from one app to another??? i know, a really broad (almost meaningless) question..
<ni745223>
how are u?
lucazi has quit [Ping timeout: 245 seconds]
* hanmac
cant use social networking stuff because his "social" skill is not high enough ;P
<Morrolan>
mydog2: That really depends on how good the gem's API is. ;)
<Morrolan>
hanmac: You'd fit right in!
gemmy has joined #ruby
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* hanmac
has the idea to found an "asocial" network … if you add someone as your friend you get kicked out ;P
<noname-shaggy>
zendeavor: so you have to have ruby to get ruby?
<hanmac>
noname-shaggy: yep
<Morrolan>
'gemmy'? That sounds a bit like the name of a (potential) Ruby mascot. :)
<Morrolan>
Err, what, Ruby is a build dependency of Ruby?
<Mon_Ouie>
You need a C compiler to compile most C compilers too
<Morrolan>
Could've sworn I compiled it on a machine without Ruby, not too long ago.
ahgy has joined #ruby
<hanmac>
Morrolan: that was the "baseruby" function is for … but some of them has some kind of "miniruby"
<giarc>
@hanmac: hatebook
mklappstuhl has quit [Remote host closed the connection]
pjeide has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<ahgy>
exit
Ripp__ has joined #ruby
ahgy has quit [Client Quit]
interactionjaxsn has joined #ruby
<hanmac>
giarc yeah and it does not have like buttons, it has little icons with the grumpy cat ;P
<platzhirsch>
If you had a compute method which computes a score and an analysis object for the score (hash), would you rather return a Struct or simply two values (array with 2 elements)
fmcgeough has quit [Quit: fmcgeough]
apok has joined #ruby
nhhagen has quit [Remote host closed the connection]
brianpWins has joined #ruby
h4mz1d has quit [Read error: Connection reset by peer]
kreeger has joined #ruby
altamic has joined #ruby
altamic has left #ruby [#ruby]
<noname-shaggy>
Mon_Ouie: sure, but ruby isnt a compiler its an interpreter, right?
interactionjaxsn has quit [Ping timeout: 240 seconds]
<Mon_Ouie>
noname-shaggy: It does compile code to bytecode at runtime
saarinen has joined #ruby
jan1337zZz is now known as jan1337z
jan1337z is now known as Jan
Astral_ has quit [Ping timeout: 240 seconds]
<Mon_Ouie>
IIRC correctly the Ruby interpreter is actually used in scripts that generate repetitive C code for the VM
Jan is now known as Guest55162
<zendeavor>
the c in iirc stands for correctly >___>
kreeger has quit [Client Quit]
brennanMKE has joined #ruby
ni745223 has left #ruby [#ruby]
ahg has joined #ruby
JDHankle has joined #ruby
Guest55162 is now known as jan1337z
<mydog2>
Morrolan, - thanks dude!!!
netQT has joined #ruby
<Morrolan>
mydog2: Eh?
maz-dev has joined #ruby
brtdv has joined #ruby
maz-dev has quit [Read error: Operation timed out]
burlyscudd has quit [Quit: Leaving.]
maz-dev has joined #ruby
altamic has joined #ruby
altamic has left #ruby [#ruby]
caju has quit [Remote host closed the connection]
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
nowthatsamatt has quit [Quit: nowthatsamatt]
browndawg has quit [Quit: Leaving.]
apeiros has joined #ruby
johnnyfuchs has joined #ruby
aeontech has quit [Quit: aeontech]
lucazi_ has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 248 seconds]
brennanMKE has quit [Ping timeout: 246 seconds]
Guest82321 has quit [Changing host]
Guest82321 has joined #ruby
Guest82321 is now known as starship
maz-dev has quit [Remote host closed the connection]
jbpros has joined #ruby
oddalot has quit [Quit: Leaving...]
ffio_ has quit [Quit: WeeChat 0.4.1]
maz-dev has joined #ruby
oddalot has joined #ruby
dangerousdave has quit [Quit: Leaving...]
rcosta has quit [Remote host closed the connection]
marius has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
snovak_ has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
pweems has joined #ruby
xcv_ has quit [Remote host closed the connection]
mansi has joined #ruby
<mydog2>
Morrolan, - you were mentioning the API of a ruby app..
starfox21 has quit [Ping timeout: 264 seconds]
nowthatsamatt has joined #ruby
<mydog2>
anyone know of a good Forum app/plugin I can look at.. I see 100s of them.. but have no idea what's good/bad.. i know, subjective.. but opinions are good..
kirun has joined #ruby
altivec has joined #ruby
end_guy has quit [Remote host closed the connection]
wolcanus has joined #ruby
end_guy has joined #ruby
ndrei has joined #ruby
Bosox20051 has joined #ruby
Guest26065 has joined #ruby
Bosox20051 has quit [Excess Flood]
jaimef has quit [Excess Flood]
Bosox20051 has joined #ruby
Bosox20051 has quit [Excess Flood]
Kabaka has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
cjsarette has joined #ruby
jonkri has quit [Quit: jonkri]
oddalot has quit [Quit: Leaving...]
cj3kim has joined #ruby
jbpros has joined #ruby
Kabaka has joined #ruby
danshultz has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
kdaigle has joined #ruby
zph has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
brennanMKE has quit [Remote host closed the connection]
Krajsnick has quit [Remote host closed the connection]
carlzulauf has quit [Quit: leaving]
jan1337z is now known as jan1337zZz
rcosta has joined #ruby
noopq has quit [Ping timeout: 245 seconds]
existensil has joined #ruby
jaimef has joined #ruby
IceDragon has joined #ruby
ndrei has quit [Ping timeout: 263 seconds]
ndrei has joined #ruby
ndrei_ has joined #ruby
AntelopeSalad has quit []
AntelopeSalad has joined #ruby
vlad_starkov has joined #ruby
jbpros has quit [Quit: jbpros]
ndrei has quit [Client Quit]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<thoraxe>
hmm what am I doing wrong here? I know i'm clearly calling restclient with the wrong number of options, but i'm trying to send the data as json so that the data that comes back is json: res = RestClient.get "#{@infoblox_base_url}record:cname", data_to_send, {:accept => :json}
<banisterfiend>
spike|spiegel i know :) but how does #lazy specifically go there ? :)
Levin_22 has joined #ruby
<thoraxe>
ArgumentError: wrong number of arguments (3 for 2)
nowthatsamatt has joined #ruby
VTLob has joined #ruby
<thoraxe>
if i drop the content_type or accept from the end, it works find, but the other end returns xml because it doesn't think the content being sent is json, despite being encoded in json
<thoraxe>
if i do it with curl it works fine
<hanmac>
spike|spiegel: Ooo is a more cooler land ;P
sambao21 has joined #ruby
cjsarette has quit [Read error: Connection reset by peer]
rcosta has quit [Remote host closed the connection]
mengu has quit [Quit: This computer has gone to sleep]
<havenwood>
thoraxe: You are using #get not #post.
<thoraxe>
i know i'm using get.
<Mon_Ouie>
w
<thoraxe>
because i'm not trying to update. i'm trying to receive.
rcosta has joined #ruby
<havenwood>
thoraxe: What is your `data_to_send` doing with a GET request?
<havenwood>
thoraxe: I'm confused.
<thoraxe>
i'm confused with this silly infoblox api too
jbpros has joined #ruby
<havenwood>
thoraxe: Does it work if you remove the `data_to_send` (makes no sense to me why it's there) argument?: res = RestClient.get "#{@infoblox_base_url}record:cname", {:accept => :json}
seich- has quit [Ping timeout: 260 seconds]
<thoraxe>
when you call to record:cname and send an fqdn, it returns the reference id for the cname
<thoraxe>
if i don't send any data, i don't get any data back, even though it's a get
Guest69858 has quit [Read error: Connection reset by peer]
thesheff17 has quit [Remote host closed the connection]
<thoraxe>
well that's not true, i get all cnames back
jaimef has quit [Excess Flood]
<thoraxe>
if I curl with a -d to send data (ex: -d name=foo.corp100.com) i get data back
dodosan has quit [Read error: Connection reset by peer]
dodosan has joined #ruby
seich- has joined #ruby
burlyscudd has joined #ruby
<thoraxe>
hmm i think i've got it, holdon
Krajsnick has joined #ruby
thesheff17 has joined #ruby
<thoraxe>
ok figured out a fix
_veer has quit [Ping timeout: 264 seconds]
jleishman has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
<jhn>
x[0]["_ref"]
<jhn>
=> "record:cname/ZG5zLmJpbmRfY25hb…
<thoraxe>
ahh
<thoraxe>
lovely
<thoraxe>
why you have to create a hash with {} but fetch its values with []...
sambao21 has joined #ruby
<MrZYX>
because it is that way
rickmasta has joined #ruby
robustus has joined #ruby
jbpros has joined #ruby
<MrZYX>
In theory you can create a hash with h = Hash.new; h[:foo] = "bar"; h[:bar] = "foo"; etc, { } is just the literal form, like "foo" is for strings or ['a', 'b'] is for arrays etc
<hanmac>
frguy, what in ruby does not fit into my three categories?
bionoid has joined #ruby
splittingred has quit [Quit: splittingred]
Hey has quit [Ping timeout: 250 seconds]
<fryguy>
hanmac: i think "alias" is a counterexample
Ripp__ has quit [Quit: Ripp__]
verto has quit [Ping timeout: 246 seconds]
splittingred has joined #ruby
splittingred has quit [Client Quit]
zph has quit [Quit: zph]
brennanMKE has joined #ruby
apeiros has quit [Remote host closed the connection]
bklane has joined #ruby
i_s has joined #ruby
<hanmac>
hm ok i thought that alias would return something
RantriX has quit [Remote host closed the connection]
<fryguy>
hrmm, i guess it does return nil
brianpWins has joined #ruby
Guest26065 has left #ruby [#ruby]
_veer has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
pothibo has joined #ruby
brianpWins has quit [Client Quit]
Es0teric has joined #ruby
brianpWins has joined #ruby
fantazo has quit [Ping timeout: 240 seconds]
bklane has quit [Remote host closed the connection]
spundun has quit [Remote host closed the connection]
bklane has joined #ruby
<hanmac>
no it does not, try to make a "p" before it ;P
blackmesa has joined #ruby
<hanmac>
so there is object, turn-to-object, return-object, and soidberg, ah i mean alias
reset has joined #ruby
brbcoding has quit []
ezra has quit [Ping timeout: 248 seconds]
maxmanders has joined #ruby
<fryguy>
hanmac: BEGIN and END are probably in the same set too
<fryguy>
and maybe break
wolcanus has joined #ruby
<banisterfiend>
fryguy well ruby does have keywords..
Megtastique has quit [Quit: Megtastique]
ezra has joined #ruby
<hanmac>
banisterfiend: yeah but most of the keywords return objects
bklane has quit [Ping timeout: 245 seconds]
ezra is now known as Guest44227
<banisterfiend>
hanmac well they do, doesn't 'alias' return nil?
axl_ has quit [Quit: axl_]
jokke has quit [Quit: WeeChat 0.4.1]
Deele has joined #ruby
c0rn has joined #ruby
kirun has quit [Quit: Client exiting]
sambao21 has joined #ruby
jokke has joined #ruby
<hanmac>
nope, "p alias …" does not work, just as "p break" in a loop, both does make some kind of syntax errors (different kind for some reason)
sambao21 has quit [Client Quit]
jokke has quit [Client Quit]
jokke has joined #ruby
headius has quit [Quit: headius]
<hanmac>
"void value expression" is also an very funny syntax error ;P
Ripp__ has joined #ruby
krawchyk has quit [Remote host closed the connection]
jokke has quit [Client Quit]
sambao21 has joined #ruby
jokke has joined #ruby
wolcanus has quit [Ping timeout: 256 seconds]
jokke has quit [Client Quit]
jokke has joined #ruby
<Mon_Ouie>
p alias … is because of precedence
jan1337zZz is now known as jan1337z
jan1337z is now known as Jan
Guest44227 has quit [Ping timeout: 264 seconds]
wolcanus has joined #ruby
<Mon_Ouie>
Or I thought it was, might be something else
Jan is now known as Guest85855
mary5030 has quit [Ping timeout: 264 seconds]
marius has quit [Quit: -]
bklane has joined #ruby
Guest26065 has joined #ruby
ezra_ has joined #ruby
sparq_ has joined #ruby
rcosta has quit [Remote host closed the connection]
Guest26065 is now known as code_nigga
<code_nigga>
howdy
<code_nigga>
:)
mark_locklear has quit [Ping timeout: 268 seconds]
<platzhirsch>
code_nigga: I find the last part of your name offensive :|
<code_nigga>
platzhirsch: we are all code niggas :)
<platzhirsch>
sigh
cloke_ has joined #ruby
brianpWins has quit [Quit: brianpWins]
<hanmac>
Mon_Ouie: even p(alias) does not work because its an syntax error (the alias was unexpected)
cloke has quit [Ping timeout: 264 seconds]
cloke_ is now known as cloke
<banisterfiend>
Mon_Ouie do you find his nickname offensive too?
brianpWins has joined #ruby
brennanMKE has quit [Remote host closed the connection]
pothibo has quit [Quit: pothibo]
pel_daniel1 has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
hanmac has quit [Quit: Leaving.]
ghr has joined #ruby
code_nigga has left #ruby [#ruby]
black_hippy has joined #ruby
pel_daniel has quit [Ping timeout: 268 seconds]
wolcanus_ has joined #ruby
<havenwood>
I think a ban is appropriate for nicks with sexist or racist connotation. Makes for a hostile environment for some even if the intention is innocent.
brennanMKE has joined #ruby
anderson has quit [Ping timeout: 264 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
Neener54 has quit [Quit: Adios muchachos!!!]
devoldmx has joined #ruby
vadelius has quit [Ping timeout: 264 seconds]
xcv has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
rickmasta has quit [Quit: Leaving...]
<havenwood>
Choosing a nick without sexist/racist derogatory terms isn't too onerous.
nemesit|znc has joined #ruby
wolcanus has quit [Ping timeout: 246 seconds]
yalue has quit [Read error: Connection reset by peer]
sparr has quit [Ping timeout: 246 seconds]
anderson has joined #ruby
burlyscudd has quit [Read error: Operation timed out]
vadelius has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<tbjers>
I do not have access to where the class is instantiated, so I need to mod the defaults in order for this to work
sam113101_afk is now known as sam113101
Guest74138 has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
fyz1x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
caju has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
burlyscudd has joined #ruby
Davey has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
seich- has quit [Ping timeout: 260 seconds]
alex__c2022 has quit [Quit: alex__c2022]
argentum has joined #ruby
Tricon has quit [Ping timeout: 256 seconds]
bookmage has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
cjs226 has quit [Quit: cjs226]
_honning_ has quit [Ping timeout: 276 seconds]
jlast_ has quit [Remote host closed the connection]
jlast has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
felixjet has quit [Quit: felixjet]
razi has quit [Ping timeout: 256 seconds]
felixjet has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
wmoxam has quit [Ping timeout: 245 seconds]
failshell has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
pweems has quit [Ping timeout: 245 seconds]
intuxicated has quit [Ping timeout: 256 seconds]
jdenen has quit [Read error: Connection reset by peer]
thebastl has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 264 seconds]
benwoody has quit [Ping timeout: 276 seconds]
seich- has joined #ruby
intuxicated has joined #ruby
yacks has joined #ruby
apeiros has joined #ruby
intuxicated has quit [Max SendQ exceeded]
<Eiam>
banisterfiend: pry hates it when I have variables named "edit" =)
axl_ has joined #ruby
<banisterfiend>
Eiam: Yeah, you can use them if you write <space>edit = blah or whatever
<banisterfiend>
commands only execute if they're hard against the left margin
<Eiam>
ah good to know
<Eiam>
i was doing "pp edit"
<Eiam>
just to see it =)
<Eiam>
now i can do " edit"
<banisterfiend>
Eiam: Alternatively, you can set a command prefix, which will force commands to only execute if the prefix is first entered, e.g: Pry.config.command_prefix = "%"
guiocava_ has quit [Remote host closed the connection]
<banisterfiend>
then you have to type: %edit blah.rb
<banisterfiend>
to use edit, for example
intuxicated has joined #ruby
<banisterfiend>
You can put that in your .pryrc, to permanently set it
devoldmx has quit [Read error: Connection reset by peer]
karlfreeman has quit [Ping timeout: 260 seconds]
karlfreeman has joined #ruby
breakingthings has quit [Quit: breakingthings]
<Eiam>
cool thakns
<giarc>
@havenwood: re: GEM_ROOT, no, it's not set… i ended up rm -rf .rbenv/versions/2.0.0-p247/ and re-installed
mlpinit has quit [Remote host closed the connection]
devoldmx has joined #ruby
zarubin has joined #ruby
<giarc>
its interesting to me that now, gem list reports no gems, yet, after gem install rails i cant remove ALL the gems, as some are reported as default
<giarc>
not sure how that makes sense
iliketur_ has joined #ruby
brennanM_ has joined #ruby
rburton- has joined #ruby
iliketur_ has quit [Client Quit]
headius has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
pjeide has quit [Quit: Leaving.]
kvirani has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
agjacome has quit [Quit: leaving]
<giarc>
aha! reload/reset the shell, gem list shows them now…makes more sense
tomzx_mac has joined #ruby
MrZYX is now known as MrZYX|off
<lectrick>
Can the .new of a method return a new instance of a *subclass*?
kvirani has joined #ruby
vlad_starkov has joined #ruby
<lectrick>
Basically, I have an adapter that I want to delegate to other adapters based on configuration info
snath has quit [Ping timeout: 276 seconds]
<Mon_Ouie>
new is a regular method, you can redefine it to make anything, although that might be confusing, and it might be preferable to use another method for that
<giarc>
w/o the shell reset, gem list is showing system gems( or the lack thereof, system ruby 1.8.7 doesn't have default gems.. )
<starfox21>
hey guys, I have been trying trying to look at how ruby implements certain things in order to learn more about the language. I have been trying to use pry to look at the source. But often times when I do $ <class>.<method> I get a C implementation of that method. Is there any way to get the ruby implementation?
<havenwood>
Will be out soon enough. :)
tbjers has left #ruby [#ruby]
<Mon_Ouie>
starfox21: That method is implemented in C
<havenwood>
starfox21: You can often do so by looking at the Rubinius source in Pry.
fcahoon has quit [Quit: Leaving]
<starfox21>
havenwood: how do I do that?
<havenwood>
starfox21: Those methods in Ruby that are C are only in C.
<havenwood>
starfox21: Install Rubinius, install Pry gem for Rubinius, then look at source.
<havenwood>
starfox21: Which Ruby version manager do you use?
<starfox21>
rvm
BRMatt has joined #ruby
<havenwood>
starfox21: rvm install rbx
Davey has joined #ruby
<havenwood>
starfox21: Then switch to rbx, install pry, go into pry, check source from there.
<aedorn>
I've been very uninspired to do anything today. Hate days like that, but what can you do ...
<starfox21>
havenwood: thanks
cookiemonsta has quit [Quit: Leaving.]
JDHankle has joined #ruby
danshultz has quit [Remote host closed the connection]
mando has joined #ruby
dangerousdave has quit [Quit: Leaving...]
interactionjaxsn has quit [Remote host closed the connection]
senayar has joined #ruby
gemmy has quit [Quit: leaving]
interactionjaxsn has joined #ruby
cj3kim has joined #ruby
mmitchell has quit [Ping timeout: 245 seconds]
ixti has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
sparq_ has joined #ruby
pvizcay has joined #ruby
ixti has joined #ruby
Squarepy has quit [Quit: Leaving]
JimmyNeutron has joined #ruby
kpshek has quit []
jlast has quit [Read error: Operation timed out]
interactionjaxsn has quit [Ping timeout: 240 seconds]
Tricon has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
black_hippy has quit []
thesheff17 has quit [Ping timeout: 276 seconds]
JDHankle has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 240 seconds]
sparq_ has quit [Ping timeout: 240 seconds]
fsck3r has joined #ruby
sdomsta has joined #ruby
sdomsta has quit [Client Quit]
workmad3 has quit [Ping timeout: 245 seconds]
pjeide has joined #ruby
pjeide has quit [Changing host]
pjeide has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Ripp__ has quit [Quit: Ripp__]
sambao21 has joined #ruby
mansi has quit [Remote host closed the connection]
rhys has quit [Quit: Leaving]
mansi has joined #ruby
ffranz has quit [Quit: Leaving]
cookiemonsta has joined #ruby
tommyvyo has quit [Ping timeout: 264 seconds]
devoldmx3 has joined #ruby
zets has quit [Ping timeout: 240 seconds]
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby
<gazarsgo>
is there a cleaner way to do a projection from an object hierarchy than collect/concat ?
sparr has joined #ruby
bklane has quit [Remote host closed the connection]
the_hack has quit [Quit: Computer has gone to sleep.]
johnnyfuchs has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 240 seconds]
Nisstyre has joined #ruby
alpha123 has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
akells`` has joined #ruby
cj3kim has joined #ruby
hiyosi has joined #ruby
cookiemonsta has quit [Quit: Leaving.]
snovak_ has joined #ruby
snovak_ has quit [Remote host closed the connection]
Guest85855 is now known as jan1337zZz
snovak has joined #ruby
burlyscudd has quit [Quit: Leaving.]
colonolGron has quit [Ping timeout: 264 seconds]
sparr has quit [Read error: Operation timed out]
BillCriswell has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
JimmyNeutron has quit [Quit: Leaving]
sailias has quit [Ping timeout: 276 seconds]
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danman has quit [Quit: danman]
fsck3r has quit [Quit: Leaving...]
dodosan has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
Ripp__ has joined #ruby
khushildep has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
dodosan has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
alex__c2022 has quit [Quit: alex__c2022]
guiocavalcanti has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
iliketur_ has joined #ruby
zeade has quit [Quit: Leaving.]
guiocavalcanti has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gazarsgo has quit [Quit: gazarsgo]
akells`` has quit [Remote host closed the connection]
<shevy>
aedorn on these days I usually fix bugs, or improve docu
<shevy>
or add small new features or improve existing ones
<shevy>
small things though
ZenGuy311 has left #ruby ["Leaving"]
burlyscudd has joined #ruby
snath has joined #ruby
singularity9 has quit [Read error: Connection reset by peer]
Greenrose has quit []
wargasm has joined #ruby
Greenrose has joined #ruby
singularity9 has joined #ruby
vlad_starkov has joined #ruby
pweems has quit [Ping timeout: 246 seconds]
Greenrose has quit [Client Quit]
wmoxam has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.1]
Greenrose has joined #ruby
colonolGron has joined #ruby
AlSquirrel has joined #ruby
wolcanus has quit [Remote host closed the connection]
wolcanus has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
yacks has quit [Quit: Leaving]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
Greenrose has quit [Client Quit]
AlSquire has quit [Read error: Connection reset by peer]
St_Marx has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
gstamp has joined #ruby
twoism has quit [Read error: Connection reset by peer]
burlyscudd has quit [Quit: Leaving.]
twoism has joined #ruby
wolcanus has quit [Ping timeout: 252 seconds]
thesheff17 has joined #ruby
Xaitec has joined #ruby
<pontiki>
write tests
Greenrose has joined #ruby
<pontiki>
break stuff
Xaitec has quit [Remote host closed the connection]
snovak has joined #ruby
eka has quit [Ping timeout: 256 seconds]
snovak has quit [Remote host closed the connection]
guiocavalcanti has quit [Remote host closed the connection]
seich- has quit [Ping timeout: 260 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
snovak has joined #ruby
colonolGron has quit [Ping timeout: 276 seconds]
baroquebobcat has joined #ruby
aboudreault has quit [Read error: Operation timed out]
burlyscudd has joined #ruby
eka has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
pel_daniel1 has left #ruby [#ruby]
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
<shevy>
hehe
hasrb has quit [Remote host closed the connection]
Akuma has quit [Quit: So long sukkas!]
aboudreault has joined #ruby
dodosan has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 240 seconds]
mwmnj has joined #ruby
marr has quit [Ping timeout: 246 seconds]
rcedillor has quit [Ping timeout: 240 seconds]
alpha123 has quit [Read error: Operation timed out]
ewnd9 has joined #ruby
<Eiam>
hmm, am I missing something obvious here? I want to get the difference between two arrays but I don't want to have to minus the larger from the smaller. e.g. b-a gives a different answer than a-b. If I do a reject I get the same issue
justsee has quit [Ping timeout: 264 seconds]
<Eiam>
can't union, can't intersect
<Eiam>
NOt intersect
<Eiam>
xor?
dml_ has quit [Quit: Computer has gone to sleep.]
devoldmx3 has quit [Read error: Connection reset by peer]
Weems has joined #ruby
devoldmx has joined #ruby
dml has joined #ruby
<MrZYX>
well define difference
<Mon_Ouie>
a - b is all the elements that are in a but not in b — which is why it's not symmetric
dml has quit [Client Quit]
<MrZYX>
but probably xor
<Eiam>
MrZYX: the difference would be if a = [1,2,3,4] b = [2,3,5] i'd want to know both 5 and 1
<Eiam>
yeah apparently array doesn't support xor
<havenwood>
Eiam: Are the Arrays' items unique? So never a [1, 1, 2, 3]?
<MrZYX>
yup, that's xor
<Eiam>
havenwood: yah
fyz1x_ has joined #ruby
<MrZYX>
then feed them through Set
<Mon_Ouie>
Set#^
<havenwood>
Eiam: Set :)
<Eiam>
hmm or a+b - (a&b)
<Eiam>
which I seem to recall is faster than Set
mmitchell has joined #ruby
fyz1x_ has quit [Client Quit]
jhn has quit [Ping timeout: 256 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
JDHankle has joined #ruby
Rager has joined #ruby
Weems has quit [Changing host]
Weems has joined #ruby
guiocavalcanti has joined #ruby
<Rager>
howdy - I'm trying to iterate through the instance variables in my class to output them, but I end up with @'s in the var names, like so: {"@id":"realm1:1","@body":"wut","@recip_id":"hayy","@sender_id":"boyy"}
jaredlevitz has quit [Quit: Leaving.]
mansi has joined #ruby
t0rc has joined #ruby
hiroyuki has joined #ruby
fsck3r has joined #ruby
mando has quit [Remote host closed the connection]
yacks has joined #ruby
mmitchell has quit [Ping timeout: 276 seconds]
<Eiam>
Rager: hmm, okay so..
<graft>
okay, so i have class Test1; class << self; attr_accessor :blah; end; end, and i have class Test2 < Test1; end - Test2.blah and Test1.blah are different
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
<Rager>
ok, so I substr
pskosinski has quit [Quit: Til rivido Idisti!]
<graft>
what should i use if i want to inherit those?
<Rager>
what does that @ mean?
<Eiam>
Rager: that its an instance variable?
<Rager>
ok
<Eiam>
Rager: all that method does is list the instance variables on your class, then convert them to strings, then remove the @ from the strings
<Eiam>
its a fairly stupid way to do it
BRMatt has quit [Read error: Operation timed out]
<Rager>
how stupid are we talking - stupid enough it shouldn't happen, or stupid as in "stupid simple"
nfk has quit [Quit: yawn]
starfox21 has quit [Quit: starfox21]
<Eiam>
also I'm not sure I understand why you'd want to output ALL your instance variables.
<Eiam>
Rager: how are you generating that example above?/
<giarc>
@Rager: pastebin your class
<Eiam>
where'd you get your instance variables from
mansi has quit [Ping timeout: 245 seconds]
dodosan has joined #ruby
hakunin_ has joined #ruby
<Mon_Ouie>
Eiam: From a quick benchmark I just ran, the array version is faster when you have few elements in both arrays, but slower when you have many of them
<Eiam>
Mon_Ouie: okay, knew I saw a benchmark about this somewhere. I'm going to be less than 100 items. Not that I particularly care bout performance in this case
<Eiam>
Mon_Ouie: I think its just easier for me to say "I'm going to xor this lazily with a + - & than convert the objects all to Sets and xor them
<Eiam>
its bitten me a few times that Array supports some Set operations but not others
<Mon_Ouie>
What we're suggesting (or at least what I was), is to work with sets from the beginning
wolcanus has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
<Eiam>
e.g. it supports Union and Intersection
<Eiam>
Mon_Ouie: why? The data is already in an array
<Rager>
should I take the comment from you to mean that everything's wrong and nothing can be right about what I'm doing?
<Mon_Ouie>
"already" from what point?
<Eiam>
Rager: I'd go with more that "I don't really write ruby like that and I'm not very bright"
<Rager>
I'm new to Ruby
<Rager>
so I don't know what the "ruby way" is
<Eiam>
Mon_Ouie: its an array that just gets mapped into an array of id's
ndrei_ has quit [Ping timeout: 245 seconds]
<Rager>
but I know that I don't really care for AR-patterend stuff
wmoxam has quit [Ping timeout: 276 seconds]
<Eiam>
my_array.map {|x| x["id"]}
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
dodosan has quit [Ping timeout: 264 seconds]
<Mon_Ouie>
But since it seems you want to perform set operations on it anyway, using the right data structure would make more sense
<Mon_Ouie>
Unless somehow the order matters
<Eiam>
order doesn't matter, but the array object already exists =0
<Eiam>
why pay the price of creating a new object?
<MrZYX>
Rager: uhm, args is undefined in your first method, I'd also use attr_accessor
<Rager>
I am using attr_accessor
mansi has joined #ruby
<Mon_Ouie>
You don't have to create an array object to begin with
<Eiam>
Mon_Ouie: I do, its used elsewhere in the method, so I'm just reusing the objects again
<Rager>
this seems to work
<patrikf>
Eiam: keyword: premature optimization
<Eiam>
I can't stand by the argument "If you want to do set operations, use a set"
<Eiam>
when Array clearly supports two set operations out of the box
<Eiam>
its built right in
<patrikf>
why would you care about the "price" of creating a new object? it's nanoseconds and a couple of bytes! if you're a kernel developer, that might matter. if you process huge amounts of data, that might matter. if you have 100 elements, you probably want to write straightforward code and forget about low-level optimizations
cj3kim_ has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
<Eiam>
ruby has this weird thing to make numbers easier to read
colonolGron has joined #ruby
linux_noob_666 has quit [Ping timeout: 246 seconds]
<havenwood>
Eiam: Yeah, like a ',' in English.
<havenwood>
2,000
<Eiam>
is that a 2.0 thing?
<Mon_Ouie>
It was already there in 1.8.*, probably before that too
<Eiam>
ah, just not used to seeing it
senayar has quit [Ping timeout: 245 seconds]
rburton- has quit [Quit: Leaving...]
c0rn has quit [Quit: Computer has gone to sleep.]
t0rc has quit [Quit: WeeChat 0.4.1]
colonolGron has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
Weems has quit [Ping timeout: 246 seconds]
cj3kim_ has joined #ruby
<havenwood>
Eiam: Looks like the point of inflection where Set becomes more efficient is somewhere around an Array size in the double digits.
c0rn has joined #ruby
arooni-mobile has joined #ruby
<arooni-mobile>
let's say i have a method that is trying to send a HTTP request; i have begin/rescue clause because this site isn't always the most reliable. when i rescue the exception; how can i retry the same request a set number of times? i'm catching the exception within the method. should i throw the exception to the calling method and from there have a counter until i reach the point ill just give up?
<arooni-mobile>
another approach?
baroquebobcat has quit [Quit: baroquebobcat]
cj3kim has quit [Ping timeout: 264 seconds]
pjeide has quit [Quit: Leaving.]
huoxito has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
pjeide has joined #ruby
pjeide has joined #ruby
pjeide has quit [Changing host]
baroquebobcat has joined #ruby
pjeide has quit [Client Quit]
_veer has quit [Ping timeout: 260 seconds]
VTLob has quit [Quit: VTLob]
baroquebobcat has quit [Client Quit]
fenicks has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 240 seconds]
t0rc has joined #ruby
IceyEC has joined #ruby
bionoid has quit [Ping timeout: 264 seconds]
momomomomo has joined #ruby
_veer has joined #ruby
t0rc has quit [Client Quit]
russt has quit [Ping timeout: 245 seconds]
<Rager>
thanks, guys
bionoid has joined #ruby
t0rc has joined #ruby
t0rc has quit [Client Quit]
_maes_ has quit [Ping timeout: 264 seconds]
jonahR has quit [Ping timeout: 240 seconds]
__maes_ has quit [Ping timeout: 256 seconds]
JDHankle has quit [Remote host closed the connection]
t0rc has joined #ruby
MrZYX is now known as MrZYX|off
<havenwood>
arooni-mobile: You can put an `n.times do;end` around your `begin;rescue;end` block to just run it `n` times. Or do a `begin;rescue;retry;end` and manually set the number of times to retry.
predator217 has joined #ruby
jonahR has joined #ruby
<arooni-mobile>
havenwood, i guess i didnt know iwhat id put in the trtry block
<arooni-mobile>
retry block or even that it was possible
nowthatsamatt has joined #ruby
<havenwood>
arooni-mobile: Yeah, you can set a `tries = 0` and then `retry if tries < 5`.
<havenwood>
Or whatev.
<arooni-mobile>
havenwood, and it will just run the part of the code of the begin loop
<havenwood>
arooni-mobile: yup
<arooni-mobile>
if it encounters that caught exception
<arooni-mobile>
didnt know that was part of the structure; cool
blackmesa has joined #ruby
t0rc has quit [Client Quit]
jonahR has quit [Client Quit]
predator117 has quit [Ping timeout: 268 seconds]
t0rc has joined #ruby
<havenwood>
arooni-mobile: Or `require 'retriable'; retriable(tries: 3) { begin;rescue;end }
<havenwood>
`
<arooni-mobile>
havenwood, ive also heard of attempt
<arooni-mobile>
another gem wrapper
<havenwood>
Seems excessive to need a gem but I guess if you were doing it many times in a project?
twoism has quit [Remote host closed the connection]
<arooni-mobile>
i seem to have a bunch of begin/rescue loops due to this sites flakiness
akells`` has joined #ruby
<havenwood>
I think for simply trying multiple times i'd use just `retry`.
twoism has joined #ruby
<havenwood>
Well, actually - `n.times` for simplest I think.
nanoxd has quit [Ping timeout: 248 seconds]
zodiak has quit [Ping timeout: 256 seconds]
<arooni-mobile>
the only reason i kinda liked attempt gem is it had a built in definable amount of time to wait to retry
<havenwood>
Wait, that would run it even if it succeeded - that's no good.
<havenwood>
Yeah, rescue with retry.
nanoxd has joined #ruby
<havenwood>
arooni-mobile: Ahh, yeah if that is the requirement either `attempt` or `retriable` gems look good. I didn't know either existed.
<havenwood>
Good to know!
the_hack has joined #ruby
<arooni-mobile>
glad to help in some way with my noobish questions
alpha123 has joined #ruby
robonerd has quit [Quit: zzz]
justsee has quit [Ping timeout: 264 seconds]
hiroyuki has quit [Read error: Connection reset by peer]
rburton- has joined #ruby
akells`` has quit [Ping timeout: 264 seconds]
twoism has quit [Ping timeout: 264 seconds]
osvico has joined #ruby
<havenwood>
arooni-mobile: PS - Say if you're gunna cross-post to #ruby-lang, or OP may temp ban for rules.