yfeldblum has quit [Remote host closed the connection]
pdimitrov has joined #ruby
pr0ggie has joined #ruby
toastynerd has quit [Ping timeout: 264 seconds]
Flashmasterson has joined #ruby
<Flashmasterson>
does a syntax error message in the middle of a code stream creation invalidate the past code? requiring me to do all of the code over again?
<bricker`LA>
Flashmasterson: Depends where the error is thrown. Probably not.
tj` has quit [Read error: Connection reset by peer]
timonv has joined #ruby
tj` has joined #ruby
<Flashmasterson>
ok, it was just an undefined method, so i'll corrected it but am still getting an unintended result - i'll clean it up and gist it
<Flashmasterson>
*correct
<Flashmasterson>
*i corrected. damnit
mercwithamouth has quit [Ping timeout: 264 seconds]
lukec has joined #ruby
pleal has quit [Remote host closed the connection]
steffes has joined #ruby
pleal has joined #ruby
timonv has quit [Read error: Operation timed out]
steffes has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
blackmes1 has quit [Remote host closed the connection]
pleal has quit [Ping timeout: 268 seconds]
i_s has quit [Remote host closed the connection]
RichardBaker has joined #ruby
lfox has quit []
lfox has joined #ruby
Guest90131 has joined #ruby
Guest90131 is now known as diegoviola
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
hamakn has joined #ruby
julweber has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
andrewstewart has quit [Ping timeout: 240 seconds]
snovak has quit [Ping timeout: 245 seconds]
TomRone has joined #ruby
BombStrike has joined #ruby
xerxas has joined #ruby
mmm has quit [Ping timeout: 248 seconds]
Domon_ has quit [Ping timeout: 272 seconds]
r0bby_ has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
kazuuu has quit [Remote host closed the connection]
zodiak has quit [Quit: Leaving]
randym_ has joined #ruby
r0bby_ has quit [Client Quit]
mmm has joined #ruby
Domon_ has joined #ruby
shaileshg_ has joined #ruby
kazuuu has joined #ruby
andrewstewart has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
ace_unicorn has joined #ruby
DanKnox_away is now known as DanKnox
smathieu has quit [Ping timeout: 245 seconds]
tsykoduk is now known as zz_tsykoduk
smathieu_ has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
kazuuu has quit [Ping timeout: 248 seconds]
Jetchisel has joined #ruby
kazuuu has joined #ruby
lfox has quit [Quit: ZZZzzz…]
aspires has joined #ruby
lsoa has joined #ruby
cody--_ has quit [Quit: derp]
petey_ has joined #ruby
jalcine is now known as jalcine_
jalcine_ is now known as jalcine
kurt21 has joined #ruby
almar has joined #ruby
rgbdev has quit [Quit: rgbdev]
astrobunny has quit [Ping timeout: 268 seconds]
Seich_ has quit [Ping timeout: 272 seconds]
nisstyre has quit [Quit: Leaving]
ace_unicorn has quit [Ping timeout: 250 seconds]
FukUmist has quit [Read error: Operation timed out]
ghargoil has joined #ruby
raphaelivan has quit [Quit: Leaving.]
<ghargoil>
Hi all; noob question here -- but how can I implement an iterator in a custom class such that I just return the values in an internal array?
Seich_ has joined #ruby
<ghargoil>
I've tried to do "def each; return @contents.each; end;"
<ghargoil>
but that doesn't seem to work
<rjhunter>
ghargoil: try "yield" instead of return and you might have more luck
<rjhunter>
otherwise the block you pass to your `each` won't make it to the array's `each`
visof has quit [Remote host closed the connection]
tomzx_mac has quit [Read error: Operation timed out]
brum has joined #ruby
fridim_ has joined #ruby
astrobunny has joined #ruby
lsoa has left #ruby ["WeeChat 0.4.2"]
<rjhunter>
importantly, "each" isn't so much about returning values as it is about yielding values to a block
jalcine is now known as jalcine_
DanKnox is now known as DanKnox_away
<rjhunter>
another way to think about it: def each(&block); @contents.each(&block); end
chihhsin_ has joined #ruby
mlpinit has joined #ruby
chihhsin_ has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 246 seconds]
jerius has quit []
pothibo has joined #ruby
_dma has joined #ruby
pothibo has quit [Client Quit]
zz_tsykoduk is now known as tsykoduk
fenec2 has joined #ruby
<almar>
hello, everyone. i just made my first code in Ruby: https://gist.github.com/arumaru/7130963 <-- it counts the occurrence of a letter in a string and lists the result as occurrence*letter, each being separated by a ,
<almar>
what i want to do is make it end in a full stop, but not a comma
Nogbit has joined #ruby
<almar>
could anyone suggest me some way to go about doing this?
_dma has quit [Ping timeout: 245 seconds]
nisstyre has joined #ruby
<DanBoy>
i would use each on that array first
DanKnox_away is now known as DanKnox
soba has quit [Ping timeout: 265 seconds]
<almar>
okay
soba has joined #ruby
<ghargoil>
rjhunter: lemme try that out
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
_dma has joined #ruby
<ghargoil>
rjhunter: !!! thanks so much :D
sevenseacat has quit [Remote host closed the connection]
sevenseacat has joined #ruby
axl_ has quit [Quit: axl_]
s1z has joined #ruby
dmiller has quit [Remote host closed the connection]
<rjhunter>
bnagy: that's probably a *little* advanced for someone's first Ruby program :-p
waitz has joined #ruby
<bnagy>
pff it's perfectly readable and obvious code and definitely how I would recommend approaching the problem
<bnagy>
:P
pen has quit [Remote host closed the connection]
ngpestelos has quit [Ping timeout: 241 seconds]
vipjun has quit [Ping timeout: 260 seconds]
adeponte has joined #ruby
DanKnox is now known as DanKnox_away
dmiller has quit [Ping timeout: 252 seconds]
brum has quit [Remote host closed the connection]
<rjhunter>
almar: although bnagy's code might look complicated, it's really quite dense and shows some useful techniques.
<DanBoy>
almar, you could use .each on that array and build a hash where the keys are the letters you encounter and the value is incremented by how many times you see it
<DanBoy>
and spit it back out
<DanBoy>
sorry i can't read that language
<almar>
oh
<almar>
never mind the comments
s1z has joined #ruby
<almar>
sorry, should've deleted them
<almar>
it's nothing important
<rjhunter>
almar: one particularly useful part of bnag's solution is the "join" method
_dma has quit [Ping timeout: 248 seconds]
<rjhunter>
>> ['one', 'two', 'three'].join(' and ')
<bnagy>
important note, though, it's only good to use default values like that for immediates ( like numbers or symbols ), otherwise use the block form
<bnagy>
count = Hash.new {|h,k| h[k] = 0}
DanKnox_away is now known as DanKnox
<almar>
map {|k,v| "#{k}*#{v.length}"}.join(', ')
<almar>
does this make the string into an array?
kitak has joined #ruby
<bnagy>
no, it maps a Hash first into an Array of Strings, then joins that Array with commas to make one final String
<almar>
beautiful
havenwood has quit [Remote host closed the connection]
jrhorn424 is now known as jrhorn424afk
KobraKao has quit [Quit: This computer has gone to sleep]
jalcine is now known as jalcine_
DrCode has joined #ruby
dukz has joined #ruby
dmiller has joined #ruby
cody1 has joined #ruby
KobraKao has joined #ruby
postmodern has joined #ruby
dukz_ has joined #ruby
vipjun has joined #ruby
havenwood has joined #ruby
dmiller has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
cody1 has quit [Quit: goodbye]
astrobunny has quit [Ping timeout: 265 seconds]
vpretzel has quit [Remote host closed the connection]
dukz has quit [Ping timeout: 264 seconds]
vpretzel has joined #ruby
DanKnox is now known as DanKnox_away
Shidash has joined #ruby
jalcine_ is now known as jalcine
intuxicated has quit [Ping timeout: 252 seconds]
Seich_ has quit [Quit: Computer has gone to sleep.]
coderhs has joined #ruby
vpretzel_ has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
Seich_ has joined #ruby
Seich_ has quit [Read error: Connection reset by peer]
Seich_ has joined #ruby
paolooo has joined #ruby
astrobunny has joined #ruby
s3itz has joined #ruby
s3itz has quit [Max SendQ exceeded]
s3itz has joined #ruby
mrsolo has joined #ruby
vpretzel_ has quit [Ping timeout: 260 seconds]
maletor has joined #ruby
soba has joined #ruby
Flashmasterson has quit [Quit: Leaving.]
allaire has quit []
CaptainJet has quit []
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
amacgregor_ has quit [Read error: Connection reset by peer]
aagdbl has joined #ruby
ewnd9 has quit [Ping timeout: 248 seconds]
_dma has joined #ruby
robbyoconnor has joined #ruby
jalcine has quit [Excess Flood]
astrobunny has quit [Ping timeout: 272 seconds]
cody1 has joined #ruby
diegoviola has quit [Ping timeout: 256 seconds]
Jetchisel has quit [Ping timeout: 260 seconds]
cody1 has left #ruby [#ruby]
cody1 has joined #ruby
Jetchisel has joined #ruby
dukz has joined #ruby
_dma has quit [Ping timeout: 246 seconds]
dukz_ has quit [Ping timeout: 246 seconds]
astrobunny has joined #ruby
sergicles has quit [Quit: sergicles]
cooterr has joined #ruby
chickenf_ has joined #ruby
fenec2 has quit [Ping timeout: 245 seconds]
fightback has joined #ruby
soba has quit [Ping timeout: 240 seconds]
<bnagy>
almar: btw, if this was your first ruby program, please also make it the last time you ever use the "for i in (0.." construction ;)
Flashmasterson has joined #ruby
Flashmasterson has quit [Client Quit]
cody-- has joined #ruby
<sevenseacat>
i see for/in way too much in places like stackoverflow... why does ruby even have it, seriously
cody_on_heroku has quit [Remote host closed the connection]
<bnagy>
nfi, maybe so we can spot python programmers
kil0byte has joined #ruby
Shidash1 has joined #ruby
<sevenseacat>
lol
Shidash has quit [Read error: Connection reset by peer]
Seich_ has quit [Ping timeout: 248 seconds]
almar has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 245 seconds]
lukec has quit [Quit: lukec]
thesheff17 has quit [Ping timeout: 248 seconds]
Seich_ has joined #ruby
brennanM_ has quit [Remote host closed the connection]
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
brtdv has joined #ruby
funburn has quit [Quit: funburn]
snovak has joined #ruby
Xeago has quit [Remote host closed the connection]
julweber has joined #ruby
ahawkins has joined #ruby
brtdv has quit [Client Quit]
brtdv has joined #ruby
snovak has quit [Ping timeout: 248 seconds]
ngpestelos has joined #ruby
pen has quit [Remote host closed the connection]
funburn has joined #ruby
amacgregor has quit [Ping timeout: 256 seconds]
InFlames has joined #ruby
amacgregor has joined #ruby
c0rn has quit [Quit: Lates.]
Astralum has joined #ruby
jalcine is now known as jalcine_
drumusician has joined #ruby
sayan has quit [Quit: Leaving]
Seich_ has joined #ruby
smathieu has joined #ruby
jhn has quit [Quit: jhn]
capicue has joined #ruby
funburn has quit [Quit: funburn]
capicue has quit [Client Quit]
mneorr has joined #ruby
chickenf_ has joined #ruby
smathieu has quit [Ping timeout: 268 seconds]
srji has joined #ruby
Nogbit has left #ruby [#ruby]
alup has joined #ruby
amacgregor_ has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
kvirani has quit [Remote host closed the connection]
brennanMKE has joined #ruby
burlyscudd has joined #ruby
gja has joined #ruby
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby
amacgregor has quit [Ping timeout: 272 seconds]
earthquake has quit [Quit: earthquake]
chickenf_ has quit [Ping timeout: 260 seconds]
amacgregor_ has quit [Ping timeout: 240 seconds]
dash_ has quit [Ping timeout: 248 seconds]
kaspergr_ has joined #ruby
leonidlm has quit [Ping timeout: 248 seconds]
brennanMKE has quit [Ping timeout: 245 seconds]
pen has joined #ruby
devoldmx has joined #ruby
dash_ has joined #ruby
burlyscudd has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
jhw has joined #ruby
wallerdev has quit [Quit: wallerdev]
petey_ has joined #ruby
platypine has joined #ruby
platypine has joined #ruby
platypine has quit [Changing host]
dash_ has quit [Read error: Connection reset by peer]
d45h has joined #ruby
avril14th has joined #ruby
Azulinho has joined #ruby
orien has joined #ruby
boxmein has joined #ruby
petey_ has quit [Ping timeout: 248 seconds]
funburn has joined #ruby
platypine has quit [Ping timeout: 256 seconds]
<avril14th>
Hello, is there a reason why a ruby code would behave differently when loaded from a file or when written in the console? https://gist.github.com/muichkine/59f540ae179360c0f2dd I really don't get that behavior.
orien has quit [Client Quit]
timonv has joined #ruby
Mrdarknezz has joined #ruby
_dma has joined #ruby
d45h has quit [Ping timeout: 248 seconds]
claymore has joined #ruby
srji has quit [Quit: leaving]
relix has joined #ruby
sayan has joined #ruby
chickenf_ has joined #ruby
vpretzel has joined #ruby
dash_ has joined #ruby
Elhu has joined #ruby
_dma has quit [Ping timeout: 248 seconds]
leonidlm has joined #ruby
Vivekananda_ has quit [Read error: Connection reset by peer]
Vivekananda__ has quit [Read error: Connection reset by peer]
<sevenseacat>
so whats the difference? theres only one output there
julweber has quit [Remote host closed the connection]
rahulkmr has quit [Ping timeout: 264 seconds]
julweber has joined #ruby
Azulinho has quit [Ping timeout: 245 seconds]
vpretzel has quit [Ping timeout: 264 seconds]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
<avril14th>
line 7 is first output
<avril14th>
when loaded from file
<avril14th>
the rest is typed
<avril14th>
in terminal.rb
fella6s has joined #ruby
<avril14th>
line 6 actualy: "DeliveryEvent: "
<avril14th>
that's the output
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
<avril14th>
then in the same session I type the rest
<avril14th>
and get different result
<sevenseacat>
im confused
<avril14th>
so am i :)
<sevenseacat>
oh right, i see, its all smashed together into one terminal log
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
fgo_ is now known as fgo
<sevenseacat>
so whats in the factory?
rahulkmr has joined #ruby
iamjbecker has left #ruby [#ruby]
milesto has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
gja has quit [Quit: This computer has gone to sleep]
julweber has quit [Ping timeout: 245 seconds]
<avril14th>
well the factory is the same for both case anyway so I suppose it has no impact
<avril14th>
on the difference of interpretation
<sevenseacat>
depends on whats in the factory
rahulkmr has joined #ruby
<avril14th>
besides, I clean the database right between the two attempts
<sevenseacat>
if theres random things or something in there, it can make a real big difference
<avril14th>
well I don't see any relation to values here but I might be wrong
D4T has joined #ruby
<avril14th>
let me fetch the factory
fella5s has quit [Ping timeout: 264 seconds]
adeponte has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<pen>
does anyone know the solution to this problme?
<pen>
I am having this problem on ruby 2.0 using TracePoint btw
<sevenseacat>
avril14th: i guess i dont know enough about your system but it looks like things are getting randomized and calculated and sometimes theyre coming up the way you expect and sometimes theyre not
<sevenseacat>
which is what i would expect if things are getting randomized
<avril14th>
well, I ran the thing over 10 times
ngpestelos has quit [Read error: Connection reset by peer]
<avril14th>
and it always come up the same way
<sevenseacat>
cool, time for you to debug things then
<sevenseacat>
find out where the differences are coming from
<avril14th>
cool been going round on this for 14 hours
<avril14th>
the bug comes up outside this code
<sevenseacat>
forgive me for asking but what exactly have you been doing for that 14 hours if not debugging?
<avril14th>
debugging
<sevenseacat>
how? where is the output of that?
toastynerd has quit [Remote host closed the connection]
ghr has joined #ruby
<avril14th>
ahah
toastynerd has joined #ruby
<avril14th>
the problem we are talking about is just a strange behavior I don't get on mw debugging way
<avril14th>
the bug I have no freaking clue where it lies
barratt has joined #ruby
<avril14th>
except it is a field I don't have that is written by mongoid
<avril14th>
in database
<avril14th>
and this I didn't post anything regarding the problem
<avril14th>
anyway, thanks for peeking in sevenseacat, back to it.
kil0byte has quit [Ping timeout: 265 seconds]
shaunbaker has joined #ruby
snovak has joined #ruby
toastynerd has quit [Ping timeout: 248 seconds]
tonni has joined #ruby
Seich_ has quit [Ping timeout: 252 seconds]
jhaals has quit [Read error: Connection reset by peer]
jhaals_ has joined #ruby
tonni has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
Macaveli has joined #ruby
Seich_ has joined #ruby
snovak has quit [Ping timeout: 248 seconds]
aagdbl has quit [Quit: Leaving.]
capicue has joined #ruby
jprovazn has joined #ruby
tonni has joined #ruby
Seich_ has quit [Client Quit]
Mrdarknezz has left #ruby [#ruby]
milesto has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
blackmesa has joined #ruby
monkegjinni has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
flower-pot has quit [Ping timeout: 264 seconds]
einarj has joined #ruby
adambeynon has joined #ruby
leonidlm has quit [Ping timeout: 248 seconds]
camilasan has joined #ruby
flower-pot has joined #ruby
it_tard has joined #ruby
sayan has quit [Quit: Leaving]
mneorr has joined #ruby
Anderson has quit [Disconnected by services]
Anderson has joined #ruby
Xeago has joined #ruby
funburn has quit [Quit: funburn]
<it_tard>
ruby passes everything by reference, right?
<tobiasvl>
lots of pedantry there, but based on the traditional definition ruby is definitely pass-by-value
burlyscudd has joined #ruby
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
mrsolo has quit [Quit: Leaving]
Anderson has quit [Disconnected by services]
julweber has joined #ruby
lupine has joined #ruby
goto has joined #ruby
MrV_ has joined #ruby
tonni has quit [Remote host closed the connection]
kvirani has quit [Ping timeout: 272 seconds]
mercwithamouth has joined #ruby
capicue has quit [Ping timeout: 265 seconds]
coderhs has quit [Ping timeout: 265 seconds]
tonni has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Ping timeout: 265 seconds]
leonidlm has joined #ruby
lembacon has quit [Read error: Connection reset by peer]
<bnagy>
>> def foo str; str.upcase!; end; s = "cat; foo(s); s
<eval-in>
bnagy => /tmp/execpad-a43adf98035c/source-a43adf98035c:6:in `<main>': undefined local variable or method `e' for main:Object (NameError) (https://eval.in/56999)
noname001 has joined #ruby
<bnagy>
oh, heh
<Lewix>
ending quote
<bnagy>
>> def foo str; str.upcase!; end; s = "ca"t; foo(s); s
<bnagy>
there are other reasons to care about val / ref, but that's the most pressing imho
_bart has joined #ruby
aagdbl has joined #ruby
soasme has joined #ruby
kunday has joined #ruby
<Lewix>
bnagy: I'm not sure i follow you
<bnagy>
just like when people ask 'compiled / interpreted' they usually just mean 'fast / slow'
<Lewix>
ah
kaspergr_ has quit [Remote host closed the connection]
Al_ has joined #ruby
tatsuya_o has joined #ruby
<sevenseacat>
i got into an argument with someone the other day about compiled/interpreted
Al_ has quit [Client Quit]
Xuerian has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
<sevenseacat>
he kept trying to tell me all "web languages" were compiled
kaspergrubbe has quit [Remote host closed the connection]
<bnagy>
eh
kaspergrubbe has joined #ruby
<jhw>
what's a web language? java? php? ...
Xuerian has joined #ruby
Al_ has joined #ruby
<hoelzro>
PHP is the closest thing I would consider to be a web language
<hoelzro>
*maybe* JS
<sevenseacat>
jhw: yeah exactly
<Lewix>
bnagy: I guess people think about what you pass to the method argument when they use "pass per value". But ruby is strictly pass per reference I believe
<hoelzro>
but it seems to have crawled out of that hole in the last few years...
<hoelzro>
hmm
<hoelzro>
Fixnums, iirc, are passed by value
<hoelzro>
but that's an impl detail
<bnagy>
not much choice surely :)
<Lewix>
hoelzro: yes Fixnum
<bnagy>
16:29 < tobiasvl> it is pass-by-value, but the values... are references?
funburn has joined #ruby
<Lewix>
sevenseacat: How did you define compiled vs interpreters
vpretzel has joined #ruby
<Lewix>
bnagy: hmm
<sevenseacat>
i didnt, in the discussion
ananthakumaran has quit [Quit: Leaving.]
mengu has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 260 seconds]
zarubin has joined #ruby
flower-pot has quit [Ping timeout: 260 seconds]
froy has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
it_tard has quit [Ping timeout: 260 seconds]
w3pm has quit [Ping timeout: 240 seconds]
den9ie has quit [Quit: Leaving]
adeponte has joined #ruby
heftig has joined #ruby
jhaals_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chickenf_ has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby
sayan has joined #ruby
vipjun has quit [Ping timeout: 245 seconds]
barratt has quit [Read error: Connection reset by peer]
capicue has joined #ruby
coderhs has joined #ruby
tsykoduk is now known as zz_tsykoduk
neonlex has joined #ruby
neonlex has quit [Client Quit]
adeponte has quit [Ping timeout: 260 seconds]
DarthGandalf has quit [Ping timeout: 245 seconds]
Macaveli has quit [Remote host closed the connection]
klaut has joined #ruby
nari has quit [Ping timeout: 245 seconds]
Azulinho has joined #ruby
<apeiros>
hoelzro, Lewix: MRI is pass by value, but since the value passed is a reference to the object…
<apeiros>
I think in any sane OO language you can consider the argument passing as 'pass by reference'
chickenf_ has joined #ruby
<apeiros>
no matter what the technical implementation actually is.
<Lewix>
apeiros: didn't I say that
tziOm has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
DarthGandalf has joined #ruby
w3pm has joined #ruby
Stygia has joined #ruby
MrV_ has quit [Quit: MrV_]
astrobunny has quit [Ping timeout: 240 seconds]
jhaals has joined #ruby
snovak has joined #ruby
<apeiros>
maybe, I only skimmed the backlog
<bnagy>
well you said 'strictly'
MrV_ has joined #ruby
visof has joined #ruby
<bnagy>
and 'strictly' no it's not
<bnagy>
but imho the answer most people want is by-ref
sevenseacat has quit [Quit: Leaving.]
kevinykchan has joined #ruby
MrV_ has quit [Client Quit]
MrV_ has joined #ruby
Bulters has joined #ruby
<Bulters>
g'day all...
<avril14th>
gday
<Bulters>
anyone here knows whether it is possible to find the creator of a certain object?
snovak has quit [Ping timeout: 260 seconds]
<Bulters>
I have a r*ils app which is leaking memory like a madman... leaving about 950k strings after the first two requests; whould love to know where these strings are created
<apeiros>
define 'creator'
funburn has quit [Quit: funburn]
<Bulters>
__file__ and __line__ would be perfect ;-)
<apeiros>
no
<apeiros>
but there are memory profilers
<apeiros>
wouldn't know which ones work with which rubies, though
flower-pot has joined #ruby
<apeiros>
also I think there are some dprobes floating around for use with ruby+dtrace
<Bulters>
I already started patching up String (for debugging purposes!!!!!!) to save the caller.first.object_id in the initializer, halfway through realized that literal strings are not #initialized
<apeiros>
(don't have any knowledge in how to use those, though)
<Bulters>
hrms...
timonv has quit [Remote host closed the connection]
<apeiros>
Bulters: yeah, good thing it isn't - otherwise you'd just created a creative infinite loop
juan_ has joined #ruby
timonv has joined #ruby
<apeiros>
since caller is an array of strings…
Anticom has joined #ruby
timonv has quit [Remote host closed the connection]
<Bulters>
that's why i tried saving caller.first.object_id
<Bulters>
instead of just caller, or caller.first :P
<apeiros>
yeah, caller creates the array already
<apeiros>
methods don't have information about what other method is chained to them
<apeiros>
and they certainly don't go optimizing for it
<Bulters>
ahh well, off to dtrace it is then
jibi has joined #ruby
<bnagy>
jruby plug here
Guest13611 has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
capicue has quit [Ping timeout: 246 seconds]
leonidlm has quit [Ping timeout: 260 seconds]
<Bulters>
bnagy: was thinking about that... but some required gems which have native implementations
astrobunny has joined #ruby
newbiehacker has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
dash_ has joined #ruby
soasme has quit [Remote host closed the connection]
kunday has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amritanshu_RnD has quit [Quit: Leaving]
kaspergr_ has joined #ruby
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
amritanshu_RnD has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
tvw has joined #ruby
brennanMKE has joined #ruby
burlyscudd has joined #ruby
Alina-malina has quit [Ping timeout: 272 seconds]
kaspergrubbe has quit [Ping timeout: 248 seconds]
Alina-malina has joined #ruby
aagdbl has left #ruby [#ruby]
jprovazn has quit [Quit: Leaving]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
workmad3 has joined #ruby
dash_ has quit [Ping timeout: 245 seconds]
SHyx0rmZ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brennanMKE has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
leonidlm has joined #ruby
dash_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
toastynerd has joined #ruby
petey_ has joined #ruby
burlyscudd has quit [Ping timeout: 264 seconds]
kil0byte has joined #ruby
h_kon has quit [Remote host closed the connection]
_bart has quit [Remote host closed the connection]
newbiehacker has quit [Ping timeout: 245 seconds]
toastynerd has quit [Ping timeout: 248 seconds]
jhaals has joined #ruby
h_kon has joined #ruby
petey_ has quit [Ping timeout: 256 seconds]
includex has joined #ruby
funburn has joined #ruby
rahulkmr1 has joined #ruby
rahulkmr has quit [Read error: Connection reset by peer]
gstamp_ has joined #ruby
_dma has joined #ruby
capicue has joined #ruby
flops has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
gstamp has joined #ruby
vpretzel has joined #ruby
boxmein has quit [Ping timeout: 268 seconds]
_dma has quit [Ping timeout: 265 seconds]
newbiehacker has joined #ruby
gstamp_ has quit [Read error: Connection reset by peer]
peta_ has joined #ruby
mojjojo has joined #ruby
kil0byte_ has joined #ruby
vpretzel has quit [Ping timeout: 268 seconds]
kil0byte has quit [Ping timeout: 248 seconds]
_bart has joined #ruby
pyro_ has quit [Quit: Leaving]
ewnd9 has joined #ruby
allsystemsarego has joined #ruby
lkba has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
peta_ has quit [Remote host closed the connection]
visof has quit [Quit: Leaving]
sumark has quit [Remote host closed the connection]
peta_ has joined #ruby
adeponte has joined #ruby
relix has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
ares_ has joined #ruby
ares_ has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
erebos has joined #ruby
adeponte has quit [Ping timeout: 265 seconds]
jprovazn has joined #ruby
flower-pot has quit [Ping timeout: 245 seconds]
capicue has quit [Ping timeout: 240 seconds]
barratt has joined #ruby
leonidlm has quit [Read error: Operation timed out]
zarubin has quit [Ping timeout: 260 seconds]
jhaals has joined #ruby
dash_ has quit [Ping timeout: 272 seconds]
snovak has joined #ruby
dash_ has joined #ruby
pen has quit [Remote host closed the connection]
pen has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
binaryplease has joined #ruby
erebos has quit [Quit: Leaving]
pencilcheck has joined #ruby
julweber has quit [Remote host closed the connection]
erebos has joined #ruby
julweber has joined #ruby
ravionrails has joined #ruby
kunday has joined #ruby
snovak has quit [Ping timeout: 256 seconds]
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
t_p has quit [Quit: Computer has gone to sleep.]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brtdv has quit []
c0rn has quit [Quit: Computer has gone to sleep.]
pen has quit [Ping timeout: 272 seconds]
julweber has quit [Ping timeout: 240 seconds]
erebos has left #ruby ["Leaving"]
lyanchih has quit [Quit: lyanchih]
dash_ has quit [Quit: dash_]
kaspergr_ has quit [Remote host closed the connection]
derebos has joined #ruby
leonidlm has joined #ruby
fgo has quit [Read error: Connection reset by peer]
jhw has quit [Quit: leaving]
jhw has joined #ruby
jhw has quit [Client Quit]
fgo has joined #ruby
jhw has joined #ruby
Naoe-Kanno has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
boxmein has joined #ruby
boxmein has quit [Max SendQ exceeded]
mneorr has joined #ruby
julweber has joined #ruby
pencilcheck has quit [Remote host closed the connection]
boxmein has joined #ruby
boxmein has quit [Max SendQ exceeded]
SHyx0rmZ has quit [Ping timeout: 272 seconds]
pen has joined #ruby
boxmein has joined #ruby
brtdv has joined #ruby
ace_unicorn has joined #ruby
pencilcheck has joined #ruby
peta_ has quit [Remote host closed the connection]
Naoe-Kanno has quit [Ping timeout: 240 seconds]
peta_ has joined #ruby
mneorr has quit [Ping timeout: 248 seconds]
SHyx0rmZ has joined #ruby
kvirani has joined #ruby
capicue has joined #ruby
pen has quit [Ping timeout: 248 seconds]
brennanMKE has joined #ruby
ahawkins has quit [Ping timeout: 260 seconds]
camilasan has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 265 seconds]
camilasan has joined #ruby
justsee has quit [Ping timeout: 245 seconds]
burlyscudd has joined #ruby
aagdbl has joined #ruby
crunchy_crow has joined #ruby
lembacon has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
camilasan has quit [Remote host closed the connection]
kvirani has quit [Ping timeout: 272 seconds]
camilasan has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
astrobunny has joined #ruby
burlyscudd has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
jhaals has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
ananthakumaran has joined #ruby
Deele has joined #ruby
Domon has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 264 seconds]
ravster has joined #ruby
orien has joined #ruby
dzhulk has quit [Quit: Leaving.]
_dma has joined #ruby
xk_id has joined #ruby
axsuul has quit [Ping timeout: 245 seconds]
pr0ggie has quit [Read error: Operation timed out]
dzhulk has joined #ruby
h_kon has quit [Remote host closed the connection]
vpretzel has joined #ruby
astrobunny has joined #ruby
_dma has quit [Ping timeout: 248 seconds]
ldnunes has joined #ruby
capicue has quit [Ping timeout: 264 seconds]
fmcgeough has quit [Quit: fmcgeough]
vpretzel has quit [Ping timeout: 272 seconds]
funburn has quit [Quit: funburn]
lyanchih has joined #ruby
dawkirst has joined #ruby
mklappstuhl has joined #ruby
ace_unicorn has quit [Ping timeout: 250 seconds]
soba has joined #ruby
helloworld has joined #ruby
soba_ has joined #ruby
danshultz has quit [Remote host closed the connection]
adeponte has joined #ruby
danshultz has joined #ruby
funburn has joined #ruby
soba has quit [Ping timeout: 246 seconds]
boxmein has quit [Quit: [02:26.00] <Ristovski> mozzarella filofax fadget]
astrobunny has quit [Ping timeout: 240 seconds]
peta_ has quit [Quit: peta_]
funburn has quit [Client Quit]
jibi has quit [Quit: .]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
danshultz has quit [Ping timeout: 256 seconds]
danshult_ has joined #ruby
adeponte has quit [Ping timeout: 265 seconds]
dmiller has joined #ruby
leonidlm has quit [Read error: Operation timed out]
astrobunny has joined #ruby
eka has joined #ruby
Lewix has quit [Remote host closed the connection]
<it_tard>
if ruby was pass by value then something like foo(n) couldn't change n but it can so clearly the variable within function is that same instance
_dma has quit [Ping timeout: 265 seconds]
<apeiros>
tobiasvl: um, that's IMO not related to reference/not reference but variable/pointer indirection
<apeiros>
i.e., you can't pass a reference to the variable. you can only pass a reference to the object
<blackmesa>
tobiasvl: thx but doesnt put this url2 into [0] then?
<tobiasvl>
apeiros: i'm just quoting Jörg in that stackoverflow reply. here's another quote: "If Ruby were pass-by-reference, then reassignment to the local method argument binding in the callee would also have reassigned the local variable binding in the caller. Which it didn't."
<tobiasvl>
hard to argue with that.
<apeiros>
IMO a fallacy
<apeiros>
confusing variables and objects/reference
vpretzel has quit [Ping timeout: 252 seconds]
<apeiros>
as stated above
<tobiasvl>
nope, the confusing thing is that the value is a reference
<apeiros>
anyway, gotta get back to work :(
swordsmanz has quit [Read error: Connection reset by peer]
<it_tard>
honestly, i'm writing ruby like it was C++ with arguments passed as &arg, what else but pass-by-reference can it be?
<it_tard>
ditto, uni assignments for me
Elhu has joined #ruby
swordsmanz has joined #ruby
msuszczy has quit [Ping timeout: 246 seconds]
lyanchih has quit [Ping timeout: 248 seconds]
msuszczy has joined #ruby
dash_ has joined #ruby
jbpros has joined #ruby
adeponte has joined #ruby
AlSquire has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
tonni_ has quit [Remote host closed the connection]
capicue has joined #ruby
tonni has joined #ruby
xk_id has quit [Quit:
dhilipsiva has quit [Ping timeout: 264 seconds]
dhilipsiva has joined #ruby
tonni has quit [Read error: Connection reset by peer]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tonni has joined #ruby
adeponte has quit [Ping timeout: 248 seconds]
h_kon has joined #ruby
Banistergalaxy has joined #ruby
azerton has joined #ruby
BizarreCake has joined #ruby
leonidlm has joined #ruby
AndChat| has quit [Ping timeout: 264 seconds]
timonv has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
AndChat| has joined #ruby
mixel has joined #ruby
timonv has joined #ruby
joelio has joined #ruby
mixel has quit [Client Quit]
astrobunny has quit [Ping timeout: 268 seconds]
ravster has joined #ruby
<joelio>
why, if I do something like - system("echo 0000:#{hardware_id}:00.0 /sys/bus/pci/drivers/pci-stub/bind")
<joelio>
is what I get, but if I put hardware id.. output is 47
<joelio>
not [47]
xk_id has joined #ruby
Banistergalaxy has quit [Ping timeout: 272 seconds]
dash_ has quit [Ping timeout: 248 seconds]
<canton7>
p hardware_id.class ?
<Hanmac>
it_tard: the fun is, the variables are passed by value, but the objects inside them are references … so its "passing references by value" ;D
julweber has quit [Remote host closed the connection]
julweber has joined #ruby
astrobunny has joined #ruby
xk_id has quit [Client Quit]
dash_ has joined #ruby
<joelio>
canton7: spot on, should have checked! got the 0 index and great.. thanks for the eyeballs :)
<canton7>
so it was an array? cool!
<joelio>
yea, I'd iterated over the array, but it must be an array in an array
<canton7>
i'd be tempted to squash that inner array at source - less confusing to someone reading your code
xk_id has joined #ruby
drumusician has quit [Ping timeout: 256 seconds]
<joelio>
yea, I will
carif has quit [Ping timeout: 272 seconds]
julweber has quit [Ping timeout: 264 seconds]
danshultz has quit [Remote host closed the connection]
Guest13611 has quit [Remote host closed the connection]
bondar has joined #ruby
krawchyk has joined #ruby
<it_tard>
hanmac, can we stop this shitty trolling?
capicue has quit [Ping timeout: 245 seconds]
fmcgeough has joined #ruby
mark_locklear has joined #ruby
danshultz has joined #ruby
jpadilla has joined #ruby
<jpadilla>
hi there, is there a way of changing only the offset not the time of an ActiveSupport::TimeWithZone object?
guest1 has joined #ruby
jpadilla has left #ruby [#ruby]
bondar has quit [Max SendQ exceeded]
<guest1>
Hallo
KobraKao has quit [Ping timeout: 245 seconds]
guest1 has quit [Client Quit]
<AndChat|>
It_tard how is he trolling?
danshultz has quit [Ping timeout: 248 seconds]
<AndChat|>
He is correct
julweber has joined #ruby
t_p has joined #ruby
roadt_ has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
sensen has quit [Ping timeout: 256 seconds]
<it_tard>
except it's not important, non-instanced objects like Integers are immutable so you don't care what they are and everything else is passed by reference so fuck
<it_tard>
afk, coffee time
flops has quit [Ping timeout: 246 seconds]
h_kon has quit [Remote host closed the connection]
zmansiv has quit [Ping timeout: 240 seconds]
pranny has quit [Quit: Leaving.]
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
pranny has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
<TMM>
is it possible to copy a class and monkeypatch only that copy?
it_tard has quit [Ping timeout: 245 seconds]
<TMM>
I'm writing some tests and I'd like a version of StringIO that fakes it's 'isatty' call to return 'true'
<TMM>
but not for all
zmansiv has joined #ruby
rahulkmr has joined #ruby
Xeago has quit [Remote host closed the connection]
brennanMKE has joined #ruby
iamjarvo_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
vpretzel has joined #ruby
<TMM>
nvm just make a subclass
mlpinit has quit [Ping timeout: 252 seconds]
orien has quit [Quit: Computer has gone to sleep.]
headius has joined #ruby
<sebastianb>
Hi guise
<sebastianb>
Quick question, one of the 'not really smart' ones.
crunchy_crow has quit [Quit: Leaving]
<sebastianb>
Why [:a, :b].each_with_object(Hash.new(0)) {|val, hash| hash[val]} doesn't work like:
<dawkirst>
this is a weird question, but why can I require some gems in a pry session and once I change directories I can't require those exact same gems. any ideas?
sirecote has quit [Ping timeout: 264 seconds]
toastynerd has quit [Ping timeout: 272 seconds]
drumusician has quit [Ping timeout: 248 seconds]
<AndChat|>
Bundler
<dawkirst>
AndChat|, got it
justsee has quit [Ping timeout: 248 seconds]
stringoO has joined #ruby
capicue has joined #ruby
samsonasu has joined #ruby
pushpak has joined #ruby
sqbell has joined #ruby
jamelablack has joined #ruby
Xeago has joined #ruby
derebos has quit [Ping timeout: 264 seconds]
pushpak has quit [Client Quit]
pushpak has joined #ruby
sirecote has joined #ruby
tomzx_mac has joined #ruby
<Hanmac>
sebastianb: warning, if you use hash with default proc, it cant be marshalld …
dash_ has quit [Ping timeout: 240 seconds]
mfridh has joined #ruby
dash_ has joined #ruby
breakingthings has joined #ruby
unitbender has joined #ruby
colonolGron has quit [Quit: Lost terminal]
nkts has joined #ruby
pranny has quit [Quit: Leaving.]
jerius has joined #ruby
vpretzel has joined #ruby
jerius has quit [Client Quit]
jkamenik has joined #ruby
jrhorn424afk is now known as jrhorn424
mneorr has joined #ruby
krz has quit [Quit: krz]
amacgregor has joined #ruby
khushildep has quit [Quit: khushildep]
flops has joined #ruby
dash_ has quit [Quit: dash_]
xk_id has quit [Quit:
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
Bry8Star{T2 has quit [Remote host closed the connection]
AndChat| has quit [Ping timeout: 272 seconds]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
adeponte has joined #ruby
derebos has joined #ruby
it_tard has joined #ruby
svector has joined #ruby
includex has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mneorr has quit [Ping timeout: 252 seconds]
pr0ggie has joined #ruby
mmitchell has joined #ruby
lxsameer has quit [Ping timeout: 248 seconds]
Bry8Star{T2 has joined #ruby
coderhs has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
adeponte has quit [Ping timeout: 248 seconds]
capicue has quit [Ping timeout: 256 seconds]
adkron has joined #ruby
snovak has joined #ruby
unitbender has quit [Quit: Leaving]
h_kon has joined #ruby
snovak has quit [Remote host closed the connection]
eka has joined #ruby
snovak has joined #ruby
danshultz has joined #ruby
nomenkun has joined #ruby
danshultz has quit [Remote host closed the connection]
shaunbaker has quit [Remote host closed the connection]
newbiehacker has quit [Ping timeout: 246 seconds]
SHyx0rmZ has joined #ruby
shaunbaker has joined #ruby
freezey has quit [Ping timeout: 245 seconds]
aagdbl has quit [Ping timeout: 264 seconds]
petey_ has joined #ruby
freezey has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
dweeb_ has joined #ruby
gstamp has joined #ruby
workmad3 has quit [Quit: Lost terminal]
mneorr has joined #ruby
workmad3 has joined #ruby
cina has joined #ruby
spider-mario has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
petey_ has quit [Ping timeout: 256 seconds]
dash_ has quit [Quit: dash_]
crunchy_crow has quit [Quit: Leaving]
petey_ has joined #ruby
Vivekananda_ has quit [Ping timeout: 245 seconds]
dhilipsi_ has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
xk_id has joined #ruby
adeponte has joined #ruby
mark_locklear has quit [Quit: Leaving]
mneorr has quit [Ping timeout: 268 seconds]
marcgg has joined #ruby
DarthGandalf has joined #ruby
astrobunny has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
newbiehacker has joined #ruby
AndChat- has quit [Ping timeout: 245 seconds]
Hoozt has joined #ruby
bean__ has joined #ruby
capicue has quit [Ping timeout: 248 seconds]
s2013 has joined #ruby
pr0ggie has joined #ruby
pdimitrov has joined #ruby
<s2013>
how do i check if a string is included in an array of k/v pair
<s2013>
i tried include and any
mark_locklear has joined #ruby
adeponte has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
lkba has joined #ruby
marcgg_ has quit [Ping timeout: 272 seconds]
<s2013>
for example from this: [{"timestamp"=>1380145955, "action"=>"start"}, {"timestamp"=>1380145955, "action"=>"middle"}, {"timestamp"=>1380145963, "action"=>"end"}] i want to find out if "timestamp" exists.
_maes_ has joined #ruby
sayan has joined #ruby
noop has quit [Ping timeout: 256 seconds]
taion809 is now known as zz_taion809
_maes_ has quit [Client Quit]
lyanchih has joined #ruby
_maes_ has joined #ruby
s2013 has quit [Remote host closed the connection]
jerius has quit [Ping timeout: 245 seconds]
zoee has quit [Quit: zoee]
Hoozt has left #ruby [#ruby]
ner0x has joined #ruby
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
aspires has joined #ruby
dzhulk has quit [Quit: Leaving.]
tjad has joined #ruby
jerius has joined #ruby
Banistergalaxy has joined #ruby
z3p1 has quit [Ping timeout: 256 seconds]
fredjean has quit [Ping timeout: 264 seconds]
judd7 has joined #ruby
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
kaspergrubbe has quit [Ping timeout: 248 seconds]
z3p has joined #ruby
wallerdev has joined #ruby
sayan has quit [Quit: Leaving]
fredjean has joined #ruby
mlpinit has quit [Ping timeout: 252 seconds]
tboerger has joined #ruby
kalesage has joined #ruby
digital-ghost has joined #ruby
hogeo has joined #ruby
havenwood has joined #ruby
kiri has quit [Ping timeout: 245 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
zhkzyth has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
kiri has joined #ruby
alup has quit [Quit: Leaving]
kevind_ has joined #ruby
kevind_ is now known as kevind
weems has quit [Read error: Connection reset by peer]
rippa has joined #ruby
freerobby has joined #ruby
mengu has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
mrsolo has joined #ruby
RichardBaker has joined #ruby
ananthakumaran has joined #ruby
s2013 has joined #ruby
jbpros has joined #ruby
jrhorn424 is now known as jrhorn424afk
brtdv has joined #ruby
rahulkmr1 has joined #ruby
sambao21 has joined #ruby
kalesage has quit [Ping timeout: 246 seconds]
astrobunny has quit [Ping timeout: 252 seconds]
flower-pot has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
flower-pot has quit [Client Quit]
fredjean has quit [Quit: Computer has gone to sleep.]
dash_ has joined #ruby
fredjean has joined #ruby
rahulkmr has quit [Ping timeout: 246 seconds]
fredjean has quit [Client Quit]
sensen has quit [Quit: leaving]
binaryplease has quit [Ping timeout: 272 seconds]
hamakn_ has quit [Remote host closed the connection]
lyanchih has quit [Ping timeout: 272 seconds]
hamakn has joined #ruby
astrobunny has joined #ruby
blackmesa has joined #ruby
monkegjinni has joined #ruby
fredjean has joined #ruby
LarsSmit has quit [Quit: Leaving.]
kitak has joined #ruby
fightback has joined #ruby
helloworld has quit [Ping timeout: 245 seconds]
maoko has joined #ruby
krawchyk_ has joined #ruby
hamakn has quit [Ping timeout: 252 seconds]
mlpinit has joined #ruby
fredjean has quit [Client Quit]
dhruvasagar has joined #ruby
dhilipsiva has joined #ruby
helloworld has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
krawchyk has quit [Ping timeout: 265 seconds]
kitak has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
b00stfr3ak has joined #ruby
aganov has quit [Remote host closed the connection]
whunt has joined #ruby
roadt_ has quit [Ping timeout: 246 seconds]
astrobunny has quit [Read error: Connection reset by peer]
amigo99 has quit [Quit: This computer has gone to sleep]
ewnd9 has quit [Ping timeout: 264 seconds]
pitzips has joined #ruby
bondar has joined #ruby
failshell has joined #ruby
binaryplease has joined #ruby
tboerger has quit [Quit: leaving]
jbpros has quit [Quit: jbpros]
germanstudent has quit [Ping timeout: 272 seconds]
<_br_>
Does anyone have a Rails agnostic (its for sinatra) Warden strategy for Twitter, Facebook or Instagram? (without Devise) (Cross-posted on Rubyonrails, sinatra)
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enebo has joined #ruby
nik_-_ has joined #ruby
danman has quit [Client Quit]
amigo99 has left #ruby ["Leaving"]
Stygia has quit [Ping timeout: 248 seconds]
<nobitanobi>
havenwood: ok nice. I have been using ChunkyPNG and I love it. However it just supports PNG. :)
banisterfiend has quit [Quit: Computer has gone to sleep.]
ffranz has joined #ruby
<havenwood>
nobitanobi: Yeah, nice when you're just using pngs to use something lighter weight. :)
timonv has quit [Ping timeout: 240 seconds]
<nobitanobi>
I'm thinking on just converting the image to PNG and use ChunkyPNG
jlast_ has joined #ruby
<nobitanobi>
but this minimagick looks neat too
cozby has quit [Remote host closed the connection]
heidi has joined #ruby
[0x1a]_ has quit []
Monie has joined #ruby
jlast has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
noop has joined #ruby
petey_ has quit [Remote host closed the connection]
jcromartie is now known as derp
[0x1a] has joined #ruby
petey_ has joined #ruby
Al_ has quit [Quit: Al_]
derp is now known as effing
effing is now known as jcromartie
freezey has quit [Remote host closed the connection]
freezey has joined #ruby
mr_red has quit [Ping timeout: 248 seconds]
xk_id has joined #ruby
soba_ has quit [Read error: Connection reset by peer]
petey_ has quit [Ping timeout: 240 seconds]
sailias has quit [Quit: Leaving.]
freezey_ has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
sailias has joined #ruby
beanHolez_ has joined #ruby
mr_red has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.2]
freezey has quit [Read error: No route to host]
maletor has quit [Quit: Computer has gone to sleep.]
kalesage has joined #ruby
Tuxist has joined #ruby
sailias has quit [Read error: Connection reset by peer]
sailias has joined #ruby
akemrir has joined #ruby
mklappst_ has quit [Remote host closed the connection]
sayan has joined #ruby
khushildep has quit [Quit: getting the flock() outta here]
Banistergalaxy has joined #ruby
jhaals has quit [Ping timeout: 268 seconds]
<beanHolez_>
So I was just looking through the docs when I saw the assoc and rassoc methods on array. The only way I can see using them is to recreate the idea of a hash, using only arrays. Could someone explain to me where these methods (http://ruby-doc.org/core-2.0.0/Array.html#method-i-assoc) are more appropriate to use when a hash would also work perfectly fine
<beanHolez_>
d
<shevy>
is there a simple way to sort dates according to. dd.mm.yyyy ?
tatsuya_o has quit [Read error: Operation timed out]
<d4heyDU>
shevy: in the block can't you rearrange the text and then use <=> to sort
pleal has joined #ruby
toastynerd has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
<d4heyDU>
shevy: so rearrange "01.04.2008" to '2008.04.01'
toastynerd has joined #ruby
<shevy>
wouldn't I have to rearrange that back again?
<beanHolez_>
I don't know why the sort didn't work for you, worked fine for me
jbpros has joined #ruby
<beanHolez_>
And yes, you could rearrange it back again by running a map on the sorted array
<d4heyDU>
it doesn't update the array, you are just comparing the values
sambao21 has joined #ruby
<nobitanobi>
havenwood: this minimagick it's neat! Thanks buddy
havenwood has quit [Ping timeout: 260 seconds]
adeponte has quit [Remote host closed the connection]
aagdbl1 has joined #ruby
funburn has joined #ruby
thesheff17 has joined #ruby
aagdbl has quit [Ping timeout: 260 seconds]
thesheff17 has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 265 seconds]
_adeponte has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
thesheff17 has joined #ruby
einarj has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
lsmola has joined #ruby
Es0teric has joined #ruby
coderhs has quit [Ping timeout: 260 seconds]
elux has joined #ruby
<beanHolez_>
shevy: are you certain that calling .sort on those dates won't work for you?
<shevy>
beanHolez_ yes, see the example above with the >>, month 07 comes before month 03 in that sort
newUser1234 has joined #ruby
einarj has quit [Ping timeout: 256 seconds]
<beanHolez_>
Okay, well, in that case I suggest this: Call .sort using a block. Inside of the block, call Date.parse on both block arguments and <=> those results
Liquid-- has joined #ruby
<shevy>
hmm that seems to work
kurt21 has joined #ruby
brennanMKE has quit [Remote host closed the connection]
aspires has joined #ruby
kalesage has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
<beanHolez_>
hanmac: that's a much prettier solution +1
<d4heyDU>
What does the & do in &Date.method(:parse)
<beanHolez_>
It creates a proc
rippa has quit [Ping timeout: 248 seconds]
eka has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
dangerousdave has quit [Ping timeout: 248 seconds]
brennanMKE has joined #ruby
theoretick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<d4heyDU>
ok, confusing, could you also do `proc { Date.method(:parse) }`?
<Hanmac>
d4heyDU: hm not so
<Banistergalaxy>
It's an annoying rubyism
<Banistergalaxy>
The &
mixel has quit [Quit: mixel]
<Hanmac>
d4heyDU: you need & to tell that the object is used as the block parameter of the function
yfeldblum has joined #ruby
sambao21 has joined #ruby
<JRizzle>
anyone know a good starter basic store repository ?
<Hanmac>
Banistergalaxy: i watched AT last weekend … what do you think about the Dungeon-Train?
marcdel has joined #ruby
theoretick has joined #ruby
<Banistergalaxy>
Hanmac is great, but I dislike the last two eps
<Banistergalaxy>
Hanmac AT had lost its spark a bit
coderhs has joined #ruby
<Banistergalaxy>
Hanmac do you agree?
aspires has quit [Quit: sudo making a sandwich]
<Hanmac>
hm the one with marcy was not so bad … but it had could be better
<d4heyDU>
hanmac: hmm, i know that it works, I'm just not understanding it. so any method that accepts a block you can pass in &SomeClass.method(:someMethod)
yfeldblum has quit [Remote host closed the connection]
baordog_ has joined #ruby
<Hanmac>
d4heyDU: hm yes, even &some_object.method works too
<beanHolez_>
Earlier, someone suggested sorting the dates by putting it in the format 'yyyy.mm.dd' and sorting based on those strings. That seems to work, but I cant seem to figure out how the string comparison happens.
noop has quit [Ping timeout: 240 seconds]
<beanHolez_>
'1.0.0' < '1.0.1' -> true
<beanHolez_>
'1.0.0' < '1.0.0' -> false
<Banistergalaxy>
Hanmac do you like lamb?
gja has quit [Quit: This computer has gone to sleep]
<beanHolez_>
Does it just go character by character, comparing in place?
burlyscudd has joined #ruby
<Hanmac>
beanHolez_: yeah char by char
<Hanmac>
Banistergalaxy: hm what do you mean?
<Banistergalaxy>
Hanmac the meat
<Hanmac>
hm nah, i prefer chicken if possible
jamblack has quit [Quit: jamblack]
weems has quit [Read error: Connection reset by peer]
jamblack has joined #ruby
gja has joined #ruby
monkegjinni has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
monkegjinni has joined #ruby
c0rn has joined #ruby
mneorr has quit [Remote host closed the connection]
kirun has joined #ruby
mneorr has joined #ruby
Guest62506 has quit [Read error: Connection reset by peer]
k610 has quit [Quit: Leaving]
dangerousdave has joined #ruby
KobraKao has joined #ruby
jhaals has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
freezey_ has quit [Remote host closed the connection]
pleal has quit [Remote host closed the connection]
freezey has joined #ruby
maletor has joined #ruby
timonv has quit [Read error: Connection reset by peer]
altivec has joined #ruby
KobraKao has quit [Quit: Leaving]
Elhu has quit [Client Quit]
kurt21 has quit [Quit: Leaving.]
jrhorn424 is now known as zz_jrhorn424
altivec has quit [Client Quit]
KobraKao has joined #ruby
Elhu has joined #ruby
mneorr has joined #ruby
vince_prignano has quit [Ping timeout: 240 seconds]
nazty has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
i_s has quit [Remote host closed the connection]
mzdravko1 has joined #ruby
mzdravko1 has quit [Client Quit]
vince_prignano has joined #ruby
Mon_Ouie has joined #ruby
nazty has quit [Client Quit]
Spami has joined #ruby
yfeldblum has joined #ruby
flops has quit [Ping timeout: 245 seconds]
jonathanwallace has quit [Ping timeout: 272 seconds]
awc737 has quit [Excess Flood]
decoponio has quit [Quit: Leaving...]
enebo has quit [Quit: enebo]
yfeldblum has quit [Remote host closed the connection]
dcunit3d has quit [Quit: dcunit3d]
akemrir has quit [Quit: WeeChat 0.4.2]
astrobunny has quit [Ping timeout: 240 seconds]
nomenkun has joined #ruby
brennanMKE has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
eka has joined #ruby
johnnyfuchs has joined #ruby
BizarreCake has quit [Ping timeout: 248 seconds]
awc737 has joined #ruby
jonathanwallace has joined #ruby
jprovazn has joined #ruby
yfeldblum has joined #ruby
brennanMKE has quit [Ping timeout: 240 seconds]
randomnick_ has joined #ruby
mneorr has quit [Remote host closed the connection]
astrobunny has joined #ruby
mneorr has joined #ruby
allsystemsarego has quit [Quit: Leaving]
Asher has joined #ruby
Methylated has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr_ has joined #ruby
<Methylated>
Hey, what are my options for benchmarking a ruby app running on 1.8.5? please help. thanks
RichardBaker has quit [Quit: RichardBaker]
timonv has joined #ruby
toastynerd has quit [Remote host closed the connection]
likemike has quit [Ping timeout: 240 seconds]
jzinedine has joined #ruby
<Hanmac>
Methylated: 1.8.5 is dead … since the ice ages?
mayorga has joined #ruby
<Hanmac>
use 2.0+
zipper has joined #ruby
mlpinit has quit [Remote host closed the connection]
weems has quit [Read error: Connection reset by peer]
freezey has joined #ruby
mlpinit has joined #ruby
<andrewvos>
But now he has two problems
Liquid-- has quit [Quit: Computer has gone to sleep.]
ahawkins has quit [Ping timeout: 260 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
i_s has joined #ruby
Jake232 has joined #ruby
<Hanmac>
andrewvos: 1.8.5? seriously? i dont know any OS that uses that … even centos uses "newer" 1.8.7 … 1.8.5 is also not compatible to 1.8.7 ;P
pixelgremlins has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
<shevy>
Methylated in theory, the benchmarks on 1.8.7 should work on 1.8.5. did you try to require 'benchmark' yet?
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
RicFlair has quit [Quit: ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]]
yfeldblum has quit [Remote host closed the connection]
anil has joined #ruby
<andrewvos>
hanmac: I'm kinda picturing Methylated has this running on production or something so it's just working. My first thought would be to just try not touch it too much. Imagine having to port that monstrosity to 2.0 :/
<jzinedine>
hi all, can anyone help me on a gdb issue?
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mon_Ouie has joined #ruby
ehaliewicz has joined #ruby
Sammael has quit [Ping timeout: 246 seconds]
<Hanmac>
jzinedine: i dont know that api, but didnt you need to run ruby_init or similar functions before?
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Nickwiz has quit [Read error: Operation timed out]
<jzinedine>
I don;t know, I'm a naive gdb user
Nickwiz has joined #ruby
Cork has quit [Read error: Operation timed out]
<jzinedine>
but those functions come from a .gdbinit file
<jzinedine>
ruby_eval I mean
zipper has quit [Ping timeout: 248 seconds]
<Hanmac>
andrewvos: the problem each os i could image which has 1.8.5 has already dropped its own support … so for the sake of os security he should really update his system
jerius has quit [Ping timeout: 245 seconds]
vpretzel has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 252 seconds]
timonv has quit [Remote host closed the connection]
g0bl1n has joined #ruby
g0bl1n has joined #ruby
g0bl1n_ has joined #ruby
kstephens has quit [Ping timeout: 260 seconds]
zipper has joined #ruby
<andrewvos>
hanmac: Well hopefully he works somewhere where a project manager will let Methylated upgrade the code :)
Cork has joined #ruby
<shevy>
die
<shevy>
oops
<shevy>
I mean hi
<Hanmac>
andrewvos: i think he is calling from the past … where is no newer ruby than 1.8.5 :P
<zipper>
uh is there a library I import or require so that I can run asserts in Ruby?
jlast_ has quit [Remote host closed the connection]
vince_prignano has quit [Remote host closed the connection]
<andrewvos>
zipper: minitest?
<havenwood>
zipper: Minitest and Unit::Test are included.
<zipper>
I am looking at a few articles and none of them are clear about it.
<shevy>
hanmac although they would need to be able to set out to achieve some goal
fredjean has joined #ruby
<shevy>
all those future visions end in doom
<shevy>
it's as if there is a lack of imagination otherwise
sambao21 has joined #ruby
zz_jrhorn424 is now known as jrhorn424
wallerdev has joined #ruby
hello_world has joined #ruby
<havenwood>
zipper: #clojure's bot is great, chimes with responses on a random interval on top of other things
<havenwood>
chimes in*
gaurav23 has quit []
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vpretzel_ has joined #ruby
baroquebobcat has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
jonathanwallace1 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
zeade has quit [Quit: Leaving.]
aniln has quit [Quit: Konversation terminated!]
<zipper>
havenwood: ruby is weird
anil has joined #ruby
anil is now known as aniln
<zipper>
Which language would you say ispired the making of ruby?
aniln has quit [Client Quit]
jwest has joined #ruby
<havenwood>
zipper: Lisp, Smalltalk, Perl
jonathanwallace has quit [Ping timeout: 256 seconds]
<zipper>
I know Python and C++ and a little JS but this lang is weird
devoldmx has quit [Ping timeout: 265 seconds]
<shevy>
zipper perl
aniln has joined #ruby
<zipper>
havenwood: no wonder I find this lang weird
<zipper>
especially the irb
sambao21 has quit [Ping timeout: 248 seconds]
<shevy>
ruby is like perl but beautiful and OOP designed
Tuxist has quit [Remote host closed the connection]
tijmencc has joined #ruby
jwest has quit [Quit: WeeChat 0.4.1]
<zipper>
why is x = 5 and print x return 5 => nil?
<zipper>
shevy: I know no perl.
Emmanuel_Chanel has joined #ruby
Advocation has joined #ruby
aniln has quit [Client Quit]
aniln has joined #ruby
<zipper>
I went through the about nil koan but still
jwest has joined #ruby
<zipper>
nil is preety foreign
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mitchellvanw has joined #ruby
<shevy>
zipper do you return from a method?
<lupine>
zipper, "print" is a function that returns nil
<havenwood>
zipper: Expressions have return values, and some IO methods like #puts and #print have a return value of `nil`.
<shevy>
zipper ah... you mean inside irb
alvaro_o has joined #ruby
keyvan_ has quit [Quit: Connection closed for inactivity]
nazty has joined #ruby
sambao21 has joined #ruby
nazty has quit [Read error: Connection reset by peer]
flops has quit [Quit: leaving]
<havenwood>
zipper: Expressions in irb echo the return value to the terminal. The expressions still produce return values when run outside irb, they just aren't sent to stdout.
<havenwood>
zipper: Typical for any REPL.
relix has joined #ruby
<havenwood>
zipper: Just Ruby always has a return value.
<havenwood>
In Ruby 2.1 a few expressions that traditionally returned nil are returning symbols now! :
<Hanmac>
havenwood: but the fun part: it works on non-hash objects too if the have to_hash
nazty has joined #ruby
<havenwood>
i like this to_hash wave
terrellt has quit [Ping timeout: 256 seconds]
nomenkun has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
<nobitanobi>
I have a model which uses a module in /lib - Once I modify that module I need to restart the server in order to see the changes. Why is that?
<Hanmac>
nobitanobi: #rubyonrails ?
Naoe-Kanno has joined #ruby
<nobitanobi>
oh shut, I thought I was there :/
<nobitanobi>
sorry
mr_red has quit [Ping timeout: 241 seconds]
<Hanmac>
nobitanobi: or better allogy: you are driving with a Car, why do you need to stop to change the wheels or the engine?
aniln has quit [Quit: Konversation terminated!]
funburn has joined #ruby
i_s has joined #ruby
Mitchellvanw has joined #ruby
<Hanmac>
(okey some crazy japaniese i have seen can change a wheel without stoping the vehicle but thats teamwork)
<oller>
gems pre mavericks were typically put under ruby 1.8
<shevy>
SEX
<breakingthings>
woah
<oller>
whereas mavericks has ruby 2
<breakingthings>
calm down shevy
<shevy>
breakingthings I wanted to add something to the only insight he has!
<shevy>
but he was too quick and typed another line :(
<oller>
so there's a chance you've gems in 1.8 you think that are being used, but they're not getting picked up properly
<oller>
i had to re-index locate to find some gems i couldn't see before
tyleretters has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
fightback has joined #ruby
einarj has joined #ruby
fightback has quit [Client Quit]
vlad_sta_ has quit [Remote host closed the connection]
nilved has quit [Quit: leaving]
nilved has joined #ruby
<Hanmac>
ruby2 is to old for me, i prefer nightly ;D
lfox has quit [Quit: ZZZzzz…]
lfox has joined #ruby
michael_mbp is now known as zz_michael_mbp
cescalante is now known as ce_afk
vlad_starkov has joined #ruby
Underbyte has quit [Quit: Leaving...]
failshel_ has joined #ruby
claymore has quit [Quit: Leaving]
douchie1984 has joined #ruby
volty has joined #ruby
jerius has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
failshell has quit [Ping timeout: 260 seconds]
mlpinit has quit [Remote host closed the connection]
failshel_ has quit [Ping timeout: 248 seconds]
mlpinit has joined #ruby
elux has quit [Quit: Bye!]
freezey has quit [Remote host closed the connection]
ravster has joined #ruby
freezey has joined #ruby
DonRichie has quit [Quit: Verlassend]
asphx has quit [Ping timeout: 248 seconds]
terrellt has joined #ruby
Advocation has quit [Quit: Advocation]
astrobunny has quit [Ping timeout: 248 seconds]
KobraKao has joined #ruby
sambao21 has joined #ruby
zarubin has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
Advocation has joined #ruby
mengu has quit [Remote host closed the connection]
yfeldblum has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
timonv has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
benlieb has quit [Quit: benlieb]
joelteon has joined #ruby
aspires has joined #ruby
<joelteon>
so there's an exception being thrown by rack deep within the bowels of my application, and I have no idea how to travel up stack frames using the debugger
Underbyte has joined #ruby
Underbyte has joined #ruby
Underbyte has quit [Changing host]
<joelteon>
can anybody help me with `debugger'? i'm pretty bad at it
nilved_ has joined #ruby
nilved_ has quit [Client Quit]
astrobunny has joined #ruby
dcunit3d has quit [Quit: dcunit3d]
mengu has quit [Ping timeout: 240 seconds]
breakingthings has quit []
dash_ has quit [Quit: dash_]
interactionjaxsn has quit [Remote host closed the connection]
aspires has quit [Client Quit]
shredding has quit [Quit: shredding]
interactionjaxsn has joined #ruby
nanothief has joined #ruby
jkamenik has quit [Quit: Leaving.]
jrhe has joined #ruby
mayorga has quit [Read error: Connection reset by peer]
carlyle has quit [Remote host closed the connection]
interactionjaxsn has quit [Ping timeout: 240 seconds]
mgorbach has joined #ruby
jlast has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
baordog_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]]
vlad_starkov has quit [Remote host closed the connection]
haukur has joined #ruby
Advocation has quit [Quit: Advocation]
adambeynon has joined #ruby
haukur has quit [Client Quit]
<zipper>
can anyone explain $LOAD_PATH to me?
mengu has quit [Remote host closed the connection]
<zipper>
I have read quite a bit about it but everything is still foggy.
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
kirun has quit [Quit: Client exiting]
<apeiros>
zipper: require and load will search in the directories listed in $LOAD_PATH
jlast has quit [Ping timeout: 260 seconds]
DrShoggoth has quit [Quit: Leaving]
gazarsgo has quit [Quit: gazarsgo]
<apeiros>
e.g. if you `require 'foo'`, and $LOAD_PATH is == ['/ruby/lib', 'mystuff/lib'], then ruby will search for '/ruby/lib/foo.rb', then 'mystuff/lib/foo.rb'
<apeiros>
first one it finds wins. if none is found you get a LoadError
freerobby has quit [Quit: Leaving.]
Tamal is now known as Tamal_Away
<apeiros>
(note: require will try additional suffixes like .so, .bundle, .dylib, .dll too; load on the other hand does not try any suffix on its own, you have to provide it yourself)
vlad_starkov has joined #ruby
<zipper>
apeiros: I got a load error when I tried to require a file in the same directory.
radic has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
<apeiros>
zipper: that's because '.' is not in the load path.
<apeiros>
(and shouldn't be)
<zipper>
I read around and found quite a bit on LOAD_PATH but none was clear on how to add files to load path
<apeiros>
you don't add *files* to load path. you add directories.
julweber has quit [Remote host closed the connection]
<zipper>
oh
<apeiros>
and how you do it: it's an ordinary array. use push, unshift, concat - whatever pleases you
julweber has joined #ruby
`Chris` has quit [Read error: Connection reset by peer]
<apeiros>
zipper: >> 23:56 apeiros: e.g. if you `require 'foo'`, and $LOAD_PATH is == ['/ruby/lib', 'mystuff/lib'], then ruby will search for '/ruby/lib/foo.rb', then 'mystuff/lib/foo.rb'
<shevy>
given two strings... "21.10.2013" and "27.10.2013", is there an easy way to treat them like a range? I'd need an array back with 21,22,23,24,26,27 respectively
<zipper>
I do get the concept of a path but I don't know other ways of adding directories to path other than export
pel_daniel has quit [Ping timeout: 245 seconds]
WickedAtMelb has joined #ruby
<zipper>
apeiros:
mengu has quit [Ping timeout: 272 seconds]
dcunit3d has joined #ruby
<apeiros>
zipper: $LOAD_PATH is a normal ruby array in ruby code.
<apeiros>
there is no "export". that's shell stuff. you are NOT in the shell. you are in ruby.
<apeiros>
again: normal array. normal array methods to manipulate it.
freezey has quit [Remote host closed the connection]
<Hanmac>
apeiros: the array itself may be normal, but the global variable is not, because its READ ONLY ;D
<apeiros>
hanmac: incorrect
<apeiros>
well, you can't assign to it
<apeiros>
if that's what you mean by READONLY
<apeiros>
seems to be.
<Hanmac>
yeah, $LOAD_PATH = [] #raises errror
<joelteon>
haha, implying anything in ruby is readonly
oller has left #ruby [#ruby]
Mitchellvanw has quit [Quit: Quiting like a baws]
<nobitanobi>
Given a string with this format: rgb(68, 68, 68), or rgb(68, 9, 66) - what would be the best way to just have '68,9,66'. In other words, get rid of rgb( , spaces between numbers and the final ) - Am I looking for regex, or there is a better way in Ruby?
<apeiros>
joelteon: well, that bit is enforced by the C level part of ruby. though I'm sure charliesome would find a way around even this in pure ruby…
julweber has quit [Ping timeout: 272 seconds]
<apeiros>
nobitanobi: regex
<apeiros>
nobitanobi: String#[] + regex, that is
Mothore has quit [Quit: Computer has gone to sleep.]
<nobitanobi>
ok :) txs
paul424 has quit [Quit: GG]
<apeiros>
if you also want to get rid of the spaces between the , and numbers, then you need more, though
Mothore has joined #ruby
<apeiros>
(your example went from "68, 9, 66" to "68,9,66"
<apeiros>
)
<matled>
shevy: the range operator would work on the strings if you .split('.').reverse.join('.') them
Senjai has joined #ruby
Senjai has quit [Changing host]
Senjai has joined #ruby
timonv has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
tyleretters has left #ruby [#ruby]
<Hanmac>
nobitanobi:
timonv has joined #ruby
<Hanmac>
>> /rgb\((?<r>\d+)\D+(?<g>\d+)\D+(?<b>\d+)\)/ =~ "rgb(68, 9, 66)"; p r,g,b
<withanx>
am I reading the docs wrong? It says Kernel.open can open a uri, but it gives me a "no such file" error when called with a uri in 1.9.3
<joelteon>
have you required open-uri
theRoUS has quit [Ping timeout: 245 seconds]
<withanx>
nope :)
osvico has joined #ruby
ChronocityLC has joined #ruby
<nobitanobi>
hanmac: I will try it, and come back and check solution :)
<nobitanobi>
thanks
<nobitanobi>
I want to try to do it hehe
coderhs has joined #ruby
snovak_ has joined #ruby
<Hanmac>
apeiros: hm i dont think so … its not easy to fool rb_define_readonly_variable and the others
<withanx>
joelteon: thanks, also your name resembles a Pokemon. ;)
ShellFu has quit [Read error: Connection reset by peer]
<joelteon>
yay someone understands
nanothief has quit [Read error: Connection reset by peer]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanothief has joined #ruby
<apeiros>
hanmac: have you seen his recent hacks with vm instructions? that guy is just crazy.
_maes_ has quit [Read error: Connection reset by peer]
<Hanmac>
;D
<apeiros>
(in the most positive sense possible)
enebo has quit [Quit: enebo]
Mothore has quit [Ping timeout: 260 seconds]
zipper has quit [Ping timeout: 246 seconds]
Mitchellvanw has joined #ruby
Asher has joined #ruby
snovak has quit [Read error: Operation timed out]
<nobitanobi>
hanmac what is this =~ I always use .match
<Hanmac>
it would be impressed when itself closed blocks (wich only used block parameters and nothing from the binding) can be marshal dumped … that would be awesome
withanx has quit [Client Quit]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 246 seconds]
ehc has quit [Read error: Connection reset by peer]
MrZYX is now known as MrZYX|off
sambao21 has joined #ruby
ehc has joined #ruby
verto has quit [Ping timeout: 272 seconds]
wookiehangover has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
<Hanmac>
nobitanobi: /regex-literal-with-group-capture/ =~ string-obj has the MAGIC to create local variables that holds the captured groups … something .match cant do
dcunit3d has quit [Quit: dcunit3d]
Davedo has quit [Ping timeout: 272 seconds]
vitorhugo has quit [Quit: Konversation terminated!]
drumsrgr_ has quit [Read error: Connection reset by peer]
carif has quit [Ping timeout: 272 seconds]
__noname001__ has quit [Read error: Connection reset by peer]
drumsrgr8forn8 has joined #ruby
snovak_ has quit [Ping timeout: 260 seconds]
pel_daniel has joined #ruby
__noname001__ has joined #ruby
wookiehangover has joined #ruby
Naoe-Kanno has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
Davedo has joined #ruby
carif has joined #ruby
thelamest has joined #ruby
<nobitanobi>
hanmac: that's great.
EricArchitrave has quit [Ping timeout: 240 seconds]
KobraKao has joined #ruby
capicue has quit [Quit: Leaving...]
mary5030 has quit [Ping timeout: 256 seconds]
<nobitanobi>
hanmac: how do I write this into my code though? /rgb\((?<red>\d+)\D+(?<green>\d+)\D+(?<blue>\d+)\)/ ~= color it seems it hangs syntax error, unexpected '~', expecting keyword_end
joelteon has left #ruby ["bye"]
mrsolo has joined #ruby
mixel has joined #ruby
dcunit3d has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
Underbyte has quit [Quit: Leaving...]
<Hanmac>
important! it only works with regex literals, not with regex objects, and also not if the regex has some iterpolation inside which cant be resolved without addion
radic has quit [Read error: Operation timed out]
<nobitanobi>
oush
<Hanmac>
nobitanobi: its =~ not ~=
jrobeson has quit [Ping timeout: 248 seconds]
sparq_ has joined #ruby
<Hanmac>
yeah i do this error often too :P
<nobitanobi>
ha,
<nobitanobi>
ok...interesting
stringoO has quit [Quit: stringoO]
jrobeson has joined #ruby
<nobitanobi>
why would .match don't act the same way though?
<nobitanobi>
I mean, this seems really useful, name groups
TorpedoSkyline has joined #ruby
<Hanmac>
because it cant … its only magic for the literals
pixelgremlins has joined #ruby
<Hanmac>
>> /(?<xy>\d+)#{1}/ =~ "1231" ; p xy
<eval-in>
Hanmac => undefined local variable or method `xy' for main:Object (NameError) ... (https://eval.in/57277)
<TorpedoSkyline>
shevy in what way? it's just known for issues like this?
<shevy>
there is a channel for bundler folks btw, #bundler
brtdv has joined #ruby
cloaked1 has joined #ruby
<shevy>
TorpedoSkyline if you ask me, yeah. bundler is a total piece of crap IMO. but better ask hanmac, he is a ruby guru
<TorpedoSkyline>
hanmac any thoughts on these errors?
<Hanmac>
TorpedoSkyline: i dont use rvm or bundler on ubuntu, so i dont know more about that :/ but you can look if bundler is installed in the current gem set ...
nisstyre has quit [Quit: Leaving]
<cloaked1>
So say I have an object I'm iterating and that object has methods in it. Is there a way to monkey patch object I'm iterating over in flight? I'm trying to add a method to it dynamically.
<Hanmac>
and maybe compass allways need a Gemfile in the project? i never used compass
<TorpedoSkyline>
hanmac it is =S version 1.3.5
<radic>
hoert denn jetzt evt. mal bitte das scheiss gebimmel auf Technomagier aleksandr ?!
Spami has quit [Read error: Connection timed out]
<TorpedoSkyline>
yeah, it's just a cli app to create new projects so: compass new project_name
<Hanmac>
cloaked1 depends, does the objects need to be unchanged after finish with iterating?
RichardBaker has joined #ruby
derebos has quit [Read error: Operation timed out]
<shevy>
cloaked1 you can always do: def name_of_object.name_of_method_to_add
<nobitanobi>
Can anyone can figure out what input the method 'from_rgb_stream' is expecting in these docs: http://rdoc.info/gems/chunky_png/frames -> Colors? I have tried '255,0,0' as it says rgb triple, but is not working fine.
<Hanmac>
notjames & shevy & havenwood look at this what i have done:
<notjames>
shevy: Ah! hmm. interesting and so easy. :) I'll try it. sorry but I think I was timing out when you sent that the last time so I didn't get it.
julweber has joined #ruby
capicue has quit [Quit: Leaving...]
newUser1234 has quit [Remote host closed the connection]
<notjames>
actually, shevy I don't think yours will work for me. However, using #extend may just work.
<notjames>
brb
i_s has quit [Read error: Connection reset by peer]
i_s_ has joined #ruby
brennanM_ has quit [Remote host closed the connection]
weems has quit [Quit: Leaving]
iltempo has joined #ruby
petey_ has quit [Remote host closed the connection]
Azulinho has joined #ruby
dr0ff has joined #ruby
<notjames>
shevy: actually trying yours first anyway to see what happens.
petey has joined #ruby
kurt21 has quit [Read error: Operation timed out]
<Hanmac>
yeah the mentality of a discworld wizard … "hm i wonder what will happen when i press THIS big red button" ;P
jibi has joined #ruby
tomzx_mac has joined #ruby
<notjames>
hanmac: got this: TypeError - wrong argument type Class (expected Module):
marcdel has joined #ruby
mmitchell has quit [Remote host closed the connection]
<notjames>
shevy: unfortunately, yours returned method not found.
_dma has quit [Remote host closed the connection]
<notjames>
I'm verifying my code really fast.
petey has quit [Ping timeout: 246 seconds]
<Hanmac>
notjames: you can inherit and instance only classes, but you can only include/extend/prepend modules …
_dma has joined #ruby
<Hanmac>
so you may need change your code to use a module not a class
mlpinit has quit [Remote host closed the connection]
platypine has joined #ruby
platypine has joined #ruby
platypine has quit [Changing host]
mlpinit has joined #ruby
<notjames>
yeah
orien has joined #ruby
<nobitanobi>
Anybody can help me trying to figure out how this function works? http://rubydoc.info/github/wvanbergen/chunky_png/ChunkyPNG/Color:from_rgb_stream -- I am trying to figure out what kind of input is expecting. I tried doing this in the console: "155,155,225".unpack("@#{0}C3") - And is just not giving me the same numbers
tcgden has joined #ruby
derebos has joined #ruby
<shevy>
notjames how can this be
Boohbah is now known as Boohbah_4core
<shevy>
notjames the sample with the bot here worked
zeropx has quit [Read error: Connection reset by peer]
<shevy>
notjames, you can see, in the array collection, we have 3 different objects. we defined the method testing on the second member. then we called it. object 1 and 3 don't have the method, so it would not work with them
dangerousdave has quit [Ping timeout: 260 seconds]
<shevy>
notjames let me try with a block now, perhaps a block is not a persistent reference, I will find out soon
<notjames>
shevy: k. thx!
weems has quit [Read error: Connection reset by peer]
<havenwood>
hanmac: :O
sepp2k has quit [Quit: Leaving.]
<shevy>
>> array = [Object.new, Object.new, Object.new]; array.each {|entry| if rand(2) == 0; def entry.testing; puts 'testing';end; end }; array[0].testing
<shevy>
50% chance that this object had a method called testing
<shevy>
so now we know, we can define on the object even in a block and block variable
<shevy>
so whatever the case, you must be doing something wrong in your code notjames
fenec2 has joined #ruby
kil0byte_ has quit [Remote host closed the connection]
<shevy>
or perhaps your objects do have the method and you just did not find out
<havenwood>
hanmac: I'm against it! :P
xk_id has quit [Quit:
<shevy>
if you still struggle, you could write a module, and use .extend to extend your object with the module at runtime
<notjames>
shevy: thank you sir! nah, I was incorrect. It's not a method I'm trying to create, it's an instance_variable. So, now, I'm trying to use method.instance_variable_set() :)
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baroquebobcat has joined #ruby
snovak has joined #ruby
dcunit3d has quit [Quit: dcunit3d]
Villadelfia has quit [Quit: Leaving.]
<notjames>
trying out and checking
radic has quit [Ping timeout: 260 seconds]
xk_id has joined #ruby
KobraKao has joined #ruby
i_s_ has quit [Remote host closed the connection]
Methylated has quit [Ping timeout: 246 seconds]
drumsrgr8forn8 has quit [Remote host closed the connection]
tspike has joined #ruby
drumsrgr8forn8 has joined #ruby
i_s has joined #ruby
<shevy>
hanmac I am bored
_dma has joined #ruby
<shevy>
I need to do something cooler with ruby
colonolGron has quit [Quit: Lost terminal]
brennanMKE has quit [Ping timeout: 272 seconds]
capicue has joined #ruby
zz_jrhorn424 is now known as jrhorn424
_dma has quit [Read error: Connection reset by peer]
pel_daniel has left #ruby [#ruby]
Mothore has joined #ruby
_dma has joined #ruby
<Hanmac>
shevy: try the southpole
<shevy>
lol
<shevy>
I could code for the pinguins
<shevy>
hmm... they are called penguins in english apparently...
snovak has quit [Ping timeout: 240 seconds]
jcromartie has joined #ruby
petey has joined #ruby
asobrasil has left #ruby [#ruby]
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
mayorga has joined #ruby
<Hanmac>
shevy i think they already run on tux-OS
<shevy>
I want RubyOS
jcromartie has quit [Client Quit]
KobraKao has quit [Ping timeout: 246 seconds]
Mothore has quit [Ping timeout: 272 seconds]
agjacome has quit [Ping timeout: 272 seconds]
alex__c2022 has quit [Read error: No route to host]
funburn has joined #ruby
Derander has quit [Read error: Operation timed out]
alex__c2022 has joined #ruby
predator217 has joined #ruby
justsee has quit [Ping timeout: 265 seconds]
Mothore has joined #ruby
Derander has joined #ruby
Hanmac has quit [Quit: Leaving.]
_dma has quit [Ping timeout: 272 seconds]
radic has joined #ruby
kreeves has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
randomnick_ has quit [Quit: Leaving]
tspike has quit [Ping timeout: 272 seconds]
<pipework>
shevy: Do it! Write a VM in ruby that runs ruby on top. Like RBX, but the VM is built in the language it's running, and implement the language in the language too!
weems has joined #ruby
colonolGron has joined #ruby
zeropx has quit [Quit: zeropx]
zeropx has joined #ruby
RORgasm has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 256 seconds]
kevind has quit [Quit: kevind]
zeropx has quit [Read error: Connection reset by peer]
renderfu_ has quit [Remote host closed the connection]
svennidal has quit [Remote host closed the connection]
fredjean has quit [Quit: Computer has gone to sleep.]
vlad_sta_ has joined #ruby
blackratdog has quit [Quit: Leaving]
agjacome has joined #ruby
starfox21 has quit [Quit: starfox21]
astrobunny has joined #ruby
mneorr_ has quit [Remote host closed the connection]
gyre007 has joined #ruby
<Boohbah>
pipework: that sounds slow
<pipework>
Boohbah: I know, right?
mneorr has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
dcunit3d has joined #ruby
dcunit3d has quit [Client Quit]
mlpinit has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 240 seconds]
mlpinit has joined #ruby
johnnyfuchs has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
nateberkopec has quit [Quit: Leaving...]
`Chris` has quit [Read error: No route to host]
pleal has quit [Remote host closed the connection]
`Chris` has joined #ruby
pleal has joined #ruby
ravster has joined #ruby
notjames has quit [Quit: Page closed]
mixel has quit [Quit: mixel]
justsee has joined #ruby
mixel has joined #ruby
Ripp__ has joined #ruby
weems has quit [Read error: Connection reset by peer]
_dma has joined #ruby
freerobby has joined #ruby
cwong2012 has joined #ruby
pleal has quit [Ping timeout: 246 seconds]
<cwong2012>
i am trying to do something simple... in a each do loop. i want to display the current index.
<cwong2012>
is there a variable?
hiall has quit [Quit: hiall]
jcromartie has joined #ruby
weems has joined #ruby
SilverKey has quit [Ping timeout: 260 seconds]
tcgden has quit [Ping timeout: 259 seconds]
<cwong2012>
like this: <% @mailq_hosts.sort.each do |mq_host| -%>, but i want to know what the current element is. so i can do mailq_port[current_element]
SilverKey has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
vlad_starkov has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
no-n has joined #ruby
sunnymolini has quit [Remote host closed the connection]