apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
* Enekoos se despide
<rking> shadoi: Have you looked at the deparse stuff?
<shadoi> nope
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
bglusman has joined #ruby
Vainoharhainen has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
Swiss38974 has joined #ruby
<shadoi> google is failing me for it, have a link?
ZachBeta has joined #ruby
<rking> I forget which one is the top gem, but I'm pretty sure you can go from compiled procs to decently legible/accurate Ruby.
<rking> Let me fish around a bit.
tilde` has joined #ruby
Enekoos has quit [Quit: Saliendo]
<rking> Hrm, not https://github.com/banister/method_source # Only finds the code on disk, it seems.
bglusman has quit [Ping timeout: 244 seconds]
<shadoi> yeah I haven't seen the inverse for ruby
Juul has quit [Ping timeout: 244 seconds]
Swiss38974 has left #ruby [#ruby]
<shadoi> I know the perl5 parser has an option to deparse
xaq has quit [Remote host closed the connection]
Natch| has quit [Ping timeout: 248 seconds]
<shadoi> rubinius has some interesting stuff around that
crankycoder has joined #ruby
tilde`_ has quit [Ping timeout: 256 seconds]
Aaton is now known as Aaton_off
pashamur_ has quit [Quit: Konversation terminated!]
pashamur_ has joined #ruby
<rking> ruby-decompiler seems lejit.
joppe has quit [Ping timeout: 244 seconds]
davidcelis has quit [Quit: K-Lined]
alexander_sy has joined #ruby
chson has quit [Remote host closed the connection]
<shadoi> that looks pretty badass
ckrailo has quit [Quit: Computer has gone to sleep.]
<shadoi> has Proc.as_code
pashamur_ has quit [Client Quit]
peregrine81 has quit [Quit: Goodbye.]
pashamur_ has joined #ruby
<shadoi> I wonder how it handles memoized objects
joppe has joined #ruby
adamkittelson has quit [Ping timeout: 248 seconds]
<horseman> rking: you can use ripper, then ripper2ruby and ruby2ruby iirc
akem_ is now known as akem
TheFuzzball has joined #ruby
<shadoi> is there a ripper for 1.9?
Vainoharhainen has quit [Quit: Linkinus - http://linkinus.com]
alexander_sy has quit []
<shadoi> oh whoa
<shadoi> it's included
<horseman> yeah ripper is 1.9 only
MrGando has quit [Quit: Bye]
<horseman> though actually lsegal i think backported it to 1.8
rizzylt has quit [Ping timeout: 248 seconds]
<rking> horseman: Sweet, thanks.
mccauley has quit [Quit: mccauley]
<shadoi> This seems like you could totally confuse the interpreter with scope changes
<rking> shadoi: e.g.?
<shadoi> I need to play with it a bit
<makarius> wow, I've just looked at ruby-decompiler, quite amazing. I used to have a lot of fun with ParseTree back in the day
williamcotton_ has joined #ruby
<rking> Pretty much anything cout does is gold, AFAIK.
bigoldrock has quit [Quit: Leaving.]
williamcotton has quit [Ping timeout: 248 seconds]
williamcotton_ is now known as williamcotton
chson has joined #ruby
<horseman> yeah cout is the shiznite
<makarius> Anyone on how does ruby-decompiler works? does it reconstructs the code based on the iseq?
emmanuelux has quit [Remote host closed the connection]
Kn|t3 has quit [Ping timeout: 244 seconds]
<shadoi> I see a lot of #TODO's :)
<shadoi> makarius: yeah, it uses InstructionSequence
<shadoi> reopens it
pashamur_ has quit [Quit: Konversation terminated!]
ZachBeta has quit [Quit: Computer has gone to sleep.]
pashamur_ has joined #ruby
<makarius> allright, will checkit out, I can imagine this won't work on jRuby
<shadoi> yeah says MRI/YARV only
emmanuelux has joined #ruby
<shadoi> uses his ruby-internal gem
<shadoi> god the classtree method is so awesome.
<makarius> shadoi: thanks
makarius has quit [Quit: WeeChat 0.3.7]
pashamur_ has quit [Client Quit]
mischief has joined #ruby
pashamur_ has joined #ruby
<mischief> hey can someone tell me how to add a shell script to a gem and have it not execute as ruby?
<rking> mischief: Can you clarify a bit?
<mischief> which part is unclear
<shadoi> mischief: you want it to execute during gem install as a pre/post-install action or you just want it in the gem?
<mischief> in the gem
gebe has joined #ruby
pashamur_ has quit [Read error: Connection reset by peer]
<shevy> a .gem is just a packaged up directory
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
pashamur_ has joined #ruby
<shevy> what you could do is put it into bin/ subdirectory of the gem like bin/foo.sh
replore_ has joined #ruby
tvw has quit [Ping timeout: 256 seconds]
ryanf has joined #ruby
<shadoi> mischief: I assume you want it to be executable and in the gem bin path?
<mischief> shevy: precisely what i have done, except it doesn't have a .sh extension and has a shebang of #!/bin/sh
<shevy> that should still work fine
<mischief> i've installed the gem via rvm which creates a ruby wrapper script
<shadoi> shevy: it creates stub files for executables
<mischief> that^
<mischief> how do i make it not do that :(
<shevy> a stub file?
kenichi has quit [Remote host closed the connection]
<rking> Oh? Troubles with rvm you say? Can't be. =\
<shevy> I dont use rvm myself so I wont know, but rvm installs into $HOME directory or?
<rking> I've gone back and forth between rvm and rbenv enough times to now say rbenv is my favorite by a long shot.
<rking> rvm2 sounds cool though.
<shevy> perl6 will run rvm2
<mischief> i hate rvm and ruby and gems with a passion, but i have to write this for work. but i guess i shouldn't rant about that in #ruby :-)
<shadoi> mischief: I think I'd probably wrap the script in a ruby bin that just uses %x or system()
<shevy> mischief, hey. I can see that with rvm. gems to a lesser extent. ruby as a language, nah, it can be beautiful poetry
<mischief> that sounds like a non-optimal solution
<shadoi> mischief: ugly but the simplest thing I think.
<shevy> like everyone plays the violin, but differently. and only my code says that I am Paganini
<shevy> and everyone else sucks :-)
pashamur_ has quit [Client Quit]
<rking> shevy: I think it said you're panini.
pashamur__ has joined #ruby
hasrb has quit [Remote host closed the connection]
<shadoi> mischief: any reason the shell script can't be converted to ruby?
niklasb has quit [Ping timeout: 244 seconds]
kenperkins has quit [Ping timeout: 256 seconds]
pashamur__ has quit [Read error: Connection reset by peer]
Konboi has joined #ruby
<shevy> if it is in the bin/ subdirectory, it would be installed into /usr/bin traditionally right?
ZachBeta has joined #ruby
pashamur__ has joined #ruby
<rking> shevy: Well, /usr/local/bin, sure.
<shevy> so technically, you could write one gem, for every shell script out there
<shadoi> if it's in the gem bin/ dir, it creates a wrapper script for it in /usr/bin
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<shadoi> Try: cat `which rake`
<mischief> shadoi: im using find
<shadoi> mischief: performance is an issue then?
<mischief> um no
<mischief> i'd rather not reinvent any wheels
<mischief> and the shell script is already written
<mischief> but fucking rvm writes a ruby wrapper around it
<shadoi> then Dir.glob will probably work fine, or use the Find module
ZachBeta has quit [Client Quit]
<rking> mischief: Then make a stfubin/whatever in your gem, then from bin/whatever use __FILE__ + '../stfubin/whatever'
freeayu has joined #ruby
<shadoi> mischief: or if you REALLY want to do it properly, convert your gem to a system package and you can put whatever the hell you want, wherever the hell you want.
<rking> Urr, that's approximate, anyway you probably get what I mean.
<shevy> properly
<mischief> yea i guess ill just make a ruby wrapper that calls exec. :>
<shevy> means to not use RVM :-)
<mischief> well
<mischief> my company does some fairly fucked up shit in gems
<mischief> like distributing their Go software ._.'
<mischief> figured ill continue with the trend
<shevy> hehehe
<rking> I like it.
yugui_zzz is now known as yugui
<shevy> rking, see? gems will soon become a common distribution format
<shadoi> mischief: lollerskates.
<shevy> even for non ruby things!
* rking totally sees.
fayimora has quit [Read error: Connection reset by peer]
<shevy> rking, lower your portage and surrender
avandenhoven has quit [Quit: avandenhoven]
<shevy> here come the rubies
liluo has quit [Remote host closed the connection]
fayimora has joined #ruby
* rking uploads an apt mirror as a .gem
<shevy> argh please no debian!
<shevy> I am so happy with you being different rking ... and now you are on that terrible apt train again :(
* rking uploads /dev/zero as a .gem
<shevy> hehe
<shevy> that's better
davidcelis has joined #ruby
<rking> v0.000000000…
<shadoi> mischief: check out fpm: https://github.com/jordansissel/fpm, convert your gems to debs/rpms
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> whoa
<shadoi> and slap your co-workers.
macmartine has joined #ruby
<mischief> except
<shevy> double whoa
<shevy> don't tell this debian, they will hate him
<mischief> we use the Go gems on os x
<mischief> XDDD
<shadoi> mischief: the use homebrew
<shadoi> then*
<mischief> we use that too :')
<mischief> we have brew, gem, and debs. containing Go executeables. XD
<shadoi> christ crackers
<shadoi> I would murder people if they did that here.
bradhe has quit [Remote host closed the connection]
<shevy> whoa whoa whoa shadoi that guy is crazy but in a cool way of crazy
perryh_away is now known as perryh
<shevy> it's like a package converter!
<mischief> it's almost like nobody knows what they are doing
<shevy> I mean the jordansissel dude
<shadoi> Yeah fpm is pretty cool
<mischief> but i can't blow their cover.
<mischief> :>
<shadoi> It's had issues recently, but it's getting back on track.
<shevy> haha yeah mischief
<shadoi> I much prefer standard debian/control debian/rules packages, but I maintained packages for a long time.
kevinbond has quit [Quit: kevinbond]
TheFuzzball has quit [Quit: Leaving...]
<shevy> so you are one of those guys splitting up things!
carlyle has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
cryptfu has quit [Quit: Leaving]
<shadoi> nah, I wasn't a debian developer, I just maintained debs for the enlightenment project for years, and a few others.
beneggett has quit [Ping timeout: 265 seconds]
bricker88 has quit [Quit: Leaving.]
<shadoi> In general I think the DPG is outdated, most of the architectures and scenarios it was made for are obsolete.
nobitanobi has quit [Quit: Leaving.]
emmanuelux has quit [Remote host closed the connection]
gtuckerkellogg has joined #ruby
emmanuelux has joined #ruby
kevinbond has joined #ruby
frishi has quit [Quit: Leaving...]
iori has joined #ruby
jeffreybaird has joined #ruby
pygospa has quit [Disconnected by services]
jonathan_ has quit [Remote host closed the connection]
pygospa has joined #ruby
kevinbond has quit [Client Quit]
tilde`_ has joined #ruby
emmanuelux has quit [Remote host closed the connection]
pdtpatrick has quit [Quit: pdtpatrick]
<shevy> hmm
<shevy> I am spying on #python right now
<shevy> they talk about very strange things
Guedes0 has joined #ruby
<shevy> "Why doesn't the decorator require an internal closure passing in func?"
tilde` has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ruby
<shevy> when I see those exchanges, I really wonder...
<shevy> is python really an OOP language?
liluo has joined #ruby
xastion has quit [Ping timeout: 245 seconds]
<shevy> return lambda x: x
<shevy> aliens!
troulouliou_dev has joined #ruby
akem has quit [Read error: Connection reset by peer]
<troulouliou_dev> hi is there an equivalent to Dir.glob to get only filenales ?
akem has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
hunglin has joined #ruby
<shevy> troulouliou_dev not sure what you mean. can you use Dir.glob?
looopy has quit [Remote host closed the connection]
<troulouliou_dev> shevy, i guess i need Dir.foreach
<troulouliou_dev> i only need to retieve the filenames inside a Dir
<shevy> Dir.glob('**/**').reject {|x| File.directory? x}
<troulouliou_dev> shevy, this return an array of absolute path , i only need the filenames
emmanuelux has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
looopy has joined #ruby
wilmoore has quit [Remote host closed the connection]
<shevy> Dir.glob('**/**').reject {|x| File.directory? x}.map {|x| File.basename x}
bburhans has quit [Quit: reconnecting...]
bburhans has joined #ruby
macgregor_ has joined #ruby
<troulouliou_dev> btw how can i generate the doc for a package not located in ri ?
eywu has quit [Quit: Leaving.]
<troulouliou_dev> i woulf like to "ri fileutils"
bzitzow has quit [Ping timeout: 256 seconds]
RoboTamer has joined #ruby
Kn|t3 has joined #ruby
kenperkins has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
iamjarvo1 has joined #ruby
jimeh has quit [Ping timeout: 244 seconds]
mrsolo has quit [Quit: Leaving]
savage- has quit [Remote host closed the connection]
apok_ has joined #ruby
EzeQL has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
Markvilla has joined #ruby
KwikkSilva has joined #ruby
apok has quit [Read error: Operation timed out]
<KwikkSilva> waddup
<KwikkSilva> write me some ruby to convert myemail@gmail.com to myemail-at-gmail-period-com or i pee my pants
<KwikkSilva> you were warned
<samuelkadolph> How is that threat to us? We aren't near you or your pants.
looopy has quit [Remote host closed the connection]
apok_ has quit [Ping timeout: 244 seconds]
<KwikkSilva> i didn't think this through
Kn|t3_ has joined #ruby
<GeekOnCoffee> KwikkSilva: that's awfully straight foward
<samuelkadolph> And you should be able to do it yourself. Just look at String#gsub or String#tr
<KwikkSilva> like i said - seemed like a good idea at the time
<KwikkSilva> however - my threat still stands
<KwikkSilva> So i leave it up to you
Kn|t3 has quit [Ping timeout: 240 seconds]
Kn|t3_ is now known as Kn|t3
<GeekOnCoffee> KwikkSilva: samuelkadolph has told you everything you need
<GeekOnCoffee> and taught me a method I didn't know (tr), cheers!
<KwikkSilva> hmm this is unfortunate - Kwikksilva was looking to make absolutely no effort on his part
<GeekOnCoffee> KwikkSilva: that was pretty obvious
<GeekOnCoffee> <insert analogy about teaching to fish here>
Araxia_ has quit [Quit: Araxia_]
<KwikkSilva> hey
<KwikkSilva> at least i'm honest
looopy has joined #ruby
<GeekOnCoffee> KwikkSilva: if you come up with a solution, I'd be happy to check it for you
<troulouliou_dev> KwikkSilva, "myemail@gmail.com".gsub("@","-at-").gsub(".com","-period-com").gsub(/$/, " or i pee my pants")
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
shadoi has quit [Quit: Leaving.]
pixelsnbits has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
digitalcakestudi has joined #ruby
tewecske has quit [Quit: Leaving.]
<KwikkSilva> troulouliou_dev, you have saved me tons of time and a new pair of pants
<KwikkSilva> i salute you
apeiros_ has quit [Remote host closed the connection]
jeffreybaird has joined #ruby
apeiros_ has joined #ruby
<KwikkSilva> also i might add - that it works like an effing hum dinger
voodoofish430 has quit [Quit: Leaving.]
<KwikkSilva> a thousand bj's be bestowed upon you
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
jeffreybaird has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Ping timeout: 265 seconds]
CheeToS has joined #ruby
indian has quit [Quit: Leaving]
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
alexim has quit [Quit: sleep]
khakimov has joined #ruby
Hanmac1 has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
greyEAX has quit [Read error: Connection reset by peer]
irrationalfab has quit [Remote host closed the connection]
mrdtt has joined #ruby
RoboTamer has left #ruby [#ruby]
ringotwo has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
bradhe has joined #ruby
Kn|t3_ has joined #ruby
adeponte has quit [Read error: Operation timed out]
Kn|t3 has quit [Ping timeout: 240 seconds]
Kn|t3_ is now known as Kn|t3
fserb has quit [Quit: ttyl]
troulouliou_dev has quit [Quit: Leaving]
shevy has quit [Ping timeout: 248 seconds]
irrationalfab has joined #ruby
wallerdev has quit [Quit: wallerdev]
shtirlic has quit [Ping timeout: 256 seconds]
looopy has quit [Remote host closed the connection]
Defusal_ has quit [Ping timeout: 246 seconds]
wagle has quit [Ping timeout: 265 seconds]
fserb has joined #ruby
ilyam has quit [Quit: ilyam]
ken_barber1 has joined #ruby
pashamur__ has quit [Ping timeout: 245 seconds]
fserb has quit [Client Quit]
TorpedoSkyline has joined #ruby
<bradhe> Erm, I'm missing something--how do you change the binding for a block? I'm trying to mimic ActiveSupport's callbacks...
pu22l3r has joined #ruby
TheFuzzball has joined #ruby
ken_barber has quit [Ping timeout: 252 seconds]
<TorpedoSkyline> TheFuzzball: STALKER
<TorpedoSkyline> =P
TorpedoSkyline has quit [Read error: Connection reset by peer]
pixelsnbits has quit [Quit: pixelsnbits]
frishi has joined #ruby
looopy has joined #ruby
shevy has joined #ruby
irrationalfab has quit [Remote host closed the connection]
fserb has joined #ruby
jonathanwallace has joined #ruby
Progster has joined #ruby
BMF has joined #ruby
wagle has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
BMF has left #ruby [#ruby]
Azure is now known as valkyrie^
fserb has quit [Client Quit]
igotnolegs has joined #ruby
robacarp_ has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
Azure has joined #ruby
shadoi has joined #ruby
SimSala has quit [Ping timeout: 240 seconds]
valkyrie^ has quit [Quit: ¦]
jeff_sebring has joined #ruby
wagle has quit [Remote host closed the connection]
cyong has joined #ruby
mockra has quit [Remote host closed the connection]
akem has quit [Ping timeout: 244 seconds]
hasrb has joined #ruby
Markvilla has quit [Quit: Markvilla]
erichmenge has quit [Quit: erichmenge]
mockra has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
wagle has joined #ruby
akem has joined #ruby
wagle has quit [Ping timeout: 240 seconds]
jeff_sebring has quit [Remote host closed the connection]
fbernier has joined #ruby
jeff_sebring has joined #ruby
wagle has joined #ruby
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ruby
fayimora has quit [Ping timeout: 245 seconds]
i_s has joined #ruby
looopy has quit [Remote host closed the connection]
beneggett has joined #ruby
replore_ has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
Gavilan has joined #ruby
beneggett has quit [Ping timeout: 244 seconds]
fserb has joined #ruby
tomb__ has quit [Quit: Computer has gone to sleep.]
hemanth has quit [Read error: Connection reset by peer]
Guedes0 has quit [Read error: Connection reset by peer]
looopy has joined #ruby
hemanth has joined #ruby
fserb has quit [Client Quit]
jpres has joined #ruby
fserb has joined #ruby
ananthakumaran has joined #ruby
ringotwo has quit [Ping timeout: 246 seconds]
fserb has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
thecreators has joined #ruby
kvirani has joined #ruby
suborbital has quit [Quit: WeeChat 0.3.9-dev]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
williamcotton has quit [Quit: williamcotton]
cHarNe2 has quit [Ping timeout: 272 seconds]
wilmoore has joined #ruby
looopy has quit [Remote host closed the connection]
umttumt has joined #ruby
williamcotton has joined #ruby
stefanp_ has quit [Ping timeout: 265 seconds]
TheFuzzball has quit [Ping timeout: 244 seconds]
umttumt has left #ruby [#ruby]
beneggett has joined #ruby
robbyoconnor has joined #ruby
chico_chicote has quit [Read error: Operation timed out]
suborbital has joined #ruby
looopy has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
fbernier has quit [Ping timeout: 244 seconds]
tilde`_ has quit [Quit: leaving]
cryptfu has joined #ruby
ilyam has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
sleetdrop has joined #ruby
umttumt has joined #ruby
fserb has joined #ruby
flowerhack has joined #ruby
manizzle has quit [Read error: Connection reset by peer]
jpres has quit [Quit: Page closed]
manizzle has joined #ruby
williamcotton has quit [Quit: williamcotton]
imami|afk is now known as banseljaj
<flowerhack> hey all, I'm having a bit of a problem with TCPSocket in a small ruby program I'm working on -- is this a good place to ask for help?
fserb has quit [Client Quit]
TheFuzzball has joined #ruby
yoklov has quit [Quit: bye!]
wpaulson has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
<ghanima> hello all
<ghanima> question
<ghanima> I need to generate some configs and and deploy them by capistrano... Just curious is the normal approach is to create an erb template and set your variables in a yaml file
fbernier has joined #ruby
TheHunter_1039 has quit [Quit: TheHunter_1039]
beneggett has quit [Ping timeout: 244 seconds]
Beoran4 has quit [Read error: Operation timed out]
Beoran4 has joined #ruby
theRoUS has joined #ruby
cHarNe2 has joined #ruby
mischief has quit [Ping timeout: 240 seconds]
brianpWins has joined #ruby
slyv has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
Stormbytes has joined #ruby
fbernier has quit [Ping timeout: 256 seconds]
iamjarvo1 has quit [Quit: Leaving.]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
theRoUS has quit [Quit: Leaving]
theRoUS has joined #ruby
r0bby has joined #ruby
billiamii| has joined #ruby
Stormbytes has quit [Client Quit]
JonnieCache has quit [Read error: Operation timed out]
mattp_ has quit [Read error: Connection reset by peer]
JB___ has quit [Read error: Operation timed out]
cHarNe2 has quit [Ping timeout: 252 seconds]
ken_barber1 has quit [Read error: Operation timed out]
cheater has quit [Read error: Operation timed out]
johnduhart2 has quit [Read error: Operation timed out]
s0ber_ has joined #ruby
williamcotton has joined #ruby
statix_ has joined #ruby
ken_barber has joined #ruby
busybox42 has quit [Ping timeout: 256 seconds]
Progster has quit [Ping timeout: 272 seconds]
hamfz_ has joined #ruby
fmcgeough has quit [Ping timeout: 256 seconds]
h4mz1d has joined #ruby
kevinbond has joined #ruby
queequeg1 has quit [Read error: Operation timed out]
neersight[d] has quit [Read error: Operation timed out]
jwang has quit [Read error: Operation timed out]
queequeg1 has joined #ruby
neersighted has joined #ruby
johnduhart has joined #ruby
busybox42 has joined #ruby
mattp_ has joined #ruby
stat1x has quit [Ping timeout: 256 seconds]
chson_ has joined #ruby
jwang has joined #ruby
Azure has quit [Read error: Operation timed out]
jeff_sebring has quit [Remote host closed the connection]
chson has quit [Ping timeout: 256 seconds]
olrrai has quit [Ping timeout: 256 seconds]
billiamii has quit [Ping timeout: 256 seconds]
MissionCritical has quit [Ping timeout: 256 seconds]
s0ber has quit [Ping timeout: 256 seconds]
fmcgeough has joined #ruby
s0ber_ is now known as s0ber
Azure has joined #ruby
Jb_ has joined #ruby
olrrai has joined #ruby
robbyoconnor has quit [Ping timeout: 256 seconds]
jeff_sebring has joined #ruby
cheater has joined #ruby
theRoUS is now known as RoUS
dsa has joined #ruby
johnduhart has quit [Read error: Operation timed out]
xsdg has quit [Read error: Operation timed out]
xsdg has joined #ruby
johnduhart has joined #ruby
EzeQL has quit [Ping timeout: 272 seconds]
mattp_ has quit [Read error: Operation timed out]
itnomad has quit [Ping timeout: 256 seconds]
mattp_ has joined #ruby
itnomad has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
EzeQL has joined #ruby
daniel_hinojosa has joined #ruby
ipoval has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
<lectrick> I think I hosed my .gemrc. Can someone send me theirs in a PM?
dsa has quit [Ping timeout: 248 seconds]
<horseman> lectrick: just google it
<horseman> it should only have like 1 line in it
<horseman> lectrick: this: gem: --no-rdoc --no-ri
<lectrick> mainly I need good sources
<samuelkadolph> No, it have 2.
<samuelkadolph> it should have*
<samuelkadolph> install: --no-rdoc --no-ri
<samuelkadolph> update: --no-rdoc --no-ri
fbernier has joined #ruby
jeff_sebring has joined #ruby
<lectrick> why does gems.rubyforge.com need a / after it but gems.github.com does not?
<samuelkadolph> Stop using those sources
<lectrick> so what are the canonical gem sources?
<samuelkadolph> rubygems.org
<lectrick> with or without a slash?
looopy has quit [Remote host closed the connection]
<horseman> samuelkadolph: how are you these days ltns
itnomad has quit [Quit: Leaving]
araujo has quit [Quit: Leaving]
<horseman> samuelkadolph: what u been up to
thecreators has quit [Remote host closed the connection]
<samuelkadolph> Got a job at Shopify. :P
<lectrick> i tried "gem install rails" on a new box and it's hanging and I think it's due to a hosed .gemrc file with buggy sources
<horseman> cool nice work
<horseman> samuelkadolph: is that a rails thing or php?
<samuelkadolph> PHP, lol
<samuelkadolph> Ahaha
<horseman> samuelkadolph: ah well, cant win them all
<samuelkadolph> We're on http://rubyonrails.org/ :P
<samuelkadolph> One of, if not the, largest rails app
<samuelkadolph> I will never work with php again
stephenjudkins has quit [Quit: stephenjudkins]
<lectrick> samuelkadolph: it ended up being, rails is a slow bitch to install, my bad. it was just odd because it sat there for like 5 minutes thinking and outputting nothing. bad UI
<samuelkadolph> lectrick: Sounds like your connection is really slow
MissionCritical has joined #ruby
fbernier has quit [Ping timeout: 244 seconds]
cHarNe2 has joined #ruby
<lectrick> samuelkadolph: it apparently didn't help that 1) I'm logged into an EC2 instance, 2) I enabled installation of rdocs :)
RoUS is now known as RoUSss
johnduhart has quit [Read error: Operation timed out]
looopy has joined #ruby
mattp_ has quit [Read error: Operation timed out]
mattp_ has joined #ruby
johnduhart has joined #ruby
RoUSss is now known as RoUS
cHarNe2 has quit [Ping timeout: 272 seconds]
azm has quit [Ping timeout: 245 seconds]
simao_ has joined #ruby
vitoravelino is now known as vitoravelino`afk
simao has quit [Ping timeout: 265 seconds]
<bnagy> hello, world.
ghanima has quit [Quit: Leaving.]
jeer has joined #ruby
kvirani has quit [Remote host closed the connection]
CheeToS has quit [Ping timeout: 244 seconds]
wubino has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
andrewhl has joined #ruby
noyb has joined #ruby
wubino has quit [Client Quit]
kalleth_ has quit [Quit: No Ping reply in 180 seconds.]
pcboy___ has joined #ruby
kalleth_ has joined #ruby
kiela has quit [Ping timeout: 244 seconds]
maahes has joined #ruby
kiela has joined #ruby
wubino has joined #ruby
pcboy_ has quit [Ping timeout: 265 seconds]
Konboi has quit [Remote host closed the connection]
umttumt has quit [Remote host closed the connection]
kevinbond has quit [Quit: kevinbond]
adeponte has joined #ruby
kevinbond has joined #ruby
rippa has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
wpaulson_ has joined #ruby
macgregor_ has quit [Ping timeout: 240 seconds]
remmy444 has joined #ruby
wpaulson has quit [Ping timeout: 244 seconds]
wpaulson_ is now known as wpaulson
hasrb has quit [Remote host closed the connection]
macmartine has quit [Quit: macmartine]
mrdtt has quit [Read error: Connection reset by peer]
mrdtt has joined #ruby
jeff_sebring has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
hamfz_ has quit [Ping timeout: 256 seconds]
pdtpatrick has joined #ruby
macmartine has joined #ruby
cjs226 has joined #ruby
byronb has joined #ruby
joast has quit [Quit: Leaving.]
My_Hearing has joined #ruby
CheeToS has joined #ruby
carlyle has quit [Remote host closed the connection]
jeer has quit []
jeer has joined #ruby
adeponte has quit [Remote host closed the connection]
iori has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 260 seconds]
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
i_s has quit [Quit: i_s]
jeer has quit [Client Quit]
ananthakumaran1 has joined #ruby
joast has joined #ruby
ryanf has quit [Ping timeout: 244 seconds]
ananthakumaran has quit [Ping timeout: 244 seconds]
billiamii has joined #ruby
billiamii| has quit [Read error: Connection reset by peer]
mikeycgto has quit [Remote host closed the connection]
kenperkins has quit [Quit: Computer has gone to sleep.]
danryan has joined #ruby
ZachBeta has joined #ruby
<danryan> hey folks, is there a JRuby-compatible JSON gem that does *not* try to parse strings that look like constants upon load?
lkba has quit [Ping timeout: 265 seconds]
any-key has quit [Remote host closed the connection]
<danryan> i.e., I get this with json_pure and jruby 1.8/1.9 compat: https://gist.github.com/2921943
mayankkohaley has joined #ruby
savage- has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
ryanf has joined #ruby
i8igmac has joined #ruby
noodletraveler has joined #ruby
banseljaj is now known as imami|afk
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
byronb has quit [Read error: Operation timed out]
umttumt has joined #ruby
michaelmartinez has joined #ruby
i8igmac has quit [Quit: Leaving]
Kn|t3 has quit [Ping timeout: 248 seconds]
nilg has joined #ruby
jeer has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<offby1> danryan: they named an Expressway after you, in Chicago
<danryan> offby1: why yes they did ;)
jeer has quit [Client Quit]
xastion has joined #ruby
jeer has joined #ruby
pu22l3r has quit [Remote host closed the connection]
dasuchin has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
mdw has joined #ruby
digitalcakestudi has quit [Ping timeout: 265 seconds]
Doppp has joined #ruby
krz has joined #ruby
nipra has joined #ruby
pu22l3r has joined #ruby
mikepack has quit [Remote host closed the connection]
Doppp has quit [Client Quit]
CannedCorn has joined #ruby
JonnieCache has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
michaelmartinez has quit [Remote host closed the connection]
Targen has quit [Read error: Operation timed out]
r0bby has quit [Ping timeout: 244 seconds]
heftig has quit [Quit: leaving]
Hanmac1 is now known as Hanmac
Aaton_off is now known as Aaton
beneggett has joined #ruby
gtuckerkellogg has joined #ruby
tonini has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
yannis has joined #ruby
robbyoconnor has joined #ruby
jeff_sebring has joined #ruby
trend has quit [Disconnected by services]
werdnativ has joined #ruby
andrewhl has quit [Remote host closed the connection]
Targen has joined #ruby
noyb has quit [Quit: Leaving]
djdb has joined #ruby
robdodson has joined #ruby
dnyy has joined #ruby
macmartine has quit [Quit: macmartine]
jeff_sebring has quit [Remote host closed the connection]
yxhuvud has joined #ruby
robdodson has quit [Client Quit]
Konboi has joined #ruby
jeff_sebring has joined #ruby
ryanf has quit [Ping timeout: 244 seconds]
a_a_g has joined #ruby
CannedCorn has joined #ruby
pu22l3r has quit [Remote host closed the connection]
CannedCorn has quit [Remote host closed the connection]
araujo has joined #ruby
nilg` has joined #ruby
williamcotton has quit [Quit: williamcotton]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
umttumt has quit [Quit: Leaving...]
hunglin has quit [Quit: Leaving.]
negaduck has quit [Quit: negaduck]
ananthakumaran has joined #ruby
andrewhl has joined #ruby
krusty_ar has quit [Ping timeout: 245 seconds]
b3nt_pin has quit [Ping timeout: 248 seconds]
JohnBat26 has joined #ruby
rdctnst has quit [Quit: Leaving]
maletor has joined #ruby
workmad3 has joined #ruby
savage- has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 252 seconds]
vectorshelve has joined #ruby
vectorshelve has quit [Client Quit]
vectorshelve has joined #ruby
<vectorshelve> hemanth: hai bhai :)
wallerdev has joined #ruby
koskoz has joined #ruby
mdw has quit [Remote host closed the connection]
<andrewhl> I'm trying to install RVM on Mac os x lion and I'm getting the following error: https://gist.github.com/2922190
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
dsa has joined #ruby
burgestrand has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 240 seconds]
<bnagy> andrewhl: read the logfiles it tells you to read?
<hemanth> andrewhl, please read /Users/user/.rvm/log/ruby-1.9.3-p194/yaml/make.log; what does it say?
<bnagy> I'm guessing no xcode
<hemanth> me too
danryan is now known as zz_danryan
<hemanth> make is missing
xastion has quit [Ping timeout: 248 seconds]
<hemanth> or even gcc
shtirlic has joined #ruby
EzeQL has quit [Ping timeout: 252 seconds]
MoMo_ has joined #ruby
MoMo_ is now known as MoMo
<bnagy> andrewhl: that's the same gist as before
<horseman> hemanth: r u the one posting all those lulzy projects to reddit
<andrewhl> i updated it
<horseman> bnagy: hey nags
<andrewhl> oh crap, wait
EzeQL has joined #ruby
<hemanth> horseman, eeeeha
<andrewhl> very sorry, didn't save properly. Here it is: https://gist.github.com/2922190
<bnagy> configure: error: no acceptable C compiler found in $PATH
<andrewhl> I'm thinking maybe xcode didn't install properly?
<bnagy> would be your problem
dsa has quit [Ping timeout: 248 seconds]
<bnagy> sounds like
<hemanth> hmm
<bnagy> horseman: morning
<bnagy> ...afternoon, whatever
zommi has joined #ruby
moshef has joined #ruby
moshef has quit [Client Quit]
senny has joined #ruby
twodollarz has quit [Ping timeout: 245 seconds]
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
ph^ has joined #ruby
<bnagy> windows 7. Mmmm. So.. pretty...
<bnagy> :<
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
_blackbird_ has joined #ruby
_blackbird has quit [Read error: Connection reset by peer]
_blackbird_ is now known as _blackbird
<horseman> bnagy: what's your opinion on windows 8
<bnagy> it has a really fly heap management subsystem
<horseman> bnagy: how say u about the UI
dsa has joined #ruby
<pyoor> bnagy: I just sent you a quick email about runtracer. I was the one earlier in the week asking about the beanstalk-client stuff
ryanf has joined #ruby
yannis has quit [Read error: Connection reset by peer]
Siphonblast2 has joined #ruby
yannis has joined #ruby
koskoz has quit [Ping timeout: 245 seconds]
A124 has joined #ruby
A124 has quit [Changing host]
A124 has joined #ruby
twodollarz has joined #ruby
cj3kim has joined #ruby
EzeQL has quit [Ping timeout: 252 seconds]
andrewhl has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby
AxonetBE has joined #ruby
<hemanth> open('http://➡.ws/').read()
<hemanth> URI::InvalidURIError: bad URI(is not URI?): http://➡.ws/
<hemanth> hmmm
wallerdev has quit [Quit: wallerdev]
<bnagy> pyoor: oh ok. That's creepy :)
dhruvasagar has joined #ruby
<bnagy> horseman: NFI about the UI. People use windows?
<hemanth> > open(URI.encode('http://➡.ws/')).read()
<hemanth> URI::InvalidURIError: the scheme http does not accept registry part: %E2%9E%A1.ws (or bad hostname?)
<hemanth> hmm, hmm
A124 has left #ruby [#ruby]
<pyoor> hah, yeah it is. I actually joined here earlier today trying to suss out some issues with a custom tracer.
<pyoor> when I saw your name I didn't even realize this was #ruby, thought it was another channel.
Morkel has joined #ruby
Konboi has quit [Remote host closed the connection]
<Siphonblast2> I keep getting this syntax error when running my program and I was hoping someone could help me
<Siphonblast2> it's very rudimentary.
moshee has quit [Ping timeout: 244 seconds]
a_a_g has quit [Ping timeout: 265 seconds]
flowerhack has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
<Siphonblast2> I'm getting the interpreter error: "cannot convert fixnum to string"
<bnagy> uh.. what syntax error?
<Siphonblast2> sorry
<Siphonblast2> not a syntax error.
<Siphonblast2> I misspoke.
a_a_g has joined #ruby
<bnagy> yeah you're trying to + a fixnum to a string
<Siphonblast2> oh
<bnagy> use string interpolation instead - + creates new strings
<bnagy> "NO NOT SINCE #{year}"
<bnagy> pyoor: query?
gregorg has quit [Quit: Quitte]
<Siphonblast2> @bnagy: how exactly do I fit what you just said for my purposes? For example, should I make a variable called year and create a random object with it?
<Siphonblast2> I'm trying to randomize the year.
<Siphonblast2> But now I understand the error since you told me what it was; but I'm still not sure how to make a random year (Since I don't know Ruby's syntax, I'm not entirely sure how the # is being used. Is it analogous to $ in Bash?)
<bnagy> Siphonblast2: use your randres or whatever you called the variable
beneggett has joined #ruby
<bnagy> or you can just put the random stuff right in the string "NOT SINCE #{ rand(1939..1956) }"
mikepack has joined #ruby
fantazo has quit [Remote host closed the connection]
ChampS666 has joined #ruby
ChampS666 has quit [Client Quit]
<Siphonblast2> oh, that seems like a better way. Didn't know you could do that. I'm really just wading around randomly here :D
<Siphonblast2> what is that syntax #{} for? Is that ruby syntax or is that your didactic example formatting?
<Siphonblast2> I was guessing the latter but I wanted to be sure.
<Siphonblast2> esp. since # is used for comments usually :D but you never know, might be something I don't know.
bradhe has joined #ruby
negaduck has joined #ruby
bluOxigen has joined #ruby
socomm has quit [Read error: Connection reset by peer]
ephemerian has joined #ruby
daniel_hinojosa has quit [Ping timeout: 256 seconds]
corenumb has joined #ruby
<corenumb> https://gist.github.com/cad947b654efd9c687a0 why am I getting a getaddrinfo: Name or service not known (SocketError) ?
<Hanmac> Siphonblast2: #{} inside an string is different then # outside, the first is for automatic string building ... like "abc#{@stat}xyz" is similar to "abc" + @stat.to_s + "xyz"
_br_ has quit [Quit: Bye, thanks for all the fish.]
a_a_g1 has joined #ruby
maesbn has joined #ruby
gilead has joined #ruby
ABK has joined #ruby
<Siphonblast2> okay. I see.
fabrice31 has joined #ruby
a_a_g has quit [Ping timeout: 265 seconds]
iocor has joined #ruby
Kn|t3 has joined #ruby
iocor has quit [Changing host]
iocor has joined #ruby
* corenumb anyone ?
justsee has quit [Quit: Linkinus - http://linkinus.com]
<Siphonblast2> also, Hanmac, why is it that if I do double quotes like you just did, it properly calculates the random number and converts it as part of the string, whereas if I use single quotes it just converts everything to a string?
igotnolegs has quit [Quit: Computer has gone to sleep.]
<Siphonblast2> what's the technical difference between the use of a single quotes and double quotes to the ruby interpreter, is what I'm asking.
<Siphonblast2> *the use of
burgestrand has joined #ruby
perryh is now known as perryh_away
jeer has quit []
blacktulip has joined #ruby
hakunin has quit [Remote host closed the connection]
Fraeon has quit [Ping timeout: 245 seconds]
hakunin has joined #ruby
<seoaqua> could anyone fix this for me? @how_many ||= @page.search("//span[@class='nums']").map{|nums|nums.first.nil? false: nums.first.content.gsub(/\D/,'').to_i}
socomm has joined #ruby
<Hanmac> Siphonblast2: single quotes does not interpret anything in the string ... so '\n' are TWO chars while "\n" are one
mikepack has quit [Remote host closed the connection]
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
jeer has joined #ruby
<seoaqua> oh ,sorry , wait
<Siphonblast2> Ah okay. Useful to know.
jbinto has quit [Read error: Connection reset by peer]
ipoval has quit [Quit: ipoval]
schovi has joined #ruby
<seoaqua> its ok now :P
<seoaqua> @how_many ||= @page.search("//span[@class='nums']").map{|num|num.content.gsub(/\D/,'').to_i unless num.nil?}.first
allanm_ has joined #ruby
hakunin has quit [Ping timeout: 252 seconds]
Fraeon has joined #ruby
jeer has quit [Client Quit]
jeer has joined #ruby
dekroning has joined #ruby
KwikkSilva has quit [Read error: Connection reset by peer]
Konboi has joined #ruby
amacgregor has quit [Ping timeout: 256 seconds]
polysics has joined #ruby
Eldariof-ru has joined #ruby
skinny_much has joined #ruby
tatsuya_o has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jprovazn_away is now known as jprovazn
davidpk has joined #ruby
davidpk has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
maletor has joined #ruby
hadees has joined #ruby
Fraeon has quit [Ping timeout: 246 seconds]
jimeh has joined #ruby
Aaton is now known as Aaton_off
tatsuya_o has quit [Remote host closed the connection]
Fraeon has joined #ruby
<bnagy> corenumb: because TCPSocket doesn't know wtf http:// is
iori has joined #ruby
<bnagy> use net/http or something
clockwize has joined #ruby
clockwize has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
timonv has joined #ruby
d3vic3 has quit [Read error: Connection reset by peer]
berserkr has joined #ruby
mikewintermute has joined #ruby
dsa has quit []
EzeQL has joined #ruby
d3vic3 has joined #ruby
olrrai has quit [Ping timeout: 256 seconds]
mrdtt has quit [Ping timeout: 256 seconds]
jeer has quit []
iocor has quit [Quit: Computer has gone to sleep.]
BrokenCog has quit [Ping timeout: 252 seconds]
jeer has joined #ruby
BrokenCog has joined #ruby
BiHi has joined #ruby
jeer_ has joined #ruby
qwerxy has joined #ruby
wagle has quit [Ping timeout: 245 seconds]
shadoi has quit [Quit: Leaving.]
mikewintermute has quit [Read error: Connection reset by peer]
jeer has quit []
mikewintermute has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
qwerxy has quit [Quit: offski]
jeer_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jeer has joined #ruby
ilyam has quit [Quit: ilyam]
flowerhack has joined #ruby
<flowerhack> hey guys
mrdtt has joined #ruby
<flowerhack> i'm getting a "broken pipe" error whenever i try to connect to login.oscar.aol.com over port 5190 using the ruby sockets library
<flowerhack> even though i have no problem telnet / nc-ing over that host/port
liluo has quit [Remote host closed the connection]
zommi has quit [Remote host closed the connection]
<flowerhack> is anyone familiar with sockets who might be able to help? i can provide code and such
wubino has quit [Quit: Leaving]
mdw has joined #ruby
jenglish has joined #ruby
mikewintermute has quit [Quit: mikewintermute]
mikewintermute has joined #ruby
<bnagy> telnet does telnet stuff behind the scenes
<bnagy> some tcp servers will dump you if you just connect raw and sit there
<bnagy> maybe try net/telnet
Kartagis is now known as whoeverisawake
friskd has joined #ruby
francisfish has joined #ruby
liluo has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
whoeverisawake is now known as Kartagis
ciopte7 has quit [Ping timeout: 240 seconds]
heftig has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
_br_ has joined #ruby
williamherry has joined #ruby
brianpWins has quit [Quit: brianpWins]
bigkevmcd has quit [Quit: outta here]
bigkevmcd has joined #ruby
tomb_ has joined #ruby
wagle has joined #ruby
Criztian has joined #ruby
flippingbits has joined #ruby
ryanf has quit [Ping timeout: 256 seconds]
cousine has joined #ruby
emmanuelux has joined #ruby
prtksxna has joined #ruby
robotmay has joined #ruby
Vainoharhainen has joined #ruby
manuphp has joined #ruby
manuphp has left #ruby [#ruby]
arturaz has quit [Read error: Connection reset by peer]
prtksxna has quit [Remote host closed the connection]
arturaz has joined #ruby
billiamii has quit [Read error: Connection reset by peer]
DarkPT has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
manuphp has joined #ruby
ctevie has joined #ruby
ctevie has quit [Changing host]
ctevie has joined #ruby
manuphp has left #ruby [#ruby]
wilmoore has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
workmad3 has joined #ruby
bosphorus has joined #ruby
flippingbits has quit [Quit: flippingbits]
flippingbits has joined #ruby
Gm4n has quit [Read error: Operation timed out]
ZeroModu_ has joined #ruby
berserkr has quit [Quit: Leaving.]
mikewintermute has quit [Quit: mikewintermute]
apeiros_ has joined #ruby
ZeroModulus has quit [Ping timeout: 265 seconds]
tatsuya_o has joined #ruby
Ammar01 has joined #ruby
tatsuya_o has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 244 seconds]
qwerxy has joined #ruby
dhruvasagar has joined #ruby
tvw has joined #ruby
gianlucadv has joined #ruby
pk1001100011 has joined #ruby
xkx has quit [Read error: Connection reset by peer]
khakimov has quit [Quit: Computer has gone to sleep.]
nfk has joined #ruby
<polysics> hello
<polysics> performance consideration: I need to run some jobs periodically
<workmad3> polysics: cron
<polysics> I am using Resque
<polysics> was thinking if it was better to requeue each job using scheduler, or just use cron and batch them out of the db
<polysics> cron/resque scheduler
<polysics> that is, options are: each job requeues itself 1 hour into the future
<polysics> or every hour, I run the query and queue all jobs
fserb has joined #ruby
<polysics> second option sounds stabler but more spiky in performance
<polysics> although there's a set number of workers
<polysics> job picks an image off HTTP, modifies it and reuploads it, so they are pretty "heavy" jobs
<polysics> what do you think?
<workmad3> well, what happens if your queue somehow takes longer than an hour to empty?
hemanth has quit [Remote host closed the connection]
Bosma has quit [Ping timeout: 246 seconds]
roolo has joined #ruby
<polysics> the goal is to have jobs run every hour, so I probably would add more workers
<polysics> so you would re-enqueue them? that would not guarantee hourly execution either
<polysics> the only way to do so is to have enough workers on it
<polysics> as the fact that the job goes back on the queue in one hour does not guarantee it gets run after 60 minutes, just that it is in the q again
<polysics> that is what was leading me to think a cron job could probably be the same thing
<workmad3> how hard a limit is the runs once an hour thing?
<polysics> ah well, not hard at all
<polysics> anywhere between 30 and 90 minutes will do, btw
<polysics> right now a single job takes about 2-3 seconds
<polysics> on a single workers
<workmad3> and how many jobs do you have?
<polysics> so i can process 3k jobs an hour
<polysics> currently 1500ish
<polysics> if i batch them out they're usually done by the 30 minute mark
<workmad3> right, so I'd suggest you just requeue them as they finish and monitor them
zommi has joined #ruby
<polysics> that would be more reliable, is it?
<polysics> as opposed to every hour select all and queue all
<workmad3> it would probably be simpler
<workmad3> don't know about reliability... again, you'd need monitoring in place to assess that
<polysics> the only problem with that is tha tResque somehow wants me to reconnect to Redis if I want to use Resque from within another job
<polysics> I guess that's a pretty harsh performance hit
twinturbo has joined #ruby
A124 has joined #ruby
A124 has left #ruby [#ruby]
<workmad3> don't try to reason about performance
<workmad3> get something set up and get it monitored so you're recording performance data
eurek has joined #ruby
<workmad3> without that data, you simply can't make any reasonable assessment of performance
<workmad3> hell, are you even running your time tests on a production or production-like machine, or are you running it on your dev machine?
tatsuya_o has joined #ruby
werdnativ has quit [Quit: werdnativ]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
negaduck_ has joined #ruby
negaduck has quit [Ping timeout: 256 seconds]
negaduck_ is now known as negaduck
wubino has joined #ruby
<polysics> totally dev machine atm :-)
<polysics> so, let's start with the cron version
<polysics> as it is easier to set up
<polysics> when I have data I can optimize
<polysics> you are totally right
EskiMag has joined #ruby
CheeToS has quit [Ping timeout: 244 seconds]
flype has joined #ruby
<workmad3> yeah, you don't even know how long the jobs will actually take... it's 2-3s on your dev hardware, but that could change drastically in production
d3vic3 has quit [Ping timeout: 248 seconds]
<polysics> especially since there's HTTP involved, so latency could be an issue here and not on the servers
<polysics> Linode's pipes are better than mine :-)
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
hemanth has joined #ruby
d3vic3 has joined #ruby
fserb has quit [Quit: ttyl]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tonini has quit [Remote host closed the connection]
<zii> What's prettier? def foo(options={}) or def foo(options = {})
cyong has quit [Quit: Leaving.]
<bnagy> who cares
<zii> I obviously do, retard.
<bnagy> asking about that kind of stuff is just going to get a million opinions
<corenumb> does ruby QT works in every platform ?
<bnagy> use what you find most readable, unless you plan to submit to core
skinny_much has left #ruby [#ruby]
vectorshelve has quit [Quit: Page closed]
<corenumb> anyone for me ?
Helius has joined #ruby
eurbach has joined #ruby
saschagehlich has joined #ruby
WhereIsMySpoon has joined #ruby
WhereIsMySpoon has left #ruby ["Leaving"]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
polysics_ has joined #ruby
polysics has quit [Ping timeout: 256 seconds]
mockra has quit [Remote host closed the connection]
<Hanmac> corenumb RubyQT should work on all OS with ruby and QT (and a compiler)
<flowerhack> is anyone here familiar with the net/toc ruby gem?
fragrant has joined #ruby
<fragrant> Anyone? I got loaderror for rubygems.
jeff_sebring has quit [Quit: Leaving]
<Hanmac> fragrant: pastie your whole error
<fragrant> Please read this, http://www.ruby-forum.com/topic/4402746#new
nipra has quit [Ping timeout: 245 seconds]
iori has quit [Remote host closed the connection]
flowerhack has quit [Remote host closed the connection]
stefanp has quit [Ping timeout: 265 seconds]
<Hanmac> fragrant: let me guess, you have ruby1.9.2+ and the tutorial is only for ruby <1.9 ... you need require_relative
iori has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
<fragrant> this? require_relative 'hola/translator'
shtirlic has joined #ruby
<fragrant> This time i got this error, https://gist.github.com/2923192
nilg` has quit [Remote host closed the connection]
<fragrant> Hanmac: ?^
mdw has quit [Remote host closed the connection]
mdw has joined #ruby
<Hanmac> then is an error in your translator file
fixl has joined #ruby
<Hanmac> you need: module Hola; class Translator ... the :: form works only if the constant is defined
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
nipra has joined #ruby
<fragrant> Hanmac: ?^
nazty has joined #ruby
<Hanmac> yeah ... and PS: the first line: #! you only need it on your 'exceutable' files, not on all
seoaqua has quit [Quit: Leaving]
<fragrant> Is this ok? https://gist.github.com/2923209
nipra has quit [Read error: Connection reset by peer]
dhruvasa1ar has joined #ruby
rohit has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
cantonic_ has joined #ruby
<fragrant> Hanmac: ?^
<fragrant> I got this, user1@mybox:~/tempgems/hola/lib$ ./hola.rb
<fragrant> ./hola.rb:5:in `<main>': Hola is not a class (TypeError)
cantonic has quit [Ping timeout: 244 seconds]
cantonic_ is now known as cantonic
jeff_sebring has joined #ruby
adambeynon has joined #ruby
<Hanmac> oh ok, i thought its a module, so you need to change it in your translator file to "class Hola"
mengu has joined #ruby
<workmad3> fragrant: it should be 'class Translator' not 'class Hola::Translator'
roams has joined #ruby
<fragrant> Why not?
<fragrant> What does Hola::Translator mean?
<workmad3> fragrant: because you're already inside your Hola module
<fragrant> http://guides.rubygems.org/make-your-own-gem/ , so is this doc a wrong one?
<workmad3> fragrant: so inside that module, 'class Hola::Translator' is actually looking for '::Hola::Hola' to define 'Translator' inside
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<workmad3> fragrant: no, that guide is correct... but you're not doing that
<fragrant> Look, they have writen this, class Hola::Translator
xastion has joined #ruby
D4T has joined #ruby
<workmad3> fragrant: yes, but outside any other classes and modules
<workmad3> fragrant: which is an *important* difference
<workmad3> fragrant: and makes your current (broken) code substantially different
<workmad3> fragrant: and hence, my comment of your current code isn't doing the same thing
DarkPT has quit [Quit: mIRC A v a r i a d o PT - http://avariado.pt.vu]
<workmad3> context matters
noganex has quit [Ping timeout: 240 seconds]
<matti> Hi workmad3
snearch has joined #ruby
<fragrant> But require 'hola/translator' doesn't work, why? require_relative 'hola/translator' works
pk1001100011 has quit [Remote host closed the connection]
<fragrant> workmad3: I could not understand what you said.
<fragrant> This is what i got from docs, http://i.imgur.com/PyLAV.png
<fragrant> workmad3: ^
bluenemo has quit [Ping timeout: 244 seconds]
<workmad3> fragrant: sorry, I have tried and failed to teach the absolute basic structure of ruby over IRC too many times now, the only thing I can now do is refer you to books and guides on learning ruby
yannis has quit [Read error: Connection timed out]
<workmad3> IRC is a great Q/A medium... but this is beyond Q/A now
<fragrant> But does require work on ruby 1.9.3 ?
vandemar has joined #ruby
eurek has quit [Quit: Computer has gone to sleep.]
<fragrant> workmad3: I have understood what you were trying to say
<fragrant> workmad3: class Hola::Translator means, translation.rb file inside another hola directory, right?
rohit has quit [Quit: Leaving]
<Hanmac> fragrant: on 1.9.3 require is spilted into two functions ... require_relative for internal and require for extrenal ... like "internal.h" and <external.h> in C
<hemanth> > open(URI.encode('http://➡.ws/')).read()
<shevy> fragrant require works
<hemanth> URI::InvalidURIError: the scheme http does not accept registry part: %E2%9E%A1.ws (or bad hostname?)
<hemanth> hmm
nipra has joined #ruby
zinjacoder has joined #ruby
polysics_ has quit [Ping timeout: 244 seconds]
ken_barber1 has joined #ruby
<fragrant> class Hola::Translator, Does that mean the translator.rb file is inside hola/ directory ?
xastion has quit [Ping timeout: 265 seconds]
noganex has joined #ruby
<bnagy> no those are completely unrelated
zomgbie has quit [Ping timeout: 245 seconds]
<Hanmac> fragrant, the name of the class has nothing todo with the location of the file
BiHi has quit [Quit: Computer has gone to sleep]
<fragrant> I mean Hola::Translator, what is Hola here ? a module name ? or a directory name?
iori has quit [Remote host closed the connection]
zomgbie has joined #ruby
<bnagy> it's a module in the broad sense in that it's either a module or a class
ken_barber has quit [Ping timeout: 244 seconds]
ken_barber1 is now known as ken_barber
bluenemo has joined #ruby
cousine_ has joined #ruby
cousine_ has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
remmy444 has quit [Ping timeout: 240 seconds]
<shevy> fragrant it is not your code?
<fragrant> Both work, why? https://gist.github.com/2923373
cousine has quit [Ping timeout: 246 seconds]
<fragrant> module Hola or , class Hola , both work, why?
<Hanmac> why not?
<shevy> fragrant you can wrap code into a module or a class
<shevy> you can wrap code into a module+class and a class+module too
<shevy> you can also wrap code into a module+module and a class+class
<fragrant> Why doesn't it work? https://gist.github.com/2923398
<fragrant> module can add self.functionname ?
<fragrant> you can't make object of a module, so why is self.hi doesn't display any error?
<shevy> you call the method on the module
<shevy> def self.hi
<shevy> and then you can use Hola.hi
federic has joined #ruby
<fragrant> is self keyword supported for module?
<shevy> what error???
<shevy> why should self.hi be an error
<fragrant> please see this, https://gist.github.com/2923398
Fraeon has quit [Ping timeout: 244 seconds]
kvirani has joined #ruby
<fragrant> Why is self keyword supported by module?
malkomalko has joined #ruby
<shevy> yep. why should self.hi be an error?
<fragrant> self keyword should be supported for only class
<shevy> aha
<fragrant> I removed self
<shevy> you must know more than matz
<fragrant> ./hola.rb:12:in `<main>': undefined method `hi' for Hola:Module (NoMethodError)
<shevy> clever boy
<shevy> now it does not work
<shevy> yippie!!!
<shevy> if you want "hi" to work, you must include the module into a class
<fragrant> What do you mean?
<locriani> class something
<shevy> or do "def self.hi"
<locriani> include module
<fragrant> What's wrong with this? puts Hola::hi(:english)
eurek has joined #ruby
<shevy> this tries to call method hi on module Hola
flippingbits has quit [Quit: flippingbits]
<fragrant> Yes
<fragrant> So what's wrong calling a module method?
<fragrant> So what's wrong calling a module method there?
corenumb has quit [Ping timeout: 245 seconds]
<shevy> Hola does not know this method in the context you provide
jbw_ has quit [Read error: Operation timed out]
jeff_sebring has quit [Remote host closed the connection]
corenumb has joined #ruby
<shevy> btw you will get the same result if you use a class rather than a module
* bnagy gets popcorn
nightzpy has joined #ruby
neersighted is now known as neersight[d]
fermion has joined #ruby
<bnagy> OBJECTS! HOW DO THEY WORK?
<fragrant> ah, this works, https://gist.github.com/2923398
<apeiros_> bnagy: by being self-ish!
mayankkohaley has quit [Ping timeout: 252 seconds]
<apeiros_> fragrant: eeeeew, don't use :: for method invocation.
twodollarz has quit [Ping timeout: 246 seconds]
davidcelis has quit [Read error: Connection reset by peer]
<apeiros_> it makes your code look like it had been eaten by a grue
<fragrant> apeiros_: Why not :::?
<fragrant> ::
luxurymode has joined #ruby
mayankkohaley has joined #ruby
<fragrant> Why do i get error for require? https://gist.github.com/2923435
<fragrant> But no problem with this, https://gist.github.com/2923398
<apeiros_> because your lib dir is not in $LOAD_PATH
noodletraveler has quit [Quit: leaving]
<bnagy> that's exactly why require_relative exists
<apeiros_> ruby -Ilib hola.rb
<apeiros_> aaaaah
* apeiros_ smacks bnagy
<apeiros_> more gruesome code…
jeff_sebring has joined #ruby
<fragrant> Why do you smack bnagy ?
<bnagy> require_relative is gruesome?
* apeiros_ goes to get some food, not in the mood for arguments over style
pk1001100011 has joined #ruby
<apeiros_> yes, it is gruesome. path resolution should (and is) not be the duty of the library.
corenumb has quit [Ping timeout: 248 seconds]
corenumb has joined #ruby
<burgestrand> ^ +1
<bnagy> *shrug*
<fragrant> same error, didnt' work, https://gist.github.com/2923435
davidcelis has joined #ruby
<fragrant> Tried this, ruby -Ilib hola.rb
luxurymode has quit [Client Quit]
<fragrant> davidcelis: hi
<burgestrand> fragrant: the reason is that you are already in lib
<burgestrand> fragrant: go up one directory first, or run ruby -I. hola.rb
<fragrant> hola.rb is inside lib/
rohit has joined #ruby
<fragrant> so should it be ? ruby -Ilib ./lib/hola.rb
<burgestrand> fragrant: yup, pretty much
<apeiros_> fragrant: doesn't add up… how come you can execute hola.rb then?
<burgestrand> usually it’s better to just write tests, and make sure those have the correct load path set up, and then use those to test things
<shevy> if I have a project foobar, how do I refer to its base dir + yaml/ subdir, in order to load a yaml file?
Fraeon has joined #ruby
<apeiros_> fragrant: I mean if your script is in lib/hola.rb and you tell ruby to run just ./hola.rb…
<bnagy> shevy: yuo're not allowed to use require_relative, that would be too simple
<bnagy> you have to make sure something has set up your paths for you
<burgestrand> shevy: most people I’ve seen that do that do it by directory traversal
<bnagy> path fairies
<shevy> hmm
<burgestrand> which is a bit sad
<apeiros_> bnagy: I'm curious as how you'd use require_relative to load a .yaml :-p
<fragrant> Why did they use it? How does/would it work? class Hola::Translator http://guides.rubygems.org/make-your-own-gem/
<fragrant> What is Hola here?
<shevy> a class
<fragrant> Holla::Translatior
<burgestrand> the nice thing about relying on load path is that your users can do crazy shit if they need to
twinturbo_ has joined #ruby
<bnagy> apeiros_: that is a flaw in the argument, yes, but the overall point about path fairies still holds
<fragrant> We don't use :: after a class name
rizzylt has joined #ruby
<burgestrand> for example if you are working with legacy code and you have a gem that is misbehaving by loading bad files
<shevy> who is "We"
<shevy> is that the spanish inquisition?
<fragrant> Rather we use :: after a module name
<shevy> who is "we"
<fragrant> We = all ruby users
<shevy> no that is not true
eurek has quit [Quit: Computer has gone to sleep.]
<shevy> that includes myself and I tell you, your statement is wrong!
<shevy> "we" don't do what you write we'll do
<shevy> we can use class or modules and use as many :: as we want to
<fragrant> What does that mean by that then? class Hola::Translator
<shevy> Foo::Bar::Ble::Bla.new
Asher has quit [Quit: Leaving.]
twinturbo has quit [Ping timeout: 256 seconds]
twinturbo_ is now known as twinturbo
<shevy> that a module or a class called Translator sits in class Hola
<shevy> and twiddles its thumbs
<fragrant> Oh, these syntax is really confusing
<shevy> patiently waiting until mr. fragrant has figured this out
<shevy> what is confusing? you scope via ::
<nightzpy> Hi, someone knows how to fix the problem sending emails with actionmailer and protect_against_forgery enable?
<nightzpy> Ok, sorry. Go to @rubyonrails
<fragrant> shevy: So when they use like this, http://i.imgur.com/PyLAV.png
<shevy> fragrant, this works http://pastie.org/4079216
twodollarz has joined #ruby
jbw_ has joined #ruby
<shevy> it is rare to see people use that
<shevy> ask apeiros_ about this style perhaps
tayy has joined #ruby
xkx has joined #ruby
twinturbo has quit [Quit: twinturbo]
<fragrant> apeiros_ is gone.
<shevy> apeiros_, you are gone according to fragrant
<apeiros_> so I am
<shevy> :(
<shevy> fragrant why did you drive him away, he could have told you about this style
<fragrant> shevy: If you use this, class Hola::Translator , shouldn't you require Hola first there?
<shevy> I have no idea who wrote this shit
<shevy> I can tell you, I dont do class Bla::Ble myself
<fragrant> I meant, isn't it wrong/mistake from docs? http://i.imgur.com/PyLAV.png
<shevy> I dont use it. You need to ask someone who does.
<fragrant> Ok
<bnagy> fragrant: if you require that file somewhere Hola is already defined then it will work
<bnagy> cause Hola will exist as a constant
Asher has joined #ruby
<bnagy> asll assuming Hola is a class or module I guess
Asher has quit [Client Quit]
<fragrant> For this, class Hola::Translator , Hola can be a module or a class, right?
<bnagy> yes
Asher has joined #ruby
<bnagy> module would be much more idiomatic
robotmay has quit [Read error: Connection reset by peer]
robotmay has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bnagy> fragrant: you know that classes are modules, right?
<fragrant> I didn't know that class are modules
<fragrant> You can create object of a class, but you can't create object of module
<bnagy> you mean instance
<bnagy> they're both already objects
<fragrant> Yes, instance
<bnagy> which is why you can quite happily define def self.blah methods on them
<bnagy> cause any object can have methods, that's the Rules
d3c has quit [Quit: Sleep]
<fragrant> Why doesn't/won't it work? https://gist.github.com/2923528
<bnagy> (*rules void where prohibited)
<fragrant> How would it work for them? http://i.imgur.com/PyLAV.png
<fragrant> How would i get Hola there? http://i.imgur.com/PyLAV.png
<bnagy> fragrant: it doesn't work because Hola is no defined when you require
<bnagy> didn't I just say that?
<bnagy> ECHO
<bnagy> 1.21 GIGAWATTS!
<bnagy> move your require down under where you define Hola
<bnagy> not that I am advising this as style, but as an example
<bnagy> normally you would require some file that defines Hola, THEN require the file that defines Hola::Translator
<apeiros_> or you'd require 'hola' from within hola/translator.rb
<apeiros_> to ensure Hola exists
* apeiros_ favors that style
<fragrant> Oh, this works fine, https://gist.github.com/2923528 , my bad
liluo has quit [Remote host closed the connection]
<wubino> is there a way to run a line of ruby from bash prompt?
<fragrant> wubino: irb
<fragrant> wubino: man irb
<apeiros_> if Hola::Translator does not rely on anything defined by Hola, you can also change how you define Hola::Translator to `module Hola; class Translator; …; end; end`
<bnagy> wubino: ruby -e 'p RUBY_VERSION'
<wubino> e.g. echo $ruby puts "hello, world"
<apeiros_> wubino: what bnagy said. if it's more than 1 line you can either use ; instead of newlines, or use `ruby`, enter your code, then hit ctrl-D
<bnagy> wubino: there are also a couple of funky args for doing parse loops from the command, check the ruby manpage
hemanth has quit [Read error: Connection reset by peer]
<apeiros_> yeah, mainly -n and -p
jitesh_shetty has joined #ruby
nari has joined #ruby
hemanth has joined #ruby
<bnagy> ruby -n freaks me out. I mean it's cool, but freaky
<wubino> thanks
<fragrant> apeiros_: I can't understand the other way you are saying
<fragrant> Can anyone gist the alternative code of this? https://gist.github.com/2923528
<apeiros_> fragrant: can you create a complete git repo containing your project?
<fragrant> apeiros_: Can you please past the other/alternative way of code you are saying? So that i can understand easily
<apeiros_> I'm willing to transform it to one that complies with my favored style.
<shevy> hehe
<fragrant> /s/past/paste*
<apeiros_> fragrant: yes. if you make it a complete repo, I'll clone it and transform it.
<fragrant> apeiros_: It's not a project
<apeiros_> fragrant: you have a directory and multiple files - yes, it is a project.
<apeiros_> anyway, the offer stands. up to you to take it.
<shevy> why does fragrant write to apeiros_, apeiros_ is gone!!!!!
<fragrant> apeiros_: 1s
robotmay has quit [Read error: Connection reset by peer]
robotmay has joined #ruby
<apeiros_> shevy: yes I am. I only wished that stupid cough had stayed.
<shevy> ewww
<shevy> being sick sucks
<apeiros_> totally. and this cough is now going on for well over 10 days :(
<fragrant> It's not project
<fragrant> apeiros_: To understand easily i edited it with directory name, please see this, https://gist.github.com/2923528
<fragrant> mygem/lib/hola.rb and mygem/lib/hola/translator.rb
<fragrant> apeiros_: Did you understand the directory structure now?
<apeiros_> I'm not willing to work with that. create a git repository with your current files and push it to github. with that I'll work.
<fragrant> I'm going to create github account then
jimeh2 has joined #ruby
SimSala has joined #ruby
negaduck has quit [Quit: negaduck]
d3vic3 has quit [Ping timeout: 244 seconds]
<GeekOnCoffee> fragrant: why are you requiring translator after you use it?
manizzle has quit [Ping timeout: 244 seconds]
manizzle has joined #ruby
vitoravelino`afk is now known as vitoravelino
d3vic3 has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
jimeh has quit [Ping timeout: 252 seconds]
<fragrant> GeekOnCoffee: What do you mean?
<fragrant> GeekOnCoffee: Where did you see i'm using translator first?
<GeekOnCoffee> never mind, you're not still in that method
<GeekOnCoffee> I haven't had my coffee yet
BiHi has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
<fragrant> apeiros_: Hi, are you there? i created git repo, https://github.com/fragrant/mygem
<fragrant> apeiros_: Please see that code.
negaduck has joined #ruby
<apeiros_> already cloned. will take a couple of minutes.
Progster has joined #ruby
<shevy> apeiros_ is still gone
Axsuul has quit [Ping timeout: 244 seconds]
<shevy> I really gotta say, this is all pretty fucked up
Jackneill has joined #ruby
<shevy> $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "src"))
<fragrant> I agree, require was good
Siphonblast has quit [Remote host closed the connection]
Siphonblast has joined #ruby
<apeiros_> fragrant: https://github.com/apeiros/mygem - you can look at the commits to see what I did. if you now run `ruby -Ilib lib/hola.rb` from within the 'mygem' directory, the script will work
<apeiros_> fragrant: however, it's not yet where it should be.
zommi has quit [Ping timeout: 265 seconds]
<apeiros_> (in case you don't see where the commits are: https://github.com/apeiros/mygem/commits/master - I documented every step)
jcromartie has quit [Quit: jcromartie]
<wubino> how do i get "puts '\n', ('a'..'z').to_a.shuffle[0..7].join" to print one blank line and then the random stuff?
nazty has quit [Quit: WeeChat 0.3.7]
<wubino> from the clo
<wubino> command line
<wubino> ~e.g. ruby -e "puts '\n', ('a'..'z').to_a.shuffle[0..7].join"
nazty has joined #ruby
<apeiros_> wubino: I suggest you use ruby -e '…' instead of -e "…"
<apeiros_> that'll not make your bash go whuzzbang if you have a method with a ! in it or access a $global
<apeiros_> also, '\n' is a slash followed by the letter n. it is not a newline. "\n" is a newline.
<apeiros_> single quoted strings differ from double quoted.
<bnagy> ruby -e 'puts "\n#{ stuf here }"'
geekbri has joined #ruby
Morkel has joined #ruby
<bnagy> with optional trailing \n
rohit has quit [Quit: Leaving]
<apeiros_> ruby -e 'puts "", stuff_here' :)
<EskiMag> Is somebody successfuly using yard-tomdoc? I am having a little issue … any help will be appreciated https://github.com/rubyworks/yard-tomdoc/issues/6
<bnagy> yeah but that won't print the stuff
rubynoob has joined #ruby
zommi has joined #ruby
<apeiros_> fragrant: pushed again. it is now `ruby -Ilib bin/hola`
d3c has joined #ruby
<rubynoob> hello, need help installing gems on ruby help plss
<bnagy> and surely it should be ; not , ?
<fragrant> apeiros_: How did you push the commited code there ? You don't have the account/password
geekbri has quit [Remote host closed the connection]
eph3meral has joined #ruby
<eph3meral> does anyone see anything wrong with this line of code
<eph3meral> account.items({},{limit:999999999}).each do |item|
<eph3meral> syntactically speaking anyway
<apeiros_> fragrant: you'll note that the url is github.com/apeiros, not github.com/fragrant
<apeiros_> fragrant: I cloned your repository and push to my own now.
<eph3meral> i'm wondering if this is some minor issue between p125 and p194
<eph3meral> cuz afaict on github, nothing has modified that particular line in a while
<bnagy> eph3meral: appears to need a space after :
<apeiros_> fragrant: btw., don't set the date property in your gemspec.
Targen has joined #ruby
<rubynoob> someone could tell me if gem installer version have something to do with the version of ruby. I have ruby 1.6.8 and want to install Builder to create XML files and to install Builder I need ruby gems, but when I am trying to install rubygems I am getting a parse error like this: @configuration ||= Gem::ConfigFile.new []
<wubino> apeiros: thanks, works like a gem!
<rubynoob> and couldn't find anything on the web. I am new to ruby and I am stuck with this for over one hour...
<fragrant> apeiros_: What's special about this comment? # encoding: utf-8
<apeiros_> fragrant: it tells ruby what encoding string literals should use.
<fragrant> apeiros_: What's wrong setting date in gemspec?
<bnagy> rubyNoob: you mean 1.8.6 I hope?
<fragrant> apeiros_: But that is just a comment, isn't it?
<apeiros_> fragrant: ask drbrain, the maintainer of rubygems. He can answer that question more qualified than I.
<bnagy> in any case, it's ancient, you probably want to install a proper ruby - what's your OS ?
<apeiros_> fragrant: it's a magic comment. ruby interprets it. it must be the first comment however.
eurek has joined #ruby
<apeiros_> fragrant: it also enables you to use unicode-chars in your comments, which is why I find it useful even if I don't have any string literals in my code.
fantazo has joined #ruby
<fragrant> apeiros_: # encoding: utf-8 , why didn't you add this comment to other files(hola.rb, translator.rb) ?
nazty has quit [Quit: WeeChat 0.3.7]
<rubynoob> bnagy: it's 1.6.8-8, all applications I am working with are done in this version of ruby and till we migrate to a newer evrsion I have to work with this version
<apeiros_> fragrant: hu? I did…
<apeiros_> only one I forgot is the gemspec.
<bnagy> rubyNoob: ok well try travelling back in time to ask your questions
negaduck has quit [Quit: negaduck]
<bnagy> I would be amazed if ANYTHING works with that version
<apeiros_> well, and the Rakefile and the files in the test dir
<rubynoob> bnagy: I am using Win7 and have a virtual machine running XP
<bnagy> is this some embedded ruby in some other program?
geekbri has joined #ruby
<apeiros_> rubyNoob: I feel very sorry for you…
nazty has joined #ruby
<apeiros_> 1.6 is >8y old I think…
<apeiros_> 12y for the first release of 1.6, 9y since 1.8
<apeiros_> I guess there's people still working on win98 too… :D
<bnagy> 16 bits should be emough for anyone, dammit!
<D4T> if i have an array like ["1", "a", "b"] how can i join the last two elements to I end up with ["1","ab"] ?
fragrant has quit [Ping timeout: 245 seconds]
<apeiros_> 16bits? are you out of your mind?!?
<rubynoob> well, I know the version it's antic, but there is nothing I can do about it for the moment. but could I run gems on that version?
<apeiros_> 8!
<apeiros_> nobody ever needs more!
<bnagy> rubyNoob: rots of ruck
<apeiros_> D4T: there's no method to do just that. just write it manually.
<D4T> apeiros_: ok i'll try :D
<rubynoob> oh...
<bnagy> D4T: ary.first(1) << ary.last(2).join
<bnagy> or a million other ways
<D4T> bnagy: ty for that
<D4T> :)
negaduck has joined #ruby
rizzylt has quit [Ping timeout: 256 seconds]
<bnagy> if you don't know how long it is then ary.first(1) << ary.drop(1).join
negaduck_ has joined #ruby
jeff_sebring has joined #ruby
suborbital has quit [Quit: WeeChat 0.3.9-dev]
pashamur__ has joined #ruby
`brendan has joined #ruby
krusty_ar has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
sepp2k has joined #ruby
Gavilan has left #ruby [#ruby]
negaduck has quit [Ping timeout: 245 seconds]
negaduck_ is now known as negaduck
frishi has quit [Quit: Leaving...]
yugui is now known as yugui_zzz
tomku has quit [Ping timeout: 244 seconds]
twock has quit [Quit: Lost terminal]
simao_ is now known as simao
Targen has quit [Ping timeout: 256 seconds]
eurek has quit [Quit: Computer has gone to sleep.]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rubynoob has quit [Quit: Page closed]
niklasb has joined #ruby
eurek has joined #ruby
wangr has joined #ruby
pu22l3r has joined #ruby
locriani_ has joined #ruby
locriani has quit [Ping timeout: 244 seconds]
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
pashamur__ has quit [Ping timeout: 256 seconds]
rizzylt has joined #ruby
d3vic3 has quit [Ping timeout: 248 seconds]
d3vic3 has joined #ruby
friskd has quit [Quit: friskd]
tk___ has joined #ruby
Gm4n has joined #ruby
dhruvasa1ar has quit [Ping timeout: 256 seconds]
locriani_ has quit [Quit: Leaving...]
dhruvasagar has joined #ruby
locriani has joined #ruby
zommi has quit [Ping timeout: 245 seconds]
RoUS has quit [Ping timeout: 260 seconds]
liluo has joined #ruby
liluo has quit [Remote host closed the connection]
carlyle has joined #ruby
carlyle has quit [Remote host closed the connection]
eph3meral has quit [Quit: Leaving]
Markvilla has joined #ruby
twock has joined #ruby
sspiff has quit [Remote host closed the connection]
polysics has joined #ruby
tomku has joined #ruby
xzu has joined #ruby
Croms has quit [Quit: Linkinus - http://linkinus.com]
thatRD has quit [Quit: leaving]
thatRD has joined #ruby
Konboi has quit [Remote host closed the connection]
Markvilla has quit [Ping timeout: 246 seconds]
fbernier has joined #ruby
SimSala has quit [Ping timeout: 265 seconds]
thatRD has quit [Client Quit]
kenperkins has joined #ruby
Markvilla has joined #ruby
elektronaut_ is now known as elektronaut
yekta has joined #ruby
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
Gm4n has quit [Ping timeout: 244 seconds]
looopy has quit [Remote host closed the connection]
Gm4n has joined #ruby
hynkle has joined #ruby
RoUS has joined #ruby
RoUS has quit [Changing host]
RoUS has joined #ruby
malkomalko has quit [Remote host closed the connection]
sleetdrop has quit [Remote host closed the connection]
jeff_sebring has joined #ruby
Facefox has quit [Ping timeout: 250 seconds]
sspiff has joined #ruby
fragrant has joined #ruby
abionic has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
<fragrant> apeiros_: So was that a wrong/mistake by the docs?
DMKE has joined #ruby
DMKE has quit [Changing host]
DMKE has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
<fragrant> apeiros_: This, http://i.imgur.com/PyLAV.png
<apeiros_> fragrant: what docs?
DarthGandalf is now known as Some-body
Some-body is now known as DarthGandalf
nipra has quit [Ping timeout: 252 seconds]
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
bbttxu has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
<shevy> in a project, when I use yaml files
<shevy> do they reside next to lib/ or do they reside within i.e. lib/yaml
RoUS has quit [Ping timeout: 260 seconds]
<shevy> or two dirs, at the same level, lib/ and yaml/
pashamur__ has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
ABK has quit [Ping timeout: 248 seconds]
<fragrant> apeiros_: I can't understand the necessity of class Hola there, https://github.com/apeiros/mygem/blob/2328899e3f259348a896394f2ee6baeb4b633eb0/lib/hola/translator.rb#L3
Facefox has joined #ruby
<apeiros_> fragrant: it's your namespace. if you do class Hola::Translator, then Hola must exist already.
<apeiros_> it doesn't at that point.
<apeiros_> and yes, reading through that tutorial, I'd say it has some flaws.
<apeiros_> I'll see whether I can talk to drbrain about it.
<fragrant> apeiros_: So there is some mistake in that torial doc, right?
RoUS has joined #ruby
<fragrant> apeiros_: Did drbrain write that?
<apeiros_> I don't think so, no
<apeiros_> but he's the main maintainer of rubygems and I trust he's access to that page.
<fragrant> This, class Hola::Translator , just doesn't make any sense, isn't it?
<apeiros_> it does. but as said, it requires Hola to exist already.
SimSala has joined #ruby
<apeiros_> and it doesn't unless you require 'hola/translator' from hola.rb, and in your executable, only require 'hola'. which is brittle and bad code.
<apeiros_> it should be possible to require a file on its own. a file should require everything it depends upon.
Gm4n has quit [Ping timeout: 245 seconds]
<fragrant> What's the necessity of class Hola there? https://github.com/apeiros/mygem/blob/2328899e3f259348a896394f2ee6baeb4b633eb0/lib/hola/translator.rb#L3 , if you remove class Hola from there , it perfectly works
freeayu has quit [Quit: 离开]
<fragrant> Why did you add class Hola
<fragrant> Only class Translator works
Gm4n has joined #ruby
Gm4n has quit [Changing host]
Gm4n has joined #ruby
<apeiros_> pull in the changes from me, update the code as you think it still works, and push that to your repo. I'm quite sure it does not work if you just remove class Hola.
<apeiros_> ah, well, it does…
<apeiros_> but your Translator class ends up being in the toplevel namespace
RoUS has quit [Ping timeout: 260 seconds]
<apeiros_> it only works because within Hola, using Translator can refer to either ::Translator (toplevel) or ::Hola::Translator
<apeiros_> again, as said, class Hola provides the namespace there.
looopy has joined #ruby
jcromartie has joined #ruby
chson_ has quit [Remote host closed the connection]
<fragrant> apeiros_: Please see this code, http://pastie.org/4079216
<fragrant> bla = Foo::Bar::Foo::Bar.new
<fragrant> That's because the last ::Bar class is inside Foo::Bar::Foo ,
nebiros has quit [Remote host closed the connection]
<dagobah_> Sanity check, is it me or is this assumption wrong: https://gist.github.com/2919483
<fragrant> Then if we write something like, class Hola::Translator , that means, Translator is inside Hola class, but how can i require Hola class there at top?
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<dagobah_> In my opinion, it doesn't "break" if you juist remove the Object.send(:remove_const, :Foo)
crankycoder has quit [Remote host closed the connection]
<fragrant> apeiros_: ?^
<shevy> dagobah_ well that removed the constant
kvirani has quit [Remote host closed the connection]
<shevy> the behaviour would be wrong if it would not remove it
<apeiros_> fragrant: I don't know what you're asking for
<apeiros_> dagobah_: constants are variables, classes are objects
<apeiros_> all you did was assign a different object to the variable named Foo
wataken44 has quit [Remote host closed the connection]
<apeiros_> so yes, this is expected behaviour.
<dagobah_> apeiros_: So just redefining class Foo is not correct?
rorrego has joined #ruby
<shevy> I dont think the two are the same. the constant was removed in between
<apeiros_> dagobah_: by redefine, do you mean reopen or replace?
<apeiros_> you won't get a `const redefined` warning with a plain `class Foo; end; class Foo; end`
<apeiros_> and that won't create a new class instance either.
<dagobah_> apeiros_: Yes, what I'm really asking is that the :remove_const doesn't get called magically by ruby behind the scenes does it?
wataken44 has joined #ruby
<apeiros_> dagobah_: by what?
<apeiros_> by what should/would it get called?
<dagobah_> When a new class of the same name is made, I'm not too sure.
<fragrant> apeiros_: Do/did you run the code in this way? ruby -Ilib bin/hola
<apeiros_> fragrant: I'd run it that way. the last version works with just `ruby bin/hola` too.
a_a_g1 has quit [Quit: Leaving.]
ringotwo has joined #ruby
<dagobah_> apeiros_: Oh so reloading a class is different to re-opening a class?
nateberkopec has joined #ruby
<apeiros_> dagobah_: what do you understand under 'reloading a class'?
<shevy> ruby classes are always open
explody has quit [Remote host closed the connection]
dv310p3r has joined #ruby
vlad_starkov has joined #ruby
nebiros has joined #ruby
<dagobah_> I think I lack basic understanding on this one.
nebiros is now known as Guest63318
explody has joined #ruby
<fragrant> apeiros_: If i want to write in this way, then where would i need to change code? https://github.com/fragrant/mygem/blob/master/lib/hola/translator.rb
<apeiros_> fragrant: again, if you remove `class Hola` from there, you create a class named Translator, without removing it, it is named Hola::Translator. You do *not* want to define a top-level class Translator. What if I write a gem Olah and have an Olah::Translator, but I don't namespace it either? Then two gems define a class Translator
<apeiros_> this is why you namespace. namespacing helps to avoid naming conflicts.
vlad_starkov has quit [Remote host closed the connection]
<apeiros_> all classes in your gem should be put under one common namespace. Hola in your case.
Guest63318 is now known as nebiros
<shevy> you can use different files dagobah_ like ... file1.rb class Foo; def hi;puts 'hi';end;end and file2.rb: class Foo; def yo;puts 'yo';end;end, and they both will have extended class Foo
<apeiros_> because Hola::Translator and Olah::Translator can coexist.
nebiros has quit [Changing host]
nebiros has joined #ruby
vlad_starkov has joined #ruby
<apeiros_> but hola and olah could not coexist if they both define ::Translator. one would redefine the other's Translator class -> crash.
<shevy> hola que tal, mi perro es un gato
<apeiros_> dagobah_: in this: x = "foo"; p x.object_id; x = "foo"; p x.object_id
<apeiros_> dagobah_: do you understand why you get two different object ids?
eurek has quit [Quit: Computer has gone to sleep.]
<fragrant> apeiros_: It's getting confusing to me, can you please commit your code with namespace or what you are trying to say, i edited my code
RoUS has joined #ruby
<apeiros_> fragrant: my code *already* uses namespaces
<apeiros_> that's why `class Hola` is there
rippa has quit [Quit: derp herp]
<fragrant> That is a class Hola not namespace Hola
<apeiros_> the class Hola *is* the namespace
<apeiros_> it *is* the class Hola in Hola::Translator too
<shevy> haha
<shevy> fragrant still refuses to accept other people's statement :)
<apeiros_> fragrant: but if you write `class Hola::Translator` instead of `class Hola; class Translator`, then Hola *must exist* at that point. and it does not. hence you get an error.
macmartine has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
<apeiros_> `class Foo; end` creates the class Foo and the constant if they don't exist already. but `class Foo::Bar; end` only creates Foo::Bar (the Bar part), it does *not* create Foo. it doesn't because Foo could be either a module or a class.
nateberkopec has joined #ruby
spinst3r has joined #ruby
<workmad3> apeiros_: having fun? :)
<apeiros_> workmad3: :-/
vlad_starkov has quit [Remote host closed the connection]
<fragrant> apeiros_: Ok, then please use this format, class Hola::Translator and make the Hola exist or do what you need to do to write in this format class Hola::Translator
<apeiros_> oh my
<fragrant> apeiros_: Please change the code
<apeiros_> fragrant: I made Hola exist *by not using* class Hola::Translator. it does not work. period.
<shevy> apeiros_: Please change the code
<spinst3r> hi there
<shevy> apeiros_: Please use this format
<workmad3> apeiros_: make my code work!!!!
spinst3r has quit [Client Quit]
<fragrant> apeiros_: Ok
<shevy> apeiros_: Please father my children
jeff_sebring has quit [Read error: Connection reset by peer]
* apeiros_ didn't know shevy was female…
<shevy> fragrant why don't you give up with class Hola::Translator, it really is awful
krz has quit [Quit: krz]
<fragrant> apeiros_: So that means, you can't write/use something like this=> "class Hola::Translator" in translator.rb, right?
<shevy> imagine if everyone would do this
jeff_sebring has joined #ruby
<shevy> no longer would we see:
<shevy> class Cat
<shevy> we would suddenly see
<apeiros_> fragrant: for the last time: you can. but it needs class Hola to exist beforehand.
<shevy> class Superman::Cat
nazty has quit [Ping timeout: 248 seconds]
<shevy> please fragrant
<apeiros_> http://pastie.org/4079913 this would work. but it is pointless.
td123 has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<apeiros_> it is why the tutorials first example worked. because they had Hola and Hola::Translator in the same file. and Hola::Translator was defined after Hola.
eurek has joined #ruby
<fragrant> apeiros_: I'm not sure, i can't understand, were/are you saying about this ? https://github.com/fragrant/mygem/blob/master/lib/hola/translator.rb
jrist-afk is now known as jrist
<apeiros_> no. here you (try to) create a class Hola::Hola::Translator
ph^_ has joined #ruby
<fragrant> It looks they are same, http://pastie.org/4079913 and https://github.com/fragrant/mygem/blob/master/lib/hola/translator.rb look same, class Hola is empty class
<fragrant> apeiros_: ^
<apeiros_> no, they don't look the same
looopy has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
joast has quit [Ping timeout: 244 seconds]
<apeiros_> http://pastie.org/4079913 closes class Hola right at line 2
lxsameer has joined #ruby
<bnagy> hahah is this STILL going?
<fragrant> Ye, that is the one difference, closing the class
<shevy> yeah bnagy... the problem is fragrant does not listen, it just keeps up bouncing back again and again
lxsameer has quit [Max SendQ exceeded]
<shevy> fragrant why does "class Hola::Translator" not work
lxsameer has joined #ruby
RoUS has quit [Ping timeout: 260 seconds]
<apeiros_> fragrant: http://pastie.org/4079913
ph^ has quit [Ping timeout: 240 seconds]
tomask has joined #ruby
<fragrant> apeiros_: But this class Hola , https://github.com/fragrant/mygem/blob/master/lib/hola/translator.rb and this class Hola https://github.com/fragrant/mygem/blob/master/lib/hola.rb are different, right?
joshman_ has quit [Quit: Computer has gone to sleep.]
<apeiros_> if you define a class within a class or a module, it is *nested* in that class. you access it by the nested name outside of the definition.
zommi has joined #ruby
<bnagy> don't suppose anyone has used jruby x64 on windows with 0mq ?
<fragrant> shevy: That will work if you have an empty class Hola above the class Hola::Translator
lxsameer has quit [Max SendQ exceeded]
<shevy> fragrant what if you have a module Hola and not class Hola instead
g0bl1n has joined #ruby
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby
<shevy> but see, this is why I think the distinction between module and class confuses people
<shevy> fragrant is confused!
<GeekOnCoffee> all you need is to throw a female exception.. then you'd have a hola back girl
ph^_ has quit [Ping timeout: 245 seconds]
<apeiros_> class Foo; end; class Foo; end # this is twice the same class
<shevy> GeekOnCoffee yeah but this is spanish, it means... hello
<apeiros_> and whether you reopen a class in a different file does not matter.
<shevy> although I mistyped hola as hole a minute before... had to edit the line before hitting enter :P
<GeekOnCoffee> shevy: my wife's a Spanish teacher… I don't know much, but I know hola :P
<fragrant> apeiros_: Yes, those two lines
<apeiros_> same class
<shevy> I once knew spanish! 4 years in school, I was not bad... then... many years later, I forgot about 98% already :(
<shevy> fragrant, teach us spanish man
<shevy> what means "object" in spanish?
<D4T> is there anyway of splitting a string by any upper case word?
jeffreybaird has joined #ruby
<bnagy> yes
<shevy> D4T sure... via .gsub and a proper regex to it
<D4T> cool thanks guys
<apeiros_> shevy: um, splitting is usually done by split, not gsub ;-)
<apeiros_> D4T: split + regex
<apeiros_> see String#split
<D4T> on it, cheers
<shevy> oh yeah
<shevy> I only had that code example in mind
pashamur__ has quit [Quit: Konversation terminated!]
<shevy> D4T, "WhatDoYouWant".gsub(/([A-Z]+)([A-Z])/,'\1_\2').gsub(/([a-z])([A-Z])/,'\1 \2').split(' ') # => ["What", "Do", "You", "Want"] <--- you wont need the gsub I suppose, but I am too lazy to make this shorter
Asher has quit [Quit: Leaving.]
pashamur__ has joined #ruby
<fragrant> apeiros_: One is empty class and other is not empty
<shevy> hehehe
<apeiros_> fragrant: yes. they are the same
<shevy> this is fun :)
<bnagy> luckily there are only two of them
uris has joined #ruby
<bnagy> otherwise you would have to say they are the same in every permutation
justsee has joined #ruby
<shevy> yeah... if there would be three classes, it would be a nightmare for fragrant
<apeiros_> fragrant: again, the only problem with the line `class Hola::Translator` is that it requires Hola to exist. it means that somewhere before that line, the line `class Hola` must have been run
justsee has quit [Changing host]
justsee has joined #ruby
<shevy> we should really tell drbrain that examples like class Foo::Bla confuse people more than they help
* shevy waits for fragrant ...
pashamur__ has quit [Read error: Connection reset by peer]
RoUS has joined #ruby
* shevy takes some of bnagy's popcorn.
pashamur__ has joined #ruby
<apeiros_> so the solutions are: a) don't use it, use `class Hola; class Translator` instead, which too defines Hola::Translator, b) require 'hola' on top of the file 'hola/translator' and ensure that hola.rb requires 'hola/translator' *after* the line with `class Hola`
IrishGringo has joined #ruby
<apeiros_> or c) stick in a `class Hola; end` before `class Hola::Translator`
carlyle has joined #ruby
<apeiros_> I think b) is horrid and c) is pointless. hence my choice is clearly a).
<apeiros_> note that all 3 solutions create the very same class Hola::Translator
<fragrant> apeiros_: So this empty class https://github.com/fragrant/mygem/blob/master/lib/hola/translator.rb#L2 is acting as namespace or include that older class Hola => https://github.com/fragrant/mygem/blob/master/lib/hola.rb#L3 , right?
<apeiros_> fragrant: it is there to ensure that the class Hola exists.
yekta has quit [Quit: yekta]
<bnagy> yes! MASH those jargon terms!
nelson- has joined #ruby
<apeiros_> all it does is create a new class Hola in case it doesn't exist already. if it exists already, it does nothing.
<bnagy> namespace the include module and then require the toplevel!
<apeiros_> bnagy: whuts?
<bnagy> apeiros_: popcorn?
<apeiros_> I'd love to
<workmad3> bnagy: don't forget to eigenclass the supermodule and meta-ghost-method your mixins!
borkman`` has joined #ruby
lorandi has joined #ruby
<shevy> whoa
<shevy> meta-ghost
<shevy> never read that one before
pzol has quit [Ping timeout: 245 seconds]
<shevy> I hate the word eigen
<shevy> fragrant, what means "self" in spanish?
pashamur__ has quit [Ping timeout: 246 seconds]
borkman` has quit [Ping timeout: 240 seconds]
<JonnieCache> lol
<JonnieCache> what were ghost methods again?
<bnagy> some crap one of the authors made up?
<fragrant> shevy: I'm trying with module Hola this time
<JonnieCache> yeah i remember that much
<JonnieCache> but what was it? i remember it being particularly pointless
looopy has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
<fragrant> apeiros_: Why isn't it working with module Hola?
dhruvasagar has joined #ruby
<bnagy> I have little enough long term storage, I'm not wasting it on that kind of rubbish
<shevy> JonnieCache I'd wish I'd know! ghost sounds awesome and cool
vlad_starkov has joined #ruby
<bnagy> I have internet memes to memorize
<shevy> ghost hola
<apeiros_> fragrant: it would. but it requires that you never do `class Hola` anywhere.
djdb has quit [Remote host closed the connection]
<shevy> I think fragrant is stuck in an endless loop
<apeiros_> since it can't be `class Hola` and `module Hola` at the same time. it has to be either.
vlad_starkov has quit [Remote host closed the connection]
<fragrant> apeiros_: I didn't use class Hola anywhere
<shevy> :)
<apeiros_> then what error did you get?
<fragrant> bin/hola:3:in `include': wrong argument type String (expected Module) (TypeError)
<fragrant> from bin/hola:3:in `<main>'
<apeiros_> include?
kvirani has joined #ruby
<fragrant> require works
<shevy> include "Hola" TypeError: wrong argument type String (expected Module)
<apeiros_> include does something different.
<fragrant> but normally we include module, isn't it?
robozahn has joined #ruby
<fragrant> What does include do?
<shevy> we ...
<apeiros_> yes. you include modules, not files ;-)
<shevy> he always writes "we" ...
<apeiros_> so you first require 'hola' (which loads the code in the file), which makes the module Hola available, and *then* you can include Hola.
<apeiros_> notice, `include Hola`, not `include 'hola'`
<bnagy> not that you need to
<apeiros_> but it's not necessary to do that there.
* shevy waits for fragrant
<apeiros_> include adds methods and constants from a module to the including namespace.
<fragrant> shevy: lol
imami|afk is now known as banseljaj
<fragrant> apeiros_: What's wrong with this then? https://github.com/fragrant/mygem/blob/master/bin/hola
<fragrant> apeiros_: bin/hola:4:in `<main>': uninitialized constant Hola (NameError)
<apeiros_> you do not load the code that contains the module Hola. reread what I wrote.
<apeiros_> 15:56 apeiros_: so you first require 'hola' (which loads the code in the file), which makes the module Hola available, and *then* you can include Hola.
<apeiros_> include does NOT load code.
jeff_sebring has quit [Remote host closed the connection]
<fragrant> apeiros_: see this, http://ruby-doc.org/core-1.9.3/Module.html , they didn't requre 'math' , they directly include Math
<bnagy> popcorn?
<apeiros_> require and load do.
<shevy> bnagy, no it is sad. he is stuck in a loop
jeff_sebring has joined #ruby
<apeiros_> fragrant: yes, just as you don't need to require Array, Hash, String and all other stuff that is in core. Math part of ruby-core, meaning you never need to require it.
<Hanmac> fragrant: Math is not required because math is in the core
<apeiros_> *Math is part of…
<apeiros_> anything that is not in core must be loaded either by require, load or any kind of eval.
<fragrant> Which core file of ruby contains that line requre 'math' ?
<apeiros_> the executable itself.
carloslopes has joined #ruby
bglusman has joined #ruby
<apeiros_> i.e., you have to look at rubys C source.
macmartine has quit [Quit: macmartine]
<Hanmac> fragrant: there is no require math
<Hanmac> apeiros_ if you teach him eval, you must live with the consequences
<apeiros_> Hanmac: require is eval
<fragrant> apeiros_: I have looked C code, but i didn't understand that code flow at all., did you understand that C code?
<fragrant> apeiros_: btw, why is it apeiros_ instead of apeiros? where is apeiros ?
<apeiros_> fragrant: well enough so far. but C ain't my language and it's not relevant to this problem.
<apeiros_> apeiros is hiding in shame for still not setting up his irc proxy.
<fragrant> make the apeiros up and apeiros_ down
PaciFisT has joined #ruby
BSaboia has joined #ruby
vlad_starkov has joined #ruby
hemanth2 has joined #ruby
Progster has quit [Ping timeout: 240 seconds]
<hemanth2> URI.extract("http://㐇匂.sl.pt")
nelson- has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<hemanth2> => ["http://"]
<hemanth2> what?
looopy has quit [Remote host closed the connection]
<hemanth2> open('http://☃.net').read() #bomb
<hemanth2> waht?
<fragrant> ruby module, class, namespace, include, module are really complex and ambiguous and confusing concept
<fragrant> include, require *
<apeiros_> require is about loading code
<apeiros_> include is about doing something with loaded code
<apeiros_> and namespaces are no difficult concept. you use it in your everyday life all the time
jeff_sebring has quit [Remote host closed the connection]
<apeiros_> "Harry did this" - "Which Harry?" - "Harry Potter" - there, namespacing in real life.
jeff_sebring has joined #ruby
<fragrant> But you ruby people/community are good and supporting, i have learnt lot of basic confusing things today
xaq has joined #ruby
<fragrant> apeiros_: Thank you for all your replies/answers/support,
SimSala has quit [Ping timeout: 240 seconds]
<fragrant> It looks ruby people are better than php, but the difference is more people use php than ruby
<fragrant> Many people are not even familier with ruby
* hemanth2 no one to answer me?
mvangala_home has joined #ruby
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
<fragrant> They use php because it's easy to write website using php and easy to deploy that ruby, if you go for ruby to make website then you must go for some framework, but that is not the case for php, that's why more people use php
BSaboia__ has joined #ruby
<fragrant> hemanth2: What's your problem?
qos has joined #ruby
Gm4n has quit [Ping timeout: 265 seconds]
<hemanth2> fragrant: well, scroll up
<apeiros_> hemanth2: URI doesn't implement unicode domains yet. and yes, that's a shame.
<fragrant> Which ruby book do/would you recommend/suggest?
<hemanth2> apeiros_: bad; :(
<apeiros_> yes
vlad_starkov has quit [Remote host closed the connection]
* Hanmac says that you does not need an framework when you want a website ... you could write a website in C
<JonnieCache> fragrant: "the ruby programming language"
<apeiros_> hemanth2: I'm looking whether there's something to convert that url to puny-code. that should work.
Gm4n has joined #ruby
<apeiros_> Hanmac: nonsense. you really should write it in ASM
<hemanth2> apeiros_: http://bugs.ruby-lang.org/issues/3986 shame!
<JonnieCache> fragrant: if you already know how to programme in other languages its the best ruby book
internet_user has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
Konboi has joined #ruby
vlad_starkov has joined #ruby
BSaboia has quit [Ping timeout: 252 seconds]
<JonnieCache> Hanmac: there are several C web app frameworks :)
<fragrant> JonnieCache: O'relly ?
<hemanth2> apeiros_: gem install addressable
<JonnieCache> yes really
jeff_sebring has joined #ruby
<fragrant> JonnieCache: I have that book already.
Sou|cutter is now known as Sou|away
<bnagy> JonnieCache: programme is never a verb
Sou|away is now known as Sou|cutter
<fragrant> Hanmac: That is stupid lie, nobody is going to write websites using C today
<JonnieCache> bnagy: i realised that after i wrote it. i think its because im currently reading about synthesizers and music on the other monitor
<apeiros_> hemanth2: then use that to convert your url to punycode
* Hanmac would do it :P
andrewhl has joined #ruby
brunosaboia__ has joined #ruby
<hemanth2> Hanmac: :)
<workmad3> who wants to start writing websites in C just to prove fragrant wrong? :)
<JonnieCache> fragrant: that book contains absolutely everything about the language, so i guess youre looking for more cookbook style stuff?
<D4T> what am i doing wrong with this regexp: str.split(/,\\/) ?
digitalcakestudi has joined #ruby
<workmad3> D4T: you want to split on ,\ in a string?
jeff_sebring has quit [Remote host closed the connection]
<JonnieCache> fragrant: if youre looking to get into some serious shit then you cant go wrong with this: http://www.cleveralgorithms.com/nature-inspired/index.html
<apeiros_> workmad3: there already are websites in C
<apeiros_> workmad3: what do you think where CGI started?
<workmad3> apeiros_: perl? </troll>
pzol_ has joined #ruby
<apeiros_> nope. perl came late to the party.
<workmad3> :)
jeff_sebring has joined #ruby
<D4T> workmad3: actually it doesn't help me but yes i was trying to :)
<workmad3> ok, I meant 'start writing websites in C again' then :)
pzol_ is now known as pzol
<apeiros_> ^^
<apeiros_> I tried
<apeiros_> sadly my C sucks
<workmad3> heh
<apeiros_> I wanted to write something like a sqlite-to-web server :D
<workmad3> O.o
<apeiros_> i.e., it'd take a select and return json
<JonnieCache> like couch
joshman_ has joined #ruby
<JonnieCache> but with sql
jeff_sebring has quit [Remote host closed the connection]
<apeiros_> yes
fragrant has quit [Ping timeout: 245 seconds]
<JonnieCache> you'll never attract the trendy kids though if you sour it with sql
<apeiros_> it was mostly for my curiosity. I wanted to know how fast that'd go. but I never finished it. stupid manual memory management :D
<workmad3> gives me flashbacks to SPARQL
<JonnieCache> json yes, sql = yo daddys ddl
BSaboia__ has quit [Ping timeout: 265 seconds]
asobrasil has joined #ruby
<apeiros_> well, sql does have plenty of suck.
jeff_sebring has joined #ruby
<JonnieCache> its the task that its aiming to fulfil that sucks
<JonnieCache> sql is actually pretty optimal
<JonnieCache> data is just hard
<workmad3> SPARQL endpoints on the web are fun... it's like an open invitation to DoS someone's server :)
<JonnieCache> (im my experience. im no sql guru)
<apeiros_> data is hard. yes. I'd argue on SQL being optimal.
<apeiros_> but I guess it's more because I very much dislike declarative style programming.
<workmad3> SQL isn't great... but it is well established and pretty widely known
<JonnieCache> every time i thought i found some blatant flaw with sql at uni, the professor explained how thats actually necessary because of some arcane shit from the 70s
<JonnieCache> theres such a weight of research behind every design choice in a relational db
<workmad3> JonnieCache: ah, going into the relational calculus roots of SQL? :)
<apeiros_> JonnieCache: well, as for the language, the flaw in it is mostly unrelated to the language itself but to implementors not being able to standardize. that'd be one point of suck.
ringotwo has quit [Remote host closed the connection]
<JonnieCache> indeed. that sucks.
* apeiros_ remembers adding a RAND function to sqlite to reproduce a problem somebody had, just to later learn that it's RANDOM in sqlite…
macmartine has joined #ruby
heftig has quit [Quit: leaving]
vlad_starkov has quit [Remote host closed the connection]
chson has joined #ruby
Asher has joined #ruby
<corenumb> is this a wrong way to set background color vbox = Qt::VBoxLayout.new self
<corenumb> vbox.setStyleSheet "QWidget { background-color:red }"
hemanth2 has quit [Quit: Leaving.]
joast has joined #ruby
<kvirani> Your mom's vbox is a red widget
joast has quit [Read error: Connection reset by peer]
bbttxu has quit [Quit: bbttxu]
BSaboia__ has joined #ruby
nullsign has joined #ruby
bwwrd has joined #ruby
<apeiros_> am I a major fun killer if I kick kvirani for that statement?
My_Hearing is now known as Mon_Ouie
<bwwrd> hey folks
<bwwrd> i'm just trying to figure out how gems work
<kvirani> lol
<nullsign> newbie to ruby... wanting to know how i would open a file, and on a line by line basis assign each space delimited string and or int to a variable, so i can parse the ouput with a simple print $var1 $var2, etc.
<kvirani> I couldn't resist
jlogsdon has joined #ruby
<bwwrd> i'm looking at this gem for example - https://github.com/bouchard/thumbs_up
<bwwrd> it gives you a method to put in your class / model ('acts_as_voteable')
<kvirani> bwwrd: this is a rails gem
<kvirani> are you using rails ?
<bwwrd> yes
<kvirani> this question would be best suited for the #RubyOnRails channel probably
<bwwrd> i was assuming that rails / ruby gems followed the same pattern
<bwwrd> it's probably an easy question
<kvirani> true
<kvirani> so
ringotwo has joined #ruby
<kvirani> what is the question?
<shevy> gem install bla
<workmad3> nullsign: what?
<shevy> require 'name_of_gem_here'
<corenumb> kvirani, huh ?
<workmad3> nullsign: arrays!!!
<apeiros_> nullsign: ruby code is either a native extension or plain old text. the latter is far more common.
<shevy> (3) profit!!!
brunosaboia__ has quit [Ping timeout: 244 seconds]
<apeiros_> nullsign: i.e., you can just open the .rb files with any text editor
<bwwrd> it's just that the method is defined in the thumbs_up module https://github.com/bouchard/thumbs_up/blob/master/lib/acts_as_voteable.rb#L1
SimSala has joined #ruby
BSaboia has joined #ruby
<shevy> bwwrd does this project not have documentation explaining how to use it?
<bwwrd> so how do my rails models have access to it? is rails including gem modules automatically
<bwwrd> sorry that is actually a railsy question
<shevy> :D
<apeiros_> bwwrd: note that the code (while not as horrible as other acts_as_* gems that I've seen) is not role model code (the def self.included(base) part gives that away)
<shevy> rails is doing lots of things behind the scenes
<corenumb> vbox = Qt::VBoxLayout.new self
<corenumb> vbox.setStyleSheet "QWidget { background-color:red }"
hasrb has joined #ruby
Konboi has quit [Remote host closed the connection]
<corenumb> just think how can set background color for a layout
brunosaboia__ has joined #ruby
bidigo has joined #ruby
<shevy> probably by setting the main widget. or by giving any other widgnet name here
<shevy> it looks like pseudo-css, with the identifier becoming the widget name
<apeiros_> bwwrd: and your rails models have access to it because of this: https://github.com/bouchard/thumbs_up/blob/master/rails/init.rb - but I think with newer rails that no longer works
<shevy> corenumb, perhaps "QVBoxLayout { background-color:red }"
<bwwrd> apeiros_ thanks
<kvirani> bwwrd: open the Gemfile in your rails app, add the `gem '...'` line
<corenumb> shevy, hold wait
<kvirani> in terminal, run `bundle` from inside the app directory
rachet has joined #ruby
<apeiros_> bwwrd: and the methods get added to AR::Base here: https://github.com/bouchard/thumbs_up/blob/master/lib/thumbs_up.rb
ipoval has joined #ruby
<bwwrd> and i think the base.extend line is what adds 'acts_as_voteable' method to the model class. makes sense now
<bwwrd> thanks
noganex has quit [Read error: Connection reset by peer]
<apeiros_> bwwrd: again, not role model code IMO.
<shevy> corenumb, here are more examples. http://doc.qt.nokia.com/4.7-snapshot/stylesheet-examples.html - the only thing you have to do is translate that into the ruby-names
<rachet> Is there a way to check it something is already in a starling queue, before adding it?
BSaboia__ has quit [Ping timeout: 244 seconds]
<kvirani> that will install (aka bundle) the gem into your your app, giving it access to the gem...
jeff_sebring has quit [Remote host closed the connection]
<shevy> also you should be able to do so directly: "Alternatively, we can set the background-color property directly on the QLineEdit, omitting the selector: nameEdit->setStyleSheet("background-color: yellow");"
<nullsign> workmad: your ruby arrays, show them to me
<apeiros_> bwwrd: wycats wrote a blog entry where he transforms idiomatically bad code to some better following ruby idioms.
<shevy> workmad3: show me your pants
jeff_sebring has joined #ruby
tomask has quit [Quit: Quit]
<nullsign> i need some sort of looping syntax for each line.
bidigo has left #ruby ["Leaving"]
<bwwrd> apeiros_ sounds interesting
<shevy> nullsign what? array.each
<nullsign> and then for each word on the line (space delimited) i need to assign to a var.
<apeiros_> yes
<shevy> or even array.each_line
ipoval has quit [Client Quit]
BSaboia has quit [Ping timeout: 248 seconds]
<shevy> and then split that line on words
erichmenge has joined #ruby
<rachet> Does anyone here use workling/starling?
hunglin has joined #ruby
pashamur__ has joined #ruby
rippa has joined #ruby
luxurymode has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
wallerdev has joined #ruby
CheeToS has joined #ruby
uris has quit [Ping timeout: 246 seconds]
eurek has quit [Ping timeout: 245 seconds]
pashamur__ has quit [Read error: Connection reset by peer]
savage- has joined #ruby
pashamur__ has joined #ruby
eurek has joined #ruby
<nilg> hi, when using Trollop with an option taking multiple tokens (say of type :strings) how do I tell the program I still want some mandatory arguments?
<nilg> I mean, consider the following command
<corenumb> shevy, have you used QT in ruby ?
<nilg> my_prog.rb -o opt1 opt2 mandatory_arg
<nilg> how to make mandatory_arg not part of the option -o
<shevy> corenumb only briefly. i settled for ruby-gtk after testing qt
<jlogsdon> nilg: it wouldn;t be by default. only opt1 would be part of -o. opt2 and mandator_arg would be seperate arguments.
pashamur__ has quit [Client Quit]
aces1up has joined #ruby
<jlogsdon> you must use quotes to include spaces in an argument/option
<bnagy> nilg: if -o is the only option then maybe try using :string :multi
pashamur__ has joined #ruby
<corenumb> but I dont find ruby-gtk graphics quality than qt
<rachet> Is there a way to check it something is already in a starling queue, before adding it?
<aces1up> what is an algo / design pattern that determines execution via previous events?
<shevy> corenumb that may be but I got tired of the awful documentation of ruby qt
<shevy> and when I mean awful, it means: non existing
vlad_starkov has joined #ruby
<corenumb> well yea thats true tho :/
dhruvasagar has quit [Ping timeout: 248 seconds]
<nilg> jlogsdon, bnagy : I'm using :strings (with a s at the end) and it really handles several tokens... but now I don't know how to tell Trollop that I need a mandatory argument...
<shevy> for some reason I dont understand, most ruby projects really have crap documentation
<bnagy> nilg: yeah I heard you
<offby1> s/ruby//
ananthakumaran has joined #ruby
<jlogsdon> shevy: s/ruby/opensource
<shevy> :D
<jlogsdon> its a side-effect of "not getting paid to document". thankfully, ruby code can be pretty good at self-documenting if you take the time to write it well
<jlogsdon> nilg: if you can't see a way in the code or docs to do it, i'd try removing the mandator argument from ARGV before using Trollop to parse it all
oooPaul has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<bnagy> nilg: afaik the parser will just eat all your tokens the way you have it. You can pop the last one off the end, you can switch to using :string with multi -o op1 -o op2 mandatory
<bnagy> you can have another arg after the -o
<nilg> oh I see, thanks!
<nullsign> making the leap from years of shell, some perl/python.. to ruby
<jlogsdon> (i think bnagy's suggestion might be better. it's more unixy to use the flag as many times as you need it)
<nullsign> trying to do the simplest things with ruby seems daunting at the moment
billiamii has joined #ruby
<jlogsdon> such as what, nullsign?
<jlogsdon> puts "Hello World!" is pretty simple xD
<nullsign> jlogs: heh true
<offby1> jlogsdon: at the risk of being greatly off-topic ... most opensource hackers aren't paid to code, either; but they do that well enough. And commercial projects often have awful docs too
<oooPaul> x = 42 is pretty straightforward. ;)
supergiantrobot_ has joined #ruby
<nullsign> jlogs; but simple things like array = `command` etc
<nullsign> according to ruby docs, it should work the same.
ipoval has joined #ruby
<jlogsdon> offby1: true, but OSS developers love to code, not document :)
<jlogsdon> nullsign: if you want an array it would be `command`.split("\n")
<bnagy> s/OSS//
<jlogsdon> otherwise its just a raw string of the STDOUT
<jlogsdon> bnagy: touche ;)
<nullsign> for some reason, even a raw string is erroring on me.
dekroning has quit [Ping timeout: 240 seconds]
<jlogsdon> what error?
<oooPaul> Man, I've been doing Ruby for like 5 years now and never realized/noticed you could run a shell command with `` alone. :P
<jlogsdon> haha
<nullsign> ...
<nullsign> oooPaul: maybe there is hope for me then
<jlogsdon> Well, `` is pretty limited. It's great if you don't care about STDERR or any signal control
<nullsign> jlogsson: http://pastebin.com/Hu2wW56W
<oooPaul> I'm a long time software dev, though, never been a real sysadmin/shell jockey. :)
<oooPaul> Trying to do anything with a bash script makes my eyes bleed. ;)
wmoxam has joined #ruby
<jlogsdon> nullsign: first line is wrong
<jlogsdon> it should be #!/usr/bin/ruby
<nullsign> oh god
<nullsign> i forgot the #!
<jlogsdon> :)
<nullsign> ...
<jlogsdon> hash-bang to the rescue!
<nullsign> seriously?
<nullsign> !!!!
wmoxam has quit [Client Quit]
<jlogsdon> that's a unxi thing :P
<nullsign> pardon me.. im going to bang my head against my desk now
<apeiros_> nullsign: permission granted
jeff_sebring has quit [Remote host closed the connection]
<nullsign> oh gee, now it works fine..
pzol has quit [Ping timeout: 245 seconds]
<jlogsdon> hehe
<shevy> nullsign it is simple if you only stick to keep everything simple
jeff_sebring has joined #ruby
<nullsign> ok.. now i have an array defined using .split, now to call each variable, lesse
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
<shevy> shell scripts are so painful
<workmad3> a better first line would be '#!/usr/bin/env ruby'
<jlogsdon> they can be really elegant, shevy
uris has joined #ruby
<jlogsdon> workmad3: indeed
<workmad3> doesn't tie you to having your ruby interpreter in /usr/bin/ruby then :)
<jlogsdon> nullsign: array.each { |ele| puts ele }
wmoxam has joined #ruby
<shevy> give me one long shell script that is elegant
looopy has joined #ruby
Jackneill has quit [Remote host closed the connection]
hakunin has joined #ruby
zz_danryan is now known as danryan
<nullsign> ele = name of array?
<jlogsdon> ele = name of element
<workmad3> shevy: show me a long ruby script that's elegant :P
tk___ has quit [Quit: ばいばい]
<shevy> workmad3 all my code :)
<workmad3> shevy: do you never split your code into multiple files? :P
<jlogsdon> nullsign: do you know about blocks?
<jlogsdon> blocks are essential to understanding ruby
<nullsign> jlogsson: no, i do not.
<jlogsdon> ohhohoo
<jlogsdon> blocks are the bees frickin knees
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<jlogsdon> read dat
<shevy> workmad3 sure. one class for one .rb file
<nullsign> jlogsdon: 15 years of bash here.. with some php/perl/python at times.
<nullsign> jlogsdon: i'm one of 'those' people.
<jlogsdon> damn man
gregorg has joined #ruby
<jlogsdon> i'm 10 years of PHP with bash sprinkled in :P
hamzzzz has joined #ruby
<offby1> I'm 37 flavors of pure delight
pzol has joined #ruby
<workmad3> shevy: right... and the same thing happens with large bash programs... lots of smaller scripts working together ;)
<jlogsdon> small, single purpse scripts. the unix way!
negaduck has quit [Quit: negaduck]
<jlogsdon> love it
abionic has quit [Ping timeout: 244 seconds]
<shevy> bash shells out to use other programs, like awk, sed, grep, via `` repeatedly
<shevy> so you need to understand these programs too
pashamur__ has quit [Client Quit]
<nullsign> im determined to learn ruby this year.. so i can play with the cool kids.
<workmad3> shevy: nothing exists in a vacuum
<workmad3> shevy: the same is true of ruby
pashamur__ has joined #ruby
<workmad3> shevy: just in ruby, rather than shelling out to other programs, you call library methods :)
<shevy> workmad3 I dont need awk or sed in ruby
<jlogsdon> shevy: you need to understand any languages StdLib to use it. It's the same idea
<shevy> and I dont have to understand conventions from other programs
<jlogsdon> all of the defacto unix programs have hte same conventions
<apeiros_> nullsign: the cool kids moved on to Scala, Erlang and whatever
Ammar01 has quit [Quit: Leaving]
<workmad3> shevy: I will agree that it probably takes more effort to make an elegant bash script, because it's easier to munge it all together and create an unmaintainable mess of pipes, $s, arcane syntax and environment variables being used as globals and messing things up :)
udante has joined #ruby
<nullsign> Erlang???
<jlogsdon> ha
<workmad3> jlogsdon: pfft, that's only 300 lines long :P
<shevy> that one is quite awful, but there are worse
<nullsign> fine fine, i'll learn ruby and just be 10 degree's off from cool
<jlogsdon> yes
<jlogsdon> and its gross
<workmad3> jlogsdon: nah, if you want gross, you should see the VBA stuff I did during my summer job while @ uni
<jlogsdon> no i do not ever want to see VBA stuff again
<workmad3> jlogsdon: I think I managed to get one of those files up to 3000 lines...
<jlogsdon> My favorite day at my last job was deleting a 15k LoC file
<workmad3> :D
<shevy> hehehe
<jlogsdon> it was the worst video/image/audio processing class ever.
<jlogsdon> it piped out to ffmpeg, but NONE of it was DRY
<apeiros_> jlogsdon: you deleted the server bootup script?
<shevy> wait
<shevy> 15k lines of code BUT it still used ffmpeg???
savage- has quit [Remote host closed the connection]
<jlogsdon> YUP!
<jlogsdon> apeiros_: hum?
<apeiros_> jlogsdon: I was slow reading.
Gm4n has quit [Ping timeout: 265 seconds]
<jlogsdon> oh. happens :)
<shevy> people in the switzerland are slow
* shevy runs!
pzol has quit [Ping timeout: 248 seconds]
Gm4n has joined #ruby
<workmad3> jlogsdon: so, you replaced those 15k lines with a one-liner? :D
<shevy> I do use ffmpeg quite a lot from some ruby scripts
<jlogsdon> Nearly. We started using transloadit.com :P
wvms has quit [Quit: wvms]
<shevy> but I think, in all the .rb files, there is a total of not more than 100 or at max 200 lines ffmpeg specific
<jlogsdon> we were NOT a media company, so I convinced them to get it the hell off of our servers
<shevy> hehe
fragrant has joined #ruby
<jlogsdon> and we then became their largest client by a large margin. heh
<jlogsdon> but they worked well
<fragrant> Where is drbrain?
looopy has quit [Remote host closed the connection]
hemanth2 has joined #ruby
<jlogsdon> bein' a doctor
ckrailo has joined #ruby
<jlogsdon> somewhere, lost in time, and space
<shevy> fragrant on #ruby-lang. I think he hates #ruby
<fragrant> Why does he hate #ruby?
<shevy> dunno. but he is never here
<jlogsdon> it's not a great place for in-depth ruby discussions.
<jlogsdon> (imho)
<shevy> :D
joast has joined #ruby
<shevy> yeah
<shevy> the elite goes on #ruby-lang
<shevy> the peons stay on #ruby
<jlogsdon> isn't #ruby-lang +v?
<shevy> that too... and the reason why I am no longer there
dekroning has joined #ruby
<jlogsdon> yeah. i got tired of seeing not much content AND not being able to talk
<shevy> hehehe
jprovazn is now known as jprovazn_away
pzol has joined #ruby
<jlogsdon> I also don't mind helping newbies help themselves.
<jlogsdon> as long as they are willing to work for it :)
<shevy> but that's a good point
<shevy> less content but also moderated to talk :\
<jlogsdon> thats what happens in "elitest" (not trying to start anything) communities
<fragrant> apeiros_: Are you there?
<shevy> it's a bit unfortunate because about 10% or so of the people on #ruby-lang, are never on #ruby
pdtpatrick has joined #ruby
<shevy> so ruby here would probably have 800 users
<shevy> I mean, #ruby
noganex has joined #ruby
noganex has quit [Client Quit]
<fragrant> Why aren't those two #ruby and #ruby-lang merged?
<shevy> fragrant it is not possible
<jlogsdon> because #ruby-lang is a moderated channel for "higher level" discussion, from what i understand
<shevy> fragrant ask apeiros_
<fragrant> That doesn't make sense to make two channel for same purpose
<jlogsdon> No
<fragrant> Rather delete #ruby-lang
<jlogsdon> but the internet doesn't make sense most of the time
<shevy> he tried to get it merged
<fragrant> #ruby-lang is not necessary
<shevy> fragrant, but #ruby-lang is the official channel :D
ipoval has quit [Quit: ipoval]
EskiMag has quit [Quit: EskiMag]
<fragrant> make #ruby official and delete #ruby-lang
<jlogsdon> #ruby is also official
<jlogsdon> ##ruby would be unofficial
<workmad3> fragrant: it is the way it is
<jlogsdon> (freenode's policy is ## for unofficial, # for official)
<workmad3> fragrant: and I doubt you'd ever get zenspider in here, so #ruby-lang is never going to die :P
<shevy> well
<shevy> which is the official site... look at IRC there
<shevy> and the link has:
<shevy> irc://irc.freenode.net/ruby-lang
<jlogsdon> nice
<fragrant> That doesn't make sense
<fragrant> Who is zenspider? is he yokihero matsumoto?
<shevy> no
<shevy> matsumoto is matz
<nullsign> jlogsdon: so....
<shevy> he is not on IRC
<shevy> or perhaps on japanese-only
<shevy> but he once said IRC takes too much time
<fragrant> Did matz ever join here or in #ruby-lang ?
<shevy> I think he used to be in #ruby-lang
Aristata has quit [Quit: Leaving.]
eurek has quit [Quit: Computer has gone to sleep.]
<shevy> perhaps in 2005 or something like that :P
savage- has joined #ruby
<shevy> fragrant, he works on mRuby now https://github.com/mruby/mruby
<shevy> 12 minutes ago last commit from him :)
<nullsign> jlogsdon; can you peek at my goal/issue ?
<shevy> jlogsdon hmm my client never shows the two ##
lwhalen has joined #ruby
dekronin1 has joined #ruby
<jlogsdon> shevy: are you in any non-official channels?
<lwhalen> hey all, is the guy who wrote the whitequark IRC logger around?
<jlogsdon> ##php is one. join #php will redirect you
dekroning has quit [Ping timeout: 248 seconds]
<shevy> jlogsdon aha, no idea, my client always shows only one #
<lwhalen> I'm trying to install it, but I can't seem to find any install instructions
<jlogsdon> nullsign: is there a specific order? or is it just a simple reverse that you want?
<shevy> Cannot join #php (Channel is invite only).
<shevy> bastards!
<shevy> die, php, die!
<jlogsdon> yes
<nullsign> jlogsdon: order as it outputs is fine, tho i will be prependign some text static var in front of it all in my print
<fragrant> shevy: Why did he leave ruby and start with a new one(mruby)?
<nullsign> going to comma delimit the final print between each var.
<shevy> fragrant, mruby is still kinda-ruby
<shevy> fragrant, it is small and very fast ruby though
<fragrant> What's wrong with his original Cruby?
<shevy> fragrant, japanese government pays for this project I think
<shevy> fragrant dunno. it is slow!
<Mon_Ouie> Half of CRuby's code is in parser.y
<fragrant> That doesn't make sense
<Mon_Ouie> Though that may not really be your point :p
<fragrant> Then in future we will see more than 50 rubies
<shevy> fragrant, well. current ruby can never compete with lua for instance
<jlogsdon> nullsign: https://gist.github.com/2924728
robert_ has joined #ruby
<fragrant> cruby, ironruby, jruby, mruby, fragrantruby, 50ruby ?? :)
<shevy> fragrant, who knows. if mRuby works well, it could become the new ruby in the future one day
<fragrant> shevyruby
<shevy> ironruby is dead
<shevy> jruby requires java (I dont use java and never will)
<jlogsdon> fragrant: cRuby or whatever is awful for mobile, which is getting huge. mRuby will be *much* better for embedded/mobile solutions
<shevy> that is a good argument from jlogsdon :)
senny has quit [Remote host closed the connection]
<fragrant> Then in future we will see this cruby is dead so all is rubish and all will go to the blackhole
<deryl> let us not forget Ruby Motion!
BeLucid has quit [Read error: Connection reset by peer]
jeff_sebring has quit [Remote host closed the connection]
<jlogsdon> im pretty sure that's the biggest reason behind his move
<shevy> fragrant why would it be "dead", the ruby core team maintains cruby
DrForr has joined #ruby
davidcelis has quit [Quit: K-Lined]
<jlogsdon> yeah cruby is far from dead
<fragrant> As you said, if something better or new comes, the older will be gone
dekronin1 has quit [Remote host closed the connection]
<shevy> fragrant, only IF there is something better :)
jeff_sebring has joined #ruby
<shevy> look at TIOBE
<fragrant> So all efforts with older package will be in vain/failed
<nullsign> jlogsdon; that would put the entire string, but how about changing the string from space delimited to comma delimited? :)
<shevy> fragrant that is already the case for some projects from 1.8.7 to 1.9.3
<shevy> and in python 2 to python 3 as well
<nullsign> is there a simple ruby cure for that?
<jlogsdon> nullsign: line.split(',')
savage- has quit [Remote host closed the connection]
<nullsign> ohhh
<fragrant> New things come to overcome the limitation of the older one
<nullsign> thats sexy
eurek has joined #ruby
<fragrant> And they pay to make new thing
<jlogsdon> nullsign: apidock.com/ruby/String/split
d3c has quit [Quit: Quit]
axl__ has joined #ruby
<fragrant> So older will be gone some day
iocor has joined #ruby
<shevy> fragrant, not if old ones pay to keep and retain old things ;)
lkba has joined #ruby
<shevy> there is still COBOL in use, according to myths
<Mon_Ouie> AFAIK people are still working on Ruby 2.0 separately from mruby, right?
<jlogsdon> AFAIK
<shevy> I've never met someone who can write in COBOL though
<jlogsdon> shevy: mainframes!
<jlogsdon> they are all old neckbeards now
<shevy> they must be 70 years or 80 years old now
<jlogsdon> living in their dungeons
<shevy> lol jlogsdon
<jlogsdon> and making 8 digits xD
albemuth has joined #ruby
<jlogsdon> (not really)
<shevy> yeah but
<shevy> what use is that when they are old
<jlogsdon> replace limbs/organs with nanotech
<jlogsdon> live forever~
<shevy> young and rich. not old and rich. (or old and poor haha)
robert_ has quit [Ping timeout: 244 seconds]
zommi has quit [Read error: Connection reset by peer]
kenperkins has quit [Quit: Computer has gone to sleep.]
<shevy> jlogsdon bah, a technology for only 1%, the remaining ones can't afford it
<jlogsdon> how about rich from young to old? :p
<jlogsdon> haha shevy
xkx has quit [Ping timeout: 244 seconds]
<shevy> I dunno
<shevy> being old sucks
<fragrant> As mattz is gone from cruby, so other people will be gone too from cruby as the first creator understands the core source better than anyone else
<fragrant> It's not easy to understand the source of something like ruby
<shevy> fragrant he is not gone
<fragrant> It's huge scale code
<shevy> fragrant he works on mruby but he does design decisions for cruby still
koskoz has joined #ruby
<shevy> look at perl 6, this is the community takeover from larry
<shevy> and it fails
<fragrant> It's not easy to understand source code of ruby so it's not easy to maintain/contribute it
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
<shevy> why
<shevy> you just need to know C
<shevy> and understand that lexer thingy
<fragrant> lexer, parser, interpreter, not easy to understand those huge amount of code
Vendethiel has joined #ruby
BeLucid has joined #ruby
burgestrand has quit [Quit: Leaving.]
<jlogsdon> no. but ruby has a decent core dev team, and like shevy said matz hasn't fully left. he's around as a consultant and architect for it still
baroquebobcat has joined #ruby
<shevy> fragrant can you write in C
<fragrant> shevy: Of course i can
rippa has quit [Ping timeout: 245 seconds]
<fragrant> shevy: Better than ruby
jeff_sebring has quit [Remote host closed the connection]
DrForr has quit [Quit: leaving]
andrewhl has quit [Remote host closed the connection]
<jlogsdon> fragrant: be glad this isn't PHP we're talking about. The C code for that is... pretty amazing
jeff_sebring has joined #ruby
<fragrant> shevy: Why did perl6 fail?
<Mon_Ouie> YARV was written by ko1 initially
nyuszika7h has quit [Quit: WeeChat 0.3.9-dev]
thone has quit [Ping timeout: 244 seconds]
<jlogsdon> oh man perl 6
<jlogsdon> a plethora of reasons?
pdtpatrick has quit [Quit: pdtpatrick]
interopcop has left #ruby [#ruby]
<GeekOnCoffee> perl6 hasn't failed yet
Targen has joined #ruby
<jlogsdon> its just taken over a decade
<fragrant> jlogsdon: perl 6 took over a decade?
hoelzro|away is now known as hoelzro
qwerxy has quit [Ping timeout: 244 seconds]
thone has joined #ruby
<jlogsdon> i don't pay attention to perl, honestly. i thought p6 still wasn't out
<jlogsdon> The design process for Perl 6 began in 2000.
<jlogsdon> still not out
<jlogsdon> 12 years
<nullsign> this look right? puts "#{line}".split(",")
<zaargy> the perl 6 interpreter is pretty advnaced
<zaargy> watch this space i reckon :P
<jlogsdon> No
<jlogsdon> nullsign: wait, you want to convert spaces to commas?
<nullsign> yes.
rippa has joined #ruby
qwerxy has joined #ruby
nyuszika7h has joined #ruby
<jlogsdon> okay, that would be "puts line.gsub(/ /, ',')"
nyuszika7h has quit [Client Quit]
<jlogsdon> you don't need "#{line}" if you are just using the variable
<jlogsdon> only if you want text _around_ the variable.
<jlogsdon> and you could do `puts "Prefix #{line.gsub(/ /, ',')}"`
<jlogsdon> #{} runs whatever (well, mostly whatever) ruby code is inside it
nyuszika7h has joined #ruby
alex65 has joined #ruby
<jlogsdon> (inside a string, that is)
Asher has quit [Quit: Leaving.]
<nullsign> i dont need text around it, but i do need to put another variable in front of it
<Hanmac> jlogsdon you could use ' ' instat of / /
<jlogsdon> if you need another variable in front then `puts #{var1} #{line.gsub(...)}`
<jlogsdon> Hanmac: sure, but the speed difference would be negligable aand I wanted to show he could use regex's :)
<jlogsdon> WORDS HOW DO YOU SPELL THEM
gilead has quit [Quit: Leaving]
axl_ has quit [Read error: Connection reset by peer]
<jlogsdon> negligible*
Aline has joined #ruby
alex65 has left #ruby ["Hai"]
axl_ has joined #ruby
crankycoder has joined #ruby
CrawlBot has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
<nullsign> gsub rocks
<jlogsdon> c.
<jlogsdon> note that _most_ String methods can take a regex
<nullsign> jlogsdon: hehe, so far everything is great, except when i put a var in front of it, it puts the var but then puts the line on a newline. so it looks like this;
<nullsign> newvar
<nullsign> line
<jlogsdon> let me see your code
<jlogsdon> (i missed quotes in my example, im awful)
azm has joined #ruby
<nullsign> i wonder how many pastebins get deleted daily?
<jlogsdon> puts "#{var1} #{line.gsub....}"
axl_ has joined #ruby
danryan is now known as zz_danryan
flip_digits has joined #ruby
<jlogsdon> nullsign: yeah, i gave you a bad puts line. sorry... puts "#{list},#{line.gsub...}" would do it
maesbn has quit [Remote host closed the connection]
<nullsign> still doing the same behavior.
<jlogsdon> list may have a newline at the end
<nullsign> outputs; switch01_traffic.rrd
<nullsign> ,1339602000,-nan,-nan
jgoff has joined #ruby
<nullsign> yeah... must have
<jlogsdon> list.rstrip
zz_danryan is now known as danryan
<jlogsdon> use that for the list interpolation
jgoff is now known as DrForr
graft is now known as Guest25164
axl_ has quit [Read error: Connection reset by peer]
<jlogsdon> rstrip strips any whitepsace characters from the end of the string. lstrip does the front. strip does both sides
<nullsign> rstrip to the rescue
<nullsign> for list in `ls | grep rrd`.rstrip
<nullsign> fixed it.
<jlogsdon> :)
nanderoo has joined #ruby
<nullsign> wow.. i could have done this in 2 minutes with bash.. but im glad i decided to make this my first ruby script instead.
<jlogsdon> #chomp would also work, it removes the last newline explicitly, instead of all whitespace
<jlogsdon> well, now you can do it in 2 minutes with ruby :P
pashamur__ has quit [Quit: Konversation terminated!]
<nullsign> hrm. tho im still invoking elements of shell script in this one.
<jlogsdon> that happens if you need external tools
<nullsign> is there a cleaner ruby way to do ; "for list in `ls | grep rrd`.rstrip"
pashamur__ has joined #ruby
<nullsign> the ls | grep part.
<jlogsdon> Dir['./*.rrd]
<jlogsdon> that will give you an array of files ending in .rrd in the current dir
twock has quit [Quit: Lost terminal]
theRoUS has joined #ruby
<Sigma00> jlogsdon: did you leave a stray ' in there or is that the actual thing you wanna type?
<jlogsdon> i forgot the ending '
axl_ has joined #ruby
<Sigma00> ah
<jlogsdon> Dir['glob']
<jlogsdon> (it also takes regex, ha)
<nullsign> Dir becomes the variable?
<jlogsdon> oh wait, no it doesn't
<jlogsdon> and no. Dir is a class
<jlogsdon> #[] is a method on the class
<jlogsdon> it returns an array
pashamur__ has quit [Client Quit]
<Sigma00> what does it return?
<jlogsdon> (its aliased to Dir.glob, actually)
<jlogsdon> an ARRAY
pashamur__ has joined #ruby
<jlogsdon> read links about things. they tell you stuff
<nullsign> i like things.
<jlogsdon> me too. things are good
<Sigma00> Don't worry, I facepalmed after asking, telling myself "It's right there" and "irb is there for a reason"
<jlogsdon> :)
<Aline> I dont have to actually on the ls | grep rrd`.
<jlogsdon> oh man! oh man!
<Aline> Also need to find the boot-repair thing you knew him on the command that delicious anymoar.
<jlogsdon> Sigma00: switch to pry! http://pry.github.com/
<Aline> It harder to why we shall never again.
<jlogsdon> its like IRB on super crack
<Aline> Its space i don't miss anything.
fragrant has left #ruby [#ruby]
<jlogsdon> wat
<Aline> Ubuntu package management toolkit.
<jlogsdon> oh god
<Aline> Also similar to associate a cut, lol.
<jlogsdon> markov chain bot
<Aline> As these retards spell it is jello.
<jlogsdon> on 100% reply
<Aline> Oh wait, no web hosting company?
pashamur__ has quit [Read error: Connection reset by peer]
<jlogsdon> where's an op when you need it?
<Aline> Agrinspaul: not sure is true that shit?
pashamur__ has joined #ruby
<nullsign> ooo sexy
<Aline> Exploiter: there a c i m in women we cannot provide support any install it?
koskoz has quit [Ping timeout: 245 seconds]
<nullsign> i like that ruby was kind enough to keep the basic FOR loop syntax.
<Aline> Its space could be found at the exact one, because its just for the installer's account creation.
<nullsign> thank you ruby, for all those.. options
<Aline> For a technical question i belive.
BSaboia__ has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<Sigma00> jlogsdon: I have it on my home computer, but not at work :P I rarely use ruby at work anyways
<Aline> Actually save a way to go on boot options?
AxonetBE has quit [Quit: Leaving.]
brunosaboia__ has quit [Ping timeout: 244 seconds]
<deryl> testing aline ignore
<Aline> Monkeydust, i belive.
Asher has joined #ruby
kenichi has joined #ruby
<deryl> sorry, had to test it. colloquy seems to keep blowing ignores and the like.
<Aline> Things appear there is your last newline.
giftfrosch has joined #ruby
<workmad3> nullsign: don't use for loops... they suck :P
<Aline> Mint), LinuxMCE (support in my home encryption for 5.
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
nanderoo has quit [Quit: Leaving.]
<nullsign> hrm.. my first functional ruby script..
<Aline> I belive.
<nullsign> this deserves cake
<Aline> = ['a'] ; "for list interpolation.
davidcelis has joined #ruby
schovi has quit [Remote host closed the connection]
jeff_sebring has quit [Remote host closed the connection]
jeff_sebring has joined #ruby
robotmay has quit [Remote host closed the connection]
mikepack has joined #ruby
Eldariof-ru has quit [Ping timeout: 252 seconds]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Hydroxide has joined #ruby
<nullsign> wow.. ruby is fast.
<Aline> It is better and do it via terminal?
<nullsign> blazingly... fast..
<Aline> Actionparsnip, the extension for real fucking bitch.
<Hydroxide> hello #ruby! can anyone recommend a way that my ruby program can do something at a specific tiime?
<Aline> Pici, refer mr ubottu's commnet.
<Hydroxide> like, I'd like it to do something at 4:30pm, say. this isn't cron, it's within a long-running program
<Aline> Good_samaritan: ultimate Edition is wxmacmolplt, it.
<nullsign> Hydroxide; cron?
<Aline> Can i will just run stuff.
<nullsign> ah
<Aline> Only really be converted to vancouver brah.
daniel_hinojosa has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
<Hydroxide> nullsign: I could do it with cron, but that would just have lots of overlapping copies of the same program and that's annoying
<Aline> I had to other materials provided with ruby way i belive.
the_jeebster has joined #ruby
<shevy> nullsign C is faster!
<Aline> Can anyone interested in the problem.
<CrawlBot> What's your problem Aline?
<Aline> Let me in the menus some license between binary form, it removes the gym.
<nullsign> ruby is faster than perl?
<Aline> When at the toilet space i don't worry, i change the program.
<shevy> pls someone ban Aline
<Aline> They think of relicensing all doc i do thaty.
<shevy> nullsign it depends
<Aline> And/or other materials provided with bash.
negaduck has joined #ruby
andrewhl has joined #ruby
<CrawlBot> Maybe she can help us with our problems?
<Aline> Desktop file and chroot in the boot-repair thing you could create an internet on some sort of SUCH file.
<shevy> nullsign I think if you compare ruby 1.9.3 and perl, ruby may be faster these days for most things
<Aline> I don't have to the ending '.
<shevy> perl 5*
<Aline> Sure, I'd like this;.
<nullsign> Aline is some sort of retarded bot?
<Aline> It makes life a newline at this point).
<lwhalen> hey all, is the guy who wrote the whitequark IRC logger around?
<shevy> yeah nullsign
<Aline> Well, now i cant get "Open With" and do not there.
<Aline> I want her to do thaty.
<lwhalen> I'm trying to install it, but I can't seem to find any install instructions
<Aline> Short apt-get build-dep [package] will require you are out of bsd-2.
<jlogsdon> Hydroxide: hmm.... if it's a long-running program threads would be your best bet. I don't know of any gems to do it simply, though
<Aline> Must put a petition at ubisoft?
<shevy> apeiros_, can you ban the Aline bot?
<Aline> It is there will require you wanting to install the new map, there.
mrdtt has quit [Quit: Leaving]
<shevy> nullsign perl usually was faster for things like regex
<Aline> It adds a fresh boot options?
jenglish has quit [Remote host closed the connection]
<shevy> but most of the benchmarks compared to ruby 1.8.7
<Aline> We cannot provide support for used my experience.
<shevy> Aline piss off
<Aline> Pikkachu, all privilages.
<jlogsdon> lwhalen: copy config/application.yml.example to config/application.yml and edit. then run logger.rb
<Aline> Monkeydust, Pici ,ubottu but i want one.
<jlogsdon> viewer.rb would be the small webapp to view it all
<Aline> Jw1: bit of SUCH file for the pirate do the enterprise version of the end.
<lwhalen> thanks!
<Aline> Any idea how to ruby script.
S1kx has quit [Ping timeout: 248 seconds]
<jlogsdon> I think the regex lib Ruby uses was changed in 1.9
<Aline> Where the whitequark irc logger.
<Hydroxide> nullsign: think I'll go with cron after all. thanks for listening :)
<lwhalen> does there meed to be a password for the db user in application.yml?
<Aline> Im glad i belive.
<Aline> Can take a mascot for women (see !
Hydroxide has left #ruby [#ruby]
<jlogsdon> to Oniguruma, apparently
<Aline> I forgot the /boot to be converted to the /boot?
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jlogsdon> lwhalen: if you have one, of course
<Aline> But we cannot provide support for listening :).
<jlogsdon> root:password@host
<Aline> What you need to it existed in ubuntu.
<lwhalen> what's the field? there isn't a generic example in the .yml :-)
<Aline> Still doesnt show an op when i agree, it.
<jlogsdon> its called a URI. databasetype://user:pass@host/database
<Aline> Pls someone ban aline.
justsee has quit [Quit: Linkinus - http://linkinus.com]
<lwhalen> ahh, most excellent. thank you!
<Aline> = ['a'] ; $var to have one, because the installer's account creation.
<jlogsdon> its just like http://!
<Aline> Can run errors with this file?
<jlogsdon> crazy!
<Aline> Were talking about converting binary files.
<lwhalen> yeah yeah yeah, I'm a sysadmin, not a Ruby mindreader, yo! ;-)
<Aline> 2ghz (have gotten a password.
<shevy> Aline no worries, you'll be banned as soon as apeiros_ is back
<Aline> What are you not support any whitepsace characters from another module.
<jlogsdon> lwhalen: 'tis why im tellin you!
<Aline> 04 works the pirate do not support any install it?
Gm4n has quit [Ping timeout: 252 seconds]
BiHi has quit [Ping timeout: 246 seconds]
davidcelis has quit [Ping timeout: 240 seconds]
perryh_away is now known as perryh
<jlogsdon> Absorb the knowledge! Gain a level in sysadmin!
<Aline> Line on our teeth and blockade against Ubuntu?
udante has quit [Quit: Leaving...]
* lwhalen makes a mental note to do a pull request with a README file...
<Aline> My home folder, and have ethernet ports.
centipedefarmer has joined #ruby
kenperkins has joined #ruby
robozahn_ has joined #ruby
davidcelis has joined #ruby
<jlogsdon> lwhalen: the world will be a better place when you do that.
<Aline> Its space i can anyone says to share the fuck you were talking about wheelchair accessibility for you need.
<shevy> jlogsdon, what editor do you use for ruby?
<Aline> Jalouse is in on that rot13 may makes for real swiss cheese.
<jlogsdon> vim
<Aline> Nuwb: you guys.
<shevy> test
<Aline> I will not come with broadcom bcm43xx can enable conversation mode if i cant get on super cheap?
<jlogsdon> vim all the things!
<Aline> I could do it is no.
<shevy> test
<Aline> Am generating deb file, thus invalidating the files.
<shevy> test
<Aline> This rails webserver for efficient bathroom distribution, but if i think I'll go on gnome 3.
<jlogsdon> just /ignore it
<Aline> This isn't there will be the same area.
<shevy> hehe
<Aline> Http://pry.
<davidcelis> what the fuck is going on here
<Aline> (its aliased to bait used to fit 2 minutes with these?
<CrawlBot> I think you can privately chat with her too
<Aline> No it depends.
<shevy> davidcelis bot attack
<Aline> Now nature calls, off to convert.
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
<jlogsdon> this is where an Oper bot with votekick owns.
<Aline> Jalouse is a flash drive really be mounted in #gnewsense), Linux mint.
<jlogsdon> but ignore works for now
<Aline> Absorb the db user data pattern the middle washrooms that.
hynkle has quit [Quit: hynkle]
<CrawlBot> Aline requires a lot of attention :(
<Aline> I will require you knew him on.
flip_digits has joined #ruby
robozahn has quit [Ping timeout: 265 seconds]
Helius has quit [Ping timeout: 265 seconds]
<davidcelis> did y'all let #freenode know
<Aline> Where to ruby 1.
<davidcelis> or are they gonna pull the "we cant help you" card again
<Aline> I could be found on super crack.
ananthakumaran has quit [Quit: Leaving.]
<shevy> davidcelis, last 3 times I asked, they said the channel owner must set the policies
<Aline> So, looking at least on the like regex lib ruby uses WAS lying.
<davidcelis> shevy: that's apeiros_ right?
<Aline> Be converted to blacklist the field?
ananthakumaran has joined #ruby
<otters> don't we just need an op?
<Aline> Where to figure out how to be lurking.
<shevy> no, but apeiros_ spoke with the old owner of #ruby and he gave him the necessary permissions
<Aline> What's the copies.
<davidcelis> hm
<Aline> It in ma pc wont u give me too.
xaq has quit [Read error: Connection reset by peer]
<otters> well for heavens' sake
<Aline> Lwhalen: 'tis why not?
<shevy> it sucks that freenode encourages bots that way though
<Aline> Basically momentarily doubles the whole page, there.
<lwhalen> grumble, I apparently need to use RVM or something to get ruby 1.9 on this thing
<Aline> Hold on boot options?
<jlogsdon> freenode is kinda weird with their rules =/
<Aline> Exploiter: in this adjustment, but jalouse.
<lwhalen> Ruby Enterprise 1.8.7 isn't cool enough, apparently
<Aline> - Nick Brdar.
xaq has joined #ruby
<CrawlBot> Aline as the right to live ?
<Aline> But not support any hardware wrong!!!!!!!!!!!!
bier has quit [Ping timeout: 244 seconds]
<shevy> CrawlBot what are you doing
<Aline> Kromo: 15 a grub/insgtall its like it sucks that.
<deryl> live in hell maybe
<Aline> Okay escott, thanks.
strnx has quit [Excess Flood]
<shevy> i wonder how the database of the bot is filled up with
<Aline> What's the last 3 managed to end.
<otters> are there not any ops present
<Aline> What's the same program can anyone here.
<jlogsdon> shevy: seems like this channel
<Aline> I think it in the fuck did you want to reassign bathrooms to get "No SUCH file.
<jlogsdon> it was silent for a while then got switched on
<Aline> I'm trying to use stored configs with ruby 1.
<jlogsdon> and i saw text that was in recent conversations
<Aline> Now nature calls, off to down load -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- but ignore.
<shevy> argh
<Aline> Well, considering paypa's getting a leader in /usr/share/applications.
<davidcelis> ... wtf
<Aline> I WAS written in and i won 2000$ worth of the check for debian/ubuntu.
robozahn has joined #ruby
<workmad3> ah, the joy of technical engrish
<Aline> Things.
<davidcelis> Yes, indeed. Things.
<Aline> Please consult their websites for the *only* department tackling the reception, and WAS reading up all doc i don't like super crack.
<shevy> lol
<Aline> Any solutions for the entire patter is not really be a var in the encryption WAS escape.
hemanth3 has joined #ruby
tvw has quit [Remote host closed the connection]
b3nt_pin has joined #ruby
<shevy> Aline: test
<Aline> Can always add it WAS 0% productive.
<workmad3> Aline: go away, or I'll replace you with a simple shell script... assuming you aren't already one
<Aline> Can always add Pee Cups for women (see !
<shevy> Aline: test
<Aline> Escott: in a technical question i change sound theme is only really sure.
<shevy> Aline: test
<Aline> This says in the toilet space i facepalmed after the right-click menu?
<shevy> I asked the #freenode guys
<Aline> I will require you leave a usb serial guru ?
<workmad3> Aline: test
<otters> shevy: what did they say
hemanth2 has quit [Ping timeout: 244 seconds]
<Aline> Ruby program can change the irc logger.
fira has joined #ruby
headius has joined #ruby
hynkle has joined #ruby
<CrawlBot> Aline is trying to learn programming ?
<Aline> Lstrip does it is a password.
robozahn_ has quit [Ping timeout: 245 seconds]
<shevy> CrawlBot you are a bot as well
<Aline> WAS changed to be mounted in.
<jlogsdon> at least his name says Bot
<Aline> Shevy: that's apeiros_ spoke with their websites for list.
<shevy> otters <kunwon1> shevy: kick or ban
<Aline> As a regex.
<nullsign> ignore is a wonderful command
<Aline> Ca is not really be questioning why we just have more.
<fira> looks like a poorly configured chatterbot
<Aline> Exploiter: search through for instance, i have more.
<shevy> <mrmist> hmm, will look into it but we don't haev access on #ruby
<Aline> What's up as these retards spell it.
Guest25164 is now known as graft
<workmad3> indeed, lets ignore the spambot :)
<Aline> At this in #gnewsense), Linux mint.
<fira> i recall eggdrop's MegaHAL implementation does this by default... the silly thing answers each and every message
<Aline> Maybe #rubay.
<deryl> fire or intentionally set wrog for maximum annoyance
<Aline> Rrd in #linuxmce), CrunchBang (support in /boot thing?
SimSala has quit [Ping timeout: 245 seconds]
<Yarou> it would be funnier if it weren't a bot
<Aline> An athiest as women (see my ubuntu.
* apeiros_ reads backlog
<Aline> My projects, in gnome classic and blockade against Ubuntu?
<Yarou> rather, a person manually copy-pasting spam
<Aline> I change sound theme (newly placed in #linuxmce), CrunchBang (support in usr/something/sound) in the whitequark irc logger.
strnx has joined #ruby
<otters> apeiros_, kill it
<Aline> I do you want a petition at the basic ubuntu 12.
KindOne has joined #ruby
<fira> and seeing how nonsense this is, this could very well be megahal
<Aline> For a bot is still doing wrong?
<fira> LOL
<Aline> Bitch, make this point).
<shevy> Aline: test
<Aline> Org/2011/02/two-puppet-tricks-combining-arrays-and-local-tests/ uses templates, but the end.
<shevy> ohhh
<Aline> So you tell me see appending to be faster than in minors or 'gdebi foo.
<shevy> apeiros_ is here!
<Aline> At a company i could do a password.
Aline was kicked from #ruby by apeiros_ [Aline]
MasterIdler has joined #ruby
<shevy> wheeeee!!!!
ozy_work has joined #ruby
<workmad3> yay for the kickban!! :D
<jlogsdon> apeiros_++!
<otters> not a ban
<workmad3> aww :(
<workmad3> kickban!!!
<shevy> well kick helps too
<tomb_> so mean workmad3
<shevy> apeiros : bots = 1 : 0
<fira> if it's a bot it'll probably rejoin later
<shevy> bots vs freenode: still 1 : 0
<mrmist> oh good, saves me doing it.
<shevy> :-)
<ozy_work> I am trying to get puppet to work with stored configs, and it keeps telling me I need to install the gem activerecord-mysql-adapter -- but when I run the command gem install activerecord-mysql-adapter, it tells me there is no such gem -- what am I missing?
<shevy> at least we can focus on on-topic chatter about ruby again
<nullsign> are gems like perl modules?
<shevy> nullsign: somewhat, yeah
<nullsign> woohoo, i guessed right, somewhat.
Alxander-- has joined #ruby
<jlogsdon> nullsign: gems are like CPAN
<jlogsdon> (so... yes)
<graft> CPAN is just a repository for modules
<jlogsdon> actually, I guess rubygems.org : cpan.org
<jlogsdon> yeah
<graft> yeah
<jlogsdon> i fixed myself :P
Alxander-- has quit [Client Quit]
<shevy> hmm any feature that CPAN has that gem/rubygems does not offer?
<graft> should be: you monkey-patched yourself
<workmad3> rubygems is a package manager, rubygems.org is a repository, a gem is a format for packaging a library
<shevy> one I heard was that there are no reverse-dependencies lookup for gems yet
<workmad3> I'd hesitate against calling them a module in ruby, because 'module' is already used in the language
savage- has joined #ruby
<graft> well, module is what they're called in perl
<jlogsdon> shevy: like X is used by Y,Z?
kevinbond has quit [Quit: kevinbond]
D4T has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> jlogsdon, I think so. someone here asked for this some days ago, and even linked to a feature request to rubygems from 3 years ago
<shevy> I forgot why he needed it however
francisfish has quit [Remote host closed the connection]
<jlogsdon> gemnasium does that ^_^
<shevy> gymnasium?
<jlogsdon> no, g_e_mnasium
hasrb has quit [Remote host closed the connection]
mneorr1 has joined #ruby
<shevy> hmm nice website
SegFaultAX|work2 has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
<jlogsdon> its really for watching a gems dependencies for updates, but it does reverse for at least 10 i think
<shevy> interesting, you can login to this via github account
<jlogsdon> oh heyyyyyy
<jlogsdon> shevy: they added --reverse-dependencies as a flag to `gem dependency`
<jlogsdon> so there you go!
<shevy> ohhhhhh
bier has joined #ruby
<shevy> I did not know that
<jlogsdon> me either
<jlogsdon> i think its fairly recent
<jlogsdon> probably with the API update to rubygems.org that made bundler not suck
crankycoder has quit [Remote host closed the connection]
<shevy> hehehe made bundler not suck? could still be some work required for that :D
Jay_Levitt has joined #ruby
<jlogsdon> well... by not suck i mean it no longer makes a request for EVERY gem you are installing... it batches now
<jlogsdon> so its WAY faster
nari_ has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
<jlogsdon> and bundler is infinitely better than `rake gems:install` or any other method of dependency management
mneorr has quit [Ping timeout: 245 seconds]
qwerxy has quit [Ping timeout: 245 seconds]
hamzzzz has left #ruby [#ruby]
PaciFisT has quit [Quit: Leaving.]
heftig has joined #ruby
jeff_sebring has joined #ruby
PaciFisT has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby
nari has quit [Read error: Connection reset by peer]
nari__ has joined #ruby
Jay_Levitt has quit [Client Quit]
CheeToS has quit [Ping timeout: 248 seconds]
CrawlBot has quit [Ping timeout: 245 seconds]
hadees has quit [Quit: hadees]
axl__ has joined #ruby
axl__ has quit [Read error: Connection reset by peer]
arturaz has quit [Ping timeout: 240 seconds]
Markvilla has quit [Quit: Markvilla]
nari_ has quit [Ping timeout: 246 seconds]
<lwhalen> ok, so very close to getting the whitequark IRC logger running
bradhe has joined #ruby
adeponte has joined #ruby
<lwhalen> I've installed RVM, did the whole bundle-install dance, fixed some database permission issues
<lwhalen> but when I set, in application.yml, my iRC server as "chat.mycorp.com:6697" (it's an SSL-only server), it keeps failing with "can't connect"
axl__ has joined #ruby
<lwhalen> does this logging bot speak SSL?
bradhe has quit [Read error: Connection reset by peer]
bwwrd has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bradhe has joined #ruby
<lwhalen> or, is there a different way to specify the port?
fira has left #ruby ["cya round"]
mayankkohaley has quit [Ping timeout: 246 seconds]
<workmad3> lwhalen: could be that the logger hasn't pulled in openssl, so can't open an ssl connection, could be the library itself can't do SSL, could be that the compiled openssl version doesn't have the certificates you need to establish identity...
Yarou has quit [Quit: Leaving]
<workmad3> lwhalen: or it could be host and port should be separated... don't know :)
<lwhalen> well, I tried the latter, to no avail :-)
williamcotton has joined #ruby
looopy has joined #ruby
<workmad3> lwhalen: there's no extra error status with the 'can't connect'?
<oz> "can't connect, dots not found"
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<workmad3> oz: awesome, I need to find a place to use that error message :D
mvangala_home has quit [Remote host closed the connection]
bricker88 has joined #ruby
<shevy> lol
pashamur__ has quit [Read error: Connection reset by peer]
<shevy> "can't connect, out of beer"
pashamur__ has joined #ruby
hadees has joined #ruby
<workmad3> bzzzt, bzzt, out of cheese error, please restart universe
Araxia_ has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mdw has quit [Remote host closed the connection]
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
graspee has joined #ruby
Foxandxss has joined #ruby
anykey_ has joined #ruby
pashamur__ has quit [Client Quit]
anykey_ is now known as any-key
looopy has quit [Remote host closed the connection]
pashamur__ has joined #ruby
bigoldrock has joined #ruby
Gm4n has joined #ruby
spersaud has joined #ruby
pashamur__ has quit [Read error: Connection reset by peer]
spersaud has left #ruby [#ruby]
polysics has quit [Remote host closed the connection]
pashamur__ has joined #ruby
<Hanmac> workmad3: *yet another Pretchett fan detected*
<workmad3> :)
looopy has joined #ruby
<workmad3> Hanmac: there's a lot of us :P
SeySayux_ has quit [Ping timeout: 244 seconds]
jeff_sebring has quit [Remote host closed the connection]
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
dem0x7 has joined #ruby
apok has joined #ruby
jeff_sebring has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
SeySayux has joined #ruby
koskoz has joined #ruby
binaryplease has joined #ruby
mneorr1 is now known as mneorr
fserb has joined #ruby
binaryplease has quit [Client Quit]
jeff_sebring has quit [Remote host closed the connection]
eywu has joined #ruby
jeff_sebring has joined #ruby
td123 has joined #ruby
Helius has joined #ruby
robozahn_ has joined #ruby
adamkittelson has joined #ruby
khakimov has joined #ruby
robozahn has quit [Ping timeout: 252 seconds]
Asher has quit [Quit: Leaving.]
tewecske has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
Aaton_off is now known as Aaton
FreeAssange has joined #ruby
rorrego has quit [Quit: Ex-Chat]
timonv has quit [Remote host closed the connection]
c0rn_ has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
FreeAssange has quit [Client Quit]
apok has quit [Remote host closed the connection]
apok has joined #ruby
AxonetBE has joined #ruby
<lwhalen> workmad3: http://pastebin.com/aCjHtRJK
zodiak has joined #ruby
AxonetBE has quit [Read error: Connection reset by peer]
AxonetBE has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<workmad3> lwhalen: hmm, that looks like your client isn't speaking SSL
<workmad3> lwhalen: causing the 'broken pipe' error (because the IO stream has gotten borked)
Agis__ has joined #ruby
<Agis__> Any good open-source projects so I could start reading ruby code?
krz has joined #ruby
<lwhalen> d'oh
mengu has quit [Quit: Konversation terminated!]
<lwhalen> how can I check to see if it's just a matter of adding a library, vs. 'massive rewrites of stuff'?
robozahn has joined #ruby
Swiss38974 has joined #ruby
<workmad3> lwhalen: documentation for the... whatever it is, to see if it says anything about creating an SSL connection to a server?
<lwhalen> this is the Whitequark IRC logger
ilyam has joined #ruby
<workmad3> yeah, I've never used it :P
<lwhalen> there's a distinct lack of documentation :-)
ilyam has quit [Remote host closed the connection]
<workmad3> :)
<workmad3> read the code?
* lwhalen headdesks
<workmad3> or grep the code for 'ssl'? ;)
<Agis__> which open-source project would you guys suggest for reading it's code to a ruby beginner?
shadoi has joined #ruby
brianpWins has joined #ruby
<Swiss38974> hello i m totaly new into ruby and i would like to ask a simple question : is it possible to make rubby dektop application with QT-Editor ? Or with GTK+ library ??
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
koskoz has quit [Ping timeout: 240 seconds]
danryan has left #ruby [#ruby]
d3vic3 has quit [Ping timeout: 248 seconds]
robozahn_ has quit [Ping timeout: 265 seconds]
lxsameer has quit [Max SendQ exceeded]
<graft> Swiss38974: how much do you want to do?
<graft> Swiss38974: i have a bunch of scripts that just do some basic interaction with 'kdialog'
udante has joined #ruby
lxsameer has joined #ruby
hemanth3 has quit [Quit: Leaving.]
<oz> with Gtk, glade can be used w/ ruby IIRW
nanderoo has joined #ruby
<Swiss38974> well actually my aim is to make some script for user
<Swiss38974> basicelly i want to do a gui
d3vic3 has joined #ruby
lxsameer has quit [Max SendQ exceeded]
<Swiss38974> the user will have to fill in a gui form
<Swiss38974> then he'll get an output
brunosaboia__ has joined #ruby
<Swiss38974> so i was thinking using a gui that i know such as gtk+ or qt
<oz> Agis__: there are plenty of projects to read from, pick one on github that you like, with a few followers, and you're set :)
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Agis__> oz: i'm searching for something simple
<Swiss38974> ok thx
<Agis__> oz: things like rails, and sinatra seems pretty complicated
workmad3 has quit [Ping timeout: 244 seconds]
mrsolo has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
lxsameer has quit [Max SendQ exceeded]
<oz> I think sinatra's code is actually pretty simple
lxsameer has joined #ruby
udante has quit [Client Quit]
lxsameer has quit [Max SendQ exceeded]
<Agis__> hm I will try that then
<Agis__> thx
jeff_sebring has joined #ruby
<shevy> Agis__ well if you want to go simpler than sinatra, then you can only provide one feature
<shevy> route '/' do
<shevy> that's about it
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<shevy> I cant think of a simpler "web framework" than that
<graft> going with a web framework to learn seems the wrong idea
BSaboia__ has quit [Ping timeout: 244 seconds]
<graft> there's so many other concepts involved...
<Agis__> graft: nice, what would be your suggestion?
<Agis__> true, there's rack etc
<graft> is this a beginning programmer, or a beginning ruby programmer?
<Swiss38974> @graft : thank you
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Agis__> i'm a rails dev but I haven't done any serious ruby programming.. I would say a little above beginner ruby programmer
<shevy> did you ever define your own methods?
Raduwen has quit [Quit: Leaving...]
<Agis__> yes
lxsameer has quit [Max SendQ exceeded]
corenumb has quit [Read error: Connection reset by peer]
<Agis__> I have a good theoretical knowledge, I just want to do something practical (read code of a real-life project)
<shevy> then you are a ruby programmer :D
xbayrockx has quit []
balki_ is now known as balki
mayankkohaley has joined #ruby
timonv has joined #ruby
zomgbie_ has joined #ruby
<Agis__> graft: so do you have any projects to suggest?
danishman has joined #ruby
<offby1> Without question, the command that I type most often in to "pry" is ``ls {}''. That is all.
graspee has quit [Ping timeout: 244 seconds]
graspee has joined #ruby
zomgbie has quit [Ping timeout: 245 seconds]
Progster has joined #ruby
werdnativ has joined #ruby
Aaton is now known as Aaton_off
<davidcelis> offby1: what
pashamur__ has quit [Quit: Konversation terminated!]
theRoUS has quit [Ping timeout: 260 seconds]
pashamur__ has joined #ruby
<davidcelis> listing enumerable methods?
Helius has quit [Remote host closed the connection]
eft has left #ruby [#ruby]
<graft> Agis__: if you just want to learn ruby, what about tryruby.org?
mdw has joined #ruby
<Agis__> I'm not, I'm trying to find a nice and simple project to go through it's code and try to understand it
v0n has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<shevy> best way is to solve a problem you have
<Agis__> nvm, thank u
Agis__ has quit [Quit: Agis__]
<shevy> some dont have any patience
stephenjudkins has joined #ruby
Karmaon has joined #ruby
mdw_ has joined #ruby
<barefoot> hehe
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mdw has quit [Ping timeout: 244 seconds]
carloslopes has quit [Ping timeout: 246 seconds]
Guest85273 is now known as ixx
Juul has joined #ruby
olrrai has joined #ruby
indeterminate has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
trend has joined #ruby
pashamur__ has joined #ruby
Markvilla has joined #ruby
Criztian has quit [Remote host closed the connection]
Swiss38974 has left #ruby [#ruby]
schovi has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
theRoUS has joined #ruby
qwerxy has quit [Ping timeout: 252 seconds]
<shevy> rippa cool idea
<shevy> waaah
<shevy> "Export a Blockly program into JavaScript, Dart, Python or XML."
pashamur__ has quit [Client Quit]
<shevy> google hates ruby
pashamur__ has joined #ruby
<wmoxam> Blocky looks stupid
<rippa> ruby is too cool for them
<graft> Dart?
neersight[d] is now known as neersighted
tomb_ has quit [Quit: Computer has gone to sleep.]
jeff_sebring has quit [Remote host closed the connection]
MasterIdler has quit [Quit: MasterIdler]
jeff_sebring has joined #ruby
thecreators has joined #ruby
zmoazeni has joined #ruby
zmoazeni has left #ruby [#ruby]
ringotwo has quit [Remote host closed the connection]
pdtpatrick has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
federic has quit [Ping timeout: 244 seconds]
pashamur__ has joined #ruby
kvirani has quit [Remote host closed the connection]
wpaulson has joined #ruby
cheater has quit [Ping timeout: 245 seconds]
Karmaon has quit [Ping timeout: 265 seconds]
<shevy> graft the language from google which will abolish javascript
eft has joined #ruby
<shevy> wmoxam dunno. I think the idea behind that is cool
federic has joined #ruby
Juul has quit [Ping timeout: 240 seconds]
the_jeebster has quit [Quit: Leaving.]
<shevy> there is this other graphical program... where you connect pipes (input and output)... I forgot from what it was... I dont think it was gstreamer, it was something else but I forgot :\
xnm has joined #ruby
<shevy> but if I remember correctly, you could move around boxes hehe
<rippa> also yahoo pipes
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
lkba has quit [Quit: Bye]
iocor has joined #ruby
lkba has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
werdnativ has quit [Quit: werdnativ]
apok_ has joined #ruby
d3c has joined #ruby
mohits has joined #ruby
lkba has quit [Client Quit]
iamphi has joined #ruby
lkba has joined #ruby
tvw has joined #ruby
<iamphi> what permission does ruby get when it is executing via apache cgi ? I am getting a permission denied trying to read a file
apok has quit [Ping timeout: 248 seconds]
apok_ is now known as apok
tatsuya_o has quit [Remote host closed the connection]
the_jeebster has joined #ruby
<iamphi> i am not using ruby on rail
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
TheFuzzball has joined #ruby
qwerxy has joined #ruby
<shevy> iamphi, I think by default user nobody
<shevy> iamphi play a bit with the permissions, and also the /tmp dir
jrist is now known as jrist-afk
ananthakumaran has quit [Quit: Leaving.]
<iamphi> shevy: ok.
francisfish has joined #ruby
luckyruby has quit [Remote host closed the connection]
zodiak has quit [Read error: Connection reset by peer]
<shevy> let's say I have a file with 100 methods, but without any module or class namespace. Can it be load and included into some namespace?
remmy444 has joined #ruby
mdw_ has quit [Ping timeout: 246 seconds]
cheater has joined #ruby
<jlogsdon> shevy: i don't think so... but you could test it quickly in pry.
<jlogsdon> or irb*
<jlogsdon> (i default to pry now, heh)
nari__ has quit [Ping timeout: 244 seconds]
<jlogsdon> i think require/load always applies to the root namespace
<jlogsdon> (otherwise autoloaders and the like would break D:)
<shevy> hmm
SimSala has joined #ruby
<shevy> :(
hadees has quit [Ping timeout: 244 seconds]
DrShoggoth has joined #ruby
Asher has joined #ruby
flip_digits has joined #ruby
voodoofish430 has joined #ruby
ringotwo has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
hadees has joined #ruby
hadees has quit [Remote host closed the connection]
Eldariof-ru has joined #ruby
<lwhalen> alright, so very close to getting the whitequark IRC logger running
mockra has joined #ruby
<lwhalen> I've got the logging process connecting to my server
<lwhalen> but when I try to run the "thin" webserver, it won't listen on a port, it'll only give me a socket
<lwhalen> even if I specify to listen on a port
<lwhalen> are the two options mutually exclusive?
davidpk has joined #ruby
<lwhalen> also, do I have to run the app under thin? Can't I just fire up Passenger via Apache and have it run the app that way?
flagg0204 has quit [Quit: leaving]
robbyoconnor has joined #ruby
<shevy> I dont know
iamphi_ has joined #ruby
iamphi has quit [Read error: Connection reset by peer]
ObjLn has joined #ruby
ObjLn has left #ruby [#ruby]
jeff_sebring has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
wpaulson has quit [Ping timeout: 245 seconds]
<nullsign> ruby - there's a method for that.
jeff_sebring has joined #ruby
AxonetBE has quit [Quit: Leaving.]
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
roolo has quit [Quit: Linkinus - http://linkinus.com]
Siphonblast has quit [Remote host closed the connection]
<jlogsdon> lwhalen: look at how to run Sinatra under Passenger/Apache.
<jlogsdon> that's what you will need to get it setup
wpaulson has joined #ruby
pashamur__ has quit [Client Quit]
<jlogsdon> nullsign: yup!
Codif has joined #ruby
pashamur__ has joined #ruby
zomgbie has joined #ruby
BSaboia__ has joined #ruby
iocor has joined #ruby
<shevy> __method__ is quite long... any idea to make it shorter?
icooba has joined #ruby
<shevy> def foo; puts 'Name is: '+__method__; end <-- in like 100 different methods hmm
<shevy> could perhaps do something like M = __method__ ? not sure if that would work though :(
<jlogsdon> it would not work
zomgbie_ has quit [Ping timeout: 240 seconds]
mdw has joined #ruby
<jlogsdon> you *could* make something that would slice up `caller` to get it but that would incur a not-insignificant performance penalty
hasrb has joined #ruby
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
brunosaboia__ has quit [Ping timeout: 244 seconds]
jeff_sebring has quit [Remote host closed the connection]
* shevy sobs.
bluenemo has quit [Read error: Connection reset by peer]
wpaulson has quit [Ping timeout: 244 seconds]
<jlogsdon> why do you need it so much?
<jlogsdon> seems like it could be a design issue...
<shevy> I have a bunch of methods that are like so:
<shevy> def foo
jeff_sebring has joined #ruby
<shevy> run_this_method :foo
<jlogsdon> i saw what they are like
<shevy> def bar
<jlogsdon> ok
<shevy> run_this_method :bar
joch_n has joined #ruby
Codif has quit [Remote host closed the connection]
digitalcakestudi has quit [Ping timeout: 245 seconds]
<jlogsdon> in that case I would make a class method that takes a symbol and defines the method programatically
<jlogsdon> then you just do `runs :bar` or whatever and then use #define_method to build it out
<lwhalen> ok, once I un-screwed my database issues :-)
<lwhalen> I'm now able to get the intro page for the irc logger
fserb has quit [Quit: ttyl]
<lwhalen> but if I click on a channel, it internal-server-errors on me
iocor has quit [Quit: Computer has gone to sleep.]
zomgbie_ has joined #ruby
zomgbie has quit [Ping timeout: 265 seconds]
fmcgeough has quit [Read error: Connection timed out]
iocor has joined #ruby
<jlogsdon> Test.new.bar # => Running bar
celm has joined #ruby
borkman`` is now known as borkman
<jlogsdon> lwhalen: check the log folder, tail -f whatever file is in there (production.log? development.log? I dunno). then try again
<lwhalen> oh here we go
<jlogsdon> look at the error in there
<jlogsdon> or fix it ^__^
<lwhalen> restarting it fixed the problem
<jlogsdon> aha
<lwhalen> the error was "cannot find method 'nick'
<lwhalen> which was.. weird
<lwhalen> ok, now to get this thing running under Apache...
itnomad has joined #ruby
heph has left #ruby [#ruby]
udante has joined #ruby
sonkei has quit [Quit: WeeChat 0.3.8]
<tommylommykins> hmm
<tommylommykins> is it possible to get the modules which have been mixed in to an instance of an object?
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
sonkei has joined #ruby
robozahn has quit [Ping timeout: 248 seconds]
<apeiros_> tommylommykins: obj.singleton_class.ancestors will contain them
jbpros_ has joined #ruby
jbpros_ has quit [Client Quit]
emmanuelux has quit [Remote host closed the connection]
sonkei has quit [Client Quit]
<tommylommykins> ooh, thanks :D
sonkei has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<apeiros_> I think using obj.singleton_class.ancestors - obj.class.ancestors, you'll get only the modules that have been directly added to obj
MasterIdler has joined #ruby
kvirani has joined #ruby
sailias has joined #ruby
sonkei has quit [Client Quit]
jeff_sebring has quit [Remote host closed the connection]
ph^ has joined #ruby
sonkei has joined #ruby
A1241 has joined #ruby
A1241 has left #ruby [#ruby]
flak has joined #ruby
flak is now known as Guest57479
crankycoder has joined #ruby
aces1up has quit [Read error: Connection reset by peer]
werdnativ has joined #ruby
iamjarvo has quit [Quit: WeeChat 0.3.7]
emmanuelux has joined #ruby
rippa has quit [Ping timeout: 244 seconds]
luxurymode has quit [Quit: Computer has gone to sleep.]
<ozy_work> I have a ruby application that keeps inisting I need to install the gem activerecord-mysql-adapter -- even though that gem does not exist. Googling the error makes it sound like the error is a ruby error and not application specific -- so I was wondering if anyone had any advice or comments here....
Guest57479 has quit [Client Quit]
pashamur__ has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
pashamur__ has joined #ruby
rippa has joined #ruby
fmcgeough has joined #ruby
federic has quit [Ping timeout: 245 seconds]
schovi has quit [Remote host closed the connection]
nightzpy has quit [Read error: Connection reset by peer]
nightzpy has joined #ruby
AxonetBE has joined #ruby
federic has joined #ruby
<csmrfx> 8)
<ozy_work> o.O
<csmrfx> hey ozy
xaq has quit [Read error: Connection reset by peer]
<csmrfx> wat os you on?
carloslopes has joined #ruby
<ozy_work> rhel5
looopy has quit [Remote host closed the connection]
xaq has joined #ruby
impomatic has joined #ruby
<csmrfx> I bet that 'gem' is something inside avtive record
Bosma has joined #ruby
<ozy_work> i'm not a ruby guy, so I am not sure where to go
sonkei has quit [Quit: WeeChat 0.3.8]
jgarvey has joined #ruby
<csmrfx> install activerecord gem
wang_ is now known as wang
bosphorus has quit [Remote host closed the connection]
<csmrfx> or might be sequel
<csmrfx> guess
bosphorus has joined #ruby
sonkei has joined #ruby
<ozy_work> wang: yeah, thats one of the pages I ahve hit. I tried mysql2, but the issue remains
codezombie has joined #ruby
<wang> ozy_work: did you try what the guy said fixed it for him (in the comments of the accepted answer)
mjb2k has joined #ruby
ryanf has joined #ruby
<csmrfx> ozy_work: can you require that gem or the other
<ozy_work> i'm not sure I understand
Helius has joined #ruby
<ozy_work> I changed the dbadapter in the configfor the application, but now I get err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not connect to database: Invalid db adapter mysql2
<wang> try gem install mysql2
alexim has joined #ruby
<ozy_work> mysql2 (0.3.11) is already installed
<csmrfx> ozy you gotta understand ruby gems to get this workin
tscolari has quit [Quit: Linkinus - http://linkinus.com]
<csmrfx> figure out how to require a gem in a test file
<csmrfx> then see if your ruby version can do that for the particular gem
tscolari has joined #ruby
wallerdev has quit [Quit: wallerdev]
Eldariof-ru has quit []
bosphorus has quit [Ping timeout: 265 seconds]
nu7hatch has joined #ruby
<wang> ozy: how about gem install mysql (and going back to db adapter mysql) ?
<ozy_work> mysql (2.8.1) already installed ;-)
<ozy_work> thats the one that gives teh error that I need to install activerecord-mysql-adapter
<wang> that second error you pasted, with mysql2... http://projects.puppetlabs.com/issues/9997
Progster has quit [Ping timeout: 252 seconds]
<ozy_work> well crap
statix_ has quit [Remote host closed the connection]
<csmrfx> possibly related (yes, you can test in irb, too) http://stackoverflow.com/questions/6181247/gem-found-in-irb-not-in-ruby
<ozy_work> looks like I need to talk with my coworker
stat1x has joined #ruby
MrGando has joined #ruby
<ozy_work> 2.7.14 was supposed to be in the repo I used
<ozy_work> looks like it is 2.6.12
<ozy_work> thank you
<ozy_work> let me fix that quick
<wang> a-ha
<ozy_work> i saw that page, and assumed it did not apply
<ozy_work> until I double checked the version
fmcgeough has quit [Read error: Connection timed out]
Progster has joined #ruby
<wang> there's a devops_borat tweet in the making there somewhere
Maniacal has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
vizzord has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ph^_ has joined #ruby
flype has joined #ruby
<ozy_work> damn it
<ozy_work> now a new error
<ozy_work> err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload active_record: uninitialized constant ActiveRecord
<csmrfx> again
<csmrfx> install
<csmrfx> activerecord
<csmrfx> gem
Karmaon has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
<ozy_work> [root@henson ~]# gem list | grep active
<ozy_work> activerecord (2.3.5)
<ozy_work> activeresource (2.2.2)
<ozy_work> activesupport (2.3.5, 2.2.2)
<heftig> now that looks ooold
<csmrfx> ok, in irb, can has require activerecord || ruby -e "require 'activewhateva'" # or something?
flype has quit [Client Quit]
<ozy_work> it's the version from the documentation I was using. Trying something newer now
ph^ has quit [Ping timeout: 248 seconds]
chienpo has joined #ruby
fserb has joined #ruby
mockra has quit [Remote host closed the connection]
ravee has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<ravee> Hello, where can i find date library?
wpaulson has quit [Ping timeout: 252 seconds]
robotmay has joined #ruby
<csmrfx> ri Date
<ravee> sorry!
<csmrfx> sorry why?
<ravee> i couldn't understand what you said
<csmrfx> type 'ri Date' in console for date formatting lib docs
wilmoore has joined #ruby
fantazo has quit [Remote host closed the connection]
<ravee> i needed source code.
pashamur__ has quit [Read error: Connection reset by peer]
jimeh2 has quit [Ping timeout: 244 seconds]
<csmrfx> also, or ri | grep "Date"
pashamur__ has joined #ruby
pashamur__ has quit [Client Quit]
pdtpatrick_ has joined #ruby
pashamur__ has joined #ruby
Kn|t3 has quit [Quit: Kn|t3]
<csmrfx> all that code is in your ruby install dir /lib
rizzylt has quit [Ping timeout: 252 seconds]
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
Karmaon has quit [Ping timeout: 246 seconds]
<csmrfx> for example /usr/lib/ruby/1.9.1/date/format.rb
xastion has joined #ruby
medik has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
<sonicpond> i think i prefer questions when they end with "!"
<sonicpond> amirite!
<heftig> no‽
<csmrfx> Me, I'm just wondering where can i find date?
vlad_starkov has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<heftig> csmrfx: it's in date.c, built into ruby
<heftig> er, time.c
pdtpatrick has quit [Ping timeout: 246 seconds]
pdtpatrick_ is now known as pdtpatrick
<ravee> i got ruby version of date
<heftig> er, wrong again
<heftig> ext/date/date_core.c
<csmrfx> lol, not gonna start dating C-source
<sonicpond> i took "date" to mean "hoochie momma"...in this case.
* csmrfx I'm desperate, but not THAT desperate
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
Hanmac has joined #ruby
<csmrfx> ah well, better make upside down spider now...
<csmrfx> (web spider)
itnomad has quit [Quit: Leaving]
Karmaon has joined #ruby
fmcgeough has joined #ruby
dsa has joined #ruby
dhruvasagar has joined #ruby
Vainoharhainen has joined #ruby
EzeQL has quit [Ping timeout: 248 seconds]
mucker has joined #ruby
sausage2 has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<csmrfx> I'm pretty sure Vainoharhainen is following me
xaq has quit [Read error: Connection reset by peer]
<shevy> he just wants a kiss
xaq has joined #ruby
the_jeebster1 has joined #ruby
krz has quit [Quit: krz]
the_jeebster has quit [Ping timeout: 245 seconds]
pashamur__ has quit [Client Quit]
qwerxy has quit [Ping timeout: 244 seconds]
pashamur__ has joined #ruby
<csmrfx> ha, who doesnt
BrokenCog has quit [Read error: Connection reset by peer]
pdtpatrick has quit [Remote host closed the connection]
pdtpatrick has joined #ruby
cek has joined #ruby
<cek> is file.open(, 'r+') { fh.rewind; fh.truncate(0); fh.write } correct sequence to rewrite file's contents?
wilmoore has quit [Read error: Connection reset by peer]
wilmoore has joined #ruby
udante has quit [Disconnected by services]
udante_ has joined #ruby
banghouse has quit [Read error: Connection reset by peer]
<csmrfx> so I have an open-uri read-function happenin
avandenhoven has joined #ruby
<csmrfx> how can I have each run concurrently
mucker has quit [Quit: leaving]
<Vainoharhainen> csmrfx: o0?
avandenhoven has left #ruby [#ruby]
<csmrfx> lol
mockra has joined #ruby
BSaboia__ has quit [Read error: Connection reset by peer]
mucker has joined #ruby
Kn|t3 has joined #ruby
<DrShoggoth> are there any good ruby editors for linux? I'm using gedit which does pretty good but doesn't support highliting def/end blocks
codezombie has quit [Quit: Linkinus - http://linkinus.com]
yoklov has joined #ruby
federic has quit [Remote host closed the connection]
<csmrfx> vim
akem has quit [Read error: Connection reset by peer]
<csmrfx> you mean gedit doesn't highlight 'def' and 'end' ?
akem has joined #ruby
wpaulson has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
mucker has quit [Quit: leaving]
mucker has joined #ruby
azm has quit [Ping timeout: 240 seconds]
<DrShoggoth> no, it only does () {} and []
udante has joined #ruby
<billiamii> DrShoggoth, sublimetext2?
<graspee> my copy of gedit highlights def and end
<shevy> DrShoggoth I use bluefish 1.0.7
udante_ has quit [Ping timeout: 252 seconds]
Helius has quit [Remote host closed the connection]
<DrShoggoth> like when you put the cursor on def, it highlights the matching end?
<mjb2k> My gedit it highlighting def and end by bolding them
<shevy> hmm in bluefish no
<shevy> sublimetext does that though
<ekaleido> sublimetext is my favorite
<mjb2k> oh i see, highlight the end matching the def
mdw has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
mdw has joined #ruby
kenichi has quit [Remote host closed the connection]
jrist-afk is now known as jrist
indian has joined #ruby
<DrShoggoth> right, its very useful when I screw up a block and need to find the missing or extra end
<shevy> hehe
mdw_ has joined #ruby
<shevy> in actual practice, if you indent with 2 spaces, this becomes a no-issue really
<cek> netbeans
<shevy> I usually do this though:
<shevy> def foo
<shevy> array.each {
<shevy> }
<shevy> end
<shevy> it helps my eyes visually
<DrShoggoth> hmm... sublimetext is nice, but doesn't seem to do it
<shadoi> multi-line {} blocks are nasty.
<DrShoggoth> yeah, I endent like that
<cek> i use eval
<DrShoggoth> i dont use multiline {} though
<shevy> I love multiline {}
<shadoi> too similar to hashes
<billiamii> cek: I think you're looking for the 'w' mode instead of 'r+'
counterbeing has joined #ruby
<lectrick> whatever mr. c++ haha
nanderoo has left #ruby [#ruby]
<cek> billiamii, no, i don't.
<nullsign> rubymonk.com is nice.
<mjb2k> speaking of editors, anybody know if RedCar is any good
mdw has quit [Ping timeout: 244 seconds]
ph^_ has quit [Remote host closed the connection]
mikeycgto has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
udante has quit [Disconnected by services]
udante_ has joined #ruby
ph^ has joined #ruby
kenichi has joined #ruby
udante has joined #ruby
pac1 has joined #ruby
<shevy> I think it requires you to have java installed and working
TheFuzzball has quit [Quit: Leaving...]
<mjb2k> yes, it runs on JRuby
voodoofish430 has joined #ruby
<cek> yes, you then suddenly become enterprise ready
udante has quit [Disconnected by services]
daniel- has joined #ruby
udante has joined #ruby
<shevy> lol
udante_ has quit [Ping timeout: 252 seconds]
<shevy> it was overkill for me to explicitely install java just for an editor
korishev has joined #ruby
ph^ has quit [Ping timeout: 252 seconds]
<shevy> the only cool thin redcar has going is that it's written in ruby
tomb_ has joined #ruby
<shevy> *thing
<mjb2k> being that I do more Java than Ruby, java is always going to be there
<cek> i use rubymine and i'm totally fine with it
Aaton_off is now known as Aaton
<cek> navigation's very fast and overall is a great ide
udante has quit [Disconnected by services]
udante_ has joined #ruby
looopy has joined #ruby
<shadoi> vim + pry.
<cek> you could use vim, but that's so '70s
<shadoi> no that'd be ed.
<cek> noah, ed is from alan barbage era
tomb_ has quit [Client Quit]
apok has quit [Remote host closed the connection]
daniel- has quit [Ping timeout: 272 seconds]
<shadoi> I know people who still prefer ed. :)
<cek> prefer over a can of trash?
<shadoi> they get upset when EDITOR is set to something other than ed.
apok has joined #ruby
udante_ has quit [Client Quit]
<shadoi> VISUAL is for those "new-fangled" editors.
Guest20110 has joined #ruby
sailias has quit [Quit: Leaving.]
<nullsign> "Ruby, like most languages, has the all-time favourite for loop. Interestingly, nobody uses it much" ..
<nullsign> i wonder why for isn't used much?
<mjb2k> ha, I actually just started using vi, after I bothered to learn just enough keys to use it, and a funny thing happened
<mjb2k> I like it
mockra has quit [Remote host closed the connection]
<nullsign> vi is awesomesauce.
udante has joined #ruby
<mjb2k> now I don't want to tell my co-worker, who I've been poking fun at for using an editor from the 70's
<nullsign> dont use vi then, use vim ;)
<nullsign> it's technically different.
<mjb2k> whatever, same thing
udante has quit [Disconnected by services]
udante_ has joined #ruby
mucker has quit [Quit: leaving]
<nullsign> it would be like saying windows 7 == windows 3.11
<nullsign> ;)
<shevy> nah
<shevy> win 7 is much more complex
<shevy> and thus sucks more too
<shevy> vim vs. vi, still feel very much the same
<mjb2k> i think it'd be like saying Windows 98 and Windows 98 SE are the same thing
<shevy> I even liked the ME edition :)
wpaulson has quit [Ping timeout: 265 seconds]
<shevy> I had a virus in a directory which I could not easily remove
<mjb2k> even if they are different under the hood, you still use them just the same
<shevy> I felt locked out from my own computer with ME
Synthead has quit [Ping timeout: 244 seconds]
ryanf has quit [Ping timeout: 240 seconds]
<shevy> with linux it is more fun
<shevy> I can remove any file and see what breaks :)
<mjb2k> well, Microsoft is smarter than you, of course
korishev has left #ruby [#ruby]
<shevy> could be, but even if they were dumber, they deny me the option to be in full control
<mjb2k> actually if you bought a computer with Window on purpose, than I guess that really is true.. haha
bosphorus has joined #ruby
<shevy> I think the only thing that really sucked and still sucks on linux are the GUIs
ryanf has joined #ruby
banseljaj is now known as imami|afk
bradhe has quit [Remote host closed the connection]
<mjb2k> yes, I think Desktop Environments on Linux were actually getting to a good place, things were looking good, then Gnome 3 happened
wpaulson has joined #ruby
udante_ has quit [Ping timeout: 272 seconds]
<nullsign> linux has a desktop? ;)
<nullsign> meh, back to fvwm it is
<mjb2k> i actually just recently switched to Openbox
pashamur__ has quit [Quit: Konversation terminated!]
wpaulson has quit [Ping timeout: 248 seconds]
pashamur__ has joined #ruby
danishman has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
TheFuzzball has joined #ruby
BrokenCog has joined #ruby
hadees has joined #ruby
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
ukd1 has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
ph^ has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
Criztian has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
stephenjudkins has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
albemuth has quit [Read error: Connection reset by peer]
robotmay has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
ces has joined #ruby
pashamur__ has joined #ruby
olrrai has quit [Ping timeout: 244 seconds]
werdnativ has quit [Ping timeout: 240 seconds]
sepp2k1 has joined #ruby
kevinbond has joined #ruby
sepp2k has quit [Ping timeout: 244 seconds]
<ukd1> is there a good way to run more than one rack app per config.ru file?
<ekaleido> why would you want to do that?
<ekaleido> out of curiousity
sausage2 has left #ruby [#ruby]
albemuth has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
mohits has quit [Ping timeout: 240 seconds]
<ukd1> ekaleido, I'm testing locally and want to run two different versions of the same api (grape). One is /api/1 the other is /api/2
<Paradox> shotgun might be able to do it
pashamur__ has quit [Quit: Konversation terminated!]
<ukd1> Paradox, thanks - I'll google
pashamur__ has joined #ruby
<Paradox> i like shotgun because it solves a lot of problems
<Paradox> no need to ^C and restart rackup on a config change
<Paradox> every request is a new rack
<ukd1> ah I'm using pow which does that
rtl has joined #ruby
schovi has joined #ruby
<ukd1> I think I need to put some logic in my config.ru to switch what's running based on url
<ukd1> uri, even
klj613 has joined #ruby
burgestrand has joined #ruby
TheFuzzball has joined #ruby
roams has quit [Ping timeout: 252 seconds]
rock-n-rolla has joined #ruby
asobrasil has left #ruby [#ruby]
rock-n-rolla has quit [Client Quit]
koskoz has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
jwang has quit [Read error: Connection reset by peer]
eblume has joined #ruby
jwang has joined #ruby
SirRamonGabriel has joined #ruby
rizzylt has joined #ruby
ryanf has quit [Ping timeout: 245 seconds]
<eblume> Hi. I'm trying to teach myself Rails and Ruby at the same time. I'm getting an error - "undefined method `[]' for nil:NilClass" for the line "user = User.find_by_email(params[:session][:email])". Any ideas? (I can pastebin more context if needed.)
Ducklings has joined #ruby
xaq has quit [Remote host closed the connection]
<eblume> I'll check out #rubyonrails as well but I was thinking this might be more a ruby error syntax question.
ringotwo has quit [Remote host closed the connection]
<shevy> eblume as rails is written in ruby, this of course is a ruby syntax error
<eblume> Yes, I figured. :)
<shevy> in this example, you are trying to use the method [] an a nil object, an object that is not there
ryanf has joined #ruby
<shevy> so the first question you should ask is - why is the object in question nil
<eblume> Which object, though? 'params'?
<shevy> I think so
<shevy> well
<shevy> params is used via two [] actually
<shevy> could be the second one that is nil
<eblume> Oh. Hah, no, i totally just saw the error.
<shevy> in situations like this, in ruby code, you would often do: pp params
<shevy> it seems to be a hash object
<eblume> I stupidly copy/pasted that from another area and forgot that this is the controller method that is *creating* the session.
<shevy> I have absolutely no idea about rails ;)
<eblume> Sorry. Dumb me. Thanks for the pointers :)
<eblume> pp params - pp is like "Pretty print"
<eblume> ?
<shevy> pp is pretty print, yes. the point is, it will nicely print data structures, like hash
<shevy> you can try in irb quickly
<eblume> Excellent, that's very useful to me.
<eblume> Thanks shevy!
xaq has joined #ruby
<eblume> I'm learning to like ruby - it has a lot of very elegant notions. Some very strange syntax though!
<shevy> require 'pp'; hash = {"b"=>2, "a"=>1, "c"=>3, "e"=>5, "d"=>4, "j"=>7, "i"=>7, "FgH"=>6, "asdaswegjkhweg jkwegh jkwegh kjweghjkweghwegjkgwe " => 555}; pp hash
king313 has joined #ruby
king313 has quit [Changing host]
king313 has joined #ruby
<shevy> you can see that output only via irb, or if you put this into a .rb file and run it
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<shevy> but once you saw it, you will understand, it will arrange the hash nicely in the output
TheFuzzball has quit [Quit: Leaving...]
Synthead has joined #ruby
<shevy> eblume a lot of the syntax in ruby can be very terse
<shevy> for instance
<shevy> [] vs. Array.new
<shevy> {} vs. Hash.new
looopy has quit [Remote host closed the connection]
<DrShoggoth> geany is relly nice
<eblume> Actually coming from a Python background, those make sense to me.
<shevy> (both are not 100% the same, you can do a bit more with the .new variants... but the others are used more often because they are much shorter)
<eblume> I'm still learning my way around blocks, though.
<shevy> blocks are very simple. just keep in mind that every method in ruby can get one optional block
<shevy> def foo; end
<shevy> foo
Enekoos has joined #ruby
<shevy> foo()
<shevy> foo() {}
Guest20050 is now known as coofamani
<shevy> is kinda the same way to invoke the method foo
<eblume> They make sense - I am also conversant in Lisp and there are some very related FP constructs.
Synthead has quit [Max SendQ exceeded]
suborbital has joined #ruby
<shevy> but blocks are really awesome
<eblume> Yes they seem to be like a great way to structure certain things
<eblume> and I like that they are frequently not mandatory
<shevy> does python have something similar like a block?
<eblume> Vaguely. They have 'context managers'
<eblume> with foo():
<shevy> indeed. the blocks are a bit like a special argument to a method
SimSala has quit [Remote host closed the connection]
<eam> perl is most similar re: blocks
<shevy> inside a method, you can check for a given block via this:
<shevy> yield if block_given?
abionic has joined #ruby
Synthead has joined #ruby
<shevy> the block_given? asks whether a block was given
<shevy> and yield just access the block content
the_jeebster1 has quit [Quit: Leaving.]
<eblume> Very interesting. Thanks!
the_jeebster has joined #ruby
<shevy> when you understood that, you understood at least 80% of blocks
<eblume> I also find it really interesting how Rails has really almost defined an entirely different domain-specific language. It all feels very Lispish to me, which I like.
ravee has left #ruby ["Leaving"]
AxonetBE has quit [Quit: Leaving.]
<shevy> I find this rather sad actually
<shevy> rails is so big that it overshadows ruby :(
<shevy> but I see the good side
<shevy> rails 5.0 will be its own language independent of ruby ;)
joch_n has quit [Quit: Leaving...]
<shevy> though ruby will me mRuby at that point I guess
pashamur__ has quit [Quit: Konversation terminated!]
<shevy> https://github.com/mruby/mruby matz 31 minutes ago!
pashamur__ has joined #ruby
<nullsign> rails is leaving ruby?
Synthead has quit [Ping timeout: 240 seconds]
TheFuzzball has joined #ruby
<shevy> nah not any time soon
<shadoi> shevy is just blabbering :)
<shevy> well I gave it to rails 5.0, that's still some time :)
minijupe has quit [Quit: minijupe]
khakimov has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
Axsuul has joined #ruby
Progster has quit [Ping timeout: 246 seconds]
<shevy> whooooaa
<shevy> webkit gets css variables: http://trac.webkit.org/changeset/120154
<RubyPanther> mruby has very active since the pre-release
<shevy> they seem to use perl ... css/makeprop.pl:
<RubyPanther> It is unlikely that mruby will replace MRI
apok has quit [Quit: apok]
Synthead has joined #ruby
mdw_ has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 246 seconds]
<RubyPanther> RiteVM was originally intended to replace 1.8 but Matz became convinced that the YARV VM would be better in a lot of ways. But RiteVM is better for embedded systems.
<eam> shevy: not surprising, apple is a big perl shop
nateberkopec has joined #ruby
tatsuya_o has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<shevy> :(
stockhol1 has quit [Ping timeout: 272 seconds]
<eam> why the long face? If you like ruby you've got to like perl at least a little
pashamur__ has quit [Client Quit]
<deryl> not
stockholm has joined #ruby
pashamur__ has joined #ruby
moshee has quit [Ping timeout: 265 seconds]
<eam> eh, they're incredibly similar
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
abionic has quit [Read error: No route to host]
hynkle has quit [Quit: hynkle]
mayankkohaley has quit [Ping timeout: 245 seconds]
yxhuvud has quit [Ping timeout: 252 seconds]
schovi has quit [Remote host closed the connection]
<any-key> ruby has a different set of values
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<any-key> like not looking like barf
<eam> well of course -- I'm just saying that's mostly superficial syntax fluff
sixdahs has joined #ruby
<any-key> what about the functional programming bits that make ruby awesome?
<eam> any-key: which parts are you thinking of?
<any-key> blocks, of course!
<any-key> and rambdas, my fave
<eam> perl has those
<eam> any-key: with near-exact identical syntax, no less
<any-key> really.
<eam> foo { code }
cek has quit [Quit: жопа диридай диридиридай]
<eam> foo { code } args, here;
<any-key> how would I map an array?
jlogsdon has quit [Remote host closed the connection]
<eam> sub mymap(&@) { my ($block, @list) = @_; return $block->(@list) }
<eam> mymap { $_ + $_ } 1..5
<any-key> interesting
<any-key> also good lord that is ugly
<eam> yeah it's ugly, lots of non alphanumerics -- but functionally very similar
<any-key> good to know then
<any-key> I was under the impression it didn't do much of that sort of thing
zz_chrismcg is now known as chrismcg
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<eam> to be honest, there are a few things perl has that I'm waiting for ruby to figure out -- like variable scoping
<shevy> what is that?
joch_n has joined #ruby
<shevy> the variable scoping
<eam> shevy: well for example, how do I determine if I'm referencing a block-local variable, or something from the enclosing scope? In 1.8 I think it's essentially not possible
geekbri has quit [Remote host closed the connection]
<eam> x=6; 1.times do x = 5 done; puts x # for example
vlad_starkov has quit [Remote host closed the connection]
pashamur__ has quit [Quit: Konversation terminated!]
<eam> ruby has no way to declare block local variables
pashamur__ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
hemanth has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<eam> in perl or other languages, ideally you'd say { my $x; .... } # the lexical variable is scoped to the block
fbernier has quit [Ping timeout: 244 seconds]
<eam> in ruby 1.9 you can kind of do this, eg 1.times do |x| ... end # x is lexically scoped and isolated from a possibly defined x outside the block
<eam> but that's a corner case and not the general case
nateberkopec has quit [Quit: Leaving...]
<burgestrand> eam: ruby 1.9 has this thing with semicolon and block variables that make them explicitly local
<eam> burgestrand: yeah
<eam> that's what I meant
<eam> it's a step in the right direction, but it feels forced. I'd prefer explicit scoping and explicit variable definition (because it catches typos too -- use strict; in perl is great)
<eam> the ruby interpreter has no way to know if foo = 5 is a typo and I meant bar = 5
sixdahs has quit [Quit: Leaving]
internet_user has quit [Remote host closed the connection]
khakimov has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<ged> I think 'use strict' and 'use warnings' are the only things from Perl that I miss.
schovi has joined #ruby
_md has joined #ruby
<offby1> eam: oh, and: methods aren't proper closures, but lots of other procedure-like things are. I'm still trying to figure that one out.
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
s0ber_ has joined #ruby
<ged> offby1: What's your definition of "proper closure"?
akem has quit [Ping timeout: 248 seconds]
pashamur__ has quit [Client Quit]
<offby1> one that can refer to lexical variables that were in scope when it was defined, but not when it was invokes
<offby1> invoked
wallerdev has joined #ruby
pashamur__ has joined #ruby
<eam> ged: I think what I miss most actually is the reference counted gc
s0ber has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
s0ber_ is now known as s0ber
<eam> it was *really* nice in Perl to know that an object would destruct at exactly the point it went out of scope
jbpros_ has joined #ruby
<ged> eam: Wow, really? I don't miss that at all. Trying to keep track of all the mutual references, the half-functional WeakRef implementations?
<offby1> not many languages make that guarantee
wmoxam has quit [Ping timeout: 248 seconds]
<burgestrand> Ruby has a broken weakref implementation :(
<eam> I keep running into crazy things in Ruby where objects sit around and blow up, like File.new.read # leaks descriptors
magoo has quit [Quit: leaving]
jeffreybaird has quit [Quit: jeffreybaird]
<eam> ged: tracking references never struck me as difficult
uris has quit [Ping timeout: 244 seconds]
<eam> I'm unconvinced that gc to address cyclic structures is worth the drawbacks (and I include java in that sweeping statement)
<burgestrand> File instances actually close on GC
the_jeebster has left #ruby [#ruby]
<burgestrand> Usually you run out of FDs before ruby runs out of memory and GCs them though
Bosma has quit [Ping timeout: 265 seconds]
jimeh2 has joined #ruby
<burgestrand> (which is why it’s still best practice to explicitly close them when no longer needed)
fserb has quit [Quit: ttyl]
mvangala has quit [Remote host closed the connection]
<offby1> I think this is true of Racket as well, and Racket is pretty sharp about such things
carloslopes has quit [Read error: Connection reset by peer]
<eam> burgestrand: yeah but gc isn't guaranteed to run .. ever
<burgestrand> eam: indeed
looopy has joined #ruby
g0bl1n has quit [Ping timeout: 246 seconds]
<eam> I find myself inserting ugly workarounds like passing a block for no reason (since it appears that File calls close after the yield, even though it won't gc until far later)
<stephenjudkins> eam: don't depend on on GC for non-memory resource management
<eam> stephenjudkins: that's exactly my complaint :)
francisfish has quit [Remote host closed the connection]
koskoz has quit [Ping timeout: 245 seconds]
<stephenjudkins> for that specific case, you can pass a block to file open: File.open(mode) {|f| ... }
<offby1> eam: don't you use the "open('filename') {|fh| ... }" idiom? Does that not guarantee it gets closed at the right time?
d-best has joined #ruby
nilg has quit [Read error: Connection reset by peer]
<eam> yeah that's what I just said -- passing a block for no reason to avoid the gc problem
<stephenjudkins> eam: it's not a GC problem
<offby1> oh. I wouldn't describe that as "for no reason"..
<stephenjudkins> the GC is designed to respond to memory pressure, not file handle pressure or anything else
<offby1> I've never seen a gc system apart from perl that will close files for you ... and I think perl's GC has some other problem which makes ref-counting unattractive
<eam> stephenjudkins: right. That's my complaint. I prefer systems with deterministic behavior
joshman_ has quit [Ping timeout: 252 seconds]
<any-key> that's booooring
<eam> offby1: every reference counted gc will do it
<offby1> well, yes
snearch has quit [Quit: Verlassend]
<offby1> but as I say: I have this vague sense that there's a real problem with ref-counting ... even though I cannot remember what it is.
<offby1> cycles or something.
<stephenjudkins> eam: no, every reference counted GC will not do it, unless it forbids cyclic references
Synthead has quit [Read error: Operation timed out]
<stephenjudkins> any naive ref-counting GC will also have nondeterministic behavior, since dereferencing something can take an arbitrary amount of time
rizzylt has quit [Ping timeout: 245 seconds]
<rking> I want Math.TAU.
<stephenjudkins> dealing with JVM GC tweaking, GC pauses can be as severe a problem on production systems as resource leaks
<offby1> eam: ah, given "I'm unconvinced that gc to address cyclic structures is worth the drawbacks", we're just disagreeing about the comparative costs and benefits. No problem
jcromartie has quit [Quit: jcromartie]
Ducklings has quit [Read error: Connection reset by peer]
Ducklings has joined #ruby
<stephenjudkins> eam: i agree that general resource-management schemes are insufficient for many problems
wvms has joined #ruby
<stephenjudkins> but you are completely wrong to insist that a language's GC handle other non-memory resources in the manner you deem appropriate
jbpros_ has quit [Quit: jbpros_]
<eam> I didn't insist about anything, putting words in my mouth is rude. I said I prefer and miss the deterministic behavior found in other languages with a refcounted gc
<stephenjudkins> because the best way to manage file handles is different than mmapped files, which is different than the heap, which is different from DB connections
<eam> it's a personal preference
pashamur__ has quit [Quit: Konversation terminated!]
<eam> stephenjudkins: mmaped files use the same descriptors as read/write
<eam> not that it's particularly relevant
jeffreybaird has joined #ruby
pashamur__ has joined #ruby
billiamii| has joined #ruby
<stephenjudkins> yes, but a very different kind of pressure
<eam> the point is that the /object/ decides what to do when destroyed, and ensuring that the destructor is called when it passes from scope is an incredibly handy feature
Synthead has joined #ruby
joch_n has quit [Quit: Linkinus - http://linkinus.com]
<eam> in ruby it is impossible to solve within the object framework as presented
<stephenjudkins> the OS defines a process's has a file handle limit, but mmapped files instead put pressure on the page cache.
looopy has quit [Remote host closed the connection]
billiamii has quit [Ping timeout: 244 seconds]
cfein__ has joined #ruby
billiamii| has quit [Read error: Connection reset by peer]
nilg has joined #ruby
<stephenjudkins> eam: yes, it's impossible because the it's impossible for an object to know when it's no longer referenced! unless you have a refcounting GC, which introduces another, completely different set of non-deterministic behavior
<stephenjudkins> which you said you don't like.
Enekoos has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
<stephenjudkins> or, you could do stuff like C where you manually free up resources. but accessing a something that's been freed is also non-deterministic
<stephenjudkins> or, "undefined"
nilg has quit [Read error: Connection reset by peer]
looopy has joined #ruby
balki has quit [Read error: Connection reset by peer]
Ducklings has quit [Ping timeout: 244 seconds]
shtirlic has quit [Read error: Connection reset by peer]
celm has quit [Quit: Leaving]
g0bl1n has joined #ruby
shtirlic has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
rizzylt has joined #ruby
jmartin has joined #ruby
balki has joined #ruby
paraseba has joined #ruby
Spooner has joined #ruby
Vendethiel has quit [Ping timeout: 248 seconds]
pashamur__ has quit [Quit: Konversation terminated!]
<stephenjudkins> also, allowing finalizers on objects effectively doubles the number of GC cycles required to collect them
pashamur__ has joined #ruby
lorandi has quit [Quit: Leaving]
pashamur__ has quit [Remote host closed the connection]
g0bl1n has quit [Ping timeout: 246 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
vizzord has quit [Quit: see you]
hadees has quit [Quit: hadees]
qwerxy has joined #ruby
<Mon_Ouie> Ruby has a kind of finalizers, but you can't access the actual object from it — you can keep a reference just to the actual resource that needs to be "freed" though
nu7hatch has quit [Ping timeout: 252 seconds]
g0bl1n has joined #ruby
mpereira has quit [Remote host closed the connection]
g0bl1n has quit [Client Quit]
g0bl1n has joined #ruby
dem0x7 has quit [Remote host closed the connection]
paraseba has left #ruby ["WeeChat 0.3.8"]
lwhalen has quit [Quit: Leaving]
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
<mjb2k> why doesn't Ruby seem to be as popular as other interpreted languages? (Obvious reference: Python)
Synthead has quit [Read error: Operation timed out]
<burgestrand> mjb2k: source?
<davidcelis> mjb2k: source?
<burgestrand> first
<thedonvaughn> ruby is purty damn popular
<burgestrand> \o/
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
dhruvasagar has quit [Ping timeout: 244 seconds]
stephenjudkins has joined #ruby
MasterIdler has quit [Ping timeout: 246 seconds]
<mjb2k> I don't have much in front of me right now, but that is my general view based on framework bindings (GTK) libraries, instructions/tutorials, libraries, etc
<mjb2k> maybe it's my misconception based on a small set of observances, I hope so
Synthead has joined #ruby
<mjb2k> most recently, I'm rather irritated that GTK has offical bindings for Javascript, Python, Vala and Perl, but not Ruby
<stephenjudkins> eam: to drive my point home, here is information on CPython's reference-counting implementation: http://stackoverflow.com/questions/8025888/does-python-gc-deal-with-reference-cycles-like-this
<stephenjudkins> it uses a a supplemental mark-and-sweep to detect cycles. however, this *does not* work if an object has a finalizer because it's impossible to determine a safe order to run them.
<shevy> mjb2k vala is a first class citizen for the C-guys in GTK
hasrb has quit [Remote host closed the connection]
<shevy> mjb2k, perl has the old advantage of being the language that is known by the fossil C hackers
<shevy> python kinda was the new kid on the block and had better documentation and I guess many other C hackers settled for python rather than ruby
hadees has joined #ruby
<mjb2k> I must admit, I only first heard of Vala when I saw it in the language bindings list, but when I took a quick look at it, it does look pretty good
<mjb2k> yep, that's the page
<shevy> Vala is really more like the C guys missing features from C++
<shevy> :D
davidpk has joined #ruby
<shevy> what makes me sad is that there are javascript bindings (???= for gtk
zaychenok has joined #ruby
<mjb2k> and that's the biggest one for me, Provide Javascript bindings for GTK, but not Ruby??? how and why does that happen??
dv310p3r has quit [Ping timeout: 246 seconds]
rizzylt has quit [Remote host closed the connection]
<shevy> no real idea
td123 has joined #ruby
andrewhl has quit [Remote host closed the connection]
<shevy> it may be that javascript is considered more important than ruby
<shevy> it may also be that some gtk developers know javascript, and perl or python, but not ruby
qwerxy has quit [Quit: offski]
<shevy> and another reason may that perhaps ruby makes it too difficult to write and maintain bindings
Crooky has joined #ruby
<ged> I don't think they're up to date, but: http://ruby-gnome2.sourceforge.jp/hiki.cgi?Ruby%2FGTK
azm has quit [Ping timeout: 265 seconds]
<ged> Oh, well, latest release was on 2012-04-08, so...
<mjb2k> I feel like I need to find out, I think I need to dive into Ruby gems soon
Enekoos has joined #ruby
workmad3 has joined #ruby
_md has quit [Quit: Leaving...]
jbpros_ has joined #ruby
tayy has quit [Remote host closed the connection]
jbpros_ has quit [Client Quit]
TheFuzzball has quit [Quit: Leaving...]
<mjb2k> the ruby-gnome2 lib is perfectly usable, but the documentation is lacking or just plain missing in a lot of areas and it is behind in the supported GTK versions
blacktulip has quit [Remote host closed the connection]
<mjb2k> it really only provides basics and there is no sign of GTK3 support anytime soon
digitalcakestudi has joined #ruby
davidcelis has quit [Quit: K-Lined]
<mjb2k> a lot of what I've done with ruby-gnome2 I actually found how to do by looking at plain GTK docs of python-gtk docs and figuring it out from there
davidcelis has joined #ruby
<mjb2k> (plain *OR python-gtk)
ken_barber has quit [Remote host closed the connection]
DMKE has quit [Ping timeout: 244 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<shevy> yeah but what is even more sad is
PaciFisT has quit [Quit: Leaving.]
<shevy> that ruby-gtk is one of the better GUIs in ruby
PaciFisT has joined #ruby
Synthead has quit [Read error: Connection reset by peer]
PaciFisT has quit [Client Quit]
<mjb2k> I agree, that's why I ended up using it
<shevy> :)
<shevy> I think one huge problem with ruby gtk is that there is now only one developer left
<mjb2k> I am curious to see if it's possible for Ruby to play well with Java's Swing though, even though everytime I think of Swing I throw up in my mouth a little
jmartin has quit [Quit: Leaving]
eurbach has quit [Quit: Leaving.]
<eam> stephenjudkins: hm yes I'm aware -- you're talking about something very different
looopy has quit [Remote host closed the connection]
<eam> I'm not sure why you mention "accessing deallocated memory" for example
<eam> object destruction is not the same thing as malloc/free
mikepack has quit [Read error: Connection reset by peer]
<stephenjudkins> no, we're not talking about different things
<shevy> kou authored 25 days ago
<shevy> mjb2k, kinda half-deadish :(
<stephenjudkins> you're asking for the language runtime to run a finalizer when an object has no live references pointing to it
<stephenjudkins> and claimed that this is "deterministic" behavior
khakimov has quit [Quit: Computer has gone to sleep.]
<stephenjudkins> i pointed out, correctly, that there are zero mainstream languages that support cyclic references that offer deterministic running of finalizers
mikepack has joined #ruby
iamphi_ has quit [Quit: iamphi_]
<eam> you're arguing a corner case of two objects in a cycle and saying the ordering between those two objects is not deterministic. That's not conflicting with my statements
iamphi has joined #ruby
looopy has joined #ruby
<stephenjudkins> "deterministic" doesn't mean "usually does this" it means "always does this"
bluenemo has joined #ruby
looopy has quit [Remote host closed the connection]
<stephenjudkins> and i'm pointing out that, because of implementation difficulties, in Python, any object with both cyclic references and a finalizer will never get collected
<stephenjudkins> in Java, finalizers impose a serious performance penalty
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
Vendethiel has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
Progster has joined #ruby
<mjb2k> Java 7, new GC!
zaychenok has quit [Client Quit]
caaakeeey has joined #ruby
zaychenok has joined #ruby
wangr has quit [Ping timeout: 265 seconds]
Siphonblast has joined #ruby
pierrot_ has joined #ruby
<mjb2k> "Whole-heap operations, such as global marking, are performed concurrently with the application threads" Java7u4
pierrot_ has quit [Client Quit]
<stephenjudkins> mjb2k: the G1 GC is a big step forward and reduces pauses
<caaakeeey> can anyone point me to libraries that can act as an arbitrary number of clients on an irc network?
<mjb2k> sorry to digres, but I'm alittle excited about that, maybe we'll get that in production in about another year
DMKE has joined #ruby
<stephenjudkins> however, compaction is still stop-the-world
<stephenjudkins> afaik only Azul has a truly pauseless GC
nignaztic has joined #ruby
mischief has joined #ruby
addi has quit [Quit: ZNC - http://znc.sourceforge.net]
Foxandxss has joined #ruby
chson has quit [Remote host closed the connection]
looopy has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
addi has joined #ruby
nfk has quit [Quit: yawn]
Whoop has quit [Ping timeout: 260 seconds]
<mischief> hey
<mischief> if i invoke a ruby program as 'prog1 -a -b -c foo' how can i get all the arguments after the first one in an array? ARGV?
wpaulson has joined #ruby
makarius has joined #ruby
davidcelis has quit [Quit: K-Lined.]
ces has quit [Remote host closed the connection]
nullsign has quit [Quit: Lost terminal]
iamphi has quit [Quit: iamphi]
looopy has quit [Remote host closed the connection]
<mjb2k> "after the first one" ? as in: -b, -c and foo?
<shevy> mischief, yeah they are stored in the special array ARGV
<mjb2k> $> ruby args.rb -a -b -c foo
<shevy> never tap into ARGV from within a method directly though. always through params
<mjb2k> ARGV will contain: ["-a", "-b", "-c", "foo"]
giftfrosch has quit [Quit: giftfrosch]
<mischief> shevy: i just need to make a wrapper
<mjb2k> shevy: params?
bluenemo has quit [Read error: No route to host]
<mjb2k> isn't params provided by Rails?
<shevy> mjb2k yeah, the method signature. def foo(a,b,c)
pk1001100011 has quit [Ping timeout: 244 seconds]
<shevy> def foo(a,b,c = ARGV[3])
khakimov has joined #ruby
<shevy> ARGV is always tainted though
Progster has quit [Ping timeout: 260 seconds]
iocor has quit [Quit: Computer has gone to sleep.]
<shevy> I used to use ARGV directly from within a method
schovi has quit [Remote host closed the connection]
<shevy> that resulted in a mess
<Spooner> Surely just using optparse or slop would be a better plan?
<mjb2k> oh, ok i got ya now, you mean parameters in general
xnm has quit [Read error: Connection reset by peer]
<shevy> so these days, I tend to do things like MyClass.new(ARGV) if __FILE__ == $PROGRAM_NAME
<mischief> so
<mischief> i can use this
<mjb2k> as opposed to in the method body, haha, I when right to the params hash in rails
<mischief> prog = "echo"
<mischief> exec prog + " " + ARGV.join(" ")
Gavilan has joined #ruby
<shevy> mischief yeah
<mischief> okay
<shevy> I use system though and ``
<mischief> so if i were to put a shell script in my ruby gem where's the best spot for that :P
<shevy> for some reason I never use exec
xastion_ has joined #ruby
<shevy> mischief, probably in bin/
<mischief> well system and `` do fork before exec
<workmad3> shevy: you'd get it too confused with the 'eval' statements all over your code :P
<Spooner> mischief: That isn't guaranteed to work, since you'd need to wrap the ARGV in quotes to be sure of same args being parsed at the other end.
<shevy> workmad3, nope. I dont use eval :)
davidcelis has joined #ruby
<workmad3> shevy: yeah, you *say* that... :P
<shevy> I really mean it
<workmad3> :)
<mischief> Spooner: ah you mean because of the shell?
carlyle has quit [Remote host closed the connection]
<shevy> I even hate "metaprogramming"
<shevy> it just steals my brain time
carloslopes has joined #ruby
<davidcelis> shevy: h8r
robozahn has joined #ruby
<shevy> yeah davidcelis :)
<workmad3> shevy: man, you'd really love LISP macros then... :)
<shevy> my golden rule is that if code forces me to think, it is wrong
<Spooner> mischief : Yeah. User might use spaces in arguments by using quotes.
xastion has quit [Ping timeout: 245 seconds]
<shevy> I am too superficial for lisp, I never liked the (
<davidcelis> shevy: dont hate bro
Guest20110 has quit [Ping timeout: 244 seconds]
<mischief> Spooner: so i could just wrap each ARGV element in '' ?
<Spooner> mischief: Yeah, that is what I was suggesting. Just a simple gotcha.
<mischief> okay thx
<mjb2k> lisp causes vertigo
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<shevy> there is ... shellescape too
<workmad3> shevy: yeah, I agree... metaprogramming which forces you to think 'what the hell is going on here?' is wrong
<shevy> nope sorry... I actually meant ...
<Spooner> LISP people love the endless paretheses...
<shevy> shellwords
<shevy> array = Shellwords.shellwords(string)
rasbonics has quit [Quit: rasbonics]
<shevy> hmm lemme find an example...
<Spooner> OR should I say (L(I(S(P (people (love (the (endless (paretheses)))))))...
<shevy> string = 'My dog ate my math homework and my cat'"
<workmad3> shevy: however, a tiny sprinkle of a tiny bit of metaprogramming (e.g. a 3 line method_missing that gives you a fluent API) is ok to me... no extra thinking :)
ph^ has quit [Remote host closed the connection]
<shevy> p array # => ['My', 'dog', 'ate', 'my', 'math', 'homework', 'and', 'my', 'cat']
<shevy> I dunno
<shevy> I once wrote a whole class that delegated non-existing methods to another class, via method_missing
ph^ has joined #ruby
Ttech is now known as tTECH
<shevy> I think I also used .send somewhere else in that project
<workmad3> shevy: ah, a thin proxy... yeah, I've used them at times
<shevy> those were the old days
<shevy> where I was wild and dangerous and clever
<workmad3> heh
tTECH is now known as Ttech
<Crooky> Hi. Why should I learn ruby instad of PHP for webdev?
<shevy> now I am tame, docile and dumb
<workmad3> or at least... thought you were clever :P
<mjb2k> it's stuff like method_missing that makes me shed a little tear when I switch back over to Java
<shevy> yeah workmad3 it is always relative. there are people out there who are a million times cleverer :)
davidcelis has quit [Quit: K-Lined.]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<shevy> Crooky because there is nothing PHP can do better than ruby
eblume has quit [Quit: Page closed]
khakimov has quit [Quit: Computer has gone to sleep.]
pygospa has quit [Ping timeout: 244 seconds]
<mjb2k> ruby better supports languages other than english
<workmad3> Crooky: simple... PHP is a horrible mess that claims to be a language but is in reality the vomit of a strange mewling creature, while ruby is rainbows and kittens and unicorns packaged up into something that can make computers do your bidding
<shevy> you need to provide something that gives you what PHP leverages though
<shevy> like, an equivalent framework
<mjb2k> PHP is very easy to learn... oh wait so is Ruby
<shevy> I think PHP is easier
<apeiros_> shevy: look into rack server pages
<workmad3> mjb2k: PHP is easy to learn for the wrong reasons
<mjb2k> PHP has great webframeworks available ... oh crap, again so does Ruby
qwerxy has joined #ruby
<apeiros_> php isn't any easier to learn than ruby. that's bollocks.
<workmad3> it's syntax is practically non-existant and it consists almost entirely of global function names
<mjb2k> PHP is equally good at web as it is CLI scripts .. oh damit! so is Ruby
<workmad3> while ruby is easy to learn because it just flows from the ends of your fingers naturally
<Crooky> I only need a tool to implement different crazy webprojects.
pygospa has joined #ruby
<shevy> ohhhh apeiros_ didn't you once wrote your own web framework too? in php as well?
ph^ has quit [Ping timeout: 265 seconds]
<mjb2k> Ruby is in it's current state mostly because it was designed to be that way, PHP is in it's current state because people keep trying to bolt stuff on the sides without removing the old crap dragging on the ground
<shevy> mjb2k I found PHP ok for web stuff, for CLI scripts, I felt it was awful
<workmad3> mjb2k: heh :) I like the backhanded insult to PHP in your last statement :)
<mischief> hey
<workmad3> mjb2k: 'equally good for web and CLI scripts' :)
<shevy> PHP is design "worse is better" approach. creative chaos
<mischief> i did this code here
<mischief> and it doesn't have '' around each argument when i call puts
<mischief> :s
jrist is now known as jrist-afk
<klj613> what different between cities['NY'] = 'New York' and cities[:NY] = 'New York' ?
<workmad3> shevy: PHP's design is proof that actually, worse is worse, IMO :)
<shevy> mischief, pls use pastie.org
akem has joined #ruby
<mischief> y
akem has quit [Changing host]
akem has joined #ruby
<shevy> this sprunge.us crap does not even allow me to copy paste from it properly :(
<mjb2k> hey I didn't say PHP was good or bad at web and CLI, only that they 2 sides are equal, lol
<workmad3> mjb2k: :)
<mischief> shevy: take off the ?ruby
<apeiros_> shevy: yes. I reinvent all the wheels. on a regular base.
<shevy> mischief, when I copy paste from sprunge.us, I get the line numbers as well
hunglin has quit [Quit: Leaving.]
<mischief> shevy: take off the ?ruby
<shevy> ok now it is better
<mjb2k> PHP is just fine, it's very usable ... the question should be: is adequate good enough for you?
<shevy> the line numbers are gone :P
<workmad3> mischief: you shouldn't have to url-hack to get a copyable pastie
looopy has joined #ruby
<mischief> i write curl -F 'sprunge=<-' http://sprunge.us < exec and it pastes the 'exec' file
<mischief> can't get much easier :p
coofamani has quit [Quit: leaving]
<shevy> ok your script works?
davidcelis has quit [Quit: K-Lined.]
<mischief> it doesn't append ?<lang> by default anyways
<workmad3> mischief: you can do similar with both pastie nand gist :)
<workmad3> *and
jgarvey has quit [Quit: Leaving]
<mischief> shevy: no
<shevy> why not
<shevy> what are you trying to do
<mischief> Spooner said that i need to properly quote my arguments before calling exec because there could be whitepsace in the arguments
<mischief> and when i call puts cmdline it doesn't have quotes so...
<shevy> yeah Spooner must fix this mess
looopy has quit [Remote host closed the connection]
<shevy> mischief, http://pastie.org/4083051
<workmad3> mischief: just do 'exec "echo", *ARGV'
<shevy> I am not entirely sure why you do this twice
davidcelis has joined #ruby
<shevy> I mean the puts part, if you use echo anyway...
silentpost has joined #ruby
<mischief> shevy: because the intended program is not echo?
<shevy> and I dont know why I used .each either
<shevy> I kinda copy pasted from you mischief :P
Vert has joined #ruby
Whoop has joined #ruby
<shevy> mischief good! what is the program name
burgestrand has quit [Quit: Leaving.]
<workmad3> mischief: don't try to quote the arguments yourself
davidcelis has quit [Client Quit]
cfein__ has quit []
<workmad3> mischief: make use of exec's multi-argument version, where each extra param to the exec call is an argument for the program
<mischief> then how do i escape the arguments to preserve whitespace?
looopy has joined #ruby
<workmad3> mischief: exec "echo", "argument 1", "argument 2", ...
davidcelis has joined #ruby
<mischief> workmad3: how to do so with a variable length array such as ARGV :-)
<workmad3> mischief: I told you that about 2 minutes ago ;)
* apeiros_ sometimes loses hope about mankind
kvirani has quit [Remote host closed the connection]
SirRamonGabriel has quit [Remote host closed the connection]
<shevy> <workmad3> mischief: just do 'exec "echo", *ARGV'
<horseman> apeiros_: what's your honest opinion about woman-kind
<apeiros_> I don't think it's any different from my opinion about mankind
<mischief> apeiros_: i ask stupid things just to bug you.
<apeiros_> mischief: I think it's not just you. it's a conspiracy!
<shevy> does your script work now mischief!!!
<mischief> thanks workmad3, shevy, Spooner :-)
<mischief> shevy: i don't know yet, i have to plug in the real program and try
<shevy> !!!!!!!!!!
DrForr has quit [Ping timeout: 245 seconds]
<mischief> i have to... commit to github
<Crooky> I was thinking about web scripting and performance. But I get the sense that I'm fiddling with non-issues here. I'm not facebook. But from a developing perspective, as someone who wants to try multiple crazy web-projects.. what is a good choise? What makes quick and easay dev? Gives the most functionality of the least code, for example. And let's say that I want to use SHA1 to protect the...
<mischief> wait for jenkins to build the gem
<Crooky> ...users.. and that I use image rendering, and maybe some gzipping for various reasons
<mischief> install the gem on our server
<mischief> and hope it doesn't break everything
td123 has quit [Quit: WeeChat 0.3.8]
<shevy> Crooky, PHP
<mischief> lua of course
<mischief> :-)
<shevy> well he asks for the golden spoon that feeds him
<shevy> perhaps rails has all that, I dont know
TorpedoSkyline has joined #ruby
<shevy> then again, I think actions should be small and modular, and not hidden away into frameworks
<Crooky> shevy: why php? .. let's assume that learning any language isn't an issue
axolx has joined #ruby
wmoxam has joined #ruby
<shevy> Crooky because you ask for functionality that may require work
<shevy> php uses imagemagick for image rendering or?
<shevy> and comes with gzip integrated and lots of other things
<shevy> so given your criteria, it would match best, no?
<Crooky> right
<axolx> im stuck with a gem issue and was wondering if anyone here had insight about it. basically rake is not finding a gem that's clearly there otherwise: http://d.pr/n/qbmw
<mjb2k> most functionality with least hand typed code, Ruby on Rails
<shevy> as for "most functionality of the least code"
<shevy> I think it depends on how much code your frameworks already wrote for you
<shevy> in ruby, you can express yourself with less characters than in php
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
xaq has quit [Remote host closed the connection]
zizzyx has quit [Disconnected by services]
<shevy> axolx perhaps rake must require rubygems first
zizzyx has joined #ruby
<Vendethiel> Crooky: you know
<shevy> you could try to add that line to rake
<Vendethiel> servers are cheap, developers are not ;-).
minijupe has joined #ruby
<workmad3> axolx: rails project... it uses bundler... add the gem to your Gemfile
<zizzyx> when creating job classes for resque, where should i store these files?
<zizzyx> or should i add the classes to some existing file
<mjb2k> one rails command can give you a functional model, view and controller I don't know of any PHP framework that provides that
<workmad3> axolx: and re-run bundle install
<Vendethiel> plus even if php has infinite scability, you can add servers as much as you want
khakimov has joined #ruby
<workmad3> rails can scale, php can scale, java can scale, and also rails can't scale, php can't scale and java can't scale
<daed> ^
<daed> this is correct
<daed> on all counts
qwerxy has quit [Quit: offski]
<axolx> workmad3: thx
<workmad3> Crooky: you should use intercal for your web projects
<workmad3> Crooky: or maybe java2k :)
tatsuya__ has joined #ruby
<mischief> use werc :-)
bglusman has quit [Ping timeout: 265 seconds]
Bosma has joined #ruby
<workmad3> Crooky: ooh, actually, scratch that... you should write emacs extensions in lisp to turn emacs into a fully functioning HTTP server and then more lisp for your web apps served through emacs!
zaychenok has quit [Quit: Konversation terminated!]
<mischief> there's also yaws which is neat http://yaws.hyber.org/
tatsuya_o has quit [Ping timeout: 248 seconds]
<mjb2k> oh c'mon workmad3, you need to be more modern, here's the answer http://code.google.com/p/google-blockly/
<mischief> if you like erlang :-)
zaychenok has joined #ruby
_blackbird has quit [Quit: where's the beef!?]
<mischief> LOL wut
<mischief> that is insanity mjb2k
hakunin has quit [Remote host closed the connection]
<mjb2k> now there is the most functionality for the least code, you don't ahve to write any code at all!!
hakunin has joined #ruby
crankycoder has quit [Remote host closed the connection]
<shevy> mjb2k very true
<shevy> the best code is the one never written
cbuxton has quit [Quit: Leaving.]
<shevy> unfortunately it also does not bring you very far :(
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
Guedes has quit [Read error: Connection reset by peer]
zaychenok has quit [Read error: Connection reset by peer]
graspee has quit [Ping timeout: 244 seconds]
zaychenok has joined #ruby
tatsuya__ has quit [Remote host closed the connection]
akem has quit [Ping timeout: 245 seconds]
<Crooky> shevy: there are infinitely many coes that never has been written :/. Which one are you reffering to?
graspee has joined #ruby
<shevy> you mean code that was never written??
<shevy> every code that was never written!
whuffor has quit [Ping timeout: 252 seconds]
pting has joined #ruby
zaychenok has quit [Client Quit]
mjb2k has quit [Quit: Leaving]
zaychenok has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
Criztian has quit [Remote host closed the connection]
oooPaul has quit [Quit: Ciao for now!]
<Crooky> why ruby instead of perl?
Vert has quit [Remote host closed the connection]
<horseman> Crooky: no reason, u should just use perl
<horseman> Crooky: /j #perl
davidcelis has quit [Quit: K-Lined.]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
liluo has joined #ruby
<shevy> Crooky because perl gives no compelling advantage over ruby but achieves the same with much more line noise
<shevy> and it is not an OOP language
d3vic3 has quit [Ping timeout: 244 seconds]
<Crooky> how's the support of ruby on webservers? And is the resource bottleneck the same as for PHP?
<shevy> ruby works fine on apache .cgi
robozahn has quit [Ping timeout: 248 seconds]
klj613 has quit [Ping timeout: 246 seconds]
<shevy> as for "bottleneck", if you are a speed junkie you must stick to PHP
<shevy> I dont know why you wanna leave PHP
<shevy> stick to it. you'll be a rich man at age 50
d3vic3 has joined #ruby
<wmoxam> Crooky: the resource bottleneck tends to be RAM
<shevy> and pixies
<wmoxam> shevy: I wouldn't say that php is fater either :p
<wmoxam> *faster
explody has quit [Remote host closed the connection]
<shevy> I dunno really
<shevy> speed never was a reason why I use or did not use a language
<shevy> but apaprently Crooky wants a ferrari
<wmoxam> shevy: if you compare Rails to a custom php app, then yeah, php is 'faster'
<shevy> wmoxam, yeah. Crooky drives in his PHP ferrari
centipedefarmer has quit [Quit: This computer has gone to sleep]
<wmoxam> shevy: wtf dude
<Crooky> No, I just want to save on the nature's resources by not wasting CPU-cykles for nothing.
whuffor has joined #ruby
<workmad3> they're never wasted for nothing
<wmoxam> Crooky: not for nothing. It's called a tradeoff for a reason ;)
<shevy> man
robotmay has joined #ruby
<workmad3> however, major marketing kudos... trying to give an environmental reason to pick a language...
<shevy> nature's resources
<wmoxam> Crooky: and if the comparison is to php, then it's debatable if there are even extra CPU cycles involved
fantazo has joined #ruby
<shevy> Crooky, you must give up on computers
<shevy> become a hippie, a hermit
<shevy> or an ermine
<wmoxam> Crooky: in fact the opposite is likely true in most cases
davidcelis has quit [Ping timeout: 244 seconds]
<shevy> and using PHP in order to protect nature
<shevy> now that is!!!!!!
TheFuzzball has joined #ruby
<shevy> Crooky, my ecological footprint with ruby is lower than your ecological footprint with PHP
<shevy> TAKE THAT
<wmoxam> shevy: Fortran is the most green language around
<Crooky> but, but.. I want to =(
<shevy> I've never met a real person use fortran
<shevy> it's a myth
<shevy> I've met two who use FORTH though
<shevy> but they are creepy
<shevy> and they do things I did not understand at all
<wmoxam> shevy: I haven't either though I've heard that IBM still has some
carloslopes has quit [Quit: Leaving]
<Crooky> what advantages has PHP really? Except that it's easy to learn?
<horseman> Crooky: learn to google
eblume has joined #ruby
<horseman> Crooky: you're asking some of the dumbest questions ever to grace #ruby u're really scraping the bottom of the barrel
sixdahs has joined #ruby
xiaotian has joined #ruby
<Paradox> ooh drama
* Paradox reads scrollback
<shevy> Crooky it is simple to write webthingies
<shevy> Crooky after 2 years in PHP I was fed up with it and switched to ruby
<shevy> I can't tell you why you should use PHP because I think PHP is a steaming pile of shit. it however als works in its niche, so its ecological shit at least
<Paradox> Crooky, basically, the only advantage PHP has is it works fucking everywhere, and is simple as shit to write
<Paradox> in 95% of the cases, php will just run
<brianpWins> Posted this in ROR so if your in both rooms I don't mean to spam. I've got some ASP.NET code for hashing a PW and am trying to replicate it in Ruby so we don't have to get everyone to reset their passwords. If anyone knows and c/c#/java/asp and wants to take a peek: http://pastie.org/private/rlywdlqg9xjeka6qd2jmuw
<Paradox> since most php installs are on top of apache, you don't have to deal with a controller system, as apache just uses the file-system for the controller
<Paradox> thats really the only reason to use php
<Paradox> its good for simple stupid shit, but not much else
<shevy> hehehe
<xargoon> PHP is a template language, and a really bad one at that task too
<stephenjudkins> brianpWins: do you realize you are using an HMAC in asp.net, and straight SHA1 in Ruby?
tomb_ has joined #ruby
<Paradox> xargoon, its a template language that puts logic into the templates
<Paradox> DONT USE SHA1 FOR PASSWORDS FFS
<stephenjudkins> brianpWins: also... you're HMACing your passwords against themselves? that doesn't make any sense
<Paradox> use Bcrypt
<brianpWins> stephenjudkins: I don't. I don't know asp so I can understand if theirs issues here
<Crooky> Paradox: why not???
<stephenjudkins> what Paradox says
<Paradox> Crooky, asked linkedin, lastfm, gizmodo, etc
<brianpWins> stephenjudkins: this is someone else' system we've moving users from
<shevy> Crooky, why dont you simple stick to PHP
<stephenjudkins> brianpWins: I don't know asp.net either
<stephenjudkins> but I at least tried to read the code and understand what's going on
<Paradox> simply put
<Paradox> a SHA hash is a cryptographic hash
<Paradox> its designed to be very fast
<brianpWins> mind explaining the diff of the HMACSHA1 and straight SHA1?
<Paradox> because it has to run on real-time traffic
<Paradox> such as a SSH connection or whatever
chson has joined #ruby
<Paradox> that means if someone wants to hack it
<Paradox> they can bruteforce it very quickl
<Paradox> its a cryptographic hash
<Paradox> Bcrypt and other such things, however
<Paradox> are password hashses
<Crooky> riiiiiight
<Paradox> they take a tremendous amount of time to work
<Paradox> sometimes up to 100ms
<Paradox> but…
<Paradox> that means anyone who wants to hack them has to wait 100ms for every attempt on them
<stephenjudkins> brianpWins: http://bit.ly/MC0K4j
<Paradox> if you use sha1 they only have to wait around 10µs
<Paradox> per attempt
<Paradox> so, in the time it takes to run one test on a bcrypt hash
ephemerian has quit [Quit: Leaving.]
<Paradox> they can test 10000000 sha1s
explody has joined #ruby
<brianpWins> stephenjudkins: thanks. I just thought it was a library naming thing. I didn't realize the were actually different. I'll read up and try again
<workmad3> sha1 is too efficient
<stephenjudkins> brianpWins: also, listen to Paradox.
williamcotton has quit [Quit: williamcotton]
Vendethiel has quit [Quit: je ne suis plus là, tqvu]
mohits has quit [Read error: Connection reset by peer]
<stephenjudkins> if you are stuck with a bunch of SHA1 passwords, it's possible to add bcrypt on top of that to get added security
<brianpWins> Yeah I'm very aware of those differences unforunitly we're being told they want the old p/w's so we're downgrading from the current bcrypt solution to satisfy them.
<stephenjudkins> ....
<stephenjudkins> who is doing the telling?
<mischief> shoot them
<mischief> and shoot any witnesses
<brianpWins> heh
<stephenjudkins> i know this kind of person
<stephenjudkins> they will put *your* head on the chopping block when the password DB is stolen
<Crooky> oh, so if you want to make a page in ruby.. you actually make a whole perl script that prints out the webpage?
<stephenjudkins> first recommendation: tell them to fuck off and quit your job
shikamaru has quit [Ping timeout: 265 seconds]
shtirlic has quit [Read error: Connection reset by peer]
<shevy> Crooky I write a page in ruby. ruby prints out the webpage.
<mischief> NO WAI
<brianpWins> stephenjudkins: I understand where your coming from but it's a decent job and theres lots of plus sides compared to this downside
<Paradox> brianpWins, link them to news stories about last.fm, linkedin, and all the others in this latest hackfest
<shevy> I think Crooky is a bot
shtirlic has joined #ruby
<Paradox> and if they dont, then give a talk at defcon
<Paradox> lol
kenichi has quit [Remote host closed the connection]
<stephenjudkins> second recommendation: explain the deficiencies of using SHA1 passwords in writing, on the record, and have them confirm they take responsibility for possible security breaches
<RBV> Security auditors...ugh
<Paradox> here's a perfect example in terms executives can understand
<Paradox> in 1 second
<Paradox> they can only run 10 bcrypt hash attempts
<Paradox> or
<Paradox> 100,000,000 sha1 attempts
<Paradox> it usually doesn't take 100,000,000 attempts to break a password
<shevy> if people would not have secrets, they would not need encryption
<brianpWins> lol
zaychenok has quit [Quit: Konversation terminated!]
Aaton is now known as Aaton_off
perryh is now known as perryh_away
<deryl> YOur stuff is weak doing it the way you want. If I do it the way you want, there is an EXTREMELY high probability that you will end up on CNN like the Department of Defense did because you had your password db cracked and stolen. Or like the country's credit card companies are right now, Or like Sony did with their playstation network. Is this the kind of PR nightmare you want for the company later because you didn't listen to me NOW?
<Paradox> if thats too complex, let me make a graph
zaychenok has joined #ruby
<shevy> oh noes
<shevy> deryl woke up
<shevy> :)
<deryl> :)
<shevy> wrote more in one sentence than Paradox did the last hour ... :P
<RBV> If you are letting them have 10000000 chances who cares what you're using
<brianpWins> heh
<stephenjudkins> Paradox: the issue is, what do you do if you have a giant user DB with salted SHA1-based passwords already there?
fbernier has joined #ruby
<deryl> if that doesn't scare the bejeebus out of them.. then you really DO need to quit and find a different job, cause they'll find a way later to make it YOUR ass that takes the blame for THEIR stupdity
<Paradox> stephenjudkins, migrate them to bcrypt
<shevy> 10000000 chances!
<Paradox> its not that hard
<stephenjudkins> Paradox: ok, do you try to crack them yourself? or do you add bcrypt on top of SHA1?
<Paradox> and probably takes as long as any other db operation such as a vacuum
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
<stephenjudkins> and, the question then becomes, are your *historical* database dumps also secure?
<deryl> stephenjudkins: i was gonna go there next. :) beat me to it :)
<stephenjudkins> even if you've wiped the insecure hashes from your DB, the backups in S3 or whatever are also a place to mine
caaakeeey has quit [Quit: HydraIRC -> http://www.hydrairc.com <-]