apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
fcoury has joined #ruby
_adeponte has joined #ruby
sdwrage has joined #ruby
philcrissman has joined #ruby
sent-hil has joined #ruby
Divinite has joined #ruby
cephalopod has joined #ruby
Haydos has joined #ruby
waxjar has joined #ruby
fivetwentysix has joined #ruby
sarmiena_ has joined #ruby
looopy has joined #ruby
andrewhl has joined #ruby
demet8 has joined #ruby
Tobico has joined #ruby
otters has joined #ruby
td123 has joined #ruby
wimplash has joined #ruby
<medik> That's strange. When I try to require 'fifo' in irb it returns true, but when i try to require fifo in an separate file it fails with an LoadError (no such file to load). Any idea of the cause of this?
<Veejay> medik: It always trips me up but maybe you need to require 'rubygems' before or something
<Veejay> I might be wrong
<samuelkadolph> That's only for ruby 1.8
<samuelkadolph> Or macruby
TheIronWolf has joined #ruby
<medik> I've got it working when writing ruby foobar instead of only relying on the #!/usr/bin/ruby -w
werdnativ has joined #ruby
<Veejay> samuelkadolph: Ah, thanks
<Veejay> It's one of those things I never spent time reading about
shevy has joined #ruby
<samuelkadolph> medik: You should be using #!/usr/bin/env ruby for your shebangs
<samuelkadolph> medik: Chances are you are using a different ruby than /usr/bin/ruby
<samuelkadolph> Which doesn't have the gem installed
<medik> Ah, okay!
<shevy> so great
<shevy> "A quick look at the source code reveals that, omg, it?s been written by a team of highly trained ape-like creatures!"
<medik> samuelkadolph: Thank you! I understand now (and it did solve the problem) :P
<samuelkadolph> shevy: lol "PHP… [is] well-written"
<seanstickle> Ruby has problems too.
<seanstickle> Senseless language bickering.
nso95 has joined #ruby
<samuelkadolph> PHP will be inferior to any language as long as any of these still exist: http://phpsadness.com/
<seanstickle> Based on all the bickering about fucking semicolons I've been reading over the last 2 days, I'm not sure about that
looopy has joined #ruby
<shevy> lol
<shevy> I just love the phrase ... "highly trained ape-like creatures". That shall become my new meme when I face PHP dudes
iamjarvo1 has joined #ruby
quest88 has joined #ruby
<seanstickle> When we're all writing a mixture of Lisp, Forth, and APL, the good days will have arrived.
<seanstickle> Until then, we are writing in the language of fallen spirits.
<Veejay> shevy: Do you "face" PHP dudes really?
<samuelkadolph> Does it count when you cut off their heads and put them on pikes to warn others away?
<shevy> Veejay not often
<banisterfiend> Veejay: he fights them on reddit
<Veejay> Most of the time they're old or fresh out of some school, don't know any better and enjoy their stuff. Possibly in a few years, they'll touch something else
<shevy> man I fight everyone there
<shevy> especially the upvoters
<shevy> Cannot join #php (Channel is invite only).
<shevy> :(
<Veejay> Also, people put a lot of emphasis on syntax
<Veejay> Like some language can be reduced to its keywords and features somehow
<shevy> Veejay yeah, as a first language, php actually gives you some results... write some things, then load it with your local server
<Veejay> If Linus or some other programming genius were to get into PHP, I'm sure the code would be out of my league heh
<shevy> dunno, I always felt the worse language brings out the worse in people too
<bawer> for well-written php check out the symfony2- source code
<seanstickle> ##php is not invite only
<seanstickle> And it's the canonical channel
<Veejay> But then again, the language kind of dictates the way you approach code to
<Veejay> seanstickle: haha
<Veejay> Yeah that's what I thought too
<Veejay> No way it's invite only
<shevy> ##php :Cannot join channel (+r) - you need to be identified with services
<shevy> !!!
<bawer> and, also, ruby gets a bad wrap from some people using about the same arguments that people use against php
<Veejay> Way too big and popular a channel
nso95 has quit [#ruby]
<shevy> I want Galaxynet... die, freenode, die!
<Veejay> bawer: Very true
<seanstickle> Oh, you need to be registered with nickserv
<seanstickle> Just like #rubyonrails
<shevy> ruby is quite complicated
<Veejay> Not really
<shevy> in PHP you never have to ask yourself when to use a hash and when to use an array
<epochwolf> shevy: #rubyonrails is +r to keep the riffraff out
<Veejay> I mean like every language becoming an expert is hard
<Veejay> But the bar of entry is pretty low
<shevy> yeah
<Veejay> Compared to static/strongly typed languaged
<Veejay> languages
<Veejay> C/C++/Java
<shevy> a friend is doing quite some advanced things in PHP. it was hard trying to understand what he wanted... he showcased "static functions in PHP". I still can not explain how they work
<epochwolf> hashes and arrays are completely different data structures… conflating them is silly.
<bawer> I've heard people hating on ruby because it's easy to write bad code and that it breeds lazy programmers
<epochwolf> bawer: an idiot can fuck up any language.
<bawer> epochwolf: exactly my sentiment
<epochwolf> ruby just happens to give you all the tools you could want.
<epochwolf> except LDAP
<bawer> a shit programmer is a shit programmer in any language
<Veejay> Ruby is the Ron Paul of languages kind of
<epochwolf> because seriously, fuck ldap
<Veejay> With the freedom come RISKS AND PERILS
<shevy> Veejay nah Ron Paul is too old now. ruby is still young and dynamic
<shevy> until matz gets old :(
<Veejay> Matz is starting to get less and less relevant these days isn't he though?
<Veejay> As awesome as he is
<Veejay> The power is shifting
<shevy> dunno. I dont really care about the other rubys. But, I think the pace of ruby evolution has slowed down
<Veejay> They're hitting the real hard problems, which takes time I reckon
<Veejay> Rubinius is pretty exciting
<Veejay> I'd like to see what'll come out of that in say 5 years
<shevy> on bugs.ruby-lang matz has assigned some feature request from..... 2.0 to target version 3.0 ... which kinda is a way of saying "Yeah cool idea... perhaps in ten years..."
EzeQL has joined #ruby
<edwardian> shevy: which one
havenn has joined #ruby
<shevy> "Target version: 3.0" :(
<Veejay> Nested methods?
<Veejay> I mean alright, 3.0, whatevs
<shevy> yeah
<shevy> def foo; def bar;
<Veejay> Who uses that really
<shevy> dunno
<shevy> I would not. It would only confuse me
<shevy> the older I get, the dumber I am, the easier my code must be
<seanstickle> The older I get, the better I learn that simpler code is better.
<seanstickle> Clever code is for monkeys. Simple code is for building things.
<epochwolf> seanstickle: simple code doesn't always get the job done.
<seanstickle> epochwolf: that may be true
<seanstickle> epochwolf: but in most realms it does.
<epochwolf> seanstickle: not with legacy, enterprise applications
<seanstickle> Ah, well, true.
<epochwolf> which is threatening to become my speciality
<seanstickle> When dealing with evil, you must often use evil to fight it.
<epochwolf> seanstickle: eval*
<seanstickle> Cute
<epochwolf> I try to be.
noprompt has joined #ruby
<shevy> hmmm enterprise code
<seanstickle> I used to make my coins by doing IT turnarounds, so I know that particular affliction.
phuz has joined #ruby
<epochwolf> seanstickle: I've been at the same company for almost a year. Employee, not contractor :(
<seanstickle> Is that bad?
TheIronWolf has joined #ruby
<seanstickle> I've always been an employee
<epochwolf> seanstickle: depends. Means my health insurance is tied to my employer which makes leaving a bit more difficult.
<Tasser> epochwolf, USA?
<epochwolf> Tasser: yup
<Tasser> not that much of a problem in swizerland :-)
<Tasser> wanna come over here? ^^
<epochwolf> Tasser: not really. I only speak english. I really don't want to end up having to learn a second language.
ZachBeta has joined #ruby
<Tasser> epochwolf, I can speak about three, swiss german can be considered a distinct language :-)
maletor has joined #ruby
<epochwolf> lol
<Tasser> some live here for years and speak english only
<epochwolf> Tasser: I would prefer to speak the languages people around me use.
<Tasser> ah well
h4mz1d has joined #ruby
<epochwolf> granted, if I moved south I would probably need to learn spanish
<seanstickle> If Iceland or Ireland was open for immigration, I would be so inclined to go
Shaded has joined #ruby
<seanstickle> Particularly Iceland
<seanstickle> But alas, that is a distant dream
<Tasser> friend of mine has fun with all kinds of nordic languages ^^
<Tasser> german is a bit of a fuck you with all the cases and geners
sent-hil has joined #ruby
<Tasser> s/geners/genders/
nif has joined #ruby
andantino has joined #ruby
savage- has joined #ruby
fbernier has joined #ruby
<shevy> if you speak french you can pick western switzerland
andantino has joined #ruby
boogyman has joined #ruby
boogyman has quit [#ruby]
edwardian has joined #ruby
c0rn has joined #ruby
Synthead has joined #ruby
netrealm has joined #ruby
silassao has joined #ruby
bawer has joined #ruby
nari has joined #ruby
crankycoder has joined #ruby
liluo has joined #ruby
bananas has joined #ruby
maca has joined #ruby
richardlxc has joined #ruby
richardlxc has joined #ruby
richardlxc has joined #ruby
chioque has joined #ruby
chioque has quit [#ruby]
shtirlic has joined #ruby
chioque has joined #ruby
L-----D has joined #ruby
cbuxton has joined #ruby
chioque has quit [#ruby]
rking has joined #ruby
ryanf has joined #ruby
cloke has joined #ruby
eph3meral has joined #ruby
prometheus has joined #ruby
tommyvyo has joined #ruby
sroy2_ has joined #ruby
banisterfiend has joined #ruby
dbgster has joined #ruby
abra has joined #ruby
sinusss has joined #ruby
yoklov has joined #ruby
maca has joined #ruby
mercyroa has joined #ruby
heftig has joined #ruby
savage- has joined #ruby
mercyroa has joined #ruby
radic_ has joined #ruby
c0rn has joined #ruby
darkspadez has joined #ruby
darkspadez has quit ["Leaving"]
dennda has joined #ruby
Targen has joined #ruby
bigkm has joined #ruby
<mercyroa> excuse eme, what is the room for RoR?
wolgo has quit [#ruby]
<Tasser> mercyroa, #rubyonrails
looopy has joined #ruby
stephenjudkins has joined #ruby
snip_it has joined #ruby
savage-_ has joined #ruby
thecreators has joined #ruby
<sent-hil> I'm confused about the total/self columns in ruby-prof output: https://gist.github.com/2396193
stephenjudkins has joined #ruby
stephenjudkins has joined #ruby
Hsparks has joined #ruby
h4mz1d has joined #ruby
mosheee has joined #ruby
mosheee has joined #ruby
shobhitg has joined #ruby
deobald has joined #ruby
stephenjudkins has joined #ruby
Araxia_ has joined #ruby
tobym has joined #ruby
meskyanichi has joined #ruby
mercyroa has quit [#ruby]
andrewhl has joined #ruby
tk__ has joined #ruby
c0rn has joined #ruby
rking has joined #ruby
<fowl__> sent-hil, of course you're confused, you're reading table headers that aren't there
<fowl__> get some sleep man
<fowl__> (:
<sent-hil> fowl__: lol
tomsthumb has joined #ruby
pabloh has joined #ruby
ryanf has joined #ruby
Bosma has joined #ruby
td123 has joined #ruby
Bosma has joined #ruby
h4mz1d has joined #ruby
<sam113101> so bundler is ruby thing, not a rails thing?
Akuma has joined #ruby
<rking> Hi guys. Quick DRY moment - I have a chunk of doc text that I want in both my .rb and my README.md. Is there an existing templating system that would sync the .rb's text into the other one? I can roll my own solution, but this kind of thing happens often so I figure it's better to use something existing.
pabloh has joined #ruby
<sent-hil> sam113101: yes
Shaded has joined #ruby
jankly has joined #ruby
<sam113101> is bundler installed by default?
<sent-hil> sam113101: no, its just another gem, one that most ppl use
Cache_Money has joined #ruby
Asebolka has joined #ruby
<sam113101> is rubygems there by default?
mikepack has joined #ruby
<banisterfiend> sam113101: in 1.9+ yeah
<sent-hil> sam113101: umm, not sure. i use rvm to manage my rubies, so I get rubygems automatically
Silas_ has joined #ruby
<sam113101> how does an app (like rails) says "hey, I need bundler" if there's no bundler?
rippa has joined #ruby
<any-key> you install bundler when you deploy
silassao has joined #ruby
<any-key> whatever machine you deploy to need bundler
rdw200169 has joined #ruby
<sent-hil> sam113101: i'm not really sure what you're getting at. are you having a problem with something?
<sam113101> nah I'm just trying to understand
<any-key> dependencies aren't a big deal with rails
<any-key> 99.99% of the time you're deploying it to machines you control
silassao has joined #ruby
<sam113101> but I might "fork" a project and make something around it… should I create a Gemfile?
<fowl__> deploy to your botnets
<RubyPanther> dependencies are bundler
<any-key> sam113101: if you are doing rails development without bundler then something is wrong with your setup...
<any-key> I don't get the complaint
<sam113101> I have bundler
<any-key> you fork a project, of course you'll need all the tools
adeponte has joined #ruby
<any-key> it's a nonissue then
noyb has joined #ruby
jfelchner has joined #ruby
Cyrus has joined #ruby
thecreators has joined #ruby
<sam113101> so I just create a Gemfile and ask for people that want to use my software to use bundler? or should I bundler first and deploy with the files of the gem inside?
<any-key> other people see that and go "as a ruby developer, I know what this is"
<any-key> and do "bundle install" and go on with their day
<sam113101> ok, but in the case of another gem? if I'm creating a gem that needs another gem, I use bundler for dependencies?
nari has joined #ruby
<any-key> rubygems handle deps
soveran has joined #ruby
<any-key> after running "bundle install" you don't have to worry about anything
mischief has joined #ruby
<sent-hil> i thought rubygems was just a repo of gems, and bundler does the hard work of figuring out dependencies and conflicts
cbeck_ has joined #ruby
<sam113101> is it comfusing for real or am I just dumb
<any-key> it's reallly easy
<any-key> rubygems will handle dependencies
<any-key> bundler just does other magic
<sent-hil> sam113101: don't worry about it too much, just use bundler and specify other gems you want in it
h4mz1d has joined #ruby
<sent-hil> sam113101: when other ppl try to run it, it will tell them to do "bundle install"
<sent-hil> that's pretty much all you need
cbeck_ has joined #ruby
cbeck_ has joined #ruby
pubis has joined #ruby
<sam113101> how does rubygem manages dependencies
<sam113101> how do I specify a dependency in my gem
<rdw200169> sam113101 you should specify the dependencies in the gemspec, its pretty easy to do; then you can differentiate b/w environment dependencies
<any-key> sam113101: rubygems include a list of dependencies, it works just like any other package manager
ben225 has joined #ruby
rippa has joined #ruby
agilobable has joined #ruby
stephenjudkins has joined #ruby
pastjean_ has joined #ruby
noprompt has joined #ruby
luckyruby has joined #ruby
fivetwentysix has joined #ruby
twinturbo has joined #ruby
y3llow has quit [#ruby]
<sam113101> rdw200169: so I use add_development_dependency and add_runtime_dependency?
<sam113101> in my gemspecs
williamcotton has joined #ruby
crodas has joined #ruby
<rdw200169> sam113101 yup and there is a line you add to your gemfile to indicate that the dependencies are in the gemspec, so everything plays together nicely
jankly has joined #ruby
td123 has joined #ruby
agilobable has joined #ruby
Mailtruck has joined #ruby
Cache_Money has joined #ruby
<sam113101> what about gems that aren't on rubygems.org but somewhere else, how do I specify the source?
symb0l has joined #ruby
agilobable has joined #ruby
banisterfiend has joined #ruby
sluggy has joined #ruby
kawa_xxx has joined #ruby
waxjar has joined #ruby
hukl has joined #ruby
Morkel has joined #ruby
greenarrow has joined #ruby
kawa_xxx_ has joined #ruby
rdw20016_ has joined #ruby
joaoh82 has joined #ruby
brianpWins_ has joined #ruby
two- has joined #ruby
looopy has joined #ruby
Silas_ has joined #ruby
c0rn has joined #ruby
<sent-hil> sam113101: if its a git repo, you can specify it, right in Gemfile
Asher has joined #ruby
sterNiX has joined #ruby
sterNiX has joined #ruby
yxhuvud has joined #ruby
jesly has joined #ruby
francisfish has joined #ruby
CheeToS has joined #ruby
nilg` has joined #ruby
yxhuvud has joined #ruby
td123 has joined #ruby
Zhengfeng has joined #ruby
liluo has joined #ruby
brianpWins has joined #ruby
francisfish has joined #ruby
sohocoke has joined #ruby
x0F__ has joined #ruby
banisterfiend has joined #ruby
tijmencc has joined #ruby
schovi has joined #ruby
djdb has joined #ruby
adac has joined #ruby
Gonzih has joined #ruby
freeayu has joined #ruby
lobolars has joined #ruby
GoBin has joined #ruby
Zhengfeng has quit [#ruby]
adac has joined #ruby
jesly has joined #ruby
wedgeV has joined #ruby
mborromeo has joined #ruby
vectorshelve has joined #ruby
shadoi1 has joined #ruby
<freeayu> Could you recommend any captcha plugin?
thinkswan has joined #ruby
timonv has joined #ruby
Eldariof-ru has joined #ruby
sent-hil has joined #ruby
andantino has joined #ruby
Synthead has joined #ruby
sohocoke has joined #ruby
fukushima has joined #ruby
dnyy_ has joined #ruby
shruggar has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
c0rn has joined #ruby
hemanth has joined #ruby
workmad3 has joined #ruby
<banisterfiend> workmad3: r u work mad
wafawefweafwa has quit [#ruby]
Araxia_ has joined #ruby
blacktulip has joined #ruby
kernelhcy has joined #ruby
mdw has joined #ruby
kernelhcy has quit [#ruby]
simao has joined #ruby
schovi has joined #ruby
ryanf has joined #ruby
ColloquyUser has joined #ruby
sinusss has joined #ruby
gregorg_taf has joined #ruby
richardlxc has joined #ruby
richardlxc has joined #ruby
Axsuul has joined #ruby
Notimik has joined #ruby
sohocoke has joined #ruby
hukl has joined #ruby
dfamorato_ has joined #ruby
kish has joined #ruby
ph^ has joined #ruby
agilobable has joined #ruby
mailtruck has joined #ruby
arturaz has joined #ruby
ChampS666 has joined #ruby
zakwilson_ has joined #ruby
francisfish has joined #ruby
BiHi has joined #ruby
francisfish has joined #ruby
visof has joined #ruby
jankly has joined #ruby
shruggar has joined #ruby
jimeh has joined #ruby
fearoffish has joined #ruby
sectionme has joined #ruby
JohnBat26 has joined #ruby
peterhil` has joined #ruby
sohocoke has joined #ruby
ukwiz has joined #ruby
trivol has joined #ruby
DuoSRX has joined #ruby
francisfish has joined #ruby
tvw has joined #ruby
francisfish has joined #ruby
twinturbo has joined #ruby
Notimik has joined #ruby
ephemerian has joined #ruby
KL-7 has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
__main__ has joined #ruby
_main_ has joined #ruby
gokul has joined #ruby
jlebrech has joined #ruby
dnyy has joined #ruby
LMolr has joined #ruby
stefanp has joined #ruby
stefanp has joined #ruby
shruggar has joined #ruby
heftig has joined #ruby
sedai has joined #ruby
sedai has quit [#ruby]
sedai has joined #ruby
apeiros_ has joined #ruby
jlebrech has joined #ruby
berserkr has joined #ruby
sohocoke has joined #ruby
rads has joined #ruby
roolo has joined #ruby
vectorshelve has joined #ruby
sarmiena_ has joined #ruby
peterhil` has joined #ruby
Vert has joined #ruby
xcvd has joined #ruby
Ammar01 has joined #ruby
qos has joined #ruby
jimeh has joined #ruby
workmad3_ has joined #ruby
workmad3_ has joined #ruby
d34th4ck3r has joined #ruby
Helius has joined #ruby
workmad3_ has joined #ruby
Morkel has joined #ruby
d3vic3 has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
tatsuya_o has joined #ruby
JackeyChen has joined #ruby
<JackeyChen> hey ? Can i ask rvm question here?
<hukl> you can try
<hukl> :)
<JackeyChen> hukl: thanks
<JackeyChen> curl -L get.rvm.io | bash -s stable . that is my command install rvm but it doesn't add any content in .bash_profile file
<JackeyChen> do you have any idea?
bier|tp has joined #ruby
bier has joined #ruby
ph^ has joined #ruby
sohocoke has joined #ruby
<TTilus> JackeyChen: #rvm maybe?
<TTilus> unless somebody here can help
mdw has joined #ruby
<JackeyChen> TTilus: I think this is norma issue
<zaargy> what's the cleanest way of doing this bash check if !ls in ruby?
<zaargy> i.e. check if system command has non-zero exit status
<zaargy> seems you have to do system or similar and then check $?..
<vectorshelve> shevy: Good Day :) Hope you had a great weekend
<zaargy> wondering if there is a better way than that
iocor has joined #ruby
kawa_xxx has joined #ruby
iocor has joined #ruby
bluenemo has joined #ruby
jimeh has joined #ruby
heylukecarrier has joined #ruby
<kalleth> hmm
<kalleth> i have a Gemfile which has group :test with some gems in it
g0rd0n has joined #ruby
<kalleth> running bundle install --without test should therefore not fail if it can't find the gem in the repo
<banisterfiend> kalleth: i dont believe you
<kalleth> right?
<kalleth> there's the gemfile
railsbros_dirk has joined #ruby
<kalleth> so using an internal gem server, I run bundle install --without test (as the gems specified in teh test group are not available on the internal gem server)
<kalleth> but bundler is still attempting to locate the gems, as I still get Could not find gem 'minitest-reporters (>= 0)' in any of the gem sources listed in your Gemfile.
<workmad3> kalleth: it'll still try to find all the gemspecs because it needs them to resolve dependencies consistently
<kalleth> hmm
railsbros_dirk has quit [#ruby]
<workmad3> kalleth: unless you're using something like bundle install --deployment in order to get bundler to only look at the Gemfile.lock to resolve dependencies
<kalleth> so I still need to put those gems onto the internal gem server even if they're not required to be installed
* kalleth laughs
<kalleth> actually having a proper deployment installation, yeah, right :P
<kalleth> but OK
<workmad3> kalleth: it's not a 'proper deployment install', it's just deployment settings (which includes not attempting to re-resolve any dependencies because the Gemfile.lock is taken as authoritive)
kawa_xxx has joined #ruby
<workmad3> kalleth: or at least I think that should be the case anyway :)
<kalleth> yeah, it would just make more sense to me if we were, but we're not :)
<kalleth> I'll just add the gems to our internal gem server
<workmad3> kalleth: yeah, that's probably easiest tbh :)
<kalleth> it's easier than fiddling all our code that runs bundle install during app development to use --deployment :p
<workmad3> kalleth: why are you installing without test in development envs? :/
<kalleth> workmad3: we're not, we're just using 'bundle install'
<kalleth> workmad3: I was testing if bundle install --without test would no longer require the gems for bundle install to run correctly, hence my Q :P
<kalleth> the actual deployment scripts just use std bundle install
<workmad3> kalleth: ah, then the answer is 'sort of' :)
<kalleth> i wish it was that simple, our 'development env' is an entire deployed VM of a debian system (as we sell an appliance, not the product itself)
<workmad3> sounds fun :P
<kalleth> we can apply a set of packages in the build process to turn a production into a build/vm-capable machine, but
<kalleth> no, not really
<kalleth> its horrific
<workmad3> oh, I forgot to use the printing versions of my sarcasm tags... <sarcasm>sounds fun :P</sarcasm>
<kalleth> 8 ruby 1.8 rails 2.0.2 apps, 1 raisl 1.9.2 app, approx 12 ruby 1.9 daemons w/ daemon-kit, and lots and lots of drb calls between all the 1.8 apps
* kalleth Fun.
<kalleth> ok, what's the difference between here and #ruby-lang, really
<workmad3> kalleth: political
* kalleth fs
<kalleth> colour me surprised :p
g0rd0n has quit ["Leaving"]
<kalleth> 323 v 620, at least you're winning :p
<workmad3> #ruby-lang is the official one :)
ZombieBiT has joined #ruby
<workmad3> and the politics stuff was before my time
<workmad3> (which is why I hang around in both :) )
kawa_xxx has joined #ruby
<kalleth> ok, workmad3, I do a bundle install with the Gemfile pointing at internal dev server, I got the error 'minitest-reporter'
<kalleth> or smth.
<kalleth> but when i change to rubygems.org the only gem that gets installed is 'nokogiri', and it doesn't mention minitest
<kalleth> but minitest-reporters is specified explicitly in the gemfile
<kalleth> and after a successful bundle install, minitest-reporters still doesn't appear anywhere in the gem list
<banisterfiend> workmad3: can you think of a good icon to represent a method
nemesit has joined #ruby
d34th4ck3r has joined #ruby
bawer has joined #ruby
ChampS666 has joined #ruby
sohocoke has joined #ruby
tijmencc has joined #ruby
tijmencc has quit [#ruby]
davidw has joined #ruby
<davidw> is there a standard way to fail out of a rake task?
kawa_xxx_ has joined #ruby
rohit has joined #ruby
yannis has joined #ruby
r0bby has joined #ruby
justinmcp has joined #ruby
rdegraci has joined #ruby
mythosil has joined #ruby
c9s has quit [#ruby]
clockwize has joined #ruby
nilg` has joined #ruby
d34th4ck3r has joined #ruby
pjn_oz has joined #ruby
Danro has joined #ruby
tuxaddicted has joined #ruby
mailtruck has joined #ruby
falena has joined #ruby
Asebolka has joined #ruby
<riginding> exit
<riginding> exit
shajen_ has joined #ruby
Danro has joined #ruby
Danro has quit [#ruby]
heftig has joined #ruby
Danro has joined #ruby
<banisterfiend> heftig: sup heft
kevinykchan has joined #ruby
fr0gprince_mac has joined #ruby
alexonthemoon has joined #ruby
<alexonthemoon> hey guys, does anyone know how to switch between proxies w/ ruby?
Danro has quit [#ruby]
alexonthemoon has quit [#ruby]
nikhil_ has joined #ruby
shajen has joined #ruby
TheIronWolf has joined #ruby
visof has joined #ruby
TheNumb has joined #ruby
platzhirsch has joined #ruby
<platzhirsch> What do you think of applying Ruby for machine learning algorithms (or at least learning it?) because I've taken a look at the Matrix class and it looked really smart with the predefined operators like + * - etc. leading to lean code?!
eka has joined #ruby
<vectorshelve> platzhirsch: yes its being widely used
<platzhirsch> vectorshelve: is it?
<platzhirsch> yes, I read that one, too. So few upvotes and views made me curious
<vectorshelve> platzhirsch: go for it
bluOxigen has joined #ruby
fivetwentysix has joined #ruby
davidcelis has joined #ruby
rohit has joined #ruby
Shamgar has joined #ruby
Ethan has joined #ruby
d34th4ck3r has joined #ruby
ZeBordoada has joined #ruby
frishi has joined #ruby
TommyBotten has joined #ruby
rohit has joined #ruby
blast_hardcheese has joined #ruby
nu7hatch has joined #ruby
nikhil_ has joined #ruby
dv310p3r has joined #ruby
fr0gprince_mac has joined #ruby
Beoran__ has joined #ruby
workmad3_ has joined #ruby
manizzle has joined #ruby
TheIronWolf has joined #ruby
bluOxigen has joined #ruby
fabrice31 has joined #ruby
justinmcp has joined #ruby
BiHi has joined #ruby
shajen has joined #ruby
<platzhirsch> vectorshelve: there's also a talk about it http://vimeo.com/22513786
<platzhirsch> well I will take my chance, I wanted to learn Ruby anyway in this summer, why not start earlier for a course
<vectorshelve> platzhirsch: ruby is amazing
<vectorshelve> trust me once you start working on it.. u will never feel like switching !!
Jippi has joined #ruby
* platzhirsch giggles
TheNumb has joined #ruby
DarkFoxDK has joined #ruby
<d34th4ck3r> platzhirsch: Thanks a ton, for the video. I was looking for it . :)
<platzhirsch> d34th4ck3r: great, your welcome
tatsuya_o has joined #ruby
<vectorshelve> platzhirsch: u r cute :)
<platzhirsch> we will see about that
<vectorshelve> platzhirsch: what is the meaning of Konrad ? :-/
platzhirsch has quit [#ruby]
mdw has joined #ruby
coreyo has joined #ruby
nikhil_ has joined #ruby
LMolr has joined #ruby
<coreyo> after I sort a hash, what is the fastest way to get only the first 100 entries (or cull the rest)?
<DefV> .first(100)
dhruvasagar has joined #ruby
fukushim_ has joined #ruby
snearch has joined #ruby
elalande has joined #ruby
rohit has joined #ruby
liluo has joined #ruby
<coreyo> DefV, ahh, thank you very much, I didn't realize that could take an argumetn
mrwalker has joined #ruby
workmad3 has joined #ruby
`brendan has joined #ruby
krusty_ar has joined #ruby
mailtruck has joined #ruby
cesar18 has joined #ruby
Ilithya has joined #ruby
machine2 has joined #ruby
n1x has joined #ruby
n1x has joined #ruby
d3vic3 has joined #ruby
Oog_ has joined #ruby
<Oog_> using daemons to fork new processes need to redirect forked stdout to master stdout.... how can i do this?
buharin has joined #ruby
<buharin> hello :)
jbw has joined #ruby
iamjarvo has joined #ruby
<buharin> I wanna write web app for magazine shop ;)
chad_ has joined #ruby
tatsuya_o has joined #ruby
<buharin> just think about use ruby instead php
tatsuya_o has joined #ruby
philcrissman has joined #ruby
ecolitan has joined #ruby
iamjarvo1 has joined #ruby
Natch| has joined #ruby
alexonthemoon has joined #ruby
alexonthemoon has quit [#ruby]
schovi has joined #ruby
nanderoo has joined #ruby
machine2 has joined #ruby
prtksxna has joined #ruby
<any-key> good choice
<any-key> buharin: look at a framework like sinatra, it's very simple and nice
<buharin> can I use it on apache?
<any-key> yep, I believe so, although I haven't personally deployed it before
<any-key> it won't be as trivial to deploy as placing php files on the web server would be
mailtruck_ has joined #ruby
<any-key> but these days it's not very hard
<any-key> there's #sinatra if you want to pick the brains of those guys
<lupine_85> it can be as easy :)
<lupine_85> you can run sinatra (indeed, any rack application) under passenger
mailtruck__ has joined #ruby
<any-key> (passenger is the name of apache's mod_ruby)
<workmad3> lupine_85: it's still not quite as easy as just uploading PHP files to a server, but yeah :)
flaccid has joined #ruby
<lupine_85> well, mod_ruby is a separate, discontinued, project
<workmad3> any-key: passenger is more mod-rails or mod-rack than mod-ruby
<any-key> is it?
<any-key> ah my bad
<lupine_85> passenger probably should be able to use the name though, I agree
<flaccid> i'm having trouble working out the data i am assigning to a variable so i can access it by key or method after. puts the object it shows as: [#<Server:0x7f86373d78d0 @internal=#<ServerInternal:0x7f86373d72e0 @params={"server_type"=>"ec2", "href" …. }>]
<workmad3> I dunno... mod-ruby was more about using ruby as a CGI script, mod-rack is about getting apache to serve rack apps
<flaccid> i want to access what is in params, but i can't work out how. any hints?
<any-key> flaccid: server.params
<lupine_85> flaccid, object[0].instance_variable_get("@internal").instance_variable_get("@params") ?
<lupine_85> pretty nasty anyway
<lupine_85> it's an array with a single element - a Server object, which has an internal iv containing a ServerInternal object, which has some params
<flaccid> any-key: returns NoMethodError: undefined method `params' for #<Array:0x7f74210dc798>
<any-key> flaccid: don't listen to me, listen to lupine_85 :P
<any-key> I'm only 1/4 through my first cup of coffee
<lupine_85> better, stick to whatever API is provided :)
<any-key> flaccid: what kind of web framework is this?
<lupine_85> if you find yourself using instance_variable_get in production code for not-metaproramming, you're probably Doing It Wrong
<any-key> ™
<flaccid> lupine_85: hmm yeah that can get it thanks. it might be a bug that its returning it differently with this api call.
<any-key> hmmm never seen that
<lupine_85> (I did write a very nice generic controller once that used iv_get/set to set up the view binding - legitimate, woo)
<flaccid> lupine_85: can i convert server[0].instance_variable_get("@internal").instance_variable_get("@params") into a hash or something so its then easy to work with ?
<lupine_85> I don't even know what you mean by that
<flaccid> ah yep coolio
<lupine_85> I'd suggest learning the API
tommyvyo has joined #ruby
<flaccid> i have, its just this one call that is returning it this way, its probably a bug
fbernier has joined #ruby
<lupine_85> it looks like a leaked response, aye
<lupine_85> you probably want Server#settings or some such, I guess
<flaccid> i will see if i can take it up with the devs because this one is a server side filter
cjs226 has joined #ruby
iamjarvo has joined #ruby
platzhirsch has joined #ruby
<platzhirsch> vectorshelve: the meaning of Konrad? well it's my real name, a German name
mstratman has joined #ruby
emmanuelux has joined #ruby
KL-7 has joined #ruby
machine2 has joined #ruby
wroathe has joined #ruby
dv310p3r has joined #ruby
fmcgeough has joined #ruby
Sailias has joined #ruby
tomzx has joined #ruby
WhereIsMySpoon has joined #ruby
<WhereIsMySpoon> Hey o/
<WhereIsMySpoon> Anyone care to give me a coding idea? I dont have any that come to mind :) beginner-intermediate level please if you do :D
<any-key> ...I have this homework asssignment in haskell due tonight
<WhereIsMySpoon> i meant in ruby :p
<any-key> you should give it a shot
<any-key> :'(
<WhereIsMySpoon> i cant do haskell anyway :p
<any-key> yeah, with that attitude
<WhereIsMySpoon> haha that isnt what i meant
<WhereIsMySpoon> i just meant i havent learnt it
<any-key> that's my point
heftig has joined #ruby
<WhereIsMySpoon> i didnt mean i wouldnt be able to do haskell
<WhereIsMySpoon> if i tried it
<WhereIsMySpoon> :)
nilg has joined #ruby
<any-key> you could do haskell, you're just chicken
<WhereIsMySpoon> ...
<any-key> bggawwwwwkkkk
<WhereIsMySpoon> i dont wish to learn haskell atm xD
<any-key> bggawwwwwkkkk
<WhereIsMySpoon> get out :p
Helius has joined #ruby
<any-key> are you into web stuff?
<any-key> you could work on my ruby roomba library
<WhereIsMySpoon> i havent ever done web stuff
<any-key> oooh you should try the web
<any-key> it's cool
<WhereIsMySpoon> and no rails as of yet
<platzhirsch> WhereIsMySpoon: what about some classy one: Conway's game of life
<any-key> play with sinatra or the like
lorandi has joined #ruby
<any-key> yesyesyes
<any-key> in curses
<WhereIsMySpoon> hm havent heard o fthat
<platzhirsch> excellent
sbanwart has joined #ruby
<platzhirsch> look it up
<WhereIsMySpoon> will do
<any-key> it's simple, fun, and just using the ruby curses library you'd be up and running in no time at all
* any-key actually considered that the other day
<WhereIsMySpoon> curses?
ChampS666 has joined #ruby
<any-key> it's a library for drawing advanced things with text in terminals
<WhereIsMySpoon> oh
<any-key> you can write to specific places on the screen and do lots of other advanced things
<WhereIsMySpoon> sounds cool
<any-key> ruby has a wrapper built into the standard libs now
bawer has joined #ruby
jroes has joined #ruby
<jroes> hey guys, trying to find docs for the ~! operator
<WhereIsMySpoon> this looks quite interesting
<jroes> oops, !~
<any-key> jroes: is that the opposite of =~ ?
<jroes> not sure, that's why I was trying to find the docs :)
kpshek has joined #ruby
<any-key> that one is difficult to google :\
<workmad3> jroes: yes, it's the opposite of =~
<jroes> gotcha. didn't see it on the same page as the docs for =~, weird.
<jroes> thanks
<workmad3> jroes: I'm not sure it counts as a method in its own right like =~ does, I think it's an interpreter thing (expands to !(whatever =~ whatever)
d34th4ck3r has joined #ruby
adeponte has joined #ruby
<jroes> yeah, I guess I'm just not sure how the author of this code even knew the method existed in the first place ;)
<any-key> he probably wrote part of the interpreter
drbawb has joined #ruby
<any-key> it was probably matz
<workmad3> jroes: it's mentioned in most intro ruby tutorials and books when regex stuff is covered, iirc
<workmad3> jroes: or he just played around in irb and discovered it... not everything is well documented in ruby :)
jlebrech has joined #ruby
<jroes> haha
<jroes> well I guess I see what you mean, actually. because there's ~=, but also ~ is aliased to ~=
<WhereIsMySpoon> o.o
<workmad3> jroes: ~= is different to =~
<jroes> blah, typo
jrist has joined #ruby
linoj has joined #ruby
<jroes> (x2)
<any-key> wait what is ~= ?
<any-key> jroes: it's okay, I make the same typo every time I use =~
<WhereIsMySpoon> is there a special place for if i wrote a ruby program and i want someone to take a look at it and see if it's "ruby-like"? or could i just do that in here
<workmad3> any-key: in that situation, thankfully a syntax error :)
juarlex has joined #ruby
<jroes> haha
<any-key> WhereIsMySpoon: put the code in pastebin or preferrably a github gist
<any-key> then we'll rip it apart and scatter the pieces all over #ruby so you have to start over again >:)
jobicoppola has joined #ruby
<workmad3> any-key: but ~ is binary NOT, so in some situations (such as = ~ instead of =~) then it can cause quite a dramatic difference :)
<WhereIsMySpoon> :P
<any-key> workmad3: ugh that sounds horrible
<any-key> I've been doing a lot of binary work with ruby lately...it's surprisingly not bad
<any-key> <3
dql has joined #ruby
jitesh_shetty has joined #ruby
<coreyo> if you have a whole bunch, is there a way to do a multiline "attr_reader" or "attr_accessor" statement for a whole bunch of object variables?
Synthead has joined #ruby
knopkodav has joined #ruby
axl_ has joined #ruby
<workmad3> coreyo: sure, just make sure you end each line with a , for leading into the next line
<Kovensky> if a variable's scope is entirely within the Thread.new's block, is it also thread-local?
<Kovensky> (as in put in thread-local storage)
<coreyo> workmad3, ahh, it appears that "attr_reader" cannot be on a line by itself, I have to supply at least one field before a new line. Thanks.
moshee has joined #ruby
moshee has joined #ruby
<jlebrech> i suck at ruby again
btaitelb has joined #ruby
<jlebrech> how do you run two lines in a case?
<workmad3> coreyo: you could, if you did attr_reader(<newline> and then put a closing ) on it too
<coreyo> workmad3 is there a detailed coding standard that dictates best practices for all of this stuff?
<workmad3> coreyo: it's not a coding standard, it's ruby's syntax...
<workmad3> coreyo: in this case, it's the fact that attr_reader is really just a method, so you can optionally drop the () off the call
<coreyo> workmad3, right I understand that. But is there an accepted ruby coding standard? (i.e. like every uses PEP8 for python) ?
<coreyo> *everone
qos has joined #ruby
<WhereIsMySpoon> i dont think theres anything quite so official
<workmad3> there are certainly strong community conventions, but I'm not sure of a canonical documentation of them all
<workmad3> mostly because if we did put up a canonical list, there would be so many exceptions and disagreements... we aren't like the python community, we don't have a strict 'there is only one true way' zealotism :)
<Kovensky> < any-key> ruby has a wrapper built into the standard libs now <-- it might not work on win32, or at least AFAIK there's no port of ncurses to windows other than cygwin's
<WhereIsMySpoon> im using linux
<WhereIsMySpoon> ^^
wroathe has joined #ruby
<WhereIsMySpoon> tbh who doesnt use linux for coding :P
<WhereIsMySpoon> unless you write vb
<WhereIsMySpoon> or c
<WhereIsMySpoon> *c
<WhereIsMySpoon> ***c3
<WhereIsMySpoon> *********c#
<WhereIsMySpoon> ><
<coreyo> workmad3, I think that is both the biggest strength and the biggest pitfall to ruby
* Kovensky points at all the gnome apps written in C#
<WhereIsMySpoon> i thought it was easier to write c# in windows
dustybrains has joined #ruby
<apeiros_> WhereIsMySpoon: actually, quite a lot of people use osx for coding, not linux
<WhereIsMySpoon> thats true too
<any-key> ruby is great on *nix systems
looopy has joined #ruby
<WhereIsMySpoon> urs
<WhereIsMySpoon> *yea
* Kovensky is using cygwin
<WhereIsMySpoon> man my typing is out the window today
<WhereIsMySpoon> ew =/
<Kovensky> I need too many windows-specific apps :(
<WhereIsMySpoon> D:
<Kovensky> (aka games)
<WhereIsMySpoon> so boot into windows when u wanna play
<WhereIsMySpoon> and boot to linux when coding
<WhereIsMySpoon> :)
<WhereIsMySpoon> get a cup of tea between the two or smth
<Kovensky> also, linux has been REALLY unstable for me
<WhereIsMySpoon> what you been using
<Kovensky> I can cause a kernel panic by clicking a GUI button
<WhereIsMySpoon> then i suggest you're using a bad distro/window manager
<any-key> yeah...
<WhereIsMySpoon> or its corrupted
<Kovensky> no, I suspect my GPU
<any-key> sounds like a window manager problem
<any-key> or that
<Kovensky> and nvidia's drivers sucking
<WhereIsMySpoon> ha, yes
<jlebrech> case statements without a final else look so weird https://gist.github.com/ea15fb61f2b818d5472a
<WhereIsMySpoon> er
<WhereIsMySpoon> nvidia's drivers are good
<WhereIsMySpoon> it's amd's which suck
<WhereIsMySpoon> :P
jankly has joined #ruby
<Kovensky> or at least on win7 it's not uncommon for me to get a driver crash
<any-key> don't worry, the year of the linux desktop is on the horizon, hang tight!
<Kovensky> but win7 can recover from video driver crashes
<any-key> Kovensky: microkernels have that ability
<WhereIsMySpoon> i had my windows machine run out of pooled page memory the other day
<WhereIsMySpoon> >_>
<any-key> linux's monolithic kernel makes that sort of thing nearly impossible
<WhereIsMySpoon> it almost crashed my pc
<Kovensky> OSX uses a microkernel too
<Kovensky> but it also panics once in a while (:
<any-key> not entirely
<Kovensky> though I haven't booted mine in a few months
<any-key> OS X has some specific things in userland, like memory management
<Kovensky> not since I borked the bootloader while trying to fix the sound drivers >_>
<WhereIsMySpoon> lol
* Kovensky shakes fist at VoodooHDA
<WhereIsMySpoon> oops
<WhereIsMySpoon> reinstall ftw
<any-key> video drivers and the like are all in kernelland
<WhereIsMySpoon> i hate that windows needs a reinstall every 2 years
<WhereIsMySpoon> 1-2
<WhereIsMySpoon> its like...almost no time
<Kovensky> I hated the opengl performance in OSX :(
<Kovensky> though when I asked macfags their answer was that OSX was most likely using vesa drivers (instead of nvidia)
<any-key> DirectX performance in OS X is even worse :(
<Kovensky> but I also read that OSX video drivers don't implement opengl directly
pastjean has joined #ruby
<Kovensky> Apple implements opengl by mapping to an internal API
<Kovensky> and that internasl API is the one that drivers implement
<Kovensky> internal*
<any-key> wow nobody called me out on saying the dumbest thing ever :P
<WhereIsMySpoon> ?
<workmad3> any-key: well, it's pretty accurate
<Kovensky> any-key: http://winehq.org/ ;)
<workmad3> any-key: directX on OS X is pretty dire :P
<any-key> :P
<Kovensky> anyway, it seems that local variables in a thread's block are not put in TLS :(
<Kovensky> sa
<Kovensky> if I do
<workmad3> Kovensky: no, they wouldn't be... they're just local variables
<Kovensky> Thread.new { myvar = true }
<Kovensky> and myvar is not declared in any other scope
<Kovensky> is it subject to the GIL
bbttxu has joined #ruby
<Kovensky> btw, I suppose that since ruby has a global interpreter lock, that all read or write operations are atomic
lateau has joined #ruby
jankly has joined #ruby
zacstewart has joined #ruby
soveran has joined #ruby
chson has joined #ruby
strife25 has joined #ruby
nerdy_ has joined #ruby
dbgster has joined #ruby
thecreators has joined #ruby
_2easy has joined #ruby
asobrasil has joined #ruby
uris has joined #ruby
<WhereIsMySpoon> any-key, would it be ok to paste ruby code that doesnt functionally work but is close enough to what it should be to be able to comment on its "rubyness"?
tommyvyo has joined #ruby
<any-key> always
<WhereIsMySpoon> tear it up ^^
<WhereIsMySpoon> if you wish to that is ^^
<any-key> I'll have to take a look in a few min
<WhereIsMySpoon> sure, whenever u like :)
<WhereIsMySpoon> its just my own stuff so it isnt important
<any-key> I'd be more than happy to help
benatwork has joined #ruby
<WhereIsMySpoon> i just think that half of ruby is its conventions and making it self-documenting and concise, so its really important to make it look ruby-ish instead of like java
<WhereIsMySpoon> dunno if thats correct
<WhereIsMySpoon> but its what i feel :)
<any-key> seems reasonable at first glance
theRoUS has joined #ruby
DMKE has joined #ruby
savage- has joined #ruby
<Kovensky> workmad3: is TLS any faster than regular variables btw (not that this is speed-critical code; just wondering)
<lupine_85> I have a need to stub accesses to the $? global variable. Anyone know how to do this? it seems to be readonly
snip_it has joined #ruby
<lupine_85> hmm
<lupine_85> `true`# $? = mock("(result)",:'success?' => true)
<lupine_85> that works, but is evil
<WhereIsMySpoon> i dont understand that at all :P
<lupine_85> everything right of # is a comment
<WhereIsMySpoon> oh, yea xD
<WhereIsMySpoon> why the `
<lupine_85> it's an alias for Kernel.system (sort of). I'm actually shelling out to a real command to get the value of the $? global variable set to success or fail
<lupine_85> yuck
<WhereIsMySpoon> ah i see
<lupine_85> (for the fail case, I can do `false` )
<WhereIsMySpoon> you're hooking into a shell
<WhereIsMySpoon> sorta
jeebster has joined #ruby
<lupine_85> I'd really prefer something nicer :D
<WhereIsMySpoon> no idea im a ruby newb still really
<WhereIsMySpoon> :p
<lupine_85> mm, I doubt there's anything good, really
phantasm66 has joined #ruby
td123 has joined #ruby
crankycoder has joined #ruby
<workmad3> Kovensky: local vars are probably faster than TLS
Mailtruck has joined #ruby
<WhereIsMySpoon> woo my mail is here
<workmad3> Kovensky: TLS is for sharing data across everything within the same thread, it's a much wider scope and has to go through a few more layers to get to
<WhereIsMySpoon> :p
anhpht has joined #ruby
ysiad has joined #ruby
PaciFisT has joined #ruby
gokul has joined #ruby
thone has joined #ruby
mailtruck_ has joined #ruby
shobhitg has joined #ruby
alanp_ has joined #ruby
<WhereIsMySpoon> hm thats odd ,i just did sudo gem install ncurses and sudo gem install rbcurse and i cant do require 'ncurses'
<Kovensky> user system total real
<Kovensky> TLS: 0.172000 0.000000 0.172000 ( 0.176008)
<Kovensky> local: 0.093000 0.000000 0.093000 ( 0.096004)
<Kovensky> workmad3: indeed
<Kovensky> (just doing 1_000_000 assignments to the same variable)
LBRapid has joined #ruby
pu22l3r has joined #ruby
<WhereIsMySpoon> anyone got any idea why i cant do require 'ncurses' or require 'rbcurse' ?
<WhereIsMySpoon> i installed their gems as i said above
<soveran> WhereIsMySpoon: what error do you get?
<WhereIsMySpoon> LoadError - cannot load such file -- ncurses
<WhereIsMySpoon> and same for rbcurse
mengu has joined #ruby
<WhereIsMySpoon> soveran :)
brianosborne has joined #ruby
<brianosborne> Hi all, I'm trying to move a file to a different partition (mounted), but the move fails when Ruby attempts to "chown" the moved file
<brianosborne> with an invalid argument
<brianosborne> I wonder why it's even messing with the ownership of the file?
luckyruby has joined #ruby
chico_ has joined #ruby
<canton7> brianosborne, what command are you using to move the file?
<brianosborne> FileUtils.mv
<brianosborne> it's failing on chown
<brianosborne> saying the path to the destination is invalid
<Kovensky> how to know you're writing deep code: you have more than 10 indentation levels
joaoh82 has joined #ruby
<brianosborne> well, it gives me Errno::EINVAL: Invalid argument
<canton7> You're calling FileUtils.mv and it's throwing Errno::EINVAL ?
KL-7 has joined #ruby
<brianosborne> canton7: http://pastebin.com/SCSA14wY
cha1tanya has joined #ruby
strife25 has joined #ruby
flagg0204 has joined #ruby
tayy has joined #ruby
netrealm has joined #ruby
<platzhirsch> Why should one use the %Q for creating strings?
<shevy> brian-, file "/othervol/users/bosborne/recordings/dev_testing@49790-20120416-101836-s3.flv" exists?
<workmad3> platzhirsch: because you don't need to worry about escaping quotes
ben_alman has joined #ruby
<platzhirsch> workmad3: right, thanks!
bean_dharma has joined #ruby
TheIronWolf has joined #ruby
zommi has joined #ruby
Natch has joined #ruby
Sailias has joined #ruby
<bean_dharma> Hi all, would anyone happen to know the best way to delete/clear a variable after X seconds if a condition is not met within that time? Sleep suspends the entire process, so not exactly what I'm looking for.
ukwiz has joined #ruby
ben_alman has joined #ruby
<bean_dharma> I guess I should just simplify my question to "How do I make ruby do X after Y seconds without using Sleep."
Karlo has joined #ruby
Karlo has quit [#ruby]
mmokrysz has joined #ruby
mmokrysz has joined #ruby
<davidcelis> You could open up a Thread, and do it in there (with sleep)
<davidcelis> which won't suspend the entire process
<WhereIsMySpoon> any-key, did you get a chance to check my code yet? :)
<davidcelis> WhereIsMySpoon: y u use globals
<WhereIsMySpoon> davidcelis, because they arent ever changed in the whole program and it makes it easier
<bean_dharma> Ooo, thanks davidcelis.
<WhereIsMySpoon> theyre only set once then never ever written to
<davidcelis> WhereIsMySpoon: sounds like you should be using a constant, then
_2easy has joined #ruby
<WhereIsMySpoon> i tried that
<WhereIsMySpoon> it didnt work out
danielpunt has joined #ruby
<davidcelis> how so?
<WhereIsMySpoon> i dont remembe rexactly
<WhereIsMySpoon> but i remember it didnt work
<davidcelis> i don't believe you
<WhereIsMySpoon> ok then
<davidcelis> ROWS, COLUMNS = 6 # at the top of your class should work
<davidcelis> there's no reason it wouldn't
<davidcelis> unless you then try to write to them later
<WhereIsMySpoon> ok ill try it, but that doesnt sound like what i was told to do last time
hukl_ has joined #ruby
<davidcelis> sorry, ROWS, COLUMNS = 6, 6
<canton7> well, that ^^ will set COLUMNS to nil. NOt sure if that's what you want
<canton7> aha
<davidcelis> ;)
<WhereIsMySpoon> ;D
<canton7> beat me :P
<WhereIsMySpoon> hehe
mmokrysz has joined #ruby
<WhereIsMySpoon> man installing stuff from source takes ages T_T
mmokrysz has joined #ruby
mmokrysz has quit [#ruby]
andrewhl has joined #ruby
rippa has joined #ruby
<WhereIsMySpoon> eyy hey rip :)
CheeToS has joined #ruby
Natch| has joined #ruby
<rippa> WhereIsMySpoon: RIP AND TEAR YOUR GUTS
<rippa> YOU ARE HUGE SO YOU MUST HAVE HUGE GUTS
<WhereIsMySpoon> o.o
<platzhirsch> wait.. what?
<WhereIsMySpoon> wut
<WhereIsMySpoon> xD
<WhereIsMySpoon> well
<WhereIsMySpoon> he is rippa
<WhereIsMySpoon> :p
<WhereIsMySpoon> never seen it before
<WhereIsMySpoon> ffffffffff
<WhereIsMySpoon> GUILE Y U SO HARD TO INSTALL
<WhereIsMySpoon> every time i ./configure it finds something else i dont have that i need to spend another 10 mins compiling T_T
btaitelb has joined #ruby
<rippa> WhereIsMySpoon: my favorite comic
<davidcelis> WhereIsMySpoon: consider breaking your @symbols hash up into multiple lines instead of one big one, also
philcrissman_ has joined #ruby
davidw has joined #ruby
<WhereIsMySpoon> sounds like a plan, davidcelis
<WhereIsMySpoon> :)
<WhereIsMySpoon> rippa, :)
<WhereIsMySpoon> and now doign make for libffi is taking forever on linking libtool >_>
* WhereIsMySpoon headdesks
<davidcelis> only other thing i can notice immediately before i leave for work is whitespacing; the indentation, i'm guessing, is from pasting into gist (but in case it isn't, 2 spaces is the standard), and you should use line breaks to separate "paragraphs" of logic (handle_move needs this especially)
<WhereIsMySpoon> gedit doesnt handle tabbing very well
<WhereIsMySpoon> sometimes it does 1 space, sometimes the defauklt
<WhereIsMySpoon> its very odd
<WhereIsMySpoon> but yea
<shevy> WhereIsMySpoon WhereIsMyKnife ?
<WhereIsMySpoon> InYourThroat
<shevy> gedit is typical gnome
<WhereIsMySpoon> :p
<shevy> sucks, sucks, and sucks
<WhereIsMySpoon> pff
<shevy> it is true
<WhereIsMySpoon> gedit works for the most part
<shevy> the higher the version, the less features it has
<WhereIsMySpoon> i really need to start using bluefish more
<WhereIsMySpoon> lol
<WhereIsMySpoon> winner right there
<shevy> I am using bluefish all the time
<WhereIsMySpoon> its so true
kevinykchan has joined #ruby
<shevy> unfortunately 1.0.7 :(
<ekaleido> sublimetext2 is my favorite
richardlxc has joined #ruby
richardlxc has joined #ruby
<shevy> they changed colour highlighting in 2.x ... and the find functionality is different, I HATE the new search and find way...
<WhereIsMySpoon> *update ubuntu with gnome* *SUDDENLY ALL THE FEATURES*
<davidcelis> OH, just noticed one more thing; you usually don't need parens when calling methods ( play() can be play, move_up() can be move_up, etc); the exception is when you're passing a method call that takes arguments into another method... like puts string.include?("blah")
<WhereIsMySpoon> davidcelis, i know but it looks horrible
<WhereIsMySpoon> imo
<shevy> that's ok
<WhereIsMySpoon> its for clarity
<shevy> ruby does not care if you use () or not most of the time, and in the times it does, it is better to use ()
<WhereIsMySpoon> idd
buharin has joined #ruby
<davidcelis> in times it does care, obviously it is better to use (); but it's not very idiomatic to include the parents when there are no arguments
lateau has joined #ruby
<shevy> but davidcelis is also right, cat.meow() is uglier than cat.meow ;)
<davidcelis> parens*
<WhereIsMySpoon> meh
albemuth has joined #ruby
Targen has joined #ruby
<davidcelis> it may seem "meh" but it is a style guide that will make your ruby code more readable by pretty much any rubyist out there
<WhereIsMySpoon> i prefer parens, it lets you more easily distinguish between methods, variables, accidental words, etc
<WhereIsMySpoon> i dont see how adding parens makes it less readable
<WhereIsMySpoon> it only specifies it more
<workmad3> I like to use parens apart from on argument-less method calls
<shevy> ekaleido, can you extend that editor in ruby?
<davidcelis> its an unnecessary specification when there are no arguments; most rubyists will agree
<WhereIsMySpoon> most?
<WhereIsMySpoon> i was told its pretty much ok either way
<shevy> it does not matter
<WhereIsMySpoon> and that lots use both
mailtruck__ has joined #ruby
<shevy> even if you do not use () I am sure I won't like your code, because by default I hate code written by others :)
<WhereIsMySpoon> lol
<davidcelis> ^
<WhereIsMySpoon> :P
<workmad3> WhereIsMySpoon: I see more code that drops an empty () than adds it in
<TTilus> cat.meow() certainly does not look ruby to me
<shevy> especially lambda {} users, they confuse me. they are doing things I dont understand
<davidcelis> anyway, WhereIsMySpoon, you asked to make your code look less like java
<davidcelis> and that is something that makes it very obvious that you're coming from java
<shevy> rack is using lambdas for testing
Sailias_ has joined #ruby
<platzhirsch> WhereIsMySpoon: don't follow into the dark side
<davidcelis> it simply doesnt look like ruby
<WhereIsMySpoon> dark side?
<shevy> it has like 200 examples of lambda
<WhereIsMySpoon> but
<WhereIsMySpoon> the dark side has cookiez
<platzhirsch> WhereIsMySpoon: they have cookies, but we have gems
<workmad3> shevy: a lambda is one of the simplest rack apps you can write
<WhereIsMySpoon> anyway, anyone have a solution for my ncurses problem
<shevy> yeah WhereIsMySpoon
<shevy> never use ncurses
<shevy> :)
<WhereIsMySpoon> >_>
<davidcelis> lambda { ncurses }
<davidcelis> fixed
<WhereIsMySpoon> i want to make conways game of life
<shevy> ncurses will break your mind
<WhereIsMySpoon> fffffffffuuuuuu
<WhereIsMySpoon> :p
<workmad3> shevy: lambda {|env| [200, {}, ["hello world"]]} <-- a rack hello world :)
<WhereIsMySpoon> i thought ncurses made it easier to paint to the console
<shevy> yeah workmad3 ... it confuses me
<shevy> I cant see the object!
<rippa> shevy: which object?
<workmad3> shevy: would you prefer it if it did Proc.new {...} instead+ :)
<shevy> the object!
<workmad3> ?
<shevy> the lambda object!
<shevy> workmad3 hmm perhaps
<rippa> it is returned by the lambda method
<workmad3> shevy: just do a mental substitution then ;)
<TTilus> WhereIsMySpoon: jury is still out for that ;)
<WhereIsMySpoon> is there a freenode channel for installing linux libs
<WhereIsMySpoon> like libffi, libunistring
<WhereIsMySpoon> well maybe not for installinjg them specifically
<WhereIsMySpoon> but for help about them
<TTilus> WhereIsMySpoon: try your distro support channel
<WhereIsMySpoon> kk
Ilithya has joined #ruby
<WhereIsMySpoon> er
<WhereIsMySpoon> well
<WhereIsMySpoon> it wasnt hanging
<WhereIsMySpoon> i just had the console scrolled up
<WhereIsMySpoon> xD
niku4i_ has joined #ruby
lkba has joined #ruby
<shevy> WhereIsMySpoon just compile it from source into /usr prefix
io_syl has joined #ruby
<shevy> ftp://sourceware.org/pub/libffi/libffi-3.0.10.tar.gz
<shevy> you can write a ruby script to download that for you, extract and compile :>
sybariten has joined #ruby
sybariten has quit ["WeeChat 0.3.1-dev"]
KJF has joined #ruby
<WhereIsMySpoon> shevy i have the tar.gz
KJF has joined #ruby
<WhereIsMySpoon> its only ./configure, make, make install and make checks :)
<shevy> pfffft
<shevy> your ruby script could check for the local existance first!
<WhereIsMySpoon> i dont need to
<shevy> if File.exist? archive
<WhereIsMySpoon> i just downloaded it
<shevy> maaaan!
<shevy> you have ruby AT YOUR HANDS!
<WhereIsMySpoon> im only gonna do this once
<shevy> it beats every shell script
<WhereIsMySpoon> so w/e
<shevy> ok I will remember that
<WhereIsMySpoon> :p
<shevy> in case you ever have to do that again, I will paste:
mikepack has joined #ruby
<shevy> <WhereIsMySpoon> im only gonna do this once
<WhereIsMySpoon> and it would be quicker to write a bash script
<WhereIsMySpoon> rather than a ruby script
kevinbond has joined #ruby
<WhereIsMySpoon> FINALLY
<WhereIsMySpoon> i have everything xD
alexonthemoon has joined #ruby
blazento has joined #ruby
<alexonthemoon> hey, is anyone familiar w/ using proxies? I need to be able to switch between proxies within my ruby script. any help?
<WhereIsMySpoon> ThereIsNoProxy
<WhereIsMySpoon> :p
<alexonthemoon> WhereIsMySpoon: ??
<WhereIsMySpoon> never mind me
<alexonthemoon> lol
td123 has joined #ruby
<WhereIsMySpoon> man this is taking forever
<WhereIsMySpoon> guile must be huge
slonimsky has joined #ruby
tommyvyo has joined #ruby
visof has joined #ruby
Foxandxss has joined #ruby
davidw has joined #ruby
robacarp has joined #ruby
davidcelis has joined #ruby
baroquebobcat has joined #ruby
_2easy has joined #ruby
jeremytarling has joined #ruby
jeremytarling has quit [#ruby]
cbuxton has joined #ruby
tewecske has joined #ruby
wedgeV has joined #ruby
Axsuul has joined #ruby
emmanuelux has joined #ruby
hukl has joined #ruby
andrewhl has joined #ruby
kpshek has joined #ruby
<agilobable> how do i check if a string includes any of strings from a string array?
nemesit has joined #ruby
tommyvyo has joined #ruby
joaoh82 has joined #ruby
<davidcelis> array.select { |string| string.include? other_string }
<davidcelis> er
<davidcelis> array.select { |string| other_string.include? string }
<WhereIsMySpoon> needs more do end
<WhereIsMySpoon> :p
spuz has joined #ruby
<davidcelis> nah
<WhereIsMySpoon> hey, its less like java with do ends :P
Shaded has joined #ruby
Shaded has joined #ruby
<WhereIsMySpoon> im only messing anyway :)
<davidcelis> i figured
<WhereIsMySpoon> :)
<WhereIsMySpoon> cya
<agilobable> davidcelis: thanks
<davidcelis> no problemo
albemuth has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
pu22l3r has joined #ruby
MasterIdler_ has joined #ruby
pu22l3r has joined #ruby
eph3meral has joined #ruby
dkissell has joined #ruby
williamcotton has joined #ruby
<spuz> Hello, I'm trying to move some utility functions into their own class but I'm stuck on the best way to implement callbacks
<spuz> Here's the Logging class: http://pastie.org/3798943
<spuz> The fatal function should log a message, call the rollback function and then the exit function
<spuz> but what is the best way of injecting those functions into the Logging class?
<btaitelb> spuz: if you want them as instance methods, use include. If you want them as class methods, use extend
<spuz> You might want to ignore the constructor as it is right now
<spuz> btaitelb, where should I use include, inside or outside the class definition?
<agilobable> davidcelis: thanks
<btaitelb> spuz: http://railstips.org/blog/archives/2009/05/15/include-vs-extend-in-ruby/ has a good explanation. You might also want to consider using ActiveSupport::Concern if you have both class methods as well as instance methods
<spuz> I can't really use inside the class definition as I want to provide different ways of rolling back
wataken44 has joined #ruby
eugenmayer has joined #ruby
jankly has joined #ruby
<eugenmayer> anyway to let gem use a proxy by default?
<spuz> btaitelb, it doesn't look like either include or extend will work, I need to be able to provide two different rollback functions
d3vic3_ has joined #ruby
issackelly has joined #ruby
<btaitelb> spuz: git provides great rollback support for source code. Are you saying that you want to change the implementation of logging at runtime? In that case, just have an attr_accessible :logger in whatever class you want to use, and rely on duck typing to switch the implementation
<issackelly> env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"]
<issackelly> so that is a hash right? env_run_lists
d3vic3_ has joined #ruby
strife25 has joined #ruby
josefig has joined #ruby
josefig has joined #ruby
<issackelly> I'm trying to figure out the syntax rules for variables, hashes, and whitespace and I'm not entirely sure what that does (the context is the chef DSL)
luckyruby has joined #ruby
yoklov has joined #ruby
nemesit has joined #ruby
cloke has joined #ruby
vipaca has joined #ruby
vipaca has joined #ruby
<spuz> btaitelb, the 'rollback' function is part of a suite of scripts I'm writing, one implementation might delete a bunch of files from the local filesystem, another might delete some remote resource. I don't want to switch the implementation of the logger, just the logic that occurs after a fatal error in the script.
_2easy has joined #ruby
eighty4 has joined #ruby
greenarrow has joined #ruby
<btaitelb> spuz, in this code example, you've tightly coupled rollback logic with logging logic. I would suggest decoupling them so that you can swap either implementation. It's not the logger's responsibility to make sure you roll back or exit the app, and it's not the rollback's responsibility to log the error.
bawer has joined #ruby
<spuz> btaitelb, true.
<btaitelb> spuz, it sounds more like you want an ErrorHandler that can have an optional logger and rollback function as properties. No need for modules or mixins from what I can tell.
LiquidInsect has joined #ruby
manizzle has joined #ruby
jgrevich has joined #ruby
jgrevich has joined #ruby
savage- has joined #ruby
<spuz> Yeah that would make more sense. I'll just implement that as three separate classes
adamkittelson has joined #ruby
simplogical has joined #ruby
phantasm66 has joined #ruby
somewhere has joined #ruby
jenglish has joined #ruby
jankly has joined #ruby
jenglish has quit [#ruby]
cbuxton has joined #ruby
davidcelis has joined #ruby
dennda has joined #ruby
shobhitg has joined #ruby
pastjean has joined #ruby
schovi has joined #ruby
lockweel has joined #ruby
kenperkins has joined #ruby
SPYGAME has joined #ruby
<SPYGAME> hey all, i have this hash which i wanna sort based on the sum of it's values http://pastie.org/3799087
<lupine_85> oh metaprogramming, you so sillt
<lupine_85> silly* - method names like: test_network_interfaces_equals_[{"name"=>"t70000", "mac"=>"fe:ff:00:00:00:02", "vlan_id"=>1}, {"name"=>"t70000", "mac"=>"fe:ff:00:00:00:02", "vlan_id"=>1}]_is_invalid
<canton7> SPYGAME, #sort_by ?
pen has joined #ruby
<canton7> something along the lines of (untested) Hash[the_hash.sort_by{ |k,v| v.inject(:+) }]
<SPYGAME> canton7: summing up the array values and then sort
ianbrandt has joined #ruby
waxjar has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
<canton7> woop, that works
_2easy has joined #ruby
<musl> canton7: Nice. Beat me to the paste.
<SPYGAME> canton7: can you explain what's the_hash is ?
eywu has joined #ruby
oooPaul has joined #ruby
tommyvyo has joined #ruby
<canton7> SPYGAME, that's your variable containing the hash you want to sort
<SPYGAME> but i tried it and it didn't do anything :/
<canton7> it should return a sorted hash?
<SPYGAME> nops
<Veejay> Works for me
krusty_ar has joined #ruby
<Veejay> As expected
<SPYGAME> summing up the array values and then sort
adeponte has joined #ruby
<SPYGAME> Veejay: could you do a pastie ?
maskact has joined #ruby
<sts> Hello folks! Does anybody know a nice way to add a configuration file to Thor?
<Veejay> SPYGAME: http://pastie.org/3799131
<sts> I'm talking about github.com/wycats/thor
_adeponte has joined #ruby
<canton7> SPYGAME, my (also working) pastie: http://pastie.org/3799135
malorie has joined #ruby
<SPYGAME> canton7, Veejay: perfect guys, worked for me now as well
maletor has joined #ruby
<Veejay> No thanks for me it's all canton7
<canton7> Veejay, stood up for me :P
<canton7> s/,//
wedgeV has joined #ruby
phantasm66 has joined #ruby
<canton7> I used to hate having to wrap "Hash[]" around things like that... But then I saw the beauty in it :P
hadees has joined #ruby
<Veejay> I despise Hash[]
<Veejay> It's shitty syntax
<Veejay> +a
<Veejay> Hash.make or something to that effect would be better
axl___ has joined #ruby
bluOxigen has joined #ruby
MrGando has joined #ruby
<canton7> yeah. It would be kind of neat if Array#to_hash existed, but that might be coupling a little tight...
timonv_ has joined #ruby
Mchl has joined #ruby
<shevy> Veejay you save ".new" with Hash[] kinda
<Veejay> No solution is really satisfactory
<shevy> that is four characters less man!
<Veejay> Yeah but then you use the [] syntax which is odd
<Veejay> I don't know, I'm just not feeling it at all
<lupine_85> def Array.to_hash ; Hash[*self] ; end
<lupine_85> there you go
<canton7> it *would* be nice if Hash#sort_by returned a new hash, but that breaks the beauty of Enumerable working the same for hashes and arrays
<lupine_85> heh, no it isn't, that's broken :D
<lupine_85> but you get the idea
<shevy> I just tried it
<shevy> and it did not work
<shevy> :(
<lupine_85> class Array ; def to_hash ; Hash[*self] ; end ; end
alex__c2022 has joined #ruby
<lupine_85> although you might actually want class Array ; def to_hash ; Hash[*(self.flatten)] ; end ; end
iamjarvo has joined #ruby
Targen has joined #ruby
<shevy> how many iterations will lupine_85 need... :D
<lupine_85> both of those two work, just differently
<canton7> lupine_85, that breaks [[:a, [1, 2, 3]]].to_hash :(
<shevy> hehehe
<shevy> come on guys
<shevy> let's admit that to_hash will never work
<canton7> a man can dream!
<lupine_85> you can write one easily enough that fits a particular use case
<shevy> \o/
<lupine_85> writing a fully generic one isn't going to happen though
kpshek has joined #ruby
ed_hz_ has joined #ruby
moshee has joined #ruby
<rippa> canton7: select already works differently
chelbs has joined #ruby
voodoofish430 has joined #ruby
<Veejay> If the size of the array is odd then can it even work to begin with?
<lupine_85> of course, as Array#assoc() and friends show, there's nothing wrong with stdlib implementations that make assumptions
<canton7> rippa, that's true...
chelbs has quit ["Leaving..."]
Shaded has joined #ruby
jlogsdon has joined #ruby
cconstantine has joined #ruby
fragrant has joined #ruby
<cconstantine> hey all, I'm trying to get rvm up and running, and I've got a wierd thing going. I'm getting a LoadError, but look at the path that it's coming from: /home/andrew/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/irb/completion.rb:9
<fragrant> How can i do comment multiple lines in ruby like /*....................*/ in C
<shevy> with #
<cconstantine> =begin
<shevy> #
<cconstantine> =end
<shevy> #
<shevy> #
<shevy> #
<cconstantine> must be at the beginning of a line
<Mon_Ouie> It's more common to just use many #, though
<canton7> most editors support automatically commenting many lines
<fragrant> # needs to be put at the beginning of every line. That's tedious.
werdnativ has joined #ruby
ghvandoorn has joined #ruby
<cconstantine> fragrant, =begin and =end
<canton7> fragrant, what's your editor?
<shevy> notepad
<fragrant> gedit
<shevy> hey... I spoke to someone here about gedit today
<shevy> oh yeah that guy
<any-key> Vim, since I always have to plug it
<shevy> <WhereIsMySpoon> gedit works for the most part
<shevy> this is a gedit invasion going on here!
<shevy> vim guys from all over the world, unite
<any-key> heh considering how many other awesome editors there are out there, "for the most part" isn't acceptable :P
<shevy> who knows
<shevy> WhereIsMySpoon may switch to emacs one day
<canton7> fragrant, try ctrl-M? I don't have gedit installed anywhere handy
<Kovensky> what can I use to create a directory tree?
<Kovensky> as in, something that works like `mkdir -p`
<fowl__> fileutils
<fragrant> ctrl-M doesn't do anything in gedit.
<shevy> it crashes some other random program
<canton7> fragrant, with many lines selected?
<shevy> even with one million lines selected!
<Kovensky> fowl__: ic, thanks
<fragrant> Yes
<Kovensky> fowl__: incidentally it's named FileUtils.mkdir_p :>
<canton7> fair play. the website I found lies!
<shevy> yeah, ruby methods may not contain a ' ' character
<shevy> or
niklasb has joined #ruby
<fowl__> Kovensky, fileutils has a bunch of useful methods
<shevy> def foo-hi
<Kovensky> yeah
<shevy> also is not allowed :(
<Kovensky> I need to search better the stdlib =p
<canton7> for obvious reasons :P
<shevy> hmm could be "foo - hi" too, perhaps that confuses ruby
<Kovensky> also, zomg, an stdlib module with documentation!
rippa has joined #ruby
<shevy> yeah Kovensky they learned!
rramsden has joined #ruby
<shevy> there was a huge documentation effort going on
<Kovensky> heh
<Kovensky> rdoc will need some revamping in order to document some things though :v
<Kovensky> for instance there is no way to document runtime-generated classes
<shevy> hmm
<Kovensky> even if they're always generated
<shevy> last time I used rdoc was 5 years ago
nfluxx has joined #ruby
<Kovensky> it's specially annoying if the runtime-generated class does mostly nothing other than subclass... a private class, which is not even listed on the documentation at all
strife25 has joined #ruby
<Kovensky> shevy: well, yard can't deal with this situation either :S
timonv has joined #ruby
<Mon_Ouie> YARD allows you to use macros or even code to handle method calls that generate methods or classes
dkissell has joined #ruby
<shevy> long live YARD!
<Kovensky> the one I'mcomplaining about ATM is OpenSSL::Digest::<<algorithm>>
S1kx has joined #ruby
S1kx has joined #ruby
<Kovensky> which is unconditionally generated (generated at module compile time)
visof has joined #ruby
<lupine_85> shevy, all those methods work
savage-_ has joined #ruby
<Kovensky> OpenSSL::Digest's documentation is blank
<lupine_85> you just can't call them very efficiently
<Kovensky> and there's no list of the possibly available lgorithms
<Mon_Ouie> Ah, yeah, YARD's C "parser" doesn't have nearly as many features as the Ruby one
<shevy> lupine_85 how?
<fragrant> apt-get install gedit-plugins, Edit>Preference>Plugins>check Code comment, now ctrl+m to comment blocks
<Kovensky> Mon_Ouie: the code to generate the classes is plain ruby :(
<shevy> \o/
tommyvyo has joined #ruby
<Kovensky> their parent classes are in C though
<canton7> Kovensky, http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/Digest.html lists that sort of information?
<Kovensky> class*
<Kovensky> canton7: :O
<Kovensky> !skip http://puu.sh/pVC0 <-- how I see it here
<Kovensky> I guess that's a *recent* effort
fragrant has quit [#ruby]
c0rn has joined #ruby
<lupine_85> shevy, like MNAME = " zomg what a strange method\x00!"; class << self ; define_method(MNAME) { puts "yep" } ; end ; send(MNAME)
shadoi has joined #ruby
<Kovensky> also, why the hell does ruby-doc.org not have 1.9.3's docs available for DL
<Mon_Ouie> Well then, you can, with some code, make YARD understand what's happening there
<Kovensky> it only has 1.9.2's <_<
<shevy> ArgumentError: symbol string may not contain `\0'
cha1tanya has joined #ruby
<shevy> but I get what you mean lupine_85 :D
timonv has joined #ruby
<Mon_Ouie> shevy: That's not true anymore in 1.9.3
<shevy> !!!
<Mon_Ouie> Maybe even since 1.9.2
<shevy> you can use \0 in method names now?
<lupine_85> I guess it could be different in 1.9,. aye
<Mon_Ouie> Yes
<shevy> wheeeeee
<lupine_85> oh, wait, this was 1.9, which means \x00 doesn't work in 1.8
<lupine_85> but " - " in a method name would work fine, I'm sure
bondar has joined #ruby
<shadoi> any lint in those navels?
somewhere has joined #ruby
schaerli has joined #ruby
brianpWins has joined #ruby
<shevy> that is really funny
<shevy> \x00\x00 zomg - what a strange method\x00!
<shevy> is a method!
<shevy> let's see if newlines can be part of it too
<shevy> yay \o/
<shevy> now the tricky part
<shevy> the name of a method that is the content of the .rb file
<Kovensky> also, for some reason, rvm-installed rubies don't have ri information on builtins
<Kovensky> I *have* to use the downloaded 1.9.2 documentation
mikepack has joined #ruby
<Kovensky> yard server also doesn't know about any core or stdlib classes
<Kovensky> but it shows gems just fine
<Kovensky> any way to repair that?
timonv has joined #ruby
yoklov has joined #ruby
wmoxam has joined #ruby
nonotza has joined #ruby
timonv_ has joined #ruby
<banseljaj> Ohaithat
ipsifendus has joined #ruby
<banseljaj> Is it possible to restrict the "type" of arguments to a method?
<banseljaj> Or does it need a validation method implemented seperately?
strife25 has joined #ruby
savage- has joined #ruby
fr0gprince_ has joined #ruby
<canton7> ruby philosophy doesn't tend to follow "You must pass this type of argument". If you must do checking, check to see whether the argument responds to a particular method, rather than whether it's an instance of a particular class (and raise ArgumentError if it doesn't pass)
MrGando has joined #ruby
shruggar1 has joined #ruby
schovi has joined #ruby
armdale has joined #ruby
MrGando has joined #ruby
timonv has joined #ruby
nicoulaj has joined #ruby
workmad3 has joined #ruby
<banseljaj> canton7: *nod*
mrsolo has joined #ruby
manizzle has joined #ruby
nfluxx has joined #ruby
timonv_ has joined #ruby
<Kovensky> canton7: I still tend to write ruby-ish perl =p
<Kovensky> and thus just use .is_a? Hash or .is_a? Array ._.
timonv has joined #ruby
<canton7> yeah, I haven't broken the habit either :S
<Mon_Ouie> Kovensky: rvm docs generate
<btaitelb> canton7: I ran into a scala guy (speaking at philly ete conference) who argued that because of that (no static contract), ruby codebases don't scale to large teams of developers. My argument back was that a single codebase shouldn't ever get that big in the first place, but I think his argument does have merit.
Eldariof-ru has joined #ruby
<canton7> yeah, they're two different, but valid approaches. ruby's duck typing philosophy means that the interface isn't tightly coupled to the methods, meaning that e.g. you need far less work to use some particular library. Typing everything seems to be better at eliminating bugs in larger projects
<Kovensky> Mon_Ouie: running that :3
<btaitelb> I wonder if that's why the ruby community pushes tests so much, because they end up serving that role as a contract for how the code should be used?
<btaitelb> err.. more of a blueprint than a contract, i guess.
strife25 has joined #ruby
<canton7> hrm, maybe. It could also be that ruby's the nicest language I've found to write tests in :P
Russell^^ has joined #ruby
strife25 has joined #ruby
<cconstantine> I'm trying to get rvm working on a debian system. When I run 'irb' I get a warning about missing readline. In response I did a 'rvm pkg install readline' and 'rvm remove <ruby>;rvm install <ruby' and I'm still getting that warning. Has anyone run into this issue?
mdw has joined #ruby
bawer has joined #ruby
<banseljaj> canton7, shevy: My random name generator fails. If i run it using <4.times {generate_name_male}> i get the same name 4 times
<shevy> banseljaj then apparently your code does not work
<banseljaj> It works when I use it individually
jenglish has joined #ruby
<banseljaj> I've embedded a prng inside the method, which should generate a new random number each time.
nonotza has joined #ruby
lorandi has joined #ruby
<shevy> generate_name_male must return bogus stuff
<shevy> show the method please
apok has joined #ruby
astv has joined #ruby
<astv> is there a way to tell open-uri to save downloaded content not in /tmp?
<Kovensky> Mon_Ouie: yay, ri now works =p
<Kovensky> Mon_Ouie: any way to make yard show documentation for core/stdlib (instead of just pwd or rubygems)
meskyanichi has joined #ruby
bglusman has joined #ruby
<shevy> astv hmm did not know it does that
<Mon_Ouie> I think there's a gem that contains yard-generated documentation for stdlib and core
apeiros_ has joined #ruby
<banseljaj> shevy: https://gist.github.com/13ce963177d06e7b1d0e -- there you go
<astv> shevy: i have about 25,000 /tmp/open-uriXXXX-XX files totallying in 3.6GB
<Mon_Ouie> yard-doc-core
<astv> all from the last week
<astv> i'm on ec2 and my /tmp is part of / and very small
<astv> I'd like to move the open-uri temp files to /some/other/point
TheIronWolf has joined #ruby
<shevy> mfname = mfnamelist[prng.rand(0..(mfnamelist.length - 1))]
<shevy> what is that banseljaj ?
SegFaultAX|work has joined #ruby
<shevy> astv wow :)
theRoUS has joined #ruby
theRoUS has joined #ruby
<banseljaj> shevy: I'm picking a random First name from the list of first names
<shevy> hmmmm
<shevy> are you really doing that? it seems awfully complex
<shevy> you just want a random member for an array or?
<Mon_Ouie> You can just do prng.rand(mfnamelist.size)
<banseljaj> shevy: I want a random element from the array
<banseljaj> not a random number
<Mon_Ouie> And I'm not sure why you want to create an explicit generator there — you can just use rand, or better, Array#sample
JohnBat26 has joined #ruby
<shevy> banseljaj yeah. I dont know why you need to make it so terribly complicated there
hadees_ has joined #ruby
<shevy> in my code I tend to do array.rand
<shevy> and if rand is not part of array, I add it like: def rand; self[ Kernel.rand(self.size) ]; end
<shevy> I dont understand why you need to do mfnamelist[prng.rand(0..(mfnamelist.length - 1))]
<banseljaj> I was avoiding opening a class.
<banseljaj> and trying to be clever, I guess.
brngardner has joined #ruby
<shevy> you dont have to open a class
<shevy> you can call another method too
<Mon_Ouie> array.sample
mercyroa has joined #ruby
<shevy> banseljaj http://pastie.org/3799545
<shevy> yeah then use .sample, that cuts it down even more
mercyroa has quit [#ruby]
<banseljaj> .ua
<banseljaj> sample pretty much replaces all of my code
<shevy> :D
<shevy> astv if you find out lemme know please. I never noticed that problem so far... 3.6 gig is quite a lot to store in /tmp :D
Requiem1 has joined #ruby
<banseljaj> shevy: IT WORKS!
krz has joined #ruby
Requiem1 has quit [#ruby]
<banseljaj> shevy: I don't understand why it wasn't returning different names previously?
<shevy> banseljaj dunno, you did something strange with the [prng.rand(0..(mfnamelist.length - 1))] part I bet
<shevy> I did not try to understand it, .rand or .sample seems to do what you were needing
<shevy> you know your own code best :)
<banseljaj> shevy: *nod*
<banseljaj> Thanks.
<Veejay> Thanks to Mon_Ouie, he the man
<banseljaj> I am creating a small app to generate random data.
<banseljaj> Thanks Mon_Ouie
<banseljaj> for my biostat class.
<shevy> http://pastie.org/3799587 now we can define methods after __END__ !!!
Bofu2U has joined #ruby
timonv has joined #ruby
rippa has joined #ruby
shruggar has joined #ruby
demian`_ has joined #ruby
<shevy> argh
<shevy> how can I get DATA when I am in IRB?
mborromeo has joined #ruby
<davidcelis> DATA
<shevy> hmmmm
<Mon_Ouie> Won't work, the constant won't be defined — because there's no __END__ section in the first file that Ruby will run
<Mon_Ouie> In which case DATA isn't defined
_ramo has joined #ruby
<shevy> I see
<_ramo> hi
<_ramo> i would liek to intsall ruby on my debian squeeze system.
<shevy> too bad ... my plan was to define lots of methods after __END__ in various different .rb files, and define methods like that :D
doug has joined #ruby
<doug> hullo!
<doug> do assignments have values?
<doug> was trying this: puts "Warning: you must mean %s, not %s" % (out = "%spm" % out, out)
maletor has joined #ruby
<shevy> what was the code that output that
<doug> that is the code
<shevy> I get this
<shevy> what
<doug> i think maybe it's a = vs. , thing
<banseljaj> _ramo: Is this your first time?
<doug> , must have higher precedence than =?
<rippa> doug: assignment returns rhs
<shevy> ah and out = is the assignment
<_ramo> banseljaj: yes
<rippa> doug: and you have multiple assignment
<banseljaj> _ramo: I'll PM you and guide you step by step
<rippa> out = ["%spm" % out, out]
<doug> yup
<doug> ((out = "%spm" % out), out) doesn't seem to resolve that...
<doug> just the wrong syntax, i hope
<Mon_Ouie> doug: an assignment always evaluates to the right hand side
<Mon_Ouie> Even if that assignment is a method call that doesn't return its argument
<doug> Mon_Ouie: cool. now to figure out the problem i'm having now...
<Mon_Ouie> You just can't have a comma there
<doug> hm, no way to tell ruby not to include the comma in the assignment?
<Mon_Ouie> If you're looking for the equivalent of C's a, b, it's (a; b) (parens are required to make it a single expression)
nonotza_ has joined #ruby
<doug> ah, [] helps
<doug> puts "Warning: you must mean %s, not %s" % [out = "%spm" % out, out]
francisfish has joined #ruby
<doug> guess [] and () have precedences on opposite sides of comma
csexton has joined #ruby
<doug> hm, then i run into dynamism...
nurey has joined #ruby
<doug> puts "Warning: instead of %s, I assume you mean %s" % [out, out = "%spm" % out]
<Mon_Ouie> It has nothing to do with precedence
<nurey> how does one enumerate all the symbols a ruby module exports using irb
<Mon_Ouie> It has to do that you can't have commas within parens except to separate different arguments
<nurey> say i'm in irb and i require 'pg'. i want to see what pg exports into my namespace
<Mon_Ouie> with the fact that*, rather
<doug> Mon_Ouie: but it's okay to have commas within brackets?
<Mon_Ouie> That's the syntax for array literals, so yes.
chomp has joined #ruby
<banseljaj> is there a way to export the input from an irb session?
nilg` has joined #ruby
<doug> what's ruby call (,,), lists? tuples?
<Mon_Ouie> Nothing, it doesn't exist
csexton has quit [#ruby]
astv has quit [#ruby]
<Mon_Ouie> You can only have some_method(a, b, …), where that's the argument list
<rippa> also def foo(a, b, c)
<Veejay> Isn't it passed as an array too?
<Mon_Ouie> Well, you can also use (a, b) to deconstruct an array (as in hash.each_with_index { |(k, v), i| … })
<Mon_Ouie> But what I mean is that (a, b) isn't an expression on its own
<Veejay> Nah I meant the method arguments
<Veejay> foo(a,b,c) is something like foo([a,b,c]), isn't it?
<Mon_Ouie> I wasn't really answering to your question — and still not sure what you mean
<rippa> no
<Mon_Ouie> foo([a, b, c]) would call foo with a single argument — an array
<any-key> foo(*args) is what you want
<Veejay> Where is that idea coming from then...
<any-key> so foo(a,b,c) #=> args = [a,b,c]
<Mon_Ouie> Maybe from blocks, that special case arrays
<Veejay> any-key: Yeah
<Veejay> Must be it
<Mon_Ouie> proc { |a, b| puts b }.call [1, 2] # prints 2
<any-key> * is for array args, & is for block args
chad_ has joined #ruby
hadees_ has joined #ruby
<Mon_Ouie> proc { |a, 2| puts b }.call(1, 2) would do the same
<Mon_Ouie> proc { |a, b| puts b }.call(1, 2)*
<Veejay> any-key: Yeah that was it, splatted args
fb13 has joined #ruby
<any-key> splat!
eph3meral has joined #ruby
mcwise has joined #ruby
MrGando has joined #ruby
kirun has joined #ruby
maletor has joined #ruby
Divinite has joined #ruby
etehtsea has joined #ruby
Athos has joined #ruby
<shevy> dead!
banisterfiend has joined #ruby
Morkel has joined #ruby
KL-7 has joined #ruby
ph^ has joined #ruby
imsplitbit has joined #ruby
nacengineer has joined #ruby
mmokrysz has joined #ruby
sluggy has joined #ruby
pangur has joined #ruby
<fb13> Learning Ruby now! Its fucking cool :D
fb13 has joined #ruby
<any-key> #ruby is definitely a good place to try and convert people to ruby
maletor has joined #ruby
<pangur> " get '/fun/pups' do ... pups.map {|p| p.printChoice } ... end " works for me but if I change the def to " get '/fun/puppets' do ", it does not work. Could someone please explain to me why?
moted has joined #ruby
<fb13> i didnt want to convert people xD
<any-key> you could do pups.map do |p| ; p.printChoice; end
<any-key> where the ; would be a newline
<fb13> but there also some cons about ruby
<any-key> hmm?
<any-key> oh
Shaded has joined #ruby
<any-key> no, ruby is perfect
<pangur> " get '/fun/pups' do; pups.map {|p| p.printChoice } ; end " works for me but if I change the def to " get '/fun/puppets' do ", it does not work. Could someone please explain to me why?
<fb13> haha no definitely not ;D
<pangur> Is that better, any-key? :)
<oooPaul> Ruby is not perfect. No language is. :P
<oooPaul> My love for Ruby is that it's consistent. :)
<fb13> cant know, you do not know an ideal language
<any-key> pangur: just paste the whole snippet in pastebin to make it easier for me to read
<fb13> so why say that there is no?
platzhirsch has quit [#ruby]
<any-key> fb13: comparing most languages is apples to oranges
<fb13> y
<any-key> pangur: what error are you getting?
<any-key> pangur: also, the "end" shouldn't be indented
<linduxed> should one do rspec tests for belongs_to? if yes, how does one do that?
<pangur> Interesting - I just copied and pasted from kate and there were no indents there.
scwh has joined #ruby
<pangur> I should have indented the pups line only, right?
<any-key> pangur: correct
<any-key> pangur: don't worry about it, it was just a style thing I wanted to point out, looks like it was just a copypasta snafu
bawer has joined #ruby
bbttxu has joined #ruby
bglusman has joined #ruby
<btaitelb> oooPaul: don't get me wrong, i'm a huge ruby fan, but in terms of consistency, you could argue that python is more consistent. With ruby there are several ways of accomplishing the same thing (blocks vs. lamdbas vs. procs, or braces vs. do…end), and because of mixins, you can see the same library being used in different ways.
machine2 has joined #ruby
<oooPaul> Actually, I find that more consistent. :)
<any-key> python does some things that deeply upset me...like the way you join arrays
<oooPaul> Consistency in a language, to me, isn't about how it gets used, but how it works. Python fails that for me, because some things are core level functions, other things are methods on objects.
<any-key> array.join(",") in python is ",".join(array)
<pangur> any-key, in terms of error, I am using Sinatra and all it says is that it does not know this ditty.
<any-key> pangur: how about the stack trace?
<pangur> Where I would find that, please?
<any-key> it should show it on the error page
<oooPaul> Ruby is fairly pure from that perspective; methods are all called as messages passed to objects, everything's an object, etc, etc. :)
<oooPaul> Time for lunch. :)
<btaitelb> that kind of makes sense, "hey comma, go join that array", vs. "hey array, join your elements with a comma"
<burgestrand> linduxed: I used to, but I found those tests weren’t really being helpful to me. The association itself is not important, it’s what use the association that I most often care about. But you decide for yourself; deciding what to test and what to nest is tricky business.
<any-key> btaitelb: it just seems backwards to me
<btaitelb> any-key: yeah, me too
<any-key> but in the end one of the things I really like about ruby is its block syntax...python's lambda syntax isn't nearly as elegant
<any-key> typing out "lambda" each time seems silly
<linduxed> burgestrand: well... since i feel very new to it all, i just want to slap on tests onto most things
fb13 has joined #ruby
Boohbah has joined #ruby
<burgestrand> linduxed: I’d say it’s better than the other way around, but I’m no longer sure that’s much the case. Bad tests are just as annoying as no tests, since they break for no reason and provide little value. Luckily they can always be removed or changed, while with no tests you can’t possibly think of the edge cases you had in mind when you first wrote the code. D:
SPYGAME has joined #ruby
<linduxed> burgestrand: well, i don't intend to test stuff that changes constantly like views
<pangur> There does not seem to be anything else on that page except Try this. and then it suggests: get '/fun/puppets' do; "Hello World"; end
<shevy> it would be cool if tests would coexist at the same level of code that is written
<linduxed> burgestrand: i don't think i'll bother there
<linduxed> burgestrand: same thing so far for controllers
<burgestrand> pangur: visit /fun/pups instead of /fun/puppets
<linduxed> burgestrand: i'm really skeptical about those
n3m has joined #ruby
<any-key> shevy: tests are code
_pg_ has joined #ruby
<any-key> :P
<shevy> any-key, yeah but you have to make a new file :(
<_pg_> I am using ruby 1.8.7 and trying to get a page to resume an already started session. Is this the right place to ask this question?
<any-key> any project you're testing should probably contain more than one file anyways...
<pangur> It changes the Try this. message to get '/fun/pups' do
<_pg_> (on the web)
<any-key> _pg_: what web framework?
<joaoh82> hey guys
<shevy> what session?
hukl has joined #ruby
<joaoh82> I getting this error
<_pg_> any-key: no framework. hence the difficulty.
<burgestrand> linduxed: I completely agree with you on the view tests, I test them as part of the acceptance criteria (there should be N items in the list if I have M orders and go to this page)
<joaoh82> URI::InvalidURIError: the scheme https does not accept registry part: karmalot:k5 (or bad hostname?)
<any-key> _pg_: using the CGI library?
<burgestrand> linduxed: anything else just… breaks during regular design changes :p
<_pg_> any-key: yes sir
<joaoh82> when trying to access an API using
<joaoh82> response = RestClient.get MY_URL
<joaoh82> any ideas?
<any-key> _pg_: I won't be of much help, I haven't touched it in ages, and even then I never used the session management stuff
<any-key> joaoh82: what's the full URI?
<joaoh82> "https://USER:PASSWORD@api.cashstar.com/v2/merchant?format=json"
<_pg_> any-key: thanks anyways
<burgestrand> pangur: odd, looking at your code that ought to work — did you restart your application between adding it and testing it?
Bosma has joined #ruby
<any-key> _pg_: there's probably someone here who knows a thing or two about it
<_pg_> Any ruby cgi experts? I am using Ruby 1.8.7 and the cgi library to access an already started session and having no luck. Can someone help me with this?
<any-key> joaoh82: I'm not sure that's valid for http
<burgestrand> It should be
<joaoh82> it was working for a staging URL
<joaoh82> but now they sended me another for production
<any-key> joaoh82: it might be the username that's giving you trouble
<joaoh82> and it stoped
<any-key> or the password
<shevy> _pg_ I never needed to do so so far, I didnt even know there are sessions in ruby cgi
<any-key> I'd imagine it's the password
<any-key> if the password has certain symbols in it that'd screw things up
<_pg_> shevy: its for the web
<joaoh82> the characters?
<any-key> yep
<any-key> paste the password in here and we'll see
<pangur> I did burgestrand.
nricciar has joined #ruby
bluenemo has joined #ruby
<burgestrand> pangur: odd, http://pastie.org/private/seqbderzu3ssovybiv6a3w <- that code works well for me.
rking has joined #ruby
<pangur> I have gotten it to work I restarted several times.
<_pg_> Does anyone have an example code of ruby cgi sessions resuming an existing session?
<_pg_> I get the error: 1.8/cgi/session.rb:267:in `respond_to?': wrong number of arguments (2 for 1) (ArgumentError)
<joaoh82> the password has the character "#" on it
<pangur> It seems as if I needed to restart more than once.
<joaoh82> do you think it might be it?
<_pg_> good ole` 2 fer 1
<burgestrand> joaoh82: yeah
<any-key> joaoh82: try it with a password without symbols I guess
<joaoh82> the old one did not have it
<pangur> Thanks burgestrand. It seems to be OK now. I stopped and restarted several times.
<burgestrand> joaoh82: it will abort the URI, and anything before it (username:pass#word) will be assumed hostname and port
<pangur> Then it worked.
<any-key> joaoh82: I'm not sure if there's a proper way of escaping such things, I'd read the URL spec but I'm reallllly lazy
<burgestrand> pangur: \o/
fb13 has joined #ruby
yoklov has joined #ruby
<pangur> Thanks.
<burgestrand> joaoh82, any-key: possibly with CGI.escape
<any-key> burgestrand: I've never seen the username:password@ URI thing before
<shevy> firefox uses that for ftp logins
<burgestrand> any-key: it’s kind of common, you can use it for basic HTTP authorization for example
brngardner has joined #ruby
<any-key> burgestrand: and that is why https is a good idea :P
<burgestrand> any-key: usable in most URIs, often to databases (mysql://root:password@localhost/dbname/) and similar, makes for very concise connection details :)
theRoUS has joined #ruby
theRoUS has joined #ruby
<burgestrand> any-key: yeah, or digest authentication, or both :p
upasna has joined #ruby
shruggar has joined #ruby
mmokrysz has joined #ruby
mmokrysz has quit [#ruby]
williamcotton_ has joined #ruby
BlakeRG has joined #ruby
<BlakeRG> ruby beginner here, I am looping over an array of results that come from a MySQL db. I print the result and it's formatted like ["blahblah"]
<shevy> how do you loop
<shevy> also, that means you have an Array
<BlakeRG> I am assuming that means its an array, how do I access the first index?
<shevy> array[0]
jimeh has joined #ruby
MrWhite has joined #ruby
maletor has joined #ruby
dankest has joined #ruby
<BlakeRG> shevy: thanks
workmad3 has joined #ruby
pdtpatrick has joined #ruby
crankycoder has joined #ruby
<shevy> hmm ruby does not come with a standard lib for ANSI escape code?
<niklasb> shevy: not that I knew of
geolessel has joined #ruby
<niklasb> metasploit has something like that, though
strife25 has joined #ruby
workmad3 has joined #ruby
MrWhite has joined #ruby
startling has joined #ruby
<banseljaj> Is there any way to access ruby stdlib documentation on commandline?
startling has quit [#ruby]
BSaboia has joined #ruby
<niklasb> banseljaj: `ri`
<banseljaj> niklasb: for some reason, ri only shows gem doc, not stdlib
<banseljaj> o.O
<niklasb> banseljaj: ubuntu/debian?
sohocoke has joined #ruby
<niklasb> try installing ruby-doc or something
<banseljaj> niklasb: yes. but i'm using rvm
pastjean has joined #ruby
deobald has joined #ruby
<niklasb> banseljaj: isn't there `rvm docs`?
phantomfakeBNC has joined #ruby
<Mon_Ouie> rvm docs generate
<niklasb> Mon_Ouie: thanks
<banseljaj> Mon_Ouie, and niklasb thank you. :)
<_pg_> can someone help me with the process on this doc page? there are no examples of resuming the session and I can't get it. http://ruby-doc.org/stdlib-1.8.7/libdoc/cgi/rdoc/CGI/Session.html
Poapfel has joined #ruby
mborromeo has joined #ruby
rads has quit [#ruby]
arpegius has joined #ruby
<arpegius> what's the ruby way to say if 1 is not one of [2,3,4,5]
<niklasb> arpegius: if ![2,3,4,5].include? 1
<niklasb> sry, think you need parens: ![2,3,4,5].include?(1)
davidw has joined #ruby
<arpegius> niklasb: thanks much
Shaded has joined #ruby
iocor has joined #ruby
MrWhite has joined #ruby
williamcotton_ has joined #ruby
<iamjarvo> is there a way to make irb think its an older date?
BSaboia__ has joined #ruby
Axsuul has joined #ruby
<niklasb> iamjarvo: there's https://github.com/jtrupiano/timecop
<niklasb> you could also monkey-patch Time.now manually, depending on your use case
<iamjarvo> niklasb: trying to reproduce a bug that happened at a certain time. the event only happens on a certain day
<niklasb> iamjarvo: i think Timecop is a good way to do this
<iamjarvo> cool reading the readme
<iamjarvo> thanks
justinmcp has joined #ruby
ebobby has joined #ruby
mailtruck_ has joined #ruby
jenglish has quit [#ruby]
<iamjarvo> haha niklasb timecop is pretty swee
<iamjarvo> t
<iamjarvo> like the magic
<niklasb> :P
nuba has joined #ruby
dfamorato has joined #ruby
Poapfel has joined #ruby
maskact has joined #ruby
Norrin_ has joined #ruby
dankest has joined #ruby
gen0cide_ has joined #ruby
NorrinRadd has joined #ruby
linoj_ has joined #ruby
Norrin has quit [#ruby]
davidw has joined #ruby
waxjar has joined #ruby
mpereira has joined #ruby
BlakeRG has quit [#ruby]
iamjarvo has joined #ruby
issackelly has joined #ruby
Gonzih has joined #ruby
RORgasm has joined #ruby
nricciar has joined #ruby
ysiad has joined #ruby
ephemerian has joined #ruby
workmad3 has joined #ruby
Athos has quit ["Ex-Chat"]
yannis has joined #ruby
krzkrzkrz has joined #ruby
Guedes0 has joined #ruby
Corey has joined #ruby
crankycoder has joined #ruby
Guedes has joined #ruby
Guedes0 has quit [#ruby]
td123 has joined #ruby
Guedes0 has joined #ruby
Guedes0 has joined #ruby
Guedes has joined #ruby
Guedes has joined #ruby
iamjarvo has joined #ruby
agilobable has joined #ruby
agilobable has joined #ruby
gen0cide_ has joined #ruby
snip_it_ has joined #ruby
mailtruck___ has joined #ruby
Foxandxss has joined #ruby
francisfish has joined #ruby
voodoofish has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
rking has joined #ruby
sifue has joined #ruby
sluggy has joined #ruby
td123 has joined #ruby
williamcotton_ has joined #ruby
workmad3 has joined #ruby
sohocoke has joined #ruby
brunosaboia__ has joined #ruby
nlc has joined #ruby
booginga has joined #ruby
sluggy has joined #ruby
sjaveed has joined #ruby
<sjaveed> hello folks
<sjaveed> quick question: what's wrong with this snippet: words.sort_by! { |x, y| x.length <=> y.length }
<sjaveed> i'm trying to sort an array of words by word length - not alphabetically
<apeiros_> sjaveed: you're confusing sort_by with sort
<apeiros_> read the docs of the two methods. they explain that stuff.
<sjaveed> oops
<sjaveed> you're right
<sjaveed> i'm an idiot
<sjaveed> thanks :-)
<apeiros_> yw
bglusman has joined #ruby
_john has joined #ruby
td123 has joined #ruby
<_john> If i have this self-referential relationship in DataMapper, do i need to create the friendship relationship both ways (source->target, target->source)? So between two people, do i need to create 2 friendship objects? here's the gist: https://gist.github.com/2401536
crankycoder has joined #ruby
<niklasb> _john: you sure don't *need* to, but it could make joins simpler later on.
theRoUS has joined #ruby
<_john> niklasb: yeah it looks okay, didn't know if there was gonna be too much overhead later on--last time i was working on something similar with activerecord which isn't too different
sifue has joined #ruby
<Sou|cutter> I am tempted to give a lightning talk (5 minute presentation) at my local ruby user group... but I am not very comfortable with public speaking :/
Araxia_ has joined #ruby
<_john> i wouldn't be nervous the last meetup i went to the speaker kept saying like and um every 5 seconds no biggie, i don't think most people who talk professionally are super articulate
Shaded has joined #ruby
jankly has joined #ruby
<Sou|cutter> _john: Yeah, I know what you mean. I've definitely seen speakers struggle, and I still give them props for doing it, period
brngardner has joined #ruby
<burgestrand> Sou|cutter: if you’re not nervous you’re doing it wrong :)
Ethan has joined #ruby
Ethan has joined #ruby
<_john> just don't be afraid to stop talking and think, it took me years to stop doing the "vocalized pauses"
eka has joined #ruby
<Sou|cutter> _john: just avoiding filler words like 'um...' helps a lot :P
<burgestrand> Sou|cutter: you do that by allowing yourself to be silent
<burgestrand> (and knowing your material ^^)
tommyvyo has joined #ruby
<Sou|cutter> well I think I will bite the bullet and volunteer myself. I have 2 weeks to prepare, so it's not as though I'm on the spot right now
doug has quit [#ruby]
zemanel has joined #ruby
wefawa has joined #ruby
_ramo1 has joined #ruby
<_john> Sou|cutter: what's the talk about?
nricciar_ has joined #ruby
Ethan_ has joined #ruby
virunga has joined #ruby
waxjar has joined #ruby
<Sou|cutter> _john: I have two different ideas
<Sou|cutter> _john: One is to demo my new streaming xml-to-hash library Saxerator https://github.com/soulcutter/saxerator
<Sou|cutter> _john: the other is to give a quick demo of profiling ruby code with ruby-prof
<Sou|cutter> the latter might be more useful to a wider audience... but the former is sorta something I want to pimp
<Sou|cutter> _john: which do you think?
<_john> Sou|cutter: well personally I like to see what people come up with, the profiling stuff is neat though
apok_ has joined #ruby
JivaD has joined #ruby
<_john> Sou|cutter: also i'm working on some stuff now but i wanna take a look into those things now though :)
<_john> a little busy at the moment
JivaD has joined #ruby
mattyoho has joined #ruby
Ethan has joined #ruby
JivaD has quit [#ruby]
ephemerian has joined #ruby
<Sou|cutter> _john: no worries, whenever you have time to look :P
max_ has joined #ruby
Synthead has joined #ruby
<Sou|cutter> maybe I should do two lightning talks.. or maybe just save one lightning talk for another time
<Sou|cutter> I don't think either are bad choices, really
<Synthead> if I were to make a really long string of methods, is there some way I can separate them by newlines?
<niklasb> Synthead: a "string" of methods?
<Synthead> niklasb: good catch, I meant 'line' :)
<Sou|cutter> niklasb: like foo.bar.baz.biz.niz.etc
<niklasb> Sou|cutter: you can wrap before the dot
jamiemill has joined #ruby
<Sou|cutter> right, I was just helping frame the question.
<Sou|cutter> niklasb += 1
<niklasb> Sou|cutter: http://pastie.org/3800678
<Veejay> Long chaining like this might raise issues though
<Sou|cutter> if chains get that big I tend to break them up
<Veejay> Object#tap could be of use at some point
<Sou|cutter> Veejay: that'll just keep the chain going! hehe
<Synthead> Should I be doing something like var.this('that') (newline) var.this!('those') etc ?
<Veejay> Sou|cutter: Sure but with potential error catching or logging in betweenb
<Veejay> between
Araq has joined #ruby
<Synthead> in other words, are ".method!"s better than .method.method.method ?
<niklasb> those two are just confusing...
<Synthead> or is it just preference?
<niklasb> Synthead: in general, a.foo.bar is not the same as a.foo; a.bar?
<Synthead> niklasb: they should be the same, right?
<Veejay> Nope
<niklasb> Synthead: not at all
luxurymode has joined #ruby
<niklasb> the first one calls .bar on on the return value of foo
<Synthead> oh, wait, I see
<niklasb> which *could* happen to be the same as a, but that'd be a coincidence :)
<Veejay> Depending on whether or not the method does side-effects or does stuff in place on the receiver object you might get very different results actually
<Synthead> I'm thinking n = a.foo.bar and n = a.foo; b.bar!
<Synthead> oops
<Synthead> n = a.foo.bar and n = a.foo; n.bar!
<Synthead> that should be the same, right?
<Sou|cutter> yes.
<niklasb> Synthead: yes, and it might be more readable if you choose a descriptive name for n (and not just "immediate_result" or "tmp")
<Sou|cutter> no shame in storing intermediate values
snearch has joined #ruby
<Synthead> niklasb: okay, great. and yeah, example var names ;)
<niklasb> Synthead: you'd be surprised how people call their variables out in the wild ;)
<Synthead> niklasb: been there done that :p
<Sou|cutter> niklasb: naming things is one of the hardest problems in programming :P
<niklasb> Sou|cutter: I always program with a thesaurus :)
<Sou|cutter> coming up with a good name can be very satisfying, I have to say
jankly has joined #ruby
<niklasb> Sou|cutter: until the point where you realize that someone else has already established a much better name for the same concept :P
andrewhl has joined #ruby
jitesh_shetty has joined #ruby
sohocoke has joined #ruby
<Sou|cutter> niklasb: never admit that somebody had a better idea, or the same idea first!
jankly_ has joined #ruby
chson has joined #ruby
startling has joined #ruby
<shevy> Sou|cutter well most ideas someone else already had before
<shevy> sometimes they just did not pursue or realize them
startling has quit [#ruby]
<Araq> shevy! we miss you
<shevy> Araq hehe I shall be back! but I have to finish a few other things first
<Araq> you missed a new feature: sigil-like operators can now be introduced with the @
pastjean has joined #ruby
<joaoh82> guys
<joaoh82> I am getting an
<joaoh82> NoMethodError: undefined method `request_uri' for #<URI::Generic:0x108ab0dc0>
mikeric has joined #ruby
<joaoh82> after I call url_encoded_string = CGI::escape(MY URL)
<joaoh82> AND
<shevy> Araq when I'll be back, I will make sure to have enough time to concentrate on nimrod alone. right now there are so many distractions I have and most of them are unrelated to computer things too :(
<joaoh82> response = RestClient.get url_encoded_string
<joaoh82> any ideas?
<Araq> shevy: no problem, glad you haven't left for good
<Synthead> do I need to require anything to use .match ?
testing has joined #ruby
<Veejay> Don't think so no
<shevy> Synthead .match is available, every string object has it
<Veejay> Regexp?
<shevy> "abc".match /b/ # => #<MatchData "b">
<shevy> x = "abc".match /b/; x[0] # => "b"
<Veejay> Ah works the other way around too
Araq has quit [#ruby]
<joaoh82> any ideas on the request_uri
<joaoh82> ?
Guedes has joined #ruby
Guedes has joined #ruby
sroy2 has joined #ruby
<shevy> joaoh82 no idea. Apparently URI::Generic does not have the method request_uri
mborromeo has joined #ruby
tayy_ has joined #ruby
<joaoh82> thatI got
<shevy> joaoh82 it's also hard to find out the cause of error without the full code
jeebster has quit [#ruby]
pastjean has joined #ruby
mengu has joined #ruby
coreyo has joined #ruby
GuidovanPossum has joined #ruby
looopy has joined #ruby
<coreyo> is there a way in ruby to do division with remainder (as a decimal or floating point)?
sectionme has joined #ruby
<_john> /quit
tayy has joined #ruby
_john has quit [#ruby]
<Synthead> can I use a string as a hash name? like hashName = 'id'; hash = {}; hash[:hashName] = 'test'
<shevy> coreyo modulo operator
<shevy> 103.remainder 50 # => 3
<shevy> Synthead where is the hash name
<shevy> :foo is a symbol
<shevy> perhaps you wanted to do this instead:
<Synthead> shevy: sorry, I meant a string as a symbol
<shevy> hash[hashName] = 'test'
<shevy> a string as a symbol?
<shevy> "foo" = :bar ?
<shevy> not sure what you need Synthead :)
<coreyo> shevy, I got it, you have to convert one of the operands into a decimal (i.e. with .to_f) to return a decimal value
<oooPaul> Synthead: Symbols and Strings are not equivalent.
<oooPaul> :id != "id"
<oooPaul> hash[:hashName] would assign test to the key :hashName (it's not a variable, it's a Symbol).
aantix has joined #ruby
<Synthead> shevy: well, say I have ['this', 'that', 'and_the_other']. I'm trying to loop through that to populate hash = { :this => 'stuff', :that => 'stuff', :and_the_other => 'stuff' }
<Tasser> Synthead, hash key can be anything, symbols are preferred over strings
<oooPaul> hashName = "id"; hash[hashName] = "test" <== would assign "test" to the key "id"
<oooPaul> hashName = :id; hash[hashName] = "test" <== would assign "test" to the key :id
aantix has joined #ruby
cpasmoi has joined #ruby
<shevy> hash = {}; ['this', 'that', 'and_the_other'].each {|x| hash[x.to_sym] = 'stuff'}; hash # => {:and_the_other=>"stuff", :this=>"stuff", :that=>"stuff"}
<Synthead> shevy: ahhh, nice
<oooPaul> Rails has defined an object HashWithIndifferentAccess that treats String and Symbols keys as equivalent... But that's only in Rails, not a Ruby standard.
<shevy> Rails scares me :(
<oooPaul> Rails r0x0rs. ;)
<shevy> that sounds a bit like a PHPification of ruby
<oooPaul> ...once you figure out how it all works. ;)
<oooPaul> More like the Ruby-fication of PHP.
<shevy> though ruby syntax beats PHP syntax
hirotoshi has joined #ruby
<shevy> yeah... I guess it is somewhere in the middle
<shevy> perhaps one day we will see serious competition to rails!
* shevy shakes fist!
<oooPaul> Heh.
<Veejay> Read the description
<Veejay> Says it all... Even the person documenting it has nothing but contempt for it and can barely hide it
apok has joined #ruby
<Veejay> Synthead: Hash[[:foo, :bar, :baz].zip Array.new(3) {"stuff"}.flatten] works too but is harder to read I'd say
Shaded has joined #ruby
Haydos has joined #ruby
Nisstyre has joined #ruby
workmad3 has joined #ruby
mercyroa has joined #ruby
Sailias|work has joined #ruby
maletor has joined #ruby
<eph3meral> are there any/many and or which graphics libs would people suggest?
<eph3meral> does ruby have bindings for Qt?
<eph3meral> googling now, looking for suggestions
kevinbond has joined #ruby
<eph3meral> I don't *really* need to do windowing, just drawing - but from within X, that almost necessitates windowing anyway
<eph3meral> at least super basic stuff, i.e. close button, etc
<oooPaul> ...so I'm guessing there is.
<oooPaul> :)
Shaded has joined #ruby
waxjar has joined #ruby
liluo has joined #ruby
brngardner has joined #ruby
tijmencc has joined #ruby
mercyroa has quit [#ruby]
<Synthead> Why doesn't this output [11, 12, 13]? http://codepad.org/ivGHJWoA
<oooPaul> each() returns the array it processed, not the results of the block.
<oooPaul> Switch each() with map() and you'll get what you expect.
<Synthead> oooPaul: oooh, awesome! that worked! thanks!
<shevy> Synthead if you want to apply something on each array member use .map
emsilva has joined #ruby
fbernier has joined #ruby
<shevy> b = [1, 2, 3].map {|x| x+10} # => [11, 12, 13]
<fowl__> shevy's been gettin alles die frauleins since 1942
<oooPaul> Synthead: You were close. :)
<oooPaul> So close. :)
<shevy> fowl__ hmm not sure... is that an old movie or something?
dkissell has joined #ruby
<Synthead> hahaha
samuelk|away has joined #ruby
<fowl__> shevy, i believe "alles die frauleins" is how you say "all the bitches" in german
<fowl__> am i wrong? :(
<shevy> hmm
<shevy> frauleins is a much nicer word than bitches
SiliconDon has joined #ruby
<jimeh> Synthead: only somewhat related, but a neat trick with #map if all you need to do is call a single method on each object: ['1', '2'].map(&to_i) is the same as ['1', '2'].map {|n| n.to_i}
<shevy> I think the closest word to a bitch would be a "Hure"
<fowl__> jimeh, &:to_i
<Veejay> Isn't it map(&:to_i)?
<jimeh> oops, yeah, it is :P
<fowl__> shevy, alles die Huren?
<shevy> lol
samuelkadolph has joined #ruby
<Boohbah> jimeh: awesome
<jimeh> using an IRC client as a code editor + falling asleep == horrible code
<Veejay> & is an implicit to_proc
<shevy> fowl__, kinda... it requires a bit shuffling the word... perhaps "All diese Huren" would be better
<Veejay> In that case
<shevy> I am always glad when I listen to the big lebowski, and they order in german... and I understand what they say!
<fowl__> lol @ listening to movies
<Seppman> bitches is like Whores, Fräulen is like unmarried girl. and its not Fraulein, its Fräulen. As it is not Fuhrer, its Führer. dumbasses
<shevy> yeah it is kinda true... I listen more to movies than watch them :(
<shevy> Seppman, everyone hates german umlauts!
<jimeh> shevy: you got a second screen setup you play movies on, or you just hide/minize VLC/whatever? lol
<Seppman> theres a difference between a and ä, as is in ü and u, as in ö and o.
cpruitt has joined #ruby
<Seppman> shevy: And everyone hates US-americans
<jimeh> well, å, ä and ö are all in the swedish alphabet, I know that at least... lol
<shevy> jimeh usually mplayer and a small window. I kinda keep it running here and there, it occupies about 20% of my screen size... though one day I'll setup it better to a screen in the middle of the room or something
<banisterfiend> shevy: u got owned by a fellow german
<shevy> somehow I found mplayer nicer than VLC
<Seppman> i goto bed, cause its 1am here in austria and i still have to take out pressure of my mozart balls
<jimeh> shevy: If you use OSX, have a look at little util called Afloat if you haven't heard about it :)
<Seppman> n8ya
<fowl__> yeah Seppman go bed yourself lol
<shevy> ewwww mozart ...
<shevy> that is sugar overdose
<shevy> almond paste!
* Seppman puts("Lastmessage"); I get a boner when watching Alizee - http://www.youtube.com/watch?v=SjwCAifhoPY&NR
asobrasil has quit [#ruby]
A6fe7b387 has joined #ruby
<jimeh> this is the wrong channel, but anyone had any luck with installing node-jscoverage?
denysonique has joined #ruby
<Boohbah> jimeh: /join #
<Boohbah> jimeh: /join #Node.js
invalidusrname has joined #ruby
<jimeh> yeah, already tried, but seems like the whole room is dead... lol
<jimeh> figured won't hurt to check here since there's some life :P
zaiste has joined #ruby
<shevy> no wonder
<shevy> javascript is dead
minijupe has joined #ruby
A56654215 has joined #ruby
<shevy> just imagine you say that, suddenly you have the attention of every javascript evangelist
<jimeh> haha... JS is dead, coffeescript is damn nice though :)
wroathe has joined #ruby
<jimeh> ...and this is probably were I get both praised and burned alive by ruby devs :P
<any-key> I just get tired of reading about node.js on hacker news
samuelkadolph has joined #ruby
<shevy> hmm
<any-key> it's the new hawtness so people won't shut up about it
<jimeh> true, but it is pretty nice for certain things
<any-key> javascript is the last thing I want to run server side
<jimeh> that said, I've only played with it really, but at least coffeescript makes it nice to write...
mbreedlove has joined #ruby
iamjarvo has joined #ruby
<jimeh> one of the first times I was mocking about with node.js, I decided to see if I could proxy requests from redis-cli to a real redis-server around 1am...
dwon has joined #ruby
krz has joined #ruby
<jimeh> 5 minutes after I started I had about 6 lines of coffeescript, creating a node.js server that I could connect to and issue commands to from redis-cli, and getting a hard-coded response
MeshyMan has joined #ruby
<jimeh> those 5 minutes did include looking up the Redis network protocol too, so I found that quite neat and surprisingly fast to get something working...
<minijupe> any way to simplify this: my_hash[:search].delete(:scope) if my_hash[:search].present? && my_hash[:search].has_key?(:scope)
pastjean has joined #ruby
williamcotton_ has joined #ruby
davidboy has joined #ruby
<jimeh> my_hash[:search].delete(:scope) if my_hash[:search].respond_to?(:delete)
<jimeh> ^^ something like that should work minijupe
A6b8eea79 has joined #ruby
<jimeh> there's no need to check if the :scope key exists, #delete will simply return nil if it doesn't exists
<jimeh> *exist
<Veejay> Maybe my_hash[:search].try(:delete, :scope)?
<oooPaul> minijupe: The key question is, what exactly do you want that line to do?
<Veejay> Not 100% positive on this one
<oooPaul> If it's important that the key does not get deleted if it's value is set to nil, then the answer is different than if you just want to be sure the key is deleted from the Hash.
Gonzih has joined #ruby
jankly_ has joined #ruby
<minijupe> oooPaul: just want to delete it if the search hash has a :scope key
<jimeh> is my_hash[:search] always a hash?
Targen has joined #ruby
<jimeh> Hash#delete will delete the specified key if it exists, returning the key's value...
jgrevich has joined #ruby
<minijupe> jimeh: tnx
drbawb has joined #ruby
<minijupe> jimeh: since :search will always be a hash, I've shortened to: my_hash[:search].delete(:scope) if my_hash[:search].present?
A7017771c has joined #ruby
Ammar_iD has joined #ruby
dv310p3r has joined #ruby
vitor-br has joined #ruby
<jimeh> I'm not sure you even need the #present? call there, since it just ensure's it's not #blank?, but since it's always a Hash if it exists, this should do: my_hash[:search].delete(:scope) if my_hash[:search]
Ethan has joined #ruby
Ethan has joined #ruby
<fowl__> jimeh, {}.delete(:a) #=> nil
<fowl__> xx nevermind lol
<jimeh> of course if my_hash[:search] is set to something that doesn't respond to #delete it'll fail :)
ZachBeta has joined #ruby
<jimeh> fowl__: I was wondering there for a sec... lol
samuelkadolph has joined #ruby
mikepack has joined #ruby
<fowl__> nil should have def method_missing(*) nil end
<jimeh> sometimes it would be useful, yeah... lol
<oooPaul> That's what try() is for.
<fowl__> try()?
<oooPaul> my_hash[:search].try(:delete, :scope)
<oooPaul> Might be still just a Rails "extra", but it's damned useful.
<jimeh> true :)
<oooPaul> Yeah, think it's still a Rails addition.
trend has joined #ruby
<oooPaul> Really simple monkeypatch on Object, though, that will return nil if self doesn't respond to the first parameter, otherwise it passes the remaining parameters to the method.
<jimeh> yeah, it is, which is why I'm not that familiar with it, I've mainly been living outside of the Rails libs the last year, for better or worse...
v0n has joined #ruby
<fowl__> f rails
Sailias|work has joined #ruby
<jimeh> sometimes it would be nice if #method_missing on nil just returned nil, not sure it's actually a good solution though... lol
<oooPaul> api.rubyonrails.org -- look up "try" and check out the on defined on Object. Really simple, and might be worthwhile if you find yourself in situations where you're never sure if you have an object or nil. :P
jrhorn424 has joined #ruby
ScottNYC has joined #ruby
<oooPaul> (I mean, basically check out the source and pull the monkeypatch over if you're not in Rails -- not worth pulling in all of Rails just for that ;)
<jimeh> yeah, I've done that for String#constantize a couple of times, not sure #try was around last time I did Rails full-time (end of 2009)
<jimeh> #try is basically something recent I've seen pop up here and there :)
A3e466208 has joined #ruby
SolarisBoy has joined #ruby
Vert has joined #ruby
apok_ has joined #ruby
A402df439 has joined #ruby
<GuidovanPossum> here are 3 movies i made with: a hula hoop>ipod acc>ruby>flam4 enjoy and let me know what you think: https://www.wuala.com/FlyOnLittleWing/Flam3Thrower/AccDriven/?key=9DvRHhf0nrUw
<jimeh> GuidovanPossum: that looks cool, URLs for the tools? :)
ipsifendus has joined #ruby
mmokrysz has joined #ruby
stephenjudkins has joined #ruby
ipsifendus has quit [#ruby]
maskact has joined #ruby
trend has joined #ruby
jitesh_shetty has joined #ruby
niku4i_ has joined #ruby
apok has joined #ruby
manizzle has joined #ruby