<dingus_khan>
except scratch the part in the block
<dingus_khan>
i mean that is what it returned, but the block is supposed to assign it to a new hash, that was a different line in pry...
eugmill has joined #ruby-lang
<dingus_khan>
i managed to get a hash of keys and rates ( i.e. {:lakewood=>110,etc.}), need to get ratings out of the main hash of hashes, but i think i'm thinking in circles now
wannabe_ruby_dev has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
sleepy_keita has joined #ruby-lang
ikrima has joined #ruby-lang
Oloryn_lt2 has quit [Client Quit]
sleepy_keita has quit [Client Quit]
woollyams has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
sleepy_keita has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
<dingus_khan>
FML, really? ratings = hotels.fetch(hotel1) worked. sorry for making so much noise in here, just kinda at wits end a bit
joelroa has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
linc01n has quit [Ping timeout: 245 seconds]
elliotec has quit [Remote host closed the connection]
linc01n has joined #ruby-lang
mikekellyio has quit [Ping timeout: 252 seconds]
sleepy_keita has left #ruby-lang [#ruby-lang]
marcdel has joined #ruby-lang
pipework has quit [Ping timeout: 265 seconds]
randym_ has quit [Ping timeout: 252 seconds]
beawesomeinstead has quit [Ping timeout: 245 seconds]
<dingus_khan>
centrx: thanks, sorry for being retarded
mykoweb has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
hahuang65 has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
drocsid has quit [Quit: Lost terminal]
sepp2k1 has quit [Read error: Connection reset by peer]
<wannabe_ruby_dev>
So is this channel strictly for questions on the ruby language? Because I think my problem has something to do with my path. #ruby is ignoring me
prc has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
<centrx>
wannabe_ruby_dev, It is a quiet time. Daytime America/Europe is better
io_syl has quit []
bjh13 has quit [Quit: leaving]
woollyams has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
tcopp_ has quit [Ping timeout: 246 seconds]
knu has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
Oloryn_lt2 has quit [Client Quit]
vpretzel has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
panpainter has quit [Quit: panpainter]
<tsou>
wannabe_ruby_dev: shoot your question anyway, someone might give an answer
woollyams has quit [Ping timeout: 252 seconds]
eugmill has quit [Remote host closed the connection]
Oloryn_lt2 has joined #ruby-lang
Oloryn_lt2 has quit [Client Quit]
<wannabe_ruby_dev>
okay i'm about to update the gist, i made some progress
yfeldblum has quit [Remote host closed the connection]
<centrx>
wannabe_ruby_dev, OS X people seem to have success using Homebrew for Ruby
vlad_starkov has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
eugmill has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
itsraining has quit [Quit: itsraining]
araujo has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 252 seconds]
mistym has quit [Remote host closed the connection]
jtw has quit [Ping timeout: 251 seconds]
<wannabe_ruby_dev>
just throwing this out here again, i can't figure out what the deal is. I think something in the line of my require is broken or maybe my gem environment is wrong, please help me obi wan, you are my only hope
cnivolle has quit [Remote host closed the connection]
elia has joined #ruby-lang
jsrn has joined #ruby-lang
joelroa has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Cakey has quit [Ping timeout: 265 seconds]
marr has joined #ruby-lang
francisfish has joined #ruby-lang
jtw has joined #ruby-lang
mikecmpbll has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 246 seconds]
elliotec has joined #ruby-lang
Pupeno has joined #ruby-lang
cnivolle has joined #ruby-lang
jtw has quit [Ping timeout: 260 seconds]
Pupeno has quit [Remote host closed the connection]
elliotec has quit [Ping timeout: 245 seconds]
rippa has joined #ruby-lang
marcdel_ has quit []
Pupeno has joined #ruby-lang
relix has joined #ruby-lang
workmad3 has joined #ruby-lang
dingus_khan has quit [Read error: Connection reset by peer]
dingus_khan has joined #ruby-lang
riffraff has joined #ruby-lang
dilated_dinosaur has joined #ruby-lang
cnivolle_ has joined #ruby-lang
kitak has quit [Remote host closed the connection]
cnivolle has quit [Ping timeout: 246 seconds]
cnivolle_ has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
<ljarvis>
morning
<ljarvis>
that's quite the trunk, pipework
<yorickpeterse>
dat trunk
<ljarvis>
ruby/trunk
<yorickpeterse>
zing
<ljarvis>
yorickpeterse: have you never eaten faggots?
<ohsix>
.
nihils is now known as nichtdiebohne
Johz has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
<yorickpeterse>
ljarvis: no
<yorickpeterse>
I'm still not sure if you're trying to mess with me with that dish actually being called that wayu
<yorickpeterse>
* way
elia has quit [Ping timeout: 246 seconds]
<ljarvis>
yorickpeterse: heh yeah, it really is
<ljarvis>
it provides many a laugh
<ljarvis>
but it is real
prc has joined #ruby-lang
<yorickpeterse>
Then again the term "faggot" as a swear word is not that old, at least not as old compared to the wood thing
<yorickpeterse>
(the twigs or w/e it was)
<ljarvis>
wat
<yorickpeterse>
Like a bundle of twigs or something is called a "faggot" too
<yorickpeterse>
also fucking hell, I typed "enwikipedia.org" and ended up on some click spam website
<ljarvis>
\o/
phansch has joined #ruby-lang
<yorickpeterse>
"In 2004, a radio commercial for the UK supermarket chain Somerfield, in which an American man rejects his wife's suggested dinner saying "I've got nothing against faggots, I just don't fancy them" was found to have breached the Advertising and Sponsorship Code and was banned by the industry regulator Ofcom"
<yorickpeterse>
"Guys hue hue this is going to be a great pun in our ad"
<yorickpeterse>
Darn pikeys
<yorickpeterse>
I just can't imagine it being that comfortable to use the name for the dish nowadays
<yorickpeterse>
as in, can you imagine some parent going "KIDS, IT'S DINNER TIME. WE ARE HAVING FAGGOTS TONIGHT"
<yorickpeterse>
That shit's going wrong sooner or later
<yorickpeterse>
Can't think of any weird dish names we have here in .nl
<yorickpeterse>
We just having boring names like "Stamppot"
<yorickpeterse>
which is literally mashed potatoes with some other stuff
mehlah has joined #ruby-lang
mehlah_ has joined #ruby-lang
mehlah_ has quit [Client Quit]
<ljarvis>
heh, well, they're certainly still called that
<maloik_>
ljarvis: did they get the name out of a harry potter movie ?
<yorickpeterse>
maloik_: they're not
kitak has joined #ruby-lang
<yorickpeterse>
unless you're talking about something else
<maloik_>
i cant click on them
<yorickpeterse>
wat
<ljarvis>
11. Eat your fucking dinner you lazy fuck.
<yorickpeterse>
it should download them
<maloik_>
oh.
<yorickpeterse>
I don't think nginx auto-displays them
<maloik_>
ah yes, I have them like 27 times in my download box
<ljarvis>
lol
<ljarvis>
clearly someone didn't eat them Rumbledethumps this morning
<yorickpeterse>
I think I also somewhere had a guide on how to ride a bike in winter here in NL
rwk1_ has joined #ruby-lang
<ljarvis>
"Yorick's guide to life, because you need help with everything you stupid fuck"
<maloik_>
olive oil to prepare a steak
<maloik_>
i think ill stop reading :(
<yorickpeterse>
ljarvis: actually it said something like that
<yorickpeterse>
maloik_: I use butter nowadays most of the time
<yorickpeterse>
got tired of burning everything on airborne olive oil
elliotec has quit [Ping timeout: 240 seconds]
<yorickpeterse>
basically the napalm of the kitchen
relix has joined #ruby-lang
<yorickpeterse>
also I can't cook at all
<maloik_>
I could totally see this being the inspiration for the guys that cook everything with whiskey and meat
<maloik_>
I forgot the name
<ljarvis>
vicky enjoys cooking so she does most of it
<ljarvis>
i get bored
<yorickpeterse>
maloik_: you mean that Youtube channel where they cook rather violently?
<ljarvis>
and my bubble and squeak ends up looking like rumbledethumps
<ljarvis>
words thing ever
<yorickpeterse>
like a bunch of vikings going "ARARRHJHJHJGHGHGHG MEAT LOAF RAGGGG SMASH"
<maloik_>
no not that
<maloik_>
epic mealtime
<maloik_>
thats the one
<yorickpeterse>
ah
<ljarvis>
"What goes good with bacon?"
<ljarvis>
"MORE BACON"
<ljarvis>
i got an email about working at aws
<ljarvis>
in canada
<yorickpeterse>
go for it
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
jhass is now known as jhass|off
ecnalyr has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
<ljarvis>
nou
<yorickpeterse>
I wouldn't mind moving to Canada that much, as long as it's the Vancouver area
<yorickpeterse>
hiking around there is really neat
<ljarvis>
yeah vancouver is nice
<ljarvis>
I did the grouse grind which was fun
<yorickpeterse>
Fuck the bears though
<yorickpeterse>
scumbags
<ljarvis>
no dont do that
<ljarvis>
they dont like that
ecnalyr has quit [Ping timeout: 240 seconds]
heftig has joined #ruby-lang
<dingus_khan>
dry rub at room temperature with smoked salt, pepper, and a little garlic powder on a cut with good marbling and throw on hot grill, five minutes on a side; no butter/olive oil necessary :)
gix has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 272 seconds]
gix has joined #ruby-lang
havenwood has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ecnalyr has joined #ruby-lang
joelroa has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
joelroa has quit [Ping timeout: 245 seconds]
marcofernandez has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby-lang
digitalknight has joined #ruby-lang
<digitalknight>
hi all
<digitalknight>
I need to change the primary key generated by rails generate scaffold
<yorickpeterse>
that doesn't specify the type of the field
<gnufied>
the product I work on uses a field called identifier, but this field is not the primary key but is used as identifier of "resource"
<gnufied>
to the outside world
<ljarvis>
yorickpeterse: it can be anything you want!!!! yay!
<gnufied>
so being a cloud product, calling a server - srv-abcde makes more sense than a number
<apeiros_>
Silex: why do you need something "more readable"?
<apeiros_>
products.id is already very readable, also quite standard
<gnufied>
apeiros_: it was not Silex's question I think. digitialkey (not gone) asked it
<gnufied>
:-)
<gnufied>
now*
<apeiros_>
aha
heftig has quit [Quit: Quitting]
heftig has joined #ruby-lang
kgt has joined #ruby-lang
<toretore>
i also use an 'identifier' column on certain tables, for human use
<toretore>
it is considered stable, unlike the db id
micalexander has joined #ruby-lang
<ljarvis>
wat
<apeiros_>
toretore: in such cases I just make the id column not autoincremented
<apeiros_>
except if the stable identifier is not numeric
apeiros_ is now known as apeiros
elia has joined #ruby-lang
<toretore>
apeiros: yeah, that should work.. i like using "meaningful" identifiers though
tedstriker has quit [Quit: Anti-Fraping status set.]
tedstriker has joined #ruby-lang
tedstriker has quit [Client Quit]
marcofernandez has quit [Ping timeout: 248 seconds]
symm- has quit [Ping timeout: 260 seconds]
someperson has joined #ruby-lang
<apeiros>
toretore: string values?
diegoviola has quit [Quit: WeeChat 0.4.3]
<toretore>
yup
<apeiros>
ok. have that too sometimes, but then I keep my numeric id column for joins.
<toretore>
this is usually for tables with few rows that are relatively stable
<apeiros>
saying that, I realize I should probably bench sometime, on the penalty of string col joins
<toretore>
yeah, still have the autoincremented id
<apeiros>
it also reminds me that I should write that plugin to make use of oracle finally having enums
yfeldblum has joined #ruby-lang
smashwilson has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
minivan has quit [Remote host closed the connection]
<yorickpeterse>
Oracle? I envy your bravery
Xzyx987X_ has quit [Read error: Connection reset by peer]
<apeiros>
bravery? it's not bravery if you're forced to :(
<apeiros>
I hate oracle with passion
Xzyx987X_ has joined #ruby-lang
<yorickpeterse>
bravery of not comitting seppuku
<yorickpeterse>
Having never used Oracle myself I can't say that much about it though
<yorickpeterse>
But I've yet to hear good things about it
<apeiros>
well, it's not my(first)sql
<apeiros>
that said, there's a couple of areas where mysql is quite a lot better than oracle
<apeiros>
say encoding support e.g.
<apeiros>
s/e.g./f.ex./
vlad_starkov has joined #ruby-lang
<yorickpeterse>
From what I gather MyFirstSQL's encoding support is pretty shit
<yorickpeterse>
something with it sucking hard on varchar/text fields (one of the two)
<apeiros>
well, the thing is…
<apeiros>
it HAS encoding support
<apeiros>
in oracle, your whole f'ing db must be in the same encoding. which is ludicrous.
joelroa has joined #ruby-lang
<yorickpeterse>
lol
<apeiros>
oh, and of course their client<->server transcoding mechanism has a bug
<apeiros>
which I told them
<apeiros>
but they won't fix it
<apeiros>
know why? because we don't want to pay *MONEY TO THEM* for fixing their shit
<yorickpeterse>
ha
<yorickpeterse>
Enterprise (TM)
<yorickpeterse>
Surely you can just do a SQL dump to something else :>
<apeiros>
Oracle - where you pay once for broke software and pay additionally for (maybe) correctly working software.
<apeiros>
we try to migrate to postgres. it's not easy. there's ~20y of crufty old triggers, plsql and shit in that oracle db :-S
<yorickpeterse>
dayum
<apeiros>
also all the third party systems which interact via the db with other software
<yorickpeterse>
You're not in banking are you?
<apeiros>
financial services. pretty close.
<yorickpeterse>
ha
<apeiros>
mind you, we've worked with a partner bank. when I spoke with their engineers I was actually happy that we have oracle.
<apeiros>
know why?
<yorickpeterse>
You have to admit though, at least it "worked" for 20 years
vlad_starkov has quit [Ping timeout: 260 seconds]
<yorickpeterse>
most startups nowadays don't get past 5
joelroa has quit [Ping timeout: 248 seconds]
<apeiros>
they don't even use a database… they use flat files :-S
<gnufied>
apeiros: because other team is using ms sql?
<gnufied>
so Microsoft Access then, I was close
<apeiros>
I almost puked a little when I heard that
<ljarvis>
D:
<apeiros>
the reason they told me? the API which we speak to takes one big request, which internally creates multiple "objects", when one fails, I get a failure message. but the successful parts still get created.
<apeiros>
so when I try again, it fails because "object already exists"
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
<wnd>
Thanks to our web team using Rails, today I had to try and use AR for the firs time ever. I must say I miss Sequel, even though I wasn't too excited about it at first.
rahul_j has joined #ruby-lang
VTLob has joined #ruby-lang
vlad_starkov has joined #ruby-lang
fragamus has joined #ruby-lang
<darix>
yorickpeterse: to make that work it would need to parse your sql and merge it with its other conditionals?
vlad_starkov has quit [Ping timeout: 246 seconds]
<yorickpeterse>
Feared so, find_by_sql throws away anything you put before it too I believe
<yorickpeterse>
it's not strictly needed, but it would be nice if you could mix the two
<darix>
yorickpeterse: though how about SomeModel.find_by_sql('some...' + SomeModel.where(...).to_sql
<darix>
yorickpeterse: though how about SomeModel.find_by_sql('some...' + SomeModel.where(...).to_sql)
jgpawletko has joined #ruby-lang
<darix>
if i recall correctly there was a method like that
<darix>
though that might contain too much
deception has joined #ruby-lang
<darix>
well you get the idea :)
<yorickpeterse>
meh
elliotec has joined #ruby-lang
wallerdev has joined #ruby-lang
joelroa has joined #ruby-lang
enebo has joined #ruby-lang
elliotec has quit [Ping timeout: 265 seconds]
bin7me has quit [Remote host closed the connection]
joelroa has quit [Read error: Operation timed out]
someperson has quit [Ping timeout: 252 seconds]
io_syl has joined #ruby-lang
aminRX has quit [Quit: aminRX]
TheMoonMaster has quit [Excess Flood]
TheMoonMaster has joined #ruby-lang
miqui has joined #ruby-lang
tkuchiki has joined #ruby-lang
momomomomo has joined #ruby-lang
aarellano has joined #ruby-lang
someperson has joined #ruby-lang
io_syl has quit []
eugmill has quit [Remote host closed the connection]
<yorickpeterse>
Hm, a scheduling workload that goes down from 80k to 9500 or so
<yorickpeterse>
either I did an amazing job or something is wrong
<yorickpeterse>
My bets are on the latter
eugmill has joined #ruby-lang
<unsymbol>
hehe
Lewix has quit [Quit: Leaving...]
jeff_r has joined #ruby-lang
someperson has quit [Ping timeout: 248 seconds]
wallerdev has quit [Quit: wallerdev]
yalue has joined #ruby-lang
jeff_r has quit [Client Quit]
aaaa has joined #ruby-lang
aaaa is now known as Guest10360
someperson has joined #ruby-lang
shinnya has joined #ruby-lang
MartynKeigher has quit [Quit: Bye for now!]
tylersmith has joined #ruby-lang
cnivolle_ has joined #ruby-lang
esad has joined #ruby-lang
yfeldblum has joined #ruby-lang
nertzy3 has quit [Ping timeout: 245 seconds]
nertzy3 has joined #ruby-lang
Fr330wn4g31 has quit [Ping timeout: 246 seconds]
robbyoconnor has quit [Ping timeout: 260 seconds]
cnivolle has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
bantic has joined #ruby-lang
bradcliffe has joined #ruby-lang
araujo has joined #ruby-lang
Guest10360 has quit [Remote host closed the connection]
rkmetzl has joined #ruby-lang
vlad_starkov has joined #ruby-lang
symm- has joined #ruby-lang
MartynKeigher has joined #ruby-lang
jsullivandigs has joined #ruby-lang
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
aarellan_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
johnny_rugger has joined #ruby-lang
elliotec has joined #ruby-lang
mehlah has joined #ruby-lang
rwk1_ has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kitak has quit [Remote host closed the connection]
arooni-mobile__ has joined #ruby-lang
kitak has joined #ruby-lang
joelroa has joined #ruby-lang
mistym has joined #ruby-lang
elliotec has quit [Ping timeout: 248 seconds]
arooni-mobile has quit [Ping timeout: 245 seconds]
<apeiros>
drbrain: ping
<apeiros>
drbrain: was "optional dependencies" for rubygems discussed in the past as a feature?
aarellan_ has left #ruby-lang ["Textual IRC Client: www.textualapp.com"]
<apeiros>
drbrain: basic idea is that a gem may offer optional functionalities, but depends on gems for that. installing that gem manually would either need flags regarding the optional dependencies or ask the user
seanlinsley has quit [Quit: …]
joelroa has quit [Ping timeout: 272 seconds]
workmad3 is now known as wm3|away
mistym has quit [Remote host closed the connection]
arooni-mobile__ has quit [Ping timeout: 260 seconds]
cnivolle_ has quit [Remote host closed the connection]
<darix>
apeiros: some distros call those weak deps. Recommends would describe your use-case
vlad_starkov has joined #ruby-lang
<apeiros>
darix: my use case is my tabledata gem which provides reading and writing different forms of tabular data. e.g. csv and excel as input, html, pdf, csv and excel as output
<apeiros>
excel support depends on the spreadsheet gem
jtw has joined #ruby-lang
<apeiros>
pdf support depends on the prawn gem
<apeiros>
I don't just want to spam a users install with those all added as dependencies
cnivolle has joined #ruby-lang
<toretore>
i have a similar case. currently, i just tell users to install & require as needed
chouhoul_ has joined #ruby-lang
jtw has quit [Client Quit]
<apeiros>
toretore: same here. I wrapped LoadError to make more informative exceptions
prc has quit [Ping timeout: 245 seconds]
retro|cz has quit [Read error: Operation timed out]
alucardX has quit [Quit: leaving]
vlad_starkov has quit [Ping timeout: 272 seconds]
Meths has quit [Ping timeout: 265 seconds]
jtw has joined #ruby-lang
pasafona has joined #ruby-lang
<yorickpeterse>
jesus, seems my queries might actually be right
<yorickpeterse>
A decrease by a factor 10, neato
<yorickpeterse>
I wonder how much that will save us in AWS costs
ecnalyr has quit [Ping timeout: 240 seconds]
io_syl has joined #ruby-lang
tbuehlmann has quit [Quit: Leaving]
<yorickpeterse>
oh wow, that will actually save us about 5 computing hours
<yorickpeterse>
(of 10 instances)
pasafona has quit []
|jemc| has joined #ruby-lang
mehlah_ has joined #ruby-lang
mehlah has quit [Read error: Connection reset by peer]
<ljarvis>
lol
mistym has joined #ruby-lang
<yorickpeterse>
Hm, so just the spot instance prices would go down from around 150 USD to 40 USD a month
<yorickpeterse>
pretty sure they normally cost more than that though with monitoring and what not
<ljarvis>
that's quite the reduction
<yorickpeterse>
yeah
<yorickpeterse>
That is assuming my new workload size is correct, still verifying that
jtw has quit []
momomomomo has quit [Quit: momomomomo]
arooni-mobile__ has joined #ruby-lang
<yorickpeterse>
yorick the money maker
<yorickpeterse>
or money saver in this case
bantic has quit [Quit: bantic]
<yorickpeterse>
I'd have to social engineer myself into our billing management of AWS to see what exactly I'd save
<yorickpeterse>
The one part I don't have access to :<
Voker57 has joined #ruby-lang
maseda has joined #ruby-lang
maseda has left #ruby-lang [#ruby-lang]
lele has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby-lang
chouhoul_ has quit [Remote host closed the connection]
seanlinsley has joined #ruby-lang
lele has joined #ruby-lang
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Write error: Broken pipe]
mehlah_ is now known as mehlah
bzalasky has joined #ruby-lang
Voker57 has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
senj has joined #ruby-lang
jtw has joined #ruby-lang
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bradcliffe has joined #ruby-lang
_ht has quit [Remote host closed the connection]
Olipro has quit [Ping timeout: 246 seconds]
_ht has joined #ruby-lang
Olipro has joined #ruby-lang
nathanstitt has joined #ruby-lang
Meths has joined #ruby-lang
ecnalyr has joined #ruby-lang
vermele has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
itsraining has joined #ruby-lang
Meths has quit [Ping timeout: 265 seconds]
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryantk has joined #ruby-lang
Thanatermesis` has joined #ruby-lang
Thanatermesis` has quit [Changing host]
Thanatermesis` has joined #ruby-lang
Thanatermesis has quit [Write error: Broken pipe]
joelroa has joined #ruby-lang
ryantk has quit [Client Quit]
bantic has joined #ruby-lang
jtw has quit [Ping timeout: 252 seconds]
joelroa has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
mistym has quit [Remote host closed the connection]
io_syl has quit []
jtw has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
CaptainJet has joined #ruby-lang
bradcliffe has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 246 seconds]
jtw has quit [Ping timeout: 240 seconds]
joelroa has joined #ruby-lang
Johz has quit [Ping timeout: 260 seconds]
fragamus has joined #ruby-lang
elliotec has joined #ruby-lang
shinnya has quit [Ping timeout: 252 seconds]
jsrn has quit [Ping timeout: 260 seconds]
lavana has joined #ruby-lang
johnny_rugger has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
Meths has joined #ruby-lang
johnny_rugger has joined #ruby-lang
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tcopp_ has joined #ruby-lang
Meths has quit [Ping timeout: 245 seconds]
mistym has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
phansch has quit [Quit: WeeChat 0.4.2]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
micalexander has joined #ruby-lang
yfeldblum has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
brettweavnet has joined #ruby-lang
lele|w has quit [Quit: Leaving]
lele|2 has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
skade has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
ecnalyr has quit [Remote host closed the connection]
lele|2 is now known as lele|w
micalexander has joined #ruby-lang
tcopp_ has quit [Ping timeout: 260 seconds]
johnny_rugger has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 265 seconds]
jgpawletko has quit [Ping timeout: 245 seconds]
micalexander has quit [Ping timeout: 245 seconds]
jtw has joined #ruby-lang
brettweavnet has quit [Quit: Bye]
eugmill has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
eugmill has joined #ruby-lang
<lavana>
I'm having a problem. Could you help me?
jhass|off is now known as jhass
mikecmpbll has quit [Ping timeout: 246 seconds]
Johz has joined #ruby-lang
Voker57 has joined #ruby-lang
jtw has quit []
<apeiros>
lavana: we can try
elia has quit [Ping timeout: 252 seconds]
skade has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
skade has joined #ruby-lang
<apeiros>
lavana: it fails because you only create the method on first read
<apeiros>
i.e., you have to call the method once for it to be created
<lavana>
apeiros: OK. I got it.
<lavana>
apeiros: How about @values?
skade has quit [Read error: Connection reset by peer]
<apeiros>
what about it?
francisfish has quit [Remote host closed the connection]
knu has quit [Remote host closed the connection]
<certainty>
lavana: inside your "singleton-class context" you create a new _instance_ method. In that method you have access to @values
eugmill has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
ratmav has joined #ruby-lang
hahuang65 has quit [Ping timeout: 272 seconds]
<lavana>
certainty: that means inside define_method, self will reference to an instance variable of that Class, but if we move up (outside of define_method but still in _singleton_class), self will be that class, right?
<lavana>
certainty: that means inside define_method, self will reference to an instance of that Class, but if we move up (outside of define_method but still in _singleton_class), self will be that class, right?
knu has joined #ruby-lang
<certainty>
lavana: outside of define_method but inside instance_exec, self refers to the singleton class
havenwood has joined #ruby-lang
<certainty>
bbl time for the bedtime story
RobertBirnie has joined #ruby-lang
<lavana>
certainty: Thanks :)
<lavana>
apeiros: Thanks again
tylersmith has joined #ruby-lang
jsrn has joined #ruby-lang
lavana has quit [Quit: Leaving]
mikecmpbll has joined #ruby-lang
Meths has joined #ruby-lang
elliotec has joined #ruby-lang
sepp2k has joined #ruby-lang
rippa has joined #ruby-lang
skade has joined #ruby-lang
saarinen has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
ruby-lang351 has joined #ruby-lang
fragamus has joined #ruby-lang
ruby-lang351 has quit [Client Quit]
skade has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
phansch has joined #ruby-lang
phansch has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
phansch has joined #ruby-lang
elliotec has joined #ruby-lang
fragamus has quit [Client Quit]
wm3|away has quit [Ping timeout: 265 seconds]
elliotec has quit [Remote host closed the connection]
<someperson>
hmm, i'm vaguely annoyed i can't do Struct.new(class.attributes.merge(:blah => something)) heh
<someperson>
s/class/oldstruct
ikrima has quit [Ping timeout: 260 seconds]
<ljarvis>
someperson: you can
mykoweb has quit [Remote host closed the connection]
<ljarvis>
except not with 'attributes'
ikrima has joined #ruby-lang
<someperson>
ljarvis: example?
<someperson>
basically just need to add a couple of attributes to an existing struct, or looking for a shortcut to make a new struct from that
yfeldblum has joined #ruby-lang
<ljarvis>
someperson: this is basically what OpenStruct was built for btw
dilated_dinosaur has quit [Ping timeout: 260 seconds]
skade has quit [Ping timeout: 245 seconds]
<ljarvis>
someperson: but you can use #to_h on the struct to get a hash of key value pairs, or use #each_pair
elliotec has joined #ruby-lang
<ljarvis>
if you're pre 2.0
eugmill has joined #ruby-lang
<someperson>
openstruct worked
<someperson>
w/o any changes
<someperson>
thanks
hahuang65 has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
skade has joined #ruby-lang
tcopp_ has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
sepp2k1 has joined #ruby-lang
<jsilver_>
anyone use guard-rspec
micalexander has joined #ruby-lang
<jsilver_>
and can tell me why it wont fucking watch my files
mykoweb has quit [Remote host closed the connection]
centrx has joined #ruby-lang
skade has quit [Ping timeout: 252 seconds]
ratmav has quit [Quit: Leaving]
eugmill has joined #ruby-lang
tcopp_ has quit [Ping timeout: 245 seconds]
<yorickpeterse>
because of your foul language
mykoweb has joined #ruby-lang
francisfish has joined #ruby-lang
sepp2k has quit [Ping timeout: 260 seconds]
mucker has joined #ruby-lang
Coincidental has joined #ruby-lang
ylluminate` has joined #ruby-lang
oracal has joined #ruby-lang
micalexander has quit [Ping timeout: 245 seconds]
skade has joined #ruby-lang
<jsilver_>
this is riduculous
<jsilver_>
this software used to work a dream
<jsilver_>
now it fails in centos?!?!??! for no good reason, silently?!?!?! even tho over 90% tested?!?!?!?!
<jsilver_>
im pissed
<jsilver_>
they killed autotest to make this POS and it doesnt even work
<centrx>
Boo Red Hat
mucker is now known as mrfoobar
mrfoobar is now known as mr-foobar
mr-foobar is now known as mrfoobar
<jsilver_>
im a debian guy
<jsilver_>
im forced to use redhat here
<jsilver_>
sorry
mrfoobar is now known as foobar_
foobar_ is now known as mr-foobar
ylluminate` has quit [Ping timeout: 245 seconds]
ylluminate has quit [Ping timeout: 260 seconds]
<jsilver_>
GODDAMNIT
arooni-mobile__ has quit [Ping timeout: 248 seconds]
francisfish has quit [Remote host closed the connection]
mr-foobar has quit []
elliotec has joined #ruby-lang
mr-foobar has joined #ruby-lang
bantic has quit [Quit: bantic]
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
<yorickpeterse>
I've found my match
<ljarvis>
i concur
<ljarvis>
also i just ate my weight in pasta
<ljarvis>
and ima big guy so that's a lot of pasta
<yorickpeterse>
I highly doubt you ate ~80 kg of pasta
wallerdev has joined #ruby-lang
<ljarvis>
close, but no cigar
skade has quit [Ping timeout: 260 seconds]
jperry_ has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
arBmind has quit [Quit: Leaving.]
elia has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
johnny_rugger has joined #ruby-lang
Coincidental has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
jtw has joined #ruby-lang
francisfish has joined #ruby-lang
<gnufied>
man, I hate J2EE
<gnufied>
the drools rule engine is nice though
riffraff has quit [Quit: Leaving]
elia has quit [Quit: Computer has gone to sleep.]
<gnufied>
i guess given enough shitty things, we all are whiners
<yorickpeterse>
try Mongo
skade has joined #ruby-lang
raptor101 has joined #ruby-lang
<raptor101>
ruby 1.9.3 is default in ubuntu, how do i make default to ruby 2.10
<ljarvis>
that might be difficult
<gnufied>
use ruby-switch
<gnufied>
there is a package called ruby-switch which will allow you to change rubies
Voker57 has quit [Read error: Connection reset by peer]
<ljarvis>
derp
mr-foobar has quit [Ping timeout: 246 seconds]
relix has joined #ruby-lang
elliotec has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sankage has joined #ruby-lang
yalue has quit [Read error: Operation timed out]
<sankage>
Is there a way to namespace module includes? I have 2 modules getting included in a class, but they both have the same named method. I would like to not have to change the two modules. Is there anything else I can do to avoid the naming conflict?
<ljarvis>
how do you want to resolve it? it's still a name conflict at the end of the day
<ljarvis>
either nest it somewhere else, or rename it
<sankage>
the issue is that the 2 modules are gems
<ljarvis>
and you need both of these methods?
arooni-mobile__ has joined #ruby-lang
cored has quit [Ping timeout: 260 seconds]
bantic has joined #ruby-lang
<sankage>
yes
<sankage>
sadly using them both
elliotec has quit [Remote host closed the connection]
<ljarvis>
then yeah, i would include them in different places
elliotec has joined #ruby-lang
<sankage>
the thought was that there might be some way to include the module and have the included methods get namespaced
<ljarvis>
sankage: if the methods dont rely on the class, it doesn't matter where they go
havenwood has joined #ruby-lang
<sankage>
or would it be possible to include one and somehow rename the method before loading the second?
cored has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<sankage>
well this is a rails app, so the 2 gems are getting included on the application controller
<ljarvis>
hah
<ljarvis>
what the hell method do they both use?
<sankage>
authorize
<sankage>
Clearance and Pundit
<ljarvis>
you can alias method
<sankage>
would alias_method be able to distinguish between the same method of 2 gems?
eugmill has quit [Remote host closed the connection]
dik_dak has joined #ruby-lang
__butch__ has joined #ruby-lang
jcs222 has quit [Quit: leaving]
elliotec has joined #ruby-lang
ecnalyr has quit [Ping timeout: 240 seconds]
<drocsid>
I'm having trouble using the string.index method on html strings. Is this because of different types of whitespace characters? I know there are html specific libraries, but I only have a few strings to match and already have some code written
<drocsid>
for example: start_pos=page.index('<li class "product-list-title"><a href="')
benlovell has quit [Ping timeout: 245 seconds]
* yorickpeterse
slaps drocsid around with a copy of "The Pragmatic Trout"
<drocsid>
lol
<yorickpeterse>
You do not use anything but HTML/XML parsers for parsing XML/HTML
<drocsid>
Is that what I should look at
<yorickpeterse>
You can *not* parse it without and expect it to not explode on Friday the 13th
<ljarvis>
lol the pragmatic trout
<ljarvis>
the best kind of trout
<drocsid>
ok is there one built into ruby? Should I use nokigiri or however it is spelled
<yorickpeterse>
There's nokogiri
<whitequark>
there's REXML, built into ruby
francisfish has quit [Remote host closed the connection]
<yorickpeterse>
REXML doesn't do HTML
<whitequark>
it's slow but does not require you to install anything
<yorickpeterse>
at least not HTML5
<whitequark>
oh, right
<ljarvis>
it doesn't even look like you want to parse html?
<whitequark>
ljarvis: hm?
<yorickpeterse>
looks like they are trying to extract the `href` value, but I could be mistaken
<ljarvis>
he's talking about string indexes, i'm interested to know what he wants before assuming he should use nokogiri
eugmill has joined #ruby-lang
<drocsid>
yeah I'm trying to get the links from a web page
<ljarvis>
:(
<ljarvis>
too much faith, ljarvis
<drocsid>
i thought that was parsing
<whitequark>
ljarvis: I don't think one should do anything with html without invoking a parser
<whitequark>
except maybe storage
Mon_Ouie has quit [Ping timeout: 260 seconds]
<drocsid>
I'm just searching a file for string indexes
jcs222 has joined #ruby-lang
<drocsid>
Should I use nokigiri?
jtw has joined #ruby-lang
<whitequark>
drocsid: yorickpeterse is right. parse it with nokogiri.
<ljarvis>
drocsid: no you just said you wanted links from a web page
<drocsid>
noko
<ljarvis>
is it links from a web page or string indexes from a file?
<drocsid>
ok, I'm confused
<yorickpeterse>
drocsid: e.g. something like this:
<yorickpeterse>
Nokogiri::HTML('..... html here ....').css('.product-list-title a').first.attr('href')
<drocsid>
I get the page as a string, and then I was searching for the indexes of the links
<ljarvis>
so you only want indexes for where the links exist within the document?
<drocsid>
yeah, It looks like yorickpeterse's Nokogiri code above might get it
<ljarvis>
uh
ddd has quit [Quit: Kernel reboot]
* ljarvis
stops
<drocsid>
ljarvis:
<drocsid>
yes
<drocsid>
i think so
<drocsid>
I have a page
<ljarvis>
no, you dont know
<drocsid>
it has many links
<drocsid>
some of those links have that structure
<drocsid>
in front of them
<drocsid>
start_pos=page.index('<li class "product-list-title"><a href="')
<drocsid>
it has that class in front
<ljarvis>
do you want to extract urls from the links?
<drocsid>
or it's inside it
<drocsid>
yeah
<ljarvis>
right
<drocsid>
so i get the start pos
<ljarvis>
no
<drocsid>
and the end pos
<drocsid>
and its the link
<ljarvis>
you do what yorickpeterse suggested
<yorickpeterse>
ljarvis: STOP RESISTING, YOU WILL BE CONSUMED BY THE NOKOGIRI MONSTER
<drocsid>
thats how i was trying to do it
<drocsid>
yeah
<ljarvis>
this is why I asked if you only wanted positions
<drocsid>
I agreed a minute ago
<ljarvis>
because nokogiri wouldn't help with that
<ljarvis>
yorickpeterse: :(
<ljarvis>
you'd think I wasn't on team nokogiri
<ljarvis>
i'm not doing a good job
<drocsid>
ok, i was trying to do it positionally cause I took a programming class and that's the way they built a simple link extractor. It was in python however
<ljarvis>
maybe i'll close a couple of nokogiri issues to make me feel better
<ljarvis>
I'll start with this silly rbx related one
<drocsid>
sorry i'm so dump
ddd has joined #ruby-lang
<drocsid>
lol
<drocsid>
thanks for the help and patience
<ljarvis>
drocsid: generally if you're extracting stuff from html, you always want a html parser
<drocsid>
yeah that stupid class
yalue has quit [Quit: Leaving]
<drocsid>
but somebody had to build the parser
charliesome has quit [Read error: Connection reset by peer]
<whitequark>
drocsid: it was a bad class then.
<ljarvis>
that would be the lovely guys who built libxml2
<drocsid>
so what's the underlying issue here, different types of whitespace characters?
charliesome has joined #ruby-lang
arooni-mobile__ has quit [Ping timeout: 252 seconds]
symm- has joined #ruby-lang
<whitequark>
that, and lots of different complexity inherent in XML
<whitequark>
entity expansion, unicode, etc, etc
<yorickpeterse>
ljarvis: fuck you
<ljarvis>
<3
Mon_Ouie has joined #ruby-lang
mistym has quit [Remote host closed the connection]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
momomomomo has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-lang
charliesome has quit [Client Quit]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
mistym has joined #ruby-lang
kitak has joined #ruby-lang
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
jackyalcine has quit [Excess Flood]
sankage has quit [Quit: Page closed]
elliotec has joined #ruby-lang
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
ratmav has joined #ruby-lang
jonahR has joined #ruby-lang
sed_life_better has quit [Ping timeout: 252 seconds]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
airdisa has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
eugmill has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
dorei has joined #ruby-lang
kitak has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
joelroa has joined #ruby-lang
fijimunkii has quit [Ping timeout: 265 seconds]
eugmill has joined #ruby-lang
francisfish has joined #ruby-lang
fijimunkii has joined #ruby-lang
x0f_ has joined #ruby-lang
x0f has quit [Read error: Operation timed out]
joelroa has quit [Ping timeout: 252 seconds]
Pell has joined #ruby-lang
<jsilver_>
Everything I ever learned about business I learned from Dave Thomas
Pell has quit [Remote host closed the connection]
jackyalcine has joined #ruby-lang
<centrx>
Where's the beef?
airdisa has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
eugmill has joined #ruby-lang
dragonkh has joined #ruby-lang
arBmind has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
benanne has quit [Ping timeout: 240 seconds]
Pell_ has joined #ruby-lang
Willox_ has joined #ruby-lang
Willox has quit [Ping timeout: 260 seconds]
prc has joined #ruby-lang
<drocsid>
I'm trying to understand Nokogiri::HTML(page).css('.product-list-title a').first.attr('href')
<drocsid>
So I can see the other available methods
<drocsid>
I want to be able to read the API
<drocsid>
but I vannot for example find the first method or the attr method
<drocsid>
can somebody point these out on the nokogiri website
<drocsid>
Does this iteslf return an array ? Nokogiri::HTML(page).css('.product-list-title
<drocsid>
a')
<drocsid>
what if I want all of the elements
bodie_ has joined #ruby-lang
<drocsid>
I think I get that Nokogiri::HTML(page).css('.product-list-title
<bodie_>
not sure how to get tk working -- do I really need to recompile my own ruby with it or can't I just use rvm somehow?
<drocsid>
a')
<bodie_>
or is there a gem for it?
<bodie_>
orrr..... should I be asking in #python or something :P
benanne has joined #ruby-lang
<bodie_>
nvm
<drocsid>
Following that code Nokogiri::HTML::EntityLookup corresponds to Nokogiri::HTML(page).css('.product-list-title
<drocsid>
but I don's find the .first or .attr methods listed