klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 272 seconds]
jimbach has joined #ruby-lang
hell_ has joined #ruby-lang
chrisdambrosio has quit [Ping timeout: 244 seconds]
<hell_>
hi all, i'm new to learn ruby lang (not rails), i'm try to making a game irc with ruby.. but, i don't know how to counting the player with trigger .join and make it automatically if the player >= 4
<hell_>
maybe someone can help me a refrence web or article or simple code?
jimbach has quit [Ping timeout: 260 seconds]
cubicme has quit [Read error: Connection reset by peer]
cubicme has joined #ruby-lang
havenwood has joined #ruby-lang
Phrogz has quit []
Phrogz2 has joined #ruby-lang
Phrogz2 is now known as Phrogz
Phrogz has quit [Changing host]
Phrogz has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nonnatus has quit [Ping timeout: 260 seconds]
justinmburrous has quit [Remote host closed the connection]
cubicme has quit [Read error: Connection reset by peer]
dope has quit [Quit: Connection closed for inactivity]
justinmburrous has joined #ruby-lang
cubicme has joined #ruby-lang
Phrogz has quit [Remote host closed the connection]
cubicme has quit [Read error: Connection reset by peer]
cubicme has joined #ruby-lang
emmesswhy has joined #ruby-lang
imperator has joined #ruby-lang
araujo has quit [Quit: Leaving]
justinmburrous has quit [Remote host closed the connection]
<ledestin>
hell_: it’s not clear what you’re trying to do
spuk has quit [Ping timeout: 255 seconds]
spuk has joined #ruby-lang
gix has quit [Ping timeout: 272 seconds]
justinmburrous has joined #ruby-lang
benlovell has joined #ruby-lang
aquatty has quit [Ping timeout: 260 seconds]
centrx has joined #ruby-lang
jimbach has joined #ruby-lang
Phrogz has joined #ruby-lang
gix has joined #ruby-lang
nonnatus has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
jimbach has quit [Ping timeout: 245 seconds]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
toretore has quit [Quit: This computer has gone to sleep]
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
emmesswhy has quit [Quit: This computer has gone to sleep]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby-lang
kalehv has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
banister has joined #ruby-lang
ad_boot has quit [Remote host closed the connection]
francisfish has quit [Read error: Connection reset by peer]
<yorickpeterse>
shit, I totally forgot to say good morning
<yorickpeterse>
So good morning
francisfish has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
karamazov has joined #ruby-lang
caseydriscoll has joined #ruby-lang
knu has quit [Ping timeout: 240 seconds]
PaulePanter has quit [Ping timeout: 245 seconds]
PaulePanter has joined #ruby-lang
DefV has quit [Ping timeout: 245 seconds]
gregf_ has quit [Ping timeout: 245 seconds]
Rubennn has quit [Ping timeout: 245 seconds]
DefV has joined #ruby-lang
Rubennn has joined #ruby-lang
gregf_ has joined #ruby-lang
workmad3 is now known as wm3|away
<ljarvis>
moin
vondruch has quit [Quit: Ex-Chat]
vondruch has joined #ruby-lang
<yorickpeterse>
I shall start my IRC day by saying this: I hate spreadsheets
<yorickpeterse>
especially the ones that are almost in 4D
<maloik>
When a method needs optimization, what tools do you generally use? I suspect both the queries being performed and the ruby code itself could use improvement
chussenot_ has joined #ruby-lang
<yorickpeterse>
optimization of what, SQL queries, Ruby code, style?
<yorickpeterse>
since it dumps statistics per line of code
<yorickpeterse>
It's however a sampler, so you need to run it for a longer period of time to get decent results
<yorickpeterse>
You can also use the built-in profiler, but ugh
<yorickpeterse>
it slows things down massively and only reports on method level
<maloik>
I'll take a look
<yorickpeterse>
Looking at the code, my guess would be that `subdomains` is a list too large for #include? to work nicely
<yorickpeterse>
the same goes for #inject
<yorickpeterse>
also the constant checking of the same booleans
<yorickpeterse>
(that is, the subdomain.force_ssl_enabled? && allow_force_ssl_to_be_false bits)
<yorickpeterse>
using something like `force_ssl = subdomain.force_ssl_enabled? && allow_force_ssl_to_be_false; .... { ..., force_ssl: force_ssl }` would at least cut down the amount of calls
<maloik>
as I mentioned, the small ruby changes don't seem to make any difference
* DefV
dies
<DefV>
that code
hellangel7 has joined #ruby-lang
<maloik>
stay alive a little bit longer and give suggestions instead ;)
<waxjar>
looks like your query fetches a lot of data that you do not use
miqui has joined #ruby-lang
kramsee has quit [Ping timeout: 260 seconds]
<waxjar>
times don't look too bad tho i guess
kramsee has joined #ruby-lang
<maloik>
looking at that now, already eliminated one
tylersmith has joined #ruby-lang
yfeldblum has joined #ruby-lang
calinsalagean has joined #ruby-lang
knu has joined #ruby-lang
<calinsalagean>
Is there a possibility to have an Enumerable that is not Array? I mean, I call Enumerable#sort_by with block and it returns me an Array and an Enumerable. How could I make it to be only Enumerable?
<DefV>
calinsalagean: Enumerable is a module that is mixed in classes like Array and Hash
<DefV>
and Set etc
<bhaak>
I guess the reason you get an Array is because all returns one
tenderlove has joined #ruby-lang
wsmoak has quit [Ping timeout: 245 seconds]
wsmoak_ is now known as wsmoak
<DefV>
well, technically all returns a proxy, but method_missing on the proxy calls to_a
yfeldblum has quit [Ping timeout: 255 seconds]
<calinsalagean>
DefV So, How could I fix it?
<DefV>
calinsalagean: you can't return an Enumerable
<bhaak>
why do you want that? what is the problem you are trying to solve?
ta has quit [Remote host closed the connection]
<calinsalagean>
I want to get all songs sorted by artists name alphabetically. I mean, the songs should be in a order that Artists are sorted Alphabetically. The problem is that I use Mongoid-Scroll and I need an Enumerable.
<DefV>
Array is an enumerable
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GBrawl has joined #ruby-lang
amsi has joined #ruby-lang
havenwood has joined #ruby-lang
banister has joined #ruby-lang
zlogan has joined #ruby-lang
Lewix has joined #ruby-lang
benlovell has quit [Ping timeout: 244 seconds]
momomomomo has quit [Quit: momomomomo]
zlogan has quit [Ping timeout: 260 seconds]
seank__ has quit [Remote host closed the connection]
seank_ has joined #ruby-lang
emmesswhy has joined #ruby-lang
JohnBat26 has joined #ruby-lang
skade has joined #ruby-lang
cout is now known as CoutMarburg
jimbach has quit [Remote host closed the connection]
emmesswhy has quit [Client Quit]
jimbach has joined #ruby-lang
CoutMarburg is now known as CoutLassa
mikecmpbll has quit [Ping timeout: 244 seconds]
zlogan has joined #ruby-lang
jimbach has quit [Ping timeout: 246 seconds]
taylorrf has joined #ruby-lang
Gabri has joined #ruby-lang
ad_boot has joined #ruby-lang
zlogan has quit [Ping timeout: 255 seconds]
jbardin has joined #ruby-lang
ledestin_ has joined #ruby-lang
ledestin has quit [Ping timeout: 260 seconds]
ledestin_ is now known as ledestin
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zlogan has joined #ruby-lang
emmesswhy has joined #ruby-lang
wicked_shell has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
taylorrf has quit [Ping timeout: 255 seconds]
<wicked_shell>
hi all, what book could you recommend for a medicore c++ programmer starting out in ruby? i am mostly interested in using it for scripting and system administration
<Sephyros>
Hello, can someone help me? i cant download and install gems
<Sephyros>
note: i am behind a proxy
zlogan has quit [Ping timeout: 255 seconds]
arooni-mobile has quit [Ping timeout: 245 seconds]
<Sephyros>
i am using Linux, i already set proxy settings in many places, like bash.bashrc, .bashrc, apt.conf, .curlrc, .gemrc ...
<imperator>
gem install -p ?
zlogan has joined #ruby-lang
<Sephyros>
but i still get 403...
<Sephyros>
and i am using RVM too
wallerdev has quit [Quit: wallerdev]
loincloth has joined #ruby-lang
bantic has joined #ruby-lang
jimbach has quit [Remote host closed the connection]
zlogan has quit [Ping timeout: 246 seconds]
jimbach has joined #ruby-lang
jimbach has quit [Remote host closed the connection]
zlogan has joined #ruby-lang
jimbach has joined #ruby-lang
macberrypro has joined #ruby-lang
<Sephyros>
Why Ruby is too hard to configure?
fusillicode has quit [Quit: Leaving.]
<Sephyros>
you could win time on development, but you lost much more on configuration of development environment
<havenwood>
Sephyros: tried setting HTTP_PROXY_USER and HTTP_PROXY_PASS?
<Sephyros>
USER and PASS?
jimbach has quit [Ping timeout: 260 seconds]
zlogan has quit [Ping timeout: 244 seconds]
jimbach has joined #ruby-lang
<havenwood>
Sephyros: gem h en | grep -i proxy
tdy has quit [Remote host closed the connection]
<Sephyros>
its inside .gemrc?
macberrypro has left #ruby-lang [#ruby-lang]
jimbach has quit [Ping timeout: 240 seconds]
<havenwood>
Sephyros: no, the environment variables
Sephyros has quit [Quit: Leaving]
<havenwood>
e.g.: set HTTP_PROXY="a.b.com:8080"
macberrypro has joined #ruby-lang
<havenwood>
set HTTP_PROXY_PASS="s3kr3ti'lln3v3rt3ll"
MeMoCooL has quit []
<havenwood>
like from Ruby: ENV['HTTP_PROXY'] = 'a.b.com:8080'
<havenwood>
ish
macberrypro has left #ruby-lang [#ruby-lang]
chills42 has quit [Remote host closed the connection]
jbardin has quit [Quit: jbardin]
zlogan has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
yfeldblu_ has joined #ruby-lang
amsi has quit [Ping timeout: 272 seconds]
amsi has joined #ruby-lang
ad_boot has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
zlogan has quit [Ping timeout: 260 seconds]
zlogan has joined #ruby-lang
bantic has quit [Quit: bantic]
solars has joined #ruby-lang
zlogan has quit [Ping timeout: 260 seconds]
elia has joined #ruby-lang
jbardin has joined #ruby-lang
zlogan has joined #ruby-lang
onkelhotte has joined #ruby-lang
onkelhotte has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
momomomomo has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
zlogan has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby-lang
zlogan has joined #ruby-lang
miqui has quit [Remote host closed the connection]
thagomizer has quit [Quit: Leaving.]
ikrima has quit [Ping timeout: 246 seconds]
thagomizer has joined #ruby-lang
zlogan has quit [Ping timeout: 260 seconds]
zlogan has joined #ruby-lang
solars has quit [Ping timeout: 244 seconds]
bantic has joined #ruby-lang
ohsix has quit [Ping timeout: 260 seconds]
yfeldblu_ has quit [Remote host closed the connection]
zlogan has quit [Ping timeout: 255 seconds]
ohsix has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
zlogan has joined #ruby-lang
sarkyniin has quit [Quit: Quitte]
yfeldblum has joined #ruby-lang
klmlfl has quit [Read error: Connection reset by peer]
gianlucadv has quit [Ping timeout: 246 seconds]
hackeron has quit [Ping timeout: 250 seconds]
klmlfl has joined #ruby-lang
tenderlove has joined #ruby-lang
hackeron has joined #ruby-lang
zlogan has quit [Ping timeout: 260 seconds]
jbardin has quit [Quit: jbardin]
scampbell has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
solars has joined #ruby-lang
sharpmachine has joined #ruby-lang
MichD is now known as michd
loincloth has joined #ruby-lang
arBmind has joined #ruby-lang
zlogan has joined #ruby-lang
arBmind has left #ruby-lang [#ruby-lang]
zlogan has quit [Ping timeout: 246 seconds]
emmesswhy has joined #ruby-lang
jbardin has joined #ruby-lang
_ht has quit [Remote host closed the connection]
zlogan has joined #ruby-lang
NoNMaDDeN has quit [Remote host closed the connection]
imperator has quit [Quit: Valete!]
flute_booth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zlogan has quit [Ping timeout: 244 seconds]
goodcodeguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zlogan has joined #ruby-lang
bradcliffe has quit [Ping timeout: 260 seconds]
ldnunes has quit [Quit: Leaving]
zlogan has quit [Ping timeout: 255 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elia has quit [Quit: (IRC Client: textualapp.com)]
ledestin has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
thagomizer has quit [Quit: Leaving.]
thagomizer has joined #ruby-lang
mbeasley has joined #ruby-lang
djbkd has joined #ruby-lang
zlogan has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
zlogan has quit [Ping timeout: 260 seconds]
mbeasley has quit [Quit: leaving]
mbeasley has joined #ruby-lang
mbeasley has quit [Client Quit]
dknox-brb is now known as dknox
jgpawletko has quit [Quit: jgpawletko]
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
GBrawl has quit [Quit: (null)]
skalsson has quit [Remote host closed the connection]
ggherdov has quit [Ping timeout: 260 seconds]
kaiza has quit [Ping timeout: 260 seconds]
lacrosse__ has quit [Read error: Connection reset by peer]
eval-in_ has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
eval-in_ has joined #ruby-lang
marr has quit [Ping timeout: 260 seconds]
mistym has quit [Ping timeout: 260 seconds]
eristic has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
lacrosse__ has joined #ruby-lang
oleo is now known as Guest70443
oleo__ has joined #ruby-lang
Kabaka has quit [Ping timeout: 260 seconds]
eristic has joined #ruby-lang
vlad_starkov has joined #ruby-lang
kaiza has joined #ruby-lang
Guest70443 has quit [Ping timeout: 272 seconds]
AKASkip has quit [Ping timeout: 255 seconds]
Kabaka has joined #ruby-lang
ggherdov has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
mikecmpbll has joined #ruby-lang
NoNMaDDeN has joined #ruby-lang
cmhobbs has quit [Remote host closed the connection]
whippythellama has quit [Quit: whippythellama]
nathanstitt has quit [Quit: I growing sleepy]
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby-lang
mistym has joined #ruby-lang
zlogan has joined #ruby-lang
benanne has quit [Quit: kbai]
centrx has joined #ruby-lang
zlogan has quit [Ping timeout: 260 seconds]
solars has quit [Ping timeout: 244 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
houhoulis has joined #ruby-lang
enebo has quit [Ping timeout: 272 seconds]
loincloth has quit [Remote host closed the connection]
Asher has joined #ruby-lang
jimbach has joined #ruby-lang
emmesswhy has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
charliesome has joined #ruby-lang
bantic has quit [Quit: bantic]
cads has joined #ruby-lang
<cads>
hey guys, quick question
emmesswhy has quit [Quit: This computer has gone to sleep]
emmesswhy has joined #ruby-lang
<waxjar>
that wasn't very quick cads :p
<cads>
I know I'm not supposed to filter/parse html with a regular expression since there are better parsing method - can you guys help me filter some html?
ikrima has joined #ruby-lang
<centrx>
cads, Use "nokogiri"
<cads>
I have a document with 'p' tag with and id called 'note', and that contans an 'a' tag of class 'img', with an href that has a url of format "/profile/Profilename"
<cads>
and I'd like to pull just the 'Profilename' part
<waxjar>
most of the time you can just get at your element with a css selector :)
<waxjar>
*can get *with just
NoNMaDDeN has quit [Quit: Leaving...]
<cads>
hmm, it was vaguely occurring to me the other day that a CSS selector might be the right way to go
<cads>
I am already using the watir-webdriver, and I think I might be able to use a CSS selector there
<cads>
I guess I'll brush up on those, see if watir can use them, and elsewise use nokogiri
lcdhoffman has joined #ruby-lang
<cads>
sound right?
<waxjar>
i watir like a headless webbrowser?
zlogan has quit [Ping timeout: 272 seconds]
<cads>
as far as I understand it, watir-webdriver uses selenium to fire up a web browser of your choice, which you can then control
zlogan has joined #ruby-lang
<waxjar>
right. heavy tool ^^
s1kx has quit [Quit: Leaving]
<cads>
for example you can do b = Watir::Browser.new, then do b.goto 'someurl'
<cads>
it's neat since it exposes some html tags directly in its interface, like for example b.test_field(:id, "username").set "name"; b.link(:id, "sign_in").click
<cads>
s/test_field/text_field
<cads>
that would find a text field with id 'username', set it to "name" and push the sign in button
<waxjar>
if you already have to use watir and it can do what you need, then i'd stick with it yea
<waxjar>
if all you need to do is scrape a few html tags, nokogiri (or similar) seems a better fit :)
jimbach has quit [Remote host closed the connection]
zlogan has quit [Ping timeout: 260 seconds]
aarellano has joined #ruby-lang
<cads>
b.html would scrape the whole page's html file, and I could easily push it into nokogiri, but I'm really hoping watir exposes an interface for css selectors
jimbach has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
<cads>
will pivot to noko ASAP otherwise
zlogan has joined #ruby-lang
djbkd has joined #ruby-lang
seank__ has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
michaeldeol has joined #ruby-lang
michaeldeol has quit [Client Quit]
nathanstitt has joined #ruby-lang
jimbach has quit [Ping timeout: 260 seconds]
seank_ has quit [Ping timeout: 255 seconds]
michaeldeol has joined #ruby-lang
zlogan has quit [Ping timeout: 255 seconds]
zlogan has joined #ruby-lang
ikrima has quit [Ping timeout: 272 seconds]
bantic has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
<cads>
waxjar, watir can run headless, but it still runs a full browser instance
<cads>
I wonder if there is a web test automation tool that simply pretends to be a full browser
mistym has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistym has joined #ruby-lang
zlogan has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
lcdhoffman has quit [Quit: lcdhoffman]
tenderlove has quit [Ping timeout: 246 seconds]
zlogan has joined #ruby-lang
michaeldeol has joined #ruby-lang
mistym has quit [Ping timeout: 240 seconds]
zlogan has quit [Ping timeout: 246 seconds]
AmBienCeD_ has joined #ruby-lang
zlogan has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AmBienCeD has quit [Ping timeout: 272 seconds]
karamazov has quit []
jimbach has joined #ruby-lang
zlogan has quit [Ping timeout: 250 seconds]
houhoulis has quit [Remote host closed the connection]
zlogan has joined #ruby-lang
|jemc| has quit [Ping timeout: 255 seconds]
Asher has quit [Quit: Leaving.]
arBmind1 has joined #ruby-lang
zlogan has quit [Ping timeout: 272 seconds]
zlogan has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
zlogan has quit [Ping timeout: 244 seconds]
TheToad_ has quit [Read error: Connection reset by peer]
zlogan has joined #ruby-lang
dorei has quit []
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zlogan has quit [Ping timeout: 260 seconds]
zlogan has joined #ruby-lang
musl has joined #ruby-lang
karamazov has joined #ruby-lang
jdecuirm has joined #ruby-lang
<cads>
waxjar, made some progress!
<cads>
I can pull the link URL from the correct part of the page
<cads>
and I'm using a regex to pull the username from that