Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
tomzx has joined #ruby-lang
Mchl has joined #ruby-lang
macmartine_ has joined #ruby-lang
dejongge1 has joined #ruby-lang
fayimora has joined #ruby-lang
postmodern has joined #ruby-lang
fayimora has joined #ruby-lang
twelvechairs has joined #ruby-lang
m3nd3s has joined #ruby-lang
chimkan_ has joined #ruby-lang
robotmay has joined #ruby-lang
manhunter has joined #ruby-lang
<manhunter> hi
<manhunter> anyone there?
<matti> No.
<manhunter> ./configure
<matti> Shop closed.
<matti> :>
<manhunter> how can i set path to install
<manhunter> ./configure ??
<matti> manveru: ./configure --help
<matti> manveru: ./configure --prefix=<a path>
<matti> Ops.
<matti> TABfail.
<matti> manhunter ...
<manhunter> where is the script to install ruby?
<shevy> manhunter compile it like a man
<shevy> dont be weak
<shevy> run configure
<shevy> then make
<shevy> then make install
<shevy> do it!
<shevy> eww why do you look at RVM?
<matti> shevy: Haha
<manhunter> i need to find out the script of rvm, how they install it
<shevy> I think they are on #rvm
<matti> shevy: You are teh evil.
<shevy> matti only a little bit
<matti> shevy: "Real man don't use --prefix"
<shevy> cuz he is not listening
<matti> shevy: I've noticed.
<shevy> so I am having a bit fun :)
<manhunter> what is --prefix for?
<shevy> for ponies
<shevy> and to specify where to put the things you compile
<shevy> IF you are a real man
<manhunter> problem is i have already libruby1.8 and libruby1.9.1 in my system
<shevy> sounds like debian
<shevy> then you are at your end man
<manhunter> it's debian
<shevy> yup
<shevy> game over
<matti> Haha
* matti is enjoying this.
<manhunter> why game over?
<shevy> because debian wants you to stick to its way
<shevy> that means you must solve problems the debian-way
<shevy> no compilations for you anymore
<shevy> use apt-get and aptitude
<manhunter> i want to install from source
<manhunter> what are the main dependencies to instal ruby from source?
<shevy> no you are in a world of pain my friend
<shevy> debian cripples everything
<shevy> you would first have to uncripple stuff so that you could compile
<shevy> some apt-get *bla*whatever*stupid*name*they*gave*things*dev
<shevy> ruby has very few actual depdencies
<manhunter> are you telling me to remove libruby1.8 and libruby1.9.1 ?
<shevy> zlib usually I'd say
<shevy> oh, I dont recommend anything. remember, this is debian. they built the mess in the first place
<heftig> openssl, libffi, libyaml
<shevy> ah true
brianpWins_ has joined #ruby-lang
<shevy> well, it compiles without libyaml, but psych will then tell you to compile libyaml
<shevy> so yeah install libyaml first http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
<shevy> but remember, you are on debian so DO NOT TRY TO USE THE SOURCE
<manhunter> libyaml is already installed
<manhunter> shevy: why not installing from source?
<shevy> because this is debian. if you keep the old ruby, you are in a world of pain
<shevy> if you remove the old ruby, perhaps ruby will never work again
<shevy> hmm
<manhunter> can i install ruby-1.9.3 to a seperate directory to see if it's installed successfully or not? NOTE: I have already installed system libruby1.8 and libruby1.9.1 and i have other ruby installed with rvm
<shevy> do you have a libruby.so* ?
<shevy> you can install ruby-1.9.3 to a separate directory by using --prefix
<shevy> that's a lot of ruby you got there
<shevy> when you have installed 10 rubys you will get a prize
<manhunter> ./configure --prefix /path/to/directory; make ; make install , is that ok?
<shevy> yes
<shevy> well
<shevy> ./configure --prefix=/path/to/directory
<manhunter> shevy: prize? what prize?
<shevy> the prize of "I have the most rubys installed!!!!"
<shevy> and this prize is coupled with
<shevy> "I have no idea which ruby I am using right now"
woollyams has joined #ruby-lang
<manhunter> why not?
<manhunter> if i install with ./configure --prefix=/path/to/dir then can't i use that ruby from /path/to/dir?
macmartine has joined #ruby-lang
<manhunter> i just ran, ./configure --prefix=/home/myaccount/sepdir ; make ;
<manhunter> it's compiling
<shevy> you can use that ruby
<shevy> you'd either have to call the binary directly (with the full path to it) or modify your $PATH variable so that it is listed first
<shevy> or
<shevy> you can put a symlink at /usr/bin/ruby too
<shevy> but this one probably points to your debian one
<shevy> the /usr/bin/ruby1.8
<manhunter> ok, i understand that
<manhunter> during compiling, i got a line like, Failed to configure fiddle. It will not be installed.
<manhunter> what is that for? is that a problem/error?
<manhunter> during make
<manhunter> ^
<shevy> fiddle?
<shevy> I dont know what is fiddle
<shevy> never had such an error
<shevy> it's best to paste what the error is
<manhunter> during make, i got that, Failed to configure fiddle. It will not be installed.
<manhunter> but it's compiling other files successfully
<shevy> did it continue?
<shevy> I really have no idea what is fiddle
<manhunter> yes, it continues
<shevy> that is usually a good sign
<manhunter> ~MRI
<manhunter> !MRI
<manhunter> MRI = what ruby interpreter?
<manhunter> manveru: MRI
<shevy> matz ruby
<shevy> the main ruby
<manhunter> for the first time i compiled ruby by hand doing, ./configure --prefix=/home/myaccount/sepdir
<shevy> good
<manhunter> Total: 15386 (5195 undocumented)
<manhunter> 66.24% documented
<manhunter> Elapsed: 175.2s
<manhunter> do i have to rung sudo make installl --prefix=/home/myaccount/sepdir too?
<manhunter> or only sudo make install
<shevy> the latter
<shevy> "sudo make install"
<manhunter> ok
<manhunter> it's done
<manhunter> i have installed ruby-1.9.3 by hand for the first time. yahoo
<manhunter> this time i didn't use RVM
<shevy> try to run the irb
<shevy> ./home/myaccount/sepdir/bin/irb
<manhunter> i got these directories there, "bin include lib share"
<shevy> if irb works, chances are high that your compiled ruby will work too
<manhunter> yes, it works, 1.9.2-p180 :001 > 5*8
<manhunter> cd /home/myaccount/sepdir/bin/
<manhunter> ./irb
<manhunter> ./ruby
<manhunter> ./ruby --version = ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
<shevy> yay
<manhunter> but the irb version is 1.9.2, why?
<manhunter> 1.9.2-p180 :001
<shevy> hmmmm
<shevy> that confuses me
<shevy> but you can try systematically
<shevy> in /usr/bin look for all ruby, and test versions. also look for all irb there and test versions
<manhunter> it's empty in /usr/bin, ls -l | grep ruby
<cout> manhunter: iirc the irb shebang line doesn't get fixed up until you do make install
<manhunter> cout: i ran, sudo make install
<shevy> hmm wait
<shevy> there is no /usr/bin/ruby or /usr/bin/ruby1.8 or irb1.8 ?
<shevy> on debian systems those files usually exist by default
<shevy> oh yeah
<shevy> when you find irb, look at the shebang
<manhunter> what is shebang?
<cout> #!
<cout> sharp bang
wmoxam has joined #ruby-lang
<manhunter> what would i do with #! ?
<manhunter> how to do with #!?
<cout> read what it says
<cout> if it points to the wrong interpreter, you'll have found the problem
<shevy> manhunter the first line of irb should show you the shebang it uses
<manhunter> cout: typing #! on terminal i got nothing
<shevy> do "nano /home/myaccount/sepdir/bin/irb"
<shevy> or vim. or head ... or cat
<shevy> Unix - one million ways to do the same thing
<manhunter> #!/home/myaccount/sepdir/bin/ruby
<manhunter> #!/home/myaccount/sepdir/bin/ruby is the first line of /home/myaccount/sepdir/bin/irb
<manhunter> shevy: cout ^
<cout> hmm.
<manhunter> so any problem?
<cout> how are you getting the version from irb?
<shevy> manhunter well
<shevy> then irb should show the version of "/home/myaccount/sepdir/bin/ruby -v" too
<manhunter> ./irb --version
<manhunter> irb 0.9.6(09/06/30)
<cout> oh
<manhunter> but ./irb has this prompt, 1.9.2-p180 :001 >
<cout> weird
<shevy> and /home/myaccount/sepdir/bin/ruby -v shows what version?
<cout> it should say irb(main) instead of 1.9.2-p180
<shevy> also in IRB do puts RUBY_VERSION
<manhunter> cd /home/myaccount/sepdir/bin; ./irb --version = irb 0.9.6(09/06/30) , ./irb = 1.9.2-p180 :001 >
jxie has joined #ruby-lang
<manhunter> 1.9.2-p180 :001 > puts RUBY_VERSION = 1.9.3
vdrab has joined #ruby-lang
<manhunter> => nil
<shevy> no
<shevy> puts RUBY_VERSION
<shevy> I did not say anything about using = 1.9.3
<manhunter> 1.9.2-p180 :001 > puts RUBY_VERSION
<manhunter> 1.9.3
<manhunter> => nil
<shevy> ????
<erikh> do you have a ~/.irbrc
<erikh> are you using rvm?
<shevy> well, whatever it is, I think it knows that it is the right version to use
<manhunter> erikh: no
<erikh> you aren't using rvm at all
<erikh> it isn't loaded on your system at all.
<manhunter> but i have another ruby installed by RVM
<erikh> right.
<erikh> ok
<erikh> fun time with environment variables
<cout> manhunter: do you have a $RUBYOPT set?
<erikh> you need to get your rubies managed better.
<shevy> hehe
<shevy> I told him!
<shevy> shevy> "I have no idea which ruby I am using right now"
<shevy> that will be his famous quote
<erikh> well beating him about isn't going to help
<erikh> anyhow -- stick to one thing. either you use individual compiles, rvm, rbenv, whatever
<erikh> just pick one thing and stick to that.
<erikh> they all piss and moan in their own unique ways and you're creating a mess having them all mixed in like that.
<erikh> rvm injects its own .irbrc's
<manhunter> cout: echo $RUBYOPT displays nothing
<erikh> to add the prompt with the version in it.
<manhunter> but , cd /home/myaccount/sepdir/bin; ./ruby --version = ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
<manhunter> that is ok
<manhunter> if i do , ruby --version = ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] , this is the RVM ruby
<erikh> you're missing hte point. rvm messes with more than your rubies
<erikh> right
<manhunter> yes
<erikh> that's what's showing up in your prompt, right?
<erikh> that's because rvm messes with a part of irb.
<erikh> hence my comment about sticking to one thing -- you're making this harder on yourself.
<manhunter> erikh: but ./ruby --version show the correct version of ruby
<cout> oh that makes sense
<manhunter> erikh: problem is with only irb
<erikh> arguing in circles doesn't change anything
<manhunter> so what to do to get the irb i just installed from source?
<erikh> if you really want to fix it, you'll either have to remove rvm or have rvm install that ruby for you
<erikh> I'm not giving you the command to do that because I don't have children for a reason
<manhunter> i can't remove RVM,
<cout> erikh: so it sounds like rvm is slightly confused as to which version of ruby manhunter is running, and rvm's modifications to the .irbrc file result in an incorrect prompt?
<manhunter> i need that RVM too
<erikh> cout: exactly
seanstickle has joined #ruby-lang
<manhunter> where is the .irbrc?
wmoxam has joined #ruby-lang
<erikh> manhunter: it swaps them out depending on what version of ruby you're using
<erikh> that rvm thinks you're using, that is
<erikh> this *will not* work the way you want it to
<erikh> so, rvm implode or rvm install 1.9.3 and use that copy of 1.9.3
<cout> that sounds like a bug IMO
<erikh> cout: it's not, it's rvm
<manhunter> cout: bug for what?
<erikh> rvm takes over your whole shell environment
<cout> surely there's a better way to inject settings than modifying a user's config files
<manhunter> cout: is it RVM bug?
<erikh> cout: you can modify them them per-ruby
<erikh> IIRC, it just shuffles a symlink.
<manhunter> erikh: how?
<erikh> manhunter: rvm.beginrescueend.com
<erikh> go read.
<rue> cout: There isn't a better way to inject *permanent* settings
<cout> erikh: I can already do that without using rvm
<cout> if RUBY_VERSION == '...' then ...
<rue> I think there was some talk about letting the user add the requires if they want (but since pretty much everyone does…)
<erikh> there is the capability to do it
<cout> rue: maybe I just don't like it because it's not the way I would have implemented it :)
<rue> How would you have done it?
zmack has joined #ruby-lang
Karmaon has joined #ruby-lang
<erikh> cout: that's all fine and dandy until you deal with something that doesn't parse in 1.8
<cout> rue: (and I always implement it the best way, of course)
<erikh> heheheh
<cout> erikh: if RUBY_VERSION =~ /^1\.9/ then require '.irbrc-1.9' end
<erikh> ok, fair
<cout> erikh: basically I would have solved the problem by monkey patching irb to load a different (or both) config files
<cout> which I guess carries its own set of problems
<erikh> yep
<erikh> rvm gets enough shit for what it does to ruby already
<manhunter> how can i get the irb-1.9.3?
<erikh> did you read about rvm yet?
<manhunter> i installed ruby from source and have RVM ruby
<erikh> yes
<cout> (actually I would never have thought to write rvm in the first place, because ./configure --program-suffix= or in some cases ./configure --prefix= is sufficient for what I need to do)
Karmaon_ has joined #ruby-lang
brownies has joined #ruby-lang
<shevy> I told him he is in a world of pain
<erikh> yeah I don't believe he's going to listen to anything we say
wmoxam has joined #ruby-lang
<erikh> but he keeps making my irc client jingle so it's hard to ignore
<shevy> lol
<manhunter> erikh: whereis irb = irb:
<cout> jingle?
<erikh> yep
<cout> erikh: like this?
<erikh> pretty much
<manhunter> erikh: but if if use this, IRB.conf[:PROMPT_MODE] = :DEFAULT in .irbrc
<erikh> probably will do what you want
<manhunter> erikh: then i see , whereis irb = /home/myaccount/.rvm/rubies/ruby-1.9.2-p180/bin/irb
<cout> yeah
<erikh> that's becaues
<erikh> for the last time
<erikh> rvm messes with your shell
<manhunter> erikh: but if if use this, IRB.conf[:PROMPT_MODE] = :DEFAULT in .irbrc , then i see, whereis irb = /home/user1/.rvm/rubies/ruby-1.9.2-p180/bin/irb
<erikh> that has nothing to do with IRB
andkerosine has joined #ruby-lang
<erikh> that has to do with your system path
<erikh> which rvm manipulates
<manhunter> erikh: if i dont use ~/.irbrc which irb does the system use?
<erikh> you're confusing two topics
<erikh> how long have you been using unix?
<manhunter> shy
<cout> my guess it not long if he didn't know what a shebang is
<manhunter> erikh: if i use .irbrc and then if if type irb, i get , irb(main):001:0>
<erikh> yes
<erikh> but...
<erikh> answer the question please
<shevy> haha
<manhunter> erikh: which question?
<erikh> you have some learning to do before you get to this point
<erikh> how long have you been using unix:
<rue> erikh: bells
<erikh> rue: die
<rue> erikh: all the way
<manhunter> erikh: how long have you?
<erikh> a while.
<cout> lol rue
<erikh> long enough to know what your problem is
<shevy> stop jingling with erikh!
<manhunter> erikh: i know you are pointing me to the path problem , right?
* cout was borne with Bourne shell syntax as a birthmark on his right buttcheek
<erikh> point is, you need some time to learn your system before this will make sense to you
<shevy> some things are best kept a secret
<erikh> are you more familiar with windows?
<erikh> ruby has windows versions.
<manhunter> erikh: i'm also using linux for a while
<manhunter> using ruby on windows is more painfull
<erikh> you are intentionally making this harder on yourself by insisting you use a separate compile along with rvm.
<erikh> now, I can't really help you anymore -- either kill rvm or your compile. you pick.
<cout> I agree
<cout> manhunter: can you use two different user accounts, one for rvm and one for this other install?
<manhunter> cout: ah, that's another option,
<manhunter> cout: good
QaDeS_ has joined #ruby-lang
<twittard> Test::Unit fans, question: It seems that "_wrap_assertion" was deprecated as of ruby 1.8.7. What was it replaced with?
<manhunter> when would we get ruby-2.0 ?
<shevy> you have to ask matz
<cout> manhunter asked the rite question :)
SuperTaz_work has joined #ruby-lang
<twittard> Seems like it'll happen around Christmas, either this year or next.
<twittard> I'm sure ruby-core is furiously writing C. lulz.
andrewhl has joined #ruby-lang
<cout> twittard: we thought that 8 years ago too
<shevy> hehehehe
<cout> personally I like the Duke Nukem Forever strategy
<twittard> DNF is out.
<twittard> Ruby 2 and Perl 6 are in furious competition
<manhunter> cout: :)
<manhunter> twittard: yes
slimfit has joined #ruby-lang
<manhunter> cout: Duke Nuke??
<twittard> Anyone know much about Test::Unit? I'm trying to fix up a library that was written for Ruby 1.8 .. to run in 1.9.
<twittard> It's using "_wrap_assertion" but that method was deprecated as of 1.8. I don't even know why it exists, tbh.
<twittard> Hmm, I just commented them out and I have more tests passing than before.
<twittard> Looks like it was just decoration. Moving along.
manhunter has quit ["WeeChat 0.3.6"]
<twittard> Sweet. Who knew that deleting stuff could make tests pass.
<shevy> lol
<shevy> I should really start a collection of quotes from #ruby-lang
<twittard> @shitrubyistssay
<rue> chris2 had a collection at some point, or maybe that was just on Anarchaia
nedbat has joined #ruby-lang
twelvechairs has joined #ruby-lang
Roujo has joined #ruby-lang
<Harzilein> hmm
<Harzilein> does pp not include a way to print the object name as well?
<twittard> object name? you mean, class?
<twittard> If it's a class, it'll respond to .name.
SuperTaz_work has joined #ruby-lang
<twittard> If it's an instance, call .class.
<twelvechairs> object_id?
<Harzilein> twittard: i mean that i want pp to print the instance name as well (it's a simple hash)
<Harzilein> twittard: not how to determine the instance name
<heftig> instances don't have names
<twittard> right
<twittard> You can dump out the object_id if you care
<heftig> a = Object.new; a is just the name of a variable referencing the object
<heftig> it's not a property of the object itself
<deryldoucette> there was a way someone showed me to show that difference in irb, and i forget how he did that
<Harzilein> i want to set pp up so it when i run foo = { fooblah: "bar" } ; pp foo it prints foo = {:bar=>"baz"} where it now prints just {:bar=>"baz"}
<Harzilein> should be easy to understand what i want
<heftig> puts "foo = #{foo.inspect}"
<Harzilein> -it
<twittard> You'll have to do that yourself.
<Harzilein> heftig: -.-
<deryldoucette> Harzilein: pp doesn't do that
<twittard> puts "foo = #{foo.pretty_inspect}"
<twittard> I know what you're asking, but it's just not common for languages to support this.
<Harzilein> deryldoucette: that's why i want to set my object up so pp _does_ print the name.
andrewhl has joined #ruby-lang
<deryldoucette> Harzilein: umm, see what twittard said
<Harzilein> twittard: not common?:
<deryldoucette> and heftig
<twittard> Harzilein: Perl, Python, Ruby, etc, do not bind the name of an object to the instance of the object.
<Harzilein> well, i would accept references
<twittard> You can go `a = b = "foo"` etc. You can pass the object around all over the place. 'a' and 'b' are only for your reference.
<heftig> def xp(var, &blk); puts "#{var} = #{blk.binding.eval(var.to_s).pretty_inspect}"; end
<twittard> accept references?
<heftig> xp(:foo){}
<heftig> still ew.
<twittard> What you are asking for just doesn't have any value in a programming language. It'd be a complicated mess to implement, and would end up slowing down the language.
<twittard> Besides that, when you call "pp" on something, you know what the name is anyway.
takaokouji has joined #ruby-lang
<twittard> Programming is hard, let's go shopping.
<Harzilein> twittard: if i call pp on lots of things i _won't_ know it
<Harzilein> twittard: say i have a variable number of times a loop gets called, i cannot be sure the 20th call to pp will be the 20th occurence of pp
havenn has joined #ruby-lang
<twittard> Yes you can
<heftig> which is why you should make your debug output more readable
<twittard> .each_with_index, for example.
hexo has joined #ruby-lang
<erikh> Data::Dumper does not suss out the variable name
<erikh> you tell it what you want
<erikh> otherwise it emits $VAR1
<erikh> (where 1 is replaceable by how many objects you have in the list)
<twittard> But never mind all this. Write tests for your code so you're not doing some retarded debugging.
<twittard> Harzilein: Also look at Pry. It's quite handy if you're doing stuff interactively.
hexo has joined #ruby-lang
twittard has joined #ruby-lang
neoesque has joined #ruby-lang
<Harzilein> <twittard> puts "foo = #{foo.pretty_inspect}"
<Harzilein> twittard: wouldn't that get the indent all wrong?
<twittard> I'm not sure.
<twittard> Can you elaborate on what you actually want to do and why?
<Harzilein> well, basically when i take care to format my stuff pretty on the input i want to have the output be pretty as well
<Harzilein> (this is just a rails script fetching some stats from the database)
<twittard> It'll look fine in pretty_inspect.
<Harzilein> uh, nvm the perl comparison. that Data::Dumper::Simple used source filters. ick.
RomyRomy has joined #ruby-lang
macmartine has joined #ruby-lang
gregf has joined #ruby-lang
WillMarshall has joined #ruby-lang
desireco has joined #ruby-lang
<postmodern> why doesn't Enumerable#select! return self, so it can be chained with other method calls?
<twelvechairs> postmodern: errr. 'self'? It does return the object that is being changed. doesnt it?
<andkerosine> It does.
<twelvechairs> postmodern: a=[1,2];a.select{|b|b==2}==a # returns true
<twelvechairs> postmodern: a=[1,2];a.select!{|b|b==2}==a # returns true
<twelvechairs> i mean
<andkerosine> (1..10).select(&:even?).reduce(:+) #=> 30
kfed has joined #ruby-lang
<postmodern> twelvechairs, [1,2,3].select! { |i| i } # => nil
<kfed> Can I ask for support here?
<andkerosine> ...
brianpWins has joined #ruby-lang
<kfed> I'm trying to run a gem I installed. It keeps telling me to install FXRuby. FXRuby is already installed, and is listed when I run gem q -l
WillMarshall has joined #ruby-lang
<twelvechairs> postmodern: what are you trying to select?
<postmodern> twelvechairs, idk just was curious why it returns nil
dRbiG has joined #ruby-lang
<twelvechairs> postmodern: i never run across this before, but looks like it is because of no change to the original array
<postmodern> twelvechairs, ah your right
justinmcp has joined #ruby-lang
wyhaines has joined #ruby-lang
<Harzilein> meh
<Harzilein> "unknown regexp options - www"
<Harzilein> what a weird error message
wyhaines_ has joined #ruby-lang
<twelvechairs> postmodern: its in the docs. http://ruby-doc.org/core-1.9.3/ENV.html#method-c-select-21 . You can use 'keep_if'
hexo has joined #ruby-lang
<ryanf> Harzilein: "//www" ?
rippa has joined #ruby-lang
Xzyx987X_ has joined #ruby-lang
igotnolegs has joined #ruby-lang
bougyman_ has joined #ruby-lang
dvorak_ has joined #ruby-lang
twittard has joined #ruby-lang
t0h has joined #ruby-lang
jammi has joined #ruby-lang
rhizmoe has joined #ruby-lang
gentz has joined #ruby-lang
brianpWins has joined #ruby-lang
lsegal` has joined #ruby-lang
s0ra_h has joined #ruby-lang
rtl has joined #ruby-lang
benteaa has joined #ruby-lang
frequency9 has joined #ruby-lang
Gekz has joined #ruby-lang
TTilus has joined #ruby-lang
Bwild has joined #ruby-lang
wmoxam_ has joined #ruby-lang
jkprg has joined #ruby-lang
rushed has joined #ruby-lang
krz has joined #ruby-lang
WillMarshall has joined #ruby-lang
rohit has joined #ruby-lang
hexo has joined #ruby-lang
dfr|mac has joined #ruby-lang
brownies has joined #ruby-lang
hexo has joined #ruby-lang
bryancp has joined #ruby-lang
Karmaon has joined #ruby-lang
macmartine has joined #ruby-lang
jakko has joined #ruby-lang
erpuds has joined #ruby-lang
andkerosine has quit [#ruby-lang]
x0F_ has joined #ruby-lang
brianpWins has joined #ruby-lang
robbyoconnor has joined #ruby-lang
artOfWar has joined #ruby-lang
jakko has joined #ruby-lang
bougyman_ has joined #ruby-lang
macmartine has joined #ruby-lang
havenn has joined #ruby-lang
yxhuvud has joined #ruby-lang
thio has joined #ruby-lang
jakko_ has joined #ruby-lang
Karmaon has joined #ruby-lang
thio has quit [#ruby-lang]
amerine has joined #ruby-lang
lsegal has joined #ruby-lang
muzone has joined #ruby-lang
thone_ has joined #ruby-lang
Defusal has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
JohnBat26 has joined #ruby-lang
fayimora_ has joined #ruby-lang
vdrab has joined #ruby-lang
havenn has joined #ruby-lang
gianlucadv has joined #ruby-lang
h4y4shi has joined #ruby-lang
<h4y4shi> whats the difference between a class variable @@foo and an instance variable @foo
<rippa> h4y4shi: @@foo is class variable
<rippa> and @foo is instance variable
<rippa> don't use class variables
<Mon_Ouie> Class variables are shared with a class, its instances, and its subclasses
<Mon_Ouie> And the scoping rules from them is kind of similar to those that apply with constants
<Mon_Ouie> for them*
<h4y4shi> Thanks
pp01bit has joined #ruby-lang
hexo has joined #ruby-lang
macmartine has joined #ruby-lang
davidw has joined #ruby-lang
bjensen has joined #ruby-lang
nanothief has joined #ruby-lang
<nanothief> If I have a string like "one two \"word three\" 'word four'", what would be the easiest way to convert that to ['one', 'two', 'word three', 'word four']?
mytrile has joined #ruby-lang
macmartine has joined #ruby-lang
vdrab has joined #ruby-lang
cmatheson has joined #ruby-lang
<TTilus> nanothief: .gsub(/["']/, '').split
<Mon_Ouie> I'd use delete '"\'' over gsub
<Mon_Ouie> But it doesn't look like your solution would work anyway
<Mon_Ouie> I'd use Shellwords.split (after require 'shellwords'), because I'd be too lazy to do it myself
<TTilus> nanothief: uh, sorry, better use .scan /\S+|"[^"]+"/
<epitron> hmm.. is there an easy way to make a Singleton class automatically redirect class methods to instance methods?
<Mon_Ouie> That works, as long as you don't have escaped quotes inside the quoted words
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
<epitron> like, MySingleton.method -> MySingleton.instance.method ?
<Mon_Ouie> method_missing?
<epitron> haha
<epitron> that seems a bit crude
<TTilus> nanothief: shellwords would be best as Mon_Ouie said
<epitron> i guess that would work tho :)
<Mon_Ouie> Other solutions I can think of would involve changing the code that defines the method
<Mon_Ouie> Like using a method that you pass a block to and automatically defines the proxy method, or calling def_delegator (or similar) after each method
<Asher> would would you have instances of a singlteton class
<Asher> do you just mean redirect class methods to instance methods?
<Asher> how does it know which instance?
<epitron> so ruby's stdlib has a mixin called Singleton
<epitron> and MyClass.instance always returns one instance of that class
<epitron> the same one
<epitron> it's magic :D
<Asher> yea why would you use that lib instead of just a module
<epitron> that question doesn't make sense to me
<Asher> a module is already a singleton
<Asher> that you can't create additional instances of
<epitron> i don't want additional instances
<Asher> exactly
<epitron> oops, misread :)
<Asher> so what does the singleton mixin do
<Asher> that using a module doesn't
<epitron> but how would i use the module?
<Asher> Module.method
<epitron> but then i'd have to make class methods for everything
<Asher> MyModule.method
<Asher> so?
<epitron> and how would i store ivars?
<Asher> in the obj
<epitron> well, it's ugly!
<Asher> why's it ugly
<Asher> use a mixin to define your methods
<epitron> def self.everything
<Asher> so use a module to define methods and extend your singleton
<Asher> that's better practice anyway
<epitron> o_O
<Mon_Ouie> And in that case, do *not* use module_function
<Mon_Ouie> Because presumably your methods will rely on self if you thought about using Singleton in the first place
<Mon_Ouie> Which means "include Foo; bar" wouldn't do the same thing as "Foo.bar"
<Asher> doesn't the singleton mixin create an instance of your singleton class
<Asher> so it actually ends up with a doubleton?:P
<epitron> i assume .instance is like: @instance ||= self.new
<epitron> i didn't look at the code
<Mon_Ouie> More like @instance ||= new, they make new a private method
<epitron> ok :)
<epitron> i still don't see how using a module is nicer
<epitron> like, one nice thing about the singleton is that i have an initialize method that gets run after the whole app has loaded
<epitron> when the singleton is first accessed
<epitron> instead of a module, where i'd need an .init method or something
<epitron> lemme make it more concrete
<epitron> i have a global Settings class that loads a config
<epitron> for testing, it can be instantiated manually
<epitron> with special parameters
<Mon_Ouie> You don't need an init method
<Mon_Ouie> Well, that depends, actually
<epitron> i need to load the configfile :)
<Mon_Ouie> Sometimes you can just call it in the module body
<epitron> if i did that, then i couldn't test it
<epitron> the configfile would be hardwired
hexo has joined #ruby-lang
<epitron> i suppose i could be like, Settings.load
<epitron> or Settings.load("otherfile")
<epitron> that's a bit weird though, because if something tried to access it before it was loaded.. it would break
<epitron> it's a global class, see
<nanothief> Mon_Ouie: Shellwords.split is exactly what I wanted, thanks!
Para has joined #ruby-lang
wmoxam has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
<Asher> you can always test stuff in the module/class body by using #clone
apeiros_ has joined #ruby-lang
Jade has joined #ruby-lang
rue has joined #ruby-lang
<rue> Testability is probably better
<epitron> is testability a gem? :)
tbuehlmann has joined #ruby-lang
Aaaarg has joined #ruby-lang
rohit has joined #ruby-lang
<epitron> rue: i'm not sure what you meant there
mssola has joined #ruby-lang
workmad3 has joined #ruby-lang
Aaaarg has joined #ruby-lang
ged_ has joined #ruby-lang
mtkd has joined #ruby-lang
Para has joined #ruby-lang
solars has joined #ruby-lang
Aaaarg has joined #ruby-lang
chendo has joined #ruby-lang
gokul has joined #ruby-lang
bubonicpestilenc has joined #ruby-lang
Para has joined #ruby-lang
Aaaarg has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
davidw has joined #ruby-lang
vdrab has joined #ruby-lang
Aaaarg has joined #ruby-lang
shajahan has joined #ruby-lang
dreinull has joined #ruby-lang
pp01bit has joined #ruby-lang
jtoy has joined #ruby-lang
workmad3 has joined #ruby-lang
ged__ has joined #ruby-lang
<jtoy> what simple way is there do to get a new hash from an old hash with keys you selected
yugui_zzz has joined #ruby-lang
<jtoy> like hash.pick(:foo,:bar)
<apeiros_> jtoy: if you use activesupport: Hash#slice
<apeiros_> if you don't: Hash[keys.zip(hash.values_at(*keys)]
<jtoy> apeiros_: currently I am, although I wish i wasn't, thx
<apeiros_> adding the missing ) is left as an exercise to the reader…
<jtoy> Hash[keys.zip(hash.values_at(*keys))]
<apeiros_> exercise completed
<apeiros_> advance to level 4
<Asher> is there a good way to start iterating a hash or array from a key/index in the middle?
<apeiros_> which of the questions do you want answered?
<apeiros_> (they're unrelated)
rohit has joined #ruby-lang
<Asher> then both i suppose
<apeiros_> Asher: what's the middle index of an array with 4 items?
<apeiros_> also: there's no efficient way to do it with hashes, also before ruby 1.9, there technically is no *middle* of a hash (as they're unordered)
<Asher> oh i just meant
<Asher> items not first or last
<Asher> and 1.9 is current ruby fuck 1.8 :P
<Asher> so hashes are ordered
<Asher> so like say i want to iterate from index #2 to the end of array
<apeiros_> ary[2..-1].each
<Asher> should i just slice it?
<Asher> ok
<apeiros_> hash.each.drop(hash.size>>1).each { …
<Asher> does using the range like that avoid duplicatin gthe array?
<apeiros_> oh, you don't need the first .each
<apeiros_> hash.drop(N).each …
<Asher> but drop will remove them right?
<apeiros_> no
<manveru> moin folks
<apeiros_> drop will drop them from the iteration
<Asher> by creating a second array
<Asher> ok
<apeiros_> no
<apeiros_> by not yielding them during the iteration
<Asher> yeah ary[range] creates a new array too
<apeiros_> .drop(N) has O(1) memory consumption, unlike hash.to_a which uses O(n) memory
<Asher> ok thanks
<apeiros_> there's no "too"
<apeiros_> the two work differently. there is *no* temporary array being created with Enumerable#drop
<Asher> docs for Array#drop suggests there is
<Asher> that's wrong?
<apeiros_> …moment
<apeiros_> wow… ok, I stand corrected
<apeiros_> that's fucked.
<apeiros_> you're correct. drop creates an array. I expected it to return an Enumerator
<Asher> i guess it creates a new array obj but can create a slice without copying anything until it changes
* apeiros_ thinks that was a stupid choice…
<manveru> it's non-destructive?
<apeiros_> returning an enumerator wouldn't be destructive either
<apeiros_> it'd also scale quite a bit better…
<manveru> returning a slice doesn't take any more memory, i think
<apeiros_> only true if you already have an array
<apeiros_> which ain't a given for Enumerable#drop
<manveru> oh, it's on Enumerable?
<apeiros_> yes
<manveru> well then :)
<manveru> dunno, i never use that method
<manveru> but you're right of course, there's no need to return an array
* apeiros_ must finish his stupid language
<apeiros_> where I can avoid those stupid things and make other stupid mistakes instead!
fayimora has joined #ruby-lang
<apeiros_> *sob* but I'm still looking for a good object-literal there :-S
<apeiros_> s/looking/searching/
<apeiros_> trying to come up with?
|Vargas| has joined #ruby-lang
knu has joined #ruby-lang
<Asher> object literal?
<manveru> hm
<manveru> this is weird
<apeiros_> a literal for Object instances
<apeiros_> like javascripts {}
<Mon_Ouie> Like class, and a set of ivars-value pairs?
<apeiros_> Mon_Ouie: correct
<manveru> e = [1,2,3].to_enum; e.next; e.each{|v| p v } # => 1 2 3
<dominikh> he's looking for syntax for his own language :P
<apeiros_> atm. I'm pondering [@foo => val] for Object and Classname[@foo => val] for everything else
<manveru> i would've thunk this would continue iterating from the position after next
<manveru> apeiros_: as long as you don't use => :)
<cout> apeiros: why do you think this is a good feature for a language?
<apeiros_> manveru: d'oh, actually I use :, true
<manveru> apeiros_: you looked at fancy yet?
<apeiros_> cout: it makes a couple of things pretty easy.
<cout> apeiros: but at what expense?
<apeiros_> manveru: no. I usually click the links you send me… must have missed that one
<cout> IMO it's too pythonic (everything is a dictionary vs. everything is an object)
<apeiros_> cout: potential issues from not invoking the initialization, also it means some characters are reserved for that syntax
<apeiros_> something being "pythonic", "rubyish" or "lispy" or whatever is no measure I care about.
Spooner has joined #ruby-lang
<apeiros_> either it has a use, makes sense etc., or it doesn't. so the question "at what expense" is spot on. being "pythonic" ain't.
<cout> give me a better adjective then
<manveru> well, it's been all tried before
<apeiros_> it's not a matter of the adjective used
<cout> I couldn't think of one, which is why I qualified "pythonic" with what followed in parens
<manveru> everything is an (object|string|table|dict|array|list)
<apeiros_> being similar to X is not a rationale in favor or against something.
<manveru> what's left?
<cout> apeiros: again, you're not understanding what I attempted to say
<apeiros_> manveru: actually I only distinguish between 2 things: code & data
<apeiros_> so everything is either data, or code
<manveru> oh, and haskell with everything is a strange mathematical formula nobody really understands
<apeiros_> though, code has a data representation
<apeiros_> cout: ok, please retry then, I'm listening :)
<manveru> hmm, and C, with everything is an int
dejongge has joined #ruby-lang
<cout> apeiros: being able to initialize an object like that seems like a feature that is best suited for a dictionary-based language (of which python is the best example I know of)
<Asher> i like the idea that everything is an object and a function
<Asher> from _why
dreinull has joined #ruby-lang
<manveru> potion and io?
<cout> apeiros: I haven't thought it through to the end, but that's my first impression when I think about it
<Asher> didn't realize io did that too
<Asher> but potion yea
<manveru> i like agora, with everything is a message
<manveru> but that language went extinct
<apeiros_> cout: you can look at rubys objects as dicts too
<apeiros_> ivar names are the keys, and their values are, well, their values
<apeiros_> the distinction between scalars and lists is sometimes difficult
<apeiros_> you can look at an rgb value as a single integer, or as a structure of 3 values, which could be either an array or a dict… etc.
<cout> apeiros: you can look at ruby that way, but ruby doesn't expose the dictionary as bluntly as python
<apeiros_> it's not hard to get there, though
<apeiros_> cout: anyway, so far I'm missing the rationale - you seem to imply that it's a bad thing. but why is it?
<cout> apeiros: not bad in terms of pragmatism, just in terms of style
<apeiros_> ok, what makes it bad style then?
* cout scratches head
<cout> I don't mean to say that it is "bad style"
<cout> I just believe in coherent/consistent style
<cout> and since I don't know exactly what you are building, I can't say whether that feature is coherent/consistent with regard to everything else you've constructed
<cout> so I'm not saying it's "bad", just that it needs thought (and I believe you've already thought about it)
<apeiros_> ok
<apeiros_> some of that has to show itself when I can finally use the language. may well be that I drop/change a lot of features then :)
<cout> :)
<apeiros_> but so far it'd be consistent with the language being very rich in literals already
<cout> hmm.
<apeiros_> but granted, I actually only wanted it for "Object" (the base object class), and the "for other classes" came as an afterthought and may very well be feature-bloat
<manveru> you'd do that differently?
<manveru> that should be a bit faster
Faris2 has joined #ruby-lang
<apeiros_> nice
<apeiros_> I haven't used Generator yet. I really should…
<apeiros_> until count.zero? :)
<apeiros_> or: count.times do enum.next end
<apeiros_> hm, can't rewind a generator?
canton7 has joined #ruby-lang
<manveru> generator is just a fancy wrapper for fiber
<apeiros_> now you can infinitely chain .each's there
Karmaon has joined #ruby-lang
<manveru> now you can run out of stack
Nss has joined #ruby-lang
<apeiros_> just one more way to shoot your foot…
<manveru> lovely
andkerosine has joined #ruby-lang
<andkerosine> There's got to be a better way to write this while still avoiding the problem of json['json'] sometimes being nil.
<manveru> use fetch and rescue the KeyError :)
<manveru> or don't rescue, if you can afford to
<andkerosine> Gotta rescue.
<andkerosine> reddit returns an informative JSON error message, and it makes sense to show that to the user.
priteshjain has joined #ruby-lang
<manveru> yeah
<manveru> i mean if there is no error
publicvoid__ has joined #ruby-lang
<andkerosine> Well, it's tricky, because even if there's no error, the JSON still contains an empty "errors" array.
bosie has joined #ruby-lang
<andkerosine> #fetch isn't sufficient, then, right?
<manveru> so there's always an errors key?
<andkerosine> Nope. : /
<andkerosine> Only for some API calls.
<andkerosine> Usually, a successful POST request just returns an empty hash.
<manveru> oh nice
<andkerosine> Mine /feels/ like the best way to cover everything, but it also smells, given the repetition.
<manveru> so you can check if it's empty first, otherwise expect it to have that?
<andkerosine> Hm?
<andkerosine> Sometimes it won't exist, sometimes it'll exist and be empty, and sometimes it'll exist and contain information.
<andkerosine> The error should only throw in the last case.
<manveru> yeah
<andkerosine> Can't execute .empty? on nil?
<manveru> no
pemeon has joined #ruby-lang
<manveru> there are lots of too fancy ways to handle that
<andkerosine> I try for compact readability.
<manveru> if (res = json['json']) && (errors = res['errors'])
<manveru> raise RedditError, jj(json) unless errors.empty?
<manveru> end
<manveru> something like that
<andkerosine> Ah, brilliant.
<manveru> if (res = json['json']) && (errors = res['errors']) && errors.any?; raise RedditError, jj(json); end
<manveru> maybe that even
<manveru> neither very nice
<manveru> if you do that a lot, you can make a helper
<andkerosine> One-time.
<andkerosine> Every request goes through the same method.
<andkerosine> That's why I'm trying to generalize it.
<manveru> ok
<andkerosine> Thanks much.
chendo has joined #ruby-lang
rohit has joined #ruby-lang
<manveru> that's another way :)
<manveru> just for fun
<whitequark> > RedditError
* whitequark freezes
<andkerosine> ?
<andkerosine> manveru: Looks pretty intense.
Stalkr_ has joined #ruby-lang
nedbat has joined #ruby-lang
mosca_ has joined #ruby-lang
virunga has joined #ruby-lang
<andkerosine> Hm... where to put a comment explaining the next few methods that doesn't get set as the description for the first method encountered by rdoc?
m3nd3s has joined #ruby-lang
<whitequark> andkerosine: in the class description
<shevy> andkerosine I never allowed rdoc to decide how I comment and describe ruby code
<shevy> unfortunately as my code changes, documentation also has to change, and it's not a lot of fun to maintain a changing documentation :(
* manveru doesn't write docs
<manveru> ppl gotta learn how to read code
<shevy> hehe
<shevy> well
<shevy> I always try to have a good tutorial
<andkerosine> ^
<andkerosine> I think I might be commenting this current project a bit excessively, though.
<shevy> and I mean also with some explanations that go over it, like design choices here or there, or conventions for a project (and why)
<Asher> manveru - and this is why you refuse to learn C?:P
<manveru> Asher: i refuse to _write_ C
<Asher> oic
<manveru> i can read it well enough for my uses
<Asher> fair enough :)
<Asher> i was just giving you shit
<manveru> just don't wanna inflict even more C on this world
<whitequark> ^ that
<whitequark> there is a reason libcurses was called like that
<whitequark> C should have been given a similar name
<shevy> man
<shevy> C code can be beautiful
<shevy> but *curses has the worst API ever
<manveru> > The name is a pun on the term “cursor optimization”. <
<manveru> well, or that :)
<whitequark> shevy: "beautiful" as in "burning people to make funny ash patterns"? yes.
<whitequark> you also think that autotools are sane and reasonable, don't you?
<shevy> whitequark I like some code, like http://paco.sourceforge.net/
<shevy> nope
<shevy> autotools must die
<shevy> cmake too
<Asher> what's wrong w/cmake?
<shevy> but it has colours at least
Karmaon has joined #ruby-lang
<Asher> other than requiring cmake
<shevy> Asher, that you don't get any real control over compilation as end-user
<Asher> what sort of control do you want
<shevy> --disable-this --enable-that
<Asher> err.. doesn't cmake make that super easy
<shevy> how? When you are in a project with a CMake* file, how do you do this specifically?
<whitequark> shevy: err, that's C++
<shevy> whitequark, is it???? :(
<Asher> well how do you do it at all unless you know the internals of the source?
<Asher> presumably it's up to the package maintainer to make it possible to disable portions
<Asher> cmake is intended for facilitating that
<shevy> damn
<shevy> .cc files
<whitequark> shevy: if C should have been called "A" from "Abomination", C++ is "EA" from "Evil Abomination".
<cout> cmake feels obscure and awkward to me
<whitequark> cout: compared with autotools?
<shevy> Asher well but how do you do it? I mean with configure based systems, I can do "./configure --help" and get lots of options, how can I do the same in cmake, and how can I then use any of these options?
QaDeS has joined #ruby-lang
<cout> whitequark: yes, even compared to autotools
<Asher> whitequark - like EA sports?
<shevy> the only thing I found out so far was to use prefix in cmake :P
<cout> at least with autotools you get some decent documentation
benanne has joined #ruby-lang
* whitequark slowly moves aside from cout
<shevy> whitequark man ... this is really C++ :(
<shevy> then I no longer know of any cool C project
<shevy> stupid C
<cout> MRI is written in C :)
<whitequark> that doesn't make it any better
<whitequark> more like the opposite
<cout> whitequark: you don't like MRI?
<whitequark> no
<cout> whitequark: then you don't like Ruby :P
<Asher> shevy - i don't know offhand but everything i've done w/cmake has been easy and that would shock me not to be there
<whitequark> bzzt wrong
<whitequark> MRI is slow and obscure at least
<whitequark> you can't argue with "slow"
<cout> whitequark: I can argue with a stop sign.
seanstickle has joined #ruby-lang
<shevy> well, slow
<whitequark> and for "obscure", let me ask you for a feature and we'll see how long would it take you to find the necessary lines in MRI sources
<cout> whitequark: that would be a faulty argument given how familiar I already am with the sources :(
<shevy> not that many alternatives to MRI
<whitequark> cout: then you can't say anything about their quality
<whitequark> I am unfortunately quite familiar
<whitequark> shevy: jruby
<cout> whitequark: I can say anything I want.
<shevy> :)
<whitequark> cout: I can (and will) silently disregard anything I don't like and continue to argue with you
<whitequark> :D
<shevy> I hope there is minimalist java
* Asher senses a sequel to RubyPanther
<shevy> then I could go into jruby
<shevy> but I can't overcome my barrier AGAINST learning java ...
<shevy> can I write ruby-looking java code?
<whitequark> shevy: yes. google for `mirah'
<shevy> hmm ok, this is the second time I heard that
<whitequark> it's basically ruby parser which generates java bytecode from something ruby-like.
<whitequark> Asher: wtf is RubyPanther?
<seanstickle> One of the plentiful rubytrolls
<cout> asher: which one of us were you associating with trolls? :)
<shevy> :)
<shevy> only RubyPanther I suppose ;)
<Asher> whitequark's assertions about the implications of MRI being C
<shevy> oh!
* shevy fetches popcorn
<whitequark> Asher: err, for the record, I wasn't serious about that
<whitequark> that _still_ does not make MRI any better. but it's unrelated to the language it's written in.
<shevy> gaaaaah man ... it had such a good start ... :(
<Asher> haha ok noted for the record
<whitequark> you can write bad cobol
<whitequark> bad fortran
<whitequark> bad java
<whitequark> bad c
<whitequark> you presumably cannot write bad brainfuck because well. can you define what "good brainfuck" is?
<andkerosine> Efficient brainfuck?
<whitequark> any brainfuck code is an efficient brainfuck
<Asher> how about malbolge??
<rue> Mehbolge amirite
* whitequark surrenders
<Asher> i love that for years the only hello world code in malbolge printed out HellO World
<shevy> lol
<shevy> I dont even want to ask why ...
<seanstickle> Some of these languages have limited source code available for reading
<cout> Hell 'O World
<seanstickle> Try finding a substantive program written in APL to study, for instance. Devilishly hard.
<andkerosine> Some of the APL solutions to Project Euler problems are pretty enlightening, though.
<seanstickle> True.
<cout> seanstickle: KDB's query language is based on APL.
<seanstickle> cout: well, based on J, which was based on APL.
<andkerosine> Which was based on trolling the programming world.
Stalkr_ has joined #ruby-lang
<seanstickle> Oh, don't be mean. :P
<whitequark> cout: I try to resist the urge to /nick cin
<whitequark> but hardly can
<cout> how cinful of you.
<rue> Hm, amirite isn't taken as a programming language name. I'm going to make a prolog.
<cout> seanstickle: I didn't realize K was based on J. The wikipedia article forces you to read between the lines to figure that out.
<nedbat> what is the distinction between #ruby and #ruby-lang? Why are there two channels?
<seanstickle> cout: well, written by Arthur Whitney, who wrote A+ and J.
<seanstickle> cout: so presumably, he took his insights with those when he wrote K
<seanstickle> nedbat: ancient enmity
<cout> seanstickle: wikipedia says J was Ken Iverson
<seanstickle> cout: Iverson designed the language.
<nedbat> seanstickle: over what?
<cout> but I wouldn't be surprised if Whitney worked on J too
<seanstickle> cout: Whitney was the wacko genius who wrote a lot of the source code
<rue> cout: Houston?
<cout> rue: who?
<rue> Hm, we have a problem.
<seanstickle> nedbat: opinions on how to run a channel
<cout> lol
<seanstickle> nedbat: and also because people just kept typing in /join #ruby
<cout> I didn't know there was a #ruby
<cout> (except on efnet)
<rue> Stupid #ruby.
<seanstickle> Well, now you know
<cout> who hangs out on #ruby?
<seanstickle> There is also #philosophy, but I'd recommend staying away
<nedbat> cout: more ppl than here....
<andkerosine> Quality > quantity.
ramonmaruko has joined #ruby-lang
<seanstickle> Quantity has a quality of its own
<andkerosine> And it is a lesser one.
<cout> great scott
<seanstickle> Except when it's larger
<andkerosine> I... hm... touche.
<rue> nedbat: Yeah, unfortunately the douchebags who run #ruby broke the agreement that they'd have a /topic forward to here so newbs tend to end up there. (#ruby-lang being designated in ruby-lang.org)
<andkerosine> #ruby: the #ruby-lang for people who can't read.
rohit_1 has joined #ruby-lang
<nedbat> can you explain the disagreement that led to the split? If you'd rather not, no big deal, just interested in these dynamics...
<seanstickle> Man, when people start hanging their self-respect on the name of an IRC channel, something has gone very wrong.
<seanstickle> nedbat: this isn't 19th century European history
<andkerosine> It used to be.
<seanstickle> nedbat: two channels popped up, people go to both
<seanstickle> nedbat: end of story
<shevy> people tend to go to #python people tend to go to #lua people logically tend to go to #ruby first too
<seanstickle> There is no dramatic reveal of a deep-seated feud
<seanstickle> We are not always at war with Oceania
<nedbat> seanstickle: ok, you introduced the word "disagreement" into the discussion, but ok.
<cout> I see a few nicks in there I recognize... ixx, MetaCosm... mostly C++ programmers
<seanstickle> nedbat: actually, I said ancient enmity
<cout> so the channel must be pretty irrelevant
<nedbat> seanstickle: true, "opinion" was what you said.
<shevy> seanstickle hahah Oceania :D
<seanstickle> nedbat: which is so over the top, I figured you'd pick up on it
<rue> nedbat: The original #ruby crowd was mostly people who got banned, probably not many of them left.
<shevy> big matz is watching over you
<andkerosine> #ruby is a human face being stomped on.
<andkerosine> Forever.
<seanstickle> andkerosine: no, no, no, that's #php
<shevy> #php is just sadness 2.0
<rue> But now, Omloop Het Nieuwsblad
<rue> nedbat: (Also, per Freenode TOS, #ruby should be renamed ##ruby, but they've not done so yet.)
<nedbat> rue: that would be a clear indicator to me, maybe not others.
<Asher> most of the people active in #ruby were either banned from #ruby-lang or also dwell here
<cout> I wonder if there's an active ruby community on undernet.
<cout> I miss undernet.
<andkerosine> Oh. My. God.
<shevy> what is undernet?
<andkerosine> 'phag'.rot13 == 'cunt'
<cout> my first irc experience *sniff sniff*
<seanstickle> undernet, dalnet, and efnet, the trinity of anger
<andkerosine> Mind === blown.
<shevy> ah ok
<Asher> trinity of anger eh? nice
<cout> I wouldn't go that far, more like...
<cout> ok well yes I would go that far.
<andkerosine> But undernet has #bookz.
<cout> what's that?
<andkerosine> All the books you could possibly want... gratis.
<andkerosine> Well, most.
<shevy> I like paperbooks
<cout> isn't that what torrents are for?
<andkerosine> I read on my DS, and I could never go back.
<andkerosine> Well, sure.
<cout> I thought file sharing on irc went out when kazaa came along
<andkerosine> But #bookz tends to have a wider selection.
<rue> Nintendo DS?
<andkerosine> Indeed.
<andkerosine> It's so comfortable.
fatprog has joined #ruby-lang
<andkerosine> Being able to read with one hand and smoke with another is just... so grand.
<cout> (I would have said napster but it was sort of ircish)
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
rohit has joined #ruby-lang
r0bby has joined #ruby-lang
gix- has joined #ruby-lang
wmoxam has joined #ruby-lang
fayimora_ has joined #ruby-lang
rippa has joined #ruby-lang
mtkd has joined #ruby-lang
fayimora_ has joined #ruby-lang
jkprg has joined #ruby-lang
bubonicpestilenc has joined #ruby-lang
havenn has joined #ruby-lang
Sailias has joined #ruby-lang
wmoxam has joined #ruby-lang
wmoxam_ has joined #ruby-lang
<andkerosine> I have become a monster: https://gist.github.com/1908615
toretore has joined #ruby-lang
<rippa> why didn't you become death
<rippa> destroyer of worlds
<andkerosine> Close enough.
<andkerosine> Destroy of readability.
<rue> Also, “I am become”
<rippa> lol
<rippa> regex parsing html
<rippa> classy
<andkerosine> It's a very simple use case.
fayimora_ has joined #ruby-lang
<seanstickle> "I am become" is archaic English.
* andkerosine <3 archaism.
<deryldoucette> i have become is more accurate english
chendo has joined #ruby-lang
<seanstickle> English has no formal spec.
<seanstickle> So "more accurate" is a misnomer.
<seanstickle> It's all about usage, beeyatches
<deryldoucette> lol
<andkerosine> Bitches love usages.
smartinsrenato has joined #ruby-lang
<andkerosine> Are conditional default parameters evil?
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
<Asher> why would they be?
<Asher> they aren't really conditional so much as they are parameters iwth default values
<andkerosine> But... conditional default values.
wmoxam has joined #ruby-lang
<Asher> they're optional parameters b/c they already have values
<rue> Are you two talking about the same thing?
<Asher> duno
<deryldoucette> i *think* he means if this param is set then set this other param to this value, if that one then set to this
<andkerosine> Negative.
<deryldoucette> ok
Jay_Levitt has joined #ruby-lang
<andkerosine> I'm wrapping the reddit API. My comments method is a mixin attached to the Post, User, and Subreddit classes. The count parameter should default to 25 for users and subreddits, but 500 for posts, which imitates the site's default functionality.
<andkerosine> def comments(count = @kind == 'post' ? 500 : 25)
<andkerosine> It just strikes me as bad design.
<andkerosine> But it's what /should/ happen.
<andkerosine> I could just do count ||=, I guess.
wmoxam has joined #ruby-lang
<Asher> sounds like poor encapsulation to me
<andkerosine> How do you mean?
<Asher> make a subclass/inheriting module
<andkerosine> Define the comments method more than once?
vdrab has joined #ruby-lang
<Asher> you should probably have a context for each type of @kind
<Asher> if you define a common inheritance structure you can maintain it easily
<Asher> and then your question becomes irrelevant
countskm has joined #ruby-lang
skryking has joined #ruby-lang
wmoxam has joined #ruby-lang
apeiros has joined #ruby-lang
wmoxam has joined #ruby-lang
skryking has joined #ruby-lang
pemeon has joined #ruby-lang
tomzx has joined #ruby-lang
imperator has joined #ruby-lang
wmoxam has joined #ruby-lang
<shevy> what is with ruby is that you should follow its design rather than fight it
<shevy> subclass subclass subclass
m3nd3s has joined #ruby-lang
<imperator> 1.chr gives me octal in 1.8, hex in 1.9
<imperator> how do i guarantee octal regardless of version?
* imperator keeps forgetting this
Stalkr_ has joined #ruby-lang
<rippa> imperator: doesn't 1.chr give you a string?
wmoxam has joined #ruby-lang
<imperator> rippa, yes, but 1.8 and 1.9 give me different strings
<rippa> different how?
<rippa> it should be "\x01" == "\001"
<rippa> same thing
<imperator> 22.chr => '\026' vs '\x16', yeah
<heftig> it's just a different way of representation
<heftig> the strings are identical
<rippa> same string
<smartinsrenato> imperator: try 1.to_s(8)
<smartinsrenato> string of octal representation of the number 1
<heftig> which is still "\x01"
<heftig> no difference
<heftig> er
<heftig> sorry, that gives you the string "1"
<heftig> as in, ASCII 1
<imperator> well, i'm hunting down a bug with icmp pings on 1.9, which uses a packed string, thought maybe that was the culprit
<imperator> (in my net-ping library)
wmoxam_ has joined #ruby-lang
wmoxam has joined #ruby-lang
<rue> Shouldn't you unpack, then?
Faris has joined #ruby-lang
<shevy> undress!
<muzone> hehehe
<muzone> i bet you used to be a slut shevy
<muzone> but then you realized you were just thinking like a man!
<shevy> :(
<muzone> oh right
<muzone> sorry that one only works on females :D
codewrangler has joined #ruby-lang
bubonicpestilenc has joined #ruby-lang
<rue> I doubt that.
Spooner has joined #ruby-lang
workmad3 has joined #ruby-lang
<andrewvos> One character for loop counters
jeffmoss has joined #ruby-lang
ankurgel has joined #ruby-lang
<TTilus> a.each_with_index { |e, myLoopIndexVariable| ... }
<TTilus> god i hate that 'my' prefix...
<andrewvos> yea
<andrewvos> txtTExtBox
<andrewvos> TextBox txtTExtBox = new TextBox();
<apeiros_> TTilus: and we hate cameCaseLocalVariableNames
<TTilus> apeiros_: my exact point
<apeiros_> aaaaha
Oloryn_lt1 has joined #ruby-lang
<TTilus> always reminds me of all the evil things in c++
<TTilus> ive been told many people get so called 'java rash' from it
gokul has joined #ruby-lang
<TTilus> (the camelCaseNaming)
<andkerosine> Is camelCase used anywhere?
<andkerosine> In... Ruby, that is.
<imperator> in its source? doubt it
<heftig> CamelCase is used for module names and class names
<andkerosine> That's PascalCase.
<imperator> in the community code at large? probably...somewhere
<imperator> true
<heftig> actually java calls it "CamelCase" and "mixedCase"
<andkerosine> They are wrong, and fuck them.
<deryldoucette> leat its not hungarian notation
jtoy has joined #ruby-lang
<imperator> hm, some kind of windows socket issue i fear...
<imperator> but only in 1.9 :(
<TTilus> andkerosine: define "in ruby"
<andkerosine> Ruby code and libraries and such.
<TTilus> jruby sources most definitely contain
<andkerosine> PascalCase is common enough, of course, but /starting/ with a lower-cased letter.
<andkerosine> Well, yeah, that would make sense.
Oloryn_lt1 has joined #ruby-lang
niklasb has joined #ruby-lang
havenn has joined #ruby-lang
Guest52585 has joined #ruby-lang
curtism has joined #ruby-lang
Oloryn_lt1 has joined #ruby-lang
Guest52585 has joined #ruby-lang
ryanf has joined #ruby-lang
<andrewvos> bwahahah rue you make me laugh sometimes https://twitter.com/#!/eeppa/status/173406516806823936
Karmaon has joined #ruby-lang
Oloryn_lt1 has joined #ruby-lang
mosca_ has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
bryancp has joined #ruby-lang
macmartine has joined #ruby-lang
wallerdev has joined #ruby-lang
Foxmaster has joined #ruby-lang
Oloryn_lt1 has joined #ruby-lang
nedbat has joined #ruby-lang
DMKE has joined #ruby-lang
fayimora has joined #ruby-lang
dejongge has joined #ruby-lang
elux has joined #ruby-lang
daglees has joined #ruby-lang
ankurgel has joined #ruby-lang
Luxx_ has joined #ruby-lang
seanstickle has joined #ruby-lang
bryancp has joined #ruby-lang
<andrewvos> Wonder why Ubuntu isn't in the amazon ec2 quickstart list of images :/
rushed has joined #ruby-lang
daglees has joined #ruby-lang
daglees has joined #ruby-lang
gokulnath has joined #ruby-lang
looopy has joined #ruby-lang
BeTaMaX has joined #ruby-lang
<shevy> cuz amazon ec2 does not list what sucks!!!
<BeTaMaX> Hi everyone
<BeTaMaX> could you recommend me any book to start programming in Ruby? By the way, what editor do you use to cook ruby? Thanks
<andrewvos> BeTaMaX: Use sublime text 2 or vim. Try the Ruby Koans instead of a book
<shevy> I use bluefish editor http://bluefish.openoffice.nl/index.html as for books, the pickaxe is ok, but ultimately the only real way to learn ruby is by hacking. I recommend this tutorial http://pine.fm/LearnToProgram/?Chapter=00
ankurgel has joined #ruby-lang
<andrewvos> FFS shevy you are such a hipster. What the hell is bluefish
<shevy> an editor based on GTK mostly
<havenn> I've been liking Sublime Text 2.
<shevy> geany and bluefish are fairly similar, except that geany's default syntax highlighting for ruby sucks
<shevy> but geany is much more active these days than bluefish :(
<BeTaMaX> Thank you so much, I sometimes use Geany for java
<shevy> cool
<shevy> my dream would be an editor in ruby
<andrewvos> shevy: redcar
<havenn> shevy: ^ your dream is real
<shevy> hmm
<shevy> I think I tried out redcar years ago
<shevy> dunno why I didnt use it
<BeTaMaX> I've been giving my first steps in programming. I started a couple of weeks ago with Java and I find it quite dirty
<shevy> oh wait
<shevy> redcar requires java right?
<havenn> Textmate 2 and Sublime Text 2 are pretty. Feed me colors. But, they aren't the One True Text Editor...
<BeTaMaX> I mean I think Ruby is cleaner and simplier, less lines of code to write the same programm
<andrewvos> shevy: I think so
<andrewvos> shevy: Though, there was some talk of moving away from jruvy
<shevy> BeTaMaX, well you have to compile java code into .jar files or?
<andrewvos> jruby
<andrewvos> *
<shevy> so you can't compare ruby to java that easily. it's more fair to compare ruby with python php perl lua
<andrewvos> java makes me sad
<shevy> yeah andrewvos that was the strange thing
<shevy> redcar looks really awesome from the screenshots
<theconartist> BeTaMaX: ruby is a good language to learn in imo
<erikh> there's also diakonos
<erikh> which is a text-based ruby editor
<shevy> but I dunno, java makes me really angry and violent. perhaps I am just cursed, with my brittle linux system, things tend to break, and java ends up not working. I can't even start libreoffice either, and it does not tell me what the specific error is
* shevy is sad.
<shevy> the less java for me, the better for my calmness
<havenn> VIM or emacs?
<andrewvos> vim
<andrewvos> Noooo why did I respond
Jake232 has joined #ruby-lang
<burgestrand> kill the troll
<shevy> vim and emacs - two eternal enemies
<shevy> but it's unfair to compare an editor to an operating system
<andrewvos> Compiling node.js takes an eternity
smartinsrenato has quit [#ruby-lang]
<seanstickle> ancient enemies, but they fight together against the horde of TextMate and Notepad+ users
<andrewvos> We need a bot to kick anyone who mentions vim/emacs
* manveru kicks andrewvos
<manveru> only a little bit more... and i'll build my vimpire!
<andrewvos> heh
<andrewvos> Speaking of bots, I'm installing hubot
dfr|mac has joined #ruby-lang
wmoxam has joined #ruby-lang
wmoxam_ has joined #ruby-lang
Bwild has joined #ruby-lang
<andrewvos> Wait hang on
<andrewvos> Just realised I would need to write javascript
<andrewvos> For hubot
<andrewvos> Can anyone recommend a ruby bot?
<manveru> andrewvos: you could continue with kamirc :)
<andrewvos> manveru: A work in progress, I take it?
<manveru> well, i haven't needed it much
<manveru> or one of the popular ones, sure :)
<andrewvos> https://www.ruby-toolbox.com/projects/cinch injekt worked on this one :)
<manveru> andrewvos: i never give up hope that somebody some day will want a real parser for irc
zmack has joined #ruby-lang
wyhaines has joined #ruby-lang
<manveru> which gives me an idea how to gracefully handle network specific deviations
* manveru adds note to his todo
wmoxam has joined #ruby-lang
<shevy> andrewvos apeiros_ wrote an IRC bot
<tbuehlmann> who doesn't? :>
ttilley has joined #ruby-lang
<shevy> true that
<shevy> my first larger ruby code was an IRC bot
<shevy> it even worked. unlike my PHP bot
<tbuehlmann> same here
havenn has joined #ruby-lang
<shevy> tbuehlmann you used PHP?
csmrfx has joined #ruby-lang
<tbuehlmann> naw, my first "larger ruby code" was an IRB bot framework
<shevy> ah I see
naz has joined #ruby-lang
achiu has joined #ruby-lang
<shevy> andrewvos, http://butler.rubyforge.org/
<tbuehlmann> butler? naw!
Gekz has joined #ruby-lang
<shevy> hehe
<andrewvos> Basically, anything that shevy says is good is going to be whack
wmoxam has joined #ruby-lang
<csmrfx> andrewvos: I bet you're right about that
<tbuehlmann> for irc bot stuff I'm using ponder. most likely because I wrote it
<shevy> andrewvos you are good
pxjorge has joined #ruby-lang
<shevy> no, seriously, apeiros writes great ruby code
<shevy> he wrote that audio thing ...
<dreinull> I have a dictionary in a mongo db via mongomapper and it has a search interface that looks like this: Regexp.new(/^#{search_term}/i) It fails however when I search for this: ca (* -> complains about the parens
<Asher> dreinull - sounds like the paren is not escaped for the regexp
<dreinull> Asher: is there a way to just use the string or is there a simple escape method available?
achiu has joined #ruby-lang
hzlocky has joined #ruby-lang
<dreinull> Asher: that works like a charm. Thanks a lot.
lsegal has joined #ruby-lang
<csmrfx> How is this as simple as it gets? It even has dependencies https://github.com/peterc/testrocket
<csmrfx> and a vague syntax
<csmrfx> IMHO testi is the simplest testing library out there for ruby, and it has no other dependencies than ruby 1.9 ;)
wmoxam_ has joined #ruby-lang
wmoxam has joined #ruby-lang
<andrewvos> testi?
<csmrfx> yea, it was conceived in #ruby like 3 years ago or so
Sailias has joined #ruby-lang
<andrewvos> hmmm
<andrewvos> I need ideas for cool bot plugins
<Spooner> csmrfx: Do you mean https://github.com/ahoward/testy ?
<andrewvos> csmrfx: Whitespace much bro?
<Spooner> The joy of tabs :D
<csmrfx> do you speak english, andrewvos?
<andrewvos> csmrfx: No, I don't speak English at all.
<csmrfx> ok.
<csmrfx> it's just quickly githubbed from a pastie
wmoxam has joined #ruby-lang
wmoxam_ has joined #ruby-lang
gix has joined #ruby-lang
<Mon_Ouie> testrocket doesn't have dependencies either apparently
imperator has joined #ruby-lang
gregf has joined #ruby-lang
<csmrfx> hehe I was kind of attempting to produce humorous amusement there
<csmrfx> +ruby-related
jxie has joined #ruby-lang
<csmrfx> heh well the readme states theres minitest and unix/posix deps
<Mon_Ouie> minitest looks like a development dependency only
<csmrfx> I think it would be better to use something like 'pass' instead of '+' and 'fail' for same as '-'
darkf has joined #ruby-lang
<csmrfx> or like testi pass { 0 == 0.to_i }
frequency9 has joined #ruby-lang
andrewhl has joined #ruby-lang
apeiros_ has joined #ruby-lang
lenilson_dias has joined #ruby-lang
daglees has joined #ruby-lang
tla has joined #ruby-lang
<deryldoucette> got a question. when we build rubies under RVM, we're not adding a --static flag or anything like that, but ruby seems to be building both dynamic and static libs, though it only links against the dynamic.
<andrewvos> injekt: You here?
<deryldoucette> for some of our embedded userbase this adds an unneeded 12MB
<andrewvos> injekt: Well, I can see you're here.. but are you active?
<Asher> deryldoucette - i believe you can —disable-static
<deryldoucette> is there a way to tell ruby *not* to create the static lib at *all*?
<deryldoucette> ahh ok. thank you.
<Asher> it's output into the Config.rb i believe
<Asher> are you trying now? if that doesn't work lmk and i'll find the option for you
<deryldoucette> no was going to pass it on too the client and let them :)
<deryldoucette> (Working on less than 4h sleep so figured let them expend the energy and head off to bed after passing that along)
<Asher> yeah seems to work here
<deryldoucette> oh, thanks for verifyig that. appreciated
<Asher> hmm it doesn't output a configure error at least gimme a sec i'll verify that it actually works
<deryldoucette> thanks
looopy_ has joined #ruby-lang
gregf has joined #ruby-lang
<Asher> looks like i was wrong
<Asher> there is a way to enable/disable building shared but it looks like it builds static no matter what
<Asher> what is the context where it's needed as a build option rather than simply removing it afterward?
<deryldoucette> Asher: we have several embedded developers in our userbase, and they would like the static lib not to be built for space concerns
<Asher> what do you mean by embedded developers
erpuds has joined #ruby-lang
<Asher> developers working on code to be deployed on embedded platforms?
<deryldoucette> yeah with the ruby installed on the platform. they just don't want the static since the shared works
<deryldoucette> makes it easier for them to package everything up (not a gem, inhouse install packages) and not have to shed the 12MB static lib
<deryldoucette> I personally am not an embed type, so not sure all of the specifics, just they specifically mentioned the space concern
<Asher> the concern seems legit but presumably they are cross-compiling right?
<deryldoucette> i believe so, yes (not my area of expertise, but conceptually it would make sense they are doing so)
<deryldoucette> who would have thought working on full blown system would hamstring your knowledge for embedded environments hehe
<Asher> it seems to me like the build system has little to do with the deployment packaging
<Asher> i would think they could simply either 1. remove the static lib 2. not package the static lib
<Asher> maybe ask if there is a reason they can't do that?
<Asher> hard to figure out alternative options without knowing why that isn't sufficient
<deryldoucette> right. they were asking if they could simply remove it, and then asked if they could stop building it completely. (they too couldn't see how not to build it)
<Asher> yeah they can definitely remove it
<deryldoucette> i wonder why it automatically builds both.
<Asher> i believe standard deployment is static lib + shared lib if supported
<deryldoucette> i know we're not passing nodynamic or --static-* flags or anything.
<deryldoucette> ok
<Asher> they seem to have changed the shared lib options
<Asher> it used to be that you had to —enable-shared
<Asher> but in 1.9.3 it's built by default, not sure when that changed
<deryldoucette> which is? the static or the dyn?
<Asher> the dynamic (shared) lib
<deryldoucette> (I never checked that myself. interesting)
<Asher> it's curious that they prefer the dylib
<Asher> usually embedded systems will stick with static b/c it's smaller
<deryldoucette> yeah, *that* thought passed through my head
<Asher> actually it's not… so i take that back
<Asher> 3.5 vs. 5.5
<Asher> here
<deryldoucette> gives me something else to play with for a bit when i get some sleep.
<deryldoucette> but that —disable-static definitely does *not* work?
wyhaines has joined #ruby-lang
<Asher> correct
<Asher> i'm surprised it didn't throw a configure error
<Asher> for unrecognized option
<deryldoucette> weird.
<Asher> but i double checked the configure script and the rbconfig.rb params and there is nothing for it
<deryldoucette> thanks for taking the time on this. appreciate it
<Asher> np
<deryldoucette> ok, will pass all this along. heading for the rack before i keel over.
<Asher> later!
<deryldoucette> o/ &
davidw has joined #ruby-lang
davidw has joined #ruby-lang
andrewhl has joined #ruby-lang
Bwild has joined #ruby-lang
Defusal has joined #ruby-lang
akahn has joined #ruby-lang
Caius has joined #ruby-lang
srbaker has joined #ruby-lang
turboladen has joined #ruby-lang
spuk has joined #ruby-lang
mika has joined #ruby-lang
pvh has joined #ruby-lang
hackeron has joined #ruby-lang
znouza has joined #ruby-lang
dominikh has joined #ruby-lang
werwolf has joined #ruby-lang
samuelkadolph has joined #ruby-lang
jarib has joined #ruby-lang
levifig has joined #ruby-lang
tomb has joined #ruby-lang
_br_ has joined #ruby-lang
cynosure has joined #ruby-lang
mitchty has joined #ruby-lang
apeiros has joined #ruby-lang
zmack has joined #ruby-lang
VladGh has joined #ruby-lang
jacobwg has joined #ruby-lang
wallerdev has joined #ruby-lang
m3nd3s has joined #ruby-lang
Bwild has joined #ruby-lang
nedbat has joined #ruby-lang
nedbat_ has joined #ruby-lang
S2kx has joined #ruby-lang
Spooner_ has joined #ruby-lang
looopy has joined #ruby-lang
Kyril has joined #ruby-lang
uniqanomaly has joined #ruby-lang
jeffmoss has joined #ruby-lang
havenn has joined #ruby-lang
m3nd3s has joined #ruby-lang
havenn_ has joined #ruby-lang
pemeon has joined #ruby-lang
ryanf has joined #ruby-lang
heftig has joined #ruby-lang
s0ber has joined #ruby-lang
y3llow has joined #ruby-lang
y3llow has joined #ruby-lang
y3llow has joined #ruby-lang
heftig has joined #ruby-lang
y3llow has joined #ruby-lang
<andrewvos> I'm installing bundler under system ruby and keep getting this when I run bundle install ERROR: Gem bundler is not installed, run `gem install bundler` first.
<andrewvos> I'm installing bundler under system ruby and keep getting this when I run bundle install: "ERROR: Gem bundler is not installed, run `gem install bundler` first."
<andrewvos> What's that about?
smilingpeter has joined #ruby-lang
smilingpeter has quit [#ruby-lang]
leopard_me has joined #ruby-lang
leopard_me has joined #ruby-lang
<shevy> good old bundler... never worked for me so far
<canton7> shevy, do you know of anything which does work? I've also had lots of bundler headaches
<shevy> canton7 with bundler? nope. But gems in general work very nicely, I like gems nowadays
<deryldoucette> mpapis-bundler
<shevy> I didnt test bundler thoroughly though
pemeon has quit [#ruby-lang]
<andrewvos> To be fair, it's not really a bundler issue.
<andrewvos> And bundler is normally my bro
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
<canton7> the thing that bites me is if you're running cross-platform, with gems which have platform-specific versions
<apeiros> canton7: stuff them into the package
<canton7> don't really want to do that with eventmachine..
<apeiros> worked fine for me for - I think it was libv8
<canton7> compiled code, and all that
<erikh> andrewvos: what's your $PATH
<erikh> also do you have any RUBYLIB, etc set
<andrewvos> erikh: Don't wory. I'm going to give up now
<andrewvos> erikh: I just found out the gem I'm using doesn't run on 1.8.7
<andrewvos> erikh: And I don't have the time to wait for ruby to compile on an ec2 micro instance
<erikh> mmmm t1.micro
<andrewvos> hehe
<erikh> bringing new meaning, "linux is free if your time is worth nothing"
<andrewvos> eyeah man
<erikh> fwiw, virtualbox will be faster
<andrewvos> Took an hour to compile ruby, then I realised I didn't install the dependencies
<erikh> on almost any machine made in the last 5 years
<erikh> ... maybe not a netbook
<imperator> real men use solaris
<erikh> haha
<imperator> because real men like pain
<erikh> I prefer FreeBSD, but until they get their Xen stuff sorted out, it's useless to me.
mytrile has joined #ruby-lang
<andrewvos> Ubuntu server ftw
<deryldoucette> erikh: i'm with you on the fbsd
<erikh> Ubuntu server's not bad but there are a lot of things I don't like about it.
<erikh> FreeBSD offers a lot more flexibility and its defaults are definitely more aimed at sysadmins.
<erikh> and the raw architecture is so much better
<erikh> NetBSD moreso
bjensen has joined #ruby-lang
<andrewvos> Waht's a good ubuntu server AMI?
<andrewvos> I've seen some that are full of fail
tla has joined #ruby-lang
looopy has joined #ruby-lang
<erikh> andrewvos: use the official ones
<erikh> that's for 10.04 LTS of course
<imperator> AMI?
<erikh> amazon machine image
<erikh> for ec2.
<erikh> basically they're snapshots that get cloned for your machine.
Defusal has joined #ruby-lang
<imperator> vm snapshots that they store?
<erikh> pretty much, you can build your own as well
<imperator> oic
<erikh> it's not particularly hard
<imperator> never heard of storing snapshots on a 3rd party service
<andrewvos> erikh: ap-northeast-1
<erikh> oh "the cloud" changes everything
<andrewvos> erikh: What's ap?
<erikh> asia pacific
<andrewvos> erikh: Wow almost chose that :|
<erikh> yeah, sec.
<erikh> you're in england right?
<andrewvos> yup
<erikh> you want to create eu- images
<andrewvos> I'm assuming eu west
<erikh> probably
<erikh> I sincerely doubt eu-east is in the eastern bloc
<andrewvos> erikh: 64 or 32?
<erikh> well, you're creating a t1.micro right?
<erikh> those only run 32-bit images.
<andrewvos> Oh ok
<andrewvos> erikh: Wait, so what's the difference between ebs and instance?
<erikh> in GENERAL, unless you need 64-bit (more ram typically, but there are other reasons) 32-bit will save you resources.
wallerdev has joined #ruby-lang
<erikh> ebs-root means that an EBS device is used as the disk store
<erikh> instance store means that the data is stored on the instance
<andrewvos> erikh: Oh ok so if i don't want to lose my data then I choose ebs
<erikh> how this is expressed practically is that ebs-root machines can be terminated and respawned
<erikh> right
<erikh> but ebs costs more
<erikh> and reboots cost extra.
<andrewvos> hmm
<andrewvos> A lot more?
fayimora_ has joined #ruby-lang
<erikh> t1.micro only runs on ebs IIRC
<erikh> $1 per reboot IIRC
<andrewvos> I'm going to store under 10mb probably
<erikh> for ebs
<erikh> then use instance store unless you can't go without terminating your machine
<andrewvos> hmm
<erikh> honestly -- if you want a more typical VPS, I suggest linode.
<erikh> ec2's generally best for big deployments.
<andrewvos> erikh: Why is that?
<erikh> where machines can fail and be re-initialized elsewhere trivially.
<erikh> e.g., something exploiting configuration management and the EBS attachment features
<erikh> linode's a good provider and doesn't have a lot of the "features" ec2 has.
<erikh> it's also going to be a lot fucking faster than a t1.micro.
<andrewvos> hehe fair enough
agilob has joined #ruby-lang
<erikh> they have servers in london.
<erikh> when you have to manage more than 10-20 machines, ec2's a good option.
petercooper has joined #ruby-lang
nedbat has joined #ruby-lang
setmeaway has joined #ruby-lang
Aaaarg has joined #ruby-lang
qpingu has joined #ruby-lang
<andrewvos> erikh: Oh FFS now bundler requires rubygems > 1.3.6 and ubuntu repo only has 1.3.5
<andrewvos> I give up
<erikh> gem update --system
<erikh> oh, that's probably not going to work on umbongo
<andrewvos> hehe
compcube has joined #ruby-lang
compcube has quit ["Leaving"]
<andrewvos> An AMI with ruby 1.93 preinstalled would be lovely
Wardrop has joined #ruby-lang
uniqanomaly has joined #ruby-lang
nedbat has joined #ruby-lang
havenn has joined #ruby-lang
wyhaines has joined #ruby-lang
acts_as has joined #ruby-lang
RomyRomy has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
WillMarshall has joined #ruby-lang
<andrewvos> Hey, anyone know how to dump the entire buffer of a window in irssi to a file?
<andrewvos> oh wait nevermind :|
<whitequark> have you found a way?
<whitequark> because I'm interested too
<muzone> andrewvos: /lastlog -f file.txt
<andrewvos> whitequark: What muzone said
<muzone> check out https://gist.github.com/1602971 while you're at it
* muzone is now playing: Muzone - Seyoum (http://home.no/mritz/seyoum.mp3)
postmodern has joined #ruby-lang
<andrewvos> :( RVM is not a function, selecting rubies with 'rvm use ...' will not work.
hackeron has joined #ruby-lang
shevy has joined #ruby-lang
akira989_ has joined #ruby-lang
brownies has joined #ruby-lang