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 ?
<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?
<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?
<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.
<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] ?
<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
<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
<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.
<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
<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?
<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
<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
<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
<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?
<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
<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
<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>
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)
<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.
<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.
<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 ?