apeiros changed the topic of #ruby to: Ruby 2.0.0-p195: http://ruby-lang.org (Ruby 1.9.3-p429) || Paste >3 lines of text on http://gist.github.com
ntus1017 has quit [Remote host closed the connection]
atmosx has quit [Quit: And so the story goes…]
yshh has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 264 seconds]
freerobby has quit [Ping timeout: 240 seconds]
heftig has quit [Ping timeout: 260 seconds]
s3m73x has quit [Remote host closed the connection]
pcarrier_ has joined #ruby
ehaliewicz has joined #ruby
heftig has joined #ruby
s3m73x has joined #ruby
iamjarvo has joined #ruby
marr has quit [Ping timeout: 256 seconds]
Kar- has quit [Remote host closed the connection]
blitz has quit [Ping timeout: 268 seconds]
RORgasm has joined #ruby
aryaLovesJoel has quit [Ping timeout: 248 seconds]
blitz has joined #ruby
v0n has joined #ruby
serp` has joined #ruby
huoxito has joined #ruby
tomzx_mac has quit [Quit: tomzx_mac]
poga has joined #ruby
RORgasm has quit [Ping timeout: 248 seconds]
ntus1017 has joined #ruby
Xeago has quit [Remote host closed the connection]
aryaLovesJoel has joined #ruby
Xeago has joined #ruby
tomzx_mac has joined #ruby
Hanmac1 has joined #ruby
brennanMKE has quit [Remote host closed the connection]
pcarrier_ has quit [Quit: Computer has gone to sleep.]
IceDragon has quit [Ping timeout: 256 seconds]
IceDragon has joined #ruby
Hanmac has quit [Ping timeout: 268 seconds]
amedeiros has joined #ruby
sailias has joined #ruby
iamjarvo has quit [Quit: Leaving.]
Xeago has quit [Ping timeout: 240 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
mansi has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
truedeity has joined #ruby
krisfremen has quit [Remote host closed the connection]
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
amedeiros has quit [Ping timeout: 268 seconds]
amedeiros has joined #ruby
freerobby has joined #ruby
Speed has quit [Ping timeout: 240 seconds]
n_blownapart has joined #ruby
amedeiros has quit [Ping timeout: 240 seconds]
amedeiros has joined #ruby
brennanMKE has joined #ruby
wallerdev has joined #ruby
slainer68 has quit [Remote host closed the connection]
nicolabe has joined #ruby
takezawa has quit [Remote host closed the connection]
larissa has joined #ruby
tkuchiki has joined #ruby
kenmaz has joined #ruby
jimg has joined #ruby
lewix has joined #ruby
Weems has quit [Ping timeout: 252 seconds]
nicolabe has quit [Read error: Connection reset by peer]
amedeiros has quit [Ping timeout: 268 seconds]
nbe_ has quit [Ping timeout: 245 seconds]
nicolabe has joined #ruby
takezawa has joined #ruby
amedeiros has joined #ruby
takezawa has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
faulkner has quit [Ping timeout: 276 seconds]
kenmaz has quit [Ping timeout: 256 seconds]
sam113101_ has joined #ruby
<sam113101_> test
serp` has quit [Quit: serp`]
<sam113101> looks like it's working
serp` has joined #ruby
hogeo has joined #ruby
bklane has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 268 seconds]
<sam113101> I like it when I do things and it works as expected
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
_Renegade has quit [Quit: _Renegade]
aedorn has quit [Quit: Leaving]
__class__ has quit [Read error: Connection reset by peer]
fermion has joined #ruby
Weems has joined #ruby
_class_ has joined #ruby
Nisstyre-laptop has joined #ruby
nari has quit [Ping timeout: 252 seconds]
Nisstyre-laptop is now known as Nisstyre
_class_ is now known as __class__
jso has quit [Ping timeout: 245 seconds]
nicolabe has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
chipotle_ has joined #ruby
timkohrumel has joined #ruby
jso has joined #ruby
chipotle_ has quit [Excess Flood]
chipotle_ has joined #ruby
chipotle_ has quit [Excess Flood]
buzzybron has joined #ruby
chipotle_ has joined #ruby
chipotle_ has quit [Excess Flood]
chipotle_ has joined #ruby
chipotle_ has quit [Excess Flood]
mansi has quit [Remote host closed the connection]
agjacome has joined #ruby
chipotle_ has joined #ruby
chipotle_ has quit [Excess Flood]
nomenkun has joined #ruby
mansi has joined #ruby
takezawa has joined #ruby
chipotle_ has joined #ruby
chipotle_ has quit [Excess Flood]
truedeity has quit []
Treeson has joined #ruby
serp` has quit [Quit: serp`]
sepp2k has quit [Quit: Leaving.]
timkohrumel has quit [Ping timeout: 245 seconds]
Soliah has joined #ruby
akashj87__ has joined #ruby
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
jimg has quit [Remote host closed the connection]
sam113101 has quit [Quit: WeeChat 0.4.0]
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest14976
chipotle_ has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 245 seconds]
akashj87_ has quit [Ping timeout: 256 seconds]
mfridh has quit [Read error: Operation timed out]
ner0x has joined #ruby
icole has joined #ruby
tspike has joined #ruby
slainer68 has joined #ruby
horofox_ has left #ruby [#ruby]
Nisstyre has quit [Quit: Leaving]
linsy has quit [Ping timeout: 268 seconds]
yshh has joined #ruby
nbe has joined #ruby
gildo has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jonahR has joined #ruby
yacks has quit [Ping timeout: 245 seconds]
sevenseacat has joined #ruby
yacks has joined #ruby
Spooner has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 248 seconds]
<n_blownapart> hi I have a deck of cards class that gets shuffled and dealt. http://pastie.org/8050339 ; Then I have a testing class: http://pastie.org/8050343 ; finally a 3rd file with a 'cardtest' class. I know the require/require_relative/load business is wrong but can't figure out how to get the files to load. thanks
<n_blownapart> 3rd file is http://pastie.org/8050346 sorry ^^
threesome has joined #ruby
davedev24 has joined #ruby
lyanchih has joined #ruby
nfk has quit [Quit: yawn]
nari has joined #ruby
ozzloy_ is now known as ozzloy
ozzloy has quit [Changing host]
ozzloy has joined #ruby
DanKnox_away is now known as DanKnox
Matip has joined #ruby
sam113101_ has quit [Quit: ZNC - http://znc.in]
sam113101 has joined #ruby
<sam113101> test
hamakn has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
kofno has joined #ruby
adkron has quit [Ping timeout: 252 seconds]
Mattx has quit [Ping timeout: 268 seconds]
taoshi has joined #ruby
<taoshi> wow hi
<taoshi> a lot of plp :)
<n_blownapart> sam113101: test test
Tamae has joined #ruby
<taoshi> plp can help whit this? https://github.com/speedlight/warpdrive.git
<taoshi> just the part of the cases.rb i'm trying to print the $damage01xx values..
<taoshi> but im getting:
<taoshi> #<Reactores:0x00000002353ae8>
Sherwyn has joined #ruby
sambao21 has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
adkron has joined #ruby
sambao21 has quit [Client Quit]
<bnagy> taoshi: there's no need to use globals there ( or in fact anywhere tbh )
<bnagy> and you're calling to_s on an instance of a class that doesn't have a specific to_s method, so you just get the default behaviour
<bnagy> which is to give you the class name and the object id
hamakn has joined #ruby
<taoshi> im kind of newbie :)
<bnagy> if you want specific values from the Reactores instances you'll have to get them ( I didn't look at that class )
lewix has quit [Remote host closed the connection]
<taoshi> you mean in the cases.rb.. yea i trying to figureit out how to get just de damage method value
PhilK has quit [Quit: ZNC - http://znc.in]
jesly has quit [Ping timeout: 246 seconds]
maycon has quit [Quit: Saindo]
<bnagy> some_instance.damage
wr has joined #ruby
<taoshi> but that way i get 'wrong number of arguments'
fermion has quit [Quit: Computer has gone to sleep.]
<n_blownapart> hi I have a deck of cards class that gets shuffled and dealt: http://pastie.org/8050339 ; Then I have a testing class: http://pastie.org/8050343 ; finally a 3rd file with a 'cardtest' class: http://pastie.org/8050346. I know the require/require_relative/load business is wrong but I'm confused on how to get the files to load. what is wrong? thanks.
agjacome has quit [Quit: leaving]
GeissT has joined #ruby
<bnagy> oh, yeah damage is a bad name. You can read damageA B C though
<bnagy> n_blownapart: srsly, stop doing that
<bnagy> if nobody answers your question do NOT paste it every fricking 30 mins
<bnagy> we're ALL STILL HERE
freerobby has quit [Quit: Leaving.]
richiebkr has joined #ruby
adkron_ has joined #ruby
<taoshi> bnagy: dont getit :( instance.damage calls the method, i dont have method damageA and so on
sambao21 has joined #ruby
viszu has quit [Read error: Connection reset by peer]
DanKnox is now known as DanKnox_away
<taoshi> bnagy: i dont get how to get the asnwer of the method damage with the arguments that i create the instance
adkron has quit [Ping timeout: 246 seconds]
<bnagy> taoshi: you have a damageA method - it's declared in shorthand by attr_reader
serp` has joined #ruby
Hanmac has joined #ruby
<n_blownapart> bnagy: sorry I'm frustrated and can't see the problem.
jesly has joined #ruby
Domon has joined #ruby
<bnagy> n_blownapart: good for you, princess
<taoshi> oh that was just a test.. i have only the damage method
<bnagy> whether you're frustrated, calm or have antlers doesn't change the fact that it's bad behaviour
pipework has joined #ruby
hawtin has quit [Ping timeout: 252 seconds]
Hanmac1 has quit [Ping timeout: 240 seconds]
sam113101 is now known as sam113101_afk
sam113101_afk is now known as sam113101
n_blownapart has quit [Remote host closed the connection]
ttt has joined #ruby
krisfremen has quit [Read error: Connection reset by peer]
krisfremen has joined #ruby
krisfremen has joined #ruby
fschuindt has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
hoyang has quit [Quit: 离开]
sam113101 is now known as sam113101_afk
<bnagy> taoshi: I can't really see from your code what you even want damage to return, like this is half complete
sam113101_afk is now known as sam113101
<bnagy> but you could have apply_damage damage and damage with no args that returns the current damage
slainer68 has joined #ruby
kenneth has joined #ruby
jokke has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
<taoshi> bnagy: thkz i know is half complete :( and i tried th eother creating a getDamage that just print @damage
jokke has joined #ruby
<taoshi> but now im getting nothing
hadees has joined #ruby
chipotle_ has quit [Quit: cya]
sammmmmmm has joined #ruby
<bnagy> well if damage has not been called @damage will be nil
pcarrier_ has joined #ruby
pcarrier_ has quit [Client Quit]
radic__ has joined #ruby
sam113101 is now known as sam113101_afk
mansi has joined #ruby
<bnagy> taoshi: there's so uch to fix that it's not really clear where to start
sam113101_afk is now known as sam113101
<bnagy> if you started with some tests it might help
Davey has joined #ruby
slyv has joined #ruby
casheew has quit [Read error: Connection reset by peer]
slyv has quit [Max SendQ exceeded]
viszu has joined #ruby
casheew has joined #ruby
fbernier has quit [Quit: ZNC - http://znc.in]
sammmmmmm has quit [Client Quit]
jcromartie has joined #ruby
burlyscudd has quit [Quit: Leaving.]
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
radic_ has quit [Ping timeout: 256 seconds]
slainer68 has quit [Ping timeout: 245 seconds]
<taoshi> i commented out some things
<taoshi> i know it can be refactorized a lot but i dot know many things yet
akashj87__ has quit [Quit: Leaving]
jimg has joined #ruby
vlad_starkov has joined #ruby
<bnagy> don't print @damage, that will return nil
<bnagy> in fact just have attr_reader :damage tbh
<bnagy> and change damage( dmg ) to apply_damage or something
adkron_ has quit [Ping timeout: 240 seconds]
kasper has quit [Remote host closed the connection]
RORgasm has joined #ruby
jimg has quit [Ping timeout: 268 seconds]
mikepack has joined #ruby
jwest has quit [Quit: WeeChat 0.4.0]
<taoshi> and then how i get the value of dmg from an instance?
dorei has quit []
<taoshi> ruby is beatifull btw
<taoshi> beautyfull*
vlad_starkov has quit [Ping timeout: 268 seconds]
<taoshi> aa
icole_ has joined #ruby
shime_ has quit [Remote host closed the connection]
milardovich has quit [Quit: Leaving]
<taoshi> sorry english is not my native lang
brianherman has quit [Read error: Connection reset by peer]
<taoshi> XD
icole has quit [Ping timeout: 268 seconds]
amedeiros has joined #ruby
<bnagy> reactor1.apply_damage 30; reactor1.damage => 70
FDj has quit [Read error: Connection reset by peer]
FDj has joined #ruby
<`p> those new to ruby theres a rubynoobs irc channel we collaborate share explain stuff to each other really active channel
<`p> #rubynoobs
Guga_ has quit [Disconnected by services]
Gugster has joined #ruby
jcromartie has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<taoshi> thankz `p
<`p> you're welcome, i was specifically directing that to you actually : |
<taoshi> haha i know
RORgasm has quit [Ping timeout: 252 seconds]
Sherwyn has quit [Ping timeout: 264 seconds]
adkron has joined #ruby
amedeiros has quit [Ping timeout: 248 seconds]
Nisstyre has joined #ruby
machuga|away is now known as machuga
amedeiros has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
<taoshi> bnagy: im trying to pass 2 args in the instance creation, name and damage.. and in the initialize i get the values, then damage is passed to the apply_damage
billy_ran_away has quit [Ping timeout: 245 seconds]
kstephens has quit [Ping timeout: 245 seconds]
Davey has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
adkron_ has joined #ruby
<bnagy> taoshi: don't you need a starting damage before you can apply damage to it?
kstephens has joined #ruby
krisfremen has quit [Read error: Connection reset by peer]
krisfremen has joined #ruby
krisfremen has joined #ruby
macmartine has quit [Ping timeout: 245 seconds]
queequeg1 has quit [Ping timeout: 245 seconds]
thoraxe has quit [Ping timeout: 245 seconds]
pietr0 has quit [Ping timeout: 245 seconds]
<taoshi> i.e.
<bnagy> then set that in initialize, not through the apply_damage method
pietr0 has joined #ruby
queequeg1 has joined #ruby
billy_ran_away has joined #ruby
jcromartie has joined #ruby
<taoshi> yes thats why i have damage01A = Reactor.new 'a' '40'
<taoshi> in th einitlize i have @damage = damage
GeissT_ has joined #ruby
ssvo has joined #ruby
thoraxe has joined #ruby
adkron has quit [Ping timeout: 248 seconds]
davidcelis has quit [Ping timeout: 264 seconds]
amedeiros has quit [Ping timeout: 245 seconds]
<taoshi> and the method apply_damage damage
<taoshi> or dmg as the arg to not confuse ;)
GeissT has quit [Ping timeout: 245 seconds]
amedeiros has joined #ruby
davidcelis has joined #ruby
<jcromartie> hey, I am looking to cram for a Ruby technical screening tomorrow
<jcromartie> what's good for that?
adkron has joined #ruby
Davey has joined #ruby
<jcromartie> I've done Ruby for a long time, but I'm not super up to date with 1.9 and latest and greatest Rails/gems
adkron_ has quit [Ping timeout: 276 seconds]
<bnagy> if you're not up to date with 1.9 that's an issue
<bnagy> 1.8 is ancient
slyv_ has joined #ruby
<taoshi> oh hell i geit to work!
<jcromartie> for sure
kasper has joined #ruby
<taoshi> thankz a lot bnagy
gildo has quit [Ping timeout: 268 seconds]
<jcromartie> bnagy: well, let me see exactly how "not up to date" I am
amedeiros has quit [Ping timeout: 240 seconds]
<jcromartie> (BTW OS X still comes stock with 1.8.7)
PhilK has joined #ruby
icole_ has quit [Read error: Connection timed out]
<bnagy> well yeah, but there's alllll kinds of stuff wrong with OSX's unix side by default
amedeiros has joined #ruby
wharfrat has joined #ruby
icole has joined #ruby
kadoo has joined #ruby
adkron_ has joined #ruby
<jcromartie> it's not perfect, but it gets the job done
<jcromartie> I'm not running any production servers on OS X :)
krisfremen has quit [Ping timeout: 256 seconds]
adkron has quit [Ping timeout: 245 seconds]
slyv_ is now known as slyv
<havenn_> jcromartie: Just an aside, but OS 10.9's system Ruby is 2.0.0-p195. Yay! :)
havenn_ is now known as havenwood
<jcromartie> dang, ahead of the curve
adkron has joined #ruby
<jcromartie> I don't have any servers running 2.0
<jcromartie> or I should say apps
amedeiros has quit [Ping timeout: 256 seconds]
<havenwood> jcromartie: Seems the only 2.0 issues I run into are on OS X, works great in production! >.>
nalaginrut has joined #ruby
L8D has joined #ruby
<L8D> How should I ago about creating classes within classes?
amedeiros has joined #ruby
ssvo has quit [Ping timeout: 276 seconds]
<L8D> I want to do something like: MyClass.pos.x
lyanchih has quit [Quit: lyanchih]
krisfremen has joined #ruby
krisfremen has joined #ruby
krisfremen has quit [Changing host]
negative273 has joined #ruby
randomnick has quit [Remote host closed the connection]
adkron__ has joined #ruby
Levin_22 has joined #ruby
adkron___ has joined #ruby
<jcromartie> L8D: you mean you want a class variable?
amedeiros has quit [Ping timeout: 240 seconds]
<havenwood> L8D: CamelCaseClassNames::DoubleColonForNamspace.period_for_method
<havenwood> Namespace*
adkron has quit [Ping timeout: 264 seconds]
amedeiros has joined #ruby
adkron_ has quit [Ping timeout: 252 seconds]
<jcromartie> L8D: (and modules act as namespaces)
<r0bgleeson> you can nest classes too if you want
<r0bgleeson> >> class Foo; class Bar; end; end; Foo::Bar
<eval-in> r0bgleeson => Foo::Bar (https://eval.in/33730)
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adkron has joined #ruby
adkron_ has joined #ruby
<jcromartie> although generally in OO design the purpose of an inner/nested class is for internal details relevant to the enclosing class only
adkron__ has quit [Ping timeout: 245 seconds]
adkron___ has quit [Ping timeout: 248 seconds]
<pontiki> ubuntu is still at 1.8.7, too
<r0bgleeson> jcromartie: you can say the same about a module containing other classes.
tylersmith has quit [Remote host closed the connection]
<jcromartie> r0bgleeson: why?
<jcromartie> modules are intended to be used as namespaces, no?
lewix has joined #ruby
<r0bgleeson> yeah, sometimes, but classes can act fine as a namespace. pry for example uses 'Pry'(a class) as its namespace.
<pontiki> jcromartie: no, public classes inside other public classes are just as public
amedeiros has quit [Ping timeout: 240 seconds]
<pontiki> a class does not hide internal classes
<r0bgleeson> if there is no need for 'Pry' to be a class, I'd make it a module.
mikepack has quit [Remote host closed the connection]
byprdct has joined #ruby
<r0bgleeson> pontiki: not without private_constant :d
splvenky has joined #ruby
<jcromartie> pontiki: I'm not talking about access modifiers, just typical OO design, but I guess if it's conventional to use classes as namespaces then go nuts
<r0bgleeson> it's not conventional
<r0bgleeson> but it's not a bad design choice either
<jcromartie> eh
wr has quit [Quit: Leaving]
<r0bgleeson> sometimes it makes more sense to use class instead of module
lewix has quit [Ping timeout: 276 seconds]
kasper has quit [Remote host closed the connection]
<r0bgleeson> if you don't need a class use a module is my general rule of thumb for that type of stuff
mikepack has joined #ruby
kasper has joined #ruby
<pontiki> If you can do module Foo; class Bar; end ;end
<havenwood> jcromartie: I think its fine to do so when you want to namespace on a constant that you also need to instantiate. For sure modules for namespacing is the way more common case.
happyvenky has joined #ruby
<pontiki> and do Foo::Bar
lyanchih has joined #ruby
Gugster has quit [Quit: ~]
<pontiki> why do you think you couldn't do module Foo; class Bar; class Baz; end; end; end, and then Foo::Bar::Baz?
danslo has joined #ruby
<r0bgleeson> pontiki: i understand his point, he is saying (normally) an inner class might be a helper class, you _could_ make it private if you wanted to (at least >= 1.9.3)
<pontiki> sure you could
<pontiki> i could think a few reasons why that may be
<pontiki> but it's not a given
<r0bgleeson> yeah true
wharfrat has quit [Quit: leaving]
splvenky has quit [Ping timeout: 256 seconds]
<jcromartie> I'm NOT talking about access modifiers
<jcromartie> I'm just talking about API design
kasper has quit [Ping timeout: 252 seconds]
<jcromartie> not really even any reason to make it private
<pontiki> you can design your API to whatever depth you need
<pontiki> you need to fulfill it's contract
<r0bgleeson> (with classes or modules)
chimkan has joined #ruby
<r0bgleeson> and don't forget, a class _is_ a module
<r0bgleeson> it inherits from Module
<jcromartie> sure thing
<pontiki> exactly
<havenwood> Made a little PStore wrapper gem for stupid-simple persisting of Ruby objects. Guess I shoulda made it a class not a module and made YAML::Store an option... Curious for any feedback though: http://havenwood.github.io/persist/
brennanMKE has quit [Remote host closed the connection]
geoffrey has joined #ruby
<pontiki> actually, havenwood, the way you've done it seems fine.
<pontiki> more complex needs a body can just use PStore itself, really
<pontiki> i think dead simple wrappers are pretty useful
richiebkr has quit [Quit: richiebkr]
ner0x has quit [Quit: Leaving]
richiebkr has joined #ruby
slyv has quit [Quit: Textual IRC Client: www.textualapp.com]
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
chipotle_ has joined #ruby
Treeson has quit [Ping timeout: 252 seconds]
geoffrey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
burlyscudd has joined #ruby
<havenwood> pontiki: Yay, glad you think so! I was worried it was too trivial a difference from PStore to be worth doing. I guess the hope would be to be useful for someone who'd never seen PStore and wasn't doing fancy things.
Shirakawasuna has quit [Ping timeout: 245 seconds]
io_syl has quit [Ping timeout: 252 seconds]
Opettaja has quit [Quit: WeeChat 0.4.1]
kadoo has joined #ruby
kadoo has quit [Client Quit]
Opettaja has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
burlyscudd has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Quit:]
vlad_starkov has joined #ruby
chipotle_ has quit [Quit: cya]
<havenwood> Did an almost identical syntax one for Ruby objects to Redis: https://github.com/Havenwood/bindi#readme
gearahol_ has joined #ruby
<havenwood> I need to take a page from r0bgleeson's book and add instructions for MessagePack with Bindi. :)
mduvall has quit [Quit: mduvall]
<havenwood> I wanna actually use MessagePack for something. Seems awesome I just haven't had a chance.
lyanchih has quit [Quit: lyanchih]
<havenwood> Wrap ALL THE THINGS! \o/
vlad_starkov has quit [Ping timeout: 252 seconds]
cj3kim has joined #ruby
thams has joined #ruby
ssvo has joined #ruby
IceDragon has quit [Quit: Space~~~]
sailias has quit [Ping timeout: 264 seconds]
aspiers has quit [Ping timeout: 245 seconds]
cj3kim has quit [Remote host closed the connection]
lyanchih has joined #ruby
aspiers has joined #ruby
<r0bgleeson> havenwood: bindi looks cool
tommyvyo has joined #ruby
<havenwood> r0bgleeson: I kinda code spiked it and left it in dire need of some love. I need to write test coverage... >.> and maybe go straight through the redis gem instead of ohm.
buzzybron has quit []
v0n has quit [Ping timeout: 240 seconds]
kofno has quit [Ping timeout: 256 seconds]
viszu has quit [Quit: Leaving.]
<r0bgleeson> havenwood: yeah… i don't know much about ohm
<r0bgleeson> i wouldn't think you'd need anything but the redis library
<r0bgleeson> it's a really good library
paissad_ has quit [Quit: This computer has gone to sleep]
buzzybron has joined #ruby
<havenwood> r0bgleeson: Yeah, I'm kinda using Ohm for no good reason since I'm not using its ORM stuff at all.
<r0bgleeson> havenwood: i used the redis docs (redis.io) and everything mapped cleanly to the ruby redis library
paissad_ has joined #ruby
<havenwood> r0bgleeson: Simple benchmarks of serializing to Redis versus PStore or YAML::Store were crazy favorable to Redis, of course.
<r0bgleeson> what does YAML::Store use?
<r0bgleeson> filesystem as well?
<havenwood> r0bgleeson: Nice, I'll look at that and convert it over.
<havenwood> r0bgleeson: Yup, same.
negative273 has quit [Ping timeout: 245 seconds]
happyvenky has quit [Ping timeout: 264 seconds]
redgirl has joined #ruby
kofno has joined #ruby
Inside has joined #ruby
<Inside> so.. weird question
lyanchih has quit [Quit: lyanchih]
<Inside> if I have an erm.. static method and then within that method I declare a small helper function
<Inside> why does helper function need to be self.func_name
<Inside> I thought its scope is local to the inside of that class?
<Inside> erm, inside of that static method
freerobby has joined #ruby
aetaric has quit [Ping timeout: 260 seconds]
lyanchih has joined #ruby
subbyyy has quit [Ping timeout: 264 seconds]
<r0bgleeson> Inside: code please?
aetaric has joined #ruby
<Inside> r0bgleeson: http://codepad.org/ndc2kAHb
<Inside> line 15
<Inside> error before the addition of "self" was this: PDFReceiver.rb:112:in `block (2 levels) in mergeBOMs': undefined method `sym_app
<Inside> end' for BOMMaker:Class (NoMethodError)
<r0bgleeson> Inside: use define_method
jesly has quit [Ping timeout: 260 seconds]
<r0bgleeson> Inside: 'static' method is 'class method' in ruby
<Inside> huh, first I hear of that
<Inside> ah class method, that's what I thought
<r0bgleeson> gf stuff
<r0bgleeson> bbl
<Inside> ty, ty
treehau55 has joined #ruby
kil0byte has quit [Remote host closed the connection]
hawtin has joined #ruby
jesly has joined #ruby
jcromartie has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iamjarvo has joined #ruby
richiebkr has quit [Quit: richiebkr]
davedev24 has quit [Remote host closed the connection]
JumpMast3r has joined #ruby
banisterfiend has quit [Ping timeout: 264 seconds]
syamajala has joined #ruby
beilabs_ has quit [Ping timeout: 248 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
adkron__ has joined #ruby
poga has quit [Remote host closed the connection]
<Inside> hmmm
<Inside> I don't see why def doesn't work in this case at all :(
<r0bgleeson> Inside: when you want to define a method at runtime you should use define_method, it is a method itself, so you would say define_method(:some_name) { body }
adkron has quit [Ping timeout: 246 seconds]
<Inside> I mean I guess this doesn't have to a function created at run-time, I just wanted to place it close to where its gets used.
sambao21 has joined #ruby
adkron_ has quit [Ping timeout: 240 seconds]
<r0bgleeson> that works as well
* Inside flops.
tylersmith has joined #ruby
adkron has joined #ruby
io_syl has joined #ruby
<treehau55> i have a question about making a cli program
<treehau55> i want to just pass in the name of my program and the options
eldariof has joined #ruby
chipotle_ has joined #ruby
<r0bgleeson> treehau55: the options are available in ARGV, it is array
<Inside> you want to get the value of the arguments?
<Inside> it's ARGV, as r0bgleeson said
<treehau55> are you guys familiar with the pickaxe book?
k-man has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
<pontiki> treehau55: look at thor, methadone, GLI, even rake
k-man has joined #ruby
cyong has joined #ruby
<treehau55> so I have a ruby shebang set up in a file inside of a bin, it only works from the command line by name if I move it to /usr/bin, but how do other ruby programs do it so that it just works from gems installed from say the home directory. do I have to make it a gem myself?
<havenwood> treehau55: /usr/bin is in your PATH, as is your gem directory
<pontiki> treehau55: it should be set executable and placed someone on your PATH
<pontiki> if you have craeted it as a gem, you should be just need to install it
<treehau55> okay so in the future if I want other people to be able to use my program I should probably make it a gem, then if they install it as a gem, they will have it available to their cli, correct?
<treehau55> i wnat to avoid having to have users modify their path
mduvall has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
beilabs_ has joined #ruby
banghouse has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 252 seconds]
lyanchih has quit [Quit: lyanchih]
cads has quit [Quit: Leaving]
<treehau55> ive searched and found those as well, thank you
<gearahol_> treehau55: you need to create a executable for your gem
<sevenseacat> pragprog published a whole book on writing command line apps in ruby :p
chipotle_ has quit [Quit: cya]
pipework has quit [Remote host closed the connection]
boblu has joined #ruby
mduvall has quit [Quit: mduvall]
iamjarvo has quit [Quit: Leaving.]
syamajala has quit [Quit: leaving]
jarin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
burlyscudd has joined #ruby
Levin_22 has quit [Quit: Levin_22]
westoque has joined #ruby
chimkan has quit [Quit: chimkan]
<pontiki> it's a pretty good book
<pontiki> if a little breathless :)
<pontiki> i've been using methadone a fair bit
icecandy has joined #ruby
<pontiki> (it's by the guy who wrote the pragpog book Awesome Command-Line Applications
burlyscudd has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby
jimg has joined #ruby
subbyyy has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
RORgasm has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
lewix has joined #ruby
jesly has quit [Ping timeout: 245 seconds]
RORgasm has quit [Ping timeout: 276 seconds]
tatsuya_o has joined #ruby
BizarreCake has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
sambao21 has quit [Quit: Computer has gone to sleep.]
tatsuya_o has quit [Ping timeout: 246 seconds]
butblack has joined #ruby
brennanMKE has joined #ruby
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
ivanoats has joined #ruby
kadoo has joined #ruby
tw1sted has quit [Quit: tw1sted]
Davey has quit [Quit: Computer has gone to sleep.]
westoque has quit [Quit: westoque]
apeiros has quit [Remote host closed the connection]
bionhart has joined #ruby
apeiros has joined #ruby
adkron has quit [Ping timeout: 260 seconds]
icole has quit [Remote host closed the connection]
khopkins218 has joined #ruby
Domon has quit [Remote host closed the connection]
khopkins218 has quit [Client Quit]
Domon has joined #ruby
codezombie has quit [Read error: Connection reset by peer]
negative273 has joined #ruby
Domon has quit [Remote host closed the connection]
i8igmac has quit [Quit: Leaving]
sayan has joined #ruby
jalcine has quit [Excess Flood]
kadoo has quit [Ping timeout: 256 seconds]
akells` has quit [Remote host closed the connection]
akells` has joined #ruby
Inside has quit [Ping timeout: 252 seconds]
generalissimo has joined #ruby
slainer68 has joined #ruby
L8D has quit [Read error: Connection reset by peer]
krz has joined #ruby
Tectonic has quit [Quit: Tectonic]
jonahR has quit [Quit: jonahR]
kadoo has joined #ruby
<treehau55> do most ruby apps have a "runner"
icole has joined #ruby
akells` has quit [Ping timeout: 268 seconds]
ARCADIVS has joined #ruby
macmartine has joined #ruby
<pontiki> it would be much of an app if you couldn't run it...
sambao21 has joined #ruby
DanKnox_away is now known as DanKnox
slainer68 has quit [Ping timeout: 246 seconds]
<r0bgleeson> treehau55: if you can't run it then it becomes an API?
jonahR has joined #ruby
jalcine_ has joined #ruby
beilabs_ has quit [Ping timeout: 246 seconds]
lewix has quit [Read error: Connection reset by peer]
<pontiki> by API you mean library?
lewix has joined #ruby
tylersmith has joined #ruby
freerobby has quit [Quit: Leaving.]
sayan has quit [Ping timeout: 248 seconds]
juarlex has quit [Ping timeout: 252 seconds]
antuirno_ has joined #ruby
wesside has quit [Quit: I think I heard an ice cream truck..]
antuirno_ has quit [Client Quit]
JumpMast3r has quit [Quit: JumpMast3r]
<r0bgleeson> pontiki: yeah
juarlex has joined #ruby
_Andres has joined #ruby
eldariof has quit [Ping timeout: 245 seconds]
<treehau55> i mean is it convention to have a file called runner.rb and have that be executed in your bin executable?
jimg has quit [Remote host closed the connection]
<pontiki> not particularly that name, no
<pontiki> and not with an .rb extension, either from what i've seen
<r0bgleeson> it should be unique as possible
<r0bgleeson> your project name would work
<pontiki> that
<pontiki> like say you start your development doing `bundle gem my_cool_app`
<pontiki> that will create the directory structure
tylersmith has quit [Ping timeout: 252 seconds]
lyanchih has joined #ruby
<pontiki> but then you still need the bin, and inside that what makes sense is a #!/usr/bin/env ruby file called just my_cool_app
<treehau55> okay
<treehau55> so I have another problem the classes Date and Time don't seem to be compatible
<treehau55> so I can't do Date.new(Time.now)
mikepack has quit [Remote host closed the connection]
nomenkun has joined #ruby
<treehau55> is there a way to normalize their file formats to make them both use UTF
beilabs_ has joined #ruby
<r0bgleeson> treehau55: use Time#to_date.
<r0bgleeson> time? file formats? UTF-8? confused.
jesly has joined #ruby
kofno has quit [Remote host closed the connection]
DanKnox is now known as DanKnox_away
Weems has quit [Ping timeout: 276 seconds]
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<treehau55> r0bgleeson, im confused too, there seems to be a Time referenced by Date, and then a whole nother seperate Time class
tonini has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
<treehau55> trying to figure out where sec_fraction is coming from in the Time source code, that could be just what I need
tspike has quit [Ping timeout: 268 seconds]
<r0bgleeson> treehau55: Time & Date are two separate classes, yeah, Date is not concerned about hours & minutes.
DomKM has quit [Quit: Leaving.]
burlyscudd has joined #ruby
Weems has joined #ruby
x1337807x has joined #ruby
marcdel has joined #ruby
maroloccio has joined #ruby
apeiros has quit [Remote host closed the connection]
sayan has joined #ruby
danslo has quit [Quit: danslo]
<treehau55> man aruba is great for cucumber testing a cli app
beilabs_ has quit [Ping timeout: 240 seconds]
chrishough has joined #ruby
chrishough has quit [Client Quit]
chrishough has joined #ruby
<pontiki> yes it is
<treehau55> although not quite sure why its not picking up my puts statement, its definitely coming out to the terminal
burlyscudd has quit [Ping timeout: 264 seconds]
negative273 has quit [Ping timeout: 268 seconds]
<treehau55> Then /^I should see "(.*?)"$/ do |arg| assert_partial_output(arg, all_output) end
EPIK has quit [Ping timeout: 245 seconds]
marcdel has quit [Quit: Textual IRC Client: www.textualapp.com]
bklane has joined #ruby
<pontiki> it's coming out to the terminal while you're running cucumber?
kadoo has joined #ruby
Zespre has quit [Ping timeout: 248 seconds]
bubbajones has quit [Ping timeout: 252 seconds]
Zespre has joined #ruby
<treehau55> yeah
nomenkun has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
tatsuya_o has joined #ruby
Domon has joined #ruby
tommyvyo has quit [Quit:]
Opettaja has quit [Ping timeout: 245 seconds]
nomenkun has quit [Ping timeout: 260 seconds]
tatsuya_o has quit [Ping timeout: 245 seconds]
beilabs_ has joined #ruby
Zespre has quit [Ping timeout: 240 seconds]
boblu has quit [Ping timeout: 252 seconds]
mfridh has joined #ruby
Zespre has joined #ruby
serp` has quit [Quit: serp`]
cyong has quit [Quit: Leaving.]
jalcine_ is now known as jalcine
bubbajones has joined #ruby
dash_ has joined #ruby
treehau55 has quit [Ping timeout: 245 seconds]
L8D has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kadoo has joined #ruby
Zespre has quit [Ping timeout: 264 seconds]
gearahol_ has left #ruby [#ruby]
Apane has quit [Ping timeout: 268 seconds]
kofno has joined #ruby
Zespre has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
slainer68 has joined #ruby
stayarrr has joined #ruby
dormiens has joined #ruby
Zespre has quit [Ping timeout: 256 seconds]
Zespre has joined #ruby
tagrudev has joined #ruby
mansi has quit [Ping timeout: 268 seconds]
slainer68 has quit [Ping timeout: 264 seconds]
kofno has quit [Ping timeout: 256 seconds]
Shirakawasuna has joined #ruby
asgardBSD has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
workmad3 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 268 seconds]
lusory has joined #ruby
redgirl has quit [Quit: This computer has gone to sleep]
Zespre_ has quit [Ping timeout: 256 seconds]
ananthakumaran has joined #ruby
Zespre has joined #ruby
akells` has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
fomatin has joined #ruby
fomatin has quit [Client Quit]
girija has joined #ruby
relix has joined #ruby
butblack has left #ruby [#ruby]
codecop has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
kenneth has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
Shirakawasuna has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
akells` has quit [Ping timeout: 245 seconds]
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
aedornm has quit [Quit: Leaving]
tylersmith has joined #ruby
jalcine has quit [Excess Flood]
aganov has joined #ruby
DonRichie has joined #ruby
Zespre_ has quit [Ping timeout: 264 seconds]
tylersmith has quit [Ping timeout: 245 seconds]
Zespre has joined #ruby
faulkner has joined #ruby
Domon has quit [Remote host closed the connection]
freerobby has joined #ruby
Domon has joined #ruby
blaxter has joined #ruby
ssvo has quit [Ping timeout: 240 seconds]
DanKnox_away is now known as DanKnox
ivanoats has quit [Remote host closed the connection]
stayarrr has quit [Quit: Leaving...]
larissa has quit [Quit: Leaving]
scrollback has quit [Remote host closed the connection]
scrollback has joined #ruby
Zespre has quit [Ping timeout: 256 seconds]
Zespre has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
beilabs_ has quit [Ping timeout: 245 seconds]
tonini has quit [Quit: Lost terminal]
burlyscudd has joined #ruby
jimg has joined #ruby
girija has quit [Ping timeout: 268 seconds]
ttt has quit [Remote host closed the connection]
negative273 has joined #ruby
ttt has joined #ruby
emmanuelux has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Ping timeout: 245 seconds]
Zespre has quit [Ping timeout: 240 seconds]
Zespre has joined #ruby
jimg has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
eighty4 has joined #ruby
RORgasm has joined #ruby
<L8D> Um...I'm having a problem...
<L8D> In my class I have a function that goes like:
jimg has joined #ruby
<L8D> def clone; clone = self; clone.parent_id = self.id;return clone; end
<L8D> And whenever I use it, it causes both the clone and original objects to have the parent_id
<L8D> Actually, Both the clone and the original share the exact same object_id
<hackeron> is there a ruby way to check how full a filesystem is in percentage?
negative273 has quit [Quit: Leaving]
<sevenseacat> because youre just returning self from clone
<sevenseacat> not actually cloning anything
<L8D> `df`.split(" ")[12]
<sevenseacat> do you mean clone = self.clone ?
binw__ has joined #ruby
<sevenseacat> or self.dup
<L8D> `df`.split(" ")[11]
vlad_starkov has joined #ruby
<L8D> Ooh, haven't seen self.dup
Zespre has quit [Ping timeout: 256 seconds]
* L8D plays checks if he can/should use self.dup
<L8D> checks*
<L8D> :s/plays //g
RORgasm has quit [Ping timeout: 268 seconds]
andikr has joined #ruby
Zespre has joined #ruby
braoru has joined #ruby
ayaz has joined #ruby
beilabs_ has joined #ruby
<L8D> self.dup fixed the sharing-the-same id problem, but I still have 'clone.parent_id = self.id' setting both self and clone
<L8D> 's parent_ids
<L8D> Is that intended behaivour?
jimg has quit [Remote host closed the connection]
ChristianS has quit [Excess Flood]
brennanMKE has quit [Remote host closed the connection]
<L8D> hackeron: `df`.split(" ")[11]
ChristianS has joined #ruby
binw_ has quit [Ping timeout: 252 seconds]
Shirakawasuna has joined #ruby
jdunck has joined #ruby
<L8D> Or better yet: `df`.split(" ")[11].to_i
mduvall has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
<L8D> Nevermind, it did fix it
<hackeron> L8D: I meant a ruby way, not running a linux process - preferably something platform independent
<L8D> Okay...
tomzx_mac has quit [Ping timeout: 268 seconds]
<hackeron> L8D: also that shows me percentage on ubuntu but not on mac osx
<L8D> what do you get on mac? o.O
tonini has joined #ruby
<hackeron> irb(main):001:0> `df`.split(" ")[11]
<hackeron> => "248390464"
<L8D> Try 12 then...
Zespre has quit [Ping timeout: 252 seconds]
<hackeron> L8D: I won't it to work on both mac and linux reliably, but also no: irb(main):002:0> `df`.split(" ")[12]
Zespre has joined #ruby
<hackeron> => "222573016"
saarinen has joined #ruby
<L8D> Try 13...
<L8D> Hm...
<hackeron> lol, funny man
<L8D> Yes, I understand you need it cross-platform...
<L8D> hackeron: Well, if you want it to work cross platform, you're going to have to end up scanning the entire hard drive and gaining a sum of every file's size.
<hackeron> I can see a gem sys-filesystem which lets me do something like mb_available = stat.block_size * stat.blocks_available / 1024 / 1024 -- to get amount of MB available, but can't see a way to get the total number of MB available to calculate a percentage
bubbajones has quit [Ping timeout: 276 seconds]
breadtk has quit [Read error: Operation timed out]
RORgasm has joined #ruby
cj3kim has joined #ruby
<L8D> Whereas using something like sys-filesystem or the system command `df`, which use the systems built-in monitoring system.
girija has joined #ruby
<L8D> So either not use a gem, and just regex df to find the %, or use sys-filesystem in an obscure manor.
bigkevmcd has joined #ruby
<hackeron> well, how do I get the total number of MB with sys-filesystem?
Zespre has quit [Ping timeout: 245 seconds]
<L8D> I'm not sure...
mduvall has quit [Quit: mduvall]
rrecio has joined #ruby
Zespre has joined #ruby
breadtk has joined #ruby
bubbajones has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
Jackneill has joined #ruby
RORgasm has quit [Ping timeout: 268 seconds]
subbyyy has quit [Ping timeout: 264 seconds]
Zespre has quit [Ping timeout: 240 seconds]
mafolz has joined #ruby
jarin has joined #ruby
Zespre has joined #ruby
beilabs_ has quit [Ping timeout: 268 seconds]
bubbajones has quit [Ping timeout: 256 seconds]
jarin has quit [Client Quit]
burlyscudd has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<rrecio> Other day I went to a quora page which subject was why don't google use ruby? They were mostly saying its because of higher cost of infrastructure. What you guys think about that?
<rrecio> (..) and because ruby is slow.
sambao21 has quit [Quit: Computer has gone to sleep.]
hogeo has quit [Remote host closed the connection]
Zespre has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Ping timeout: 264 seconds]
Zespre has joined #ruby
<sevenseacat> i think it's misinformed.
blaxter has quit [Ping timeout: 240 seconds]
<r0bgleeson> rrecio: there's some truth in it
<r0bgleeson> rrecio: but it isn't really that simple
rrecio_ has joined #ruby
mansi has joined #ruby
saarinen has quit [Quit: saarinen]
<r0bgleeson> rrecio: the focus of ruby is developer happiness & productivity, there's some trade offs to pay for that.
oceanbreeze has joined #ruby
Zespre has quit [Ping timeout: 260 seconds]
beilabs_ has joined #ruby
rrecio has quit [Ping timeout: 245 seconds]
rrecio_ is now known as rrecio
richiebkr has joined #ruby
Zespre has joined #ruby
mansi has quit [Ping timeout: 256 seconds]
jarin has joined #ruby
filipe has joined #ruby
<oceanbreeze> Hello guys. I am looking at the source code of an application, and found this expression class_eval <<-RUBY, __FILE__, __LINE__+1 i dont really understand, can you explain to me please
dr_bob has joined #ruby
krz has quit [Ping timeout: 245 seconds]
saarinen has joined #ruby
<hackeron> anyone knows how do I get the total number of megabytes on the filesystem with sys-filesystem?
<r0bgleeson> oceanbreeze: are you confused about __FILE__ and __LINE__ stuff or class_eval in general?
linsy has joined #ruby
jimg has joined #ruby
krz has joined #ruby
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 256 seconds]
blaxter has joined #ruby
<oceanbreeze> whole expression
tonini has quit [Quit: Lost terminal]
spike|spiegel has quit [Quit: WeeChat 0.4.1]
io_syl has quit [Ping timeout: 248 seconds]
<r0bgleeson> oceanbreeze: there's a lot of different parts to explain but to give you a short answer it evaluates a string in the context of a class or module.
<jarin> oceanbreeze: It's adding methods to a class, and the __FILE__ and __LINE__+1 let it know what line number and file to output if there are any errors
tylersmith has joined #ruby
<jarin> Er r0bgleeson is more correct than me about the first part
persand has joined #ruby
io_syl has joined #ruby
<jarin> But yeah you need the __FILE__ and __LINE__+1 because it doesn't know where it's at until you actually put that module into a class
<jarin> So without that you will not get very good error messages
<jarin> At least that is my understanding of it
redgirl has joined #ruby
bubbajones has joined #ruby
jalcine has joined #ruby
Zespre_ has quit [Ping timeout: 248 seconds]
jacobw has quit [Quit: WeeChat 0.4.0]
Zespre has joined #ruby
sayan has joined #ruby
<jarin> Without it you will get errors like: # (eval):1:in `name': undefined local variable or method `undefined_method' for # (NameError)
alanjc has quit [Ping timeout: 260 seconds]
dormiens is now known as alanjc
<jarin> With it, it will look like: # foo.rb:3:in `name': undefined local variable or method `undefined_method' for # (NameError)
tylersmith has quit [Ping timeout: 245 seconds]
jesly has quit [Quit: Leaving.]
jimg has quit [Remote host closed the connection]
richiebkr has quit [Quit: richiebkr]
dhruvasagar has joined #ruby
<r0bgleeson> jarin: it sets __FILE__ and __LINE__ in the enclosing string or block as well, i think that is also important (besides the error reporting stuff)
<oceanbreeze> Aha, and _FILE_ is a refference to a file object? And _LINE_ is a refference to line in that _FILE_ object?
<oceanbreeze> So i case error will occure, error will be written in line of file? :)
<r0bgleeson> __FILE__ is just a string
<r0bgleeson> __LINE__ is a fixnum
dormiens has joined #ruby
<r0bgleeson> oceanbreeze: in the backtrace, the file(path) and line number will be used
jprovazn has joined #ruby
<jarin> r0bgleeson: Ah ok I didn't know about that part, that is also important :)
zigomir has joined #ruby
m8 has joined #ruby
<rrecio> What about the -RUBY part?
jds has joined #ruby
<rrecio> What is this
<r0bgleeson> that's a doc string
<r0bgleeson> erh
<r0bgleeson> sorry
<r0bgleeson> heredoc
<r0bgleeson> just syntax for a multi-line string
tvw has joined #ruby
<jarin> I never understood what the advantage of evaluating it as a string was, I guess string interpolation is useful in that case
bubbajones has quit [Ping timeout: 252 seconds]
Zespre has quit [Ping timeout: 256 seconds]
<jarin> ok yeah never mind I get it now
<r0bgleeson> jarin: it is actually done for performance reasons, string is cheaper than proc
<jarin> Ah ok nice
<r0bgleeson> looks ugly as hell though
<jarin> Always much to learn in metaprogramming haha
Zespre has joined #ruby
huoxito has quit [Quit: Leaving]
<r0bgleeson> metaprogramming can end up confusing
<r0bgleeson> i try to use it sparingly
arturaz has joined #ruby
tonini has joined #ruby
saarinen has quit [Quit: saarinen]
kadoo has joined #ruby
senayar has joined #ruby
fridim_ has quit [Ping timeout: 246 seconds]
Zespre_ has joined #ruby
<Paradox> yo dawg we heard you like programming so we put some ruby in your ruby so you can make programs with your programs
Zespre has quit [Ping timeout: 264 seconds]
<rrecio> ... and that's how the matrix was created.
kasper has joined #ruby
kadoo has quit [Ping timeout: 268 seconds]
<oceanbreeze> haha
airtonix has quit [Ping timeout: 264 seconds]
Zespre has joined #ruby
Zespre_ has quit [Ping timeout: 245 seconds]
banghouse has joined #ruby
boblu has joined #ruby
banghouse is now known as Guest34910
richiebkr has joined #ruby
richiebkr has quit [Client Quit]
Guest34910 has quit [Remote host closed the connection]
airtonix has joined #ruby
Domon has quit [Remote host closed the connection]
kpwz has quit [Ping timeout: 252 seconds]
kpwz has joined #ruby
Zespre has quit [Ping timeout: 248 seconds]
echevemaster is now known as echevemaster_afk
Zespre has joined #ruby
Domon has joined #ruby
bubbajones has joined #ruby
threesome has quit [Ping timeout: 245 seconds]
sevenseacat has left #ruby [#ruby]
sevenseacat has joined #ruby
<rrecio> Thats all for today folks. Thanks for your attention!
rrecio has quit [Quit: You just hate me cause I'm caucasian.]
Zespre has quit [Ping timeout: 248 seconds]
Zespre_ has joined #ruby
richiebkr has joined #ruby
bubbajones has quit [Ping timeout: 260 seconds]
dagobah has joined #ruby
stayarrr has joined #ruby
beilabs_ has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby
bubbajones has joined #ruby
Zespre has joined #ruby
Zespre_ has quit [Ping timeout: 276 seconds]
JohnBat26 has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
bubbajones has quit [Ping timeout: 260 seconds]
burlyscudd has joined #ruby
Zespre has quit [Ping timeout: 246 seconds]
Zespre has joined #ruby
lessless has joined #ruby
pootler_1 has quit [Ping timeout: 248 seconds]
<lessless> how to securely access a potentially nonexistent hash element w/o raising en error?
pootler__ has quit [Ping timeout: 252 seconds]
airtonix_ has joined #ruby
airtonix has quit [Ping timeout: 245 seconds]
niceguyjames has joined #ruby
beilabs_ has joined #ruby
burlyscudd has quit [Ping timeout: 276 seconds]
<havenwood> lessless: by default nil is returned if the key isn't found
stayarrr has quit [Quit: Leaving...]
<havenwood> lessless: what do you mean by securely?
ffio has joined #ruby
<lessless> havenwood, I mean nested elements
<lessless> like some['element']['that']['probably']['do_not_exist']
<lessless> NoMethodError: undefined method `[]' for nil:NilClass
Shirakawasuna has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
hoelzro_ is now known as hoelzro
Mon_Ouie has quit [Ping timeout: 245 seconds]
aryaLovesJoel has quit []
arya has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
mansi has quit [Ping timeout: 252 seconds]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
jds has quit [Remote host closed the connection]
tonini has joined #ruby
threesome has joined #ruby
timonv has joined #ruby
beilabs_ has quit [Ping timeout: 240 seconds]
LennyLinux has joined #ruby
ybart has joined #ruby
hawtin has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
Hanmac1 has joined #ruby
adambeynon has joined #ruby
arya has quit [Read error: Connection reset by peer]
relix has joined #ruby
zai has joined #ruby
arya has joined #ruby
zai is now known as Guest55395
Guest55395 is now known as zai
joonty has quit [Quit: WeeChat 0.3.7]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
DaniG2k has joined #ruby
haxrbyte has joined #ruby
bubbajones has joined #ruby
JumpMast3r has joined #ruby
airtonix_ has quit [Ping timeout: 240 seconds]
slainer68 has joined #ruby
airtonix has joined #ruby
beilabs_ has joined #ruby
obs has joined #ruby
aspiers has quit [Read error: Operation timed out]
aspiers has joined #ruby
hogeo has joined #ruby
troessner has joined #ruby
Coffers has joined #ruby
jbpros has joined #ruby
ttt has quit [Remote host closed the connection]
bubbajones has quit [Ping timeout: 252 seconds]
ttt has joined #ruby
jimg has joined #ruby
MrZYX|off is now known as MrZYX
nhhagen has quit [Quit: Leaving]
obs has quit [Quit: Konversation terminated!]
Guest97450 has quit [Ping timeout: 260 seconds]
mljsimone|away is now known as mljsimone
airtonix has quit [Ping timeout: 245 seconds]
mikewintermute has joined #ruby
airtonix has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jimg has quit [Ping timeout: 240 seconds]
greenarrow has joined #ruby
AndChat| has joined #ruby
joonty has joined #ruby
tatsuya_o has joined #ruby
lkba has quit [Read error: Connection reset by peer]
ferdev has quit [Quit: ferdev]
JohnBat26 has joined #ruby
AndChat| has quit [Ping timeout: 256 seconds]
timonv has quit [Remote host closed the connection]
fixl has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
hawtin has joined #ruby
Zespre has quit [Ping timeout: 246 seconds]
Zespre has joined #ruby
LennyLinux has quit [Remote host closed the connection]
bionhart has quit [Remote host closed the connection]
RORgasm has joined #ruby
ghr has joined #ruby
niceguyjames has joined #ruby
bionhart has joined #ruby
ephemerian has joined #ruby
RORgasm has quit [Ping timeout: 248 seconds]
lunarjar has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 248 seconds]
bubbajones has joined #ruby
lunarjar has joined #ruby
arya has joined #ruby
filipe has quit [Ping timeout: 276 seconds]
b0oh has joined #ruby
nomenkun has joined #ruby
burlyscudd has joined #ruby
tvw has quit []
ferdev has joined #ruby
timmow has joined #ruby
JohnBat26 has quit [Ping timeout: 240 seconds]
beilabs_ has quit [Ping timeout: 252 seconds]
JohnBat26 has joined #ruby
haxrbyte has quit [Remote host closed the connection]
kevinykchan has joined #ruby
haxrbyte has joined #ruby
burlyscudd has quit [Ping timeout: 256 seconds]
bubbajones has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
marr has joined #ruby
filipe has joined #ruby
mansi has joined #ruby
ferdev has quit [Ping timeout: 256 seconds]
haxrbyte has quit [Ping timeout: 260 seconds]
mklappstuhl has joined #ruby
kasper has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
redgirl has quit [Quit: This computer has gone to sleep]
mansi has quit [Ping timeout: 276 seconds]
dr_bob has quit [Quit: Leaving.]
io_syl has quit [Quit: Computer has gone to sleep.]
beilabs_ has joined #ruby
dr_bob1 has joined #ruby
<oceanbreeze> Guys, File.expand_path, automaticaly detects the whole path?
mklappstuhl has quit [Remote host closed the connection]
<oceanbreeze> I mean how its working?
bubbajones has joined #ruby
tylersmith has joined #ruby
timonv has joined #ruby
Shrink has quit [Ping timeout: 240 seconds]
Rizzle has quit [Read error: Connection reset by peer]
jds has joined #ruby
binaryplease has joined #ruby
Rizzle has joined #ruby
bubbajones has quit [Ping timeout: 240 seconds]
<L8D> oceanbreeze: It takes the current directory...
tylersmith has quit [Ping timeout: 268 seconds]
<L8D> And prepends it to the path specified
<L8D> And does the special means for things like ../ and ~
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<Mon_Ouie> Not really, e.g. File.expand_path("/foo/bar")
<L8D> Well, and /
<Mon_Ouie> It just takes a path (relative or absolute) and gives you an absolute path back
LennyLinux has joined #ruby
icole has quit [Remote host closed the connection]
Zespre has quit [Ping timeout: 246 seconds]
<Mon_Ouie> (for relative directories, it assumes the path is relative to the current directory or the second argument if specified)
Zespre has joined #ruby
Domon has quit [Remote host closed the connection]
jds has quit [Ping timeout: 248 seconds]
sevenseacat has quit [Quit: Leaving.]
bubbajones has joined #ruby
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 276 seconds]
Domon has joined #ruby
bubbajones has quit [Ping timeout: 245 seconds]
Zespre_ has quit [Ping timeout: 260 seconds]
bubbajones has joined #ruby
Zespre has joined #ruby
Shrink has joined #ruby
ybart has quit [Quit: ybart]
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
Zespre has joined #ruby
Zespre_ has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
kirun has joined #ruby
dfdf has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
Zespre has quit [Ping timeout: 248 seconds]
dfdf has quit [Remote host closed the connection]
Zespre has joined #ruby
icole has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
dr_bob1 has quit [Quit: Leaving.]
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
haxrbyte has joined #ruby
bubbajones has quit [Ping timeout: 252 seconds]
Al__ has joined #ruby
ybart has joined #ruby
Zespre has quit [Ping timeout: 248 seconds]
Zespre has joined #ruby
bubbajones has joined #ruby
supergeek has joined #ruby
burlyscudd has joined #ruby
davedev24 has joined #ruby
dr_bob has joined #ruby
Coffers has joined #ruby
niklasb has joined #ruby
oceanbreeze has quit [Ping timeout: 264 seconds]
Zespre has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Ping timeout: 240 seconds]
icole has quit [Ping timeout: 245 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
Zespre has joined #ruby
fermion has joined #ruby
vxr9 has joined #ruby
mansi_ has joined #ruby
stef_204 has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
ehaliewicz has quit [Ping timeout: 240 seconds]
bubbajones has quit [Ping timeout: 256 seconds]
Zespre has quit [Ping timeout: 256 seconds]
mansi_ has quit [Ping timeout: 256 seconds]
Zespre has joined #ruby
freeayu has joined #ruby
gyre007 has joined #ruby
kayloos has joined #ruby
bubbajones has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
nari has quit [Ping timeout: 245 seconds]
Zespre has quit [Ping timeout: 256 seconds]
Zespre has joined #ruby
takezawa has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
takezawa has joined #ruby
tylersmith has joined #ruby
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
boblu has quit [Ping timeout: 276 seconds]
gtc has joined #ruby
mklappstuhl has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
jimg has joined #ruby
khushildep has joined #ruby
Zespre has quit [Ping timeout: 240 seconds]
tylersmith has quit [Ping timeout: 256 seconds]
Zespre has joined #ruby
Nahra has joined #ruby
Nahra has joined #ruby
haxrbyte has quit [Ping timeout: 248 seconds]
jbpros has quit [Quit: jbpros]
TIJ has joined #ruby
Spooner has joined #ruby
sayan has joined #ruby
Weems has quit [Ping timeout: 256 seconds]
arya_ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
Zespre has quit [Ping timeout: 240 seconds]
tonini has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
Zespre has joined #ruby
Elico has quit [Quit: Elico]
supergeek has quit []
ntus1017 has quit [Remote host closed the connection]
gyre008 has joined #ruby
haxrbyte has joined #ruby
yashshah has joined #ruby
ybart has quit [Quit: ybart]
denver has joined #ruby
Zespre has quit [Ping timeout: 252 seconds]
Zespre has joined #ruby
timonv has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
browndawg1 has joined #ruby
linsy has quit [Read error: Operation timed out]
arya_ has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 246 seconds]
haxrbyte has joined #ruby
persand has quit [Quit: persand]
jimg has quit [Remote host closed the connection]
arya has joined #ruby
Zespre has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
Zespre has joined #ruby
gyre008 has quit [Remote host closed the connection]
TIJ has quit [Quit: Konversation terminated!]
gyre007 has joined #ruby
jastix has joined #ruby
Shrink has quit [Ping timeout: 264 seconds]
goshakkk has joined #ruby
RORgasm has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
relix has joined #ruby
yshh has quit [Remote host closed the connection]
allanm has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Zespre has joined #ruby
Bry8Star{T2 has joined #ruby
RORgasm has quit [Ping timeout: 248 seconds]
diego_k has joined #ruby
diegok has quit [Ping timeout: 252 seconds]
Zespre_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
tvw has joined #ruby
browndawg1 has quit [Ping timeout: 252 seconds]
patteh has quit [Ping timeout: 245 seconds]
Zespre has quit [Ping timeout: 268 seconds]
vlad_starkov has quit [Remote host closed the connection]
patteh has joined #ruby
kofno has joined #ruby
zets has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
burlyscudd has joined #ruby
browndawg has joined #ruby
ToApolytoXaos has joined #ruby
Zespre has joined #ruby
Zespre_ has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby
kofno has quit [Ping timeout: 246 seconds]
burlyscudd has quit [Ping timeout: 245 seconds]
Neomex has joined #ruby
Zespre_ has joined #ruby
Neomex has quit [Client Quit]
denver has quit [Ping timeout: 256 seconds]
Zespre has quit [Ping timeout: 252 seconds]
nari has joined #ruby
rdark has joined #ruby
akemrir has joined #ruby
chrishough has quit [Quit: chrishough]
timonv has joined #ruby
girija has quit [Ping timeout: 248 seconds]
persand has joined #ruby
krandi has joined #ruby
jimg has joined #ruby
kayloos has quit [Remote host closed the connection]
andikr has quit [Ping timeout: 252 seconds]
Zespre_ has quit [Ping timeout: 252 seconds]
jinie_ is now known as jinie
Zespre has joined #ruby
davedev24 has joined #ruby
andikr has joined #ruby
krandi has quit [Ping timeout: 245 seconds]
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
tylersmith has joined #ruby
slainer68 has quit [Remote host closed the connection]
manutter has joined #ruby
<joshu> anyone used helios mobile?
jimg has quit [Ping timeout: 245 seconds]
_Andres has quit [Ping timeout: 268 seconds]
LarsSmit has joined #ruby
Zespre has quit [Ping timeout: 260 seconds]
Zespre has joined #ruby
_Andres has joined #ruby
davedev24 has quit [Remote host closed the connection]
pootler_ has joined #ruby
pootler__ has joined #ruby
redgirl has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
davedev24 has joined #ruby
Zai00 has joined #ruby
niceguyjames has joined #ruby
gildo has joined #ruby
tonini has joined #ruby
AlSquire has joined #ruby
ellipse has joined #ruby
ybart has joined #ruby
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 248 seconds]
boblu has joined #ruby
Zespre has joined #ruby
Zespre_ has quit [Ping timeout: 256 seconds]
Domon has quit [Remote host closed the connection]
blaxter has quit [Ping timeout: 264 seconds]
tonini has quit [Ping timeout: 248 seconds]
radic__ has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
timonv has quit [Remote host closed the connection]
blaxter has joined #ruby
jbpros has joined #ruby
Zespre has quit [Ping timeout: 252 seconds]
rfizzle has joined #ruby
Zespre has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ayaz has quit [Ping timeout: 256 seconds]
radic has joined #ruby
ehaliewi` has joined #ruby
ayaz has joined #ruby
timonv has joined #ruby
jastix has quit [Read error: Operation timed out]
dr_bob has quit [Ping timeout: 245 seconds]
robustus has quit [Ping timeout: 248 seconds]
maetthew has joined #ruby
Zespre_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
Zespre has quit [Ping timeout: 246 seconds]
robustus has joined #ruby
sepp2k has quit [Quit: Leaving.]
banisterfiend has joined #ruby
b0oh has quit [Quit: Leaving.]
jimg has joined #ruby
browndawg has quit [Quit: Leaving.]
Zespre_ has quit [Ping timeout: 256 seconds]
b0oh has joined #ruby
Zespre has joined #ruby
tkuchiki has quit [Remote host closed the connection]
kofno has joined #ruby
gildo has quit [Ping timeout: 256 seconds]
DanKnox is now known as DanKnox_away
Astralum has quit [Ping timeout: 252 seconds]
jimg has quit [Ping timeout: 245 seconds]
agjacome has joined #ruby
Xeago has joined #ruby
sepp2k has joined #ruby
tonini has joined #ruby
m00nlight has joined #ruby
<m00nlight> Hi, when I use rvm to install ruby
<m00nlight> it says : RVM was not able to detect your system type and does not know how to load extra library paths
<m00nlight> I'm using chakra linux
<m00nlight> How can I solve this problem
guns has joined #ruby
Zespre has quit [Ping timeout: 256 seconds]
Zespre has joined #ruby
ryannielson has joined #ruby
vlad_starkov has joined #ruby
mklappstuhl has quit [Ping timeout: 268 seconds]
<ellipse> Have you read `rvm notes`?
fbernier has joined #ruby
ntus1017 has joined #ruby
<m00nlight> NO
<ellipse> That might be a good idea then.
Treeson has joined #ruby
burlyscudd has joined #ruby
rlb3 has joined #ruby
Zespre has quit [Ping timeout: 240 seconds]
Zespre has joined #ruby
ehaliewi` has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
ttt has quit [Remote host closed the connection]
slainer68 has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
burlyscudd has quit [Ping timeout: 252 seconds]
jinie is now known as jinie_
Zespre_ has joined #ruby
LennyLinux has quit [Remote host closed the connection]
Zespre has quit [Ping timeout: 245 seconds]
<hackeron> anyone know a way to detect a plugged in hard drive with ruby on ubuntu?
<MrZYX> there's probably some dbus event you can listen to
mansi has joined #ruby
amedeiros has joined #ruby
vlad_starkov has joined #ruby
guns has quit [Quit: guns]
<hackeron> MrZYX: a hal one but I believe hal was removed some time ago?
<maetthew> hackeron: Not sure if theres a Ruby way but you could execute system command `df` to find out which disks are mounted on your system
<MrZYX> I would be surprised if udev doesn't send one out
amedeiros has quit [Client Quit]
<hackeron> maetthew: the drives are not mounted - I can see the drive in dmesg but tailing/parsing that seems like a big hack
<maetthew> ah ok
amedeiros has joined #ruby
<maetthew> yeah it is kind of an ugly hack
<maetthew> is it an internal drive?
<hackeron> some times internal, sometimes USB
<maetthew> so you want to see it wether it's mounted or not, right?
Zespre_ has quit [Ping timeout: 252 seconds]
<hackeron> no, I want to detect it, detect it's serial number and if it is in the list to mount it
Zespre has joined #ruby
<wuest> hackeron, what you're describing sounds like a textbook job for udev.
<hackeron> so to mount it when it plugged in and umount it in case someone unplugs it
mansi has quit [Ping timeout: 256 seconds]
<hackeron> wuest: hmm, is there an example to get udev to run a ruby script?
<hackeron> or a way for ruby to subscribe to these messages?
jimg has joined #ruby
<wuest> Check the manpage for udev, look for RUN
<MrZYX> I'd still explore the dbus route
vlad_starkov has quit [Ping timeout: 240 seconds]
<MrZYX> org.freedesktop.UDisks2 sounds promising
Xugagug has joined #ruby
<hackeron> MrZYX: hmm, is there an example how to use dbus with ruby? - I've done it with python before but can't see to find much info with ruby
<wuest> I could be wrong, but isn't dbus not guaranteed to be on a system? Most (all?) modern linuxes are going to have udev.
<MrZYX> a quick search on rubygems brought up https://github.com/mvidner/ruby-dbus
<hackeron> hmm, I'll check it out :)
ldnunes has joined #ruby
<hackeron> wuest: I'm using ubuntu server and that seems to come with dbus by default
* wuest isn't sure as to dbus's ubiquity. Is a KDE user, so dbus is a given.
<wuest> Gotcha
jbpros has quit [Quit: jbpros]
arya has quit []
Zespre has quit [Ping timeout: 240 seconds]
Zespre has joined #ruby
pothibo has joined #ruby
dr_bob has joined #ruby
tylersmith has joined #ruby
<MrZYX> hackeron: https://github.com/shurizzle/em-udev a bit dated but could be interesting too
<hackeron> MrZYX: I saw it, but there's like no docs :/ - not obvious what it does if anything
<hackeron> it's only 60 lines of code in total from what I can see
vlad_starkov has joined #ruby
KevinSjoberg has joined #ruby
boblu has quit [Ping timeout: 264 seconds]
<MrZYX> yeah, depends on https://github.com/shurizzle/rubdev
Zespre has quit [Ping timeout: 246 seconds]
Zespre has joined #ruby
<hackeron> MrZYX: yeh, that one's docs aren't much better, lol
<MrZYX> time to read some code :P
browndawg has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 268 seconds]
<MrZYX> ruby is just not yet there as gui app language, sadly
browndawg has quit [Client Quit]
<MrZYX> I could imagine nice APIs with blocks as callbacks etc
linusoleander has joined #ruby
jwest has joined #ruby
ananthakumaran has joined #ruby
<linusoleander> How is Ruby is handling recursive calls?
<linusoleander> Will I have any problems if I used it over a long period of time?
tylersmith has quit [Ping timeout: 268 seconds]
<MrZYX> there's a stacklimit, yeah, so no tail recursion
lyanchih has quit [Quit: lyanchih]
tkuchiki has joined #ruby
gildo has joined #ruby
<linusoleander> MrZYX: Aha, that's true
<linusoleander> Thanks
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
<hackeron> MrZYX: this isn't a gui app :)
mklappstuhl has joined #ruby
k-man has quit [Read error: Connection reset by peer]
<MrZYX> well, the true solution to your problem is probably not writing a ruby script but configuring udisks properly, but who am I preventing you from writing ruby? :P
jimg has quit [Remote host closed the connection]
k-man has joined #ruby
<linusoleander> Is there a way to implement a safe tail recursion script in ruby?
kil0byte has joined #ruby
<MrZYX> use a loop
<MrZYX> tail recursion is the functional style to write loops
<linusoleander> MrZYX: The code is async, so a loop won't work
<MrZYX> do you have a minimal example?
arya has joined #ruby
Zespre_ has quit [Ping timeout: 248 seconds]
<linusoleander> MrZYX: I think I can scale down my current script, hold on
medk has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
Zespre has joined #ruby
statarb3 has quit [Remote host closed the connection]
statarb3 has joined #ruby
statarb3 has quit [Read error: Connection reset by peer]
girija has joined #ruby
boblu has joined #ruby
linsy has joined #ruby
yshh has joined #ruby
devoldmx3 has joined #ruby
<linusoleander> MrZYX: On line 7 (or if something goes wrong) I want it to wait for a while and start over again
mklappstuhl has quit [Ping timeout: 248 seconds]
<MrZYX> maybe I'm missing something but that's not recursive
devoldmx has quit [Ping timeout: 256 seconds]
<MrZYX> you call eventmachine, that call returns
<linusoleander> MrZYX: I know, It's what I'm trying to implement on line 7
<Xeago> on line 7 he wants to restart it
Zespre_ has joined #ruby
ldnunes has quit [Ping timeout: 240 seconds]
<MrZYX> you call the callback function, pass it a block, that saves it somewhere, and returns
<MrZYX> your function returns
<MrZYX> eh, method
<Xeago> linusoleander: there is no reason to use non-blocking methods if you are just waiting for it to finish
niklasb has joined #ruby
Zespre has quit [Ping timeout: 268 seconds]
mark_locklear has joined #ruby
berdario has joined #ruby
<MrZYX> some later point: the stored callback gets executed, outside of the process methods callstack
DrCode has quit [Ping timeout: 240 seconds]
<MrZYX> but I might be missing something since I never actually used eventmachine
<linusoleander> Xeago: It's just an example code, my real application includes over 900 current requests per minute
jbpros has joined #ruby
<berdario> Hi, I upgraded ubuntu, and now rbenv always crashes, complaining that the old system ruby isn't what it was before
pootler_ has quit [Quit: Lost terminal]
pootler__ has quit [Quit: Lost terminal]
s_e has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
<Xeago> linusoleander: doesn't matter what the real code is, if you are waiting on the result of IO, use blocking IO or interleave it
s_e has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
JumpMast3r has quit [Ping timeout: 264 seconds]
TheFuzzball has quit [Ping timeout: 264 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
<berdario> I'm looking into the shell scripts that make rbenv run... but I can't find where has it stored the assumption of the system version of being the old one
<linusoleander> MrZYX: Any idea?
nfk has quit [Remote host closed the connection]
__main__ has quit [Ping timeout: 248 seconds]
rmnuvg_ has quit [Ping timeout: 264 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
JumpMast3r has joined #ruby
dfdf has joined #ruby
<Xeago> linusoleander: you probably want a task queue
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
ananthakumaran1 has joined #ruby
L8D has quit [Ping timeout: 264 seconds]
ericmathison has quit [Ping timeout: 264 seconds]
tommylommykins has quit [Ping timeout: 264 seconds]
ananthakumaran has quit [Ping timeout: 252 seconds]
<Xeago> where you can queue up your tasks, and have multiple workers process a task
tommylommykins has joined #ruby
ntus1017 has quit [Remote host closed the connection]
ericmathison has joined #ruby
L8D has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<linusoleander> That doesn't sound like my original problem
<MrZYX> linusoleander: so the http.callback call blocks until the passed block is executed?
rmnuvg has joined #ruby
F1skr has joined #ruby
<linusoleander> MrZYX: No
TheFuzzball has joined #ruby
<MrZYX> then it's not recursive
tacos1de has joined #ruby
kloeri has quit [Remote host closed the connection]
<MrZYX> no matter what you do inside
kloeri has joined #ruby
<berdario> weeeird... changing the global to "system" and then changing it back to a custom ruby, appears to have fixed it
teedex has joined #ruby
Zespre has joined #ruby
Zespre_ has quit [Ping timeout: 252 seconds]
Alina-malina has joined #ruby
DrCode has joined #ruby
<berdario> no, it still crashes -_-
nezumi has quit [Ping timeout: 252 seconds]
<linusoleander> MrZYX: I know that it's not recursive atm
<MrZYX> linusoleander: _no matter what you do inside_
Sherwyn has joined #ruby
kayloos has joined #ruby
daxim has joined #ruby
Trynemjoel has joined #ruby
JustinAiken has joined #ruby
carloslopes has joined #ruby
<daxim> what's the gem equivalent command-line of `cpan .`? specifically, I want to install a checkout of <https://github.com/ewilhelm/fpm>
mklappstuhl has joined #ruby
<MrZYX> only guessing what cpan . does: gem build fpm.gemspec
wallerdev has joined #ruby
<daxim> ok, and then?
RORgasm has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
Bry8Star{T2 has joined #ruby
<MrZYX> gem install ./fpm*.gem iirc
Zespre has quit [Ping timeout: 240 seconds]
<berdario> argh, in this repository there was a .rbenv-version
<linusoleander> Opps, a bit much code
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<linusoleander> Done
<berdario> I think it's absurd to require a certain patchset just to run a piece of code
<daxim> that seems to work, MrZYX++
Zespre has joined #ruby
spyk has joined #ruby
<wuest> berdario: I imagine that it provides you context regarding what patchset the code is known to work well under, rather than implying a hard requirement.
taoshi has quit [Quit: leaving]
spyk has left #ruby [#ruby]
LennyLinux has joined #ruby
<berdario> wuest: true, but it would be better to provide context through the README
<berdario> this way, I'm forced to change the file
<wuest> README? What do you think this is, C? ;)
<wuest> I agree with you, to note.
<berdario> (that is under VCS, so if I'll ever want to do a pull request, I'll have keep in mind not to add this change)
<MrZYX> linusoleander: EventMachine::Timer.new(30) doesn't block either so perform returns before the block is executed
<L8D> I have a problem/question
<MrZYX> linusoleander: so still no recursion
<linusoleander> MrZYX: So?
Freijo is now known as Fraeon
<L8D> Let's say I have 4 variables, x, y, a, and d
maetthew has quit [Quit: Textual IRC Client: www.textualapp.com]
<L8D> x and y start at 0 and represent a graph
<L8D> a represents a number between 0 and 360
postmodern has quit [Quit: Leaving]
LennyLinux has quit [Remote host closed the connection]
<L8D> and d represents a distance to travel...
RORgasm has quit [Ping timeout: 252 seconds]
<L8D> How can I calculate how much to add to x and y based on the angle and distance?
JustinAiken has quit [Quit: Leaving.]
<L8D> I'm more looking for a functon that takes a and d, and return x and y
pyrac has joined #ruby
devoldmx3 has quit [Ping timeout: 245 seconds]
geekbri has joined #ruby
teedex has quit [Remote host closed the connection]
<berdario> uhm... the gemfile requires rake 0.9, I have already installed rake 0.9.6 and it installed 0.9.2.2
<berdario> why is that?
Zespre has quit [Ping timeout: 252 seconds]
osvico has quit [Ping timeout: 252 seconds]
<ellipse> radians
<ellipse> @L8D
devoldmx has joined #ruby
<L8D> is radians what I'm looking for?
<MrZYX> berdario: most likely some other dependency you have restricts the requirement down to .2.2
<ellipse> Googling radians will aid you on your quest, yes.
ramblex has joined #ruby
<MrZYX> berdario: read your Gemfile.lock
<berdario> MrZYX: is there an easy way to see which dependency restri...
<berdario> thanks
* L8D is now looking at the wikipedia article
<L8D> this is what I'm looking for...
<L8D> thank you
Zespre has joined #ruby
<linusoleander> MrZYX: I think you should do some reading about EM :)
<ellipse> np
<berdario> MrZYX: there's only one rake item, and it's under "specs:"
browndawg has joined #ruby
subbyyy has joined #ruby
<berdario> to me, it seems to mean that the restriction doesn't come from other packages, isn't it?
Spami has joined #ruby
Spami has joined #ruby
<MrZYX> linusoleander: http://eventmachine.rubyforge.org/EventMachine/Timer.html the first sentence demonstrates that you can cancel a timer and that it never executes the block because of that, that means the call returns before the block is executed, that means the block is executed outside the call stack of your current method, that means it's no recursion but a loop somewhere
mikecmpbll has joined #ruby
<MrZYX> berdario: gist your Gemfile and Gemfile.lock then
boblu has quit [Ping timeout: 245 seconds]
<L8D> I see how radians are relevant, but I don't see how using will help me solve my problem.
obs has joined #ruby
<linusoleander> MrZYX: "Somewhere" as my code or in EM?
<MrZYX> in EM
krz has quit [Quit: krz]
jimg has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
<berdario> MrZYX: http://dpaste.com/1247546/
<linusoleander> MrZYX: Yeah, they have an event loop somewhere
greywolf` has joined #ruby
<MrZYX> berdario: okay looks like the lock was built when .2.2 was the latest version, if you want to get to .6 run bundle update rake
hattusili_III has quit [Read error: Connection reset by peer]
generalissimo has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
icole has joined #ruby
Zespre has quit [Ping timeout: 248 seconds]
Zespre_ has joined #ruby
<berdario> MrZYX: uhhhh... you're right... I checked the git status, and indeed Gemfile.lock was already there (I thought it was created when I ran bundle install)... thanks!
browndawg has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
browndawg has joined #ruby
jimg has quit [Ping timeout: 245 seconds]
brbcoding has joined #ruby
mvangala has joined #ruby
matthewrobbins has joined #ruby
Kabaka has joined #ruby
icole has quit [Ping timeout: 256 seconds]
greywolf` has quit [Quit: Linkinus - http://linkinus.com]
mansi has joined #ruby
krawchyk has joined #ruby
Zespre_ has quit [Ping timeout: 268 seconds]
Zespre has joined #ruby
jinie_ is now known as jinie
Fire-Dragon-DoL has joined #ruby
mikewintermute has quit [Quit: mikewintermute]
rdark has quit [Quit: leaving]
sailias has joined #ruby
TheDick has joined #ruby
snearch has joined #ruby
AlHafoudh has joined #ruby
sailias has quit [Remote host closed the connection]
devoldmx has joined #ruby
mansi has quit [Ping timeout: 260 seconds]
allanm has joined #ruby
iamjarvo has joined #ruby
teedex has joined #ruby
browndawg has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
ttt has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
relix has joined #ruby
daxim has quit [Read error: Connection reset by peer]
DaniG2k has quit [Quit: Leaving.]
Zespre has joined #ruby
serp` has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
buzzybron has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
jastix has joined #ruby
adkron has joined #ruby
ttt has quit [Ping timeout: 252 seconds]
Fire-Dragon-DoL1 has joined #ruby
Fire-Dragon-DoL1 has quit [Client Quit]
<L8D> Is it possible to define your own methods for standard classes?
jlast has joined #ruby
kristiandelay has joined #ruby
_Renegade has joined #ruby
tylersmith has joined #ruby
Zespre has quit [Ping timeout: 241 seconds]
__main__ has joined #ruby
matthewrobbins has quit [Ping timeout: 248 seconds]
browndawg has left #ruby [#ruby]
Sherwyn has quit [Remote host closed the connection]
Zespre has joined #ruby
<tobiasvl> L8D: sure
<tobiasvl> go right ahead
adambeynon has joined #ruby
<zets> L8D: yeah, that's one of the nice things about ruby
icecandy has quit [Remote host closed the connection]
breakingthings has joined #ruby
<L8D> HOW?
ldnunes has joined #ruby
tylersmith has quit [Ping timeout: 245 seconds]
<L8D> How can you deinfe your own methods for standard classes?
<L8D> define*
atno has joined #ruby
<tobiasvl> the way you define any old method
<tobiasvl> class String; def foo; return; end; end
<L8D> That works? And doesn't break the String class?
ayaz has quit [Read error: Operation timed out]
<tobiasvl> it works. what do you mean "break"?
<joonty> tobiasvl: I'm guessing L8D isn't used to languages where you can open up existing classes
<L8D> cause the String class to not have it's original methods
<L8D> o.O
<L8D> OMG
<tobiasvl> L8D: it keeps its original methods
<L8D> Ruby is awesome
<zets> it won't override any of String's current functionality
adambeynon has quit [Client Quit]
jerius has joined #ruby
<L8D> 10.times { puts "Ruby is awesoe" }
adambeynon has joined #ruby
Zespre has quit [Ping timeout: 264 seconds]
<MrZYX> in fact you can dynamically define methods on any object, that's how class methods work in ruby
<L8D> .gsub(/awesoe/, "awesome"
devoldmx has quit [Remote host closed the connection]
<L8D> )
atno has quit [Remote host closed the connection]
<L8D> Is there any way to prevent that then?
Zespre has joined #ruby
<L8D> prevent the overriding of existing class methods
<MrZYX> a = "foo"; b ="bar"; def a.yay; puts "yay"; end; a.yay #=> yay; b.yay #=> NoMethodError
<MrZYX> no
teedex has quit [Remote host closed the connection]
<L8D> Well crap
synthetix has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
lyanchih has joined #ruby
atno has joined #ruby
ner0x has joined #ruby
jbpros has quit [Quit: jbpros]
burlyscudd has joined #ruby
obs has quit [Quit: Konversation terminated!]
synthetix has quit [Remote host closed the connection]
yalue has joined #ruby
<tobiasvl> sure there is
<L8D> what?
ayaz has joined #ruby
lkba has joined #ruby
<MrZYX> tobiasvl: how?
devoldmx has joined #ruby
<tobiasvl> String.freeze
<L8D> Can you do that for specific methods?
Zespre has quit [Ping timeout: 240 seconds]
Zespre has joined #ruby
Raboo has joined #ruby
tomzx_mac has joined #ruby
mansi has joined #ruby
pootler_ has joined #ruby
lewix has quit [Remote host closed the connection]
kpshek has quit []
iamjarvo1 has joined #ruby
Zespre_ has joined #ruby
wmoxam has joined #ruby
tk_ has joined #ruby
Zespre has quit [Ping timeout: 268 seconds]
lyanchih has quit [Quit: lyanchih]
teedex has joined #ruby
otha has joined #ruby
<tobiasvl> ah, no.
takezawa_ has joined #ruby
Coolhand has quit [Remote host closed the connection]
hamakn_ has joined #ruby
<otha> kkkkk
<otha> kkkkk
niklasb has quit [Ping timeout: 248 seconds]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
obs has joined #ruby
obs has quit [Client Quit]
serp` has quit [Quit: serp`]
vlad_starkov has joined #ruby
zai_ has joined #ruby
<otha> oml
iamjarvo1 has quit [Ping timeout: 248 seconds]
Zespre_ has quit [Ping timeout: 240 seconds]
takezawa has quit [Ping timeout: 245 seconds]
hamakn has quit [Ping timeout: 252 seconds]
Mattx has joined #ruby
Zespre has joined #ruby
kenmaz has joined #ruby
carlyle has joined #ruby
dfdf has quit [Remote host closed the connection]
joast has quit [Quit: Leaving.]
workmad3 has joined #ruby
zai has quit [Ping timeout: 276 seconds]
kasper has joined #ruby
browndawg has joined #ruby
axl_ has joined #ruby
denver has joined #ruby
danslo has joined #ruby
joast has joined #ruby
Matip has quit [Ping timeout: 240 seconds]
pyrac has quit [Quit: pyrac]
splittingred has joined #ruby
johnrlive has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
umttumt has joined #ruby
kenmaz has quit [Ping timeout: 276 seconds]
lyanchih has joined #ruby
Zespre_ has joined #ruby
johnrlive has joined #ruby
Zespre has quit [Ping timeout: 276 seconds]
bklane has joined #ruby
girija has quit [Ping timeout: 276 seconds]
tommyvyo has joined #ruby
codecop has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
hogeo has quit [Remote host closed the connection]
johnrlive has quit [Remote host closed the connection]
Niamkik_ has quit [Ping timeout: 255 seconds]
pragu has joined #ruby
pragu has quit [Client Quit]
Zespre_ has quit [Ping timeout: 264 seconds]
jrhe has joined #ruby
<jrhe> Hi. What is the recommended way of storing database queries in the database itself? Point in question is that I have a load of reports that need to be run in an app than themselves are sql snippets / active record relations. Is there some way I can serialise them and deserialise them?
<jrhe> The relation itself rather than the data returned.
Zespre has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
pipework has joined #ruby
davedev24 has joined #ruby
failshell has joined #ruby
<ccooke> jrhe: a Better Solution would be stored procedures, to be honest
<jrhe> ccooke: Why?
adambeynon has joined #ruby
<ccooke> because stored procedures were designed to do what you're talking about - be callable, pre-determined blocks of SQL.
<jrhe> ccooke: I still need to be able to tie it to an activerecord model instance
<ccooke> Storing sql *in* sql means you're going to have to take *great* care not to allow SQL injection attacks
<jrhe> Which contains the name of the query and whatnot
Coolhand has joined #ruby
niklasb has joined #ruby
asteve has joined #ruby
obs has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
matthewrobbins has joined #ruby
Zespre has quit [Ping timeout: 260 seconds]
teedex has quit [Remote host closed the connection]
<jrhe> ccooke: Surely so long as I use prepare I should be ok?
ewag has quit [Remote host closed the connection]
icole has joined #ruby
Zespre has joined #ruby
<ccooke> jrhe: No, that's no defence at all.
sambao21 has joined #ruby
teedex has joined #ruby
<ccooke> the problem is that SQL-in-SQL is more fragile, requires more complex code and requires you to - at some level - accept that you're going to be executing SQL that's not been entirely deemed as "safe"
<ccooke> wheras a stored procedure is built-in to the DB.
<jrhe> ccooke: I will research it. I don't see quite how it will alleviate that problem but I don't think I know enough about stored procedures.
<ccooke> there are compromises, of course. It all depends on what you need. But the general advice is always *not* to store SQL in a DB
<ccooke> jrhe: what sort of SQL do you actually need to store?
Niamkik has joined #ruby
ewag has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
otha has left #ruby [#ruby]
lewix has joined #ruby
freerobby has joined #ruby
<ccooke> is it *really* arbitrary, or could you actually handle it with (effectively) a number of functions and the parameters to them?
<jrhe> ccooke: Its all reporting queries so mainly selecting fields from a bunch of joined tables which meet some condition. No updates, inserts etc.
rdark has joined #ruby
icole has quit [Ping timeout: 245 seconds]
obs has quit [Quit: Konversation terminated!]
<ccooke> jrhe: is there commonality in the tables and the way they're joined?
geoffrey has joined #ruby
<jrhe> ccooke: Cheers for the help btw, you are helping me ask the right questions! Nope, other than that they are selects it can be pretty arbitrary. Its basically looking over a rails apps database and generating reports from it. They can be from any tables, composed in anyway.
Zespre has quit [Ping timeout: 245 seconds]
<ccooke> jrhe: Could you handle it by - effectively - having a few functions that spat out generic SQL to do the select, then return only the data the report asked for?
kil0byte_ has joined #ruby
geoffrey has quit [Client Quit]
<jrhe> ccooke: Too much data, would be better to do it at a db level for efficiency
<ccooke> jrhe: that's not the point :-)
v0n has joined #ruby
<ccooke> jrhe: could it be done that way?
<jrhe> yes
<jrhe> but I think it would be very very very very slow
obs has joined #ruby
Zespre has joined #ruby
<ccooke> the reason I ask is, if your were to implement the generic select as a stored procedure and then use that in another SQL statement, the DB does all the optimisation
<jrhe> Ahh right I see
fuzzyhorns has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
<ccooke> you can even have the stored procedure take a list of field names to return and have it generate its code directly
tw1sted has joined #ruby
akells` has joined #ruby
<ccooke> then you could get your report structrue down to the name of a stored procedure to call, plus the parameters to pass to it.
TakumoKatekari has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
pipework has quit [Remote host closed the connection]
<ccooke> the downside is you'd need a new stored procedure every time a *completely* new report was used, but every report that's on effectively the same data can use the same function
<jrhe> ccooke: It seems that AR adapters implement a select method, maybe this would do the same
<ccooke> (and stored procedures are fully turing complete, so you *can* have them change the structure they generate based on parameters)
AndChat| has joined #ruby
pentameter has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
Roa has quit [Ping timeout: 246 seconds]
arturaz has quit [Quit: Leaving]
burlyscudd has quit [Quit: Leaving.]
Jb___ has joined #ruby
k3rn3lito has quit [Ping timeout: 264 seconds]
dr_bob has quit [Quit: Leaving.]
d4x has joined #ruby
<d4x> Hi
akells` has quit [Ping timeout: 240 seconds]
KevinSjoberg has joined #ruby
k3rn3lito has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
Zespre has quit [Ping timeout: 260 seconds]
lewix has quit [Ping timeout: 245 seconds]
burlyscudd has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
obs has quit [Quit: Konversation terminated!]
Zespre has joined #ruby
ffio_ has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
ffio has quit [Ping timeout: 245 seconds]
<d4x> anyone can help me to convert a file size to human readable string, using number_to_human_size in ActionView::Helpers::NumberHelper :?
niklasb has quit [Ping timeout: 245 seconds]
DaniG2k has joined #ruby
vlad_sta_ has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
zets has quit [Ping timeout: 248 seconds]
tylersmith has joined #ruby
axl_ has quit [Quit: axl_]
Zespre has quit [Ping timeout: 260 seconds]
akells` has joined #ruby
axl_ has joined #ruby
jinie is now known as jinie_
vlad_starkov has quit [Ping timeout: 245 seconds]
Zespre has joined #ruby
Cyrus has quit [Quit: Cyrus.sleep()]
enebo has joined #ruby
alex__c2022 has joined #ruby
thams has quit [Quit: thams]
tootubular has joined #ruby
h8R has quit [Quit: Leaving]
snearch has quit [Quit: Verlassend]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
adkron has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
scrollback has quit [Remote host closed the connection]
juarlex has quit [Ping timeout: 276 seconds]
scrollback has joined #ruby
sheep_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
jtharris has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
mwlang has joined #ruby
cmarques has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
Zespre has joined #ruby
mklappstuhl has joined #ruby
chipotle_ has joined #ruby
<mwlang> does anyone know where 'getopts' comes from or how to figure it out? I installed a gem that apparently doesn't declare all its dependencies correctly.
chipotle_ has quit [Max SendQ exceeded]
interactionjaxsn has joined #ruby
kobain has joined #ruby
chipotle_ has joined #ruby
<mwlang> I found and installed the "getopt" gem, but that wasn't it.
chipotle_ has quit [Max SendQ exceeded]
tomzx_mac has quit [Ping timeout: 256 seconds]
teedex has quit [Remote host closed the connection]
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
jimg has joined #ruby
<momomomomo> mwlang: Paste your stack trace to http://gist.github.com
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
chipotle_ has joined #ruby
mansi has joined #ruby
Zespre_ has joined #ruby
synthetix has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
mklappst_ has joined #ruby
axl_ has quit [Quit: axl_]
huoxito has joined #ruby
chipotle_ has quit [Client Quit]
burlyscudd has joined #ruby
jimg has quit [Ping timeout: 276 seconds]
<mwlang> (yes, I'm running Ruby 2.0 on Raspberry Pi) :-)
ananthakumaran1 has quit [Quit: Leaving.]
mklappstuhl has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
JustinAiken has joined #ruby
casheew has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
casheew has joined #ruby
goshakkk has quit [Quit: Textual IRC Client: www.textualapp.com]
mklappst_ has quit [Read error: Connection reset by peer]
<momomomomo> I've got to run mwlang but did you run rvm requirements? Here's a similar situation - you're missing libraries: http://stackoverflow.com/questions/15545639/cant-install-rubygems-with-ruby-2-0-0
Zespre_ has quit [Ping timeout: 260 seconds]
<mwlang> momomomomo: I did not know about that…will check it out.
Zespre has joined #ruby
Markvilla has joined #ruby
end_guy has joined #ruby
<mwlang> momomomomo: it didn't take any further action.
<momomomomo> mwlang: http://rvm.io/rvm/install - The docs are very helpful, especially if you haven't installed dvm before
sarkis has joined #ruby
<mwlang> that's what I followed to install rvm
<momomomomo> Gotta run, if you still have issues, and you've installed all of the correct libraries - and still have issues, come back and ask
<mwlang> might be a problem in that I attempted the multi-user install.
vlad_sta_ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
<mwlang> ok
dr_bob has joined #ruby
ner0x has quit [Ping timeout: 245 seconds]
mendel has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
fomatin has joined #ruby
Zespre has quit [Ping timeout: 256 seconds]
akemrir has quit [Quit: WeeChat 0.4.1]
Zespre has joined #ruby
andikr has quit [Read error: Connection reset by peer]
serp` has joined #ruby
tagrudev has quit [Remote host closed the connection]
<jrhe> ccooke: I know its turing complete but that doesn't say much to its usefulness!
<jrhe> ccooke: turns out my db doesnt support prepare anyway
<jrhe> jrhe: Investigating stored procs now
Tarential has quit [Excess Flood]
burlyscudd has quit [Quit: Leaving.]
Tarential has joined #ruby
spider-mario has joined #ruby
Astralum has joined #ruby
RORgasm has joined #ruby
timkohrumel has joined #ruby
pitzips has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
KarlHung1s is now known as KarlHungus
<joshu> probably a silly question but I'm using postgres for the first time. If you create new entries and then delete them. Is it normal that the next next entries don't being at id 1? If that makes sense?
awarner has joined #ruby
rhys has joined #ruby
timkohrumel has quit [Read error: Connection reset by peer]
Zespre has quit [Ping timeout: 246 seconds]
timkohrumel has joined #ruby
Zespre has joined #ruby
devoldmx has quit [Remote host closed the connection]
generali_ has joined #ruby
devoldmx has joined #ruby
KevinSjoberg has joined #ruby
timmow has quit [Remote host closed the connection]
DaniG2k has quit [Read error: Connection reset by peer]
kenmaz has joined #ruby
RORgasm has quit [Ping timeout: 256 seconds]
DaniG2k has joined #ruby
braoru has quit [Quit: Leaving]
fomatin has quit [Quit: Computer has gone to sleep.]
sambao21 has quit [Quit: Computer has gone to sleep.]
RORgasm has joined #ruby
serp` has quit [Quit: serp`]
burlyscudd has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Zespre_ has joined #ruby
mklappst_ has joined #ruby
aganov has quit [Quit: aganov]
mklappstuhl has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<ericwood> that's not really a ruby question...
geoffrey has joined #ruby
Zespre has quit [Ping timeout: 268 seconds]
<d4x> and what is :P
* d4x in console
<ericwood> a question about ruby is
persand has quit [Quit: persand]
bean has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wesside has joined #ruby
wesside has quit [Client Quit]
mmitchell has joined #ruby
Liquid-- has joined #ruby
wesside has joined #ruby
kenmaz has quit [Ping timeout: 252 seconds]
johnrlive has joined #ruby
<d4x> ericwood it's about using a class
robscomputer has quit [Remote host closed the connection]
<d4x> in irb start with require 'rubygems' require 'action_view'
robscomputer has joined #ruby
Zespre has joined #ruby
ner0x has joined #ruby
<ericwood> you asked a plain SQL question
<ericwood> idk I'm not reading scrollback
<ericwood> so ignore me
zmike123 has joined #ruby
<d4x> ah sorry
Zespre_ has quit [Ping timeout: 268 seconds]
<d4x> anyone else can help using this method which is always undefined ...till now :)
carlyle has quit [Remote host closed the connection]
ner0x has quit [Client Quit]
dawkirst has quit [Ping timeout: 256 seconds]
kil0byte has joined #ruby
kil0byte_ has quit [Ping timeout: 240 seconds]
<r0bgleeson> joshu: that's normal
Zespre has quit [Ping timeout: 252 seconds]
Zespre_ has joined #ruby
<joshu> r0bgleeson thanks
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
sambao21 has joined #ruby
timkohrumel has quit [Remote host closed the connection]
Harzilein has joined #ruby
<Harzilein> hi
<Harzilein> anyone here involved with ruby-vim?
<Harzilein> which template script would you recommend using it with?
juarlex has joined #ruby
SDr has left #ruby [#ruby]
<Harzilein> most template scripts assume mapping ft to template, so i can't make e.g. a rakefile template
<Harzilein> (also asked this on #ruby-lang)
DomKM has joined #ruby
adkron has joined #ruby
Davey has joined #ruby
<Harzilein> senayar: uhm, i know where vim-ruby is maintained, so?
dawkirst has joined #ruby
<Harzilein> s/ruby-vim/vim-ruby/ that your complaint?
Zespre_ has quit [Ping timeout: 260 seconds]
carlyle has joined #ruby
ARCADIVS has quit [Quit: WeeChat 0.3.8]
Zespre has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
jprovazn has quit [Quit: Leaving]
redgirl has quit [Quit: This computer has gone to sleep]
ner0x has joined #ruby
Zespre has quit [Ping timeout: 260 seconds]
Shirakawasuna has joined #ruby
_maes_ has joined #ruby
Zespre has joined #ruby
Shirakawasuna has quit [Read error: Connection reset by peer]
ewag_ has joined #ruby
maroloccio has joined #ruby
ewag has quit [Ping timeout: 256 seconds]
timmow has joined #ruby
nimor has joined #ruby
tylersmith has joined #ruby
tspike has joined #ruby
oceanbreeze has joined #ruby
mikecmpbll has joined #ruby
Zespre has quit [Ping timeout: 245 seconds]
Zespre has joined #ruby
bklane has quit [Remote host closed the connection]
kadoo has joined #ruby
rh1n0 has joined #ruby
haxrbyte has joined #ruby
Nitrodex has quit [Read error: Connection reset by peer]
oceanbreeze has quit [Client Quit]
tylersmith has quit [Ping timeout: 245 seconds]
_Renegade has quit [Quit: _Renegade]
bionhart has quit [Remote host closed the connection]
tk_ has quit [Quit: ばいばい]
berdario has quit [Ping timeout: 256 seconds]
Zespre has quit [Ping timeout: 246 seconds]
kadoo has quit [Client Quit]
carloslopes has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 245 seconds]
Zespre has joined #ruby
kadoo has joined #ruby
timmow_ has joined #ruby
rippa has joined #ruby
geggam has joined #ruby
<rh1n0> Hello rubyists. Im trying to create bash scripts using ruby. Is it possible to use a heredoc to create a multiline script or bash (for example) invocation?
jimg has joined #ruby
timmow has quit [Read error: Connection reset by peer]
tspike has quit [Ping timeout: 240 seconds]
<rh1n0> i was previously creating a file and piping the contents to the file then executing the file but that seems wrong
<rh1n0> or ugly
rdark has joined #ruby
kiela has quit [Ping timeout: 268 seconds]
burlyscudd has quit [Quit: Leaving.]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<rh1n0> here is a gist to explain what i mean: https://gist.github.com/rrichards/f6a603004e03e428bcb0
kiela has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
kadoo has quit [Ping timeout: 248 seconds]
thams has joined #ruby
jimg has quit [Ping timeout: 246 seconds]
alekst has joined #ruby
freeayu has quit [Remote host closed the connection]
bigoldrock has joined #ruby
zai_ has quit [Read error: Connection reset by peer]
kil0byte_ has joined #ruby
ferr has joined #ruby
<ferr> hi
GeissT_ has quit [Quit: MillBroChat AdIRC User]
dirk2 has joined #ruby
falkoner has joined #ruby
kiela has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Quit:]
kil0byte has quit [Ping timeout: 260 seconds]
ssvo has joined #ruby
mikepack has joined #ruby
tommyvyo has joined #ruby
kiela has joined #ruby
io_syl has joined #ruby
dr_bob has quit [Quit: Leaving.]
nimor has quit [Quit: nimor]
<Spooner> rh1n0, Why on earth you'd want to do that, when you could just run Ruby to do it, is anyone's guess ;)
<rh1n0> Spooner because i couldn't figure out how to do it with bash :)
<rh1n0> just curious
<Spooner> Are you trying to run Ruby from bash or bash from Ruby?
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 256 seconds]
<rh1n0> bash from ruby
<rh1n0> pragmatic bash programming - NOT :)
pipework has joined #ruby
<ccooke> Heh.
<Spooner> Yeah, but anything you can do in bash you can do better in Ruby. Isn't it better to ask how to do whatever you think you need bash to do in Ruby?
<rh1n0> i have a bunch of bash scripts I'm using for amazon autoscaling. I want to trigger them from a ruby file being used for user-data when an instance is launched. I could do it in ruby but would need to re-write my bash scripts.
<ccooke> Spooner: there are definitely times when it's better to use shell than bash
pitzips has quit [Ping timeout: 268 seconds]
<ccooke> I've been writing bash fragments in ruby for the last three weeks for work, actually
<Spooner> Oh right, just running scripts. Thought you meant heredocing the scripts inside the Ruby and then running them in sh.
<joonty> yup, like named pipes
<joonty> in fact, command redirection in general
<ccooke> rh1n0: I can't share the code (atm), but yes, a here doc is fine
kiela has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 268 seconds]
chrishough has joined #ruby
<rh1n0> thanks all - at least I know I'm not losing my mind yet
<ccooke> Spooner: my use case is maintenance. When doing maintenance on servers, you're working with files, folders, processes, signals, etc.
<rh1n0> ccooke: right - this is all server stuff I'm doing
dormiens has quit [Quit: ZNC - http://znc.in]
<ccooke> Spooner: shell has better tools for dealing with that than anything else, and whats more practically *everyone* can do a bit of shell script.
atno has quit [Ping timeout: 240 seconds]
<ccooke> What shell lacks is the ability to synchronise invocation across multiple locations and ways to pass data back to subsequent scripts
sheep_ has quit [Remote host closed the connection]
<ccooke> So I have all of that in Ruby
<rh1n0> Storimer's book on ruby processes is very good though - I'm sure you could do everything needed in ruby i just don't have the time to rewrite the scripts yet
binaryplease has quit [Ping timeout: 260 seconds]
<ccooke> rh1n0: even if you *can* do it, that doesn't mean ruby is the right tool for the job. In this case, it simply isn't.
<rh1n0> ccooke: very true
Reisen has joined #ruby
DanKnox_away is now known as DanKnox
carloslopes has joined #ruby
<ccooke> the best part of the code I'm writing is that only I (and anyone who admins the system) need to understand ruby. All the people who create a maintenance need to know is a little shell and some documentation on the shell builtins I'm suppplying.
kadoo has joined #ruby
dirk2 has quit [Quit: Leaving.]
Zespre_ has quit [Ping timeout: 248 seconds]
`MArceLL` has quit [Ping timeout: 246 seconds]
Zespre has joined #ruby
_Andres has quit [Ping timeout: 240 seconds]
danneu has joined #ruby
<Spooner> rh1n0, Anyway, you could use a tempfile thus: https://gist.github.com/Spooner/f4441aa7416da9f37837
dirk1 has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
<rh1n0> Spooner: thanks - thats actually what i was doing before. It works for sure.
<rh1n0> Spooner: actually no, i was piping each line to the temp file. This solution is even better and good enough.
<rh1n0> thanks
kemist has joined #ruby
timmow_ has quit [Read error: Connection reset by peer]
danneu has quit [Client Quit]
sailias has joined #ruby
timmow has joined #ruby
kiela has joined #ruby
geoffrey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Spooner> rh1n0, You can use -e to run arbitrary Ruby in the Bash (I updated the gist).
<rh1n0> Spooner: true - i always forget about the -e switch
Criztian has joined #ruby
brennanMKE has joined #ruby
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
Reisen has left #ruby ["WeeChat 0.4.1"]
umttumt has quit [Remote host closed the connection]
Zespre has quit [Ping timeout: 240 seconds]
kiela has quit [Ping timeout: 240 seconds]
bklane has joined #ruby
d4x has quit [Ping timeout: 240 seconds]
Zespre has joined #ruby
thetristan has joined #ruby
Astralum has quit [Ping timeout: 246 seconds]
Weems has joined #ruby
djbkd has joined #ruby
kiela has joined #ruby
Appineer has joined #ruby
Weems has quit [Max SendQ exceeded]
dirk_ has joined #ruby
Weems has joined #ruby
Appineer has left #ruby [#ruby]
jesly has joined #ruby
atno has joined #ruby
dirk_ has quit [Client Quit]
dmiller has joined #ruby
dawkirst has quit [Ping timeout: 246 seconds]
xardas has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
ckrailo has joined #ruby
ananthakumaran has joined #ruby
Zespre has quit [Ping timeout: 264 seconds]
cmarques has quit [Ping timeout: 246 seconds]
kiela has quit [Remote host closed the connection]
ybart has quit [Quit: ybart]
Zespre has joined #ruby
icole has joined #ruby
terrellt has joined #ruby
LarsSmit has left #ruby [#ruby]
akashj87 has joined #ruby
kiela has joined #ruby
flowerhack has joined #ruby
_Andres has joined #ruby
rdark has quit [Ping timeout: 240 seconds]
bobbyz has quit [Ping timeout: 276 seconds]
echevemaster_afk has quit [Ping timeout: 268 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
nanothief has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tylersmith has joined #ruby
boblu has joined #ruby
ferdev has joined #ruby
rdark has joined #ruby
geoffrey has joined #ruby
icole has quit [Ping timeout: 256 seconds]
Zespre has quit [Ping timeout: 245 seconds]
kiela has quit [Ping timeout: 252 seconds]
ferdev has quit [Client Quit]
Zespre has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
iamjarvo has quit [Quit: iamjarvo]
ldnunes has quit [Ping timeout: 260 seconds]
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
kiela has joined #ruby
ewag has joined #ruby
bobbyz has joined #ruby
ewag_ has quit [Ping timeout: 246 seconds]
ferr has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
tspike has joined #ruby
apeiros has joined #ruby
mikepack has quit [Remote host closed the connection]
geoffrey has quit [Ping timeout: 252 seconds]
burlyscudd has joined #ruby
d4x has joined #ruby
blitz has quit [Quit: This computer has gone to sleep]
bionhart has joined #ruby
freerobby has quit [Quit: Leaving.]
stkowski has joined #ruby
kasper has quit [Ping timeout: 240 seconds]
threesome has quit [Ping timeout: 246 seconds]
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 264 seconds]
AlHafoudh has quit [Quit: Computer has gone to sleep.]
kiela has quit [Ping timeout: 268 seconds]
kil0byte has joined #ruby
burlyscudd has quit [Ping timeout: 252 seconds]
flowerhack has quit [Remote host closed the connection]
kiela has joined #ruby
ferdev has joined #ruby
cantonic has quit [Quit: cantonic]
carlyle has quit [Remote host closed the connection]
thams has quit [Quit: thams]
kil0byte_ has quit [Ping timeout: 245 seconds]
slash_nick has joined #ruby
slash_nick has joined #ruby
ferdev has quit [Client Quit]
Davey has quit [Quit: Computer has gone to sleep.]
cantonic has joined #ruby
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
BSaboia has joined #ruby
Zespre_ has quit [Ping timeout: 245 seconds]
thams has joined #ruby
timkohrumel has joined #ruby
dhruvasagar has joined #ruby
kiela has quit [Ping timeout: 256 seconds]
richiebkr has quit [Read error: Connection reset by peer]
Davey has joined #ruby
cantonic_ has joined #ruby
burlyscudd has joined #ruby
senayar has quit [Remote host closed the connection]
Zespre has joined #ruby
ldnunes has joined #ruby
milardovich has joined #ruby
cantonic has quit [Ping timeout: 256 seconds]
cantonic_ is now known as cantonic
io_syl has quit [Quit: Computer has gone to sleep.]
tspike has quit [Quit: leaving]
ssvo has quit [Quit: leaving]
Zespre has quit [Ping timeout: 246 seconds]
filipe has quit [Remote host closed the connection]
matthewrobbins has quit [Read error: Operation timed out]
dagobah has quit [Remote host closed the connection]
Zespre has joined #ruby
devoldmx3 has joined #ruby
banisterfiend has quit [Remote host closed the connection]
richiebkr has joined #ruby
dankest has joined #ruby
kiela has joined #ruby
lessless has quit [Read error: Connection reset by peer]
slash_nick has quit [Remote host closed the connection]
alekst has quit [Ping timeout: 246 seconds]
pitzips has joined #ruby
rlb3 has quit [Quit: rlb3]
zigomir has quit [Quit: zigomir]
atno has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 240 seconds]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
richiebkr has quit [Client Quit]
JustinAiken has quit [Quit: Leaving.]
atno has joined #ruby
geoffrey has joined #ruby
mklappst_ has quit [Remote host closed the connection]
Solnse has joined #ruby
rlb3 has joined #ruby
Zespre_ has joined #ruby
jimg has joined #ruby
Zespre has quit [Ping timeout: 252 seconds]
nomenkun has quit [Remote host closed the connection]
ldnunes has quit [Ping timeout: 268 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
sayan has quit [Read error: Connection timed out]
freerobby has joined #ruby
kil0byte has quit [Remote host closed the connection]
sayan has joined #ruby
jesly has quit [Ping timeout: 268 seconds]
milardovich has quit [Remote host closed the connection]
DaniG2k has quit [Ping timeout: 252 seconds]
jesly has joined #ruby
mark_locklear has quit [Remote host closed the connection]
DaniG2k has joined #ruby
devoldmx has joined #ruby
jimg has quit [Ping timeout: 268 seconds]
DaniG2k has quit [Client Quit]
mendel has quit [Quit: Leaving.]
niklasb has joined #ruby
mendel has joined #ruby
timonv has quit [Remote host closed the connection]
havenwood has joined #ruby
devoldmx3 has quit [Ping timeout: 276 seconds]
burlyscudd has quit [Quit: Leaving.]
hnordt has joined #ruby
<hnordt> hello
<MrZYX> hi
<hnordt> Dir.glob('tests/\**/*Test.php') what "\**" means?
<dirk1> it means go into all folder recursively
<joelteon> you can remove the \
<hnordt> this line is written in a book about TDD, I dunno why the author scaped the first *
Keanhsiao has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
<joelteon> yeah, that's weird
<joelteon> just take out the \
<joelteon> well hang on, no
<joelteon> that's a literal \ and a *
zeade has joined #ruby
burlyscudd has joined #ruby
mmlac-bv has joined #ruby
richiebkr has joined #ruby
ephemerian has left #ruby [#ruby]
richiebkr has quit [Client Quit]
BSaboia has quit [Ping timeout: 256 seconds]
Keanhsiao has left #ruby [#ruby]
tylersmith has quit [Remote host closed the connection]
blitz has joined #ruby
niklasb has quit [Ping timeout: 260 seconds]
jdunck has joined #ruby
<hnordt> joelteon: why the literal \ is necessary?
<joelteon> it's not
<joelteon> I don't think...
<joelteon> unless he's looking for every directory that starts with a \ character
<joelteon> but nobody does that
jastix has quit [Quit: Leaving]
johnrlive has quit [Remote host closed the connection]
Voodoofish430 has joined #ruby
TheNumb has quit [Quit: ZNC - http://znc.sourceforge.net]
<hnordt> thank you joelteon
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
viszu has joined #ruby
akashj87 has quit [Ping timeout: 256 seconds]
TheNumb has joined #ruby
kemist has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tootubular has quit [Quit: tootubular]
sambao21 has quit [Quit: Computer has gone to sleep.]
chrisja has joined #ruby
sambao21 has joined #ruby
Guest14976 has quit [Changing host]
Guest14976 has joined #ruby
tvw has quit []
jesly has quit [Ping timeout: 268 seconds]
axl_ has quit [Quit: axl_]
Guest14976 is now known as C0deMaver1ck
Beoran has joined #ruby
davedev24 has quit [Remote host closed the connection]
b0oh has left #ruby [#ruby]
chrishough has quit [Quit: chrishough]
johnnyfuchs has joined #ruby
<joelteon> np
johnrlive has joined #ruby
BSaboia has joined #ruby
Beoran__ has quit [Ping timeout: 260 seconds]
DomKM has quit [Quit: Leaving.]
jesly has joined #ruby
sambao21 has quit [Client Quit]
tw1sted has quit [Ping timeout: 246 seconds]
Roa has quit [Ping timeout: 276 seconds]
k3rn3lito has quit [Ping timeout: 256 seconds]
axl_ has joined #ruby
mafolz has quit [Ping timeout: 256 seconds]
Dummies_freelanc has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
BarneyRubble has joined #ruby
k3rn3lito has joined #ruby
dpritchett has joined #ruby
slainer68 has quit [Remote host closed the connection]
gildo has quit [Ping timeout: 252 seconds]
cmarques has joined #ruby
chrishough has joined #ruby
morad has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
<BarneyRubble> basic haml q i am stuck on - to make this <div class="foo bar" is ok I can do it in a loop fine - but i need <div class="foo bar0" then bar1,2,3 etc using the iterator i - and i keep rearranging it and nothing is working - i understand the syntax is ruby so can anyone suggest a method for me to try?
<joelteon> .foo{:class => "bar#{i}"}
ainame has joined #ruby
ainame has quit [Client Quit]
JohnBat26 has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
<BarneyRubble> will try
geoffrey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
icole has joined #ruby
<joelteon> yeah, you can combine .class and :class => "..."
chichou has joined #ruby
ssvo has joined #ruby
ainame has joined #ruby
richiebkr has joined #ruby
geoffrey has joined #ruby
jdunck has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
mahmoudimus has joined #ruby
ainame has quit [Client Quit]
Dummies_freelanc has quit [Ping timeout: 252 seconds]
ainame has joined #ruby
dmiller has quit [Remote host closed the connection]
<BarneyRubble> joelteon, that is new syntax to me but it worked, almost perfect, that gives me - div class='bar0 foo' van i force it to div class='foo bar0' ?
morad has quit []
<joelteon> why would you do that?
timonv has quit [Remote host closed the connection]
<BarneyRubble> dont have a reason except it is in the html i need to generate
blaxter has quit [Ping timeout: 248 seconds]
saarinen has joined #ruby
<MrZYX> it's equivalent
<davidcelis> BarneyRubble: HTML doesn't care how classes are ordered
<davidcelis> it's the same
Roa has quit [Ping timeout: 245 seconds]
icole has quit [Ping timeout: 276 seconds]
<BarneyRubble> learn smth new every day
k3rn3lito has quit [Ping timeout: 246 seconds]
arietis has joined #ruby
alup has quit [Quit: Leaving]
AlSquire has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
relix has joined #ruby
codecop has joined #ruby
krisfremen has quit [Ping timeout: 252 seconds]
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
codezombie has joined #ruby
k3rn3lito has joined #ruby
mikepack has joined #ruby
berdario has joined #ruby
gildo has joined #ruby
Acidtrux is now known as bklang
linusoleander has quit [Quit: linusoleander]
carlyle has joined #ruby
rupee has joined #ruby
<codezombie> is there a good way in ruby via regex to match a pattern, but don't count duplicates? For example, this pattern: (?=(\w{4})) that works, but returns duplicates. I'd like to do something like... /(?=(\w{4}){1})/ However, this doesn't work. The result from the first regex returns over 100k results. Looping through 100k results to remove duplicates is really, really slow in ruby. I'd like to speed it up.
dhruvasagar has joined #ruby
timonv has joined #ruby
ry4nn has joined #ruby
krisfremen has joined #ruby
slash_nick has joined #ruby
slash_nick has joined #ruby
slash_nick has quit [Changing host]
tw1sted has joined #ruby
nimor has joined #ruby
<apeiros> codezombie: a) how do you remove the duplicates? b) use scan + Set
hakunin has quit [Ping timeout: 252 seconds]
hakunin has joined #ruby
dmiller has joined #ruby
<codezombie> apeiros: I've tried a few ways to remove the duplicates... 1st, by using a select block, and checkout the count with array.count(str). 2nd, byt using delete_if with and checking the count. 3rd by using a regex to find the duplicate entries, and then looping over just the returned duplicates, and calling delete... All of that was really slow.
<codezombie> apeiros: can you elaborate a bit more on + Set?
richiebkr has quit [Quit: richiebkr]
<codezombie> ah nvm
wsterling has joined #ruby
<apeiros> codezombie: well, no wonder that's slow. why didn't you simply use Array#uniq?
<codezombie> however, set won't work because I need to remove all instance of the duplicate... so, in the instance of %w[a b c a] I should only return %w[b c]
<apeiros> it's O(n), unlike your O(n^2) or worse custom solutions…
pipework has quit [Remote host closed the connection]
asteve has quit [Ping timeout: 256 seconds]
<codezombie> apeiros: because uniq leaves one of the duplicate values... if > 1 exists, remove them all.
<apeiros> o0
<codezombie> yeah, so to my example... %w[a b c a] should result in %w[b c]
niceguyjames has joined #ruby
berdario has quit [Ping timeout: 256 seconds]
<apeiros> I'm not sure whether your explanation still makes sense - might just me being tired, though.
mrsolo has joined #ruby
Zai00 has quit [Quit: Zai00]
Liquid-- has quit [Ping timeout: 240 seconds]
<codezombie> k, let me try this way... take this into account: "a,b,c,a". There's 2 a's in the array. I want to remove them both, and leave only the unique values, resulting in "b,c".
richiebkr has joined #ruby
richiebkr has quit [Client Quit]
JustinAiken has joined #ruby
<codezombie> I'm not sure how to break it down other than that. :/
<apeiros> I don't see the connection to your initial question
<apeiros> but for your current question, you'd use a counting hash
DomKM has joined #ruby
<apeiros> h = Hash.new(0); ary.each do |item| h[item] += 1 end; h.select { |k,v| v == 1 }.keys
sambao21 has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
wsterling has quit [Read error: Connection reset by peer]
<codezombie> apeiros: it's a simplified version. basically, "a,b,c,a" is the result of the first regex (?=(\w{4})). 4 being a arbitrary number, just specifiying length to match. Could be 1, could be 100... Anyhow, I'd like to (if possible) modify the regex to not return the duplicates, so no further processing is required.
burlyscudd has quit [Quit: Leaving.]
wsterling has joined #ruby
<codezombie> I think I need more caffeine.
<codezombie> loops, no matter what I do in them are slow, since the number of iterations can be 100k+
persand has joined #ruby
persand has quit [Client Quit]
timonv has quit [Remote host closed the connection]
richiebkr has joined #ruby
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
mansi has quit [Remote host closed the connection]
eighty4 has left #ruby ["Textual IRC Client: www.textualapp.com"]
_Renegade has joined #ruby
<apeiros> codezombie: you need to understand big-O
<apeiros> if you loop inside a loop, that's quite a lot slower than a single loop
havenwood has quit [Remote host closed the connection]
<apeiros> 100k iterations don't take that long.
asteve has joined #ruby
<apeiros> 100k^2 iterations - yes, that hurts.
<apeiros> and that's what array.count(str) in an array.select does.
havenwood has joined #ruby
<codezombie> ah, yeah that makes sense.
<terrellt> Ah, O(n), how I love you.
geoffrey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> and no, you can't tell a regex to not match a previous match again in any sane way.
tylersmith has joined #ruby
<apeiros> but I'm pretty sure you can go about your real problem differently.
<davidcelis> terrellt: not as much as O(log n)
ellipse has quit [Read error: Connection reset by peer]
<codezombie> lies! regex is the answer to all of our problems! ;)
<davidcelis> or, better yet, O(1)
<wuest> codezombie: now you have 2 problems.
elliptical has joined #ruby
timmow has quit [Ping timeout: 240 seconds]
<apeiros> [9] pry(main)> pbench 5,1 do c=Hash.new(0); ary.each { |i| c[i]+=1 }; c.select { |k,v| v == 1 }.keys end
<apeiros> ø 166.000000ms (0.0%)
<apeiros> don't know about you, but I think 166ms isn't "slow"
<apeiros> ary.size == 100_000 btw.
richiebkr has quit [Quit: richiebkr]
havenwood has quit [Ping timeout: 245 seconds]
khushildep has quit [Ping timeout: 252 seconds]
<codezombie> yeah, I was speaking in terms of the list I was working with. However, I think I've got an idea based on your example. Thanks.
alvaro_o has joined #ruby
jaimef has quit [Excess Flood]
baroquebobcat has joined #ruby
lyanchih has quit [Quit: lyanchih]
ldnunes has joined #ruby
redgirl has joined #ruby
oceanbreeze has joined #ruby
d4x has quit [Excess Flood]
jaimef has joined #ruby
d4x has joined #ruby
d4x has quit [Changing host]
d4x has joined #ruby
LanaDelRey has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
trent has quit [Quit: WeeChat 0.3.2]
axl_ has quit [Quit: axl_]
<codezombie> apeiros: thanks again, that works perfectly
LarsSmit has joined #ruby
Al__ has quit [Quit: Al__]
AlHafoudh has joined #ruby
havenwood has joined #ruby
geoffrey has joined #ruby
mikk has joined #ruby
axl_ has joined #ruby
generali_ has quit [Remote host closed the connection]
io_syl has joined #ruby
saarinen has quit [Quit: saarinen]
boblu has quit [Ping timeout: 256 seconds]
rh1n0 has quit [Quit: -- I'm out --]
adambeynon has joined #ruby
terrellt has quit [Ping timeout: 252 seconds]
krisfremen has quit [Read error: Operation timed out]
mikk has quit [Ping timeout: 240 seconds]
hattusili_III has joined #ruby
saarinen has joined #ruby
davedev24 has quit [Remote host closed the connection]
mengu has joined #ruby
davedev24 has joined #ruby
jdunck has joined #ruby
rupee is now known as waffleblotter
jbpros has joined #ruby
waffleblotter is now known as wafflerust
wafflerust is now known as waffleblotter
enebo has quit [Quit: enebo]
burlyscudd has joined #ruby
mark_locklear has joined #ruby
jacobw has joined #ruby
terrellt has joined #ruby
richiebkr has joined #ruby
emmanuelux has joined #ruby
burlyscudd has quit [Client Quit]
burlyscudd has joined #ruby
thoughtpunch has joined #ruby
werdnativ has joined #ruby
waffleblotter is now known as rsut
splittingred has quit [Quit: splittingred]
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
jbpros has quit [Ping timeout: 256 seconds]
icole has joined #ruby
hattusili_III has quit [Ping timeout: 256 seconds]
rdark_ has joined #ruby
rsut has quit [Quit: Leaving]
xardas has quit [Remote host closed the connection]
jimg has joined #ruby
rupee has joined #ruby
iamjarvo has joined #ruby
rdark has quit [Ping timeout: 264 seconds]
richiebkr has quit [Read error: Connection reset by peer]
jrhe has quit [Quit: jrhe]
elliptical has quit [Read error: Connection reset by peer]
BSaboia has quit [Ping timeout: 268 seconds]
ellipse has joined #ruby
richiebkr has joined #ruby
hattusili_III has joined #ruby
rdark_ has quit [Ping timeout: 246 seconds]
jimg has quit [Ping timeout: 264 seconds]
berdario has joined #ruby
ramblex has quit [Remote host closed the connection]
splittingred has joined #ruby
niklasb has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tootubular has joined #ruby
RORgasm has quit [Ping timeout: 245 seconds]
dmiller has quit [Remote host closed the connection]
RORgasm has joined #ruby
rdark has joined #ruby
estebanrules has joined #ruby
mocfive has joined #ruby
caleon has joined #ruby
jbpros has joined #ruby
robscomputer has quit [Ping timeout: 276 seconds]
jesly has quit [Quit: Leaving.]
mfletcher has joined #ruby
heftig has quit [Quit: Quitting]
bradleyprice has joined #ruby
<MarcWeber> is there a standard way to run compilers using rake, such as ocamlopt?
MarcWeber has left #ruby [#ruby]
MarcWeber has joined #ruby
hattusili_III has quit [Ping timeout: 256 seconds]
heftig has joined #ruby
brotatos has joined #ruby
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akells` has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 240 seconds]
heftig has quit [Client Quit]
sayan has quit [Ping timeout: 245 seconds]
atmosx has joined #ruby
heftig has joined #ruby
<Xeago> which patch version of 1.9.3 is recommended
<Xeago> 392?
fermion has quit [Ping timeout: 245 seconds]
ferdev has joined #ruby
<lectrick> Does anyone have any opinion on exposing simple sequential integer ID's (database ID's) in an API (or not)?
sideshowcoder has quit [Read error: Operation timed out]
<lectrick> I'm wondering when the time is to consider GUID's
daaaan_ is now known as daaaan
jbpros has quit [Quit: jbpros]
<Xeago> lectrick: usually GUIDs come in to play once you have to generate keys across multiple locations at the same tim
<Xeago> e
atmosx has quit [Client Quit]
<havenwood> Xeago: Why no p429?
<lectrick> Since API's are partly to facilitate interoperability between systems, I felt that database ID collision suddenly becomes more of a factor
<lectrick> Xeago: ^
davedev24 has quit [Remote host closed the connection]
rezzack has joined #ruby
<Xeago> havenwood: more widespread use, seemed to be the most popular one of the 1.9.3 series
<Xeago> but 429 is fine I spose
<Xeago> lectrick: tell your API consumers to treat keys as variable length strings, they won't generate them
s3m73x has quit [Remote host closed the connection]
fermion has joined #ruby
<Xeago> Don't get how those would collide?
nomenkun has joined #ruby
zigomir has joined #ruby
<Xeago> If I remember correctly the standardized ISO has 56bits more than plenty for most usecases
pkrnj has joined #ruby
<lectrick> Xeago: If we expose simple database ID's, and they wanted to import any of that data and it was relational, ID collision becomes an issue mitigated by UUID's
BizarreCake has quit [Ping timeout: 246 seconds]
rdark has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
Voodoofish430 has left #ruby [#ruby]
<Xeago> lectrick: still don't see the problem, if you are generating the ID's on atomically (on 1 machine or multiple in communication) there is no problem
sideshowcoder has joined #ruby
alex__c2022 has joined #ruby
rdark has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
tobiasvl has quit [Ping timeout: 260 seconds]
axl_ has quit [Client Quit]
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
browndawg has quit [Ping timeout: 240 seconds]
Oddnoun_ has joined #ruby
chipotle_ has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
Oddnoun has quit [Ping timeout: 240 seconds]
Oddnoun_ is now known as Oddnoun
kadoo has joined #ruby
chipotle_ has quit [Client Quit]
kadoo has quit [Max SendQ exceeded]
Pequinno has joined #ruby
mwlang has quit [Quit: mwlang]
kadoo has joined #ruby
<BarneyRubble> another basic question, this time of concepts not syntax, can haml and scss share variables?
sambao21 has quit [Quit: Computer has gone to sleep.]
icole_ has joined #ruby
milardovich has joined #ruby
<MrZYX> I guess that's more a #RubyOnRails question
rdark has quit [Ping timeout: 268 seconds]
Squarepy has joined #ruby
tobiasvl has joined #ruby
guilleiguaran__ is now known as guilleiguaran_
<Mon_Ouie> MarcWeber: There's the rule syntax to specify how to use it (like make's rules if you're familiar with them) and inside those rules you'd just use the #sh method to call your compiler with the input file
sambao21 has joined #ruby
<BarneyRubble> MrZYX, trying now thx
icole has quit [Ping timeout: 245 seconds]
ryanf_ has joined #ruby
ryanf_ has quit [Client Quit]
mmlac-bv has quit [Quit: mmlac-bv]
JustinAiken has quit [Quit: Leaving.]
s3m73x has joined #ruby
Kopukkk has joined #ruby
Weems has quit [Ping timeout: 256 seconds]
<Kopukkk> sohbetkedisi.c...o...m YENÝ SOHBET ADRESÝMÝZZZZZZZZZZZZZ ....
Kopukkk has quit [Killed (idoru (Spam is off topic on freenode.))]
<MarcWeber> Mon_Ouie: :-) Thanks. Exactly what I was looking for.
centr0 has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tatsuya_o has joined #ruby
_Renegade has quit [Quit: _Renegade]
DrShoggoth has joined #ruby
havenwood has quit [Remote host closed the connection]
shadoi has joined #ruby
workmad3 has joined #ruby
medk has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
Havoc_ has joined #ruby
generalissimo has joined #ruby
rdark has joined #ruby
interactionjaxsn has joined #ruby
johnmilton has joined #ruby
davedev24 has joined #ruby
LarsSmit has quit [Quit: Leaving.]
rovert has joined #ruby
<Havoc_> Anyone know why this isnt working http://pastebin.com/mT70gJ4L
rovert is now known as rovert_
linsy has quit [Ping timeout: 252 seconds]
verto has joined #ruby
rovert_ is now known as rovert_0
tatsuya_o has quit [Remote host closed the connection]
interactionjaxsn has quit [Read error: Connection reset by peer]
interact_ has joined #ruby
harrymoreno has joined #ruby
machuga is now known as machuga|away
rdark_ has joined #ruby
browndawg has joined #ruby
browndawg has left #ruby [#ruby]
<MrZYX> Havoc_: please include the real exception you're getting and the real code, your examples contain no interpolations
rdark has quit [Ping timeout: 248 seconds]
rovert_0 is now known as rovert_
dmiller has joined #ruby
<MrZYX> also have a look at File::read
falkoner1 has joined #ruby
havenwood has joined #ruby
<Mon_Ouie> Also, you'll want to use CGI.escape rather than substituting manually
falkoner has quit [Ping timeout: 241 seconds]
perun0 has quit [Ping timeout: 240 seconds]
terrellt has quit [Ping timeout: 252 seconds]
kadoo has joined #ruby
kadoo has quit [Max SendQ exceeded]
rdark has joined #ruby
dmiller has quit [Ping timeout: 245 seconds]
rdark_ has quit [Ping timeout: 276 seconds]
kadoo has joined #ruby
akells` has joined #ruby
kadoo has quit [Max SendQ exceeded]
thoolihan has joined #ruby
kadoo has joined #ruby
kadoo has quit [Max SendQ exceeded]
oceanbreeze has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
AlHafoudh has quit [Quit: Computer has gone to sleep.]
<Havoc_> Here is the real code http://pastebin.com/L6XvP5Bc
kadoo has joined #ruby
byprdct has joined #ruby
cantonic has quit [Quit: cantonic]
pkrnj has quit [Quit: Computer has gone to sleep.]
terrellt has joined #ruby
boblu has joined #ruby
<Mon_Ouie> Probably because you have a line return at the end of your file or something similar
Fire-Dragon-DoL has joined #ruby
milardovich has quit [Remote host closed the connection]
<MrZYX> Havoc_: also gsub! may return nil if it didn't actually modified anything
TheDick has quit [Quit: TheDick]
hnordt has quit [Quit: Page closed]
<MrZYX> (you want the non bang version)
slainer68 has joined #ruby
<AndChat|> Mon_ouie, 'lutte
<Havoc_> I had some puts in there, it appears to be modifying it to 100+Avery+St
berdario has quit [Remote host closed the connection]
<Mon_Ouie> Use 'p', not 'puts', to see what the string really is (there can be non-visible characters in there)
<Mon_Ouie> You should still use the methods that have been mentioned earlier and File.write takes a file name, not a file object
<MrZYX> Havoc_: File.write wants a filename as first argument, no File object
sepp2k has quit [Quit: Leaving.]
io_syl has quit [Quit: Textual IRC Client: www.textualapp.com]
<MrZYX> ah, too slow
<Mon_Ouie> AndChat|: 'alut
io_syl has joined #ruby
Pequinno has quit [Quit: Leaving.]
TheDick has joined #ruby
ravster has joined #ruby
bricker has joined #ruby
jimg has joined #ruby
<Havoc_> I search the cgi.escape.. didnt find anything in the core 2.0 docs... found regexp.escape
pipework has joined #ruby
Voodoofish430 has joined #ruby
<Mon_Ouie> It's not in core, it's in stdlib. You need require 'cgi' to use it.
<Havoc_> ah ok
mmlac-bv has joined #ruby
patbr0wn has joined #ruby
Nitrodex has joined #ruby
<Havoc_> Is it just slower to use a file object for File.write.. cause it seems to work when provided with the file object too?..
Nitrodex is now known as Guest87428
mityaz has joined #ruby
troessner has quit [Read error: Connection reset by peer]
Weems has joined #ruby
Floydzy has joined #ruby
jbpros has joined #ruby
Weems has quit [Max SendQ exceeded]
<Mon_Ouie> Oh, so it does. Well, it is more "dangerous" because the file won't be closed if File.write raises an exception for some reason
Weems has joined #ruby
<Mon_Ouie> If you use File.write with a filename it will take core of closing it itself, avoiding any such issues
linsy has joined #ruby
<Mon_Ouie> (You generally want to use File.open with a block when you can't use File.read/File.write directly)
burlyscudd has quit [Quit: Leaving.]
jimg has quit [Ping timeout: 264 seconds]
Weems has quit [Max SendQ exceeded]
<Havoc_> Ah you are right.. there is a /r/n in the file
Weems has joined #ruby
perun0 has joined #ruby
<Mon_Ouie> Use String#chomp to remove it
wildcard0 has quit [Ping timeout: 248 seconds]
denver has quit [Remote host closed the connection]
<MrZYX> If I recall correctly there was some method File::write etc calls on the filename argument, which returns the opened path for IO objects
eldariof has joined #ruby
<MrZYX> so you're opening the file twice this way
wildcard0 has joined #ruby
<Havoc_> Ah nice, its working now
tw1sted has quit [Quit: tw1sted]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
timonv has joined #ruby
nyuszika7h has quit [Read error: Operation timed out]
jacktrick has joined #ruby
karnowski has quit [Ping timeout: 248 seconds]
machuga|away is now known as machuga
phasma has quit [Ping timeout: 252 seconds]
NimeshNeema has quit [Ping timeout: 260 seconds]
guilleiguaran_ has quit [Ping timeout: 248 seconds]
heidar has quit [Ping timeout: 252 seconds]
pkrnj has joined #ruby
rwz__ has quit [Ping timeout: 276 seconds]
mroth has quit [Ping timeout: 245 seconds]
im0b has quit [Ping timeout: 252 seconds]
johnrlive has quit [Read error: Operation timed out]
alex88 has quit [Ping timeout: 260 seconds]
lectrick has quit [Ping timeout: 260 seconds]
Guest85414__ has quit [Ping timeout: 276 seconds]
davidboy has quit [Ping timeout: 245 seconds]
xerxas has quit [Ping timeout: 256 seconds]
DrCode has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Quit: iamjarvo]
geoffw8_ has quit [Ping timeout: 248 seconds]
TheHodge has quit [Ping timeout: 248 seconds]
[Neurotic] has quit [Ping timeout: 260 seconds]
ZadYree has quit [Ping timeout: 260 seconds]
bluehavana has quit [Ping timeout: 240 seconds]
mtlatif__ has quit [Ping timeout: 252 seconds]
iaj has quit [Remote host closed the connection]
Kabaka has quit [Ping timeout: 240 seconds]
cool has quit [Ping timeout: 252 seconds]
ziyadb has quit [Ping timeout: 252 seconds]
robscomputer has joined #ruby
wedgeV_ has quit [Ping timeout: 248 seconds]
fcoury__ has quit [Ping timeout: 264 seconds]
moeSeth has quit [Ping timeout: 248 seconds]
Bish has quit [Quit: ZNC - http://znc.sourceforge.net]
chuk has quit [Ping timeout: 260 seconds]
iaj has joined #ruby
martxel has quit [Ping timeout: 245 seconds]
Spaceghost|cloud has quit [Ping timeout: 240 seconds]
Weazy has quit [Ping timeout: 240 seconds]
Havoc_ has quit [Ping timeout: 250 seconds]
m4dnificent has joined #ruby
jerius_ has joined #ruby
brotatos has quit [Ping timeout: 260 seconds]
yeban has quit [Ping timeout: 260 seconds]
DrCode has joined #ruby
wedgeV has joined #ruby
parus has quit [Ping timeout: 245 seconds]
caveat- has quit [Ping timeout: 245 seconds]
z has quit [Ping timeout: 252 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
notbrent__ has quit [Ping timeout: 248 seconds]
swistak35 has quit [Ping timeout: 252 seconds]
strax has quit [Ping timeout: 252 seconds]
diddlybop has joined #ruby
Weazy has joined #ruby
rdark_ has joined #ruby
davidboy has joined #ruby
keyvan has quit [Ping timeout: 248 seconds]
chiel has quit [Ping timeout: 245 seconds]
bionhart has quit [Remote host closed the connection]
z has joined #ruby
thejefflarson___ has quit [Ping timeout: 276 seconds]
Naeblis has quit [Ping timeout: 264 seconds]
fermion has quit [Quit: Computer has gone to sleep.]
chiel has joined #ruby
cool has joined #ruby
z is now known as Guest37788
madnificent has quit [Ping timeout: 248 seconds]
caveat- has joined #ruby
devoldmx has quit [Quit: Bye]
strax has joined #ruby
dnyy has quit [Ping timeout: 264 seconds]
swistak35 has joined #ruby
nyuszika7h_ has joined #ruby
chuk has joined #ruby
devoldmx has joined #ruby
_rgn has quit [Ping timeout: 262 seconds]
rcsheets has quit [Ping timeout: 240 seconds]
Kabaka has joined #ruby
jerius has quit [Ping timeout: 268 seconds]
sonne has quit [Ping timeout: 248 seconds]
patbr0wn has quit [Ping timeout: 245 seconds]
18WADFR2B has quit [Ping timeout: 246 seconds]
Bish has joined #ruby
rdark has quit [Ping timeout: 240 seconds]
patbr0wn has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
mtlatif__ has joined #ruby
prime has quit [Ping timeout: 246 seconds]
rcsheets has joined #ruby
sumark has quit [Remote host closed the connection]
alex88 has joined #ruby
dpritchett has quit [Quit: This computer has gone to sleep]
burlyscudd has joined #ruby
guilleiguaran__ has joined #ruby
ZadYree has joined #ruby
Spami has joined #ruby
nyuszika7h_ is now known as nyuszika7h
jtharris has quit [Quit: WeeChat 0.4.0]
martxel has joined #ruby
sumark has joined #ruby
prime has joined #ruby
parus has joined #ruby
martxel is now known as Guest28377
sonne has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
rcsheets has left #ruby [#ruby]
niklasb has joined #ruby
saarinen has quit [Quit: saarinen]
byprdct has quit [Ping timeout: 240 seconds]
rdark_ has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
fermion has joined #ruby
relix has joined #ruby
vlad_starkov has joined #ruby
atno has quit [Quit: Leaving]
rdark has joined #ruby
JumpMast3r has joined #ruby
atno has joined #ruby
Doc_X has quit [Read error: Connection reset by peer]
dirk1 has quit [Quit: Leaving.]
atno has quit [Client Quit]
Voodoofish430 has quit [Read error: Connection reset by peer]
busybox42 has quit [Read error: Operation timed out]
iamjarvo has joined #ruby
ndngvr has quit [Read error: Operation timed out]
Doc_X has joined #ruby
ddd has quit [Read error: Operation timed out]
uxp has quit [Read error: Operation timed out]
chrishough has quit [Quit: chrishough]
xibalba has quit [Ping timeout: 252 seconds]
Voodoofish430 has joined #ruby
CreamTart has quit [Read error: Operation timed out]
pitzips has quit [Ping timeout: 276 seconds]
atno has joined #ruby
jbpros has quit [Read error: Connection reset by peer]
uxp has joined #ruby
jbpros has joined #ruby
bricker has quit [Quit: leaving]
d2dchat has joined #ruby
sayan has joined #ruby
yacks has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
busybox42 has joined #ruby
CreamTart has joined #ruby
yacks has joined #ruby
xibalba has joined #ruby
ddd has joined #ruby
JustinAiken has joined #ruby
JustinAiken has quit [Client Quit]
estebanrules has quit [Quit: estebanrules]
Havoc_ has joined #ruby
scipi0 has quit [Ping timeout: 264 seconds]
jdunck has quit [Ping timeout: 276 seconds]
mocfive has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
Guest37788 has quit [Changing host]
Guest37788 has joined #ruby
tw1sted has joined #ruby
jdunck has joined #ruby
Guest37788 is now known as z
myappleguy has left #ruby [#ruby]
ferr has joined #ruby
brennanMKE has quit [Remote host closed the connection]
brice_ has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
mocfive has joined #ruby
jasonkuhrt has joined #ruby
<brice_> hi guys
mmlac-bv has quit [Quit: mmlac-bv]
johnrlive has joined #ruby
vlad_starkov has joined #ruby
<MrZYX> hi
kevinykchan has quit [Quit: Computer has gone to sleep.]
<brice_> im new to ruby/irc
<brice_> so..what do you guys talk about here? haha
brianpWins has joined #ruby
<MrZYX> ruby!
bricker has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<havenwood> brice_: About the new look of Github repos... what do you think?!
paissad_ has quit [Ping timeout: 246 seconds]
sayan has quit [Ping timeout: 256 seconds]
<MrZYX> it's active already for you?
<havenwood> MrZYX: Ya, a banner popped up offering.
<havenwood> MrZYX: I figured it did for everyone? Maybe they're doing a gradual rollout?
<brice_> nothing changed for me yet
<MrZYX> according the the blog post they do
<MrZYX> did get the banner yet
<MrZYX> did you recall the link? :P
<MrZYX> *do you
cantonic has joined #ruby
eldariof has quit [Ping timeout: 240 seconds]
<havenwood> hrm, nope
<brice_> MrZYX and havenwood: hi guys, i still dont know much about github. i just got into ruby/rails last month.
Dekade has joined #ruby
jtharris has joined #ruby
<havenwood> brice_: Lots of great Ruby to read on the Githubs and open source projects to contribute to.
Davey has quit [Quit: Computer has gone to sleep.]
<brice_> havenwood: what does it mean to contribute? im still a noob...what do i have to contribute? haha
<havenwood> brice_: A great thing to contribute early on is documentation!
<brice_> havenwood: is contributing like offering advice?
<havenwood> brice_: I had fun doing manpages for chruby and ruby-install. Been meaning to write a less-pathetic manpage for gem.
Spami has quit [Ping timeout: 264 seconds]
bionhart has joined #ruby
fermion has quit [Quit: Computer has gone to sleep.]
<havenwood> brice_: Contributing is everything from opening an Issue ticket with a feature idea or bug you've noticed, to fixing typos in the README.md, or adding code.
<brice_> havenwood: ohh i see
paissad_ has joined #ruby
<brice_> havenwood: i can def do spell check..
<havenwood> brice_: Fixing README typos is a way to contribute if you can't write code at all but you can spell! (I can't.)
workmad3 has joined #ruby
<brice_> havenwood: hahah. what would you say are good ways to practice coding in ruby?
ianbrandt has joined #ruby
<havenwood> brice_: The list of resources on ruby-lang is a good start: http://www.ruby-lang.org/en/documentation/
<brice_> havenwood: i followed hartl's rails tutorial, agile web depot tutorial. i succesffuly deployed it, but dnt really understand the concepts
thoolihan has quit [Quit: thoolihan]
cmarques has quit [Ping timeout: 246 seconds]
<havenwood> brice_: Definitely take tryruby.org for a spin, especially if you're new to programming.
axl_ has quit [Quit: axl_]
<havenwood> brice_: A hint, if you sign up for free CodeSchool account, TryRuby.org will save your place.
Squarepy has quit [Quit: Leaving]
jerius has joined #ruby
<brice_> havenwood: any cool open source projects you know in particular that could use my spellchecking services?
milardovich has joined #ruby
postmodern has joined #ruby
jacktrick has quit [Quit: Leaving]
<havenwood> brice_: RubyKoans are great. Bit steeper learning curve, but nice to start on and go further as you're able.
jtharris has quit [Ping timeout: 276 seconds]
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> brice_: Anything of mine is probably spelled terribad: https://github.com/havenwood
atno has quit [Remote host closed the connection]
<brice_> havenwood: i will start there then!
<havenwood> brice_: Would be awesome if you'd want to give chruby README and Wikis a look! https://github.com/postmodern/chruby
_Renegade has joined #ruby
<havenwood> brice_: That is used by more and more people. ^
jtharris has joined #ruby
<brice_> havenwood: whats chruby?
<havenwood> brice_: Or ruby-install too. Less to review there: https://github.com/postmodern/ruby-install
jerius_ has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<havenwood> brice_: It is a system tool to select your current Ruby.
Apane has joined #ruby
atno has joined #ruby
<havenwood> brice_: So if you have JRuby and Ruby installed, you can choose to use Ruby like `chruby ruby` and JRuby like `chruby jruby`.
<havenwood> brice_: It sets the environment variables correctly to point at the Ruby you've chosen.
<brice_> havenwood: oh ok. so if i see a typo, how do i change it?
<havenwood> brice_: It is an alternative to tools like RVM and rbenv.
Havoc_ has quit [Ping timeout: 250 seconds]
<havenwood> brice_: The chruby and ruby-install projects are actually written in Bash, not Ruby. :O
<havenwood> brice_: In the Wiki, just click edit, explain your change, and its changed.
krawchyk_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<havenwood> brice_: For the README.md, click on the file in Github and click edit, and you'll be guided through a pull request.
thoolihan has joined #ruby
lectrick has joined #ruby
<havenwood> brice_: Wiki and pull requests, etcetera can be done from the command line - but the Github GUI makes it accessible.
hattusili_III has joined #ruby
<havenwood> brice_: Also, grammar and spelling in comments that are in the code itself often can use some love.
ziyadb has joined #ruby
ziyadb has joined #ruby
<havenwood> brice_: Like here is an example documentation fix: https://github.com/postmodern/ruby-install/commit/a7850283bb7da9881d8c4529eae96780f67078e3
brotatos has joined #ruby
krawchyk has quit [Ping timeout: 256 seconds]
brennanMKE has joined #ruby
jimg has joined #ruby
<brice_> havenwood: oh cool. how do i edit stuff like that? is there an edit button for that too
ferr has quit [Ping timeout: 240 seconds]
sayan has joined #ruby
<havenwood> Yeah, you can browse through the files in a project and click and hit edit.
<brice_> nicee
<brice_> appreciate all your help by the way
<havenwood> Easier to do for quick changes than to fork the repo, branch it, commit the change, pull request.
axl_ has joined #ruby
<havenwood> brice_: No prob. Oh, if you don't already know, #RubyOnRails is the Rails channel if you end up doing more Rails. Here is Ruby.
rovert_ has quit [Ping timeout: 256 seconds]
PigDude has joined #ruby
cj3kim has joined #ruby
<PigDude> has anyone seen this? ruby gem reported as missing but it is installed: http://bpaste.net/show/iJAKFpTzIR8Ect3HU9S3/
iamjarvo_ has joined #ruby
jimg has quit [Ping timeout: 260 seconds]
Zai00 has joined #ruby
<brice_> thanks!
brennanMKE has quit [Read error: Connection reset by peer]
Spami has quit [Ping timeout: 246 seconds]
<PigDude> hm ...
carloslopes has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 264 seconds]
iamjarvo_ is now known as iamjarvo
bklane has quit [Remote host closed the connection]
saarinen has joined #ruby
freerobby has quit [Quit: Leaving.]
devoldmx has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
rdark has quit [Ping timeout: 240 seconds]
dash_ has quit [Quit: Time to beer :)]
Davey has joined #ruby
iamjarvo has quit [Quit: iamjarvo]
<havenwood> PigDude: Try running `bundle` to install the gem dependencies in your Gemfile.
<havenwood> PigDude: Ick, 1.8! :P
<havenwood> PigDude: Can you switch to Ruby 2.0?
<havenwood> PigDude: 1.8 is end-of-lifed.
tonini has joined #ruby
<PigDude> havenwood, it's an old application, but what's weird is that this started happening all of a sudden
<PigDude> havenwood, its a ruby 1.8 rails 2 app
<havenwood> PigDude: ah
<PigDude> is there a way to get some more verbose output out of rake?
<PigDude> really strange for the path to change in the middle, or something
<ericwood> --trace
mmlac-bv has joined #ruby
iamjarvo has joined #ruby
brennanMKE has joined #ruby
iamjarvo has quit [Remote host closed the connection]
<PigDude> hm, nothing interesting with --trace
wsterling has quit [Remote host closed the connection]
dcunit3d has joined #ruby
dcunit3d has quit [Client Quit]
failshell has quit [Remote host closed the connection]
<ericwood> --verbose
yekta has joined #ruby
<ericwood> --trace will show you real stack traces on failures
<ericwood> it's up to the task to give more/less verbose output
<ericwood> it's not rake's fault
sambao21 has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
thoolihan has quit [Quit: thoolihan]
LanaDelRey has quit [Quit: Leaving]
obs has joined #ruby
rdark has joined #ruby
wsterling has joined #ruby
Criztian has quit [Remote host closed the connection]
alecs has joined #ruby
LucasTT has joined #ruby
sambao21 has joined #ruby
Apane has quit [Ping timeout: 246 seconds]
wsterling has quit [Read error: Connection reset by peer]
<LucasTT> what is the best place to learn ruby?
ryannielson has quit [Quit: ryannielson]
wsterling has joined #ruby
sambao21 has quit [Client Quit]
devoldmx has joined #ruby
workmad3 has quit [Read error: Operation timed out]
sambao21 has joined #ruby
adambeynon has joined #ruby
<blitz> LucasTT the official ruby site http://www.ruby-lang.org/en/documentation/quickstart/
harrymoreno has quit [Ping timeout: 264 seconds]
harrymoreno_ has joined #ruby
harrymoreno_ is now known as harrymoreno
sayan has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
byprdct has joined #ruby
chrishough has joined #ruby
rdark has quit [Quit: leaving]
caleon has quit [Remote host closed the connection]
freerobby has joined #ruby
chrishough has quit [Client Quit]
kasper has joined #ruby
danshultz has joined #ruby
Xugagug has quit [Quit: Linkinus - http://linkinus.com]
AlHafoudh has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Evixion has joined #ruby
Kar- has joined #ruby
obs has quit [Quit: Konversation terminated!]
Criztian has joined #ruby
Weems has quit [Changing host]
Weems has joined #ruby
mfletcher has left #ruby [#ruby]
JustinAiken has joined #ruby
yekta has quit [Quit: yekta]
jimg has joined #ruby
axl_ has quit [Quit: axl_]
Floydzy has quit [Quit: Floydzy]
boblu has quit [Ping timeout: 264 seconds]
failshell has joined #ruby
chichou has quit [Remote host closed the connection]
bklane has joined #ruby
brice_ has left #ruby ["Leaving"]
Al__ has joined #ruby
JustinAiken has quit [Client Quit]
cj3kim has quit [Remote host closed the connection]
daniel_hinojosa has quit [Ping timeout: 246 seconds]
zeade has quit [Quit: Leaving.]
pentameter has quit [Read error: Connection reset by peer]
thoolihan has joined #ruby
zeade has joined #ruby
jimg has quit [Ping timeout: 240 seconds]
Jackneill has quit [Ping timeout: 264 seconds]
ivanoats has joined #ruby
cj3kim has joined #ruby
zmike123 has quit [Quit: Выходжу]
chrishough has joined #ruby
mansi has joined #ruby
PigDude has left #ruby [#ruby]
vlad_starkov has quit [Remote host closed the connection]
brbcoding has quit [Ping timeout: 245 seconds]
zer0-day has quit [Quit: zer0-day]
timonv has quit [Remote host closed the connection]
cofin has joined #ruby
JustinAiken has joined #ruby
cofin has quit [Client Quit]
xardas has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
v0n has quit [Read error: Operation timed out]
ndngvr has joined #ruby
JustinAiken has quit [Client Quit]
amedeiros has quit [Ping timeout: 256 seconds]
harrymoreno_ has joined #ruby
harrymoreno has quit [Ping timeout: 256 seconds]
harrymoreno_ is now known as harrymoreno
byprdct has quit [Read error: Connection reset by peer]
k610 has joined #ruby
anonymuse has joined #ruby
kayloos has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
kpshek has joined #ruby
huoxito has quit [Quit: Leaving]
brennanMKE has quit [Read error: Connection reset by peer]
bricker_ has joined #ruby
brennanMKE has joined #ruby
kirun has quit [Quit: Client exiting]
Apane has joined #ruby
threesome has joined #ruby
cj3kim has quit [Remote host closed the connection]
bricker has quit [Ping timeout: 276 seconds]
byprdct has joined #ruby
brennanM_ has joined #ruby
brennanMKE has quit [Ping timeout: 252 seconds]
atno has quit [Remote host closed the connection]
atno has joined #ruby
ner0x has quit [Quit: Leaving]
geekbri has quit [Remote host closed the connection]
bricker_ is now known as bricker
thoolihan has quit [Quit: thoolihan]
tw1sted has quit [Quit: tw1sted]
AlHafoudh has quit [Quit: Computer has gone to sleep.]
chipotle_ has joined #ruby
`MArceLL` has joined #ruby
falkoner1 has left #ruby [#ruby]
Zai00 has quit [Quit: Zai00]
mocfive has quit [Remote host closed the connection]
RORgasm_ has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 248 seconds]
kasper has quit [Remote host closed the connection]
TheFuzzball has quit [Ping timeout: 276 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
mmlac-bv has quit [Quit: mmlac-bv]
milardovich has quit [Quit: Leaving]
v0n has joined #ruby
Guga_ has joined #ruby
carlyle has quit [Remote host closed the connection]
estebanrules has joined #ruby
Kovensky has quit [Ping timeout: 252 seconds]
phasma has joined #ruby
mroth has joined #ruby
freerobby has quit [Quit: Leaving.]
heidar has joined #ruby
vlad_starkov has joined #ruby
karnowski has joined #ruby
moeSeth has joined #ruby
bluehavana has joined #ruby
TheHodge has joined #ruby
Spaceghost|cloud has joined #ruby
carloslopes has quit [Remote host closed the connection]
im0b has joined #ruby
wyan has quit [Read error: Operation timed out]
zphobic has quit [Read error: Operation timed out]
zphobic has joined #ruby
notbrent__ has joined #ruby
Guest85414__ has joined #ruby
yeban has joined #ruby
mark_locklear has quit [Ping timeout: 252 seconds]
motto has joined #ruby
fcoury__ has joined #ruby
Bry8Star{T2 has joined #ruby
geggam has quit [Remote host closed the connection]
dnyy has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
xerxas has joined #ruby
freerobby has joined #ruby
geoffw8_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
rwz__ has joined #ruby
Al__ has joined #ruby
mmitchel_ has joined #ruby
prophile has quit [Read error: Operation timed out]
mansi has joined #ruby
vaicine has quit [Read error: Operation timed out]
mansi has quit [Read error: Connection reset by peer]
burlyscudd has quit [Quit: Leaving.]
[Neurotic] has joined #ruby
JustinAiken has joined #ruby
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Naeblis has joined #ruby
vaicine has joined #ruby
mansi has joined #ruby
mmitchell has quit [Ping timeout: 252 seconds]
thejefflarson___ has joined #ruby
mmlac-bv has joined #ruby
m8 has quit [Ping timeout: 264 seconds]
NimeshNeema has joined #ruby
mansi has quit [Read error: Connection reset by peer]
JustinAiken has quit [Client Quit]
mansi has joined #ruby
coreinfo99 has quit [Ping timeout: 255 seconds]
keyvan has joined #ruby
dmiller has quit [Remote host closed the connection]
prophile has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
ELLIOTTCABLE has quit [Remote host closed the connection]
wyan has joined #ruby
ELLIOTTCABLE has joined #ruby
mikepack has quit [Remote host closed the connection]
_rgn has joined #ruby
mwlang has joined #ruby
mikepack has joined #ruby
<mwlang> I have installed a gem that is failing when encountering the following line: "require 'getopts'" This is on Ruby 2.0. Does anyone know what provides getopts?
wsterling has quit [Read error: Connection reset by peer]
hattusili_III has quit [Ping timeout: 240 seconds]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wsterling has joined #ruby
pyrac has joined #ruby
<thoughtpunch> Have you tried manually installing the 'getopts' gem? http://rubygems.org/gems/getopt
adambeynon has joined #ruby
machuga is now known as machuga|away
<mwlang> I did
<mwlang> but getopt doesn't seem to be the same as getopts
vlad_starkov has quit [Ping timeout: 276 seconds]
pkrnj has joined #ruby
pitzips has joined #ruby
anonymuse has quit [Read error: Connection reset by peer]
wargasm has quit [Read error: Connection reset by peer]
<MrZYX> looks like getopts was removed in ruby 1.9 already
sambao21 has quit [Quit: Computer has gone to sleep.]
icole_ has quit [Read error: Connection reset by peer]
lunarjar has quit [Ping timeout: 245 seconds]
wargasm has joined #ruby
icole has joined #ruby
snearch has joined #ruby
fomatin has joined #ruby
<mwlang> so it was part of stdlib prior to ruby2?
<MrZYX> prior to ruby 1.9
<mwlang> I skipped 1.9. :p
<mwlang> is there a gem out there to provide a drop-in replacement?
PhilK has quit [Ping timeout: 245 seconds]
mansi has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
<MrZYX> I'd rather suggest you seek an alternative to a gem that still requires it
<mwlang> to be fair, I'm updating a gem that purported came from ruby 1.4
zets has joined #ruby
aspiers has quit [Ping timeout: 245 seconds]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
<MrZYX> ruby 1.8 is EOL, 1.9 is out for many years now, if it wasn't updated yet it'll never be
Nanuq has quit [Ping timeout: 245 seconds]
<MrZYX> and that might be just the first thing it errors out at
<mwlang> I'm trying to find a library that binds to libpcap
arya_ has joined #ruby
lewix has joined #ruby
dmiller has joined #ruby
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<mwlang> actually, I'll try replacing with Trollop and see how far I can get quickly with that approach.
mansi has joined #ruby
kofno has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
akells`_ has joined #ruby
<MrZYX> quick rubygems search: https://github.com/shadowbq/pcaprub https://github.com/sophsec/ffi-pcap https://github.com/ickymettle/ruby-pcap and a dozen others that aren't that recently updated
kasper has joined #ruby
akells` has quit [Read error: Connection reset by peer]
Nanuq has joined #ruby
PhilK has joined #ruby
<mwlang> yeah, I just now saw ffi-pcap myself while hunting again.
<mwlang> I'll try that one out.
yalue has quit [Quit: Leaving]
lunarjar has joined #ruby
aspiers has joined #ruby
maetthew has joined #ruby
kadoo has joined #ruby
NorxMAL has joined #ruby
<NorxMAL> What does .to_s() do?
<NorxMAL> I'm unfamiliar with ruby, but I'm trying to understand some code
<MrZYX> NorxMAL: get a shell, type irb, try it out
wsterling has quit [Remote host closed the connection]
<LucasTT> turns the integer/float to a string
<MrZYX> not only numbers
<NorxMAL> What would 37726 become?
<MrZYX> get a shell, type irb, try it out
<LucasTT> "37726"
<NorxMAL> Thank you :)
<LucasTT> it turn it to a string
carlyle has joined #ruby
<MrZYX> generally speaking #to_s asks the object to return a string representation of itself
devoldmx3 has joined #ruby
aspiers_ has joined #ruby
motto has quit [Quit: Sto andando via]
<NorxMAL> url = url + "&qteam=" + fah_team.to_s()
<NorxMAL> ops
<NorxMAL> I forgot where I was going xD
kasper has quit [Remote host closed the connection]
<MrZYX> url += "&qteam#{fah_team}"
<MrZYX> eh, plus the missing =
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
<NorxMAL> if fah_team is 37726, it would become &qteam=#{fah_team} ?
<NorxMAL> ops
<NorxMAL> if fah_team is 37726, it would become &qteam=#{37726} ?
aspiers has quit [Read error: Operation timed out]
<MrZYX> no &qteam=37726
<NorxMAL> okay, thanks a lot :)
<NorxMAL> I don't have readilly access to a shell :)
devoldmx has quit [Ping timeout: 276 seconds]
ldnunes has quit [Quit: Leaving]
<MrZYX> huh?
<MrZYX> why's that?
<NorxMAL> I'm trying to debug a site
gyre007 has quit [Ping timeout: 245 seconds]
relix has joined #ruby
<NorxMAL> Or rather, understand how the script does a certain thing
<NorxMAL> Well, it's input is "37726", so it still becomes &qteam=37726 right?
danshultz has quit [Remote host closed the connection]
<MrZYX> yup
<NorxMAL> You have saved me a ton of time :)
baroquebobcat has quit [Quit: baroquebobcat]
<Spooner> NorxMAL, http://repl.it/ if you don't have a shell (though you could just install Ruby locally and run irb).
<NorxMAL> Thanks :)
<MrZYX> Spooner: :(
<MrZYX> Ruby 1.8.7 (2008-05-31 patchlevel 0) [x86-linux]
interact_ has quit [Remote host closed the connection]
generalissimo has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 240 seconds]
interactionjaxsn has joined #ruby
mendel has quit [Quit: Leaving.]
<apeiros> kill it? with fire?!?
Al__ has quit [Read error: Connection reset by peer]
Cyrus has joined #ruby
<MrZYX> I guess even http://joshnuss.github.io/mruby-web-irb/ would be better
Al__ has joined #ruby
<MrZYX> and that doesn't even keep state
<Spooner> MrZYX apeiros, Yeah, well, it beats using us as IRB ;) But yeah, there are probably better repls.
<Spooner> *web repls
asteve has quit [Ping timeout: 268 seconds]
wesside has quit [Quit: Computer has gone to sleep.]
chipotle_ has quit [Quit: cya]
mendel has joined #ruby
xardas has quit [Ping timeout: 268 seconds]
amedeiros has joined #ruby
BarneyRubble has quit [Quit: Leaving]
PragCypher has quit [Remote host closed the connection]
coreinfo99 has joined #ruby
interactionjaxsn has quit [Ping timeout: 268 seconds]
johnrlive has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 240 seconds]
pyrac has quit [Quit: pyrac]
codecop has quit [Remote host closed the connection]
amedeiros has joined #ruby
spider-mario has quit [Remote host closed the connection]
tonini has quit [Ping timeout: 248 seconds]
johnrlive has joined #ruby
JohnBat26 has quit [Ping timeout: 246 seconds]
Kovensky has joined #ruby
johnrlive has quit [Remote host closed the connection]
v0n has quit [Read error: Operation timed out]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
mocfive has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 256 seconds]
amedeiros has joined #ruby
NorxMAL has left #ruby [#ruby]
mocfive has joined #ruby
mendel has quit [Quit: Leaving.]
mansi_ has joined #ruby
mocfive has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
rfizzle has quit [Ping timeout: 245 seconds]
mansi has quit [Read error: Connection reset by peer]
akells` has joined #ruby
akells`_ has quit [Read error: Connection reset by peer]
amedeiros has quit [Ping timeout: 240 seconds]
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phantasm66 has quit [Ping timeout: 268 seconds]
alecs has quit [Quit: Page closed]
Criztian has quit [Remote host closed the connection]
nomenkun has joined #ruby
amedeiros has joined #ruby
tatsuya_o has joined #ruby
mocfive has joined #ruby
erry is now known as plush
elliptical has joined #ruby
Randomage has quit [Ping timeout: 248 seconds]
plush is now known as erry
kadoo has joined #ruby
failshell has quit [Remote host closed the connection]
nowthatsamatt has joined #ruby
Randomage has joined #ruby
bionhart has quit [Remote host closed the connection]
kenneth has joined #ruby
cj3kim has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
ellipse has quit [Ping timeout: 252 seconds]
k610 has quit [Quit: Leaving]
falkoner has joined #ruby
amedeiros has quit [Ping timeout: 256 seconds]
jimg has joined #ruby
amedeiros has joined #ruby
ivanoats has quit [Remote host closed the connection]
richiebkr has quit [Ping timeout: 252 seconds]
cj3kim has quit [Read error: Operation timed out]
jasonkuhrt has quit [Quit: Leaving...]
fuzzyhorns has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
Lemtzas has quit [Read error: Connection reset by peer]
maetthew has quit [Quit: Computer has gone to sleep.]
Aaaarg has quit [Quit: Aaaarg]
jimg has quit [Ping timeout: 268 seconds]
Lemtzas has joined #ruby
staafl has joined #ruby
amedeiros has quit [Ping timeout: 264 seconds]
amedeiros has joined #ruby
axl_ has joined #ruby
Al__ has quit [Quit: Al__]
burlyscudd has joined #ruby
brennanM_ has quit [Read error: Connection reset by peer]
DrIDK has joined #ruby
linsy has quit [Quit: Lost terminal]
Norrin has quit [Excess Flood]
banghouse2 has joined #ruby
burlyscudd has quit [Client Quit]
mendel has joined #ruby
baroquebobcat has joined #ruby
mendel has quit [Client Quit]
tootubular has quit [Quit: tootubular]
ivanoats has joined #ruby
mendel has joined #ruby
<DrIDK> Could someone explain how this is possible http://intridea.github.io/grape/docs/index.html They call keyword directly inside the class.. format :json, helper do etc....
banghouse2 is now known as banghouse
amedeiros has quit [Ping timeout: 240 seconds]
ffio_ has quit [Read error: Operation timed out]
jtharris has quit [Read error: Connection reset by peer]
breakingthings has quit [Quit: breakingthings]
dirk1 has joined #ruby
_ffio_ has joined #ruby
amedeiros has joined #ruby
johnmilton has quit [Remote host closed the connection]
dv__ is now known as dv_
alex__c2022 has quit [Quit: alex__c2022]
pkrnj has quit [Quit: Computer has gone to sleep.]
<slash_nick> DrIDK: something like this https://github.com/rthbound/protected_record/blob/master/lib/protected_record/dirty_model.rb ... add "include PR::DirtyModel" to any model to provide the method "protected_keys"
richiebkr has joined #ruby
LennyLinux has joined #ruby
vlad_starkov has joined #ruby
mmitchel_ has quit [Ping timeout: 260 seconds]
<DrIDK> humm
<DrIDK> it's something like attr_reader :name
<DrIDK> I don't understand how it works
dirk1 has quit [Client Quit]
<DrIDK> is it possible to create : my_stuff :namer
citizensinspace has joined #ruby
<pontiki> DrIDK: is the question you're asking "how does a DSL work?"
jbpros has quit [Quit: jbpros]
<pontiki> DSL == Domain Specific Language
amedeiros has quit [Ping timeout: 256 seconds]
<DrIDK> pontiki, I dont know what's a DSL.. so, I will search it as a keyword , thx
vlad_starkov has quit [Ping timeout: 264 seconds]
nowthatsamatt has quit [Quit: nowthatsamatt]
<pontiki> you are welcome
<pontiki> martin fowler might be the name to start with in that regard
<slash_nick> It seems like he's wanting to create his own class methods to call inside the class... methods like "attr_reader :blah", "format :json", "helper do;end"
saarinen has quit [Quit: saarinen]
<pontiki> that's how you do it
atyz has joined #ruby
<pontiki> rspec provides a DSL, capybara provides a DSL, many many areas have had DSLs made; rake and thor have DSLs, and so on
scrollback has quit [Remote host closed the connection]
scrollback has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
jimg has joined #ruby
DrIDK has quit [Remote host closed the connection]
jerius has quit [Ping timeout: 248 seconds]
<wuest> Is there an interface in ruby to sigsuspend/equivalent functionality? Not seeing one, but maybe there's something esoteric in stdlib I haven't found...
wmoxam has quit [Ping timeout: 245 seconds]
nfk is now known as Harima_Kenji
kindjal has joined #ruby
niceguyjames has joined #ruby
amedeiros has joined #ruby
TheFuzzball has joined #ruby
<pontiki> Process class, maybe? trapping the SIG?
<pontiki> haven't done that, but that's where i'd start
DrCode has joined #ruby
<wuest> Yeah, been digging there. And just trapping the SIG doesn't block, leading to busy waiting, which is what I want to avoid.
chrisja has quit [Quit: leaving]
brotatos has quit [Read error: Operation timed out]
jimg has quit [Ping timeout: 268 seconds]
arya_ has quit [Ping timeout: 248 seconds]
zets has quit [Ping timeout: 252 seconds]
iamjarvo has joined #ruby
adkron has quit [Ping timeout: 246 seconds]
amedeiros has quit [Ping timeout: 260 seconds]
amedeiros has joined #ruby
AndChat| has quit [Ping timeout: 245 seconds]
Aaaarg has joined #ruby
tw1sted has joined #ruby
chichou has joined #ruby
Banistergalaxy has joined #ruby
chipotle_ has joined #ruby
<pontiki> crikey, i found something in the debugger
<pontiki> i don't know if this is usable
nilved has joined #ruby
v0n has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
bklane has joined #ruby
jasonkuhrt has joined #ruby
akells` has quit [Remote host closed the connection]
<pontiki> http://apidock.com/ruby/v1_9_3_392/DEBUGGER__/Context/set_suspend -- this doesn't really look useful
mendel has quit [Quit: Leaving.]
arya has joined #ruby
Norrin has joined #ruby
Norrin has quit [Changing host]
Norrin has joined #ruby
mansi_ has quit [Remote host closed the connection]
<wuest> Hmmm, worth digging more
LucasTT_ has joined #ruby
chichou has quit [Read error: Operation timed out]
<wuest> Thanks! I know it's a weird/uncommon question :)
<pontiki> i haven't even looked at this sort of thing in probably 2 decades
dpritchett has joined #ruby
kofno has joined #ruby
mansi has joined #ruby
amedeiros has quit [Ping timeout: 264 seconds]
ravster has left #ruby [#ruby]
amedeiros has joined #ruby
mmlac-bv has quit [Quit: mmlac-bv]
kpshek has quit []
LucasTT has quit [Ping timeout: 252 seconds]
kofno has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 276 seconds]
axl_ has quit [Quit: axl_]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
atyz has quit [Quit: Leaving...]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mmlac-bv has joined #ruby
arya_ has joined #ruby
jasonkuhrt has quit [Read error: Connection reset by peer]
amedeiros has quit [Ping timeout: 262 seconds]
virtuose has quit [Read error: Operation timed out]
kasper has joined #ruby
amedeiros has joined #ruby
<RubyPanther> Or, you could write your own C wrapper in a few lines
niklasb has quit [Ping timeout: 264 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
arya has quit [Ping timeout: 248 seconds]
wmoxam has joined #ruby
virtuose has joined #ruby
<pontiki> looks good
dpritchett has quit [Quit: This computer has gone to sleep]
kasper has quit [Ping timeout: 246 seconds]
bklane has quit [Read error: Connection reset by peer]
amedeiros has quit [Ping timeout: 264 seconds]
bklane has joined #ruby
amedeiros has joined #ruby
kadoo has quit [Quit: Textual IRC Client: www.textualapp.com]
wsterling has joined #ruby
thams has quit [Quit: thams]
hadees has quit [Quit: hadees]
nowthatsamatt has joined #ruby
threesome has quit [Ping timeout: 248 seconds]
estebanrules has quit [Quit: estebanrules]
niklasb has joined #ruby
axl_ has joined #ruby
hadees has joined #ruby
wsterling has quit [Remote host closed the connection]
wsterling has joined #ruby
iamjarvo has quit [Quit: Leaving.]
amedeiros has quit [Ping timeout: 264 seconds]
amedeiros has joined #ruby
brotatos has joined #ruby
amedeiros has quit [Read error: Connection reset by peer]
tomzx_mac has joined #ruby
coreinfo99 has quit [Ping timeout: 246 seconds]
DomKM has quit [Quit: Leaving.]
nowthatsamatt has quit [Quit: nowthatsamatt]
carlyle has quit [Remote host closed the connection]
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
amedeiros has joined #ruby
bradleyprice has quit [Ping timeout: 256 seconds]
EPIK has joined #ruby
saarinen has joined #ruby
thoughtpunch has quit [Remote host closed the connection]
bklane_ has joined #ruby
freerobby has quit [Quit: Leaving.]
terrellt has quit [Ping timeout: 248 seconds]
amedeiros has quit [Ping timeout: 264 seconds]
generalissimo has joined #ruby
amedeiros has joined #ruby
athst has joined #ruby
amedeiros has quit [Read error: Connection reset by peer]
adkron has joined #ruby
bklane has quit [Ping timeout: 264 seconds]
Guest28377 is now known as martxel
martxel has quit [Changing host]
martxel has joined #ruby
elliptical has quit [Read error: Connection reset by peer]
atyz has joined #ruby
ellipse has joined #ruby
Alina-malina has quit [Ping timeout: 246 seconds]
atyz has quit [Read error: Connection reset by peer]
atyz has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
amedeiros has joined #ruby
LucasTT_ is now known as LucasTT_away
lewix has quit [Remote host closed the connection]
coreinfo99 has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
Aaaarg has quit [Quit: Aaaarg]
tw1sted has quit [Quit: tw1sted]
shadoi has quit [Quit: Leaving.]
shadoi has joined #ruby
amedeiros has quit [Ping timeout: 256 seconds]
fermion has joined #ruby
chxane has joined #ruby
amedeiros has joined #ruby
devoldmx has joined #ruby
pkrnj has joined #ruby
jimg has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
ivanoats has quit [Remote host closed the connection]
DonRichie has quit [Quit: Verlassend]
devoldmx3 has quit [Ping timeout: 252 seconds]
axl_ has quit [Quit: axl_]
dmiller has quit [Remote host closed the connection]
Dummies_freelanc has joined #ruby
Dummies_freelanc has quit [Max SendQ exceeded]
bklane_ has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
amedeiros has joined #ruby
v0n has quit [Read error: Operation timed out]
<Eiam> in SomeHash.reduce({},:update) whats the :update do?
ntus1017 has joined #ruby
Aaaarg has joined #ruby
ivanoats has joined #ruby
byprdct has quit [Ping timeout: 252 seconds]
mklappstuhl has quit [Ping timeout: 240 seconds]
ELLIOTTCABLE has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 248 seconds]
ELLIOTTCABLE has joined #ruby
amedeiros has joined #ruby
ArchBeOS has joined #ruby
jacobw has quit [Quit: WeeChat 0.4.0]
zigomir has quit [Ping timeout: 264 seconds]
sailias has joined #ruby
ravster has joined #ruby
dmiller has joined #ruby
patbr0wn has quit [Ping timeout: 252 seconds]
wsterling has quit [Remote host closed the connection]
amedeiros has quit [Read error: Operation timed out]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amedeiros has joined #ruby
jrhe has joined #ruby
<Spooner> Eiam, It is equivalent to [hash1, hash2, hash3].reduce({}) {|m, e| m.update e } (Doesn't actually make sense if it is a hash being reduced, not an Array of Hashes).
jrhe has quit [Client Quit]
bradleyprice has joined #ruby
lewix has joined #ruby
predator117 has joined #ruby
<Eiam> err, yeah it was array of hashes
<Eiam> okay so update is being called on a hash
Aaaarg has quit [Quit: Aaaarg]
gyre007 has joined #ruby
amedeiros has quit [Ping timeout: 240 seconds]
nezumi has joined #ruby
mocfive has quit [Remote host closed the connection]
<Eiam> (wasn't aware of .update) which is apparently hte same as merge?
jonathanwallace has quit [Ping timeout: 252 seconds]
predator217 has quit [Ping timeout: 264 seconds]
<Eiam> http://www.ruby-doc.org/core-2.0/Hash.html#method-i-update they don't even give an example with update
mendel has joined #ruby
amedeiros has joined #ruby
thoughtpunch has joined #ruby
mendel has quit [Client Quit]
AlSquire has quit [Quit: This computer has gone to sleep]
cj3kim has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
slainer68 has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 260 seconds]
tw1sted has joined #ruby
<Eiam> i find myself doing map().reduce({},:update) rather often
<Eiam> maybe i should stop using map =0
alex88 has quit [Ping timeout: 246 seconds]
danman has joined #ruby
amedeiros has joined #ruby
<pontiki> depends
<pontiki> but yeah, maybe
<pontiki> i love reduce, but i probably way over use it
tylersmith has quit [Remote host closed the connection]
<danman> I am using ruby 1.9.3, any idea why I am getting errors for "{ 'name' => 'Rob', 'years' => '28' }.symbolize_keys"
<danman> NoMethodError: undefined method `symbolize_keys' for {"name"=>"Rob", "years"=>"28"}"?
<r0bgleeson> danman: symbolize_keys comes from rails
<havenwood> danman: The is no symbolize_keys method ^
<pontiki> but it is a rad method
LucasTT_away has quit [Quit: Leaving]
osvico has joined #ruby
<havenwood> danman: You could use tiny hashy gem and hash.map_value &:to_s: https://github.com/havenwood/hashy
<pontiki> look at this too: https://github.com/intridea/hashie
ivanoats has quit [Remote host closed the connection]
akells` has joined #ruby
Kar- has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 240 seconds]
bricker has quit [Quit: leaving]
amedeiros has joined #ruby
timkohrumel has quit [Remote host closed the connection]
synthetix has quit [Ping timeout: 248 seconds]
jonathanwallace has joined #ruby
<havenwood> danman: class Hash; def map_pair &block; Hash[map &block] end end; { 'aim' => true }.map_pair { |k, v| [k.to_sym, v] }; #=> { :aim => true }
krawchyk has joined #ruby
ArchBeOS has quit [Remote host closed the connection]
akells` has quit [Ping timeout: 240 seconds]
robscomputer has quit [Remote host closed the connection]
kasper has joined #ruby
robscomputer has joined #ruby
bricker has joined #ruby
<pontiki> the way Rails does it seems a lot more straight-forward
elliptical has joined #ruby
<pontiki> granted it extends Hash
rhys has quit [Quit: Leaving]
amedeiros has quit [Ping timeout: 264 seconds]
amedeiros has joined #ruby
ellipse has quit [Ping timeout: 276 seconds]
richiebkr has quit [Quit: richiebkr]
snearch has quit [Quit: Verlassend]
mrsolo has quit [Quit: Leaving]
carlyle has joined #ruby
harrymoreno_ has joined #ruby
danman has quit [Quit: danman]
robscomputer has quit [Ping timeout: 276 seconds]
harrymoreno has quit [Ping timeout: 264 seconds]
harrymoreno_ is now known as harrymoreno
mocfive has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
Aaaarg has joined #ruby
lewix has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 252 seconds]
amedeiros has joined #ruby
<r0bgleeson> >> foo = { "a" => "b", "c" => "d" }; Hash[foo.keys.map(&:to_sym).zip(foo.values)]
<eval-in> r0bgleeson => {:a=>"b", :c=>"d"} (https://eval.in/33820)
<r0bgleeson> that also works
<r0bgleeson> with no monkey patch
markalanevans has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
redgirl has quit [Quit: This computer has gone to sleep]
<slash_nick> >> foo = { "a-z" => "b", "c" => "d" }; Hash[foo.keys.map(&:to_sym).zip(foo.values)]
<eval-in> slash_nick => {:"a-z"=>"b", :c=>"d"} (https://eval.in/33821)
<slash_nick> just curious
<pontiki> nod
Fire-Dragon-DoL has joined #ruby
burlyscudd has joined #ruby
thoughtpunch has quit [Remote host closed the connection]
<havenwood> Hash[foo.map { |k, v| [k.to_sym, v] }]
mindeavor has joined #ruby
<r0bgleeson> oh yeah even better
<pontiki> as slash_nick points out, may want to emulate symbolize as well?
devoldmx has joined #ruby
<mindeavor> if I'm developing a gem, and I have json files inside the gem's directory, how can I load them from code inside the gem's lib/ folder?
amedeiros has quit [Ping timeout: 240 seconds]
<havenwood> mindeavor: require_relative
Fire-Dragon-DoL1 has joined #ruby
Fire-Dragon-DoL1 has left #ruby [#ruby]
<pontiki> are you looking how to find the files?
amedeiros has joined #ruby
_maes_ has joined #ruby
Fire-Dragon-DoL1 has joined #ruby
burlyscudd has quit [Ping timeout: 276 seconds]
<pontiki> i don't think requiring json files will do much good
Fire-Dragon-DoL1 has quit [Client Quit]
<pontiki> as they aren't ruby
<havenwood> hehe
niklasb has quit [Ping timeout: 240 seconds]
<mindeavor> pontiki: yes. For example, in lib/myfile.rb, I'd like to load a json file
bklane has joined #ruby
<havenwood> pontiki: good point >.>
<pontiki> look at File.expand_path
sambao21 has quit [Quit: Computer has gone to sleep.]
<pontiki> for instance File.expand_path(__FILE__, '../..')
cj3kim has quit [Remote host closed the connection]
<havenwood> mindeavor: do you know the names of the json files or are you globbing them?
<pontiki> oops
<havenwood> mindeavor: Ruby 2.0?
patbr0wn has joined #ruby
<pontiki> for instance File.expand_path(File.dirname(__FILE__), '../..')
<mindeavor> havenwood: I do know the names, and I'm running 1.9
<pontiki> that should give you the root directory of your gem
<mindeavor> pontiki: Would I put that inside the main lib/gem_name.rb file?
devoldmx has quit [Ping timeout: 252 seconds]
<Apane> So, I'm using feedzirra gem (https://github.com/pauldix/feedzirra) for parsing and displaying RSS data. However, I'm having trouble displaying different feeds. The code in my view is displaying FeedEntry.all, albeit, I'd like to display several different feeds under different headers. Here's the gist of it: https://gist.github.com/anonymous/5801535
<pontiki> so: json_files = Dir.glob(#{File.expand_path(File.dirname(__FILE__),'../..')}/*.json)
Inside has joined #ruby
<mindeavor> thanks pontiki, I will try that now
<pontiki> that's not quite it, but i think you get the idea?
<mindeavor> I think so. we'll see
<pontiki> like that thing in the Dir.glob needs to be in quotes
richiebkr has joined #ruby
amedeiros has quit [Ping timeout: 246 seconds]
<pontiki> mindeavor: where you put it may change the depth of the '../..' part
amedeiros has joined #ruby
<pontiki> lib/ should be '../..'; lib/gem_name should be '../../..' i think?
<havenwood> mindeavor: In Ruby 2.0 you can use __dir__, when you upgrade: File.join(__dir__, '../whatev.json')
Norrin has quit [Excess Flood]
DanKnox is now known as DanKnox_away
<pontiki> ^
<pontiki> so much nicer that File.dirname(__FILE__) all over!
<mindeavor> havenwood: thanks for the info, though I'd rather my gem not require 2.0
banisterfiend has joined #ruby
<havenwood> mindeavor: ah, yes - good point
atyz has quit [Read error: Connection reset by peer]
slainer68 has joined #ruby
atyz has joined #ruby
huoxito has joined #ruby
hattusili_III has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
Norrin has joined #ruby
<havenwood> pontiki: Also replaces expand_path too, so __dir__ instead of File.expand_path(File.dirname(__FILE__))
devoldmx has joined #ruby
<havenwood> Here, __dir__ for the poor and huddled Rubies of yore: https://gist.github.com/havenwood/5801572
chipotle_ has left #ruby ["cya"]