<dingus_khan>
i'm realizing that this is not a good design. sigh. can't tell if i'm making the wrong sorts of dependencies or not approaching abstracting out data reading the right way
mrevd has quit [Quit: Leaving.]
KU0N has quit [Ping timeout: 245 seconds]
nisstyre has quit [Quit: WeeChat 0.4.2]
Coincidental has quit [Remote host closed the connection]
<xybre>
dingus_khan: I've never found the CSV library very good, its very finicky, I've had to write my own parser.
<zenspider_>
you don't need to parse if it has regular data. data = line.split(/,\s*/) and then check data.size == known_size
<zenspider_>
if not, then pass that line off to CSV
<dingus_khan>
damn. that sucks, because that's not an option for me right now--is there a gem people recommend?
<zenspider_>
it's a TON faster so if you're working with bigger files, it is immediately worth it
linc01n has quit [Ping timeout: 248 seconds]
<dingus_khan>
that's a validation, though, right? how would that work if i'm not getting that final value?
<damien__>
Hello! Is it ok to cross post a question from #ruby here? not sure which channel to actually ask my question....
linc01n has joined #ruby-lang
<drbrain>
ask it here first
<drbrain>
:D
<damien__>
drbrain, k thank you :)
<damien__>
Working with a vagrant config file, I am trying to output the name of the ssh user, but I simply get an Object address, i.e. the code 'puts "Username: #{config.ssh.username}"' is producing this as the output: 'username: #<Object:0x000000026a9ee0>' everything I seem to do just keeps showing the object memory address instead of the value that I set (which was config.ssh.username = "ubuntu") I'm expecting to see "ubuntu", not an address.... any ideas/help?
cnivolle has quit [Remote host closed the connection]
<damien__>
I know it's a newb problem, haven't work enough with ruby yet to understand
nathanstitt has quit [Quit: I growing sleepy]
<|jemc|>
the output you're seeing is indicating to you that the object at config.ssh.username is an instance of the Object class
<|jemc|>
and that it is not a string as you believe it is
<damien__>
It was assigned with a string... like config.ssh.username="ubuntu", how did that turn into an object and how do i get the string value back out? to_s seems to just report the memory address...
<|jemc|>
your puts statement would correctly be printing: "Username: ubuntu" if config.ssh.username was the value that you think it is
<|jemc|>
I can't say where it would have be reassigned to Object.new
<damien__>
|jemc|, hmm k
<damien__>
|jemc|, ty
<|jemc|>
but given what you've said, it should be showing the output you expect
<|jemc|>
no problem
<damien__>
|jemc|, k hah ty, so I'm not just completely crazy :D
<damien__>
seems liek a reasonable assumption what I was at least trying to do? :)
<|jemc|>
yeah, your problem is elsewhere in parts of the code you haven't mentioned
<damien__>
k, yea for sure, I'm just interacting right in the middle of the vagrant stack and a config file, so I have really no idea how it's being processed at all...
retro|cz has quit [Ping timeout: 260 seconds]
Cakey has joined #ruby-lang
ruby-lang557 has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
kitak has joined #ruby-lang
<ruby-lang557>
Hi All. I've got myself completely lost in hashes and arrays in ruby
<ruby-lang557>
Know how I would do this in PHP (which would be very simple) but I'm getting lost in Ruby just beeing a complete noob...
<drbrain>
ruby-lang557: assuming @@ram_index is an Array
<drbrain>
if its a Hash maybe you want: @@ram_index[ram_item["capacity"]] = package["id"]
<damien__>
drbrain, good call I will check there
goatish_mound has joined #ruby-lang
rsl has quit [Read error: Connection reset by peer]
<damien__>
probably shoulda started there :)
MartynKeigher2 has quit [Quit: Bye for now!]
<drbrain>
damien__: I think it is the : on line 7 that was messing you up
<drbrain>
damien__: (ruby variables use _ instead of camel case, so I fixed that by habit)
<ruby-lang557>
drbrain: So, to be honest I'm not sure which I want (just want it to work.. :) ) So there are several package["id"] which are unique but have non unique ramItem["capacity"].
<dingus_khan>
zenspider_: thanks!
<drbrain>
ruby-lang557: can you paste the data too?
<ruby-lang557>
drbrain: So I want to turn it a bit on it's head to be able to pull out which package["id"]'s have a certain ramItem["capacity"] (say 8
<drbrain>
do this: require 'pp'; pp package
<ruby-lang557>
)
arBmind has quit [Quit: Leaving.]
madb055 has quit [Ping timeout: 248 seconds]
<drbrain>
if you paste the data along with your code we can find a solution
<drbrain>
ruby-lang557: so you want, say a list of package ids with a ram capacity of 64?
<ruby-lang557>
drbrain: Exactly
nisstyre has joined #ruby-lang
<drbrain>
you're close with your first paste
Coincidental has joined #ruby-lang
<ruby-lang557>
if so, pure luck (1000 monkeys with a typewriter type thing)
<drbrain>
I would write: packages.each { |package| package["activeRamItems"].each { |ram_item| @@ram_index << [package["id"], ram_item["capacity"] if ram_item["capacity"] == "64" } } }
<drbrain>
with newlines at the appropriate places
<drbrain>
oh, I missed a ] before the "if"
<ruby-lang557>
Aah, well, actually, what I want to do is to build some sort of an index/array/hash so that I can quickly look up any value later on
<drbrain>
so you have @@ram_index = {} ?
bantic has quit [Quit: bantic]
<ruby-lang557>
Well, I'm a noob so have tried various ways... Currently have @@ram_index = Hash.new(Array)
<ruby-lang557>
Which probably is not the way to do it... :)
* xybre
wonders why people are using class variables
hahuang65 has quit [Ping timeout: 260 seconds]
<drbrain>
xybre: I was leaving that for after solving the core problem :)
MartynKeigher has joined #ruby-lang
<drbrain>
ruby-lang557: do you want the index keyed by the package ID or the capacity?
dingus_khan has quit [Remote host closed the connection]
<ruby-lang557>
(i.e. in PHP I would have done a $ram_index[ram_item[capacity][]=package[id] )
<ruby-lang557>
so, by the package ID
michaeldeol has quit [Quit: Computer has gone to sleep.]
<ruby-lang557>
So if I look up the key 64 I'd get a list of all package[id]s that has 64 as an option, etc
michaeldeol has joined #ruby-lang
<ruby-lang557>
xybre: I'm using it thinking I'm saving time and memory expecting to create loads of instances that will use this "index"
<drbrain>
ruby-lang557: so you want a Hash of Arrays
<drbrain>
in ruby you create that like: @@ram_index = Hash.new { |hash, capacity| hash[capacity] = [] }
<ruby-lang557>
drbrain: That sounds about right (accepting that I'm new to the idea of Hashes)
<drbrain>
the { } part is the default proc and, for keys with no values, creates a new Array instance for that value when you access it (even for assignment)
<drbrain>
well, not assignment, but when you append values
mlm has joined #ruby-lang
<ruby-lang557>
drbrain: wow, you'll need to spoon feed me a little here... how do I use that in my .each + .each loops?
<drbrain>
so you can then add package ids to it: @@ram_index[ram_item["capacity"]] << package["id"] if ram_item["capacity"] == 64
<drbrain>
↑ is how you use it in your .each + .each
<drbrain>
ruby-lang557: so yeah, you were still really close
<xybre>
ruby-lang557: There's other ways, but I won't interfere with drbrain yet :)
michaeldeol has quit [Ping timeout: 245 seconds]
mlm has quit [Client Quit]
<ruby-lang557>
so if I want to add it for any "capacity" size I'll just drop the last if statement?
<drbrain>
yes
<ruby-lang557>
right, let me try this see if I get it right
someperson has quit [Ping timeout: 250 seconds]
|jemc| has joined #ruby-lang
Cakey has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby-lang
DEac-_ has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
<ruby-lang557>
drbrain: That looks absolutely brilliant!
<ruby-lang557>
sweet! Thanks a mill
<drbrain>
<drbrain>
so, what xybre was saying about @@ram_items, you probably want to use just @ram_items and store it in a single instance
<ruby-lang557>
how come?
<xybre>
Classes are instances too ;)
<drbrain>
you get the same benefit with slightly cleaner code
<ruby-lang557>
right, so you're suggesting moving i out to a separate class?
<xybre>
Also inheritance and values aren't shared across classes (but are across that classes instances)
<xybre>
Or you could share a single instance object, which is Better (tm).
<drbrain>
then you have as many CapacityThingy instances as you have sources
<drbrain>
(probably one)
<ruby-lang557>
So, to be honest I haven't thought this 100% through, but high level I was thinking to have a compute class which will instanciate to several instances which will represent items in a shopping cart type thing. Each instance of the compute class will be responsible for calculating the closest match from a catalog based on a set of requirements
<drbrain>
and Compute manages data about instances?
<ruby-lang557>
If I understand correctly, yes
<drbrain>
then I think Compute would hold @ram_items (instead of @@ram_items) and there should be one Compute instance per compute provider
<ruby-lang557>
so item1 = Compute.new(:desired_ram = 66) for example
<drbrain>
are you accessing AWS or ?
<ruby-lang557>
Softlayer
<ruby-lang557>
Which has a really big and bulky catalog
<ruby-lang557>
as they do physical as well as virtual machines
<dingus_khan>
zenspider_: i'm an idiot--it was a trailing whitespace after the last header name
damien__ has quit [Quit: Leaving]
<drbrain>
ruby-lang557: reading the first few paragraphs, it looks like they have a thing that holds all the data and you use that data to create a separate Order (Instance) object that you then submit?
<ruby-lang557>
drbrain: So if you have a look around the website, you'll see that there are loads of options, nearly too many. The difficulty arrives when you have requirements that doesn't quite align with the layout. i.e. I want a server with 512GB Memory, room for 50TB data and 32Cores
imperator has joined #ruby-lang
<ruby-lang557>
drbrain: Well, they don't really have a single thing that holds all data, but you can use object masks to bring in relational data... Just like a SQL join
* drbrain
nods
<ruby-lang557>
so from SoftLayer_Account you can reach more or less anything if you construct the right object_mask
<ruby-lang557>
..yup
Coincidental has quit [Remote host closed the connection]
<drbrain>
and is your Instance concept similar to the object_mask?
<ruby-lang557>
.....not really
<ruby-lang557>
you could see the Compute class as the abstraction that does not exist in the API
<drbrain>
yeah
<ruby-lang557>
With some fancy bells and whistles that are relevant to my particular excercise
<drbrain>
stepping back, I think my Compute name was a poor fit and that SoftLayer or similar is better
<ruby-lang557>
So that is why I need to backtrack to get the package[id]
<drbrain>
and that indexes you extract from the API calls you make should be cached in a SoftLayer instance
havenwood has quit [Remote host closed the connection]
<drbrain>
then you can build orders and so-forth from that cached data through friendly methods
woollyams has joined #ruby-lang
<ruby-lang557>
That would probably make sense alright
havenwood has joined #ruby-lang
<ruby-lang557>
not sure how I would achieve it though
havenwood has quit [Read error: Connection reset by peer]
<drbrain>
well, you're still at the same place, but by using @ instead of @@ you'll find your job a little easier :) (I promise)
havenwood has joined #ruby-lang
cored has quit [Ping timeout: 248 seconds]
<ruby-lang557>
right, not sure I've understood these concepts properly (as they do not exist in PHP, at least when I was active)
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
<drbrain>
in general, in ruby, most of the time you don't need an @@ variable
<ruby-lang557>
would that not mean that I would have to do the lookup each time I create a new instance of the Compute class?
<drbrain>
yes, but your design should not require new instances of the Compute class
<drbrain>
you should create one and continue using it
<ruby-lang557>
Yeah, maybe I was lazy, but I was thinking if I want to look up 10 machines, I'll just create 10 instances of the Compute class
<ruby-lang557>
Input the 10 unique things and get 10 unique answers
<ruby-lang557>
but based on the same "formatted catalog"
* drbrain
nods
<ruby-lang557>
he he
<drbrain>
you can add multithreading support, too
lysw123 has joined #ruby-lang
<ruby-lang557>
Well... doing a quick timing, just this memory excercise takes approx 5 seconds.. Then I need to do something similar with CPU and Disk.....
tylersmith has joined #ruby-lang
<drbrain>
I suspect most of that is API access time?
heavyhorse has joined #ruby-lang
heavyhorse has quit [Client Quit]
<ruby-lang557>
quite possible... Essentially I pull down 157 packages
<ruby-lang557>
and all of them have some "sub items"
<ruby-lang557>
Then I tidy up the ones that don't have memory
<drbrain>
what HTTP library are you using?
<ruby-lang557>
which lands me with 57 packages which are compute
<ruby-lang557>
good question.. I just use the ruby softlayer_api client
<ruby-lang557>
So not sure what happens after that
<ruby-lang557>
Actually, the catalog I start out with turns out to be a 383k JSON file
yfeldblum has quit [Read error: Connection reset by peer]
<redgetan_>
zenspider: the link you gave me looks similar to the .gdbinit that comes up with ruby repo, i didnt find anything related to printing hash contents though
vinhbachsy has quit [Read error: Connection timed out]
<chancancode>
|jemc| I was trying to not reimplment ruby :P
<chancancode>
|jemc| I started running into a lot of these meta-programming "dark corners" on this gem that I'm working on… probably means that it's a bad idea ;)
<jamto11>
"Under the hood, Ruby uses Marshal to to convert the hash to something it can write to disk. Marshal returns a byte stream; regardless of other issues, this fact is enough for it to be unsuitable for some applications." Why is using a byte-stream bad?
<chancancode>
|jemc| Another thing I wish I could do is dynamically define a method and programmatically construct it's arguments list, but it seems impossible without building a string and eval it
dingus_khan has quit [Remote host closed the connection]
kalehv has joined #ruby-lang
<|jemc|>
chancancode: you should be able to do something similar using (*args, **kwargs, &block) as arguments
nisstyre has quit [Quit: WeeChat 0.4.2]
diegoviola has quit [Quit: WeeChat 0.4.3]
<|jemc|>
although you lose the native argument checking
<chancancode>
|jemc| that would also require reimplementing Ruby ;)
<chancancode>
|jemc| exactly :)
<|jemc|>
well I tend to enjoy the "dark corners" you're talking about, although they can indeed be trouble
<chancancode>
Not the end of the world that I couldn't – just really nice to have for my use case :)
<|jemc|>
what are you working on, if I may ask?
rahul_j has joined #ruby-lang
<chancancode>
|jemc| pretty much poly-filling keyword arguments for 1.9.3-2.x :P
<chancancode>
Not sure if it's a good idea yet, need to write it first so I can try it :) it's definitely a lot of fun to write this though
bzalasky has quit [Remote host closed the connection]
nertzy2 has joined #ruby-lang
<chancancode>
|jemc| look at the `arguments` part
<chancancode>
I don't usually get to run into these "dark corners", it's pretty much the first time I ran into something that I couldn't (easily) do when it comes to meta programming in Ruby
nertzy has quit [Ping timeout: 248 seconds]
stardiviner has quit [Remote host closed the connection]
stardiviner has joined #ruby-lang
vinhbachsy has quit [Read error: Connection timed out]
dingus_khan has joined #ruby-lang
kalehv has quit [Remote host closed the connection]
<chancancode>
havenwood nice trick with __method__ :P
<chancancode>
Although, in my case, I'm trying to Module#prepend a #initialize and from there try to decide if I want to call `super`, because Object#initialize takes 0 arguments ;)
nisstyre has joined #ruby-lang
<havenwood>
chancancode: just check #arity maybe?
bzalasky has joined #ruby-lang
<havenwood>
chancancode: or #arity_range.min.zero? :P
lele|w has joined #ruby-lang
stardiviner has quit [Remote host closed the connection]
<havenwood>
j/k
<chancancode>
havenwood: the tricky part is getting hold of the right method that `super` points to, I'll write you a short test case to show you :)
stardiviner has joined #ruby-lang
tkuchiki_ has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
vinhbachsy has quit [Read error: Connection reset by peer]
<chancancode>
I have a few ideas, but they all seem to require reimplementing some Ruby
postmodern has quit [Quit: Leaving]
vinhbachsy has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
arooni-mobile__ has quit [Ping timeout: 248 seconds]
Kero has joined #ruby-lang
goatish_mound has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
stardiviner has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
elliotec has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
vinhbachsy has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 252 seconds]
bzalasky has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
io_syl has quit []
elliotec has joined #ruby-lang
woollyams has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
bzalasky has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.3]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
hahuang65 has joined #ruby-lang
ItSANgo has quit [Quit: Leaving...]
rahul_j has joined #ruby-lang
mistym has joined #ruby-lang
woollyams has joined #ruby-lang
vinhbachsy has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 260 seconds]
ledestin has quit [Ping timeout: 260 seconds]
bzalasky has quit [Remote host closed the connection]
michaeldeol has quit [Quit: Computer has gone to sleep.]
michaeldeol has joined #ruby-lang
kalehv has joined #ruby-lang
kitak_ has joined #ruby-lang
ItSANgo_ has joined #ruby-lang
michaeldeol has quit [Ping timeout: 245 seconds]
kalehv has quit [Ping timeout: 250 seconds]
RobertBirnie has joined #ruby-lang
kitak has quit [Ping timeout: 245 seconds]
bzalasky has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
dingus_khan has quit [Remote host closed the connection]
rue_XIW has joined #ruby-lang
lun_ has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
heftig has quit [Quit: Quitting]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
lun_ has quit [Ping timeout: 265 seconds]
woollyams has joined #ruby-lang
tonni has quit [Ping timeout: 248 seconds]
rivaler has joined #ruby-lang
Cakey has quit [Ping timeout: 245 seconds]
mucker has joined #ruby-lang
lun_ has joined #ruby-lang
skade has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 0.4.2]
phansch has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
jamto11 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
tonni has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
Coincidental has joined #ruby-lang
tkuchiki has joined #ruby-lang
|jemc| has quit [Ping timeout: 272 seconds]
arBmind has joined #ruby-lang
solars has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
dingus_khan has joined #ruby-lang
jamto11 has joined #ruby-lang
dagobah has joined #ruby-lang
vinhbachsy has joined #ruby-lang
jamto11 has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
nihils has quit [Quit: Leaving...]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
Voker57 has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
<certainty>
dingus_khan: mornin, still problems?
alucardX has joined #ruby-lang
tylersmith has joined #ruby-lang
<dingus_khan>
certainty: can you believe i struggled with a trailing whitespace after a heading for a lot of today?
lun_ has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 245 seconds]
lun_ has joined #ruby-lang
tylersmith has quit [Ping timeout: 245 seconds]
<certainty>
dingus_khan: well yeah i can
<dingus_khan>
certainty: that's my life right now, lol. still working on designing the tests right now, not sure how i want to proceed, am ambivalent
<certainty>
dingus_khan: any particular problem your're currently fighting with?
lun_ has quit [Ping timeout: 272 seconds]
mistym has quit [Remote host closed the connection]
jsullivandigs has quit [Remote host closed the connection]
jamo___ has quit [Quit: leaving]
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
michd is now known as MichD
tbuehlmann has joined #ruby-lang
hahuang65 has quit [Ping timeout: 265 seconds]
dingus_khan has quit [Ping timeout: 272 seconds]
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
mucker has quit [Ping timeout: 248 seconds]
rahul_j has quit [Quit: rahul_j]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marr has joined #ruby-lang
rahul_j has joined #ruby-lang
FlyingLeap has quit [Remote host closed the connection]
FlyingLeap has joined #ruby-lang
yellow5 has quit [Quit: time to go!]
linc01n has quit [Ping timeout: 250 seconds]
yellow5 has joined #ruby-lang
blowmage has quit [Ping timeout: 250 seconds]
linc01n has joined #ruby-lang
jclrb has quit [Quit: jclrb]
blowmage has joined #ruby-lang
woollyams has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
MichD is now known as michd
omegahm has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
relix has joined #ruby-lang
michd is now known as MichD
yellow5 has quit [Ping timeout: 250 seconds]
blowmage has quit [Ping timeout: 260 seconds]
robbyoconnor has joined #ruby-lang
arBmind has quit [Read error: Connection reset by peer]
woollyams has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
blowmage has joined #ruby-lang
phansch has quit [Remote host closed the connection]
yellow5 has joined #ruby-lang
mikecmpbll has joined #ruby-lang
mikecmpbll has quit [Max SendQ exceeded]
KU0N has joined #ruby-lang
nisstyre has quit [Quit: WeeChat 0.4.2]
mikecmpbll has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
heftig has joined #ruby-lang
skade has joined #ruby-lang
rwk1 has joined #ruby-lang
tylersmith has joined #ruby-lang
hahuang65 has joined #ruby-lang
vinhbach_ has joined #ruby-lang
jsrn has joined #ruby-lang
tylersmith has quit [Ping timeout: 265 seconds]
elliotec has joined #ruby-lang
benlovell has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 245 seconds]
vinhbach_ has quit [Ping timeout: 272 seconds]
elia has joined #ruby-lang
dingus_khan has joined #ruby-lang
elliotec has quit [Ping timeout: 248 seconds]
alucardX has left #ruby-lang [#ruby-lang]
dc5ala has joined #ruby-lang
rivaler has quit [Quit: rivaler]
cnivolle has joined #ruby-lang
jamto11 has joined #ruby-lang
dingus_khan has quit [Ping timeout: 245 seconds]
Coincidental has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 250 seconds]
<yorickpeterse>
morning folks
<omegahm>
morning yorickpeterse
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
jamto11 has quit [Ping timeout: 245 seconds]
arBmind has joined #ruby-lang
<yorickpeterse>
HAHAHA Rackspace sent me an Email about a Mongo webinar
<yorickpeterse>
how the fuck did they even get my $WORK Email
cnivolle has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
heftig has quit [Quit: Quitting]
vlad_starkov has joined #ruby-lang
<yorickpeterse>
oh the motherfuckers probably scraped the two public Git commits I have with that Email
heftig has joined #ruby-lang
bin7me has joined #ruby-lang
marr has quit [Ping timeout: 250 seconds]
mucker has joined #ruby-lang
mucker has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
riffraff has joined #ruby-lang
paltimonte has joined #ruby-lang
vinhbachsy has joined #ruby-lang
benlovell has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 260 seconds]
<ljarvis>
moin
Pupeno_ has joined #ruby-lang
workmad3 has joined #ruby-lang
mehlah has joined #ruby-lang
vinhbachsy has joined #ruby-lang
lun_ has joined #ruby-lang
lun_ has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Remote host closed the connection]
nertzy2 has quit [Quit: This computer has gone to sleep]
nertzy2 has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
paul_altimonte has joined #ruby-lang
paltimonte has quit [Ping timeout: 260 seconds]
vinhbach_ has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
rwk1 has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
vinhbachsy has quit [Ping timeout: 245 seconds]
lpvn has quit [Ping timeout: 245 seconds]
rwk1 has quit [Ping timeout: 250 seconds]
lpvn has joined #ruby-lang
nertzy2 has quit [Quit: This computer has gone to sleep]
jamto11 has joined #ruby-lang
<ljarvis>
did chruby auto just stop working?
Lewix has joined #ruby-lang
clauswitt has joined #ruby-lang
<yorickpeterse>
works on my box
rwk1 has joined #ruby-lang
jamto11 has quit [Ping timeout: 260 seconds]
canton7-mac has joined #ruby-lang
cnivolle has joined #ruby-lang
<igalic>
http://guides.rubygems.org/command-reference/ talks a lot about --config-file FILE - Use this config file instead of default --- but no where does it describe what that file looks like, or where its default location is.
<yorickpeterse>
so did anybody else here get Rackspace spam?
<yorickpeterse>
Or are they just tormenting me personally?
jarib has joined #ruby-lang
<igalic>
benlovell: is it actually supposed to work? https://gist.github.com/8953280 still produces a /usr/local/bin/bundle that has #!/usr/bin/ruby1.9.1 in the first line.
vlad_starkov has quit [Remote host closed the connection]
paul_altimonte has quit [Ping timeout: 272 seconds]
<benlovell>
igalic: you named the file .gemrc right?
<igalic>
benlovell: no. /etc/gemrc
<benlovell>
igalic: ah I see, hm. I know ~/.gemrc works
<benlovell>
you may have stumbled upon a bug
phansch has joined #ruby-lang
<benlovell>
lolruby
<ljarvis>
shouldn't those be prefixed with gem: ?
<ljarvis>
oh right no
<ljarvis>
ignore me
<ljarvis>
lolmorning
<benlovell>
moarcoffee
<ljarvis>
yes sir!
<igalic>
ljarvis: hmmm?
<ljarvis>
igalic: basically /etc/gemrc should work, but you should also try ~/.gemrc to see if that works then act accordingly
tedstriker has joined #ruby-lang
<yorickpeterse>
The file /etc/gemrc is just a global ~/.gemrc, their contents/syntax are identical
<igalic>
"Basically this should work, however, it actually doesn't."
phansch has quit [Ping timeout: 252 seconds]
<yorickpeterse>
--no-format-executable is the default already I believe
<yorickpeterse>
as a test add --verbose to the install option
clauswitt has quit [Ping timeout: 272 seconds]
<igalic>
yorickpeterse: Okay. That does, indeed work. But it still doesn't tell me what's overriding my --no-format-executable :\
<yorickpeterse>
does ~/.gemrc exist?
<igalic>
yorickpeterse: yeah. But I haven't verified which it reads right now. (~/.gemrc is a symlink to /etc/gemrc)
<matti>
Hi yorickpeterse
<yorickpeterse>
igalic: hmm
<yorickpeterse>
I'm not sure if it secretly reads from another path
<yorickpeterse>
does `gem env` give any clues?
<matti>
Being ignored by yorickpeterse :( Hurts.
<yorickpeterse>
matti: hai
<matti>
;s
<matti>
Oh noes! I take that back!
<matti>
:)
<matti>
yorickpeterse: How's tricks?
<yorickpeterse>
I started the day with some nice Email spam from some random startup and Rackspace
<yorickpeterse>
I'm pretty pissed about the latter
<yorickpeterse>
other than that I'm fine, debugging Nokogiri race conditions
<matti>
U.
<matti>
Nokogiri
<yorickpeterse>
Tried libxml-ruby but apparently it can't parse HTML5 without throwing errors
<matti>
Nasty things with it and threads and opening XML document in streaming mode.
<yorickpeterse>
and when you tell it to ignore errors it just writes them to STDERR
<yorickpeterse>
Not really my definition of ignoring
<matti>
LOL
<matti>
Indeed.
<yorickpeterse>
Also I hate macbooks, can't even run darn Rubinius without the CPU hitting 100C
d4rkr4i has quit [Ping timeout: 248 seconds]
<igalic>
hrm.. so I just decided that this documentation is shit: http://brightbox.com/docs/ruby/ubuntu/ none of this actually works. Gem, by default, tries to install into /var/lib/gems/1.9.1 -- and when I do install it with sudo, it installs it with the executable path hard-coded. Which makes it useless when you use ruby-switch...
<igalic>
meh.
<yorickpeterse>
hm, maybe I can lock the CPU usage
marr has joined #ruby-lang
yfeldblum has joined #ruby-lang
<whitequark>
yorickpeterse: it's nontrivial in general
<whitequark>
but there are daemons issuing SIGSTOP and SIGCONT at the right times
<ohsix>
and it sucks
<whitequark>
yes
<yorickpeterse>
there's apparently cpulimit, which fucks up the daemon it looks
<yorickpeterse>
nice might be an option
<whitequark>
no
<yorickpeterse>
* looks like
<whitequark>
nice is priority
<ohsix>
due to the recent debain/systemd thing, making a few more systemd stuff portable like 'notify' for the services (basically, to do what STOP does for upstart) were fielded again, but the upstart guys thinks the raise(SIGSTOP) thing is 'elegant'
<yorickpeterse>
Granted I should probably clean this macbook, no idea how dirty it is
<yorickpeterse>
and maybe put new cooling paste on the CPU
elliotec has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
<ohsix>
notify sends a datagram to a private socket for units with type=notify, to the same end, no ptrace/signal stuff
<ohsix>
</random digression>
vinhbachsy has joined #ruby-lang
<yorickpeterse>
there we go, cpulimit seems to do the job
relix has joined #ruby-lang
elliotec has quit [Ping timeout: 272 seconds]
vinhbach_ has quit [Ping timeout: 260 seconds]
phansch has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
jamto11 has joined #ruby-lang
omegahm is now known as omegahm^
lun_ has joined #ruby-lang
omegahm^ has quit []
vinhbachsy has quit [Ping timeout: 250 seconds]
lavana has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has quit [Client Quit]
jamto11 has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
<lavana>
Hi. I have one question. I'm learning to create a Ruby gem and push it to RubyGem.org. It's funny that it's just a simple Hola gem (http://guides.rubygems.org/make-your-own-gem/) but now it had more than 100 downloads in total. Who did download it? Bot?
vinhbachsy has joined #ruby-lang
<yorickpeterse>
Most likely
yfeldblum has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
d4rkr4i has joined #ruby-lang
<lavana>
ok
elia has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
rsl has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
lun_ has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
symm- has joined #ruby-lang
vlad_starkov has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
omegahm has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
mnngfltg has joined #ruby-lang
vlad_starkov has joined #ruby-lang
clauswitt has joined #ruby-lang
omegahm has quit [Read error: Connection reset by peer]
rsl has quit [Read error: Connection reset by peer]
retro|cz has joined #ruby-lang
goatish_mound has joined #ruby-lang
omegahm has joined #ruby-lang
RoxasShadowRS has joined #ruby-lang
jackyalcine is now known as jalcine
vlad_starkov has quit [Ping timeout: 260 seconds]
tedstriker has quit [Ping timeout: 248 seconds]
lavana has quit [Quit: Leaving]
hahuang65 has joined #ruby-lang
jackhoy has joined #ruby-lang
hahuang65 has quit [Ping timeout: 272 seconds]
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
DouweM has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby-lang
omegahm is now known as omegahm^
omegahm^ has quit []
thisirs has joined #ruby-lang
omegahm has joined #ruby-lang
elia has joined #ruby-lang
jamto11 has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
elia has quit [Read error: Connection reset by peer]
elia has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
vinhbachsy has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tkuchiki has quit [Ping timeout: 250 seconds]
cnivolle has quit [Read error: Connection reset by peer]
vinhbachsy has quit [Ping timeout: 245 seconds]
cnivolle has joined #ruby-lang
MichD is now known as michd
workmad3 has quit [Quit: leaving]
elliotec has joined #ruby-lang
d4rkr4i1 has joined #ruby-lang
d4rkr4i has quit [Ping timeout: 260 seconds]
elliotec has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 250 seconds]
michd is now known as MichD
tom025_ has joined #ruby-lang
jamto11 has joined #ruby-lang
smashwilson has joined #ruby-lang
d4rkr4i1 is now known as d4rkr4i
mechanicles has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
Johz has joined #ruby-lang
pico-pete has joined #ruby-lang
workmad3 has joined #ruby-lang
yfeldblum has joined #ruby-lang
ikrima has quit [Ping timeout: 245 seconds]
fenicks has joined #ruby-lang
symm- has quit [Ping timeout: 272 seconds]
houhoulis has joined #ruby-lang
aleatorik has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
arBmind has quit [Read error: Connection reset by peer]
arBmind has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
nertzy2 has joined #ruby-lang
ikrima has joined #ruby-lang
toretore has joined #ruby-lang
shinnya has joined #ruby-lang
lun_ has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
jamto11 has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
d4rkr4i has quit [Ping timeout: 248 seconds]
fenicks has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby-lang
jsilver_ has joined #ruby-lang
jsilver has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
vinhbachsy has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Ping timeout: 265 seconds]
mechanicles has quit [Remote host closed the connection]
d4rkr4i has joined #ruby-lang
Squarepy has joined #ruby-lang
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby-lang
someperson has joined #ruby-lang
Squarepy has quit [Read error: Connection reset by peer]
jinie has quit [Ping timeout: 246 seconds]
Squarepy has joined #ruby-lang
d4rkr4i has quit [Ping timeout: 260 seconds]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby-lang
brettweavnet has joined #ruby-lang
nertzy2 has quit [Quit: This computer has gone to sleep]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby-lang
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby-lang
symm- has joined #ruby-lang
mrevd has joined #ruby-lang
jinie has joined #ruby-lang
mrevd has quit [Read error: Connection reset by peer]
mrevd has joined #ruby-lang
Squarepy has quit [Read error: Connection reset by peer]
mrevd1 has joined #ruby-lang
mrevd1 has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
mrevd1 has joined #ruby-lang
bantic has joined #ruby-lang
Squarepy has joined #ruby-lang
mrevd2 has joined #ruby-lang
mrevd2 has quit [Read error: Connection reset by peer]
mrevd has quit [Ping timeout: 248 seconds]
Squarepy has quit [Read error: Connection reset by peer]
d4rkr4i has joined #ruby-lang
Squarepy has joined #ruby-lang
yfeldblum has quit [Ping timeout: 250 seconds]
alucardX has joined #ruby-lang
Squarepy has quit [Read error: Connection reset by peer]
mrevd1 has quit [Ping timeout: 272 seconds]
jackhoy is now known as hackjoy
Squarepy has joined #ruby-lang
mykoweb has joined #ruby-lang
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
bantic has quit [Quit: bantic]
someperson has quit [Ping timeout: 248 seconds]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby-lang
skade has joined #ruby-lang
jhass|off is now known as jhass
Squarepy has quit [Read error: Connection reset by peer]
symm-_ has joined #ruby-lang
Squarepy has joined #ruby-lang
Squarepy has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby-lang
momomomomo has joined #ruby-lang
someperson has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
vlad_starkov has joined #ruby-lang
riffraff has quit [Quit: Leaving]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
nathanstitt has joined #ruby-lang
Cakey has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
Oak has joined #ruby-lang
Oak has quit [Changing host]
Oak has joined #ruby-lang
heftig has quit [Quit: Quitting]
Oak has left #ruby-lang [#ruby-lang]
elliotec has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
brettweavnet has quit [Ping timeout: 248 seconds]
elliotec has quit [Ping timeout: 272 seconds]
clauswitt has quit [Read error: Operation timed out]
sandbags has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
<someperson>
is there a good way to do a sort of .zipped select ? i.e. doing a select on one array but i also want to apply that on a separate array (by index)
elliotec has quit [Remote host closed the connection]
<centrx>
"apply" ?
<centrx>
You could use with_index
<someperson>
@cache_keys basically has a 1:1 relationship with @all_profiles.. i'm doing something like: @all_profiles.select{|p| new_profile_ids.include? p.id }
<someperson>
yeah i guess i could just zip it up, then unzip it after hmm
arooni-mobile__ has quit [Ping timeout: 272 seconds]
jsaak has quit [Remote host closed the connection]
sandbags has quit [Read error: Operation timed out]
rivaler has quit [Quit: rivaler]
hackjoy_ has joined #ruby-lang
hackjoy_ has quit [Client Quit]
hackjoy_ has joined #ruby-lang
hackjoy has quit [Ping timeout: 245 seconds]
<joevandyk>
so i'm running 'bundle install' and it's really really really slow. I see "Using pg (0.16.0)", then it pauses five seconds, then "Using queue_classic (2.2.2)", then a five second pause, and so on. there's no load on the machine at all.
<joevandyk>
what's the best way to troubleshoot this? i'm on ruby 2.0.0p247, rubygems 2.1.9, ubuntu 12.04
<joevandyk>
in a vm
<joevandyk>
as far as I can tell, it shouldn't be fetching gems, since these gems are already on the machine
olivererxleben has quit [Quit: Leaving...]
seanlinsley has joined #ruby-lang
<centrx>
joevandyk, Is this every time you run it?
elliotec has quit [Remote host closed the connection]
jtw has quit []
nomadicoder has quit [Ping timeout: 245 seconds]
nomadicoder has joined #ruby-lang
phansch has quit [Quit: Leaving]
imperator has joined #ruby-lang
riffraff has quit [Quit: Leaving]
havenwood has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
esad has joined #ruby-lang
meise has joined #ruby-lang
breakingthings has quit []
omegahm is now known as omegahm^
benlovell has joined #ruby-lang
LuvLinuxOS has quit [Quit: Leaving]
charliesome has joined #ruby-lang
elliotec has joined #ruby-lang
imperator has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 245 seconds]
elliotec has quit [Remote host closed the connection]
prc has joined #ruby-lang
elliotec has joined #ruby-lang
havenwood has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
pr0ton has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
smashwilson has quit [Quit: Leaving]
jtw has joined #ruby-lang
<Lewix>
hello fam
pr0ton has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jsrn has quit [Quit: Leaving]
dingus_khan has joined #ruby-lang
marr has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby-lang
pr0ton has joined #ruby-lang
pr0ton has quit [Client Quit]
rkowalick has joined #ruby-lang
rkowalick has quit [Client Quit]
Coincidental has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
jperry_ has quit [Quit: jperry_]
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
hagabaka has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
pr0ton has joined #ruby-lang
heftig has joined #ruby-lang
nvll has quit [Ping timeout: 245 seconds]
pr0ton has quit [Ping timeout: 260 seconds]
nvll has joined #ruby-lang
jtw has quit []
<dingus_khan>
certainty: sorry i bailed out last night without responding, still struggling with writing tests for this problem; right now trying to figure out how to test assignment with ARGV
jtw has joined #ruby-lang
shinnya has joined #ruby-lang
amerine_ is now known as amerine
Cakey has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
dingus_khan has quit [Read error: Connection reset by peer]
danijoo has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
danijoo has joined #ruby-lang
dingus_khan has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
dingus_khan has quit [Remote host closed the connection]
jtw has quit []
jsullivandigs has quit [Remote host closed the connection]