apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
<eph3meral>
the_jeebster, basically &:foo is always and forever, exactly equivalent to {|x|x.foo} where foo can be anything
<eph3meral>
so
<the_jeebster>
cool
<eph3meral>
the_jeebster, &:snoochieboochins would translate in to {|x|x.snoochieboochins}
maccosmo_ has joined #ruby
<eph3meral>
the_jeebster, like, for practical purposes, that's all you need to know
<eph3meral>
so, for example, this doesn't work on a hash
<eph3meral>
the_jeebster, it'll only work on objects that respond to those methods
redgetan has left #ruby ["Leaving"]
<the_jeebster>
interesting it doesn't work on the hash. I see it as hash.each_value &:nil? as hash.each_value { |value| value.nil?}
tewecske has quit [Quit: Leaving.]
<eph3meral>
uhh, well it will work on methods that a hash responds to
<eph3meral>
so theoretically you could my_hash.map(&:nil?)
mrsolo has quit [Quit: This computer has gone to sleep]
kevinbond has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<tommylommykins>
actually, according to the docs on enumerable
mrsolo has joined #ruby
<tommylommykins>
if you use #any without a block, it tells you whether some collection is all empty or not
<the_jeebster>
well, the result I'm getting seems to be working with some_hash.each_value.all? &:nil?
kenperkins has joined #ruby
<tommylommykins>
yeah
<the_jeebster>
hopefully this covers edge cases :)
<the_jeebster>
thanks for the help, I'm out fellas
<tommylommykins>
so you could write !!(some_hash.each_value.any?)
ZachBeta has joined #ruby
<tommylommykins>
but that doesn't read so well
fayimora has joined #ruby
<tommylommykins>
imo
pk1001100011 has quit [Ping timeout: 244 seconds]
the_jeebster has quit [Quit: Leaving.]
beilabs_ has joined #ruby
vitor-br has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
jgrevich has quit [Quit: jgrevich]
fivetwentysix has quit [Quit: fivetwentysix]
rorrego has quit [Quit: Ex-Chat]
kenperkins has quit [Quit: Computer has gone to sleep.]
counterbeing has quit [Quit: Computer has gone to sleep.]
cousine has quit [Remote host closed the connection]
siksia has quit [Ping timeout: 244 seconds]
jgrevich has joined #ruby
macmartine has joined #ruby
dbgster has joined #ruby
mikeg has quit [Ping timeout: 240 seconds]
vitor-br has quit [Quit: Saindo]
jedmtnman has joined #ruby
benatwork has joined #ruby
siksia has joined #ruby
vitor-br has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
<socomm>
I saw this awhile back, but can't remember the name of the project, maybe someone here can help me. There is a project out there that will allow compilation of ruby code.
beilabs_ has quit [Ping timeout: 265 seconds]
beilabs has quit [Ping timeout: 260 seconds]
<socomm>
ah nanoc
<socomm>
jesus getting old sucks
heeton has joined #ruby
heeton has left #ruby [#ruby]
heeton has joined #ruby
nari has quit [Ping timeout: 240 seconds]
<heeton>
I've got an object with a tonne of computed properties, methods that rely on the values of other methods being set etc.
banisterfiend has quit [Remote host closed the connection]
<eph3meral>
doesn't rubinius do that?
<heeton>
Right now, it's a mess of ifs and returns
<heeton>
Can anyone recommend a gem or approach, that will let me setup a dependency graph or something?
kenichi has quit [Remote host closed the connection]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
mxweas_ has quit [Quit: Computer has gone to sleep.]
artOfWar_ has quit [Ping timeout: 260 seconds]
benatwork has quit [Ping timeout: 245 seconds]
<eph3meral>
heeton, yeah I don't think there's really any kind of gem that will help you with that
<eph3meral>
fivetwentysix, seems not, no, just tried it
ckrailo has quit [Quit: Computer has gone to sleep.]
alexim has quit [Quit: sleep]
fgwaegeawgfwa has joined #ruby
Gavilan has quit [Ping timeout: 260 seconds]
wmoxam has joined #ruby
azm has joined #ruby
itnomad has joined #ruby
stephenjudkins has joined #ruby
liluo has joined #ruby
wang_ is now known as wang
itnomad has quit [Client Quit]
dwon has joined #ruby
wmoxam has quit [Ping timeout: 244 seconds]
brianpWins has quit [Quit: brianpWins]
Aaton is now known as Aaton_off
jedmtnman has quit [Quit: Leaving.]
iori has quit [Remote host closed the connection]
cryptfu has quit [Quit: Leaving]
shevy has quit [Read error: Operation timed out]
maccosmo has quit [Quit: maccosmo]
banisterfiend has joined #ruby
jchauncey has joined #ruby
iamjarvo has joined #ruby
jchauncey has quit [Client Quit]
heeton has quit [Quit: heeton]
ibash has quit [Quit: ibash]
iori has joined #ruby
daniel_hinojosa has quit [Ping timeout: 260 seconds]
trend has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
nfluxx has quit [Ping timeout: 244 seconds]
alegacyreborn has joined #ruby
dorei has quit []
digitalcakestudi has quit [Quit: Leaving.]
<alegacyreborn>
xD
alegacyreborn has quit [Client Quit]
recursive has joined #ruby
<recursive>
why is 'hello' === 'hello' => true but String === String => false?
<banisterfiend>
recursive: === can mean different thigns depending on the receiver
<eph3meral>
good question
artOfWar has joined #ruby
ringotwo has quit [Remote host closed the connection]
shevy2 has joined #ruby
<banisterfiend>
recursive: in the case of most objects it's equivalent to ==, but other objects override it to mean something else. FOr ranges it means include?, for classes/modules it means is_a? and for procs it means call()
<banisterfiend>
recursive: === is used implicitly in case statements
adeponte has quit [Remote host closed the connection]
<banisterfiend>
case obj
<banisterfiend>
when String
<banisterfiend>
ptus "it's a string!"
<banisterfiend>
when Fixnum
<banisterfiend>
puts "its a fixnum!"
<banisterfiend>
end
<banisterfiend>
^ in that example there's an implicit String === obj, which translates to obj.is_a?(String), and so the 'when' clauses match when obj is-a-kind-of the object after the 'when'
<banisterfiend>
recursive: so the reason String === String returns false is because String.is_a?(String) is false
werdnativ has quit [Ping timeout: 245 seconds]
beilabs has quit [Ping timeout: 245 seconds]
beilabs_ has quit [Ping timeout: 252 seconds]
beilabs__ has quit [Ping timeout: 260 seconds]
piotr_ has quit [Read error: Operation timed out]
ibash has joined #ruby
thiagopnts has joined #ruby
luxurymode has joined #ruby
azm has quit [Ping timeout: 260 seconds]
ianbishop has joined #ruby
mengu has quit [Remote host closed the connection]
c3l has joined #ruby
uris has joined #ruby
beilabs has joined #ruby
Araxia_ has quit [Quit: Araxia_]
beandip has joined #ruby
savage- has quit [Remote host closed the connection]
niku4i has joined #ruby
mucker has quit [Quit: leaving]
niku4i has quit [Ping timeout: 260 seconds]
brianpWins has joined #ruby
Hanmac has quit [Ping timeout: 250 seconds]
choffstein has quit [Remote host closed the connection]
Hanmac has joined #ruby
<stewart_>
given a url to an image does anyone know a way to get the height and width of that image?
<kleber>
hello guys, Im having some problem with a specific regex grouping. I have created a gist so you can take a look https://gist.github.com/2872088 is this an expected behaviour?
ringotwo_ has joined #ruby
beandip has quit [Quit: WeeChat 0.3.2]
ringotwo has quit [Read error: No route to host]
beilabs has joined #ruby
yannis has quit [Quit: Bye!]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
beandip has joined #ruby
<bnagy>
kleber: yes, it's expected
<bnagy>
the string matches :)
<bnagy>
you might want scan?
beandip has quit [Client Quit]
<kleber>
what about facebook-com? it doesn't match also?
<bnagy>
it would, but the string has already matched
<kleber>
I was expecting to match both 'google-com' and 'facebook-com'
beandip has joined #ruby
albemuth has joined #ruby
<kleber>
it worked when I tried on rubular.com
<kleber>
just tried with scan and it match both
<bnagy>
like I said, it sounds like you want String#scan
benatwork has joined #ruby
<kleber>
well, scan works, thank you :)
k776 has joined #ruby
benatwork has quit [Ping timeout: 245 seconds]
ringotwo_ has quit [Ping timeout: 250 seconds]
<k776>
Hey. I've been using Ruby for 4 years now. I've just started thinking about micro-optimizations during coding. Things like using single quotes ( ' ) for strings without interpolation. Granted, that probably does have a big impact. But what about symbols v.s. strings for hashes? I've heard it can cause bloat in an app because symbols are as GC'd as strings. Anyone got thoughts on the matter?
<k776>
(is it common/good practice to use strings instead of symbols? Does it have much impact on memory usage?)
<banisterfiend>
k776: only if you're dynamically generating a tonne of symbols which i imagine is incredibly rare
<bnagy>
symbols are better than strings in terms of memory usage
eph3meral has quit [Quit: Leaving]
<bnagy>
++++++++++++++++
<bnagy>
sorry, no idea what caused that
ringotwo has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
<k776>
banisterfiend: Ok
<stephenjudkins>
k776: if you aren't actually interpolating anything, there is zero difference between using " and '
<banisterfiend>
k776: basically for every symbol you create there's one corresponding string that hangs around forever in memory
<stephenjudkins>
during the parser phase they are converted to the exact same thing in the AST
DRCALKIN has quit [Quit: Leaving]
ananthakumaran has joined #ruby
<bnagy>
if you want micro optimisations, then think about stuff like object creation - don't use "str" + "other", and try to use lazy enumerators instead of iplicit array creation etc
trend has quit [Quit: trend]
<stephenjudkins>
k776: also: never, ever do micro-optimizations without benchmarking
<stephenjudkins>
at that level, things are rarely slow where you expect
<k776>
stephenjudkins: Yup, I'm not going crazy changing my app, just thigns to think about while developing
iamjarvo has joined #ruby
<stephenjudkins>
don't think about it unless it's an actual problem.
<k776>
If string interpolation and string v.s. symbol aren't problems, I won't worry about them :-)
ramblex has quit [Quit: ramblex]
<bnagy>
string vs symbol is often an issue
<stephenjudkins>
always use symbols when (1) there are a finite number and (2) they are hardcoded in the source
<stephenjudkins>
never (or perhaps only rarely) should you dynamically create a symbol from an arbitrary string
<bnagy>
unless you have a hash you are going to want to serialise
<banisterfiend>
i read talk about GCing of symbols in ruby 2.0 tho
yoklov has quit [Quit: computer sleeping]
radic has quit [Disconnected by services]
radic_ has joined #ruby
<stephenjudkins>
symbols are partially an optimization, where you can determine equality by object identity alone
radic_ is now known as radic
wilmoore has joined #ruby
<stephenjudkins>
banisterfiend: yes, i believe they are planning on using something like Java's soft references
<banisterfiend>
cool
<stephenjudkins>
weak references, rather.
yoklov has joined #ruby
burgestrand1 has joined #ruby
burgestrand has quit [Ping timeout: 245 seconds]
<stephenjudkins>
k776: another point: if you are worried about micro-optimizations in Ruby, you are using the wrong language
<stephenjudkins>
it's very useful to fix major hot spots in an application that runs too slow
<bnagy>
well most of those are just good ruby style anyway
<stephenjudkins>
but spending time to get an already slow language to run 5% faster across-the-board is usually unwise
krusty_ar has quit [Quit: No Ping reply in 180 seconds.]
<eam>
I don't think I agree re: wrong language. 5-10% is significant and if it's near free one should take it
krusty_ar has joined #ruby
<banisterfiend>
nerd fight!
ipoval has joined #ruby
<eam>
(meaning, good style regardless)
<banisterfiend>
(i hope)
<stephenjudkins>
usually changes to the overall architecture of your application will yield vastly more speedups than ruby micro-optimizations
<k776>
stephenjudkins: I'm not worried :-)
<k776>
I
jhunter has quit [Ping timeout: 260 seconds]
<k776>
I'm just looking for new ways to write better code
<stephenjudkins>
eam: if it's good style regardless, of course one should do it!
<k776>
(better = less slow in normal day coding)
<eam>
stephenjudkins: that's absolutely true, but I think both points are true
<bnagy>
if you want 'faster' then switching interpreter is going to be a lot more payback then changing how you use symbols etc :)
<stephenjudkins>
eam: but, if there is ever a tradeoff between "slightly faster" and "cleaner/more readable/more maintainable"
<dekz>
k776: those things shouldn't be 'micro optimisations' but part of your code styling
<stephenjudkins>
when writing Ruby, take the latter, always.
<eam>
stephenjudkins: agree
<k776>
dekz: Right, the fastests executing coding style ;-)
<stephenjudkins>
because Ruby is slow as shit anyways, who cares? optimize for programmer productivity
<eam>
I just wouldn't go so far as to hate on small performance gains!
jhunter has joined #ruby
kah_ has joined #ruby
<k776>
stephenjudkins: At least Ruby is faster than PHP :-)
<stephenjudkins>
Ruby has treated me very well career-wise, i'm not ragging on it.
<stephenjudkins>
but...i've gone and replaced hotspots written in Ruby with parts written using another, much faster language, and the speedup is an order of magnitude greater than what I could have spent 2x as long fighting with Ruby to eke out
<stephenjudkins>
99% of the time Ruby is fast enough and no could care or tell the difference in the first place
anykey has joined #ruby
anykey is now known as any-key
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
<banisterfiend>
stephenjudkins: why not just drop down to the ruby C API?
<eam>
banisterfiend: it was recommended to me that I should stick to FFI when wrapping C so as to get jruby bindings for free
<eam>
much slower of course
<banisterfiend>
eam: FFI is only useful when you're wrapping C :) we're talking about writing C for a hotspot
<eam>
and why would you torpedo modularity?
<banisterfiend>
what do u mean
<stephenjudkins>
eam: it's much slower, but for many things the dispatch overhead is tiny compared to what's going on.
<banisterfiend>
stephenjudkins: yeah, i've only prototyped with rubyinline
<eam>
I mean if you're going to write a module why not start by writing a shared object
apok has quit [Ping timeout: 245 seconds]
<stephenjudkins>
also, jruby 1.7 + openjdk 7 promises to be the fastest ruby implementation by a long shot
balki has quit [Remote host closed the connection]
kleber has quit [Quit: Saindo]
<stephenjudkins>
eam: i agree. if you're writing substantial amounts of C code, rubyinline is not the place to put it.
<stephenjudkins>
if you're writing bindings to a C/native library, FFI is the way to go.
<banisterfiend>
eam: well i dont use rubyinline, i use real c extensions
<banisterfiend>
but i like rubyinline for prototyping
<banisterfiend>
eam: also, so long as you stick to the public A API, jruby and rbx can use them too
stephenjudkins has quit [Quit: stephenjudkins]
<banisterfiend>
public C API*
alanp has joined #ruby
balki has joined #ruby
k776 has left #ruby [#ruby]
canton7 has quit [Ping timeout: 272 seconds]
burgestrand1 has quit [Ping timeout: 245 seconds]
andrewhl has joined #ruby
wallerdev has quit [Quit: wallerdev]
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
uris has joined #ruby
dv310p3r has quit [Ping timeout: 245 seconds]
<bnagy>
what's good about scala with jruby?
beilabs has quit [Ping timeout: 265 seconds]
noodletraveler has joined #ruby
macmartine has quit [Quit: macmartine]
fbernier has joined #ruby
bricker88 has quit [Quit: Leaving.]
ZachBeta has joined #ruby
sbanwart has quit [Read error: Operation timed out]
Magnu has joined #ruby
noodletraveler has quit [Ping timeout: 245 seconds]
zenith6 has joined #ruby
noodletraveler has joined #ruby
<banisterfiend>
bnagy: i think he's using scala the way that real programmers use 'C', to speed up their apps on certain performance critical areas
undersc0re97 has quit [Remote host closed the connection]
seanstickle has quit [Quit: Nihil sub sole novum]
mrdtt has joined #ruby
noodletraveler has quit [Ping timeout: 256 seconds]
beilabs has joined #ruby
replore has joined #ruby
ringotwo has quit [Remote host closed the connection]
noodletraveler has joined #ruby
dbgster has quit [Quit: dbgster]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
krusty_ar has quit [Remote host closed the connection]
<bnagy>
yeah I got that bit, although I'm not biting on the 'real programmers use C' part
<bnagy>
I was just wondering if it was a particularly nice integration or anything
<bnagy>
I think we should have built in lua :)
Ripp__ has joined #ruby
<banisterfiend>
v bnagy hehe
noodletraveler has quit [Ping timeout: 245 seconds]
becom33 has quit [Quit: Leaving]
noodletraveler has joined #ruby
<banisterfiend>
bnagy: most of your stuff is on jvm right?
dwon has quit [Quit: Leaving]
Magnu_ has joined #ruby
<bnagy>
well, I use jruby wherever I can yeah
<bnagy>
although I don't use it on my windows bots
<banisterfiend>
bnagy: are you interested in integration with any of the new jvm language?
<banisterfiend>
s
Magnu has quit [Ping timeout: 252 seconds]
macmartine has joined #ruby
QaDeS has quit [Quit: Ex-Chat]
cryptfu has joined #ruby
<bnagy>
what languages? Probably not :)
noodletraveler has quit [Ping timeout: 248 seconds]
Magnu has joined #ruby
noodletraveler has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
Magnu_ has quit [Ping timeout: 252 seconds]
noodletraveler has quit [Ping timeout: 250 seconds]
wilmoore has quit [Remote host closed the connection]
noodletraveler has joined #ruby
<banisterfiend>
bnagy: scala/clojure etc
j-v-e has joined #ruby
fbernier has quit [Ping timeout: 245 seconds]
fbernier has joined #ruby
noodletraveler has quit [Ping timeout: 245 seconds]
chico_chicote has quit [Ping timeout: 245 seconds]
igotnolegs has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
noodletraveler has joined #ruby
noodletraveler has quit [Changing host]
noodletraveler has joined #ruby
kevinbond has quit [Quit: kevinbond]
hakunin has quit [Remote host closed the connection]
luxurymode has quit [Quit: Computer has gone to sleep.]
any-key has quit [Quit: leaving]
<recursive>
banisterfiend: thank you for the detail
bigfg has joined #ruby
Magnu has quit [Ping timeout: 244 seconds]
ananthakumaran has quit [Quit: Leaving.]
fivetwentysix has quit [Quit: fivetwentysix]
burgestrand has joined #ruby
zenith6 has quit [Quit: Leaving]
rmascarenhas has quit [Quit: leaving]
igotnolegs has quit [Client Quit]
noodletraveler has quit [Ping timeout: 252 seconds]
beilabs has quit [Ping timeout: 244 seconds]
fivetwentysix has joined #ruby
bfgun has quit [Ping timeout: 252 seconds]
noodletraveler has joined #ruby
youdonotexist has quit [Read error: Connection reset by peer]
youdonotexist has joined #ruby
AlbireoX`Laptop has joined #ruby
savage- has joined #ruby
noodletraveler has quit [Ping timeout: 260 seconds]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
noodletraveler has joined #ruby
indian has quit [Read error: Connection reset by peer]
recursive has quit [Quit: leaving]
ZachBeta has quit [Quit: Computer has gone to sleep.]
Magnu has joined #ruby
azm has quit [Ping timeout: 244 seconds]
noodletraveler has quit [Ping timeout: 260 seconds]
noodletraveler has joined #ruby
banister_ has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
vitoravelino is now known as vitoravelino`afk
banister_ is now known as banisterfiend
noodletraveler has quit [Ping timeout: 244 seconds]
MrGando has joined #ruby
ringotwo has joined #ruby
noodletraveler has joined #ruby
DanBoy has quit [Quit: Leaving]
zemanel has quit [Quit: Remote hottie closed the connection]
kevinbond has joined #ruby
Magnu_ has joined #ruby
noodletraveler has quit [Ping timeout: 245 seconds]
Magnu has quit [Ping timeout: 244 seconds]
noodletraveler has joined #ruby
Magnu has joined #ruby
Magnu_ has quit [Ping timeout: 260 seconds]
noodletraveler has quit [Ping timeout: 245 seconds]
noodletraveler has joined #ruby
ananthakumaran has joined #ruby
siksia has quit [Ping timeout: 244 seconds]
j-v-e has quit [Ping timeout: 252 seconds]
Bosma has quit [Ping timeout: 265 seconds]
noodletraveler has quit [Ping timeout: 248 seconds]
<epochwolf>
I'm working on an a ruby script that will automate conversion of various ebook formats into a kindle supported format. I need an email library for the last step of emailing the finished document. Any suggestions on a proper library?
<epochwolf>
I plan on using google apps for smtp
dekhaus has joined #ruby
noodletraveler has joined #ruby
beilabs has joined #ruby
<dekhaus>
Hi. What does '&:symbol' mean in the context of a method call … i.e. tickets.max_by(&:price). Thanks
iamjarvo has quit [Quit: Leaving.]
<epochwolf>
dekhaus: it means :symbol.to_proc
<epochwolf>
the proc looks like {|object| object.send(:symbol) }
<dekhaus>
oh. OK. Thanks
<epochwolf>
np
siksia has joined #ruby
h4mz1d has joined #ruby
fbernier has quit [Ping timeout: 245 seconds]
benatwork has joined #ruby
noodletraveler has quit [Ping timeout: 260 seconds]
hamfz_ has joined #ruby
noodletraveler has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
albemuth has quit [Quit: Leaving...]
nirakara has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
benatwork has quit [Ping timeout: 245 seconds]
kah_ has quit [Quit: Leaving]
ringotwo has quit [Remote host closed the connection]
noodletraveler has quit [Ping timeout: 252 seconds]
noodletraveler has joined #ruby
apok has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
noodletraveler has quit [Ping timeout: 244 seconds]
noodletraveler has joined #ruby
joshman_ has joined #ruby
<Magnu>
Howdy folks. I'm trying to install grism (stockmarket program). Following instructions here: http://www.grism.org/install.html When i install the dependencies i get "unable to locate package libglade2-ruby. Is grism old and dead?
roams has joined #ruby
fayimora has quit [Quit: Be back in a gifii]
ringotwo has joined #ruby
jmcphers has quit [Ping timeout: 252 seconds]
jmcphers has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
dekhaus has quit [Quit: dekhaus]
Magnu_ has joined #ruby
noodletraveler has quit [Ping timeout: 248 seconds]
<Magnu_>
what does "connection rests by peer" mean?
user__ has joined #ruby
<Magnu_>
not rests, reset
noodletraveler has joined #ruby
thiagopnts has quit [Quit: Leaving]
Magnu has quit [Ping timeout: 245 seconds]
akem has quit [Ping timeout: 256 seconds]
<Magnu_>
Howdy folks. I'm trying to install grism (stockmarket program). Following instructions here: http://www.grism.org/install.html When i install the dependencies i get "unable to locate package libglade2-ruby. Is grism old and dead?
emmanuelux has quit [Read error: Connection reset by peer]
<bnagy>
those instructions are ancient
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
macmartine has quit [Quit: macmartine]
Mon_Ouie has quit [Ping timeout: 245 seconds]
joshman_ has quit [Quit: Computer has gone to sleep.]
aruntomar has joined #ruby
ibash has quit [Quit: ibash]
<dekz>
do people here separate their negative spec tests?
Magnu has joined #ruby
noodletraveler has quit [Ping timeout: 265 seconds]
Mon_Ouie has joined #ruby
AlbireoX`Laptop has quit [Remote host closed the connection]
Chryson has quit [Quit: Leaving]
andrewhl has quit [Remote host closed the connection]
AlbireoX`Laptop has joined #ruby
noodletraveler has joined #ruby
Progster has quit [Ping timeout: 248 seconds]
<Magnu>
What are you 601 folks up to here? This is very little chat for 601 people.
test34- has quit [Ping timeout: 265 seconds]
Magnu_ has quit [Ping timeout: 256 seconds]
<jrajav>
Would you rather we spam and/or argue endlessly?
<jrajav>
Nobody's having trouble. This is good.
<Magnu>
got a question about ruby
<jrajav>
wtf get the hell out
<jrajav>
(jk)
AlbireoX`Laptop has quit [Ping timeout: 245 seconds]
ConstantineXVI has quit [Read error: Connection reset by peer]
<Magnu>
huh?
beilabs has joined #ruby
noodletraveler has quit [Ping timeout: 256 seconds]
oponder has quit [Remote host closed the connection]
noganex has joined #ruby
tomgrim has joined #ruby
fivetwentysix has joined #ruby
Criztian has joined #ruby
beilabs has joined #ruby
pk1001100011 has joined #ruby
timonv has joined #ruby
ringotwo has joined #ruby
alup has quit [Ping timeout: 245 seconds]
piotr_ has joined #ruby
tonini has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
ryanf has quit [Quit: leaving]
DuoSRX has joined #ruby
ringotwo has quit [Remote host closed the connection]
BiHi has joined #ruby
bluOxigen has joined #ruby
schovi has joined #ruby
schovi_ has quit [Ping timeout: 252 seconds]
siksia has quit [Remote host closed the connection]
roams has quit [Ping timeout: 260 seconds]
mxweas_ has quit [Quit: Computer has gone to sleep.]
jackiechan0 has joined #ruby
alup has joined #ruby
visof has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
billiamii has quit [Read error: Connection reset by peer]
jackiechan0 has quit [Client Quit]
<visof>
Hello
visof has quit [Client Quit]
siksia has joined #ruby
qwerxy has joined #ruby
benatwork has joined #ruby
chimkan_ has quit [Quit: chimkan_]
Vainoharhainen has joined #ruby
benatwork has quit [Ping timeout: 245 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
beilabs has joined #ruby
genivf has joined #ruby
roolo has joined #ruby
s8 has quit [Quit: Page closed]
nai has joined #ruby
icooba has quit [Quit: icooba]
fivetwentysix has quit [Quit: fivetwentysix]
abstrusenick has joined #ruby
lolmaus has joined #ruby
nai has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
qwerxy has joined #ruby
ronniy has joined #ruby
sernin has joined #ruby
kontact has joined #ruby
<kontact>
hey guys, I'm migrating from python - is there a way to run a ruby script and get an interactive shell when it ends instead of irb exiting? (something like python -i)
<bnagy>
you want to run a normal script, but then drop into a repl after it's finished?
<dr_bob>
kontact: irb -r path/to/script.rb
<kontact>
bnagy: yup
<_br_>
kontact: probably, you want to use pry anyway. Irb has its issues
<kontact>
_br_: gem install pry ?
beilabs has quit [Ping timeout: 248 seconds]
<Hanmac>
pry has its issues too ... (its still used an "outdated" slop version)
n1x has joined #ruby
<_br_>
Well, lets say they are both not the best :)
eurek has joined #ruby
<kontact>
dr_bob: I get a LoadError when using irb -r script.rb
c0rn__ has quit []
fixl has joined #ruby
yannis has joined #ruby
<dr_bob>
please read what I wrote
<kontact>
gotcha, needed a full path
beilabs has joined #ruby
qwerxy has quit [Quit: offski]
beilabs has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ruby
siksia has quit [Ping timeout: 244 seconds]
siksia has joined #ruby
Guest97426 has joined #ruby
Guest97426 is now known as eddie_
tonini has quit [Remote host closed the connection]
<arturaz>
any idea why rspec spec/models/ would skip some tests, while rspec -e "should reduce count to free slots left" spec/models/ runs that test just fine?
<eddie_>
shevy: can you help me with unicode?
nfk has joined #ruby
yekta has joined #ruby
simao has joined #ruby
fayimora has joined #ruby
<eddie_>
unicode?
stefanp has joined #ruby
berserkr has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
beilabs has joined #ruby
<hoelzro>
eddie_: what Unicode help do you need?
<eddie_>
need to get unicode value from the unicode symbol
<chiel>
so, i've installed rbenv (through homebrew, cause I'm lazy like that), and everything seems to work fine. I installed ruby 1.9.3-p194, and I've set it using `rbenv global 1.9.3-p194`, however, ruby -v still gives me the version that comes preinstalled on os x: ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
Guedes has joined #ruby
Guedes is now known as Guest59685
<chiel>
anyone have any ideas on how to solve this?
Guedes0 is now known as Guedes
Guedes has quit [Client Quit]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
<chiel>
I also ran rbenv rehash and restarted my bash, to no avail
<chiel>
does the "global" ruby version not apply to the shell, or so?
<hoelzro>
that probably has something to do with it.
<chiel>
which *seems* correct, given rbenv is installed through homebrew
nanderoo has joined #ruby
<chiel>
hm, which path do I need to add?
<hoelzro>
see 2.2 in the installation docs
<hoelzro>
namely, the last paragraph of that section
QaDeS has joined #ruby
icooba has joined #ruby
j-v-e has left #ruby [#ruby]
* chiel
checks
abionic has joined #ruby
<chiel>
hoelzro: I did add that to my ~/.bash_profile though
<hoelzro>
oh, ok
<hoelzro>
just checking
<chiel>
:)
<chiel>
rbenv versions does give me: * 1.9.3-p194 (set by /Users/chiel/.rbenv/version)
<chiel>
which is the expected output after I've set it
<chiel>
but, ruby -v does not reflect that :/
<hoelzro>
chiel: what does which ruby output?
AxonetBE has joined #ruby
<chiel>
/usr/bin/ruby
<AxonetBE>
I'm switching to ruby 1.9.2 and I have problems with -> invalid multibyte char (US-ASCII), we have a french application and there is a lot of controllers where some text like payé etc, how can I solve this easily
ABK has quit [Ping timeout: 240 seconds]
<AxonetBE>
Is there an option to say to ruby to use UTF-8 encoding?
<Hanmac>
i think ".bash_profile" is the wrong file ... i think you need ".bashrc" ... or whats your shell?
robbyoconnor has quit [Ping timeout: 244 seconds]
<hoelzro>
AxonetBE: I think you need to use a special kind of comment
<hoelzro>
(assuming you're having problems with strings in the Ruby source)
<AxonetBE>
hoelzro: yes I found on the internet, # encoding: utf-8, but it means I have to edit like more then 200 files?
<hoelzro>
I think you can specify a command line option to override it
<becom33>
i want make a simple proxy listener . just a puts the traffic while Im surfing the website . like a interpreter
<Hanmac>
AxonetBe: you could also change $LC_CTYPE
beilabs has joined #ruby
<AxonetBE>
Hanmac: what do you mean with $LC_TYPE ?
<chiel>
ah, I got it working now.. I forgot I explicitly set the PATH var in my bashrc file
artm has joined #ruby
<chiel>
so now it works, when I put the eval after I source my bashrc
<chiel>
Sorry for being a noob guys, thanks for the help.
bambanx has quit [Quit: Saliendo]
Defusal has quit [Read error: Connection reset by peer]
Defusal has joined #ruby
Defusal has joined #ruby
mucker has quit [Quit: leaving]
Floydzy has left #ruby [#ruby]
cha1tanya has quit [Ping timeout: 256 seconds]
beilabs has quit [Ping timeout: 245 seconds]
fixl has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
<AxonetBE>
Hanmac: Here is the output : https://gist.github.com/2874564 everything is on UTF-8, but as soon as I start my rails server, he want to use US-ASCII
geekbri has joined #ruby
<becom33>
https://github.com/igrigorik/em-proxy I downloaded this git and in example dir there is a simple.rb i executed the file but it says simple.rb:1:in `require': no such file to load -- lib/em-proxy (LoadError)
robotmay has joined #ruby
<Hanmac>
AxonetBe: i think the problem is that rails maybe create an new shell prozess, or something like that ... so eigther put your export LC_CTYPE in a bashrc file or change your project files
beilabs has joined #ruby
cha1tanya has joined #ruby
heeton has quit [Quit: heeton]
iocor has joined #ruby
jedmtnman has joined #ruby
becom33 has quit [Read error: Connection reset by peer]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
fmcgeough has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
mdw has quit [Ping timeout: 252 seconds]
`brendan has joined #ruby
mohits has quit [Quit: Leaving]
<AxonetBE>
Hanmac: I created a single ruby file with content puts "éllo", and even this is not working because he wants to use ASCII, so it is not a problem of rails. If I run ruby -UK test.rb it works fine
mdw has joined #ruby
iamjarvo has joined #ruby
<Hanmac>
you mean -KU but this may not work in later versions
abionic has quit [Read error: Operation timed out]
<AxonetBE>
also when putting # encoding: UTF-8 in the file it works
noodletraveler has quit [Quit: leaving]
becom33 has joined #ruby
roflmaus has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
v3n0m has joined #ruby
benatwork has joined #ruby
v3n0m has quit [Client Quit]
ananthakumaran has quit [Quit: Leaving.]
<AxonetBE>
Hanmac: any idea?
hakunin has joined #ruby
abionic has joined #ruby
<Hanmac>
i prefer the # encoding comment in each file
benatwork has quit [Ping timeout: 245 seconds]
wangr has joined #ruby
tcopp has joined #ruby
cha1tanya has quit [Quit: Leaving]
siksia has quit [Ping timeout: 260 seconds]
siksia has joined #ruby
punkrawkR has joined #ruby
fbernier has joined #ruby
zomb1e has joined #ruby
mdw has quit [Remote host closed the connection]
kirun has joined #ruby
<AxonetBE>
Hanmac: why? because for me it is strange that a comment change something
<hoelzro>
agreed
<Hanmac>
a shebang is a comment too and it changes are massive
lessless has joined #ruby
user__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
<AxonetBE>
Hanmac: what do you mean? Which shebang changes are massive?
joast has joined #ruby
<Hanmac>
i mean this line: old uses: #!/usr/bin/ruby , new uses: #!/usr/bin/env ruby
mdw has joined #ruby
sacarlson has joined #ruby
<AxonetBE>
Hanmac: indeed, but there is ! what follows the ruby convention ( ! most of the time change something or is 'dangerous' ) irc://chat.freenode.net:6667/# encoding comment is just like a normal comment. Big mistake in my opinion
yekta has quit [Ping timeout: 244 seconds]
mdw_ has joined #ruby
bigkevmcd has joined #ruby
niv has left #ruby [#ruby]
mdw has quit [Ping timeout: 245 seconds]
mdw has joined #ruby
<lessless>
how to escape a single quote in 'M&M's', so it would be 'M&M\'s'?
<lessless>
not 'M&M\\'s' :)
<hoelzro>
this might be nitpicky, but the shebang behavior isn't defined by Ruby
Jackneill has joined #ruby
<hoelzro>
lessless: %q[M&M's]
eurek has joined #ruby
yekta has joined #ruby
<lessless>
x=[1,'Sweets', 'M&M's']; %q[x[2]] :(
Axsuul has quit [Ping timeout: 245 seconds]
<AxonetBE>
hoelzro: ok but the comment that change the encodig is defined by ruby no?
* tommylommykins
pipes up with English out of the standard library also being comically undocumented
mdw_ has quit [Ping timeout: 244 seconds]
<Hanmac>
lessless \n and others only works on "" not on ''
zomb1e has quit [Read error: Connection reset by peer]
zomb1e has joined #ruby
<hoelzro>
AxonetBE: no, it does not
<lessless>
okay, but how I should insert this value stored in the array element to the database
Synthead has quit [Ping timeout: 244 seconds]
<hoelzro>
I'm just making a distinction between shebang and an encoding comment =)
<hoelzro>
lessless: x=[1, 'Sweets', %q[M&M's]]
<hoelzro>
%q is a special string literal
<lessless>
LOL
krusty_ar has joined #ruby
Vendethiel has joined #ruby
lorandi has joined #ruby
Guest16903 is now known as davidw
<hoelzro>
lessless: what's so funny?
<lessless>
I think postgres do not accept double quotes :D
davidw is now known as Guest11890
jgarvey has joined #ruby
tscolari has joined #ruby
<tommylommykins>
ooi
<hoelzro>
it does
<tommylommykins>
is there any official documentation on English
<tommylommykins>
or do you *have* to open the source and read it yourself?
<hoelzro>
tommylommykins: ruby-doc.org?
<hoelzro>
lessless: it just might not do what you expect
<tommylommykins>
hoelzro: Try it yourself :p
* tommylommykins
finds it
<hoelzro>
esp. if you're used to MySQL, which says "screw this" to the standard way of doing things half the time
<jedmtnman>
arturaz: interesting idea. i've never considered calling return, but i can see how it might be a problem
<hoelzro>
last time I worked on it it was
<hoelzro>
unless you use mysql_server_prepare or whatever it's called
<arturaz>
jedmtnman, back me up on that pull request ;)
beilabs has joined #ruby
b3gott3n has quit [Ping timeout: 256 seconds]
dv_ has joined #ruby
<dross>
:o eww mysql
<jedmtnman>
arturaz: maybe it would be nicer for it to be registered in the reporter message: eg "13 Specs, 0 Failures, 2 pending, 4 not run"
* dross
has an allergic reaction from the word and has a seizure
rippa has quit [Quit: derp herp]
<arturaz>
jedmtnman, this thing is something that should be noticed and fixed right away. "not run" sounds very mystique. Why didn't they run? No explanation :)
rorrego has joined #ruby
nlc has quit [Remote host closed the connection]
Konboi has quit [Quit: Leaving...]
cha1tanya has quit [Read error: Connection reset by peer]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<jedmtnman>
arturaz: maybe thats not the right terminology, but it would make me wonder enough to google the explanation
uris has joined #ruby
<arturaz>
still, pretty hard to notice
fearoffish has joined #ruby
carloslopes has joined #ruby
pu22l3r has joined #ruby
<jedmtnman>
arturaz: agreed
pu22l3r has quit [Remote host closed the connection]
lockweel has joined #ruby
pu22l3r has joined #ruby
dv310p3r has joined #ruby
Criztian has quit [Remote host closed the connection]
<jedmtnman>
msg/ arturaz you think they'll want a spec for that change? it is rspec…?
<jedmtnman>
oops
nlc has joined #ruby
Ankhers has joined #ruby
<eam>
hoelzro: well I'll be damned, you're right. Do you know why that is?
roams has joined #ruby
td123 has joined #ruby
Morkel has quit [Quit: Morkel]
s8 has joined #ruby
awarner has joined #ruby
nuex has joined #ruby
nricciar has joined #ruby
Defusal has quit [Read error: Connection reset by peer]
Defusal has joined #ruby
Defusal has joined #ruby
Defusal has quit [Changing host]
yfeldblum has quit [Quit: Leaving]
beilabs has quit [Ping timeout: 245 seconds]
allanm has joined #ruby
thoolihan_ has quit [Quit: thoolihan_]
nipra has quit [Ping timeout: 256 seconds]
cha1tanya has joined #ruby
mengu has joined #ruby
LBRapid has joined #ruby
n1x has joined #ruby
jprovazn has quit [Quit: Leaving]
jprovazn has joined #ruby
<hoelzro>
eam: probably because older versions of MySQL didn't have a proper prepare =(
bbttxu has quit [Quit: bbttxu]
<hoelzro>
I did some work on the driver last year
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
Jackneill has quit [Remote host closed the connection]
nacengineer has quit [Quit: Leaving.]
kaiwren has quit [Quit: kaiwren]
jprovazn has quit [Client Quit]
shevy2 is now known as shevy
jetblack has quit [Ping timeout: 252 seconds]
jprovazn has joined #ruby
nirakara has joined #ruby
jrist is now known as jrist-afk
<zaargy>
how do people move around ruby apps quickly in vim?
n1x has quit [Quit: Ex-Chat]
<zaargy>
like if i have a method call and i want to go to teh def etc?
<zaargy>
or i want to look at the gem sourcecode i'm using
* hoelzro
pulls up a chair
n1x has joined #ruby
krusty_ar has quit [Quit: No Ping reply in 180 seconds.]
krusty_ar has joined #ruby
beilabs has joined #ruby
roflmaus has quit []
<jedmtnman>
zaargy: i think `:gtf` for 'go to file' but you might google it. its probably a plugin
<zaargy>
yeah you can do that
<zaargy>
that's pretty primitive though
dekroning has joined #ruby
jrallison has joined #ruby
<jedmtnman>
zaargy: google 'tim pope ruby vim' he's kinda the defatco author for ruby and vim, afaik
the_jeebster has joined #ruby
wunz has joined #ruby
chimkan_ has joined #ruby
ph^ has quit [Remote host closed the connection]
xaq has joined #ruby
bbttxu has joined #ruby
wunz has left #ruby [#ruby]
crankycoder has joined #ruby
brotspinne has joined #ruby
mikepack has joined #ruby
<brotspinne>
hi. this there a way that this line 'foo'.scan(/(foo)(:bar)?/) returns [['foo']] instead of [['foo', nil]] ?
<brotspinne>
is*
siksia has quit [Read error: Connection reset by peer]
<brotspinne>
because foo should be optional and not in the matching groups
<fbernier>
Hey, I am generating fixed length (6 chars) numbers, so for example: 000001 inside a loop. How could I gracefully prefix my number with zeros in ruby?
<brotspinne>
fbernier: sprintf or rjust
<canton7>
brotspinne, do you mean bar should be optional?
<brotspinne>
canton7: yes, sorry
<brotspinne>
fbernier: e.g. '100'.rjust(5, '0') # => "00100"
<canton7>
brotspinne, /(foo)(?::bar)?/
<fbernier>
brotspinne thanks!
<brotspinne>
fbernier: but then its a string
<Hanmac>
fbernier: "%06d" % number
siksia has joined #ruby
<fbernier>
I want a string anyway
<canton7>
fbernier, numbers are numbers. They don't have any sort of format of their own. If you were to print one, then it becomes a string, and you can control how that number is converted to a string (including prefixing with zeros, etc).
<brotspinne>
canton7: okay nil is gone but I cant get bar now when the string is 'foo:bar'
mikepack has quit [Ping timeout: 265 seconds]
idoru has joined #ruby
<canton7>
brotspinne, you said bar shouldn't be in the matching groups.. What, exactly, do you wnat?
<canton7>
*want
<brotspinne>
fbernier: Hanmac showed the sprintf version, thats nicer
abionic has quit [Ping timeout: 252 seconds]
<brotspinne>
canton7: yes kind of. I want bar only in the groups when it is actually there, so "bar or nothing" instead of "bar or nil" in my array
<canton7>
brotspinne, maybe you wanted /(foo(?::bar)?)/ ?
vlad_starkov has joined #ruby
<allanm>
Hi, I'm trying to use rubyrep for handling mysql db replication on some of our staging servers
<allanm>
but I been getting the following error
<allanm>
Exception caught: Mysql::Error: query: not connected: SHOW TABLES
<jedmtnman>
canton7: clojure is pretty easy to pickup. a little more modern than some other lisps. also you could play with heist (scheme interpreter in ruby)
<Ankhers>
brotspinne: What do you mean by the regex isn't a constant? Do you mean the string you're testing against, or the matcher?
<brotspinne>
canton7: I want this now: /((?:f)oo)?)bar/ so that "foo" is optional but only "oo" from the "foo" gets into the match data
kaiwren_ has joined #ruby
<brotspinne>
Ankhers: both is in a method so I guess both are always new objects
<Hanmac>
ZadYree & hoelzro: at line 7, it calls the nList method, and this returns nil
jonathan_ has joined #ruby
robotmay has quit [Remote host closed the connection]
moshef has quit [Quit: moshef]
siksia has joined #ruby
<ZadYree>
yup, but shouldn't o.nList = "foo" set it to "foo" ?
jonathanwallace has quit [Read error: Operation timed out]
pl_ab has joined #ruby
<brotspinne>
hoelzro: nList is an accessor
dekronin1 has joined #ruby
<brotspinne>
ZadYree: nList= sets the @nList variable
<ZadYree>
aaaah ok!
<ZadYree>
I get my error then
gabrtv has quit [Ping timeout: 252 seconds]
dekroning has quit [Ping timeout: 260 seconds]
maesbn has quit [Remote host closed the connection]
pl_ab has quit [Client Quit]
<ZadYree>
I thought @foo and foo were 2 different things
<brotspinne>
ZadYree: attr_accessor :foo is the same as def foo=(value); @foo = value; end + def foo; @foo; end
dr_bob has quit []
<ZadYree>
ok I see
sahli has quit [Quit: Leaving...]
<Hanmac>
ZadYree: they can be a different thing, but with attr_accessor you define them as ~equal
pl_ab has joined #ruby
jonathan_ has quit [Ping timeout: 248 seconds]
<ZadYree>
yeah I get it
<ZadYree>
well, it's definitely quite different from perl
gabrtv has joined #ruby
<brotspinne>
but much nicer :D
quest88 has joined #ruby
<ZadYree>
trolololo :)
<hoelzro>
Hanmac: ah, thanks, good call =)
<shevy>
ZadYree foo can be a method call or a local variable, @foo can only be an instance variable
<ZadYree>
I see
<Hanmac>
you could add magic into the ruby methods like calling "foo_value_changed"
niku4i has joined #ruby
<ZadYree>
aha ok
jprovazn is now known as jprovazn_away
arturaz has quit [Ping timeout: 245 seconds]
<Hanmac>
PS: if you call foo= without reciver you set a local variable ... if you want to call the method you need self.foo=
mneorr has quit [Remote host closed the connection]
youdonotexist has joined #ruby
gearaholic has quit [Remote host closed the connection]
albemuth has quit [Ping timeout: 250 seconds]
albemuth has joined #ruby
EzeQL_ is now known as EzeQL
<brotspinne>
Hanmac: quackery :P
lkba has joined #ruby
fermion has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby
froy has joined #ruby
youdonotexist has quit [Ping timeout: 240 seconds]
Eldariof-ru has quit [Ping timeout: 240 seconds]
moshef has joined #ruby
gogiel has quit [Ping timeout: 252 seconds]
<brotspinne>
Hanmac: but quite interesting! I've defined foo= without parameter and the only way I can call it inside the object is via send(:foo=) or method(:foo=).call
<brotspinne>
Hanmac: when I do self.foo= he expects the right side of the assignment
<brotspinne>
and does not call my "foo=()" method
<Hanmac>
yeah :P the same is with other operator methods like +,-,*,/
Guest59685 is now known as Guedes
<brotspinne>
Hanmac: okay I've learned never define a setter without a param. its quite useless
robbyoconnor has quit [Read error: Connection reset by peer]
<shevy>
hehehe
axl_ has quit [Quit: axl_]
<shevy>
a setter without a param is like a car without wheels!
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
mayankkohaley has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
AxonetBE has quit [Quit: Leaving.]
nuex has left #ruby [#ruby]
mdw has quit [Remote host closed the connection]
<brotspinne>
shevy: but my car can actually speak when I call it
<shevy>
so it was you who took K.I.T.T. away! :(
<Hanmac>
yeah, a speaking, but not driving car ... very useful
<shevy>
man KITT even survived some acid bath once
c0rn has joined #ruby
<shevy>
but it was curious that he started to speak very slowly when he was damaged...
<shevy>
ruby usually prefers short method names right
<shevy>
but instance_variable_set that is sooo long
kenperkins has joined #ruby
<jedmtnman>
Hanmac: what about the spare? :)
afallows_ has joined #ruby
<shevy>
Hanmac is a risk-it-all-or-nothing dude
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Karmaon has joined #ruby
<brotspinne>
shevy: yes but ivs() sucks
ben_alman has joined #ruby
axl_ has joined #ruby
afallows has quit [Ping timeout: 250 seconds]
Morkel has joined #ruby
<brotspinne>
shevy: I find the name perfectly valid
afallows_ is now known as afallows
vikhyat has joined #ruby
nfluxx has joined #ruby
brotspinne has left #ruby [#ruby]
axl_ has quit [Read error: Connection reset by peer]
MasterIdler has joined #ruby
youdonotexist has quit [Quit: youdonotexist]
axl_ has joined #ruby
hoelzro is now known as hoelzro|away
thone has joined #ruby
nfluxx has quit [Quit: nfluxx]
mdw_ has joined #ruby
allanm is now known as amacgregor
quest88 has quit [Quit: quest88]
jonathanwallace has joined #ruby
simao_ has joined #ruby
carloslopes has quit [Ping timeout: 245 seconds]
jonathan_ has joined #ruby
thone_ has quit [Ping timeout: 252 seconds]
s8 is now known as zii
simao has quit [Ping timeout: 265 seconds]
test34 has joined #ruby
zemanel has quit [Quit: Remote hottie closed the connection]
jonathanwallace has quit [Ping timeout: 245 seconds]
zii is now known as You`re
You`re is now known as ij
gogiel has joined #ruby
c0rn has quit []
jonathan_ has quit [Ping timeout: 240 seconds]
jgrevich has joined #ruby
bashdy has joined #ruby
bfig has quit [Read error: Connection reset by peer]
Karmaon has quit [Quit: WeeChat 0.3.8-rc2]
Karmaon has joined #ruby
AxonetBE has joined #ruby
Karmaon has quit [Client Quit]
Karmaon has joined #ruby
fserb has joined #ruby
afallows_ has joined #ruby
fbernier has quit [Remote host closed the connection]
savage- has joined #ruby
bashdy has quit [Ping timeout: 245 seconds]
afallows has quit [Ping timeout: 250 seconds]
bfig has joined #ruby
joch_n has joined #ruby
schovi has quit [Remote host closed the connection]
fserb has quit [Client Quit]
n1x has joined #ruby
the_jeebster1 has quit [Quit: Leaving.]
theRoUS has quit [Ping timeout: 260 seconds]
qwerxy has joined #ruby
mdw has joined #ruby
fbernier has joined #ruby
the_jeebster has joined #ruby
the_jeebster has quit [Client Quit]
Helius has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby
<shevy>
ivs() would be just one example. ivar_set or set_ivar would be other possibilities
<shevy>
it does not seem to be extremely consistent in ruby. we have .size and .length which is fine, but we have .uniq but not .unique. these are short names though, 3 word-method names are quite rare
<lectrick>
try that in a unicode-aware terminal (like os x)
bricker88 has joined #ruby
vlad_starkov has joined #ruby
tommyvyo has joined #ruby
SeySayux has quit [Ping timeout: 265 seconds]
jonatha__ has quit [Read error: Connection reset by peer]
<Mon_Ouie>
Was that to ask a question, or just to show how many weird unicode characters exist and aren't supported by most fonts?
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
<shevy>
down with unicode!
<dominikh>
os x is a unicode-aware terminal now? interesting. I thought it was an operating system
<amacgregor>
I been trying to get rubyrep (http://www.rubyrep.org) working but so far I always get stuck to the same issue Exception caught: Mysql::Error: query: not connected: SHOW TABLES
<amacgregor>
my guess is a problem with the mysql gem
schovi has joined #ruby
Aaton_off is now known as Aaton
<dross>
well there's your problem, you're using MySQL, not Postgresql
<amacgregor>
dross, lol unfortunately I have to use mysql
<dross>
I'm so sorry for you
<amacgregor>
I know I contemplated suicide but ... I think I can go on
<amacgregor>
lol
bashdy has joined #ruby
<amacgregor>
in all seriousness I'm just looking for a tool that allows me to do and fine tune db sync and replication rubyrep does exactly that ... well except for the part where you know doesn't work
Morkel has quit [Quit: Morkel]
simao_ has quit [Ping timeout: 265 seconds]
kontact has quit [Ping timeout: 245 seconds]
<amacgregor>
the issue is apparently common for anyone running or tryign to run rails in windows
<eam>
banisterfiend: I mean ARGV[0] == "Infinity" ...
zomb1e has quit [Remote host closed the connection]
zomb1e has joined #ruby
<eam>
banisterfiend: but yes that's how I'm generating Inf/NaN values
<bnagy>
Tere is a much shorter one someone was talking about on rubylang
<bnagy>
like 3 decimal places and it suddenly goes Wrong
<banisterfiend>
bnagy: do u eat meat
mucker has joined #ruby
<bnagy>
I do
geekbri has quit [Remote host closed the connection]
geekbri has joined #ruby
<banisterfiend>
bnagy: but u made a vegetarian curry?
<bnagy>
although I regret it after 2 nights ago
<eam>
bnagy: that's not an issue with 32bit math -- it's not even using 32bit values for that expression
<bnagy>
yeah, veg. guests
<eam>
it's an issue of base 10 versus base 2
<bnagy>
eam: you're telling the story, dude
Ankhers has quit [Remote host closed the connection]
<bnagy>
and as soon as you explain how you stop the cpu from using its native values...
yekta has quit [Client Quit]
<eam>
I'm just saying it's not a "32 bit math" issue
<bnagy>
I know that's what you're saying
td123 has quit [Quit: WeeChat 0.3.8]
<bnagy>
and I say I was abducted by aliens
<bnagy>
doesn't make either of us right
<shevy>
what did they do with the old bnagy?
nuex has joined #ruby
<eam>
erm, true, the reason I'm right is that I'm describing how things actually work ...
<Mon_Ouie>
But he's right — doubles are coded on 64-bit
* tommylommykins
wonders why it's traditional to have to do a calculation to generate infinity. Does C not have a set of NaN and Infinity constants?
simao has quit [Ping timeout: 265 seconds]
<banisterfiend>
shevy: they abducted him and left him in the middle of nowhere, himalayas iirc
<eam>
Mon_Ouie: and it's not a precision issue, it's a problem of decimals in various number bases
<banisterfiend>
bnagy: hey i was reading the other day, do u know what caused the himalayan mountains?
<bnagy>
geology?
<dominikh>
God.
<banisterfiend>
bnagy: haha
<eam>
certain non-repeating decimals in base 10 are repeating in base 2, and vice versa. When the base changes, the expressability of a value changes
<bnagy>
or did you want specifics?
linusoleander has joined #ruby
<banisterfiend>
bnagy: india didnt used to be part of asia, the himalayans are what happened when idea crashed into asia
<bnagy>
there's a huge ass subduction fault, roughly, right under my ass right at this second
<banisterfiend>
bnagy: it's the wreckage from the crash :)
wmoxam has joined #ruby
g0bl1n has quit [Quit: Ex-Chat]
<bnagy>
which is more or less like a coiled spring
<bnagy>
eam: it's not just with repeating values
strnx has quit [Remote host closed the connection]
<eam>
bnagy: absolutely
<nuex>
is it possible for irb to evaluate script passed in via stdin and drop to an interactive prompt? i'm testing some stuff and I'm having to assign variables each time i set up the session to test it.
fserb has joined #ruby
<jedmtnman>
nuex, you can also just save to a file and load it.
<banisterfiend>
nuex: what not just use irb -r
<bnagy>
or put if __FILE__==$0;binding.pry;end at the end of your script
<nuex>
jedmtnman, banisterfiend: i tried that, but assigned variables in the script are lost
mucker has quit [Quit: leaving]
<banisterfiend>
nuex: u mean LOCAL variables?
<Mon_Ouie>
binding.eval File.read(…)
<nuex>
banisterfiend: yeah
<banisterfiend>
nuex: yeah good luck with locals
fserb has quit [Client Quit]
FLeiXiuS has joined #ruby
<FLeiXiuS>
Is there a way to check for both '' and nil? without havign to have 2 conditions
<banisterfiend>
nuex: do what either bnagy or Mon_Ouie said
<bnagy>
no?
<banisterfiend>
FLeiXiuS: x.to_s.empty?
<bnagy>
uh nil.to_s? ?
<banisterfiend>
nil.to_s #=> "" :D
<Mon_Ouie>
Sometimes I wonder if Rubyists have metrical requirements like poets, and are restricted in the amount of lines and methods they can use in a program
<FLeiXiuS>
bah!
<FLeiXiuS>
So dumb.
<FLeiXiuS>
Thanks.
<banisterfiend>
Mon_Ouie: hehe
mohits has joined #ruby
<bnagy>
nvm I hallucinated a ?
<bnagy>
but that still isn't an answer imho
<banisterfiend>
Mon_Ouie: it's the people transitioning from other languages (like java), they hear how ruby is supposed to be so concise
iocor has joined #ruby
<bnagy>
and it's dangerous code
<banisterfiend>
Mon_Ouie: and are unwilling to compromise a single character
mucker has joined #ruby
mrsolo has joined #ruby
<shevy>
Mon_Ouie poetry demands a certain symmetrical style forward. evil words like eval "@@eval" make for very bad asymmetrical poetry
<banisterfiend>
Mon_Ouie: my guess, anyway :)
<shevy>
or for x in y
Helius has joined #ruby
mucker has quit [Client Quit]
Elfix has quit [Ping timeout: 250 seconds]
mucker has joined #ruby
daniel_hinojosa has joined #ruby
user__ has joined #ruby
bwlang has joined #ruby
<banisterfiend>
Mon_Ouie: are you interested in seeing the new science fiction movie prometheus
palmfrond has quit [Read error: Connection reset by peer]
<bwlang>
is there a better way to do this? comp[:wells].select{|w| well_ids.include?(w[:id])}
<Mon_Ouie>
I didn't even hear about it
<banisterfiend>
Mon_Ouie: there's a few coming out actually, loopers (time travel movie) looks cool too
<banisterfiend>
Mon_Ouie: directed by the same guy behind aliens
<shevy>
ridley scott?
<banisterfiend>
shevy: Yeah.
<shevy>
blade runner was epic
<bnagy>
banisterfiend: I had xmas dinner with 2 of the dfx crew from that movie
AtoxHybrid has joined #ruby
mucker has quit [Client Quit]
vonsar has joined #ruby
akem has quit [Ping timeout: 256 seconds]
<shevy>
in nepal???
<bnagy>
no was in .au
AxonetBE has joined #ruby
mucker has joined #ruby
<banisterfiend>
bnagy: cool, from prometheus? how did u get in a situation to do that?
<bnagy>
bwlang: why, what's wrong with that? Seems pretty readable to me?
Elfix has joined #ruby
ericcoleman has joined #ruby
moshee has quit [Ping timeout: 250 seconds]
<shevy>
bwlang you could omit the () after .include?
<bnagy>
banisterfiend: dunno. Random chance. Friends of friends.
<bwlang>
bnagy: i don't object to it... but i'm not sure if i'm missing some better option.
brasten has quit [Quit: brasten]
moshee has joined #ruby
<bwlang>
bnagy: it will be slow with a long well_ids list.
<bnagy>
one of the guys was polish, and hungarians love to drink poles under the table ;)
zomb1e has quit [Read error: Connection timed out]
moshee has quit [Changing host]
moshee has joined #ruby
nirakara has quit [Ping timeout: 252 seconds]
<bnagy>
bwlang: make well_ids a hash
<banisterfiend>
bnagy: you're hungarian?
<bnagy>
on my father's side yeah
qwerxy has quit [Quit: offski]
brasten has joined #ruby
zomb1e has joined #ruby
<banisterfiend>
bnagy: is your name atilla
sixty4k has joined #ruby
zomb1e_ has joined #ruby
dr0p_pl has quit [Quit: Konversation terminated!]
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
<bnagy>
yes, because that totally starts with 'b'
<banisterfiend>
i wasnt sure if your nickname corresponded to your RL name
eywu1 has joined #ruby
<banisterfiend>
mine does, but that's necessarily the norm
<bnagy>
yeah. I lack imagination.
<banisterfiend>
not necessarily*
eywu has quit [Ping timeout: 244 seconds]
gearaholic has joined #ruby
snip_it has joined #ruby
unlink has joined #ruby
snip_it has left #ruby [#ruby]
user__ has quit [Read error: Connection reset by peer]
Sheehan has joined #ruby
<unlink>
Is there a simple way to compare on attributes between arbitrary objects? I'm doing lst.any? {|one| one.attr == other.attr}
<shevy>
bnagy I lack underwear
nricciar has quit [Read error: Connection reset by peer]
<xclite>
they could be unequal in other attributes, which could make the objects different setwise
<Mon_Ouie>
xclite: I don't get your point
<Mon_Ouie>
any? { |obj| set.include? obj.attr }
akem has quit [Read error: Connection reset by peer]
<xclite>
what a parallel set?
EzeQL has quit [Ping timeout: 248 seconds]
<Hanmac>
(a1 + a2).uniq(&:attr).empty?
banisterfiend has quit []
<Mon_Ouie>
Oh, nevermind, I'm confusing this with another question asked previously
gearaholic has quit [Remote host closed the connection]
<yxhuvud>
Mon_Ouie: well, so is hash lookups.. Dunno which of group_by or set that is constructed the fastest. probably Set I guess since you don't have to keep anything but the attribute around.
tomask has quit [Quit: Quit]
twinturbo has joined #ruby
<Mon_Ouie>
yxhuvud: Well, in YARV, Set#include? is just a fancy wrapper around a hash
Mohan has joined #ruby
<Mon_Ouie>
def include?(o); @hash.key? o; end
replore has quit [Remote host closed the connection]
pooya72 has joined #ruby
joast has quit [Quit: Leaving.]
bwlang_ has joined #ruby
<xclite>
Hanmac: Doesn't work - if it's empty, that just they key didn't exist. If it's not empty, they may or may not have shared that object.
<xclite>
if it's empty nothing had that attribute at all*
sonicpond is now known as ReadyForTheNickM
<xclite>
if it isn't empty, at least one of them had it. doesn't mean they shared it
eywu1 has joined #ruby
nascro has joined #ruby
bwlang has quit [Ping timeout: 250 seconds]
bwlang_ is now known as bwlang
jedmtnman has joined #ruby
eywu has quit [Ping timeout: 244 seconds]
PragCypher has quit [Read error: Connection reset by peer]
ReadyForTheNickM is now known as sonicpond
PragCypher has joined #ruby
akem has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
zomgbie has joined #ruby
sbanwart has joined #ruby
jedmtnman has quit [Client Quit]
pdtpatrick has joined #ruby
lessless has quit [Ping timeout: 245 seconds]
lessless has joined #ruby
indian has quit [Read error: Operation timed out]
keithcelt has joined #ruby
medik has quit [Remote host closed the connection]
<affix>
A script I wrote to analyse malware in ruby
nfbvieira has joined #ruby
baniseterfiend` is now known as banisterfiend
fayimora has quit [Quit: Busy…..zzzzz]
<nfbvieira>
hi
dsa is now known as EzeQL
deryl has joined #ruby
akem has quit [Read error: Connection reset by peer]
eywu1 has quit [Read error: No route to host]
eywu has joined #ruby
chimkan__ has joined #ruby
bwlang has quit [Ping timeout: 245 seconds]
akem has joined #ruby
bwlang_ is now known as bwlang
minijupe has quit [Quit: minijupe]
ping-pong has quit [Ping timeout: 244 seconds]
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby
<the_jeebster>
is there a string method that will slice characters and return everything but the sliced characters?
<bperry>
affix: I think you mispelled PONG
<bperry>
POMG
joast has joined #ruby
<affix>
bperry: Lol so I did
<affix>
Fixing now
vikhyat has quit [Quit: Leaving.]
jgrevich_ has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
joast has quit [Client Quit]
jgrevich_ is now known as jgrevich
<affix>
bperry: Fixed it :)
chimkan has quit [Ping timeout: 244 seconds]
chimkan__ is now known as chimkan
vikhyat has joined #ruby
chimkan__ has joined #ruby
MrGando has joined #ruby
chimkan____ has joined #ruby
chimkan has quit [Read error: Connection reset by peer]
chimkan has joined #ruby
chimkan__ has quit [Ping timeout: 240 seconds]
wmoxam has quit [Quit: leaving]
simao has joined #ruby
chimkan____ has quit [Ping timeout: 252 seconds]
QaDeS has quit [Quit: Ex-Chat]
<_br_>
is there any sane way to "clean" the .rvm folder? Or do I just fire a good old rm -rf on it and just bunle again?
chimkan has quit [Ping timeout: 265 seconds]
NorrinRadd has left #ruby [#ruby]
oooPaul has joined #ruby
<banisterfiend>
_br_: i'd probably start with rvm help
khakimov has quit [Quit: Computer has gone to sleep.]
<banisterfiend>
though
<banisterfiend>
that normally results in an explosion of crap all over your screen
strnx has joined #ruby
simao has quit [Ping timeout: 265 seconds]
<_br_>
banisterfiend: no, sorry my bad. Its a bit late here and after getting killed by xxxx lines of text I didn't think clearly. Seems the rvm cleanup all free'd 50% so its better. Sorry and thanks !
<bperry>
affix: you might integrate virustotal in with it
bosphorus has quit [Remote host closed the connection]
akem has quit [Ping timeout: 250 seconds]
punkrawkR has joined #ruby
chimkan has joined #ruby
tvw has joined #ruby
yannis has joined #ruby
ZifreCL has joined #ruby
Bosma has joined #ruby
<affix>
bperry: I might just do that :)
<affix>
bperry: Maybe even make a VirusTotal Gem
werdnativ has quit [Ping timeout: 245 seconds]
counterbeing has joined #ruby
SmoothSage has quit [Ping timeout: 245 seconds]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
blacktulip has quit [Remote host closed the connection]
kevinbond has quit [Quit: kevinbond]
dsa has joined #ruby
blacktulip has joined #ruby
parus has quit [Ping timeout: 252 seconds]
parus has joined #ruby
EzeQL has quit [Ping timeout: 245 seconds]
ronniy has quit [Remote host closed the connection]
deryldoucette has joined #ruby
Croms has quit [Ping timeout: 260 seconds]
dankest has joined #ruby
mengu_ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
deryl has quit [Ping timeout: 245 seconds]
deryldoucette is now known as deryl
jenrzzz-mac has joined #ruby
robdodson has joined #ruby
mdhopkins has joined #ruby
mayankkohaley has quit [Remote host closed the connection]
PaciFisT has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
thecreators has quit [Quit: thecreators]
michaelmartinez has joined #ruby
b3gott3n has joined #ruby
thecreators has joined #ruby
nanderoo has quit [Quit: Leaving.]
chimkan has quit [Read error: Connection reset by peer]
<tvw>
In ruby-1.9.3 nil.to_i gives me 0, but "%d" % nil gives me an error instead of "0". In ruby-1.8, both returned 0. Is there a way to get easily the old behaviour in ruby 1.9.3.
chimkan has joined #ruby
foofoobar has joined #ruby
Ripp___ has quit [Read error: Operation timed out]
Croms has joined #ruby
<Hanmac>
tvw, no i think you need "%d" % nil.to_i ... %d reacts to :to_int not to :to_i ... (as i think)
mucker has quit [Ping timeout: 256 seconds]
Ripp__ has joined #ruby
thecreators has quit [Quit: thecreators]
zomb1e has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
lorandi has joined #ruby
LBRapid has quit [Quit: Farewell...]
zomb1e has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
jedmtnman has joined #ruby
bwlang_ has joined #ruby
booginga has joined #ruby
Criztian has joined #ruby
foofoobar has quit [Quit: bb]
Bish has joined #ruby
strnx has quit [Excess Flood]
bwlang has quit [Ping timeout: 245 seconds]
bwlang_ is now known as bwlang
strnx has joined #ruby
jackiechan0 has joined #ruby
jackiechan0 has quit [Read error: Connection reset by peer]
jackiechan0 has joined #ruby
GoldenPie has joined #ruby
rvmeier has joined #ruby
GoldenPie has left #ruby [#ruby]
yannis has quit [Quit: yannis]
zomb1e_ has joined #ruby
<tvw>
Hanmac: I am not sure, whether you are right. At least it behaves a bit weird. Another example "%d" % "5" gives you "5", though String does not have #to_int. But "%d" % "5a" gives an error, while "5a".to_i returns 5. But at least here it is the same behaviour in 1.9.3 and 1.8.7.
zomb1e has quit [Ping timeout: 256 seconds]
zomb1e_ is now known as zomb1e
aaronmase has joined #ruby
aaronmase has quit [Remote host closed the connection]
Sgeo has quit [Read error: Connection reset by peer]
<tvw>
And if I monkeypatch NilClass with #to_int, it does not help me.
Sgeo has joined #ruby
jrajav has joined #ruby
deryl has quit [Read error: Connection reset by peer]
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
PragCypher has quit [Read error: Connection reset by peer]
<Mon_Ouie>
That's just because Kernel#Integer behaves differently
billy_ran_away has joined #ruby
hoelzro|away is now known as hoelzro
hoelzro has quit [Quit: leaving]
erichmenge has joined #ruby
Gavilan has joined #ruby
erichmenge has quit [Client Quit]
<Hanmac>
Mon_Ouie: PS: overwriting Kernel#Integer does have NO effect for sprintf
erichmenge has joined #ruby
pl_ab has quit [Quit: pl_ab]
<banisterfiend>
Hanmac: it calls the raw C function, it's irreleavnt if you override the exposed ruby wrapper
gregorg_taf has quit [Ping timeout: 245 seconds]
dsa has quit [Ping timeout: 272 seconds]
<Hanmac>
banisterfiend and if you read my line before you would see that i readed the sourcecode, so i allready know
<banisterfiend>
Hanmac: then why was it necessary for you to say that overwriting Kernel#Integer has no effect
<Hanmac>
so that others can notic that TOO without reading the cCode
<banisterfiend>
Hanmac: also, i thought you had ignored me, Und? oh btw - next pry version we have upgraded slop dependency to 3.0
NotreDev has joined #ruby
<Hanmac>
yeah i blocked you, but it seems that i only works one day ... (until we get new ips)
akem has joined #ruby
<banisterfiend>
Hanmac: since ou seem to mention the out of date slop dep every other day ;)
deryldoucette has joined #ruby
deryl has quit [Ping timeout: 240 seconds]
deryldoucette is now known as deryl
babonk has joined #ruby
g0bl1n has joined #ruby
g0bl1n has joined #ruby
g0bl1n has quit [Changing host]
cesario has joined #ruby
<NotreDev>
i'm using code that begins with: require "delayed/command". i want to inspect this lib. how can i tell where it's located (the python equivalent of lib.__file__)
<babonk>
Hi all. How does one go about dealing with this type of error: ruby(29356,0x7fff72aee960) malloc: *** error for object 0x7fdc5bce0008: pointer being freed was not allocated
<babonk>
*** set a breakpoint in malloc_error_break to debug
<babonk>
Abort trap: 6
deryl has quit [Client Quit]
lorandi has quit [Quit: Leaving]
bluenemo_ has quit [Read error: Connection reset by peer]
Guest11890 has joined #ruby
<Hanmac>
NotreDev: ruby has __FILE__
<NotreDev>
babonk: not too strong on ruby, but that's sounds like you've got a serious kernel issue
<Mon_Ouie>
babonk: Unless you're using a C extension, it's definitely a bug in Ruby
<babonk>
Right.. But I wanted to look into it to see whether its an extension or ruby causing the issue
<babonk>
and also whether maybe the bug has been patched or is avoidable
zomb1e has joined #ruby
<NotreDev>
babonk: unless your ram is volatile; then you'd also begin experiencing kernel panics :)
<Mon_Ouie>
Try to create a minimal example that reproduces the issue first
<babonk>
k
<Mon_Ouie>
You can also do what the error message suggests using gdb, and check the backtrace — though that may not give you a definite answer
<Hanmac>
babonk whats your OS?
<babonk>
im narrowing down the exact line of code so I should be able to produce that
<babonk>
I'm on Mac OS X.
<Hanmac>
does ruby only show this three lines or more?
CannedCorn has joined #ruby
bwlang_ has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<babonk>
Hanmac: That's all.
<billy_ran_away>
Can anyone tell me where I can find up to date documentation on rdebug?
<billy_ran_away>
The docs I'm looking at mention at watch command, but that's missing from mine...
<billy_ran_away>
And mine has a trace command that's missing from the documentation!
<epochwolf>
billy_ran_away: you want the condition command
<babonk>
Honestly I want to come back to you guys with a more specific debug
<babonk>
will see what i can find
sonicpond has quit [Quit: leaving]
<Hanmac>
babonk have you irb too? and does it make a difference?
rvmeier has quit [Quit: Saliendo]
bwlang has quit [Ping timeout: 265 seconds]
bwlang_ is now known as bwlang
<babonk>
Hanmac: the issue comes up in a unit test, which I run through ruby -llib:test unit/ping_system_test.rb
<billy_ran_away>
epochwolf: Possibly, but I'd have to have an expression evaluate true or false… what I'd really like to do is have it break anytime an expression changes.
schaerli has quit [Remote host closed the connection]
<epochwolf>
billy_ran_away: well, you'll have to go dig up some docs somewhere then. I've never had a need to have the debugger do that.
<epochwolf>
I have no idea if that's possible or not.
fbernier has quit [Ping timeout: 245 seconds]
<Hanmac>
on my system i get multible levels of backtrace information ... (sometimes so much that i cant read it anymore :P)
vlad_starkov has quit [Remote host closed the connection]
<billy_ran_away>
epochwolf: Hence why I was asking… I thought it was pretty rude of you to tell me to rtfm, especially if you can't even point me in it's direction.
bluenemo has quit [Read error: Connection reset by peer]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<epochwolf>
billy_ran_away: and I found something similar in the docs after some quick looking.
fserb has joined #ruby
<NotreDev>
hrm. so I called File.expand_path(File.dirname("delayed/command")) and I got the path of the root of my project (/home/ubuntu/myproj/releases/master/delayed"). there isn't a file there named delayed though. when calling require it returns true though. any thoughts on where to go from here?
rippa has quit [Ping timeout: 256 seconds]
dsa has joined #ruby
<NotreDev>
i just realized i totally misused that File command. i'm a dumbass. i'm not finding the module properly
<epochwolf>
billy_ran_away: you also didn't mention you had read any documentation until after I suggested it.
Xyphy has joined #ruby
mrck has joined #ruby
MasterIdler has joined #ruby
brasten has quit [Quit: brasten]
jedmtnman has quit [Quit: Leaving.]
<billy_ran_away>
epochwolf: No after I told you that help trace didn't tell me what trace did you told me to go read it again… but if I jumped the gun in telling you off, sorry, it's just frustrating not to be able to figure out this potentially really powerful tool
scb has joined #ruby
scb has quit [Remote host closed the connection]
hadees has joined #ruby
brasten has joined #ruby
tcopp has left #ruby [#ruby]
Guest11890 is now known as davidw
MrGando has quit [Remote host closed the connection]
davidw has quit [Changing host]
davidw has joined #ruby
Axsuul has joined #ruby
EzeQL has quit [Ping timeout: 252 seconds]
<NotreDev>
using ack i've found where the file is located. what was the proper way to do that through ruby? if i just know: require "delayed/command" how was I supposed to find it with .__FILE__
<Hanmac>
use an newer ruby and require_relative
babonk_ has joined #ruby
babonk_ has quit [Changing host]
babonk_ has joined #ruby
ShutrBuzz has joined #ruby
Vendethiel has quit [Quit: je ne suis plus là, tqvu]
hool has joined #ruby
babonk has quit [Ping timeout: 252 seconds]
babonk_ is now known as babonk
<billy_ran_away>
Why does var global return this: TypeError Exception: can't convert Symbol into String
bwlang_ has joined #ruby
<hool>
hi there. i'm new to ruby/rails. i'm trying to specify a line in a Gemfile. when i do a gem list from another server, i see a line rack (1.4.1, 1.1.3)
<hool>
how do i specify that version in a gemfile ? i'm getting an error when i try gem "rack","1.4.1,1.1.3"
<billy_ran_away>
Is ruby-debug really incapable of displaying symbols?
c0rn has quit [Quit: Computer has gone to sleep.]
vikhyat has quit [Quit: Leaving.]
<Hanmac>
hool ask there: #rubyonrails
<hool>
ok
simao has joined #ruby
iocor has joined #ruby
<davidcelis>
not really a rails specific question; here is fine
awarner_ has quit [Read error: Connection reset by peer]
hynkle has quit [Quit: hynkle]
bwlang_ has joined #ruby
geekbri has quit [Remote host closed the connection]
<the_jeebster>
can a ruby symbol be either a key or value in a hash?
<Mon_Ouie>
Any object can be a value in a hash
<Mon_Ouie>
Any object that implements #eql? and #hash correctly can be a key
<the_jeebster>
Mon_Ouie: schweet, thanks
AtoxHybrid has quit [Remote host closed the connection]
bwlang has quit [Ping timeout: 252 seconds]
bwlang_ is now known as bwlang
awarner_ has joined #ruby
xaxisx has quit [Quit: xaxisx]
artOfWar_ has quit [Remote host closed the connection]
<billy_ran_away>
Is there a way to find out where a variable is changing?
<billy_ran_away>
I want rdebug to stop when a certain condition is true
davidpk has joined #ruby
tommyvyo has joined #ruby
awarner has quit [Ping timeout: 248 seconds]
dev_ has joined #ruby
yxhuvud has quit [Ping timeout: 245 seconds]
gregorg_taf has joined #ruby
baroquebobcat_ has joined #ruby
carloslopes has quit [Quit: Leaving]
railrubix has joined #ruby
<railrubix>
hi
baroquebobcat has quit [Read error: Connection reset by peer]
baroquebobcat_ is now known as baroquebobcat
EzeQL has joined #ruby
ryan0x2 has quit [Remote host closed the connection]
<railrubix>
I get an error when trying to run "rails server"
<railrubix>
script/rails:6:in `require': no such file to load -- rails/commands (LoadError) from script/rails:6:in `<main>'
michaelmartinez has left #ruby [#ruby]
<railrubix>
any ideas how to fix that?
rmascarenhas has quit [Quit: leaving]
stewart_ has joined #ruby
ZachBeta has joined #ruby
<chienpo>
You might have a rails app but not have the rails gem installed correctly. What do you see when you run `gem list`
<Hanmac>
railrubix, whats your ruby and whats your rails version?
dsa has quit [Ping timeout: 245 seconds]
internet_user has quit [Remote host closed the connection]
<railrubix>
chienp: I see a list of gems with versions
mjb2k has joined #ruby
<xclite>
:railrubix I think the point there was do you see rails with a version?
<railrubix>
Hanmac: ruby 1.9.2p290 and rails (3.2.5, 3.2.2)
<railrubix>
xclite: ah, I didn't get it ;)
<chienpo>
Does your list include the same version of rails as what your rails app uses? (listed in your "Gemfile" if its is rails 3 and above)
siksia has quit [Read error: Connection reset by peer]
siksia has joined #ruby
<railrubix>
my gemfile has: gem 'rails', '3.2.2'
nfk has quit [Quit: yawn]
<Hanmac>
is the script/rails file shiped with rails or is it your file?
<chienpo>
railrubix: what happens if you run `bundle exec rails server` ?
banisterfiend has quit [Read error: Connection reset by peer]
<railrubix>
Hanmac: it looks exactly as generic
mneorr_ has joined #ruby
mxweas_ has joined #ruby
<Hanmac>
so it its yours right?
<davidcelis>
railrubix: `bundle exec rails s`
dnyy has joined #ruby
<davidcelis>
railrubix: you don't need to prefix "rails" with "script", by the way
Morkel has quit [Quit: Morkel]
jrallison has quit [Quit: Computer has gone to sleep.]
<railrubix>
C:/Ruby192/bin/rails:19:in `load': no such file to load -- C:/Ruby192/lib/ruby/gems/1.9.1/specifications/bin/rails (LoadError) from C:/Ruby192/bin/rails:19:in `<main>'
jrallison has joined #ruby
<Hanmac>
if the "script/rails" file is selfwritten then i think its not ready for ruby1.9.2+ yet
<railrubix>
I get that ^^^
mneorr has quit [Ping timeout: 250 seconds]
banisterfiend has joined #ruby
<railrubix>
Hanmac: it looks exactly as the one if I do rails new Project
timonv has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 252 seconds]
alexim has joined #ruby
libertyprime has quit [Quit: Lost terminal]
bwlang_ has joined #ruby
Boohbah has joined #ruby
libertyprime has joined #ruby
counterbeing has quit [Quit: Computer has gone to sleep.]
lockweel has joined #ruby
Y0Gi has joined #ruby
<railrubix>
so what could be the problem?
<Y0Gi>
hi. I've seen this in a few, official-looking places: ruby -rubygems -e 'require "foolib"'
sbanwart has quit [Ping timeout: 265 seconds]
<chienpo>
It looks like your LOAD_PATH doesn't have your gems in it
libertyprime has quit [Client Quit]
bwlang has quit [Ping timeout: 245 seconds]
bwlang_ is now known as bwlang
<Y0Gi>
however, I get "ruby: no such file to load -- ubygems (LoadError)"
robacarp_ has joined #ruby
<burgestrand>
Y0Gi: it used to be necessary, in ruby 1.8, it is no longer required when using ruby 1.9
<Y0Gi>
according to the manpage, the "-r" switch specifies a lib
libertyprime has joined #ruby
<Y0Gi>
so shouldnt it be "-rrubygems" instead?
robacarp_ is now known as Guest20337
libertyprime has quit [Client Quit]
<chienpo>
There is a specially-named "ubygems" lib so you can do -rubygems
<Y0Gi>
burgestrand: yeah, I remember that rubygems got included since ruby1.9
<burgestrand>
Y0Gi: that ought to work too, but I believe ubygems should also work, as it was added for aesthethic reasons :)
<railrubix>
chienpo: you mean I don't have LOAD_PATH?
libertyprime has joined #ruby
<Y0Gi>
chienpo, burgestrand: omg, ok then :)
<Y0Gi>
what an ugly hack ;)
tommyvyo has joined #ruby
<burgestrand>
:d
<Y0Gi>
but saves me from submitting patches on github ;)
GuidovanPossum has left #ruby [#ruby]
<Y0Gi>
I guess it only works on ruby 1.9 anyway?
apeiros_ has joined #ruby
Aaton is now known as Aaton_off
<chienpo>
What do you see when you run: ruby -e 'puts $LOAD_PATH'
<Y0Gi>
whatever, my current issue is this: I use SASS on debian wheezy, installed it using the package system, and it depends on ruby1.8
babonk has quit [Quit: babonk]
robacarp has quit [Ping timeout: 260 seconds]
<Y0Gi>
since, like, today, /usr/bin/scss tells me "LoadError: no such file to load -- listen"
<Boohbah>
Y0Gi: yes, debian provides out-of-date ruby and gems
wangr has quit [Ping timeout: 260 seconds]
libertyprime has quit [Client Quit]
<Y0Gi>
chienpo: it spills out some ruby 1.8 paths
<Boohbah>
Y0Gi: recommend building from source with rvm or ruby-build/rbenv
libertyprime has joined #ruby
billy_ran_away has quit []
<railrubix>
chienpo: I see a list of 8 items (not sure what I'm looking for)
<Y0Gi>
strange.
<Y0Gi>
chienpo: sorry, though you were referring to me
<Boohbah>
Y0Gi: install gems with the gem command and not apt
<Y0Gi>
Boohbah: I installed the rubygems package and now I have /usr/bin/gem1.8
<Y0Gi>
where should 'gem' originate from?
<burgestrand>
Y0Gi: I believe it should work on 1.8 too with ubygems, but considering ruby is installed with apt it’s not surprising that it does not work
<Y0Gi>
(besides, installin from source)
<xclite>
ruby + gems with apt is such a mess
<mjb2k>
same thing on ubuntu
niklasb has quit [Quit: WeeChat 0.3.7]
<Y0Gi>
well, I was surprised to see sass working out-of-the-box myself
<xclite>
just dumped Debian for that reason :\
<Boohbah>
Y0Gi: yes, that path leads to madness
<shevy>
yay
<Y0Gi>
and now I'm surprised it's broken again ;)
<shevy>
DIE, debian, DIE
<mjb2k>
But Ubuntu at least has ruby1.9 package, does Debian not?
<xclite>
it does
<xclite>
but the way they split things off and how things are packaged makes getting the right versions of everything to play along right is awful
<shevy>
Y0Gi the name is non standard. gem binary or rather the name, is usually just gem. I am sure on your system you have a gem symlink that points to gem1.8
libertyprime has quit [Client Quit]
<mjb2k>
on Ubuntu I isntalled ruby1.9.1 and only used gem1.9 command to install gems, works fine that way
<shevy>
Y0Gi in 1.8.7 versions and below, rubygems is an addon
<Y0Gi>
I'll try 1.9.1 again
<Y0Gi>
shevy: yeah, installed that already
<shevy>
in ruby 1.9.x, rubygems is integrated. debian splits it out though, those bastards
<mjb2k>
oh for shame Debian!!
<burgestrand>
Doesn’t debian actually distribute a modified version of rubygems, too?
libertyprime has joined #ruby
<shevy>
you can try the source install for rubygems
<apeiros_>
yes, one where you can't update rubygems from rubygems itself
mneorr_ has quit [Remote host closed the connection]
<shevy>
whoa... they even modified rubygems in ways to ensure that it breaks functionality?
<Y0Gi>
yeah, seems rather messy
<shevy>
someone shoot down those bastards please
<Y0Gi>
why don't you guys step up and fix package maintenance? :)
<Y0Gi>
hm, what's the native(?) "mkmf" extension?
mneorr has joined #ruby
artm has quit [Quit: artm]
<shevy>
Y0Gi but for ruby, the easy way to install addons is via "gem", gem install foo. that works very well in most cases
<Boohbah>
Y0Gi: why don't you use rvm or ruby-build/rbenv ?
catcher has joined #ruby
catcher has left #ruby ["Ex-Chat"]
<shevy>
Y0Gi to fix package maintenance for all programs, one would need to use a package/system manager of some sorts
artm has joined #ruby
<Y0Gi>
shevy, Boohbah: I installed ruby1.9.1 for now, but "gem install listen" failed
awarner_ has quit [Remote host closed the connection]
akem has quit [Ping timeout: 240 seconds]
digitalcakestudi has joined #ruby
<chienpo>
Debian's ruby package maintainer doesn't like where rubygems likes to put files by default since it doesn't follow the "Filesystem Hierarchy Standard" (http://www.pathname.com/fhs/)
<shevy>
[["--universal", "Build a universal binary."]]
<burgestrand>
Y0Gi: what do you mean with “hm, what's the native(?) "mkmf" extension?”
<Y0Gi>
burgestrand: I was referring to the error message just I pasted
<shevy>
that sounds as if debian ripped out mkmf.rb
<Boohbah>
Y0Gi: why don't you use rvm or ruby-build/rbenv ?
<Y0Gi>
Boohbah: I'd prefer to go with my package systems if possible to stay updated and don't have two (or more) disconnected ruby installs all over the place
fserb has quit [Quit: ttyl]
<burgestrand>
Y0Gi: ah, mkmf is part of ruby’s standard library… usually
<burgestrand>
Y0Gi: rvm/rbenv is the accepted way of installing and maintaining ruby installations that works and are not horribly out of date
<mjb2k>
"Ruby Version Manager" ?
fserb has joined #ruby
<burgestrand>
Y0Gi: even though it sounds like it’s mostly suited for multiple ruby installations only, that is not so, it’s awfully useful even if you only ever use a single installation of ruby
<burgestrand>
essentially they are both tools to manage your ruby installation, an alternative to using the package managers
<Boohbah>
Y0Gi: rvm is aware of the version of ruby installed by apt, and it makes things so much easier
<vonsar>
its also good practice for when you do need multiple ruby versions
<Y0Gi>
I guess rvm's not available as a .deb? ;)
<burgestrand>
unfortunately they also make the entry to ruby even more confusing for a newcomer, as if the broken packages weren’t enough :p
<Y0Gi>
yeah
xclite has quit [Quit: Leaving]
<vonsar>
the instructions on their website are pretty thorough
<mjb2k>
I actually didn't like RVM at all as a ruby newbie
<Y0Gi>
I have to admit that virtualenv and pip do a great job in the Python world, but gem handling always got me headaches
foofoobar has quit [Quit: bb]
<Boohbah>
Y0Gi: that's because debian/ubuntu break it
<Y0Gi>
might be
jrist is now known as jrist-afk
<Y0Gi>
here we go: with ruby1.9.1-dev instaling gems with compiling native ones work, and so does SASS/SCSS when changing the interpreter to 1.0
<Y0Gi>
*1.9
<Y0Gi>
and I have a strong feeling that I've already been down this road :/
<Y0Gi>
thanks for the pointer to rvm, I guess that will come in handy soon nevertheless
iamjarvo has quit [Quit: Leaving.]
minijupe has quit [Quit: minijupe]
etank has quit [Ping timeout: 246 seconds]
<chienpo>
Y0Gi: I also recommend that you bite the bullet and use rvm or rbenv (I prefer rbenv now)
oooPaul has joined #ruby
ajonsson has quit [Quit: ajonsson]
thecreators has joined #ruby
<Y0Gi>
chienpo: the latter sounds like an equivalent to virtualenv (a virtual app environment with a certain interpreter version and "locally" installed packages)
davidw has quit [Ping timeout: 245 seconds]
<chienpo>
Y0Gi: Yeah, since they do similar things I suspect they've got quite a bit in common.
<shevy>
mjb2k, I still dont like RVM either. I think it adds an extra layer over the problem that linux is unable to deal with multiple programs installed in the same prefix. in gobolinux, every program gets its own directory, so running multiple ruby versions is as simple as with RVM (the two dont have the same goals though, RVM has much more attention for ruby, gobolinux on all programs instead)
stephenjudkins has joined #ruby
the_jeebster has quit [Quit: Leaving.]
joshman_ has joined #ruby
<shevy>
btw Y0Gi in 1.8.7 mkmf.rb should be at /usr/lib/ruby/1.8/mkmf.rb
<shevy>
ah
<shevy>
you are on 1.9.x I forgot... hmm
<shevy>
perhaps /usr/lib/ruby/1.9.1/mkmf.rb ?
c0rn has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
Guest20337 is now known as robacarp
dcolebatch2 has joined #ruby
mvangala has quit [Remote host closed the connection]
etank has joined #ruby
true_techie has joined #ruby
zommi has quit [Remote host closed the connection]
<true_techie>
can someone tell me what this does? :method => :delete
<banisterfiend>
true_techie: you're not giving any context, so no one can tell u
<mjb2k>
fail to compile
mdw has quit [Ping timeout: 245 seconds]
<true_techie>
banisterfiend, what is the name of this operater? =>
<mjb2k>
oh wait, i read it wrong sorry, lol
<true_techie>
or symbol..
<Boohbah>
hashrocket
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<banisterfiend>
true_techie: it associate a hash key with a value
<Boohbah>
1.8 hash syntax
shtirlic_ has quit [Read error: Connection reset by peer]
Aaton_off is now known as Aaton
<mjb2k>
:method => :delete is the same as hash{ :method => :delete }, right?
<Boohbah>
shevy: i believe gentoo supports installing multiple versions of the same program, but i'm not sure how they handle ruby
shtirlic has joined #ruby
<shevy>
Boohbah yeah I think via elinks or something
<shevy>
but I think it works via symlinks too, so it's the same way as RVM solves this problem and gobolinux too :(
<shevy>
and debian uses symlinks in /etc/alternatives
jrallison has quit [Quit: Computer has gone to sleep.]
<shevy>
rking should know, he uses gentoo. but he is not here right now
<mjb2k>
on Ubuntu I have ruby 1.8 and 1.9 running side by side without any real issue, no RVM needed
PaciFisT has quit [Quit: Leaving.]
bluenemo has quit [Remote host closed the connection]
jrallison has joined #ruby
<shevy>
mjb2k and how is this done?
<mjb2k>
multiple versions just take a little more work
noganex has quit [Ping timeout: 240 seconds]
mutewinter has joined #ruby
balki_ has joined #ruby
alanp_ has joined #ruby
<mjb2k>
the ruby and ruby 1.9.1 packages installed to different prefixes and I setup my links in /usr/bin the way i wanted, such as mv ruby ruby1.8, link ruby1.9 > ruby
alanp has quit [Read error: Operation timed out]
<mjb2k>
at least I think that's all it took, oh and I had to change up the links for gem/gem1.9 too
siksia has quit [Ping timeout: 256 seconds]
noganex has joined #ruby
balki has quit [Read error: Operation timed out]
mdw has joined #ruby
siksia has joined #ruby
AxonetBE has quit [Quit: Leaving.]
railrubix has quit []
<shevy>
yeah, with different prefixes it is easy. RVM does that too as far as I know, the prefix they use is in the $HOME dir of the user, unless I am mistaken
polysics has joined #ruby
apeiros_ has quit [Remote host closed the connection]
dangerousdave has quit [Ping timeout: 252 seconds]
Gavilan has quit []
hadees has quit [Ping timeout: 265 seconds]
<shevy>
which is also how gobolinux got started back then, http://www.gobolinux.org/?page=doc/articles/clueless the part: "I work in an university environment, and I have for many years. There, I am not the superuser, so I have to install every extra app I need in my $HOME directory." sadly, hisham does not have the time anymore :(
lessless has quit [Remote host closed the connection]
jackiechan0 has quit [Quit: Sto andando via]
<mjb2k>
yep, fired up the old VM to make sure, on Ubuntu gem ruby package installed to "/usr/lib/ruby/1.8", the ruby1.9.1 package installed to "/usr/lib/ruby/1.9.1"
<polysics>
hi! anyone knows why Bundler says it is installing a gem that has a :git source, but the app would then not find it_
ZachBeta has quit [Quit: Computer has gone to sleep.]
one8zero has joined #ruby
bitsar has joined #ruby
<shevy>
no idea about bundler. there are folks on #bundler who might know more about it
vonsar has quit [Ping timeout: 245 seconds]
one8zero has left #ruby [#ruby]
axl_ has quit [Quit: axl_]
<polysics>
yes, but there are less of them :)
werdnativ has joined #ruby
<shevy>
yeah
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
<shevy>
perhaps someone here can help ya
<shevy>
I am biased. bundler should disband :)
<polysics>
I will ask :)
jrallison has quit [Quit: Computer has gone to sleep.]
<polysics>
mind if I ask why?
kevinbond has joined #ruby
PragCypher has quit [Quit: Leaving]
<shevy>
I dont think it solves any problem that should be solved in the way bundler attempts to solve it. gem is nice and works. I also had bundler give me problems where it did not work
gmvsea has joined #ruby
jchauncey has quit [Quit: jchauncey]
hool has left #ruby [#ruby]
chson has quit [Remote host closed the connection]
<polysics>
I had not ye had problems with Bundler, they are cropping up now
mxweas_ has quit [Quit: Computer has gone to sleep.]
<Boohbah>
shevy: how does gem implement the functionality of a Gemfile?
<Y0Gi>
shevy: I already solved the mkmf issue by installing the missing header files so it could be compiled
<shevy>
Y0Gi nice
artOfWar has joined #ruby
<banisterfiend>
Y0Gi: be caerful of shevy, he's a violent drunk
<mjb2k>
newbie question: does bundler do anything other than install gems listed in the Gemfile?
<shevy>
Boohbah dunno. a .gemspec file just contains a description of the package
<shevy>
and has an option to list its imminent dependencies
<polysics>
Bundler does a few neat things. Like all automated tools, it can be cryptic
locriani has quit [Read error: Connection reset by peer]
<shevy>
let me show you what banisterfiend wrote ;)
<shevy>
<banisterfiend> somehow bundler is getting in the way but i didnt ask bundler to do a damn thing
<shevy>
I am going to write that down in my collection of epic quotes
daniel_hinojosa has quit [Quit: Leaving.]
dv310p3r has quit [Read error: Operation timed out]
flip_digits has joined #ruby
<shevy>
gotta sleep, almost 30 minutes past midnight :( cya
<burgestrand>
mjb2k: it allows you to lock your application down to specific versions of gems, and also allows you to specify a local location to install your gems in instead of on your entire system (globally)
iamjarvo has joined #ruby
lockweel has quit [Ping timeout: 252 seconds]
<eph3meral>
mjb2k, it manages your gem versions for you
<eph3meral>
mjb2k, so you can use diff versions of the same gem in diff projects
<burgestrand>
if you require bundler in your application, it will make sure the correct versions are required — it also does a lot of dependency resolution, keeping track of which gems you may install given your current combination of gems and their dependencies
<eph3meral>
mjb2k, bundler will automagically select the proper version when you run your app, based on what's in your Gemfile.lock
eywu has joined #ruby
<eph3meral>
mjb2k, that is, as burgestrand said, if you require bundler in your application
<burgestrand>
mjb2k: so, if two gems (A and B) depend on gem C, but gem B is not compatible with the latest release of gem C (but A is), it will use a version of gem C that they are both compatible with
<mjb2k>
ah ok, so if one app installs awesome-gem, all your other apps dont get awesome-gem?
billiamii has quit []
<burgestrand>
mjb2k: it gives you that option, yes, most people just install gems globally with bundler anyway :)
<burgestrand>
mjb2k: also, don’t require bundler in any of your gems, it will wreak havoc of users using your gem if they also use bundler
<Boohbah>
i install gems per-application with rvm gemsets :)
<mjb2k>
burgestrand: great explaination, thanks
<burgestrand>
use bundler in applications, not libraries
brasten has quit [Quit: brasten]
ph^ has quit [Remote host closed the connection]
Vert has joined #ruby
fantazo_ has joined #ruby
amacgregor_osx has joined #ruby
brasten has joined #ruby
Vainoharhainen has joined #ruby
artOfWar has quit [Ping timeout: 252 seconds]
jgarvey has quit [Quit: Leaving]
mdw has quit [Read error: Connection timed out]
axl_ has joined #ruby
<eph3meral>
Boohbah, gemsets are actually defunct now, unless *maybe* you need to support legacy apps that are stuck on old versions of bundler for some reason
<eph3meral>
Boohbah, the need for gemsets was because of a bug that has been fixed as of bundler 1.x
fantazo has quit [Ping timeout: 244 seconds]
<eph3meral>
Boohbah, rvm itself though is still quite nice
zemanel has quit [Quit: Remote hottie closed the connection]
<eph3meral>
although, also, to be fair, what you should *probably* be doing is building your own system packages for your distro, be it .rpm or .deb and installing those
<Boohbah>
eph3meral: interesting, any links where i can read about this?
<eph3meral>
Boohbah, on the bundler site I'm sure, in the release notes somewhere
<eph3meral>
Boohbah, not sure exatly what you should google for, sorry
<eph3meral>
Boohbah, "bundler vs gemsets" maybe?
<eph3meral>
i dunno
<Boohbah>
regarding distribution pacakges for gems, rvm is so much easier
<eph3meral>
rvm != gems
<eph3meral>
rubygems = gems
corburn has joined #ruby
mdw has joined #ruby
<Boohbah>
s/rvm/gem/ sorry
mikepack has quit [Remote host closed the connection]
<eph3meral>
sooo, regarding distribution pacakges for gems, gem is so much easier
<eph3meral>
easier than?
mikepack has joined #ruby
<Boohbah>
easier to let gem handle gems than my distro package manager
simao has joined #ruby
<eph3meral>
easier to let bundler handle gems than either of those :P
<eph3meral>
which is fine, you can still make a package for ruby and a package for rubygems
<eph3meral>
or just a package for ruby, really, install rubygems manually
<eph3meral>
the .deb for rubygems is screwed up, cuz it's locked down, so you can't do --update
<Boohbah>
right, bundler, i am still pretty new to it
fserb has quit [Quit: ttyl]
Haydos has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
artOfWar has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
simao has quit [Ping timeout: 265 seconds]
artOfWar_ has joined #ruby
fantazo_ has quit [Remote host closed the connection]
ryan0x2 has joined #ruby
Foxandxss has joined #ruby
Criztian has quit [Remote host closed the connection]
kirun_ has quit [Quit: Client exiting]
beilabs has joined #ruby
Sheehan has quit [Quit: Sheehan]
artOfWar has quit [Ping timeout: 244 seconds]
n1x has quit [Read error: Operation timed out]
dcolebatch2 has quit [Quit: seacrest out]
mjb2k has quit [Quit: Leaving]
ZachBeta has joined #ruby
trvr has quit [Quit: WeeChat 0.3.7]
ryan0x2 has quit [Remote host closed the connection]
ping-pong has quit [Remote host closed the connection]
uris has quit [Quit: leaving]
bbttxu has quit [Ping timeout: 244 seconds]
piglittlepuffpuf has joined #ruby
indian has quit [Ping timeout: 250 seconds]
carlyle has quit [Read error: Operation timed out]
ping-pong has joined #ruby
Chryson has joined #ruby
blacktulip has quit [Remote host closed the connection]
fserb has joined #ruby
fserb has quit [Client Quit]
mdw has quit [Read error: Connection reset by peer]
<eph3meral>
Boohbah, yeah, rails uses bundler by default, so it's pretty common to know about, but... not everyone does rails
mdw has joined #ruby
indian has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
pooya72 has quit [Quit: pooya72]
<Boohbah>
eph3meral: i started learning rails last week :)
<eph3meral>
Boohbah, cool, rails is nice
<eph3meral>
Boohbah, I'm less of a rails fan though, these days anyway
<Boohbah>
luckily i studied ruby for a few months before that
<eph3meral>
Boohbah, I prefer simpler stuff, like sinatra
<eph3meral>
Boohbah, faster, more lightweight
<Boohbah>
yes, sinatra looks nice also
luxurymode has quit [Quit: Computer has gone to sleep.]
<Boohbah>
i am going to learn them all so that i have options
<eph3meral>
Boohbah, no reason you can't include whatever other gems you want, like ActiveRecord if you want it
<eph3meral>
Boohbah, sure
schovi has quit [Remote host closed the connection]
<bricker88>
can child classes access their parent class's private methods?
<eph3meral>
bricker88, afaik, access, yes, override, no
<bricker88>
thank you
pk1001100011 has quit [Quit: Burn your gods and kill the king; Subjugate your suffering; Dead heart, in a dead world]
artm has quit [Quit: artm]
<gmvsea>
private method cannot have a receiver, that is the only restriction i know
mdw has quit [Read error: Connection reset by peer]
zomb1e has joined #ruby
libertyprime has quit [Quit: Lost terminal]
eywu has quit [Quit: Leaving.]
libertyprime has joined #ruby
xaq has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]