Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
<zachc> shevy: thanks, also what's the difference between /usr/bin/ruby and /usr/bin/env ruby ?
badabim_ has joined #ruby
shadoi has joined #ruby
Sailias has joined #ruby
<shevy> zachc env is a program
eignerchris_ has joined #ruby
<shevy> it should return the real file path to ruby
<shevy> personally I do not use it myself, but others use it a lot
yoklov has quit ["bye!"]
<zachc> so it's kinda like doing which ruby and piping that into the #! ?
<shevy> I guess so
<shevy> I have no idea how env really works but you can probably look at its source code
yoklov has joined #ruby
hadees has joined #ruby
<shevy> it is part of coreutils
<shevy> ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.15.tar.xz
munx has quit [#ruby]
<shevy> set_program_name (argv[0]);
<shevy> god
<shevy> I think I hate C too
<shevy> zachc if you decide to use ruby-gtk for longer and you get stuck, use the mailing list / forum
ZachBeta has joined #ruby
carlyle has joined #ruby
Paul321a has joined #ruby
bigkm has joined #ruby
<zachc> shevy: ok I'm using the dialog example from the /usr/share/doc and it's auto launching the avoid dialog and refusing to close it
sawjig has joined #ruby
al3xnull has joined #ruby
torbz has joined #ruby
snip_it has joined #ruby
<shevy> hmm /usr/share/doc is a weird location
krainboltgreene has quit [#ruby]
<shevy> in my ruby-gtk programs I can tell you that the about dialog (avoid??? lol) is only launched when I trigger it via .run
<shevy> which I only do via buttons on the top menu bar
milkpost_ has joined #ruby
Liothen_ has joined #ruby
<zachc> avoid?
<zachc> shevy: I run debian
<zachc> shevy: I have it to where .show opens it but it won't close from clicking the close button
pu22l3r_ has joined #ruby
Stelpa has joined #ruby
nobitanobi has joined #ruby
<shevy> <zachc> shevy: ok I'm using the dialog example from the /usr/share/doc and it's auto launching the avoid dialog and refusing to close it
<shevy> ^^^ you used "avoid dialog" in your sentence
<shevy> zachc I think you can always call .destroy on it. there is a file dialog .rb file in the ruby-gnome examples
<shevy> you should check it out
<shevy> it lets you open a new window cleanly and close it again
twelvechairs has joined #ruby
randym has joined #ruby
<blooberr> how do I ensure that only one instance of a process with unique flags can run? I'll be launching tasks from a single script, but passing in flags.
nobitanobi has joined #ruby
banisterfiend has joined #ruby
afex has joined #ruby
jxpx777 has joined #ruby
milkpost_ has joined #ruby
vraa has joined #ruby
fergus_ has joined #ruby
`brendan has joined #ruby
replore has joined #ruby
stephenjudkins has joined #ruby
<zachc> shevy: that example was interesting but didn't fix the about dialog problem
twelvechairs has joined #ruby
musl has joined #ruby
<shevy> hmm
kinderman has joined #ruby
twelve_chairs has joined #ruby
<shevy> I dont have an easy working program for it
Aaaarg has joined #ruby
<shevy> try to make a Gtk::Window.new
gh has joined #ruby
<shevy> embed some widgets into it
<shevy> one test button
<shevy> if you click on it, invoke .run on your about dialog
werdnativ_ has joined #ruby
<shevy> and in the "close" dialog of the about dialog, you destroy the about dialog again
andrewhl has joined #ruby
fergus_ has joined #ruby
twelvechairs has joined #ruby
twelve_chairs has joined #ruby
werdnativ has joined #ruby
chimkan_ has joined #ruby
matthias3 has joined #ruby
twelvechairs has joined #ruby
twelve_chairs has joined #ruby
atlantaman has joined #ruby
thebope has joined #ruby
Kambus has joined #ruby
adeponte has joined #ruby
adeponte has joined #ruby
Liothen has joined #ruby
apok_ has joined #ruby
_|christian|_ has joined #ruby
chrxn has joined #ruby
major_majors has quit [#ruby]
nfluxx has joined #ruby
_|christian|_ has joined #ruby
nari has joined #ruby
looopy has joined #ruby
mikepack has joined #ruby
liluo has joined #ruby
zomgbie has joined #ruby
acidjazz has joined #ruby
<acidjazz> why did ruby call it begin/rescue vs the common try/catch ?
<shevy> acidjazz catch / throw exists in ruby too
Ripp__ has joined #ruby
<shevy> also it is not the same
<acidjazz> ah yes shevy just saw that
andrewhl has joined #ruby
emocake has joined #ruby
philcrissman_ has joined #ruby
gen0cide_ has joined #ruby
epochwolf has joined #ruby
epochwolf has joined #ruby
orangesea has joined #ruby
orangesea has quit [#ruby]
_|christian|_ has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
pen has joined #ruby
QaDeS_ has joined #ruby
dcvii has joined #ruby
tatsuya_o has joined #ruby
Bardosity has joined #ruby
carlyle has joined #ruby
banisterfiend has joined #ruby
_adeponte has joined #ruby
fayimora_ has joined #ruby
wroathe has joined #ruby
jfelchner has joined #ruby
carlyle has joined #ruby
davidcelis has joined #ruby
Jay_Levitt has joined #ruby
werdnativ has joined #ruby
g123 has joined #ruby
Wizywig has joined #ruby
ed_hz_ has joined #ruby
<Willejs> hi, can anyone help me with this problem? sin, sout, serr = Open3.popen3("knife search node 'name:'#{ip}' ' | grep IP:")
<g123> dear #ruby, how do i extract just the 'thekey' value please?
<g123> $stuff = { 'abc' => { 'thekey' => 1, 'foo' => 'bar' }, 'def' => { 'thekey' => 4, 'foo' => 'bar' }, 'xyz' => { 'thekey' => 4, 'foo' => 'bar' } } nodes_data.map{ |host,v| "[#{host}=#{v}]" }.join(",")
<Willejs> i am referencing to a variable inside a popen3 command I'm executing, but cannot use the single quotes again
ZachBeta has joined #ruby
<g123> sorry for the mess, i'm trying to solve this please: http://pastebin.com/f2daVvcd
S1kx has joined #ruby
<Willejs> g123, i think you need to take the hash from out of the hash
<Willejs> asin, you have a hash in a hash
<g123> Willejs: how can i do this please ?
<g123> Willejs: I'm aware, how can i extract it to build my string in the example i obviously have wrong syntax for ?
<Willejs> so you have to make each hash an object then each object you can extract the values...
nfluxx has joined #ruby
<g123> Willejs: I don't suppose you could offer me this one liner please ?
samsonjs has joined #ruby
<Willejs> nah, I'm sorry I'm a noob at ruby too
<Willejs> you need to get a hash from a hash
<Willejs> if you google this you will find examples
<Willejs> i think i had this problem, let me see if i have some code
<g123> :P i'm actually writing puppet, but the small thing i need is in ruby, anyone else?
<g123> Willejs: okay thanks
thebope has joined #ruby
<mksm> g123, i'm not getting what you want to do
al3xnull_ has joined #ruby
<Willejs> g123: i can't find it
stephans has joined #ruby
<g123> mksm: i want to do this: nodes_data.map{ |host,v| "[#{host}=#{v}['thekey']]" }.join(",")
luxurymo_ has joined #ruby
<g123> mksm: however this is not valid syntax, the #{v} is actually a hash, and i *just* want the 'key
<g123> '
ceej has joined #ruby
<mksm> g123, v['thekey']
<g123> mksm: this doesn't work...
<mksm> "[#{host}=#{v['thekey']}]"
<g123> mksm: aha! this is what i wanted, much appreciated
<g123> mksm: i apologize for my poor ruby-foo, i'm actually just working on puppet, and occasionally i need to stick in a one liner :P
<mksm> no prob
dv310p3r has joined #ruby
setient has joined #ruby
vraa has joined #ruby
Hanmac1 has joined #ruby
ZachBeta has joined #ruby
friskd has joined #ruby
[eko] has joined #ruby
Ankhers has joined #ruby
Nathandim has joined #ruby
ryanf has joined #ruby
Ankhers has quit [#ruby]
Ankhers has joined #ruby
dotnull has joined #ruby
tin_can has joined #ruby
pu22l3r has joined #ruby
Seisatsu has joined #ruby
luckyruby has joined #ruby
Pallium has joined #ruby
stephenjudkins has joined #ruby
snip_it has joined #ruby
igotnolegs has joined #ruby
nowthatsamatt has joined #ruby
ada2358 has joined #ruby
chimkan_ has joined #ruby
nowthatsamatt has quit [#ruby]
philcrissman_ has joined #ruby
csherin has joined #ruby
xsdg has joined #ruby
manhunter has joined #ruby
<manhunter> who is the operator for #ruby
<manhunter> who is the operator for #ruby
ZachBeta has joined #ruby
werdnativ has joined #ruby
denom has joined #ruby
panthrodeb has joined #ruby
<Kageroc> hello
<Kageroc> When i do a puts t.cmd("sho route | b " + @a) it tells me that I cannot convert an array
<manhunter> Kageroc: what the fuck?
<Kageroc> ?
<Kageroc> When i do a puts t.cmd("sho route | b " + @a) it tells me that I cannot convert an array "@a" to a string
<Kageroc> @ a as what I want in it but I cant figure out how to append it to the string :(
<Kageroc> can anyone help me out?
manhunter has quit ["WeeChat 0.3.6"]
snip_it has joined #ruby
MasterIdler_ has joined #ruby
blischalk has joined #ruby
petelat has joined #ruby
<petelat> hi, are internet apps programmed using ruby on rails scalable?
<petelat> i heard twitter ran into some problems with it
pp01bit has joined #ruby
<Willejs> yeah, they scale
brjannc has joined #ruby
<Willejs> twitter still use for for the front end web server
<Willejs> by the time you have a problem with scaling ruby, you'll have bigger architectural code.
<Willejs> *problem
<Willejs> theres an interesting article about twitter and ROR
guns has joined #ruby
<Willejs> anyway, can someone interpret this for me? http://wiki.msgpack.org/display/MSGPACK/Design+of+RPC#DesignofRPC-DelayedReturn
<Willejs> not really sure how to implement it
unixjazz has joined #ruby
ed_hz_ has joined #ruby
ZachBeta has joined #ruby
<petelat> Willejs: yeah they said ror apps cant use more than one database server?
<Willejs> why do you need to use more than one server?
heftig has joined #ruby
<Willejs> and you can, but you would have to use a different gem
<petelat> what's a gem?
<petelat> im reading a site and it says one of the drawbacks of RoR is that theres no built in support for multiple db backends
radic has joined #ruby
<petelat> which is the problem twitter ran into
maletor has joined #ruby
td123 has joined #ruby
macmartine has joined #ruby
blueadept has joined #ruby
bitrot has joined #ruby
nobitanobi has joined #ruby
wmoxam has joined #ruby
nobitanobi has joined #ruby
iamjarvo has joined #ruby
blueadept has quit ["Leaving"]
adeponte has joined #ruby
blueadept has joined #ruby
kpshek has joined #ruby
nobitanobi has joined #ruby
bitrot has quit [#ruby]
badabim has joined #ruby
tommyvyo has joined #ruby
liluo has joined #ruby
munx has joined #ruby
nobitanobi has joined #ruby
heftig has joined #ruby
gianlucadv has joined #ruby
werdnativ has joined #ruby
Norrin has joined #ruby
ScottNYC has joined #ruby
tin_can has joined #ruby
iamjarvo has joined #ruby
nobitanobi has joined #ruby
randym has joined #ruby
phantomfakeBNC has joined #ruby
M- has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
nobitanobi has joined #ruby
<ozzloy> petelat, ruby can use more than one database at the same time, even while serving web apps
<ozzloy> petelat, it sounds like you're either getting bogus information or you're interpreting correct information badly
<petelat> probably interpreting information badly
<ozzloy> anyone in here doing udacity?
<petelat> udacity?
<ozzloy> it's an online learning class. the front wave in the coming revolution in education
<petelat> s it free?
<ozzloy> yeah, free
<ozzloy> i'm not sure what their business model is
<ozzloy> but it's not selling education
<ozzloy> they might sell certification
<ozzloy> that's my guess
<ozzloy> they're not currently, but they might do it soon
<petelat> nice
<petelat> MIT offers this already
<ozzloy> MIT offers education online, but no certification
<ozzloy> and their online class sucks in comparison
<petelat> but theres not many you can compare it to udacity
asteros has joined #ruby
<ozzloy> yep, it's a new field, radically different, emerging as we speak
<ozzloy> anyways, the reason i bring it up is because it teaches programming, but with python and that makes me sad
<ozzloy> i want to program in something other than python and i'm hoping to find collaborators in this endeavor
<ozzloy> i am also asking in other language channels
<ozzloy> i really dislike python
<ozzloy> i'd prefer ruby or racket
<ozzloy> at least they're not using cfml
moshee has joined #ruby
moshee has joined #ruby
symb0l has joined #ruby
rohit has joined #ruby
xiaotian has joined #ruby
Richmond has joined #ruby
<werdnativ> I notice gems use just: require 'gemname/submodule' for loading files internally. I guess this depends on the load path being set up by rubygems? How do you manage it while developing a library?
rippa has joined #ruby
<heftig> werdnativ: testing environment sets load paths?
<werdnativ> ok, so you set it in your test/spec helper then?
milkpost_ has joined #ruby
<heftig> i'd assume so
nobitanobi has joined #ruby
<werdnativ> What about more casual uses, like requiring things in irb to play with it? (Pickaxe says you can't use 1.9's require_relative there.)
<werdnativ> I guess either way you just have to set up the load path first...
<heftig> when playing around in irb you probably know your working dir, so you can just use require './foobar'
nobitanobi has joined #ruby
<heftig> or the ever-popular $:.shift "."
<heftig> er, unshift
macmartine_ has joined #ruby
<werdnativ> ok… but in the lib files just keep it without any absolute or relative references then… thanks.
Seisatsu has joined #ruby
nobitanobi has joined #ruby
pen has joined #ruby
flipsomebits has joined #ruby
csprite has joined #ruby
macmartine_ has joined #ruby
scalebyte has joined #ruby
nobitanobi has joined #ruby
yoklov has joined #ruby
nobitanobi has joined #ruby
draxxx has joined #ruby
<draxxx> which is better, sinatra or rails?
mxweas_ has joined #ruby
dipix has joined #ruby
c0rn has joined #ruby
randym has joined #ruby
matthias3 has joined #ruby
tonini has joined #ruby
chrxn has joined #ruby
thecreators has joined #ruby
khakimov has joined #ruby
JohnBat26 has joined #ruby
MasterIdler__ has joined #ruby
tilde` has joined #ruby
philips has joined #ruby
x0F__ has joined #ruby
hooper_ has joined #ruby
macmartine has joined #ruby
milkpost_ has joined #ruby
macmartine_ has joined #ruby
<banisterfiend> hi any native japanese speakers here?
djdb has joined #ruby
macmartine_ has joined #ruby
ryanf has joined #ruby
sonkei has joined #ruby
burgestrand has joined #ruby
macmartine has joined #ruby
<randym> banisterfiend: close enough. What's up?
<banisterfiend> randym: can i msg u?
<randym> sure
hukl has joined #ruby
manizzle has joined #ruby
MasterIdler_ has joined #ruby
banseljaj has joined #ruby
akem has joined #ruby
yxhuvud has joined #ruby
thone has joined #ruby
akem has joined #ruby
guns has joined #ruby
nobitanobi has joined #ruby
macmartine has joined #ruby
heftig has joined #ruby
undersc0re has joined #ruby
nw` has joined #ruby
evenix has joined #ruby
SJr has joined #ruby
nobitanobi has joined #ruby
akemrir has joined #ruby
ScottNYC has joined #ruby
phantomfakeBNC has joined #ruby
bluOxigen has joined #ruby
asteros has joined #ruby
chimkan_ has joined #ruby
burgestrand has joined #ruby
rtyler has joined #ruby
briankbuckley has joined #ruby
sonkei has joined #ruby
madmax_ has joined #ruby
QaDeS has joined #ruby
artOfWar has joined #ruby
adman65 has joined #ruby
KL-7 has joined #ruby
kerframil has joined #ruby
akhkharu has joined #ruby
senny has joined #ruby
KL-7 has joined #ruby
odinswand has joined #ruby
dross_ has joined #ruby
odinswand has joined #ruby
zommi has joined #ruby
QKO has joined #ruby
stoffus has joined #ruby
ameba has joined #ruby
alanp has joined #ruby
mnemonikk has joined #ruby
burgestrand has joined #ruby
Helius has joined #ruby
arturaz has joined #ruby
ph^ has joined #ruby
stoffus has joined #ruby
Morkel has joined #ruby
workmad3 has joined #ruby
Indian has joined #ruby
ed_hz_ has joined #ruby
stoffus has joined #ruby
daglees has joined #ruby
ed_hz_ has joined #ruby
kreantos has joined #ruby
SPYGAME has joined #ruby
tilde` has joined #ruby
maletor has joined #ruby
alanp has joined #ruby
bier has joined #ruby
fortysixandtwo_ has joined #ruby
fortysixandtwo has joined #ruby
ph^_ has joined #ruby
mafolz has joined #ruby
ukwiz has joined #ruby
ali_h has joined #ruby
kstephens has joined #ruby
pi3r has joined #ruby
Divinite has joined #ruby
akem has joined #ruby
akem has joined #ruby
laen_ has joined #ruby
<Divinite> Does anyone know how to pass gcc variables to ruby gems?
ph^ has joined #ruby
<Divinite> Anyone here?
rtyler has quit [#ruby]
matthias_ has joined #ruby
<mnemonikk> Divinite: I'd try something like CFLAGS=-lsomelib CPPFLAGS=-I/an/include/path gem install somegem
<mnemonikk> Divinite: But I didn't have to do that in a while.
workmad3 has joined #ruby
<Divinite> mnemonikk: I want to tell ruby my compiler is gcc.
trivol has joined #ruby
<mnemonikk> CC=gcc? I have no idea. You're on OS X?
<Divinite> Nope, apple darwin.
<Divinite> 10.something
<Divinite> *Also known as an iPod touch.
<Divinite> mnemonikk:
Karmaon has joined #ruby
<Divinite> mnemonikk: Damn, just realized the one compiled by Saurik doesn't have development tools. That sucks!
<Divinite> Does anyone know where I can get devel-tools for ruby?
<pp01bit> use ur text editor
<epochwolf> Divinite: The Internets *nod*
Pip has joined #ruby
<Pip> Is Ruby easier to learn than Python?
<epochwolf> Pip: yes and no
mikewintermute has joined #ruby
<Pip> thanks
banseljaj has joined #ruby
<epochwolf> ruby has more syntax to learn.
shtirlic has joined #ruby
ph^ has joined #ruby
<epochwolf> python has a messy standard library.
<rippa> ruby almost doesn't have any complicated syntax
<epochwolf> ruby's standard library is much cleaner.
<rippa> methods and blocks
<epochwolf> rippa: sigils.
<epochwolf> lambdas vs. procs, etc.
<rippa> that's not syntax
<rippa> well, maybe it is
<epochwolf> ruby has more complexity
<epochwolf> but it's more expressive because of it.
<epochwolf> and it really, really helps that the methods are easy to remember.
wvdschel has joined #ruby
<epochwolf> Pip: what languages do you already know?
Divinite has joined #ruby
<startling> Pip: they're pretty equal.
flippingbits has joined #ruby
stoffus1 has joined #ruby
kreantos_ has joined #ruby
<Pip> epochwolf, some java
<epochwolf> Pip: that's all?
<Pip> new question, which is faster: ruby or python
<Pip> epochwolf, some C
adambeynon has joined #ruby
<epochwolf> Pip: faster depends on what you're trying to do. Number crunching? Python, it has good libraries. String manipulation? Definitely ruby.
<Pip> Alright
<epochwolf> Pip: in your case, I would probably recommend python because of the beginner's tutorial.
BiHi has joined #ruby
M- has joined #ruby
riethmayer has joined #ruby
CacheMoney has joined #ruby
<rooted> Recommending python in #ruby ??? Disgraceful!
matthias2 has joined #ruby
<epochwolf> rooted: do you disagree?
<Pip> :D
<epochwolf> rooted: I think python has a better starting point for someone that doesn't know much.
<rooted> epochwolf: Nope, just don't tell them that.
<epochwolf> k
<rooted> epochwolf: True
<epochwolf> I start with python and moved to ruby a year later.
<epochwolf> best decision ever.
<rooted> epochwolf: Same here! :)
<banisterfiend> i think ruby is easier to learn, just because it's more interesting
<epochwolf> Python at least got me off php.
<banisterfiend> and you feel motivated and enthusiastic
<banisterfiend> python was a fucking drag
<banisterfiend> such a boring language
shellox has joined #ruby
<rooted> Lol, just realized that my nick changed on the wrong server! Whoops!
<epochwolf> lol
<shellox> hi
<Divinite> That's better!
<epochwolf> I'm epochwolf on every server. I'm boring.
<Divinite> epochwolf: You have a vps. You're exciting.
<epochwolf> banisterfiend: I can't really disagree there.
<Divinite> *I do as well, but that's beside the point.
<Divinite> banisterfiend: Also agreed.
<epochwolf> vps with a dead literature website and probably a dozen dead blogs :/
<epochwolf> I'm not even sure what's actively hosted right now.
<Divinite> epochwolf: You sell vps's?
<banisterfiend> Divinite: how is it beside the point (im not even sure exactly what the point is:)
<epochwolf> Divinite: no.
<epochwolf> Divinite: it's all my stuff.
<epochwolf> it's a rackspace 512.
<shellox> how to create a new instance of a class without giving all arguments. there is a def initialize in my class with the args name, firstname, age, country, city etc.
<shellox> epochwolf: self hosting is cool ;)
<Divinite> epochwolf: :O you have a physical server????!!?!!
<banisterfiend> shellox: use default values
<epochwolf> Divinite: no, a cloud server, through rackspace.
<shellox> banisterfiend: i did this, but i mean this
<Divinite> banisterfiend: I said that's beside the point to my comment about him having a vps.
<banisterfiend> ah ok
<epochwolf> self hosting is for my local network. Which is a Windows 7 box with all the security settings disabled >.>
<Divinite> epochwolf: Not the best idea!
<shellox> persone = Person.new("foo", , 20, [..])
<shellox> can i let some args empty?
<banisterfiend> shellox: hehe, u cant do that
<banisterfiend> shellox: only if you convert them to hash arguments
hukl has joined #ruby
<epochwolf> Divinite: I'm lazy. There nothing on that system I can't restore from one of my macs.
<banisterfiend> shellox: Person.new(:name => "foo", :age => 20)
<shellox> banisterfiend: thanks, that is exactly that what i need ;)
Helius has joined #ruby
<banisterfiend> shellox: do you konw how to use hash arguments?
<shellox> sure :P
<banisterfiend> cool
<epochwolf> banisterfiend: if he doesn't, he'll learn really quick :D
<banisterfiend> shellox: how do you set up your defaults?
<banisterfiend> for hash args
* epochwolf runs off to bed
<shellox> banisterfiend: i set the defaults in the class with constants
<banisterfiend> shellox: oh ok
<shellox> if the new object is called without args it use the value from the constant, else it use the param
etehtsea has joined #ruby
<shellox> not sure if it's a good way, but it works
epochwolf has joined #ruby
<banisterfiend> shellox: do this: options = DEFAULT_VALUES.merge(options)
i8igmac has joined #ruby
<banisterfiend> def initialize(options={})
<i8igmac> how would you execute a thread with out writing the same lines multiple times? Thread.start{puts "Hi world\n\n"}*10
<shellox> banisterfiend: ok, i will try this
gianlucadv has joined #ruby
redjack1964_ has joined #ruby
matthias2 has joined #ruby
<matled> shellox: if you use a constant you have to be careful about mutable objects. if you accidentally or deliberately change them you may change it for other objects and future objects too.
<rippa> i8igmac: 10.times
mikewintermute has quit [#ruby]
davidpk has joined #ruby
ph^ has joined #ruby
<i8igmac> if i run multple threads, will they run for ever? Thread.start{while; puts"hi world";end}
eka has joined #ruby
rickmasta has joined #ruby
tayy has joined #ruby
pathou has joined #ruby
CheeToS has joined #ruby
ephemerian has joined #ruby
fayimora has joined #ruby
nari has joined #ruby
jlebrech has joined #ruby
krz has joined #ruby
Spockz` has joined #ruby
jamw has joined #ruby
gyre007 has joined #ruby
omry_ has joined #ruby
looopy has joined #ruby
symb0l has joined #ruby
jbw_ has joined #ruby
rizlah has joined #ruby
<scalebyte> anyone knows rails here?
nw` has joined #ruby
tatsuya_o has joined #ruby
<odinswand> scalebyte: #rubyonrails
<Hanmac> we fly, we not use rails anymore :P
visof has joined #ruby
visof has joined #ruby
rizlah has quit ["Leaving"]
rohit has joined #ruby
stepnem has joined #ruby
adeponte has joined #ruby
vjacob has joined #ruby
ikaros has joined #ruby
odinswand has joined #ruby
stevefink_ has joined #ruby
tk_ has joined #ruby
workmad3 has joined #ruby
chrxn has joined #ruby
utkobot has joined #ruby
clockwize has joined #ruby
nari has joined #ruby
larstobi1 has joined #ruby
DarkFoxDK has joined #ruby
<larstobi1> Is it true that placing double colons before a module name will specify to start from root path to look it up, and not relative to the current module? I.e. that ::Fog::DNS will find the Fog module and not my own My::Fog module?
<Tasser> larstobi1, indeed
<larstobi1> Tasser: thanks!
iocor has joined #ruby
thebope has joined #ruby
mengu has joined #ruby
matthias3 has joined #ruby
laen_ has joined #ruby
kerframil_ has joined #ruby
nixmaniack has joined #ruby
tayy has joined #ruby
runeb_ has joined #ruby
bitserf has joined #ruby
runeb- has joined #ruby
<bitserf> hi, is there a neat way to do Enumerable#take_while and Enumerable#drop_while without two iterations?
Morkel has joined #ruby
<bitserf> where "neat" = stdlib way, obviously its easy to whip up
<banisterfiend> bitserf: can u explain
<heftig> bitserf: you want to split an enumerable into two parts?
<banisterfiend> heftig: yo heft
<heftig> ave
<tilde`> fffffff
<bitserf> yeah, but not in the way #partition does it, i want everything for which block returns true in one sequence, and the rest in the other sequence
<bitserf> but i've decided i'm micro optimizing, so i'll just use #take_while/#drop_while :)
sprysoft_david has joined #ruby
Mchl has joined #ruby
<heftig> bitserf: uh, isn't that exactly what #partition does?
bluenemo has joined #ruby
|DM| has joined #ruby
<banisterfiend> heftig: brb just brushing teeth
<bitserf> heftig: no, it doesn't stop on first false
kerframil has joined #ruby
M- has joined #ruby
<heftig> bitserf: so given [1,2,3,false,4,5,6] you want [1,2,3] and [false,4,5,6] ?
<bitserf> [1, 2, 1].partition{|x| x <= 1} # => [[1, 1], [2]]
<bitserf> is what partition does
<bitserf> i want [[1], [2, 1]]
<bitserf> which #take_while/#drop_while will give me, just wantted to avoid traversing whole sequence twice
<bitserf> but its not the end of the world
ikaros has joined #ruby
<heftig> bitserf: [1,2,3,false,4,5,6].slice_before { |x| !x }.to_a
hubub has joined #ruby
thoradam has joined #ruby
<heftig> or for your case, [1,2,1].slice_before { |x| x == 2 }.to_a
<bitserf> well, now.
<bitserf> i need to reread Enumerable docs it seems. thanks!
johndbritton has joined #ruby
looopy has joined #ruby
hck89 has joined #ruby
Indian has joined #ruby
Foxandxss has joined #ruby
seitensei has joined #ruby
Kambus has joined #ruby
stringoO has joined #ruby
emocakes has joined #ruby
canton8 has joined #ruby
pen has joined #ruby
Talvino has joined #ruby
sterNiX has joined #ruby
dn2k has joined #ruby
robcthegeek has joined #ruby
sat has joined #ruby
rohit has joined #ruby
geofridh has joined #ruby
danielpunt has joined #ruby
pencilcheck has joined #ruby
Kn|t3_ has joined #ruby
adeponte has joined #ruby
workmad3 has joined #ruby
randym has joined #ruby
* Divinite is listening to Us Against The World by Coldplay from Mylo Xyloto.
nixmaniack has joined #ruby
smgt has joined #ruby
* Divinite is listening to Major Minus by Coldplay from Every Teardrop Is a Waterfall - EP.
dibri has joined #ruby
<banisterfiend> Divinite: pls turn that script off ;)
<banisterfiend> Divinite: your taste in the "wuss-rock" genre is embarrassing for all concerned
<Divinite> banisterfiend: Oh I'm really sorry! I didn't realize it was on....
<banisterfiend> hehehe np
<Divinite> *got friends over, who like it.
<Divinite> *can't listen to my real music till they're gone.
ed_hz_ has joined #ruby
berserkr has joined #ruby
looopy has joined #ruby
vraa has joined #ruby
bluenemo_ has joined #ruby
akem has joined #ruby
theishi has joined #ruby
philipp has joined #ruby
M- has joined #ruby
muneeb has joined #ruby
<theishi> is there a library that parses or removes Terminal Control Sequences?
<thoradam> Divinite: You must be a great friend, every time my friends are over I stuff my own musical taste down their throats without any regard for their well being
<Divinite> thoradam: I am :D
tatsuya_o has joined #ruby
<Divinite> thoradam: What is your 'taste' in music?
fr0gprince_mac has joined #ruby
<thoradam> Well, not really a particular genre, I just like music that has crescendo and a story, wether that be post rock or electro
<thoradam> Incidentally that is often not your typical party music :)
<Divinite> thoradam: Make it your typical party music!!!
flippingbits has joined #ruby
<thoradam> You're right!
csherin has joined #ruby
<Divinite> thoradam: We are our own dj's. Let none change that!
<thoradam> I am so psyched right now
<Divinite> That's the power of Divinite!
ph^ has joined #ruby
nixmaniack has joined #ruby
davidpk has joined #ruby
yalue has joined #ruby
MrGando has joined #ruby
headius has joined #ruby
LowKey has joined #ruby
clockwize has joined #ruby
ali_h has joined #ruby
michaelh has joined #ruby
jcromartie has joined #ruby
rohit has joined #ruby
lorandi has joined #ruby
tommyvyo has joined #ruby
bluenemo_ has joined #ruby
sawjig has joined #ruby
gentz has joined #ruby
Clooth has joined #ruby
Pip has joined #ruby
Pip has joined #ruby
d34th4ck3r has joined #ruby
norex has joined #ruby
alup has joined #ruby
Indian has joined #ruby
emocake has joined #ruby
nari has joined #ruby
Mekkis has joined #ruby
the_hack has joined #ruby
sand1 has joined #ruby
otakutomo has joined #ruby
nanderoo has joined #ruby
workmad3 has joined #ruby
johndbri_ has joined #ruby
berkes has joined #ruby
gvt has joined #ruby
tayy_ has joined #ruby
rdw200169 has joined #ruby
gvt has joined #ruby
pu22l3r has joined #ruby
strife25 has joined #ruby
theRoUS has joined #ruby
iamjarvo has joined #ruby
<Gekz> how do you expose a method in a class in such a way as this
<Gekz> foo = @bar.baz
<fr0gprince_mac> anyone have experience with crawling google search results?
<Gekz> good sentence Gekz, lol
<Gekz> class Foo; foo = @bar.baz; end
<heftig> Gekz: what's that supposed to do?
<thoradam> fr0gprince: Nokogiri and open-uri should get you pretty far
<d34th4ck3r> fr0gprince_mac: I have not tried it, but as far as I can think,u just fetch the page , with the exact url.
<Gekz> heftig: basically I want to map a method to a class to one of its internal attribute's methods
<heftig> Gekz: require 'delegate'
<heftig> ah, never mind
sterNiX has joined #ruby
<heftig> just def foo(*args, &blk); @bar.baz(*args, &blk); end
<fr0gprince_mac> thoradam: im doing it that way now but i cant figure out how to extract the exact href from the results
y_matsu_ has joined #ruby
workmad3 has joined #ruby
seanstickle has joined #ruby
PragCypher has joined #ruby
Seisatsu has joined #ruby
fayimora_ has joined #ruby
andrewhl has joined #ruby
Nss has joined #ruby
Spockz has joined #ruby
Willejs_ has joined #ruby
charlenopires has joined #ruby
gvt has joined #ruby
the_hack has joined #ruby
<Gekz> it'd be cool to have a ".=" operator
neurodrone has joined #ruby
<Gekz> replacing the object on the left with one of its attributes or method results
mosca_ has joined #ruby
<mnemonikk> Gekz: doesn't sound like a good idea to me.
zakwilson has joined #ruby
<heftig> a = -3; a .= abs
<heftig> no, that's not nice
emocakes has joined #ruby
<canton7> yeah, I don't think I've ever done anything like a = Foo.new; a = a.bar
<seanstickle> Looks like Forth
ReachingFarr has joined #ruby
sizz_ has joined #ruby
djbender has joined #ruby
dazoakley has joined #ruby
d34th4ck3r_ has joined #ruby
adeponte has joined #ruby
sterNiX has joined #ruby
v0yager has joined #ruby
snearch has joined #ruby
tvw has joined #ruby
djbender has quit [#ruby]
djbender has joined #ruby
tayy has joined #ruby
glosoli has joined #ruby
rippa has joined #ruby
Jackneill has joined #ruby
wroathe has joined #ruby
Emmanuel_Chanel has joined #ruby
abrookins has joined #ruby
looopy has joined #ruby
sprysoft_david has joined #ruby
tommyvyo has joined #ruby
geekbri has joined #ruby
waxjar has joined #ruby
kinderman has joined #ruby
PragCypher has joined #ruby
dazoakley has joined #ruby
Mekkis has joined #ruby
18WABRIAP has joined #ruby
bbttxu has joined #ruby
cantbecool has joined #ruby
cantbecool has quit [#ruby]
Nss has joined #ruby
fakingfantastic has joined #ruby
<fakingfantastic> How can i detect if a string is an MD5 hash?
<ccooke> fakingfantastic: you can't.
<fakingfantastic> ccooke: dang...
<ccooke> fakingfantastic: you can ddetect that a string *could* be a hash - you can check that it has the right length, (binary, base64, hex, etc)
<d34th4ck3r> fakingfantastic: You can try rainbow table.
<fakingfantastic> Writing a script to encrypt a field in a db, but some already are encrypted, don't want to double encrypt
djbender has quit [#ruby]
<ccooke> d34th4ck3r: that'll only tell you what strings - up to a certain length - would generate the equivalent md5. It won't tell you that a random string looking like an md5 *is* an md5.
<ccooke> fakingfantastic: traditional way to deal with that is to prepend something telling what type of hash function is used.
<d34th4ck3r> ccooke: true, thats why I told , he can "try" rainbow table. :)
<seanstickle> encrypting != hashing
<ccooke> d34th4ck3r: :-)
<Tasser> seanstickle, hashing is just a really secure way of encrypting
<seanstickle> Ha
<seanstickle> Touché
<ccooke> seanstickle: Until it gets broken :-)
Willejs has joined #ruby
<seanstickle> That's why my personal hash function returns a single char.
<seanstickle> No way to reverse, I tell you!
<ccooke> seanstickle: sure it can be reversed. Simply torture you until you tell them what it was.
<seanstickle> Oh, it also erases memories.
<seanstickle> I wrote it in Prolog.
<ccooke> wow. Let me guess - if I ask you where I can get it, you forgot? ;-)
<seanstickle> Which makes brains not work so well.
<fakingfantastic> ccooke: also cleaver, thanks
fakingfantastic has quit [#ruby]
gemgale has joined #ruby
TC_ has joined #ruby
mattonrails has joined #ruby
ceej has joined #ruby
<TC_> Hey, can someone explain the if then syntax? Why is the 'then' actually needed?
drknus has joined #ruby
<ccooke> TC_: it isn't, generally
<ccooke> TC_: but if you're writing an if on a single line, it provides a clear break between the test-expression and the then-expression
<TC_> ccooke: http://pastebin.com/9SZg7267 this is where I've got it used.
<ccooke> (A semicolon works as well, of course)
jds has joined #ruby
<gemgale> ccooke is there a simple expl for next in a while loop?
<canton7> TC_, you can strip the 'then's, and that will work just fine
<ccooke> canton7: you don't need a then in that case.
<ccooke> er.
<TC_> :P
<ccooke> interesting tab complete error, there
<ccooke> (s/tab complete/brain/)
<canton7> happens to the best of us
<TC_> Ok thank you, also, can you explain the things like return if $stdin.eof ?
<ccooke> gemgale: as in, what next does?
<gemgale> yes @ ccooke
<ccooke> gemgale: it skips the rest of the current block and progresses to the next item
pschneider_ has joined #ruby
<gemgale> gotcha thank you
<canton7> TC_, statement modifies (do_this if condition_is_true) are a very neat way of doing single-line if statements. So line 2 is equivalent to writing "if $stdin.eof \n return \n end"
iocor has joined #ruby
adeponte has joined #ruby
<TC_> I thought that canton7, thank you.
Targen has joined #ruby
at5l has joined #ruby
ryannielson has joined #ruby
<shevy> it can also be short for conditionals with using the ternary operator
<shevy> return false if 5 > 9
<shevy> return true
<shevy> that's only two lines!
vraa has joined #ruby
<shevy> with ternary it would be one though, but I often find the ternary less readable
PaciFisT has joined #ruby
telling has joined #ruby
telling has joined #ruby
havenn has joined #ruby
<canton7> that can be extended to early-exit, which statement modifies make very readable
bbttxu_ has joined #ruby
td123 has joined #ruby
twelvechairs has joined #ruby
<canton7> nice to see the tradition of irc bots for first ruby projects holding strong :P
<TC_> I followed a mini tutorial on ruby, so that was kind of my first little experimental project :P
kpshek has joined #ruby
<gemgale> and now its mine :P
<ccooke> canton7: heh. I wish I had the time to rewrite mine. It's been in service for about three years now, and I made a total mess on one area in the internals
Helius has joined #ruby
<canton7> ccooke, nice. Rewrite it without looking at the original, then look back... And groan at the horrible hacks used in the original, but also admire someof the neat tricks you came up with :P
<canton7> then do the same in another 3 years...
vraa has joined #ruby
<ccooke> canton7: aye. It's an interesting mix of some good and bad abstractions
<ccooke> canton7: although the modularity, threading and reloading bits are good enough that I've since reused them in two different work projects :-
<twelvechairs> anyone here use sublime text?
<ccooke> )
<ccooke> canton7: Threads that redefine themselves on a reload are a nice thing.
carlyle has joined #ruby
dzhulk has joined #ruby
moshef has joined #ruby
<thoradam> twelvechairs: Yup, it's awesome
strife25 has joined #ruby
hoelzro has joined #ruby
<twelvechairs> thoradam: For some reason when I 'build' something, it doesn't show up the GTK windows I should be creating. You don't know anything about that side of things at all do you?
telling has joined #ruby
telling has joined #ruby
<thoradam> No idea, haven't used it for this purpose, sorry
emptyflask has joined #ruby
philcrissman_ has joined #ruby
medik has joined #ruby
Seisatsu has joined #ruby
dv310p3r has joined #ruby
<twelvechairs> thoradam: thanks anyway :)
andrewhl has joined #ruby
loonysalmon has joined #ruby
ph^ has joined #ruby
<loonysalmon> Hi, I've got a question regarding ActiveRecord and ruby. A past employee at this office was previously listing all records in a class by doing something to the tune of <% Category.all.each do |category| %>
<loonysalmon> When a new category was added into this list the list now doesn't display in the alphabetical order that it once was so I wanted to sort by the title field.
<loonysalmon> I assumed that <% Category.find(:all, :order => "title, ASC").each do |category| %> would do the trick but I'm not remotely a ruby programmer.
<ukwiz> how do I set the default version of ruby using rvm?
<loonysalmon> Now it doesn't display a lick of anything and I'm having some trouble figuring out why.
Karmaon has joined #ruby
Sailias has joined #ruby
philipp has joined #ruby
medik has joined #ruby
<seanstickle> loonysalmon: Category.order("title ASC").all.each
iocor has joined #ruby
<twelvechairs> ukwiz: rvm --default use
<twelvechairs> ukwiz: though im sure you can google that pretty simply
madmax_ has joined #ruby
jgarvey has joined #ruby
snip_it has joined #ruby
the_hack has joined #ruby
<loonysalmon> seanstickle: that didn't seem to do it :-\
<seanstickle> loonysalmon: what version of ActiveRecord are y'all using?
<seanstickle> Try this anyways, Category.all(:order => "title ASC").each do |category|
crankycoder has joined #ruby
sleetdrop has joined #ruby
theRoUS has joined #ruby
<Willejs> hi, how do i create an array of hashes in ruby?
<seanstickle> [{},{}]
<twelvechairs> Willejs: [{},{}]
<seanstickle> Ha
<undersc0re> ^^
<undersc0re> easy
<twelvechairs> seanstickle: hehe :)
<Willejs> huh? can you explain please?
<drizz> it's an array of hashes
<Willejs> oh, hah
norex has joined #ruby
<loonysalmon> My lord that worked seanstickle. You are a rockstar
<seanstickle> loonysalmon: don't overplay the significance. ;)
Jay_Levitt has joined #ruby
<loonysalmon> If you can get a stranglehold of ruby you can easily get the hot chick in the bar.
<any-key> true story
<undersc0re> I can't :|
<seanstickle> I also know APL.
<seanstickle> Does that mean I can date supermodels?
<loonysalmon> Nah, just the small-town hottie. ;)
<twelvechairs> loonysalmon: I think you need a different kind of ruby for that
medik has joined #ruby
<loonysalmon> Now humor me on this. Say I wanted to exclude the first record, i.e. ID 1, how would I go about doing that. find?
pi3r has joined #ruby
enroxorz has joined #ruby
<seanstickle> :offset => 1
idletom has joined #ruby
randym has joined #ruby
<Willejs> can anyone check this out for me?
<Willejs> I'm trying to create an array of hashes, and the hashes work, but can't get them into the array
<shevy> first, please
<shevy> align properly
<undersc0re> yes
<undersc0re> alignment is major
gemgale has joined #ruby
<shevy> yeah well it makes it easier for other people to look at such code
theanalyst has joined #ruby
<Willejs> yeah, i kind of know this
<shevy> second, I think using http://pastie.org/ is much better than pastebin
<Willejs> i need to look at it
denom has joined #ruby
<undersc0re> Pastie is a lot better
<seanstickle> Willejs: you're missing at least one "end" in that
<shevy> next thinkg is, I dont know what srpid contains
<shevy> *thing
<Willejs> sorry theres extra end in there..
<Willejs> it contains two hashes in an array, then i extract those values
<shevy> you can use {} rather than do/end if you are unable to indent ;)
<shevy> can you do require 'pp', then pp srpid and put this on pastie.org pls
<shevy> and also align properly when you do
Foxandxss has joined #ruby
<shevy> it's just no fun to look at that mess right now
<Willejs> pp?
<shevy> pp pretty print
<shevy> it is part of standard ruby library
<shevy> but you must require it first before you can use it
<Willejs> what does it do?
Pip has joined #ruby
Pip has joined #ruby
axl__ has joined #ruby
<Willejs> oh wait, i can't do that because srpid is a result from mysql2 and you can only do srpid.each on that object
<undersc0re> Willejs: prettyprint
pen has joined #ruby
<shevy> Willejs, that is what it does http://pastie.org/3432349
<shevy> what are you talking about
shtirlic has joined #ruby
<shevy> sprid is a variable
<shevy> in ruby code
<shevy> of course you can do pp
<twelvechairs> Willejs: you are missing the 'end' to your 'if' statement....
<undersc0re> or you could just do: @this = 'that' if blah == 'nope'
<Willejs> sorry, there is another end in there
<shevy> hehehehe
<Willejs> sprid is an object created by the mysql2 gem
<Willejs> its not a variable as far as i know
<Willejs> i do sprid.class => Mysql2::Result
<loonysalmon> seanstickle: are you ready to cringe?
<seanstickle> loonysalmon: sure
<loonysalmon> activerecord (2.3.5, 2.3.2) activerecord (2.3.5, 2.3.2)
undersc0re_ has joined #ruby
havenn_ has joined #ruby
<seanstickle> Yeah, I expected so.
<seanstickle> No worries, plenty of people using that.
<canton7> Willejs, it's a variable. Its value has the type Mysql2::Result, but you can still pp it
<Willejs> okay
<loonysalmon> I guess i need to find the docs for 2.3.5 and go from there to find what's available to me
mkscrg has joined #ruby
<loonysalmon> I just tried doing <% Category.find(1).each do |category| %> and it won't even display now :-\
medik has joined #ruby
<loonysalmon> What I'm trying to do is list the first one as it's essentially supposed to be first, and then list the remaining ones after it sorted alphabetically.
<shevy> Willejs I see. so Mysql2 has defined .each for its datastructure
<seanstickle> loonysalmon: find(1) will only return a single thing, not an array that you can "each" over.
<shevy> still you can use pp everywhere in your code
<shevy> then you will quickly see why your hash is empty
sernin has joined #ruby
<loonysalmon> seanstickle: so I could essentially just use that in place of where I would use the category variable, right?
voodoofish has joined #ruby
Norrin has joined #ruby
andrewhl has joined #ruby
carlyle has joined #ruby
Jooka has joined #ruby
<sleetdrop> anyone knows how to configure textmate2 to work with rbenv
Mosselman has joined #ruby
munx has joined #ruby
<Willejs> shevy: thanks. i realised its creating several araysof hashes...
<Mosselman> hi guys, I am trying to disable SSL in my app because I am getting this error: OpenSSL::SSL::SSLError at /auth/github/callback
<Mosselman> SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
<Mosselman> but I have no idea how to
<Mosselman> it is a soprano app
bagratte has joined #ruby
nowthatsamatt has joined #ruby
ElderFain has joined #ruby
otakutomo has joined #ruby
<twelvechairs> Willejs: I've cleaned up your code a bit. (not sure what srpid is - assumed it was like an array of hashes) http://pastie.org/3432381
mahlon has joined #ruby
csherin has joined #ruby
excel542 has joined #ruby
`brendan has joined #ruby
codespectator has joined #ruby
<Willejs> twelvechairs: thanks! i used that and refactored some code to fix it
<Willejs> i declared the array in the wrong place...
<undersc0re_> Willejs: pp fixes shit
<undersc0re_> thats what it's designed for :)
the_hack has joined #ruby
<twelvechairs> Willejs: do you really need the end result as an array of hashes though? Probably easier as a single hash?
shtirlic has joined #ruby
hosiawak has joined #ruby
Jooka has joined #ruby
<Willejs> twelvechairs: well i need to create a json, and it seemed the easiest way to do it?
medik has joined #ruby
<Willejs> well, i need to transport the array over msgpack somehow too
<Willejs> is an array of hashes similar to a map?
IAD has joined #ruby
spanner has joined #ruby
asobrasil has joined #ruby
Morkel has joined #ruby
excel542 has joined #ruby
<loonysalmon> seanstickle: Thanks man. I was able to figure out what I needed after your help.
<loonysalmon> Final code that I will never touch again: <li><%= secondary_nav_link_to Category.find(1).title, Category.find(1) %></li><% Category.find(:all, :order => "title ASC", :conditions => ["id NOT IN (?)", [1]]).each do |category| %><li><%= secondary_nav_link_to category.title, category %></li><% end %>
zoidfarb has joined #ruby
tilde` has joined #ruby
<loonysalmon> Maybe someday I'll come back to Ruby when I can write my own application.
<zoidfarb> Hey there, I'm a python programmer who's interested in learning ruby (and, eventually, rails). Could somebody point me in the direction of introductions/tutorials that would be helpful for me?
gokul has joined #ruby
undersc0re has joined #ruby
<zoidfarb> thanks
chimkan_ has joined #ruby
bbttxu_ has joined #ruby
v0n has joined #ruby
looopy has joined #ruby
Faris has joined #ruby
enherit has joined #ruby
mxweas_ has joined #ruby
jcromartie has joined #ruby
ckrailo has joined #ruby
aibo has joined #ruby
Jamoka has joined #ruby
medik has joined #ruby
yoklov has joined #ruby
undersc0re_ has joined #ruby
maletor has joined #ruby
mikepack has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
Kn|t3_ has joined #ruby
iamjarvo has joined #ruby
MasterIdler_ has joined #ruby
<Willejs> has anyone parsed much from hashes to json in ruby?
<Willejs> im a bit stuck.
<Willejs> i need to basically put several hashes in an array, then that array in a hash and parse it out to json
<Willejs> but i get {} delimiting every hash in the array.
skitrees has joined #ruby
CannedCorn has joined #ruby
victork has joined #ruby
Kn|t3__ has joined #ruby
uxp has joined #ruby
sonkei has joined #ruby
Excurio has joined #ruby
Excurio has joined #ruby
Excurio has joined #ruby
medik has joined #ruby
bagratte has joined #ruby
sat has joined #ruby
elliot98 has joined #ruby
Excurio has joined #ruby
Excurio has joined #ruby
lkba has joined #ruby
hasrb has joined #ruby
adamjleonard has joined #ruby
kenperkins has joined #ruby
kelseyhightower has joined #ruby
Silowyi has joined #ruby
hukl_ has joined #ruby
caiges has joined #ruby
hubub has joined #ruby
aibo has joined #ruby
medik has joined #ruby
daniel_hinojosa has joined #ruby
wilmoore has joined #ruby
gabeh has joined #ruby
jgrevich has joined #ruby
nyrb has joined #ruby
evenix has joined #ruby
bglusman has joined #ruby
waxjar has joined #ruby
virunga has joined #ruby
medik has joined #ruby
minijupe has joined #ruby
Nowaker has joined #ruby
triptec has joined #ruby
cantonic has joined #ruby
<cantonic> guys, which Ruby version would you recommend at the moment? 1.9.3-head?
probst has joined #ruby
fayimora has joined #ruby
<cantonic> or should I always use one lower version? (1.9.2)
<heftig> 1.9.3
<cantonic> heftig: which vesion of it?
<cantonic> head?
<cantonic> i heard that some people have problems getting 1.9.3-mac up and running on mac
<heftig> cantonic: i just run the latest release
<heftig> ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
<cantonic> ok. will try that. thank you heftig
Indian has joined #ruby
Rasi has joined #ruby
<Rasi> hi
<Rasi> i found this mpd ruby script that writes all mpd songs into a html file
medik has joined #ruby
<Rasi> anyone here who knows about librmpd that knows how to change this to only fetch albums instead of tracks?
<Rasi> this is the script
<Rasi> very simple
<Rasi> the way i do it now is to not let it write song.title, but it still writes one line per song in this case... i have to remove duplicate lines afterwards
gvt has joined #ruby
zomgbie has joined #ruby
epochwolf has joined #ruby
<canton7> Rasi, http://librmpd.rubyforge.org/docs/classes/MPD.html looks rather relevant
<cantonic> heftig: installation failed :)
<cantonic> i think i should go with 1.9.2
hukl has joined #ruby
banseljaj has joined #ruby
madmax_ has joined #ruby
iocor has joined #ruby
alex__c2022 has joined #ruby
artOfWar has joined #ruby
cloke has joined #ruby
rawbeef64 has joined #ruby
banisterfiend has joined #ruby
Spockz has joined #ruby
fayimora_ has joined #ruby
tectonic has joined #ruby
luxurymode has joined #ruby
Kn|t3_ has joined #ruby
ph^ has joined #ruby
probst has quit [#ruby]
eywu has joined #ruby
ed_hz_ has joined #ruby
havenn has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
<td123> cantonic: is 1.9.2 provided by your distro?
sizz has joined #ruby
<td123> you could also use rvm to install 1.9.3p125, it will probably work
<cantonic> td123: i tried with rvm
<cantonic> no problem. 1.9.2 is enough
artOfWar has joined #ruby
Guest___ has joined #ruby
davidcelis has joined #ruby
medik has joined #ruby
hron84 has joined #ruby
pu22l3r has joined #ruby
matthias_ has joined #ruby
Rasi has quit ["WeeChat 0.3.6"]
jgrevich has joined #ruby
looopy has joined #ruby
conor_ireland has joined #ruby
* d34th4ck3r has fallen in love
tatsuya_o has joined #ruby
rbennacer has joined #ruby
<rbennacer> hello guys , i am having trouble to use RVM in my cronjobs
<rbennacer> i need help please
_srp has joined #ruby
demet8 has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
<rbennacer> the cron job is not working = */1 * * * * /home/rbennacer/.rvm/environments/ruby-1.9.2-p290 /home/rbennacer/json_test.rb >> tt3
hasrb has joined #ruby
Mekkis has joined #ruby
lorandi has joined #ruby
stkowski has joined #ruby
tayy has joined #ruby
tectonic has joined #ruby
<davidcelis> um
<rbennacer> hello
<davidcelis> rbennacer: is /home/rbennacer/.rvm/environments/ruby-1.9.2-p290
<davidcelis> actually the executable?
<davidcelis> not a directory?
<rbennacer> yes
<davidcelis> huh
<rbennacer> it is an executable
DrShoggoth has joined #ruby
<davidcelis> if you run that command by itself, you get the output of json_test.rb in that tt3 file?
<davidcelis> where is tt3 anyway?
<davidcelis> don't you need an absolute path in there?
<rbennacer> let me try it
zachc has joined #ruby
dzhulk has joined #ruby
Araxia has joined #ruby
<zachc> anyone around to explain something to me?
steg132 has joined #ruby
codespectator has joined #ruby
belerenjace has joined #ruby
looopy has joined #ruby
Murr_ has joined #ruby
<rbennacer> but if i do /usr/local/rvm/bin/ruby-1.9.2-p290 /home/rbennacer/json_test.rb
philips has joined #ruby
<rbennacer> i can see
<rbennacer> /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- yajl (LoadError)
<rbennacer> from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<rbennacer> from /home/rbennacer/json_test.rb:3:in `<main>'
hadees has joined #ruby
ninor has joined #ruby
munx has joined #ruby
ninor has joined #ruby
strife25 has joined #ruby
kjellski has joined #ruby
rushed has joined #ruby
<zachc> in the example code "open("/etc/yum.repos.d", "wb") do |file|"
<zachc> what does "wb" do/mean?
<seanstickle> write-binary file type
eywu has joined #ruby
<zachc> seanstickle: thanks, now maybe you can help me with this one too
<zachc> where would I find that?
khakimov has joined #ruby
<zachc> where can I find a list of all the possible entries to fill for "wb" or whatever other options there might be
<zachc> rbbr crashes for me
otakutomo has joined #ruby
Kn|t3__ has joined #ruby
werdnativ has joined #ruby
CacheMoney has joined #ruby
<zachc> seanstickle: I'm using 1.8.7 and that similar corresponding section isn't really helping me with that
pu22l3r has joined #ruby
medik has joined #ruby
<banseljaj> https://gist.github.com/1879355 -- need a bit of code review. :]
idletom has joined #ruby
ninor has joined #ruby
ninor has joined #ruby
adamkittelson has joined #ruby
<seanstickle> zachc: is what google tells me. maybe it will help you too.
<banseljaj> seanstickle: halp?!
hadees has joined #ruby
<canton7> banseljaj, put line 18 on the end of line 17. You dont' actually tell him if what he's typed is wrong (might not be a problem). doen-sentences won't do what you want
<canton7> *done_sentences
<canton7> banseljaj, personally, I'd put "@done_sentences" in initialize, then use "@done_sentences << sentence" on line 26
<banseljaj> canton7: okay.
<zachc> seanstickle: ok, based on the stack overflow that you sent me, for linux systems, would the b option cause issues? would it be ignored?
<canton7> oops, put "@done_sentences = []" in initialize
<seanstickle> zachc: what is your prediction?
adfadfafadsf has joined #ruby
<zachc> seanstickle: that it would cause issues and crash the script
<seanstickle> zachc: give it a try
<seanstickle> zachc: and you will be able to confirm or deny that hypothesis
hron84 has quit [#ruby]
<heftig> banisterfiend: can you spot the odd one out? http://www1.dict.cc/?s=reizend
<zachc> seanstickle: in retrospect it was a dumb question, the script is meant to be run on redhat based distros
<banseljaj> canton7: trying it now.
eldariof has joined #ruby
ed_hz_ has joined #ruby
ikaros has joined #ruby
<canton7> banseljaj, as it is, @done_sentences is always set to [] before an item is added to it, so it will only ever have one item in
afex has joined #ruby
medik has joined #ruby
SexyAndIKnowIt has quit [#ruby]
<banseljaj> canton7: I understand now.
iamjarvo has joined #ruby
<canton7> banseljaj, also, Array#push returns the item which was pushed onto the array, not the array itself. It's self-modifying
Kn|t3_ has joined #ruby
banisterfiend has joined #ruby
punkrawkR has joined #ruby
Kn|t3___ has joined #ruby
<zachc> seanstickle: thanks for all the help though
ikaros has joined #ruby
tvo has joined #ruby
stephans has joined #ruby
apeiros_ has joined #ruby
badabim has joined #ruby
pdtpatr1ck has joined #ruby
ale` has joined #ruby
alfism has joined #ruby
virunga has joined #ruby
mrsolo has joined #ruby
<banseljaj> canton7: Are you part of the ruby mentors program?
n3m has joined #ruby
<canton7> banseljaj, I've never heard of that, so no :P
<deryldoucette> banseljaj: i think that is seacreature
<banseljaj> :D
<deryldoucette> you mean the Mendicant University stuff?
<banseljaj> No. It was on the ruby website.
<deryldoucette> ah
<banseljaj> It might be defunct.
* banseljaj needs someone to bug about his code. :(
nfluxx has joined #ruby
Russell^^ has joined #ruby
headius has joined #ruby
hron84 has joined #ruby
eignerchris has joined #ruby
IAD1 has joined #ruby
macmartine has joined #ruby
ryannielson has joined #ruby
ph^ has joined #ruby
cbuxton has joined #ruby
<etehtsea> how to compile 1.9.x ruby without tk?
<etehtsea> --without-tk --without-tcl don't work anymore
<shevy> etehtsea hmm indeed
<shevy> although
<shevy> ruby 1.8.x neither has these options
rdw200169 has joined #ruby
<shevy> I guess it still resides under ext/tk and will check for the availabilty of tcltklib.so
belerenjace_ has joined #ruby
medik has joined #ruby
tatsuya_o has joined #ruby
ph^ has joined #ruby
sdferfx has joined #ruby
<etehtsea> --with-out-ext=tk\* seem to work
<sdferfx> I get an error that reads: xxxxx.rb:103:in `kill': wrong argument type Thread (expected Thread) (TypeError) . Anyone know why I would be getting this? It's definitely weird, and as you can see, I am passing the expected type...
flagg0204 has joined #ruby
<etehtsea> or not
<shevy> etehtsea I suppose there is no way, it may be automatic. perhaps rename the files or move them to another location until ruby is compiled
bluOxigen has joined #ruby
symb0l has joined #ruby
dibri has joined #ruby
<etehtsea> shevy, thanks, not a big deal in total
redjack1964_ has joined #ruby
<shevy> hehe
runeb has joined #ruby
<shevy> take cmake projects
<shevy> I never found out how to enable or disable something before compiling
voodoofish430 has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
hasrb has joined #ruby
tayy has joined #ruby
KL-7 has joined #ruby
n3m has joined #ruby
conor_ireland has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
rbennacer has quit ["Leaving"]
nerdy has joined #ruby
havenn has joined #ruby
eignerchris_ has joined #ruby
gianlucadv has joined #ruby
symb0l has joined #ruby
<werdnativ> how do you check if a passed argument is Hash-like? (OpenStruct, etc.) because arg.respond_to?(:[]) also includes arrays with integer keys
<werdnativ> actually never mind, openstruct is not hash-like, don't know why I thought it was...
gemgale has joined #ruby
<banseljaj> Is there any way to start an "each" block from a specific index?
cjlicata has joined #ruby
<banseljaj> I want to discard the first value of my array.
jpreyer has joined #ruby
n3m has joined #ruby
Deele has joined #ruby
<Deele> hey
<Deele> is it possible to create some sort of event/signal system in ruby?
<rippa> sure
<rippa> look at Observable module
<rippa> for example
philcrissman has joined #ruby
<seanstickle> Or http://coolio.github.com/
<seanstickle> :)
<Excureo> banseljaj: array[1..-1].each { |e| ... }
<banseljaj> Excureo: Thanks
<Excureo> banseljaj: array[1..-1] will return nil if the array is empty, though, so be careful.
glosoli has joined #ruby
carlyle has joined #ruby
<rippa> array[1..-1].drop(1) { |e| ... }
<rippa> I mean
<rippa> array.drop(1) { |e| ... }
dejavu has joined #ruby
internet_user has joined #ruby
<werdnativ> does ruby 1.9 have anything for module accessors (a la mattr_accessor or cattr_accessor) besides class << self; attr_accesor ?
<Excureo> Array#drop isn't in 1.8.6, unfortunately; although I'm not sure if many people besides me are still using it.
dejavu has quit [#ruby]
munx has joined #ruby
munx has joined #ruby
udante has joined #ruby
stringoO has joined #ruby
glosoli has joined #ruby
luckyruby has joined #ruby
<Hanmac> 1.8.6 is marked as dead
<deryldoucette> we still have users in our userbase (RVM) that use it
niklasb has joined #ruby
<davidcelis> use 1.8.6?
<davidcelis> lol
<Hanmac> exist an real reason why there are doing it? or only to lasy to update?
<deryldoucette> yep
<deryldoucette> some are due to not being allowed to upgrade by managment, others because they haven't done the shift yet
<deryldoucette> kmost appear to be transitioning to 1.9,3 though
<deryldoucette> err most
fayimora has joined #ruby
kpshek has joined #ruby
gemgale has joined #ruby
emocake has joined #ruby
<shevy> hmm
<shevy> the changes from 1.8.6 to 1.8.7 are really minor
<shevy> should any 1.8.6 transition to 1.9.3, this change is a lot more major, so that isn't entirely consequential for management to forbid the transition towards 1.8.7
<shevy> if they allow the other transition that is
<Hanmac> users that use ruby < 1.8.7 use also IE6
eighty4 has joined #ruby
<shevy> poor souls :(
thebope has joined #ruby
minijupe has joined #ruby
avandenhoven has joined #ruby
eignerchris has joined #ruby
PragCypher has joined #ruby
emocake has joined #ruby
wyhaines has joined #ruby
atmosx has joined #ruby
<rtl> a
Drewch has joined #ruby
Drewch has quit ["[Textual IRC Client: http://www.textualapp.com/]"]
Drewch has joined #ruby
shell0x_ has joined #ruby
<RubyPanther> "Ruby 1.8 don't have future. And Ruby 2.0 is coming." -- Yugui
<deryldoucette> Come on Ruby 2.0!
<shevy> hehe
negative has joined #ruby
<RubyPanther> Also the difference between 1.9 and 2.0 will be smaller than 1.8 and 1.9
unixjazz has joined #ruby
<deryldoucette> doesn't mean managers know that (or even care) they know something is 'working right now'. usually all they care about
<RubyPanther> Originally 1.9 was dev for 2.0, but it turned into a release because they wanted it now and it was going to take too long.
<RubyPanther> So we mostly already have it.
hoelzro has quit [#ruby]
gianlucadv has joined #ruby
larstobi has joined #ruby
fridim_ has joined #ruby
<shevy> but the version number is not 2.0
Paul-Atreides has joined #ruby
Paul-Atreides has joined #ruby
kirun has joined #ruby
Paul-Atreides has quit [#ruby]
<deryldoucette> doesn't really matter to *me*. I've been using 1.9.x since it was released. Using 1.9.3-p125 for probably 99% of projects. the remainder using either 1.9.2-p290 or 1.9.3-p0
<Excureo> Hanmac: The reason I use 1.8.6 is ebcause the Qt3 bindings don't work with 1.9; and 1.8.7, for some bizarre reason, included a lot of added functionality, at least one piece of which clashed with code I had.
<Excureo> Once I port Qt3 stuff to Qt4, I'll probably switch to 1.9...
tatsuya_o has joined #ruby
pu22l3r has joined #ruby
<RubyPanther> That's the point of 1.8.7 it includes all the new stuff that can easily be backported, for people with legacy systems. So they only have to make small changes. But still can use most modern gems.
workmad3 has joined #ruby
<Hanmac> isnt QT3 dead too?
<banseljaj> My code isn't showing unicode characters properly.
Knodi has joined #ruby
<Excureo> Hanmac: That seems rather irrelevant considering that I have Qt3 code. Dead or not, it won't be porting itself. And I have no pressing need to port it, so *shrug*
<Excureo> It's not like I'm dying for Ruby 1.9 features.
badabim has joined #ruby
Knodi has quit [#ruby]
adambeynon has joined #ruby
eywu has joined #ruby
havenn has joined #ruby
jamw has joined #ruby
mxweas_ has joined #ruby
<Tasser> in nokogiri, how can I get the text of the current node only?
berkes has joined #ruby
<epochwolf|vps> Tasser: text()?
eywu has joined #ruby
<Tasser> epochwolf|vps, kind of, yep
<Tasser> xpath("text()").to_s
<shevy> Excureo hehe me neither
<epochwolf|vps> Tasser: :o… that's evil
gabeh_ has joined #ruby
<shevy> sadly Qt3 died
Foxandxss has joined #ruby
pu22l3r has joined #ruby
banisterfiend has joined #ruby
Targen has joined #ruby
fridim_ has joined #ruby
justinmcp has joined #ruby
<Tasser> epochwolf|vps, wayne
<epochwolf|vps> ?
tayy_ has joined #ruby
<Tasser> epochwolf|vps, wayne interessierts => german meme for "who cares"
<epochwolf|vps> not sure why you are telling me.
<Tasser> epochwolf|vps, because you asked
<banseljaj> How do i ask split to split at either of two terminators Without using regular expression?
* epochwolf|vps blinks
SegFaultAX|work has joined #ruby
nonotza has joined #ruby
jfelchner has joined #ruby
<canton7> banseljaj, what's wrong with a regex?
<banseljaj> canton7: I don't know regex. :(
<epochwolf|vps> LOL
<epochwolf|vps> LURN
<shevy> banseljaj what is your input string
<banseljaj> trying to. :D
stat1x has joined #ruby
<shevy> otherwise, you will need to use .split two times
<canton7> http://rubular.com/ also
<banseljaj> It has to split at either ".i " or "ni'o"
<shevy> easy
stoffus has joined #ruby
<shevy> (1) run it into a method which returns what you need
<shevy> (2) then, in that method, do the splitting. splitted = input.split('.i') if input.include? '.i'
<shevy> same for "ni'o"
<shevy> you dont need a regex but you need to know ruby :P
<banseljaj> thanks canton7 and shevy
<epochwolf|vps> banseljaj: regex is very good to know the basics of. Just odn't use it for everything :)
<epochwolf|vps> And never, never, never parse html with regex.
madmax- has joined #ruby
looopy has joined #ruby
ixti has joined #ruby
GiambalaGiambala has joined #ruby
ph^ has joined #ruby
ciopte7 has joined #ruby
<davidcelis> erryday i'm parsin'
kerframil has joined #ruby
y2j has joined #ruby
hooper_ has joined #ruby
virunga has joined #ruby
<shevy> lol
<shevy> while shuffling
denom has joined #ruby
afex has joined #ruby
<Deele> I'm trying to install a https://github.com/tarcieri/cool.io as I understood, it is a gem, I cloned that git, trying to "gem build cool.io.gemspec", but it says "invalid gemspec", am I doing something wrong? "gem install cool.io" returns "The 'iobuffer' native gem requires installed build tools."
gener1c_ has joined #ruby
<Deele> seanstickle, can you help?
bglusman has joined #ruby
nemesit has joined #ruby
hck89 has joined #ruby
<davidcelis> Deele: do you have build tools installed?
<davidcelis> gcc?
<Deele> I guess no
<davidcelis> make sure: `which gcc`
matthias_ has joined #ruby
<Deele> win7 platform
<davidcelis> lol
undersc0re has joined #ruby
<davidcelis> dunno
<davidcelis> i don't recommend ruby/rails dev on a windows platform, and not many people will
<davidcelis> honestly your best bet is installing Ubuntu in a VM using virtualbox or something
<Deele> afaik, no problem, as ruby is multi-platform
<davidcelis> if you really want to develop on windows, i have no advice for you as i've not desired to torture myself so. but i'll keep you in my prayers
<Deele> thanks
rtl has joined #ruby
s0ber_ has joined #ruby
y3llow_ has joined #ruby
<Deele> davidcelis, but gem commands function same as on unix, isn't it?
<Deele> I'm just newbie with all of this gem/ruby stuff
<Deele> but I use unix too, at work
<Deele> is gem same as unix package manager, or is it more like unzip'per? :)
<Mon_Ouie> It's more like a package manager
<Mon_Ouie> (Specifically for Ruby stuff; mostly libraries)
<Deele> so, I should download that specific library
<robacarp> man vim macros
<Deele> go to that directory
<Deele> and gem install <library>?
<davidcelis> you dont need to be in a directory to install gems, they all get installed to the same place
<Deele> sorry for stupid questions
<davidcelis> anyway, your problem is that the 'iobuffer' gem, which is a dependency of cool.io, requires C build tools
y3llow has joined #ruby
<davidcelis> which you probably dont have installed
<davidcelis> because they are not installed by default on windows
<Deele> that's that DevKit library?
workmad3 has joined #ruby
<davidcelis> dunno how to install it on windows. again, im the wrong person to ask; i dont develop on windows
<davidcelis> just telling you that you need it :)
nyuszika7h has joined #ruby
<Deele> ok, thanks for lead
<Deele> now I know, why there is such a download, at rubyinstaller page :)
tilde` has joined #ruby
<Mon_Ouie> Yes, the devkit package with RubyInstaller is what you need
briankbuckley has joined #ruby
rtl has joined #ruby
y3llow has joined #ruby
<Mon_Ouie> (Also notice some libraries may rely on stuff that doesn't work on Windows)
xec has joined #ruby
kpshek has joined #ruby
rtl has joined #ruby
imami has joined #ruby
<Deele> so, gem install <library> will search in remote repositories, for that library, I dont need to download it manually?
<Mon_Ouie> Yep, it will do that (unless there's a <library>.gem file in the current directory, then it will use it instead)
<Deele> oh, neat
telling has joined #ruby
xec has quit [#ruby]
<Deele> damnit "make: *** [stat_watcher.o] Error 1"
<Deele> Mon_Ouie, can you help more? http://pastie.org/3434663
tilde` has joined #ruby
notjohn has joined #ruby
gemgale has quit [#ruby]
bglusman has joined #ruby
DDAZZA has joined #ruby
<Mon_Ouie> No, sorry; I'm not sure what dependency could be missing there
philcrissman_ has joined #ruby
Jrz has joined #ruby
BlueMatt has joined #ruby
<BlueMatt> anyone have any clues why a ruby call to system!(...) would never return even if the command is clearly returning?
ryannielson has quit [#ruby]
seanp2k has joined #ruby
tayy has joined #ruby
<seanp2k> how can I time loop iters with not much code?
cespare has joined #ruby
<seanp2k> can I just store time with usec, then next iter compare with stored, subtract, then replace stored with new time?
<seanp2k> like use Time.now.to_f ?
havenn has joined #ruby
odinswand has joined #ruby
Divinite has joined #ruby
wookiehangover has joined #ruby
unixjazz has joined #ruby
tayy_ has joined #ruby
hasrb has joined #ruby
wallerdev has joined #ruby
tayy has joined #ruby
the_hack has joined #ruby
<BlueMatt> system!(...) where ... is a call to a bash script which ssh's into a local vm, executes a script there, then returns
metrix has joined #ruby
<shevy> what
<shevy> and btw I never saw "system!" before
<BlueMatt> when called manually, that call only opens one child pid (ssh) which exits
<shevy> have you tried with `` instead btw?
<BlueMatt> I know almost no ruby (im hacking on something someone else wrote), but the same happens when its called without the !
<BlueMatt> (I assumed it was some kind of fail if this returns non-0 or something)
<shevy> well
<shevy> it's kinda crazy to call a bash script in ruby
<shevy> I am just glad to have stopped writing shell scripts. I use ruby for all scripting needs.
<BlueMatt> well, I suppose one could easily call ssh directly in ruby and pipe in the neccessary info?
<metrix> I want to create a method that I can call with 1 or 0 arguments.. like test() or test('abc') is this possible?
wallerdev has joined #ruby
odinswand has joined #ruby
TheTFEF has joined #ruby
<BlueMatt> the odd part is it only happens in a few target scripts (ie the script that is run on the local vm)
hobodave has joined #ruby
<BlueMatt> and it usually has to do with loading faketime in the target script, but just using faketime doesnt case it, its only in some scripts...
Nowaker has joined #ruby
<canton7> metrix, def test(arg='abc') ....
fermion has joined #ruby
<metrix> cool, thank you!
Willejs has joined #ruby
Faris has quit [#ruby]
virunga has joined #ruby
Divinite has joined #ruby
waxjar has joined #ruby
serpa has joined #ruby
Nowaker has joined #ruby
jergason has joined #ruby
axl_ has joined #ruby
Divinite has joined #ruby
DrShoggoth has joined #ruby
chrxn has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
rramsden has joined #ruby
mgraham has joined #ruby
iamjarvo has joined #ruby
zakwilson has joined #ruby
zakwilson has joined #ruby
strife25 has joined #ruby
Mohan__ has joined #ruby
Zolrath has joined #ruby
Drewch has joined #ruby
redjack1964_ has joined #ruby
Divinite has joined #ruby
sandbags has joined #ruby
burgestrand has joined #ruby
<sandbags> How are people who are using Xcode 4.3 (and, hence, the updated Clang based compiler tools) compiling Ruby 1.9.3-p125 ?
<shevy> with a lot of luck and by praying daily
<UdontKnow> I think I can only use 4.2 here
<sandbags> my understanding was that clang was, at least intended to be, a drop in replacement for GCC
<sandbags> i'm not clear why ruby has a problem with it, anyone?
zakwilson has joined #ruby
<UdontKnow> sandbags: actually, _should_ doesnt mean _is_ :)
<sandbags> UdontKnow: yes of course, that's the crux of my question
Mchl has joined #ruby
<UdontKnow> sandbags: clang is not the same as gcc, lots of projects are doing big changes to support both.
<UdontKnow> sandbags: clang has some more adherence to standards, and some gcc-only hacks dont work; its less mature too, and might not support everything gcc does in all these years
matthias3 has joined #ruby
h4mz1d has joined #ruby
<shevy> anyone of you often finding the need to convert true -> yes and false -> no ?
<shevy> "Will we clean up after running this script? Yes/No"
<UdontKnow> shevy: huh?
<shevy> you never have had that need?
<Deele> in programmers world, true/false is good enough
<Deele> i
aef has joined #ruby
<shevy> yeah but for outputting something in english
<shevy> "Will we clean up after running this script? True/False"
<Deele> true/false is in english
<shevy> what kind of english are you using :P
apeiros_ has joined #ruby
<Deele> just state that question, so that it can be answered by true false
<Deele> Accept cleanup after execution? True/false
<shevy> Let's drink some coffee?
jwang has joined #ruby
mxweas_ has joined #ruby
<aef> hi, I specified redcarpet as development dependency for my gem because I'm using markdown for documentation. now travis-ci fails because jruby native extensions can't be installed. is there any nice way around this?
<davidcelis> Let's drink some coffeescript?
<headius> you can turn on native exts on travis
<headius> they're just off by default for jruby
tayy has joined #ruby
<sandbags> shevy: accepting you are right, is that a problem?
tommyvyo has joined #ruby
theRoUS has joined #ruby
atmosx has joined #ruby
banseljaj has joined #ruby
<shevy> there are no problems in the world
phantomfakeBNC has joined #ruby
<shevy> only some things that are not easily solved right now
<sandbags> shevy: you have a problem converting between true<=>"yes" and false<=>"no" ?
kaneda has joined #ruby
<shevy> no
<sandbags> then i don't understand your original question, but that's fine
<shevy> but I have a need to often convert a boolean into something that makes more sense to me when I output to a user, in a way that would be understandable
<epochwolf|vps> shevy: variable ? "Yes" : "No"
moshef has joined #ruby
BlueMatt has quit ["Ex-Chat"]
tatsuya_o has joined #ruby
saboky has joined #ruby
MasterIdler__ has joined #ruby
DrShoggoth has joined #ruby
medik has joined #ruby
<saboky> Hi, I'm coming over from python to doing some ruby development. I was wondering if ruby had something like ipython (for those familiar with it). Basically out of the interactive ruby shells which is most recommended? irb, riple, any other ones? Also, do any of them have integration with rdoc? (The ability to read the objects documentation inline)
<burgestrand> saboky: pry
<ged> I'd second pry. Excellent software.
<saboky> Watching their video now, any recommendation on a quick start tutorial type thing?
chrxn has joined #ruby
<burgestrand> saboky: you’re watching the screencast from the website?
<saboky> burgestrand: yeah, figured might as well get started.. 2 people voting for it in irc is good enough for me
<UdontKnow> shevy: class TrueClass \n def to_s \n "Yes" \n end \n end
* UdontKnow runs away really fast before being stoned to death and set on fire by the channel militia
<burgestrand> saboky: just wondering what screencast you were watching. :) I believe it covers enough of the basics to get started, together with the website and perhaps the wiki you’ll last a long while.
<saboky> although, I just realized it's a ~20m video
<saboky> burgestrand: main page: Introductory screencast
bglusman has joined #ruby
gabeh has joined #ruby
h4mz1d has joined #ruby
senthil_ has joined #ruby
banseljaj has joined #ruby
virunga has joined #ruby
<shevy> UdontKnow nah, god patching like that would affect every code I write in ruby and additionally I would have to carry around these modifications. the thing is, I don't need a solution to the problem as-is, because I can already overcome it with code. like epochwolf|vps said. or, I myself prefer to call to a method vt(boolean_value_here). My gripe isn't with the solution, I am wondering whether it would not ha
<shevy> ve been better to consolidate on true and false in a general way everywhere... we have, as I see it .... yes/no ... true/false ... 0/1
<shevy> hmm we also have nil/undefined for false-like values
<epochwolf|vps> shevy: I use b() to convert true/false to "yes" and "no"
<shevy> that short?
<epochwolf|vps> why not?
<epochwolf|vps> Rails has the h() helper.
<epochwolf|vps> I define b() for booleans and dt() for dates and times.
<shevy> yeah, dunno. I am a bit wary of one-char methods often. I think yaml defines a y() method unless I am mistaken
<epochwolf|vps> shevy: Those are the only short methods I use.
<epochwolf|vps> but I use them everywhere.
<shevy> dt() looks fine
<shevy> what is it doing for you?
<epochwolf|vps> ?
<shevy> a helper method to .strftime?
<shevy> if you use dt() in your code
<shevy> or, how do you use it
Targen has joined #ruby
banisterfiend has joined #ruby
limed has joined #ruby
<epochwolf|vps> dt() is basically datetime ? datetime.strftime("%b %d, '%y at %l:%M") : 'Unknown'
<shevy> ah
<shevy> ok, so an easier .strftime call. makes sense
<epochwolf|vps> I have far more complicated versions of dt in other apps, as I need them.
ninno has joined #ruby
<epochwolf|vps> It's also a central place to define what dates look like across the website.
<saboky> Thanks for the pry recommendation, show-doc is perfect for what I wanted to do.
dwon has joined #ruby
<robacarp> man, the wind is seriously here
tectonic has joined #ruby
liluo has joined #ruby
emocake has joined #ruby
<mksm> How can i get how many days the curent month has?
wmoxam has joined #ruby
<mksm> yeah so no cool way to do it
<epochwolf|vps> mksm: time and dates are messy
ascarter has joined #ruby
ascarter has joined #ruby
cloke_ has joined #ruby
aim-On has joined #ruby
<mksm> epochwolf|vps: we should just count days as plain integers (1..2..3..etc), day % 3 == 0 || day % 4 == 0 we take a break and day % 365 == 0 we celebrate :D
snip_it_ has joined #ruby
Jamoka has joined #ruby
DrShoggoth has joined #ruby
<shevy> what about leap years
<robacarp> shevy: what about them.
<epochwolf|vps> mksm: okay, doing unnecessary math is a very good way to cause bugs.
<robacarp> who needs years.
<robacarp> just do day numbers
* epochwolf|vps slaps mksm, robacarp, and mksm
<apeiros_> you slapped mksm twice
<robacarp> double slap for mksm ?
<mksm> epochwolf|vps: current system is unnecessary math
<epochwolf|vps> for math
<apeiros_> you should have double-slapped robacarp, for his plenking.
<epochwolf|vps> mksm: when you finally lobby to get the system changed, let me know.
* mksm occupies the calendar
<apeiros_> mksm: use @beat (or however it's called)
alfism has joined #ruby
<epochwolf|vps> tshirtman: 3.days.from_now :P
<tshirtman> i feel sad for the people that created this code
badabim_ has joined #ruby
ceej has joined #ruby
<apeiros_> thebastl: aaaaaaaaaaaaaah!
<apeiros_> ups
<apeiros_> tshirtman: aaaaaaaaaaaaaah!
<apeiros_> I feel sad for people forced to use code created by the same people…
CoverSlide has joined #ruby
Eiam has joined #ruby
idletom has joined #ruby
<epochwolf|vps> apeiros_: that would be similar ot me.
<epochwolf|vps> I'm working on insurance stuff right now.
<tshirtman> apeiros_: indeed, very very sad for them
Sliker has joined #ruby
<tshirtman> i hope they don't exist
<tshirtman> (but well, it seems to come from effing twitter, no wonder they have performance issues)
Excureo has quit ["."]
<mksm> so there are years and solar years?
tatsuya_o has joined #ruby
<tshirtman> i assume it's how you get leap years
<apeiros_> o0
dmi_ has joined #ruby
<mksm> ah
<tshirtman> (probably a very efficient way to get it! :P)
Azure has joined #ruby
marcamilly has joined #ruby
maiconvieira has joined #ruby
<mksm> performance wise Date and Time got much better in 1.9.3
dmi_ has quit ["Leaving"]
cloke has joined #ruby
tayy has joined #ruby
shell0x_ has joined #ruby
al3xnull has joined #ruby
ikaros has joined #ruby
IceD^ has joined #ruby
waxjar has joined #ruby
hck89 has joined #ruby
Jamoka has joined #ruby
mengu_ has joined #ruby
DrShoggoth has joined #ruby
nari has joined #ruby
evenix has joined #ruby
cantonic has joined #ruby
<Guest23751> where can i get documentation for ruby 1.8.5
<Guest23751> apparently it didn't have shuffle! and i need some kind of alternative
tomzx has joined #ruby
<canton7> Guest23751, you can probably use #sort or #sort_by with rand()
<shevy> Guest23751 array.shuffle.first ?
<Guest23751> shevy ?
<Guest23751> canton7 that will probably work
<canton7> and http://ruby-doc.org/core-1.8.5/Enumerable.html for the docs for Enumerable
<Guest23751> canton7 We're sorry, but that page cannot be found.
<Guest23751> that's what i get
<canton7> oops, that didn't work. I was reading http://ruby-doc.org/core-1.8.7/Enumerable.html , and just adjusted the version in the url :P
<Guest23751> yeah i could find 1.8.7, and 1.8.6, but 1.8.5 seems to be gone, hence the question :)
PragCypher has joined #ruby
M- has joined #ruby
<Hanmac> why do someone use very outdated ruby versions? is this a kind of contest?
<Guest23751> because they're idiots and i have no control over the installation of versions not from 2006?
<banisterfiend> Hanmac: Und, guten tag !
zulax has joined #ruby
Knodi has joined #ruby
unixjazz has joined #ruby
Knodi has joined #ruby
vraa has joined #ruby
chrxn has joined #ruby
no-name- has joined #ruby
rramsden has joined #ruby
ikaros has joined #ruby
Karmaon has joined #ruby
<epochwolf|vps> Some people are stuck with what ever IT installed 4 years ago.
andrewhl has joined #ruby
kjellski_ has joined #ruby
xpot-mobile has joined #ruby
_adeponte has joined #ruby
stephans has joined #ruby
<shevy> Guest23751 well as ruby in 1.8.7 has shuffle, you can get the source
nonotza has joined #ruby
the_hack has joined #ruby
mxweas_ has joined #ruby
hadees has joined #ruby
randym has joined #ruby
Ammar01 has joined #ruby
ninor has joined #ruby
no-name- has joined #ruby
ninor has joined #ruby
aers has joined #ruby
<CacheMoney> I usually run one script in the command line i.e. $ ruby problem8.rb. However, I'm unfamiliar with running something like the solution above
atmosx has joined #ruby
akem has joined #ruby
ali_h_ has joined #ruby
andrewhl has quit [#ruby]
briankbuckley has joined #ruby
ChloeD_ has joined #ruby
andman has joined #ruby
hechien has joined #ruby
d-best has joined #ruby
Amorsen_ has joined #ruby
Wandering_Glitch has joined #ruby
r126l_ has joined #ruby
salvador_ has joined #ruby
jeedey_ has joined #ruby
Koven has joined #ruby
Elfix_113 has joined #ruby
wookiehangover_ has joined #ruby
ReinH_ has joined #ruby
blueadept` has joined #ruby
Jb___ has joined #ruby
oddraisi1 has joined #ruby
jfelchne1 has joined #ruby
kaktus_ has joined #ruby
Derander has joined #ruby
otakutom_ has joined #ruby
tectonic has joined #ruby
Kyle___ has joined #ruby
shevy has joined #ruby
banisterfiend has joined #ruby
ping_pong has joined #ruby
aces1up has joined #ruby
hSATAC has joined #ruby
<any-key> CacheMoney: just do "ruby bin/scrabble"
akhkharu has joined #ruby
asobrasil has quit [#ruby]
<any-key> from the root directory of the project
looopy has joined #ruby
<any-key> CacheMoney: if you look at the source code to bin/scrabble it just takes in an input file and kicks off the real code
<any-key> typically a bin folder is where the things you want to run are, whereas a lib folder holds libraries and helpers which are required/included by the programs in the bin directory
<CacheMoney> any-key: I'll try that. Thanks for the advice!
<waxjar> does anyone know of a standalone gem that deals with snake_case to camelCase, etc ?
<waxjar> preferably an 'extension' of String
<any-key> converting snake_case to camelCase?
philcrissman has joined #ruby
<any-key> that's just a one-liner
<waxjar> and back, all the jazzz