fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
<daftspunk> shevy: no i haven't thankyou. i had no idea ruby was japanese invented either. i love japanese products, my middle name is ruby, all signs to this language
Matt_S_G has joined #ruby
<Rezwan> wow
ianbrandt has quit [Quit: ianbrandt]
<shevy> back when I was writing PHP for almost 2 years, I wanted a better language and I chose between python and ruby
<shevy> that interview was what made me try out ruby first
<Rezwan> reading it right now!
<shevy> daftspunk, these days, matz is working on mruby (minimal ruby, for embedded things), you can "watch" him add code :D 3 hours ago ... https://github.com/mruby/mruby/
<shevy> but mruby is kinda limited ... no load() nor require()
<Rezwan> daftspunk: are you learning Ruby?
centipedefarmer has joined #ruby
<daftspunk> Rezwan: considering it
<Rezwan> me too!
<centipedefarmer> hi what can/should I do about this? Unable to resolve dependencies: google-api-client requires addressable (>= 2.2.3), faraday (~> 0.7.0), launchy (>= 2.0.0); autoparse requires addressable (~> 2.2.3); signet requires addressable (>= 2.2.3), faraday (~> 0.8.1), jwt (>= 0.1.5)
<Rezwan> shevy: what is the best place to start learning Ruby do you think?
<rking> Help a n00b out? I'm trying to remember how to access a class's instance variables. Obviously this won't work, because inside y() self is the instance, not the class; https://gist.github.com/50017e275555621d1f5d
<centipedefarmer> ClassName.variablename
<shevy> Rezwan well. only real way is to write rbuy code on your own really
<shevy> *ruby
<krz> how do i subtract 5 minutes from Date.today ?
<rking> centipedefarmer: Ahh, odd. I wouldn't have guessed.
byronb has joined #ruby
byronb has quit [Excess Flood]
<ddouglas> OK, to the Array class I go then
<centipedefarmer> you might have to write an accessor method on the class, i'm not sure
<shevy> Rezwan, what I liked was chris pine learn to program. it is a bit a crash course through ruby. http://pine.fm/LearnToProgram/?Chapter=00
<rking> centipedefarmer: No, that doesn't answer it.
Matt_S_G has quit [Quit: Matt_S_G]
<rking> centipedefarmer: Yeah, that sounds about right.
<Rezwan> shevy: okay :)
<rking> But how do you write an accessor for a class variable?
<centipedefarmer> def ClassName.method_name
<centipedefarmer> or def self.method_name
<shevy> krz, perhaps so Date.today - 5*60, or use Time.now - 5*60
<shevy> ewww
<rking> Oh, grossness. =(
<shevy> class variables
<rking> Why not just use @@var ?
baroquebobcat has quit [Ping timeout: 264 seconds]
<rking> I can't ever get straight where this hatred of @@vars comes from.
<shevy> ewwwwwwwww
jjbohn has joined #ruby
<rking> shevy: OK then solve the gist. =P https://gist.github.com/50017e275555621d1f5d
<shevy> I once spent 2 hours trying to find a bug
<shevy> then I noticed some class had a @@var
<shevy> since that day, I am not using class vars anymore
ckrailo has quit [Quit: Computer has gone to sleep.]
<shevy> it was awful code everywhere else too
<shevy> also my own code from years ago
<rking> =|
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<rking> OK then solve the gist. =P =b
<daftspunk> is it true ruby can do mixin classes?
chson has joined #ruby
<Tasser> daftspunk, modules
<centipedefarmer> so i've got a gem version conflict I need help unraveling: ERROR: While executing gem ... (Gem::DependencyError)
<centipedefarmer> Unable to resolve dependencies: google-api-client requires faraday (~> 0.7.0); signet requires faraday (~> 0.8.1)
v0n has joined #ruby
<centipedefarmer> thing is, I have no such gem installed as signet
baroquebobcat has joined #ruby
<daftspunk> Tasser: what is the syntax? implements class_one, class_two, etc. ?
<rking> centipedefarmer: Then it's probably further down in the dependency chain.
<centipedefarmer> anyone have any idea what's going on with this? I already have this gem installed on another similar with the same version of Ruby and it installed fine there
<rking> centipedefarmer: Try to install them one at a time until you see what is the issue.
<centipedefarmer> this same app, even
<Tasser> daftspunk, there is no static typing
nari has quit [Ping timeout: 264 seconds]
<centipedefarmer> the only one i'm really trying to install is google-api-client
mikepack has quit [Remote host closed the connection]
mneorr has quit [Quit: Leaving.]
linoj has joined #ruby
<rking> centipedefarmer: Maybe they goofed, or something in one of the deps changed unexpectedly. Plan on getting your hands dirty digging around github versions of various gems.
<daftspunk> Tasser: i'm not sure i follow
<centipedefarmer> ugggh
<centipedefarmer> f*ckers
<centipedefarmer> this installed fine on another server. admittedly it was, oh fgeez, a month ago
v0n has quit [Client Quit]
v0n has joined #ruby
<centipedefarmer> but of course as soon as I want to turn artound and dpeploy the same thing to the _production_ server, then it's f*cked, of course. stuff like this makes me want to hang this crap up and become a truck driver.
<rking> Hrm. Could be any one of a number of things. Are you 100% sure it's the same source?
<rking> centipedefarmer: If it's that dire, just copy the gems from the other server. =)
darren has joined #ruby
<centipedefarmer> hmmmmm....
ZachBeta has joined #ruby
<rking> centipedefarmer: Hehe. I pretty much did that literal thing, and the non-programming parts of programming were definitely a factor. It's not worth giving up, I decided. =)
<daftspunk> Tasser: found it, define with module, mixin with include, is that right?
benson has quit [Read error: Connection reset by peer]
<centipedefarmer> ah it looks like this one doesn't have http://gems.github.com
<centipedefarmer> need to add that as a source methink
<shevy> daftspunk yes
<shevy> a module can act like a functional skeleton
<daftspunk> w00t php cant do that!
<shevy> yeah but really the biggest difference is the philosophy and that ruby code is poetry
<rking> centipedefarmer: I thought Github was getting out of the gem hosting business?
<centipedefarmer> yeah i got into programming because i like programming, aparently that was a mistake :D
<centipedefarmer> maybe they are, i probably missed that news
<centipedefarmer> anyway adding it didn't help
<rking> I'd seriously think about copying them.
<centipedefarmer> yeah
<shevy> rking man what's up with you lately
<centipedefarmer> i'm just... what's this signet?
<shevy> your mojo kinda ... disappeared :(
tiripamwe has quit [Ping timeout: 264 seconds]
jjbohn has quit [Quit: Leaving...]
<centipedefarmer> hmm, I checked the staging environment where this is already installed, it has signet 0.3.4. Thought maybe I could try installing that specific version on the new environment, like maybe whatever depends on signet is not being specific enough and causing rubygems to try to install a newer version
<centipedefarmer> and what that got me was bad response Gateway Time-out 504 (http://production.cf.rubygems.org/gems/addressable-2.2.8.gem)
baroquebobcat has quit [Quit: baroquebobcat]
<centipedefarmer> all right, so copying gems then i guess. once i figure out how to go about that
tiripamwe has joined #ruby
verbad has joined #ruby
<centipedefarmer> so do i just copy its directory into $GEM_PATH/gems/ then?
techhelp has quit [Quit: This computer has gone to sleep]
sebicas has left #ruby [#ruby]
nadirvardar has quit [Ping timeout: 240 seconds]
deryl has joined #ruby
<shevy> cant you install it
<shevy> "gem install *.gem"
<centipedefarmer> where would this .gem file be
<shevy> in theory, you could also extract it, then copy it to your SITE PATH
<shevy> in cache/ subdirectory
<shevy> depends on the prefix of your ruby installation
aces1up has quit [Ping timeout: 244 seconds]
<shevy> where does your ruby installation reside?
<shevy> with default prefix=/usr the path would be /usr/lib/ruby/gems/1.9.1/cache/
<shevy> debian is known to be an idiot and change that to some /var/* something
classix has quit [Remote host closed the connection]
nadirvardar has joined #ruby
nateberkopec has joined #ruby
RudyValencia has quit [Read error: Connection reset by peer]
RudyValencia has joined #ruby
<centipedefarmer> ah cool i was able to get signet 0.3.4 to install normally this time, after that google-spi-client instaled fine
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
sgronblom has joined #ruby
<centipedefarmer> some dependency somewhere below needs to specify ~>0.3.4 or else you get 0.4.0 and that's what wants faraday ~>0.8.1
<centipedefarmer> whereas google-api-client requires ~>0.7.0
<centipedefarmer> wonder if there's someone i should tell about this
<shevy> perhaps the signet owner
Liothen has quit [Read error: Connection reset by peer]
i0n has joined #ruby
jmcphers has joined #ruby
liluo has quit [Remote host closed the connection]
<centipedefarmer> heh. yeah looking at the google-api-gemspec on github, it seems to be asking for a 0.3 version of signet, so I don't know why gem was trying to give me the 'latest'
<centipedefarmer> oh well
yoklov has quit [Quit: bye!]
<centipedefarmer> oh wait no ot says >=0.3.1 not ~>
<centipedefarmer> ah.
cakehero has joined #ruby
hunglin has joined #ruby
<centipedefarmer> it's been changed to ~>0.3.0 since but that isnt released yet
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<centipedefarmer> or maybe not. this is confusing. never mind, i'll leave off my ramblings.
artOfWar has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
<shevy> as long as you keep those centipedes floating
classix has joined #ruby
xaq has quit [Remote host closed the connection]
josefig has quit [Ping timeout: 272 seconds]
jrajav has joined #ruby
cousine has joined #ruby
justsee is now known as justsee|away
drago757 has joined #ruby
ryh has joined #ruby
minijupe has quit [Quit: minijupe]
nateberkopec has quit [Quit: Leaving...]
MatthewGA_ has quit [Quit: Leaving]
iamjarvo has joined #ruby
adeponte has quit [Remote host closed the connection]
codeman has joined #ruby
adeponte has joined #ruby
justsee|away is now known as justsee
Cool_Fire has joined #ruby
<Cool_Fire> Hello
sailias has joined #ruby
adamkittelson has quit [Read error: Operation timed out]
ciopte7 has quit [Quit: ciopte7]
<Cool_Fire> I wanted to confirm that a case/when statement is broken down to the same thing as an if/elsif statement by the interpreter. Is this correct?
ggreer has quit [Excess Flood]
hunglin has left #ruby [#ruby]
mxweas has joined #ruby
classix has quit [Remote host closed the connection]
AngryParsley has joined #ruby
AngryParsley has quit [Excess Flood]
AngryParsley has joined #ruby
AngryParsley is now known as ggreer
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
justsee has quit [Quit: Linkinus - http://linkinus.com]
paradoja has quit [Ping timeout: 252 seconds]
shavus has joined #ruby
shavus has quit [Client Quit]
classix has joined #ruby
cantonic has joined #ruby
gtuckerkellogg has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
exchgr has joined #ruby
cousine has quit [Remote host closed the connection]
bosent has joined #ruby
<bosent> hi
<Rezwan> hi Bosent
<fowl> welcome to the ruby
ciopte7 has joined #ruby
<bosent> hi thanks guys
<drago757> hello gentlemen
artOfWar has joined #ruby
<drago757> how is everyone this evening
<jrajav> Cool_Fire: I'm not sure about the internals, but from a language standpoint, yes they are equivalent
<bosent> I am trying to start a project and was looking for some talented programmers who may want to join
<Rezwan> drago757: fine :) even it's morning over here! ;p
artOfWar_ has joined #ruby
<drago757> I'm very excited I am finally getting back into programing
<drago757> and I am planing on making ruby one of the three lang I focus on
<drago757> i need to work on my regex
<Rezwan> awesome
<bosent> no one is interested?
<drago757> bosent
<bosent> compensation obv
<drago757> i am
<Cool_Fire> jrajav: Yeah, I'm just trying to figure out if using one over the other is going to give me any performance difference.
<drago757> but I am a newbie
<drago757> Rezwan how did you become a good coder
adeponte has quit [Remote host closed the connection]
<Rezwan> drago757: I'm not a good coder yet. but hopefully to become. yet a complete newbie!
<Cool_Fire> A simple benchmark I wrote seems to indicate the difference is negligible
<Cool_Fire> Certainly not statistically significant
<Rezwan> bosent: I think better you post it on a message board
savage-_ has quit [Ping timeout: 244 seconds]
<jrajav> Cool_Fire: 1) No. 2) You're optimizing *way* too early and worrying about a very trivial construct
artOfWar has quit [Ping timeout: 240 seconds]
<bosent> you could be right
<bosent> thought it would be worth a shot
liluo has joined #ruby
<jrajav> If performance is so important to you that you're worried about the relative speeds of difference branching constructs (which aren't actually different), why are you even writing this application in Ruby?
<Cool_Fire> When optimizing it's never too early or too trivial ;)
<jrajav> Yes, yes it is ;)
<jrajav> You risk obfuscating your code and making it less maintainable by overoptimizing -- not to mention the time you waste and the stress you suffer
<Cool_Fire> Also, realistically it doesn't matter in this specific case no. But as high performance computing is my profession it's comes natural to me to worry about it
drPoggs has joined #ruby
<jrajav> Again, why are you even using Ruby then?
lupine_85 has joined #ruby
<Cool_Fire> Because Ruby is fun to write
<jrajav> Dynamically typed languages are going to suffer an order-of-magnitude performance hit already, and Ruby doesn't even perform that well in that category
<krz> why does (3.hours.ago..Time.now.utc).map { |time| { :hour => time.hour } }.uniq return the results: [{:hour=>22}, {:hour=>23}, {:hour=>0}, {:hour=>1}] but with the following messages: /Users/Chris/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.2/lib/active_support/time_with_zone.rb:328: warning: Time#succ is obsolete; use time + 1
<jrajav> So write clear, maintainable code instead of worrying about tiny, irrelevant performance gains
<Cool_Fire> <Cool_Fire> Also, realistically it doesn't matter in this specific case no. <- that
<jrajav> Right, I'm just trying to give you some general advice
<Cool_Fire> It's not so much a concern as it is a point of interest
<Cool_Fire> And if I'm writing something serious it's usually in C yeah
<Cool_Fire> (or Java actually)
erichmenge has quit [Quit: Be back later]
erichmenge has joined #ruby
janelwang has joined #ruby
<FriarTech> Cool_Fire: C but not C++?
<jrajav> Why would you use C++ for anything ever
<Cool_Fire> ^ Besides that :p
erichmenge has quit [Client Quit]
<Cool_Fire> No, I've never really used C++ for such things
<krz> anyone?
<FriarTech> Why? I use C C++ Ruby Python Perl ----whatever I choose or projects I join
erichmenge has joined #ruby
<FriarTech> Not that its worth a debate - was just wondering
bglusman has quit [Remote host closed the connection]
<cmyers> I never wrote a lot of C. I feel like if I needed performance *and* had to write it "every day as part of my job", I would greatly prefer C++ to C for scoping, type safety, etc.
apok has quit [Ping timeout: 244 seconds]
<FriarTech> Sorta depends on the project
<cmyers> is the perf benefits of C over C++ really that significant (even given I've already said a situation where perf is "important")?
<Cool_Fire> For me personally it's more a matter of familiarity. I've written C++ a few times. I've done a lot more C though
erichmenge has quit [Client Quit]
erichmenge has joined #ruby
<FriarTech> Perf of C over C++ is within 5% whatever that means - but that's in the spec of C++
<cmyers> I think for a pet project it's not that relevant, but I've seen a lot of C++ enterprise code, and some C enterprise code too, and I know which I'd ratehr maintain =D
<jrajav> The performance difference between C and C++ is completely negligible, and both are second only to Fortran and assembly (for the most part)
<FriarTech> Meaning c is slightly faster
alexim has quit [Quit: sleep]
<jrajav> No, the reason you don't write in C++ is because it's nonsensical and bloated and utterly obfuscated
justsee has joined #ruby
<jrajav> If you want object-oriented, go with Objective-C
<FriarTech> I C
ryh has quit [Remote host closed the connection]
<FriarTech> ugh objective c
<cmyers> obfuscated, really? Hmm.
<Cool_Fire> I must say, when I write C++, it usually comes out looking an awful lot like C
<Cool_Fire> XD
erichmenge has quit [Client Quit]
<jrajav> ^ That too
erichmenge has joined #ruby
<jrajav> It's not even *designed* to write pure object-oriented code in, just to "wrap" imperative C code
<Cool_Fire> It's unpleasant to write imo.
<jrajav> cmyers: Yes, obfuscated
<FriarTech> But of all the languages I really ENJOY ruby....
<jrajav> cmyers: Have you ever worked with a heavily template-based framework?
<heftig> C++ has horrible compile-time performance
<FriarTech> heftig :)
erichmenge has quit [Client Quit]
<cmyers> Yes, but it was written in a careful enterprise environment with top-notch c++ d00ds, and was carefully reviewed
Hanmac has quit [Ping timeout: 255 seconds]
erichmenge has joined #ruby
nadirvardar has quit [Quit: Computer has gone to sleep.]
<cmyers> the same company had millions of lines of perl
<heftig> nobody sane would export C++ interfaces from shared libraries
<cmyers> and every line was fucking beautiful
<jrajav> I have written many applications in both C++ and Java, both hobby and professional
pdtpatrick has quit [Quit: pdtpatrick]
<jrajav> I loathe both for various reasons
<cmyers> so perhaps the relevant argument is comparative ease, rather than what is possible.
Kae has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
<FriarTech> Never ever got into java
<FriarTech> The libraries never seemed to me to be organized well
erichmenge has quit [Client Quit]
cakehero has quit [Quit: Computer has gone to sleep.]
<jrajav> The libraries are just about the only good part of Java
<cmyers> in some ways libraries are the strongest argument for java. libs and threading.
<cmyers> yeah
<cmyers> guava is baller.
<cmyers> there are sketchy libraries in every language, but the core ones you care about are pretty active and solid.
<cmyers> it might not be a stretch to say java is to C++ what ruby is to perl, in terms of relative library features.
* Cool_Fire goes back to actually writing code
<Cool_Fire> Later
zeromodulus has quit [Remote host closed the connection]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<FriarTech> later Cool
techhelp has joined #ruby
JoshWines has quit [Ping timeout: 252 seconds]
<i0n> Dir.glob("**/*").each { |i| y = %w ( "#{i} ") }
<i0n> is this syntax right?
bigzed has quit [Ping timeout: 272 seconds]
bigzed has joined #ruby
classix has quit [Remote host closed the connection]
mikepack has joined #ruby
heftig has quit [Ping timeout: 246 seconds]
itnomad has joined #ruby
heftig has joined #ruby
darren has quit [Remote host closed the connection]
classix has joined #ruby
Araxia has quit [Quit: Araxia]
emmanuelux has quit [Ping timeout: 252 seconds]
linoj has quit [Quit: linoj]
mengu has quit [Remote host closed the connection]
any-key has quit [Ping timeout: 252 seconds]
cantonic has quit [Quit: cantonic]
Hanmac has joined #ruby
<krz> is there a better way to do this: without iterating over ever second: (48.hours.ago..Time.now.utc).map { |time| { :hour => time.hour } }
manizzle has quit [Ping timeout: 244 seconds]
tommyvyo has joined #ruby
cantonic has joined #ruby
CaptainJet has joined #ruby
mikepack_ has joined #ruby
JoshWines has joined #ruby
<FriarTech> how about (48.hours.ago..Time.now.utc).step(somesortofinterval)
nari has joined #ruby
drago757 has quit [Quit: drago757]
opus has quit [Quit:]
janelwang has quit [Remote host closed the connection]
<krz> FriarTech: still returns a warning
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
linoj has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
mikepack_ has quit [Remote host closed the connection]
tommyvyo has joined #ruby
chimkan has joined #ruby
crankycoder has quit [Remote host closed the connection]
nateberkopec has joined #ruby
nateberkopec has quit [Client Quit]
v0n has quit [Ping timeout: 272 seconds]
Know1edge has quit []
xmesg has quit [Ping timeout: 264 seconds]
lledet has joined #ruby
xmesg has joined #ruby
hunglin has joined #ruby
hunglin has quit [Client Quit]
hunglin has joined #ruby
savage- has joined #ruby
Quadlex has quit [Read error: Connection reset by peer]
eywu has quit [Quit: Leaving.]
artOfWar_ has quit [Ping timeout: 244 seconds]
k_89_ has quit [Ping timeout: 272 seconds]
chichou has quit [Remote host closed the connection]
dv310p3r has joined #ruby
jeff_sebring has joined #ruby
erichmenge has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
bosent has quit []
verbad has quit []
anykey has joined #ruby
anykey is now known as any-key
tchebb has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
joshman_ has joined #ruby
savage- has quit [Remote host closed the connection]
<Paradox> i came across a ruby-related service the other day similar to http://cloudinary.com/ but free
<Paradox> that did facial recognition and histogram-based cropping
<Paradox> but i didnt save it and i cant find it in my history
<Paradox> anyone have any ideas what i'm talking about
Araxia has joined #ruby
<Paradox> i know its a long shot
<Paradox> but its worth a try
bairui has quit [Ping timeout: 246 seconds]
awarner has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
oscardelben has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
banghouse has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
radic_ is now known as radic
uris has joined #ruby
bglusman has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
vitoravelino is now known as vitoravelino`afk
gtuckerkellogg has joined #ruby
ciopte7 has quit [Ping timeout: 272 seconds]
nadirvardar has joined #ruby
krusty_ar has quit [Ping timeout: 272 seconds]
bglusman has quit [Ping timeout: 272 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
riginding has quit [Remote host closed the connection]
mpereira has quit [Ping timeout: 272 seconds]
verbad has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
samrose has joined #ruby
techhelp has joined #ruby
gtuckerkellogg has joined #ruby
SegFaultAX has joined #ruby
manizzle has joined #ruby
ciopte7 has joined #ruby
samrose has quit [Quit: Ex-Chat]
heftig has quit [Ping timeout: 246 seconds]
heftig has joined #ruby
manizzle has quit [Remote host closed the connection]
manizzle has joined #ruby
noganex has quit [Read error: Operation timed out]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
exchgr has quit [Quit: exchgr]
nedbat has quit [Ping timeout: 244 seconds]
rakunHo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
igotnolegs has joined #ruby
nedbat has joined #ruby
noganex has joined #ruby
bairui has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
LBRapid has joined #ruby
awarner has quit [Remote host closed the connection]
leoncamel has joined #ruby
itnomad has quit [Quit: Leaving]
stefanp_ has quit [Ping timeout: 265 seconds]
codeman has quit [Quit: Saindo]
<mmealling> booya! code finally worked.
crankycoder has joined #ruby
kawa_xxx has joined #ruby
ananthakumaran has joined #ruby
dhruvasagar has joined #ruby
sent-hil has joined #ruby
crankycoder has quit [Ping timeout: 255 seconds]
theRoUS has quit [Read error: Connection reset by peer]
techhelp has quit [Quit: This computer has gone to sleep]
cantonic has quit [Quit: cantonic]
chimkan has quit [Quit: chimkan]
Araxia has quit [Quit: Araxia]
ananthakumaran1 has joined #ruby
tiripamwe has quit [Quit: Leaving]
ananthakumaran has quit [Ping timeout: 244 seconds]
_justin has joined #ruby
krz has quit [Quit: krz]
ryh has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
kylemcgill has joined #ruby
savage- has joined #ruby
kaneda has joined #ruby
kaneda is now known as Guest5694
ryh has quit [Remote host closed the connection]
ddouglas has quit [Quit: Ex-Chat]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
devth_ has joined #ruby
banisterfiend has joined #ruby
mucker has quit [Read error: Connection reset by peer]
<devth_> if I have a class inside a couple modules, Foo::Bar::SomeClass, can I import Foo::Bar so I can just refer to the class as "SomeClass"?
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
<Cool_Fire> I wouldn't think so. That's a recipe for naming collisions.
<Cool_Fire> (I base this on nothing)
ryh has joined #ruby
mucker has joined #ruby
<devth_> it just seems weird that i have to refer to a class by its fully qualified name. other langs have some sort of require or import.
theRoUS has joined #ruby
<bnagy> include
EstanislaoStan has joined #ruby
v0n has joined #ruby
<devth_> include Foo::Bar; SomeClass.new
<devth_> doesn't work
chimkan_ has joined #ruby
<EstanislaoStan> If I define a class within a class, say Room within Dungeon, is there any way I can access Dungeon's instance variables from Room?
<bnagy> devth_: does for me?
<devth_> bnagy: hm, you're right. works in my repl. doesn't work in my rails controller.
<bnagy> who knows about rails, that shit is wack
jwmann has quit [Quit: Leaving.]
sailias has quit [Quit: Leaving.]
<devth_> :(
pdtpatrick has joined #ruby
avdotia has quit [Ping timeout: 272 seconds]
<bnagy> EstanislaoStan: that would be puncturing encapsulation
<bnagy> you should use methods on Dungeon instead
<bnagy> but, you can use instance_variables and instance_variable_get, from memory
savage- has quit [Remote host closed the connection]
TheTFEF has quit [Ping timeout: 244 seconds]
ReTFEF has joined #ruby
mucker has quit [Ping timeout: 244 seconds]
qtplatypus has joined #ruby
<bnagy> imho in that kind of case I would instantiate the Room in such a way that it knows which Dungeon it belongs to
ReTFEF has quit [Changing host]
ReTFEF has joined #ruby
ReTFEF is now known as TheTFEF
<bnagy> blah=Room.new self, size: 23, decor: :torture_chamber
<qtplatypus> What does ruby call it's floor function? I've tried lookig for floor and int but neather of them work.
tiripamwe has joined #ruby
<bnagy> qtplatypus: we call it floor
<bnagy> but it's only on Float
<EstanislaoStan> bnagy: So self would be an argument?
<bnagy> EstanislaoStan: if you're making a new Room from inside a Dungeon object yeah
drSproinky has joined #ruby
justsee is now known as justsee|away
nedbat has quit [Ping timeout: 244 seconds]
<EstanislaoStan> Ok.
avdotia has joined #ruby
drSproinky has quit [Client Quit]
verbad has quit []
oscardelben has quit [Quit: oscardelben]
centipedefarmer has quit [Quit: This computer has gone to sleep]
Araxia has joined #ruby
Rezwan has quit [Read error: Connection reset by peer]
andrewhl has quit [Read error: No route to host]
IrishGringo_ has quit [Remote host closed the connection]
andrewhl has joined #ruby
<codora> good evening, rubyists :D
michaelmartinez has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
beakerman has quit [Remote host closed the connection]
k_89_ has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
oscardelben has joined #ruby
k_89_ has quit [Read error: Connection reset by peer]
_justin has quit [Ping timeout: 272 seconds]
Beoran_ has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
kylemcgill has quit [Remote host closed the connection]
tommyvyo has joined #ruby
<EstanislaoStan> Good evening.
oscardelben has quit [Quit: oscardelben]
joshman_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cloud|office has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
tewecske has joined #ruby
devth_ has quit [Remote host closed the connection]
<i0n> hi
joshman_ has joined #ruby
linoj has quit [Quit: linoj]
<i0n> File.stat(file).mtime > Time.now-3600 is saying if files mtime is greater than 3600 seconds?
justsee|away is now known as justsee
ryh has quit [Remote host closed the connection]
<i0n> compared to current time *
wjimenez_5271_ has joined #ruby
<wjimenez_5271_> hi
balki_ is now known as balki
darren has joined #ruby
<wjimenez_5271_> it seems I am getting an error when converting a variable to an integer that is 0
<wjimenez_5271_> the variable value is being set by the output of a bash command: %x[virsh list |grep i-|wc -l]
<wjimenez_5271_> but when it is 0, it seems to crash my program
<wjimenez_5271_> any value other than 0 it works fine
<cloud|office> I have an array which has data in this format - {"name1"=>"value1", "name2"=>"value2" } , {"name3"=>"value3", "name4"=>"value4"} How can I split it so that all of it comes like {"name1"=>"value1", "name2"=>"value2", "name3"=>"value3"} like in a serial way! http://pastebin.com/cdeDhz0E
<wjimenez_5271_> wondering if there is a graceful way to handle situations when it is 0
Beoran_ has joined #ruby
khakimov has joined #ruby
<wjimenez_5271_> thinking begin, rescue, end?
sent-hil has quit [Remote host closed the connection]
<EstanislaoStan> bnagy: Thanks, that helped me solve an issue that had me stumped for quite a while.
sgronblo1 has joined #ruby
<bnagy> wjimenez_5271_: why would 0 not convert? Can you give an example of the faulting input and the failure message?
sent-hil_ has joined #ruby
sent-hil_ has quit [Remote host closed the connection]
<bnagy> personally, I would just shell out to virsh list and handle the rest in ruby, btw
chimkan_ has quit [Quit: chimkan_]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
sgronblom has quit [Read error: Connection reset by peer]
<wjimenez_5271_> @bnagy i was surprised at that myself
<bnagy> cloud|office: you can't do that with a hash - you have duplicate keys in your desired output
khakimov has quit [Read error: Operation timed out]
pdtpatrick has joined #ruby
<wjimenez_5271_> @bnagy, here's the code: https://gist.github.com/3186181
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<wjimenez_5271_> and yea, you're right it probably does make more sense to do the counting in ruby
<bnagy> so kvm_instances there will be something like " 0\n"
kawa_xxx has quit [Remote host closed the connection]
<bnagy> you might want to use to_i on that first
pdtpatrick has quit [Client Quit]
<wjimenez_5271_> well, it should just be a number like '0' or '25' b/c i am calling the word count command which should just output numbers
kawa_xxx has joined #ruby
<wjimenez_5271_> yea, good point I'll try that
<bnagy> no, it won't
sgronblo1 has quit [Ping timeout: 240 seconds]
<bnagy> it outputs a string
Tomasso has quit [Ping timeout: 272 seconds]
<wjimenez_5271_> oh I see, so the output technically has a newline in it b/c it is bash
gtuckerkellogg has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
<bnagy> to_i _should_ be smart enough to ignore all the spaces and newlines
hunglin has quit [Quit: Leaving.]
_justin has joined #ruby
<bnagy> but if you want to be paranoid you could do [.... | wc -l].strip.to_i
<cloud|office> bnagy: I need to match the values to values in some other table, like one table will consit the "remarks" and get the values from the array of hashes corresponding to remarks http://pastebin.com/vF8NKMDy
<cloud|office> the pastebin contains beter description of what I wrote
crankycoder has joined #ruby
crankycoder has quit [Remote host closed the connection]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
TPFC-SYSTEM has joined #ruby
crazed has joined #ruby
<crazed> what's the proper way to do something like "00:00".gsub(/:/, '\\\1')
<crazed> where the result is 00\\:00
<crazed> seems \\\1 doesn't do what i want
<bnagy> try adding more backslashes
<bnagy> if in dount, MOAR BACKSLASH
<crazed> what
LBRapid has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
<crazed> more slashes aren't going to fix my problem
<crazed> just not sure how to do what i want
savage- has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<bnagy> hm, weird
<bnagy> maybe block form "00:00".gsub(/:/) {|s| "\\\\#{s}"}
<bnagy> you want two literal \ right?
<crazed> yeah
<bnagy> ok, try that ^^
<crazed> too many slashes :(
dhruvasagar has quit [Ping timeout: 252 seconds]
LBRapid has joined #ruby
<bnagy> no, it just looks that way
<bnagy> "00:00".gsub(/:/) {|s| "\\\\#{s}"}.size => 7
<crazed> "00:00".gsub(/:/) {|s| "\\#{s}"}
<crazed> \\#{s} seems to work
dhruvasagar has joined #ruby
<crazed> the way i want
<bnagy> not if you want two backslashes in the string
<bnagy> ruby shows you inspect output in irb etc
gtuckerkellogg has joined #ruby
JoshWines has quit [Ping timeout: 272 seconds]
lledet has quit [Quit: lledet]
<crazed> yeah weird
<i0n> var = File.stat(file).mtime > Time.now-3600 is saying if the file was modified more than an hour ago then var is true?
<crazed> irb(main):016:0> "00:00".gsub(/:/) {|s| "\\#{s}"}
<crazed> => "00\\:00"
<crazed> but in sinatra i needed \\\\
twinturbo_ has joined #ruby
twinturbo has quit [Ping timeout: 244 seconds]
twinturbo_ is now known as twinturbo
<bnagy> crazed: "00:00".gsub(/(:)/,'\\\\\\\\\1') that's what I meant about moar backslashes :)
azm has joined #ruby
<bnagy> "00:00".gsub(/(:)/,'\\\\\\\\\1').size => 7
rbanffy has quit [Ping timeout: 272 seconds]
<bnagy> it wasn't working with \1 cause you didn't have a capture group
<bnagy> i0n: that looks like the intention
<crazed> crazy
mikepack has quit [Remote host closed the connection]
<crazed> mind blown with ruby sometimes
<bnagy> this area of gsub is pretty weird. I'd suggest the block form to preserve sanity
<i0n> bnagy: if var puts "#{file} has changed" is this going to call only the true files from var?
mikepack has joined #ruby
tonini has joined #ruby
oscardelben has joined #ruby
<bnagy> depending on the code, but yeah? Not how I'd write it, but hey
darren has quit [Remote host closed the connection]
<i0n> bnagy:
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Progster has joined #ruby
rbanffy has joined #ruby
<i0n> so the object "compare_file_to_1hour" the only thing this object knows is true or false, am I correct in that thinking?
alcuadrado has joined #ruby
<bnagy> i0n: ow my eyes :<
<alcuadrado> how can I get the mysql module to quote an identifier?
<i0n> bnagy: is it that ugly? :)
<bnagy> Dir['*'].select {|fn| (Time.now - File.mtime(fn)) > 3600}
<alcuadrado> I mean quoting it like `identifier`
maletor has joined #ruby
rbanffy_ has joined #ruby
<i0n> so the if conditional is asking "is compare_file_to_1hour true?" .. since it is true then puts prints the file names... but what i dont understand is HOW puts knows which files passed the time compare?
rbanffy_ has quit [Read error: Connection reset by peer]
rbanffy_ has joined #ruby
<bnagy> because Dir.foreach passes directory entries one by one into the block
<i0n> so the block is always iterating?
<bnagy> where each one is referred to by the variable 'file'
Banistergalaxy has joined #ruby
<bnagy> it will run once for each entry, yeah
rbanffy has quit [Ping timeout: 272 seconds]
<Banistergalaxy> Bnagy hey nags
<bnagy> puts Dir['*'].select {|fn| File.file? fn and (Time.now - File.mtime(fn)) > 3600}
rbanffy__ has joined #ruby
<bnagy> that's the equivalent code, i0n
<bnagy> afternoon
greasegum has joined #ruby
daftspunk has left #ruby ["PONG :calvino.freenode.net"]
greyEAX has joined #ruby
krz has joined #ruby
<bnagy> you staying up to watch the olympics, Banistergalaxy?
tiripamwe has quit [Read error: Connection timed out]
<bnagy> see all 4 NZ athletes march out ;)
<bnagy> ...actually, damn, it's probably at a reasonable hour of the morning for you :/
tiripamwe has joined #ruby
rbanffy_ has quit [Ping timeout: 272 seconds]
ctwiz has joined #ruby
<Banistergalaxy> Bnagy no, do we only have four?
ctwiz has quit [Client Quit]
<bnagy> nah I'm sure you have way more
<Banistergalaxy> Bnagy https://gist.github.com/3181627
<Banistergalaxy> 4 u
<bnagy> 197 athletes
kevinbond has quit [Quit: kevinbond]
noyb has joined #ruby
<Banistergalaxy> Cool
<bnagy> wtf
<bnagy> you have a twisted brain, you know that?
<Banistergalaxy> Bnagy are toy excited about thee the olympics
<Banistergalaxy> You
<bnagy> I like the olympics
<Banistergalaxy> Sry phone
<bnagy> I watch all the retarded / obscure sports
<Banistergalaxy> Whats your fave even gymnastics?
tiripamwe has quit [Ping timeout: 252 seconds]
azm has quit [Ping timeout: 255 seconds]
umttumt has joined #ruby
<i0n> bnagy: the line of code you showed me, putting that into an array is as simple as array_new = code ?
mikepack has quit [Remote host closed the connection]
stefanp_ has joined #ruby
fantazo has quit [Remote host closed the connection]
Chryson has quit [Quit: Leaving]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
darren_ has joined #ruby
stefanp has quit [Ping timeout: 265 seconds]
<bnagy> i0n: yeah, without the puts
a_a_g has joined #ruby
mahmoudimus has joined #ruby
justsee is now known as justsee|away
wyksztalcioch has joined #ruby
tiripamwe has joined #ruby
<wyksztalcioch> hi all :) anyone can help with datamapper?
heftig has quit [Ping timeout: 246 seconds]
luckyruby has joined #ruby
<wyksztalcioch> i have problem with multiple data store connection, datamapper put all classes to one db file
<wyksztalcioch> gist: https://gist.github.com/3186299
mahmoudimus has quit [Quit: Computer has gone to sleep.]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
justsee|away is now known as justsee
greasegum has quit [Ping timeout: 272 seconds]
shadoi has joined #ruby
AndChat- has joined #ruby
mockra has joined #ruby
iamjarvo has joined #ruby
mockra has quit [Remote host closed the connection]
artOfWar has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
artOfWar_ has joined #ruby
iamjarvo has quit [Client Quit]
tiripamwe has quit [Quit: Leaving]
Bosma has quit [Ping timeout: 272 seconds]
savage- has quit [Remote host closed the connection]
artOfWar has quit [Ping timeout: 272 seconds]
apeiros_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
shadoi has quit [Quit: Leaving.]
luxdormiens has joined #ruby
nadirvardar has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
werdnativ has quit [Quit: werdnativ]
beneggett has joined #ruby
banisterfiend has joined #ruby
oscardelben has quit [Quit: oscardelben]
savage- has joined #ruby
uris has quit [Quit: leaving]
tagrudev has joined #ruby
wyksztalcioch has quit []
djdb has joined #ruby
azm has joined #ruby
savage- has quit [Remote host closed the connection]
ntfox has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
vectorshelve has joined #ruby
tewecske has quit [Quit: Leaving.]
heftig has joined #ruby
davidcelis has joined #ruby
Progster has quit [Ping timeout: 245 seconds]
und3f has joined #ruby
Xethron has quit [Ping timeout: 252 seconds]
Cool_Fire has quit [Ping timeout: 252 seconds]
codespectator has quit [Quit: Computer has gone to sleep.]
darren_ has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
gtuckerkellogg has joined #ruby
arturas has joined #ruby
davidcelis has quit [Quit: K-Lined.]
codespectator has joined #ruby
gtuckerkellogg has quit [Client Quit]
alcuadrado has quit [Quit: Leaving]
beneggett has quit [Ping timeout: 244 seconds]
mikepack has joined #ruby
eddie_ has joined #ruby
<eddie_> How can i watch the activity in a Mysql Table?
<eddie_> always
jjang has joined #ruby
emmanuelux has joined #ruby
<eddie_> anyone?
andrewhl has quit [Remote host closed the connection]
<i0n> watch the activity?
<eddie_> yes
<eddie_> like any updation
<eddie_> insertion
<eddie_> etc
<i0n> you could run a select in a cron i guess
<eddie_> Better solution
<eddie_> i dont want to run a query all the time
jonathanwallace has quit [Remote host closed the connection]
beneggett has joined #ruby
<i0n> not sure if you can view changes to a table without a query
emmanuelux has quit [Read error: Operation timed out]
apeiros_ has joined #ruby
nari has quit [Ping timeout: 245 seconds]
<eddie_> hmm
piggybox has quit [Remote host closed the connection]
piggybox has joined #ruby
<i0n> you could setup a master/slave environment and run your queries on the slave if you are worried about bogging down the master
daniel_hinojosa has quit [Ping timeout: 252 seconds]
mikepack has quit [Remote host closed the connection]
<vectorshelve> hemanth: hai bhai
maesbn has joined #ruby
aganov has joined #ruby
nari has joined #ruby
Rochefort has joined #ruby
wjimenez_5271_ has quit [Quit: Leaving.]
azm has quit [Quit: Leaving]
kstephens has quit [Ping timeout: 246 seconds]
ntfox has quit [Quit: Leaving]
kstephens has joined #ruby
_justin has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
ntfox has joined #ruby
luxdormiens has quit [Quit: luxdormiens]
apeiros_ has quit [Remote host closed the connection]
beneggett has quit [Ping timeout: 255 seconds]
bluOxigen has joined #ruby
sickly is now known as thomas
<manizzle> hey guys, i am having some problems installing fxruby, getting errors like find_installed_fox_version': couldn't find FOX header files
maletor has joined #ruby
mockra has joined #ruby
beneggett has joined #ruby
jprovazn_away is now known as jprovazn
hoelzro|away is now known as hoelzro
apeiros_ has joined #ruby
mockra has quit [Remote host closed the connection]
robozahn has joined #ruby
und3f has quit [Ping timeout: 272 seconds]
indian has quit [Ping timeout: 252 seconds]
krz has quit [Quit: krz]
igotnolegs has quit [Quit: Computer has gone to sleep.]
xorgnak has joined #ruby
ananthakumaran1 has quit [Ping timeout: 244 seconds]
thomas is now known as porky
ananthakumaran has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
beneggett has quit [Ping timeout: 244 seconds]
arkiver has joined #ruby
Gavilan has left #ruby [#ruby]
<Hanmac> manizzle you need libfox-dev packages or something similar
beneggett has joined #ruby
ephemerian has joined #ruby
elhu has joined #ruby
und3f has joined #ruby
nari has quit [Ping timeout: 245 seconds]
chichou has joined #ruby
<hemanth> vectorshelve, hey
yxhuvud has joined #ruby
patjoh has joined #ruby
<i0n> array.each { |files| puts files.split('/\//').last }
<i0n> what am i doing wrong here?
[Neurotic] has quit [Quit: I'm outta here!]
<cloud|office> if there is a hash like array5 = {"hello"=>0, "hello1"=>0, "hello2"=>0}
<cloud|office> how can I increase the values of "hello" or "hello1"
piotr_ has joined #ruby
hubub has joined #ruby
<hoelzro> array5['hello'] += 1?
<apeiros_> i0n: '/\//' is a string, not a regex, you realize that?
<apeiros_> cloud|office: why do you call your hash `array`?
<hoelzro> also, why is the hash stored in a variable called 'array5''?
workmad3 has joined #ruby
<apeiros_> an array is not a hash, and a hash is not an array…
<i0n> apeiros_: nope.. I didnt
<i0n> apeiros_: guess i need " " ?
<apeiros_> i0n: ok, then that's probably your issue. a regex is /regex/, not 'regex'
<apeiros_> i0n: also for future reference "what am I doing wrong" is a lousy problem description
<apeiros_> i0n: you should tell: what you do (that part you did, props!) what input you have, what output you get, and why you consider your output/result to be wrong
EstanislaoStan has quit []
monkegjinni has joined #ruby
<i0n> apeiros_: I have an array, you can see here http://pastie.org/private/nd0ruiofjblqhuckp2muja.. The output is listed in the pastie as well.. I am trying to split and grab the end so.. chicken, lazy and cara
nari has joined #ruby
Stormbytes has joined #ruby
cantonic has joined #ruby
Stormbytes has quit [Client Quit]
<i0n> apeiros_: and you alreayd told me my answer
rushed has quit [Quit: rushed]
<i0n> apeiros_: results in what i want.. >> array.each { |files| puts files.split(/\//).last }
<i0n> apeiros_: thanks
ciopte7 has quit [Quit: ciopte7]
bigkevmcd has joined #ruby
cantonic has quit [Client Quit]
Eldariof-ru has joined #ruby
jimeh has joined #ruby
apeiros_ has quit [Remote host closed the connection]
sepp2k has joined #ruby
mengu has joined #ruby
arturas has quit [Remote host closed the connection]
bigkevmcd has quit [Quit: outta here]
jhunter has quit [Ping timeout: 272 seconds]
bigkevmcd has joined #ruby
virunga has joined #ruby
jhunter has joined #ruby
luckyruby has quit [Remote host closed the connection]
bigkevmcd has quit [Client Quit]
und3f has quit [Ping timeout: 244 seconds]
br4ndon has joined #ruby
timonv has joined #ruby
chichou has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
m104 has joined #ruby
chichou has joined #ruby
Kuro has joined #ruby
BiHi has joined #ruby
arkiver has quit [Ping timeout: 252 seconds]
Ionic` has quit [Ping timeout: 272 seconds]
Spooner has joined #ruby
arkiver has joined #ruby
vlad_starkov has joined #ruby
arkiver has quit [Max SendQ exceeded]
tfittsy has joined #ruby
arkiver has joined #ruby
Derander has quit [Ping timeout: 248 seconds]
ViperMaul has joined #ruby
arkiver has quit [Max SendQ exceeded]
Rizzle has quit [Ping timeout: 255 seconds]
arkiver has joined #ruby
tfitts has quit [Ping timeout: 252 seconds]
m104 has quit [Quit: Leaving...]
Rochefort has quit [Read error: Connection reset by peer]
Rochefort has joined #ruby
Derander has joined #ruby
Rochefortes has joined #ruby
robozahn has quit [Ping timeout: 265 seconds]
monkegjinni has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 252 seconds]
Rochefort has quit [Ping timeout: 252 seconds]
pskosinski has joined #ruby
zemanel has quit [Quit: Remote hottie closed the connection]
arturaz has joined #ruby
monkegjinni has joined #ruby
brianpWins has quit [Quit: brianpWins]
banisterfiend has quit [Read error: Connection reset by peer]
und3f has joined #ruby
banisterfiend has joined #ruby
monkegjinni has quit [Remote host closed the connection]
cezar has joined #ruby
<virunga> HI, who did install mountain lion? I saw that the default ruby version is still the 1.8.7 :(
cezar has quit [Client Quit]
<virunga> right?
wallerdev has quit [Quit: wallerdev]
ntfox has quit [Quit: Leaving]
BRMatt has quit [Quit: ZNC - http://znc.sourceforge.net]
<shevy> poor osx dudes
BRMatt has joined #ruby
<shevy> linux guys use the source
ssspiff has joined #ruby
ssspiff has joined #ruby
AndChat- has quit [Ping timeout: 255 seconds]
<virunga> :) we've homebrew that saves us
tatsuya_o has joined #ruby
workmad3 has joined #ruby
<virunga> the thing that ruby is pre-installed on mac is cool though
Criztian has joined #ruby
ppawel has joined #ruby
sspiff has quit [Ping timeout: 246 seconds]
<shevy> you can install 1.9.3 via homebrew?
ssspiff has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
<virunga> i think so. I didn't but online seems other dudes did
<virunga> shevy: did you buy any ruby book?
kjellski has joined #ruby
tatsuya__ has joined #ruby
<shevy> virunga when I started with ruby yeah
<shevy> pickaxe
<shevy> and I think another one
<shevy> I also bought one rails book
<shevy> read up to page 70
<shevy> then I got bored with it
<shevy> :(
<virunga> lol
<shevy> the pickaxe was ok though, the standard lib reference in the back was helpful for a long time
<shevy> until I finally started to document things on my own, locally
tatsuya_o has quit [Ping timeout: 272 seconds]
cantonic has joined #ruby
sent-hil_ has joined #ruby
<virunga> shevy: is the rails book boring or the content?
<virunga> do you like web develop?
mneorr has joined #ruby
<shevy> the rails book was very boring
Criztian has quit [Remote host closed the connection]
<shevy> I think 80% of rails is boring
<shevy> web development is ok though
<i0n> http://pastie.org/private/m4z9iviktpfq1kakqbwsg im having trouble with multiple arguments in a method call. are arguments not comma delimeted?
<workmad3> beginner rails books do tend to be boring if you know anything at all about ruby or web development
chussenot has joined #ruby
hubub has quit [Read error: No route to host]
<workmad3> i0n: you can't have arguments with default values before arguments without default values in a parameter list
<i0n> ahhh
<i0n> thanks, much appreciated
arkiver has quit [Ping timeout: 272 seconds]
AlbireoX is now known as AlbireoX`Away
Speed has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
berserkr has joined #ruby
sent-hil_ has quit [Remote host closed the connection]
Criztian has joined #ruby
kawa_xxx_ has joined #ruby
<virunga> i'd like learn to rails but the fact i have to pay to put online a small site stops me.
kawa_xx__ has joined #ruby
<virunga> (sorry for the bad english :P)
Banistergalaxy has joined #ruby
<hoelzro> virunga: well, you could always deploy a simple web application on your laptop or desktop
<virunga> true
<workmad3> virunga: or you could use a free heroku instance
<hoelzro> I'd suggest starting that way
CaptainJet has quit []
<hoelzro> workmad3: ah, good suggestion
hubub has joined #ruby
kawa_xxx has quit [Ping timeout: 246 seconds]
<workmad3> virunga: or redhat openshift
<virunga> workmad3: but i see that one web dyno on heroku costs 36 dollars
<virunga> i'll give a look at openshift
<workmad3> virunga: you're not reading well enough... you get free time on heroku
kawa_xxx_ has quit [Ping timeout: 240 seconds]
monkegjinni has joined #ruby
<virunga> i'll go deeper
anderse_ has joined #ruby
<workmad3> virunga: which is why, if you go to the pricing site here with 1 dyno: http://www.heroku.com/pricing#1-0 it says 'monthly 720hrs - free 750 hrs'
<virunga> thanks
<workmad3> virunga: for a total monthly cost of 0 ;)
<virunga> ops u're right
<virunga> awkward
<virunga> so the first 750 hr are free
<workmad3> 750 hours free each month
<workmad3> per app
<virunga> nice
<workmad3> yeah, it's nice and easy... it has various limitations (such as no user file upload storage), and they automatically shut down 1 dyno apps if they're inactive for a period of time, after which the first request spins the app up again but takes a while
<workmad3> but for playing around and getting stuff out there, heroku is pretty nice and easy :)
<virunga> workmad3: heroku vs openshift? what's your choise?
robozahn has joined #ruby
artOfWar_ has quit [Ping timeout: 272 seconds]
monkegjinni has quit [Remote host closed the connection]
<virunga> shevy: i saw you in the bioruby channel, do you work in that environment?
<workmad3> virunga: not really got a preference... I'm more familiar with heroku, but from my limited playing around with openshift that has some really nice features that heroku doesn't
<workmad3> virunga: but not quite as smooth a process from my limited experience
<workmad3> virunga: as with almost all questions, the answer is 'it depends' :)
<shevy> virunga in some ways
<shevy> virunga but bioruby confuses me
chussenot has quit [Remote host closed the connection]
<virunga> workmad3: true. thanks for the help, i'll start a little project then.
<virunga> shevy: the project confuses you?
chussenot has joined #ruby
monkegjinni has joined #ruby
<shevy> yeah
<shevy> it seems hard to use
<shevy> when I make a break like 2 weeks, I need to look at the docs again in order to use it
<virunga> :D wow
elhu has quit [Ping timeout: 250 seconds]
<virunga> shevy: where are you from?
<shevy> vienna
elhu has joined #ruby
zemanel has joined #ruby
flype has joined #ruby
<virunga> when i went to bed this night the channel was in full activity.. now they're sleeping and we're here
<virunga> XD
ramblex has joined #ruby
<virunga> relax
jjang has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<apeiros_> i0n: yes, I said "for future reference"
<apeiros_> I told you how you can improve your question the next time. better questions yield better answers.
fixl has joined #ruby
<apeiros_> i0n: btw., files.split(/\//).last --> files[/^\/*\z/]
<apeiros_> (I'd also probably not have the varname in the plural form…
<apeiros_> )
lkba has quit [Ping timeout: 246 seconds]
<shevy> virunga usually depends on the time of the day
<shevy> there are different peaks of activity
<shevy> usually at around afternoon-to-night CET, things are less quiet again
<Muz> What's a CET? London's the centre of the civilised world and UTC is the only acceptable timezone!
<Kwpolska> Muz: I’d love to inform you that London is NOT using UTC right now.
<Muz> I am aware, being in London and all.
harcher has joined #ruby
<Kwpolska> Muz: BST != UTC.
<shevy> The UK is an island on its way to the USA, doesn't count for european time anymore :P
<Muz> No shit.
<Kwpolska> Unfortunately.
<Muz> If you want to be picky, GMT != UTC either.
<shevy> I hate summer/winter time switches btw
<Kwpolska> shevy: not quite right… The Nazis changed time in the countries they invaded. They didn’t get to the UK.
<Muz> I believe this discussion has just been Godwon.
<shevy> lol
<oddmunds> hehe
<shevy> the only bad part about UK is that the guys there are driving the wrong way
<i0n> I'm attempting to set an array by calling a method and pass that variable into another method. http://pastie.org/private/xtsij3tvwxicpteh64dda . In irb these variables return the expected values, I'm not exactly sure if something is out of scope but I can't seem to pass these objects into my zip method.
<shevy> i0n, why is your indent so off in that pastie
Richie has joined #ruby
<shevy> Zip::ZipFile.open has indent level of like 6 ' ' chars or more
<shevy> glob = File.jo has indent 0
<shevy> wtf man
<hoelzro> i0n: commas on line 22?
<hoelzro> I think Ruby is interpreting it as zipup(aname(aloc))
Richie has quit [Client Quit]
<shevy> also
<shevy> Zip::ZipFile.open("#{adir}", "#{aname}", "#{aloc}")
RichieEvan has joined #ruby
<shevy> can be written as:
<shevy> Zip::ZipFile.open(adir, aname, aloc)
<virunga> i found a nice ruby style guide yesterday i0n https://github.com/bbatsov/ruby-style-guide
kawa_xx__ has quit [Remote host closed the connection]
<shevy> next, where is the , character i0n
RichieEvan has quit [Client Quit]
AlbireoX`Laptop has quit [Remote host closed the connection]
RichieEvan has joined #ruby
bullicon has joined #ruby
kawa_xxx has joined #ruby
<shevy> "Use two spaces per indentation level."
<shevy> this one I agree with
<shevy> "Indent when as deep as case" also agree
<shevy> "Use empty lines between defs and to break up a method into logical paragraphs." dont agree
* Kwpolska is using 4 spaces, it’s more readable
<shevy> "Align the parameters of a method call if they span over multiple lines." agree
<shevy> Kwpolska I dont see a real difference to 2 spaces
<i0n> hoelzro: im not seeing these commas :/
strnx has quit [Excess Flood]
<shevy> exactly i0n
<i0n> ah
<virunga> lol
<shevy> foo(arg1,arg2)
<shevy> is not the same as
<shevy> foo(arg1 arg2)
<shevy> nor
<shevy> foo arg1 arg2
<hoelzro> i0n: that's the problem
<shevy> do you see it now?
<i0n> sigh i dont know.. `open': wrong number of arguments (3 for 2) (ArgumentError)
<Muz> 10:23 < shevy> "Use empty lines between defs and to break up a method into logical paragraphs." dont agree # why not, out of curiosity?
<workmad3> Kwpolska: I find 4 spaces less readable nowadays
blacktulip has joined #ruby
<virunga> me too
<workmad3> Kwpolska: eyes need to scan too far to the right and left when changing indent levels
<Kwpolska> workmad3: 4-spaced code is more readable, and I always follow PEP 8 where applicable. And it wants 4-space tabs.
peterhellberg has joined #ruby
<shevy> Muz I tend to have extremely small/short methods, and following that would mean that a method, that has 5 lines of code, would suddenly have 7 lines in total (two newlines splitting up)
<shevy> (I included def and end, so actually 3 lines of code)
M- has quit [Quit: This computer has gone to sleep]
<Kwpolska> shevy: one newline is enough.
<shevy> but the example there has two
<Muz> shevy: http://pastie.org/4341562 that's how I interpreted it as suggesting one should format code. Whch makes sense to me.
<shevy> Muz yeah but that was not the example
<vectorshelve> I added a new gem into my Gemfile and now when I run bundle install, its installing the gem into vendor... any idea why ?
<vectorshelve> shevy: ^^
<workmad3> Kwpolska: 'more readable' is subjective
<shevy> def some_method
<shevy> data = initialize(options)
<workmad3> Kwpolska: so please don't dictate to me what is and isn't more readable
<shevy> (NEWLINE)
<Kwpolska> workmad3: I can read 4-spaced code better, and usually write such code. Notable exception: interactive mode.
<shevy> data.manipulate!
<shevy> (NEWLINE)
<i0n> this damn thing keeps saying wrong number of arguments 3 of 2
<shevy> data.result
<shevy> end
<workmad3> Kwpolska: that's better :)
<Muz> shevy: oh jesus, just saw that example. Yeah, that's atrocious.
tonini has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 250 seconds]
<Kwpolska> shevy: do not paste code here, as it is unreadable.
<Muz> Use newlines as sparingly and appropriately as comments. ¬_¬
<shevy> Kwpolska please stop being a 10 year old
<shevy> Muz well what about a method definition, then a newline, then code, then newline, then "end"
<workmad3> shevy: I'll sometimes split up a test into setup, empty line, test, assertions
<Muz> shevy: also trribad.
<shevy> hmm
<i0n> im going to punch something
<i0n> ive been at this for hours and hours
<shevy> the cat
<vectorshelve> shevy: I lveo kids :)
<shevy> punch the cat
ntfox has joined #ruby
<workmad3> shevy: but generally only when the setup is a few lines... and then I'll probably try and pull it out the test itself anyway :)
<shevy> oh
<i0n> dont have one, have a fish though.
lxsameer has joined #ruby
<shevy> vectorshelve, I mixed you up with virunga
<vectorshelve> shevy: cute ;)
<vectorshelve> I added a new gem into my Gemfile and now when I run bundle install, its installing the gem into vendor... any idea why ? shevy
<shevy> ack
<shevy> you should not ask me, I avoid bundler like the plague
<i0n> whats wrong with my code shevy
<shevy> everything
<shevy> also where is your code?
<i0n> fawk
lxsameer has quit [Max SendQ exceeded]
<shevy> your updated code
<shevy> not the version from 1 hour ago
lxsameer has joined #ruby
<vectorshelve> shevy: <i0n> whats wrong with my code shevy [15:05] <shevy> everything lol :D
arkiver has joined #ruby
<vectorshelve> shevy: also where is ur code.. dt was epic :)
<shevy> well
<shevy> if he didn't change his code, then it means he is lazy
arkiver has quit [Max SendQ exceeded]
<Muz> vectorshelve: what's in your .bundle/config file
<shevy> zipfile.add( "#{aname}", "#{aloc}") <-- you dont need the #{} there
<Muz> Chances are that bundle was previously invoked with install and a path option.
<shevy> i0n, you need the #{} only in a string like:
<vectorshelve> Muz: just give me a sec I will check
<shevy> bar = 10; "foo #{bar}"
<i0n> oic
<shevy> zipfile.add( aname, aloc)
<vectorshelve> Muz: where is this .bundle/config file ?
<shevy> ArgumentError: wrong number of arguments (3 for 2)
<Muz> vectorshelve: relative to where the Gemfile is.
lxsameer has quit [Max SendQ exceeded]
<shevy> i0n, are you sure you use the Zip module properly?
<vectorshelve> Muz: gemfile is in the app root folder bt I cant find .bundle folder inside the app root
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<shevy> Zip::ZipFile.open("my.zip", Zip::ZipFile::CREATE) {
<shevy> shows only two arguments
<i0n> shevy: yes i built it by hand before working on this method
<shevy> your example uses 3
arkiver has joined #ruby
<shevy> def add(entry, srcPath, &continueOnExistsProc)
<shevy> zipfile.add( "#{aname}", "#{aloc}")
<shevy> nope man
<shevy> that can not work
<shevy> oh
<shevy> could work
<shevy> :)
<i0n> ;)
<shevy> still does not work though
<shevy> (hahahaha)
<shevy> i0n, does your example code work for you?
<Muz> vectorshelve: specifically, executing `bundle config` will dump all the config options it's reading in.
Vert has joined #ruby
vlad_starkov has joined #ruby
Rochefortes has quit [Remote host closed the connection]
<vectorshelve> Muz: the issue now is that when I cloned the project and ran bundle install it worked fine and then when I run the app I get ExecJS::RuntimeError error so I added gem 'therubyracer' into the Gemfile and ran bundle install and then when I do git status it shows the gems to be installed in vendor.. why so ?
<i0n> shevy: that works and its what i was building my method after
<workmad3> vectorshelve: run 'bundle config'
<workmad3> vectorshelve: because instal path is a bundle config option
<workmad3> *install
<workmad3> vectorshelve: and more specifically... it's a *cached* config option
<vectorshelve> workmad3: ok
<vectorshelve> workmad3: bundle config returned this line Settings are listed in order of priority. The top value will be used.
arkiver has quit [Ping timeout: 272 seconds]
sspiff has joined #ruby
<Muz> vectorshelve: the actual .gem files? If so, that's becuase bundler is caching and bundling them with the project.
<Muz> Just because the .gem file is there doesn't mean it's installed to and being read from there.
vlad_starkov has quit [Ping timeout: 246 seconds]
RichieEvan has quit [Quit: RichieEvan]
<Muz> It's a bundler option so that you can do bundle install --local on another machine with this checked out code and it will install it /from/ those local .gem files /to/ wherever the install destination would be.
RichieEvan has joined #ruby
<i0n> shevy: maybe my arrays are spitting out too much?
<vectorshelve> Muz: ok but still the ExecJS::RuntimeError is not going despite having install therubyracer gem as well as node.js :(
<Muz> You're not really providing a full error, or stacktrack, which makes your problem too vague for anyone to be remotely useful.
<vectorshelve> sure
<Muz> *stacktrace
<vectorshelve> Muz: one sec
arkiver has joined #ruby
<workmad3> vectorshelve: that's because a RuntimeError has nothing to do with the presence or lack of a JS runtime
mxweas has quit [Quit: Computer has gone to sleep.]
<workmad3> vectorshelve: a runtime error is an error from the js runtime itself
<vectorshelve> workmad3: but in the net they all have suggested the same solution for ExecJS::RuntimeError issue
arkiver has quit [Max SendQ exceeded]
<workmad3> vectorshelve: no... that's a RuntimeUnavailable error
arkiver has joined #ruby
<vectorshelve> workmad3: heres the issue http://pastie.org/4341647 Muz
<workmad3> vectorshelve: and if that *was* your error, it would also tell you with the message that no runtime is available and give you a link listing possible runtimes
<workmad3> vectorshelve: not, as you have just revealed, a f**king javascript syntax error
arkiver has quit [Max SendQ exceeded]
arkiver has joined #ruby
<vectorshelve> workmad3: no bt itsnt not I pulled the latest code as it as mate... and tried running everybody else here are running the same latest code as well they aint getting this error
Berglund has quit [Quit: Computer died.]
<workmad3> vectorshelve: we don't tell you to a) read error messages and b) give full stack traces because we just like making you do work
arkiver has quit [Max SendQ exceeded]
arkiver has joined #ruby
<vectorshelve> workmad3: this isnt a solution to a wierd error that only I am getting
Araxia has quit [Quit: Araxia]
<Muz> vectorshelve: this has aboslutely nothing to do with Bundler...
<vectorshelve> Muz: then what is the issue... its not the syntax issue since its a cloned repo which has already been deployed and running.. I havent made any changes..
arkiver has quit [Max SendQ exceeded]
bbttxu has joined #ruby
jprovazn has quit [Read error: Operation timed out]
<workmad3> vectorshelve: the only thing we can go by is the error message
arkiver has joined #ruby
<workmad3> vectorshelve: and that says syntax error... meaning it's a syntax error in a JS file
sonne has joined #ruby
<sonne> greetings!
<sonne> is it possible to turn off command echoing in a Rakefile?
<workmad3> vectorshelve: going 'oh, but it can't be because of X' doesn't alter the fact that it *is*
arquebus has joined #ruby
arkiver has quit [Max SendQ exceeded]
<Muz> workmad3: how do you know that exact copy is working elsewhere? You could have HEAD from a repo, and they could be running from a tag or produced build. How do you know your machine is configured in the same way as theirs etc too. You can't presume that just because someone's published code, just checking it out and trying to run it will work.
<workmad3> Muz: was that meant for me or vectorshelve? :)
arkiver has joined #ruby
<Muz> workmad3: sorry, yes. :p
<workmad3> Muz: np :)
Squarepy has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
arkiver has quit [Max SendQ exceeded]
arkiver has joined #ruby
arkiver has quit [Max SendQ exceeded]
arkiver has joined #ruby
<vectorshelve> workmad3: Muz I got ur point.. will try debugging from all aspects :)
justsee is now known as justsee|away
arkiver has quit [Max SendQ exceeded]
<workmad3> vectorshelve: good... and try not to ignore evidence in the future because it doesn't fit with what you've assumed is the problem :P
arkiver has joined #ruby
ZachBeta has joined #ruby
<vectorshelve> workmad3: sure sir :)
arkiver has quit [Max SendQ exceeded]
lxsameer has joined #ruby
arkiver has joined #ruby
jprovazn has joined #ruby
eddie_ has quit [Quit: Ex-Chat]
arkiver has quit [Max SendQ exceeded]
mneorr1 has joined #ruby
chimkan_ has joined #ruby
arkiver has joined #ruby
mneorr has quit [Ping timeout: 244 seconds]
arkiver has quit [Max SendQ exceeded]
strnx has joined #ruby
arkiver has joined #ruby
<shevy> i0n well just build slowly, step by step
<shevy> and always check that things still work
ntfox has quit [Quit: Leaving]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
justsee|away is now known as justsee
x0F_ is now known as x0F
harcher has quit [Quit: leaving]
sgronblom has joined #ruby
mdupont has joined #ruby
<mdupont> hi all
hubub has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 245 seconds]
arquebus has quit [Read error: Connection reset by peer]
<mdupont> i patched eventmachine, and ran setup.rb to install it, but rake does not find it. debian sid
ppawel has quit [Ping timeout: 240 seconds]
_bart has joined #ruby
<_bart> Hi
heftig has quit [Ping timeout: 246 seconds]
hubub has joined #ruby
<_bart> I was wondering, if I do: if matches and matches[1], will it not check for matches[1] if matches was already found false/nil?
arkiver has quit [Ping timeout: 250 seconds]
monkegjinni has quit [Remote host closed the connection]
<workmad3> _bart: a) use &&, not and
<workmad3> _bart: b) yes, && short-circuits, so it 'matches' is falsey, then 'matches[1]' won't be evaluated
<workmad3> s/it/if
lkba has joined #ruby
fermion has joined #ruby
<_br_> Isn't the nil problem something which we can scratch with the andand gem? What a pity that no operator .? is included in ruby like in coffeescript.
Foxandxss has joined #ruby
<_bart> workmad3: why use &&? It isn't English
tvw has joined #ruby
bluOxigen has quit []
tk__ has joined #ruby
<Hanmac> _bart && and "and" have different priority
<Muz> && and 'and' are pretty much functionally the same, HOWEVER, && has precedence over other operators, which "and" doesn't.
<Muz> So if you're chaining things together, depending on if you use "&&" or "and" you may get varying results as different parts are evaluated first.
<Muz> "and" and "or" are at the bottom of the precedence pile as it were.
<Hanmac> its the same with do ... end and { ... }
<Muz> Or "||" or "or". ;)
vlad_starkov has joined #ruby
<workmad3> _bart: also, && may not be english, but it is more familiar to programmers, and in addition '&' is a symbol used to mean 'and'
<workmad3> _bart: many programming languages use '&' to mean a bitwise and, and '&&' to mean a boolean and
mpereira has joined #ruby
arkiver has joined #ruby
monkegjinni has joined #ruby
liluo has quit [Remote host closed the connection]
heftig has joined #ruby
kpshek has joined #ruby
kpshek has quit [Client Quit]
Nanuq has quit [Ping timeout: 245 seconds]
Nanuq has joined #ruby
etehtsea has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
My_Hearing has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
justsee has quit [Ping timeout: 265 seconds]
cezar has joined #ruby
spry_dave has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
BiHi has quit [Quit: Computer has gone to sleep]
cezar has quit [Client Quit]
Axsuul has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Remote host closed the connection]
justsee has joined #ruby
Rochefort has joined #ruby
jjbohn has joined #ruby
mpereira has quit [Ping timeout: 250 seconds]
vlad_starkov has joined #ruby
<_bart> I understand the difference but I think I'll stick to and/or because it's cleaner / more readable
<Hanmac> okay ... but you will come back when your code does not what you want
<workmad3> ^^
<workmad3> _bart: the precedence differences between '&&' and 'and' are *not* trivial and ignorable, unless you are going to put () around every single boolean expression
<workmad3> _bart: 'and' is intended for control flow, not boolean tests
<workmad3> (same with 'or' and 'not')
<vectorshelve> getting this error while starting foreman http://pastie.org/4341930
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
s1n4 has joined #ruby
<workmad3> vectorshelve: you already have a server listening on 8982, where sunspot's solr server wants to listen
Lachryma` has joined #ruby
<workmad3> vectorshelve: which you can see quite clearly with the line '16:38:51 sunspot.1 | java.net.BindException: Address already in use'
<vectorshelve> but workmad3 16:38:53 faye.1 | >> Listening on 0.0.0.0:9292, CTRL+C to stop
<workmad3> vectorshelve: that's faye, on 9292, not sunspot on 8982
<workmad3> vectorshelve: it helps if you *read*
<vectorshelve> workmad3: ok
<workmad3> vectorshelve: and not just glance and make assumptions
<apeiros_> a crucial skill
<_bart> I'll stick to && :c
<workmad3> _bart: in all honesty, I find '&&' much more readable because it's more distinctive on a line ;)
<apeiros_> workmad3: I guess it's easier to let others read your logs and tell you what to look for…
<workmad3> apeiros_: yeah... I should start charging for doing it :)
cousine has joined #ruby
<vectorshelve> workmad3: so now I stopped solr by bundle exec rake sunspot:solr:stop and then rerun foreman start to get this http://pastie.org/4341930
<workmad3> vectorshelve: if I read this, am I going to be confronted with an obvious error that you haven't bothered reading?
<vectorshelve> workmad3: the foreman log is disturbing.. I guess so
<workmad3> vectorshelve: right... in that case, I'm not going to bother looking
<vectorshelve> workmad3: a work around for this ? 16:43:00 rails.1 | /home/mithun/.rvm/gems/ruby-1.9.3-p194/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
jgarvey has quit [Quit: Leaving]
<workmad3> vectorshelve: try reading it and thinking through what could cause it
<i0n> can you split on a array then push the split you want into a string?
<vectorshelve> workmad3: so I did lsof -wni tcp:3000 and killed the process
<vectorshelve> i0n: yes u can
<_bart> workmad3: good point
heftig has quit [Ping timeout: 246 seconds]
bigzed has quit [Ping timeout: 240 seconds]
<vectorshelve> workmad3: now its seems to be runnig alryt :) thanks man
gmci has joined #ruby
<i0n> vectorshelve: can you show me some syntax for that?
dross_ has joined #ruby
<virunga> i0n: use inspect
<virunga> ops
<virunga> forget about it
<virunga> sorry
<i0n> np
<virunga> use join instead
any-key has quit [Quit: leaving]
anykey__ has joined #ruby
dross has quit [Ping timeout: 276 seconds]
anykey__ is now known as any-key
burgestrand1 has joined #ruby
Cool_Fire has joined #ruby
flype has joined #ruby
burgestrand has quit [Ping timeout: 246 seconds]
Xethron has joined #ruby
spry_dave has quit [Remote host closed the connection]
habib has joined #ruby
Cool_Fire has quit [Client Quit]
Spooner has quit [Ping timeout: 272 seconds]
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
shevy has quit [Ping timeout: 246 seconds]
liluo has joined #ruby
Criztian has quit []
<g4> Høring om håndtering av ulovlig innhold på internett - http://ec.europa.eu/internal_market/consultations/2012/clean-and-open-internet_en.htm
<habib> Hy everyone!)
<g4> sorry wrong chan
heftig has joined #ruby
pskosinski has quit [Ping timeout: 272 seconds]
kawa_xxx has quit [Remote host closed the connection]
Xethron_ has joined #ruby
Xethron has quit [Ping timeout: 272 seconds]
cakehero has joined #ruby
justsee is now known as justsee|away
shevy has joined #ruby
cousine has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
Progster has joined #ruby
ananthakumaran has quit [Ping timeout: 272 seconds]
ph^ has joined #ruby
<shevy> damn, re
<shevy> i0n, did you solve your problem
liluo has quit [Remote host closed the connection]
jbohn has joined #ruby
mpereira has joined #ruby
Spooner_ has joined #ruby
heftig has quit [Ping timeout: 246 seconds]
<_bart> I want to override remove_queue here: https://github.com/defunkt/resque/blob/master/lib/resque.rb
jjbohn has quit [Ping timeout: 272 seconds]
<_bart> but when I do that in a separate file inside module Resque I can't call "suepr"
<_bart> super*
linoj has joined #ruby
<My_Hearing> Well that's because there's no remove_queue method in your class's super class
My_Hearing is now known as Mon_Ouie
bullicon has quit [Quit: Computer has gone to sleep.]
<_bart> My_Hearing: but also when I want to call the "queue" method from the remove_queue override, I get it's not defined
sepp2k has quit [Quit: Leaving.]
davidpk has joined #ruby
lledet has joined #ruby
chimkan_ has quit [Quit: chimkan_]
gry has joined #ruby
nateberkopec has joined #ruby
LBRapid has quit [Quit: Computer has gone to sleep.]
justsee|away is now known as justsee
BiHi has joined #ruby
Tomasso has joined #ruby
lledet has quit [Quit: lledet]
jbohn has quit [Quit: Leaving...]
jstew has joined #ruby
Stalkr_ has joined #ruby
fantazo has joined #ruby
ppawel has joined #ruby
ppawel has quit [Remote host closed the connection]
fbernier has joined #ruby
moshef has joined #ruby
arietis has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran1 has quit [Ping timeout: 252 seconds]
<moshef> i have a string and i want to run a dynamic method on it, lets say gsub("0", "o")
<moshef> using send, but it doesn't let me do it.
<moshef> unknown gsub bla bla for strign
<_bart> Anyone? How do I override remove_queue: https://github.com/defunkt/resque/blob/master/lib/resque.rb and add Resque.redis.keys('lock:*').collect { |x| Resque.redis.del(x) }
Criztian has joined #ruby
<bnagy> moshef: "foo".send :gsub, 'o', 'a'
<moshef> thats the only syntax?
rbanffy__ has quit [Quit: Ex-Chat]
<bnagy> _bart: why would you do that?
<bnagy> moshef: no, but it works :) What are you trying, and what's the error?
<Hanmac> _bart use alias_method
jeff_sebring has quit [Quit: Leaving]
rbanffy has joined #ruby
<moshef> bnagy: i'd like to call this as - b = ":gsub, 'o', 'b'" and then "foo".send :b
<_bart> bnagy: to make sure locks are removed at .remove_queue, because.. and this is important.. the jobs are not properly dequeue'ed (no hooks are called) when removing an entire queue
<_bart> Hanmac: okay thanks
<moshef> but i guess my syntax is wrong
nicoulaj has joined #ruby
<Hanmac> moshef: b = [:gsub, 'o', 'b']; "foo".send(*b)
dross has joined #ruby
<moshef> you're the man Hanmac
<moshef> thanks
<moshef> bnagy: thanks too
<bnagy> _bart: either wrap it in something of your own, or just do your own cleanup before you remove the queue, you shouldn't be monkey patching a core method with coupled code, especially involving hardcoded key prefixes
s1n4 has left #ruby ["leaving"]
<_bart> bnagy: there is no plugin hook called when doing remove_queue
dross_ has quit [Ping timeout: 250 seconds]
moshef has quit [Quit: moshef]
<bnagy> ok I don't know what any of this resque jargon means :)
<bnagy> but basically just make sure you do whatever you think needs doing before you remove the queue
<_bart> alright, fixed it by alias_method
<_bart> the author of resque should dequeue jobs before a queue gets removed. but well, I can't wait for that
<bnagy> why should they do that?
<bnagy> if you want to drop a queue that's not empty that's surely your business
nedbat has joined #ruby
_justin has joined #ruby
pskosinski has joined #ruby
<shevy> bnagy!
<shevy> let's marry
<bnagy> whom?
<shevy> lol
<shevy> the smartest person on #ruby perhaps
<bnagy> is that like winning gold in the special olympics?
<shevy> kinda
* Hanmac hopes its not him
linoj has quit [Quit: linoj]
<bnagy> Hanmac is saving himself for banisterfiend
<shevy> Hanmac you write too much C++ code as of late
tbrock has quit [Remote host closed the connection]
nwest has joined #ruby
dr_diamond has joined #ruby
verto|off is now known as verto
nari has joined #ruby
<_bart> bnagy: it should be the business of the plugin, but right now there isn't a hook method to catch that event like I said
mvangala_home has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
whitedawg has joined #ruby
mvangala_home is now known as mvangala
dv310p3r has quit [Ping timeout: 264 seconds]
alek_b_ has quit [Remote host closed the connection]
beakerman has joined #ruby
spry_dave has joined #ruby
robozahn has quit [Ping timeout: 265 seconds]
cloud|office has quit [Quit: Leaving.]
krusty_ar has joined #ruby
lledet has joined #ruby
whitedawg has quit [Read error: Connection reset by peer]
berserkr has quit [Quit: Leaving.]
whitedawg has joined #ruby
Ste11a has quit [Ping timeout: 248 seconds]
spry_dav_ has joined #ruby
spry_dave has quit [Remote host closed the connection]
verto is now known as verto|off
spry_da__ has joined #ruby
spry_dav_ has quit [Remote host closed the connection]
awarner has joined #ruby
niklasb has joined #ruby
jjbohn has joined #ruby
heftig has joined #ruby
tommyvyo has joined #ruby
whitedawg1 has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
whitedawg has quit [Ping timeout: 240 seconds]
und3f has quit [Ping timeout: 240 seconds]
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
nuko has joined #ruby
kpshek has joined #ruby
nuko has quit [Client Quit]
ananthakumaran has joined #ruby
arturaz has quit [Ping timeout: 252 seconds]
hollyw00d has joined #ruby
gogiel has quit [Ping timeout: 248 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
Ste11a has joined #ruby
awarner has quit [Remote host closed the connection]
_justin has quit [Ping timeout: 264 seconds]
jjbohn has quit [Quit: Leaving...]
<shevy> ok brainstorming
<shevy> What features should a ruby package manager have or offer?
jonathanwallace has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
und3f has joined #ruby
<sonne> shevy, what would a ruby package manager be?
gogiel has joined #ruby
jjbohn has joined #ruby
<shevy> sonne dunno. I figure something similar to emerge (gentoo) or dpkg
<sonne> isn't there gem already then?
<rking> shevy: I'd be shocked if `gem` can't already do it.
<shevy> rking I think gem handles only .gem files
<rking> shevy: …?
<shevy> and most of the time installs into SITE DIR
<rking> emerge handles only .ebuild
<sonne> well gems are ruby packages
<shevy> an .ebuild can be anything
<rking> shevy: All it does is run the instructions given to it.
<Spooner_> shevy What do you actually mean by "package"?
<shevy> glibc .ebuild, how would you make a glibc .gem?
geekbri has joined #ruby
<shevy> Spooner_ every piece of software that can be installed somehow
<rking> shevy: Have it do stuff then copy stuff (?)
<Spooner_> I have Releasy. That is nice, but a bit buggy until I have some will to fix it :)
<shevy> dunno, sounds like a misuse of gems :)
carlyle has joined #ruby
<sonne> $ file i18n-0.6.0.gem
<sonne> i18n-0.6.0.gem: POSIX tar archive
<shevy> Releasy?
ExistentAtrophy has joined #ruby
carlyle has quit [Remote host closed the connection]
<Spooner_> Yes, creates windows and osx executable and packages up and deploys.
<Muz> shevy: it should have features like what Bundler has.
<shevy> Spooner_ whoa
rbanffy has quit [Quit: Ex-Chat]
<sonne> bundler rocks :D
carlyle has joined #ruby
<Muz> In fact, what does Bundler not do that your proposed package manager would do?
<shevy> Spooner_, you mean, an .exe file ?
<shevy> Muz, Bundler seems to be used only for gems
<Spooner_> Muz It doesn't really help you to make stuff useful for people who don't have ruby installed.
drupin has left #ruby ["Leaving"]
<Muz> Oh, you want to actually ship an interpreter?
<shevy> Releasy? :)
<rking> shevy: Doing things and putting things are the easy parts of package managers. A harder problem is subtleties of dependency management, and that's the part that Bundler seems to do pretty well.
ph^ has quit [Remote host closed the connection]
<sonne> Spooner_, so that would produce a self contained and self sufficient binary?
<sonne> with all gems and stuff?
<shevy> how much work was Releasy?
<shevy> in approximate amount of hours spent coding and polishing
<Spooner_> It does that, yes and you can build OSX/windows on any OS.
<shevy> whoa
<Spooner_> A million :D
<sonne> Spooner_, you must be a wizard!
<sonne> where's the like button on github
<shevy> hehehe
jprovazn has quit [Quit: Leaving]
<Spooner_> However, what it _doesn't_ do is use a compiler, so you can't install any gems that you can't get compiled.
<rking> Aww, bummer.
<sonne> what does that mean?
nari has quit [Ping timeout: 264 seconds]
<sonne> you mean you can't package gems that are not pure ruby?
<Spooner_> That is, if you are building crossplatform, the gem has to be pre-compiled on rubygems.
<sonne> aha, i see
<sonne> so you couldn't build, for example, passenger
leoncamel has quit [Remote host closed the connection]
chson has quit [Remote host closed the connection]
verto|off is now known as verto
<Spooner_> I need to add the ability to include arbitrary pre-compiled gems, but for now, it only downloads the binary gems from rubygems if they exist.
<sonne> i see.... still awesome :)
bequick has joined #ruby
wangr has joined #ruby
<Spooner_> It mostly works, but it needs a bit more work to be really idiot-proof. I use it all the time to distribute games, as do a couple of other people, but it is a little fragile :/
<Spooner_> Fragile in that it isn't too friendly if you misconfigure it, not that it is unstable :D
<Spooner_> Just read the readme if you need more explanation of its capabilities.
<Spooner_> And if more people bug me, I'll fix it properly :D
<Spooner_> And then I can publicise it, since no-one has heard of it :D
jprovazn has joined #ruby
<shevy> hehe
lledet has quit [Quit: lledet]
flype_ has joined #ruby
flype has quit [Ping timeout: 252 seconds]
<banisterfiend> Spooner_: hey spoonie
devdazed has joined #ruby
<Spooner_> 'lo
atmosx has joined #ruby
vectorshelve has quit [Quit: Page closed]
devdazed has quit [Client Quit]
noyb has quit [Quit: Leaving.]
devdazed has joined #ruby
lorandi has joined #ruby
hynkle has joined #ruby
akem has quit [Ping timeout: 272 seconds]
strife25 has quit [Quit: Computer has gone to sleep.]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
hynkle has quit [Read error: Connection reset by peer]
strife25 has joined #ruby
strife25 has quit [Client Quit]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hynkle has joined #ruby
jjbohn has quit [Quit: Leaving...]
nwest has joined #ruby
erichmenge has joined #ruby
rippa has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
maesbn has quit [Remote host closed the connection]
dv310p3r has joined #ruby
clocKwize has joined #ruby
LBRapid has joined #ruby
mrwalker has joined #ruby
greasegum has joined #ruby
uris has joined #ruby
hynkle has joined #ruby
djdb has quit [Remote host closed the connection]
br4ndon has joined #ruby
jprovazn has quit [Read error: Operation timed out]
kawa_xxx has joined #ruby
a_a_g has left #ruby [#ruby]
kawa_xxx has quit [Remote host closed the connection]
johnlcox has joined #ruby
axl_ has joined #ruby
heda has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
jgarvey has joined #ruby
jrajav has joined #ruby
hollyw00d has quit [Quit: hollyw00d]
arturaz has joined #ruby
virunga has quit [Ping timeout: 246 seconds]
awarner has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
liluo has joined #ruby
linoj has joined #ruby
jprovazn has joined #ruby
jrist-afk is now known as jrist
sailias has joined #ruby
lledet has joined #ruby
chson has joined #ruby
<heda> hi all, is there an easy way to get a module with class methods to extend a class even if the module is a couple of include levels deep? (see https://gist.github.com/3188107)
und3f has quit [Quit: Leaving.]
beakerma_ has joined #ruby
cjlicata has joined #ruby
rizzy has joined #ruby
carlyle has quit [Read error: Operation timed out]
<hoelzro> heda: won't 'include ClassMethods' from within A have the same effect?
cakehero has joined #ruby
<Spooner_> I think you'd need to have the self.included also inside the ClassMethods module.
<heda> hoelzro: in the simple instance of the gist yes i suppose, i should have pointed out the classmethods are there to handle some state unique to each type
beakerman has quit [Ping timeout: 272 seconds]
<heda> Spooner_: yeah I have that running as expected but was wondering if there was a shortcut I could use in the base that I wasn't aware of
hollyw00d has joined #ruby
hollyw00d has quit [Client Quit]
<Spooner_> Oh, fair enough.
<heda> Spooner_: thanks for the double check though
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
anderse_ has left #ruby [#ruby]
akem has joined #ruby
whitedawg has joined #ruby
v0n has joined #ruby
stopbit has joined #ruby
whitedawg1 has quit [Ping timeout: 246 seconds]
liluo has quit [Remote host closed the connection]
br4ndon has joined #ruby
DrShoggoth has joined #ruby
<otters> I cannot get eventmachine installed
<otters> mac os mountain lion, it tells me I need to install developer tools
<otters> I have Xcode 4.4
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
<hoelzro> otters: I'm not certain, but I'd bet you need the command line tools as well
<otters> heh, I guess the upgrade nuked them
<Mon_Ouie> Set your CC env variable to the path to the compiler you want to use
mvangala has quit [Remote host closed the connection]
<otters> well, I don't have any compilers
<Mon_Ouie> from what I've seen last time someone asked, they've been moved to /usr/local/ instead of /usr/
<otters> that must be the problem
mvangala has joined #ruby
techhelp has joined #ruby
Long has joined #ruby
ExistentAtrophy has quit []
hynkle has quit [Read error: Connection reset by peer]
<Long> Hi everyone
Stalkr_ has quit [Quit: Leaving...]
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
Long has left #ruby [#ruby]
johnlcox has quit [Ping timeout: 264 seconds]
mucker has joined #ruby
habib has quit [Remote host closed the connection]
internet_user has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
umttumt has quit [Remote host closed the connection]
mvangala has joined #ruby
hynkle has joined #ruby
<shevy> hmmmm
<shevy> those paths never made any sense
<shevy> they should install applications into versioned directories, and make these work
<otters> good lord
<otters> cucumber is the gimmickyest thing I have probably ever seen in software development
<shevy> otter!
<shevy> all cuddle the otter
<shevy> what's with cucumber
<otters> I may have to use it for a job interview
sailias has quit [Ping timeout: 240 seconds]
jwmann has joined #ruby
<otters> but it looks ridiculous
<otters> write tests in English, then *parse them with regex* in the test code?
<Muz> It's fucking shit.
* Muz says, after using it for almost 2 years at his current workplace.
<otters> apparently I have to use both rspec and cucumber
<otters> at the same time...on the same project
<Muz> Welcome to my world.
<otters> so this is what it's like to not make your own architecture decisions
<otters> I am not fond of it
Criztian has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<shevy> haha
<shevy> bah
<workmad3> hmm... I'm quite a proponent of the style, although I do admit it took me quite a while (about 18 months) to actually get the hang of writing good scenarios
<shevy> my grand goal is to start my own company, then noone can boss me around (other than myself when I need to finish something)
<otters> my grand goal is to get a job to pay for college
<otters> we can't all be heroes
mvangala_home has joined #ruby
<workmad3> shevy: don't forget about your clients who will be giving you money :P
<otters> rspec looks alright
vitoravelino`afk is now known as vitoravelino
dr_diamond has quit [Quit: Bye !]
<shevy> workmad3 yeah
<workmad3> otters: I am with you that the regex parsing of steps is pretty nasty... I much prefer the placeholder style some variants provide... but writing acceptance criteria in something other than code can be quite revealing and useful (but it does depend a lot on if your clients are willing to collaborate on them)
mvangala has quit [Ping timeout: 255 seconds]
techhelp has quit [Quit: This computer has gone to sleep]
josefig has joined #ruby
<workmad3> otters: and hitting the right level of granularity in scenarios is hard... too high, and the scenario doesn't tell you anything useful, too low and it gets bogged down in implementation steps
br4ndon has quit [Ping timeout: 250 seconds]
kaushal has joined #ruby
<kaushal> Hi
mahmoudimus has joined #ruby
<shevy> hi kaushal - new to ruby?
<Muz> It doesn't help that the cucumber spec runner is fueled by crack and first-borns.
<kaushal> Any clue about http://fpaste.org/TbNE/?
<kaushal> shevy: hi
<otters> workmad3: well, this is the first-ever time I've done automated testing
<Muz> Given a choice, I'd use rspec over cucumber.
<otters> so I'm hoping I don't heck it up
<shevy> Muz I like that you use '.' in your sentences :)
<workmad3> too much implementation detail in scenarios is a pretty common problem in scenarios :)
<Muz> shevy: I can stop if you'd like.
<shevy> kaushal this error gets fixed via require 'yaml'
<workmad3> Muz: ah, I've actually switched away to Turnip almost exclusively now, which uses the Gherkin parser for scenario files and hooks it into the rspec test runner :)
dv310p3r has quit [Read error: Connection reset by peer]
<Muz> workmad3: I'm not sure if that's a best of both worlds, or lesser of two evils, kind of compromise.
<workmad3> Muz: and also uses placeholders rather regex
<kaushal> shevy: ok
<workmad3> *rather than regex
mvangala_home is now known as mvangala
hynkle has quit [Read error: Connection reset by peer]
<kaushal> shevy: is yaml the package name?
Goles has joined #ruby
<workmad3> (or rather, placeholders rather than raw regex... regex are still used to define what a placeholder will match, but they get pushed lower down and more out of sight)
<shevy> kaushal, when you do require 'yaml', YAML namespace will be available to you
<kaushal> i dont see it on ubuntu 12.04
<shevy> kaushal, YAML is the name of the constant. the file that you require is yaml.rb
<shevy> kaushal, start "irb"
<shevy> do:
<shevy> require 'yaml'
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
<shevy> look if an error happens
<workmad3> otters: welcome to the BDD world then :)
<kaushal> shevy: ok
<otters> workmad3: thanks :P
<workmad3> otters: so... how long do you have to cram automated testing knowledge into your head?
chichou has quit [Ping timeout: 264 seconds]
<otters> I got five days to complete the assignment
<otters> dunno if I should write tests or code first
<rking> Tests.
sailias has joined #ruby
<rking> One at a time, though. Little test, little implement, big win.
mvangala has quit [Remote host closed the connection]
<kaushal> shevy: http://fpaste.org/nc3d/
dpritchett has joined #ruby
<Muz> kaushal: it's 'yaml' with quotes.
<workmad3> otters: if they're looking for TDD/BDD knowledge, then tests first... if they're also looking @ cucumber, you should probably do ATDD (acceptance-test driven development) and start with a cucumber scenario
mvangala has joined #ruby
<Muz> require 'yaml'
<Muz> kaushal: ^ that's the line you want.
<kaushal> shevy: what package i need to install to get yaml.rb
<kaushal> Muz: you mean in the code?
<workmad3> otters: and follow the 'red-green-refactor' cycle... get a failing test, get it to pass, refactor your code to remove duplication
<kaushal> Muz: got it
<shevy> kaushal, you forgot the quotes
<shevy> <shevy> require 'yaml'
<shevy> not
<shevy> <shevy> require yaml
<kaushal> shevy: its returns true
<shevy> ok good, that means yaml works
bluOxigen has joined #ruby
<shevy> you can type
<shevy> YAML
<shevy> and see that irb returns something
<kaushal> YAML
<shevy> now to your earlier problem, you could add require 'yaml' before that error happens
<shevy> at the top of the file
<kaushal> ok
<shevy> but if you did not write that file on your own, chances are that there will still be an error somewhere
<workmad3> otters: with ATDD, that cycle occurs at two levels... get a failing scenario step, drop down into writing rspec tests using the red-green-refactor until the step passes, have a broader look for refactoring and cleanup steps, get the next step failing, repeat
hynkle has joined #ruby
nari has joined #ruby
lateau has joined #ruby
<workmad3> otters: if you're new to this stuff, 5 days is a very tight timescale to get efficient in though :(
justsee has quit [Quit: Linkinus - http://linkinus.com]
hunglin has joined #ruby
<kaushal> shevy: http://fpaste.org/i3ts/
<kaushal> shevy: shall i pastebin the code?
peterhellberg has quit [Remote host closed the connection]
linoj has quit [Quit: linoj]
dv310p3r has joined #ruby
<kaushal> shevy: any clue?
<shevy> kaushal did you add the require 'yaml' line
<kaushal> yes
<shevy> how can this be
<kaushal> in the top
<shevy> if you would have done so, this error here:
<shevy> uninitialized constant YAML (NameError)
<shevy> could not show up
<shevy> ./query_lib.rb <-- this file
<shevy> always the file where the error happens
hynkle has quit [Read error: Connection reset by peer]
bier has quit [Ping timeout: 240 seconds]
nedbat has quit [Disconnected by services]
PaciFisT has left #ruby [#ruby]
<kaushal> shevy: apologies
nedbat_ has joined #ruby
<kaushal> shevy: it got fixed
<shevy> good :)
linoj has joined #ruby
<kaushal> shevy: i added require 'yaml' sanity_checker.rb instead of query_lib.rb
<kaushal> shevy: so thats incorrect right?
lateau has left #ruby [#ruby]
<kaushal> i am running ruby sanity_checker.rb
virunga has joined #ruby
<shevy> well this query_lib.rb file seems to want to make use of YAML constant
<shevy> a constant in ruby, you can do like
<shevy> module YAML
<shevy> or
<shevy> class YAML
<shevy> usually via module
<shevy> and in order to have YAML available, you need to do require 'yaml', in the file that tries to load a yaml file
<shevy> in your example query_lib.rb
<kaushal> shevy: got it
<kaushal> Thanks
<shevy> actually, YAML = "foo" would also be a constant
<rking> Ugh. Guys, I've made a mess: https://gist.github.com/68b90acc7ad38d664623
<shevy> but not very useful :)
<kaushal> so what does require 'yaml' mean
<shevy> kaushal with require you load a .rb file
chimkan has joined #ruby
<kaushal> is it like include <stdio.h>
<shevy> yeah kind of
<cout> yes
<shevy> #include :P
<shevy> rking your code scares me :(
<kaushal> so what does require 'yaml' mean it loads yaml.rb file?
<rking> It works up until line 43, where it's trying to FactoryGirl.create :child1, but failing because: undefined method `x='
hynkle has joined #ruby
the_jeebster has joined #ruby
<rking> shevy: Yeah, I'm having a hard time writing a simple case that shows my problem.
<shevy> hehe
<rking> Actually, I'm having trouble simplifying this solution in general.
andrewhl has joined #ruby
<kaushal> shevy: so require 'yaml' mean it loads yaml.rb file?
<kaushal> shevy: Thanks a lot
<kaushal> really appreciated
<cout> kaushal: yes, unless it's already been required
<kaushal> where is yaml.rb located?
<cout> kaushal: (so you don't need guards like you do with #include)
jbw has quit [Read error: Operation timed out]
<kaushal> ok
<rking> I would make "BaseyBase" an actual base class, but for some reason the other metaprogramming in that class gets fouled up (part from a lib I'm using), so I successfully did the mixin thing. But now that I'm trying to make some class data accessible to the child methods, I'm getting stuck.
<kaushal> cout: got it
Squarepy has quit [Quit: Leaving]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<rking> cout, if you have any opinion on why I'm getting undefined method `x=' for https://gist.github.com/68b90acc7ad38d664623 from line 43, I'd be ♥.
<shevy> yes kaushal
chimkan___ has joined #ruby
<shevy> it first tries to find yaml.rb
<shevy> then yaml.so I think
<shevy> then it fails
<cout> rking: I was looking it, but I'm not familiar with factorygirl
<shevy> or something like that
<rking> cout: Yeah, I'm apparently not familiar enough with it.
<cout> rking: why are you using it?
<rking> cout: Stubbing out stuff in unit tests.
linoj has quit [Quit: linoj]
indian has joined #ruby
<kaushal> shevy: Thanks
<kaushal> cout: Thanks
kaushal has quit [Quit: leaving]
bbttxu has quit [Quit: bbttxu]
chimkan has quit [Ping timeout: 264 seconds]
chimkan___ is now known as chimkan
<rking> Oh snap. I get it.
devdazed has quit [Quit: Bye]
hynkle has quit [Read error: Connection reset by peer]
vitoravelino is now known as vitoravelino`afk
bier has joined #ruby
<rking> The FactoryGirl.define's "factory" calls take "f(1)" and make it "f=(1)".
andrewpthorp has joined #ruby
<cout> that's weird
kevinbond has joined #ruby
devdazed has joined #ruby
kevinbond has left #ruby [#ruby]
<rking> Yep
<rking> DSLish
<rking> But I was really misunderstanding its interface. Now I can go back and try to figure out my original issue.
<rking> .................... ← Yep, it's working now. =D
Kuro has quit [Quit: Page closed]
br4ndon has joined #ruby
* rking licks each one of those .'s.
hynkle has joined #ruby
<rking> I had to sleep on this problem, and gist an embarassingly ugly chunk to #ruby on top of that, to get it solved.
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
sailias has quit [Ping timeout: 264 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
hynkle has quit [Read error: Connection reset by peer]
shevy has quit [Read error: Operation timed out]
nedbat_ is now known as nedbat
jbw has joined #ruby
SQLStud has joined #ruby
reuf has quit [Quit: Leaving]
carloslopes has joined #ruby
zodiak has joined #ruby
erichmenge has quit [Quit: Be back later]
hynkle has joined #ruby
maletor has joined #ruby
maletor has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
ryh has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
gmci has quit [Quit: Computer has gone to sleep.]
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
mengu has quit [Quit: Konversation terminated!]
EstanislaoStan has joined #ruby
D4T has quit [Ping timeout: 244 seconds]
Ionic` has joined #ruby
theRoUS has quit [Ping timeout: 272 seconds]
timonv has quit [Remote host closed the connection]
jprovazn is now known as jprovazn_away
<EstanislaoStan> So in "player.inventory_hash[room_things_hash_key] = @dungeon_things[room_things_hash_key]" if I delete @dungeon_things will player.inventory_hash[room_things_hash_key] equal nil?
hynkle has joined #ruby
kjellski has quit [Quit: Leaving]
andrewpthorp has quit [Quit: Leaving...]
mockra has joined #ruby
mockra has quit [Remote host closed the connection]
oscardelben has joined #ruby
flype_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
_justin has joined #ruby
mvangala_home has joined #ruby
levieraf has joined #ruby
whitedawg has quit [Quit: Leaving.]
mvangala has quit [Read error: Connection reset by peer]
mockra has joined #ruby
bullicon has joined #ruby
andrewpthorp has joined #ruby
alek_b has joined #ruby
shevy has joined #ruby
Morkel has joined #ruby
sailias has joined #ruby
havenn has joined #ruby
spry_da__ has quit [Remote host closed the connection]
andrewpthorp has quit [Client Quit]
apok has joined #ruby
nari has quit [Ping timeout: 240 seconds]
runa has joined #ruby
<runa> heyas. I'm using Rmagick::ImageList#display but I would like to programatically close the window. is this possible?
alek_b_ has joined #ruby
digitalcakestudi has joined #ruby
alek_b has quit [Read error: Operation timed out]
Guedes has quit [Ping timeout: 264 seconds]
Eldariof-ru has quit [Ping timeout: 272 seconds]
Z_Mass has joined #ruby
tfittsy is now known as tfitts
hynkle has quit [Read error: Connection reset by peer]
bluOxigen has quit []
erichmenge has joined #ruby
BrenoPerucchi has joined #ruby
mvangala_home has quit [Read error: Connection reset by peer]
timonv has joined #ruby
mvangala has joined #ruby
hynkle has joined #ruby
<twinturbo> hey
atmosx has joined #ruby
<twinturbo> can I redirect $stdout to a socket? I have a bunch of process I want to run but they can only communicate by printting to $stdout. I'd like to have them print messages to a stock which a master can process
enroxorz has quit [Quit: Leaving]
MasterIdler_ has joined #ruby
carloslopes has quit [Quit: Leaving.]
jvdz has joined #ruby
heda has quit [Quit: heda]
havenn has quit [Remote host closed the connection]
<Mon_Ouie> $stdout is a variable, which you can set to any IO-like object that can be written to
jubei has joined #ruby
Jay_Levitt has joined #ruby
harcher has joined #ruby
<jubei> guys I made some changes to an .rb file that apparently requires that I restart my server
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<jvdz> Can someone point me to a the accepted way to output a list of items and get output like "(item1, item2, item3)" (no trailing comma)
<jvdz> ^Total Ruby newbie
<jubei> since this is a ruby app that I didn't setup, i don't know how to do that
vitoravelino`afk is now known as vitoravelino
flype has joined #ruby
<Mon_Ouie> jvdz: String#join
<Mon_Ouie> Array#join I mean
ckrailo has joined #ruby
baroquebobcat has joined #ruby
aganov has quit [Quit: aganov]
Stalkr_ has joined #ruby
<twinturbo> Mon_Ouie: ya, but I need to be able to run command > /tmp/msg.sock or something like that
<jubei> guys how do I restart my ruby on rails app?
tagrudev has quit [Remote host closed the connection]
<jvdz> Mon_Ouie: Thanks, will check that out. - Other question I had was: Is there a shortcut to doing the above, but omit the parenthesis if the array is empty?
BrenoPerucchi has left #ruby [#ruby]
<jvdz> (avoiding having to wrap the loop with a "if this array has items")
<Mon_Ouie> twinturbo: Use IO.popen to get a stream which you can read out of your commands
<Mon_Ouie> And just forward the output to your socket
<twinturbo> Mon_Ouie: ok
xaq has joined #ruby
apeiros_ has joined #ruby
oscardelben has quit [Quit: oscardelben]
atmosx has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Remote host closed the connection]
eywu has joined #ruby
chimkan___ has joined #ruby
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
carloslopes has joined #ruby
<shevy> oh man
Vert has quit [Ping timeout: 252 seconds]
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
<Muz> jubei: #rubyonrails can probably give a more definitive answer than "kill whatever's running it, and re-start it." ¬_¬
sixteneighty has quit [Ping timeout: 246 seconds]
chimkan has quit [Ping timeout: 264 seconds]
chimkan___ is now known as chimkan
<Muz> Given you could be running your rails app through any number of different ways.
<jubei> Muz, ic thank you!!
jubei has left #ruby ["Leaving"]
erichmenge has quit [Quit: Be back later]
Z_Mass has quit [Quit: Leaving]
apeiros_ has quit [Remote host closed the connection]
wvms has quit [Ping timeout: 240 seconds]
wjimenez_5271_ has joined #ruby
arkiver has quit [Ping timeout: 240 seconds]
twinturbo has quit [Quit: twinturbo]
<virunga> Maybe a silly question, i'm going to create a web site, should i create it as a rubygem?
twinturbo has joined #ruby
<Muz> Depends on what the site is going to do and how yo want to deploy and distribute it.
<Muz> Chances are "no" though.
<JonnieCache> almost certainly not
<sernin> virunga: what Muz said. I'm also having a hard time thinking of a use case where that would be a good idea
beneggett has quit [Ping timeout: 252 seconds]
<virunga> ok, thank you
<JonnieCache> although it is an intruiguing idea
<virunga> :)
verto is now known as verto|off
cantbecool has joined #ruby
sonne has quit [Quit: Leaving]
strife25 has joined #ruby
bglusman has joined #ruby
prometheus has joined #ruby
apeiros_ has joined #ruby
MatthewGA has joined #ruby
beneggett has joined #ruby
arturaz has quit [Ping timeout: 240 seconds]
asobrasil has joined #ruby
Rochefort has quit [Remote host closed the connection]
fabrice31 has quit [Remote host closed the connection]
kedare has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
techhelp has joined #ruby
minijupe has joined #ruby
vlad_starkov has joined #ruby
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
abstrusenick has joined #ruby
abdulkarim has quit [Ping timeout: 246 seconds]
benson has joined #ruby
carloslopes has quit [Quit: Leaving.]
wjimenez_5271_ has left #ruby [#ruby]
benson has quit [Remote host closed the connection]
blazes816 has joined #ruby
fbernier has quit [Ping timeout: 264 seconds]
hoelzro is now known as hoelzro|away
havenn has joined #ruby
sixteneighty has joined #ruby
abdulkarim has joined #ruby
_bart has quit [Ping timeout: 240 seconds]
Vert has joined #ruby
twinturbo has quit [Quit: twinturbo]
abstrusenick has quit [Quit: abstrusenick]
abstrusenick has joined #ruby
Morkel has quit [Quit: Morkel]
elhu has quit [Ping timeout: 244 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
harcher has quit [Ping timeout: 272 seconds]
harcher has joined #ruby
andrewhl has quit [Remote host closed the connection]
atmosx has joined #ruby
elhu has joined #ruby
devdazed has joined #ruby
harcher has quit [Client Quit]
TheTFEF has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
Rochefort has joined #ruby
sendoushi has joined #ruby
codespectator has quit [Ping timeout: 244 seconds]
greasegum has quit [Ping timeout: 244 seconds]
Guedes has joined #ruby
nedbat has quit [Disconnected by services]
nedbat_ has joined #ruby
dhruvasagar has joined #ruby
savage- has joined #ruby
fermion has quit [Quit: P]
SphericalCow has joined #ruby
t0mmyvyo has joined #ruby
wallerdev has joined #ruby
techhelp has quit [Quit: Leaving]
mikepack has joined #ruby
kenichi has joined #ruby
mvangala_home has joined #ruby
mvangala has quit [Remote host closed the connection]
tommyvyo has quit [Quit: Computer has gone to sleep.]
t0mmyvyo is now known as tommyvyo
<jvdz> Working on an ERB for Nanoc — Adding tags to a template like: <%= @item[:tags].collect {|tag| "<span class='label'>#{tag}</span>"}.join(' ') %>
<jvdz> Works OK, except chokes for pages without tags
<jvdz> What's a good way to NOT try to include these tags when the variable doesn't even exist
cynosure has quit [Remote host closed the connection]
<workmad3> jvdz: the best way would be to have @item[:tags] default to an empty array
atmosx has quit [Ping timeout: 244 seconds]
strnx has quit [Ping timeout: 252 seconds]
Progster has quit [Ping timeout: 260 seconds]
<jvdz> workmad3: How would I do that; an assignment statement just before it?
<workmad3> jvdz: failing that, you could either do an '<% if @item[:tags] %>...<%end%>' block around your tag display, or use (@item[:tags] || []) in your template
apok has quit [Quit: apok]
<jvdz> workmad3: Can you explain that last statement (|| [])
adeponte has joined #ruby
AudreyJean has joined #ruby
<apeiros_> workmad3: meh, such logic doesn't belong into the template IMO
<workmad3> apeiros_: I agree
ctp has joined #ruby
<apeiros_> jvdz: ensure in the logic which invokes your template that @item[:tags] is always an array
<apeiros_> even if only an empty one
TheTFEF has joined #ruby
<workmad3> apeiros_: which is why that was my first suggestion ;)
blazes816 has quit [Quit: Leaving]
<apeiros_> workmad3: ooooh
<apeiros_> my fault
<apeiros_> (that's called normalization, btw., and it's a very good concept and should be broadly applied)
<jvdz> apeiros_: Ok thanks
<workmad3> apeiros_: but I'm not sure what Nanoc is, or how much control it gives over that sort of detail... so was presenting alternatives if that isn't possible :)
<jvdz> nanoc: is one of those static website builders
<apeiros_> workmad3: yeah, good call. I know nanoc, it's by ddfreyne (he's on irc quite often too)
<apeiros_> but I haven't used it myself for a long time and I'm don't really remember how it works anymore
wallerdev has quit [Quit: wallerdev]
<apeiros_> s/I'm/I/
<workmad3> :)
<jvdz> Hmm still geting NoMethodError: undefined method `collect' for nil:NilClass
<jvdz> I wrapped it in " <% if @item[:tags].any? %>"
parus has quit [Ping timeout: 265 seconds]
Rochefort has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
<workmad3> jvdz: quick hint... that wasn't one of my suggestions
<workmad3> jvdz: and it wasn't one for a reason
parus has joined #ruby
benson has joined #ruby
<workmad3> jvdz: it's generally considered polite that, if you're going to ignore advice, then you don't thereafter complain that it still doesn't work...
Progster has joined #ruby
AudreyJean has left #ruby [#ruby]
abstrusenick has quit [Quit: abstrusenick]
<jvdz> workmad3: My apologies, my previous message didn't send (connections a little shoddy here) -- I tried yours and got same error, so I was googling around for checking for items in an array
<Progster> is there a for each loop in ruby? or do you just use .each?
<workmad3> Progster: yes and yes
<jvdz> does (@item[:tags] || []) basically return an empty array object?
adamkittelson has joined #ruby
habib has joined #ruby
pdtpatrick has joined #ruby
<Progster> workmad3: ha
michaelmartinez has quit [Quit: Check it, Wreck it http://www.caffeineindustries.com/blog]
erichmenge has joined #ruby
<workmad3> jvdz: it @item[:tags] is nil, then it evaluates to []
<workmad3> Progster: in more detail - yes, ruby does have the 'normal' for loops, and a for var in collection construct, but the preference is to use .each and other enumerator methods instead of direct iteration
greasegum has joined #ruby
<jvdz> workmad3: Ah thanks - that works; I messed up the syntax originally
<workmad3> jvdz: it's worth investigating if you can get @item[:tags] to default to an empty array btw
<workmad3> jvdz: it's the nicest solution from a template perspective, as you then won't need to worry about it ever being nil :)
<jvdz> workmad3: I believe is a weird one — because @item[:SOMETHING] is grabbed out of YAML, whose attribuets are completely arbitrary
<workmad3> jvdz: yeah, I was wondering if that was the case
paradoja has joined #ruby
mahmoudimus has joined #ruby
havenn has quit [Remote host closed the connection]
<workmad3> jvdz: the other option would be to have a tags: [] in your yaml front-matter on pages that have no tags
<jvdz> workmad3: But agreed; I'll probab;y end up writing a tag helper function, wrapped with check-if-exists logic, so i don't have to worry about ugly code in the template
<workmad3> jvdz: that's also a good option btw :)
<jvdz> workmad3: Hmm that's a good idea; I saw someone do that with assigning "kind: article" to every item in /article/ folder
<jvdz> workmad3: To avoid having to constantly add the YAML metadata to each new file
<Tasser> I've got an array of 2565 elements and I'd like to find a pair that makes a block tru
<Tasser> y
<workmad3> Tasser: fun :D
<Tasser> each_cons kinda works for some pairs, but what if no match is found?
<Tasser> workmad3, it's on jruby and peach, so parallel processing should be possible
<workmad3> Tasser: ary.each_pair.find {block} maybe?
<Tasser> workmad3, oh, right
<jvdz> workmad3: Thanks again - this is first time touching ruby (coming from python background)
<workmad3> Tasser: that's gonna be slow though... because each_pair will do a cartesian product of the array with itself
<Tasser> workmad3, nice try, doesn't exist
tatsuya__ has quit [Remote host closed the connection]
wallerdev has joined #ruby
luxdormiens has joined #ruby
andrewhl has joined #ruby
wallerdev has quit [Client Quit]
<workmad3> Tasser: hmm... one sec, I' know I've used something like that before
Nies has joined #ruby
<shevy> anyone has tips for how to properly rewrite a ruby project?
Nanuq has quit [Ping timeout: 245 seconds]
porky is now known as thomas
<workmad3> Tasser: ah, it was ary.combination(2).find :)
ciopte7 has joined #ruby
Nanuq has joined #ruby
ph^ has joined #ruby
kevinbond has joined #ruby
EstanislaoStan has quit []
yugui_zzz is now known as yugui
elhu has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Araxia has joined #ruby
robacarp has joined #ruby
mvangala_home has quit [Read error: Connection reset by peer]
<robacarp> dang, this is a clever gem
billiam has joined #ruby
mvangala has joined #ruby
<Tasser> robacarp, peach does its job
SphericalCow has quit [Remote host closed the connection]
<Tasser> robacarp, and looks like the guy doesn't have the balls to monkey-patch core
verto|off is now known as verto
BiHi has quit [Quit: bye]
<Tasser> and looks like it doesn't deal well with lazy enums
<Tasser> ... but that's kind of an edge case in ruby
ianbrandt has joined #ruby
<robacarp> hmm, I've never heard of peach. I just stumbled onto parallel yesterday.
lxsameer has quit [Quit: Leaving]
maletor has joined #ruby
rasbonics has joined #ruby
_justin has quit [Read error: Connection reset by peer]
rasbonics has quit [Client Quit]
SphericalCow has joined #ruby
arkiver has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
rubylancer has joined #ruby
chussenot has joined #ruby
<rubylancer> Hey, is anyone here a freelancer who can get me some tips on kicking off as one? I have a potential contract, but I haven't dabbled in freelancing since college.
<robacarp> heh...get a detailed contract and stick to it
kenichi has quit [Remote host closed the connection]
<rubylancer> Well I guess ultimately that's the biggest challenge right haha
jordanscales has joined #ruby
<robacarp> well, I mean, for this job. Get what they want done written, and what you'll do written, put a price and a date on it and have everybody sign it.
kenichi has joined #ruby
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
bequick has quit [Ping timeout: 246 seconds]
<rubylancer> I guess one thing that I'm not completely sure how to approach is price. I know this varies widely by region, but being based out of an urban area of the US, is there a going rate? Or a point I should start negotiating from?
<jordanscales> if I wanted to change String's "upcase" method to convert it to uppercase, then do something with the string, how would I do that?
mutewinter has joined #ruby
<rubylancer> jordan - what do you mean by 'do something with the string'?
<rubylancer> Execute more string methods on it?
Russell^^ has joined #ruby
<robacarp> rubylancer: it varies...I prefer to set my price based on something concrete, like a feature or a project. Some prefer to charge hourly.
Know1edge has joined #ruby
kevinbond has left #ruby [#ruby]
apok has joined #ruby
tommyvyo_ has joined #ruby
<jordanscales> rubylancer, correct :)
timonv has quit [Remote host closed the connection]
<jordanscales> i want to extend .upcase, but use .upcase in this new method
nedbat_ is now known as nedbat
<jordanscales> but use "the old" up case in this new method
<jordanscales> to clarify, this is a rails app and when i have String.upcase I want to actually do String.mb_chars.upcase.to_s
nadirvardar has joined #ruby
<nedbat> jordanscales: why not change the callers to do the right thing?
artOfWar has joined #ruby
<jordanscales> nedbat, lots of them, I globally want to change how my application uses .upcase
<nedbat> jordanscales: global search/replace? Won't it be confusing to have the std ".upcase" mean something different in your project?
strnx has joined #ruby
<jordanscales> nedbat, if that's convention then I can get behind it :) I see what you mean
codespectator has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
artOfWar_ has joined #ruby
stephenjudkins has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
<nedbat> jordanscales: i can't address "convention," just what sounds like good practice to me.
timonv has joined #ruby
<jordanscales> nedbat, okay, thank you
tiripamwe has joined #ruby
<jvdz> Having difficulties getting .reject to work. Trying to remove @items with [:is_hidden]=="true". http://dpaste.com/776370/
artOfWar has quit [Ping timeout: 255 seconds]
blazes816 has joined #ruby
<Mon_Ouie> It would help to know what @items is first
<apeiros_> jordanscales: shouldn't globally change core methods. you probably break code with that.
<jvdz> Mon_Ouie: It's a nanoc site; @items are static text files (e.g. markdown files) which have arbitrary YAML at the top (e.g. title: abc)
<Mon_Ouie> Btw, there's Enumerable#flat_map (which has another name that I forgot)
<Spooner_> jvdz @items.map{|item| [item[:category]]}.flatten => @items.map{|item| item[:category]} - why make an array of one-element arrays then flatten it out?
<apeiros_> jordanscales: I think a sane/acceptable compromise between not breaking stuff and comfort is to add String#mb and let it provide a proxy object for mb operations
_justin has joined #ruby
<Mon_Ouie> Oh, true, it's not even needed here
<apeiros_> e.g. str.mb.upcase
mvangala has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
<jordanscales> apeiros: hm, okay I can agree with that
<Mon_Ouie> (and the other name is collect_concat)
mvangala has joined #ruby
<jordanscales> this application deals with a lot of translations, and having .mb_chars.upcase.to_s is just frustrating, so I wanted to globally replace the .upcase method to do this for me
<jvdz> Spooner_: Noted, mistake on my part
Vert has quit [Ping timeout: 252 seconds]
<apeiros_> jordanscales: you can use String#replace for bang methods
Eldariof-ru has joined #ruby
<jvdz> Is my syntax actually correct for .reject ? or is it failing because (most) items don't have :is_hidden
<apeiros_> e.g. class String; def mb; MbString.new(self); end; end; class MbString; def initialize(str); @to_s=str; end; def upcase!; @to_s.replace(upcase); end; end
<jordanscales> replace in code, that is. I want to change so that mystring.upcase actually calls mystring.mb_chars.upcase.to_s
excellentdrums has joined #ruby
<Spooner_> jvdz Not entirely sure what you want to achieve though, so can't tell you if your code is "correct"
kevinbond has joined #ruby
banisterfiend is now known as Spooner
jameshyde has quit [Ping timeout: 245 seconds]
<excellentdrums> Has anyone seen activerecord not include the RETURNING clause in it's generated INSERT statement for create? (Sorry, know it's not a rails room but no one is answering me over there)
kevinbond has left #ruby [#ruby]
Spooner is now known as banisterfiend
sifue has joined #ruby
chussenot has quit [Read error: Operation timed out]
sifue has quit [Client Quit]
mutewinter has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cdidd has quit [Ping timeout: 244 seconds]
<jvdz> Spooner_: 1) Loop through all items, get a list of unique categories; 2) Loop through each category; 3) For each category list all items tagged with that category 3.5) Exclude any @items which have is_hidden=true
jrajav has quit [Quit: The best darkness is strange and surprising]
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
apok has quit [Remote host closed the connection]
apok has joined #ruby
<Mon_Ouie> @items.select { item[:category] == category && !item[:is_hidden] } I assume
wallerdev has joined #ruby
<shevy> excellentdrums, problem is, active* is tied highly to rails, so most people who know about active* also know about rails
Axsuul has joined #ruby
<shevy> and here are only rails noobs
<apeiros_> o0
yugui is now known as yugui_zzz
<jvdz> Mon_Ouie: I'll try that
<excellentdrums> Ah! Thanks shevy.
<excellentdrums> I can usually figure this stuff out on my own. Been years since I was here last. This one's a head scratcher though...
timonv has quit [Remote host closed the connection]
<Spooner_> It won't matter, since it will just be nil != "true"
timonv has joined #ruby
<Spooner_> @ jvdz that was
<Spooner_> The thing is that you seem to be listing everything with a category as categories, not everythign that _is_ a category.
ciopte7 has quit [Quit: ciopte7]
<jvdz> Spooner_: You mean the first statement? <% categories = … %> ?
<Spooner_> jvdz : But as Mon_Ouie said, we can't help without understanding your data structure/schema.
habib has quit [Remote host closed the connection]
cbuxton has joined #ruby
<jvdz> Spooner_: You can get a rough idea here: http://nanoc.stoneship.org/docs/api/3.4/Nanoc/Item.html
<jvdz> Spooner_: But keep in mind, I'm selecting on basically arbitrary YAML which is included into the Item
<jvdz> Spooner_: (which may or not exist)
<Spooner_> jvdz Oh, right, I use nanoc - I think you are meaning to do: http://dpaste.com/776373/
<Mon_Ouie> I'd put stuff like that in a helper method though, to make the templates clearer
<Spooner_> I'd recommend putting line 1 and 5 into helper methods.
flype has quit [Quit: Computer has gone to sleep.]
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
<jvdz> Spooner_ & Mon_Ouie : Definitely agree on the helper method
<jvdz> Spooner_: Using your code, got: NoMethodError: undefined method `<=>' for nil:NilClass (on the first line)
<Spooner_> jvdz : Oh and since an item might not have :category, you need to #compact the result on 1 - yes, that, before you sort :)
<jvdz> Spooner_: K one sec
arkiver has quit [Quit: Leaving]
<jvdz> Spooner_: Success!
<Spooner_> jvdz : By the way, is_hidden will be turned into true, not "true" since YAML understands stuch things. So simply x[:is_hidden] rather than x[:is_hidden]=="true"
<jvdz> Spooner_: Good to know; wasn't sure how literal YAML was
<Spooner_> Unless you've manually added the quotes in the YAML, of course :)
<Spooner_> YAML is pretty Ruby-centric, compared to say JSON.
<Spooner_> And while you are there, use haml or slim, because erb is fugly :)
<jvdz> Spooner_: I am finding Ruby interesting so far; a bit hard to wrap my head around
indian has quit [Read error: Operation timed out]
<jvdz> Spooner_: I saw HAML, looked pretty decent
<jvdz> Spooner_: Many of the complicated examples for Nanoc were in ERB, so I did not want to stray my boat too far away from the shore
fowl has quit [Quit: Leaving]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
tommyvyo_ is now known as tommyvyo
<jvdz> Spooner_: Nice commit messages
<Spooner_> jvdz : Really, using one of the nicer layouts is something you won't come back from!
<Spooner_> Yeah, I had heard slim compiled a lot faster and hoped my HAML site would build faster, but it didn't :)
sailias has joined #ruby
Guest88336 is now known as ForSpareParts
<jvdz> Spooner_: This is great to look at; one of the frustrations with nanoc was there wasn't a lot of example code
<Spooner_> jvdz : http://dpaste.com/776378/ How can you use ERB again? :D
<jvdz> Spooner_: Its beaauttyful
timonv has quit [Remote host closed the connection]
<Spooner_> But still use helpers :D
<jvdz> Spooner_: Is that in slim?
kvirani has joined #ruby
imami|afk is now known as banseljaj
<Spooner_> jvdz : There is a #nanoc, you know. (yes, that is slim; haml is virtually the same)
<jvdz> Spooner_: Thanks, and thanks :)
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
ciopte7 has joined #ruby
prometheus has quit [Ping timeout: 246 seconds]
Fraeon has quit [Ping timeout: 248 seconds]
Fraeon has joined #ruby
Criztian has joined #ruby
chimkan has quit [Quit: chimkan]
jbw has quit [Ping timeout: 272 seconds]
prometheus has joined #ruby
erichmenge has joined #ruby
Criztian_ has joined #ruby
liluo has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
nedbat has quit [Disconnected by services]
davidpk has quit [Quit: Computer has gone to sleep.]
nedbat_ has joined #ruby
Criztian has quit [Ping timeout: 252 seconds]
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
davidpk has joined #ruby
carloslopes has joined #ruby
carloslopes has quit [Client Quit]
mvangala_home has joined #ruby
carloslopes has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
patjoh has quit [Ping timeout: 272 seconds]
clocKwize has quit [Quit: clocKwize]
shadoi has joined #ruby
AlbireoX`Away is now known as AlbireoX
mvangala_home has quit [Remote host closed the connection]
mvangala has joined #ruby
voodoofish430 has joined #ruby
Guedes has quit [Ping timeout: 255 seconds]
jbw has joined #ruby
kevinbond has joined #ruby
kevinbond has left #ruby [#ruby]
jrajav has joined #ruby
excellentdrums has quit [Quit: excellentdrums]
<mikepack> Anyone know why calling FooClass.new would return nil?
<mikepack> (instead of the instance of the class)
nedbat_ is now known as nedbat
headius has joined #ruby
Bosma has joined #ruby
jrist is now known as jrist-gym
<shevy> how
<shevy> class Foo; end; x = Foo.new; x.class # => Foo
nyuszika7h has quit [Ping timeout: 260 seconds]
<Spooner_> MyClass.new can return what it likes, if you override it. It shouldn't though :)
shadoi has quit [Read error: Connection reset by peer]
khakimov has joined #ruby
cantonic has quit [Quit: cantonic]
<apeiros_> mikepack: FooClass.method(:new).source_location - open in your favorite editor and find out…
<mikepack> K, I'll take a look
lkba has joined #ruby
<banisterfiend> headius: hey
lledet has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
<headius> banisterfiend: hi there
<banisterfiend> headius: do you know what this error is telling me exactly? "Error: fiber called across stack rewinding barrier"
lledet has joined #ruby
shadoi has joined #ruby
<banisterfiend> :P
<apeiros_> you must wait for the train
<headius> wow, I sure don't
<apeiros_> then the barrier will go up
* apeiros_ is bad at trolling
<headius> maybe something related to calling a fiber across threads or something?
<headius> wacky
<banisterfiend> headius: it's an MRI error, not jruby, but i figure a language implementor may have more of an idea
<banisterfiend> yeah..
<mikepack> ["/Users/mike.pack/.rvm/gems/ruby-1.9.3-p194@protosite-snippets/gems/rspec-mocks-2.11.1/lib/rspec/mocks/method_double.rb", 91]
liluo has quit [Remote host closed the connection]
<mikepack> apeiros_: ^
_justin has quit [Ping timeout: 250 seconds]
erichmenge has quit [Quit: Be back later]
<apeiros_> mikepack: as said, open in your favorite editor and find out why it returns nil
erichmenge has joined #ruby
mvangala has quit [Remote host closed the connection]
<mikepack> apeiros_: lol, if I could figure out *why*, I wouldn't be here.
<apeiros_> but it looks like you stubbed it and failed
mvangala has joined #ruby
nyuszika7h has joined #ruby
<apeiros_> mikepack: yeah, you see, one kind of help is telling you where to look
<apeiros_> anyway, d3 for me now
<Spooner_> mikepack or easier, use a pry session and "show-source FooClass.method"
v0n has quit [Remote host closed the connection]
erichmenge has quit [Client Quit]
<Spooner_> mikepack : However, someone has mocked .new which is why it has been replaced. That source code won't help. Look in your rspec code.
eywu has quit [Ping timeout: 244 seconds]
<mikepack> apeiros_: I define the class within my snippet_spec.rb file....just like normal: class FooSnippet < Protosite::Snippets::Base; end
MasterIdler_ is now known as MasterIdler
davidcelis has joined #ruby
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
david` has joined #ruby
<david`> hi
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
cjlicata has quit [Remote host closed the connection]
kjellski has joined #ruby
carlyle has joined #ruby
two_OMind has joined #ruby
eywu has joined #ruby
paradoja has quit [Quit: rcirc on GNU Emacs 24.1.50.1]
erichmenge has joined #ruby
atmosx has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
conor_ireland has joined #ruby
jvdz has left #ruby [#ruby]
Goles has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
khakimov has quit [Quit: Computer has gone to sleep.]
<david`> anyone can help me configuring ruby on apache (osx)?
<david`> i already installed ruby
<shevy> and why do you want to configure ruby with apache
digitalcakestudi has quit [Quit: Leaving.]
<david`> i want to run ruby on my dev machine
<atmosx> david`: I've configured ruby + lighttpd from macports once upon a time (3 years ago)
<atmosx> was way easier as far as I remember
br4ndon has quit [Remote host closed the connection]
_bart has joined #ruby
<atmosx> david`: you mean ruby on rails?
Squarepy has joined #ruby
<david`> no, ruby
<atmosx> and what apache has to do with it?
Squarepy has quit [Changing host]
Squarepy has joined #ruby
br4ndon has joined #ruby
<blazes816> david`, are you coming from PHP by chance?
MatthewGA has quit [Ping timeout: 252 seconds]
<david`> ins`t ruby server-side?
<blazes816> yes
<blazes816> that does not necessarily imply Apache
<atmosx> apache has nothing to do with ruby
<Squarepy> I've heard of client side ruby, rumors?
<atmosx> wtf is client side ruby suppose to mean?
<blazes816> Squarepy: fantasies
<Spooner_> : david` But usually people use it with Rails or Sinatra frameworks.
hynkle has joined #ruby
br4ndon has quit [Client Quit]
mvangala has quit [Remote host closed the connection]
<blazes816> david`: at the very least, Rack will get you http support
<Squarepy> haha, thought chrome was gearing up for it,
<Spooner_> Client-side ruby is supposed to have been hacked in via Google NaCl.
br4ndon has joined #ruby
<atmosx> unicorn_rails + nginx + other shit just to avoid webrick shit
MatthewGA has joined #ruby
* atmosx bad bad mouth
tiripamwe has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
<david`> Spooner_ sure, but don`t i have to setup ruby in the first place to be able to run the rails framework?
<blazes816> david`: type "ruby -v"
<blazes816> if you're on osx you should have it
<atmosx> david`: sure
<atmosx> blazes816: 1.8? c'mon..
shadoi has quit [Quit: Leaving.]
<blazes816> atmosx: sorry, i don't use osx
<atmosx> ah k
<blazes816> I figured apple would stay up to date on these things
<shevy> haha
<Spooner_> david` : You have to set up Ruby, yes, but Rails/Sinatra use their own hosting systems, separate to Apache.
<atmosx> david`: OSX comes with ruby preinstalled but uses ruby1.8 which is becoming 'obsolete'
shadoi has joined #ruby
<david`> blazes816 i already installed ruby, my problem is configurin apache to run ruby
<atmosx> david`: try installing RVM or macports.. rvm works fine, I'm using in one system and macrpots in the second one… both are working fine with ruby1.9
<blazes816> david`: you don't
fflush has joined #ruby
<shevy> david` what is your ruby version
<blazes816> david`,
<atmosx> david`: you don't need apache for anything on a dev machine
<shevy> for apache, you modify httpd.conf
krz has joined #ruby
krz has quit [Client Quit]
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
<blazes816> david`, if you have run 1.9 installed, and ruby gems, do "gem install rails" then find a tutorial
<blazes816> if not, install RVM, then 1.9, then proceed
<david`> ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
<blazes816> k, install RVM and ruby 1.9
<shevy> david`, this is my ruby.conf which httpd.conf requires http://pastie.org/4344095 but I gave up on it. I use ruby in .cgi scripts only
<shevy> and for this, it works
<david`> hmm
<Progster> is there a good program that disables distractions, emails, browsing, etc. and helps you focus on the task at hand?
havenn has joined #ruby
<atmosx> Progster: by task at hand meaning...?
<Progster> programming! :P
<Spooner_> Progster : There is usually a cable on the back of your PC that you can pull out to do that without any trouble.
hynkle has quit [Read error: Connection reset by peer]
jordanscales has quit [Quit: jordanscales]
<Progster> well I still need to browse for documentation and what not ;)
<blazes816> man, I know i've heard of some but can't think of any names
ph^ has quit [Remote host closed the connection]
<blazes816> found this http://macfreedom.com/
adeponte has quit [Remote host closed the connection]
blazes816 has quit [Quit: Leaving]
<atmosx> Progster: hm, I just use TM/vim at full screen and it's fine
<Spooner_> This one sounds even more appropriate: http://anti-social.cc/ - macfreedom just sounds like clicking on network-connection->disable.
piotr_ has quit [Ping timeout: 272 seconds]
<david`> blazes816: ok, ruby-1.9.3-p194 installed
<shevy> Progster just disable what you wont need via a script
<shevy> def stop_distractions
adeponte has joined #ruby
<shevy> system 'kill -9 firefox'
<shevy> # etc...
mneorr1 has quit [Quit: Leaving.]
locriani has quit [Remote host closed the connection]
shadoi has quit [Remote host closed the connection]
shadoi has joined #ruby
erichmenge has quit [Quit: Be back later]
erichmenge has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
shadoi has quit [Read error: Connection reset by peer]
axl_ has left #ruby [#ruby]
hynkle has joined #ruby
erichmenge has quit [Client Quit]
gmci has joined #ruby
erichmenge has joined #ruby
ph^ has joined #ruby
shadoi has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
<havenn> Sublime Text 2 has a nice 'distraction free' mode.
erichmenge has quit [Client Quit]
erichmenge has joined #ruby
mvangala_home has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
mvangala has quit [Read error: Connection reset by peer]
erichmenge has quit [Client Quit]
jonathancutrell has joined #ruby
erichmenge has joined #ruby
<jonathancutrell> What's the best way to find out what filetype I should send to the browser?
<jonathancutrell> mimetype*
cascalheira has joined #ruby
<jonathancutrell> dynamically.
erichmenge has quit [Client Quit]
wmoxam_ has joined #ruby
<Mon_Ouie> That just depends on what your file is. There are ways of guessing it, but it's never 100% guaranteed to be the right result.
erichmenge has joined #ruby
ttilley is now known as ttilley_off
<Mon_Ouie> Since you're sending the data, you're supposed to know what they are.
tiripamwe has joined #ruby
erichmenge has quit [Client Quit]
fflush has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
fowl has joined #ruby
fowl has quit [Changing host]
fowl has joined #ruby
fflush has joined #ruby
hynkle has joined #ruby
ph^ has quit [Remote host closed the connection]
deryl has quit [Quit: Time To Go, Too Bad, So Sad!]
david` has left #ruby ["Textual IRC Client: http://www.textualapp.com/"]
kirun has joined #ruby
<cmyers> I'm looking for a "parallel task runner" - I have a pile of tasks which are high-latency but low CPU (e.g. making restful service calls). I'd like something where I pass a list of argument lists, a "max_jobs" parameter, then say "go". Then it evaluates the block once for each item in the list of arg lists, up to max_jobs at a time in parallel, then I can block till it is done and ask for a list of results.
<cmyers> there must be *something* like this already...
dr_diamond has joined #ruby
dr_diamond has quit [Changing host]
dr_diamond has joined #ruby
<banisterfiend> cmyers: objc has great support for that
<banisterfiend> grand central dispatch
<cmyers> objective C? cool. I want it in ruby though =)
<cmyers> I see a ruby gem to wrap the API on mac... =/
<the_jeebster> cmyers: check out sidekiq
<the_jeebster> thread-safe job queueing
fantazo has quit [Remote host closed the connection]
<cmyers> the_jeebster: that sounds very on-the-right-track - thanks =)
<barefoot> style question: is this bad? "(0...ending ||= 1).each do |n|"
mvangala has joined #ruby
v0n has joined #ruby
<the_jeebster> cmyers: sidekiq is a gem that relies on celluloid (concurrent object framework)
mvangala_home has quit [Read error: Connection reset by peer]
mvangala has left #ruby [#ruby]
fflush has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
ypaq has joined #ruby
<cmyers> the_jeebster: I found celluloid and figured I would use it to write my own if I had to
<cmyers> looks like sidekiq is what I need though
<cmyers> as long as it isn't too heavyweight, this shoudl work great =)
<the_jeebster> sidekiq is basically thread-safe resque
adeponte has quit [Remote host closed the connection]
atmosx has quit [Ping timeout: 244 seconds]
beneggett has quit [Ping timeout: 244 seconds]
beneggett has joined #ruby
tk__ has quit [Quit: ばいばい]
<cmyers> hmm, I'm not using rails though and looking at the "plain old ruby" example, it seems pretty heavy-weight
<cmyers> I wish I could just run it all in a simple script, without having to use ports and processes and connections and so on
ypaq has left #ruby [#ruby]
krusty_ar has quit [Read error: Connection reset by peer]
<cmyers> hmm, might still be ok
<the_jeebster> well both of those gems are using resque to store the tasks
<the_jeebster> err redus
<the_jeebster> redis*
<the_jeebster> incase of failure, etc.
krusty_ar has joined #ruby
bullicon has quit [Quit: Computer has gone to sleep.]
<lectrick> I sure wish they would (could?) backport this to 1.9: In Ruby 2.0 HEAD you can apparently now use %i[ symbol1 symbol2 ] to get a list of symbols, like you can strings now with %w[]
cantonic has joined #ruby
mahlon has quit [Quit: nine foot long outhouse ladle]
CaptainJet has joined #ruby
<Spooner_> lectrick : Yeah, odd that they missed that out. Still, I'm sure there are nicer things we could do with in 1.9 :)
runa has quit [Ping timeout: 240 seconds]
<lectrick> i agree. and i can always just do %w[ words more_words ].map(&:to_sym)
<lectrick> it would be cool if ruby had a way to define new syntax though
MatthewGA_ has joined #ruby
* lectrick pretends to not know about Lisp
ph^ has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
MasterIdler has quit [Quit: MasterIdler]
arkiver has joined #ruby
<shevy> cool lectrick
<banisterfiend> lectrick: you can hijack syntax that u dont use
<shevy> I suppose %i( foo bar ) works too right?
runa has joined #ruby
tewecske has joined #ruby
<banisterfiend> lectrick: e.g `words blah bing`
<Spooner_> def syms(str); str.lstrip.split(/\s+/).map(&:to_sym);end; syms " frog cheese "
<Spooner_> Not quite there :D
stephenjudkins has joined #ruby
<banisterfiend> lectrick: or: -%w[blah blah blah]
_bart has quit [Quit: _bart]
<banisterfiend> pr +%w[blah blah blah]
MatthewGA has quit [Ping timeout: 244 seconds]
axl_ has joined #ruby
MatthewGA_ has quit [Quit: Leaving]
timonv has joined #ruby
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
MasterIdler has joined #ruby
Berglund has joined #ruby
<Spooner_> lectrick : If you are following the 2.0 development, are there any (many) syntax breakers? I remember the amount of time it took to fix all those 1.8 case statements in people's gems back when 1.9 appeared (not even going to talk about all the other breakages).
JustinCampbell has joined #ruby
dankest has joined #ruby
<lectrick> There's probably about the same number of breakages :/
<lectrick> Growing pains
<lectrick> I don't mind a little pain upfront if it means the code (or the running of it) is better long-term
<Spooner_> If it makes hash parameters any less fiddly, I'm all for it breaking a lot of things :)
<lectrick> otherwise it's pure job security lol
<lectrick> there's a pretty good amount of ruby code out there at this point
<banisterfiend> Spooner_: matz said that 2.0 will be backwards compat with 1.9.3
<lectrick> banisterfiend: 100% backwards compat?
<banisterfiend> lectrick: i think so
<Spooner_> That would be excellent, but if it needs to break, then it should (rather than being half-arsed).
<banisterfiend> that's the aim anyway
mxweas has joined #ruby
Criztian_ has quit [Remote host closed the connection]
<cmyers> the_jeebster: bam, all I had to do was google the exact perl module name + "ruby"
<Spooner_> Still got an archaic (if slightly better) GC though (in Cruby, that is) http://patshaughnessy.net/2012/3/23/why-you-should-be-excited-about-garbage-collection-in-ruby-2-0
<cmyers> sidekiq is super interesting and I am going to keep that in mind, but for this particular usecase, I need somethign super light-weight
sendoushi has quit [Remote host closed the connection]
kidoz has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
jeff_sebring has joined #ruby
beneggett has quit [Ping timeout: 252 seconds]
jstew has quit [Quit: leaving]
timonv has quit [Remote host closed the connection]
beneggett has joined #ruby
havenn has quit [Remote host closed the connection]
<lectrick> i wish parts of ruby were modular, like the GCollector algorithm, etc.
arkiver has quit [Ping timeout: 272 seconds]
jonathanwallace has joined #ruby
<Spooner_> It would be nice :)
jonathanwallace has quit [Remote host closed the connection]
headius_ has joined #ruby
piggybox has quit [Quit: piggybox]
<Spooner_> Does C code depend on it being mark/sweep though? Such as the mark handler and rb_mark()?
headius has quit [Disconnected by services]
headius_ is now known as headius
mahlon has joined #ruby
<shevy> wheeee ... I am making progress with my package manager
<Spooner_> I can only imagine it is, otherwise they'd have swapped in something less grim than M & S.
jrist-gym is now known as jrist
Gurpartap has joined #ruby
nateberkopec has joined #ruby
<Spooner_> Not finished it yet, shevy?
<Gurpartap> anyone here willing to give a 2 min kickstart for ruote?
<Gurpartap> i'm unable to get my head around it :/
<Gurpartap> ( http://ruote.lambda.io )
<shevy> Spooner_, not yet... I split it up into different projects. cookbooks will provide information like so http://www9.picfront.org/token/1DDc/2012/07/27/2084591.png
sebastorama has joined #ruby
<shevy> 2271 entries registered so far
JeremieDeNoob has joined #ruby
<Gurpartap> i'm using redisstorage so that i can have remote servers participate
<Gurpartap> but i have some practical coding question around how exactly to get started with that
blazes816 has joined #ruby
<Gurpartap> halp!
fflush has joined #ruby
<shevy> hey Gurpartap
<Gurpartap> hey man
<Gurpartap> :)
<shevy> what is ruote
Berglund has quit [Quit: Computer died.]
<JeremieDeNoob> anyone know of a good gem to make a blog?
<shevy> and why is it not spelled route
conor_ireland has quit [Quit: conor_ireland]
EricKamsky has joined #ruby
<Gurpartap> shevy: it's a workflow engine
bglusman_ has joined #ruby
<Gurpartap> shevy: like a master ensuring a step of things happen according to the preset conditions and flow
havenn has joined #ruby
<shevy> aha
<Spooner_> I'd recommend you try #ruote if you want specific answers about it, Gurpartap
fermion has joined #ruby
<Gurpartap> shevy: like a combo of state_machine + resque/sidekiq + workers. except that with ruote, it acts as a master, to whom everyone must respond, so that eventually things do get handled
<Gurpartap> Spooner_: been there. hardly any members there.
codezombie has joined #ruby
<shevy> sorry, I have no idea what it is still
<Gurpartap> barely 5, except me and a log bot
<shevy> it sounds like a list of dependencies
<shevy> like rake dependencies
conor_ireland has joined #ruby
<shevy> and when it comes to handling, I demand instant fast food delivery
bglusman has quit [Ping timeout: 272 seconds]
<shevy> I think I have finally reached the point where I need to think about tests
<shevy> when I make changes, I no longer know whether everything still works or does not
<oz> that's when you wish you had some tests actually :)
ph^_ has joined #ruby
codespectator has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
dpritchett has quit [Quit: Leaving...]
<shevy> yeah
cbuxton has quit [Quit: Leaving.]
ananthakumaran has quit [Quit: Leaving.]
<otters> so can you create your own IO object from a string
ph^ has quit [Ping timeout: 272 seconds]
ph^_ has quit [Remote host closed the connection]
asobrasil has left #ruby [#ruby]
<Spooner_> JeremieDeNoob : octopress or nanoc
<JeremieDeNoob> thanks sp
<JeremieDeNoob> Spooner_:
fflush_ has joined #ruby
<JeremieDeNoob> any preference?
<Spooner_> Former is more idiot-proof. Latter is more versatile.
<JeremieDeNoob> perfect
<JeremieDeNoob> thanks
fflush has quit [Ping timeout: 252 seconds]
fflush_ is now known as fflush
<otters> because it's part of my assignment
<otters> but I have never heard of that before
<otters> afaik you can make IO objects from file descriptors
Maniacal has joined #ruby
<Spooner_> JeremieDeNoob : Jekyll is in between the two (octopress builds on top of it).
<Mon_Ouie> otters: Instances of the IO class? No, because that class is meant to work with file descriptors — like sockets or pipes or actual files.
<Mon_Ouie> But an object that behaves like an IO, sure — see the StringIO class
<otters> Mon_Ouie: that's what I was thinking
<otters> I guess I'll use StringIO
<otters> the assignment says "return an IO object with the data stream"
<otters> i.e. data streamed from an S3 object, and the only way to get data from an S3 object with the ruby SDK is with S3Object#read
<otters> which returns *a string*
<otters> so StringIO it is
<banisterfiend> otters: StringIO is my fren.
aakashvd has joined #ruby
<otters> what's it for?
aakashvd has quit [Client Quit]
mxweas has quit [Quit: Computer has gone to sleep.]
reuf has joined #ruby
Eiam has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
apok has quit [Quit: apok]
beneggett has quit [Ping timeout: 244 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
beneggett has joined #ruby
jaylevitt has joined #ruby
fflush has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
tomb_ has joined #ruby
jaylevitt has quit [Client Quit]
timonv has joined #ruby
savage-_ has joined #ruby
Synthead has quit [Quit: p33 ba115]
Jay_Levitt has quit [Ping timeout: 244 seconds]
beneggett has quit [Ping timeout: 250 seconds]
adeponte has joined #ruby
savage- has quit [Ping timeout: 240 seconds]
RichieEvan has quit [Ping timeout: 264 seconds]
greasegum has quit [Ping timeout: 272 seconds]
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
maletor has quit [Ping timeout: 264 seconds]
piggybox has joined #ruby
Hawklord has joined #ruby
Niamkik has joined #ruby
kevinbond has joined #ruby
beneggett has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
mxweas has joined #ruby
maletor has joined #ruby
LBRapid has quit [Quit: Farewell.]
mksm has quit [Read error: Operation timed out]
derrida has quit [Ping timeout: 252 seconds]
conor_ireland has joined #ruby
cmake has joined #ruby
dawtcummz has quit [Ping timeout: 244 seconds]
beneggett has quit [Ping timeout: 255 seconds]
TheMoonMaster has quit [Ping timeout: 252 seconds]
mpereira has quit [Ping timeout: 246 seconds]
crodas has quit [Ping timeout: 240 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
beneggett has joined #ruby
indian has joined #ruby
verto is now known as verto|off
ctp has quit [Quit: Linkinus - http://linkinus.com]
SCommette has joined #ruby
luxdormiens has quit [Quit: luxdormiens]
Hawklord has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
RichieEvan has joined #ruby
<i0n> is it possible to nest blocks with ruby?
Hawklord has joined #ruby
beneggett has quit [Ping timeout: 244 seconds]
<i0n> var.each { |b| methodName(..arg1(..arg2)) }
_bart has joined #ruby
cascalheira has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby
<Spooner_> i0n : Well, you aren't nesting blocks there...
luxdormiens has joined #ruby
<Spooner_> But in general, just use irb/pry and give it a try :)
Jay_Levitt has quit [Client Quit]
<i0n> ;)
<i0n> ty Spooner_
verto|off is now known as verto
<Spooner_> I'm not really at all sure what you are meaning to do there, actually.
beneggett has joined #ruby
sebastorama has quit [Ping timeout: 264 seconds]
Hawklord has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
blazes816 has quit [Read error: Connection reset by peer]
Hawklord has joined #ruby
blazes816 has joined #ruby
beneggett has quit [Ping timeout: 264 seconds]
Denommus has joined #ruby
Denommus has left #ruby [#ruby]
nateberkope has joined #ruby
Hawklord has quit [Client Quit]
Hawklord has joined #ruby
beneggett has joined #ruby
dv310p3r has quit [Read error: Connection reset by peer]
dv310p3r has joined #ruby
mxweas has quit [Quit: Leaving...]
nateberkopec has quit [Ping timeout: 250 seconds]
nateberkope has quit [Client Quit]
nateberkopec has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
derrida has joined #ruby
derrida has quit [Changing host]
derrida has joined #ruby
crodas has joined #ruby
TheMoonMaster has joined #ruby
Hawklord has quit [Client Quit]
Hawklord has joined #ruby
Jay_Levitt has joined #ruby
Jay_Levitt has quit [Remote host closed the connection]
dawtcummz has joined #ruby
mksm has joined #ruby
mksm is now known as Guest56159
seitensei has joined #ruby
beneggett has quit [Ping timeout: 250 seconds]
bradhe has joined #ruby
luxdormiens has quit [Quit: luxdormiens]
beneggett has joined #ruby
Hawklord has quit [Ping timeout: 276 seconds]
<shevy> I think he is not sure either
<shevy> I often think ruby has all sorts of wild, crazy people
<shevy> wondering if python has these types as well
abdulkarim has quit [Remote host closed the connection]
indian has quit [Ping timeout: 240 seconds]
<nedbat> shevy: what sorts of crazy?
<shevy> nedbat, people with crazy ideas
<shevy> I call these ideas "seed" ideas. they seed something new
<shevy> (of course there are tons of crap ideas among those crazy ideas as well)
<shevy> hmm people like _why perhaps
<shevy> crazy and genius at the same time
<nedbat> shevy: python and #python get plenty of crazy ideas.
Norrin has joined #ruby
apok has joined #ruby
<sernin> Have you ever *seen* Twisted
apok has quit [Read error: Connection reset by peer]
<nedbat> shevy: not sure of the crazy/genius breakdown though...
apok has joined #ruby
<nedbat> have you ever seen PyPy?
fridim_ has quit [Ping timeout: 246 seconds]
sebastorama has joined #ruby
twoism has joined #ruby
<shevy> hmm
<shevy> that is crazy?
<shevy> thought PyPy is one of those projects that will never finish :D
xbob has joined #ruby
<nedbat> shevy: it's 110% crazy and 250% genius.
<shevy> I have to admit, I dont know the python world well
<nedbat> shevy: it's usable now, and runs like 5x faster than CPython.
johnlcox has joined #ruby
mucker has quit [Quit: leaving]
<shevy> aha ok
havenn has quit [Remote host closed the connection]
headius has quit [Quit: headius]
maxmmurphy has joined #ruby
greasegum has joined #ruby
austinallen has joined #ruby
Eldariof-ru has quit []
<austinallen> Hey guys, I'm thinking about learning ruby! Is their any benefits of learning this before java?
Norrin has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
Squarepy has quit [Quit: Leaving]
<sernin> Sure, if you learn Ruby you never have to learn bullshit like Java.
<sernin> IMO.
<Spooner_> It rather depends what you want from the language.
greggawatt has joined #ruby
<austinallen> Oh yeah defiantly sernin
<shevy> austinallen it's a lot less code you have to write to solve a given problem in ruby, compared to java
<nedbat> austinallen: there's a downside to learning ruby first: if you do, as you're learning java, you'll just keep thinking, why would I put up with this BS? If you do it the other way around, as you're learning RUby, you'll think, "this is fabulous!"
<shevy> yeah
<shevy> you can learn ruby easily lateron
<shevy> start with java
<greggawatt> i have a ruby question that relates to mkdir
<sernin> However, I am a sysadmin/devops guy,not a developer, so I am quite biased
<nedbat> austinallen: why re you learning both?
<shevy> greggawatt, FileUtils.mkdir_p('/tmp/foo/bla')
<austinallen> Well i would mainly like to learn java for android development and i would like to learn ruby as my "hobby" language
<greggawatt> i have the following vars first, middle and last. but Dir.mkdir "/home/usr/"+first+"/"+middle+"/"+last+"/"
hasrb has joined #ruby
tiripamwe has quit [Ping timeout: 240 seconds]
<greggawatt> shoots the error mkdir': No such file or directory
<shevy> austinallen, really. ruby will make you want to not use java anymore, so it is better if you learn java first. lateron, add ruby + jruby to that. I am trying the other way... I ahve been using ruby since a long time... and learning java is sooo boring now that I find it hard to motivate myself to do so :(
habib has joined #ruby
<shevy> greggawatt, try: _ = "/home/usr/"+first+"/"+middle+"/"+last+"/"
<maxmmurphy> @greggawatt, @shevy recommended mkdir_p
<shevy> puts _
pdtpatrick has joined #ruby
<shevy> FileUtils.mkdir_p(_)
<shevy> greggawatt, and tell what puts _ reports to you
<greggawatt> ok
<austinallen> I have a lot of experience with javascript and a good bit in php, it seems to me ruby is very similar to php in some forms
<shevy> austinallen, kind of. the philosophy is quite different though
<Spooner_> austinallen It really isn't.
davidpk has quit [Quit: Computer has gone to sleep.]
<shevy> if you dont like objects then ruby won't be for you
<austinallen> Oh i love objects since I've been working with them partially in javascript
<sernin> javascript has a nice object model
<austinallen> Some people claim javascript isn't oop, but it most certainly is in my opinion
<greggawatt> and that works! what does the puts do differently?
<twoism> wow. just wow
andrewhl has quit [Remote host closed the connection]
Norrin has joined #ruby
<austinallen> Well thank you guys for your support, i most certainly will learn ruby very soon, thanks :D
<Hanmac> austinallen in ruby mostly everything is an object ...
<Hanmac> and with some of my bindings something could be multible objects at the same time :P
<austinallen> Then ill love the language Hanmac because objects make a lot of sense to me
<davidcelis> I need a good way to have my Rake TestTask only load one test file at a time, but still run all test files. What's the best way to do that?
<davidcelis> I've got a problem where i have separate test files to test my library in different languages, but each file is loaded so only the last language gets loaded. Then all tests are run with that language
<Hanmac> boolean: objects, simple numbers: objects, classes: objects: methods: not realy objects, but can be turned into one, blocks: turnable too
beneggett has quit [Ping timeout: 244 seconds]
eywu has quit [Quit: Leaving.]
<shevy> nedbat remember when I wrote about crazy people in the ruby world?
<shevy> Hanmac is one of em
<shevy> :D
khakimov has joined #ruby
* Hanmac is only ruby on the outside ... under them is a c++ Layer and in the Core is pure C
cantonic has quit [Quit: cantonic]
<Spooner_> But with his special bindings, he is more than one of the crazy people :)
jonathanwallace has joined #ruby
eywu has joined #ruby
THE_GFR|WORK has quit [Ping timeout: 248 seconds]
<Hanmac> when it has *.h or *.hpp files, then you could make a binding
beneggett has joined #ruby
lledet has quit [Read error: Connection reset by peer]
lledet has joined #ruby
cjlicata has joined #ruby
fantazo has joined #ruby
geekbri has quit [Remote host closed the connection]
verto is now known as verto|off
tiripamwe has joined #ruby
eywu has quit [Client Quit]
axl_ has quit [Quit: axl_]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<nedbat> shevy: I see what you mean...
carlyle has quit [Ping timeout: 272 seconds]
Criztian has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
<Hanmac> an when you are not using swig your costumers will be happy too
twoism has quit [Remote host closed the connection]
sebicas has joined #ruby
<shevy> Hanmac really loves swig
THE_GFR|WORK has joined #ruby
Niamkik has quit [Quit: leaving]
<otters> has anybody here used TLS encryption with eventmachine?
internet_user has quit [Remote host closed the connection]
<shevy> I am using "grep -r " ... to search in 2000 different files for some keywords. what would the pure ruby way be ?
<shevy> on windows I will not always have grep available...
sailias has quit [Quit: Leaving.]
vjacob has joined #ruby
beneggett has quit [Ping timeout: 255 seconds]
vjacob has left #ruby [#ruby]
kvirani has quit [Remote host closed the connection]
mpereira has joined #ruby
<Spooner_> Find a grep.exe file and just include that in your app :)
beneggett has joined #ruby
<Hanmac> shevy there exist an grep.exe for windows too
nedbat has quit [Disconnected by services]
nedbat_ has joined #ruby
<Mon_Ouie> file.lines.grep /regexp/ (or just iterate over them and do something if they match a regexp)
alindeman has quit [Ping timeout: 240 seconds]
xbob has quit [Quit: This computer has gone to sleep]
<shevy> Hanmac yeah... but when possible, I always prefer to stay in ruby
<shevy> ok Mon_Ouie
kpshek has quit []
jonathancutrell has quit [Quit: jonathancutrell]
akem has joined #ruby
rubylancer has quit [Ping timeout: 245 seconds]
nedbat_ is now known as nedbat
Jayunit100 has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<Jayunit100> hmm what does this error mean
<Jayunit100> ./uuidtools.rb:32:in `require': no such file to load -- uuidtools/version (LoadError)
dpritchett has joined #ruby
<Jayunit100> ah never mind simple i had remove a version.rb file on accident
<xclite> it means that require can't find the file
alindeman has joined #ruby
mengu has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
lledet has quit [Read error: Operation timed out]
banseljaj is now known as imami|afk
lledet has joined #ruby
xclite has quit [Quit: Leaving]
lledet has quit [Client Quit]
nazty has joined #ruby
tiripamwe has quit [Quit: Leaving]
tommyvyo has joined #ruby
JeremieDeNoob has quit [Remote host closed the connection]
bglusman_ has quit [Remote host closed the connection]
bglusman has joined #ruby
greasegum has quit [Ping timeout: 240 seconds]
otters has quit [Ping timeout: 240 seconds]
jgarvey has quit [Quit: Leaving]
bglusman has quit [Ping timeout: 264 seconds]
greasegum has joined #ruby
wangr has quit [Ping timeout: 240 seconds]
wmoxam_ has quit [Quit: leaving]
khakimov has quit [Quit: Computer has gone to sleep.]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
Synthead has joined #ruby
cjlicata has quit [Remote host closed the connection]
thone has quit [Read error: Operation timed out]
otters has joined #ruby
mrwalker has quit [Remote host closed the connection]
greasegum has quit [Ping timeout: 252 seconds]
krusty_ar has quit [Quit: No Ping reply in 180 seconds.]
wallerdev has quit [Quit: wallerdev]
<ViperMaul> Regex Question: Given a multiline text full of string literals following the pattern "items=118;" or "items=23;" or "items=73;" etc. Is there a way to Regex Replace by increasing each number by 1 or 2?
<ViperMaul> So the example above results in "items=119;" "items=24;" "items=74;"
thone has joined #ruby
kevinbond has left #ruby [#ruby]
wallerdev has joined #ruby
<ViperMaul> Is this possible?
wallerdev has quit [Client Quit]
wallerdev has joined #ruby
kvirani has joined #ruby
<Hanmac> ViperMaul text.gsub(/items=(\d+)/){ "items=#{$1.to_i+1}"}
<ViperMaul> Wow. That would be cool. Thanks I will try it.
<Hanmac> or gsub! when you want inplace-replacement
<ViperMaul> aye
<otters> so if a class inherits from EM::Connection
<otters> wait
tommyvyo has joined #ruby
rbanffy has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
gmci has joined #ruby
Maniacal has quit [Quit: Leaving]
Maniacal has joined #ruby
wvms has joined #ruby
krusty_ar has joined #ruby
baroquebobcat has quit [Ping timeout: 246 seconds]
balki has quit [Read error: Connection reset by peer]
THE_GFR|WORK has quit [Ping timeout: 240 seconds]
beneggett has quit [Ping timeout: 272 seconds]
shadoi has quit [Quit: Leaving.]
habib has quit [Remote host closed the connection]
stopbit has quit [Quit: Leaving]
nazty has quit [Quit: WeeChat 0.3.7]
shadoi has joined #ruby
dv310p3r has quit [Ping timeout: 272 seconds]
sebicas has quit [Quit: sebicas]
beneggett has joined #ruby
hunglin has quit [Quit: Leaving.]
chson has quit [Remote host closed the connection]
lorandi has quit [Quit: Leaving]
reuf has quit [Quit: Leaving]
THE_GFR|WORK has joined #ruby
sgronblom has quit [Ping timeout: 244 seconds]
dpritchett has quit [Quit: Leaving...]
Foxandxss has joined #ruby
baroquebobcat has joined #ruby
the_jeebster has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
Dreamer3 has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
v0n has quit [Remote host closed the connection]
khakimov has joined #ruby
baroquebobcat has quit [Ping timeout: 250 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
otters has quit [Ping timeout: 246 seconds]
khakimov has quit [Ping timeout: 240 seconds]
<rking> Hrm. How bad am I if I val.to_s.empty?
awarner has quit [Remote host closed the connection]
krusty_ar has quit [Ping timeout: 272 seconds]
<Hanmac> hm rking what class is val?
cakehero has quit [Quit: Computer has gone to sleep.]
chrisbolton has joined #ruby
headius has joined #ruby
krusty_ar has joined #ruby
otters has joined #ruby
<rking> Hanmac: Some junky thing of whateverness.
<rking> Hanmac: It's actually an ActiveRecord::Base child field
<rking> All I'm trying to say is, "Don't display this field if it's more or less empty.", and I figured the .to_s is doing its own logic that boils it down to an empty string anyway. (For the case where it's an actual String, a number, a boolean, a nil, etc.)
klipeto has quit [Ping timeout: 248 seconds]
snearch has joined #ruby
krz has joined #ruby
<X-Jester> can you just val.empty? ?
<X-Jester> or is val not implicitly a method that inherits empty?
carloslopes has quit [Quit: Leaving.]
<X-Jester> er, s/method/object
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
<rking> X-Jester: #empty? is not on a bunch of classes, e.g. TrueClass/FalseClass/NilClass
jrist is now known as jrist-brb
<rking> X-Jester: ActiveRecord does a good bit of type conversion, so boolean fields are true Ruby booleans.
<X-Jester> alright, i wondered if every object inherited empty?
<X-Jester> but that doesn't make sense
ramblex has quit [Ping timeout: 264 seconds]
<X-Jester> so i'm dumb, and plesae ignore my stupid question
<rking> It'd be a good meditation, to try to define .empty? one at a time, on each class.
<X-Jester> my (furthermore useless) observation is, as long as to_s doesn't bark at nilclass, your method seems pretty efficient
<rking> "Hrm. HTTPServer#empty?… NilClass#empty?… BasicObject#empty?…"
bradhe has quit [Read error: Connection reset by peer]
<rking> X-Jester: Cool. Thanks. (Also thanks to Hanmac up there for asking the thing I should've prespecified)
bradhe has joined #ruby
austinallen_ has joined #ruby
<X-Jester> i'd say it's probably more precise to check the reference itself for nil, and then specifically check references within the class for nil if they're 'has-a' objects
<X-Jester> but that can be tedious and often unnecessary in ruby
pskosinski has quit [Ping timeout: 255 seconds]
austinallen has quit [Ping timeout: 246 seconds]
austinallen_ is now known as austinallen
<rking> Hrm, that might be a good solution for a BasicObject#empty?
RichieEvan has quit [Quit: RichieEvan]
Criztian has quit [Remote host closed the connection]
uris has quit [Quit: leaving]
johnlcox has quit [Ping timeout: 272 seconds]
<rking> FalseClass would be more quirky. In this very case I want it to mean non-empty, but elsewhere I'm sure I'd think otherwise.
bradhe_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
tvw has quit [Read error: Connection reset by peer]
RichieEvan has joined #ruby
PaciFisT has joined #ruby
dpritchett has joined #ruby
SCommette_ has joined #ruby
RichieEvan has quit [Client Quit]
bradhe_ has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
SCommette has quit [Ping timeout: 244 seconds]
rakm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
krusty_ar has quit [Ping timeout: 246 seconds]
PaciFisT has quit [Ping timeout: 246 seconds]
krusty_ar has joined #ruby
etehtsea has quit []
dpritchett has quit [Quit: Leaving...]
beneggett has quit [Ping timeout: 244 seconds]
JustinCampbell has quit [Remote host closed the connection]
<shevy> lies!
<shevy> lieeees
<shevy> everywhere!
RichieEvan has joined #ruby
linoj has joined #ruby
dross_ has joined #ruby
nicoulaj has quit [Read error: Connection reset by peer]
krusty_ar has quit [Ping timeout: 252 seconds]
<rking> FalseClass.lies! => true
dross has quit [Ping timeout: 246 seconds]
krusty_ar has joined #ruby
savage- has joined #ruby
<blazes816> there're a lot of sublime text users here yeah? any idea how to get a terminal window? I found a few plugins but they didn't seem to be what i want.
<davidcelis> what
sebastorama has quit [Quit: Computer has gone to sleep.]
<blazes816> ? I mean in the editor
Dreamer3 has joined #ruby
<blazes816> like in aptana, there was a bottom pain that was a terminal
<rking> Hehe. Maybe *some day* I'll understand the appeal of some editor that is not vim? A guy can dream.
<blazes816> rking: i'm trying it out, normally I use vim
<blazes816> i just installed it earlier today
savage-_ has quit [Ping timeout: 245 seconds]
<rking> blazes816: Anything you found yet that's like, "Ohh, nice." ?
<blazes816> and the first thing I did was install vim short cuts ;)
<blazes816> only that there seem to be more supported stuff for newer langauges. stylus, coffescript, etc
savage-_ has joined #ruby
ciopte7 has quit [Quit: ciopte7]
<blazes816> but i don't think i'll have too long a stay
austinallen has quit [Quit: austinallen]
kirun has quit [Quit: Client exiting]
savage- has quit [Ping timeout: 244 seconds]
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
nedbat has quit [Disconnected by services]
beneggett has joined #ruby
nedbat_ has joined #ruby
Rezwan has joined #ruby
brianpWins has quit [Quit: brianpWins]
MasterIdler has quit [Ping timeout: 246 seconds]
RichieEvan has quit [Quit: RichieEvan]
Gavilan has joined #ruby
chrisbolton has quit [Quit: chrisbolton]
hasrb has quit [Remote host closed the connection]
manizzle has quit [Read error: Connection reset by peer]
awarner has joined #ruby
manizzle has joined #ruby
SCommette_ has quit [Quit: SCommette_]
chson has joined #ruby
<rking> blazes816: BTW the vim-coffee-script addon is pretty decent.
snearch has quit [Quit: Verlassend]
fantazo has quit [Remote host closed the connection]
minijupe has quit [Quit: minijupe]
<rking> I'd like to know what the "supported stuff" means. Syntax highlighting is easy (and already done for everything like CoffeeScript)
<blazes816> rking: just stuff like stylus, and handlebars. I havn't found nearly as good of implementations for vim.
<ForSpareParts> Does anybody have strong opinions on Slim vs Haml? I'm digging into templating languages, and I'd like to know the pros and cons...
<blazes816> i like eco ....
<rking> blazes816: Oh dang.
<rking> I've been using Sass and loving it, but Stylus looks even more aggressive.
adeponte has quit [Remote host closed the connection]
ryh has quit [Remote host closed the connection]
pdtpatrick_ has joined #ruby
bglusman has joined #ruby
<mrsolo> vim does coffee script?!? nice
jrist-brb is now known as jrist-afk
dankest_ has joined #ruby
<rking> And the only thing like Handlebars that has ever been that interesting to me was https://github.com/leonidas/transparency
Russell^^ has quit [Quit: Russell^^]
<Spooner_> ForSpareParts : There isn't a massive difference really.
ryh has joined #ruby
nateberkopec has quit [Ping timeout: 265 seconds]
xiphiasx_ has quit [Quit: leaving]
<Spooner_> ForSpareParts : I found slim a little slim on decent docs, if that matters.
<rking> mrsolo: You can easily set it so that whenever you save .coffee it compiles to .js, and then there's stuff like :CoffeeCompile watch vert
xiphiasx_ has joined #ruby
<ForSpareParts> Spooner_: Hm. It probably does.
ddouglas has joined #ruby
dankest has quit [Ping timeout: 246 seconds]
<ForSpareParts> I'm working on a project that will probably be maintained by people with little to no coding knowledge, so at this point the thinking is we'll go with ERB
<Gavilan> ForSpareParts: That's every project :)
<ForSpareParts> but I like the concept of haml, based on what little I've seen, so I wanted to make sure there wasn't some sort of good compromise.
indian has joined #ruby
<blazes816> rking: it's the future! ;)
<rking> It is.
<rking> blazes816: Thanks for the ref.
<rking> blazes816: BTW I want to make this one superawesome syntax file to make use of 256 colors.
<rking> All it does is colorize indent levels uniquely.
<rking> But it would be a better YAML syntax highlighter than what we have now, and for any new nested language.
bglusman has quit [Ping timeout: 272 seconds]
<blazes816> interesting...
ciopte7 has joined #ruby
adeponte has joined #ruby
sebastorama has joined #ruby
<rking> In fact, I'm going to do one of ~3 goofball saw-sharpenings along that lines. If anyone wants to vote for it, send an email to yeahidlikethat256colorindentedthing@sharpsaw.org , and I'll do it then email you back.
<rking> I'm going to do one of those things next week, that is.
SQLStud has quit [Quit: Leaving]
ciopte7 has quit [Client Quit]
<rking> Or feel free to vote by sending to pry-docmore_ohthatllhelpthen00bsandevenme@sharpsaw.org , if you want me to finish pry-docmore, a thing so that you can say "? $'" in pry and it'll show you what $' is all about.
xaq has quit [Remote host closed the connection]
<rking> (Plus also "? alias", so you can see which order the args go, and all the other keywords too)
xaq has joined #ruby
<ddouglas> excuse me, folks, but I have a simple query... when I declare a local variable inside of a block, why can't I access it outside of the blocK? Why do I have to use instance variables?
<otters> is there a tool that will print out every function that gets executed
strife25 has joined #ruby
ryh has quit [Remote host closed the connection]
<rking> ddouglas: If you want that variable to access outside of that, you'll want to declare it before the block starts. That way the block "closes" on it and has a reference to it. You wouldn't want random vars leaking out from a block.
<rking> otters: Yeah, there are several.
<ddouglas> that makes sense
<ddouglas> thanks
beneggett has quit [Ping timeout: 244 seconds]
<rking> otters: I'm logging out so I can't search for the exact things, but there's the debugger in trace mode and also you can simply define that one method, set_trace_func or something.
* rking out! Don't forget to vote! ☝
<otters> neato!
RichieEvan has joined #ruby
awarner has quit [Remote host closed the connection]
devdazed has quit [Quit: Computer has gone to sleep.]
Stalkr_ has quit [Quit: Leaving...]
nadirvardar has quit [Remote host closed the connection]
sailias has joined #ruby
greyEAX has quit [Read error: Connection reset by peer]
blazes816 has quit [Quit: Leaving]
savage-_ has quit [Remote host closed the connection]
billiam has quit [Read error: Connection reset by peer]
fermion has quit [Quit: Computer has gone to sleep.]
RichieEvan has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
savage- has joined #ruby
RichieEvan has joined #ruby
RichieEvan has quit [Remote host closed the connection]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
Kamoi has quit [Read error: Connection reset by peer]
Progster has quit [Ping timeout: 260 seconds]
adeponte has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
xaq_ has joined #ruby
xaq_ has quit [Remote host closed the connection]
bier has quit [Ping timeout: 272 seconds]
xaq has quit [Ping timeout: 250 seconds]
ph^ has joined #ruby
headius has quit [Quit: headius]
kjellski has quit [Quit: Leaving]
virunga has quit [Quit: Sto andando via]
maxmmurphy has quit [Quit: maxmmurphy]
blacktulip has quit [Remote host closed the connection]
oscardelben has joined #ruby
manizzle has quit [Ping timeout: 252 seconds]
manizzle has joined #ruby
adeponte has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
workmad3 has joined #ruby
bier has joined #ruby
Maniacal has quit [Quit: Leaving]