yfeldblu_ has quit [Remote host closed the connection]
pkondzior___ is now known as pkondzior
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
<zenspider>
'v'!
yfeldblum has joined #ruby-lang
blaz3rz has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 248 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
relix has joined #ruby-lang
iliketur_ has joined #ruby-lang
iliketur_ has quit [Excess Flood]
iliketur_ has joined #ruby-lang
ecnalyr has joined #ruby-lang
entropie has joined #ruby-lang
Cakey has joined #ruby-lang
relix has quit [Ping timeout: 248 seconds]
wnd has quit [Ping timeout: 252 seconds]
makoto_ has joined #ruby-lang
kevink has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
knu has joined #ruby-lang
makoto_ has quit [Ping timeout: 265 seconds]
wnd has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
fragamus has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
Elico has quit [Remote host closed the connection]
kurko_ has quit [Quit: Computer has gone to sleep.]
nathanstitt has quit [Ping timeout: 252 seconds]
nathanst_ has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
r0bglees0n has quit [Ping timeout: 264 seconds]
dm78 has quit [Read error: Connection reset by peer]
Elico has joined #ruby-lang
dm78 has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
mdub has joined #ruby-lang
RoxasShadowRS has quit [Read error: Connection reset by peer]
yfeldblum has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
mdub has quit [Ping timeout: 252 seconds]
|jemc| has joined #ruby-lang
blaz3rz has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
plurt has joined #ruby-lang
ecnalyr has joined #ruby-lang
dorei has quit []
blaz3rz has quit [Ping timeout: 264 seconds]
relix has joined #ruby-lang
ecnalyr has quit [Ping timeout: 240 seconds]
wnd_ has joined #ruby-lang
wnd has quit [Read error: Connection reset by peer]
relix has quit [Ping timeout: 248 seconds]
makoto_ has joined #ruby-lang
makoto_ has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
wnd_ is now known as wnd
brettweavnet has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby-lang
RobertBirnie has joined #ruby-lang
wallerdev has joined #ruby-lang
RobertBirnie has quit [Client Quit]
ulisescab has quit []
woollyams has joined #ruby-lang
tylersmith has joined #ruby-lang
lfox has joined #ruby-lang
tylersmith has quit [Ping timeout: 240 seconds]
lfox has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
bzalasky has quit [Remote host closed the connection]
marr has quit []
RobertBirnie has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
bzalasky has joined #ruby-lang
mytrile has joined #ruby-lang
CJD14 has joined #ruby-lang
blaz3rz has joined #ruby-lang
yfeldblum has joined #ruby-lang
tdy_ is now known as tdy
conquerio has joined #ruby-lang
mytrile has quit [Ping timeout: 272 seconds]
rickhull has joined #ruby-lang
blaz3rz has quit [Ping timeout: 252 seconds]
<rickhull>
i've got a tiny ruby cli app, that is a test runner of sorts. give it a directory, and it will try to execute all contained filed (with +x) in parallel
<rickhull>
all contained files*
<rickhull>
is fork() the right approach for this?
elliotec has joined #ruby-lang
<rickhull>
the files themselves might be foo.sh bar.rb baz.py
kurko_ has joined #ruby-lang
<rickhull>
so the little cli app would need invoke 3 processes to execute them in parallel
<rickhull>
actually, the files themselves would likely not be chmod +x, and sans-shebang
robbyoconnor has joined #ruby-lang
<rickhull>
because the runner/framework does some environment setup first
havenwood has quit []
yatish27 has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iliketur_ has quit [Quit: zzzzz…..]
woollyams has quit [Ping timeout: 252 seconds]
yatish27 has joined #ruby-lang
relix has joined #ruby-lang
woollyams has joined #ruby-lang
relix has quit [Ping timeout: 252 seconds]
makoto_ has joined #ruby-lang
hahuang65 has joined #ruby-lang
Lewix has joined #ruby-lang
iliketurtles has joined #ruby-lang
iliketurtles has quit [Excess Flood]
plurt has quit [Quit: Computer has gone to sleep.]
makoto_ has quit [Ping timeout: 264 seconds]
yatish27 has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
anulman has joined #ruby-lang
tdy has quit [Quit: WeeChat 0.4.2]
dik_dak has quit [Quit: Leaving]
tdy has joined #ruby-lang
tdy has quit [Client Quit]
tdy has joined #ruby-lang
dik_dak has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
brettweavnet has quit [Quit: Bye]
DevDoo has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
vpretzel has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
vpretzel has joined #ruby-lang
vpretzel has quit [Read error: Connection reset by peer]
amerine has quit [Quit: Computer has gone to sleep.]
vpretzel has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
dm78 has joined #ruby-lang
mistym has joined #ruby-lang
vpretzel has quit [Ping timeout: 245 seconds]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
elliotec has quit [Client Quit]
blaz3rz has joined #ruby-lang
dm78 has quit [Ping timeout: 272 seconds]
Cakey has quit [Ping timeout: 253 seconds]
hahuang65 has quit [Ping timeout: 245 seconds]
rahul_j has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
bhrgunatha has joined #ruby-lang
relix has joined #ruby-lang
vpretzel has joined #ruby-lang
rafeed has joined #ruby-lang
makoto_ has joined #ruby-lang
relix has quit [Ping timeout: 260 seconds]
mykoweb has quit [Remote host closed the connection]
CaptainJet has quit []
makoto_ has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
nathanst_ has quit [Quit: I growing sleepy]
yfeldblum has quit [Ping timeout: 248 seconds]
vpretzel has quit [Ping timeout: 252 seconds]
elliotec has joined #ruby-lang
rafeed has quit [Quit: Leaving.]
NemesisD has joined #ruby-lang
<NemesisD>
hey guys. for some reason rubygems.org is refusing my connections when downloading the latest specs file?
bzalasky has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
jamto11 has joined #ruby-lang
CJD14 has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 265 seconds]
Lewix has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
rob_ has joined #ruby-lang
<rob_>
hi hi, i was wondering how people handle setting a global debug/verbose flag? $DBEUG and $VERBOSE seem to change the way ruby functions.. is using a global variable the 'right' thing to do?
lcdhoffman has joined #ruby-lang
skade has joined #ruby-lang
skade has quit [Excess Flood]
skade has joined #ruby-lang
ecnalyr has joined #ruby-lang
skade has quit [Client Quit]
postmodern has quit [Quit: Leaving]
tpope has quit [Ping timeout: 272 seconds]
futureshocked has joined #ruby-lang
cqql has joined #ruby-lang
peterd has joined #ruby-lang
Squarepy has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
peterd has quit [Client Quit]
mytrile has joined #ruby-lang
makoto_ has joined #ruby-lang
Pupeno_w has quit [Remote host closed the connection]
Thanatermesis has joined #ruby-lang
makoto_ has quit [Ping timeout: 264 seconds]
<r0bglees0n>
rob_: nice host
<r0bglees0n>
rob_: if it's just for your library, sometimes people might use MyClass.debug = true or something like that
<r0bglees0n>
so the state is local to your library and only used there
<rob_>
r0bglees0n: nice name :D
<rob_>
r0bglees0n: thanks for the tip
<r0bglees0n>
sure
futureshocked has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 264 seconds]
DouweM has quit [Quit: Leaving...]
vpretzel has joined #ruby-lang
cqql has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vpretzel has quit [Ping timeout: 245 seconds]
Thanatermesis has quit [Ping timeout: 240 seconds]
<d4rkr4i>
centrx: doc.css('.foo') will give back all the text :(
<d4rkr4i>
i.e, "1. This is the text I want to extract. An example"
<centrx>
You could do doc.css("div.foo").first.text
<centrx>
But there might be a more "meaningful" method call for that
deception has joined #ruby-lang
<centrx>
Or that might be the same thing...
ssb123_ has joined #ruby-lang
brooks has quit [Quit: brooks]
<MrZYX>
.xpath("//div[class='foo']/
<MrZYX>
er, unfinished
<d4rkr4i>
centrx: calling first.text still gives the same
<MrZYX>
/text()[0] or something, need to look up the exact syntax
<d4rkr4i>
MrZYX: hmm. I will try this out.
<d4rkr4i>
I forgot XPath as quickly as I learnt it. Sad story.
<MrZYX>
me too
<MrZYX>
had the exam I needed it in last week
<MrZYX>
all gone
apeiros has quit [Remote host closed the connection]
<d4rkr4i>
:D
<ljarvis>
doc.at("div/text()[2]")
apeiros has joined #ruby-lang
ssb123 has quit [Ping timeout: 240 seconds]
<d4rkr4i>
ljarvis: that is some cool stuff!
dm78_ has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 264 seconds]
<ljarvis>
I love xpath, and get paid to write it \o/
ssb123 has joined #ruby-lang
ssb123_ has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
dm78 has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
rob_ has left #ruby-lang [#ruby-lang]
<d4rkr4i>
ljarvis: where is it listed in documentation? any pointers? Couldn't find it nokogiri.org
mikecmpbll has quit [Ping timeout: 264 seconds]
<ljarvis>
d4rkr4i: it's not really specific to nokogiri, it's just xpath
benlovell has quit [Ping timeout: 248 seconds]
<d4rkr4i>
ljarvis: I tried passing the same expression to xpath. It didn't accept that; why was that?
<ljarvis>
d4rkr4i: xpath/css methods returns collections, you want a specific node at a specific position
elliotec has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 252 seconds]
<ljarvis>
d4rkr4i: if you wanted xpath to return it, you'd want to prefix the expression with //
<ljarvis>
ie doc.xpath("//...")
<d4rkr4i>
ljarvis: awesome. Thanks!
RobertBirnie has joined #ruby-lang
<ljarvis>
d4rkr4i: it's worth reading some xpath docs if you plan on doing lots of it, basic stuff like the difference between / // and neither are handy to know
<d4rkr4i>
ljarvis: Yes, I will quickly take a much needed refresher on XPath.
<ljarvis>
yorickpeterse: it's not scraping :D but yeah it was before
<ljarvis>
it's now extremely tedious soap api responses :(
Lewix has joined #ruby-lang
<ljarvis>
the complexity is astounding
apeiros has joined #ruby-lang
<yorickpeterse>
HAHA
<yorickpeterse>
99 problems, etc
hahuang65 has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
<yorickpeterse>
which reminds me, I need to finish that Nokogiri reader thing I was working on
<yorickpeterse>
(more webscale scraping without teh suck of the SAX API)
<apeiros>
only webscale? no roflscale?
<yorickpeterse>
hey hey this is Ruby we're talking about
<r0bglees0n>
right. universescale.
<yorickpeterse>
did you not hear the news? Ruby can't scale
<apeiros>
but them told my ruby be roflscale!!
<yorickpeterse>
Twitter no longer uses Ruby, point proven
<yorickpeterse>
I wait for the day somebody ports Rails to Rust
<r0bglees0n>
the problem isn't the language though, it's the framework mostly
<yorickpeterse>
eh, the language plays a big role
mikecmpbll has joined #ruby-lang
<r0bglees0n>
yeah i agree, but i think ruby is a good language
<yorickpeterse>
language wise, yes
breakingthings has quit []
elliotec has quit [Remote host closed the connection]
<yorickpeterse>
Implementation wise there's a lot to gain
<Senjai>
r0bglees0n: I think ruby is the future, losing time to doing tedious crap in PHP etc for application development is no longer worth it
breakingthings has joined #ruby-lang
<r0bglees0n>
its implementation is getting better, it's not a very good start when you load a framework the size of rails to serve a web request.
<Senjai>
And rails was created for a wide audience, like any framework, if you have a specialized platform you need to specialize your framework
<whitequark>
yorickpeterse: I don't think rails can or should be ported to rust
<Senjai>
r0bglees0n: The framework should already be loaded..
elliotec has joined #ruby-lang
breakingthings has quit [Client Quit]
<Senjai>
whitequark: Can? Sure. Should? Probably not
<yorickpeterse>
whitequark: did you never learn sarcasm at a young age?
<whitequark>
yorickpeterse: oh fuck you.
<yorickpeterse>
you're like the most serious Russian I've ever met
* Senjai
takes cover from the bombs
<yorickpeterse>
and I've met a whopping....5 Russians I think
* whitequark
doesn't understand written sarcasm
Rylee has joined #ruby-lang
<whitequark>
you could've learned it already
<Senjai>
doesnt twitter use Scala for the backend and rails for the frontend?
nonnatus has joined #ruby-lang
<Senjai>
Kerplush!
adayzdone has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<apeiros>
yay! I'm not the only one with that problem!
<apeiros>
godamit, Errno::ERAMENTOOHOT
<Senjai>
apeiros: Omg, can you repro?
<apeiros>
I can, but this error happens only in production, so I'd rather avoid
<r0bglees0n>
Senjai: rails is the worst possible idea for an application like twitter
elliotec has quit [Remote host closed the connection]
<Senjai>
apeiros: Sounds like a third party issue to me
centrx has quit [Quit: Leaving]
<Senjai>
r0bglees0n: Why?
<apeiros>
Senjai: yeah, it happens when interfacing with that third party delivery
Asher has quit [Quit: Leaving.]
<Senjai>
apeiros: API's these days, amirite?
<apeiros>
the solution is really ugly too - busy loop :(
<apeiros>
with a poll routine
<r0bglees0n>
Senjai: twitter is pretty much a real-time application, it isn't serving requents infrequently, and rails generally has terrible throughput for that. i dont really have any idea, but it's probably something you'd scale across services, not a rails app, as i know them.
<apeiros>
r0bglees0n: but rails got resque, easy, amirite?
yfeldblum has joined #ruby-lang
<Senjai>
r0bglees0n: by "real time" you mean makes extensive use of an API and ajax communications to provide the illusion of instant updates?
<Senjai>
The bottleneck isn't serving the content, it's serving the JSON, which is better handled by another program that can interface with a database faster
<apeiros>
Senjai: highlighting the difference to the CS term "real time"?
<Senjai>
apeiros: I guess
<apeiros>
damit! and now Errno::ENORAMEN >:(
<apeiros>
but next time I really have to cook my enhanced ramen again. this cup stuff is crap.
<Senjai>
apeiros: Try kill -9 then reboot
<apeiros>
Senjai: no use, it got rm -rf'ed
<r0bglees0n>
Senjai: well, twitter has many clients, would you serve a HTTP API off rails, esp with the amount of traffic twitter would get? i wouldn't, but i also no longer believe rails is the best way to build applications going forward either.
<Senjai>
r0bglees0n: I would, and AFAIK twitter still does for its front end.
<r0bglees0n>
okay
<Senjai>
As I said, it's the api requests that are the bottleneck
<Senjai>
as with any javascript loaded application
<Senjai>
I agree that for a JSON API, rails is too slow.
<r0bglees0n>
it's too slow for everything
nszceta has quit [Remote host closed the connection]
<Senjai>
r0bglees0n: We get 800ms response times on our production sites
<Senjai>
the problem isn't always the tool you know.
<Senjai>
r0bglees0n: Same principle applies, often its the programmer not the tool
<r0bglees0n>
okay
<r0bglees0n>
programmers write tools
<r0bglees0n>
so thats true
* Senjai
cheers
ecnalyr has joined #ruby-lang
<Senjai>
r0bglees0n: And even better, if its a good tool, with a good programmer, a good programmer could optimize the good tool however he/she likes while still saving time of having to write it all from scratch
<Senjai>
No framework will ever suite the needs of everyone
<Senjai>
Thats why we have local forks
elliotec has joined #ruby-lang
bin7me has joined #ruby-lang
<apeiros>
r0bglees0n: dunno, I can get rails to have <20ms responses just fine. I only do that kind of optimization on our autocompletion controllers, though.
<Senjai>
apeiros: That's pretty amazing
<Senjai>
apeiros: most of our production code bases were rescue projects, thats my excuse!
elliotec has quit [Remote host closed the connection]
<r0bglees0n>
apeiros: yeah, but my problem is that you have to work hard to get there. i think rails starts off with a stack that is far too big.
<apeiros>
Senjai: it doesn't need much. just use Oj for json generation. use a db view which strips the model to the necessary columns. done.
<r0bglees0n>
apeiros: as your application grows, the "productivity gain" falls off.
<apeiros>
r0bglees0n: our app is >300 models big. I know that ;-)
<apeiros>
but our biggest impediment is not rails
<apeiros>
its the unwillingness of business to allow time to refactor and clean up.
<Senjai>
+1
<apeiros>
that leads to issues no matter the language or framework
havenwood has quit []
<apeiros>
given the scale of our app, rails does IMO fantastic.
<Senjai>
r0bglees0n: Rails has a code review pool of 100's of contributors, if you think you can solve the same problem with your team of 8 reviewing code along the way you're welcome to try.
<r0bglees0n>
perhaps, but in my experience that's just not true. to stay productive, you might want to preload a rails environment in a process, to avoid trying to boot it.
<apeiros>
I wouldn't want to do that e.g. in sinatra (and I like sinatra)
<Senjai>
I'm almost sure it will be a disadvantage cost wise
<r0bglees0n>
Senjai: okay, lol
jvrmaia has quit []
<ljarvis>
are we complaining about rails?
<ljarvis>
I cba to backlog
<r0bglees0n>
i wasn't aware i was complaining
<r0bglees0n>
but some people seem offended, indeed
<Senjai>
more like debating
<Senjai>
I'm not offended :P
<apeiros>
huh?
<ljarvis>
im offended that its so cold in my house right now
<apeiros>
didn't notice any offended people either
<r0bglees0n>
oh okay, i assumed the 100-contributors thing was just a reply of anger or something
elliotec has joined #ruby-lang
<r0bglees0n>
i dont have a problem with rails, but ill never contribute to it, very unlikely
<r0bglees0n>
i dont believe in it
<r0bglees0n>
so id prefer to invest in alternatives
<ljarvis>
apeiros: 300 models? nice! I'm at about 220
<apeiros>
ljarvis: I said >300! damit, why do you want to offend me?!
makoto_ has joined #ruby-lang
<ljarvis>
BRO
<apeiros>
SIS
<ljarvis>
I said about 220
<ljarvis>
which means like 480
<Senjai>
r0bglees0n: nope, I'm just saying, that your using a product thousands of others use, it's likely to be more battle tested and extensible that whatever your team could come up with given the price of labor
<apeiros>
ah, off-by-one, yeah, common problem
<ljarvis>
I like rails
<r0bglees0n>
Senjai: everything starts somewhere, if no one invested in alternatives we'd be.. where?
<r0bglees0n>
we probably wouldn't have a computer
<apeiros>
I don't. but I reached a state where I don't mind it much either.
<Senjai>
r0bglees0n: There are alternatives, Django, Node, etc
<r0bglees0n>
i want alternatives in ruby
<apeiros>
and I think lots of rails bashing is undeserved and/or misguided.
<Senjai>
r0bglees0n: but for the sake of developing an application, because thats what makes you money, you shouldnt combine that into the cost of making a new framework
<Senjai>
r0bglees0n: Sinatra
<r0bglees0n>
apeiros: i don't
<r0bglees0n>
at all
elliotec has quit [Remote host closed the connection]
<r0bglees0n>
the more the better
<r0bglees0n>
maybe people will invest in alternatives
<apeiros>
r0bglees0n: want to contribute to a rather opinionated, mobile-oriented framework?
<ljarvis>
bashing isn't helpful
<Senjai>
I disagree, more alternatives = more talented people reinventing the wheel.
<apeiros>
Senjai: competition is good
elliotec has joined #ruby-lang
<Senjai>
I'd rather all the talented rubyists focus on making a wheel the best wheel it can be
<r0bglees0n>
well, i disagree with that on a fundamental level
<ljarvis>
also agree with competition being good
<apeiros>
and rails has enough contributors
<Senjai>
apeiros: Right, but we compete against similar frameworks in other languages
<r0bglees0n>
ljarvis: it is helpful, because too many people hero-hug Rails like it's faultless.
<r0bglees0n>
it's full of warts and problems.
<ljarvis>
r0bglees0n: really? i dont see that past the bashing
<ljarvis>
but maybe im too deep
<Senjai>
I dont think its faultless at all :/
<Senjai>
I'm just saying you could fix/optimize it and still save money on building it yourself
<r0bglees0n>
im not interested in money
<r0bglees0n>
so i dont really care about that
ssb123 has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
<Senjai>
Sorry, I thought we were talking about production dealios
<Senjai>
For your free time, I think making something new is a fantastic idea
elliotec has joined #ruby-lang
senj has quit [Quit: Sleep Now]
llakey has quit [Ping timeout: 248 seconds]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
llakey has joined #ruby-lang
arBmind has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
CJD14 has joined #ruby-lang
elliotec has joined #ruby-lang
arBmind has quit [Client Quit]
elliotec has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
phansch has joined #ruby-lang
adayzdone has joined #ruby-lang
yatish27_ has quit []
<yorickpeterse>
r0bglees0n: you sound an awful lot like a hippie lately
<r0bglees0n>
lol
<r0bglees0n>
good
<ljarvis>
did you SEE is hair?
<ljarvis>
his
<yorickpeterse>
I've seen it on the twitters
<ljarvis>
crazy stuff
<yorickpeterse>
looks more like he stuck his hand in a socket
<ljarvis>
serious business
<r0bglees0n>
lol
<r0bglees0n>
yorickpeterse: that's exactly what happened
<yorickpeterse>
Then again I look like something straight out of a shampoo ad
heftig has joined #ruby-lang
<ljarvis>
calm down beiber
CaptainJet has joined #ruby-lang
<_tockitj>
"Justin Bieber fans urged to cut themselves to stop him from smoking weed"
panpainter has left #ruby-lang [#ruby-lang]
<ljarvis>
"Yorick Peterse fans urged to /quit to stop him rambling all day"
<yorickpeterse>
ljarvis: police aint got shit on me
Asher has joined #ruby-lang
elliotec has joined #ruby-lang
d4rkr4i has quit [Quit: Leaving.]
brooks has joined #ruby-lang
nifoc has joined #ruby-lang
skade_ has joined #ruby-lang
tonni has joined #ruby-lang
kurko__ has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
skade has quit [Ping timeout: 240 seconds]
dm78 has joined #ruby-lang
dannysmith has quit [Ping timeout: 260 seconds]
dm78 has quit [Remote host closed the connection]
<yorickpeterse>
heh, only in NL: Museum about prostitution
dm78 has joined #ruby-lang
senj has joined #ruby-lang
<yorickpeterse>
which apparently will also feature videos
brooks has quit [Quit: brooks]
kurko_ has quit [Ping timeout: 260 seconds]
lfox has joined #ruby-lang
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
brooks has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
brooks has quit [Client Quit]
brooks has joined #ruby-lang
dummey has joined #ruby-lang
dorei has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 0.4.2]
breakingthings has joined #ruby-lang
robmiller has quit [Quit: robmiller]
|jemc| has joined #ruby-lang
FlyingLeap has quit [Remote host closed the connection]
skade_ has quit [Quit: Computer has gone to sleep.]
elliotec has joined #ruby-lang
momomomomo has joined #ruby-lang
brooks has quit [Quit: brooks]
elliotec has quit [Remote host closed the connection]
ssb123 has quit [Remote host closed the connection]
brooks has joined #ruby-lang
havenwood has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
<hfp>
Hey, I am doing the Ruby Koans and I was wondering if there was anywhere I could find the answers to the questions? I'm not asking for the solutions but rather the answers to the question in comments in some of the .rb files.
<ljarvis>
it's a bad example of a real world thing
<r0bglees0n>
ljarvis: if you still maintain that branch(v3), sure
elliotec has joined #ruby-lang
<ljarvis>
I'm not feeling very creative
<r0bglees0n>
i cant use any older
dm78 has joined #ruby-lang
<ljarvis>
r0bglees0n: yeah that's master atm happy to merge and bump
<ljarvis>
4 isn't ready
<hfp>
ljarvis: I understand the example but why would you want to redefine the nil? method in such a way?
dm78 has quit [Remote host closed the connection]
<ljarvis>
hfp: in general you wouldn't, but you should ask yourself: What if the object i have HAS overriden nil? ? maybe that means I definitely want == nil
dm78 has joined #ruby-lang
<ljarvis>
hfp: it's all a matter of what you're looking for
<ljarvis>
in general, not much ruby code does explicit nil checking
<hfp>
ljarvis: Hmm, I see. Thanks.
<ljarvis>
because the only falsely values in ruby are nil and false, so it's more common to check against falsely
Lewix_ has joined #ruby-lang
<ljarvis>
if people wouldn't write if obj.nil? they'd write if !obj or unless obj
<ljarvis>
ie*
<hfp>
All of these three things are exactly the same?
cored has quit [Ping timeout: 272 seconds]
<ljarvis>
no :)
<ljarvis>
if foo # returns true unless foo is falsely, ie nil or false
enkristoffer has quit [Quit: ❤]
benlovell has quit [Ping timeout: 272 seconds]
robmiller has joined #ruby-lang
Lewix has quit [Ping timeout: 240 seconds]
dm78 has quit [Ping timeout: 245 seconds]
<hfp>
I guess I don't get it 100% because I can't imagine a real world application to it. Maybe this will come as I learn more
<hfp>
ljarvis: Right. So the only way to have .nil? return true is with nil.nil?. Am I understanding correctly?
<Lewix_>
so if i have 1,121 i want it rounded UP to the nearest 0.05
<ljarvis>
hfp: that's correct, unless the object implements nil? itself
<Lewix_>
hfp:
<ljarvis>
hfp: so, if you really want to check for the explicit value of nil, you should use == nil
flori has quit [Ping timeout: 260 seconds]
<hfp>
ljarvis: I think I'm getting it. Because of this obj.nil? is preferable because it uses either the implemented .nil? from the object or the default one whereas obj == nil doesn't use the implemented .nil? method and this might break your logic, yes?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lewix_>
ljarvis: ok i think id have to write it
<Lewix_>
one liner
* Lewix_
dont be lazy
<ljarvis>
I would use sprintf
relix has joined #ruby-lang
mistym has joined #ruby-lang
robmiller has joined #ruby-lang
flori has joined #ruby-lang
<apeiros>
<< Lewix_: how to round up to the nearest 0.10 value
<apeiros>
math
<apeiros>
you multiply, ceil, divide
<ljarvis>
mathhh
<Lewix_>
i did it apeiros
<Lewix_>
apeiros: i was hoping for a ruby one word method
ric__ has joined #ruby-lang
<ljarvis>
tehe
<apeiros>
doesn't exist. sadly ruby didn't implement #round/#ceil/#floor as clever as I did :) (mine allowed round(0.1)
diegoviola has quit [Ping timeout: 245 seconds]
elliotec has quit [Remote host closed the connection]
anulman has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Client Quit]
elliotec has joined #ruby-lang
adayzdone has joined #ruby-lang
marcofernandez has joined #ruby-lang
x0f_ has joined #ruby-lang
arBmind has quit [Ping timeout: 240 seconds]
nonnatus has joined #ruby-lang
centrx has joined #ruby-lang
x0f has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby-lang
flip_digits has joined #ruby-lang
diegoviola has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.2]
breakingthings has quit []
vlad_starkov has quit [Remote host closed the connection]
RoxasShadowRS has quit [Read error: Connection reset by peer]
RoxasShadowRS has joined #ruby-lang
kurko_ has joined #ruby-lang
brooks has quit [Quit: brooks]
kurko__ has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby-lang
riffraff has quit [Quit: Leaving]
FlyingLeap has joined #ruby-lang
FlyingLeap has quit [Changing host]
FlyingLeap has joined #ruby-lang
krzyzaq has joined #ruby-lang
krzyzaq has quit [Client Quit]
jsullivandigs has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
kurko_ has quit [Quit: Computer has gone to sleep.]
micalexander has joined #ruby-lang
feinbergscott has quit [Ping timeout: 240 seconds]
feinbergscott has joined #ruby-lang
yalue has quit [Quit: Leaving]
breakingthings has joined #ruby-lang
micalexander has quit [Ping timeout: 252 seconds]
MichD is now known as michd
mistym has joined #ruby-lang
adayzdone has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
francisfish has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
tpope has joined #ruby-lang
sferik has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nifoc has quit []
jsullivandigs has quit [Remote host closed the connection]
mikecmpbll has joined #ruby-lang
jsullivandigs has joined #ruby-lang
<hfp>
Hey, I have another question. In the following https://eval.in/96517, I would have expected both p statements to return nil. Why one is returning [] and the other nil?
vlad_starkov has joined #ruby-lang
micalexander has joined #ruby-lang
robmiller has quit [Quit: robmiller]
<centrx>
hfp, Almost seems like a bug
<toretore>
"Returns nil if the index (or starting index) are out of range."
<toretore>
no reason to expect otherwise
onewheelskyward has joined #ruby-lang
<centrx>
Out of range is returning [] though
<centrx>
If it is 1 out of range
<hfp>
array[4,1] is out of range, no?
<toretore>
oh
<hfp>
toretore: haha yes, my words exactly
vpretzel has quit [Quit: Adios!]
jsullivandigs has quit [Ping timeout: 248 seconds]