yfeldblu_ has quit [Remote host closed the connection]
Bira_ has quit [Remote host closed the connection]
razum2um has joined #ruby
yfeldblum has joined #ruby
keen____ has joined #ruby
DivineEntity has joined #ruby
hamakn has quit [Remote host closed the connection]
Zenigor has quit [Remote host closed the connection]
hamakn has joined #ruby
keen___ has quit [Ping timeout: 240 seconds]
hamakn has quit [Read error: Connection reset by peer]
timgauthier has quit [Read error: Connection reset by peer]
kaspergr_ has quit [Remote host closed the connection]
macclearich_ has joined #ruby
jay__ has joined #ruby
<dopie>
yo benzrf
<dopie>
thanks for the explanation
Arkaniad has joined #ruby
krz has joined #ruby
Arkaniad has quit [Max SendQ exceeded]
echooo has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Ping timeout: 272 seconds]
<dopie>
whats the difference between accessing instance variable / instance method
echooo1 has quit [Ping timeout: 245 seconds]
matrixdevuk has joined #ruby
<centrx>
All instance variables are private, only accessible within the class?
<benzrf>
dopie: there is no such thing as an 'instance method' for one
<benzrf>
:p
sputnik13 has joined #ruby
<centrx>
What would you call it?
robbyoconnor has joined #ruby
<havenwood>
class instance method
xmad has quit [Ping timeout: 245 seconds]
<dopie>
basically
<havenwood>
but whatever ;P
troulouliou_dev has quit [Quit: Leaving]
Zenigor has joined #ruby
troulouliou_dev has joined #ruby
Zenigor has quit [Remote host closed the connection]
macclearich_ has quit [Quit: Computer has gone to sleep.]
<havenwood>
dopie: if it's simple enough for an instance variable, great. if not, private method. if you want to access it outside the class, public method.
macclearich_ has joined #ruby
<havenwood>
outside the instance of the class
jay__ has quit [Remote host closed the connection]
GinoMan has quit [Ping timeout: 260 seconds]
<havenwood>
dopie: instance variables avoid the whole method dispatch rigmarole
darkxploit has quit [Ping timeout: 250 seconds]
macclearich_ has quit [Ping timeout: 240 seconds]
hamakn has joined #ruby
Ulrike_Rayne has joined #ruby
renier has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<sjouke>
repackaged so that it takes characters and deletes the characters from the array
<Smashman>
Yes, pontiki
<sjouke>
strangely though it's returning new_arr: ["b", "a"]
<pontiki>
the run the gem install as root
<pontiki>
(no sudo needed)
<Smashman>
I tried :/
<pontiki>
what happened????
<Smashman>
Hang on
Kricir has joined #ruby
<pontiki>
maybe i should just step back and you tell me everything you've done so far, and what the results have been, and where exactly are things failing
<Smashman>
Well I have a Python app that I've been working on for ages
<Smashman>
If you could walk me through install ruby and subsequently sass, I would greatly appreciate it
jamto11 has quit [Remote host closed the connection]
deavid has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
<Smashman>
Please, pontiki
baweaver has quit [Ping timeout: 250 seconds]
jamto11 has joined #ruby
northfurr has joined #ruby
echooo has quit [Quit: echooo]
tjr9898 has joined #ruby
echooo has joined #ruby
tjr9898 has quit [Remote host closed the connection]
iamjarvo has joined #ruby
jamto11 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
thams has joined #ruby
tkuchiki_ has joined #ruby
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
ascarter has joined #ruby
benzrf|offline is now known as benzrf
tkuchiki has quit [Ping timeout: 256 seconds]
benzrf is now known as benzrf|offline
tjr9898 has quit [Remote host closed the connection]
nanoyak has joined #ruby
dbasch has joined #ruby
Bira has joined #ruby
thams has quit [Quit: thams]
thams has joined #ruby
NinoScript_ has joined #ruby
Bira has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benzrf|offline is now known as benzrf
benzrf is now known as benzrf|offline
jmbrown412 has joined #ruby
DivineEntity has quit [Quit: leaving]
sjouke has left #ruby [#ruby]
nanoyak has quit [Quit: Computer has gone to sleep.]
echevemaster has joined #ruby
macclearich__ has joined #ruby
northfurr has quit [Quit: northfurr]
macclearich__ has quit [Client Quit]
echevemaster has quit [Remote host closed the connection]
macclearich__ has joined #ruby
TrueJet has quit []
jamesaanderson has joined #ruby
farn has quit [Remote host closed the connection]
macclearich__ has quit [Ping timeout: 255 seconds]
davispuh has quit [Read error: Connection reset by peer]
timgauthier has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iaj_ has quit [Ping timeout: 272 seconds]
fly2web has left #ruby [#ruby]
Pumukel has joined #ruby
voodoofish has quit [Read error: Connection reset by peer]
Pumukel has quit [Client Quit]
voodoofish has joined #ruby
Channel6 has quit [Quit: Leaving]
heftig has quit [Ping timeout: 260 seconds]
Smashman has quit [Remote host closed the connection]
tkuchiki_ has quit [Remote host closed the connection]
Gues_____ has joined #ruby
tkuchiki has joined #ruby
nonnatus has joined #ruby
nonnatus_ has quit [Ping timeout: 240 seconds]
voodoofish has quit [Read error: Connection reset by peer]
voodoofish has joined #ruby
ascarter has joined #ruby
rails_flix has joined #ruby
oo_ has quit [Remote host closed the connection]
duper has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
oo_ has joined #ruby
amargherio has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lucianosousa has quit [Quit: lucianosousa]
chrishough has quit [Quit: chrishough]
ascarter has joined #ruby
Gues_____ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
St_Marx has joined #ruby
Deele has joined #ruby
sputnik13 has joined #ruby
mr_snowf1ake has joined #ruby
noober3 has joined #ruby
lucianosousa has joined #ruby
<noober3>
if i have an array of hashes is there a way to use inject on a specific key in the hashes to add the corresponding values together?
duper has joined #ruby
<timgauthier>
wouldn't you take the array, expose the keys, create the new value, and reinject it?
<timgauthier>
what exactly are you wanting to do?
jshultz has quit [Quit: Connection closed for inactivity]
<noober3>
i have [{:v1 => 2, :v2 = 3}, {:v2=> 4, :v3 =>5},...] and i want to add all the :v2 values up and store it in a seperate variable.
<timgauthier>
yeah, but like. what is a real world implication of this.
mikepack_ has quit [Remote host closed the connection]
asmodlol has joined #ruby
northfurr has joined #ruby
<noober3>
i have a bunch of data from queries from a db and need the data stores similar to this, so i can count and do other various tasks with the data
lucianosousa has quit [Quit: lucianosousa]
EvanR__ has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
basiclaser has quit [Excess Flood]
EvanR has joined #ruby
EvanR is now known as Guest30027
nobodyzzz has joined #ruby
<timgauthier>
so you are looking to collect a running total of that "key" ?
<noober3>
yes
<timgauthier>
ok, cool... uh, that doesn't seem useful to store a key in each one that contains a running total though, would it not be better to simply have a variable that holds that?
<timgauthier>
that way if something goes wrong and you need to redo, you can just dump the variable and run it from the start again
<noober3>
sorry that is what i want, a single variable to hold the total
basiclaser has joined #ruby
<timgauthier>
ah, then you want a function or wahtever they call it in ruby that simply iterates through the hash right?
<timgauthier>
something like a for-each i'd think. i'm a noob too
chipotle has joined #ruby
<noober3>
yeah but i think there is a build in ruby way to do it as to cut down on the code
<noober3>
similar, don't see anything with targeting a certain key
mostlybadfly has quit [Quit: Connection closed for inactivity]
tobago has joined #ruby
<timgauthier>
well it has too, to know what to add. i think the example is on a simple array, but you may need a for-each to target the array and then map whatever to sum it
<timgauthier>
but keep reading, cause the reduce etc seems like it goes into that.
<noober3>
i see thanks
RTG` has joined #ruby
<noober3>
i appreciate it
ziprar has quit [Quit: Leaving]
bradleyprice has quit [Ping timeout: 260 seconds]
Aryasam has quit [Ping timeout: 245 seconds]
zipace has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<noober3>
was going to tell him i figured it out. oh well goodnight
noober3 has quit [Quit: Pull the pin and count to what?]
vsoftoiletpaper has quit []
benzrf|offline is now known as benzrf
mr_snowf1ake has quit [Quit: Leaving]
arya_ has joined #ruby
oo_ has quit [Remote host closed the connection]
s2013_ has joined #ruby
SilverKey has joined #ruby
s2013 has quit [Ping timeout: 255 seconds]
tuxninja has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
tuxninja has joined #ruby
ARCADIVS has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hamakn has quit [Read error: Connection reset by peer]
benzrf is now known as benzrf|offline
hamakn has joined #ruby
timgauthier has joined #ruby
Morkel has joined #ruby
supermarkettoday has joined #ruby
timonv_ has quit [Remote host closed the connection]
tuxninja has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
Ankhers has quit [Remote host closed the connection]
Ankhers has joined #ruby
wookiehangover has joined #ruby
vinleod has joined #ruby
IteratorP has quit [Remote host closed the connection]
razum2um has quit [Quit: Leaving.]
GlenK has quit [Disconnected by services]
GlenK_ has joined #ruby
kyb3r_ has joined #ruby
apeiros_ has joined #ruby
jack_rabbit has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
robscormack has joined #ruby
zkay11 has left #ruby [#ruby]
kiri has joined #ruby
razum2um has joined #ruby
Platini has quit [Remote host closed the connection]
oo____ has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
Morkel has quit [Ping timeout: 245 seconds]
tectonic has quit []
jmbrown412 has quit [Remote host closed the connection]
IteratorP has joined #ruby
apeiros_ has quit [Remote host closed the connection]
ylluminarious has quit [Quit: Leaving...]
apeiros has joined #ruby
tuxninja has joined #ruby
St_Marx has quit [Remote host closed the connection]
x1337807x has joined #ruby
jack_rabbit has quit [Ping timeout: 255 seconds]
apeiros has quit [Ping timeout: 260 seconds]
aganov has joined #ruby
Dwarf has quit [Quit: Oops I quit]
asmodlol has quit [Read error: Connection reset by peer]
relix has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Dwarf has joined #ruby
banjara has joined #ruby
b00stfr3ak has joined #ruby
JBreit has joined #ruby
St_Marx has joined #ruby
amclain has quit [Quit: Leaving]
davedev2_ has quit []
memph1s has joined #ruby
lkba has joined #ruby
tuxninja has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
IteratorP has quit [Remote host closed the connection]
roolo has joined #ruby
rails_flix has quit [Quit: This computer has gone to sleep]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tuxninja has joined #ruby
techsethi has joined #ruby
noop has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
IteratorP has joined #ruby
sputnik13 has joined #ruby
robscormack has quit [Quit: Leaving]
jprovazn has joined #ruby
NinoScript_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
whyy has joined #ruby
MatthewsFace has joined #ruby
fabrice31 has joined #ruby
techsethi has quit [Quit: techsethi]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NinoScript_ has joined #ruby
noop is now known as noopq
Ankhers has quit [Ping timeout: 264 seconds]
dingus_khan has quit []
Akuma has quit [Ping timeout: 250 seconds]
vinleod has quit [Ping timeout: 272 seconds]
timgauthier has joined #ruby
amystephen has joined #ruby
cantonic has quit [Quit: cantonic]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
certainty has quit [Ping timeout: 255 seconds]
certainty has joined #ruby
kyb3r_ has quit [Ping timeout: 240 seconds]
linojon has quit [Quit: linojon]
Gooder` has joined #ruby
kyb3r_ has joined #ruby
Gooder has quit [Ping timeout: 255 seconds]
subtwo has joined #ruby
NinoScript_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
techsethi has joined #ruby
bigkevmcd has joined #ruby
Akuma has joined #ruby
kireevco has quit [Quit: Leaving.]
Gooder` has quit [Read error: Connection reset by peer]
jottr has joined #ruby
banjara has quit [Quit: Leaving.]
subtwo has quit [Quit: Computer has gone to sleep.]
ki0 has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Client Quit]
AlanWatts has joined #ruby
bigkevmcd has quit [Quit: Ex-Chat]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
bigkevmcd has joined #ruby
hobodave has joined #ruby
IteratorP has quit [Remote host closed the connection]
dbasch has quit [Quit: dbasch]
IteratorP has joined #ruby
JBreit has left #ruby ["Leaving"]
St_Marx has quit [Remote host closed the connection]
bradleyprice has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
alem0lars has joined #ruby
b00stfr3ak has quit [Ping timeout: 250 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
bradleyprice has quit [Ping timeout: 256 seconds]
lsmola has joined #ruby
sputnik13 has joined #ruby
tylerkern has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
apeiros has joined #ruby
sigurding has joined #ruby
s2013_ has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
sevvie has quit [Ping timeout: 256 seconds]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roolo has quit [Quit: Leaving...]
JBreit has joined #ruby
_tpavel has joined #ruby
bayed has joined #ruby
edmellum has joined #ruby
tcstar has joined #ruby
tcstar has quit [Client Quit]
nobodyzzz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackneill has joined #ruby
tcstar has joined #ruby
kangguru_away is now known as kangguru
tcstar has quit [Remote host closed the connection]
choke has joined #ruby
wallerdev has quit [Quit: wallerdev]
sk87 has joined #ruby
wald0 has joined #ruby
pierre1_ has quit [Ping timeout: 240 seconds]
St_Marx has joined #ruby
Bira has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
Bira has quit [Ping timeout: 256 seconds]
supermarkettoday has quit [Ping timeout: 250 seconds]
<arup_r>
While puts 10 - 5 is valid.. and puts(- 5) also valid, why not puts - 5 ?
<arup_r>
last throwing error
<arup_r>
Nomethod error I am getting
<arup_r>
>> puts - 5
<Mon_Robot>
arup_r: => NoMethodError: undefined method `-' for nil:NilClass... (https://eval.in/172554)
johnny_ has joined #ruby
<Mon_Ouie>
Because that means (puts) - 5 and puts returns nil
<sevenseacat>
obviously puts returns nul
<sevenseacat>
*nil
<arup_r>
Aww!! so simple.. Thanks
linoespinoza has joined #ruby
drawingthesun has joined #ruby
parduse has quit []
<arup_r>
Mon_Ouie: Question - Does it mean binary operations has higher precedence than the method call ? Which Unary operator don't have..
parduse has joined #ruby
linoespinoza has quit [Client Quit]
ephemerian has joined #ruby
<arup_r>
Why puts - 5 is not parsed as puts - 5)
<johnny_>
<arup_r>
puts(- 5)
NinoScript_ has joined #ruby
kireevco has quit [Quit: Leaving.]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
supermarkettoday has joined #ruby
<arup_r>
while puts 10 - 5 is puts(10 - 5)
johnny_ has quit [Read error: Connection reset by peer]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
AlanWatts has quit [Remote host closed the connection]
supermarkettoday has quit [Remote host closed the connection]
pallavi_ has joined #ruby
oo____ has quit [Remote host closed the connection]
hobodave has quit [Quit: Computer has gone to sleep.]
techsethi has quit [Quit: techsethi]
dumdedum has joined #ruby
Ilyas has joined #ruby
andrewlio has joined #ruby
timonv_ has joined #ruby
NinoScript_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Hanmac has quit [Quit: Leaving.]
dumdedum has quit [Ping timeout: 255 seconds]
arup_r has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 260 seconds]
lkb has joined #ruby
tylerkern has joined #ruby
oo____ has joined #ruby
basiclaser has quit [Excess Flood]
dawkirst has joined #ruby
anarang has joined #ruby
sixxy has joined #ruby
doev has joined #ruby
basiclaser has joined #ruby
alex88 has joined #ruby
whyy has quit [Remote host closed the connection]
Macaveli has joined #ruby
Morkel has joined #ruby
LiohAu has joined #ruby
wald0 has quit [Ping timeout: 272 seconds]
supermarkettoday has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dumdedum has joined #ruby
supermarkettoday has quit [Remote host closed the connection]
RandyT has quit [Ping timeout: 240 seconds]
JBreit has left #ruby ["Leaving"]
Xeago has joined #ruby
kangguru is now known as kangguru_away
supermarkettoday has joined #ruby
RandyT has joined #ruby
dvb_ua has quit [Ping timeout: 240 seconds]
tuxninja has quit [Remote host closed the connection]
supermarkettoday has quit [Remote host closed the connection]
nobodyzzz has joined #ruby
IteratorP has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 245 seconds]
danijoo has joined #ruby
IteratorP has joined #ruby
lxsameer has joined #ruby
supermarkettoday has joined #ruby
IteratorP has quit [Remote host closed the connection]
kangguru_away is now known as kangguru
supermarkettoday has quit [Remote host closed the connection]
<Mon_Robot>
apeiros: => NoMethodError: undefined method `-' for nil:NilClass (https://eval.in/172598)
supermarkettoday has quit [Remote host closed the connection]
<apeiros>
note that `puts(- 5)` is bad style. you should not put a space in front of an unary minus.
arya_ has quit [Ping timeout: 260 seconds]
sixxy has quit [Quit: Leaving]
shredding has joined #ruby
<arup_r>
I was trying to check the *syntactic sugar* how much goes well.
<arup_r>
Now.. I understood.. I was playing with the syntactic sugar.. thus this question does come in my mind
chth0n has joined #ruby
comma8 has quit [Ping timeout: 250 seconds]
<apeiros>
I understand. and `expression1 - expression2` is syntactic sugar for `expression1.-(expression2)`. whether expression1 is an lvar, method call or other thing doesn't matter. unless it's composed of subexpressions and not wrapped in parens. then precedence come into play.
<apeiros>
e.g. `foo * bar - baz` is syntactic sugar for `foo.*(bar).-(baz)`, and not `foo.*(bar.-(baz))`
<arup_r>
apeiros: Exactly the way you told, I was thinking and got confused.
anarang has quit [Ping timeout: 245 seconds]
<arup_r>
Thanks for at-least understanding my point.
<apeiros>
also note: -5 is an integer literal. -x is syntactic sugar for x.-@
casheew__ has quit [Quit: leaving]
<apeiros>
so puts(-x) is puts(x.-@)
casheew has joined #ruby
dangerousdave has joined #ruby
<arup_r>
yes.. same is for puts( - x)
<arup_r>
but not puts - x
tjr9898 has quit [Remote host closed the connection]
anarang has joined #ruby
<arup_r>
shevy: say WTF... I like the different ways you used to say WTF :-)
<shevy>
huh?
ValicekB has quit [Ping timeout: 250 seconds]
<matti>
shevy: shevy shevy
<matti>
Ohai apeiros
<shevy>
yeah
<shevy>
that is me
<matti>
shevy: I know! You are super cool!
casheew has quit [Quit: leaving]
<shevy>
\o/
bridge has joined #ruby
arya_ has joined #ruby
anarang has quit [Quit: Leaving]
anarang has joined #ruby
<flughafen>
does ruby return whatever the last statement of the function is? even if it's results = foo is the last line, it'll return results?
IteratorP has quit [Remote host closed the connection]
<flughafen>
interesting, thanks apeiros
<apeiros>
yw
comma8 has quit [Ping timeout: 250 seconds]
Takle has joined #ruby
ryanneufeld has quit [Ping timeout: 250 seconds]
Bira has joined #ruby
roolo has quit [Quit: Leaving...]
havenwood has joined #ruby
ryanneufeld has joined #ruby
<arup_r>
If I want to override say +, - I do need to use @ while overriding those methods. Why don't need for say `!` ? `!` is also an unary operator .
<ixti>
if i require module I'm testing explicitly it works as expected in both `bundle exec rspec` and `zeus rspec` o_O
alem0lars has quit [Quit: Going AFK...]
SoliahMBA has joined #ruby
iamjarvo has joined #ruby
opus has quit [Ping timeout: 260 seconds]
SoliahMBA has quit [Client Quit]
Soliah- has joined #ruby
Perceptes has quit [Quit: Leaving.]
jheg has joined #ruby
jheg has quit [Client Quit]
JohnBat26 has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
tcurdt has joined #ruby
freerobby has quit [Quit: Leaving.]
TorpedoSkyline has joined #ruby
whyy has quit [Remote host closed the connection]
Bira has joined #ruby
SegFaultAX has quit [Excess Flood]
TorpedoSkyline has quit [Client Quit]
philevans__ is now known as probonic
Soliah- has quit [Ping timeout: 272 seconds]
SegFaultAX has joined #ruby
Bira has quit [Ping timeout: 256 seconds]
whyy has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ddoherty57 has joined #ruby
TorpedoSkyline has joined #ruby
oo____ has quit [Read error: Connection reset by peer]
oo____ has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
benzrf|offline is now known as benzrf
postmodern has quit [Quit: Leaving]
nuck has quit [Read error: Connection reset by peer]
LangeOortjes has joined #ruby
oo____ has quit [Client Quit]
nuck has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
phoo1234567 has joined #ruby
whyy has quit [Remote host closed the connection]
pallavi_ has quit [Quit: Connection closed for inactivity]
doev has quit [Quit: Verlassend]
pandaant_ has joined #ruby
kaspergr_ has joined #ruby
alexju has joined #ruby
claymore has joined #ruby
oo____ has joined #ruby
kaspergrubbe_ has quit [Ping timeout: 250 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ldnunes has joined #ruby
tjr9898 has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
kyb3r_ has quit [Read error: Connection reset by peer]
MartinCleaver has joined #ruby
GriffinHeart has quit []
kangguru is now known as kangguru_away
Soliah- has joined #ruby
GriffinHeart has joined #ruby
yokel has joined #ruby
Zebroid has joined #ruby
bogeyd6 has quit [Read error: Connection reset by peer]
TorpedoSkyline has joined #ruby
kaspergr_ has quit [Remote host closed the connection]
jeekl_ is now known as jeekl
MCDev has joined #ruby
kaspergrubbe_ has joined #ruby
Zebroid has quit [Remote host closed the connection]
<Deele>
Please, correct me if I'm wrong (I come with PHP background and have create modular CMS using Yii framework): as I understand, RoR is some sort of framework that combines webserver and basic application logic into one. It seems that Yii has many similarities with RoR (I remember, that author was influenced by RoR at some point), but I still don't get logic of RoR. From other hand, I have only
<Deele>
some surface knowledge about it.
<flughafen>
>> puts "true" if ""
<Mon_Robot>
flughafen: => (eval):1: warning: string literal in condition... (https://eval.in/172611)
<flughafen>
does "" eval to true?
TorpedoSkyline has quit [Ping timeout: 264 seconds]
<Mon_Ouie>
Yes, you can click on the link to see the full output
<tobiasvl>
everything is truthy in ruby except nil and false
<flughafen>
ok
<flughafen>
thanks guys
<flughafen>
i'l just start my empty var as nil
<tobiasvl>
sounds like a good plan!
<flughafen>
w00t
<Mon_Ouie>
Or check if it's empty by calling #empty?
yokel has quit [Ping timeout: 255 seconds]
whyy has joined #ruby
<flughafen>
Mon_Ouie: yea, that was brought up too.
<flughafen>
string might be more consistent with the rest of the function
<Deele>
Ok, I guess, none here has answer to my question. Ok then, please, help me setting up backed up redmine app onto fresh installed RailsInstaller on Windows. Can I just copy and paste it somewhere to "make it open in browser and show stuff"?
Soliah- has quit [Quit: Soliah-]
malditogeek has quit [Quit: Leaving.]
<Deele>
I mean, I have extracted whole redmine from our old debian server, and now I'm trying to test it on another PC, that is windows based server
<Mon_Ouie>
#rubyonrails and a redmine specific channel if there's one probably would help you more
<Deele>
ain't there any "generic rule of thumb", where should something should be put to make it work?
alem0lars has joined #ruby
tokik has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
arup_r has joined #ruby
xuitlacoche has joined #ruby
joonty has quit [Quit: WeeChat 0.4.2]
Sgeo has quit [Read error: Connection reset by peer]
kangguru_away is now known as kangguru
malditogeek has joined #ruby
amacou has joined #ruby
techsethi has joined #ruby
Zebroid has joined #ruby
sixxy has quit [Remote host closed the connection]
basiclaser has left #ruby [#ruby]
shredding has joined #ruby
sevvie has joined #ruby
moritzs has quit [Ping timeout: 255 seconds]
benzrf is now known as benzrf|offline
techsethi has quit [Client Quit]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mr-foobar has quit [Quit: Leaving...]
Zebroid has quit [Remote host closed the connection]
lkb has joined #ruby
ocher has joined #ruby
jheg has joined #ruby
yokel has joined #ruby
claymore has quit [Quit: Leaving]
<ocher>
hi, could anyone tell me where exactly Proc return statement returns? i'm not sure why this code: http://pastie.org/9426553 raises "unexpected return (LocalJumpError)"
hobodave has joined #ruby
mostlybadfly has joined #ruby
<ocher>
i thought that the "return" inside Proc would return to the place where the proc was defined
<mostlybadfly>
Haaaaappy Monday
Bira has joined #ruby
spastorino has joined #ruby
SegFaultAX has quit [Excess Flood]
<apeiros>
ocher: it returns from the method you defined the proc in. but if you're no longer in that method, or aren't in any method, it'll raise.
<apeiros>
if you want to return from a proc, use break
bradleyprice has joined #ruby
yokel has quit [Ping timeout: 250 seconds]
SegFaultAX has joined #ruby
wald0_ has joined #ruby
<ocher>
ok, i see. i just wanted to know exactly where proc returns, and i was expecting to get: "after get_proc in get_proc_top", but now when you wrote that i'm no longer in the get_proc_top i understand why it raises an exception
<ocher>
apeiros: thank you
Bira has quit [Ping timeout: 256 seconds]
mehlah has joined #ruby
jamto11 has joined #ruby
bradleyprice has quit [Ping timeout: 255 seconds]
Joulse has joined #ruby
shredding has quit [Ping timeout: 250 seconds]
britneywright has joined #ruby
alem0lars has quit [Ping timeout: 256 seconds]
jimmyhoughjr has joined #ruby
oo____ has quit [Ping timeout: 255 seconds]
renderful has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
fold has quit [Ping timeout: 260 seconds]
shredding has joined #ruby
<arup_r>
teach me something new in Ruby today. I am hungry
jamto11 has quit [Remote host closed the connection]
MartinCleaver has quit [Quit: MartinCleaver]
tkuchiki has quit [Ping timeout: 260 seconds]
<fly2web>
ruby is more developed language than python and perl?
<tobiasvl>
fly2web: what do you mean?
<fly2web>
ruby include perl and python rule?
<tobiasvl>
what?
<fly2web>
perl and python don’t include ruby rule?
<apeiros>
they are different languages with different benefits
<fly2web>
oh yes
yokel has joined #ruby
<arup_r>
Can help me to understand this nested_hash = Hash.new { |hash, key| hash[key] = Hash.new(&hash.default_proc) } ? How nested_hash[:x][:y][:z] = :xyz # => {:x=>{:y=>{:z=>:xyz}}} ?
<fly2web>
i can do perl and python but i can’t do ruby.
<arup_r>
apeiros: He is trolling.. ;)
tokik has joined #ruby
BeanDip_ has quit [Ping timeout: 250 seconds]
riddled has joined #ruby
<arup_r>
fly2web: Sunday also you discussed the same things... Lots of people asked you about the right way
<apeiros>
arup_r: `Hash.new { |hash, key| hash[key] = Hash.new(&hash.default_proc) }` returns a hash with `{ |hash, key| hash[key] = Hash.new(&hash.default_proc) }` as .default_proc
endash has joined #ruby
riddled has joined #ruby
riddled has quit [Changing host]
katlogic has quit [Read error: Connection reset by peer]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r>
I am lost here hash[key] = Hash.new(&hash.default_proc)
riddled has left #ruby [#ruby]
<apeiros>
arup_r: or maybe he's in delirium because he didn't eat enough
<arup_r>
There is some *recursion* is going on I understand
<arup_r>
But how default proc is working not getting..
<arup_r>
apeiros: Thanks for the kick to the right directions...
MartinCleaver has joined #ruby
whyy has joined #ruby
shredding has joined #ruby
Takle has joined #ruby
DaniG2k has quit [Ping timeout: 260 seconds]
siwica has joined #ruby
crazydiamond has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Zenigor has joined #ruby
Takle has joined #ruby
<fly2web>
why can i use symbol(:)?
andrewbredow has joined #ruby
andrewlio has quit [Quit: Leaving.]
<arup_r>
fly2web: Don't troll
danijoo has quit [Read error: Connection reset by peer]
<fly2web>
:( ok i see. but i don’t know for reason of using symbol
danijoo has joined #ruby
ValicekB has joined #ruby
lw has joined #ruby
beef-wellington has joined #ruby
shredding has quit [Ping timeout: 256 seconds]
Zenigor has quit [Read error: Connection reset by peer]
sailias has joined #ruby
Zenigor has joined #ruby
<siwica>
I do have a modeling question:
<siwica>
I have a class "feature" that represents a geographical feature which has a geometry attribute. The geometry can either be 0D, 1D, 2D or 3D. I have a separate class (foo0D, foo1D, ..., foo3D) for each geometry dimension. How can I model that the geometry attribute can only take one of the four datatypes?
MrDoctor has joined #ruby
<toretore>
what do you mean? you only have one attribute right?
<fly2web>
arup_r, i download “Programming Ruby 1.9 & 2.0 The Pragmatic Programmers' Guide”
Bira has joined #ruby
riotjones has quit [Ping timeout: 245 seconds]
<siwica>
toretore: yes. the attribute "geometry"
<siwica>
...in the feature class
<arup_r>
fly2web: Go and read. Come, when you stuck
jerius has joined #ruby
<toretore>
siwica: so, that restricts it to only one type
<fly2web>
ok i see thanks arup_r
<fly2web>
:)
matchaw has quit [Ping timeout: 245 seconds]
matchaw_ has joined #ruby
Bira has quit [Ping timeout: 255 seconds]
pandaant_ has quit [Quit: leaving]
Takle has quit [Remote host closed the connection]
fmendez has joined #ruby
<siwica>
toretore: I want to allow the four types: foo0D, ..., foo3D but no other type
pzula has quit [Ping timeout: 260 seconds]
MrDoctor has quit [Quit: Leaving]
<toretore>
siwica: enforcing types really isn't done in ruby
<toretore>
you could do it manually, but most would consider it a waste of time
<apeiros>
but I agree with toretore, it's usually considered a waste of time
<apeiros>
also that's not really a modeling question ;-)
<siwica>
I thought it would just make the program more robust
vt102 has joined #ruby
<apeiros>
that doesn't make it more robust
<apeiros>
it'll crash all the same if you pass in the wrong thing
<apeiros>
it makes for an easier to understand exception, and it adds more (potentially harmful) restrictions. that's all.
<siwica>
I rethought the problem though and will probably make the feature class a superclass of foo0, ..., foo3. This way I dont have the problem.
mikesplain has joined #ruby
<apeiros>
o0
zalmoxes_ is now known as zalmoxes
<toretore>
you didn't have a problem to begin with ;)
<siwica>
:P
malditogeek has quit [Quit: Leaving.]
_maes_ has joined #ruby
<toretore>
really, if you want this sort of stuff, you should use a language that knows about it and enforces it
aganov has quit [Ping timeout: 250 seconds]
mark_locklear has joined #ruby
sigurding_ has joined #ruby
<siwica>
I am quite new to ruby and understand the duck-typing concept. But aren't there some situations in a programing project where you explicitly want to prevent people from using datatypes other than you considered?
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
fgo has joined #ruby
<toretore>
very very few
<toretore>
yours is not one of them
zB0hs has joined #ruby
sigurding has quit [Ping timeout: 260 seconds]
sigurding_ is now known as sigurding
danijoo has quit [Read error: Connection reset by peer]
<atmosx>
hello
danijoo has joined #ruby
beef-wellington has quit [Ping timeout: 264 seconds]
djcp has joined #ruby
djcp has left #ruby [#ruby]
mikesplain has quit [Ping timeout: 255 seconds]
ohcibi_ is now known as ohcibi
Bira has joined #ruby
krz has joined #ruby
abilon has quit [Quit: Computer has gone to sleep.]
tylerkern has quit [Read error: Connection reset by peer]
tylerkern has joined #ruby
avelldiroll has quit [Ping timeout: 250 seconds]
<Karunamon>
Hi all - I'm wondering if anyone has any experience kicking off Rspec inside another program. I'm running a bunch of validation steps against a hash provided by the user, and I'd like to show those validations happening. Problem is, I keep getting an "undefined method map!' from Rspec.
fabrice31 has quit [Remote host closed the connection]
mechanicalduck_ has joined #ruby
<mechanicalduck_>
hi
<mechanicalduck_>
Does bundler already ship its own rake tasks?
<mechanicalduck_>
So I just invoke rake and it lets bundler install?
<Karunamon>
mechanicalduck_: Whenever I use bundler, it provides another script just called 'bundler'. You just do 'bundler init' in the project root, and 'bundler install' from within the gemfile
<Karunamon>
I don't think rake is involved
fgo has joined #ruby
aspires has quit [Remote host closed the connection]
<Karunamon>
err, not from within the gemfile, but where it's been created
tjr9898_ has joined #ruby
dbasch has quit [Quit: dbasch]
aspires has joined #ruby
tjr9898 has quit [Read error: Connection reset by peer]
Mekkis has quit [Ping timeout: 244 seconds]
<mechanicalduck_>
Right, and Rake has to be installed, too. :D
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
Mekkis has joined #ruby
bradleyprice has joined #ruby
jrhorn424 is now known as zz_jrhorn424
fgo has quit [Ping timeout: 245 seconds]
thams has joined #ruby
tjr9898 has joined #ruby
SegFaultAX has quit [Excess Flood]
<Karunamon>
Huh it's almost like there's some piece of configuration that rspec applies when run from the command line, but not when invoked programmatically with Rspec::Core::Runner.run(__FILE__)
amacou_ has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
amacou has joined #ruby
thams has quit [Client Quit]
linojon has quit [Ping timeout: 240 seconds]
einarj has quit [Remote host closed the connection]
blackmesa has joined #ruby
renderful has quit [Remote host closed the connection]
fold has joined #ruby
tjr9898_ has quit [Ping timeout: 272 seconds]
vsoftoiletpaper has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
<mechanicalduck_>
Karunamon: Check the bin stub used for rspec command (in cli), it also uses rspec programmatically plus the cli handling stuff (and possibly the logic for your observation).
_maes_ has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
razum2um has quit [Quit: Leaving.]
amacou has quit [Ping timeout: 272 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
ramfjord has joined #ruby
tvw has quit []
jdj_dk_ has quit [Remote host closed the connection]
Photism has quit [Quit: Leaving]
MartinCleaver has quit [Quit: MartinCleaver]
MartinCleaver has joined #ruby
lmickh has joined #ruby
Arkaniad has joined #ruby
razum2um has joined #ruby
Arkaniad has quit [Max SendQ exceeded]
banister has quit [Ping timeout: 245 seconds]
pontiki has joined #ruby
anarang has quit [Quit: Leaving]
blackmesa has quit [Remote host closed the connection]
blackmesa has joined #ruby
treehug88 has quit [Ping timeout: 255 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
mikesplain has joined #ruby
dawkirst has quit [Remote host closed the connection]
polysics has left #ruby [#ruby]
ixti has quit [Quit: WeeChat 0.4.3]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
renderful has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
banister has joined #ruby
Ankhers has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
lsmola has quit [Ping timeout: 260 seconds]
mr-foobar has joined #ruby
startupality has joined #ruby
hamakn has quit [Remote host closed the connection]
<fly2web>
i study ruby, i want know my skill with webscraping by ruby.
<mechanicalduck_>
Karunamon: Pardon, to which post of mine are you referring?
<Karunamon>
mechanicalduck_: >Karunamon: Check the bin stub used for rspec command (in cli), it also uses rspec programmatically plus the cli handling stuff (and possibly the logic for your observation).
<wasamasa>
this is like the worst troll ever
cantonic has joined #ruby
<fmendez>
lol
<centrx>
fly2web, You need to learn how to use the Web before you can scrape it
<mechanicalduck_>
ah!
<mechanicalduck_>
Karunamon: Right
<Karunamon>
:)
<fmendez>
hahah
<fly2web>
i know web
<fly2web>
there is bin, ext, lib, ports, suppressions, tasks, .............
<Karunamon>
Don't know why I never thought of that, lol
<fly2web>
what is it?
dbasch has quit [Client Quit]
<Karunamon>
Speaking of things I never thought of.. as much fun as it is to write my own recursive hash searches for assorted corner cases, I can't help but think someone's already written a gem of some kind to handle this type of malarky
aagdbl has joined #ruby
yalue has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
<fly2web>
fmendez: where can i find ‘mechanize'?
Pumukel has joined #ruby
<wasamasa>
fly2web: explain me what a troll is
<fly2web>
wasamasa: i m not troller.
<fly2web>
you mistake me as troller.
<fly2web>
i m just kind.
<wasamasa>
fly2web: you use that word as if you knew what a troll is
banister has quit [Read error: Connection reset by peer]
<fly2web>
i don’t know troller
<wasamasa>
fly2web: therefore, you're obliged to explain your definition to me
MCDev has joined #ruby
<wasamasa>
fly2web: how can you claim you're no troll when you don't know what a troll is?
MCDev has quit [Changing host]
MCDev has joined #ruby
doev has quit [Quit: Verlassend]
<fly2web>
just give me mechanize place?
<fly2web>
give me sites of mechanize.
<centrx>
Sorry, it's on github, remember?
startupality has quit [Ping timeout: 260 seconds]
ari-_-e has joined #ruby
SCHAAP137 has joined #ruby
bricker`work has joined #ruby
LiohAu has quit [Quit: LiohAu]
<wasamasa>
first he claims to have learned 20 different programming languages, then he's too stupid for reading a book or finding a project on github
<wasamasa>
how can this be real
Snarkz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa>
I refuse to believe it
<fly2web>
i don’t know github.
<fly2web>
but i know many language.
banister has joined #ruby
<fly2web>
knowing many language != knowing github
BadCodSmell has joined #ruby
banister has quit [Client Quit]
<BadCodSmell>
Is there a way in ruby 1.8.7 to output JSON and maintain constant order? IE for sorted by key?
<wasamasa>
".znc/moddata/log/wasamasa_freenode_#ruby_20140726.log:[12:56:34] <fly2web> then i want hacking, but metasploit is made of ruby. so i think that i must study ruby."
zoo-zed has joined #ruby
<BadCodSmell>
it's study what most things are made of to be a hacker
banister has joined #ruby
<BadCodSmell>
i would*
<wasamasa>
".znc/moddata/log/wasamasa_freenode_#ruby_20140727.log:[00:12:01] <fly2web> i know haskell, but i don’t need to functional language."
<BadCodSmell>
and new popuylar things where people do stupid
<pontiki>
man oh man. here i get this *ancient* vagrant box, with this *ancient* version of ruby (1.9.3), which of *course* fails when rvm hits the directory, and of *course* fails after updating ruby to the last 1.9.3 during the bundle install....
kireevco has left #ruby [#ruby]
choke has joined #ruby
<havenwood>
fly2web: Learning to use a search engine will make things accessible to you, like the weather, what movie is playing, where nokogiri and mechanize gems can be found, etcetera.
<fly2web>
how about my skill of android? and android is made by java
pietr0 has joined #ruby
<wasamasa>
fly2web: that's no code you're showing, idiot
<pontiki>
Do you all know the phrase "When the student is ready, the teacher appears" ?
<pontiki>
the corrolary is, until the student is ready, the teacher is wasting their breath
<havenwood>
fly2web: Try googling some tutorials about how to use google.
<fly2web>
havenwood: thanks you are my friend in ruby only
alem0lars has quit [Quit: alem0lars]
<fly2web>
but now i want know way of finding ruby module.
<fly2web>
BYE i will sleep.
<sjouke>
what is the self method in ruby?
<fly2web>
me?
<sjouke>
why not just create another method for the class like def foo
<Mon_Ouie>
It's not a method, it's a keyword that evaluates to the object the current object was called one
<fly2web>
BYE
<Mon_Ouie>
current method*
fly2web has left #ruby [#ruby]
<Mon_Ouie>
>> class Foo; def bar; p self; end; Foo.new.bar
Lewix has quit [Remote host closed the connection]
farn has joined #ruby
Lewix has joined #ruby
NinoScript has joined #ruby
sjouke has quit [Quit: leaving]
edwardly has quit [Ping timeout: 240 seconds]
tylerkern has quit [Read error: Connection reset by peer]
tylerkern has joined #ruby
malditogeek has quit [Quit: Leaving.]
ramfjord has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<Lewix>
where are the toronto rubyist at
timonv_ has quit [Remote host closed the connection]
* Mon_Ouie
wants to answer Toronto
sigurding has joined #ruby
<hfp>
Hey all, I have something like `foo = ['bar', 'baz']` and I would like to end up with `foo = 4 * foo` so I will have 8 entries in my foo instead of 2. I tried 4.times and 4*foo but no dice. How should it be done?
<Mon_Ouie>
You have to put the number on the other side of '*'
<Xeago>
it's a search engine with opinionated tokenization :)
krz has quit [Quit: WeeChat 0.4.3]
<shevy>
"$# represents the number of command line arguments passed to the script."
<shevy>
man
<shevy>
if shell scripts would only be ruby scripts
krz has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
<pontiki>
i've stopped writing bash scripts and perl scripts anymore; everything goes as ruby.
thams has quit [Quit: thams]
freggles has joined #ruby
nanoyak has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nanoyak has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
thams has joined #ruby
<shevy>
\o/
<shevy>
you are the man!
Vpex has joined #ruby
Neomex has joined #ruby
banister has joined #ruby
frankle has joined #ruby
Wolland has joined #ruby
k0m has joined #ruby
<shevy>
we need to find out who has the biggest brains
bradleyprice has joined #ruby
<shevy>
and remembers the ruby stdlib and corelib docu offline too, only from own memory alone
bradleyprice has quit [Remote host closed the connection]
bradleyp_ has joined #ruby
k0m has left #ruby [#ruby]
yfeldblum has joined #ruby
xmad has joined #ruby
centipedefarmer has joined #ruby
Adam_ has joined #ruby
britneywright has joined #ruby
treehug88 has quit [Ping timeout: 260 seconds]
<shevy>
huh
<shevy>
did you guys know there is Array#fill
<shevy>
who does not know what it does
Morkel_ has joined #ruby
<Adam_>
Wassup #Ruby. I have a question about requiring class files in a project. I was wondering if there's a way I could add some class files to some sort of path where I can access is by saying "require 'class_name'" instead of having to require the whole directory?
Xeago has quit [Remote host closed the connection]
<Mon_Ouie>
Adam_: $LOAD_PATH is that variable
<Adam_>
cool thanks
Morkel has quit [Ping timeout: 260 seconds]
Morkel_ is now known as Morkel
matchaw has joined #ruby
enebo has joined #ruby
ra4king has quit [Quit: Leaving]
Xeago has joined #ruby
davispuh has joined #ruby
ra4king has joined #ruby
mattmcclure has joined #ruby
matchaw_ has quit [Ping timeout: 260 seconds]
parduse has quit [Remote host closed the connection]
parduse has joined #ruby
b00stfr3ak has quit [Ping timeout: 272 seconds]
<hfp>
How could I mesh 2 arrays? so that `["foo", "bar"] and ["baz", "qux"]` become `{"baz" => "foo", "qux" => "baz"}` ?
bricker`work is now known as bricker
b00stfr3ak has joined #ruby
mercwithamouth has quit [Ping timeout: 250 seconds]
<Mon_Ouie>
You can use Array#zip and Hash.[]
<hfp>
Mon_Ouie: Thanks
jamto11 has joined #ruby
<pontiki>
hmmm
<wallerdev>
or zip reduce
Snarkz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has quit [Remote host closed the connection]
roolo has joined #ruby
mikepack has joined #ruby
IceDragon has joined #ruby
Azzurrio has joined #ruby
trolling42 has joined #ruby
timonv_ has joined #ruby
chrishough has joined #ruby
<Azzurrio>
I've a question about server side procces in most ruby web frameworks
jerius_ has joined #ruby
<Azzurrio>
what's the difference between Apache or Nginx & Unicorn or Passenger
<Mon_Ouie>
arup_r: Yeah
Hobogrammer has joined #ruby
<Azzurrio>
Why should I use both of them together?
<arup_r>
Mon_Ouie: Really look better
<arup_r>
*looks
lmickh has quit [Remote host closed the connection]
clinicalpain has joined #ruby
clinicalpain has left #ruby [#ruby]
jerius has quit [Ping timeout: 245 seconds]
carraroj has quit [Ping timeout: 260 seconds]
Lightsword has joined #ruby
centrx has joined #ruby
<trolling42>
Hi how can I use file.dirname to read a path from environment variable?
<arup_r>
example please
<trolling42>
file.dirname('$TEST') gives nil in irb console
<shevy>
trolling42 just fetch it ... File.dirname(ENV['NAME_HERE'])
NinoScript has quit [Ping timeout: 264 seconds]
<trolling42>
shevy, ah ok. I tried to read it directly. thanks.
<shevy>
you have to check whether ENV has this though
<shevy>
otherwise you'd get an error
dRbiG has joined #ruby
<Mon_Ouie>
>> ENV
<Mon_Robot>
Mon_Ouie: Something went wrong when trying to evaluate your code.
<shevy>
File.dirname(ENV['NAME']) if ENV.has_key? 'NAME'
<Mon_Ouie>
:(
xmad has quit [Ping timeout: 256 seconds]
<shevy>
lol Mon_Ouie
<Lightsword>
what would be the regex to remove the trailing zeros from this string? for example “1.10000000 USD” to “1.1 USD”
<apeiros>
Lightsword: .delete('0') :-p
ascarter has joined #ruby
kangguru_away is now known as kangguru
<apeiros>
I guess you're after something like .gsub(/0+(?= )/, '')
<Lightsword>
apeiros would that work with “1.01000000 USD” to “1.01 USD”
<apeiros>
Lightsword: obviously not, but you didn't specify properly. hence the :-p
<centrx>
.to_f
<Lightsword>
kk, thanks, second one worked
chipotle has joined #ruby
<Mon_Ouie>
Oh, it's the eval-in website that's down
NinoScript has joined #ruby
muz0xd has joined #ruby
postmodern has joined #ruby
Adam_ has quit [Quit: Page closed]
renderful has quit [Remote host closed the connection]
Ysgard has joined #ruby
muz0xd has quit [Client Quit]
Atrumx has quit [Quit: Quitting]
kireevco has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
xmad has joined #ruby
Ysgard has left #ruby [#ruby]
fgo has joined #ruby
Ysgard has joined #ruby
<Ysgard>
#learn
muz0xd has joined #ruby
brianherman has quit [Ping timeout: 245 seconds]
MatthewsFace has quit [Quit: This computer has gone to sleep]
kiri has quit [Ping timeout: 272 seconds]
<Lightsword>
apeiros, how would I conditionally remove the decimal place as well if there are all-zero numbers after decimal place?
<Lightsword>
so that “1.00000000 USD” to “1 USD”
phinfonet has quit []
<apeiros>
you anchor your regex with the .
<apeiros>
remember that you need \., since . alone means "any char"
fgo has quit [Ping timeout: 245 seconds]
bwilson has joined #ruby
<Lightsword>
apeiros, where in the /0+(?= )/ would I add that anchor?
<Mon_Ouie>
Is the '.' before or after the zeros? ;)
beef-wellington has quit [Ping timeout: 250 seconds]
Adam_ has joined #ruby
<Lightsword>
before
<apeiros>
I suggest you try
fabrice31 has joined #ruby
<Lightsword>
oh, like this? /\.0+(?= )/ ?
MatthewsFace has joined #ruby
<centrx>
str.to_f.sub(/\.0$/, '')
<centrx>
str.to_f.to_s.sub(/\.0$/, '')
<Adam_>
So I'm looking at how to manage the load paths of a project I'm working on and I was wondering if setting up an env.rb file would be appropriate. The general idea is to add all the load paths in the env.rb and then include the env.rb right? I'd appreciate some input.
kireevco has quit [Read error: Connection reset by peer]
arup_r1 has joined #ruby
kireevco has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
tylerkern has quit [Client Quit]
pu22l3r has joined #ruby
sigurding has joined #ruby
<hfp>
I'm struggling with weird unicode characters. Some of our systems let no printable unicode characters through to the DB. How can I get rid of nasty things like U+0233E in a string?
<hfp>
no printable = unprintable
<wallerdev>
dont put them in the input string?
<wallerdev>
lol
arup_r has quit [Ping timeout: 255 seconds]
<hfp>
wallerdev: How would you do it?
<wallerdev>
unicode characters aren't nasty just because theyre unprintable, you should make sure the string encoding corresponds to whatever your database's encoding is and it should work
jamto11 has quit [Ping timeout: 250 seconds]
MCDev has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
renderfu_ has joined #ruby
ari-_-e has joined #ruby
crudson has joined #ruby
DivineEntity has joined #ruby
kireevco has quit [Quit: Leaving.]
kireevco has joined #ruby
kireevco has quit [Client Quit]
tylerkern has joined #ruby
jdj_dk has joined #ruby
soulcake has joined #ruby
benzrf|offline is now known as benzrf
renderful has quit [Ping timeout: 256 seconds]
aspires has joined #ruby
maestrojed has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco has joined #ruby
jerius_ has quit []
baweaver has joined #ruby
opus has joined #ruby
tylerkern has joined #ruby
jerius has joined #ruby
MatthewsFace has joined #ruby
tylerkern has quit [Client Quit]
arup_r1 has quit [Quit: Leaving.]
beryllium has joined #ruby
aspires has quit []
djbkd has quit [Remote host closed the connection]
aspires has joined #ruby
baweaver has quit [Ping timeout: 264 seconds]
jimms has quit []
tylerkern has joined #ruby
MatthewsFace has quit [Ping timeout: 272 seconds]
gr33n7007h has joined #ruby
treehug88 has quit [Ping timeout: 250 seconds]
Takle has joined #ruby
Ankhers has quit [Ping timeout: 264 seconds]
<hfp>
wallerdev: I'm stuck with a U+0233E character. It is a non printable "left to right" mark. I can't seem to be able to find it with gsub and I don't know how to get rid of it
<hfp>
because \u0233 isn't the same character, nor is \u233e
tylerkern has quit [Read error: Connection reset by peer]
<hfp>
neither*
IceDragon has quit [Ping timeout: 264 seconds]
tylerkern has joined #ruby
IceDragon has joined #ruby
jdj_dk has quit [Quit: Leaving...]
acrussell has quit [Quit: Leaving.]
rezzack has joined #ruby
rylev has joined #ruby
claw___ has quit [Read error: Connection reset by peer]
phutchins has quit [Ping timeout: 256 seconds]
thams has quit [Quit: thams]
<toretore>
hfp: why do you want to get rid of it?
claw___ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<hfp>
wallerdev: because it shouldn't be there in the first place. It's confusing all my rails app and it is a bug from the system that gathered this data in the first place. so once I figure out how to work around it in my rails app I'll have to patch the other app so it doesn't accept this kind of chars anymore
ramfjord has joined #ruby
thams has joined #ruby
<hfp>
or at least strips them out of input
<toretore>
why don't you want to accept it?
<bricker>
just lay back and accept it.
<toretore>
and how do you know it's there because of a bug?
<hfp>
because it's not relevant to the data
jottr has joined #ruby
<toretore>
how so?
<hfp>
because it's on north american postcodes and addresses
<hfp>
not consistently, only sometimes
<toretore>
ok
<dopie>
e
<toretore>
so you should strip the postcodes when you use them
<hfp>
yes, I'm probably missing something trivial out of frustration on being stuck on this since this morning. I'll go for a break and come back with a fresh pair of eyes
<toretore>
postcode.gsub(/[^a-zA-Z0-9]/, '').upcase should handle most postcodes
chrishough has quit [Ping timeout: 255 seconds]
Azzurrio has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has joined #ruby
treehug88 has joined #ruby
eichenwald has joined #ruby
Ysgard has quit []
aspires has quit []
centrx has quit [Quit: Mead error: Connection reset by beer]
havenwood has quit [Remote host closed the connection]
chrishough has joined #ruby
harshjha_ is now known as theharshest
dev_progrming has joined #ruby
muz0xd has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
eichenwald has quit [Quit: eichenwald]
renderful has joined #ruby
elaptics`away is now known as elaptics
kyb3r_ has joined #ruby
<graft>
okay, one-liner puzzle: i have two three-letter strings - how to count the number of positions that differ between them?
Xeago has quit [Remote host closed the connection]
jamto11 has quit [Ping timeout: 240 seconds]
dev_progrmin has quit [Quit: Leaving]
renderful has quit [Remote host closed the connection]
<heftig>
maybe something like a = "abc"; b = "dbe"; a.chars.zip(b.chars).count { |x,y| x != y }
icarus has joined #ruby
icarus has quit [Changing host]
icarus has joined #ruby
Morkel has quit [Quit: Morkel]
n_blownapart has joined #ruby
<theharshest>
has anyone parsed opengraph data? "open("http://blog.pinterest.com").read.include?("og:title")" => returns true, but "OpenGraph.fetch("http://blog.pinterest.com")" => returns false. I see similar conflicting behavior with some other sites.
n_blownapart has quit [Remote host closed the connection]
n_blownapart has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<heftig>
aledovsky: i guess that'd be hamming distance
Adam_ has left #ruby [#ruby]
renderful has joined #ruby
<heftig>
the above code should be correct as long as a.size >= b.size
Zebroid has quit [Remote host closed the connection]
<banister_>
heftig sup heft, long time no see
<heftig>
banister_: hi.
Hobogrammer has quit [Quit: WeeChat 0.4.3]
NinoScript has quit [Ping timeout: 245 seconds]
<banister_>
heftig where u been?
<heftig>
busy.
<heftig>
work and stuff
terrell_t has joined #ruby
momomomomo_ has joined #ruby
terrell_t has quit [Read error: Connection reset by peer]
terrell_t has joined #ruby
melik__ has quit [Quit: Computer has gone to sleep.]
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo_ is now known as momomomomo
melik__ has joined #ruby
NinoScript has joined #ruby
decoponio has quit [Quit: Leaving...]
terrellt has quit [Ping timeout: 260 seconds]
Bosox20051 has quit [Ping timeout: 250 seconds]
chaos___________ has joined #ruby
androidbruce has left #ruby ["Leaving"]
kangguru is now known as kangguru_away
<banister_>
heftig cool, where are you working now?
Hobogrammer has joined #ruby
kaspergrubbe_ has quit [Remote host closed the connection]