<pandawarrior1>
I mean self gives me #<Person:0x007fe87498c858>
otherj has joined #ruby
<Mon_Ouie>
I think your IRC client did a funny thing there :p
<pandawarrior1>
self.object_id and self.class give me back different object ids
<pandawarrior1>
so there are what?
<pandawarrior1>
Mon_Ouie: irc fail :)
Es0teric has joined #ruby
geekbri has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
<Mon_Ouie>
Well, it's normal for an object and its class to be different things
statarb3 has quit [Quit: Leaving]
<pandawarrior1>
right
<fir_ed>
pandawarrior1,
<pandawarrior1>
so which is the object? #<Person:0x007fe87498c858> or Person
<fir_ed>
self is the person object
<Mon_Ouie>
The former
<fir_ed>
self.class => the object's class
CreativeEmbassy has joined #ruby
the_mentat has joined #ruby
<pandawarrior1>
Mon_Ouie: so if it's the former, what's the latter?
<Mon_Ouie>
It's the class
<pandawarrior1>
weeerrrrrd
mando has quit [Ping timeout: 246 seconds]
<pandawarrior1>
got it
miso1337 has quit [Quit: afk]
yshh has quit [Remote host closed the connection]
dmerrick has joined #ruby
love_color_text has quit [Remote host closed the connection]
marr has quit [Ping timeout: 252 seconds]
zul_ has quit [Ping timeout: 255 seconds]
techhelp has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
foxnewsnetwork has quit [Ping timeout: 264 seconds]
tjbiddle has quit [Ping timeout: 264 seconds]
brum has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 260 seconds]
bryanjswift has joined #ruby
techhelp has quit [Client Quit]
sn0wb1rd_ has joined #ruby
larissa has joined #ruby
sn0wb1rd has quit [Ping timeout: 264 seconds]
sn0wb1rd_ is now known as sn0wb1rd
predator217 has joined #ruby
mfletcher has joined #ruby
tjbiddle has joined #ruby
freeayu has joined #ruby
joshman_ has quit [Ping timeout: 252 seconds]
RonScagz has joined #ruby
predator117 has quit [Ping timeout: 252 seconds]
mando has joined #ruby
jrajav has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
hiroyuki has joined #ruby
arya has quit [Ping timeout: 256 seconds]
arya has joined #ruby
dmerrick has quit [Quit: dmerrick]
mando_ has quit [Ping timeout: 252 seconds]
ryanjh has joined #ruby
julisn has joined #ruby
foxnewsnetwork has joined #ruby
brianpWins has quit [Quit: brianpWins]
<julisn>
Hello. Am I right in thinking that :: methods, such as Time::now, are members of the singleton class of the class named Time?
<Mon_Ouie>
Yes. Notice '::' and '.' are equivalent in that context.
<Mon_Ouie>
(It's more common to call it Time.now than Time::now)
etcetera has quit []
duosrx has joined #ruby
ph^ has joined #ruby
<julisn>
Mon_Ouie: should I use :: when talking both about the definition and calling the method? I've seen several different ways? The docs say :: for example
<Mon_Ouie>
It's more common to use :: only for constant lookup, and '.' for all method calls
<whitequark>
tldr: class << self does not define any additional constants, it just switches the 'default definee'
<whitequark>
what you wrote is equivalent to def self.print_author
<pandawarrior1>
when I use Post::Post.print_author I get "self_hash.rb:9: warning: toplevel constant Post referenced by Post::Post
<pandawarrior1>
The author of all posts is Jimmy"
<whitequark>
yea, that's because Post inherits Object, and all top-level constants are defined within Object
<whitequark>
Post::Post::Post::Post would also work
yshh has joined #ruby
<whitequark>
or class Buffalo; end; Buffalo::Buffalo::Buffalo::Buffalo::Buffalo
hadees has quit [Quit: hadees]
<pandawarrior1>
"Post inherits Object" got that. "all top-level constants are defined within Object" didn't understand. also Post::Post::Post::post gave a "elf_hash.rb:9: warning: toplevel constant Post referenced by Post::Post" warning and didn't execute
the_mentat has quit []
jetblack has joined #ruby
thams has joined #ruby
senayar has quit [Quit: Quitte]
jimeh has joined #ruby
foxnewsnetwork has quit [Quit: Leaving.]
<pandawarrior1>
i guess: class Post; class << self; def def print_author "foobar" end; end; end works because it provides context for the define_author method
fasta_ has joined #ruby
fasta has quit [Read error: Connection reset by peer]
nari has quit [Ping timeout: 240 seconds]
<pandawarrior1>
it's like a wrapper, all methods defined no longer need to be prefixed with self.method_name
Bry8Star has quit [Ping timeout: 276 seconds]
niklasb has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
horofox_ has quit [Quit: horofox_]
dougireton has quit [Remote host closed the connection]
invisime has quit [Quit: Leaving.]
dannluciano has joined #ruby
<bnagy>
anyone happen to know a way to get jpeg size without bothering with imagemagick and similar crap?
<bnagy>
I think java has this built in, but doing it through jruby feels gross
hiroyuki has quit [Read error: Connection reset by peer]
hiroyuki has joined #ruby
dmerrick has joined #ruby
julisn has quit [Quit: Page closed]
jamesfung14 has joined #ruby
brum has joined #ruby
znode has quit [Remote host closed the connection]
znode has joined #ruby
sailias has joined #ruby
mneorr has quit [Remote host closed the connection]
angusiguess has joined #ruby
seoaqua has joined #ruby
pandawarrior1 has quit [Quit: Leaving.]
mando has quit [Remote host closed the connection]
miso1337 has joined #ruby
niklasb has quit [Ping timeout: 246 seconds]
mercwithamouth has quit [Ping timeout: 248 seconds]
dmerrick has quit [Client Quit]
jrendell has quit [Ping timeout: 244 seconds]
jamesfung14 has quit [Quit: Leaving]
jeffreybaird has left #ruby [#ruby]
i_s has quit [Quit: i_s]
Mon_Ouie has quit [Ping timeout: 248 seconds]
brum has quit [Ping timeout: 248 seconds]
jeffreybaird has joined #ruby
jamesfung14 has joined #ruby
jamesfung14 has quit [Read error: Connection reset by peer]
jeffreybaird has quit [Client Quit]
jamesfung14 has joined #ruby
<aedornm>
can I do a dynamic date in YAML? Basically need a YAML file to include a timestamp, which would be weekly. Guess I'm just trying to avoid a few lines of code
jamesfung14 has quit [Client Quit]
jamesfung14 has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
eka has quit [Quit: Computer has gone to sleep.]
__BigO__ has quit [Remote host closed the connection]
taoru has joined #ruby
lethjakman_lapto has joined #ruby
jpfuentes2 has joined #ruby
__BigO__ has joined #ruby
<tommylommykins>
oh also, ooi
<tommylommykins>
how come ruby 2 is called ruby 2?
<tommylommykins>
why not 1.10?
earthquake has quit [Quit: earthquake]
brianpWins has joined #ruby
krawchyk has joined #ruby
<sam113101>
it's a major release
mercwithamouth has joined #ruby
tylersmith has quit [Quit: tylersmith]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
AntiTyping_ has joined #ruby
Tricon has quit [Quit: Leaving...]
AntiTyping has quit [Ping timeout: 264 seconds]
AntiTyping_ is now known as AntiTyping
lethjakman_lapto has quit [Ping timeout: 248 seconds]
jnewt has quit [Quit: Leaving]
adeponte has quit [Remote host closed the connection]
Myconix has quit [Quit: Clearing cache... again :l]
justsee has quit [Quit: Leaving...]
Myconix has joined #ruby
zeade has quit [Quit: Leaving.]
takeru has joined #ruby
Tricon has joined #ruby
sailias has quit [Quit: Leaving.]
angusiguess has quit [Ping timeout: 276 seconds]
ephemerian has quit [Quit: Leaving.]
takeru has quit [Ping timeout: 248 seconds]
Starrfish has joined #ruby
Starrfish is now known as Myconix_
theRoUS has quit [Ping timeout: 248 seconds]
ner0x has joined #ruby
slainer68 has quit [Remote host closed the connection]
<nat_home>
I was wondering http://pastie.org/6345074 how can I tell my match() to use the value of the object (ie my string) ?
garbagecollectio has joined #ruby
dougireton has quit [Ping timeout: 264 seconds]
__BigO__ has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
<jarred>
How do I avoid namespace collisions where the class a method is being called from is the same name as the first part of the namespace of another class? Within SMSXY::Adaptor::Twilio, I want to call Twilio::REST::Client.new, but I'm getting, "uninitialized constant SMSXY::Adaptor::Twilio::REST (NameError)". Is there a way to keep this class' name and still be able to call Twilio::REST::Client.new?
ph^ has joined #ruby
<MrZYX>
::Twilio::REST::Client.new
<garbagecollectio>
what is relational models
<garbagecollectio>
associations
<garbagecollectio>
why would you use them
<MrZYX>
nat_home: tried self?
AntiTyping_ has joined #ruby
drale2k has quit [Quit: Leaving...]
tish has joined #ruby
huoxito has quit [Ping timeout: 264 seconds]
akashj87 has joined #ruby
duosrx has joined #ruby
<nat_home>
MrZYX: when I put self it says "target of repeat operator is not specified: /+-*\/()/"
zoned has quit [Quit: zoned]
<nat_home>
but I don't know what that mean
<nat_home>
I'm checking that now
ph^ has quit [Ping timeout: 248 seconds]
AntiTyping has quit [Ping timeout: 252 seconds]
AntiTyping_ is now known as AntiTyping
<MrZYX>
self.match(/your_regex/)?
<nat_home>
hmmm
<bnagy>
self is implicit, anyway, you can just have def operator;match /whatever/;end
__BigO__ has joined #ruby
<bnagy>
but I can smell some awful code coming up :)
zoned has joined #ruby
<nat_home>
google says pat.match(str)
<nat_home>
actually it's ruby-doc that says that
<nat_home>
so I think I have it in the correct order
gyre007 has quit [Remote host closed the connection]
thone has quit [Ping timeout: 252 seconds]
thone has joined #ruby
<aedornm>
CLearly.
<aedornm>
That 'L' was important, also.
brum has quit [Ping timeout: 248 seconds]
jarred has left #ruby [#ruby]
pdamer has joined #ruby
jpcamara has joined #ruby
kofno has quit [Remote host closed the connection]
techhelp has joined #ruby
drale2k has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
kofno has joined #ruby
gabrielrotbart has joined #ruby
mneorr has joined #ruby
codezombie has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
end_guy has joined #ruby
havenn has quit [Remote host closed the connection]
<codezombie>
question. I have a table of data. title, number of releases, and a release date... I need to select a title, somewhat at "random". However, this selection needs to also be based on the number of releases. A title with a lower number of releases takes a slight priority over a title with a more releases. However, a title with a lower number of releases and a more recent release date, should be lower priority. Anyone have any pointers on something like this
chrishough has quit [Quit: chrishough]
dmerrick has joined #ruby
<codezombie>
I was thinking sort_by, but I've not used it much.
fruers has joined #ruby
robbyoconnor has joined #ruby
thams has quit [Quit: thams]
<fruers>
Does anyone know where I would put my application specific configuration for a Sinatra web app?
<fruers>
Specifically I have a username/password to connect to an external service
etcetera has quit []
mneorr has quit [Ping timeout: 276 seconds]
mneorr has joined #ruby
<aedornm>
codezombie: sounds like a classic weighting + randomization to me.
squidBits has quit [Quit: whoops]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
FondoDeBikini has joined #ruby
aaronm has joined #ruby
peregrine81 has joined #ruby
jmaya has joined #ruby
blf has joined #ruby
r0bby has joined #ruby
<blf>
I just installed Ruby 2.0.0 and every time I start irb I get the message "DL is deprecated, please use Fiddle". Any ideas how to silence this message?
adeponte has joined #ruby
robbyoconnor has quit [Ping timeout: 248 seconds]
rocket has joined #ruby
sailias has quit [Ping timeout: 248 seconds]
Quebert has quit [Ping timeout: 252 seconds]
thams has joined #ruby
dorei has quit []
adeponte has quit [Ping timeout: 255 seconds]
zastern has joined #ruby
<zastern>
So, I'm interviewing with a company that builds their apps in ruby/rack + nginx. Any thoughts on good documentation for getting a test environment for similar, up and running? I see things like this, http://stackoverflow.com/questions/13030149/how-to-deploy-ruby-rack-app-with-nginx - but not concise docs of any kind.
bryanjswift has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
nfk has quit [Quit: yawn]
otters has quit [Ping timeout: 260 seconds]
gabrielrotbart has quit [Remote host closed the connection]
bryanjswift has joined #ruby
Bry8Star_ has joined #ruby
stkowski has quit [Quit: stkowski]
io_syl has quit [Ping timeout: 272 seconds]
h4mz1d has joined #ruby
AlStanforth has joined #ruby
zzing has quit [Quit: Computer has gone to sleep.]
jbw has quit [Ping timeout: 264 seconds]
Bry8Star has quit [Ping timeout: 276 seconds]
mneorr has quit [Read error: Connection timed out]
ph^ has joined #ruby
zastern has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
otters has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Remote host closed the connection]
sailias has joined #ruby
__BigO__ has quit [Remote host closed the connection]
jetblack has quit [Ping timeout: 255 seconds]
ph^ has quit [Ping timeout: 276 seconds]
joeycarmello has quit [Ping timeout: 260 seconds]
Hanmac1 has joined #ruby
jpcamara has quit [Quit: jpcamara]
yourmysin has quit [Remote host closed the connection]
jetblack has joined #ruby
gabrielrotbart has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
pdamer has quit [Quit: pdamer]
acrussell has quit [Quit: acrussell]
Progster has quit [Ping timeout: 276 seconds]
sailias has quit [Ping timeout: 248 seconds]
Progster has joined #ruby
jbw has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
afei has joined #ruby
otherj has quit []
__BigO__ has joined #ruby
brum has joined #ruby
afei has left #ruby [#ruby]
pdamer has joined #ruby
sn0wb1rd has joined #ruby
r0bby has quit [Max SendQ exceeded]
chrishough has joined #ruby
adeponte has joined #ruby
nat_home has quit [Quit: Leaving.]
rboyd has joined #ruby
Adys has quit [Quit: No Ping reply in 90 seconds.]
Adys has joined #ruby
r0bby has joined #ruby
mneorr has quit [Read error: Connection timed out]
mneorr has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
adeponte has quit [Remote host closed the connection]
garbagecollectio has joined #ruby
xemu has quit [Ping timeout: 245 seconds]
r0bby has quit [Ping timeout: 248 seconds]
carlyle has joined #ruby
Bosma has quit [Ping timeout: 252 seconds]
Bosma has joined #ruby
<jblack>
zastern: How's trying to pick up a new skill mid-interview working for ya?
krz has joined #ruby
carlyle has quit [Remote host closed the connection]
joeycarmello has joined #ruby
arya has quit [Ping timeout: 246 seconds]
MehLaptop has joined #ruby
otherj has joined #ruby
gyre007 has joined #ruby
icco has quit [Ping timeout: 252 seconds]
blf has quit [Quit: Page closed]
arya has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
love_color_text has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
rezzack has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
gyre007 has quit [Ping timeout: 276 seconds]
icco has joined #ruby
mneorr has quit [Read error: Connection timed out]
mneorr has joined #ruby
icole has quit [Remote host closed the connection]
MehLaptop has quit [Remote host closed the connection]
nat_home has joined #ruby
nga4 has quit [Ping timeout: 255 seconds]
Deltaoo has joined #ruby
aedornm has quit [Quit: Leaving]
h4mz1d has quit [Ping timeout: 252 seconds]
krawchyk has quit [Remote host closed the connection]
adeponte has joined #ruby
__BigO__ has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
volte has quit [Quit: leaving]
jpcamara has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
Retistic has quit [Quit: Retistic]
tjbiddle has joined #ruby
ph^ has joined #ruby
tommyvyo has quit [Quit:]
carlyle has joined #ruby
Retistic has joined #ruby
breadtk has joined #ruby
tommyvyo has joined #ruby
<breadtk>
How can I cut/replace string easily ala sed? e.g. str="something ruby is awesome!" src.match(s/.*r/r/)
mockra has joined #ruby
mneorr has quit [Read error: Connection timed out]
mneorr has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
ph^ has quit [Ping timeout: 246 seconds]
baustin has quit [*.net *.split]
kaen has quit [*.net *.split]
shevy has quit [*.net *.split]
jblack has quit [*.net *.split]
dawkirst has quit [*.net *.split]
Rious has quit [*.net *.split]
chendo_ has quit [*.net *.split]
kpwz has quit [*.net *.split]
haxrbyte_ has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
radic has quit [*.net *.split]
soulcake has quit [*.net *.split]
srchelp has quit [*.net *.split]
Caius has quit [*.net *.split]
SDr has quit [*.net *.split]
alexspeller has quit [*.net *.split]
kseifried has quit [*.net *.split]
starburst has quit [*.net *.split]
witchdoc has quit [*.net *.split]
Schmidt has quit [*.net *.split]
daaaan has quit [*.net *.split]
huoxito has joined #ruby
huoxito has quit [Read error: Connection reset by peer]
<breadtk>
nvm. 'gsub' works great!
<breadtk>
Thanks all.
pdamer has quit [Quit: pdamer]
radic has joined #ruby
kaen has joined #ruby
Dreamer3 has joined #ruby
Schmidt has joined #ruby
srchelp has joined #ruby
SDr has joined #ruby
soulcake has joined #ruby
kseifried has joined #ruby
Rious has joined #ruby
cjk101010 has joined #ruby
shevy has joined #ruby
jblack has joined #ruby
baustin has joined #ruby
witchdoc has joined #ruby
daaaan has joined #ruby
alexspeller has joined #ruby
haxrbyte_ has joined #ruby
kpwz has joined #ruby
dawkirst has joined #ruby
starburst has joined #ruby
Caius has joined #ruby
77CAAQFXE has joined #ruby
Dreamer3 has quit [Max SendQ exceeded]
Dreamer3 has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
<codezombie>
question, when using sort_by and multiple sort values it just seems to sort by which ever is provided first. For example: releases.sort_by { |k,v| [v[:count], v[:latest_release]] } sorts by count, and releases.sort_by { |k,v| [v[:latest_release], v[:count]] } will sort by latest release. They don't seem to have the correct result.
HecAtic has joined #ruby
SDr has quit [Ping timeout: 252 seconds]
brum has quit [Remote host closed the connection]
[rupee] has quit [Quit: Leaving]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
KOunit has joined #ruby
SDr has joined #ruby
BoppaDop has joined #ruby
BoppaDop has left #ruby [#ruby]
pdamer has joined #ruby
<codezombie>
hmm, even when converting the date to an integer.
HecAtic has quit [Client Quit]
baroquebobcat has joined #ruby
dallasm has joined #ruby
aapzak has quit [Ping timeout: 252 seconds]
dallasm has quit [Remote host closed the connection]
<AlStanforth>
isn't that how multiple sort values are supposed to work? Sort by first value, and then sort by the second value for each first value
Retistic has quit [Quit: Retistic]
dallasm has quit [Ping timeout: 248 seconds]
sepp2k1 has quit [Remote host closed the connection]
r0bby has joined #ruby
angusiguess has quit [Ping timeout: 264 seconds]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
MehLaptop has joined #ruby
crackfu has joined #ruby
dustint has joined #ruby
blf has joined #ruby
Loaft has quit [Ping timeout: 244 seconds]
<blf>
Is it possible to specify arguments to be used when running tests with MiniTest? For example, when running the test case without arguments, the test case generates a random number. When running the test case with an argument, it uses the provided argument as the number.
carlyle has joined #ruby
c0rn has joined #ruby
akashj87 has quit [Ping timeout: 252 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
mneorr has quit [Read error: Operation timed out]
cyong has joined #ruby
mneorr has joined #ruby
huoxito has joined #ruby
sandGorgon has joined #ruby
<AlStanforth>
using asserts?
berserkr has quit [Quit: Leaving.]
arya has quit [Ping timeout: 255 seconds]
mikepack has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
chrishough has quit [Quit: chrishough]
Deltaoo has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
KOunit has quit [Ping timeout: 276 seconds]
nga4 has joined #ruby
brum has joined #ruby
arya has joined #ruby
io_syl has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
takeru_ has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
<AlStanforth>
I was playing with factorials and ruby and was amazed by how easy it is to work with huge numbers
hadees has joined #ruby
ebobby has quit [Ping timeout: 252 seconds]
dallasm has joined #ruby
BrianJ has joined #ruby
brum has quit [Ping timeout: 248 seconds]
<AlStanforth>
I was loosely benchmarking to compare it with C++'s BigInt and it loses about half its performance through all the layers of scripting, but it's so damn elegant
Quebert has joined #ruby
newUser1234 has joined #ruby
rolloTomasi has joined #ruby
dustint has quit [Quit: Leaving]
<AlStanforth>
Handling everyday-scale numbers and planetary-scale numbers is done in the same syntax in ruby. This language never ceases to amaze me
pierre1 has joined #ruby
rocket has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
banjara has joined #ruby
Emmanuel_Chanel has joined #ruby
ebobby has joined #ruby
ebobby has quit [Client Quit]
bryanjswift has quit [Quit: Bye.]
mneorr has quit [Read error: Connection timed out]
mneorr has joined #ruby
MehLaptop has quit [Remote host closed the connection]
skcin7 has joined #ruby
d2dchat has joined #ruby
icole has joined #ruby
rocket has joined #ruby
pdamer has quit [Quit: pdamer]
jekotia has quit [Remote host closed the connection]
sn0wb1rd_ has joined #ruby
Starrfish has joined #ruby
otherj has quit []
Quebert has quit [Ping timeout: 244 seconds]
sn0wb1rd has quit [Ping timeout: 248 seconds]
sn0wb1rd_ is now known as sn0wb1rd
icole has quit [Ping timeout: 244 seconds]
ph^ has joined #ruby
divout has joined #ruby
Domon has joined #ruby
nwest has quit [Ping timeout: 248 seconds]
Tricon has quit [Quit: Leaving...]
zeade has joined #ruby
robonerd has joined #ruby
ph^ has quit [Ping timeout: 248 seconds]
<robonerd>
still plenty of ruby jobs around?
<vabenjamin>
no, none at all
<vabenjamin>
:)
Emplitz has quit [Read error: Connection reset by peer]
Emplitz has joined #ruby
thams has joined #ruby
AlStanforth has quit [Remote host closed the connection]
mneorr has quit [Read error: Connection timed out]
hoolandi1 has joined #ruby
<hoolandi1>
Hey guys, what are the best Ruby blogs to follow if I want news about gems and cool developments?
mneorr has joined #ruby
banjara has quit [Ping timeout: 260 seconds]
kpshek has joined #ruby
taoru_ has joined #ruby
taoru has quit [Ping timeout: 260 seconds]
banjara has joined #ruby
elkclone has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
newUser1234 has quit [Remote host closed the connection]
skcin7 has left #ruby [#ruby]
Starrfish is now known as myconix
myconix is now known as Myconix
arya has quit [Ping timeout: 252 seconds]
gtc has joined #ruby
takeru_ has quit [Remote host closed the connection]
banjara has left #ruby [#ruby]
arya has joined #ruby
Matip has joined #ruby
amh345 has joined #ruby
girija has joined #ruby
Mattix has quit [Ping timeout: 244 seconds]
ner0x has quit [Quit: Leaving]
twoism has quit [Remote host closed the connection]
shock_one has joined #ruby
freakazoid0223 has quit [Ping timeout: 248 seconds]
decoponio has joined #ruby
<ryanf>
hoolandi1: subscribe to Ruby Weekly
dhruvasagar has quit [Ping timeout: 240 seconds]
kkh has quit [Ping timeout: 255 seconds]
mneorr has quit [Read error: Connection timed out]
tjbiddle has quit [Quit: tjbiddle]
rboyd has quit [Quit: rboyd]
mneorr has joined #ruby
Cork has quit [Quit: .]
FondoDeBikini has quit []
v0n has joined #ruby
c0rn has quit [Ping timeout: 276 seconds]
sayan has joined #ruby
c0rn has joined #ruby
robonerd has left #ruby ["..."]
tomzx_mac has quit [Read error: Operation timed out]
yundream has joined #ruby
fruers has quit [Remote host closed the connection]
rippa has joined #ruby
fruers has joined #ruby
dmiller has joined #ruby
brum has joined #ruby
dankest has joined #ruby
HecAtic has joined #ruby
Tricon has joined #ruby
yundream has quit [Read error: Connection reset by peer]
brum has quit [Ping timeout: 248 seconds]
bubblehead has quit [Ping timeout: 260 seconds]
etcetera has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
meoblast001 has quit [Read error: Connection reset by peer]
mneorr has quit [Read error: Connection timed out]
hbpoison has joined #ruby
mneorr has joined #ruby
bradleyprice has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
carlyle has quit [Remote host closed the connection]
crackfu has quit [Remote host closed the connection]
<amh345>
if i do new_hash[nstat.name] << [k1: "1_value"] that works. but it's bad formatting
<amh345>
the code im running is directly from my gist.
bier has joined #ruby
<bnagy>
remember that hashes use curly braces, not square
<bnagy>
so you can't merge an array into a hash
<bnagy>
some_hsh.merge( { k: :v } ) will work though
<amh345>
the reason why i want to know what the key are is because i need to pull this into html and i want to get some decent formating using the keys to distinguish
takeru has quit [Ping timeout: 255 seconds]
<bnagy>
anyway, sounds like you need to take it more slowly and understand the syntax you're trying to use
<bnagy>
plus read your error messages more carefully
answer_42 has quit [Remote host closed the connection]
<bnagy>
I gotta code things now, sry
<amh345>
ok, this some_hsh.merge( { k: :v } ) does throw errors. but i need to merge on the parent key some_hsh[parent_key].merge( { k: :v } ) in which case i throw undefined method `merge' for []:Array
Xeago has quit [Read error: Connection reset by peer]
nomenkun has quit [Read error: Connection reset by peer]
<bnagy>
just do require_relative or require './blah'
unix has quit [Quit: WeeChat 0.4.0]
<p2w>
neither one of those worked
<p2w>
tried 'em both
<workmad3>
bnagy: require_relative doesn't work in irb
<p2w>
what's the 'right' way to do this in 1.9.3 in general
<bnagy>
orly? huh. I never use it in irb :)
<bnagy>
the right way is NOT to modify load path
fire has joined #ruby
hbpoison has quit [Ping timeout: 244 seconds]
<bnagy>
workmad3: ohh I see, it can't work out where it is, in irb
<bnagy>
makes sense I guess
<workmad3>
bnagy: exactly :)
<workmad3>
bnagy: require_relative is relative to the file... but in irb you don't have a file to be relative to :)
zoonfafer has joined #ruby
<bnagy>
p2w: anyways, require_relative is "generally" good style for actual code
<workmad3>
bnagy: I disagree with that btw :P
<p2w>
understood
<bnagy>
in irb you can just require relative to .
<p2w>
but that isnt working
<bnagy>
workmad3: that's because you're an insane person ;)
<workmad3>
bnagy: hardly
<bnagy>
p2w: in what way is it "not working"? where is the file relative to where you ran irb?
dcwu has quit [Read error: Connection reset by peer]
<workmad3>
bnagy: require_relative introduces a nasty coupling between the file you use it in and the file you require with it
<p2w>
i've tried this a few ways
wobblini is now known as realDAB
<workmad3>
bnagy: by using it you've basically just coupled both files to each other, and from the required file you have absolutely no way of telling this
Demux has quit [Ping timeout: 252 seconds]
justsee has quit [Quit: Leaving...]
<bnagy>
workmad3: how does modifying load path not do the same, though?
Demux has joined #ruby
<p2w>
first off, from inside the dir where the class is a simple require 'filename'
Elico1 has quit [Quit: Elico1]
<bnagy>
p2w: then if it's a file in the same dir, require './foo'
<workmad3>
bnagy: because adding a root to the load path gives you a stable point to include from
<workmad3>
bnagy: also require "./foo" doesn't load from the same dir
<p2w>
results in :LoadError: cannot load such file -- osprey
<p2w>
from /Users/xxxxx/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<p2w>
from /Users/xxxxx/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<p2w>
from (irb):1
justsee has joined #ruby
<workmad3>
bnagy: it loads from cwd
<shevy>
ohhh the good old xxxxx user
<bnagy>
workmad3: yeah, but we're talking about the irb thing now
<p2w>
heh
<workmad3>
bnagy: right, and he wants to load from a different directory ;)
<bnagy>
19:17 < bnagy> p2w: in what way is it "not working"? where is the file relative to where you ran irb?
taoru has quit [Remote host closed the connection]
<shevy>
in 1.8.x that would have worked :>
<bnagy>
sorry, didn't see that got missed
<workmad3>
shevy: it would have worked in 1.9.1 too :)
<workmad3>
bnagy: yeah, I'm just being blind now I guess :)
<p2w>
so i've got a dir 'x' that has the class in it
<bnagy>
p2w: to clarify, this is all based on where you were when you typed irb, not where the files are in relation to each other
<p2w>
exactly
<p2w>
i've tried this all the way up and down the dir tree. and still get the custom require error
<shevy>
hehe
<bnagy>
p2w: wait, is the error related to the actual file you're requiring, or a file IT is requiring afterwards?
<p2w>
well i'm not sure how i would know that honestly. there is def a nested requirement model down the class
adeponte has quit [Ping timeout: 248 seconds]
atyz has joined #ruby
<bnagy>
p2w: well, if you're doing require './foo' and the LoadError is not about foo, that's a different issue
<workmad3>
p2w: how are you planning on distributing the code? is it intended to be gemified?
<workmad3>
p2w: or is it a standalone app? if so, are you using some form of app framework? or starting really from scratch?
monkegjinni has joined #ruby
akam-it has quit [Quit: Ухожу я от вас]
hackeron has quit [Read error: Connection reset by peer]
timonv has joined #ruby
tk_ has joined #ruby
vlad_starkov has joined #ruby
<p2w>
it is a gem
<p2w>
but it has some convenience methods i can use to exercise a rest api endpoint
<p2w>
so i'm trying to access those in irb
<workmad3>
p2w: and you're doing it from within your source dir to play with them, before it's installed as a gem?
<p2w>
yes
Virunga has joined #ruby
<p2w>
exactly
<workmad3>
p2w: right, then just do 'irb -Ilib' to run it
makarius has joined #ruby
<workmad3>
p2w: that'll put your gem lib/ directory on the load path to play with, rather than messing around with the load path in your code
<workmad3>
p2w: and then you can do 'require "your_gem" ' inside irb like you normally would ;)
ph^ has joined #ruby
<shevy>
and it works on 1.8.x too!
<shevy>
it's even shorter than require_relative
mneorr has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy>
on top of that, you get a free cookie if you make a gem
<p2w>
the gem is the easy part
rhinux has quit [Quit: Konversation terminated!]
vlad_starkov has joined #ruby
<shevy>
hehehe
<shevy>
so making a gem is easier than requiring a file :D
hackeron has joined #ruby
atmosx has quit [Quit: And so the story goes…]
<workmad3>
shevy: it is when you aren't completely au fait with how to manipulate the load path in ruby ;)
<shevy>
I used to just append to $LOAD_PATH in my gems
<shevy>
then I was told that this was not required
<shevy>
and it was true!
<workmad3>
shevy: indeed it is... that's what rubygems does for you ;)
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<workmad3>
my basic rule of thumb is this - if you have a library, hands off the load path
<p2w>
@workmad3 thx
<workmad3>
if you have an application, only add one path - your root source dir
brum has joined #ruby
ph^ has quit [Remote host closed the connection]
browndawg has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
makarius has quit [Quit: Off]
fir_ed has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
beiter has quit [Quit: beiter]
znode_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
brum has quit [Ping timeout: 248 seconds]
chichou has quit [Remote host closed the connection]
piotrj has joined #ruby
schaerli has quit [Remote host closed the connection]
fir_ed has quit [Ping timeout: 276 seconds]
postmodern_ has joined #ruby
gregor3005 has joined #ruby
gregor3005 has left #ruby [#ruby]
arya has quit [Ping timeout: 256 seconds]
postmodern has quit [Ping timeout: 264 seconds]
monkegjinni has quit [Remote host closed the connection]
m3pow has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 246 seconds]
theRoUS has quit [Ping timeout: 276 seconds]
piotrj has quit [Remote host closed the connection]
arya has joined #ruby
hbpoison has joined #ruby
divout has quit [Remote host closed the connection]
m8 has joined #ruby
Tricon has joined #ruby
fir_ed has quit [Ping timeout: 248 seconds]
Bry8Star has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
hbpoison has quit [Ping timeout: 255 seconds]
skum has joined #ruby
hbpoison has joined #ruby
Bry8Star has joined #ruby
tomzx_mac has joined #ruby
jpcamara has joined #ruby
buibex has joined #ruby
Vainoharhainen has quit [Ping timeout: 240 seconds]
rmartin has joined #ruby
carloslopes has joined #ruby
gift has joined #ruby
arya has joined #ruby
beiter has joined #ruby
<gift>
i've got [ { :a => 1, :b => 2 }, { :a => 4, :b => 6 }, ... ] - and i would like to assign the average values of :a and :b into a master hash (if that makes sense)
<gift>
how can i go about that
<hoelzro>
I would use map and inject
<hoelzro>
hmm...
<hoelzro>
>> (1..5).map { |x| [ x * 2, x * ] }
<eval-in>
hoelzro: Output: "/tmp/execpad-376e69cf6e48/source-376e69cf6e48:1: syntax error, unexpected ']'\n(1..5).map { |x| [ x * 2, x * ] }\n ^\n" (http://eval.in/11258)
<workmad3>
hoelzro: I'd probably just use each_with_object :)
nari has joined #ruby
sailias has joined #ruby
<hoelzro>
workmad3: I'd like to see how you'd do that
<geggam_wk>
like ants sprinkled about your ham n rye
<geggam_wk>
gentoo is linux trying to be bsd
<Pandaen>
especially since they removed CTRL ALT Backspace from the default hotkeys ...
<ahhhh>
Gentoo = genius
<ahhhh>
Gen - toooo
<bnagy>
I agree, gentoo is the best
<Quadlex>
The genius in Gentoo is learning to pronounce Gentoo properly
<postmodern_>
ahhhh, i think in order to solve your ruby install issue
<bnagy>
I'd much rather watch emerge --newuse --deep world than actually do work
Stilo has joined #ruby
<postmodern_>
ahhhh, you should install gentoo stage1 in a VM
<postmodern_>
ahhhh, then emerge ruby
<Quadlex>
A hint: It's almost exactly the same as meme vs meme
<geggam_wk>
rpm based distros... corporate... debian is more for admins who know wtf they are doing ... ubuntu is for people who want linux to work but generally cant be bothered to figure it out... BSDs are for people who like to set something up and not touch it for 5 years
<geggam_wk>
and that is a no bullshit answer ^
RonScagz has joined #ruby
apok has quit [Quit: apok]
mmack has quit [Remote host closed the connection]
<geggam_wk>
those other distros are for nerds who like to play with linux
<postmodern_>
geggam_wk, and then there's fedora
Eerbin has joined #ruby
adkron_ has joined #ruby
adkron__ has joined #ruby
<bnagy>
this is gold
<postmodern_>
geggam_wk, the distro that choose "beefy miracle" as their codename
bean has joined #ruby
* bnagy
logs the SHIT out of this
<geggam_wk>
fedora is rpm based and what people who dont use centos use to get around paying redhat
hbpoison has quit [Read error: Connection reset by peer]
<bnagy>
what about Windows? I heard Win7 has some pretty slick deep-OS features
<geggam_wk>
admins dont use windows unless they are forced into it
<postmodern_>
arch linux, for people who got bored watching emerge --update --new-use world
xemu has joined #ruby
hbpoison has joined #ruby
<bnagy>
geggam_wk: is that because linux is so much more secure?
<geggam_wk>
no
hashmal has joined #ruby
<geggam_wk>
its because windows is a pain in the ass to administer
<geggam_wk>
and expensive as hell
<bnagy>
good point
<postmodern_>
bnagy, admins must run opensolaris
mulinux has quit [Quit: mulinux]
monkegjinni has joined #ruby
<bnagy>
I guess that's why all the big networks use linux
<geggam_wk>
windows is like that rich little shit at school that had all the cool toys but no one wanted to play with him because he was such a whiny bitch
mneorr has joined #ruby
<geggam_wk>
its 5:30 am and i have a 6am meeting... enough fun for the day
krawchyk has joined #ruby
<bnagy>
dammit, I was just getting all my friends, plus popcorn :<
Pandaen has quit [Ping timeout: 255 seconds]
brum has quit [Remote host closed the connection]
<postmodern_>
now we will never know geggam_wk's analogy for openbsd
<bnagy>
:(
<geggam_wk>
friendly os that is very picky who it is friends with...
tommyvyo has quit [Quit:]
<postmodern_>
gold
<bnagy>
I have always thought Theo was a friendly kind of guy
<bnagy>
that's why he's so well liked
<postmodern_>
always sends such polite emails in response to bugs
<geggam_wk>
like linus ?
<geggam_wk>
egos cause flames
<geggam_wk>
theo doesnt compromise... and the OS is damned secure because of it
<bnagy>
AHAHAH HAHAH HAHA
<geggam_wk>
also the easiest to setup
<bnagy>
... sorry
dhruvasagar has quit [Ping timeout: 248 seconds]
mneorr has quit [Ping timeout: 244 seconds]
<bnagy>
I literally can't see the screen because I am crying with laughter
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
<geggam_wk>
all that hacking on windows and office make you realize how insecure OBSD is ?
<geggam_wk>
>:]
rippa has quit [Ping timeout: 240 seconds]
adkron__ has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 248 seconds]
adkron_ has quit [Ping timeout: 252 seconds]
rdark has joined #ruby
iamjarvo has quit [Quit: Leaving.]
postmodern_ has quit [Quit: Leaving]
monkegjinni has quit [Remote host closed the connection]
mh` has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
theRoUS has joined #ruby
<mh`>
hi, my `gem help commands` takes a really long time to return. is there a simple way to see what's blocking it? (its on osx or i'd use strace, and i don't see anything obvious in dtruss output)
thams has joined #ruby
znode has quit [Remote host closed the connection]
<mh`>
i have a bunch of gems installed and i'm sure some are crappy etc, just not sure where to start
baustin has quit [Remote host closed the connection]
<mh`>
oh, this isn't in an rvm or anything.. system
rdark has quit [Client Quit]
adeponte has joined #ruby
arya has joined #ruby
eklarskov has joined #ruby
fasta_ is now known as fasta
<shevy>
geggam_wk well, even without an ego, people have an opinion. the japanese often dont flame because they dont value the opinions of others negatively by default
rickmasta has quit [Quit: Leaving...]
tcstar has joined #ruby
<bnagy>
fun as this has been, I have to sleep. o/
jgarvey has joined #ruby
<geggam_wk>
different cultures have different values shevy .. one of my favorite things about living the bay is seeing the diversity :)
jeffreybaird has joined #ruby
willob has joined #ruby
<shevy>
hey Zelest ... what you said about 99.9% of the ubuntu users... it isn't that easy anymore... for example, in the past for the runlevel I could edit /etc/inittab right? but that file is no longer there by default! changing the runlevel permanently is different now :(
<shevy>
distributions are evil
blaxter has quit [Quit: foo]
drale2k_ has quit [Quit: Leaving...]
adeponte has quit [Read error: Connection reset by peer]
* Zelest
shrugs
adeponte has joined #ruby
invisime1 has joined #ruby
<geggam_wk>
if you put the file back does ubuntu use it shevy ?
<shevy>
they want to change things in order to remain interesting
<shevy>
geggam_wk hmm not sure, I did not try. I was too annoyed to try :\
tommyvyo has joined #ruby
<Zelest>
that really worked for Gnome 3. :-D
<shevy>
it's some other file now
railsbros_dirk has quit [Quit: railsbros_dirk]
invisime1 is now known as invisime
<hoelzro>
it's probably related to upstart
<shevy>
Zelest well unity is awful... but it is something new and different :D
<shevy>
yeah, that was the name...
adamjleonard has quit [Quit: Leaving...]
gokul has quit [Quit: Leaving]
<shevy>
hmm gnome 3 is awful too
<Zelest>
well, every other OS seems to have a fetish for being used on a tablet, so why not Ubuntu..
solidoodlesuppor has joined #ruby
<shevy>
now that gnome 3 is out, I have more respect for gnome 2, it's better suddenly haha :D
<geggam_wk>
i have two tablets... i dont touch either one
<geggam_wk>
kids play games on them
<hoelzro>
if they want to be on tablets, they should have a tablet distro
<Zelest>
geggam_wk, was just about to say that, they're awesome for the kids..
<shevy>
I am not a kid anymore!
<Zelest>
geggam_wk, but I would never run a "real" OS on it..
<Zelest>
hence, I don't get the whole migration towards being "tablet ready"
<hoelzro>
tablets are for consuming content
<shevy>
it must be where all the money is
<hoelzro>
developers tend to create content
<geggam_wk>
the only useful thing i found for tablets was so i didnt have to take my laptop to a meeting and i looked like i was paying attention
znode has joined #ruby
<Zelest>
hoelzro, +1
<shevy>
lol geggam_wk
<Zelest>
geggam_wk, though, I do want a ipad mini instead of my iphone..
<shevy>
oh man you fashion hipsters you
<Zelest>
mail/texts > phonecalls
<geggam_wk>
i have an acer a500 and an ipad
<hoelzro>
I use my tablet for traveling, reading before bed, and occasionally games
<hoelzro>
it's worked out well
<geggam_wk>
a500 is nicer
<Zelest>
i have a macbook pro, macbook air, ipad and iphone..
<Zelest>
macbook pro is nicer.
adeponte has quit [Ping timeout: 260 seconds]
<Zelest>
:P
<geggam_wk>
i liked the air
<geggam_wk>
ssd
<Zelest>
yeah
<Zelest>
got that in the macbook too
<Zelest>
but i lack the graphics in the air
<geggam_wk>
work makes me carry the damned iphone
<geggam_wk>
not mine
<geggam_wk>
i wont buy an apple product... all of them i have are gifts / bonus things
* Zelest
is a apple slave, sadlt.
<Zelest>
sadly*
<geggam_wk>
i have a rack of servers in the garage tho :)
<Zelest>
all Xserves, right? ;)
<Zelest>
I hope they run BSD!
Fraeon has quit [Remote host closed the connection]
railsbros_dirk has joined #ruby
<geggam_wk>
debian nfs server 4tb raid 1 and two dell 1850s.. firewalls / app servers / reduntant failover
<geggam_wk>
redundant even
<Zelest>
:(
<Zelest>
i'm surpriced debian dared to move on to linux 2.6
<geggam_wk>
one dl145 for minecraft servers for thekids
<Zelest>
looking at their normal way of things they should be running 2.2 still :(
M- has joined #ruby
<hoelzro>
MC is probably the coolest game for kids
<hoelzro>
(imo)
rburton- has joined #ruby
<hoelzro>
it's simple but encourage creativity
<geggam_wk>
tekkit and minecraft
<geggam_wk>
run 6 jvms on one machine
<Zelest>
minecraft?!
<shevy>
ok
<Zelest>
my kid use real lego :P
<shevy>
there are kids here
<shevy>
man, lego was awesome
<geggam_wk>
mine have lego too
<Zelest>
is*
<hoelzro>
geggam_wk: 6 JVMs?
<hoelzro>
wtf
<shevy>
I built those things you could see in the old TRON movie, those flying things... and the tanks... all in lego
<Zelest>
he's 2.. and i bought him technic lego with the age recommendation of 12. :-D
<shevy>
haha
<Zelest>
he loves it though
monkegjinni has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
jpcamara has quit [Quit: jpcamara]
tom221 has left #ruby [#ruby]
jpcamara has joined #ruby
tvw has joined #ruby
noop has quit [Remote host closed the connection]
peregrine81 has joined #ruby
buibex has quit [Remote host closed the connection]
kurkale6ka has joined #ruby
<kurkale6ka>
Hi, I get an error like uninitialized constant Puppet and this is from a line with module Puppet::Indirector
lusory has quit [Quit: leaving]
daniel_- has joined #ruby
daniel_- has joined #ruby
banister`sleep is now known as banister`bbl
Fraeon has joined #ruby
velCzupa has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
jpcamara has quit [Ping timeout: 246 seconds]
anonymuse has joined #ruby
anonymuse has quit [Excess Flood]
LBRapid has joined #ruby
workmad3 is now known as wm3|away
fedza has joined #ruby
lusory has joined #ruby
dmerrick has quit [Quit: dmerrick]
apok has joined #ruby
tcstar has quit [Remote host closed the connection]
brum has joined #ruby
dmerrick has joined #ruby
Takehiro has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
gift has left #ruby ["WeeChat 0.3.8"]
aedornm has joined #ruby
dblack_ has quit [Quit: dblack_]
<shevy>
kurkale6ka did you require 'puppet' before
moos3 has joined #ruby
jerius has joined #ruby
<ahhhh>
#sinatra
<aedornm>
They aren't puppets! They're marionettes!
<kurkale6ka>
shevy: no, that was my error, thx
brum has quit [Ping timeout: 248 seconds]
ferdev|away is now known as ferdev
piotrj has quit [Remote host closed the connection]
ahhhh has left #ruby [#ruby]
hiroyuki has quit [Ping timeout: 276 seconds]
dmerrick has quit [Quit: dmerrick]
jetblack has quit [Ping timeout: 264 seconds]
brianosborne has joined #ruby
brianosborne has left #ruby [#ruby]
brianosborne has joined #ruby
pdamer has joined #ruby
brianosborne has quit [Client Quit]
sayan has quit [Ping timeout: 240 seconds]
jerius_ has joined #ruby
_nitti has joined #ruby
arya has quit [Ping timeout: 248 seconds]
jtharris has joined #ruby
dblack_ has joined #ruby
jerius has quit [Ping timeout: 240 seconds]
jerius_ is now known as jerius
akashj87 has joined #ruby
huoxito has joined #ruby
Spooner_ has joined #ruby
wmoxam has joined #ruby
jpfuentes2 has joined #ruby
eklarskov has quit [Quit: leaving]
hiroyuki has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
<geggam_wk>
hoelzro, jvm is a Virtual Machine .... create virtual ips and bind each minecraft server to the VIP ... i have 2 bonded gb interfaces with 7 ips running minecraft... we have lan parties in the garage with 15 kids on big tables screaming at each other
<geggam_wk>
all you need is memory
velCzupa has quit [Remote host closed the connection]
<geggam_wk>
earplugs help
<lupine>
...
DDark has joined #ruby
deepinskin has joined #ruby
piotrj has joined #ruby
mmitchell has joined #ruby
<hoelzro>
heh
mneorr has joined #ruby
<hoelzro>
why seperate MC servers?
MrZYX is now known as MrZYX|off
<hoelzro>
they don't want to all play on the same one?
<geggam_wk>
2 of them are pvp with only 4 slots one is tekkit ... couple vanilla minecrafts so each kid gets their own to be ops on
dr_bob has joined #ruby
<geggam_wk>
tekkit eats cpu ... its a piggy
<hoelzro>
I tried tekkit once
<hoelzro>
it was too buggy for me
framling has left #ruby [#ruby]
<geggam_wk>
dl145 with 16gb of memory laying around ... so the kids got a toy
jeffreybaird has quit [Quit: jeffreybaird]
niklasb has quit [Ping timeout: 276 seconds]
iamjarvo has joined #ruby
techhelp has joined #ruby
sayan has joined #ruby
mneorr has quit [Ping timeout: 240 seconds]
F1skr has quit [Quit: WeeChat 0.4.0]
<geggam_wk>
oop... i lied... only 4 servers running at this time hoelzro
freeayu has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
buibex has joined #ruby
noxoc has joined #ruby
tcstar has joined #ruby
tish has quit [Ping timeout: 255 seconds]
hck89 has joined #ruby
elico has joined #ruby
<samuelj>
Hey guys. I'm using inherited on a superclass to register subclasses. Is there any way I can use something that resembles an abstract subclass if I want an intermediary class to be between the superclass and some of its superclasses, but not to be caught by inherited on the superclass?
frem has joined #ruby
thams has joined #ruby
<samuelj>
*abstract class, not abstract subclass
samphippen has joined #ruby
<hoelzro>
samphippen: define a method on the "abstract" subclass that says "hey, don't use me"
<hoelzro>
or better yet, add a dont_use_me method to your superclass
arya has joined #ruby
<hoelzro>
and call it from the abstract class
buibex has quit [Remote host closed the connection]
jonahR has joined #ruby
znode has joined #ruby
buibex has joined #ruby
<samuelj>
hoelzro: Interesting... So I would have inherited call the dont_use_me method?
<hoelzro>
yeah
<hoelzro>
wait, no
<hoelzro>
just like this:
<hoelzro>
class MyAbstractThing < SuperClass ; dont_use_me ; end
<samuelj>
Ah!
<samuelj>
Excellent, I see
<samuelj>
thank you
<hoelzro>
np
piotrj has joined #ruby
d2dchat has joined #ruby
zoonfafer has quit [Ping timeout: 248 seconds]
jpcamara has joined #ruby
wm3|away is now known as workmad3
d2dchat has quit [Remote host closed the connection]
bdbrash has joined #ruby
thams has quit [Quit: thams]
takeru_ has joined #ruby
yshh has joined #ruby
mercwithamouth has joined #ruby
interactionjaxsn has joined #ruby
brum has joined #ruby
jpcamara has quit [Ping timeout: 264 seconds]
larissa has joined #ruby
znode has quit [Remote host closed the connection]
takeru_ has quit [Ping timeout: 276 seconds]
jblack has quit [Ping timeout: 252 seconds]
sailias has joined #ruby
brum has quit [Ping timeout: 246 seconds]
Fecn has left #ruby [#ruby]
nomenkun has quit [Remote host closed the connection]
mando has joined #ruby
puppeh has quit [Remote host closed the connection]
rdark has joined #ruby
sandGorgon has quit [Ping timeout: 255 seconds]
hackeron has quit [Read error: Connection reset by peer]
railsbros_dirk has quit [Ping timeout: 264 seconds]
poikon has joined #ruby
M- has quit [Quit: This computer has gone to sleep]
Spooner_ is now known as Spooner
eldariof has quit [Ping timeout: 264 seconds]
Spooner has quit [Quit: Leaving]
Spooner_ has joined #ruby
jlast_ has joined #ruby
c0rn has quit [Ping timeout: 246 seconds]
icole has quit [Remote host closed the connection]
mockra has joined #ruby
newUser1234 has quit [Remote host closed the connection]
Spooner_ has quit [Client Quit]
ffranz has quit [Quit: Leaving]
jprovazn_ has quit [Quit: Leaving]
frogstarr78 has joined #ruby
kkh has joined #ruby
skattyadz has quit [Ping timeout: 255 seconds]
jpcamara has joined #ruby
skattyadz has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
hiall has quit [Ping timeout: 255 seconds]
monkegjinni has joined #ruby
c0rn has joined #ruby
icole_ has joined #ruby
icole has joined #ruby
oposomme has joined #ruby
ph^ has joined #ruby
Kudos has joined #ruby
nat_home has quit [Quit: Leaving.]
<oposomme>
When I define a simple accessor foo and want to set in initialize why do I have to call instance_variable_foo = bar and not directly foo = bar? because when I do foo=bar is different from @foo=bar wheareas I have set attr_accessor
Xeago has joined #ruby
geggam_wk has quit [Read error: Connection reset by peer]
<dblack_>
oposomme: foo = bar will be parsed as a local variable assignment. you can however do self.foo = bar
jlast_ has quit [Read error: Connection reset by peer]
icole_ has quit [Ping timeout: 244 seconds]
mockra has quit [Remote host closed the connection]
brum has joined #ruby
<oposomme>
dblack_: so it is a parsing bug
_bart has joined #ruby
bti has joined #ruby
<oposomme>
because I thought when i do foo=bar i do foo=(bar) and it is not the case
joeycarm_ has joined #ruby
bti has left #ruby ["WeeChat 0.3.9.2"]
<dblack_>
oposomme: it's not exactly a bug… just a necessary (as far as i can tell) condition of being able to do everything you might want to do
dhruvasagar has joined #ruby
banister`bbl has quit [Remote host closed the connection]
<dblack_>
oposomme: if foo = bar were a method call and you wanted to assign to a local var called foo, you wouldn't be able to, whereas this way you can do either
__BigO__ has quit [Remote host closed the connection]
<oposomme>
ok I understand
adeponte has joined #ruby
blaxter has joined #ruby
carlyle has quit [Remote host closed the connection]
mneorr has joined #ruby
joeycarmello has quit [Ping timeout: 252 seconds]
carloslopes has quit [Remote host closed the connection]
jlast has joined #ruby
brum has quit [Ping timeout: 246 seconds]
buibex has quit [Remote host closed the connection]
<oposomme>
I will use the instance variable assignement so, not the method call to self thx
joeycarm_ has quit [Ping timeout: 240 seconds]
<hoelzro>
personally, I prefer the method call
chichou has quit [Remote host closed the connection]
chrishough has joined #ruby
* apeiros_
prefers the ivar
nat_home has joined #ruby
joshman_ has quit [Ping timeout: 276 seconds]
io_syl has joined #ruby
<oposomme>
hoelzro: ok :) yes it is more beautiful but not so concise
<hoelzro>
it's not about beauty
tiripamwe has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
pskosinski has quit [Read error: Connection reset by peer]
<hoelzro>
it's about not concerning myself with the details about how that property exists
ckim has joined #ruby
joshman_ has joined #ruby
<hoelzro>
and concise is best reserved for command lines and one-offs
arya has quit [Ping timeout: 248 seconds]
Slivka has joined #ruby
* Kovensky
uses self.<<stuff>> for most stuff
* Kovensky
sadfaced when he discovered that self.private_method doesn't work
beiter has quit [Quit: beiter]
hbpoison has joined #ruby
znode has joined #ruby
<dblack_>
using the method fares better in the face of changing the method, should you happen to do that
<hoelzro>
exactly
ckim has left #ruby [#ruby]
tvw has quit [Ping timeout: 248 seconds]
ckim has joined #ruby
apeiros_ has quit [Remote host closed the connection]
arya has joined #ruby
__BigO__ has joined #ruby
alvaro_o has joined #ruby
dallasm has joined #ruby
carraroj has joined #ruby
Squarepy has quit [Quit: Leaving]
__BigO__ has quit [Remote host closed the connection]
tesuki has left #ruby [#ruby]
__BigO__ has joined #ruby
Chinorro has quit [Remote host closed the connection]
__BigO__ has quit [Remote host closed the connection]
_MJ_4Q_ has joined #ruby
ckrailo has joined #ruby
endzyme has joined #ruby
endzyme has quit [Read error: Connection reset by peer]
marcgg has quit [Read error: No route to host]
marcgg_ has joined #ruby
deepinskin has quit [Ping timeout: 264 seconds]
endzyme has joined #ruby
nat_home has quit [Quit: Leaving.]
znode has quit [Ping timeout: 276 seconds]
ckim has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
dmiller has joined #ruby
velCzupa has joined #ruby
DrShoggoth has quit [Quit: Leaving]
imami|afk is now known as banseljaj
skattyadz has quit [Ping timeout: 260 seconds]
mneorr has quit [Read error: Connection timed out]
takeru has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
mneorr has joined #ruby
skattyadz has joined #ruby
PhilK has quit [Ping timeout: 245 seconds]
PhilK has joined #ruby
chichou has joined #ruby
cascalheira has joined #ruby
jgrevich has quit [Remote host closed the connection]
zzing has joined #ruby
banister`bbl has joined #ruby
skattyadz has quit [Ping timeout: 244 seconds]
Umren has joined #ruby
atno has joined #ruby
Spooner has joined #ruby
arloc has joined #ruby
arya has quit [Ping timeout: 248 seconds]
atno has quit [Remote host closed the connection]
classix has quit [Quit: leaving]
skum is now known as Vainoharhainen
Vainoharhainen has quit [Changing host]
Vainoharhainen has joined #ruby
classix has joined #ruby
sepp2k has joined #ruby
atno has joined #ruby
Kevin has joined #ruby
dhruvasagar has joined #ruby
zigomir has quit [Quit: zigomir]
Kevin is now known as Guest25657
skattyadz has joined #ruby
kevinfagan has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby
dblack_ has quit [Quit: dblack_]
arya has joined #ruby
tesuki has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
griffindy has joined #ruby
arloc has left #ruby [#ruby]
Guest25657 has quit [Ping timeout: 248 seconds]
mityaz has joined #ruby
_br_ has quit [Excess Flood]
mikepack has joined #ruby
mneorr has quit [Read error: Connection timed out]
c0rn has quit [Ping timeout: 255 seconds]
jmaya has quit [Ping timeout: 240 seconds]
dankest has joined #ruby
jmaya has joined #ruby
mneorr has joined #ruby
thams has joined #ruby
Umren has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
Zolo has joined #ruby
Umren has joined #ruby
Umren has left #ruby [#ruby]
poga has joined #ruby
_br_ has joined #ruby
tjbiddle has joined #ruby
Zolo has quit [Remote host closed the connection]
c0rn has joined #ruby
etcetera has joined #ruby
tommyvyo has quit [Quit:]
newUser1234 has joined #ruby
dblack_ has joined #ruby
chussenot has joined #ruby
dblack_ has quit [Client Quit]
apeiros_ has joined #ruby
jamesfung14 has joined #ruby
<apeiros_>
re ivar vs. method call
jpcamara has quit [Quit: jpcamara]
<apeiros_>
method call IMO adds unnecessary indirection, making the code harder to read (there *might* something else happen in the accessor, you have to check)
samphippen has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Ping timeout: 248 seconds]
<apeiros_>
also if it matters when you change the implementation, and it is more than just a search & replace, your code might be too complex and you should further modularize it anyway
tjbiddle has quit [Ping timeout: 255 seconds]
<banister`bbl>
apeiros_: interesting, POODR recommends to always use methods
<apeiros_>
POODR = "Practical Object-Oriented Design in Ruby" ?
<banister`bbl>
yeah, the argument is fairly simple
bean has quit [Quit: Computer has gone to sleep.]
<apeiros_>
yes, dblacks' argument probably
<apeiros_>
change of implementation
<banister`bbl>
just that it allows you to perform refactors int he future like make tit more than a simple accessor
<banister`bbl>
yeah
sepp2k has joined #ruby
<apeiros_>
IME that rarely ever plays a role
<banister`bbl>
it isolates the dependency to one place
Joel has quit [Quit: ChatZilla 0.9.90 [Firefox 18.0.2/20130201065344]]
<banister`bbl>
so a future refactor doesn't require oyu to go around to every 'callsite' of the @var and update it
<apeiros_>
dependencies are *outwards*
dallasm has left #ruby [#ruby]
<apeiros_>
if you have to manage your *inner* dependencies, your code is IMO too complex
<banister`bbl>
it was just a turn of phrase, call it what you will :)
solancer has joined #ruby
<solancer>
hey guys quick question here'
<apeiros_>
ah, not arguing about the word. sorry if that was ambiguously
bradleyprice has joined #ruby
<apeiros_>
*ambiguous
joeycarmello has joined #ruby
<solancer>
is GAE better or Heroku ?
girija has quit [Ping timeout: 264 seconds]
<Spooner>
solancer, Are apples or oranges better? Depends what you are doing really (though I don't know much about either).
iamjarvo1 has quit [Quit: Leaving.]
`p has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
techhelp has quit [Read error: Operation timed out]
<Spooner>
solancer, For CRuby, Heroku wins, since you are rather limited to using JRuby on GAE.
blahwoop has joined #ruby
<solancer>
Spooner, well I have 2 sites that I want to host
spaceships has joined #ruby
bluOxigen has joined #ruby
<solancer>
Spooner, one with flask and the other ruby
<aedornm>
That would be "Complexity For Job Security in Ruby"
<Spooner>
banister`bbl, Canadian Forces Joint Signal Regiment
<banister`bbl>
lols
rickmasta has joined #ruby
bean has joined #ruby
dmiller has quit [Ping timeout: 255 seconds]
malkomalko has quit [Remote host closed the connection]
kold has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
shadowshell has joined #ruby
`p has joined #ruby
banjara has joined #ruby
<aedornm>
I have a ~17,000 line C++ code base that I rewrote in Ruby in about 160 lines. I'm not following CFJSR very well, my coworkers told me so. I told them I would spread the word of this style to make up for it!
hemanth has joined #ruby
Voodoofish430 has joined #ruby
ephemerian has joined #ruby
jpcamara has joined #ruby
banjara has quit [Client Quit]
skattyadz has quit [Quit: skattyadz]
<Spooner>
aedornm, Hanmac could rewrite it in Ruby in 4 lines.
<shevy>
lol
<waxjar>
anyone know whats up with rdoc.info / rubydoc.org? i keep getting blank pages, 50x errors, etc
mneorr has quit [Read error: Connection timed out]
elico has quit [Ping timeout: 248 seconds]
<apeiros_>
aedornm: factor 100 - *nice*
techhelp has joined #ruby
Mattx has joined #ruby
brianpWins has joined #ruby
duosrx has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
shadowshell has quit [Client Quit]
tjbiddle has joined #ruby
duosrx has joined #ruby
brum has joined #ruby
shadowshell has joined #ruby
shadowshell has quit [Client Quit]
BizarreCake has quit [Ping timeout: 248 seconds]
<aedornm>
Spooner: I know... I'm waiting for the Hanmac school of Designing Hard to Read Code That Actually Works.
jblack has joined #ruby
elico has joined #ruby
nachtwandler has joined #ruby
<Hanmac>
Spooner are the 4 lines including comments or are they extra?
<_bart>
At first this didn't make sense: Net::HTTP.get_response(URI.parse('http://asfdldskfjldfkjsdfkl.com')) # => #<Net::HTTPSeeOther 303 See Other readbody=true>
jlast has quit [Read error: Connection reset by peer]
<Spooner>
Hanmac, No, I was talking LoC, not full script.
<_bart>
which is not what I want, I want to check wether it's online..
<aedornm>
I have to say, it wasn't really ~17,000 lines of "working" code. That was only about 5,000ish. Finding those lines was like a treasure hunt, though. I felt like a won a prize every time!
Matip has quit [Ping timeout: 248 seconds]
shadowshell has joined #ruby
BizarreCake has joined #ruby
strg has quit [Ping timeout: 264 seconds]
<Spooner>
aedornm, C++ wheel of fortune!
marr has joined #ruby
bean has quit [Ping timeout: 255 seconds]
ph^ has quit [Remote host closed the connection]
sn0wb1rd has quit [Ping timeout: 276 seconds]
icole has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
codecop has joined #ruby
carloslopes has joined #ruby
<aedornm>
_bart: That would be a DNS issue. Change your DNS to something that doesn't inject crap you don't want, like 8.8.4.4.
samphippen has joined #ruby
bean has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
brum has quit [Ping timeout: 264 seconds]
zeade has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
samuelj has quit [Ping timeout: 245 seconds]
mpfundstein has quit [Remote host closed the connection]
<aedornm>
I know CenturyLink does wonderful DNS redirecting, for instance. Comcast started that also, and I think Verizon is on board with it now, too.
crunk has joined #ruby
statarb3 has quit [Read error: Connection reset by peer]
velCzupa has quit [Remote host closed the connection]
<sam113101>
I meant newlines in code though
irichlau2 has joined #ruby
dmiller has joined #ruby
nga4 has quit [Ping timeout: 276 seconds]
a_a_g has quit [Quit: Leaving.]
arietis has joined #ruby
oposomme has quit [Quit: Leaving...]
blahwoop has quit [Ping timeout: 246 seconds]
jrendell has quit [Quit: jrendell]
<rafrcruz>
I think that I already have ATLAS installed. I had some problems installing it, but it seems to be successfully installed. But now, when I try to do 'gem install nmatrix', I'm receiving this kind of error message: http://pastebin.com/WBm7ptVc
_nitti has quit [Ping timeout: 276 seconds]
_nitti has joined #ruby
kurkale6ka has quit [Quit: WeeChat 0.3.9.2]
undersc0re97 has quit [Read error: Connection reset by peer]
ouah has joined #ruby
mafolz has quit [Remote host closed the connection]
<ouah>
hi
ph^ has joined #ruby
noxoc has quit [Quit: noxoc]
kold has quit [Remote host closed the connection]
<ouah>
I don't know ruby, but I have a small script that "require 'pony'". pony is installed but I got the error "no such file to load -- pony"
<Xeago>
ouah: if you are on older versions of ruby, you mg]i
<Xeago>
might need to require rubgygems first
<ouah>
adding require "rubygems" fix the issues but I read that it is bad. How to correctly fix the issue?
<LiquidInsect>
ouah: upgrade to ruby 1.9 or higher
fedza has quit [Read error: Connection reset by peer]
sk87 has quit [Quit: sk87]
<ouah>
ruby is already the newest version
<LiquidInsect>
otherwise there's nothing wrong with requiring rubygems, it's necessary in 1.8
<LiquidInsect>
ouah: 2.0?
<ouah>
and ruby is 1.8 :(
undersc0re97 has joined #ruby
mockra has joined #ruby
<LiquidInsect>
that is not the newest version then
fedza has joined #ruby
<LiquidInsect>
don't use ruby from your OS's package manager if you want the latest version.
<LiquidInsect>
If you're going to stci with 1.8, just add the require 'rubygems' line
lkba has quit [Quit: Bye]
<LiquidInsect>
s/stci/stick/
filipe has quit [Remote host closed the connection]
<ouah>
apparantly it has also a ruby1.9.1 version in package, I will try that
<ouah>
thanks for the info
<LiquidInsect>
if you want to update, install rbenv with ruby-install, or rvm
skattyadz has joined #ruby
tylersmith has joined #ruby
<ouah>
ok
mneorr has quit [Read error: Connection timed out]
<LiquidInsect>
er, sorry, ruby-build
<LiquidInsect>
not ruby-install
dhruvasagar has quit [Ping timeout: 256 seconds]
ph^ has quit [Ping timeout: 264 seconds]
Virunga has joined #ruby
mneorr has joined #ruby
<ouah>
LiquidInsect: ruby 1.9.2p0 now but got the same error
Stilo has joined #ruby
<ouah>
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- pony (LoadError)
mneorr has quit [Remote host closed the connection]
<workmad3>
ouah: did you reinstall the gem for 1.9.2?
<LiquidInsect>
dude seriously, if you try to use the version installed with your OS, you're going to have a bad time
<LiquidInsect>
you may also need to install a rubygems package if you're going to do that
<ouah>
LiquidInsect: I'm on a compilation server and I try to not break the other stuff...
<ouah>
workmad3: good point, will check that
<LiquidInsect>
That's why rbenv/rvm are good. They install to your own home directory, not to /usr/bin
sailias has quit [Ping timeout: 248 seconds]
<LiquidInsect>
anyway. Check that you have rubygems installed for your version of ruby, and yeah, you'll need to reinstall the gem because different versions of ruby/rubygems have separate gems
banseljaj is now known as imami|afk
<ouah>
workmad3: seems only rubygems1.8 is available in package
<ouah>
so no, not the good version for 1.9
chrishough has quit [Quit: chrishough]
<workmad3>
ouah: rubygems is part of ruby in 1.9+
crunk has quit [Quit: crunk]
bean has quit [Ping timeout: 276 seconds]
musl has quit [Quit: WeeChat 0.3.9.2]
<ouah>
workmad3: so I installed ruby1.9.1 package, I should not install anything for rubygems, no?
<workmad3>
ouah: the real test is do you have a gem command for your ruby
<LiquidInsect>
^
whitedawg has quit [Remote host closed the connection]
thone_ has joined #ruby
<ouah>
workmad3: yes
<LiquidInsect>
then you're fine, just 'gem install pony' and try again
francisfish has quit [Remote host closed the connection]
<ouah>
version 1.3.7
Neomex has joined #ruby
<workmad3>
ewww
<LiquidInsect>
well. 'sudo gem install pony'
<workmad3>
so ancient
<LiquidInsect>
workmad3: that's why I'm pushing for rbenv
bean has joined #ruby
bean has quit [Max SendQ exceeded]
jlast has quit [Remote host closed the connection]
tommyvyo has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
undersc0re97 has quit [Read error: Connection reset by peer]
<workmad3>
ouah: do you have multiple gem commands? and if so, did you use the right one?
whitedawg has joined #ruby
<LiquidInsect>
you're sure you're running 1.9? If you have both installed, you might need to run differrent commands... I think apt-based systems work that way anyway
techhelp has joined #ruby
iamjarvo has joined #ruby
<workmad3>
^^ especially if you haven't switched 1.9 to your default using update-alternatives
lkba has joined #ruby
<ouah>
workmad3: good point, apparantly I have several gem commands, I will try the last version
<LiquidInsect>
ah, forgot that exists. Been forever since I had to bother with it
<ouah>
workmad3: exactly
Eldariof-ru has joined #ruby
thone has quit [Ping timeout: 255 seconds]
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
Takehiro_ has quit [Remote host closed the connection]
<ouah>
hippa!
<ouah>
it works now
yacks has joined #ruby
<ouah>
thanks for your help workmad3 and LiquidInsect
larissa has quit [Quit: Leaving]
<workmad3>
ouah: for less pain, I'd echo LiquidInsect's advice of using something like rbenv, chruby or rvm btw
stkowski has joined #ruby
tjbiddle has joined #ruby
cmyers has left #ruby [#ruby]
chrishough has joined #ruby
j^2 has joined #ruby
<workmad3>
ouah: but glad you're sorted for now :)
ryanf has quit [Quit: leaving]
dblack__ has joined #ruby
beiter has joined #ruby
<ouah>
workmad3: good to know, I'm not familiar with the ruby world
<workmad3>
ouah: distro packages for ruby have a tendency to be oddly mangled and out of date
eldariof has quit [Ping timeout: 255 seconds]
kold_ has joined #ruby
f0ster has quit [Remote host closed the connection]
joofsh has joined #ruby
BizarreCake has quit [Ping timeout: 260 seconds]
<workmad3>
ouah: they also tend to increase the overhead for switching ruby versions, which can be quite common on a ruby dev machine (especially if you're developing gems and want to test against multiple patchlevels of the same version)
backjlack has quit [Remote host closed the connection]
ozgura has quit [Remote host closed the connection]
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<workmad3>
ouah: so there's a host of ruby version managers that ease the pain of installing multiple versions and easily switching between them, and they'll also let you do that in userspace rather than root, so you don't need sudo access to do things like install gems
<workmad3>
ouah: overall, they just lead to less pain and confusion in the long run :)
joofsh has quit [Remote host closed the connection]
<LiquidInsect>
rvm is an all-in-one solution, rbenv and chruby depend on another package called ruby-build to actually build and install rubies
elaptics is now known as elaptics`away
BizarreCake has joined #ruby
<aedornm>
speaking of Ruby installs... they really need to add an uninstall option in the Makefile.
srg__ has joined #ruby
<LiquidInsect>
wow, there isn't one? that's a hell of an oversight.
joofsh has joined #ruby
NiteRain has joined #ruby
<workmad3>
aedornm: yet another thing that rvm, rbenv and chruby make easier :) 'rm -rf ~/.rubies/<version>' for chruby ;)
dmerrick_ has joined #ruby
<LiquidInsect>
similar for the others too. Everything self-contained.
erry is now known as ^erry
dmerrick_ has quit [Client Quit]
casheew has quit [Read error: Connection reset by peer]
rupee has joined #ruby
<ouah>
ok, interesting
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
casheew has joined #ruby
zzing has quit [Quit: Computer has gone to sleep.]
^erry is now known as erry
mlr has quit [Quit: Lost terminal]
dmerrick_ has joined #ruby
mlr has joined #ruby
casheew has quit [Read error: Connection reset by peer]
timmow has quit [Ping timeout: 252 seconds]
<apeiros_>
self-contained++
dmerrick has quit [Ping timeout: 264 seconds]
dmerrick_ is now known as dmerrick
<apeiros_>
more stuff on *nix should be self-contained
breakingthings has quit []
<aedornm>
workmad3: I have no argument. I tried to type one out for the past few minutes, but came up with nothing. So uh... they should still have an option at least!
mahmoudimus has joined #ruby
mneorr has joined #ruby
dhruvasagar has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
spaceships has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
NiteRain has quit [Ping timeout: 246 seconds]
jonahR has quit [Quit: jonahR]
mneorr has quit [Remote host closed the connection]
<aedornm>
apeiros_: Chakra Linux has bundles. The system is mostly a Qt/KDE based one, but if you want something GTK they don't have the actual libs for it installed. So, if you want Firefox, you download a bundle which is entirely self contained. It uses a loop device to extract it, and you can use it without the libs anywhere else on the system
<LiquidInsect>
yeesh. Why don't they just statically-link it, if you're going to go to that extreme?
pskosinski has joined #ruby
Spooner has quit [Remote host closed the connection]
<LiquidInsect>
or can other apps use the gtk libs in that other loopbacked FS if they need to?
<LiquidInsect>
anyway. Interesting solution.
alv-r- has joined #ruby
Al__ has quit [Ping timeout: 240 seconds]
c0rn has joined #ruby
Guest69846 has quit [Read error: Operation timed out]
adeponte has quit [Remote host closed the connection]
<aedornm>
LiquidInsect: I honestly don't know, but it would be interesting to see a Ruby environment set that way. Have one app to change the loop device for each Ruby version. Don't want it anymore, just delete the package. No messy environment variables to clean up
<aedornm>
Granted, they aren't the first to do it, but they have done it the best so far. (my opinion)
mneorr has joined #ruby
mrsolo has joined #ruby
brum has joined #ruby
c0rn has quit [Ping timeout: 264 seconds]
otherj has joined #ruby
mneorr has quit [Remote host closed the connection]
gosshedd has joined #ruby
c0rn has joined #ruby
twoism has joined #ruby
LS\MFT has joined #ruby
mr-rich has joined #ruby
ouah has quit [Quit: leaving]
digifiv5e has joined #ruby
kold_ has quit [Remote host closed the connection]
digifiv5e is now known as Guest46928
<mr-rich>
Why is Ruby 1.9.1 not supported? Was there an issue with that version?
<LS\MFT>
Hi
khismetix has joined #ruby
twoism_ has joined #ruby
twoism has quit [Read error: Connection reset by peer]
etcetera has quit []
<apeiros_>
mr-rich: 1.9.1 was a developer release
<apeiros_>
never intended for production
brum has quit [Ping timeout: 264 seconds]
adeponte has joined #ruby
<yxhuvud>
it did certain things in ways that broke with later releases, and noone wanted to support a version noone had any reason whatsoever to use.
<mr-rich>
Are odd numbered versions developer releases?
<jblack>
I think mechanize 2.5.1 is the one that's magically distirbuted via the gem system, and it looks like there's a 2.5.2 in git, and a pile of unreleased changes on that
<jblack>
how do I check if there's a -pre or whatnot
<jblack>
looks like -r -a
Mon_Ouie has joined #ruby
srg__ has joined #ruby
Zta has quit [Ping timeout: 255 seconds]
backjlack has joined #ruby
<jblack>
no. most recent in gem is 2.5.1. I need what will presumably become 2.5.3
apok has joined #ruby
squidBits has joined #ruby
takeru has quit [Ping timeout: 260 seconds]
krz has quit [Quit: krz]
noxoc has joined #ruby
krawchyk_ has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
tenmilestereo has joined #ruby
ahokaomaeha has joined #ruby
colonolGron has quit [Quit: leaving]
kofno has joined #ruby
<havenwood>
jblack: you can clone the gem repo and `gem build` then gem
<havenwood>
s/then/the
squidBits_ has joined #ruby
mpfundstein has quit [Remote host closed the connection]
<apeiros_>
havenwood: you're late with that :-p
adeponte has quit [Remote host closed the connection]
<havenwood>
apeiros_: oops!
malkomalko has joined #ruby
squidBits has quit [Read error: Connection reset by peer]
* havenwood
goes in search of coffee!
<jblack>
I'll google up the details havenwood. Effectively a git clone, cd & gem build, and gem install ./ or somesuch?
<havenwood>
jblack: yup
atno has quit [Remote host closed the connection]
krawchyk has quit [Ping timeout: 264 seconds]
jpcamara has joined #ruby
<havenwood>
jblack: what apeiros_ said above ^^
squidBits has joined #ruby
sailias has joined #ruby
atno has joined #ruby
dmiller has quit [Ping timeout: 255 seconds]
<jblack>
I didn't quite catch what he said before, but I get it now
calveto has joined #ruby
elico has quit [Ping timeout: 244 seconds]
Zta has joined #ruby
emanu has joined #ruby
ozgura has joined #ruby
squidBits_ has quit [Ping timeout: 255 seconds]
mpfundstein has joined #ruby
bricker has joined #ruby
elico has joined #ruby
mpfundstein has quit [Remote host closed the connection]
sandGorgon has joined #ruby
Zta has quit [Client Quit]
Zta2 has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
nkr has quit [Ping timeout: 252 seconds]
shiningblue has joined #ruby
renanoronfle has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<jblack>
Is monkey patching generally considered an abomination, or more of a pragmatic necessity?
Zta2 has quit [Read error: Connection reset by peer]
<apeiros_>
it's suggested to be used with a lot of care
<apeiros_>
ruby 2.0's refinements make it easier
mpfundstein has joined #ruby
Zta has joined #ruby
mneorr has quit [Read error: Connection timed out]
<jblack>
do you think it would make sense for me to just snag the #start/#shutdown code from git (since it's surely well isolated), and do a conditional monkey patch until they eventually release a fix with it?
yshh has quit [Remote host closed the connection]
mneorr has joined #ruby
schaerli has quit [Remote host closed the connection]
<apeiros_>
and that thread says what the return value is for
answer_42 has quit [Ping timeout: 276 seconds]
etcetera has joined #ruby
dankest has quit [Client Quit]
<apeiros_>
and if by "he" you mean "huismon", then I think you misunderstood his question.
<huismon>
question: does require have to be at the top, or can I throw it into blocks?
Eldariof93-ru has quit []
<ClownZ>
maybe
<ClownZ>
and no it can be anywhere you want
<huismon>
ok that helps :)
<apeiros_>
huismon: it's ordinary code
<apeiros_>
you can put it anywhere
<apeiros_>
it's suggested to put it at the top, though. for clarity.
<huismon>
but then it follows scope rules right
<apeiros_>
what scope rules do you mean?
<huismon>
variable scope
<apeiros_>
a require changes the scope anyway
<huismon>
yeah, its just a custom facter fact, and its a require to the mysql library, the fact is being pushed to every host but it should only work on mysql hosts and the module only exists on them, so I have to put the require in some hostname logic.
<apeiros_>
code executed through require is always executed in the toplevel namespace in its own local variable scope.
jmaya has quit [Quit: jmaya]
<huismon>
k
hackeron has quit [Read error: Connection reset by peer]
sonda has quit [Remote host closed the connection]
hbpoison has joined #ruby
yxhuvud has joined #ruby
Morkel_ has joined #ruby
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
<elliottcable>
o7, all. Been a while since I Ruby'd. What's the best way to load a project/gem that's in another directory on your system, into your current project?
<apeiros_>
define best
<elliottcable>
canonical. idiomatic.
MehLaptop has joined #ruby
<apeiros_>
during development - probably just add the lib dir to $LOAD_PATH via -I flag
hackeron has joined #ruby
<apeiros_>
else: just install the gem and don't worry
mpfundstein has joined #ruby
<elliottcable>
I've been using Node for quite a while; I'm looking for something like `npm link`, I guess, for RubyGems.
Jeaye has joined #ruby
<elliottcable>
related, I'm using RVM. Maybe there's some trick with it that's appropriate?
<elliottcable>
hm. just install the gem and don't worry.
kirun has joined #ruby
<elliottcable>
perhaps use a custom RVM gemset for my own code? Does that sound sane?
jamesfung14 has quit [Quit: Leaving]
jamesfung14 has joined #ruby
baphled has quit [Read error: Connection reset by peer]
_MJ_4Q_ has quit [Remote host closed the connection]
m00dy_ has joined #ruby
shevy has joined #ruby
m00dy_ has left #ruby [#ruby]
<apeiros_>
I see no reason for that
hbpoison has quit [Remote host closed the connection]
Chryson has joined #ruby
hbpoison has joined #ruby
Vivid_ has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
nachtwandler has quit [Quit: leaving]
jamesfung14 has quit [Client Quit]
jamesfung14 has joined #ruby
butter-fly has joined #ruby
sandGorgon has quit [Ping timeout: 272 seconds]
icole has joined #ruby
<elliottcable>
perhaps use a custom RVM gemset for my own code? Does that sound sane?hassup
philcrissman has joined #ruby
Stilo has joined #ruby
nachtwandler has joined #ruby
<elliottcable>
... oops.
sparklr has left #ruby [#ruby]
khismetix has quit [Quit: Computer has gone to sleep.]
emanu has quit [Quit: emanu]
baphled has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
hadees has joined #ruby
khismetix has joined #ruby
hbpoison has joined #ruby
bean__ has joined #ruby
hackeron has quit [Read error: Connection reset by peer]
bean has quit [Ping timeout: 240 seconds]
baphled has quit [Read error: Connection reset by peer]
bean__ is now known as bean
dougireton has joined #ruby
adeponte has joined #ruby
chrishough has quit [Quit: chrishough]
Takehiro has joined #ruby
Retistic has quit [Quit: Retistic]
butter-fly has left #ruby [#ruby]
<apeiros_>
I mean you can do that. but it's added effort, and I don't see the benefit you gain for that added effort.
Retistic has joined #ruby
hackeron has joined #ruby
hbpoison has quit [Ping timeout: 248 seconds]
nomenkun has joined #ruby
jmaya has quit [Quit: jmaya]
havenwood has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 276 seconds]
slainer68 has joined #ruby
havenwood has joined #ruby
hbpoison has joined #ruby
yshh has joined #ruby
jocellyn has quit [Quit: Leaving.]
Takehiro has quit [Ping timeout: 260 seconds]
_MJ_4Q_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
<alv-r->
if I have a member of a class that is an array, can I define some method like var<< ?
<alv-r->
so when I do: array.var << 1, I can do something else
<alv-r->
like changing 1 for "one", for example
havenwood has quit [Read error: Operation timed out]
<alv-r->
I mean, obj.arr << 1
ryanf has joined #ruby
<apeiros_>
alv-r-: no
<apeiros_>
foo<< is not a valid method name
philcrissman has joined #ruby
<apeiros_>
your `foo` method would have to return an object which responds to `<<`
<apeiros_>
strip will remove all surrounding whitespace
emergion has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
brum has joined #ruby
Gue______ has joined #ruby
elaptics`away is now known as elaptics
Gue______ is now known as Guest123
<ouah>
apeiros_: yes but here "git config user.email" should not output any whitespace
dblack__ has quit [Quit: dblack__]
<ouah>
oops misread, yes chomp
spider-mario has quit [Read error: Connection reset by peer]
<apeiros_>
"X should not Y" is never a good excuse to use the wrong tool :-p
<Guest123>
can someone provide me a good ruby regex that matches ONLY on ruby-like variables? (i.e. "this_matches_well" but "_this_doesn_not", "this_doesn't", "thisDefinitelyDoesnt", etc)
<Xeago>
apeiros_: in this case it would be safer to exclude any spaces
<apeiros_>
Guest123: _this_is_a_valid_var_in_ruby
<Xeago>
as spaces in e-mail addresses should be wrapped in quotes
<Guest123>
i.e. allow only all lowercase, and underscores if they are not at the beginning or end of the variable
<Xeago>
I read the standard :P
<ouah>
apeiros_: elegant code assumes ressources are scarce, no useless stuff;)
<Guest123>
apeiros_ point taken, but I would like to restrict to my previous example
<apeiros_>
Guest123: what did you try so far?
<Guest123>
apeiros_ so, all lowercase only, and underscores if they do not occur at the edges of the string
dougireton has joined #ruby
bean has quit [Read error: Connection reset by peer]
<ClownZ>
hey babes whats the name of that gem that enable you to scrape an html code?
mneorr has joined #ruby
Slivka has quit [Ping timeout: 248 seconds]
<apeiros_>
ClownZ: nokogiri parses html, if that's what you mean
<workmad3>
Guest123: it's not that hard a regex to construct, consider it a learning experience for regexes ;)
bean has joined #ruby
<ClownZ>
yes! that one thanks apeiros, i just forgot its name ;)
<Guest123>
apeiros_ I have tried this: [a-z]+_?[a-z]+
brum has quit [Ping timeout: 264 seconds]
<csmrfx>
Guest123: rubular.com
<apeiros_>
Guest123: close. [a-z] to require starting with lowercase char is good. you'll want to move the _ into the second character group
horofox has quit [Quit: horofox]
<csmrfx>
([a-z]+_)
ebobby has quit [Ping timeout: 256 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
<Hanmac>
i have this: /[[:lower:]_][[:alnum:]_]+/
<apeiros_>
[a-z][a-z_]* - now the question is whether trailing _ is ok
<csmrfx>
hm, maybe one-or-more after _
<csmrfx>
lol zero-or-more, naturally
<Hanmac>
right /[[:lower:]_][[:alnum:]_]/
<Guest123>
apeiros_ so, I only want it to match if the entire string matches the regex though
<Hanmac>
right /[[:lower:]_][[:alnum:]_]*/ is better
<workmad3>
/[a-z][a-z_]*/ would get close, but allows a trailing _
testingb0t has quit [Quit: Leaving.]
<Guest123>
[a-z]+[_a-z]+
<apeiros_>
Guest123: that's what you use anchoring for
<apeiros_>
/\A[a-z][a-z_]*\z/
<Guest123>
^[a-z]+[_a-z]+$
<ClownZ>
how do you check the doc file of any gem u got installed?
<apeiros_>
no, \A, not ^, and \z, not $
<apeiros_>
^ and $ are for line-start/-end
<apeiros_>
\A and \z is for string-start/-end
hiroyuki has quit [Ping timeout: 272 seconds]
<apeiros_>
ClownZ: ri, or `gem server`
<workmad3>
apeiros_: I'd have though \b would be better here
<workmad3>
*thought
<ClownZ>
thanks
_carloslopes has quit [Remote host closed the connection]
<apeiros_>
workmad3: he said "the whole string"
<DDark>
Hey All, I have a string like str= 'class1,class2,class3:k=v:k1=v1,test-class'. Im assembling a hash like str.split(",").inject({}) { |h, e| k, v = e.split(":"); h[k] = v ? Hash[*v.split("=")] : v; h }. I am getting {"test-class"=>nil, "class3"=>{"k"=>"v"}, "class2"=>nil, "class1"=>nil} which is partially correct.
<Guest123>
apeiros_ if I try this: \A[a-z]+[_a-z]+\z
<Guest123>
that still matches when there is a trailing underscore
<apeiros_>
if he'd said "extract from the string", then yes
<workmad3>
apeiros_: true, need more info on what 'the whole string' means
<DDark>
notice the class3 should have k1 => v1 also
<DDark>
WHy is split stopping on the first : match?
<apeiros_>
Guest123: that one still allows trailing _, though. not sure whether you said that was ok or not.
sebastorama has joined #ruby
<Guest123>
apeiros_ I would like to exclude leading/trailing underscores
<apeiros_>
Guest123: what's the minimum length of the string?
<Guest123>
there is none
<Hanmac>
what about numbers?
<apeiros_>
well, there is
<apeiros_>
1 in that case
banseljaj is now known as imami|afk
<Guest123>
apeiros_ just so long as it follows the pattern of all lowercase letters with underscores ONLY if they exist inside the lowercase letters
<Guest123>
Hanmac no numbers
<apeiros_>
/\A(?:[a-z](?:[a-z_][a-z]*)?\z/
<apeiros_>
one option
mikepack has joined #ruby
horofox_ has joined #ruby
<apeiros_>
/\A(?:[a-z]|[a-z][a-z_][a-z]\z/ # another option
dmiller has joined #ruby
<workmad3>
hmm, /[a-z]([a-z]|[a-z]_[a-z])*/
<apeiros_>
whoops, I accidentally the quantifier
<apeiros_>
/\A(?:[a-z]|[a-z][a-z_]*[a-z]\z/ # another option
chrishough has joined #ruby
<csmrfx>
bah! /([a-z]+_{1})(\w+)/
<csmrfx>
E-z
<apeiros_>
csmrfx: incorrect solution :-p
<csmrfx>
I got bored the half way through
nomenkun has quit [Remote host closed the connection]
<workmad3>
I repeat - /[a-z]([a-z]|[a-z]_[a-z])*/
<Guest123>
csmrfx your regex allows for trailing underscores
<apeiros_>
/\A[a-z][a-z_]*(?<=[a-z])\z/ # yet another option
jankly has joined #ruby
centipedefarmer has joined #ruby
<DDark>
When I split outside the inject block split works on all matches. Do i need to iterate again? I didnt think that was needed.
<apeiros_>
oh my… I misplaced the quantifier in the first option
<workmad3>
although /\A[a-z]([a-z]|_[a-z])*\z/ might be better
<apeiros_>
A) /\A(?:[a-z](?:[a-z_]*[a-z])?\z/
<apeiros_>
B) /\A(?:[a-z]|[a-z][a-z_]*[a-z]\z/
<apeiros_>
C) //\A[a-z][a-z_]*(?<=[a-z])\z/
ouah has quit [Quit: leaving]
F1skr has joined #ruby
icole has quit [Remote host closed the connection]
pandawarrior1 has joined #ruby
<Guest123>
apeiros_ this seems to work just fine: \A(?:[a-z](?:[a-z_]*[a-z]))?\z
<Guest123>
however, can we restrict to only ever 1 underscore in a sequence?
<apeiros_>
in the whole string?
<workmad3>
Guest123: whole string? or just no __'s ?
<apeiros_>
or just disallow multiple _'s in sequence?
<workmad3>
Guest123: would_this_be_ok ?
<csmrfx>
_{1,}
burgestrand has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
<csmrfx>
bah, thats {1}
<csmrfx>
not my day
<Guest123>
apeiros_ workmad3 only allow one underscore per occurrence
dougireton has quit [Remote host closed the connection]
sailias1 has joined #ruby
dankest has quit [Remote host closed the connection]
dankest has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
ebobby has joined #ruby
geekbri has quit [Remote host closed the connection]
<DDark>
when doing str.split(",").inject({}) {|h,s| p s.split(":");h } i get what I expect. When I try to assign it like str.split(",").inject({}) {|h,s|k, v = s.split(":"); p v ;h }. Split stops on the first colon :
<DDark>
Ive tried adding a limit to split when assigning to v, but it doesnt seem to help.
timonv has quit [Remote host closed the connection]
<apeiros_>
DDark: split does not stop on the first colon. but you only have 2 variables to assign the values.
dougireton has joined #ruby
headius has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
<DDark>
apeiros_: Im trying to contstruct that string into a hash with the following str.inject({}) { |h, e| k, v = e.split(":"); h[k] = v ? Hash[*v.split("=")] : v; h }
etcetera has quit [Read error: Operation timed out]
<DDark>
so its getting truncated
<apeiros_>
I don't know what result you expect
mockra has joined #ruby
dankest has quit [Quit: Leaving...]
ewilliam has joined #ruby
whowantstolivefo has quit [Ping timeout: 272 seconds]
mpfundstein has quit [Remote host closed the connection]
banister`bbl is now known as banisterfiend
<DDark>
ok so take the following
hiall has quit [Quit: hiall]
<apeiros_>
DDark: you may want to make a gist
<apeiros_>
(gist.github.com)
<DDark>
str = "foo,bar,baz:k1=v1:k2=v2,foo-bar" What I am trying to accomplish is {"foo-bar"=>nil, "foo"=>nil, "baz"=>{"k2"=>"v2", "k1"=>"v1"}, "bar"=>nil}
jjbohn has joined #ruby
<DDark>
What im getting wiht the above inject is {"foo-bar"=>nil, "foo"=>nil, "baz"=>{ "k1"=>"v1"}, "bar"=>nil} So the other key value pair is being dropped off the cliff as you stated.
otherj has joined #ruby
ewilliam has quit [Client Quit]
etcetera has joined #ruby
<DDark>
k making a gist
<apeiros_>
DDark: start with `str = "baz:k1=v1:k2=v2"`, try to find a solution for str -> {"k2"=>"v2", "k1"=>"v1"}
headius has quit [Quit: headius]
<DDark>
I am able to do it with a regex pretty easy, but when I add a hyphen to the string the regex breaks as the hyphen gets interpreted as a range by the regex
<apeiros_>
the logic is somewhat odd, though. : is 2 things there - the separator of the "toplevel key" (or however you want to call 'baz') and also the separator of the rest
<apeiros_>
DDark: \ escapes
<apeiros_>
[a\-z] <-- a, - or z
<apeiros_>
alternatively you can place it at the edge: [-az] or [az-]
<DDark>
hmmm ill give that a shot. Id like to avoid regex due to the performance of regex in general, but i guess it may be needed.
jpcamara has joined #ruby
<apeiros_>
"due to the performance of regex in general" o0
piotrj has joined #ruby
<apeiros_>
I think you're ill-informed about ruby, regexen and performance…
<DDark>
apeiros_: I could indeed be misinformed. I just know from writing some small C extensions in unix that regex takes a lot more cpu/ram than substr etc
philcrissman has quit [Remote host closed the connection]
Proshot has quit [Ping timeout: 255 seconds]
<DDark>
ok cool. Much appreciated.
anderse has quit [Quit: anderse]
adeponte has quit [Remote host closed the connection]
<Hanmac>
Spooner: i want a method like: enum.more_than(6) { ... } and it returns true if the internal select finds more than 6 elements, ( it breaks with true at the 7th true element)
adeponte has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
icole_ has quit [Ping timeout: 244 seconds]
poikon_work has quit [Ping timeout: 264 seconds]
<Spooner>
Mmm
woolite64_ has joined #ruby
<Hanmac>
or a less_than method
peregrine81 has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
woolite64 has quit [Ping timeout: 264 seconds]
<Spooner>
Hanmac, Maybe for Ruby 2.1 eh?
otherj has quit []
spacemud has quit [Read error: Connection timed out]
nazty has quit [Read error: Connection reset by peer]
LouisRoR has joined #ruby
SCommette has quit [Quit: SCommette]
otherj has joined #ruby
nari has joined #ruby
<apeiros_>
Hanmac: what stops you from implementing it?
<apeiros_>
it's a 1 liner, I'd say
<Spooner>
Nah, I bet Hanmac could write it in 0 lines.
<apeiros_>
def more_than?(n); n+=1; each { |x| return true if n.zero?; n-=1 if yield(x) }; false; end (ok, 5 liner)
adamjleonard has quit [Quit: Leaving...]
chussenot has joined #ruby
<apeiros_>
well, could drop the n+=1, use n<0 instead of n.zero?
vabenjamin has quit [Ping timeout: 252 seconds]
malkomalko has joined #ruby
<Honeycomb>
Why are Rails developers compensated so well? 70-130k salaries for people with little-to-no experience with Rails… I've seen 80k salaries for people who know Python and are willing to learn Rails...
squidBits has quit [Quit: whoops]
maligree has quit [Quit: I've had it.]
<apeiros_>
maybe even clueless pump out more with rails than experienced with other languages?
<Spooner>
apeiros_, You could "each {...} && false" and save another line!
<apeiros_>
you'd have to ask the employers…
<apeiros_>
Spooner: you can't know!
<apeiros_>
maybe somebody included Enumerable into nil!
<Spooner>
Yeah, must avoid that possibility :D
dmerrick has joined #ruby
peregrine81 has joined #ruby
newUser1234 has quit [Remote host closed the connection]
breakingthings has quit []
newUser1234 has joined #ruby
<Honeycomb>
Any employers willing to chime in? Hahaha
<Spooner>
Honeycomb, I'd assume that there are 3 jobs out there for every actual Rails guy to put them in such high demand.
interactionjaxsn has quit [Remote host closed the connection]
<Spooner>
I heard that someone was using PHP for their startup because they literally couldn't find any Rails people :D
jamie_ca has joined #ruby
araujo has quit [Ping timeout: 260 seconds]
<Spooner>
(Though I feel there have to be OTHER options than PHP).
wmoxam has quit [Ping timeout: 264 seconds]
alanp_ has joined #ruby
<apeiros_>
well, we had trouble finding competent rails developers
<apeiros_>
that is, we had trouble to find rails developers to start with
<Spooner>
Competent Rails dev is an oxymoron ;)
* apeiros_
considers himself competent
beiter has quit [Quit: beiter]
<apeiros_>
but then again, being the apeiros, I'm the origin of oxymorae
railsbros_dirk has quit [Quit: railsbros_dirk]
bradleyprice has joined #ruby
<DanKnox>
Honeycomb: where are these jobs at? I could definitely use a salary bump
<Honeycomb>
San Francisco
<DanKnox>
I'm also willing to move
<DanKnox>
in San Diego now
<apeiros_>
ugh, usa…
newUser1234 has quit [Ping timeout: 252 seconds]
<Honeycomb>
Just look on Stack Overflow and Dice
<Spooner>
Is that even a real place? I thought they made it up for movies.
techhelp has quit [Quit: Leaving]
<DanKnox>
I guess I should start paying attention to those sidebars
<DanKnox>
Spooner: SF or SD?
hiall has joined #ruby
<Spooner>
DanKnox, USA
<DanKnox>
lol
dbck has joined #ruby
spacemud has joined #ruby
kirun has quit [Quit: Client exiting]
<Honeycomb>
There's probably a lack of job security, too
alanp has quit [Ping timeout: 276 seconds]
Banistergalaxy has joined #ruby
bricker_ is now known as bricker
zoonfafer has joined #ruby
_MJ_4Q_ has quit [Remote host closed the connection]
<Honeycomb>
Doesn't matter to me, though
<Spooner>
But if 8the streets are paved with 80+k jobs, that matters less.
<Honeycomb>
Yeah, exactly
alanp_ is now known as alanp
xibalba has joined #ruby
dustint has quit [Quit: Leaving]
otherj has quit []
blacktulip has quit [Remote host closed the connection]
<Spooner>
I'm obviously in the wrong business. But Rails...it is, you know, _Rails_.
Takehiro has joined #ruby
irichlau2 has quit [Ping timeout: 272 seconds]
snearch has joined #ruby
piotrj has quit [Remote host closed the connection]
<DanKnox>
if you code Rails correctly you spend more time writing plain old ruby objects then Rails BS
<DanKnox>
ActiveRecord should not be the primary source of logic in your app
<DanKnox>
IMHO
snearch has quit [Max SendQ exceeded]
adeponte has quit [Remote host closed the connection]
<DanKnox>
YMMV
<DanKnox>
all that
<apeiros_>
DanKnox: right, the DB should!
<DanKnox>
lol
<apeiros_>
;-) *scnr*
j^2 has quit [Ping timeout: 255 seconds]
adeponte has joined #ruby
<apeiros_>
that said - the number of views, triggers and stored procedures has grown significantly in the last few years…
harumph has quit [Ping timeout: 252 seconds]
<apeiros_>
(in the company I work)
<DanKnox>
yeah the place i am currently working for has a ton of t hem
<DanKnox>
them
<DanKnox>
terrible legacy design
maxmanders has quit [Quit: Computer has gone to sleep.]
nilobject has joined #ruby
Guedes has joined #ruby
[[johnonymous]] has quit [Quit: Computer has gone to sleep.]
<Honeycomb>
I'm taking a leave from school to work on my own projects, and I thought that I'd have to work at Starbucks or something (starving artist) to pay the rent, but they're offering 80k, the latest computer hardware and more, for a tiny fraction of my skill set… I'd expect them to want somebody who has a solid portfolio, but they seem to want people who have completed Michael Hartl's tutorial and worked on at least one project, which is fine by
noxoc has quit [Quit: noxoc]
<apeiros_>
Honeycomb: um, go for it?
Takehiro has quit [Ping timeout: 264 seconds]
<apeiros_>
I mean… if they're throwing money at you, why would you want to stop them?
<aedornm>
I regularly stop companies from throwing money at me.. those coins hurt!
<DanKnox>
Honeycomb: where is this at?
<DanKnox>
any other openings? =D
<Spooner>
If it is too much money, you can post some of it to us.
<apeiros_>
aedornm: sign that you earn too little - or they'd be throwing paper at you…
<DanKnox>
i know... SF but would you mind mentioning the company specifically?
<apeiros_>
then again… 120k in paper might hurt too
samphippen has joined #ruby
solidoodlesuppor has quit [Remote host closed the connection]
<Spooner>
You can PM it if you don't want to tell the whole world.
<DanKnox>
that works for me
<aedornm>
apeiros_: pennies and peanuts
jlast has quit [Remote host closed the connection]
<Honeycomb>
Yeah, it is too much money; I'm willing to take half the salary and come in half the time
* apeiros_
has to earn the money being thrown at him tomorrow
<Honeycomb>
LOL
centipedefarmer has quit [Remote host closed the connection]
<Honeycomb>
I just want to pay the rent so I can work on my own projects
<Spooner>
Honeycomb, Don't we all wish that. High paying part time jobs would be great.
asdfqwer has quit []
hck89 has quit [Ping timeout: 248 seconds]
horofox_ has quit [Quit: horofox_]
s__dana has quit [Quit: s__dana]
babykosh has quit [Ping timeout: 255 seconds]
<brum>
so many decent looking ruby jobs in sf
<brum>
how many years do you think this will last?
s__dana has joined #ruby
mercwithamouth has joined #ruby
<Honeycomb>
I don't know
<Honeycomb>
The problem is that I want to go back to LA, so I'll probably have to take a pay cut
<Honeycomb>
The standards are even lower there, though
<Honeycomb>
I feel sorry for other developers who have to deal with high standards and low pay
DDark has quit [Quit: Page closed]
* Spooner
coughs.
<Honeycomb>
lol
jsilver has joined #ruby
jjbohn is now known as jjbohn|afk
nilobject has quit [Quit: nilobject]
jblack has joined #ruby
postmodern has joined #ruby
gyre007 has quit [Read error: Operation timed out]
<Spooner>
Honeycomb, Though I'm foolishly going the remote contractor way, which is a global market.
nilobject has joined #ruby
carlyle_ has quit [Remote host closed the connection]
<Honeycomb>
Some places accept remote applicants, but not many
apeiros_ has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
mneorr has quit [Read error: Connection reset by peer]
<Honeycomb>
They want somebody sitting in their office that they can show to investors
<Honeycomb>
Hahaha
jjbohn|afk is now known as jjbohn
<Spooner>
Plenty of Rails work on that platform too.
<jblack>
I've been working for a contract remotely for 11 months.
jjbohn has quit [Quit: Leaving...]
monkegjinni has quit [Remote host closed the connection]
<jblack>
after 11 months of proving my chops to him, he -still- wanted me to move..
<Spooner>
Ha!
<jblack>
He just stopped taking no for an answer and started throwing cash at my objections. I pick up the moving truck tomorrow. :P
<aedornm>
My home 'office' is better than my work office in terms of equipment. It's depressing.
fire has quit [Ping timeout: 264 seconds]
<jblack>
Oh, right. I'm -far- more better efficient as a contractor. they get the 4 hours a day I"m productive, no more, no less. They don't pay for that first two cups of coffee in the morning..
ner0x has joined #ruby
<Honeycomb>
LOL
dv_ has quit [Ping timeout: 252 seconds]
<jblack>
They dont' care. _still_ want me to move
stopbit has quit [Quit: Leaving]
mengu has quit [Quit: This computer has gone to sleep]
enebo has quit [Quit: enebo]
<jblack>
That's not a brag, just an observation for you, spooner
jpcamara has quit [Quit: jpcamara]
lewis has joined #ruby
<Spooner>
I didn't take it as such, jblack.
<lewis>
hi
<Spooner>
And the comment that when contracting they only get the productive hours is very true :D
nilobject has quit [Quit: nilobject]
tesuki has quit [Ping timeout: 244 seconds]
<jblack>
I don't know if they just don't get it, or if they don't care. The boss is just convinced that face to face communication is -that- much of a wijn
znode has joined #ruby
ph^ has quit [Remote host closed the connection]
peregrine81 has quit [Quit: Computer sleeping.]
bapa_ has joined #ruby
bapa has quit [Ping timeout: 240 seconds]
jrendell_ has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
LouisRoR has quit [Disconnected by services]
n8888 has joined #ruby
Bry8Star has quit [Remote host closed the connection]
jrendell has quit [Ping timeout: 264 seconds]
jrendell_ is now known as jrendell
Slivka has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
jsilver has quit [Remote host closed the connection]
freeayu has joined #ruby
icole has quit [Remote host closed the connection]
dbck has quit [Remote host closed the connection]
fire has joined #ruby
yuike has quit [Remote host closed the connection]
dbck has joined #ruby
jpcamara has joined #ruby
Bry8Star has joined #ruby
willob has joined #ruby
willob has quit [Max SendQ exceeded]
willob has joined #ruby
willob has quit [Max SendQ exceeded]
dbck has quit [Remote host closed the connection]
dv_ has joined #ruby
fir_ed has joined #ruby
adamjleonard has joined #ruby
willob has joined #ruby
kofno has joined #ruby
duosrx has quit [Remote host closed the connection]
jpcamara has quit [Client Quit]
_nitti has joined #ruby
chico_chicote has joined #ruby
Kuifje has quit [Ping timeout: 252 seconds]
anonymuse has quit [Quit: Leaving...]
<elliottcable>
I can't seem to push a rubygem
<elliottcable>
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/api/v1/gems)
theRoUS has quit [Ping timeout: 260 seconds]
danneu has quit [Quit: WeeChat 0.3.8]
digifiv5e has quit [Ping timeout: 272 seconds]
<Boohbah>
elliottcable: update your ssl certs
jsilver has joined #ruby
<elliottcable>
with what?
Sharker has quit [Quit: Saliendo]
kofno has quit [Read error: Connection reset by peer]
kofno has joined #ruby
n8888 has quit [Ping timeout: 260 seconds]
apeiros_ has joined #ruby
<Boohbah>
elliottcable: that depends on your OS
<elliottcable>
Er, I'm on OS X, and I'm not sure what you mean by “update them.”
<elliottcable>
As far as I know, they're “up to date.”
hiall has quit [Quit: hiall]
LouisRoR has joined #ruby
znode has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 246 seconds]
slainer68 has quit [Remote host closed the connection]